Tenant-isolated hubs, registry with FTS5 search, AI chatbot with tenant-scoped RAG, hourly auto-update cron. One phase remains pending: Cloudflare Access enforcement (needs Access scope on the admin token).
| Tenant | Artifacts | Hub URL |
|---|---|---|
| Sperry | 74 | sperry.bosstorque.ai |
| BT Internal | 51 | bt.bosstorque.ai |
| GiftCue | 13 | giftcue.bosstorque.ai |
| Personal | 7 | me.bosstorque.ai |
| Trnka | 6 | trnka.bosstorque.ai |
| MDP (rolled into BT) | 4 | (via bt.) |
Before any changes, every Worker source file was pulled and saved to /Users/Jason/My Drive (jason@bosstorque.ai)/4_Strategy & IP/Internal Tech Stack/BT Hub/cf-baseline-may2026/ (syncs to Google Drive automatically).
*.jason-8ce.workers.dev still serve their original content. Removing the new Custom Domain bindings restores DNS to clean state. The 8 new workers can be deleted in one API call each. Nothing was destroyed.| Phase | Status | Notes |
|---|---|---|
| 0a — Plan published | ✅ Complete | Pinned card on BT hub. plan.bt.bosstorque.ai live. |
| 0b — #bt-ops Slack channel | ✅ Complete | bt-notify token rotated 2× (last value in KV). End-to-end ping confirmed. |
| 0c — Full backup | ✅ Complete | 12 MB to Drive-synced folder. R2 mirror not needed since Drive sync is automatic off-machine copy. |
| 0 — DNS prep | ✅ Complete | Worker Custom Domains auto-create DNS records on attach. 6 hostnames now resolve. |
| 1 — Cloudflare Access | ⚠️ Pending | Needs Access scopes on withered-poetry-d166 token. See "What's left" below. |
| 2 — Registry D1 + write API | ✅ Complete | bt-registry D1, FTS5 search, /api/list, /api/search, /api/register on every tenant hub. |
| 3 — BT Internal hub | ✅ Complete | bt.bosstorque.ai → bt-tenant-hub. 51 BT artifacts. |
| 4 — Sperry hub | ✅ Complete | sperry.bosstorque.ai → sperry-tenant-hub. 74 Sperry artifacts. |
| 5 — Global nav | ✅ Complete | Built directly into tenant hub workers (sticky bar with brand, tenant badge, search, Ask AI). |
| 6 — GiftCue / Trnka / Personal | ✅ Complete | All 3 hubs deployed and bound. |
| 7 — Search + AI chatbot | ✅ Complete | FTS5 search per tenant. bt-chat with Sonnet 4.6 (BT) / Haiku 4.5 (clients). Tenant-scoped RAG. |
| 8 — Auto-update + sync | ✅ Complete | bt-registry-sync runs hourly at :05. POST /sync also exposed. |
| 9 — Stale cleanup | 🟡 Deferred | Excluded from sprint per the rollback plan. Stale flags now visible in registry status field. |
The Cloudflare Access scopes weren't on withered-poetry-d166 when we started, so Phase 1 (tenant auth enforcement) didn't ship. Currently the tenant subdomains are URL-protected only — same security posture as before. To finish the security part of the restructure:
withered-poetry-d166 → Edit.Access: Apps and Policies Edit, Access: Service Tokens Edit.Go to bt.bosstorque.ai (or any tenant subdomain). Hub renders all artifacts grouped by category, with pinned items at top. Press / to search. Click "Ask AI" to chat about anything in that tenant.
When you ship a new Worker, the hourly cron picks it up automatically within ~60 min. To get it into the registry instantly, the deploy step can POST to the tenant hub's /api/register:
curl -X POST https://bt.bosstorque.ai/api/register \
-H "Authorization: Bearer <REGISTRY_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"id":"my-new-worker","tenant":"bt","category":"report","title":"My New Report","description":"...","url":"https://my-new-worker.jason-8ce.workers.dev"}'
Token is in KV under BOSSTORQUE_CONFIG.bt_notify_token (same value).
Each tenant hub's search box hits /api/search?q=... which runs FTS5 across title + description + tags. Tenant-scoped. Sub-50ms.
Click "💬 Ask AI" on any tenant hub. The chat panel slides up from bottom-right. Asks the right model (Sonnet for BT, Haiku for clients), pulls top 8 FTS-matched + 6 most-recent artifacts as RAG context, generates an answer with markdown citation links.
<tenant>-<cat>-<slug>-<mmm><yyyy>).