Repository navigation
Feat/content personas - #17
Merged
Merged
Conversation
- Add CLAUDE_CODE_OAUTH_TOKEN and OLLAMA_API_KEY rows to env table; the one-of-three footnote makes the fallback chain (api key | oauth | ollama | auto-mocks) explicit so future sessions stop second-guessing which is required. - Document the persona e2e harness (scripts/_test-personas.ts via app/api/test-persona/route.ts) under verification methods, since typecheck alone doesn't catch persona regressions. - New rule #19 codifying Pattern B: pre-fetch external data deterministically in TS, feed personas as text. Downstream personas must NOT get MCP tool access for reasoning. Updates rule #6 to mark Reddit/Jira as roadmap (no auth config registered) so they don't get reached for prematurely. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…o Popular HubSpot has a real auth config (Tier-S) so promoting it to Popular is free. Apollo/Jira/Reddit join PostHog's slot as "Setup required" cards to surface common founder integrations earlier in the picker; their persona wiring is still roadmap. Type POPULAR_TOOLKITS as `keyof typeof TOOLKIT_META` so any future typo or drift between the popular list and the toolkit registry fails typecheck instead of silently rendering a broken card. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates the Connections page “Popular” toolkit curation and expands internal contributor documentation around persona auth/setup and the persona e2e harness.
Changes:
- Refreshes the pinned “Popular” toolkits list (adds HubSpot/Apollo/Jira/Reddit; removes PostHog).
- Documents additional LLM auth options (Claude Code OAuth token, Ollama key) and adds persona e2e harness instructions.
- Updates Composio connect guidance to mention additional “Popular” toolkits and persona wiring constraints.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| lib/ui/components/connection-meta.ts | Adjusts the curated “Popular” toolkits list and adds a satisfies type constraint. |
| CLAUDE.md | Expands environment variable docs and adds persona e2e harness + connection/auth guidance updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+69
to
+72
| "JIRA", | ||
| "TWITTER", | ||
| ]; | ||
| "REDDIT", | ||
| ] as const satisfies readonly (keyof typeof TOOLKIT_META)[]; |
| | `NEXT_PUBLIC_USE_MOCKS` | unset | Mock all Session 1 API calls client-side | | ||
| | `COMPOSIO_MCP_CONFIG_ID` | unset | Skip MCP config lazy-create; use this existing config ID | | ||
|
|
||
| \* One of `ANTHROPIC_API_KEY`, `CLAUDE_CODE_OAUTH_TOKEN`, or `OLLAMA_API_KEY` must be set. If none are present, persona calls auto-fall back to mocks (`GMAESTRO_MOCK_PERSONAS=1` behavior). |
| 4. **`globalThis.__gmaestroEventBus`** singleton pattern — Next.js bundles API routes and pages separately; module-level singletons duplicate. Same applies to `__gmaestroDb` and `__gmaestroComposio`. | ||
| 5. **Composio MCP wiring:** one shared MCP config (`"gmaestro-default-v2"`) is lazy-created via `composio.mcp.create(name, { toolkits, allowedTools, manuallyManageConnections: true })`, then `composio.mcp.generate(userId, configId)` mints a per-user instance URL. Drop the result into `mcpServers: { composio: { type: "http", url: instance.url, headers: {} } }`. Override the lazy-create flow by setting `COMPOSIO_MCP_CONFIG_ID` in env. Per-persona scoping via `allowedTools: ["mcp__composio__GMAIL_DRAFT", ...]` on each SDK `query()` call. | ||
| 6. **Connect Link API:** use `composio.connectedAccounts.link(userId, authConfigId, { callbackUrl })`, NOT `initiate()` (deprecated for new orgs as of 2026-05-08). For `authConfigId`, import `getAuthConfigId(toolkit)` from `@/lib/shared/auth-configs` — Foundation pre-created auth configs for all 10 Tier-S toolkits + Discord/Intercom/Calendly via the agent-native Composio signup. Apollo, Loom, and Twitter are out of scope for the demo (need BYO OAuth). | ||
| 6. **Connect Link API:** use `composio.connectedAccounts.link(userId, authConfigId, { callbackUrl })`, NOT `initiate()` (deprecated for new orgs as of 2026-05-08). For `authConfigId`, import `getAuthConfigId(toolkit)` from `@/lib/shared/auth-configs` — Foundation pre-created auth configs for all 10 Tier-S toolkits + Discord/Intercom/Calendly via the agent-native Composio signup. Apollo, Reddit, Jira, Loom, and Twitter (X) are surfaced in the connections picker as "Popular" but their persona-level wiring is roadmap (BYO OAuth needed); don't reference them from any persona's `allowedTools` until an auth config is registered. |
| There is no test suite. `pnpm typecheck` + `pnpm build` are the verification methods. CI (`.github/workflows/typecheck.yml`) runs `pnpm typecheck` on every PR and push to `main` — Node 22, pnpm 11, frozen lockfile. A red typecheck blocks merge. | ||
| There is no traditional unit-test suite. Verification is `pnpm typecheck` + `pnpm build` + the persona e2e harness. CI (`.github/workflows/typecheck.yml`) runs `pnpm typecheck` only on every PR and push to `main` — Node 22, pnpm 11, frozen lockfile. A red typecheck blocks merge. | ||
|
|
||
| **Persona e2e harness:** in one shell run `pnpm dev`; in another run `pnpm tsx scripts/_test-personas.ts`. The harness reads lead/trial fixtures from the local DB and `POST`s to `app/api/test-persona/route.ts` once per persona, feeding synthetic upstream `previousOutputs` where needed. Why HTTP and not direct import: `lib/personas/runtime.ts` is `import "server-only"`, which refuses to load under `tsx`. Each persona reports pass/fail with a 1-line preview; non-zero exit if any persona failed. The route is dev-only and is not registered with the production build — do not reference it from app code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.