@posthog/wizard 2.54.0 → 2.56.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 (87) hide show
  1. package/dist/{add-mcp-server-to-clients-B3TcwTT5.js → add-mcp-server-to-clients-CVA6Wbmu.js} +4 -4
  2. package/dist/{add-mcp-server-to-clients-B3TcwTT5.js.map → add-mcp-server-to-clients-CVA6Wbmu.js.map} +1 -1
  3. package/dist/{agent-interface-CLvG6Rk9.js → agent-interface-CaSQlcUF.js} +6 -6
  4. package/dist/{agent-interface-CLvG6Rk9.js.map → agent-interface-CaSQlcUF.js.map} +1 -1
  5. package/dist/{agent-prompt-loader-Baqm1JMD.js → agent-prompt-loader-BON_ZfNn.js} +5 -5
  6. package/dist/{agent-prompt-loader-Baqm1JMD.js.map → agent-prompt-loader-BON_ZfNn.js.map} +1 -1
  7. package/dist/{agent-runner-D6zGTJqn.js → agent-runner-DmqRgcNz.js} +13 -13
  8. package/dist/{agent-runner-D6zGTJqn.js.map → agent-runner-DmqRgcNz.js.map} +1 -1
  9. package/dist/{analytics-D7hsukY7.js → analytics-Bcj98zOG.js} +2 -2
  10. package/dist/{analytics-D7hsukY7.js.map → analytics-Bcj98zOG.js.map} +1 -1
  11. package/dist/analytics-CUMQqMBD.js +2 -0
  12. package/dist/{api-BSq9hLu5.js → api-BT317Fnl.js} +3 -3
  13. package/dist/{api-BSq9hLu5.js.map → api-BT317Fnl.js.map} +1 -1
  14. package/dist/bin.js +218 -77
  15. package/dist/bin.js.map +1 -1
  16. package/dist/{bounded-fs-Cq960M-V.js → bounded-fs-DZEUmLFS.js} +4 -4
  17. package/dist/{bounded-fs-Cq960M-V.js.map → bounded-fs-DZEUmLFS.js.map} +1 -1
  18. package/dist/{ci-install-w-mywB9x.js → ci-install-Jcf6VvMs.js} +4 -4
  19. package/dist/{ci-install-w-mywB9x.js.map → ci-install-Jcf6VvMs.js.map} +1 -1
  20. package/dist/{debug-CbgLkSCY.js → debug-B6VsAfeE.js} +3 -3
  21. package/dist/{debug-CbgLkSCY.js.map → debug-B6VsAfeE.js.map} +1 -1
  22. package/dist/{debug-CX6ZqL9r.js → debug-B_d72khs.js} +1 -1
  23. package/dist/{environment-BWuaOExh.js → environment-Dn-Vd-J3.js} +4 -4
  24. package/dist/{environment-BWuaOExh.js.map → environment-Dn-Vd-J3.js.map} +1 -1
  25. package/dist/{file-watcher-D9tgVBkp.js → file-watcher-ucN_7-SB.js} +2 -2
  26. package/dist/{file-watcher-D9tgVBkp.js.map → file-watcher-ucN_7-SB.js.map} +1 -1
  27. package/dist/{headless-ui-rH97E35y.js → headless-ui-DhtLuoOS.js} +2 -2
  28. package/dist/{headless-ui-rH97E35y.js.map → headless-ui-DhtLuoOS.js.map} +1 -1
  29. package/dist/{interactive-D-MVMdBl.js → interactive-BU4h53in.js} +2 -2
  30. package/dist/{interactive-D-MVMdBl.js.map → interactive-BU4h53in.js.map} +1 -1
  31. package/dist/{mcp-jKHwa45f.js → mcp-BT6xPsZJ.js} +2 -2
  32. package/dist/{mcp-jKHwa45f.js.map → mcp-BT6xPsZJ.js.map} +1 -1
  33. package/dist/{mcp-prompt-streaming-DxDftNHb.js → mcp-prompt-streaming-Ba9zJ2JZ.js} +3 -3
  34. package/dist/{mcp-prompt-streaming-DxDftNHb.js.map → mcp-prompt-streaming-Ba9zJ2JZ.js.map} +1 -1
  35. package/dist/{non-interactive-eXT2_WCR.js → non-interactive-DWiL-3rV.js} +2 -2
  36. package/dist/{non-interactive-eXT2_WCR.js.map → non-interactive-DWiL-3rV.js.map} +1 -1
  37. package/dist/{orchestrator-tools-CsXrPhsd.js → orchestrator-tools-DAoHvBKb.js} +3 -3
  38. package/dist/{orchestrator-tools-CsXrPhsd.js.map → orchestrator-tools-DAoHvBKb.js.map} +1 -1
  39. package/dist/{package-manager-CASp14jY.js → package-manager-CQjuD9E0.js} +2 -2
  40. package/dist/{package-manager-CASp14jY.js.map → package-manager-CQjuD9E0.js.map} +1 -1
  41. package/dist/{pi-CfdqOKDI.js → pi-DdVeXjmn.js} +11 -11
  42. package/dist/{pi-CfdqOKDI.js.map → pi-DdVeXjmn.js.map} +1 -1
  43. package/dist/{playground-DuBvnGkP.js → playground-CkMYkXiw.js} +113 -8
  44. package/dist/{playground-DuBvnGkP.js.map → playground-CkMYkXiw.js.map} +1 -1
  45. package/dist/{posthog-integration-Dy5cNPaa.js → posthog-integration-Cdwv-ohr.js} +16 -15
  46. package/dist/{posthog-integration-Dy5cNPaa.js.map → posthog-integration-Cdwv-ohr.js.map} +1 -1
  47. package/dist/{provisioning-CS6fQriR.js → provisioning-sDvZgL0E.js} +122 -25
  48. package/dist/provisioning-sDvZgL0E.js.map +1 -0
  49. package/dist/{queue-tools-ai7gCWyU.js → queue-tools-DfDkhfpu.js} +3 -3
  50. package/dist/{queue-tools-ai7gCWyU.js.map → queue-tools-DfDkhfpu.js.map} +1 -1
  51. package/dist/{registry-D0hx_-KP.js → registry-Bs7-Q1J9.js} +5 -5
  52. package/dist/{registry-D0hx_-KP.js.map → registry-Bs7-Q1J9.js.map} +1 -1
  53. package/dist/{security-BNqgFjYh.js → security-DPVT9zKY.js} +4 -4
  54. package/dist/{security-BNqgFjYh.js.map → security-DPVT9zKY.js.map} +1 -1
  55. package/dist/{setup-utils-6qyTDNyd.js → setup-utils-Bh_HUFPV.js} +19 -9
  56. package/dist/{setup-utils-6qyTDNyd.js.map → setup-utils-Bh_HUFPV.js.map} +1 -1
  57. package/dist/{start-tui-DNkm-n-4.js → start-tui-DEgpLYEQ.js} +184 -64
  58. package/dist/start-tui-DEgpLYEQ.js.map +1 -0
  59. package/dist/{steps-CqHAVc8R.js → steps-BjLuR8HU.js} +7 -7
  60. package/dist/{steps-CqHAVc8R.js.map → steps-BjLuR8HU.js.map} +1 -1
  61. package/dist/{store-sIaF89XA.js → store-DGt4jqrg.js} +10 -7
  62. package/dist/{store-sIaF89XA.js.map → store-DGt4jqrg.js.map} +1 -1
  63. package/dist/{subagent-CKNbRtfQ.js → subagent-CaXNaC3O.js} +2 -2
  64. package/dist/{subagent-CKNbRtfQ.js.map → subagent-CaXNaC3O.js.map} +1 -1
  65. package/dist/{task-DwzRxORh.js → task-jhwY_uF-.js} +12 -12
  66. package/dist/{task-DwzRxORh.js.map → task-jhwY_uF-.js.map} +1 -1
  67. package/dist/{task-stream-BdJV-usk.js → task-stream-aKusWX0h.js} +3 -3
  68. package/dist/{task-stream-BdJV-usk.js.map → task-stream-aKusWX0h.js.map} +1 -1
  69. package/dist/{tasks-yqJVuTvc.js → tasks-BWdKP9g7.js} +2 -2
  70. package/dist/{tasks-yqJVuTvc.js.map → tasks-BWdKP9g7.js.map} +1 -1
  71. package/dist/{telemetry-UBL5MQtw.js → telemetry-JfMjqBNP.js} +3 -3
  72. package/dist/{telemetry-UBL5MQtw.js.map → telemetry-JfMjqBNP.js.map} +1 -1
  73. package/dist/{terminal-vo5Zl7j1.js → terminal-B6ojVY0g.js} +12 -12
  74. package/dist/{terminal-vo5Zl7j1.js.map → terminal-B6ojVY0g.js.map} +1 -1
  75. package/dist/{tools-Br8lP29r.js → tools-DTBsb5U5.js} +6 -6
  76. package/dist/{tools-Br8lP29r.js.map → tools-DTBsb5U5.js.map} +1 -1
  77. package/dist/{wizard-abort-FIC6lKCs.js → wizard-abort-CDIfvSu2.js} +3 -3
  78. package/dist/{wizard-abort-FIC6lKCs.js.map → wizard-abort-CDIfvSu2.js.map} +1 -1
  79. package/dist/{wizard-abort-BRsd7-aB.js → wizard-abort-CeTBd8IM.js} +1 -1
  80. package/dist/yara-hooks-DAnlPC5v.js +2 -0
  81. package/dist/{yara-hooks-DxpCD72V.js → yara-hooks-DyEPTBZF.js} +4 -4
  82. package/dist/{yara-hooks-DxpCD72V.js.map → yara-hooks-DyEPTBZF.js.map} +1 -1
  83. package/package.json +1 -1
  84. package/dist/analytics-BBJE4hIu.js +0 -2
  85. package/dist/provisioning-CS6fQriR.js.map +0 -1
  86. package/dist/start-tui-DNkm-n-4.js.map +0 -1
  87. package/dist/yara-hooks--QA2Cwjv.js +0 -2
