@posthog/wizard 2.70.1 → 2.72.0

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 (111) hide show
  1. package/dist/{add-mcp-server-to-clients-BCnjUqnW.js → add-mcp-server-to-clients-QZyr6NuZ.js} +4 -4
  2. package/dist/{add-mcp-server-to-clients-BCnjUqnW.js.map → add-mcp-server-to-clients-QZyr6NuZ.js.map} +1 -1
  3. package/dist/{agent-interface-Lu7tnLr0.js → agent-interface-Yjknz6Al.js} +476 -383
  4. package/dist/agent-interface-Yjknz6Al.js.map +1 -0
  5. package/dist/{agent-prompt-loader-y5GxgEkc.js → agent-prompt-loader-CDXm4C35.js} +5 -5
  6. package/dist/{agent-prompt-loader-y5GxgEkc.js.map → agent-prompt-loader-CDXm4C35.js.map} +1 -1
  7. package/dist/{agent-runner-vKtpgqVI.js → agent-runner-CL7rCY0G.js} +3213 -20
  8. package/dist/agent-runner-CL7rCY0G.js.map +1 -0
  9. package/dist/analytics-CkNv3N4o.js +2 -0
  10. package/dist/{analytics-DTyJClPr.js → analytics-DjCPD6u-.js} +3 -3
  11. package/dist/{analytics-DTyJClPr.js.map → analytics-DjCPD6u-.js.map} +1 -1
  12. package/dist/{api-j-OfJ8Dz.js → api-xwQeBMcX.js} +23 -4
  13. package/dist/{api-j-OfJ8Dz.js.map → api-xwQeBMcX.js.map} +1 -1
  14. package/dist/bin.js +85 -75
  15. package/dist/bin.js.map +1 -1
  16. package/dist/{bounded-fs-BWX25ixc.js → bounded-fs-BtxN0nYO.js} +3 -3
  17. package/dist/{bounded-fs-BWX25ixc.js.map → bounded-fs-BtxN0nYO.js.map} +1 -1
  18. package/dist/{ci-install-zNWgp1TL.js → ci-install-BVzTnIBw.js} +5 -5
  19. package/dist/{ci-install-zNWgp1TL.js.map → ci-install-BVzTnIBw.js.map} +1 -1
  20. package/dist/{debug-xr2Pq5VA.js → debug-BoadIH6Q.js} +1 -1
  21. package/dist/{debug-BM0fZaGl.js → debug-D0T44879.js} +4 -3
  22. package/dist/debug-D0T44879.js.map +1 -0
  23. package/dist/{env-api-key-DlxCZWU0.js → env-api-key-Bj9butHX.js} +2 -2
  24. package/dist/{env-api-key-DlxCZWU0.js.map → env-api-key-Bj9butHX.js.map} +1 -1
  25. package/dist/{environment-o-bTOuzK.js → environment-vpmKreMf.js} +4 -4
  26. package/dist/{environment-o-bTOuzK.js.map → environment-vpmKreMf.js.map} +1 -1
  27. package/dist/{errors-BSdz2lsl.js → errors-u8z27V-x.js} +4 -2
  28. package/dist/errors-u8z27V-x.js.map +1 -0
  29. package/dist/{file-watcher-D7G4f5sP.js → file-watcher-BPH4wR8R.js} +2 -2
  30. package/dist/{file-watcher-D7G4f5sP.js.map → file-watcher-BPH4wR8R.js.map} +1 -1
  31. package/dist/{headless-ui-C46DctKG.js → headless-ui-vA7lv8m2.js} +2 -2
  32. package/dist/{headless-ui-C46DctKG.js.map → headless-ui-vA7lv8m2.js.map} +1 -1
  33. package/dist/{interactive-B5zy3Gxk.js → interactive-jk3IGgns.js} +2 -2
  34. package/dist/{interactive-B5zy3Gxk.js.map → interactive-jk3IGgns.js.map} +1 -1
  35. package/dist/{mcp-lJRwE-YW.js → mcp-DE2AonGF.js} +2 -2
  36. package/dist/{mcp-lJRwE-YW.js.map → mcp-DE2AonGF.js.map} +1 -1
  37. package/dist/{mcp-prompt-streaming-Dsos09hT.js → mcp-prompt-streaming-pPEIwc78.js} +5 -4
  38. package/dist/mcp-prompt-streaming-pPEIwc78.js.map +1 -0
  39. package/dist/{non-interactive-qcCCtiYQ.js → non-interactive-CEGz0nDY.js} +3 -3
  40. package/dist/{non-interactive-qcCCtiYQ.js.map → non-interactive-CEGz0nDY.js.map} +1 -1
  41. package/dist/{orchestrator-tools-ezFTbAIp.js → orchestrator-tools-BZ4Nzw6a.js} +21 -13
  42. package/dist/orchestrator-tools-BZ4Nzw6a.js.map +1 -0
  43. package/dist/{package-manager-CGfN9UhH.js → package-manager-BZjKEDO2.js} +2 -2
  44. package/dist/{package-manager-CGfN9UhH.js.map → package-manager-BZjKEDO2.js.map} +1 -1
  45. package/dist/{pi-DzQLHIcQ.js → pi-D48qAwlf.js} +18 -15
  46. package/dist/pi-D48qAwlf.js.map +1 -0
  47. package/dist/{playground-DLN31BPV.js → playground-DYGJwugo.js} +43 -8
  48. package/dist/playground-DYGJwugo.js.map +1 -0
  49. package/dist/{posthog-Dxr8XK4x.js → posthog-BTvVhvBY.js} +2 -2
  50. package/dist/{posthog-Dxr8XK4x.js.map → posthog-BTvVhvBY.js.map} +1 -1
  51. package/dist/posthog-integration-BQh-YQAP.js +1475 -0
  52. package/dist/posthog-integration-BQh-YQAP.js.map +1 -0
  53. package/dist/{provisioning-Di5GNV9k.js → provisioning-Dw3B2T_b.js} +14 -5
  54. package/dist/provisioning-Dw3B2T_b.js.map +1 -0
  55. package/dist/{queue-tools-KosDptd6.js → queue-tools-DEbzMDrF.js} +108 -44
  56. package/dist/queue-tools-DEbzMDrF.js.map +1 -0
  57. package/dist/{registry-BBdaIFWq.js → registry-Dv6JVm5r.js} +5 -5
  58. package/dist/{registry-BBdaIFWq.js.map → registry-Dv6JVm5r.js.map} +1 -1
  59. package/dist/{security-BwOvjMaq.js → security-BaggjIE4.js} +5 -5
  60. package/dist/{security-BwOvjMaq.js.map → security-BaggjIE4.js.map} +1 -1
  61. package/dist/{setup-utils-Bo3WZt3a.js → setup-utils-CnW0Zsu8.js} +42 -11
  62. package/dist/setup-utils-CnW0Zsu8.js.map +1 -0
  63. package/dist/{start-tui-B1LrB7k1.js → start-tui-SpyGz7wM.js} +279 -24
  64. package/dist/start-tui-SpyGz7wM.js.map +1 -0
  65. package/dist/{steps-BMrQJpQh.js → steps-ClfUajTv.js} +7 -7
  66. package/dist/{steps-BMrQJpQh.js.map → steps-ClfUajTv.js.map} +1 -1
  67. package/dist/{store-DhNTBWQR.js → store-Cmy0pN1R.js} +24 -6
  68. package/dist/store-Cmy0pN1R.js.map +1 -0
  69. package/dist/{subagent-q6M-mBHo.js → subagent-tYlbbkJt.js} +2 -2
  70. package/dist/{subagent-q6M-mBHo.js.map → subagent-tYlbbkJt.js.map} +1 -1
  71. package/dist/{task-CgAOxod7.js → task-B8QfEVcu.js} +13 -13
  72. package/dist/{task-CgAOxod7.js.map → task-B8QfEVcu.js.map} +1 -1
  73. package/dist/{task-stream-rxR1IsdJ.js → task-stream-BRSWhbXQ.js} +6 -6
  74. package/dist/{task-stream-rxR1IsdJ.js.map → task-stream-BRSWhbXQ.js.map} +1 -1
  75. package/dist/{tasks-lzvWF__k.js → tasks-DjEvyWQJ.js} +2 -2
  76. package/dist/{tasks-lzvWF__k.js.map → tasks-DjEvyWQJ.js.map} +1 -1
  77. package/dist/{telemetry-CickTk_7.js → telemetry-EPB2n_f6.js} +3 -3
  78. package/dist/{telemetry-CickTk_7.js.map → telemetry-EPB2n_f6.js.map} +1 -1
  79. package/dist/{terminal-BjUFxn_x.js → terminal-DJ4Gaupr.js} +107 -61
  80. package/dist/terminal-DJ4Gaupr.js.map +1 -0
  81. package/dist/{tools-MKXGXFSk.js → tools-CB0Vfc6r.js} +6 -6
  82. package/dist/{tools-MKXGXFSk.js.map → tools-CB0Vfc6r.js.map} +1 -1
  83. package/dist/{wizard-abort-CW_C2EXr.js → wizard-abort-DD-kkQaq.js} +1 -1
  84. package/dist/{wizard-abort-CooWEh9N.js → wizard-abort-Db_YNkB2.js} +5 -5
  85. package/dist/{wizard-abort-CooWEh9N.js.map → wizard-abort-Db_YNkB2.js.map} +1 -1
  86. package/dist/{wizard-session-gbYCXdBf.js → wizard-session-BWAQoi9q.js} +1 -1
  87. package/dist/{wizard-session-Bki7dQhv.js → wizard-session-GdDN_aMS.js} +4 -1
  88. package/dist/wizard-session-GdDN_aMS.js.map +1 -0
  89. package/dist/{yara-hooks-BpngckdZ.js → yara-hooks-BvyFD2Nb.js} +4 -4
  90. package/dist/{yara-hooks-BpngckdZ.js.map → yara-hooks-BvyFD2Nb.js.map} +1 -1
  91. package/dist/yara-hooks-CuW_b30M.js +2 -0
  92. package/package.json +2 -1
  93. package/dist/agent-interface-Lu7tnLr0.js.map +0 -1
  94. package/dist/agent-runner-vKtpgqVI.js.map +0 -1
  95. package/dist/analytics-D-bMEYjD.js +0 -2
  96. package/dist/debug-BM0fZaGl.js.map +0 -1
  97. package/dist/errors-BSdz2lsl.js.map +0 -1
  98. package/dist/mcp-prompt-streaming-Dsos09hT.js.map +0 -1
  99. package/dist/orchestrator-tools-ezFTbAIp.js.map +0 -1
  100. package/dist/pi-DzQLHIcQ.js.map +0 -1
  101. package/dist/playground-DLN31BPV.js.map +0 -1
  102. package/dist/posthog-integration-MDfRO911.js +0 -4618
  103. package/dist/posthog-integration-MDfRO911.js.map +0 -1
  104. package/dist/provisioning-Di5GNV9k.js.map +0 -1
  105. package/dist/queue-tools-KosDptd6.js.map +0 -1
  106. package/dist/setup-utils-Bo3WZt3a.js.map +0 -1
  107. package/dist/start-tui-B1LrB7k1.js.map +0 -1
  108. package/dist/store-DhNTBWQR.js.map +0 -1
  109. package/dist/terminal-BjUFxn_x.js.map +0 -1
  110. package/dist/wizard-session-Bki7dQhv.js.map +0 -1
  111. package/dist/yara-hooks-C-qG6EJt.js +0 -2
