TypeScript scaffold for a Microsoft Foundry hosted-session Responses web app generator.
The approved v1 design is in design.md; PLAN.md intentionally follows that document as the source of truth.
A shareable report on the Foundry hosted-agent developer experience is maintained at docs/index.html and published through the gh-pages branch:
https://ttthree.github.io/web-app-gen-in-foundry/
agent— hosted-agent scaffold using@github/copilot-sdk, per-sessiongitHubToken,skillDirectories, a selected custom agent, and a guarded permission handler.cli— CLI/download scaffold that validatesoutput/app.zipfrom aFoundrySessionsClientboundary.control-plane— GitHub App OAuth, token-store, product-session, and Foundry adapter abstractions.packages/contracts— shared manifest, ZIP, static-app, GitHub token broker, and Foundry session contracts.
agent/skills/web-app-builder/SKILL.md is a placeholder stub only. Replace agent/skills/web-app-builder/ with the approved Anthropic Web App Builder skill before production deployment.
pnpm install
pnpm typecheck
pnpm testRun the hosted-agent HTTP surface in mock mode. This exercises the same /responses shape and session-file download path without requiring Foundry or a GitHub Copilot token.
pnpm --filter @web-app-gen/agent build
WEB_APP_GEN_MODE=mock WEB_APP_GEN_WORKSPACE=/tmp/web-app-gen-try PORT=8099 node agent/dist/server.jsIn another shell:
curl -fsS http://localhost:8099/health
curl -fsS -X POST http://localhost:8099/responses \
-H 'content-type: application/json' \
-d '{"input":{"messages":[{"role":"user","content":"build a pomodoro timer"}]}}'
curl -fsS 'http://localhost:8099/files?path=output/app.zip' -o app.zip
unzip -l app.zipdocker build -f agent/Dockerfile -t web-app-gen-agent:local .
docker run --rm --name web-app-gen-agent-local -p 8100:8088 \
-e WEB_APP_GEN_MODE=mock \
web-app-gen-agent:localIn another shell:
curl -fsS -X POST http://localhost:8100/responses \
-H 'content-type: application/json' \
-d '{"input":"build a tic tac toe app"}'
curl -fsS 'http://localhost:8100/files?path=output/app.zip' -o app.zip
unzip -l app.zipThe container image is now locally deployable, but cloud deployment still needs the Foundry hosted-agent deployment toolchain and environment-specific values:
- Azure Developer CLI (
azd) 1.24+ withazure.ai.agentsextension 0.1.27-preview or later. - A Microsoft Foundry project in a hosted-agents-supported region.
- An Azure Container Registry or azd-managed registry path.
- A real hosted-agent
agent.yaml/azure.yamlgenerated or confirmed against the current Foundry preview schema. - GitHub App OAuth token-broker wiring for product users.
The currently discovered project is foundry-test-jie/proj-default in swedencentral; current public hosted-agent docs call out North Central US for the preview, so verify region availability before attempting Foundry deployment there.