package/dist/bin.js CHANGED
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
- import { Ct as regionOption, L as Integration, St as isHeadless, U as POSTHOG_DOCS_URL, a as getLogFilePath, f as getUI, ft as WIZARD_USER_AGENT, ht as VERSION, m as LoggingUI, p as setUI, pt as getSkillsBaseUrl, r as debug, s as logToFile, xt as headlessOption } from "./debug-CbgLkSCY.js";
3
- import { n as analytics } from "./analytics-D7hsukY7.js";
4
- import { r as setEntryCommand } from "./telemetry-UBL5MQtw.js";
5
- import { a as walkProjectFiles, i as safeReadFile } from "./bounded-fs-Cq960M-V.js";
6
- import { n as isUsingTypeScript } from "./setup-utils-6qyTDNyd.js";
7
- import { o as handleApiError } from "./api-BSq9hLu5.js";
2
+ import { Ct as regionOption, L as Integration, St as isHeadless, U as POSTHOG_DOCS_URL, a as getLogFilePath, f as getUI, ft as WIZARD_USER_AGENT, ht as VERSION, m as LoggingUI, p as setUI, pt as getSkillsBaseUrl, r as debug, s as logToFile, xt as headlessOption } from "./debug-B6VsAfeE.js";
3
+ import { n as analytics } from "./analytics-Bcj98zOG.js";
4
+ import { r as setEntryCommand } from "./telemetry-JfMjqBNP.js";
5
+ import { a as safeReadFile, o as walkProjectFiles } from "./bounded-fs-DZEUmLFS.js";
6
+ import { n as isUsingTypeScript } from "./setup-utils-Bh_HUFPV.js";
7
+ import { o as handleApiError } from "./api-BT317Fnl.js";
8
8
  import "./wizard-session-CwgR5y3-.js";
