toga-ai 1.0.409 → 1.0.410
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -87,7 +87,10 @@ to its ship state (trusted-IP position for X-Forwarded-For; O(1) LRU-capped limi
|
|
|
87
87
|
`?hsCampaignId=` page-prime param now `isTogaUuid`-validated). All checks green: tsc, eslint,
|
|
88
88
|
**104/104 Vitest**, `next build` (build output labels the proxy `ƒ Proxy (Middleware)`).
|
|
89
89
|
|
|
90
|
-
- **Repo:** `agilantsolutions/BDR` on GitHub,
|
|
90
|
+
- **Repo:** `agilantsolutions/BDR` on GitHub, **source-of-truth branch `_dev-sandbox`**
|
|
91
|
+
(2026-07-21: `BDR-Phase-2` and `BDR-Development` are retired/behind — `_dev-sandbox`
|
|
92
|
+
holds enrichment `6a97dd1`, fast-dial/share/guard `6d52b53`, and the Amplify env fix
|
|
93
|
+
`e17d804`; a future `_production` branch is cut from `_dev-sandbox`). The
|
|
91
94
|
machine-local `.claude/` harness is **gitignored** — committing it would snapshot
|
|
92
95
|
the whole KB stale; devs get the harness via `npx toga-ai`, not from this repo.
|
|
93
96
|
|
|
@@ -371,25 +374,44 @@ PRODUCTION credential set (`TOGA_API_BASE_URL = https://api.togahub.com/v2`).
|
|
|
371
374
|
- **Restart the dev server after creating `.env.local`** — Next reads env files only at
|
|
372
375
|
server startup. `.env.*` is gitignored in BDR.
|
|
373
376
|
|
|
374
|
-
## Deploy status (AWS Amplify —
|
|
375
|
-
|
|
376
|
-
The
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
377
|
+
## Deploy status (AWS Amplify — app EXISTS, first build shipping)
|
|
378
|
+
|
|
379
|
+
**The Amplify app now exists (2026-07-21):** branch `_dev-sandbox` deploys to
|
|
380
|
+
**`dev-sandbox.d65bvvjrww97g.amplifyapp.com`** (supersedes the prior "no Amplify app yet"
|
|
381
|
+
status). Go-live tracking: ClickUp **868kdf4tj "BDR - create amplify and sandbox route"**
|
|
382
|
+
(urgent, Sprint 82). (ClickUp showed Alex Peterson as assignee; the team said Jeff picked it
|
|
383
|
+
up — confirm the real owner before assuming.)
|
|
384
|
+
|
|
385
|
+
- **CRITICAL — the build-spec must WRITE the console env vars into `.env.production` at build
|
|
386
|
+
time (Amplify Next-SSR recipe).** The first deployment surfaced a build-spec bug: the old
|
|
387
|
+
`amplify.yml` only had branch cases for `_production` / `_beta`, each doing
|
|
388
|
+
`cp .env.production .env.local` — which expects a **committed** `.env` file that (correctly)
|
|
389
|
+
does not exist (secrets are never committed). **No branch case matched `_dev-sandbox` at all**,
|
|
390
|
+
so every deploy shipped with **ZERO server env vars**. Amplify console env vars exist only at
|
|
391
|
+
**build time**; the Next SSR **runtime** reads `.env.production` from the build artifact — so the
|
|
392
|
+
build must materialize them. Fix (commit `e17d804`): during build,
|
|
393
|
+
`env | grep -E '^(HUBSPOT_|TOGA_|NEXT_PUBLIC_|RATE_LIMIT_)' >> .env.production`. The same broken
|
|
394
|
+
`cp` pattern would have bitten the `_production` launch too.
|
|
395
|
+
- **Symptom chain when the env vars are missing (what "no vars" looks like end-to-end):**
|
|
396
|
+
page-prime's HubSpot fetch throws → lead ref comes back empty → the **anonymous-visit guard
|
|
397
|
+
notice shows even with a valid `?hsContactId`** → `GET /api/contact` returns
|
|
398
|
+
`500 {"error":"Failed to fetch contact"}`. If you see the guard notice on a deployed URL that
|
|
399
|
+
has a real entry link, suspect missing server-side env before anything else.
|
|
400
|
+
- **OPERATIONAL — env vars saved AFTER a build starts do NOT reach that build.** They are baked in
|
|
401
|
+
at build time, so after adding/changing console vars you must **"Redeploy this version"** for
|
|
402
|
+
them to take effect — a fresh save alone does nothing for an in-flight or already-built deploy.
|
|
384
403
|
- **Amplify must be configured for SSR hosting (NOT static export)** — the app is server-rendered
|
|
385
404
|
(server components, route handlers, and the `proxy.ts` edge proxy all require the SSR/compute
|
|
386
405
|
runtime). Point the app at branch `_dev-sandbox`.
|
|
387
|
-
- **
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
406
|
+
- **7 env vars go in the Amplify console** (never the values — **values live in `info/.env.local`**,
|
|
407
|
+
the production credential set): the 5 server-side ones `HUBSPOT_ACCESS_TOKEN`,
|
|
408
|
+
`TOGA_API_BASE_URL`, `TOGA_CLIENT_ID`, `TOGA_CLIENT_API_UUID`, `TOGA_CLIENT_API_SECRET`, plus
|
|
409
|
+
`TOGA_WORKER_URL` (the fast-dial gate — unset ⇒ cron-only) and `NEXT_PUBLIC_GA_MEASUREMENT_ID`
|
|
410
|
+
(GA4). See the parity audit for the full 7-var accounting.
|
|
411
|
+
- **Status at capture:** env fix pushed (`e17d804` on `_dev-sandbox`); awaiting the console vars +
|
|
412
|
+
a green build for the first successfully deployed page-prime. The primary-phone self-heal (commit
|
|
413
|
+
`4ac579e`, see the phone-less bug above) is already on `_dev-sandbox`, so the first good build
|
|
414
|
+
ships that fix too.
|
|
393
415
|
- **Phase 8 WAF pairing.** `BDR/PLAN.md` Phase 8 specifies a **per-IP rate rule on the CloudFront
|
|
394
416
|
distribution / WAF** that pairs with the in-app token-bucket limiter (the app limiter is
|
|
395
417
|
defense-in-depth only; the edge WAF rule is the authoritative control — see the enumeration
|
|
@@ -520,10 +542,34 @@ up — ClickUp is stale, confirm the real owner before assuming.)
|
|
|
520
542
|
lookup carries the email in the query. Do not reintroduce value logging.
|
|
521
543
|
- **No Tailwind** — see Stack. The mockup CSS is the styling system; adding Tailwind
|
|
522
544
|
risks pixel parity.
|
|
545
|
+
- **Deployed-site triage — "guard notice shows despite a valid entry link."** The
|
|
546
|
+
anonymous-visit guard notice is always the **terminal** symptom of "no lead reference,"
|
|
547
|
+
regardless of the underlying cause, so probe the layer directly:
|
|
548
|
+
`GET /api/contact?hsContactId=<id>` on the deployed URL. **`500 "Failed to fetch contact"`**
|
|
549
|
+
⇒ HubSpot env missing server-side (see the Deploy status env-var bug). **`400`** ⇒ the id
|
|
550
|
+
value/format. **Contact JSON returned** ⇒ env is fine — suspect the rate-limit proxy's
|
|
551
|
+
soft-degrade (it strips `hsContactId` when the per-IP bucket trips, so repeated test refreshes
|
|
552
|
+
can trigger the same symptom).
|
|
523
553
|
- **`.claude/` is gitignored** in the BDR repo on purpose — do not commit the
|
|
524
554
|
harness; pull it with `npx toga-ai`.
|
|
525
555
|
|
|
526
556
|
## Change history
|
|
557
|
+
- 2026-07-21 — **First Amplify deployment** (app now EXISTS: branch `_dev-sandbox` →
|
|
558
|
+
`dev-sandbox.d65bvvjrww97g.amplifyapp.com`, superseding the "not deployed yet" status).
|
|
559
|
+
DISCOVERED + FIXED (`amplify.yml`, commit `e17d804`) an env-var build-spec bug: the old spec only
|
|
560
|
+
handled `_production`/`_beta` with `cp .env.production .env.local` (expecting committed `.env`
|
|
561
|
+
files that correctly don't exist) and had **no `_dev-sandbox` case**, so deploys shipped **zero
|
|
562
|
+
server env vars** — page-prime's HubSpot fetch threw → empty lead ref → anonymous-visit guard
|
|
563
|
+
showed even with a valid `?hsContactId` → `/api/contact` returned `500 "Failed to fetch contact"`.
|
|
564
|
+
Fix is the Amplify Next-SSR recipe: build-time
|
|
565
|
+
`env | grep -E '^(HUBSPOT_|TOGA_|NEXT_PUBLIC_|RATE_LIMIT_)' >> .env.production` (console vars exist
|
|
566
|
+
only at build time; the SSR runtime reads `.env.production` from the artifact). Recorded the
|
|
567
|
+
operational rule that **env vars saved after a build starts require "Redeploy this version,"** and
|
|
568
|
+
a **deployed-site triage gotcha** (probe `GET /api/contact?hsContactId=` — 500 ⇒ missing env, 400
|
|
569
|
+
⇒ bad id, JSON ⇒ suspect the rate-limit soft-degrade). DECIDED the branch model: `BDR-Phase-2` is
|
|
570
|
+
retired and **`_dev-sandbox` is the source-of-truth branch** (holds `6a97dd1` enrichment,
|
|
571
|
+
`6d52b53` fast-dial/share/guard, `e17d804` env fix); a future `_production` is cut from it. Status:
|
|
572
|
+
fix pushed, awaiting console vars + a green build for the first deployed prime. (tcox)
|
|
527
573
|
- 2026-07-21 — Go-live continuation. **The full AI-BDR call loop was proven end-to-end in
|
|
528
574
|
production** (campaign 2, `26.05 - AI BDR - Ryan Nitti`): UI submit → funnel API → dialer → Vapi
|
|
529
575
|
call → webhook write-back (test method now in `../workflows/safe-call-loop-testing.md`). BUILT:
|
package/package.json
CHANGED