Skip to content

Add WhatsApp relay sample for GitHub Copilot harness agents - #543

Open
adilei wants to merge 2 commits into
mainfrom
adilei-whatsapp-upstream-pr
Open

adilei wants to merge 2 commits into
mainfrom
adilei-whatsapp-upstream-pr

Conversation

@adilei

@adilei adilei commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add the WhatsApp relay sample at extensibility/agents-sdk/whatsapp-relay/, under Extensibility → Agents SDK → WhatsApp Relay.
  • Connect Meta's WhatsApp Cloud API to a published GitHub Copilot harness agent with delegated sign-in through the Microsoft 365 Agents SDK and Azure Bot OAuth. Preserve the single-process, memory-only design, including isolated SDK identity, MemoryStorage, and GHCP conversation state for each sender.
  • Integrate the existing documentation with Just the Docs: README and deep-page front matter, category Contents entry, JTD callouts, relocated setup paths, site-compatible links, and source links for the excluded .env.example. Preserve the approved screenshot, Mermaid flow, documentation order, and detailed enterprise architecture guidance.

Source and scope

Import only the 38 tracked files from WhatsAppRelaySample/ at adilei/CopilotStudioSamples@08422ea96c3ca2be680ea6461c22a9ca93f3c3d0. No fork history or repository-root files are imported. All 35 non-Markdown sample files are byte-identical to that snapshot; only the three Markdown documents are adapted, plus one row in the upstream category README.

No CI trigger changes, historical migration mapping changes, durable storage, brokers, additional LLMs, or alternate runtimes are included. The existing fork PR and branch are untouched.

Validation performed in the relocated sample

  • npm test: 97 passed, 0 failed, 0 skipped on Node.js 22.17.0, including TypeScript compilation and setup/deployment regression tests. Dependencies were restored with npm ci after the initial missing-TypeScript failure.
  • JEKYLL_ENV=production bundle exec jekyll build: passed on Ruby 3.3.9; existing Just the Docs Sass deprecation warnings remain.
  • Generated-site checks: 59 distinct sample links, assets, and anchors returned HTTP 200 with valid fragments. Verified category registration, sidebar inclusion, deep-page navigation exclusion, all three pages in search, JTD callouts, screenshot byte parity, and exclusion of source/dependency/configuration artifacts from the generated sample.
  • Headless Chromium: Mermaid 11 rendered all five flow nodes; the supplied screenshot loaded; the breadcrumb hierarchy and search results were correct; extensionless deep-page links, the endpoint anchor, and the return link worked with no page errors.
  • Source-parity and staged-inventory checks passed. No private .env, setup journals, credentials, node_modules, dist, _site, vendor, or validation artifacts are committed. git diff --cached --check passed.

Limitations and live-test boundary

This import performed no cloud provisioning, authentication changes, Meta callback changes, Azure deployments, or live WhatsApp tests. Setup tests use local fixtures rather than live providers.

The documentation preserves earlier live-test evidence and its limits: one fixed Azure deployment entrypoint exited successfully; a second local entrypoint was interrupted, although its remote deployment completed and the remaining checks passed directly. This is not represented as two uninterrupted CLI successes. Full interactive WhatsApp acceptance, media-modality coverage, and real two-user validation remain unverified. This experimental sample is not an enterprise-ready channel.

Import the pinned GHCP WhatsApp relay sample and integrate its documentation with the Just the Docs site.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5869ff02-9098-43dc-a19c-4ae824425ac2
url: "https://lookaside.fbsbx.com/media", mime_type: sample.mime, file_size: sample.bytes.length,
sha256: createHash("sha256").update(sample.bytes).digest("hex"),
});
if (url.startsWith("https://lookaside.fbsbx.com")) {
{ file_size: limits.fileBytes + 1 }, { url: "https://untrusted.example.org/file" },
{ sha256: "0".repeat(64) },
]) {
const client = new MetaClient(config, async input => String(input).includes("graph.facebook.com")
Accept supported image, audio, and video files sent as WhatsApp documents while retaining MIME-based limits and validation. Add eight regression tests and document the behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5869ff02-9098-43dc-a19c-4ae824425ac2
let calls = 0;
const client = new MetaClient(config, async input => {
calls++;
return String(input).includes("graph.facebook.com") ? Response.json({
let calls = 0;
const client = new MetaClient(config, async input => {
calls++;
return String(input).includes("graph.facebook.com") ? Response.json({

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants