Skip to content

Commit ef96f4f

Browse files
jerelvelardeclaude
andcommitted
Phase 06: Status pipeline + lead-store · catch-all tool-call view + showcase
Two themes folded together (no separate commits — both were uncommitted WIP across the parent checkout and the v2a-fixup-wt worktree): A. Local lead-store + Status pipeline + intelligence cleanup - agent/src/lead_store.py: seed-or-Notion store; /api/leads/reset wipes the local cache. boots cleanly without NOTION_TOKEN. - agent/src/intelligence_cleanup.py: wipes Intelligence Postgres orphan threads on agent boot so 'Message not found' rxjs traces stop surfacing. - Lead.status field, STATUSES = "Not started" | "In progress" | "Done"; PipelineBoard now groups by Status (was Workshop). LeadGrid and the "grid" view are removed. - agent/scripts/csv_to_seed.py + agent/data/leads.seed.json bundle 50 synthetic leads so the canvas is non-empty out of the box. B. Catch-all wildcard tool-call view + lead-triage component showcase - src/components/copilot/CopilotKitProviderShell.tsx wraps the v2 provider client-side and registers renderToolCalls=[{ name: "*", args: z.any(), render: ToolCallView }] so the zod schema doesn't cross the server→client boundary. - ToolCallView: 3 lifecycle states + smart result summarization (rows[] / row_count / warning / error / first scalar) + expand-for- details; the runtime path through CopilotKit's chat doesn't fire yet — tracked in .chalk/issues/v2a/007. - 6 visual review surfaces under /components: enrichment-review, charts-review, hitl-review, render-tools-review, tool-calls-review, plus _review-shared building blocks. Legacy bento preserved at bottom. - Charts: LeadRadar (5-axis vs ICP), TierDonut, ScoreDistribution (with .toFixed(2) snapping for hydration stability). - Enrichment: EnrichmentCell, EnrichmentDetailCard, EnrichmentStream (sheet), EnrichmentPill (compact); .enrichment-shimmer keyframes in globals.css. - HITL: RubricProposalCard (soft, with ▲▼ deltas) + SendQueueModal (hard, via useInterrupt on send_gate events). - Inline: EmailDraftCard with tone toggle. - 7 new useFrontendTool({ render }) registrations on page.tsx: renderEnrichmentStream, renderEnrichmentPill, renderLeadRadar, renderTierDonut, renderScoreDistribution, renderRubricProposal, renderEmailDraft. Plus useInterrupt({ enabled: isSendGateEvent }) for SendQueueModal. - AgentState gains an enrichment field; mergeState deep-merges enrichment.perLead so per-lead ticks compose cleanly. Verification: tsc --noEmit clean; dev server boots; / and /components serve 200. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 90e83a9 commit ef96f4f

43 files changed

Lines changed: 6863 additions & 332 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ redis-data
1919
# LangGraph dev runtime state (per-session checkpoint cache)
2020
agent/.langgraph_api/
2121

22+
# Local lead-store cache (auto-created from agent/data/leads.seed.json on
23+
# first read when Notion isn't configured). Per-checkout, never committed.
24+
agent/data/leads.local.json
25+
26+
# Claude Code harness scaffolding (per-checkout, not for downstream teams)
27+
.claude/
28+
2229
# Internal: starter-kit authoring docs, not for downstream hackathon teams
2330
COMPLIANCE.md
2431
PLAN.md

README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ Manufact is a deployment platform for MCP servers built around the open-source `
5252

5353
Here's how to try out 🪁 **CopilotKit Intelligence**:
5454

55-
1. Run `npx @copilotkit/cli-vnext@latest init`
56-
2. Select **Intelligence** when prompted
57-
3. The secret password is `earlyaccess`
58-
4. Drop a Gemini API key in **both** `.env` and `agent/.env` (see [Get a Gemini API key](#get-a-gemini-api-key-required) below — OpenAI works if you swap the model back), plus a Notion integration token + database id (see [Notion MCP setup](#notion-mcp-setup-notion-lead-form-demo)).
59-
5. Run `npm install` then `npm run dev` (or `npm run dev:full` if you want the MCP demo too)
55+
1. Run `npx @copilotkit/cli@latest init` and select **Intelligence** when prompted (see the canonical flow at [docs.copilotkit.ai/threads](https://docs.copilotkit.ai/threads))
56+
2. Drop a Gemini API key in **both** `.env` and `agent/.env` (see [Get a Gemini API key](#get-a-gemini-api-key-required) below — OpenAI works if you swap the model back), plus a Notion integration token + database id (see [Notion MCP setup](#notion-mcp-setup-notion-lead-form-demo)).
57+
3. Run `npm install` then `npm run dev` (or `npm run dev:full` if you want the MCP demo too)
6058

61-
> **⚠ Don't skip step 4.** `npm run dev` runs a pre-flight check (`scripts/check-env.sh`) before booting anything — it'll fail loudly with a numbered list of any missing keys, an unreachable Notion database, or a Docker daemon that isn't running. Fix everything it lists, re-run, and you're off. See [Troubleshooting](#troubleshooting) at the bottom for fixes for each failure mode.
59+
> **⚠ Don't skip step 3.** `npm run dev` runs a pre-flight check (`scripts/check-env.sh`) before booting anything — it'll fail loudly with a numbered list of any missing keys, an unreachable Notion database, or a Docker daemon that isn't running. Fix everything it lists, re-run, and you're off. See [Troubleshooting](#troubleshooting) at the bottom for fixes for each failure mode.
6260
6361
Please give us feedback on your experience with it! 😄
6462

@@ -492,13 +490,6 @@ expanded explanations.
492490
| `Failed to initialize thread` (raw error, no hint) | BFF couldn't reach Intelligence at all | `docker compose ps` should show `intelligence`, `postgres`, `redis` healthy; if not, `npm run dev:infra:down && npm run dev:infra`. |
493491
| Empty canvas, no errors anywhere | Agent booted without the integration prompt | Restart the agent (`npm run dev:agent`). The boot log should print `[notion_health_check] db="…" rows=50 …`. |
494492

495-
<details>
496-
<summary><strong>CLI asked for a password</strong></summary>
497-
498-
The current early-access password is `earlyaccess`. If it doesn't work it may have rotated — check https://docs.copilotkit.ai/learn/intelligence-platform.
499-
500-
</details>
501-
502493
<details>
503494
<summary><strong>Threads don't persist across reloads</strong></summary>
504495

0 commit comments

Comments
 (0)