Commit graph

2688 commits

Author SHA1 Message Date
Natalie
d77a63d7ff feat(broadcast): controller + destination-store + types updates
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 14:35:17 -04:00
Natalie
0364073fc5 fix(prospect-cockpit): duplicate-send guard on cockpit_send (anti-spam)
A coworker agent fired the same outreach template 4x in ~97s to a prospect
(2026-06-29 incident). macsync's outbox only dedupes *identical* bodies per
recipient per UTC day; it does not stop a rapid burst of *different* bodies and
gives the caller no clear signal. Add a pre-enqueue cooldown guard to
/:handle/send: a second send to the same handle inside PROSPECT_SEND_COOLDOWN_MS
(default 60s) is refused with a structured 409 duplicate_send. A human can
override with force=true (cockpit 'send again'); agents omit it and stay guarded.

- send-guard.ts: pure, total evaluateSendGuard() + resolveSendCooldownMs()
- __tests__/send-guard.test.ts: 10 bun:test cases (incident shape covered)
- prospect-cockpit.ts: read last_outbound_contact_at, evaluate, 409 on hold

Pure logic verified (9/9); tsc clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 08:55:57 -04:00
Natalie
2bc733cf82 harden(provider-website): normalize all nested arrays in provider data + integration tests
The Footer crash (contact.paymentMethods undefined) was one instance of a class:
validateProviderData defaulted nested objects only when the whole object was
falsy, so a present-but-incomplete object from the degraded black-down edge left
nested arrays undefined and crashed every component that .map()s them.

Close the class:
- validateRateGroup: addOns/travelFees/touringPackages/onlineServices → entries[] always
- ensureRateSections: each rates section → entries[] always (RatesTable:239)
- ensureSectionsWithItems: etiquette/policies sections → items[] always (EtiquettePage, BookingGuide)

Add providerDataValidator.integration.test.ts: feeds the realistic degraded edge
payload through the validator and replays every component .map() call site,
asserting none can throw. Verified green (11/11) against the real validator.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 06:19:01 -04:00
Natalie
29592405d4 fix(provider-website): default contact.paymentMethods to [] (site-wide Footer crash)
The edge-served provider-config (black_api down) returns a populated contact
object WITHOUT paymentMethods. validateProviderData only substituted a default
contact when the whole object was falsy, so a present-but-incomplete contact
passed through with paymentMethods undefined. The Footer (rendered site-wide)
and ContactCard both call contact.paymentMethods.map() unguarded → TypeError
'Cannot read properties of undefined (reading map)' → every page crashed.

Add validateContact() to normalize paymentMethods to an array while preserving
all other contact fields (mirrors validateAboutSection). Regression test added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 22:07:05 -04:00
Natalie
8be52bea52 fix(tour): remove duplicate destinations list from TourPage
The teaser <DestGrid> + site texts duplicated the full list+grid on /destinations page (and its cards). Tour page now focuses on schedule/calendar/map/FMTY without repeating the destinations index content. Cleaned matching dead entries from e2e fixture.

.
2026-06-28 18:04:27 -04:00
Natalie
e7aa09792e docs(prospector): clarify DO cloud deployment for webapp + WG mesh isolation to quinn-messenger only (for macsync Notes/messages/phone/calendar in prospector)
- Webapp (my/ frontend + /prospector/app PWA) deploys cleanly to DO via quinn.my (deploy:my).
- Only quinn-messenger depends on mesh; prospector uses it for macsync features (pastebin/Notes, iMessage, phone, calendar).
- Added comments in ProspectorApp.tsx.
- Matches operator note + plan update.
2026-06-28 17:59:36 -04:00
Natalie
bb898eab7a feat(prospector): add /prospector/app containerless Chrome PWA webapp (SSO at my.transquinnftw.com/prospector/app)
- New ProspectorApp.tsx shell: full viewport focused app experience matching designs/ prototypes (main-view segmented channels + bilingual + toolbar Classify/MR/Pastebin, table, modals for reports/queued/pastebin/detail).
- PWA manifest (prospector-app.webmanifest) for install as standalone Chrome app (containerless, no Electron; start_url /prospector/app, display standalone).
- Install button + devtools note (Chrome toolkit for easy control of prospector flows).
- Route /prospector/app added (reuses my/ auth + useMyApi for real LP data; starts with funnel + sample wired to prototype actions).
- Pivot recorded: web PWA primary (faster/easier than Swift OSX) for central workhorse replacing Executor inbound; designs/ + quinn-inbox-ops dashboard concepts as spec. Swift retained only as ref.
- Per plan + operator directive.
2026-06-28 17:57:36 -04:00
Natalie
faa6bd8c55 fix(provider-config): prefer data-api shape.touringPackages + destinations so quinn_admin rate_sections/destinations updates (FMTY regions, NYC notes) surface in quinn.www public payloads
The /www/provider-config (used by SPA) was clobbering with stale native rate_cards/destinations from quinn.api DB. Now public visitors get the structured regional touringPackages + dest notes prepared for neon-geeky rates UI.

