@posthog/wizard 2.10.2 → 2.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/{McpScreen-BUr995Wh.js → McpScreen-23GY1pWz.js} +3 -3
  2. package/dist/{McpScreen-BUr995Wh.js.map → McpScreen-23GY1pWz.js.map} +1 -1
  3. package/dist/{add-mcp-server-to-clients-65h6IpxC.js → add-mcp-server-to-clients-B6baHy_h.js} +3 -3
  4. package/dist/{add-mcp-server-to-clients-65h6IpxC.js.map → add-mcp-server-to-clients-B6baHy_h.js.map} +1 -1
  5. package/dist/{agent-runner-DsymRIHf.js → agent-runner-CBPBefLt.js} +6 -6
  6. package/dist/{agent-runner-DsymRIHf.js.map → agent-runner-CBPBefLt.js.map} +1 -1
  7. package/dist/analytics-DdTDVjqs.js +2 -0
  8. package/dist/{analytics-CpRZ9V5j.js → analytics-xANpxdVL.js} +2 -2
  9. package/dist/{analytics-CpRZ9V5j.js.map → analytics-xANpxdVL.js.map} +1 -1
  10. package/dist/bin.js +20 -18
  11. package/dist/bin.js.map +1 -1
  12. package/dist/{detection-D8428PBG.js → detection-Drfq0l8n.js} +3 -3
  13. package/dist/{detection-D8428PBG.js.map → detection-Drfq0l8n.js.map} +1 -1
  14. package/dist/{package-manager-B_VtY9ZS.js → package-manager-Ls_8r9Ot.js} +2 -2
  15. package/dist/{package-manager-B_VtY9ZS.js.map → package-manager-Ls_8r9Ot.js.map} +1 -1
  16. package/dist/{posthog-integration-EeKb2FkQ.js → posthog-integration-DUZpiyxg.js} +7 -7
  17. package/dist/{posthog-integration-EeKb2FkQ.js.map → posthog-integration-DUZpiyxg.js.map} +1 -1
  18. package/dist/{readiness-V6pfR5tp.js → readiness-BAgN8xAg.js} +4 -4
  19. package/dist/{readiness-V6pfR5tp.js.map → readiness-BAgN8xAg.js.map} +1 -1
  20. package/dist/{registry-BUdvRdBh.js → registry-qfhSxTjo.js} +4 -4
  21. package/dist/{registry-BUdvRdBh.js.map → registry-qfhSxTjo.js.map} +1 -1
  22. package/dist/{setup-utils-DJuYiRId.js → setup-utils-C1h1QDiG.js} +4 -4
  23. package/dist/{setup-utils-DJuYiRId.js.map → setup-utils-C1h1QDiG.js.map} +1 -1
  24. package/dist/{start-playground-mQFlOf6e.js → start-playground-xOLMYzst.js} +3 -3
  25. package/dist/{start-playground-mQFlOf6e.js.map → start-playground-xOLMYzst.js.map} +1 -1
  26. package/dist/{start-tui-CSLj4eU7.js → start-tui-Ddo4TI9T.js} +7 -7
  27. package/dist/{start-tui-CSLj4eU7.js.map → start-tui-Ddo4TI9T.js.map} +1 -1
  28. package/dist/{steps-u8U1Nz2e.js → steps-BjvFG--8.js} +5 -5
  29. package/dist/{steps-u8U1Nz2e.js.map → steps-BjvFG--8.js.map} +1 -1
  30. package/dist/{telemetry-CjokGP19.js → telemetry-CC6zPKJg.js} +2 -2
  31. package/dist/{telemetry-CjokGP19.js.map → telemetry-CC6zPKJg.js.map} +1 -1
  32. package/dist/{wizard-abort-0IZHiW_d.js → wizard-abort-Bc3lWNLb.js} +1 -1
  33. package/dist/{wizard-abort-DhECsFZO.js → wizard-abort-XhapT0Ly.js} +2 -2
  34. package/dist/{wizard-abort-DhECsFZO.js.map → wizard-abort-XhapT0Ly.js.map} +1 -1
  35. package/npm-shrinkwrap.json +2 -2
  36. package/package.json +1 -1
  37. package/dist/analytics-D6yTMqoi.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"file":"posthog-integration-EeKb2FkQ.js","names":[],"sources":["../src/lib/workflows/posthog-integration/detect.ts","../src/lib/workflows/posthog-integration/steps.ts","../src/lib/workflows/posthog-integration/index.ts"],"sourcesContent":["/**\n * Core integration detection step.\n *\n * Runs framework detection, context gathering, version checking,\n * and feature discovery. Writes results to the store via the\n * WorkflowReadyContext so the IntroScreen can display them.\n *\n * This is the same work that bin.ts $0 handler does inline —\n * extracted here so the `integrate` subcommand can reuse it.\n */\n\nimport type { WorkflowReadyContext } from '../workflow-step.js';\nimport { FRAMEWORK_REGISTRY } from '../../registry.js';\nimport {\n detectFramework,\n discoverFeatures,\n gatherFrameworkContext,\n checkFrameworkVersion,\n} from '../../detection/index.js';\n\nexport async function detectPostHogIntegration(\n ctx: WorkflowReadyContext,\n): Promise<void> {\n const session = ctx.session;\n const installDir = session.installDir;\n\n const detectedIntegration = await detectFramework(installDir);\n\n if (detectedIntegration) {\n const config = FRAMEWORK_REGISTRY[detectedIntegration];\n\n const sessionOptions = {\n installDir,\n debug: session.debug,\n forceInstall: session.forceInstall,\n default: false,\n signup: session.signup,\n localMcp: session.localMcp,\n ci: session.ci,\n menu: session.menu,\n benchmark: session.benchmark,\n yaraReport: session.yaraReport,\n };\n\n // Gather framework-specific context (e.g., router type)\n const context = await gatherFrameworkContext(config, sessionOptions);\n for (const [key, value] of Object.entries(context)) {\n if (!(key in session.frameworkContext)) {\n ctx.setFrameworkContext(key, value);\n }\n }\n\n ctx.setFrameworkConfig(detectedIntegration, config);\n\n if (!session.detectedFrameworkLabel) {\n ctx.setDetectedFramework(config.metadata.name);\n }\n\n // Version check\n const versionResult = await checkFrameworkVersion(config, sessionOptions);\n if (versionResult.supported !== true) {\n ctx.setUnsupportedVersion(versionResult.supported);\n }\n }\n\n // Feature discovery\n for (const feature of discoverFeatures(installDir)) {\n ctx.addDiscoveredFeature(feature);\n }\n\n ctx.setDetectionComplete();\n}\n","/**\n * PostHog integration workflow — the default wizard flow.\n *\n * Steps define their own gate predicates and onInit callbacks.\n * The store derives gate promises and fires init work from these\n * definitions — no hardcoded per-flow logic in the store.\n */\n\nimport type { Workflow } from '../workflow-step.js';\nimport type { WizardSession } from '../../wizard-session.js';\nimport { RunPhase } from '../../wizard-session.js';\nimport {\n evaluateWizardReadiness,\n WizardReadiness,\n} from '../../health-checks/readiness.js';\nimport { detectPostHogIntegration } from './detect.js';\n\nfunction needsSetup(session: WizardSession): boolean {\n const config = session.frameworkConfig;\n if (!config?.metadata.setup?.questions) return false;\n\n return config.metadata.setup.questions.some(\n (q: { key: string }) => !(q.key in session.frameworkContext),\n );\n}\n\nfunction healthCheckReady(session: WizardSession): boolean {\n if (!session.readinessResult) return false;\n if (session.readinessResult.decision === WizardReadiness.No)\n return session.outageDismissed;\n return true;\n}\n\nexport const POSTHOG_INTEGRATION_WORKFLOW: Workflow = [\n {\n id: 'detect',\n label: 'Detecting framework',\n // Headless step: no screen. onReady fires after bin.ts assigns the\n // session — runs framework detection, context gathering, version\n // check, and feature discovery. Results are written to the store\n // for the IntroScreen to render.\n onReady: (ctx) => detectPostHogIntegration(ctx),\n },\n {\n id: 'intro',\n label: 'Welcome',\n screen: 'intro',\n gate: (session) => session.setupConfirmed,\n },\n {\n id: 'health-check',\n label: 'Health check',\n screen: 'health-check',\n gate: healthCheckReady,\n onInit: (ctx) => {\n evaluateWizardReadiness()\n .then((readiness) => {\n ctx.setReadinessResult(readiness);\n })\n .catch(() => {\n ctx.setReadinessResult({\n decision: WizardReadiness.Yes,\n health: {} as never,\n reasons: [],\n });\n });\n },\n },\n {\n id: 'setup',\n label: 'Setup',\n screen: 'setup',\n show: needsSetup,\n isComplete: (session) => !needsSetup(session),\n },\n {\n id: 'auth',\n label: 'Authentication',\n screen: 'auth',\n isComplete: (session) => session.credentials !== null,\n },\n {\n id: 'run',\n label: 'Integration',\n screen: 'run',\n isComplete: (session) =>\n session.runPhase === RunPhase.Completed ||\n session.runPhase === RunPhase.Error,\n },\n {\n id: 'mcp',\n label: 'MCP servers',\n screen: 'mcp',\n isComplete: (session) => session.mcpComplete,\n },\n {\n id: 'outro',\n label: 'Done',\n screen: 'outro',\n isComplete: (session) => session.outroDismissed,\n },\n {\n id: 'keep-skills',\n label: 'Keep Skills',\n screen: 'keep-skills',\n },\n];\n","import type { WorkflowConfig } from '../workflow-step.js';\nimport type { WorkflowRun } from '../../agent/agent-runner.js';\nimport type { WizardSession } from '../../wizard-session.js';\nimport { OutroKind } from '../../wizard-session.js';\nimport { AgentSignals } from '../../agent/agent-interface.js';\nimport {\n DEFAULT_PACKAGE_INSTALLATION,\n SPINNER_MESSAGE,\n} from '../../framework-config.js';\nimport {\n tryGetPackageJson,\n isUsingTypeScript,\n} from '../../../utils/setup-utils.js';\nimport { analytics } from '../../../utils/analytics.js';\nimport { WIZARD_INTERACTION_EVENT_NAME } from '../../constants.js';\nimport { getUI } from '../../../ui/index.js';\nimport { getCloudUrlFromRegion } from '../../../utils/urls.js';\nimport { POSTHOG_INTEGRATION_WORKFLOW } from './steps.js';\n\nexport const posthogIntegrationConfig: WorkflowConfig = {\n command: 'integrate',\n description: 'Set up PostHog SDK integration',\n flowKey: 'posthog-integration',\n steps: POSTHOG_INTEGRATION_WORKFLOW,\n\n run: async (session: WizardSession): Promise<WorkflowRun> => {\n const config = session.frameworkConfig!;\n\n const typeScriptDetected = isUsingTypeScript({\n installDir: session.installDir,\n });\n session.typescript = typeScriptDetected;\n\n // Read package.json and resolve framework version\n const usesPackageJson = config.detection.usesPackageJson !== false;\n let frameworkVersion: string | undefined;\n\n if (usesPackageJson) {\n const packageJson = await tryGetPackageJson({\n installDir: session.installDir,\n });\n if (packageJson) {\n const { hasPackageInstalled } = await import(\n '../../../utils/package-json.js'\n );\n if (!hasPackageInstalled(config.detection.packageName, packageJson)) {\n getUI().log.warn(\n `${config.detection.packageDisplayName} does not seem to be installed. Continuing anyway — the agent will handle it.`,\n );\n }\n frameworkVersion = config.detection.getVersion(packageJson);\n } else {\n getUI().log.warn(\n 'Could not find package.json. Continuing anyway — the agent will handle it.',\n );\n }\n } else {\n frameworkVersion = config.detection.getVersion(null);\n }\n\n // Analytics tags\n if (frameworkVersion && config.detection.getVersionBucket) {\n const versionBucket = config.detection.getVersionBucket(frameworkVersion);\n analytics.setTag(`${config.metadata.integration}-version`, versionBucket);\n }\n const frameworkContext = session.frameworkContext;\n const contextTags = config.analytics.getTags(frameworkContext);\n Object.entries(contextTags).forEach(([key, value]) => {\n analytics.setTag(key, value);\n });\n\n return {\n integrationLabel: config.metadata.integration,\n additionalMcpServers: config.metadata.additionalMcpServers,\n detectPackageManager: config.detection.detectPackageManager,\n spinnerMessage: SPINNER_MESSAGE,\n successMessage: config.ui.successMessage,\n estimatedDurationMinutes: config.ui.estimatedDurationMinutes,\n reportFile: 'posthog-setup-report.md',\n docsUrl: config.metadata.docsUrl,\n errorMessage: 'Integration failed',\n additionalFeatureQueue: session.additionalFeatureQueue,\n\n customPrompt: (ctx) => {\n const additionalLines = config.prompts.getAdditionalContextLines\n ? config.prompts.getAdditionalContextLines(frameworkContext)\n : [];\n const additionalContext =\n additionalLines.length > 0\n ? '\\n' + additionalLines.map((line) => `- ${line}`).join('\\n')\n : '';\n\n return `You have access to the PostHog MCP server which provides skills to integrate PostHog into this ${\n config.metadata.name\n } project.\n\nProject context:\n- PostHog Project ID: ${ctx.projectId}\n- Framework: ${config.metadata.name} ${frameworkVersion || 'latest'}\n- TypeScript: ${typeScriptDetected ? 'Yes' : 'No'}\n- PostHog public token: ${ctx.projectApiKey}\n- PostHog Host: ${ctx.host}\n- Project type: ${config.prompts.projectTypeDetection}\n- Package installation: ${\n config.prompts.packageInstallation ?? DEFAULT_PACKAGE_INSTALLATION\n }${additionalContext}\n\nInstructions (follow these steps IN ORDER - do not skip or reorder):\n\nSTEP 1: Call load_skill_menu (from the wizard-tools MCP server) to see available skills.\n If the tool fails, emit: ${\n AgentSignals.ERROR_MCP_MISSING\n } Could not load skill menu and halt.\n\n Choose a skill from the \\`integration\\` category that matches this project's framework. Do NOT pick skills from other categories (llm-analytics, error-tracking, feature-flags, omnibus, etc.) — those are handled separately.\n If no suitable integration skill is found, emit: ${\n AgentSignals.ERROR_RESOURCE_MISSING\n } Could not find a suitable skill for this project.\n\nSTEP 2: Call install_skill (from the wizard-tools MCP server) with the chosen skill ID (e.g., \"integration-nextjs-app-router\").\n Do NOT run any shell commands to install skills.\n\nSTEP 3: Load the installed skill's SKILL.md file to understand what references are available.\n\nSTEP 4: Follow the skill's workflow files in sequence. Look for numbered workflow files in the references (e.g., files with patterns like \"1.0-\", \"1.1-\", \"1.2-\"). Start with the first one and proceed through each step until completion. Each workflow file will tell you what to do and which file comes next. Never directly write PostHog tokens directly to code files; always use environment variables.\n\nSTEP 5: Set up environment variables for PostHog using the wizard-tools MCP server (this runs locally — secret values never leave the machine):\n - Use check_env_keys to see which keys already exist in the project's .env file (e.g. .env.local or .env).\n - Use set_env_values to create or update the PostHog public token and host, using the appropriate environment variable naming convention for ${\n config.metadata.name\n }, which you'll find in example code. The tool will also ensure .gitignore coverage. Don't assume the presence of keys means the value is up to date. Write the correct value each time.\n - Reference these environment variables in the code files you create instead of hardcoding the public token and host.\n\nImportant: Use the detect_package_manager tool (from the wizard-tools MCP server) to determine which package manager the project uses. Do not manually search for lockfiles or config files. Always install packages as a background task. Don't await completion; proceed with other work immediately after starting the installation. You must read a file immediately before attempting to write it, even if you have previously read it; failure to do so will cause a tool failure.\n\n\n`;\n },\n\n postRun: async (sess, credentials) => {\n const envVars = config.environment.getEnvVars(\n credentials.projectApiKey,\n credentials.host,\n );\n if (config.environment.uploadToHosting) {\n const { uploadEnvironmentVariablesStep } = await import(\n '../../../steps/index.js'\n );\n const uploadedEnvVars = await uploadEnvironmentVariablesStep(\n envVars,\n {\n integration: config.metadata.integration,\n session: sess,\n },\n );\n if (uploadedEnvVars.length > 0) {\n analytics.capture(WIZARD_INTERACTION_EVENT_NAME, {\n action: 'wizard_env_vars_uploaded',\n integration: config.metadata.integration,\n variable_count: uploadedEnvVars.length,\n variable_keys: uploadedEnvVars,\n });\n }\n }\n },\n\n buildOutroData: (sess, credentials, cloudRegion) => {\n const envVars = config.environment.getEnvVars(\n credentials.projectApiKey,\n credentials.host,\n );\n const continueUrl =\n sess.signup && cloudRegion\n ? `${getCloudUrlFromRegion(cloudRegion)}/products?source=wizard`\n : undefined;\n\n const changes = [\n ...config.ui.getOutroChanges(frameworkContext),\n Object.keys(envVars).length > 0\n ? 'Added environment variables to .env file'\n : '',\n ].filter(Boolean);\n\n return {\n kind: OutroKind.Success as const,\n message: 'Successfully installed PostHog!',\n reportFile: 'posthog-setup-report.md',\n changes,\n docsUrl: config.metadata.docsUrl,\n continueUrl,\n };\n },\n };\n },\n};\n\nexport { POSTHOG_INTEGRATION_WORKFLOW } from './steps.js';\n"],"mappings":";;;;;;;;AAoBA,eAAsB,yBACpB,KACe;CACf,MAAM,UAAU,IAAI;CACpB,MAAM,aAAa,QAAQ;CAE3B,MAAM,sBAAsB,MAAM,gBAAgB,WAAW;AAE7D,KAAI,qBAAqB;EACvB,MAAM,SAAS,mBAAmB;EAElC,MAAM,iBAAiB;GACrB;GACA,OAAO,QAAQ;GACf,cAAc,QAAQ;GACtB,SAAS;GACT,QAAQ,QAAQ;GAChB,UAAU,QAAQ;GAClB,IAAI,QAAQ;GACZ,MAAM,QAAQ;GACd,WAAW,QAAQ;GACnB,YAAY,QAAQ;GACrB;EAGD,MAAM,UAAU,MAAM,uBAAuB,QAAQ,eAAe;AACpE,OAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,QAAQ,CAChD,KAAI,EAAE,OAAO,QAAQ,kBACnB,KAAI,oBAAoB,KAAK,MAAM;AAIvC,MAAI,mBAAmB,qBAAqB,OAAO;AAEnD,MAAI,CAAC,QAAQ,uBACX,KAAI,qBAAqB,OAAO,SAAS,KAAK;EAIhD,MAAM,gBAAgB,MAAM,sBAAsB,QAAQ,eAAe;AACzE,MAAI,cAAc,cAAc,KAC9B,KAAI,sBAAsB,cAAc,UAAU;;AAKtD,MAAK,MAAM,WAAW,iBAAiB,WAAW,CAChD,KAAI,qBAAqB,QAAQ;AAGnC,KAAI,sBAAsB;;;;ACrD5B,SAAS,WAAW,SAAiC;CACnD,MAAM,SAAS,QAAQ;AACvB,KAAI,CAAC,QAAQ,SAAS,OAAO,UAAW,QAAO;AAE/C,QAAO,OAAO,SAAS,MAAM,UAAU,MACpC,MAAuB,EAAE,EAAE,OAAO,QAAQ,kBAC5C;;AAGH,SAAS,iBAAiB,SAAiC;AACzD,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cAAc;kBAC1B,IAAI,KAAK;kBACT,OAAO,QAAQ,qBAAqB;0BAE5C,OAAO,QAAQ,uBAAA,2JACd,kBAAkB;;;;;8BAMxB,aAAa,kBACd;;;sDAIC,aAAa,uBACd;;;;;;;;;;;kJAYC,OAAO,SAAS,KACjB;;;;;;;;GASE,SAAS,OAAO,MAAM,gBAAgB;IACpC,MAAM,UAAU,OAAO,YAAY,WACjC,YAAY,eACZ,YAAY,KACb;AACD,QAAI,OAAO,YAAY,iBAAiB;KACtC,MAAM,EAAE,mCAAmC,MAAM,OAC/C;KAEF,MAAM,kBAAkB,MAAM,+BAC5B,SACA;MACE,aAAa,OAAO,SAAS;MAC7B,SAAS;MACV,CACF;AACD,SAAI,gBAAgB,SAAS,EAC3B,WAAU,QAAQ,+BAA+B;MAC/C,QAAQ;MACR,aAAa,OAAO,SAAS;MAC7B,gBAAgB,gBAAgB;MAChC,eAAe;MAChB,CAAC;;;GAKR,iBAAiB,MAAM,aAAa,gBAAgB;IAClD,MAAM,UAAU,OAAO,YAAY,WACjC,YAAY,eACZ,YAAY,KACb;IACD,MAAM,cACJ,KAAK,UAAU,cACX,GAAG,sBAAsB,YAAY,CAAC,2BACtC,KAAA;AASN,WAAO;KACL,MAAA;KACA,SAAS;KACT,YAAY;KACZ,SAXc,CACd,GAAG,OAAO,GAAG,gBAAgB,iBAAiB,EAC9C,OAAO,KAAK,QAAQ,CAAC,SAAS,IAC1B,6CACA,GACL,CAAC,OAAO,QAAQ;KAOf,SAAS,OAAO,SAAS;KACzB;KACD;;GAEJ;;CAEJ"}
