@posthog/wizard 2.51.0 → 2.52.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 (91) hide show
  1. package/dist/{add-mcp-server-to-clients-C1f2al7N.js → add-mcp-server-to-clients-DJyWMMGj.js} +4 -4
  2. package/dist/{add-mcp-server-to-clients-C1f2al7N.js.map → add-mcp-server-to-clients-DJyWMMGj.js.map} +1 -1
  3. package/dist/{agent-interface-BL2wCV3b.js → agent-interface-DoFVHRFh.js} +6 -6
  4. package/dist/{agent-interface-BL2wCV3b.js.map → agent-interface-DoFVHRFh.js.map} +1 -1
  5. package/dist/{agent-prompt-loader-CEWWA98d.js → agent-prompt-loader-D-cPVoL5.js} +5 -5
  6. package/dist/{agent-prompt-loader-CEWWA98d.js.map → agent-prompt-loader-D-cPVoL5.js.map} +1 -1
  7. package/dist/{agent-runner-DSKXFDXa.js → agent-runner-B1qCtjid.js} +13 -13
  8. package/dist/{agent-runner-DSKXFDXa.js.map → agent-runner-B1qCtjid.js.map} +1 -1
  9. package/dist/{analytics-Ddf3zJgF.js → analytics-BXz4SIuS.js} +33 -20
  10. package/dist/analytics-BXz4SIuS.js.map +1 -0
  11. package/dist/analytics-D2xds3nw.js +2 -0
  12. package/dist/{api-BdanR3Zp.js → api-BaacjH-Y.js} +3 -3
  13. package/dist/{api-BdanR3Zp.js.map → api-BaacjH-Y.js.map} +1 -1
  14. package/dist/bin.js +50 -42
  15. package/dist/bin.js.map +1 -1
  16. package/dist/{bounded-fs-d0dw1Qv5.js → bounded-fs-Cx-8nk-1.js} +3 -3
  17. package/dist/{bounded-fs-d0dw1Qv5.js.map → bounded-fs-Cx-8nk-1.js.map} +1 -1
  18. package/dist/{ci-install-DnVNVs0f.js → ci-install-D1Mum8Ah.js} +4 -4
  19. package/dist/{ci-install-DnVNVs0f.js.map → ci-install-D1Mum8Ah.js.map} +1 -1
  20. package/dist/{debug-DaXKSXEy.js → debug-C3ZR1TVF.js} +10 -6
  21. package/dist/debug-C3ZR1TVF.js.map +1 -0
  22. package/dist/{debug-By1_VtgZ.js → debug-DsSCOPe8.js} +1 -1
  23. package/dist/{environment-DJQOs7MR.js → environment-Bi-zynk6.js} +4 -4
  24. package/dist/{environment-DJQOs7MR.js.map → environment-Bi-zynk6.js.map} +1 -1
  25. package/dist/{file-watcher-LZe_W3hM.js → file-watcher-PmRIDAfM.js} +2 -2
  26. package/dist/{file-watcher-LZe_W3hM.js.map → file-watcher-PmRIDAfM.js.map} +1 -1
  27. package/dist/{headless-ui-wIeUgvJ8.js → headless-ui-C4X9lAOY.js} +2 -2
  28. package/dist/{headless-ui-wIeUgvJ8.js.map → headless-ui-C4X9lAOY.js.map} +1 -1
  29. package/dist/{interactive-j4DoJDnk.js → interactive-HM71vLQe.js} +2 -2
  30. package/dist/{interactive-j4DoJDnk.js.map → interactive-HM71vLQe.js.map} +1 -1
  31. package/dist/mcp-D0Hpb_nk.js +64 -0
  32. package/dist/mcp-D0Hpb_nk.js.map +1 -0
  33. package/dist/{mcp-prompt-streaming-D25BQfRa.js → mcp-prompt-streaming-Crk8qFlQ.js} +3 -3
  34. package/dist/{mcp-prompt-streaming-D25BQfRa.js.map → mcp-prompt-streaming-Crk8qFlQ.js.map} +1 -1
  35. package/dist/{non-interactive-Cpof2JsA.js → non-interactive-DdUe8lqX.js} +2 -2
  36. package/dist/{non-interactive-Cpof2JsA.js.map → non-interactive-DdUe8lqX.js.map} +1 -1
  37. package/dist/{orchestrator-tools-CsJizPpV.js → orchestrator-tools-CpRruqZl.js} +3 -3
  38. package/dist/{orchestrator-tools-CsJizPpV.js.map → orchestrator-tools-CpRruqZl.js.map} +1 -1
  39. package/dist/{package-manager-DnzNEjci.js → package-manager-wkSzPJqW.js} +2 -2
  40. package/dist/{package-manager-DnzNEjci.js.map → package-manager-wkSzPJqW.js.map} +1 -1
  41. package/dist/{pi-DE2cAVfO.js → pi-CGPjm4oE.js} +14 -14
  42. package/dist/{pi-DE2cAVfO.js.map → pi-CGPjm4oE.js.map} +1 -1
  43. package/dist/{playground-C3sLBq6A.js → playground-lg7h9GHG.js} +6 -6
  44. package/dist/{playground-C3sLBq6A.js.map → playground-lg7h9GHG.js.map} +1 -1
  45. package/dist/{posthog-integration-_GSKRotZ.js → posthog-integration-pnxhTbxw.js} +14 -14
  46. package/dist/{posthog-integration-_GSKRotZ.js.map → posthog-integration-pnxhTbxw.js.map} +1 -1
  47. package/dist/{provisioning-BndgugFk.js → provisioning-T4jtJqBa.js} +3 -3
  48. package/dist/{provisioning-BndgugFk.js.map → provisioning-T4jtJqBa.js.map} +1 -1
  49. package/dist/{queue-tools-DZjAjiqk.js → queue-tools-D7ctuzyo.js} +3 -3
  50. package/dist/{queue-tools-DZjAjiqk.js.map → queue-tools-D7ctuzyo.js.map} +1 -1
  51. package/dist/{registry-BMjfECF2.js → registry-CsFuKtXn.js} +5 -5
  52. package/dist/{registry-BMjfECF2.js.map → registry-CsFuKtXn.js.map} +1 -1
  53. package/dist/{security-D5hjYVFi.js → security-YAaZfmHs.js} +4 -4
  54. package/dist/{security-D5hjYVFi.js.map → security-YAaZfmHs.js.map} +1 -1
  55. package/dist/{setup-utils-ZKEk71yV.js → setup-utils-DDzEnDxJ.js} +8 -8
  56. package/dist/{setup-utils-ZKEk71yV.js.map → setup-utils-DDzEnDxJ.js.map} +1 -1
  57. package/dist/{start-tui-B2Tb427o.js → start-tui-pCi7WVAK.js} +70 -85
  58. package/dist/start-tui-pCi7WVAK.js.map +1 -0
  59. package/dist/{steps-ClMZ6MZd.js → steps-DmsrBqb9.js} +7 -7
  60. package/dist/{steps-ClMZ6MZd.js.map → steps-DmsrBqb9.js.map} +1 -1
  61. package/dist/{store-Db77bfRv.js → store-BCRdtfOH.js} +4 -4
  62. package/dist/{store-Db77bfRv.js.map → store-BCRdtfOH.js.map} +1 -1
  63. package/dist/{subagent--VXEEc8S.js → subagent-jNXS8IPU.js} +2 -2
  64. package/dist/{subagent--VXEEc8S.js.map → subagent-jNXS8IPU.js.map} +1 -1
  65. package/dist/{task-CBQfx_f5.js → task-CSmrfyNf.js} +12 -13
  66. package/dist/task-CSmrfyNf.js.map +1 -0
  67. package/dist/{task-stream-DCrqCmFa.js → task-stream-BZOjOhKu.js} +3 -3
  68. package/dist/{task-stream-DCrqCmFa.js.map → task-stream-BZOjOhKu.js.map} +1 -1
  69. package/dist/{tasks-BJuz1XQ1.js → tasks-BMgQt251.js} +2 -2
  70. package/dist/{tasks-BJuz1XQ1.js.map → tasks-BMgQt251.js.map} +1 -1
  71. package/dist/{telemetry-tdU6F90U.js → telemetry-qeKIGkte.js} +3 -3
  72. package/dist/{telemetry-tdU6F90U.js.map → telemetry-qeKIGkte.js.map} +1 -1
  73. package/dist/{terminal-ClWui_UN.js → terminal-tbxhJGlI.js} +11 -11
  74. package/dist/{terminal-ClWui_UN.js.map → terminal-tbxhJGlI.js.map} +1 -1
  75. package/dist/{tools-DwpaEyEv.js → tools-DVnBIYFn.js} +7 -7
  76. package/dist/{tools-DwpaEyEv.js.map → tools-DVnBIYFn.js.map} +1 -1
  77. package/dist/{wizard-abort-B1iPXM3K.js → wizard-abort-AEhoDJ4P.js} +3 -3
  78. package/dist/{wizard-abort-B1iPXM3K.js.map → wizard-abort-AEhoDJ4P.js.map} +1 -1
  79. package/dist/{wizard-abort-cX4Kytai.js → wizard-abort-DHC_XStW.js} +1 -1
  80. package/dist/{yara-hooks-CEs3jx7j.js → yara-hooks-CKsVxWiN.js} +4 -4
  81. package/dist/{yara-hooks-CEs3jx7j.js.map → yara-hooks-CKsVxWiN.js.map} +1 -1
  82. package/dist/yara-hooks-DWRdZQuG.js +2 -0
  83. package/package.json +6 -6
  84. package/dist/analytics-Ddf3zJgF.js.map +0 -1
  85. package/dist/analytics-GD_xM1XO.js +0 -2
  86. package/dist/debug-DaXKSXEy.js.map +0 -1
  87. package/dist/mcp-Butt7ktW.js +0 -104
  88. package/dist/mcp-Butt7ktW.js.map +0 -1
  89. package/dist/start-tui-B2Tb427o.js.map +0 -1
  90. package/dist/task-CBQfx_f5.js.map +0 -1
  91. package/dist/yara-hooks-gz4AceFG.js +0 -2