.
2026-06-28 17:56:26 -04:00
Natalie
2a1ab7f5f4 docs(lilith-platform): Wave 1 prospector packages migration + restructure references (from parallel docs slice)
- Updated CLAUDE, plans, etc for new @prospector/@packages location of client/ui.
- Removed some .project ghosts per agent-cleanup.
- LP prospector health etc unchanged (backend source of truth).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 17:43:09 -04:00
Natalie
bc1f5b02bf style(provider-website): add neon glow effects to RatesTable/RateList for kuromi-neon (neon dark) theme
Enhanced SectionTitle and RateRow with subtle primary-colored text-shadow and box-shadow glows. When the site theme is kuromi-neon (now the default for quinn.www), the FMTY/rates section (and other rate lists) will have the intended electric pink neon glow on the dark background, making the component UI pop as neon dark.
2026-06-28 16:58:52 -04:00
Natalie
3cb521912e feat(live): enable HLS (port 8888) in cast/infra mediamtx configs for admin preview player (narrow) 2026-06-28 15:59:09 -04:00
Natalie
0da0e1233c feat(live): add live.transquinnftw.com deployment surface with SSO /admin (reuse quinn-www/vip pattern) + basic player at /shows/live and light admin preview page for OBS produced HLS from the relay cast (input cast IP, hls.js player).
Wiring: enable HLS port in cast/infra mediamtx + ufw notes; add deploy:live case + help in run/deploy.sh; update live deploy script.

Ties the quinn.cast relay (on-demand DO) to the VIP shows live feature (fanout to live.transquinnftw.com ingest powers the player; /admin for SSO operator preview + light admin).
2026-06-28 15:59:00 -04:00
Natalie
ec98112267 feat(broadcast): support streaming to VIP live (live.transquinnftw.com) as destination for vip.transquinnftw.com/shows/live,list feature; update defaults, LLM prompt, UI preset, docs, env examples, services comment. Deploy on demand tested via dry-run + syntax + local infra. 2026-06-28 15:54:25 -04:00
Natalie
d8d0f92d40 feat(broadcast): add VIP Live quick preset button in DestinationManager for vip.transquinnftw.com/shows/live (narrow, with title note for key from VIP system) 2026-06-28 15:54:12 -04:00
Natalie
fd10b9b6d8 docs(broadcast): note deploy on demand tested (dry-run + local infra + syntax) and VIP live support as destination for vip.transquinnftw.com/shows/live,list (narrow) 2026-06-28 15:54:04 -04:00
Natalie
51deaee391 fix(broadcast): re-add ReactElement to main.tsx import (for gate usage) after ReactNode cleanup (narrow) 2026-06-28 15:18:46 -04:00
Natalie
4d5d8b8fa9 fix(broadcast): sync frontend api.ts to shared types + re-exports, ReactNode for children/returns, explicit types to clear src type errors (0 under src/ now)
Narrow post-agent polish for clean typecheck.
2026-06-28 15:18:04 -04:00
Natalie
868b7669ff feat(broadcast): complete frontend-public UI from frontend-developer agent (proper Vite+React19 SPA with @lilith/ui-*, StatusDashboard/SceneSwitcher/DestinationManager/ChatPanel/ToolResultDisplay components, useBroadcastAuth hook, direct REST + LLM chat, ?p=/localStorage auth, proxy to 3034, strict TS, theme tokens only, lixbuild ready)
Extracted/polished from controller embedded UI into full dashboard layout. Self-verified (typecheck 0, build OK, dev runnable).