1
+ {"version":3,"file":"posthog-integration-DUZpiyxg.js","names":[],"sources":["../src/lib/workflows/posthog-integration/detect.ts","../src/lib/workflows/posthog-integration/steps.ts","../src/lib/workflows/posthog-integration/index.ts"],"sourcesContent":["/**\n * Core integration detection step.\n *\n * Runs framework detection, context gathering, version checking,\n * and feature discovery. Writes results to the store via the\n * WorkflowReadyContext so the IntroScreen can display them.\n *\n * This is the same work that bin.ts $0 handler does inline —\n * extracted here so the `integrate` subcommand can reuse it.\n */\n\nimport type { WorkflowReadyContext } from '../workflow-step.js';\nimport { FRAMEWORK_REGISTRY } from '../../registry.js';\nimport {\n detectFramework,\n discoverFeatures,\n gatherFrameworkContext,\n checkFrameworkVersion,\n} from '../../detection/index.js';\n\nexport async function detectPostHogIntegration(\n ctx: WorkflowReadyContext,\n): Promise<void> {\n const session = ctx.session;\n const installDir = session.installDir;\n\n const detectedIntegration = await detectFramework(installDir);\n\n if (detectedIntegration) {\n const config = FRAMEWORK_REGISTRY[detectedIntegration];\n\n const sessionOptions = {\n installDir,\n debug: session.debug,\n forceInstall: session.forceInstall,\n default: false,\n signup: session.signup,\n localMcp: session.localMcp,\n ci: session.ci,\n menu: session.menu,\n benchmark: session.benchmark,\n yaraReport: session.yaraReport,\n };\n\n // Gather framework-specific context (e.g., router type)\n const context = await gatherFrameworkContext(config, sessionOptions);\n for (const [key, value] of Object.entries(context)) {\n if (!(key in session.frameworkContext)) {\n ctx.setFrameworkContext(key, value);\n }\n }\n\n ctx.setFrameworkConfig(detectedIntegration, config);\n\n if (!session.detectedFrameworkLabel) {\n ctx.setDetectedFramework(config.metadata.name);\n }\n\n // Version check\n const versionResult = await checkFrameworkVersion(config, sessionOptions);\n if (versionResult.supported !== true) {\n ctx.setUnsupportedVersion(versionResult.supported);\n }\n }\n\n // Feature discovery\n for (const feature of discoverFeatures(installDir)) {\n ctx.addDiscoveredFeature(feature);\n }\n\n ctx.setDetectionComplete();\n}\n","/**\n * PostHog integration workflow — the default wizard flow.\n *\n * Steps define their own gate predicates and onInit callbacks.\n * The store derives gate promises and fires init work from these\n * definitions — no hardcoded per-flow logic in the store.\n */\n\nimport type { Workflow } from '../workflow-step.js';\nimport type { WizardSession } from '../../wizard-session.js';\nimport { RunPhase } from '../../wizard-session.js';\nimport {\n evaluateWizardReadiness,\n WizardReadiness,\n} from '../../health-checks/readiness.js';\nimport { detectPostHogIntegration } from './detect.js';\n\nfunction needsSetup(session: WizardSession): boolean {\n const config = session.frameworkConfig;\n if (!config?.metadata.setup?.questions) return false;\n\n return config.metadata.setup.questions.some(\n (q: { key: string }) => !(q.key in session.frameworkContext),\n );\n}\n\nfunction healthCheckReady(session: WizardSession): boolean {\n if (!session.readinessResult) return false;\n if (session.readinessResult.decision === WizardReadiness.No)\n return session.outageDismissed;\n return true;\n}\n\nexport const POSTHOG_INTEGRATION_WORKFLOW: Workflow = [\n {\n id: 'detect',\n label: 'Detecting framework',\n // Headless step: no screen. onReady fires after bin.ts assigns the\n // session — runs framework detection, context gathering, version\n // check, and feature discovery. Results are written to the store\n // for the IntroScreen to render.\n onReady: (ctx) => detectPostHogIntegration(ctx),\n },\n {\n id: 'intro',\n label: 'Welcome',\n screen: 'intro',\n gate: (session) => session.setupConfirmed,\n },\n {\n id: 'health-check',\n label: 'Health check',\n screen: 'health-check',\n gate: healthCheckReady,\n onInit: (ctx) => {\n evaluateWizardReadiness()\n .then((readiness) => {\n ctx.setReadinessResult(readiness);\n })\n .catch(() => {\n ctx.setReadinessResult({\n decision: WizardReadiness.Yes,\n health: {} as never,\n reasons: [],\n });\n });\n },\n },\n {\n id: 'setup',\n label: 'Setup',\n screen: 'setup',\n show: needsSetup,\n isComplete: (session) => !needsSetup(session),\n },\n {\n id: 'auth',\n label: 'Authentication',\n screen: 'auth',\n isComplete: (session) => session.credentials !== null,\n },\n {\n id: 'run',\n label: 'Integration',\n screen: 'run',\n isComplete: (session) =>\n session.runPhase === RunPhase.Completed ||\n session.runPhase === RunPhase.Error,\n },\n {\n id: 'mcp',\n label: 'MCP servers',\n screen: 'mcp',\n isComplete: (session) => session.mcpComplete,\n },\n {\n id: 'outro',\n label: 'Done',\n screen: 'outro',\n isComplete: (session) => session.outroDismissed,\n },\n {\n id: 'keep-skills',\n label: 'Keep Skills',\n screen: 'keep-skills',\n },\n];\n","import type { WorkflowConfig } from '../workflow-step.js';\nimport type { WorkflowRun } from '../../agent/agent-runner.js';\nimport type { WizardSession } from '../../wizard-session.js';\nimport { OutroKind } from '../../wizard-session.js';\nimport { AgentSignals } from '../../agent/agent-interface.js';\nimport {\n DEFAULT_PACKAGE_INSTALLATION,\n SPINNER_MESSAGE,\n} from '../../framework-config.js';\nimport {\n tryGetPackageJson,\n isUsingTypeScript,\n} from '../../../utils/setup-utils.js';\nimport { analytics } from '../../../utils/analytics.js';\nimport { WIZARD_INTERACTION_EVENT_NAME } from '../../constants.js';\nimport { getUI } from '../../../ui/index.js';\nimport { getCloudUrlFromRegion } from '../../../utils/urls.js';\nimport { POSTHOG_INTEGRATION_WORKFLOW } from './steps.js';\n\nexport const posthogIntegrationConfig: WorkflowConfig = {\n command: 'integrate',\n description: 'Set up PostHog SDK integration',\n flowKey: 'posthog-integration',\n steps: POSTHOG_INTEGRATION_WORKFLOW,\n\n run: async (session: WizardSession): Promise<WorkflowRun> => {\n const config = session.frameworkConfig!;\n\n const typeScriptDetected = isUsingTypeScript({\n installDir: session.installDir,\n });\n session.typescript = typeScriptDetected;\n\n // Read package.json and resolve framework version\n const usesPackageJson = config.detection.usesPackageJson !== false;\n let frameworkVersion: string | undefined;\n\n if (usesPackageJson) {\n const packageJson = await tryGetPackageJson({\n installDir: session.installDir,\n });\n if (packageJson) {\n const { hasPackageInstalled } = await import(\n '../../../utils/package-json.js'\n );\n if (!hasPackageInstalled(config.detection.packageName, packageJson)) {\n getUI().log.warn(\n `${config.detection.packageDisplayName} does not seem to be installed. Continuing anyway — the agent will handle it.`,\n );\n }\n frameworkVersion = config.detection.getVersion(packageJson);\n } else {\n getUI().log.warn(\n 'Could not find package.json. Continuing anyway — the agent will handle it.',\n );\n }\n } else {\n frameworkVersion = config.detection.getVersion(null);\n }\n\n // Analytics tags\n if (frameworkVersion && config.detection.getVersionBucket) {\n const versionBucket = config.detection.getVersionBucket(frameworkVersion);\n analytics.setTag(`${config.metadata.integration}-version`, versionBucket);\n }\n const frameworkContext = session.frameworkContext;\n const contextTags = config.analytics.getTags(frameworkContext);\n Object.entries(contextTags).forEach(([key, value]) => {\n analytics.setTag(key, value);\n });\n\n return {\n integrationLabel: config.metadata.integration,\n additionalMcpServers: config.metadata.additionalMcpServers,\n detectPackageManager: config.detection.detectPackageManager,\n spinnerMessage: SPINNER_MESSAGE,\n successMessage: config.ui.successMessage,\n estimatedDurationMinutes: config.ui.estimatedDurationMinutes,\n reportFile: 'posthog-setup-report.md',\n docsUrl: config.metadata.docsUrl,\n errorMessage: 'Integration failed',\n additionalFeatureQueue: session.additionalFeatureQueue,\n\n customPrompt: (ctx) => {\n const additionalLines = config.prompts.getAdditionalContextLines\n ? config.prompts.getAdditionalContextLines(frameworkContext)\n : [];\n const additionalContext =\n additionalLines.length > 0\n ? '\\n' + additionalLines.map((line) => `- ${line}`).join('\\n')\n : '';\n\n return `You have access to the PostHog MCP server which provides skills to integrate PostHog into this ${\n config.metadata.name\n } project.\n\nProject context:\n- PostHog Project ID: ${ctx.projectId}\n- Framework: ${config.metadata.name} ${frameworkVersion || 'latest'}\n- TypeScript: ${typeScriptDetected ? 'Yes' : 'No'}\n- PostHog public token: ${ctx.projectApiKey}\n- PostHog Host: ${ctx.host}\n- Project type: ${config.prompts.projectTypeDetection}\n- Package installation: ${\n config.prompts.packageInstallation ?? DEFAULT_PACKAGE_INSTALLATION\n }${additionalContext}\n\nInstructions (follow these steps IN ORDER - do not skip or reorder):\n\nSTEP 1: Call load_skill_menu (from the wizard-tools MCP server) to see available skills.\n If the tool fails, emit: ${\n AgentSignals.ERROR_MCP_MISSING\n } Could not load skill menu and halt.\n\n Choose a skill from the \\`integration\\` category that matches this project's framework. Do NOT pick skills from other categories (llm-analytics, error-tracking, feature-flags, omnibus, etc.) — those are handled separately.\n If no suitable integration skill is found, emit: ${\n AgentSignals.ERROR_RESOURCE_MISSING\n } Could not find a suitable skill for this project.\n\nSTEP 2: Call install_skill (from the wizard-tools MCP server) with the chosen skill ID (e.g., \"integration-nextjs-app-router\").\n Do NOT run any shell commands to install skills.\n\nSTEP 3: Load the installed skill's SKILL.md file to understand what references are available.\n\nSTEP 4: Follow the skill's workflow files in sequence. Look for numbered workflow files in the references (e.g., files with patterns like \"1.0-\", \"1.1-\", \"1.2-\"). Start with the first one and proceed through each step until completion. Each workflow file will tell you what to do and which file comes next. Never directly write PostHog tokens directly to code files; always use environment variables.\n\nSTEP 5: Set up environment variables for PostHog using the wizard-tools MCP server (this runs locally — secret values never leave the machine):\n - Use check_env_keys to see which keys already exist in the project's .env file (e.g. .env.local or .env).\n - Use set_env_values to create or update the PostHog public token and host, using the appropriate environment variable naming convention for ${\n config.metadata.name\n }, which you'll find in example code. The tool will also ensure .gitignore coverage. Don't assume the presence of keys means the value is up to date. Write the correct value each time.\n - Reference these environment variables in the code files you create instead of hardcoding the public token and host.\n\nImportant: Use the detect_package_manager tool (from the wizard-tools MCP server) to determine which package manager the project uses. Do not manually search for lockfiles or config files. Always install packages as a background task. Don't await completion; proceed with other work immediately after starting the installation. You must read a file immediately before attempting to write it, even if you have previously read it; failure to do so will cause a tool failure.\n\n\n`;\n },\n\n postRun: async (sess, credentials) => {\n const envVars = config.environment.getEnvVars(\n credentials.projectApiKey,\n credentials.host,\n );\n if (config.environment.uploadToHosting) {\n const { uploadEnvironmentVariablesStep } = await import(\n '../../../steps/index.js'\n );\n const uploadedEnvVars = await uploadEnvironmentVariablesStep(\n envVars,\n {\n integration: config.metadata.integration,\n session: sess,\n },\n );\n if (uploadedEnvVars.length > 0) {\n analytics.capture(WIZARD_INTERACTION_EVENT_NAME, {\n action: 'wizard_env_vars_uploaded',\n integration: config.metadata.integration,\n variable_count: uploadedEnvVars.length,\n variable_keys: uploadedEnvVars,\n });\n }\n }\n },\n\n buildOutroData: (sess, credentials, cloudRegion) => {\n const envVars = config.environment.getEnvVars(\n credentials.projectApiKey,\n credentials.host,\n );\n const continueUrl =\n sess.signup && cloudRegion\n ? `${getCloudUrlFromRegion(cloudRegion)}/products?source=wizard`\n : undefined;\n\n const changes = [\n ...config.ui.getOutroChanges(frameworkContext),\n Object.keys(envVars).length > 0\n ? 'Added environment variables to .env file'\n : '',\n ].filter(Boolean);\n\n return {\n kind: OutroKind.Success as const,\n message: 'Successfully installed PostHog!',\n reportFile: 'posthog-setup-report.md',\n changes,\n docsUrl: config.metadata.docsUrl,\n continueUrl,\n };\n },\n };\n },\n};\n\nexport { POSTHOG_INTEGRATION_WORKFLOW } from './steps.js';\n"],"mappings":";;;;;;;;AAoBA,eAAsB,yBACpB,KACe;CACf,MAAM,UAAU,IAAI;CACpB,MAAM,aAAa,QAAQ;CAE3B,MAAM,sBAAsB,MAAM,gBAAgB,WAAW;AAE7D,KAAI,qBAAqB;EACvB,MAAM,SAAS,mBAAmB;EAElC,MAAM,iBAAiB;GACrB;GACA,OAAO,QAAQ;GACf,cAAc,QAAQ;GACtB,SAAS;GACT,QAAQ,QAAQ;GAChB,UAAU,QAAQ;GAClB,IAAI,QAAQ;GACZ,MAAM,QAAQ;GACd,WAAW,QAAQ;GACnB,YAAY,QAAQ;GACrB;EAGD,MAAM,UAAU,MAAM,uBAAuB,QAAQ,eAAe;AACpE,OAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,QAAQ,CAChD,KAAI,EAAE,OAAO,QAAQ,kBACnB,KAAI,oBAAoB,KAAK,MAAM;AAIvC,MAAI,mBAAmB,qBAAqB,OAAO;AAEnD,MAAI,CAAC,QAAQ,uBACX,KAAI,qBAAqB,OAAO,SAAS,KAAK;EAIhD,MAAM,gBAAgB,MAAM,sBAAsB,QAAQ,eAAe;AACzE,MAAI,cAAc,cAAc,KAC9B,KAAI,sBAAsB,cAAc,UAAU;;AAKtD,MAAK,MAAM,WAAW,iBAAiB,WAAW,CAChD,KAAI,qBAAqB,QAAQ;AAGnC,KAAI,sBAAsB;;;;ACrD5B,SAAS,WAAW,SAAiC;CACnD,MAAM,SAAS,QAAQ;AACvB,KAAI,CAAC,QAAQ,SAAS,OAAO,UAAW,QAAO;AAE/C,QAAO,OAAO,SAAS,MAAM,UAAU,MACpC,MAAuB,EAAE,E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AAG,oBAAoB,SAAS;gBACpD,qBAAqB,QAAQ,KAAK;0BACxB,IAAI,cAAc;kBAC1B,IAAI,KAAK;kBACT,OAAO,QAAQ,qBAAqB;0BAE5C,OAAO,QAAQ,uBAAA,2JACd,kBAAkB;;;;;8BAMxB,aAAa,kBACd;;;sDAIC,aAAa,uBACd;;;;;;;;;;;kJAYC,OAAO,SAAS,KACjB;;;;;;;;GASE,SAAS,OAAO,MAAM,gBAAgB;IACpC,MAAM,UAAU,OAAO,YAAY,WACjC,YAAY,eACZ,YAAY,KACb;AACD,QAAI,OAAO,YAAY,iBAAiB;KACtC,MAAM,EAAE,mCAAmC,MAAM,OAC/C;KAEF,MAAM,kBAAkB,MAAM,+BAC5B,SACA;MACE,aAAa,OAAO,SAAS;MAC7B,SAAS;MACV,CACF;AACD,SAAI,gBAAgB,SAAS,EAC3B,WAAU,QAAQ,+BAA+B;MAC/C,QAAQ;MACR,aAAa,OAAO,SAAS;MAC7B,gBAAgB,gBAAgB;MAChC,eAAe;MAChB,CAAC;;;GAKR,iBAAiB,MAAM,aAAa,gBAAgB;IAClD,MAAM,UAAU,OAAO,YAAY,WACjC,YAAY,eACZ,YAAY,KACb;IACD,MAAM,cACJ,KAAK,UAAU,cACX,GAAG,sBAAsB,YAAY,CAAC,2BACtC,KAAA;AASN,WAAO;KACL,MAAA;KACA,SAAS;KACT,YAAY;KACZ,SAXc,CACd,GAAG,OAAO,GAAG,gBAAgB,iBAAiB,EAC9C,OAAO,KAAK,QAAQ,CAAC,SAAS,IAC1B,6CACA,GACL,CAAC,OAAO,QAAQ;KAOf,SAAS,OAAO,SAAS;KACzB;KACD;;GAEJ;;CAEJ"}
@@ -1,9 +1,9 @@
1
1
  import { n as __require } from "./rolldown-runtime-B_-DWIq7.js";
