@posthog/wizard 2.70.0 → 2.71.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 (108) hide show
  1. package/dist/{add-mcp-server-to-clients-D2z2adQL.js → add-mcp-server-to-clients-B6-ZL--P.js} +4 -4
  2. package/dist/{add-mcp-server-to-clients-D2z2adQL.js.map → add-mcp-server-to-clients-B6-ZL--P.js.map} +1 -1
  3. package/dist/{agent-interface-NZHof8u3.js → agent-interface-DFm4jB4d.js} +108 -15
  4. package/dist/agent-interface-DFm4jB4d.js.map +1 -0
  5. package/dist/{agent-prompt-loader-CQijHoX1.js → agent-prompt-loader-Bi3IzSBW.js} +5 -5
  6. package/dist/{agent-prompt-loader-CQijHoX1.js.map → agent-prompt-loader-Bi3IzSBW.js.map} +1 -1
  7. package/dist/{agent-runner-CK9z7-0z.js → agent-runner-Cp6iLqDk.js} +56 -18
  8. package/dist/agent-runner-Cp6iLqDk.js.map +1 -0
  9. package/dist/{analytics-DXPSL5IY.js → analytics-D54mLptm.js} +3 -3
  10. package/dist/{analytics-DXPSL5IY.js.map → analytics-D54mLptm.js.map} +1 -1
  11. package/dist/analytics-Ge1LsCNg.js +2 -0
  12. package/dist/{api-CeapT_rn.js → api-BNBVOguz.js} +23 -4
  13. package/dist/{api-CeapT_rn.js.map → api-BNBVOguz.js.map} +1 -1
  14. package/dist/bin.js +90 -79
  15. package/dist/bin.js.map +1 -1
  16. package/dist/{bounded-fs-DdHuSE1X.js → bounded-fs-DHIaH3Sc.js} +3 -3
  17. package/dist/{bounded-fs-DdHuSE1X.js.map → bounded-fs-DHIaH3Sc.js.map} +1 -1
  18. package/dist/{ci-install-c-n8dJng.js → ci-install-Can8LRdJ.js} +5 -5
  19. package/dist/{ci-install-c-n8dJng.js.map → ci-install-Can8LRdJ.js.map} +1 -1
  20. package/dist/{debug-D2KQFr3-.js → debug-C4RPcEIX.js} +1 -1
  21. package/dist/{debug-D5YT7Lil.js → debug-YQdeZulR.js} +4 -3
  22. package/dist/debug-YQdeZulR.js.map +1 -0
  23. package/dist/{env-api-key-ClK4nxHy.js → env-api-key-9yogO8OI.js} +2 -2
  24. package/dist/{env-api-key-ClK4nxHy.js.map → env-api-key-9yogO8OI.js.map} +1 -1
  25. package/dist/{environment-DbDconLv.js → environment-6ZuAWRpQ.js} +4 -4
  26. package/dist/{environment-DbDconLv.js.map → environment-6ZuAWRpQ.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-CQj0wp1a.js → file-watcher-CeWdvMVT.js} +2 -2
  30. package/dist/{file-watcher-CQj0wp1a.js.map → file-watcher-CeWdvMVT.js.map} +1 -1
  31. package/dist/{headless-ui-BKU7MJQf.js → headless-ui-BxSVgNoT.js} +2 -2
  32. package/dist/{headless-ui-BKU7MJQf.js.map → headless-ui-BxSVgNoT.js.map} +1 -1
  33. package/dist/{interactive-Bfvo61oS.js → interactive-CRR9zPl4.js} +2 -2
  34. package/dist/{interactive-Bfvo61oS.js.map → interactive-CRR9zPl4.js.map} +1 -1
  35. package/dist/{mcp-C_pqYZQY.js → mcp-D_rRzruj.js} +2 -2
  36. package/dist/{mcp-C_pqYZQY.js.map → mcp-D_rRzruj.js.map} +1 -1
  37. package/dist/{mcp-prompt-streaming-DOHJxT8K.js → mcp-prompt-streaming-DRAK8CMP.js} +5 -4
  38. package/dist/mcp-prompt-streaming-DRAK8CMP.js.map +1 -0
  39. package/dist/{non-interactive-CkBbj2As.js → non-interactive-1EJRlN6u.js} +3 -3
  40. package/dist/{non-interactive-CkBbj2As.js.map → non-interactive-1EJRlN6u.js.map} +1 -1
  41. package/dist/{orchestrator-tools-DaVjzCRn.js → orchestrator-tools-DjZWqWmd.js} +3 -3
  42. package/dist/{orchestrator-tools-DaVjzCRn.js.map → orchestrator-tools-DjZWqWmd.js.map} +1 -1
  43. package/dist/{package-manager-BD3WR7Ta.js → package-manager-DMbzbdkL.js} +2 -2
  44. package/dist/{package-manager-BD3WR7Ta.js.map → package-manager-DMbzbdkL.js.map} +1 -1
  45. package/dist/{pi-uDtK02b4.js → pi-D4JQMC-7.js} +18 -15
  46. package/dist/pi-D4JQMC-7.js.map +1 -0
  47. package/dist/{playground-ELiBuGN0.js → playground-Y1nSGXpn.js} +43 -8
  48. package/dist/playground-Y1nSGXpn.js.map +1 -0
  49. package/dist/{posthog-DISFn-54.js → posthog-D9VwcWvJ.js} +2 -2
  50. package/dist/{posthog-DISFn-54.js.map → posthog-D9VwcWvJ.js.map} +1 -1
  51. package/dist/{posthog-integration-BGk6dYzS.js → posthog-integration-B8f4xRBd.js} +19 -19
  52. package/dist/posthog-integration-B8f4xRBd.js.map +1 -0
  53. package/dist/{provisioning-DoKcXygK.js → provisioning-f7lA29tW.js} +14 -5
  54. package/dist/provisioning-f7lA29tW.js.map +1 -0
  55. package/dist/{queue-tools-B75RxrcC.js → queue-tools-DGaHf3n-.js} +3 -3
  56. package/dist/{queue-tools-B75RxrcC.js.map → queue-tools-DGaHf3n-.js.map} +1 -1
  57. package/dist/{registry-DbwlUbvA.js → registry-D1By1SgH.js} +5 -5
  58. package/dist/{registry-DbwlUbvA.js.map → registry-D1By1SgH.js.map} +1 -1
  59. package/dist/{security-lqzh7NaZ.js → security-C2c3_Ycy.js} +5 -5
  60. package/dist/{security-lqzh7NaZ.js.map → security-C2c3_Ycy.js.map} +1 -1
  61. package/dist/{setup-utils-DeIoqwPw.js → setup-utils-BRrCeajl.js} +42 -11
  62. package/dist/setup-utils-BRrCeajl.js.map +1 -0
  63. package/dist/{start-tui-ebV_ynrs.js → start-tui-r4Spgptv.js} +287 -23
  64. package/dist/start-tui-r4Spgptv.js.map +1 -0
  65. package/dist/{steps-BB2izees.js → steps-BZd65XfI.js} +7 -7
  66. package/dist/{steps-BB2izees.js.map → steps-BZd65XfI.js.map} +1 -1
  67. package/dist/{store-BbDrhStP.js → store-DGVXu7xt.js} +25 -6
  68. package/dist/store-DGVXu7xt.js.map +1 -0
  69. package/dist/{subagent-oTBoYK3h.js → subagent-BaMxO7OT.js} +2 -2
  70. package/dist/{subagent-oTBoYK3h.js.map → subagent-BaMxO7OT.js.map} +1 -1
  71. package/dist/{task-BPsA2HrW.js → task-DpKoEZ5I.js} +13 -13
  72. package/dist/{task-BPsA2HrW.js.map → task-DpKoEZ5I.js.map} +1 -1
  73. package/dist/{task-stream-DffFXskR.js → task-stream-CdrBraqP.js} +6 -6
  74. package/dist/{task-stream-DffFXskR.js.map → task-stream-CdrBraqP.js.map} +1 -1
  75. package/dist/{tasks-CmyTWgU7.js → tasks-KsP66Cis.js} +2 -2
  76. package/dist/{tasks-CmyTWgU7.js.map → tasks-KsP66Cis.js.map} +1 -1
  77. package/dist/{telemetry-DfZNqwpb.js → telemetry-DedDTtSa.js} +3 -3
  78. package/dist/{telemetry-DfZNqwpb.js.map → telemetry-DedDTtSa.js.map} +1 -1
  79. package/dist/{terminal-DTJLXrQX.js → terminal-BH8yLclG.js} +107 -61
  80. package/dist/terminal-BH8yLclG.js.map +1 -0
  81. package/dist/{tools-B4s78y8L.js → tools-CJw5vnZd.js} +6 -6
  82. package/dist/{tools-B4s78y8L.js.map → tools-CJw5vnZd.js.map} +1 -1
  83. package/dist/{wizard-abort-XQFt0vkZ.js → wizard-abort-D54j2gmb.js} +5 -5
  84. package/dist/{wizard-abort-XQFt0vkZ.js.map → wizard-abort-D54j2gmb.js.map} +1 -1
  85. package/dist/{wizard-abort-CE6vlOGM.js → wizard-abort-Q1NiYELE.js} +1 -1
  86. package/dist/{wizard-session-Bki7dQhv.js → wizard-session-CwQPZN4y.js} +3 -1
  87. package/dist/wizard-session-CwQPZN4y.js.map +1 -0
  88. package/dist/{wizard-session-gbYCXdBf.js → wizard-session-Dwc1Rh_7.js} +1 -1
  89. package/dist/yara-hooks-BI6WY0Sl.js +2 -0
  90. package/dist/{yara-hooks-gZxdqlkx.js → yara-hooks-CL2LVEgO.js} +4 -4
  91. package/dist/{yara-hooks-gZxdqlkx.js.map → yara-hooks-CL2LVEgO.js.map} +1 -1
  92. package/package.json +1 -1
  93. package/dist/agent-interface-NZHof8u3.js.map +0 -1
  94. package/dist/agent-runner-CK9z7-0z.js.map +0 -1
  95. package/dist/analytics-CbkGZjMp.js +0 -2
  96. package/dist/debug-D5YT7Lil.js.map +0 -1
  97. package/dist/errors-BSdz2lsl.js.map +0 -1
  98. package/dist/mcp-prompt-streaming-DOHJxT8K.js.map +0 -1
  99. package/dist/pi-uDtK02b4.js.map +0 -1
  100. package/dist/playground-ELiBuGN0.js.map +0 -1
  101. package/dist/posthog-integration-BGk6dYzS.js.map +0 -1
  102. package/dist/provisioning-DoKcXygK.js.map +0 -1
  103. package/dist/setup-utils-DeIoqwPw.js.map +0 -1
  104. package/dist/start-tui-ebV_ynrs.js.map +0 -1
  105. package/dist/store-BbDrhStP.js.map +0 -1
  106. package/dist/terminal-DTJLXrQX.js.map +0 -1
  107. package/dist/wizard-session-Bki7dQhv.js.map +0 -1
  108. package/dist/yara-hooks-COTd_ALD.js +0 -2