@@ -1,23 +1,24 @@
1
- import { G as POSTHOG_ORG_AI_SETTINGS_URL, H as POSTHOG_DOCS_URL, I as Integration, K as POSTHOG_PRIVACY_URL, L as OAUTH_PORTS, Q as REMOTE_SKILLS_BASE_URL, R as OAUTH_TIMEOUT_MS, X as POSTHOG_TERMS_URL, d as relativeToInstallDir, g as SIGNUP_WIZARD_READINESS_CONFIG, l as WIZARD_LOG_FILE, p as setUI, s as logToFile, ut as WIZARD_TOOLS_MENU_FLAG_KEY, v as getBlockingServiceKeys } from "./debug-DaXKSXEy.js";
2
- import { n as analytics } from "./analytics-Ddf3zJgF.js";
3
- import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-ZKEk71yV.js";
4
- import { t as ApiError } from "./api-BdanR3Zp.js";
1
+ import { G as POSTHOG_ORG_AI_SETTINGS_URL, H as POSTHOG_DOCS_URL, I as Integration, K as POSTHOG_PRIVACY_URL, L as OAUTH_PORTS, Q as REMOTE_SKILLS_BASE_URL, R as OAUTH_TIMEOUT_MS, X as POSTHOG_TERMS_URL, d as relativeToInstallDir, g as SIGNUP_WIZARD_READINESS_CONFIG, l as WIZARD_LOG_FILE, p as setUI, s as logToFile, v as getBlockingServiceKeys } from "./debug-C3ZR1TVF.js";
2
+ import { n as analytics } from "./analytics-BXz4SIuS.js";
3
+ import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-DDzEnDxJ.js";
4
+ import { t as ApiError } from "./api-BaacjH-Y.js";
5
5
  import { t as ADDITIONAL_FEATURE_LABELS } from "./wizard-session-BAZql11N.js";