9
- import { r as runCleanups } from "./wizard-abort-FIC6lKCs.js";
10
- import { n as isNonInteractiveEnvironment } from "./environment-BWuaOExh.js";
11
- import { n as runAgent, o as authenticate } from "./agent-runner-D6zGTJqn.js";
12
- import { l as recoverOrphanedSettingsBackups, p as AgentSignals, v as WIZARD_TOOL_NAMES, x as fetchSkillMenu } from "./agent-interface-CLvG6Rk9.js";
13
- import { S as SETUP_REPORT_FILE, _ as AUDIT_CHECKS_KEY, g as AUDIT_CHECKS_FILE, v as AUDIT_REPORT_FILE } from "./yara-hooks-DxpCD72V.js";
14
- import { i as SPINNER_MESSAGE } from "./registry-D0hx_-KP.js";
15
- import { C as gatherFrameworkContext, S as resolveProjectDir, _ as WAREHOUSE_ABORT_CASES, a as LINE_CHART_BLOCK, b as detectIntegrationProjects, 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 detectWarehousePrerequisites, y as getDetectedWarehouseSources } from "./posthog-integration-Dy5cNPaa.js";
9
+ import { r as runCleanups } from "./wizard-abort-CDIfvSu2.js";
10
+ import { n as isNonInteractiveEnvironment } from "./environment-Dn-Vd-J3.js";
11
+ import { n as runAgent, o as authenticate } from "./agent-runner-DmqRgcNz.js";
12
+ import { l as recoverOrphanedSettingsBackups, p as AgentSignals, v as WIZARD_TOOL_NAMES, x as fetchSkillMenu } from "./agent-interface-CaSQlcUF.js";
13
+ import { S as SETUP_REPORT_FILE, _ as AUDIT_CHECKS_KEY, g as AUDIT_CHECKS_FILE, v as AUDIT_REPORT_FILE } from "./yara-hooks-DyEPTBZF.js";
14
+ import { i as SPINNER_MESSAGE } from "./registry-Bs7-Q1J9.js";
15
+ import { C as resolveProjectDir, _ as WAREHOUSE_ABORT_CASES, a as LINE_CHART_BLOCK, b as detectWarehouseSources, 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 detectWarehousePrerequisites, w as gatherFrameworkContext, x as detectIntegrationProjects, y as getDetectedWarehouseSources } from "./posthog-integration-Cdwv-ohr.js";
16
16
  import { n as readApiKeyFromEnv } from "./env-api-key-cjD4yfGT.js";
17
17
  import { satisfies } from "semver";
18
18
  import yargs from "yargs";
@@ -200,7 +200,7 @@ function runProvision(argv) {
200
200
  }