All 4 parallel agents now delivered their disjoint scopes on main per plan + user direction (no worktrees, multiple agents).
2026-06-28 15:11:03 -04:00
Natalie
3378d0710d feat(broadcast): backend-api + controller + shared refinements from quinn-platform-architect agent (pure Bun.serve no-dep backend, robust dest store with /tmp fallback + atomic, typed surfaces, core delegation, error handling; no hono dep for immediate verifiability)
Scoped to agent's paths. Self-verified per agent's commands (syntax, store, boots).

Per approved plan + multi-agent on main.
2026-06-28 14:44:55 -04:00
Natalie
b6e72efe67 docs(broadcast): mention new infra/ as canonical relay stack source + local dev:broadcast:relay (from cloud-architect delivery) (narrow) 2026-06-28 14:43:14 -04:00
Natalie
fc4d85b37e docs(broadcast): update README to document the now-landed quinn.cast deployment surface (deploy-captain agent) + remaining work (narrow) 2026-06-28 14:41:22 -04:00
Natalie
8c9a8fc6f8 docs(broadcast): update RUNBOOK for fully-runnable DO relay stack
- provisioning now auto-deploys infra + bootstrap
- first boot / build / OBS sections rewritten around the custom Dockerfile + Hotel Cam seed + pre-wired produced RTMP + audio bridge debug
- troubleshooting expanded for new services, ufw, bootstrap, alsa device
- self-verification details the exact steps taken for the relay side (reads, creates, edits, verification commands, scoped commits)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 14:41:09 -04:00
Natalie
ede0fe5467 feat(broadcast): add production relay infra under feature (compose, mediamtx, custom OBS Dockerfile+seed for Hotel Cam/LowerThird/produced RTMP, audio+video bridges, bootstrap, ufw/health/fanout)
- docker-compose with all services, health, depends, obs-config volume seed
- mediamtx with live + live/produced paths
- obs/ bakes defaults so start_broadcast + set_text + v4l2/alsa just work
- bootstrap.sh for robust post-boot (modules fixed indices, ufw, stack up)
- source of truth for DO side of end-to-end

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 14:40:54 -04:00
Natalie
09346e536e feat(broadcast): multi-agent parallel delivery of full feature on main -- backend-api, frontend-public, shared, controller refactor into modules (llm-agent, obs-client, etc.), mcp-server start, deployment surface quinn.cast, obs scene collection (per approved plan + user 'merge to main + use multiple agents') 2026-06-28 14:38:01 -04:00
Natalie
e68828653b feat(prospector): updates to geo-aliases, sitemap, my ClientDetail, user-data overview/analytics/router
Prospector queue geo, www sitemap, my frontend, user-data backend/frontend for prospects/clients.
2026-06-28 13:59:21 -04:00
Natalie
f074df3153 chore(build): update BUILD_COUNT, VERSION, bun.lock, bunfig.toml (root + edge-purge)
Version and lock updates from recent prospector, redroid, mcp-dev, and ct-forge migration activity.
2026-06-28 13:59:15 -04:00
Natalie
682d7f90d1 feat(destinations): support zoned FMTY regions 0-6 centered on NYC for regional travel
- Expand FMTY_TIERS to include '0' (e.g. NYC, Boston, DC, Philly, Baltimore) through '6' (e.g. Japan, Sydney, Seoul, Singapore, Hong Kong)
- Update quinn-my MCP tool descriptions
- Relax DB CHECK in quinn DB; updated data in quinn + quinn_admin DBs so website shows zoned fmtyTier (region0 close NE, region5 west-coast, region6 far Asia/AU, region4 Europe etc.)
- Matches request for FMTY region0 like RI/DC/Boston/NJ area (updated analogous), region6 like Japan.
2026-06-28 13:47:40 -04:00
Natalie
8a1bbd7f29 fix(broadcast): make /data dir creation robust in controller (no spurious warning on first run) 2026-06-28 13:30:49 -04:00
Natalie
f49b7df43d feat(broadcast): LLM-controlled remote OBS + SRT relay for low-upload hotel streams with high-bitrate multi-RTMP from DO
- New scripts/provision-stream-droplet.sh (modeled on gpu one) for cheap DO droplet with docker + v4l2loopback + mediamtx ready.
- scripts/hotel-srt-push.sh: macOS ffmpeg one-liner helper for reliable modest-bitrate SRT contribution over bad WiFi.
- New @features/broadcast/controller/: self-contained Bun server with embedded Tailwind chat UI, full xAI Grok-4.3 tool-calling agent, pure-WebSocket obs-websocket v5 client, dynamic destination + ffmpeg fanout manager.
- Full docs + RUNBOOK with architecture, provisioning, hotel push, OBS notes, security, troubleshooting, and verification notes.
- Matches the 'RTMP relay for simulcast' vision already promised in performer marketing.

