@posthog/wizard 2.82.0 → 2.84.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 (149) hide show
  1. package/README.md +1 -29
  2. package/dist/{PickerMenu-BGGeYqd-.js → PickerMenu-BtheKi1o.js} +1 -1
  3. package/dist/{PickerMenu-BGGeYqd-.js.map → PickerMenu-BtheKi1o.js.map} +1 -1
  4. package/dist/_dev-only-stub-B0db0Klc.js +1 -0
  5. package/dist/{agent-interface-3YfIWZmY.js → agent-interface-BNssNetq.js} +86 -32
  6. package/dist/agent-interface-BNssNetq.js.map +1 -0
  7. package/dist/{agent-prompt-loader-hOHONY7u.js → agent-prompt-loader-iV11XVEF.js} +16 -8
  8. package/dist/agent-prompt-loader-iV11XVEF.js.map +1 -0
  9. package/dist/{analytics-B_xFshPY.js → analytics-Drox5LSW.js} +7 -5
  10. package/dist/analytics-Drox5LSW.js.map +1 -0
  11. package/dist/analytics-Ix9HEra3.js +2 -0
  12. package/dist/{api-C_9KsN-7.js → api-Dfu655Qt.js} +2 -2
  13. package/dist/{api-C_9KsN-7.js.map → api-Dfu655Qt.js.map} +1 -1
  14. package/dist/api-H2UaPgjv.js +2 -0
  15. package/dist/{api-key-login-oUJQDmOV.js → api-key-login-BgwfAXfv.js} +5 -5
  16. package/dist/{api-key-login-oUJQDmOV.js.map → api-key-login-BgwfAXfv.js.map} +1 -1
  17. package/dist/api-key-login-Cow3UDAN.js +2 -0
  18. package/dist/bin.js +1 -1
  19. package/dist/{bounded-fs-iRaQcKYL.js → bounded-fs-TRL6IsoU.js} +32 -16
  20. package/dist/bounded-fs-TRL6IsoU.js.map +1 -0
  21. package/dist/{ci-install-BGlijoTo.js → ci-install-nc1IKuX2.js} +6 -6
  22. package/dist/{ci-install-BGlijoTo.js.map → ci-install-nc1IKuX2.js.map} +1 -1
  23. package/dist/{console-log-DJiTqYT2.js → console-log-BMhBoX-o.js} +2 -2
  24. package/dist/{console-log-DJiTqYT2.js.map → console-log-BMhBoX-o.js.map} +1 -1
  25. package/dist/{debug-BvEbemym.js → debug-BfO_Txo8.js} +3 -3
  26. package/dist/debug-BfO_Txo8.js.map +1 -0
  27. package/dist/{defaults-DDVl3tKN.js → defaults-BWLIffh5.js} +1 -1
  28. package/dist/{defaults-DDVl3tKN.js.map → defaults-BWLIffh5.js.map} +1 -1
  29. package/dist/{errors-DhFeR8Sp.js → errors-BXlWujEw.js} +1 -1
  30. package/dist/{errors-DhFeR8Sp.js.map → errors-BXlWujEw.js.map} +1 -1
  31. package/dist/{family-picker-BKs-tTyu.js → family-picker-CAW_VtYf.js} +2 -2
  32. package/dist/{family-picker-BKs-tTyu.js.map → family-picker-CAW_VtYf.js.map} +1 -1
  33. package/dist/{gateway-CWoYlPz7.js → gateway-CLQQb96F.js} +39 -9
  34. package/dist/{gateway-CWoYlPz7.js.map → gateway-CLQQb96F.js.map} +1 -1
  35. package/dist/headless-CHGNEzO3.js +3 -0
  36. package/dist/{headless-Bfi950Qh.js → headless-DMO8N_FD.js} +2 -2
  37. package/dist/{headless-Bfi950Qh.js.map → headless-DMO8N_FD.js.map} +1 -1
  38. package/dist/{host-resolution-BxnNn8Jm.js → host-resolution-DftfSjJD.js} +4 -4
  39. package/dist/{host-resolution-BxnNn8Jm.js.map → host-resolution-DftfSjJD.js.map} +1 -1
  40. package/dist/{install-CDVeUT_5.js → install-C9FPM37m.js} +6 -6
  41. package/dist/{install-CDVeUT_5.js.map → install-C9FPM37m.js.map} +1 -1
  42. package/dist/{install-CX65IxGa.js → install-MWoo1hXL.js} +1 -1
  43. package/dist/{interactive-5-Numwwb.js → interactive-DOnolJHB.js} +3 -3
  44. package/dist/{interactive-5-Numwwb.js.map → interactive-DOnolJHB.js.map} +1 -1
  45. package/dist/{links-Dmj3Wj9X.js → links-CatXPRxH.js} +3 -3
  46. package/dist/{links-Dmj3Wj9X.js.map → links-CatXPRxH.js.map} +1 -1
  47. package/dist/{main-5KNn80Vt.js → main-CINmZtoW.js} +27 -24
  48. package/dist/main-CINmZtoW.js.map +1 -0
  49. package/dist/{mcp-Buf9sfFm.js → mcp-KVV6Z_bq.js} +3 -3
  50. package/dist/{mcp-Buf9sfFm.js.map → mcp-KVV6Z_bq.js.map} +1 -1
  51. package/dist/{mcp-prompt-streaming-DHPxJK-F.js → mcp-prompt-streaming-M6UnLgGX.js} +5 -5
  52. package/dist/{mcp-prompt-streaming-DHPxJK-F.js.map → mcp-prompt-streaming-M6UnLgGX.js.map} +1 -1
  53. package/dist/{mode-label-DB3ol_sj.js → mode-label--bJuXny5.js} +1 -1
  54. package/dist/{mode-label-DB3ol_sj.js.map → mode-label--bJuXny5.js.map} +1 -1
  55. package/dist/{models-C9rjXPZ6.js → models-B0huHItG.js} +6 -2
  56. package/dist/models-B0huHItG.js.map +1 -0
  57. package/dist/{non-interactive-DkldwWDM.js → non-interactive-DiEu4_6l.js} +3 -3
  58. package/dist/{non-interactive-DkldwWDM.js.map → non-interactive-DiEu4_6l.js.map} +1 -1
  59. package/dist/{oauth-session-Bi1MLRCC.js → oauth-session-9EU3ky0v.js} +2 -2
  60. package/dist/{oauth-session-Bi1MLRCC.js.map → oauth-session-9EU3ky0v.js.map} +1 -1
  61. package/dist/{orchestrator-tools-DyKws92o.js → orchestrator-tools-QWyDLu_7.js} +3 -3
  62. package/dist/{orchestrator-tools-DyKws92o.js.map → orchestrator-tools-QWyDLu_7.js.map} +1 -1
  63. package/dist/package-json-BAtJRHSq.js +2 -0
  64. package/dist/{package-json-2UrhE6kP.js → package-json-z1agAYXs.js} +1 -1
  65. package/dist/{package-json-2UrhE6kP.js.map → package-json-z1agAYXs.js.map} +1 -1
  66. package/dist/{package-manager-DpCdmMmB.js → package-manager-B-9I_fAT.js} +4 -4
  67. package/dist/{package-manager-DpCdmMmB.js.map → package-manager-B-9I_fAT.js.map} +1 -1
  68. package/dist/{pi-DTj1hsJe.js → pi-BSnSk6rv.js} +50 -31
  69. package/dist/pi-BSnSk6rv.js.map +1 -0
  70. package/dist/{playground-CiH6zZPb.js → playground-Drz1qszs.js} +4 -4
  71. package/dist/{playground-CiH6zZPb.js.map → playground-Drz1qszs.js.map} +1 -1
  72. package/dist/{posthog-integration-CpinLWNO.js → posthog-integration-mIQGBc1f.js} +883 -2513
  73. package/dist/posthog-integration-mIQGBc1f.js.map +1 -0
  74. package/dist/programs-Bv0_YHzE.js +3 -0
  75. package/dist/{programs-Bq9Ju9xk.js → programs-mxhRXwP-.js} +306 -125
  76. package/dist/programs-mxhRXwP-.js.map +1 -0
  77. package/dist/provisioning-BVsxSNve.js +2 -0
  78. package/dist/{provisioning-D-AM_7DG.js → provisioning-CHUjae9V.js} +4 -4
  79. package/dist/{provisioning-D-AM_7DG.js.map → provisioning-CHUjae9V.js.map} +1 -1
  80. package/dist/{queue-tools-BoIITT7w.js → queue-tools-PFG6H93Q.js} +14 -5
  81. package/dist/queue-tools-PFG6H93Q.js.map +1 -0
  82. package/dist/{results-CDqlHogZ.js → results-5yCKf2cI.js} +2 -2
  83. package/dist/{results-CDqlHogZ.js.map → results-5yCKf2cI.js.map} +1 -1
  84. package/dist/{run-CfMArkpV.js → run-D5TKJuSL.js} +10 -10
  85. package/dist/{run-CfMArkpV.js.map → run-D5TKJuSL.js.map} +1 -1
  86. package/dist/{run-DcaVJSeI.js → run-W03b6jNM.js} +12 -12
  87. package/dist/{run-DcaVJSeI.js.map → run-W03b6jNM.js.map} +1 -1
  88. package/dist/{run-tool-DJZWnnR9.js → run-tool-DTQF8mmI.js} +17 -17
  89. package/dist/{run-tool-DJZWnnR9.js.map → run-tool-DTQF8mmI.js.map} +1 -1
  90. package/dist/run-tool-DjERhu7G.js +2 -0
  91. package/dist/{runners-Cvnk9BcA.js → runners-B_84kPyf.js} +11 -11
  92. package/dist/{runners-Cvnk9BcA.js.map → runners-B_84kPyf.js.map} +1 -1
  93. package/dist/{security-Cz3a-d7r.js → security-pApVawYb.js} +6 -5
  94. package/dist/{security-Cz3a-d7r.js.map → security-pApVawYb.js.map} +1 -1
  95. package/dist/{setup-utils-C7kaDP5X.js → setup-utils-CQY8PHjR.js} +3 -3
  96. package/dist/{setup-utils-C7kaDP5X.js.map → setup-utils-CQY8PHjR.js.map} +1 -1
  97. package/dist/{start-playground-B62_pYfu.js → start-playground-DAw1GbLt.js} +8 -8
  98. package/dist/{start-playground-B62_pYfu.js.map → start-playground-DAw1GbLt.js.map} +1 -1
  99. package/dist/{subagent-BBfETG17.js → subagent-YLGSvgoZ.js} +13 -5
  100. package/dist/subagent-YLGSvgoZ.js.map +1 -0
  101. package/dist/{task-CmNe3xeg.js → task-3hRSovmK.js} +39 -29
  102. package/dist/task-3hRSovmK.js.map +1 -0
  103. package/dist/{tasks-BfJhVky2.js → tasks-C03QbXTx.js} +1 -1
  104. package/dist/{tasks-BfJhVky2.js.map → tasks-C03QbXTx.js.map} +1 -1
  105. package/dist/{telemetry-DKM7VGuJ.js → telemetry-BPBzqsb_.js} +2 -2
  106. package/dist/{telemetry-DKM7VGuJ.js.map → telemetry-BPBzqsb_.js.map} +1 -1
  107. package/dist/{terminal-Bkxwzkhn.js → terminal-DZsYFbm9.js} +471 -81
  108. package/dist/terminal-DZsYFbm9.js.map +1 -0
  109. package/dist/{tools-DZCEvDv9.js → tools-D_AtrhbO.js} +15 -15
  110. package/dist/{tools-DZCEvDv9.js.map → tools-D_AtrhbO.js.map} +1 -1
  111. package/dist/{tools-Bm0FDT6f.js → tools-DyzRi_dQ.js} +8 -8
  112. package/dist/{tools-Bm0FDT6f.js.map → tools-DyzRi_dQ.js.map} +1 -1
  113. package/dist/{tui-B56jvkbi.js → tui-CRp0iCuT.js} +5 -5
  114. package/dist/tui-CRp0iCuT.js.map +1 -0
  115. package/dist/{tui-tKI95MSr.js → tui-UI6ctBQJ.js} +1 -1
  116. package/dist/{upload-step-DqTgn6UB.js → upload-step-DrYXnpzI.js} +3 -3
  117. package/dist/{upload-step-DqTgn6UB.js.map → upload-step-DrYXnpzI.js.map} +1 -1
  118. package/dist/{urls-B82v7gfO.js → urls-WeqfBLP4.js} +2 -2
  119. package/dist/{urls-B82v7gfO.js.map → urls-WeqfBLP4.js.map} +1 -1
  120. package/dist/{wizard-abort-Cd-7sfCw.js → wizard-abort-BwEefm6P.js} +5 -5
  121. package/dist/{wizard-abort-Cd-7sfCw.js.map → wizard-abort-BwEefm6P.js.map} +1 -1
  122. package/dist/yara-hooks-MDtFbuoM.js +2 -0
  123. package/dist/{yara-hooks-BS0n3ekf.js → yara-hooks-aDbdsitJ.js} +41 -5
  124. package/dist/{yara-hooks-BS0n3ekf.js.map → yara-hooks-aDbdsitJ.js.map} +1 -1
  125. package/package.json +9 -7
  126. package/dist/agent-interface-3YfIWZmY.js.map +0 -1
  127. package/dist/agent-prompt-loader-hOHONY7u.js.map +0 -1
  128. package/dist/analytics-B_xFshPY.js.map +0 -1
  129. package/dist/analytics-DGDr6-iD.js +0 -2
  130. package/dist/api-DhLSO3ai.js +0 -2
  131. package/dist/api-key-login-DiRuZ8Lm.js +0 -2
  132. package/dist/bounded-fs-iRaQcKYL.js.map +0 -1
  133. package/dist/debug-BvEbemym.js.map +0 -1
  134. package/dist/headless-Gisv3faN.js +0 -3
  135. package/dist/main-5KNn80Vt.js.map +0 -1
  136. package/dist/models-C9rjXPZ6.js.map +0 -1
  137. package/dist/package-json-Dblip2_X.js +0 -2
  138. package/dist/pi-DTj1hsJe.js.map +0 -1
  139. package/dist/posthog-integration-CpinLWNO.js.map +0 -1
  140. package/dist/programs-Bq9Ju9xk.js.map +0 -1
  141. package/dist/programs-CnOSdQo1.js +0 -3
  142. package/dist/provisioning-D6Cqbc36.js +0 -2
  143. package/dist/queue-tools-BoIITT7w.js.map +0 -1
  144. package/dist/run-tool-zMLQroVh.js +0 -2
  145. package/dist/subagent-BBfETG17.js.map +0 -1
  146. package/dist/task-CmNe3xeg.js.map +0 -1
  147. package/dist/terminal-Bkxwzkhn.js.map +0 -1
  148. package/dist/tui-B56jvkbi.js.map +0 -1
  149. package/dist/yara-hooks-CxksH-GZ.js +0 -2
@@ -1,23 +1,23 @@
1
1
  import { n as ErrorCodes } from "./emit-BqLCdV8Y.js";
2
- import { d as relativeToInstallDir, i as getLogFilePath, o as logToFile } from "./debug-BvEbemym.js";
3
- import { A as POSTHOG_APP_URL, B as REPLAY_VISION_SUPPORTED, D as Integration, E as ISSUES_URL, F as POSTHOG_PRIVACY_URL, J as WIZARD_OAUTH_SCOPES, M as POSTHOG_DOCS_URL, O as OAUTH_PORTS, P as POSTHOG_ORG_AI_SETTINGS_URL, Q as WIZARD_PROVISIONING_SCOPES, R as POSTHOG_TERMS_URL, V as SETUP_REPORT_FILE, i as sessionProperties, k as OAUTH_TIMEOUT_MS, m as DUMMY_PROJECT_API_KEY, n as analytics, nt as WIZARD_USER_AGENT, rt as getSkillsBaseUrl } from "./analytics-B_xFshPY.js";
4
- import { A as getProvisioningScopesForProgram, B as SOURCE_MAPS_CONTEXT_KEYS, C as oauthErrorFromTokenBody, D as getCommandPath, E as findProgramConfig, F as detectErrorTrackingProjects, G as detectSelfDrivingIntegrationProjects, H as NO_DEFAULT_LIMIT, J as POSTHOG_PRESENT_KEY, K as GITHUB_REQUIRED_BODY, L as detectSourceMapsProjects, O as getOAuthScopesForProgram, P as ERROR_TRACKING_PROJECT_PATH_KEY, R as DISPLAY_NAME, S as oauthErrorFromCallbackParams, T as Program, U as PRICING_LONG, W as PRICING_SHORT, Y as SELF_DRIVING_INTEGRATE_PATH_KEY, _ as missingOAuthScopes, at as evaluateWizardReadiness, b as buildCallbackErrorHtml, c as buildSession, d as SessionStore, et as CONNECT_SLACK_SCOPE_ADDITIONS, f as applyAgentProgress, g as getOAuthClientId, h as OAuthTokenResponseSchema, it as SIGNUP_WIZARD_READINESS_CONFIG, j as getSubcommandPrograms, k as getProgramConfig, nt as getAuditChecks, ot as getBlockingServiceKeys, q as GITHUB_REQUIRED_MESSAGE, rt as SERVICE_LABELS, tt as withScopeAdditions, v as parseOAuthScopes, x as buildOAuthFailureMessage, y as OAuthError, z as MANUAL_SDK_VARIANTS } from "./programs-Bq9Ju9xk.js";
5
- import "./errors-DhFeR8Sp.js";
6
- import { r as withUtm, t as openTrackedLink } from "./links-Dmj3Wj9X.js";
7
- import { t as withProgress } from "./telemetry-DKM7VGuJ.js";
8
- import { t as detectOrgAndProject } from "./setup-utils-C7kaDP5X.js";
9
- import { r as currentCredentials, s as rotateAfterUnauthorized } from "./oauth-session-Bi1MLRCC.js";
10
- import { a as getOAuthUrl, i as getIntegrationAuthorizeUrl, s as resolveBaseUrl } from "./urls-B82v7gfO.js";
11
- import { t as HostResolution } from "./host-resolution-BxnNn8Jm.js";
12
- import { A as formatCostUsd, C as FRAMEWORK_REGISTRY, E as streamMcpPrompt, c as POSTHOG_SDKS, j as formatTokenCount, k as computeTokenCostUsd, l as STRIPE_SDKS, p as getDetectedWarehouseSources } from "./posthog-integration-CpinLWNO.js";
13
- import { y as fetchSkillMenu } from "./yara-hooks-BS0n3ekf.js";
14
- import { c as fetchProjectData, l as fetchSlackConnected, n as ApiError, o as fetchGithubConnected, u as fetchUserData } from "./api-C_9KsN-7.js";
15
- import { n as namesWithStatus, o as summarizeFailure, t as isOk } from "./results-CDqlHogZ.js";
16
- import { f as getKindMeta, l as MCP_TUTORIAL_SCOPE_ADDITIONS, n as getTool, p as fetchHealthIssues } from "./tools-DZCEvDv9.js";
17
- import { n as AVAILABLE_FEATURES, o as isAllFeaturesSelected, t as ALL_FEATURE_VALUES } from "./defaults-DDVl3tKN.js";
18
- import { n as provisionNewAccount, r as requestDeepLink, t as ProvisionedAccountUnreadableError } from "./provisioning-D-AM_7DG.js";
19
- import { r as wizardAbort } from "./wizard-abort-Cd-7sfCw.js";
20
- import { a as useStdoutDimensions, c as wrapAndTruncate, d as isObjectBlock, f as ConfirmButton, h as Icons, i as useKeyboardHintsContext, l as isClearBlock, m as Colors, n as useKeyBindings, o as computeVisibleRange, p as PromptLabel, r as KeyboardHintsProvider, s as wordWrap, t as PickerMenu, u as isLinesBlock } from "./PickerMenu-BGGeYqd-.js";
2
+ import { d as relativeToInstallDir, i as getLogFilePath, o as logToFile } from "./debug-BfO_Txo8.js";
3
+ import { A as OAUTH_PORTS, B as POSTHOG_TERMS_URL, H as REPLAY_VISION_SUPPORTED, I as POSTHOG_ORG_AI_SETTINGS_URL, L as POSTHOG_PRIVACY_URL, M as POSTHOG_APP_URL, O as ISSUES_URL, P as POSTHOG_DOCS_URL, U as SETUP_REPORT_FILE, X as WIZARD_OAUTH_SCOPES, at as getSkillsBaseUrl, et as WIZARD_PROVISIONING_SCOPES, h as DUMMY_PROJECT_API_KEY, i as sessionProperties, it as WIZARD_USER_AGENT, j as OAUTH_TIMEOUT_MS, k as Integration, n as analytics } from "./analytics-Drox5LSW.js";
4
+ import { $ as SELF_DRIVING_INTEGRATE_PATH_KEY, A as getProgramConfig, C as oauthErrorFromTokenBody, D as findProgramConfig, E as Program, F as FEATURE_FLAGS_UNSUPPORTED, H as DISPLAY_NAME, J as PRICING_SHORT, K as NO_DEFAULT_LIMIT, M as getSubcommandPrograms, O as getCommandPath, P as FEATURE_FLAGS_STEP_SKILL_ID, Q as POSTHOG_PRESENT_KEY, R as ERROR_TRACKING_PROJECT_PATH_KEY, S as oauthErrorFromCallbackParams, U as MANUAL_SDK_VARIANTS, V as detectSourceMapsProjects, W as SOURCE_MAPS_CONTEXT_KEYS, X as GITHUB_REQUIRED_BODY, Y as detectSelfDrivingIntegrationProjects, Z as GITHUB_REQUIRED_MESSAGE, _ as missingOAuthScopes, at as withScopeAdditions, b as buildCallbackErrorHtml, c as buildSession, ct as SIGNUP_WIZARD_READINESS_CONFIG, d as SessionStore, f as applyAgentProgress, g as getOAuthClientId, h as OAuthTokenResponseSchema, it as CONNECT_SLACK_SCOPE_ADDITIONS, j as getProvisioningScopesForProgram, k as getOAuthScopesForProgram, lt as evaluateWizardReadiness, ot as getAuditChecks, q as PRICING_LONG, st as SERVICE_LABELS, ut as getBlockingServiceKeys, v as parseOAuthScopes, w as reportCodebaseScan, x as buildOAuthFailureMessage, y as OAuthError, z as detectErrorTrackingProjects } from "./programs-mxhRXwP-.js";
5
+ import "./errors-BXlWujEw.js";
6
+ import { r as withUtm, t as openTrackedLink } from "./links-CatXPRxH.js";
7
+ import { t as withProgress } from "./telemetry-BPBzqsb_.js";
8
+ import { t as detectOrgAndProject } from "./setup-utils-CQY8PHjR.js";
9
+ import { r as currentCredentials, s as rotateAfterUnauthorized } from "./oauth-session-9EU3ky0v.js";
10
+ import { a as getOAuthUrl, i as getIntegrationAuthorizeUrl, s as resolveBaseUrl } from "./urls-WeqfBLP4.js";
11
+ import { t as HostResolution } from "./host-resolution-DftfSjJD.js";
12
+ import { A as streamMcpPrompt, D as FRAMEWORK_REGISTRY, F as formatTokenCount, N as computeTokenCostUsd, P as formatCostUsd, c as STRIPE_SDKS, d as scanCodebaseFor, m as getDetectedWarehouseSources, s as POSTHOG_SDKS } from "./posthog-integration-mIQGBc1f.js";
13
+ import { b as fetchSkillMenu } from "./yara-hooks-aDbdsitJ.js";
14
+ import { c as fetchProjectData, l as fetchSlackConnected, n as ApiError, o as fetchGithubConnected, u as fetchUserData } from "./api-Dfu655Qt.js";
15
+ import { n as namesWithStatus, o as summarizeFailure, t as isOk } from "./results-5yCKf2cI.js";
16
+ import { f as getKindMeta, l as MCP_TUTORIAL_SCOPE_ADDITIONS, n as getTool, p as fetchHealthIssues } from "./tools-D_AtrhbO.js";
17
+ import { n as AVAILABLE_FEATURES, o as isAllFeaturesSelected, t as ALL_FEATURE_VALUES } from "./defaults-BWLIffh5.js";
18
+ import { n as provisionNewAccount, r as requestDeepLink, t as ProvisionedAccountUnreadableError } from "./provisioning-CHUjae9V.js";
19
+ import { r as wizardAbort } from "./wizard-abort-BwEefm6P.js";
20
+ import { a as useStdoutDimensions, c as wrapAndTruncate, d as isObjectBlock, f as ConfirmButton, h as Icons, i as useKeyboardHintsContext, l as isClearBlock, m as Colors, n as useKeyBindings, o as computeVisibleRange, p as PromptLabel, r as KeyboardHintsProvider, s as wordWrap, t as PickerMenu, u as isLinesBlock } from "./PickerMenu-BtheKi1o.js";
21
21
  import * as fs$1 from "fs";