package/dist/bin.js CHANGED
@@ -1,23 +1,24 @@
1
1
  #!/usr/bin/env node
2
- import { a as AgentSignals, c as emitWizardError, l as ErrorCodes, r as detectErrorCode } from "./errors-BSdz2lsl.js";
3
- import { Ct as isHeadless, L as Integration, St as headlessOption, U as POSTHOG_DOCS_URL, a as getLogFilePath, f as getUI, gt as VERSION, m as LoggingUI, mt as getSkillsBaseUrl, p as setUI, pt as WIZARD_USER_AGENT, r as debug, s as logToFile, wt as regionOption } from "./debug-BM0fZaGl.js";
2
+ import { a as AgentSignals, c as emitWizardError, l as ErrorCodes, r as detectErrorCode } from "./errors-u8z27V-x.js";
3
+ import { Ct as isHeadless, L as Integration, St as headlessOption, U as POSTHOG_DOCS_URL, a as getLogFilePath, f as getUI, gt as VERSION, m as LoggingUI, mt as getSkillsBaseUrl, p as setUI, pt as WIZARD_USER_AGENT, r as debug, s as logToFile, wt as regionOption } from "./debug-D0T44879.js";
4
4
  import { a as getLocalDev, i as checkLocalServices, o as initLocalDev, r as POSTHOG_LOCAL_URL, s as localMcpSkillsNotice } from "./local-dev-DPZiIPCK.js";