6
- import { i as wizardAbort } from "./wizard-abort-B1iPXM3K.js";
7
- import { a as formatTokenCount, i as formatCostUsd } from "./agent-runner-DSKXFDXa.js";
8
- import { b as fetchSkillMenu, v as downloadSkill } from "./agent-interface-BL2wCV3b.js";
9
- import { _ as AUDIT_CHECKS_KEY, b as coerceAuditChecks, g as AUDIT_CHECKS_FILE, x as getAuditChecks, y as AUDIT_SEVERITY_STYLE } from "./yara-hooks-CEs3jx7j.js";
10
- import { t as FRAMEWORK_REGISTRY } from "./registry-BMjfECF2.js";
11
- import { b as detectProjectsWithAgent, m as Icons, p as Colors, t as SETUP_REPORT_FILE, v as getDetectedWarehouseSources } from "./posthog-integration-_GSKRotZ.js";
6
+ import { i as wizardAbort } from "./wizard-abort-AEhoDJ4P.js";
7
+ import { a as formatTokenCount, i as formatCostUsd } from "./agent-runner-B1qCtjid.js";
8
+ import { b as fetchSkillMenu, v as downloadSkill } from "./agent-interface-DoFVHRFh.js";
9
+ import { _ as AUDIT_CHECKS_KEY, b as coerceAuditChecks, g as AUDIT_CHECKS_FILE, x as getAuditChecks, y as AUDIT_SEVERITY_STYLE } from "./yara-hooks-CKsVxWiN.js";
10
+ import { t as FRAMEWORK_REGISTRY } from "./registry-CsFuKtXn.js";
11
+ import { b as detectProjectsWithAgent, m as Icons, p as Colors, t as SETUP_REPORT_FILE, v as getDetectedWarehouseSources } from "./posthog-integration-pnxhTbxw.js";
12
12
  import { S as STRIPE_SDKS, _ as SOURCE_MAPS_CONTEXT_KEYS, b as getContentBlocks, d as Program, f as getProgramConfig, g as DISPLAY_NAME, h as AUTOMATABLE_VARIANTS, m as SELF_DRIVING_INTEGRATE_PATH_KEY, n as useKeyBindings, p as detectSelfDrivingIntegrationProjects, t as PickerMenu, x as POSTHOG_SDKS, y as fetchHealthIssues } from "./bin.js";