22
22
  import path from "path";
23
23
  import { join as join$1 } from "node:path";
@@ -240,7 +240,7 @@ const TextBlock = ({ text, active, completed, onComplete, mode, bullet, animatio
240
240
  * skill-based program (audit, revenue-analytics, agent-skill, etc.)
241
241
  * runs. Skill programs don't need the full PostHog onboarding narrative.
242
242
  */
243
- const getContentBlocks$5 = (store) => {
243
+ const getContentBlocks$6 = (store) => {
244
244
  return [
245
245
  {
246
246
  content: "Welcome.",
@@ -1923,7 +1923,7 @@ const PrivacyPanel = ({ canOptOut = false } = {}) => {
1923
1923
  }),
1924
1924
  canOptOut && /* @__PURE__ */ jsx(Box, {
1925
1925
  marginTop: 1,
1926
- children: /* @__PURE__ */ jsx(Text, { children: "We also read dependency files and .env variable names to discover tools we can connect to and integrate with. We share that list with PostHog to suggest features. You can opt out of sharing below." })
1926
+ children: /* @__PURE__ */ jsx(Text, { children: "We also read your file tree, dependency files, templates, and .env variable names, never values, to find this project's tools and pick the right setup. We share each tool with PostHog to improve our products, with the file and name that matched it, and the setup we chose, such as the framework. You can opt out of sharing below." })
1927
1927
  })
1928
1928
  ]
1929
1929
  });
@@ -2296,7 +2296,7 @@ const AgentSkillIntroScreen = ({ store }) => {
2296
2296
  //#region src/tui/programs/shared/skill-program.tsx
2297
2297
  const SKILL_PROGRAM = {
2298
2298
  flow: AGENT_SKILL_STEPS,
2299
- deck: getContentBlocks$5,
2299
+ deck: getContentBlocks$6,
2300
2300
  screens: { ["agent-skill-intro"]: (store) => /* @__PURE__ */ jsx(AgentSkillIntroScreen, { store }) }
2301
2301
  };
2302
2302
  //#endregion
@@ -2376,12 +2376,12 @@ const AiObservabilityIntroScreen = ({ store }) => {
2376
2376
  onSelect: handleSelect
2377
2377
  });
2378
2378
  };
2379
- const TUI_PROGRAMS$10 = { "ai-observability": {
2379
+ const TUI_PROGRAMS$11 = { "ai-observability": {
2380
2380
  flow: AGENT_SKILL_STEPS.map((step) => step.id === "intro" ? {
2381
2381
  ...step,
2382
2382
  screenId: "ai-observability-intro"
2383
2383
  } : step),
2384
- deck: getContentBlocks$5,
2384
+ deck: getContentBlocks$6,
2385
2385
  screens: { ["ai-observability-intro"]: (store) => /* @__PURE__ */ jsx(AiObservabilityIntroScreen, { store }) }
2386
2386
  } };
2387
2387
  //#endregion
@@ -4137,10 +4137,10 @@ const screens = {
4137
4137
  ["audit-run"]: (store) => /* @__PURE__ */ jsx(AuditRunScreen, { store }),
4138
4138
  ["audit-outro"]: (store) => /* @__PURE__ */ jsx(AuditOutroScreen, { store })
4139
4139
  };
4140
- const TUI_PROGRAMS$9 = {
4140
+ const TUI_PROGRAMS$10 = {
4141
4141
  audit: {
4142
4142
  flow: AUDIT_FLOW,
4143
- deck: getContentBlocks$5,
4143
+ deck: getContentBlocks$6,
4144
4144
  screens
4145
4145
  },
4146
4146
  "events-audit": {
@@ -4521,7 +4521,7 @@ const buildSourceMapsDeck = (store, copy) => pace([
4521
4521
  ]);
4522
4522
  //#endregion
4523
4523
  //#region src/tui/programs/error-tracking/deck/index.tsx
4524
- const getContentBlocks$4 = (store) => buildSourceMapsDeck(store, {
4524
+ const getContentBlocks$5 = (store) => buildSourceMapsDeck(store, {
4525
4525
  intro: "I'm wiring PostHog Error Tracking into your project.",
4526
4526
  wiring: "If your platform ships minified code or stripped binaries, I also hook source-map or debug-symbol upload into your build, tied to each release you ship. On Python, Ruby and PHP, I link each production deploy to its release instead."
4527
4527
  });
@@ -4548,7 +4548,7 @@ const ERROR_TRACKING_TIPS = [
4548
4548
  description: "Create a GitHub, GitLab, Jira or Linear issue straight from an error."
4549
4549
  }
4550
4550
  ];
4551
- const getTips$1 = () => ERROR_TRACKING_TIPS;
4551
+ const getTips$2 = () => ERROR_TRACKING_TIPS;
4552
4552
  //#endregion
4553
4553
  //#region src/tui/programs/error-tracking/screens/ErrorTrackingIntroScreen.tsx
4554
4554
  const ErrorTrackingIntroScreen = ({ store }) => {
@@ -4886,10 +4886,10 @@ const ErrorTrackingDetectScreen = ({ store }) => {
4886
4886
  };
4887
4887
  //#endregion
4888
4888
  //#region src/tui/programs/error-tracking/index.tsx
4889
- const TUI_PROGRAMS$8 = { "error-tracking": {
4889
+ const TUI_PROGRAMS$9 = { "error-tracking": {
4890
4890
  flow: ERROR_TRACKING_FLOW,
4891
- deck: getContentBlocks$4,
4892
- tips: getTips$1,
4891
+ deck: getContentBlocks$5,
4892
+ tips: getTips$2,
4893
4893
  screens: {
4894
4894
  ["error-tracking-intro"]: (store) => /* @__PURE__ */ jsx(ErrorTrackingIntroScreen, { store }),
4895
4895
  ["error-tracking-detect"]: (store) => /* @__PURE__ */ jsx(ErrorTrackingDetectScreen, { store })
@@ -4940,7 +4940,7 @@ const ERROR_TRACKING_UPLOAD_SOURCE_MAPS_FLOW = [
4940
4940
  ];
4941
4941
  //#endregion
4942
4942
  //#region src/tui/programs/error-tracking-upload-source-maps/deck/index.tsx
4943
- const getContentBlocks$3 = (store) => buildSourceMapsDeck(store, {
4943
+ const getContentBlocks$4 = (store) => buildSourceMapsDeck(store, {
4944
4944
  intro: "I'm wiring PostHog Error Tracking into your build.",
4945
4945
  wiring: "Right now I'm hooking source-map generation and upload into your build, tied to each release you ship."
4946
4946
  });
@@ -5430,9 +5430,9 @@ const Section = ({ title, children }) => /* @__PURE__ */ jsxs(Box, {
5430
5430
  });
5431
5431
  //#endregion
5432
5432
  //#region src/tui/programs/error-tracking-upload-source-maps/index.tsx
5433
- const TUI_PROGRAMS$7 = { "error-tracking-upload-source-maps": {
5433
+ const TUI_PROGRAMS$8 = { "error-tracking-upload-source-maps": {
5434
5434
  flow: ERROR_TRACKING_UPLOAD_SOURCE_MAPS_FLOW,
5435
- deck: getContentBlocks$3,
5435
+ deck: getContentBlocks$4,
5436
5436
  screens: {
5437
5437
  ["source-maps-intro"]: (store) => /* @__PURE__ */ jsx(SourceMapsIntroScreen, { store }),
5438
5438
  ["source-maps-detect"]: (store) => /* @__PURE__ */ jsx(SourceMapsDetectScreen, { store }),
@@ -5440,6 +5440,366 @@ const TUI_PROGRAMS$7 = { "error-tracking-upload-source-maps": {
5440
5440
  }
5441
5441
  } };
5442
5442
  //#endregion
5443
+ //#region src/tui/programs/feature-flags/deck/index.tsx
5444
+ const GATED_CODE = {
5445
+ type: "lines",
5446
+ interval: 400,
5447
+ pause: 7e3,
5448
+ lines: [
5449
+ /* @__PURE__ */ jsx(Text, { children: " " }),
5450
+ /* @__PURE__ */ jsx(Text, {
5451
+ dimColor: true,
5452
+ children: "example — a flag around new code"
5453
+ }),
5454
+ /* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
5455
+ color: "cyan",
5456
+ children: "if"
5457
+ }), /* @__PURE__ */ jsx(Text, { children: " (flags.isEnabled('new-checkout')) {" })] }),
5458
+ /* @__PURE__ */ jsx(Text, { children: " showNewCheckout()" }),
5459
+ /* @__PURE__ */ jsx(Text, { children: "}" })
5460
+ ]
5461
+ };
5462
+ const GRADUAL_ROLLOUT = {
5463
+ type: "lines",
5464
+ interval: 700,
5465
+ pause: 7e3,
5466
+ lines: [
5467
+ /* @__PURE__ */ jsx(Text, { children: " " }),
5468
+ /* @__PURE__ */ jsx(Text, {
5469
+ dimColor: true,
5470
+ children: "example — new-checkout rollout"
5471
+ }),
5472
+ /* @__PURE__ */ jsxs(Text, { children: [
5473
+ /* @__PURE__ */ jsx(Text, {
5474
+ color: Colors.accent,
5475
+ children: "▓"
5476
+ }),
5477
+ /* @__PURE__ */ jsx(Text, {
5478
+ dimColor: true,
5479
+ children: "░░░░░░░░░"
5480
+ }),
5481
+ /* @__PURE__ */ jsx(Text, { children: " 5% internal team" })
5482
+ ] }),
5483
+ /* @__PURE__ */ jsxs(Text, { children: [
5484
+ /* @__PURE__ */ jsx(Text, {
5485
+ color: Colors.accent,
5486
+ children: "▓▓▓▓▓"
5487
+ }),
5488
+ /* @__PURE__ */ jsx(Text, {
5489
+ dimColor: true,
5490
+ children: "░░░░░"
5491
+ }),
5492
+ /* @__PURE__ */ jsx(Text, { children: " 50% half of users" })
5493
+ ] }),
5494
+ /* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
5495
+ color: Colors.success,
5496
+ children: "▓▓▓▓▓▓▓▓▓▓"
5497
+ }), /* @__PURE__ */ jsx(Text, { children: " 100% everyone" })] })
5498
+ ]
5499
+ };
5500
+ const RUN_PLAN = {
5501
+ type: "lines",
5502
+ interval: 600,
5503
+ pause: 8e3,
5504
+ lines: [
5505
+ /* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
5506
+ color: "cyan",
5507
+ children: "1 "
5508
+ }), /* @__PURE__ */ jsx(Text, { children: "Create example flags, off at 0%" })] }),
5509
+ /* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
5510
+ color: "cyan",
5511
+ children: "2 "
5512
+ }), /* @__PURE__ */ jsx(Text, { children: "Evaluate the backend flag on the server" })] }),
5513
+ /* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
5514
+ color: "cyan",
5515
+ children: "3 "
5516
+ }), /* @__PURE__ */ jsx(Text, { children: "Evaluate the frontend flag in the UI" })] }),
5517
+ /* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
5518
+ color: "cyan",
5519
+ children: "4 "
5520
+ }), /* @__PURE__ */ jsx(Text, { children: "Publish a report to a PostHog notebook" })] })
5521
+ ]
5522
+ };
5523
+ const getContentBlocks$3 = (store) => [
5524
+ {
5525
+ content: "Welcome.",
5526
+ pause: 3e3,
5527
+ mode: 0,
5528
+ animationInterval: 160
5529
+ },
5530
+ {
5531
+ content: "The Wizard is an agent.",
5532
+ pause: 4e3
5533
+ },
5534
+ {
5535
+ content: "It's setting up feature flags for this project.",
5536
+ pause: 5e3
5537
+ },
5538
+ {
5539
+ type: "clear",
5540
+ pause: 2e3
5541
+ },
5542
+ {
5543
+ pause: 5e3,
5544
+ persist: true,
5545
+ content: /* @__PURE__ */ jsx(StatusPeekTrigger, { store })
5546
+ },
5547
+ {
5548
+ pause: 6e3,
5549
+ content: /* @__PURE__ */ jsxs(Text, { children: [
5550
+ "Press",
5551
+ " ",
5552
+ /* @__PURE__ */ jsx(Text, {
5553
+ color: Colors.accent,
5554
+ bold: true,
5555
+ children: "S"
5556
+ }),
5557
+ " ",
5558
+ "to expand or collapse the status."
5559
+ ] })
5560
+ },
5561
+ {
5562
+ type: "clear",
5563
+ pause: 1500
5564
+ },
5565
+ {
5566
+ content: "A feature flag is a switch in your code that you flip from PostHog, with no deploy.",
5567
+ pause: 6e3
5568
+ },
5569
+ GATED_CODE,
5570
+ {
5571
+ content: "Ship new code turned off, then turn it on when you are ready.",
5572
+ pause: 6e3
5573
+ },
5574
+ {
5575
+ type: "clear",
5576
+ pause: 1500
5577
+ },
5578
+ {
5579
+ content: "Roll out gradually instead of all at once:",
5580
+ pause: 2500
5581
+ },
5582
+ GRADUAL_ROLLOUT,
5583
+ {
5584
+ content: "Target who sees it: your team, a beta cohort, a plan, or a country.",
5585
+ pause: 6e3
5586
+ },
5587
+ {
5588
+ content: "Something breaks? Turn the flag off in seconds. No rollback, no redeploy.",
5589
+ pause: 7e3
5590
+ },
5591
+ {
5592
+ type: "clear",
5593
+ pause: 1500
5594
+ },
5595
+ {
5596
+ content: "Each evaluation is reported to PostHog, so you can see who got which value.",
5597
+ pause: 6500
5598
+ },
5599
+ {
5600
+ content: "The same flags run experiments: split users between variants and measure the result.",
5601
+ pause: 7e3
5602
+ },
5603
+ {
5604
+ type: "clear",
5605
+ pause: 1500
5606
+ },
5607
+ {
5608
+ content: "Here's what it's doing now:",
5609
+ pause: 2e3
5610
+ },
5611
+ RUN_PLAN,
5612
+ {
5613
+ content: "Each side gets a flag only when your app has code there.",
5614
+ pause: 6e3
5615
+ }
5616
+ ];
5617
+ //#endregion
5618
+ //#region src/tui/programs/feature-flags/deck/tips.ts
5619
+ const FEATURE_FLAGS_TIPS = [
5620
+ {
5621
+ id: "payloads",
5622
+ title: "Ship settings, not just on and off",
5623
+ description: "Attach a JSON payload to a flag to change copy, limits, or config without a deploy."
5624
+ },
5625
+ {
5626
+ id: "local-evaluation",
5627
+ title: "Check flags without a network call",
5628
+ description: "Server SDKs can download your flag definitions and evaluate them locally, so a check adds no round trip."
5629
+ },
5630
+ {
5631
+ id: "experiments",
5632
+ title: "Turn a flag into an experiment",
5633
+ description: "Give a flag variants and PostHog measures which one wins on the metrics you pick."
5634
+ }
5635
+ ];
5636
+ const getTips$1 = () => FEATURE_FLAGS_TIPS;
5637
+ //#endregion
5638
+ //#region src/tui/programs/feature-flags/screens/FeatureFlagsIntroScreen.tsx
5639
+ const CANCEL_ONLY_MENU = [{
5640
+ label: "Cancel",
5641
+ value: "cancel"
5642
+ }];
5643
+ const FeatureFlagsIntroScreen = ({ store }) => {
5644
+ useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
5645
+ const [showingMoreInfo, setShowingMoreInfo] = useState(false);
5646
+ const { session } = store;
5647
+ const { skillEntry, fetchFailed } = useSkillEntry(FEATURE_FLAGS_STEP_SKILL_ID);
5648
+ const body = showingMoreInfo ? /* @__PURE__ */ jsxs(Box, {
5649
+ flexDirection: "column",
5650
+ width: 56,
5651
+ children: [
5652
+ /* @__PURE__ */ jsx(Box, {
5653
+ marginBottom: 1,
5654
+ children: /* @__PURE__ */ jsxs(Text, { children: [
5655
+ "The Wizard is an agent, it's here to help you set up PostHog. Its code is open source:",
5656
+ " ",
5657
+ /* @__PURE__ */ jsx(Text, {
5658
+ color: "cyan",
5659
+ children: "https://github.com/PostHog/wizard"
5660
+ })
5661
+ ] })
5662
+ }),
5663
+ /* @__PURE__ */ jsx(Box, {
5664
+ marginBottom: 1,
5665
+ children: /* @__PURE__ */ jsx(Text, { children: "Feature flags let you ship code turned off, roll it out to a percentage of users or a chosen group, and switch it off in seconds without a deploy. The same flags run your experiments." })
5666
+ }),
5667
+ /* @__PURE__ */ jsxs(Text, { children: [
5668
+ "The",
5669
+ " ",
5670
+ /* @__PURE__ */ jsx(Text, {
5671
+ color: "cyan",
5672
+ italic: true,
5673
+ children: "feature-flags"
5674
+ }),
5675
+ " ",
5676
+ "program creates example flags in PostHog, off at 0% rollout: one for your backend and one for your frontend, for each side your app has. It installs and initializes the PostHog SDKs if needed, evaluates each flag once in your code, and writes a report on how to turn them on."
5677
+ ] }),
5678
+ /* @__PURE__ */ jsx(Box, {
5679
+ marginTop: 1,
5680
+ children: /* @__PURE__ */ jsx(SkillSourceInfo, {
5681
+ skillId: FEATURE_FLAGS_STEP_SKILL_ID,
5682
+ skillEntry,
5683
+ fetchFailed
5684
+ })
5685
+ })
5686
+ ]
5687
+ }) : /* @__PURE__ */ jsx(Box, {
5688
+ flexDirection: "column",
5689
+ alignItems: "center",
5690
+ children: /* @__PURE__ */ jsx(Text, { children: "Let's add your first feature flag, so you can ship safely and control rollouts." })
5691
+ });
5692
+ const menuOptions = showingMoreInfo ? [{
5693
+ label: "Back",
5694
+ value: "back"
5695
+ }] : [
5696
+ {
5697
+ label: "Continue",
5698
+ value: "continue"
5699
+ },
5700
+ {
5701
+ label: "More info",
5702
+ value: "more-info"
5703
+ },
5704
+ {
5705
+ label: "Cancel",
5706
+ value: "cancel"
5707
+ }
5708
+ ];
5709
+ const menuActions = {
5710
+ cancel: () => store.requestExit(0),
5711
+ "more-info": () => setShowingMoreInfo(true),
5712
+ back: () => setShowingMoreInfo(false),
5713
+ continue: () => store.completeSetup()
5714
+ };
5715
+ const selectMenuAction = (value) => menuActions[value]?.();
5716
+ const blockedBody = bodyThatBlocksContinue(session);
5717
+ if (blockedBody) return /* @__PURE__ */ jsx(IntroScreenLayout, {
5718
+ installDir: session.installDir,
5719
+ body: blockedBody,
5720
+ showDetection: false,
5721
+ programLabel: store.programLabel,
5722
+ skillId: session.skillId,
5723
+ menuOptions: CANCEL_ONLY_MENU,
5724
+ onSelect: selectMenuAction
5725
+ });
5726
+ return /* @__PURE__ */ jsx(IntroScreenLayout, {
5727
+ installDir: session.installDir,
5728
+ body,
5729
+ showDetection: !showingMoreInfo,
5730
+ programLabel: store.programLabel,
5731
+ skillId: session.skillId,
5732
+ menuOptions,
5733
+ onSelect: selectMenuAction
5734
+ });
5735
+ };
5736
+ function bodyThatBlocksContinue(session) {
5737
+ if (!session.detectionComplete) return DETECTING_FRAMEWORK_BODY;
5738
+ if (session.integration === null) return UNDETECTED_FRAMEWORK_BODY;
5739
+ if (FEATURE_FLAGS_UNSUPPORTED.has(session.integration)) return UNSUPPORTED_FRAMEWORK_BODY;
5740
+ if (!session.unsupportedVersion) return null;
5741
+ const { current, minimum, docsUrl } = session.unsupportedVersion;
5742
+ return /* @__PURE__ */ jsxs(Box, {
5743
+ flexDirection: "column",
5744
+ alignItems: "center",
5745
+ width: 64,
5746
+ children: [/* @__PURE__ */ jsxs(Text, {
5747
+ color: "#DC9300",
5748
+ children: [
5749
+ "Version ",
5750
+ current,
5751
+ " is not supported by the wizard. Please upgrade to",
5752
+ " ",
5753
+ minimum,
5754
+ " or later."
5755
+ ]
5756
+ }), /* @__PURE__ */ jsx(Box, {
5757
+ marginTop: 1,
5758
+ children: /* @__PURE__ */ jsxs(Text, {
5759
+ dimColor: true,
5760
+ children: ["Manual setup guide: ", docsUrl]
5761
+ })
5762
+ })]
5763
+ });
5764
+ }
5765
+ const DETECTING_FRAMEWORK_BODY = /* @__PURE__ */ jsx(Box, {
5766
+ marginY: 1,
5767
+ children: /* @__PURE__ */ jsx(LoadingBox, { message: "Detecting project framework..." })
5768
+ });
5769
+ const UNDETECTED_FRAMEWORK_BODY = /* @__PURE__ */ jsxs(Box, {
5770
+ flexDirection: "column",
5771
+ alignItems: "center",
5772
+ width: 64,
5773
+ children: [/* @__PURE__ */ jsx(Text, { children: "Could not detect your project's framework." }), /* @__PURE__ */ jsx(Box, {
5774
+ marginTop: 1,
5775
+ children: /* @__PURE__ */ jsx(Text, {
5776
+ dimColor: true,
5777
+ children: "The feature-flags program needs a supported framework. Run the wizard from your app's root directory."
5778
+ })
5779
+ })]
5780
+ });
5781
+ const UNSUPPORTED_FRAMEWORK_BODY = /* @__PURE__ */ jsxs(Box, {
5782
+ flexDirection: "column",
5783
+ alignItems: "center",
5784
+ width: 64,
5785
+ children: [/* @__PURE__ */ jsx(Text, { children: "The wizard cannot set up feature flags for this framework yet." }), /* @__PURE__ */ jsx(Box, {
5786
+ marginTop: 1,
5787
+ children: /* @__PURE__ */ jsx(Text, {
5788
+ dimColor: true,
5789
+ children: "Manual setup guide: https://posthog.com/docs/feature-flags"
5790
+ })
5791
+ })]
5792
+ });
5793
+ const TUI_PROGRAMS$7 = { "feature-flags": {
5794
+ flow: AGENT_SKILL_STEPS.map((step) => step.id === "intro" ? {
5795
+ ...step,
5796
+ screenId: "feature-flags-intro"
5797
+ } : step),
5798
+ deck: getContentBlocks$3,
5799
+ tips: getTips$1,
5800
+ screens: { ["feature-flags-intro"]: (store) => /* @__PURE__ */ jsx(FeatureFlagsIntroScreen, { store }) }
5801
+ } };
5802
+ //#endregion
5443
5803
  //#region src/tui/programs/metrics/screens/MetricsIntroScreen.tsx
5444
5804
  const MetricsIntroScreen = ({ store }) => {
5445
5805
  useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
@@ -5527,7 +5887,7 @@ const TUI_PROGRAMS$6 = { metrics: {
5527
5887
  ...step,
5528
5888
  screenId: "metrics-intro"
5529
5889
  } : step),
5530
- deck: getContentBlocks$5,
5890
+ deck: getContentBlocks$6,
5531
5891
  screens: { ["metrics-intro"]: (store) => /* @__PURE__ */ jsx(MetricsIntroScreen, { store }) }
5532
5892
  } };