package/dist/bin.js CHANGED
@@ -1,22 +1,22 @@
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-D5YT7Lil.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-YQdeZulR.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-DXPSL5IY.js";
7
- import { r as setEntryCommand } from "./telemetry-DfZNqwpb.js";
8
- import { a as safeReadFile, o as walkProjectFiles } from "./bounded-fs-DdHuSE1X.js";
9
- import { n as isUsingTypeScript } from "./setup-utils-DeIoqwPw.js";
10
- import { o as handleApiError } from "./api-CeapT_rn.js";
11
- import { i as wizardAbort, r as runCleanups } from "./wizard-abort-XQFt0vkZ.js";
12
- import { n as isNonInteractiveEnvironment } from "./environment-DbDconLv.js";
13
- import { n as runAgent, s as authenticate } from "./agent-runner-CK9z7-0z.js";
14
- import { T as WIZARD_TOOL_NAMES, k as fetchSkillMenu, l as recoverOrphanedSettingsBackups } from "./agent-interface-NZHof8u3.js";
15
- import { m as writeJsonAtomic } from "./queue-tools-B75RxrcC.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-gZxdqlkx.js";
17
- import { i as SPINNER_MESSAGE, t as FRAMEWORK_REGISTRY } from "./registry-DbwlUbvA.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-BGk6dYzS.js";
19
- import { n as readApiKeyFromEnv } from "./env-api-key-ClK4nxHy.js";
5
+ import "./wizard-session-CwQPZN4y.js";
6
+ import { n as analytics } from "./analytics-D54mLptm.js";
7
+ import { r as setEntryCommand } from "./telemetry-DedDTtSa.js";
8
+ import { a as safeReadFile, o as walkProjectFiles } from "./bounded-fs-DHIaH3Sc.js";
9
+ import { n as isUsingTypeScript } from "./setup-utils-BRrCeajl.js";
10
+ import { s as handleApiError } from "./api-BNBVOguz.js";
11
+ import { i as wizardAbort, r as runCleanups } from "./wizard-abort-D54j2gmb.js";
12
+ import { n as isNonInteractiveEnvironment } from "./environment-6ZuAWRpQ.js";
13
+ import { A as fetchSkillMenu, E as WIZARD_TOOL_NAMES, u as recoverOrphanedSettingsBackups } from "./agent-interface-DFm4jB4d.js";
14
+ import { n as runAgent, s as authenticate } from "./agent-runner-Cp6iLqDk.js";
15
+ import { m as writeJsonAtomic } from "./queue-tools-DGaHf3n-.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-CL2LVEgO.js";
17
+ import { i as SPINNER_MESSAGE, t as FRAMEWORK_REGISTRY } from "./registry-D1By1SgH.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-B8f4xRBd.js";
19
+ import { n as readApiKeyFromEnv } from "./env-api-key-9yogO8OI.js";
20
20
  import { satisfies } from "semver";
