Skip to content

Build stage 1 source-first agent widget starter - #1

Merged
scottopolis merged 2 commits into
mainfrom
feat/stage-1-widget-starter
Sep 24, 2026
Merged

scottopolis merged 2 commits into
mainfrom
feat/stage-1-widget-starter

Conversation

@scottopolis

Copy link
Copy Markdown
Owner

Summary

  • add a source-first React/TypeScript/Vite chat app with polished standalone and responsive iframe/embed surfaces
  • separate UI from network/session ownership behind a small ChatTransport interface, with NDJSON HTTP streaming, cancellation, retry, safe Markdown, and generic tool display events
  • add a sample Node backend using OpenAI server-side when configured and deterministic mock streaming without credentials
  • add secure exact-origin + event.source iframe controls, a closed-shadow launcher, sample host website, setup/docs, MIT licensing/provenance notices, tests, and CI

No Gridrise account, service, domain, deployment ID, or runtime request is required. Stage 2 MCP Apps/proxy/sandbox behavior is intentionally not implemented; only generic tool/backend seams remain.

Verification

  • npm run typecheck — passed
  • npm test — 4 files, 9 tests passed
  • npm run build — standalone, sample site, iframe host, embed.js, and Node server built
  • npm audit --omit=dev — 0 vulnerabilities
  • .agents/setup — passed twice (warm run under 5 seconds)
  • mock API smoke: /api/health returned { "ok": true, "mode": "mock" }; /api/chat streamed NDJSON
  • browser: standalone Markdown stream and pricing table inspected at 1280×800, DPR 2
  • browser: sample-site parent control opened/submitted into iframe; desktop and 390×844 responsive states inspected, DPR 2
  • embed security test rejects correct-origin/wrong-source and correct-source/wrong-origin close messages

scottopolis and others added 2 commits September 24, 2026 15:17
Add standalone and iframe chat experiences, secure embed controls,
a mock/OpenAI streaming backend, documentation, tests, and CI.

Amp-Thread-ID: https://ampcode.com/threads/T-01a0d3e6-97e2-76bb-8eca-22d276967b17
Co-authored-by: Amp <amp@ampcode.com>
Load server environment files, isolate concurrent streams, remove empty
response placeholders, normalize custom headers, and abort provider work
when clients disconnect.

Amp-Thread-ID: https://ampcode.com/threads/T-01a0d3e6-97e2-76bb-8eca-22d276967b17
Co-authored-by: Amp <amp@ampcode.com>
@scottopolis
scottopolis merged commit 24234d3 into main Sep 24, 2026
1 check passed
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.

1 participant