5533
5893
  //#endregion
@@ -6909,6 +7269,56 @@ const getContentBlocks$1 = (store) => [
6909
7269
  }
6910
7270
  ];
6911
7271
  //#endregion
7272
+ //#region src/tui/components/sharing-options.ts
7273
+ /**
7274
+ * A blank, unselectable row. Navigation skips disabled options, so this is a
7275
+ * margin the menu can hold rather than one the layout has to special-case.
7276
+ */
7277
+ const MENU_SPACER = {
7278
+ label: "",
7279
+ value: "spacer",
7280
+ disabled: true
7281
+ };
7282
+ /**
7283
+ * The sharing choice, as two explicit rows rather than one toggle. A toggle
7284
+ * label has to describe either the current state or the next action, and a
7285
+ * reader cannot tell which; two rows with the filled diamond on the live one
7286
+ * say both at once. The trailing spacer separates them from the Back that
7287
+ * IntroScreenLayout appends, since leaving the screen is a different kind of
7288
+ * act from changing something on it.
7289
+ */
7290
+ function sharingOptions(sharing) {
7291
+ const mark = (on) => ({ glyph: on ? Icons.diamond : Icons.diamondOpen });
7292
+ return [
7293
+ {
7294
+ label: "Share tools",
7295
+ value: "share",
7296
+ icon: mark(sharing)
7297
+ },
7298
+ {
7299
+ label: "Don't share tools",
7300
+ value: "no-share",
7301
+ icon: mark(!sharing)
7302
+ },
7303
+ MENU_SPACER
7304
+ ];
7305
+ }
7306
+ /** Sharing is on by default, so only an explicit decline turns it off. */
7307
+ function isSharing(store) {
7308
+ return store.session.scanConsent !== "declined";
7309
+ }
7310
+ /** Apply a sharing row the user picked. Returns false for any other value. */
7311
+ function applySharingChoice(store, value) {
7312
+ if (value === "share") store.grantSharing();
7313
+ else if (value === "no-share") store.declineSharing();
7314
+ else return false;
7315
+ return true;
7316
+ }
7317
+ /** Continue with no choice made means sharing, the default. A choice already made stands. */
7318
+ function resolveSharingOnContinue(store) {
7319
+ if (store.session.scanConsent === "undecided") store.grantSharing();
7320
+ }
7321
+ //#endregion
6912
7322
  //#region src/tui/programs/posthog-integration/intro-menu.ts