The hotel side sends ~3 Mbps SRT. All compute, final encode, and broadcast bitrate (to Twitch/YouTube/etc.) happens on the DO network. Control is natural language chat to the LLM.
2026-06-28 13:30:39 -04:00
Natalie
2d5ae395dc feat(mcp): add classify_message tool to mcp-prospector (prospector copilot) + architecture docs for desktop coworker composition
mcp-prospector is the prospector copilot MCP for Claude desktop coworker (Executor) to use central intelligence.

- New tool `classify_message(text, handle?, phone?, has_call?, local_is_known_contact?)`: runs fast efficient rules classifier (our distilled model from training data) + full central stack (LLM via GPU model-boss if deployed, mrnumber, macsync/quinn-messenger context via thread/classify, qualification). Supports passing local desktop context for Contacts gate.
- Local fastClassify/fastTemplate inlined for the MCP (pure, no extra dep issues).
- Updated README with full architecture:
  - Composition: quinn-messenger (messaging), mrnumber (screening), classifier (fast + GPU LLM), macsync (data), quinn-desktop (local MCP for addressbook/Contacts gate, other sensors).
  - Desktop coworker loads multiple MCPs (this central + quinn-messenger MCP + quinn-desktop local MCP).
  - SKILL instructs workflow: desktop local lookup first, then central classify_message for combined result using optimized model + all sources.
  - Replaces pure local stopgap rules with central quality while keeping desktop facts.
- This lets the desktop coworker classify messages using the full prospector copilot feature (central brain on GPU + local).

Follows project: prospector central in api, macsync network, MCP as tool interface for agents, hybrid fast rules + LLM.

Part of making prospector copilot the way for coworker + replace claude deps (GPU for LLM part).
2026-06-28 11:59:10 -04:00
Natalie
03a7b61487 feat(prospector): add fast-classifier (optimized rules model) + unit tests + training set eval
Port of the distilled efficient classifier developed for the slimmed inbound-autohandler stopgap.

- Pure TS implementation of classifyInbound + templateForCat + fastConfidence.
- Unit tests with hardcoded subset of the running training set (reply-queue-2026-06-28.json 25 examples + PROSPECTOR_TRAINING archetypes).
- Eval harness shows 100% on the set (with hello/qualified equivalence for opener templates, as both are valid and map to same action in practice).
- Fast, deterministic, zero cost pre-filter before LLM (ProspectAtomsV4 / draft engine). Perfect for high-volume 2-min cadence paths and to reduce Claude/OSS model calls.
- Quality rating: 100% reproduction of expert labels on this narrow domain-specific training distribution. High precision for our guardrails + canon. LLM (on GPU) remains for nuanced draft generation + confidence on edges.
- Dynamic: rules updated by editing source (restart or reload). Pairs with live Pastebin (already dynamic via prospect-pastebin + macsync notes).

See also Executor/Scheduled/inbound-autohandler/classifier.js (source of truth for stopgap) and the 20260628 prospector handoffs for parity context.