2
2
  import { a as getLogFilePath, c as getUI, o as initLogFile, r as debug, s as logToFile } from "./debug-CyJ_3dTP.js";
3
- import { C as WIZARD_VARIANT_FLAG_KEY, S as WIZARD_VARIANTS, b as WIZARD_REMARK_EVENT_NAME, h as POSTHOG_PROPERTY_HEADER_PREFIX, n as analytics, p as POSTHOG_FLAG_HEADER_PREFIX, v as REMOTE_SKILLS_BASE_URL, x as WIZARD_USER_AGENT } from "./analytics-CpRZ9V5j.js";
4
- import { o as getLlmGatewayUrlFromHost } from "./setup-utils-DJuYiRId.js";
3
+ import { C as WIZARD_VARIANT_FLAG_KEY, S as WIZARD_VARIANTS, b as WIZARD_REMARK_EVENT_NAME, h as POSTHOG_PROPERTY_HEADER_PREFIX, n as analytics, p as POSTHOG_FLAG_HEADER_PREFIX, v as REMOTE_SKILLS_BASE_URL, x as WIZARD_USER_AGENT } from "./analytics-xANpxdVL.js";
4
+ import { o as getLlmGatewayUrlFromHost } from "./setup-utils-C1h1QDiG.js";
5
5
  import { n as ADDITIONAL_FEATURE_PROMPTS } from "./wizard-session-Db6R023m.js";
6
- import { n as registerCleanup, r as wizardAbort, t as WizardError } from "./wizard-abort-DhECsFZO.js";
6
+ import { n as registerCleanup, r as wizardAbort, t as WizardError } from "./wizard-abort-XhapT0Ly.js";
7
7
  import * as fs$1 from "fs";
8
8
  import fs from "fs";
9
9
  import path from "path";
@@ -2153,4 +2153,4 @@ function allUnknown(error) {
2153
2153
  //#endregion
2154
2154
  export { backupAndFixClaudeSettings as a, initializeAgent as c, formatScanReport as d, writeScanReport as f, installSkillById as h, AgentSignals as i, restoreClaudeSettings as l, fetchSkillMenu as m, evaluateWizardReadiness as n, buildWizardMetadata as o, downloadSkill as p, getBlockingServiceKeys as r, checkAllSettingsConflicts as s, SERVICE_LABELS as t, runAgent as u };
2155
2155
 
2156
- //# sourceMappingURL=readiness-V6pfR5tp.js.map
2156
+ //# sourceMappingURL=readiness-BAgN8xAg.js.map