6913
7323
  const CONTINUE_LABEL = "Continue";
6914
7324
  const CONTINUE_ANYWAY_LABEL = "Continue anyway";
@@ -7008,39 +7418,6 @@ const SUBTITLE = /* @__PURE__ */ jsxs(Fragment$1, { children: [
7008
7418
  children: ".env* values stay on your machine."
7009
7419
  })
7010
7420
  ] });
7011
- /**
7012
- * A blank, unselectable row. Navigation skips disabled options, so this is a
7013
- * margin the menu can hold rather than one the layout has to special-case.
7014
- */
7015
- const MENU_SPACER = {
7016
- label: "",
7017
- value: "spacer",
7018
- disabled: true
7019
- };
7020
- /**
7021
- * The sharing choice, as two explicit rows rather than one toggle. A toggle
7022
- * label has to describe either the current state or the next action, and a
7023
- * reader cannot tell which; two rows with the filled diamond on the live one
7024
- * say both at once. The trailing spacer separates them from the Back that
7025
- * IntroScreenLayout appends, since leaving the screen is a different kind of
7026
- * act from changing something on it.
7027
- */
7028
- function sharingOptions(sharing) {
7029
- const mark = (on) => ({ glyph: on ? Icons.diamond : Icons.diamondOpen });
7030
- return [
7031
- {
7032
- label: "Share tools",
7033
- value: "share",
7034
- icon: mark(sharing)
7035
- },
7036
- {
7037
- label: "Don't share tools",
7038
- value: "no-share",
7039
- icon: mark(!sharing)
7040
- },
7041
- MENU_SPACER
7042
- ];
7043
- }
7044
7421
  /** Framework picker shown when auto-detection fails. */