5
- import "./wizard-session-Bki7dQhv.js";
6
- import { n as analytics } from "./analytics-DTyJClPr.js";
7
- import { r as setEntryCommand } from "./telemetry-CickTk_7.js";
8
- import { a as safeReadFile, o as walkProjectFiles } from "./bounded-fs-BWX25ixc.js";
9
- import { n as isUsingTypeScript } from "./setup-utils-Bo3WZt3a.js";
10
- import { o as handleApiError } from "./api-j-OfJ8Dz.js";
11
- import { i as wizardAbort, r as runCleanups } from "./wizard-abort-CooWEh9N.js";
12
- import { n as isNonInteractiveEnvironment } from "./environment-o-bTOuzK.js";
13
- import { n as runAgent, s as authenticate } from "./agent-runner-vKtpgqVI.js";
14
- import { T as WIZARD_TOOL_NAMES, k as fetchSkillMenu, l as recoverOrphanedSettingsBackups } from "./agent-interface-Lu7tnLr0.js";
15
- import { m as writeJsonAtomic } from "./queue-tools-KosDptd6.js";
16
- import { S as SETUP_REPORT_FILE, _ as AUDIT_CHECKS_KEY, g as AUDIT_CHECKS_FILE, v as AUDIT_REPORT_FILE } from "./yara-hooks-BpngckdZ.js";
17
- import { i as SPINNER_MESSAGE, t as FRAMEWORK_REGISTRY } from "./registry-BBdaIFWq.js";
18
- import { C as detectIntegrationProjects, D as gatherFrameworkContext, E as resolveProjectDir, O as detectFramework, S as detectWarehouseSources, a as LINE_CHART_BLOCK, b as detectWarehousePrerequisites, d as isClearBlock, g as detectPostHogIntegration, h as Icons, i as FUNNEL_BLOCK, m as Colors, n as integrationRunStep, o as PRODUCT_SUITE_BLOCK, r as posthogIntegrationConfig, s as StatusPeekTrigger, u as wordWrap, v as HEALTH_CHECK_STEP, w as scopeInstallDirToProject, x as getDetectedWarehouseSources, y as WAREHOUSE_ABORT_CASES } from "./posthog-integration-MDfRO911.js";
19
- import { n as readApiKeyFromEnv } from "./env-api-key-DlxCZWU0.js";
5
+ import "./wizard-session-GdDN_aMS.js";
6
+ import { n as analytics } from "./analytics-DjCPD6u-.js";
7
+ import { r as setEntryCommand } from "./telemetry-EPB2n_f6.js";
8
+ import { a as safeReadFile, o as walkProjectFiles } from "./bounded-fs-BtxN0nYO.js";
9
+ import { n as isUsingTypeScript } from "./setup-utils-CnW0Zsu8.js";
10
+ import { s as handleApiError } from "./api-xwQeBMcX.js";
11
+ import { i as wizardAbort, r as runCleanups } from "./wizard-abort-Db_YNkB2.js";
12
+ import { n as isNonInteractiveEnvironment } from "./environment-vpmKreMf.js";
13
+ import { N as fetchSkillMenu, k as WIZARD_TOOL_NAMES, u as recoverOrphanedSettingsBackups } from "./agent-interface-Yjknz6Al.js";
14
+ import { _ as detectFramework, c as maybeStampAiSdkDetected, d as detectWarehousePrerequisites, f as getDetectedWarehouseSources, g as gatherFrameworkContext, h as resolveProjectDir, n as runAgent, p as detectWarehouseSources, s as detectPostHogIntegration, u as WAREHOUSE_ABORT_CASES, v as authenticate } from "./agent-runner-CL7rCY0G.js";
15
+ import { i as SPINNER_MESSAGE, t as FRAMEWORK_REGISTRY } from "./registry-Dv6JVm5r.js";
16
+ import { S as SETUP_REPORT_FILE, _ as AUDIT_CHECKS_KEY, g as AUDIT_CHECKS_FILE, v as AUDIT_REPORT_FILE } from "./yara-hooks-BvyFD2Nb.js";
17
+ import { S as writeJsonAtomic } from "./queue-tools-DEbzMDrF.js";
18
+ import { _ as detectIntegrationProjects, a as LINE_CHART_BLOCK, d as isClearBlock, g as HEALTH_CHECK_STEP, h as Icons, i as FUNNEL_BLOCK, m as Colors, n as integrationRunStep, o as PRODUCT_SUITE_BLOCK, r as posthogIntegrationConfig, s as StatusPeekTrigger, u as wordWrap, v as scopeInstallDirToProject } from "./posthog-integration-BQh-YQAP.js";
19
+ import { n as readApiKeyFromEnv } from "./env-api-key-Bj9butHX.js";
20
20
  import { satisfies } from "semver";
