Multiplayer agent harness for work.
feat(connectors): add Zoom OAuth connector for scheduling meetings
Jet Zhou75aa81251d74
diff --git a/plugins/web-ui/src/connector-link.ts b/plugins/web-ui/src/connector-link.tsindex 330598376..8b3f6d9d7 100644--- a/plugins/web-ui/src/connector-link.ts+++ b/plugins/web-ui/src/connector-link.ts@@ -29,6 +29,10 @@ export const CONNECTOR_LABELS: Record<string, { name: string; hosts: string }> =name: "X (Twitter)",hosts: "Posts & profile",},+ zoom: {+ name: "Zoom",+ hosts: "Meetings",+ },};export interface ConnectorLink {diff --git a/skills-seed/zoom/SKILL.md b/skills-seed/zoom/SKILL.mdnew file mode 100644index 000000000..6140f1175--- /dev/null+++ b/skills-seed/zoom/SKILL.md@@ -0,0 +1,149 @@+---+name: zoom+description: Find, create, reschedule, and cancel the user's Zoom meetings through per-user OAuth.+requiredCapabilities:+ - egress:api.zoom.us+---++# Zoom++Use this skill when the user asks for a Zoom meeting or link, wants to know what Zoom+meetings they have coming up, or wants to move or cancel one.++This is an OAuth connector. The resolved user's Zoom token already lives on your computer+as an environment variable (the way a logged-in CLI's cached credential would):++- `$VAULT_TOKEN_API_ZOOM_US` — for `api.zoom.us`++Pass it as `-H "Authorization: Bearer $VAULT_TOKEN_API_ZOOM_US"`. Never ask the user for a+token, log it, or use another principal's credential.++Per-user connector tokens are present in the user's own DM and personal scheduled tasks,+and in a shared room or channel automation only when the user has opened their connections+there. If the variable is empty in a shared room, ask them to DM you instead of telling+them to reconnect; empty in their DM means they haven't connected Zoom — point them to the+Connectors page.++Zoom error codes: `124` (invalid access token) means they need to reconnect Zoom. `4711`+("does not contain scopes") means their token lacks that scope — if the org's Zoom app+already has it they reconnect, otherwise an admin adds it to the app first. `3001` means the+meeting does not exist or is not theirs.++## Writes require approval++Creating, updating, or deleting a meeting is a write. Show the exact topic, start time with+timezone, and duration (or which meeting changes and how) and ask for approval before+running it. Reads need no approval. In a shared channel, don't post the passcode or full+`join_url` unless everyone there may join.++**Never share `start_url`.** It embeds a host token that lets anyone start the meeting as+the user. Responses that carry it go through `jq` below so it never reaches your output.++## Find meetings++Who the user is, and their default timezone:++```bash+curl -sS 'https://api.zoom.us/v2/users/me' \+ -H "Authorization: Bearer $VAULT_TOKEN_API_ZOOM_US" | jq '{id, email, timezone, code, message}'+```++Upcoming meetings (the next six months; keep fetching with `next_page_token` until it is+empty; times are UTC):++```bash+curl -sS --get 'https://api.zoom.us/v2/users/me/meetings' \+ -H "Authorization: Bearer $VAULT_TOKEN_API_ZOOM_US" \+ --data-urlencode 'type=upcoming' \+ --data-urlencode 'page_size=300' \+ | jq '{next_page_token, meetings: [.meetings[]? | {id, topic, type, start_time, duration, timezone, host_id, join_url}], code, message}'+```++One meeting — a recurring series appears once in the list; its `occurrences` (skip any+with `status: deleted`) come from here:++```bash+curl -sS "https://api.zoom.us/v2/meetings/$MEETING_ID" \+ -H "Authorization: Bearer $VAULT_TOKEN_API_ZOOM_US" \+ | jq '{id, topic, type, start_time, duration, timezone, host_email, join_url, password, occurrences, code, message}'+```++A join URL carries the meeting ID: `https://us06web.zoom.us/j/85012345678?pwd=...` is+meeting `85012345678`. A `type` of `4`, or a `/my/<name>` link, is the user's personal+meeting room, shared by every meeting that uses it — never reschedule or delete it.++## Create a meeting++Send `start_time` as local wall-clock time without an offset (`2026-11-02T10:00:00`) plus+the IANA `timezone`, and Zoom converts it. Use the timezone the user gives, the calendar+event's, or their Zoom profile's; the sandbox clock is UTC, so never assume it. Calendars+that report Windows zone names ("Pacific Standard Time") need mapping to IANA+(`America/Los_Angeles`). `duration` is in minutes.++```bash+curl -sS -X POST 'https://api.zoom.us/v2/users/me/meetings' \+ -H "Authorization: Bearer $VAULT_TOKEN_API_ZOOM_US" \+ -H 'content-type: application/json' \+ --data '{"topic":"Team sync","type":2,"start_time":"2026-11-02T10:00:00","timezone":"America/Los_Angeles","duration":30}' \+ | jq '{id, join_url, password, start_time, duration, timezone, code, message, errors}' > zoom-meeting.json+cat zoom-meeting.json+```++The returned `start_time` is UTC — check it is the instant you meant, because Zoom+silently uses the current time for a missing or past value. The user is the host; leave+`settings` out unless they ask, so the account's defaults (waiting room, passcode) apply.+If the response was lost, list upcoming meetings before creating again — never create a+duplicate.++For a recurring calendar event, create `type: 3` (one link, no fixed time) and leave out+`start_time`. Moving or cancelling one occurrence of the event needs no Zoom change; delete+the meeting only when the whole series ends.++## Reschedule or cancel++Get the meeting first and confirm it is the one the user means. If `host_email` is not the+user's, it belongs to someone who gave them scheduling rights — say whose meeting it is+before changing it. For a recurring meeting with fixed times (`type: 8`), add+`?occurrence_id=<id>` (from `occurrences`) to change or delete one occurrence; without it,+the whole series changes.++Reschedule, with the same time rules as create:++```bash+curl -sS -w '\n%{http_code}\n' -X PATCH "https://api.zoom.us/v2/meetings/$MEETING_ID" \+ -H "Authorization: Bearer $VAULT_TOKEN_API_ZOOM_US" \+ -H 'content-type: application/json' \+ --data '{"start_time":"2026-11-02T11:00:00","timezone":"America/Los_Angeles","duration":45}'+```++`204` comes back even when Zoom ignored a past `start_time`, so get the meeting again and+confirm the new time before reporting it.++Cancel (`204` means done):++```bash+curl -sS -w '\n%{http_code}\n' -X DELETE "https://api.zoom.us/v2/meetings/$MEETING_ID" \+ -H "Authorization: Bearer $VAULT_TOKEN_API_ZOOM_US"+```++Zoom doesn't notify attendees of either change.++## With a calendar++This skill only talks to Zoom. To put a meeting on the user's calendar, use whichever+calendar connector they have:++- Check the event before creating a meeting: the user must be able to edit it (usually as+ organizer), and if it already has a video link, ask before adding another.+- Add the join details without overwriting anything: append the `join_url`, meeting ID,+ and passcode to the description, and fill the location only if it is empty.+- All-day events have no time — ask when the meeting is. For a recurring event, ask whether+ they mean one occurrence or the series.+- Nothing keeps the two in sync. When the event moves or is cancelled, update or delete+ the meeting too (the meeting ID is in the event's join URL); when you move or cancel a+ meeting that is on an event, update the event too, or tell the user that attendees+ weren't told.+- If the calendar step fails after the meeting was created, report the meeting ID and offer+ to delete it.++Report the meeting ID, the `join_url`, and what changed.diff --git a/src/connectors/oauth.ts b/src/connectors/oauth.tsindex 656041407..d7a6bdd85 100644--- a/src/connectors/oauth.ts+++ b/src/connectors/oauth.ts@@ -187,6 +187,8 @@ const github = makeTokenAdapters({ acceptJson: true, rejectErrorBody: true, labeconst x = makeTokenAdapters({ acceptJson: true, rejectErrorBody: true, label: "x", clientAuth: "basic" });+const zoom = makeTokenAdapters({ acceptJson: true, rejectErrorBody: true, label: "zoom", clientAuth: "basic" });+const slackExchange: OAuthExchangeAdapter = async ({ provider, client, code, redirectUri, fetchImpl }) => {const res = await fetchImpl(provider.tokenUrl, {method: "POST",@@ -457,6 +459,33 @@ export const PROVIDERS: Record<string, OAuthProviderConfig> = {"tweet.read/users.read back reads; tweet.write lets the connecting user post as themselves; offline.access issues a refresh token so the 2-hour access token renews.",},},++ zoom: {+ label: "Zoom",+ hosts: ["api.zoom.us"],+ authUrl: "https://zoom.us/oauth/authorize",+ tokenUrl: "https://zoom.us/oauth/token",+ scopes: [],+ clientIdEnv: "ZOOM_OAUTH_CLIENT_ID",+ clientSecretEnv: "ZOOM_OAUTH_CLIENT_SECRET",+ redirectPath: "zoom/callback",+ consentMode: "standard",+ egressRule: ["api.zoom.us"],+ exchange: zoom.exchange,+ refresh: zoom.refresh,+ setupGuide: {+ console: "Zoom App Marketplace → Develop → Build App → General app",+ url: "https://marketplace.zoom.us/",+ steps: [+ "Create a General app and choose User-managed. Until it is published, only users in your Zoom account can connect it.",+ "Add the redirect URI shown below as the OAuth redirect URL and to the OAuth allow list, with strict mode on.",+ "Under Scopes, add meeting:read:meeting, meeting:read:list_meetings, meeting:write:meeting, meeting:update:meeting, meeting:delete:meeting, and user:read:user.",+ "Paste the Client ID + Client secret below — the Development credentials unless the app is published.",+ ],+ scopesRationale:+ "Zoom grants the scopes configured on the app rather than a requested list; the meeting scopes let the agent find, create, reschedule, and cancel meetings the connecting user hosts or schedules, and user:read:user reads their Zoom profile and timezone.",+ },+ },};export interface PublicOAuthClient {diff --git a/src/core/orchestrator/turn-helpers.ts b/src/core/orchestrator/turn-helpers.tsindex 2cf267725..4dbb7a748 100644--- a/src/core/orchestrator/turn-helpers.ts+++ b/src/core/orchestrator/turn-helpers.ts@@ -63,6 +63,7 @@ const CONNECTOR_SKILL_PROVIDERS: Readonly<Record<string, string>> = {"morning-digest": "x","slack-drafts": "slack",x: "x",+ zoom: "zoom",};export function filterConnectorSkills(diff --git a/test/connector-byo-route.test.ts b/test/connector-byo-route.test.tsindex 6757db871..92b5d817e 100644--- a/test/connector-byo-route.test.ts+++ b/test/connector-byo-route.test.ts@@ -211,7 +211,7 @@ test("the catalog endpoint exposes per-provider setup guidance (no secrets)", ascatalog: Array<{ provider: string; setupGuide: { url: string; steps: string[] }; consentMode: string }>;};const names = catalog.map((c) => c.provider).sort();- assert.deepEqual(names, ["dropbox", "github", "google", "linear", "notion", "slack", "x"]);+ assert.deepEqual(names, ["dropbox", "github", "google", "linear", "notion", "slack", "x", "zoom"]);const google = catalog.find((c) => c.provider === "google")!;assert.ok(google.setupGuide.steps.length >= 3);assert.match(google.setupGuide.url, /^https:\/\//);diff --git a/test/connector-skill-filter.test.ts b/test/connector-skill-filter.test.tsindex 32f01dc60..5d1ba0afe 100644--- a/test/connector-skill-filter.test.ts+++ b/test/connector-skill-filter.test.ts@@ -31,6 +31,7 @@ test("provider skills are visible only for connectors configured by the admin",skill("linear"),skill("x"),skill("slack-drafts"),+ skill("zoom"),];assert.deepEqual(filterConnectorSkills(all, []).map((entry) => entry.skill?.manifest.name),diff --git a/test/skills-seed.test.ts b/test/skills-seed.test.tsindex 61409422e..39738e98a 100644--- a/test/skills-seed.test.ts+++ b/test/skills-seed.test.ts@@ -208,7 +208,7 @@ test("a fresh app advertises and materializes only admin-enabled connector skillassert.match(sys.reply ?? "", /google-workspace/);assert.match(sys.reply ?? "", /google-drive-sheets/);assert.match(sys.reply ?? "", /github-gitlab/);- assert.doesNotMatch(sys.reply ?? "", /\*\*dropbox\*\*|\*\*linear\*\*/);+ assert.doesNotMatch(sys.reply ?? "", /\*\*dropbox\*\*|\*\*linear\*\*|\*\*zoom\*\*/);const channelSys = await app.turn({surface: "test",@@ -218,7 +218,7 @@ test("a fresh app advertises and materializes only admin-enabled connector skill} as TurnRequest);assert.match(channelSys.reply ?? "", /google-workspace/);assert.match(channelSys.reply ?? "", /google-drive-sheets/);- assert.doesNotMatch(channelSys.reply ?? "", /\*\*dropbox\*\*|\*\*linear\*\*/);+ assert.doesNotMatch(channelSys.reply ?? "", /\*\*dropbox\*\*|\*\*linear\*\*|\*\*zoom\*\*/);const read = await app.turn({surface: "test",