feat: full monorepo scaffold — widget + backend + CI/CD#6
Merged
Conversation
- ci.yml: typecheck, lint (optional), test, build on push/PR to main - publish.yml: publish packages/widget to npm on GitHub release - deploy.yml: deploy packages/backend to Cloudflare Workers on push to main (path-filtered) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Widget (@vibetechnologies/webagent): - Preact + Shadow DOM entry point (WebAgent.init) - Client-side agent loop via Vercel AI SDK generateText - 5 tools: web_fetch, skill, todo, send_email, escalate_to_human - Knowledge base loader with TF-IDF search - IndexedDB + localStorage session persistence with TTL - WebMCP integration (provider + consumer + declarative forms) - XSS-safe markdown rendering in chat messages - esbuild bundle producing webagent.min.js + webagent.esm.js Backend (@vibetechnologies/webagent-backend): - Hono app on Cloudflare Workers - LLM proxy with BYOK + managed key auth - SSE streaming passthrough - Fetch proxy with SSRF protection - Email via Cloudflare Queues + Resend - Escalation with ticket tracking + HTML email - Admin API for customer key CRUD - Knowledge base storage via R2 - D1 schema for customers, usage, tickets Infrastructure: - Turborepo + pnpm workspaces - GitHub Actions CI/CD (ci, publish, deploy) - 3 example pages (basic, ecommerce, docs-site) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Widget agent loop, types, knowledge base (TF-IDF) - All 5 tools (web_fetch, skill, todo, send_email, escalate) - Session store with IndexedDB + localStorage adapters - WebMCP integration (provider, consumer, declarative forms) - UI components (ChatFAB, ChatWindow, EscalationModal, TodoPanel) - CSS styles with theming and dark mode - esbuild config, widget tsconfig - CI/CD workflows - pnpm lockfile - Global window.WebAgent export for script tag usage Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… test/build steps - pnpm/action-setup@v4 errors on dual version spec (version: 9 + packageManager: pnpm@9.15.0) - Gracefully skip tests when none exist yet - Backend build: use tsc --noEmit instead of wrangler deploy --dry-run (no CF bindings in CI) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full monorepo scaffold for
@vibetechnologies/webagent— an embeddable GenAI-powered customer support chat widget.Widget (
packages/widget)WebAgent.init(config)— Shadow DOM mount, Preact rendergenerateText({ maxSteps: 10 })with 5 toolsweb_fetch(CORS proxy),skill(preloaded API skills),todo(task tracker),send_email(backend relay),escalate_to_human(ticket + email)navigator.modelContext.registerTool()), consumer (host tools → agent), declarative formswebagent.min.js(IIFE) +webagent.esm.jsBackend (
packages/backend)Infrastructure
Security fixes applied
Verified
pnpm -r typecheckpassespnpm --filter @vibetechnologies/webagent buildproduces bundlesCloses #4