Skip to content

Feat/content personas - #17

Merged
sxnnywu merged 2 commits into
mainfrom
feat/content-personas
May 10, 2026
Merged

sxnnywu merged 2 commits into
mainfrom
feat/content-personas

Conversation

@sxnnywu

@sxnnywu sxnnywu commented May 10, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

sxnnywu and others added 2 commits May 9, 2026 21:54
- 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>
Copilot AI review requested due to automatic review settings May 10, 2026 01:55
@sxnnywu
sxnnywu merged commit 3d9b91f into main May 10, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)[];
Comment thread CLAUDE.md
| `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).
Comment thread CLAUDE.md
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.
Comment thread CLAUDE.md
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants