toga-ai 1.0.351 → 1.0.353

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.
@@ -6,6 +6,6 @@
6
6
  | [BDR Web Funnel — Full Implementation Plan](features/bdr-web-funnel-plan.md) | > **Execution status (2026-07-14):** PLAN **Phases 0–5 are BUILT and QA'd** — the web > app engine, full mockup port, and real backend are done. | bdr/PLAN.md, bdr/mockup/app.jsx, bdr/mockup/screens.jsx, bdr/mockup/components.jsx |
7
7
  | [Call Orchestration — PHP Worker ↔ Vapi (the integration seam)](features/call-orchestration.md) | The **PHP worker** is the orchestrator; **Vapi** is the actor. | ai-bdr/docs/client-onboarding-sop.md, ai-bdr/docs/vapi-firstmessage-timing-fix.md, ai-bdr/docs/vapi-inbound-callback-assistant-request.md, ai-bdr/docs/vapi-voicemail-iphone-screening.md, ai-bdr/scripts/update_structured_output.py |
8
8
  | [Vapi Integration — Assistants, Tools, Structured Output](features/vapi-integration.md) | Everything inside Vapi: the three assistants, the three shared tools, the shared structured-output schema, the Liquid-templated system prompt, and the Python sc | ai-bdr/vapi/templates/assistant.template.json, ai-bdr/vapi/templates/system-prompt.template.md, ai-bdr/prompts/archive/prompt-may-15.txt, ai-bdr/prompts/campaigns/healthcare-2026-03-18.md, ai-bdr/prompts/campaigns/healthcare-v2-2026-03-25.md, ai-bdr/prompts/templates/campaign-template.md, ai-bdr/scripts/update_assistant.py, ai-bdr/scripts/update_system_prompt.py, ai-bdr/scripts/update_structured_output.py, ai-bdr/scripts/update_call_summary_context.py, ai-bdr/scripts/fix_booking_guardrails.py, ai-bdr/scripts/get_assistant.py, ai-bdr/docs/vapi-firstmessage-timing-fix.md, ai-bdr/docs/vapi-voicemail-iphone-screening.md |
9
- | [Web Funnel — Built Next.js App (structure, stack, how to run)](features/web-funnel-app.md) | The **built** state of the BDR web funnel — the Next.js UI / lead-capture front door of the existing AI-BDR product (see `../architecture.md`). | bdr/PLAN.md, bdr/.gitignore, bdr/eslint.config.mjs, bdr/amplify.yml, bdr/src/app, bdr/src/lib/resolveCampaignId.ts, bdr/src/content, bdr/src/components, bdr/src/flow, bdr/src/server, bdr/src/app/api, bdr/test, bdr/public, bdr/mockup/styles.css |
9
+ | [Web Funnel — Built Next.js App (structure, stack, how to run)](features/web-funnel-app.md) | The **built** state of the BDR web funnel — the Next.js UI / lead-capture front door of the existing AI-BDR product (see `../architecture.md`). | bdr/PLAN.md, bdr/.gitignore, bdr/eslint.config.mjs, bdr/amplify.yml, bdr/src/app, bdr/src/app/layout.tsx, bdr/src/app/studio.css, bdr/src/lib/resolveCampaignId.ts, bdr/src/lib/scheduleSlots.ts, bdr/src/content, bdr/src/components, bdr/src/flow, bdr/src/server, bdr/src/app/api, bdr/test, bdr/public, bdr/mockup/styles.css |
10
10
  | [Web Funnel — Next.js UI + Config-Driven Campaign Content](features/web-funnel-content-model.md) | > **Status note:** the content **contract** below (schema, provider seam, adapters) > is now BUILT and QA'd (PLAN Phases 0–5). | bdr/src/content/schema.ts, bdr/src/content/hubspotProvider.ts, bdr/src/content/useCampaign.ts, bdr/src/content/default.ts, bdr/src/lib/resolveCampaignId.ts, bdr/src/server/leadSink.ts, bdr/src/server/callbackService.ts, bdr/src/app/api/call-now/route.ts, bdr/src/app/api/call-later/route.ts, bdr/src/app/api/contact/route.ts |