13
- import { r as totalTokenCount, t as WizardStore } from "./store-Db77bfRv.js";
14
- import { A as ConfirmationInput, C as TabContainer, D as LinkText, E as LogViewer, F as SplitView, M as useStdoutDimensions, N as ProgressList, O as extractUrls, P as LoadingBox, S as HNViewer, T as EventPlanViewer, _ as SEVERITY_ORDER, a as useSkillEntry, b as LearnCard, c as SlackConnectScreen, d as AuditChecksViewer, f as McpSuggestedPromptsScreen, g as SEVERITY_LABEL, h as IssueTable, i as SkillSourceInfo, k as ModalOverlay, l as AUDIT_AREA_SLIDES, m as McpScreen, n as releaseTerminal, o as OutroScreen, r as AiOptInRequiredScreen, s as useDismissOnAnyKey, t as enterDarkTerminal, u as VisualBox, v as ServiceHealthList, w as ScreenContainer, y as TipsCard } from "./terminal-ClWui_UN.js";
13
+ import { r as totalTokenCount, t as WizardStore } from "./store-BCRdtfOH.js";
14
+ import { A as ConfirmationInput, C as TabContainer, D as LinkText, E as LogViewer, F as SplitView, M as useStdoutDimensions, N as ProgressList, O as extractUrls, P as LoadingBox, S as HNViewer, T as EventPlanViewer, _ as SEVERITY_ORDER, a as useSkillEntry, b as LearnCard, c as SlackConnectScreen, d as AuditChecksViewer, f as McpSuggestedPromptsScreen, g as SEVERITY_LABEL, h as IssueTable, i as SkillSourceInfo, k as ModalOverlay, l as AUDIT_AREA_SLIDES, m as McpScreen, n as releaseTerminal, o as OutroScreen, r as AiOptInRequiredScreen, s as useDismissOnAnyKey, t as enterDarkTerminal, u as VisualBox, v as ServiceHealthList, w as ScreenContainer, y as TipsCard } from "./terminal-tbxhJGlI.js";
15
15
  import { t as ALL_FEATURE_VALUES } from "./defaults-DAE9_QMn.js";