7045
7422
  const FrameworkPicker = ({ store, onComplete }) => {
7046
7423
  return /* @__PURE__ */ jsx(PickerMenu, {
@@ -7053,7 +7430,7 @@ const FrameworkPicker = ({ store, onComplete }) => {
7053
7430
  })),
7054
7431
  onSelect: (value) => {
7055
7432
  const integration = Array.isArray(value) ? value[0] : value;
7056
- import("./programs-CnOSdQo1.js").then(({ FRAMEWORK_REGISTRY }) => {
7433
+ import("./programs-Bv0_YHzE.js").then(({ FRAMEWORK_REGISTRY }) => {
7057
7434
  const config = FRAMEWORK_REGISTRY[integration];
7058
7435
  store.setFrameworkConfig(integration, config);
7059
7436
  store.setDetectedFramework(config.metadata.name);
@@ -7068,7 +7445,7 @@ const PostHogIntegrationIntroScreen = ({ store }) => {
7068
7445
  const [manuallySelected, setManuallySelected] = useState(false);
7069
7446
  const [view, setView] = useState("default");
7070
7447
  const { session } = store;
7071
- const sharing = session.scanConsent !== "declined";
7448
+ const sharing = isSharing(store);
7072
7449
  const config = session.frameworkConfig;
7073
7450
  const frameworkLabel = session.detectedFrameworkLabel ?? config?.metadata.name;
7074
7451
  const { skillEntry, fetchFailed } = useSkillEntry(session.skillId);
@@ -7258,10 +7635,9 @@ const PostHogIntegrationIntroScreen = ({ store }) => {
7258
7635
  } else if (value === "more-info") setView("more-info");
7259
7636
  else if (value === "commands") setView("commands");
7260
7637
  else if (value === "back") setView("default");
7261
- else if (value === "share") store.grantSharing();
7262
- else if (value === "no-share") store.declineSharing();
7638
+ else if (applySharingChoice(store, value)) return;
7263
7639
  else if (value === "continue") {
7264
- if (session.scanConsent === "undecided") store.grantSharing();
7640
+ resolveSharingOnContinue(store);
7265
7641
  store.completeSetup();
7266
7642
  }
7267
7643
  };
@@ -7600,7 +7976,7 @@ const DetectErrorBody$2 = ({ error }) => {
7600
7976
  //#region src/tui/programs/revenue-analytics/index.tsx
7601
7977
  const TUI_PROGRAMS$3 = { "revenue-analytics-setup": {
7602
7978
  flow: REVENUE_ANALYTICS_FLOW,
7603
- deck: getContentBlocks$5,
7979
+ deck: getContentBlocks$6,
7604
7980
  screens: { ["revenue-intro"]: (store) => /* @__PURE__ */ jsx(RevenueIntroScreen, { store }) }
7605
7981
  } };
7606
7982
  //#endregion
@@ -8172,11 +8548,16 @@ const SelfDrivingIntroScreen = ({ store }) => {
8172
8548
  programLabel: store.programLabel,
8173
8549
  skillId: session.skillId,
8174
8550
  menuOptions,
8551
+ privacyOptions: sharingOptions(isSharing(store)),
8175
8552
  onSelect: (value) => {
8553
+ if (applySharingChoice(store, value)) return;
8176
8554
  if (value === "cancel") store.requestExit(0);
8177
8555
  else if (value === "more-info") setShowingMoreInfo(true);
8178
8556
  else if (value === "back") setShowingMoreInfo(false);
8179
- else store.completeSetup();
8557
+ else {
8558
+ resolveSharingOnContinue(store);
8559
+ store.completeSetup();
8560
+ }
8180
8561
  }
8181
8562
  });
8182
8563
  };
@@ -9214,12 +9595,17 @@ const WarehouseIntroScreen = ({ store }) => {
9214
9595
  programLabel: store.programLabel,
9215
9596
  skillId: session.skillId,
9216
9597
  menuOptions,
9598
+ privacyOptions: sharingOptions(isSharing(store)),
9217
9599
  errorView,
9218
9600
  onSelect: (value) => {
9601
+ if (applySharingChoice(store, value)) return;
9219
9602
  if (value === "cancel") store.requestExit(0);
9220
9603
  else if (value === "more-info") setShowingMoreInfo(true);
9221
9604
  else if (value === "back") setShowingMoreInfo(false);
9222
- else store.completeSetup();
9605
+ else {
9606
+ resolveSharingOnContinue(store);
9607
+ store.completeSetup();
9608
+ }
9223
9609
  }
9224
9610
  });
9225
9611
  };
@@ -9265,12 +9651,13 @@ const DetectErrorBody = ({ error }) => {
9265
9651
  //#region src/tui/programs/warehouse-source/index.tsx
9266
9652
  const TUI_PROGRAMS$1 = { "warehouse-source": {
9267
9653
  flow: WAREHOUSE_SOURCE_FLOW,
9268
- deck: getContentBlocks$5,
9654
+ deck: getContentBlocks$6,
9269
9655
  screens: { ["warehouse-intro"]: (store) => /* @__PURE__ */ jsx(WarehouseIntroScreen, { store }) }
9270
9656
  } };
9271
9657
  //#endregion
9272
9658
  //#region src/tui/programs/index.ts
9273
9659
  const TUI_PROGRAMS = {
9660
+ ...TUI_PROGRAMS$11,
9274
9661
  ...TUI_PROGRAMS$10,
9275
9662
  ...TUI_PROGRAMS$9,
9276
9663
  ...TUI_PROGRAMS$8,
@@ -15467,7 +15854,10 @@ var WizardStore = class {
15467
15854
  * the session is set, so it sees the real installDir.
15468
15855
  */
15469
15856
  async runReadyHooks() {
15470
- await findProgramConfig(this.router.activeProgram)?.onReady?.(this.sessions.readyContext());
15857
+ const config = findProgramConfig(this.router.activeProgram);
15858
+ const ctx = this.sessions.readyContext();
15859
+ if (config) await scanCodebaseFor(config, ctx);
15860
+ await config?.onReady?.(ctx);
15471
15861
  this.sessions.setDetectionComplete();
15472
15862
  }
15473
15863
  /**
@@ -15689,7 +16079,7 @@ var WizardStore = class {
15689
16079
  }
15690
16080
  /** Sets setupConfirmed, and is the point consent becomes final. */
15691
16081
  completeSetup() {
15692
- this.sessions.markWarehouseSourcesReportedIfNeeded();
16082
+ reportCodebaseScan(this.sessions);
15693
16083
  analytics.wizardCapture("setup confirmed", sessionProperties(this.session));
15694
16084
  this._write({ setupConfirmed: true });
15695
16085
  }
@@ -16208,6 +16598,6 @@ function releaseTerminal() {
16208
16598
  process.stdout.write(RESET_ATTRS + LEAVE_ALT_SCREEN);
16209
16599
  }
16210
16600
  //#endregion
16211
- export { AUDIT_AREA_SLIDES as A, totalTokenCount as B, assembleProfile as C, getTuiProgram as D, IssueTable as E, ContentSequencer as F, ModalOverlay as G, LogViewer as H, HNViewer as I, ProgressList as J, ConfirmationInput as K, TabContainer as L, IntroScreenLayout as M, PRIVACY_PANEL_LABEL as N, displayProgress as O, PrivacyPanel as P, getContentBlocks$5 as Q, ScreenContainer as R, McpSuggestedPromptsScreen as S, McpScreen as T, LinkText as U, EventPlanViewer as V, extractUrls as W, SplitView as X, LoadingBox as Y, CardLayout as Z, getTuiTool as _, SlackConnectScreen as a, extractOAuthCode as b, LearnCard as c, MINT_FAILURE_BODY as d, MINT_FAILURE_CONTACT as f, listFlowOwners as g, flowOwner as h, OutroScreen as i, AuditChecksViewer as j, useDismissOnAnyKey as k, AiOptInRequiredScreen as l, isRunFailure as m, releaseTerminal as n, TipsCard as o, MINT_FAILURE_MESSAGE as p, GroupedPickerMenu as q, WizardStore as r, VisualizerTab as s, enterDarkTerminal as t, ServiceHealthList as u, seededProfile as v, TAILORED_ROLES as w, abortOnScreens as x, getOrAskForProjectData as y, ViewportTooSmall as z };
16601
+ export { AUDIT_AREA_SLIDES as A, totalTokenCount as B, assembleProfile as C, getTuiProgram as D, IssueTable as E, ContentSequencer as F, ModalOverlay as G, LogViewer as H, HNViewer as I, ProgressList as J, ConfirmationInput as K, TabContainer as L, IntroScreenLayout as M, PRIVACY_PANEL_LABEL as N, displayProgress as O, PrivacyPanel as P, getContentBlocks$6 as Q, ScreenContainer as R, McpSuggestedPromptsScreen as S, McpScreen as T, LinkText as U, EventPlanViewer as V, extractUrls as W, SplitView as X, LoadingBox as Y, CardLayout as Z, getTuiTool as _, SlackConnectScreen as a, extractOAuthCode as b, LearnCard as c, MINT_FAILURE_BODY as d, MINT_FAILURE_CONTACT as f, listFlowOwners as g, flowOwner as h, OutroScreen as i, AuditChecksViewer as j, useDismissOnAnyKey as k, AiOptInRequiredScreen as l, isRunFailure as m, releaseTerminal as n, TipsCard as o, MINT_FAILURE_MESSAGE as p, GroupedPickerMenu as q, WizardStore as r, VisualizerTab as s, enterDarkTerminal as t, ServiceHealthList as u, seededProfile as v, TAILORED_ROLES as w, abortOnScreens as x, getOrAskForProjectData as y, ViewportTooSmall as z };
16212
16602
 
16213
- //# sourceMappingURL=terminal-Bkxwzkhn.js.map
16603
+ //# sourceMappingURL=terminal-DZsYFbm9.js.map