21
21
  import yargs from "yargs";
22
22
  import { hideBin } from "yargs/helpers";
@@ -242,7 +242,7 @@ function runProvision(argv) {
242
242
  }
243
243
  async function provision({ email, region, name, baseUrl, jsonMode }) {
244
244
  try {
245
- const { provisionNewAccount } = await import("./provisioning-DoKcXygK.js").then((n) => n.r);
245
+ const { provisionNewAccount } = await import("./provisioning-f7lA29tW.js").then((n) => n.r);
246
246
  if (!jsonMode) getUI().log.info(`Provisioning account for ${email} in ${region}...`);
247
247
  emitResult(await provisionNewAccount(email, name, region, { baseUrl }), jsonMode);
248
248
  process.exit(0);
@@ -309,22 +309,22 @@ const basicIntegrationCommand = {
309
309
  setEntryCommand("integrate");
310
310
  (async () => {
311
311
  if (isHeadless(argv)) {
312
- const { runHeadlessInstall } = await import("./ci-install-c-n8dJng.js");
312
+ const { runHeadlessInstall } = await import("./ci-install-Can8LRdJ.js");
313
313
  return runHeadlessInstall(argv);
314
314
  }
315
315
  if (argv.ci) {
316
- const { runCIInstall } = await import("./ci-install-c-n8dJng.js");
316
+ const { runCIInstall } = await import("./ci-install-Can8LRdJ.js");
317
317
  return runCIInstall(argv);
318
318
  }
319
319
  if (isNonInteractiveEnvironment()) {
320
- const { failNonInteractive } = await import("./non-interactive-CkBbj2As.js");
320
+ const { failNonInteractive } = await import("./non-interactive-1EJRlN6u.js");
321
321
  return failNonInteractive();
322
322
  }
323
323
  if (argv.playground) {
324
- const { runPlayground } = await import("./playground-ELiBuGN0.js");
324
+ const { runPlayground } = await import("./playground-Y1nSGXpn.js");
325
325
  return runPlayground();
326
326
  }
327
- const { runInteractive } = await import("./interactive-Bfvo61oS.js");
327
+ const { runInteractive } = await import("./interactive-CRR9zPl4.js");
328
328
  runInteractive(argv);
329
329
  })();
330
330
  }
@@ -2009,14 +2009,19 @@ STEP 5 — Write the credentials to the env file. (skill: "Write credentials to
2009
2009
  because a template documents a key rather than setting it.
2010
2010
  - Env tool path rule: ${inSubproject ? `Tool filePaths are relative to the wizard's working directory, not the selected project directory. Treat the skill's env path as relative to the selected project and prefix it with \`${projectPath}/\` when calling the tools: for example, pass \`${projectPath}/.env\`, not \`.env\` (which would target the wizard's working directory).${variant === "rust" ? ` Cargo workspace exception: when the skill places the env file at the workspace root instead, pass the path of the ROOT manifest's directory relative to the wizard's working directory (e.g. \`rust/.env\` for a workspace root at \`rust/\`, or plain \`.env\` when the workspace root IS the working directory) — not the member path.` : ""}` : `Tool filePaths are relative to the wizard's working directory. For an env file at this project root, pass \`.env\`; never prefix it with this directory's path inside an ancestor repository.`}
2011
2011
  - Then call set_env_values, passing the STEP 1 secretRef as a value
2012
- object, not a literal string:
2012
+ object, not a literal string. Take the three variable NAMES from the
2013
+ skill's per-uploader list in "Write credentials to the env file" — they
2014
+ differ by uploader, and only the shape below is fixed:
2013
2015
  values: {
2014
- "POSTHOG_CLI_API_KEY": { secretRef: "<the ref from STEP 1>" },
2015
- "POSTHOG_CLI_PROJECT_ID": "${projectId}",
2016
- "POSTHOG_CLI_HOST": "${uiHost}"
2016
+ "<key var for the uploader you wired>": { secretRef: "<the ref from STEP 1>" },
2017
+ "<project id var>": "${projectId}",
2018
+ "<host var>": "${uiHost}"
2017
2019
  }
2018
- Variable names follow the skill's per-uploader conventions. The wizard
2019
- resolves the ref locally before writing, so you never see the key value.`;
2020
+ Write that one set only. Do not also write another uploader's variables
2021
+ as a fallback — a credential nothing reads is an unused secret sitting
2022
+ in the user's env file.
2023
+ The wizard resolves the ref locally before writing, so you never see the
2024
+ key value.`;
2020
2025
  return `You are wiring up PostHog Error Tracking source map upload for this ${platformLabel} project.
2021
2026
 
2022
2027
  Project context:
@@ -2860,6 +2865,10 @@ function detectPostHogPresent(installDir) {
2860
2865
  * reason strings are part of the skill contract — the context-mill
2861
2866
  * `self-driving-setup` skill emits these exact strings.
2862
2867
  */
2868
+ /** Headline shown when the run ends because GitHub was not connected. */
2869
+ const GITHUB_REQUIRED_MESSAGE = "GitHub connection required";
2870
+ /** Body for {@link GITHUB_REQUIRED_MESSAGE}. Shared by the pre-run gate and the abort case. */
2871
+ 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.";
2863
2872
  const SELF_DRIVING_ABORT_CASES = [
2864
2873
  {
2865
2874
  match: /^self-driving is not available for this project$/i,
@@ -2868,8 +2877,8 @@ const SELF_DRIVING_ABORT_CASES = [
2868
2877
  },
2869
2878
  {
2870
2879
  match: /^github connection declined$/i,
2871
- message: "GitHub connection required",
2872
- 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."
2880
+ message: GITHUB_REQUIRED_MESSAGE,
2881
+ body: GITHUB_REQUIRED_BODY
2873
2882
  },
2874
2883
  {
2875
2884
  match: /^requires-interactive-mode$/i,
@@ -3070,10 +3079,18 @@ const SELF_DRIVING_PROGRAM = [
3070
3079
  show: (session) => session.integrate === true,
3071
3080
  isComplete: (session) => session.selfDrivingHandoffConfirmed
3072
3081
  },
3082
+ {
3083
+ id: "self-driving-github",
3084
+ label: "GitHub",
3085
+ screenId: "self-driving-github",
3086
+ isComplete: (session) => session.githubConnected === true || session.githubDeclined,
3087
+ gate: (session) => session.githubConnected === true || session.githubDeclined
3088
+ },
3073
3089
  {
3074
3090
  id: "run",
3075
3091
  label: "Self-driving",
3076
3092
  screenId: "run",
3093
+ show: (session) => !session.githubDeclined,
3077
3094
  isComplete: (session) => session.runPhase === "completed" || session.runPhase === "error"
3078
3095
  },
3079
3096
  {
@@ -3126,7 +3143,7 @@ function buildSelfDrivingPrompt(ctx, detectedSources = []) {
3126
3143
  const inboxUrl = `${projectBase}/inbox`;
3127
3144
  const optIn = (value) => value === true ? "ON" : value === false ? "OFF" : "unknown";
3128
3145
  const optIns = ctx.teamProductOptIns;
3129
- 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.
3146
+ 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.
3130
3147
 
3131
3148
  Project URLs:
3132
3149
  - Integrations settings: ${integrationsSettingsUrl}
@@ -3155,8 +3172,7 @@ call so the user can follow your progress in the TUI. Use exactly these
3155
3172
  tasks, in this order:
3156
3173
  1. Check Self-driving access
3157
3174
  2. Read project and current Self-driving state
3158
- 3. Connect GitHub (required)
3159
- 3b. Enable products (replay, error tracking, support)
3175
+ 3. Enable products (replay, error tracking, support)
3160
3176
  4. Enable signal sources
3161
3177
  5. Offer issue-tracker integrations
3162
3178
  6. Configure the scout troop
@@ -3164,8 +3180,11 @@ tasks, in this order:
3164
3180
  6c. Set up Replay Vision scanners
3165
3181
  7. Write report and hand off
3166
3182
  Drive the list with TaskUpdate — mark a task in_progress when you start
3167
- it and completed when done. If a step turns out to be a no-op (e.g.
3168
- GitHub is already connected), still mark its task completed.
3183
+ it and completed when done. If a step turns out to be a no-op (e.g. a
3184
+ product is already enabled), still mark its task completed.
3185
+
3186
+ The PostHog GitHub App is already connected — the wizard verified it
3187
+ before this run started, so never ask the user to connect or install it.
3169
3188
 
3170
3189
  Wizard mechanics:
3171
3190
  - Ask the user things ONLY with the wizard_ask MCP tool, and batch
@@ -3201,20 +3220,12 @@ STEP 2 — Read project and current Signals state. (skill: "Read context")
3201
3220
  what neither covers. List the currently enabled signal sources so every
3202
3221
  later write is idempotent.
3203
3222
 
3204
- STEP 3 — Connect GitHub. REQUIRED. (skill: "Connect GitHub")
3205
- Signals cannot research or fix issues without code access. Check for
3206
- an existing GitHub integration first; if absent, send the user
3207
- through the GitHub App connection via wizard_ask exactly as the skill
3208
- describes (it builds the one-click authorize link), and verify the
3209
- connection after they confirm. If the user cannot connect now, emit
3210
- ${AgentSignals.ABORT} github connection declined
3211
- and halt — never finish setup without GitHub.
3212
-
3213
- STEP 3b — Enable products. (skill: "Enable products")
3223
+ STEP 3 — Enable products. (skill: "Enable products")
3214
3224
  Turn ON the PostHog products Signals reads from — Session Replay,
3215
- Error Tracking, and Support — so the sources you enable next have data
3216
- to read. These are server-side enables with conservative defaults
3217
- (owned by the server, not you). The project-state block above covers
3225
+ Error Tracking, and Support — so the sources you enable next, and the
3226
+ Replay Vision scanners in STEP 6c, have data to read. These are
3227
+ server-side enables with conservative defaults (owned by the server,
3228
+ not you). The project-state block above covers
3218
3229
  only Session Replay and Error Tracking, so you can skip those if they
3219
3230
  are already ON; it does not show Support, but every enable is idempotent
3220
3231
  so enabling any of them again is safe regardless. For a web app, also
@@ -3283,7 +3294,7 @@ STEP 6b — Design custom scouts for this product. (skill: "Custom scouts")
3283
3294
  STEP 6c — Set up Replay Vision scanners. (skill: "Replay Vision scanners")
3284
3295
  Create the scanner skeletons the skill defines, filling the per-product
3285
3296
  blanks it leaves you from this repo's code. Scanners need Session Replay
3286
- on (STEP 3b). Every failure here — no recordings yet, a backend-only
3297
+ on (STEP 3). Every failure here — no recordings yet, a backend-only
3287
3298
  project, the scanner API missing — is a follow-up, never an abort; mark
3288
3299
  the task completed regardless.
3289
3300
 
@@ -4325,7 +4336,7 @@ const mcpAddCommand = {
4325
4336
  function runMcpAdd(argv) {
4326
4337
  const features = parseFeatures(argv.features);
4327
4338
  (async () => {
4328
- const { readApiKeyFromEnv } = await import("./env-api-key-ClK4nxHy.js").then((n) => n.t);
4339
+ const { readApiKeyFromEnv } = await import("./env-api-key-9yogO8OI.js").then((n) => n.t);
4329
4340
  const apiKey = argv.apiKey || readApiKeyFromEnv();
4330
4341
  const debug = argv.debug;
4331
4342
  const localMcp = argv.local;
@@ -4339,8 +4350,8 @@ function runMcpAdd(argv) {
4339
4350
  return;
4340
4351
  }
4341
4352
  try {
4342
- const { startTUI } = await import("./start-tui-ebV_ynrs.js");
4343
- const { buildSession } = await import("./wizard-session-gbYCXdBf.js");
4353
+ const { startTUI } = await import("./start-tui-r4Spgptv.js");
4354
+ const { buildSession } = await import("./wizard-session-Dwc1Rh_7.js");
4344
4355
  const tui = startTUI(VERSION, Program.McpAdd);
4345
4356
  tui.store.session = buildSession({
4346
4357
  debug,
@@ -4357,7 +4368,7 @@ function runMcpAdd(argv) {
4357
4368
  }
4358
4369
  async function runHeadlessAdd(args) {
4359
4370
  setUI(new LoggingUI());
4360
- const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-D2z2adQL.js").then((n) => n.r);
4371
+ const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-B6-ZL--P.js").then((n) => n.r);
4361
4372
  const { installed, failed } = await addMCPServerToClientsStep(args);
4362
4373
  if (failed.length > 0 || installed.length === 0) process.exitCode = 1;
4363
4374
  }
@@ -4389,8 +4400,8 @@ function runMcpRemove(argv) {
4389
4400
  return;
4390
4401
  }
4391
4402
  try {
4392
- const { startTUI } = await import("./start-tui-ebV_ynrs.js");
4393
- const { buildSession } = await import("./wizard-session-gbYCXdBf.js");
4403
+ const { startTUI } = await import("./start-tui-r4Spgptv.js");
4404
+ const { buildSession } = await import("./wizard-session-Dwc1Rh_7.js");
4394
4405
  const tui = startTUI(VERSION, Program.McpRemove);
4395
4406
  tui.store.session = buildSession({
4396
4407
  debug,
@@ -4406,7 +4417,7 @@ function runMcpRemove(argv) {
4406
4417
  /** No exit code on an empty result: nothing to remove is the requested end state. */
4407
4418
  async function runHeadlessRemove(local) {
4408
4419
  setUI(new LoggingUI());
4409
- const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-D2z2adQL.js").then((n) => n.r);
4420
+ const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-B6-ZL--P.js").then((n) => n.r);
4410
4421
  await removeMCPServerFromClientsStep({ local });
4411
4422
  }
4412
4423
  //#endregion
@@ -4426,8 +4437,8 @@ function runMcpTutorial(argv) {
4426
4437
  const debug = argv.debug;
4427
4438
  const localMcp = argv.local;
4428
4439
  try {
4429
- const { startTUI } = await import("./start-tui-ebV_ynrs.js");
4430
- const { buildSession } = await import("./wizard-session-gbYCXdBf.js");
4440
+ const { startTUI } = await import("./start-tui-r4Spgptv.js");
4441
+ const { buildSession } = await import("./wizard-session-Dwc1Rh_7.js");
4431
4442
  const tui = startTUI(VERSION, Program.McpTutorial);
4432
4443
  tui.store.session = buildSession({
4433
4444
  debug,
@@ -4512,17 +4523,17 @@ function runWizard(config, options) {
4512
4523
  (async () => {
4513
4524
  try {
4514
4525
  const installDir = options.installDir || process.cwd();
4515
- const { startTUI } = await import("./start-tui-ebV_ynrs.js");
4516
- const { buildSession, RunPhase } = await import("./wizard-session-gbYCXdBf.js");
4517
- const { TaskStreamPush } = await import("./task-stream-DffFXskR.js");
4518
- const { PostHogDestination } = await import("./posthog-DISFn-54.js");
4526
+ const { startTUI } = await import("./start-tui-r4Spgptv.js");
4527
+ const { buildSession, RunPhase } = await import("./wizard-session-Dwc1Rh_7.js");
4528
+ const { TaskStreamPush } = await import("./task-stream-CdrBraqP.js");
4529
+ const { PostHogDestination } = await import("./posthog-D9VwcWvJ.js");
4519
4530
  const local = getLocalDev();
4520
4531
  const localServicesError = await checkLocalServices({
4521
4532
  ...local,
4522
4533
  localPosthog: local.localPosthog && !options.baseUrl
4523
4534
  });
4524
4535
  if (localServicesError) {
4525
- const { wizardAbort } = await import("./wizard-abort-CE6vlOGM.js");
4536
+ const { wizardAbort } = await import("./wizard-abort-Q1NiYELE.js");
4526
4537
  await wizardAbort({ message: localServicesError });
4527
4538
  return;
4528
4539
  }
@@ -4593,7 +4604,7 @@ function runWizard(config, options) {
4593
4604
  if (shown(step)) await advanceStep(step, activeTui.store, config);
4594
4605
  }
4595
4606
  else if (skipAgent) {
4596
- const { getOrAskForProjectData } = await import("./setup-utils-DeIoqwPw.js").then((n) => n.r);
4607
+ const { getOrAskForProjectData } = await import("./setup-utils-BRrCeajl.js").then((n) => n.r);
4597
4608
  const { projectApiKey, host, accessToken, projectId } = await getOrAskForProjectData({
4598
4609
  signup: session.signup,
4599
4610
  ci: session.ci,
@@ -4706,11 +4717,11 @@ function runNonInteractive(config, options, mode) {
4706
4717
  analytics.setTag("build", mode);
4707
4718
  (async () => {
4708
4719
  const path = await import("path");
4709
- const { buildSession, RunPhase, OutroKind } = await import("./wizard-session-gbYCXdBf.js");
4710
- const { readEnvironment } = await import("./environment-DbDconLv.js").then((n) => n.t);
4711
- const { readApiKeyFromEnv } = await import("./env-api-key-ClK4nxHy.js").then((n) => n.t);
4712
- const { configureLogFileFromEnvironment, logToFile } = await import("./debug-D2KQFr3-.js");
4713
- const { wizardAbort, WizardError } = await import("./wizard-abort-CE6vlOGM.js");
4720
+ const { buildSession, RunPhase, OutroKind } = await import("./wizard-session-Dwc1Rh_7.js");
4721
+ const { readEnvironment } = await import("./environment-6ZuAWRpQ.js").then((n) => n.t);
4722
+ const { readApiKeyFromEnv } = await import("./env-api-key-9yogO8OI.js").then((n) => n.t);
4723
+ const { configureLogFileFromEnvironment, logToFile } = await import("./debug-C4RPcEIX.js");
4724
+ const { wizardAbort, WizardError } = await import("./wizard-abort-Q1NiYELE.js");
4714
4725
  configureLogFileFromEnvironment();
4715
4726
  const env = readEnvironment();
4716
4727
  const apiKey = options.apiKey ?? readApiKeyFromEnv() ?? void 0;
@@ -4757,9 +4768,9 @@ function runNonInteractive(config, options, mode) {
4757
4768
  let store = null;
4758
4769
  let taskStream = null;
4759
4770
  if (mode === "headless") {
4760
- const { WizardStore } = await import("./store-BbDrhStP.js").then((n) => n.n);
4761
- const { HeadlessUI } = await import("./headless-ui-BKU7MJQf.js");
4762
- const { TaskStreamPush, PostHogDestination } = await import("./task-stream-DffFXskR.js");
4771
+ const { WizardStore } = await import("./store-DGVXu7xt.js").then((n) => n.n);
4772
+ const { HeadlessUI } = await import("./headless-ui-BxSVgNoT.js");
4773
+ const { TaskStreamPush, PostHogDestination } = await import("./task-stream-CdrBraqP.js");
4763
4774
  store = new WizardStore(config.id);
4764
4775
  store.session = session;
4765
4776
  setUI(new HeadlessUI(store));
@@ -4842,7 +4853,7 @@ function runNonInteractive(config, options, mode) {
4842
4853
  });
4843
4854
  }
4844
4855
  }
4845
- const { runAgent } = await import("./agent-runner-CK9z7-0z.js").then((n) => n.t);
4856
+ const { runAgent } = await import("./agent-runner-Cp6iLqDk.js").then((n) => n.t);
4846
4857
  await runAgent(config, session);
4847
4858
  await settleStream(RunPhase.Completed);
4848
4859
  } catch (error) {
@@ -6089,7 +6100,7 @@ async function runDoctorCI(options) {
6089
6100
  getUI().intro("Welcome to the PostHog setup wizard");
6090
6101
  getUI().log.info("Running posthog-doctor in CI mode");
6091
6102
  try {
6092
- const { getOrAskForProjectData } = await import("./setup-utils-DeIoqwPw.js").then((n) => n.r);
6103
+ const { getOrAskForProjectData } = await import("./setup-utils-BRrCeajl.js").then((n) => n.r);
6093
6104
  const { host, accessToken, projectId } = await getOrAskForProjectData({
6094
6105
  signup: false,
6095
6106
  ci: true,
@@ -6107,7 +6118,7 @@ async function runDoctorCI(options) {
6107
6118
  for (const issue of sorted) getUI().log.info(` • [${issue.severity}] ${getKindMeta(issue.kind).title}`);
6108
6119
  process.exit(1);
6109
6120
  } catch (error) {
6110
- const { ApiError } = await import("./api-CeapT_rn.js").then((n) => n.n);
6121
+ const { ApiError } = await import("./api-BNBVOguz.js").then((n) => n.n);
6111
6122
  const message = error instanceof ApiError && error.statusCode === 401 ? "Your PostHog API key is invalid or expired." : error instanceof Error ? error.message : String(error);
6112
6123
  getUI().log.error(`Doctor failed: ${message}`);
6113
6124
  emitWizardError({
@@ -6193,8 +6204,8 @@ function runSlackConnect(argv) {
6193
6204
  (async () => {
6194
6205
  const debug = argv.debug;
6195
6206
  try {
6196
- const { startTUI } = await import("./start-tui-ebV_ynrs.js");
6197
- const { buildSession } = await import("./wizard-session-gbYCXdBf.js");
6207
+ const { startTUI } = await import("./start-tui-r4Spgptv.js");
6208
+ const { buildSession } = await import("./wizard-session-Dwc1Rh_7.js");
6198
6209
  const tui = startTUI(VERSION, Program.SlackConnect);
6199
6210
  tui.store.session = buildSession({
6200
6211
  debug,
@@ -6538,6 +6549,6 @@ function resolveInstallDir() {
6538
6549
  }
6539
6550
  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();
6540
6551
  //#endregion
6541
- 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 };
6552
+ 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 };
6542
6553
 
6543
6554
  //# sourceMappingURL=bin.js.map