feat: agentic detection for source-map upload flow#689
Draft
gewenyu99 wants to merge 4 commits into
Draft
Conversation
Replace the static pre-auth platform scan with a Haiku agent that runs
after login: it maps every project in the repo (monorepo-aware) to a
supported source-maps variant and flags which already have a PostHog SDK,
then the user picks one to instrument. Drops the health-check ("connection")
step and the pre-auth detection display from this flow.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
🧙 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. |
…urface scan activity - Move the agentic detector to src/lib/detection/agentic.ts next to the other detection tools (framework, features, package-manager), made generic and product-knowledge-free (caller passes targets). Source-maps keeps a thin adapter that supplies its variants and classifies instrumentability. - Intro: "detect your project's framework(s)…"; left-align the wrapping paragraph inside a centered block to fix the staircase. - Detect screen: always surface the agent's live actions while scanning. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Detect screen: lead with the instrumentable projects in the picker, collapse the (often dozens of) unsupported projects into a short count line instead of listing every one. Clearer picker prompt. - Detection agent: manifest-first recipe (Glob **/package.json, read each once) so it stops enumerating non-JS directories as "unknown" and finishes fast. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The agent run captured the selected variant at run() time and the store forks the session reference on setKey, so the picker's choice never reached the run prompt — the run built the failed-detection prompt and aborted with unsupported-platform every time, racing the detection agent. - Park the agent run after auth until the picker's gate resolves (generic: await any gated step between the auth and run screens), mirroring waitForAiOptIn. - Read the chosen variant/path LIVE via getUI().getFrameworkContext at prompt-build time instead of from the forked session snapshot. - Add getFrameworkContext + waitForGate to the UI (ink + logging). - Wider detection glob + manifest constant; collapse non-instrumentable projects to a count line; clearer picker prompt + SDK-missing copy. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

Problem
Changes
Test plan