201
201
  async function provision({ email, region, name, baseUrl, jsonMode }) {
202
202
  try {
203
- const { provisionNewAccount } = await import("./provisioning-CS6fQriR.js").then((n) => n.n);
203
+ const { provisionNewAccount } = await import("./provisioning-sDvZgL0E.js").then((n) => n.r);
204
204
  if (!jsonMode) getUI().log.info(`Provisioning account for ${email} in ${region}...`);
205
205
  emitResult(await provisionNewAccount(email, name, region, { baseUrl }), jsonMode);
206
206
  process.exit(0);
@@ -267,22 +267,22 @@ const basicIntegrationCommand = {
267
267
  setEntryCommand("integrate");
268
268
  (async () => {
269
269
  if (isHeadless(argv)) {
270
- const { runHeadlessInstall } = await import("./ci-install-w-mywB9x.js");
270
+ const { runHeadlessInstall } = await import("./ci-install-Jcf6VvMs.js");
271
271
  return runHeadlessInstall(argv);
272
272
  }
273
273
  if (argv.ci) {
274
- const { runCIInstall } = await import("./ci-install-w-mywB9x.js");
274
+ const { runCIInstall } = await import("./ci-install-Jcf6VvMs.js");
275
275
  return runCIInstall(argv);
276
276
  }
277
277
  if (isNonInteractiveEnvironment()) {
278
- const { failNonInteractive } = await import("./non-interactive-eXT2_WCR.js");
278
+ const { failNonInteractive } = await import("./non-interactive-DWiL-3rV.js");
279
279
  return failNonInteractive();
280
280
  }
281
281
  if (argv.playground) {
282
- const { runPlayground } = await import("./playground-DuBvnGkP.js");
282
+ const { runPlayground } = await import("./playground-CkMYkXiw.js");
283
283
  return runPlayground();
284
284
  }
285
- const { runInteractive } = await import("./interactive-D-MVMdBl.js");
285
+ const { runInteractive } = await import("./interactive-BU4h53in.js");
286
286
  runInteractive(argv);
287
287
  })();
288
288
  }
@@ -1785,17 +1785,27 @@ const DISPLAY_NAME = {
1785
1785
  ios: "iOS",
1786
1786
  vite: "Vite",
1787
1787
  webpack: "Webpack",
1788
- rollup: "Rollup"
1788
+ rollup: "Rollup",
1789
+ go: "Go",
1790
+ rust: "Rust"
1789
1791
  };
1790
1792
  /**
1791
- * Variants the wizard can wire up source-map upload for automatically. React
1792
- * Native is recognised but not yet automatable, so the agentic picker treats
1793
- * it as non-instrumentable.
1793
+ * Variants the wizard can wire up source-map upload for automatically. Go and
1794
+ * Rust upload native debug symbols (`posthog-cli symbol-sets upload`) instead
1795
+ * of source maps, but the wiring is the same shape.
1796
+ *
1797
+ * Invariant: every variant listed here must have a published
1798
+ * `error-tracking-upload-source-maps-<variant>` skill in context-mill —
1799
+ * STEP 2 of the run installs that exact id, so an entry without a shipped
1800
+ * skill fails every run for that stack.
1794
1801
  */
1795
1802
  const AUTOMATABLE_VARIANTS = [
1796
1803
  "android",
1797
1804
  "ios",
1805
+ "react-native",
1798
1806
  "flutter",
1807
+ "go",
1808
+ "rust",
1799
1809
  "web",
1800
1810
  "nextjs",
1801
1811
  "node",
@@ -1808,28 +1818,56 @@ const AUTOMATABLE_VARIANTS = [
1808
1818
  ];
1809
1819
  /**
1810
1820
  * Variants the wizard pre-installs a machine-global `posthog-cli` for — their
1811
- * build shells out to it with no npx / local-dep fallback. JS variants stay
1812
- * out. Flutter counts here despite emitting plain `.js.map` files: a Flutter
1813
- * project has no `package.json`, so there is no npx or local dependency to
1814
- * fall back to when the post-build step invokes the CLI.
1821
+ * build shells out to it with no npx / local-dep fallback. Web JS variants stay
1822
+ * out. React Native counts as native here — its Xcode build phases and Gradle
1823
+ * tasks invoke the global CLI. Flutter counts too despite emitting plain
1824
+ * `.js.map` files: a Flutter project has no `package.json`, so there is no npx
1825
+ * or local dependency to fall back to when the post-build step invokes the CLI.
1815
1826
  */
1816
1827
  const VARIANTS_REQUIRING_POSTHOG_CLI = new Set([
1817
1828
  "ios",
1818
1829
  "android",
1819
- "flutter"
1830
+ "react-native",
1831
+ "flutter",
1832
+ "go",
1833
+ "rust"
1820
1834
  ]);
1835
+ /**
1836
+ * Automatable variants whose SDK the wizard's default flow cannot install —
1837
+ * remediation for a missing SDK is a manual install (posthog-go /
1838
+ * posthog-rs), not `npx @posthog/wizard`. Drives the missing-SDK copy in the
1839
+ * picker and the classifier.
1840
+ */
1841
+ const MANUAL_SDK_INSTALL = {
1842
+ go: "add the posthog-go module first",
1843
+ rust: "add the posthog-rs crate first"
1844
+ };
1845
+ const MANUAL_SDK_VARIANTS = Object.keys(MANUAL_SDK_INSTALL);
1846
+ /** Dependency string that identifies the Rust SDK in Cargo.toml. */
1847
+ const RUST_SDK_CRATE = "posthog-rs";
1848
+ /** Module path that identifies the Go SDK in go.mod. */
1849
+ const GO_SDK_MODULE = "github.com/posthog/posthog-go";
1821
1850
  /** `[ABORT] <reason>` cases the source maps skill can emit. */
1822
- const SOURCE_MAPS_ABORT_CASES = [{
1823
- match: /^no posthog sdk detected$/i,
1824
- message: "No PostHog SDK detected",
1825
- body: "The agent could not find a PostHog SDK in your project. Source map upload requires the SDK to already be installed so it can report errors. Run `npx @posthog/wizard` first to install the SDK.",
1826
- docsUrl: "https://posthog.com/docs/error-tracking"
1827
- }, {
1828
- match: /^build command not found$/i,
1829
- message: "Build command not found",
1830
- body: "The agent could not identify how to build your project. Source map upload runs as part of the production build. Add a build script to your project and run this wizard again.",
1831
- docsUrl: "https://posthog.com/docs/error-tracking/upload-source-maps"
1832
- }];
1851
+ const SOURCE_MAPS_ABORT_CASES = [
1852
+ {
1853
+ match: /^no posthog sdk detected$/i,
1854
+ message: "No PostHog SDK detected",
1855
+ body: "The agent could not find a PostHog SDK in your project. Source map upload requires the SDK to already be installed so it can report errors. Run `npx @posthog/wizard` first to install the SDK (for Go and Rust, add posthog-go / posthog-rs by hand first — the wizard cannot install the SDK for those stacks yet).",
1856
+ docsUrl: "https://posthog.com/docs/error-tracking"
1857
+ },
1858
+ {
1859
+ match: /^build command not found$/i,
1860
+ message: "Build command not found",
1861
+ body: "The agent could not identify how to build your project. Source map upload runs as part of the production build. Add a build script to your project and run this wizard again.",
1862
+ docsUrl: "https://posthog.com/docs/error-tracking/upload-source-maps"
1863
+ },
1864
+ {
1865
+ match: /^bare react native not supported$/i,
1866
+ message: "Bare React Native is not supported",
1867
+ body: "Source-map upload for React Native requires Expo, and this project has no `expo` package. Bare React Native builds cannot inject the chunk IDs PostHog needs to resolve stack traces.",
1868
+ docsUrl: "https://posthog.com/docs/error-tracking/upload-source-maps/react-native"
1869
+ }
1870
+ ];
1833
1871
  const SOURCE_MAPS_CONTEXT_KEYS = {
1834
1872
  skillVariant: "sourceMapsSkillVariant",
1835
1873
  displayName: "sourceMapsDisplayName",
@@ -1888,7 +1926,7 @@ const SOURCE_MAPS_DETECTION_FAILED_PROMPT = `Detection did not pick a source map
1888
1926
  Emit: ${AgentSignals.ABORT} unsupported-platform
1889
1927
  Then halt.`;
1890
1928
  function buildSourceMapsUploadPrompt(params) {
1891
- const { displayName, variant, skillId, projectPath, projectId, host, settingsUrl, uiHost } = params;
1929
+ const { displayName, variant, skillId, projectPath, projectId, host, settingsUrl, uiHost, reportFile } = params;
1892
1930
  const platformLabel = displayName ?? variant;
1893
1931
  const inSubproject = projectPath != null && projectPath !== ".";
1894
1932
  const projectLine = inSubproject ? `- Project directory (relative to the wizard's working directory): ${projectPath}` : "- Project directory: the wizard's working directory (even when it sits inside a larger git repo, this directory is the project root)";
@@ -1903,7 +1941,7 @@ STEP 5 — Write the credentials to the env file. (skill: "Write credentials to
1903
1941
  POSTHOG_* vars to one, so seed your keys alongside them.
1904
1942
  - First call check_env_keys on that file (returns present/absent, never
1905
1943
  values — don't read the file directly).
1906
- - 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).` : `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.`}
1944
+ - 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.`}
1907
1945
  - Then call set_env_values, passing the STEP 1 secretRef as a value
1908
1946
  object, not a literal string:
1909
1947
  values: {
@@ -1923,7 +1961,14 @@ Project context:
1923
1961
  ${projectLine}
1924
1962
  - Personal API keys settings page: ${settingsUrl}
1925
1963
 
1926
- All file changes, build/run commands, and config edits target the project directory above${inSubproject ? ` — this is a monorepo, so scope your work to \`${projectPath}\` and do not touch other packages` : ""}.
1964
+ All file changes, build/run commands, and config edits target the project directory above${inSubproject ? ` — this is a monorepo, so scope your work to \`${projectPath}\` and do not touch other packages` : ""}.${variant === "rust" && inSubproject ? `
1965
+ Cargo workspace exception: if the selected project is a member of a Cargo
1966
+ workspace (resolve the root with \`cargo locate-project --workspace
1967
+ --message-format plain\`), the workspace root's Cargo.toml (for \`[profile.*]\`
1968
+ edits), the workspace-level \`target/\` directory, and a \`.env\` next to the
1969
+ root manifest are IN SCOPE — treat them as part of the selected project, and
1970
+ follow the skill's workspace guidance for which paths to use. Every other
1971
+ package stays off-limits.` : ""}
1927
1972
 
1928
1973
  The skill you install in STEP 2 is the source of truth for the HOW of every
1929
1974
  step: its "## Steps" section has an overview, tips and per-technology
@@ -2051,8 +2096,16 @@ STEP 8 — Offer to test the local setup. (skill: "Test the local setup")
2051
2096
  surface any failure in STEP 9.
2052
2097
 
2053
2098
  STEP 9 — Summarise and hand off. (skill: "Verify and hand off")
2054
- Follow the skill's "Verify and hand off" step. The Symbol sets page for
2055
- this project — where the user confirms the upload landed — is:
2099
+ Follow the skill's "Verify and hand off" step. Write the hand-off to
2100
+ \`${reportFile}\` at the WIZARD'S WORKING DIRECTORY — pass exactly
2101
+ \`${reportFile}\` as the file path, never prefixed with the selected
2102
+ project directory; this file is the one exception to the project-scope
2103
+ rule above. Cover: the files you changed (paths only), the exact build
2104
+ and upload commands, every CI secret the user still has to create, and
2105
+ how to verify the upload — then give the same summary in chat. Never
2106
+ write secret values into the report, only variable names. The success
2107
+ screen points the user at this file, so do not skip it. The Symbol sets page for this project — where the user
2108
+ confirms the upload landed — is:
2056
2109
  ${uiHost}/project/${projectId}/error_tracking/configuration
2057
2110
  `;
2058
2111
  }
@@ -2555,7 +2608,8 @@ const errorTrackingUploadSourceMapsConfig = {
2555
2608
  projectId: ctx.projectId,
2556
2609
  host: ctx.host.apiHost,
2557
2610
  settingsUrl: `${uiHost}/project/${ctx.projectId}/settings/user-api-keys`,
2558
- uiHost
2611
+ uiHost,
2612
+ reportFile: REPORT_FILE$1
2559
2613
  });
2560
2614
  },
2561
2615
  postRun: () => {
@@ -2605,6 +2659,12 @@ const POSTHOG_PRESENT_KEY = "postHogPresent";
2605
2659
  * into the chosen sub-app, not the root.
2606
2660
  */
2607
2661
  const SELF_DRIVING_INTEGRATE_PATH_KEY = "selfDrivingIntegratePath";
2662
+ /** Self-driving's own detected-tools key — not the warehouse one, which the integration program reads. */
2663
+ const SELF_DRIVING_DETECTED_TOOLS_KEY = "selfDrivingDetectedTools";
2664
+ /** Read the detected tools out of frameworkContext. */
2665
+ function getSelfDrivingDetectedTools(session) {
2666
+ return session.frameworkContext["selfDrivingDetectedTools"] ?? [];
2667
+ }
2608
2668
  const POSTHOG_PACKAGE_RE = /(^|["'\s/=:.@])posthog/im;
2609
2669
  const POSTHOG_MANIFESTS = [
2610
2670
  "package.json",
@@ -2790,6 +2850,44 @@ function detectSelfDrivingPrerequisites(session, setFrameworkContext) {
2790
2850
  return;
2791
2851
  }
2792
2852
  setFrameworkContext(POSTHOG_PRESENT_KEY, detectPostHogPresent(installDir));
2853
+ detectConnectedTools(installDir, setFrameworkContext);
2854
+ }
2855
+ /** Step 5's ask options intersected with `SOURCE_DETECTORS` — reconcile when the skill's catalog grows. */
2856
+ const SELF_DRIVING_TOOL_KINDS = new Set([
2857
+ "Github",
2858
+ "GitLab",
2859
+ "Gitea",
2860
+ "Linear",
2861
+ "Jira",
2862
+ "Shortcut",
2863
+ "Sentry",
2864
+ "Rollbar",
2865
+ "Bugsnag",
2866
+ "Honeybadger",
2867
+ "Raygun",
2868
+ "Zendesk",
2869
+ "Freshdesk",
2870
+ "Front",
2871
+ "Gorgias",
2872
+ "Kustomer",
2873
+ "Plain",
2874
+ "Snyk",
2875
+ "Canny",
2876
+ "Productboard",
2877
+ "GoogleSearchConsole"
2878
+ ]);
2879
+ /** Scan for inbox-connectable tools so STEP 5 can surface them first. Best-effort — never blocks detection. */
2880
+ function detectConnectedTools(installDir, setFrameworkContext) {
2881
+ try {
2882
+ const tools = detectWarehouseSources(installDir).filter((s) => SELF_DRIVING_TOOL_KINDS.has(s.kind));
2883
+ analytics.setTag("connected_tools_detected_count", tools.length);
2884
+ if (tools.length === 0) return;
2885
+ analytics.setTag("connected_tools_detected", tools.map((s) => s.kind).join(","));
2886
+ setFrameworkContext(SELF_DRIVING_DETECTED_TOOLS_KEY, tools);
2887
+ } catch (error) {
2888
+ analytics.setTag("connected_tools_detected_count", -1);
2889
+ analytics.captureException(error instanceof Error ? error : new Error(String(error)), { step: "detectConnectedTools" });
2890
+ }
2793
2891
  }
2794
2892
  //#endregion
2795
2893
  //#region src/lib/programs/self-driving/detect-agentic.ts
@@ -2920,17 +3018,38 @@ const SELF_DRIVING_PROGRAM = [
2920
3018
  //#endregion
2921
3019
  //#region src/lib/programs/self-driving/prompt.ts
2922
3020
  /**
3021
+ * Render the deterministic codebase-tool scan for the prompt. STEP 4 and
3022
+ * STEP 5 read this instead of the agent doing its own flaky "light scan":
3023
+ * enable the matching signal sources, and surface detected tools first in the
3024
+ * connected-tools ask rather than dumping the full ~500-source catalog. When
3025
+ * nothing is detected we still say so explicitly, so the agent falls back to
3026
+ * the skill's default ordering instead of inventing a scan.
3027
+ */
3028
+ function renderDetectedTools(sources) {
3029
+ if (sources.length === 0) return `Tools detected in this codebase: none found by the dependency + env scan. Use the skill's default ordering for STEP 5.`;
3030
+ return [
3031
+ "Tools detected in this codebase (deterministic dependency + env-key scan — this is evidence, not a guess):",
3032
+ ...sources.map((s) => `- ${s.label} (source_type: ${s.kind}) — ${s.matchedSignal}`),
3033
+ "",
3034
+ "Use this list in STEP 4 (enable the matching signal sources) and STEP 5 (surface these detected tools first in the connected-tools ask, ahead of the SaaS basics and the \"others\" option), exactly as the skill describes. Never enable or pre-select a tool the user has not confirmed."
3035
+ ].join("\n");
3036
+ }
3037
+ /**
2923
3038
  * Build the self-driving run prompt. The installed
2924
3039
  * `self-driving-setup` skill is the source of truth for the HOW of
2925
3040
  * every step (which MCP tools to call, which sources/scouts apply, how
2926
3041
  * to verify); this prompt carries the order, the wizard-specific
2927
3042
  * mechanics (wizard_ask, abort signals), and the project URLs.
2928
3043
  *
3044
+ * `detectedSources` is the deterministic codebase scan (from the detect step);
3045
+ * it drives STEP 4/STEP 5 tool prioritisation. Empty is fine — the block then
3046
+ * tells the agent to use the skill's default ordering.
3047
+ *
2929
3048
  * Integration (when the project has no PostHog yet) runs as a separate phase
2930
3049
  * before this — the real integration program, with its own screens and task
2931
3050
  * list — so this prompt only covers the Self-driving steps.
2932
3051
  */
2933
- function buildSelfDrivingPrompt(ctx) {
3052
+ function buildSelfDrivingPrompt(ctx, detectedSources = []) {
2934
3053
  const uiHost = ctx.host.appHost.replace(/\/$/, "");
2935
3054
  const projectBase = `${uiHost}/project/${ctx.projectId}`;
2936
3055
  const integrationsSettingsUrl = `${projectBase}/settings/environment-integrations`;
@@ -2955,6 +3074,8 @@ snippet, so repo evidence may rule a product IN but never OUT):
2955
3074
  - Exception autocapture (error tracking): ${optIn(optIns?.exceptionAutocapture)}
2956
3075
  - Surveys: ${optIn(optIns?.surveys)}
2957
3076
 
3077
+ ${renderDetectedTools(detectedSources)}
3078
+
2958
3079
  The installed skill is the source of truth for the HOW of every step:
2959
3080
  which MCP tools to call, which sources and scouts apply to this product,
2960
3081
  and how to verify each change. The STEPS below give the order and the
@@ -3040,7 +3161,10 @@ STEP 4 — Enable signal sources. (skill: "Enable sources")
3040
3161
 
3041
3162
  STEP 5 — Offer issue-tracker integrations. (skill: "Connected tools")
3042
3163
  One batched multi-select wizard_ask for the external tools the skill
3043
- lists. The run auto-connects the ones it can (GitHub Issues, and
3164
+ lists. Order it per the skill: the tools from the "Tools detected in
3165
+ this codebase" list above come first, then the SaaS basics, then an
3166
+ "others" option for the long tail — never dump the whole catalog.
3167
+ The run auto-connects the ones it can (GitHub Issues, and
3044
3168
  Linear via a one-click OAuth link), verifying each with a single
3045
3169
  silent check — never nudge. For GitHub Issues: when the GitHub
3046
3170
  integration has exactly one repository connected, use that repo by
@@ -3053,9 +3177,11 @@ STEP 5 — Offer issue-tracker integrations. (skill: "Connected tools")
3053
3177
 
3054
3178
  STEP 6 — Configure the scout troop. (skill: "Scouts")
3055
3179
  Materialize the troop, read the project's enforced scout-run budget
3056
- (24 runs a day by default), then enable only a small set — the
3057
- "general" scout plus the two or three specialists for the products
3058
- this project uses most — and disable the rest, per the skill.
3180
+ (100 runs a day by default), then enable a selective set — the
3181
+ "general" scout plus the three to five specialists for the products
3182
+ this project uses most — and disable the rest, per the skill. The
3183
+ whole troop, including step 6b's custom scouts, stays at or under
3184
+ ten enabled scouts.
3059
3185
 
3060
3186
  STEP 6b — Design custom scouts for this product. (skill: "Custom scouts")
3061
3187
  You are the only actor that has read this repo — turn that into
@@ -3091,7 +3217,7 @@ const SELF_DRIVING_TIPS = [
3091
3217
  {
3092
3218
  id: "scout",
3093
3219
  title: "Scout",
3094
- description: "An agent on a schedule, watching your sources for anomalies and patterns. Your project gets up to 24 scout runs a day by default."
3220
+ description: "An agent on a schedule, watching your sources for anomalies and patterns. Your project gets up to 100 scout runs a day by default."
3095
3221
  },
3096
3222
  {
3097
3223
  id: "signal-report",
@@ -3451,10 +3577,10 @@ async function removeInstalledSkill(installDir) {
3451
3577
  force: true
3452
3578
  }).catch(() => void 0);
3453
3579
  }
3454
- const run = {
3580
+ const buildRun = (session) => Promise.resolve({
3455
3581
  skillId: SELF_DRIVING_SKILL_ID,
3456
3582
  integrationLabel: SELF_DRIVING_SKILL_ID,
3457
- customPrompt: buildSelfDrivingPrompt,
3583
+ customPrompt: (ctx) => buildSelfDrivingPrompt(ctx, getSelfDrivingDetectedTools(session)),
3458
3584
  successMessage: SUCCESS_MESSAGE,
3459
3585
  reportFile: REPORT_FILE,
3460
3586
  docsUrl: DOCS_URL,
@@ -3489,7 +3615,7 @@ const run = {
3489
3615
  reportFile: REPORT_FILE
3490
3616
  };
3491
3617
  }
3492
- };
3618
+ });
3493
3619
  const selfDrivingConfig = {
3494
3620
  ...createSkillProgram({
3495
3621
  skillId: SELF_DRIVING_SKILL_ID,
@@ -3506,7 +3632,7 @@ const selfDrivingConfig = {
3506
3632
  abortCases: SELF_DRIVING_ABORT_CASES
3507
3633
  }),
3508
3634
  steps: SELF_DRIVING_PROGRAM,
3509
- run,
3635
+ run: buildRun,
3510
3636
  getTips,
3511
3637
  getContentBlocks
3512
3638
  };
@@ -3798,7 +3924,7 @@ function runMcpAdd(argv) {
3798
3924
  const debug = argv.debug;
3799
3925
  const localMcp = argv.local;
3800
3926
  try {
3801
- const { startTUI } = await import("./start-tui-DNkm-n-4.js");
3927
+ const { startTUI } = await import("./start-tui-DEgpLYEQ.js");
3802
3928
  const { buildSession } = await import("./wizard-session-DsK16SGs.js");
3803
3929
  const tui = startTUI(VERSION, Program.McpAdd);
3804
3930
  tui.store.session = buildSession({
@@ -3811,7 +3937,7 @@ function runMcpAdd(argv) {
3811
3937
  } catch (error) {
3812
3938
  if (!isTUIUnavailable(error)) throw error;
3813
3939
  setUI(new LoggingUI());
3814
- const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-B3TcwTT5.js").then((n) => n.r);
3940
+ const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-CVA6Wbmu.js").then((n) => n.r);
3815
3941
  await addMCPServerToClientsStep({
3816
3942
  local: localMcp,
3817
3943
  features,
@@ -3850,7 +3976,7 @@ function runMcpRemove(argv) {
3850
3976
  const debug = argv.debug;
3851
3977
  const localMcp = argv.local;
3852
3978
  try {
3853
- const { startTUI } = await import("./start-tui-DNkm-n-4.js");
3979
+ const { startTUI } = await import("./start-tui-DEgpLYEQ.js");
3854
3980
  const { buildSession } = await import("./wizard-session-DsK16SGs.js");
3855
3981
  const tui = startTUI(VERSION, Program.McpRemove);
3856
3982
  tui.store.session = buildSession({
@@ -3860,7 +3986,7 @@ function runMcpRemove(argv) {
3860
3986
  });
3861
3987
  } catch {
3862
3988
  setUI(new LoggingUI());
3863
- const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-B3TcwTT5.js").then((n) => n.r);
3989
+ const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-CVA6Wbmu.js").then((n) => n.r);
3864
3990
  await removeMCPServerFromClientsStep({ local: localMcp });
3865
3991
  }
3866
3992
  })();
@@ -3882,7 +4008,7 @@ function runMcpTutorial(argv) {
3882
4008
  const debug = argv.debug;
3883
4009
  const localMcp = argv.local;
3884
4010
  try {
3885
- const { startTUI } = await import("./start-tui-DNkm-n-4.js");
4011
+ const { startTUI } = await import("./start-tui-DEgpLYEQ.js");
3886
4012
  const { buildSession } = await import("./wizard-session-DsK16SGs.js");
3887
4013
  const tui = startTUI(VERSION, Program.McpTutorial);
3888
4014
  tui.store.session = buildSession({
@@ -3927,7 +4053,8 @@ function resolveNoTelemetry(options) {
3927
4053
  const WIZARD_VERSION = VERSION;
3928
4054
  /** The session a run step's agent runs in: scoped to the step's target dir
3929
4055
  * (e.g. a monorepo sub-app) with its own framework context, after any prep.
3930
- * A step without `targetDir` runs in the live session, unchanged. */
4056
+ * A step without `targetDir` runs in the live session, unchanged.
4057
+ * The frameworkContext copy is shallow and unfiltered — name keys per owning program. */
3931
4058
  async function prepareRunSession(step, live) {
3932
4059
  const session = step.targetDir ? {
3933
4060
  ...live,
@@ -3963,9 +4090,9 @@ function runWizard(config, options) {
3963
4090
  (async () => {
3964
4091
  try {
3965
4092
  const installDir = options.installDir || process.cwd();
3966
- const { startTUI } = await import("./start-tui-DNkm-n-4.js");
4093
+ const { startTUI } = await import("./start-tui-DEgpLYEQ.js");
3967
4094
  const { buildSession, RunPhase } = await import("./wizard-session-DsK16SGs.js");
3968
- const { TaskStreamPush } = await import("./task-stream-BdJV-usk.js");
4095
+ const { TaskStreamPush } = await import("./task-stream-aKusWX0h.js");
3969
4096
  const { PostHogDestination } = await import("./posthog-DDLIrku0.js");
3970
4097
  tui = startTUI(WIZARD_VERSION, config.id);
3971
4098
  const activeTui = tui;
@@ -4032,7 +4159,7 @@ function runWizard(config, options) {
4032
4159
  if (shown(step)) await advanceStep(step, activeTui.store, config);
4033
4160
  }
4034
4161
  else if (skipAgent) {
4035
- const { getOrAskForProjectData } = await import("./setup-utils-6qyTDNyd.js").then((n) => n.r);
4162
+ const { getOrAskForProjectData } = await import("./setup-utils-Bh_HUFPV.js").then((n) => n.r);
4036
4163
  const { projectApiKey, host, accessToken, projectId } = await getOrAskForProjectData({
4037
4164
  signup: session.signup,
4038
4165
  ci: session.ci,
@@ -4134,10 +4261,10 @@ function runNonInteractive(config, options, mode) {
4134
4261
  (async () => {
4135
4262
  const path = await import("path");
4136
4263
  const { buildSession, RunPhase, OutroKind } = await import("./wizard-session-DsK16SGs.js");
4137
- const { readEnvironment } = await import("./environment-BWuaOExh.js").then((n) => n.t);
4264
+ const { readEnvironment } = await import("./environment-Dn-Vd-J3.js").then((n) => n.t);
4138
4265
  const { readApiKeyFromEnv } = await import("./env-api-key-cjD4yfGT.js").then((n) => n.t);
4139
- const { configureLogFileFromEnvironment, logToFile } = await import("./debug-CX6ZqL9r.js");
4140
- const { wizardAbort, WizardError } = await import("./wizard-abort-BRsd7-aB.js");
4266
+ const { configureLogFileFromEnvironment, logToFile } = await import("./debug-B_d72khs.js");
4267
+ const { wizardAbort, WizardError } = await import("./wizard-abort-CeTBd8IM.js");
4141
4268
  configureLogFileFromEnvironment();
4142
4269
  const env = readEnvironment();
4143
4270
  const apiKey = options.apiKey ?? readApiKeyFromEnv() ?? void 0;
@@ -4170,9 +4297,9 @@ function runNonInteractive(config, options, mode) {
4170
4297
  let store = null;
4171
4298
  let taskStream = null;
4172
4299
  if (mode === "headless") {
4173
- const { WizardStore } = await import("./store-sIaF89XA.js").then((n) => n.n);
4174
- const { HeadlessUI } = await import("./headless-ui-rH97E35y.js");
4175
- const { TaskStreamPush, PostHogDestination } = await import("./task-stream-BdJV-usk.js");
4300
+ const { WizardStore } = await import("./store-DGt4jqrg.js").then((n) => n.n);
4301
+ const { HeadlessUI } = await import("./headless-ui-DhtLuoOS.js");
4302
+ const { TaskStreamPush, PostHogDestination } = await import("./task-stream-aKusWX0h.js");
4176
4303
  store = new WizardStore(config.id);
4177
4304
  store.session = session;
4178
4305
  setUI(new HeadlessUI(store));
@@ -4228,7 +4355,7 @@ function runNonInteractive(config, options, mode) {
4228
4355
  });
4229
4356
  }
4230
4357
  }
4231
- const { runAgent } = await import("./agent-runner-D6zGTJqn.js").then((n) => n.t);
4358
+ const { runAgent } = await import("./agent-runner-DmqRgcNz.js").then((n) => n.t);
4232
4359
  await runAgent(config, session);
4233
4360
  await settleStream(RunPhase.Completed);
4234
4361
  } catch (error) {
@@ -4767,6 +4894,8 @@ const CHROME_OVERHEAD = 13;
4767
4894
  const MAX_LIST_ROWS = 12;
4768
4895
  /** Extra rows a multi-select adds below its options: marginTop + Confirm button. */
4769
4896
  const CONFIRM_CHROME = 3;
4897
+ /** Lists shorter than this never page — tall rows would split 2-3 options into pages of one. */
4898
+ const MIN_COUNT_TO_PAGE = 5;
4770
4899
  /** Width the multi-select wraps option descriptions to (matches the render). */
4771
4900
  const DESCRIPTION_WIDTH = 56;
4772
4901
  /**
@@ -4780,7 +4909,7 @@ const DESCRIPTION_WIDTH = 56;
4780
4909
  function usePickerViewport(count, rowCost, chromeBelow, enabled, focused) {
4781
4910
  const [, termRows] = useStdoutDimensions();
4782
4911
  const budget = Math.max(5, Math.min(termRows - CHROME_OVERHEAD - chromeBelow, MAX_LIST_ROWS));
4783
- const needsScroll = enabled && count * rowCost > budget;
4912
+ const needsScroll = enabled && count >= MIN_COUNT_TO_PAGE && count * rowCost > budget;
4784
4913
  const perPage = needsScroll ? Math.max(1, Math.floor((budget - 2) / rowCost)) : count;
4785
4914
  const pageCount = Math.max(1, Math.ceil(count / perPage));
4786
4915
  const start = Math.floor(focused / perPage) * perPage;
@@ -5308,7 +5437,7 @@ async function runDoctorCI(options) {
5308
5437
  getUI().intro("Welcome to the PostHog setup wizard");
5309
5438
  getUI().log.info("Running posthog-doctor in CI mode");
5310
5439
  try {
5311
- const { getOrAskForProjectData } = await import("./setup-utils-6qyTDNyd.js").then((n) => n.r);
5440
+ const { getOrAskForProjectData } = await import("./setup-utils-Bh_HUFPV.js").then((n) => n.r);
5312
5441
  const { host, accessToken, projectId } = await getOrAskForProjectData({
5313
5442
  signup: false,
5314
5443
  ci: true,
@@ -5326,7 +5455,7 @@ async function runDoctorCI(options) {
5326
5455
  for (const issue of sorted) getUI().log.info(` • [${issue.severity}] ${getKindMeta(issue.kind).title}`);
5327
5456
  process.exit(1);
5328
5457
  } catch (error) {
5329
- const { ApiError } = await import("./api-BSq9hLu5.js").then((n) => n.n);
5458
+ const { ApiError } = await import("./api-BT317Fnl.js").then((n) => n.n);
5330
5459
  const message = error instanceof ApiError && error.statusCode === 401 ? "Your PostHog API key is invalid or expired." : error instanceof Error ? error.message : String(error);
5331
5460
  getUI().log.error(`Doctor failed: ${message}`);
5332
5461
  process.exit(1);
@@ -5408,7 +5537,7 @@ function runSlackConnect(argv) {
5408
5537
  (async () => {
5409
5538
  const debug = argv.debug;
5410
5539
  try {
5411
- const { startTUI } = await import("./start-tui-DNkm-n-4.js");
5540
+ const { startTUI } = await import("./start-tui-DEgpLYEQ.js");
5412
5541
  const { buildSession } = await import("./wizard-session-DsK16SGs.js");
5413
5542
  const tui = startTUI(VERSION, Program.SlackConnect);
5414
5543
  tui.store.session = buildSession({
@@ -5677,7 +5806,19 @@ const cliCommand = {
5677
5806
  //#region bin.ts
5678
5807
  const NODE_VERSION_RANGE = ">=22.22.0";
5679
5808
  if (!satisfies(process.version, NODE_VERSION_RANGE)) {
5680
- console.log(`PostHog wizard requires Node.js ${NODE_VERSION_RANGE}. You are using Node.js ${process.version}. Please upgrade your Node.js version.`);
5809
+ console.log([
5810
+ `The PostHog wizard needs a newer version of Node.js to run.`,
5811
+ ``,
5812
+ ` You have: ${process.version}`,
5813
+ ` You need: v${NODE_VERSION_RANGE.replace(">=", "")} or later`,
5814
+ ``,
5815
+ `To update Node.js:`,
5816
+ ``,
5817
+ ` Download the latest version from https://nodejs.org/en/download`,
5818
+ ` Or, if you use nvm, run: nvm install 22 && nvm use 22`,
5819
+ ``,
5820
+ `Then run the wizard again. Stuck? Email wizard@posthog.com and we'll help.`
5821
+ ].join("\n"));
5681
5822
  process.exit(1);
5682
5823
  }
5683
5824
  recoverOrphanedSettingsBackups(resolveInstallDir());
@@ -5691,6 +5832,6 @@ function resolveInstallDir() {
5691
5832
  }
5692
5833
  Wizard.use(basicIntegrationCommand).use(mcpCommand).use(mcpAnalyticsCommand).use(aiObservabilityCommand).use(cliCommand).use(auditCommand).use(doctorCommand).use(migrateCommand).use(revenueCommand).use(warehouseCommand).use(selfDrivingCommand).use(slackCommand).use(uploadSourcemapsCommand).use(skillCommand).init();
5693
5834
  //#endregion
5694
- export { STRIPE_SDKS as C, POSTHOG_SDKS as S, DISPLAY_NAME as _, useStdoutDimensions as a, fetchHealthIssues as b, runWizardHeadless as c, PROGRAM_REGISTRY as d, Program as f, AUTOMATABLE_VARIANTS as g, SELF_DRIVING_INTEGRATE_PATH_KEY as h, useKeyboardHintsContext as i, runWizardCI as l, detectSelfDrivingIntegrationProjects as m, useKeyBindings as n, ConfirmButton as o, getProgramConfig as p, KeyboardHintsProvider as r, PromptLabel as s, PickerMenu as t, runWizard as u, SOURCE_MAPS_CONTEXT_KEYS as v, getContentBlocks$3 as x, getKindMeta as y };
5835
+ export { getKindMeta as C, STRIPE_SDKS as D, POSTHOG_SDKS as E, SOURCE_MAPS_CONTEXT_KEYS as S, getContentBlocks$3 as T, DISPLAY_NAME as _, useStdoutDimensions as a, MANUAL_SDK_VARIANTS as b, runWizardHeadless as c, PROGRAM_REGISTRY as d, Program as f, AUTOMATABLE_VARIANTS as g, SELF_DRIVING_INTEGRATE_PATH_KEY as h, useKeyboardHintsContext as i, runWizardCI as l, detectSelfDrivingIntegrationProjects as m, useKeyBindings as n, ConfirmButton as o, getProgramConfig as p, KeyboardHintsProvider as r, PromptLabel as s, PickerMenu as t, runWizard as u, GO_SDK_MODULE as v, fetchHealthIssues as w, RUST_SDK_CRATE as x, MANUAL_SDK_INSTALL as y };
5695
5836
 
5696
5837
  //# sourceMappingURL=bin.js.map