feat(pi): real PostHog MCP dashboard, env lockdown, perf parity#701
Conversation
Details🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
26f2d61 to
fb14c2d
Compare
ae67e49 to
29dc7d2
Compare
|
ah lol you got there |
daniloc
left a comment
There was a problem hiding this comment.
I say go for it
a few things to think about here:
- is this declarative and compositional in a way that you're going to like working with via an agent over time? Clean slots you can pull in and out of use according to runtime conditions or as the project evolves are what kept us sane on the basics
- do you feel good about this thing only triggering on specific conditions? the switch point in the code seems straightforward enough, but we're playing with live ammo these days, so worth being belt and suspenders about it where you can
DetailsLive snapshot evidence — reshaped runner planReal end-to-end wizard runs on the reshaped runner ( pi · sonnet → dashboard
|
Re-add the wizard-runner flag key on top of latest main (it lived only on the old stack, which is being re-authored). Read by the wizardRunner resolver middleware in #692b; no importer yet. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
mcp-prompt-streaming.ts and agent-prompt-loader.ts hardcoded 'claude-sonnet-4-6'; point them at the shared DEFAULT_AGENT_MODEL constant (agent-interface already uses it on main). Value unchanged; prep for the MODELS alias map in #692a. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
29dc7d2 to
0afcc78
Compare
pi loads its own MCP extension (pi-mcp, jiti-loaded) against the hosted PostHog MCP and registers the curated dashboard/insight tools as direct tools, so a pi run creates a real dashboard. bash spawns with a scrubbed allowlist-only env so no secret reaches an install. Fuller anti-spiral runtime notes; 1M context. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fb14c2d to
fd8d0fd
Compare
5832e35 to
fb73f37
Compare
pi loads its own MCP extension (pi-mcp, jiti-loaded) against the hosted PostHog MCP and registers the curated dashboard/insight tools as direct tools, so a pi run creates a real dashboard. bash spawns with a scrubbed allowlist-only env so no secret reaches an install. Fuller anti-spiral runtime notes; 1M context. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fd8d0fd to
bc0ac92
Compare
096c7b1 to
62fdb75
Compare
pi loads its own MCP extension (pi-mcp, jiti-loaded) against the hosted PostHog MCP and registers the curated dashboard/insight tools as direct tools, so a pi run creates a real dashboard. bash spawns with a scrubbed allowlist-only env so no secret reaches an install. Fuller anti-spiral runtime notes; 1M context. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bc0ac92 to
81fa4d9
Compare
|
/wizard-ci basic-integration/next-js |
🧙 Wizard CI ResultsTrigger ID:
Configuration
|
pi hardcoded reasoning:true for every gateway model, so it sent reasoning_effort even to non-reasoning openai models — gpt-4o → gateway UnsupportedParamsError → the run no-op'd (deps + .env, zero code). Add switchboard/models.ts: a configurable per-model capability table (reasoning) with a transport-based default (anthropic on, openai off; a reasoning openai model opts back in). The pi harness reads reasoning from it instead of guessing. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Go / no-go — #701 → main (final, with live evidence)Live parity via the workbench snapshot flow (real run → Playwright frames → CI PR with the code diff). Both Next.js app-router apps, each reset to pristine main before the run, frame-count + integration guarded, timed. PRs opened→closed as artifacts on
Verdict
Fixes landed on #701 this pass: model-alias → gateway-id, and the pi reasoning-per-model matrix (#792). |
Picking an OpenAI-class backup to sonnet — switchboard exploration runsLive pi-harness runs on app-router apps, all reset to pristine The switchboardDefault flag-less behavior is unchanged — Runs (pi harness)
¹ sonnet control artifact still pending the 1Password signing hiccup; o4-mini + gpt-5-mini-todo now pushed. What moved gpt-5-mini from 3/5 → 5/5 (on saas)Two changes in #701: (1) a pi setup-order steering line — finish SDK init for every runtime before adding captures, don't jump to the fix/revise step; (2) medium reasoning effort. Both shipped together; the steering is the targeted cause. Recommendation
GO to merge #701 — additive, default-off, sonnet default untouched; |
…soning effort The pi runner drives reasoning models; pair it with the smaller, faster, cheaper openai reasoning model (gpt-5-mini) instead of inheriting the anthropic sonnet default. The anthropic default path is untouched. Reasoning effort becomes a per-model trait in the switchboard capability matrix (thinkingLevel), which the pi harness forwards to the session as reasoning_effort for openai-completions. gpt-5 runs at low effort (fast flagship), gpt-5-mini at medium. A pi steering note keeps weaker models from skipping SDK initialization before adding captures. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
gpt-5-mini shipped client captures behind a defensive `require('posthog-js')`
guard on the todo app — no init, so no events fire. Firm the setup-order steering
to require a real import + initialize at the entry point and forbid the guard.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

















Epic #520 · PostHog data-ops via real MCP + env lockdown (new sub-issue pending).
Problem
npm install.Changes
jiti-load pi's MCP extension (pi-mcp-adapter) againstboot.mcpUrl(same hosted MCP asanthropic); register only curated dashboard/insight tools as direct tools (disableProxyTool: true) so the ~30-tool proxy never pollutes context.bindExtensions({})aftercreateAgentSessionso the adapter connects onsession_start.bearerTokenEnv) — never on disk or in the bash env.noTools: 'builtin'+ a re-registered bashspawnHook; shared into the subagent.Test plan
npm install; pinned bypi-env-lockdown.test.ts.