11
11
  | [New-Campaign Onboarding (6-phase runbook)](workflows/new-campaign-onboarding.md) | The end-to-end procedure for launching a new outbound BDR campaign (industry, offer, target persona, geography). | ai-bdr/docs/client-onboarding-sop.md, ai-bdr/docs/calcom-new-campaign-event-guide.md, ai-bdr/prompts/templates/campaign-template.md, ai-bdr/scripts/update_assistant.py, ai-bdr/scripts/update_system_prompt.py |
@@ -6,7 +6,7 @@ project: "AI-BDR"
6
6
  client: shared
7
7
  type: feature
8
8
  status: draft
9
- updated: 2026-07-14
9
+ updated: 2026-07-15
10
10
  owners: [tcox]
11
11
  files:
12
12
  - bdr/PLAN.md
@@ -515,6 +515,21 @@ so fidelity should be near-exact.
515
515
  summaries, accent `RichLine`s) is represented (flat columns can't hold arrays cleanly — child rows or
516
516
  a JSON field); who authors/owns the schema; and how the slug relates to the existing
517
517
  `hsCampaignId`/Toga campaign UUID used for attribution.
518
+ 11. **Privacy Policy & Terms links (§9.11, from the first design review).** The consent
519
+ footnotes on Call Now / Schedule link to **dead anchors** (`#privacy` / `#terms`,
520
+ ported verbatim from the mockup; the original `info` app had none). They need real
521
+ pages or links to `togatech` pages. Wiring is a **2-line content change** — the schema
522
+ already supports `[label](href)`, and HubSpot campaigns can override the href per
523
+ campaign.
524
+ 12. **Share button is a mock (§9.12).** The Success summary-card Share popover validates
525
+ the email and shows "Sent" but **sends nothing** (the Copy button IS a real clipboard
526
+ write). A functional version needs an **email-send route** AND the **real call
527
+ pipeline** (today's summaries are simulated rotating recaps, not real call data).
528
+ 13. **"Avg. connect time" (~7 s) is curated copy, not a metric (§9.13).** It has never
529
+ been computed in any product version — it is campaign-editable bundle copy. Keep it
530
+ campaign-editable for launch; a **live calculation is post-launch** (needs a metric
531
+ definition, a Vapi/Toga call-record source, periodic computation, and real call
532
+ volume).
518
533
 
519
534
  ---
520
535
 
@@ -558,6 +573,12 @@ so fidelity should be near-exact.
558
573
  - [ ] Pixel-perfect parity pass against the mockup screens + screenshots.
559
574
 
560
575
  ## Change history
576
+ - 2026-07-15 — First UI design review: appended three future items to §9 open questions,
577
+ mirroring `BDR/PLAN.md` §9.11–§9.13. §9.11 real Privacy/Terms pages (consent footnotes
578
+ currently link to dead `#privacy`/`#terms` anchors; 2-line content fix). §9.12 Share
579
+ button is a mock (validates + shows "Sent" but sends nothing; Copy is real) — needs an
580
+ email-send route plus the real call pipeline. §9.13 "Avg. connect time" (~7 s) is
581
+ curated campaign copy, never a computed metric; live calculation is post-launch. (tcox)
561
582
  - 2026-07-14 — Phases 0–5 executed and QA'd (engine + full mockup port + real backend);
562
583
  built codebase now documented in `web-funnel-app.md`. `BDR/PLAN.md` itself corrected:
563
584
  absolute local paths genericized, and the stale "not yet in TOGA registry" note fixed
@@ -6,7 +6,7 @@ project: AI-BDR
6
6
  client: shared
7
7
  type: feature
8
8
  status: active
9
- updated: 2026-07-14
9
+ updated: 2026-07-15
10
10
  owners: [tcox]
11
11
  files:
12
12
  - bdr/PLAN.md
@@ -14,7 +14,10 @@ files:
14
14
  - bdr/eslint.config.mjs
15
15
  - bdr/amplify.yml
16
16
  - bdr/src/app
17
+ - bdr/src/app/layout.tsx
18
+ - bdr/src/app/studio.css
17
19
  - bdr/src/lib/resolveCampaignId.ts
20
+ - bdr/src/lib/scheduleSlots.ts
18
21
  - bdr/src/content
19
22
  - bdr/src/components
20
23
  - bdr/src/flow
@@ -55,6 +58,11 @@ is **decision-gated, not code** (see "What is parked / not built").
55
58
  hand-authored CSS (ported verbatim as `src/app/studio.css`) and threaten pixel
56
59
  parity. Do **not** add Tailwind to this repo — the styling is intentionally the
57
60
  mockup's own CSS-variable system. See the styles.css escape-sequence gotcha below.
61
+ - **Font: Plus Jakarta Sans via `next/font/google`** (`Plus_Jakarta_Sans`, weights
62
+ 400/500/600/700/800, `display: swap`, self-hosted at build). Loaded in
63
+ `src/app/layout.tsx` and exposed as `--font-jakarta` on `<html>`; `studio.css`
64
+ `--font-display` / `--font-body` resolve `var(--font-jakarta)` first with the
65
+ original stack kept as fallback. See the font-port gotcha below.
58
66
  - **ESLint flat config** carries a **no-em-dash rule** on shipped strings
59
67
  (`Literal` / `TemplateElement` / `JSXText` selectors) — enforces the mockup copy
60
68
  rule on in-repo strings (`eslint.config.mjs`).
@@ -82,7 +90,10 @@ is **decision-gated, not code** (see "What is parked / not built").
82
90
  behind `LeadSink` + `CallbackService` adapters (detail in
83
91
  `web-funnel-content-model.md`).
84
92
  - `src/app/api/*` — route handlers `call-now`, `call-later`, `contact`.
85
- - `public/*` — assets pruned to the **default campaign only** (~6.2 MB).
93
+ - `public/*` — assets pruned to the **default campaign only**, **plus AutoBuild's
94
+ FLOURISH characters** (Owl 1 `owl-02` + Robot 1 `robot-02`, art + talk videos) which
95
+ the assembly cycle needs even though they are not the campaign agent. See the
96
+ asset-pruning gotcha below.
86
97
  - `test/*` — the 67-test Vitest suite.
87
98
 
88
99
  ## How the built app behaves (key runtime facts)
@@ -99,6 +110,12 @@ is **decision-gated, not code** (see "What is parked / not built").
99
110
  - **Boundary validation on every route handler.** 16 KB body cap; phone / UUID / ISO
100
111
  checks; all handlers return the `{isSuccess, status, error, messages, data}`
101
112
  envelope (same contract as `info`/Toga).
113
+ - **Schedule timezone is already calculated (not a gap).** `detectLocalTz()`
114
+ (`src/lib/scheduleSlots.ts`) derives the visitor's zone via the `Intl` short name and
115
+ renders it in the "All times in `<tz>`" note + the confirmation label; the backend
116
+ (`src/server/toga.ts`) converts the picked slot to `America/Chicago` for Toga. If
117
+ `Intl` is unavailable the note simply is not rendered (graceful, no crash). A design
118
+ request to "make tz calculated" was already satisfied — do not re-implement.
102
119
 
103
120
  ## What is parked / not built
104
121
 
@@ -122,6 +139,20 @@ is **decision-gated, not code** (see "What is parked / not built").
122
139
  parsers. This was **fixed in the ported `src/app/studio.css`**, but
123
140
  `mockup/styles.css` was intentionally left pristine — so **anyone re-porting the
124
141
  mockup CSS must re-apply this fix.**
142
+ - **Port the mockup's `<head>` resources, not just its CSS.** The initial port mirrored
143
+ the mockup's CSS but not its `<head>` font `<link>`: `studio.css` named Plus Jakarta
144
+ Sans but nothing ever loaded it, so the whole site silently fell back to `system-ui`.
145
+ Fixed by loading the font via `next/font/google` in `layout.tsx` (see Stack). **Anyone
146
+ porting mockup screens must check `<head>` resources (fonts, preconnects, meta) too —
147
+ a named font in CSS does not mean the font is loaded.**
148
+ - **Asset pruning must include AutoBuild's flourish characters.** Phase 2 pruning (§5.8)
149
+ kept only the campaign agent's art, which left AutoBuild's FLOURISH cycle (Owl 1
150
+ `owl-02`, Robot 1 `robot-02`) rendering blank — only the final agent showed. The
151
+ preloader is **silently tolerant** of missing files (resolves `false`, never blocks),
152
+ so the gap produced no error and was easy to miss. Fixed by copying `owl-02.png`,
153
+ `owl-02-talk.mp4`, `robot-02.png`, `robot-02-talk.mp4` into `public/agents/`. **Check
154
+ `public/agents/` against every form/slot the flow actually cycles, not just the
155
+ campaign agent** — the tolerant preloader will not warn you.
125
156
  - **No PII in logs.** All of `info`'s PII-logging was stripped on port (identifier-
126
157
  only logs); the Toga error paths **strip query strings** because the contact
127
158
  lookup carries the email in the query. Do not reintroduce value logging.
@@ -131,6 +162,17 @@ is **decision-gated, not code** (see "What is parked / not built").
131
162
  harness; pull it with `npx toga-ai`.
132
163
 
133
164
  ## Change history
165
+ - 2026-07-15 — First UI design review pass. FIXED: site-wide font silently fell back to
166
+ `system-ui` (mockup's `<head>` Google-Fonts link was never ported) — now Plus Jakarta
167
+ Sans via `next/font/google` in `layout.tsx`, exposed as `--font-jakarta`, resolved
168
+ first in `studio.css` (added font-port gotcha + Stack note). FIXED: AutoBuild flourish
169
+ agents (`owl-02`, `robot-02`) rendered blank because asset pruning kept only the
170
+ campaign agent and the preloader is silently tolerant of missing files — restored their
171
+ art + talk videos to `public/agents/` (added asset-pruning gotcha, corrected the
172
+ `public/*` pruning note). CONFIRMED: Schedule-screen timezone is already calculated
173
+ (`detectLocalTz()` + backend `America/Chicago` conversion) — documented as a runtime
174
+ fact so it is not mistaken for a gap. All changes uncommitted in the working tree at
175
+ capture time. (tcox)
134
176
  - 2026-07-14 — Initial doc: recorded the BUILT state of the BDR web funnel (PLAN
135
177
  Phases 0–5 executed + QA'd). Next.js 16.2.3 App Router/TS, deliberate no-Tailwind,
136
178
  ESLint no-em-dash rule, `resolveCampaignId`, full mockup component/flow port
@@ -0,0 +1,71 @@
1
+ ---
2
+ type: session
3
+ slug: bdr-build
4
+ title: BDR web funnel — first design-review adjustments (font, AutoBuild art, PLAN §9 items)
5
+ author: tcox
6
+ repos: [bdr, ai-bdr]
7
+ framework: "2.0"
8
+ client: shared
9
+ status: active
10
+ created: 2026-07-15
11
+ updated: 2026-07-15
12
+ ---
13
+
14
+ # Session: bdr-build
15
+ **Date:** 2026-07-15
16
+ **Project/Repo:** bdr (2.0) — local `C:\WWW\BDR`, GitHub `agilantsolutions/BDR`, branch `BDR-Development`
17
+ **Task:** Apply the first UI design-review adjustments to the BDR web funnel (post Phases 0-5): site font, AutoBuild agent art, and triage of Privacy/Terms, share button, connect-time, and timezone items.
18
+
19
+ ---
20
+
21
+ ## What WORKED
22
+ - **Site-wide font fixed (root cause found).** The mockup loaded Plus Jakarta Sans via a Google Fonts `<link>` in its `<head>` that was never ported — `studio.css` named the font but nothing loaded it, so the whole site silently fell back to `system-ui`. Fix: `next/font/google` `Plus_Jakarta_Sans` (weights 400/500/600/700/800, `display:swap`, self-hosted at build) exposed as `--font-jakarta` on `<html>` in `src/app/layout.tsx`; `studio.css` `--font-display`/`--font-body` now resolve `var(--font-jakarta)` first with the original stack as fallback. No `font-weight` rules touched. Evidence: tsc clean, eslint clean, `next build` succeeded with 4 `.woff2` bundled into `.next/static/media`, 67/67 vitest green.
23
+ - **AutoBuild flourish agents restored.** "Build my agent for me" showed only the final agent (Alex/human-02); Athena (owl-02) and Cogsworth (robot-02) rendered blank. Root cause: Phase 2 asset pruning (§5.8) kept only the campaign agent's art, but AutoBuild's FLOURISH cycle needs `Owl 1`/`Robot 1` art + talk videos — and the preloader tolerates missing files silently (resolves false, never blocks), masking the gap. Fix: copied `owl-02.png`, `owl-02-talk.mp4`, `robot-02.png`, `robot-02-talk.mp4` (~5.6MB) from `mockup/agents/` to `public/agents/`. No code change needed (asset resolver is a plain `/` prefix).
24
+ - **PLAN.md §9 extended with three design-review decisions** (§9.11 Privacy/Terms dead links — need real pages or togatech links; §9.12 share button is mock — needs email-send route + real call pipeline; §9.13 "Avg. connect time ~7 seconds" is curated bundle copy, never a computed metric anywhere — keep campaign-editable for launch).
25
+ - **Timezone request closed as already-done.** Schedule screen's tz IS calculated: `detectLocalTz()` in `src/lib/scheduleSlots.ts` (Intl short name) renders "All times in <tz>" + confirmation label; backend converts the picked slot to America/Chicago for Toga (`src/server/toga.ts`). Told design team; nothing built.
26
+ - **/capture published to team KB (PUSHED).** `web-funnel-app.md` updated (font-port gotcha, flourish-asset gotcha + corrected stale ~6.2MB prune note, Schedule-tz runtime fact) and `bdr-web-funnel-plan.md` §9 mirror updated with 9.11-9.13.
27
+
28
+ ## What did NOT work — DO NOT RETRY THESE
29
+ - *(Nothing failed this session. The list below is CARRIED FORWARD from the 2026-07-14 session — still valid, do not retry.)*
30
+ - **`sed`/`perl` in-place replacement of literal `\n` escapes through the Bash tool fails silently** (escaping mangled through the Windows Git Bash wrapper). Use the Edit tool with exact old/new strings. `mockup/styles.css` lines ~759/840 still contain the broken `\n`/`\"` artifacts on purpose; the fixed copy is `src/app/studio.css` — never re-copy those lines from the mockup.
31
+ - **`pkill` does not kill Windows processes from Git Bash** — a stale `next start` keeps port 3000 and serves an old build. Kill via PowerShell `Get-NetTCPConnection -LocalPort 3000` + `Stop-Process`, or `taskkill //PID <pid> //F`.
32
+ - **Bash tool cwd resets to `c:\WWW` between some calls** — `npm run <script>` then fails with "Missing script". Always `cd /c/WWW/BDR &&` first.
33
+ - **Pre-commit path scan regex missing `c:\WWW\...` single-backslash paths** — scan `[A-Za-z]:[\\/]` case-insensitively.
34
+ - **Letting ESLint lint `mockup/**`** — reference prototype, belongs in globalIgnores (already configured).
35
+ - **CLI push without GCM sign-in** — permanently resolved via `credential.helper manager`; do not fall back to GitHub Desktop.
36
+
37
+ ## Not tried yet (candidates for next session)
38
+ - **Commit this session's working-tree changes** to `BDR-Development` (font wiring, 4 restored assets, PLAN.md §9.11-9.13) — developer has not asked for the commit yet.
39
+ - **Remaining design-review items** — the team's list was being worked through interactively; more items may be pending beyond the 5 handled.
40
+ - **Privacy/Terms destinations** — decide mock-up pages vs. links to togatech pages, then 2-line content change in `src/content/default.ts` (schema already supports `[label](href)`; HubSpot can override per campaign).
41
+ - **Verify design team's tz observation** — if someone saw "CST" in July or a raw "GMT-5", that's a browser-specific quirk worth chasing (ask what value + which browser).
42
+ - **§9.10 HubSpot content-modeling decision** (gates Phase 6: hubspotProvider + campaign seeding), then Phase 6 second campaign, Phase 7 pixel-parity/GA4/accessibility, Phase 8 Amplify deploy.
43
+ - Success screen consuming `submitOk` (exposed by useAgentFlow, not surfaced in UI).
44
+
45
+ ## Current file state
46
+ | File | Status | Notes |
47
+ |------|--------|-------|
48
+ | `src/app/layout.tsx` | MODIFIED, uncommitted | next/font Plus Jakarta Sans, `--font-jakarta` variable on `<html>` |
49
+ | `src/app/studio.css` | MODIFIED, uncommitted | `--font-display`/`--font-body` resolve `var(--font-jakarta)` first |
50
+ | `public/agents/owl-02.png`, `owl-02-talk.mp4`, `robot-02.png`, `robot-02-talk.mp4` | ADDED, uncommitted | ~5.6MB, copied from `mockup/agents/` for AutoBuild flourish |
51
+ | `PLAN.md` | MODIFIED, uncommitted | §9.11 Privacy/Terms, §9.12 share mock, §9.13 connect-time copy |
52
+ | Repo otherwise | clean at `34a3910` on `BDR-Development` | Phases 0-5 committed previously; no PR yet |
53
+ | Team KB (`toga-tech`) | PUSHED | `web-funnel-app.md` + `bdr-web-funnel-plan.md` updated via /capture |
54
+
55
+ ## Decisions made
56
+ - **`next/font/google` over re-adding the mockup's Google Fonts `<link>`** — self-hosted at build (no runtime Google request, no FOUT), Next-idiomatic. Rejected: runtime `<link>` (external request, CSP/perf) and `next/font/local` (only needed if build-time font download is blocked; it wasn't).
57
+ - **Restore only the 4 flourish assets, not the full 54-file agent library** — AutoBuild needs exactly Owl 1 + Robot 1; keeps the §5.8 size discipline while unbreaking a shipped screen.
58
+ - **Connect time stays curated campaign copy for launch** — a live metric needs a definition, a Vapi/Toga call-record source, periodic computation, and enough call volume to be stable; small early samples are noisy. Rejected: wiring a live query now.
59
+ - **Privacy/Terms and share-button work deferred to PLAN §9** rather than built speculatively — both need decisions from outside engineering (legal/marketing URLs; real call pipeline).
60
+
61
+ ## Blockers
62
+ - **§9.10 HubSpot content mechanism undecided** — still gates Phase 6 (owner: HubSpot instance owner).
63
+ - **Privacy/Terms destination URLs** — need legal/marketing decision (mock pages vs. togatech links).
64
+ - **First-campaign direction/copy from leadership** still pending.
65
+ - **Real-call testing env values** (HUBSPOT_ACCESS_TOKEN + 4 TOGA_* vars) — deliberate action, hits live Toga.
66
+
67
+ ## Exact next step
68
+ > Commit the session's working-tree changes in `C:\WWW\BDR` to `BDR-Development` as two commits: `fix: load Plus Jakarta Sans via next/font` (layout.tsx + studio.css) and `fix: restore autobuild flourish agent assets` (public/agents/ + PLAN.md), then continue the design-review punch list with the team.
69
+
70
+ ---
71
+ _Saved by /session-save on 2026-07-15_
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.351",
3
+ "version": "1.0.353",
4
4
  "description": "TOGA Technology Team Claude Knowledge System — shared AI coding harness with skills, knowledge base CLI, and project installer for Claude Code.",
5
5
  "keywords": [
6
6
  "claude",