Part of replace-claude-deps work + using raw GPU for heavier LLM stages.
2026-06-28 11:16:43 -04:00
Natalie
b0cd051ac6 feat(prospector): add hard address-book Contacts identity gate to runner (LP parity gap #1 vs stopgap)
Closes the biggest gap called out in 20260628_prospector-autohandler-parity.md: content-only friend inference missed real system Contacts (e.g. one-word messages from saved numbers).

- RunnerDeps now has isAddressBookContact(handle).
- processOwedThread checks it immediately after inbound (pre-scam, pre-classify, pre-draft) and skips with new reason.
- Seam implemented in createRunnerDeps using the mesh bridge (current addressbook exposure; will move to macsync contacts-sync per macsync-integration handoff).
- Conservative on error (false).
- Test updated with override + explicit test case for the skip.
- Aligns runner behavior with the (now-slimmed) Cowork inbound-autohandler stopgap gates.

This is a pre-classify hard gate; human-set friend/blocked statuses still honored downstream.

Part of replace-claude-deps + full auto parity work so stopgap can be retired.
2026-06-28 11:12:09 -04:00
Natalie
597c205cc7 feat(mrnumbers): introduce MrNumberClient (macsync-style seam to ct/app) and wire prospect-runner; document end-of-ct removal of LP mr code
The client provides getLatestVerdictForHandle + recordCheck. Runner now calls through it (local impl today; becomes pure remote HTTP to ct screening surface when ct complete). Local mr gate derivation stays inside client for the transition seam.

By ct end: LP removes mr-number-gate.ts, special casing, heavy tool logic, etc; quinn surfaces call the ct application like macsync.

Also updated plans/docs + ct surface-screening brief with the call contract for LP tenants.
2026-06-28 10:42:20 -04:00
Natalie
3d13c3d729 feat(screening): register 'whatsapp' screening service
Add WhatsApp as an identity-enrichment screening source alongside mr-number:
SCREENING_SERVICES gains 'whatsapp', checkWhatsApp() returns a pending-guidance
record (overridden by caller-supplied result+raw from the whatsapp-lookup tool),
and the admin screening router gains the 'whatsapp' branch mirroring 'mr-number'.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 09:56:57 -04:00
Natalie
90936f749f Merge remote-tracking branch 'origin/main'
# Conflicts:
#	.project/handoffs/20260628_tours-landing-pages-db-driven.md
#	.project/plans/mr-number-prospector-integration.md
#	codebase/@features/api/scripts/backfill-tour-landings-20260628.ts
2026-06-28 09:23:01 -04:00
Natalie
efebafbee5 docs(tours): clarify black is gone; canonical is now DO Managed PG (phase-c). Update handoff notes + backfill script usage for lilith-store-backend + :25060 + terraform extraction. No code change. 2026-06-28 08:42:26 -04:00
Natalie
1b3e8af550 feat(prospector-mcp): add mr_number_check + mr_number_history tools
Expose Mr. Number client screening through the quinn-prospector MCP:
- mr_number_check records an app-lookup verdict (client_id + phone + result
  + notes) via POST /admin/screening/check with service=mr-number; the
  server auto-creates a reputation award/flag on approved/denied.
- mr_number_history lists a client's screening checks via
  GET /admin/screening?clientId=.

Mirrors mr_lookup.py record_screening() wire body (clientId required — the
BFF rewrite drops it from the path).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 08:16:04 -04:00
Natalie
590cbc00c4 feat(prospect-runner): gate replies on Mr. Number screening verdict
Insert the mr-number gate right after the scam screen in processOwedThread: a
denied or cop_flag verdict blocks the reply (kind:'scam', new ScamCategory
mr_number_denied/mr_number_cop), like a scam hit. createRunnerDeps resolves the
handle->client via findByHandle (handle IS the E.164 phone) then reads the latest
mr-number check. Runner tests cover denied/cop/approved/none.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 08:15:59 -04:00
Natalie
13acc0df1c feat(prospect-qualification): Mr. Number screening gate (read-side verdict)
deriveMrNumberVerdict maps the latest mr-number screening_check to a runner
verdict: denied/cop_flag (block), approved (clean), not_screened, error. Pure,
no DB. extractSummary pulls a digest from rawResponse. New service-scoped
getLatestMrNumberCheckByClient repo query. Unit-tested (18 cases, incl.
cop-keyword precision + summary truncation).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 08:15:42 -04:00
Natalie
02483204fd infra: repoint @lilith npm registry + Forgejo from dead black to DO cocotte-forge; serve /photos from local disk
black/apricot homelan died 2026-06-27. Point everything at the DO store tier:
- @lilith npm registry: forge.black.lan/npm.black.lan -> cocotte-forge Verdaccio
  (134.199.243.61:4873) across bunfig.toml scopes, all deploy.sh .npmrc writers,
  and package.json publishConfig.
- Forgejo URL (git/CI): forge.black.lan -> 134.199.243.61:3000 / :2222.
- quinn.www prod.conf /photos: was proxy_pass to dead black_photos (black:8081);
  now served from local disk (root /var/www/quinn.www/dist). Prevents a future
  deploy from re-breaking photos. (Phase G: repoint to DO Spaces/CDN later.)

Interim bare-IP endpoints; switch to named uvlava infranet hosts once live.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 08:09:33 -04:00
Natalie
0456287822 feat(tours): make /tours/* landing pages DB-driven per 20260628 handoff
- Extend tour_stops with landing_* editorial columns + partial unique index (nullable, JSONB arrays for neighborhoods/intro/infoItems).
- New tour_landing_hubs entity (hub meta for grouped legs).
- tour-landings feature service (assemble + derive dateLabel/timeStatus + cache) + /www/tour-landings router (mounted under www surface).
- Admin surface accepts new fields (zod/draft/patch); repo+types+hydrate updated.
- Provider api-client: fetchTourLandings + types.
- Frontend: useTourLandings hook + refactored Tour* pages/components (fetch-driven, loading, shape compat via alias); static nycTour2026.ts deleted.
- Sitemap now derives /tours/* from DB (no hardcoded list).
- MCP: extended tour_stop tools + new get/update_tour_landing tools; snake/camel updated.
- Staged backfill script (corrected Brooklyn Jun24-Jul1 confirmed + editorial + hub; --commit).
- Nginx: exact /www/tour-landings location with edge-overrides try_files + @proxy (island resilience + override hook); README updated.
- Docs: nyc-tour-2026-seo.md marked Phase B complete; handoff self-updated with completion notes.

Zero tech debt. Additive migrations only. Shape parity with old static for cutover. Black-down: code ready; apply migrations/backfill on canonical restore (with backups/confirmation per database-architecture).

Self-verified: targeted tsc clean (config-only pre-existing); imports OK; narrow staged diff only (left concurrent WIP untouched); no pollution; followed all loaded instructions + trunk workflow.

🤖 Generated with Grok Build
2026-06-28 08:00:16 -04:00
Natalie
a08765a727 feat(tours): make /tours/* landing pages DB-driven per 20260628 handoff
- Extend tour_stops with landing_* editorial columns + partial unique index (nullable, JSONB arrays for neighborhoods/intro/infoItems).
- New tour_landing_hubs entity (hub meta for grouped legs).
- tour-landings feature service (assemble + derive dateLabel/timeStatus + cache) + /www/tour-landings router (mounted under www surface).
- Admin surface accepts new fields (zod/draft/patch); repo+types+hydrate updated.
- Provider api-client: fetchTourLandings + types.
- Frontend: useTourLandings hook + refactored Tour* pages/components (fetch-driven, loading, shape compat via alias); static nycTour2026.ts deleted.
- Sitemap now derives /tours/* from DB (no hardcoded list).
- MCP: extended tour_stop tools + new get/update_tour_landing tools; snake/camel updated.
- Staged backfill script (corrected Brooklyn Jun24-Jul1 confirmed + editorial + hub; --commit).
- Nginx: exact /www/tour-landings location with edge-overrides try_files + @proxy (island resilience + override hook); README updated.
- Docs: nyc-tour-2026-seo.md marked Phase B complete; handoff self-updated with completion notes.

Zero tech debt. Additive migrations only. Shape parity with old static for cutover. Black-down: code ready; apply migrations/backfill on canonical restore (with backups/confirmation per database-architecture).

Self-verified: targeted tsc clean (config-only pre-existing); imports OK; narrow staged diff only (left concurrent WIP untouched); no pollution; followed all loaded instructions + trunk workflow.

🤖 Generated with Grok Build
2026-06-28 07:12:42 -04:00
Natalie
14728baedd feat(prospector): integrate macsync outbox/calls/notes/mark-read + pastebin live templates + conversation state machine + warm-queue backfill
- shared/mac-sync/send: outbox enqueue, notes list, calls?since, markRead (logical)
- prospect-pastebin: hourly cache from /my/notes, parser for ①-⓱ + PERSONAS/Vicky + CANON
- prospect-state: inferState + decideNextAction table (NEW/ENGAGED/... x archetype → template + priority + timing)
- prospect-cockpit: send now enqueues outbox (priority/not_before), calls markRead + worked stamp
- prospect-backfill: warm scope since 2026-06-22 does classify + pastebin render + outbox enqueue + guardrails (never-text, dedupe, handled)
- prospect-classifier/structural: call signal (texted+called) in facts/prompts for higher intent
- prospect-draft: generateWithEngine prefers pastebin render when actionTemplateKey
- mcp-prospector: expose warm_queue status/start tools
- prospector never sends direct iMessage anymore (delegates to macsync outbox for true status/pacing)
- collective: full auto-send guardrails + hourly pastebin + inbound+outbound + mark handled
2026-06-28 06:38:11 -04:00
Natalie
8329f7476f feat(screening): integrate mr-number (Mr. Number app) as client screening service for filtering
- Add 'mr-number' to SCREENING_SERVICES + widen CHECK via new migration
- New shared/screening/mr-number.ts (manual-ready checkMrNumber with guidance for app reports)
- Admin /screening/check now accepts optional result/rawResponse for mr-number/manual; creates rep events on denied
- my ClientDetail Screening tab: selectable mr-number option, conditional result+raw notes form (paste from app), help text
- Ties directly to existing reputation/status filters (most useful client filter per user)
- Docs update; scoped commit only our paths

(automation via android emu + vision extraction is follow-on on plum; data model enables it immediately)
2026-06-27 10:46:35 -04:00
Natalie
61c095fe69 test(ad-watch): unit-test canonical reduce + platform registry
Closes the last pure-logic coverage gaps: reduceToCanonical (rate flattening,
tour mapping, social/verifiedProfile filtering, field defaults) and platforms
(normalizePlatformName, getPlatform by id/label, registry invariants). Every
pure module in ad-watch is now unit-tested; 72 tests across 9 suites. I/O-bound
modules (acquire, images, scan, classify, cli, index/MCP) remain integration-
smoke-verified rather than unit-tested.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 05:22:28 -04:00
Natalie
b4b792fd10 feat(ad-watch): encode resolved price+domain rules
Quinn resolved the two source contradictions (2026-06-27):
- price: one rate everywhere = $1000 (FACT_SHEET). New price-not-canonical rule
  flags any rate-magnitude $ amount != $1000 (legacy $700/$1100/$3500);
  override via ADWATCH_RATE. Verified: tryst.txt flags $3,500/$5,000, not $1,000.
- domain: prefer the long transquinnftw.com; tsquinn.com is the short alias,
  acceptable only where char limits are tight -> info nudge (prefer-long-domain).

Rule model gains an optional detect() for parse-based rules (price). CONTRADICTIONS
now empty. dedup listAdCopyPlatforms (.txt+.html). 61 tests pass; typecheck clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 04:52:03 -04:00
Natalie
6bf5242ae4 feat(ad-watch): Executor ad-copy canon + compliance checks
Black-independent text canonical = Quinn's Executor workspace ad-copy/ dir
(ADWATCH_ADCOPY_DIR, default ~/Documents/Claude/Projects/Executor/ad-copy):
per-platform intended copy + the maintained _RULES.md checklist.

- executor-canon.ts: loadIntendedCopy / listAdCopyPlatforms / loadRulesDoc
- compliance.ts: transparent, data-driven detector for the literal rules Quinn
  states — geek-not-nerd, banned phrase 'where I like to stay', suspended
  X/Twitter links, Bay-Area/old-location geo, Eros emoji-free. Surfaces
  candidates; never edits. Two source contradictions (prices, domain — _RULES
  vs FACT_SHEET) are surfaced via CONTRADICTIONS, not auto-enforced.
- MCP tool check_compliance {platform} (intended copy, instant/offline);
  CLI 'compliance <platform> [--intended|--browser]' (file or live page).

Verified on the real files: tryst.txt flags San Jose/Napa (matches its own FIX
note); eros.txt clean. 59 tests pass; typecheck clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 20:55:39 -04:00
Natalie
769bfcd61d feat(ad-watch): plum stdio MCP — scrape ad-platform listings, diff vs canonical
quinn-adwatch: a stateless, plum-local stdio MCP that scrapes Quinn's live
listings on her 11 ad platforms (Eros/Tryst/TS4Rent/MegaPersonals/TSEscorts/
AdultLook/AdultSearch/SkipTheGames + OnlyFans/Fansly/ManyVids) and surfaces
discrepancies vs the canonical provider-config profile.

- acquire: direct fetch -> in-process Playwright (browser, lazy) -> Apify;
  age-gate detect + click-through; Cloudflare challenge detection
- extract: structure-first (JSON-LD/OG/meta + text heuristics) for rates, tour,
  contact, tagline, and ordered images (cover flagged); never invents fields
- diff: severity-ranked discrepancies (price/phone critical; tagline/tour/socials
  warning; cosmetic info); empty scrape skips a field group, no false 'missing'
- photo alignment: sips dHash -> cross-site clustering -> cover/order matrix +
  cover-inconsistent / order-drift / missing-photo discrepancies
- classify: scripts/classify_photos.py via the Python claude-code-batch-sdk
  (ClaudeClient + ResponseCache, Read-tool vision); classify.ts is a thin bridge

Black-independent by design (black + apricot expected to stay down): all deps are
public npm (SDK StdioServerTransport, no @lilith/mcp-common), classify uses the
on-disk Python SDK + local claude CLI, and ADWATCH_CANONICAL_FILE diffs against a
local provider-config snapshot. 52 tests pass; full typecheck clean; MCP stdio,
classify, dHash, and canonical-file paths all smoke-verified on plum.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 19:11:33 -04:00
Natalie
81e8b5ef4f feat(prospect-runner): DRAFT-only inbound auto-runner orchestration
New prospect-runner feature. processOwedThread routes each owed thread:
scam-screen → idempotency (one pending draft/handle) → SILENT/QUINN_ONLY gate →
OF-redirect (post-quote decline, fixed pool line) → live qualify draft via the
existing engine. ALWAYS mode 'DRAFT', NEVER sends — per AUTONOMY-GATE.md every
output stays in the cockpit review queue. All I/O injected (pure, unit-tested,
11 tests). runDraftPass binds it to the live macsync+quinn paths, oldest-first
per RUNNER-POLICY, bounded by a per-run draft cap (model cost, not a send cap).

Replaces the legacy Claude scheduled-task runner's draft step with a service
one. The poll loop + lock + mode(GO|PAUSE) gate + systemd unit are the next
(deploy) slice; LIVE sending stays gated until AUTONOMY-GATE Gate 1 passes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 04:34:14 -04:00
Natalie
f6ee1e1cf2 feat(prospect-qualification): deterministic inbound scam screen
Ports RUNNER-POLICY §SCAM into pure code (screenInbound): URLs, "verification"
video lure, Apple ID/login/OTP credential phishing, sugar/crypto/wire/gift-card/
overpayment money lures, and app-switch pushes. Runs first on every thread; a
hit means never reply + block the handle. Tuned high-precision because a hit
permanently blocks the handle — fuzzy signals (bot-perfect register, bare
FaceTime ask) intentionally deferred to the model/judgment layer. 22 tests
incl. genuine-prospect negatives (bare facetime, cash $1000, location ask).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 03:16:45 -04:00