16
- import { t as startFileWatcher } from "./file-watcher-LZe_W3hM.js";
17
- import { a as getSupportedClients, c as removeMCPServer, i as getInstalledClients, o as getSupportedPluginClients, s as installPlugins, u as isPluginCapable } from "./add-mcp-server-to-clients-C1f2al7N.js";
18
- import path from "path";
16
+ import { t as startFileWatcher } from "./file-watcher-PmRIDAfM.js";
17
+ import { a as getSupportedClients, c as removeMCPServer, i as getInstalledClients, o as getSupportedPluginClients, s as installPlugins, u as isPluginCapable } from "./add-mcp-server-to-clients-DJyWMMGj.js";
18
+ import { existsSync } from "fs";
19
+ import path, { join } from "path";
19
20
  import { join as join$1 } from "node:path";
20
- import { spawn, spawnSync } from "node:child_process";
21
+ import { spawn } from "node:child_process";
21
22
  import { Box, Text, render, useInput } from "ink";
22
23
  import { Fragment, createElement, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
23
24
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -1056,19 +1057,6 @@ const PrivacyPanel = () => {
1056
1057
  * 3. Unsupported version: upgrade prompt
1057
1058
  * 4. Detection succeeded: continue/change-framework/cancel
1058
1059
  */
1059
- const TOOLS = [{
1060
- label: "Troubleshoot Integration",
1061
- command: "doctor"
1062
- }];
1063
- function launchTool(command, installDir) {
1064
- releaseTerminal();
1065
- const result = spawnSync(process.execPath, [
1066
- process.argv[1],
1067
- command,
1068
- `--install-dir=${installDir}`
1069
- ], { stdio: "inherit" });
1070
- process.exit(result.status ?? 0);
1071
- }
1072
1060
  /** Framework picker shown when auto-detection fails. */
1073
1061
  const FrameworkPicker = ({ store, onComplete }) => {
1074
1062
  return /* @__PURE__ */ jsx(PickerMenu, {
@@ -1081,7 +1069,7 @@ const FrameworkPicker = ({ store, onComplete }) => {
1081
1069
  })),
1082
1070
  onSelect: (value) => {
1083
1071
  const integration = Array.isArray(value) ? value[0] : value;
1084
- import("./registry-BMjfECF2.js").then((n) => n.n).then(({ FRAMEWORK_REGISTRY }) => {
1072
+ import("./registry-CsFuKtXn.js").then((n) => n.n).then(({ FRAMEWORK_REGISTRY }) => {
1085
1073
  const config = FRAMEWORK_REGISTRY[integration];
1086
1074
  store.setFrameworkConfig(integration, config);
1087
1075
  store.setDetectedFramework(config.metadata.name);
@@ -1095,17 +1083,6 @@ const PostHogIntegrationIntroScreen = ({ store }) => {
1095
1083
  const [pickingFramework, setPickingFramework] = useState(false);
1096
1084
  const [manuallySelected, setManuallySelected] = useState(false);
1097
1085
  const [view, setView] = useState("default");
1098
- const [toolsEnabled, setToolsEnabled] = useState(false);
1099
- useEffect(() => {
1100
- let cancelled = false;
1101
- analytics.getAllFlagsForWizard().then((flags) => {
1102
- const value = flags[WIZARD_TOOLS_MENU_FLAG_KEY];
1103
- if (!cancelled && value && value !== "false") setToolsEnabled(true);
1104
- });
1105
- return () => {
1106
- cancelled = true;
1107
- };
1108
- }, []);
1109
1086
  const { session } = store;
1110
1087
  const config = session.frameworkConfig;
1111
1088
  const frameworkLabel = session.detectedFrameworkLabel ?? config?.metadata.name;
@@ -1244,14 +1221,7 @@ const PostHogIntegrationIntroScreen = ({ store }) => {
1244
1221
  ]
1245
1222
  });
1246
1223
  let menuOptions = null;
1247
- if (view === "tools") menuOptions = [...TOOLS.map((t) => ({
1248
- label: t.label,
1249
- value: t.command
1250
- })), {
1251
- label: "Back",
1252
- value: "back"
1253
- }];
1254
- else if (view === "more-info") menuOptions = [{
1224
+ if (view === "more-info") menuOptions = [{
1255
1225
  label: "Back",
1256
1226
  value: "back"
1257
1227
  }, {
@@ -1271,10 +1241,6 @@ const PostHogIntegrationIntroScreen = ({ store }) => {
1271
1241
  label: "Change framework",
1272
1242
  value: "framework"
1273
1243
  },
1274
- ...toolsEnabled ? [{
1275
- label: "Tools",
1276
- value: "tools"
1277
- }] : [],
1278
1244
  {
1279
1245
  label: "More info",
1280
1246
  value: "more-info"
@@ -1289,18 +1255,12 @@ const PostHogIntegrationIntroScreen = ({ store }) => {
1289
1255
  value,
1290
1256
  view
1291
1257
  });
1292
- if (view === "tools") {
1293
- if (value === "back") setView("default");
1294
- else launchTool(value, session.installDir);
1295
- return;
1296
- }
1297
1258
  if (value === "cancel") process.exit(0);
1298
1259
  else if (value === "framework") {
1299
1260
  setPickingFramework(true);
1300
1261
  setManuallySelected(true);
1301
1262
  } else if (value === "more-info") setView("more-info");
1302
1263
  else if (value === "privacy") setView("privacy");
1303
- else if (value === "tools") setView("tools");
1304
1264
  else if (value === "back") setView(view === "privacy" ? "more-info" : "default");
1305
1265
  else store.completeSetup();
1306
1266
  };
@@ -1902,14 +1862,15 @@ const SourceMapsIntroScreen = ({ store }) => {
1902
1862
  /**
1903
1863
  * Variant precedence for the agentic picker (most specific first). The detector
1904
1864
  * keeps the EARLIEST matching target. Unsupported native targets are included
1905
- * as guards before Android and iOS so React Native and Flutter projects with
1906
- * nested Gradle or Xcode manifests are not misclassified as instrumentable
1907
- * native apps. JS ordering mirrors `pickJsVariant` in detect.ts: opinionated
1908
- * frameworks → bundlers → bare React → Node → generic web.
1865
+ * as guards before Android and iOS so React Native projects with nested Gradle
1866
+ * or Xcode manifests are not misclassified as instrumentable native apps. JS
1867
+ * ordering mirrors `pickJsVariant` in detect.ts: opinionated frameworks →
1868
+ * bundlers → bare React → Node → generic web.
1909
1869
  */
1910
- const NON_AUTOMATABLE_NATIVE_VARIANTS = ["react-native", "flutter"];
1870
+ const NON_AUTOMATABLE_NATIVE_VARIANTS = ["react-native"];
1911
1871
  const VARIANT_PRECEDENCE = [
1912
1872
  ...NON_AUTOMATABLE_NATIVE_VARIANTS,
1873
+ "flutter",
1913
1874
  "android",
1914
1875
  "ios",
1915
1876
  "nextjs",
@@ -1935,34 +1896,58 @@ const SOURCE_MAPS_TARGETS = [...NON_AUTOMATABLE_NATIVE_VARIANTS, ...AUTOMATABLE_
1935
1896
  id: v,
1936
1897
  name: DISPLAY_NAME[v]
1937
1898
  }));
1938
- function classify(variant, hasPostHog) {
1939
- if (variant == null) return {
1899
+ function isAutomatableVariant(value) {
1900
+ return value !== null && AUTOMATABLE_VARIANTS.includes(value);
1901
+ }
1902
+ const FLUTTER_NO_BUILD_TARGET_REASON = "Flutter project has no web, android or ios target — nothing to upload symbols for";
1903
+ /**
1904
+ * True when the Flutter project at `projectPath` has at least one platform
1905
+ * target the wizard can wire uploads into: web (dart2js source maps), android
1906
+ * (R8 mapping files) or ios (dSYMs). `flutter create` scaffolds a directory per
1907
+ * enabled platform, so their absence means this is a pure Dart package or
1908
+ * plugin — it produces no app build, and there is nothing to upload.
1909
+ */
1910
+ function projectHasBuildTarget(installDir, projectPath) {
1911
+ const root = join(installDir, projectPath);
1912
+ return existsSync(join(root, "web", "index.html")) || existsSync(join(root, "android")) || existsSync(join(root, "ios"));
1913
+ }
1914
+ /** Classify one agent-detected project for source-map upload. */
1915
+ function classifyProject(p, hasBuildTarget) {
1916
+ const base = {
1917
+ path: p.path,
1918
+ framework: p.framework,
1919
+ hasPostHog: p.hasPostHog
1920
+ };
1921
+ const namesForeignNativePlatform = /\b(?:react[\s-]*native|expo)\b/i.test(p.framework) || /\bflutter\b/i.test(p.framework) && p.targetId !== "flutter";
1922
+ if (!isAutomatableVariant(p.targetId) || namesForeignNativePlatform) return {
1923
+ ...base,
1924
+ variant: null,
1940
1925
  instrumentable: false,
1941
1926
  reason: "Source-map upload isn't supported for this stack yet"
1942
1927
  };
1943
- if (!hasPostHog) return {
1928
+ if (p.targetId === "flutter" && !hasBuildTarget(p.path)) return {
1929
+ ...base,
1930
+ variant: null,
1931
+ instrumentable: false,
1932
+ reason: FLUTTER_NO_BUILD_TARGET_REASON
1933
+ };
1934
+ if (!p.hasPostHog) return {
1935
+ ...base,
1936
+ variant: p.targetId,
1944
1937
  instrumentable: false,
1945
1938
  reason: "No PostHog SDK installed yet — run `npx @posthog/wizard` first"
1946
1939
  };
1947
- return { instrumentable: true };
1948
- }
1949
- function isAutomatableVariant(value) {
1950
- return value !== null && AUTOMATABLE_VARIANTS.includes(value);
1940
+ return {
1941
+ ...base,
1942
+ variant: p.targetId,
1943
+ instrumentable: true
1944
+ };
1951
1945
  }
1952
1946
  /** Map a generic detection report into source-maps projects. */
1953
- function toSourceMapsReport(report) {
1947
+ function toSourceMapsReport(report, hasBuildTarget) {
1954
1948
  return {
1955
1949
  repoType: report.repoType,
1956
- projects: report.projects.map((p) => {
1957
- const variant = isAutomatableVariant(p.targetId) && !/\b(?:react[\s-]*native|expo|flutter)\b/i.test(p.framework) ? p.targetId : null;
1958
- return {
1959
- path: p.path,
1960
- framework: p.framework,
1961
- variant,
1962
- hasPostHog: p.hasPostHog,
1963
- ...classify(variant, p.hasPostHog)
1964
- };
1965
- })
1950
+ projects: report.projects.map((p) => classifyProject(p, hasBuildTarget))
1966
1951
  };
1967
1952
  }
1968
1953
  /** Run the Haiku detector over the repo and classify projects for source maps. */
@@ -1971,7 +1956,7 @@ async function detectSourceMapsProjects(session, onEvent) {
1971
1956
  targets: SOURCE_MAPS_TARGETS,
1972
1957
  purpose: "set up PostHog Error Tracking source-map upload",
1973
1958
  onEvent
1974
- }));
1959
+ }), (path) => projectHasBuildTarget(session.installDir, path));
1975
1960
  }
1976
1961
  //#endregion
1977
1962
  //#region src/ui/tui/screens/SourceMapsDetectScreen.tsx
@@ -5295,7 +5280,7 @@ function createMcpSuggestedPromptsServices(store) {
5295
5280
  };
5296
5281
  }
5297
5282
  async function* runProductionPromptStreaming(args) {
5298
- const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-D25BQfRa.js");
5283
+ const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-Crk8qFlQ.js");
5299
5284
  yield* runMcpPromptViaSdk(args);
5300
5285
  }
5301
5286
  //#endregion
@@ -5472,4 +5457,4 @@ function startTUI(version, program = Program.PostHogIntegration) {
5472
5457
  //#endregion
5473
5458
  export { startTUI };
5474
5459
 
5475
- //# sourceMappingURL=start-tui-B2Tb427o.js.map
5460
+ //# sourceMappingURL=start-tui-pCi7WVAK.js.map