21
+ import { Agent, setGlobalDispatcher } from "undici";
21
22
  import yargs from "yargs";
22
23
  import { hideBin } from "yargs/helpers";
23
24
  import { existsSync, readFileSync, readdirSync, statSync } from "fs";
@@ -242,7 +243,7 @@ function runProvision(argv) {
242
243
  }
243
244
  async function provision({ email, region, name, baseUrl, jsonMode }) {
244
245
  try {
245
- const { provisionNewAccount } = await import("./provisioning-Di5GNV9k.js").then((n) => n.r);
246
+ const { provisionNewAccount } = await import("./provisioning-Dw3B2T_b.js").then((n) => n.r);
246
247
  if (!jsonMode) getUI().log.info(`Provisioning account for ${email} in ${region}...`);
247
248
  emitResult(await provisionNewAccount(email, name, region, { baseUrl }), jsonMode);
248
249
  process.exit(0);
@@ -309,22 +310,22 @@ const basicIntegrationCommand = {
309
310
  setEntryCommand("integrate");
310
311
  (async () => {
311
312
  if (isHeadless(argv)) {
312
- const { runHeadlessInstall } = await import("./ci-install-zNWgp1TL.js");
313
+ const { runHeadlessInstall } = await import("./ci-install-BVzTnIBw.js");
313
314
  return runHeadlessInstall(argv);
314
315
  }
315
316
  if (argv.ci) {
316
- const { runCIInstall } = await import("./ci-install-zNWgp1TL.js");
317
+ const { runCIInstall } = await import("./ci-install-BVzTnIBw.js");
317
318
  return runCIInstall(argv);
318
319
  }
319
320
  if (isNonInteractiveEnvironment()) {
320
- const { failNonInteractive } = await import("./non-interactive-qcCCtiYQ.js");
321
+ const { failNonInteractive } = await import("./non-interactive-CEGz0nDY.js");
321
322
  return failNonInteractive();
322
323
  }
323
324
  if (argv.playground) {
324
- const { runPlayground } = await import("./playground-DLN31BPV.js");
325
+ const { runPlayground } = await import("./playground-DYGJwugo.js");
325
326
  return runPlayground();
326
327
  }
327
- const { runInteractive } = await import("./interactive-B5zy3Gxk.js");
328
+ const { runInteractive } = await import("./interactive-jk3IGgns.js");
328
329
  runInteractive(argv);
329
330
  })();
330
331
  }
@@ -2865,6 +2866,10 @@ function detectPostHogPresent(installDir) {
2865
2866
  * reason strings are part of the skill contract — the context-mill
2866
2867
  * `self-driving-setup` skill emits these exact strings.
2867
2868
  */
2869
+ /** Headline shown when the run ends because GitHub was not connected. */
2870
+ const GITHUB_REQUIRED_MESSAGE = "GitHub connection required";
2871
+ /** Body for {@link GITHUB_REQUIRED_MESSAGE}. Shared by the pre-run gate and the abort case. */
2872
+ const GITHUB_REQUIRED_BODY = "Self-driving needs GitHub access to research issues in your code and open fixes, so setup cannot finish without it. Nothing was changed. When you are ready to install the PostHog GitHub App, run the wizard again.";
2868
2873
  const SELF_DRIVING_ABORT_CASES = [
2869
2874
  {
2870
2875
  match: /^self-driving is not available for this project$/i,
@@ -2873,8 +2878,8 @@ const SELF_DRIVING_ABORT_CASES = [
2873
2878
  },
2874
2879
  {
2875
2880
  match: /^github connection declined$/i,
2876
- message: "GitHub connection required",
2877
- body: "Self-driving needs GitHub access to research issues in your code and open fixes, so setup cannot finish without it. Nothing was left half-configured. When you are ready to install the PostHog GitHub App, run the wizard again."
2881
+ message: GITHUB_REQUIRED_MESSAGE,
2882
+ body: GITHUB_REQUIRED_BODY
2878
2883
  },
2879
2884
  {
2880
2885
  match: /^requires-interactive-mode$/i,
@@ -3075,10 +3080,18 @@ const SELF_DRIVING_PROGRAM = [
3075
3080
  show: (session) => session.integrate === true,
3076
3081
  isComplete: (session) => session.selfDrivingHandoffConfirmed
3077
3082
  },
3083
+ {
3084
+ id: "self-driving-github",
3085
+ label: "GitHub",
3086
+ screenId: "self-driving-github",
3087
+ isComplete: (session) => session.githubConnected === true || session.githubDeclined,
3088
+ gate: (session) => session.githubConnected === true || session.githubDeclined
3089
+ },
3078
3090
  {
3079
3091
  id: "run",
3080
3092
  label: "Self-driving",
3081
3093
  screenId: "run",
3094
+ show: (session) => !session.githubDeclined,
3082
3095
  isComplete: (session) => session.runPhase === "completed" || session.runPhase === "error"
3083
3096
  },
3084
3097
  {
@@ -3131,7 +3144,7 @@ function buildSelfDrivingPrompt(ctx, detectedSources = []) {
3131
3144
  const inboxUrl = `${projectBase}/inbox`;
3132
3145
  const optIn = (value) => value === true ? "ON" : value === false ? "OFF" : "unknown";
3133
3146
  const optIns = ctx.teamProductOptIns;
3134
- return `You are setting up PostHog Self-driving for this project: you will enable the right signal sources, make sure GitHub is connected, tune the scout troop, design custom scouts for what this product uniquely needs, put Replay Vision scanners on its key flows, and hand the user a configured inbox.
3147
+ return `You are setting up PostHog Self-driving for this project: you will enable the right signal sources, tune the scout troop, design custom scouts for what this product uniquely needs, put Replay Vision scanners on its key flows, and hand the user a configured inbox.
3135
3148
 
3136
3149
  Project URLs:
3137
3150
  - Integrations settings: ${integrationsSettingsUrl}
@@ -3160,8 +3173,7 @@ call so the user can follow your progress in the TUI. Use exactly these
3160
3173
  tasks, in this order:
3161
3174
  1. Check Self-driving access
3162
3175
  2. Read project and current Self-driving state
3163
- 3. Connect GitHub (required)
3164
- 3b. Enable products (replay, error tracking, support)
3176
+ 3. Enable products (replay, error tracking, support)
3165
3177
  4. Enable signal sources
3166
3178
  5. Offer issue-tracker integrations
3167
3179
  6. Configure the scout troop
@@ -3169,8 +3181,11 @@ tasks, in this order:
3169
3181
  6c. Set up Replay Vision scanners
3170
3182
  7. Write report and hand off
3171
3183
  Drive the list with TaskUpdate — mark a task in_progress when you start
3172
- it and completed when done. If a step turns out to be a no-op (e.g.
3173
- GitHub is already connected), still mark its task completed.
3184
+ it and completed when done. If a step turns out to be a no-op (e.g. a
3185
+ product is already enabled), still mark its task completed.
3186
+
3187
+ The PostHog GitHub App is already connected — the wizard verified it
3188
+ before this run started, so never ask the user to connect or install it.
3174
3189
 
3175
3190
  Wizard mechanics:
3176
3191
  - Ask the user things ONLY with the wizard_ask MCP tool, and batch
@@ -3206,20 +3221,12 @@ STEP 2 — Read project and current Signals state. (skill: "Read context")
3206
3221
  what neither covers. List the currently enabled signal sources so every
3207
3222
  later write is idempotent.
3208
3223
 
3209
- STEP 3 — Connect GitHub. REQUIRED. (skill: "Connect GitHub")
3210
- Signals cannot research or fix issues without code access. Check for
3211
- an existing GitHub integration first; if absent, send the user
3212
- through the GitHub App connection via wizard_ask exactly as the skill
3213
- describes (it builds the one-click authorize link), and verify the
3214
- connection after they confirm. If the user cannot connect now, emit
3215
- ${AgentSignals.ABORT} github connection declined
3216
- and halt — never finish setup without GitHub.
3217
-
3218
- STEP 3b — Enable products. (skill: "Enable products")
3224
+ STEP 3 — Enable products. (skill: "Enable products")
3219
3225
  Turn ON the PostHog products Signals reads from — Session Replay,
3220
- Error Tracking, and Support — so the sources you enable next have data
3221
- to read. These are server-side enables with conservative defaults
3222
- (owned by the server, not you). The project-state block above covers
3226
+ Error Tracking, and Support — so the sources you enable next, and the
3227
+ Replay Vision scanners in STEP 6c, have data to read. These are
3228
+ server-side enables with conservative defaults (owned by the server,
3229
+ not you). The project-state block above covers
3223
3230
  only Session Replay and Error Tracking, so you can skip those if they
3224
3231
  are already ON; it does not show Support, but every enable is idempotent
3225
3232
  so enabling any of them again is safe regardless. For a web app, also
@@ -3288,7 +3295,7 @@ STEP 6b — Design custom scouts for this product. (skill: "Custom scouts")
3288
3295
  STEP 6c — Set up Replay Vision scanners. (skill: "Replay Vision scanners")
3289
3296
  Create the scanner skeletons the skill defines, filling the per-product
3290
3297
  blanks it leaves you from this repo's code. Scanners need Session Replay
3291
- on (STEP 3b). Every failure here — no recordings yet, a backend-only
3298
+ on (STEP 3). Every failure here — no recordings yet, a backend-only
3292
3299
  project, the scanner API missing — is a follow-up, never an abort; mark
3293
3300
  the task completed regardless.
3294
3301
 
@@ -4330,7 +4337,7 @@ const mcpAddCommand = {
4330
4337
  function runMcpAdd(argv) {
4331
4338
  const features = parseFeatures(argv.features);
4332
4339
  (async () => {
4333
- const { readApiKeyFromEnv } = await import("./env-api-key-DlxCZWU0.js").then((n) => n.t);
4340
+ const { readApiKeyFromEnv } = await import("./env-api-key-Bj9butHX.js").then((n) => n.t);
4334
4341
  const apiKey = argv.apiKey || readApiKeyFromEnv();
4335
4342
  const debug = argv.debug;
4336
4343
  const localMcp = argv.local;
@@ -4344,8 +4351,8 @@ function runMcpAdd(argv) {
4344
4351
  return;
4345
4352
  }
4346
4353
  try {
4347
- const { startTUI } = await import("./start-tui-B1LrB7k1.js");
4348
- const { buildSession } = await import("./wizard-session-gbYCXdBf.js");
4354
+ const { startTUI } = await import("./start-tui-SpyGz7wM.js");
4355
+ const { buildSession } = await import("./wizard-session-BWAQoi9q.js");
4349
4356
  const tui = startTUI(VERSION, Program.McpAdd);
4350
4357
  tui.store.session = buildSession({
4351
4358
  debug,
@@ -4362,7 +4369,7 @@ function runMcpAdd(argv) {
4362
4369
  }
4363
4370
  async function runHeadlessAdd(args) {
4364
4371
  setUI(new LoggingUI());
4365
- const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-BCnjUqnW.js").then((n) => n.r);
4372
+ const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-QZyr6NuZ.js").then((n) => n.r);
4366
4373
  const { installed, failed } = await addMCPServerToClientsStep(args);
4367
4374
  if (failed.length > 0 || installed.length === 0) process.exitCode = 1;
4368
4375
  }
@@ -4394,8 +4401,8 @@ function runMcpRemove(argv) {
4394
4401
  return;
4395
4402
  }
4396
4403
  try {
4397
- const { startTUI } = await import("./start-tui-B1LrB7k1.js");
4398
- const { buildSession } = await import("./wizard-session-gbYCXdBf.js");
4404
+ const { startTUI } = await import("./start-tui-SpyGz7wM.js");
4405
+ const { buildSession } = await import("./wizard-session-BWAQoi9q.js");
4399
4406
  const tui = startTUI(VERSION, Program.McpRemove);
4400
4407
  tui.store.session = buildSession({
4401
4408
  debug,
@@ -4411,7 +4418,7 @@ function runMcpRemove(argv) {
4411
4418
  /** No exit code on an empty result: nothing to remove is the requested end state. */
4412
4419
  async function runHeadlessRemove(local) {
4413
4420
  setUI(new LoggingUI());
4414
- const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-BCnjUqnW.js").then((n) => n.r);
4421
+ const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-QZyr6NuZ.js").then((n) => n.r);
4415
4422
  await removeMCPServerFromClientsStep({ local });
4416
4423
  }
4417
4424
  //#endregion
@@ -4431,8 +4438,8 @@ function runMcpTutorial(argv) {
4431
4438
  const debug = argv.debug;
4432
4439
  const localMcp = argv.local;
4433
4440
  try {
4434
- const { startTUI } = await import("./start-tui-B1LrB7k1.js");
4435
- const { buildSession } = await import("./wizard-session-gbYCXdBf.js");
4441
+ const { startTUI } = await import("./start-tui-SpyGz7wM.js");
4442
+ const { buildSession } = await import("./wizard-session-BWAQoi9q.js");
4436
4443
  const tui = startTUI(VERSION, Program.McpTutorial);
4437
4444
  tui.store.session = buildSession({
4438
4445
  debug,
@@ -4497,8 +4504,10 @@ async function prepareRunSession(step, live) {
4497
4504
  * host program's own run screen runs `config.run`; any other screen waits for
4498
4505
  * the user to satisfy `isComplete`. */
4499
4506
  async function advanceStep(step, store, config) {
4500
- if (step.screenId === "auth") await authenticate(store.session, config.id);
4501
- else if (step.run) {
4507
+ if (step.screenId === "auth") {
4508
+ await authenticate(store.session, config.id);
4509
+ maybeStampAiSdkDetected(store.session);
4510
+ } else if (step.run) {
4502
4511
  await step.run(await prepareRunSession(step, store.session));
4503
4512
  store.completeRunStep(step.id);
4504
4513
  } else if (step.screenId === "run") await runAgent(config, await prepareRunSession(step, store.session));
@@ -4517,17 +4526,17 @@ function runWizard(config, options) {
4517
4526
  (async () => {
4518
4527
  try {
4519
4528
  const installDir = options.installDir || process.cwd();
4520
- const { startTUI } = await import("./start-tui-B1LrB7k1.js");
4521
- const { buildSession, RunPhase } = await import("./wizard-session-gbYCXdBf.js");
4522
- const { TaskStreamPush } = await import("./task-stream-rxR1IsdJ.js");
4523
- const { PostHogDestination } = await import("./posthog-Dxr8XK4x.js");
4529
+ const { startTUI } = await import("./start-tui-SpyGz7wM.js");
4530
+ const { buildSession, RunPhase } = await import("./wizard-session-BWAQoi9q.js");
4531
+ const { TaskStreamPush } = await import("./task-stream-BRSWhbXQ.js");
4532
+ const { PostHogDestination } = await import("./posthog-BTvVhvBY.js");
4524
4533
  const local = getLocalDev();
4525
4534
  const localServicesError = await checkLocalServices({
4526
4535
  ...local,
4527
4536
  localPosthog: local.localPosthog && !options.baseUrl
4528
4537
  });
4529
4538
  if (localServicesError) {
4530
- const { wizardAbort } = await import("./wizard-abort-CW_C2EXr.js");
4539
+ const { wizardAbort } = await import("./wizard-abort-DD-kkQaq.js");
4531
4540
  await wizardAbort({ message: localServicesError });
4532
4541
  return;
4533
4542
  }
@@ -4598,7 +4607,7 @@ function runWizard(config, options) {
4598
4607
  if (shown(step)) await advanceStep(step, activeTui.store, config);
4599
4608
  }
4600
4609
  else if (skipAgent) {
4601
- const { getOrAskForProjectData } = await import("./setup-utils-Bo3WZt3a.js").then((n) => n.r);
4610
+ const { getOrAskForProjectData } = await import("./setup-utils-CnW0Zsu8.js").then((n) => n.r);
4602
4611
  const { projectApiKey, host, accessToken, projectId } = await getOrAskForProjectData({
4603
4612
  signup: session.signup,
4604
4613
  ci: session.ci,
@@ -4711,11 +4720,11 @@ function runNonInteractive(config, options, mode) {
4711
4720
  analytics.setTag("build", mode);
4712
4721
  (async () => {
4713
4722
  const path = await import("path");
4714
- const { buildSession, RunPhase, OutroKind } = await import("./wizard-session-gbYCXdBf.js");
4715
- const { readEnvironment } = await import("./environment-o-bTOuzK.js").then((n) => n.t);
4716
- const { readApiKeyFromEnv } = await import("./env-api-key-DlxCZWU0.js").then((n) => n.t);
4717
- const { configureLogFileFromEnvironment, logToFile } = await import("./debug-xr2Pq5VA.js");
4718
- const { wizardAbort, WizardError } = await import("./wizard-abort-CW_C2EXr.js");
4723
+ const { buildSession, RunPhase, OutroKind } = await import("./wizard-session-BWAQoi9q.js");
4724
+ const { readEnvironment } = await import("./environment-vpmKreMf.js").then((n) => n.t);
4725
+ const { readApiKeyFromEnv } = await import("./env-api-key-Bj9butHX.js").then((n) => n.t);
4726
+ const { configureLogFileFromEnvironment, logToFile } = await import("./debug-BoadIH6Q.js");
4727
+ const { wizardAbort, WizardError } = await import("./wizard-abort-DD-kkQaq.js");
4719
4728
  configureLogFileFromEnvironment();
4720
4729
  const env = readEnvironment();
4721
4730
  const apiKey = options.apiKey ?? readApiKeyFromEnv() ?? void 0;
@@ -4762,9 +4771,9 @@ function runNonInteractive(config, options, mode) {
4762
4771
  let store = null;
4763
4772
  let taskStream = null;
4764
4773
  if (mode === "headless") {
4765
- const { WizardStore } = await import("./store-DhNTBWQR.js").then((n) => n.n);
4766
- const { HeadlessUI } = await import("./headless-ui-C46DctKG.js");
4767
- const { TaskStreamPush, PostHogDestination } = await import("./task-stream-rxR1IsdJ.js");
4774
+ const { WizardStore } = await import("./store-Cmy0pN1R.js").then((n) => n.n);
4775
+ const { HeadlessUI } = await import("./headless-ui-vA7lv8m2.js");
4776
+ const { TaskStreamPush, PostHogDestination } = await import("./task-stream-BRSWhbXQ.js");
4768
4777
  store = new WizardStore(config.id);
4769
4778
  store.session = session;
4770
4779
  setUI(new HeadlessUI(store));
@@ -4847,7 +4856,7 @@ function runNonInteractive(config, options, mode) {
4847
4856
  });
4848
4857
  }
4849
4858
  }
4850
- const { runAgent } = await import("./agent-runner-vKtpgqVI.js").then((n) => n.t);
4859
+ const { runAgent } = await import("./agent-runner-CL7rCY0G.js").then((n) => n.t);
4851
4860
  await runAgent(config, session);
4852
4861
  await settleStream(RunPhase.Completed);
4853
4862
  } catch (error) {
@@ -6094,7 +6103,7 @@ async function runDoctorCI(options) {
6094
6103
  getUI().intro("Welcome to the PostHog setup wizard");
6095
6104
  getUI().log.info("Running posthog-doctor in CI mode");
6096
6105
  try {
6097
- const { getOrAskForProjectData } = await import("./setup-utils-Bo3WZt3a.js").then((n) => n.r);
6106
+ const { getOrAskForProjectData } = await import("./setup-utils-CnW0Zsu8.js").then((n) => n.r);
6098
6107
  const { host, accessToken, projectId } = await getOrAskForProjectData({
6099
6108
  signup: false,
6100
6109
  ci: true,
@@ -6112,7 +6121,7 @@ async function runDoctorCI(options) {
6112
6121
  for (const issue of sorted) getUI().log.info(` • [${issue.severity}] ${getKindMeta(issue.kind).title}`);
6113
6122
  process.exit(1);
6114
6123
  } catch (error) {
6115
- const { ApiError } = await import("./api-j-OfJ8Dz.js").then((n) => n.n);
6124
+ const { ApiError } = await import("./api-xwQeBMcX.js").then((n) => n.n);
6116
6125
  const message = error instanceof ApiError && error.statusCode === 401 ? "Your PostHog API key is invalid or expired." : error instanceof Error ? error.message : String(error);
6117
6126
  getUI().log.error(`Doctor failed: ${message}`);
6118
6127
  emitWizardError({
@@ -6198,8 +6207,8 @@ function runSlackConnect(argv) {
6198
6207
  (async () => {
6199
6208
  const debug = argv.debug;
6200
6209
  try {
6201
- const { startTUI } = await import("./start-tui-B1LrB7k1.js");
6202
- const { buildSession } = await import("./wizard-session-gbYCXdBf.js");
6210
+ const { startTUI } = await import("./start-tui-SpyGz7wM.js");
6211
+ const { buildSession } = await import("./wizard-session-BWAQoi9q.js");
6203
6212
  const tui = startTUI(VERSION, Program.SlackConnect);
6204
6213
  tui.store.session = buildSession({
6205
6214
  debug,
@@ -6512,6 +6521,7 @@ const cliCommand = {
6512
6521
  //#endregion
6513
6522
  //#region bin.ts
6514
6523
  const NODE_VERSION_RANGE = ">=22.22.0";
6524
+ setGlobalDispatcher(new Agent({ allowH2: false }));
6515
6525
  if (!satisfies(process.version, NODE_VERSION_RANGE)) {
6516
6526
  console.log([
6517
6527
  `The PostHog wizard needs a newer version of Node.js to run.`,
@@ -6543,6 +6553,6 @@ function resolveInstallDir() {
6543
6553
  }
6544
6554
  Wizard.use(basicIntegrationCommand).use(mcpCommand).use(mcpAnalyticsCommand).use(replayVisionCommand).use(aiObservabilityCommand).use(metricsCommand).use(cliCommand).use(auditCommand).use(doctorCommand).use(migrateCommand).use(revenueCommand).use(warehouseCommand).use(selfDrivingCommand).use(slackCommand).use(uploadSourcemapsCommand).use(skillCommand).init();
6545
6555
  //#endregion
6546
- export { STRIPE_SDKS as A, MANUAL_SDK_VARIANTS as C, fetchHealthIssues as D, getKindMeta as E, getContentBlocks$3 as O, MANUAL_SDK_INSTALL as S, SOURCE_MAPS_CONTEXT_KEYS as T, detectSelfDrivingIntegrationProjects as _, useStdoutDimensions as a, DISPLAY_NAME as b, runWizardHeadless as c, PROGRAM_REGISTRY as d, Program as f, PRICING_SHORT as g, PRICING_LONG as h, useKeyboardHintsContext as i, POSTHOG_SDKS as k, runWizardCI as l, NO_DEFAULT_LIMIT as m, useKeyBindings as n, ConfirmButton as o, getProgramConfig as p, KeyboardHintsProvider as r, PromptLabel as s, PickerMenu as t, runWizard as u, SELF_DRIVING_INTEGRATE_PATH_KEY as v, RUST_SDK_CRATE as w, GO_SDK_MODULE as x, AUTOMATABLE_VARIANTS as y };
6556
+ export { getContentBlocks$3 as A, GO_SDK_MODULE as C, SOURCE_MAPS_CONTEXT_KEYS as D, RUST_SDK_CRATE as E, STRIPE_SDKS as M, getKindMeta as O, DISPLAY_NAME as S, MANUAL_SDK_VARIANTS as T, detectSelfDrivingIntegrationProjects as _, useStdoutDimensions as a, SELF_DRIVING_INTEGRATE_PATH_KEY as b, runWizardHeadless as c, PROGRAM_REGISTRY as d, Program as f, PRICING_SHORT as g, PRICING_LONG as h, useKeyboardHintsContext as i, POSTHOG_SDKS as j, fetchHealthIssues as k, runWizardCI as l, NO_DEFAULT_LIMIT as m, useKeyBindings as n, ConfirmButton as o, getProgramConfig as p, KeyboardHintsProvider as r, PromptLabel as s, PickerMenu as t, runWizard as u, GITHUB_REQUIRED_BODY as v, MANUAL_SDK_INSTALL as w, AUTOMATABLE_VARIANTS as x, GITHUB_REQUIRED_MESSAGE as y };
6547
6557
 
6548
6558
  //# sourceMappingURL=bin.js.map