@posthog/wizard 2.82.0 → 2.83.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 (121) hide show
  1. package/dist/{agent-interface-3YfIWZmY.js → agent-interface-fcDXqb-_.js} +84 -30
  2. package/dist/agent-interface-fcDXqb-_.js.map +1 -0
  3. package/dist/{agent-prompt-loader-hOHONY7u.js → agent-prompt-loader-F9gGPMt0.js} +6 -6
  4. package/dist/{agent-prompt-loader-hOHONY7u.js.map → agent-prompt-loader-F9gGPMt0.js.map} +1 -1
  5. package/dist/analytics-C9QnGvuc.js +2 -0
  6. package/dist/{analytics-B_xFshPY.js → analytics-GQv--mQm.js} +4 -3
  7. package/dist/analytics-GQv--mQm.js.map +1 -0
  8. package/dist/api-CsXfZKkq.js +2 -0
  9. package/dist/{api-C_9KsN-7.js → api-WUOSLXPJ.js} +2 -2
  10. package/dist/{api-C_9KsN-7.js.map → api-WUOSLXPJ.js.map} +1 -1
  11. package/dist/api-key-login-CDSxsYtP.js +2 -0
  12. package/dist/{api-key-login-oUJQDmOV.js → api-key-login-tysMeZnR.js} +5 -5
  13. package/dist/{api-key-login-oUJQDmOV.js.map → api-key-login-tysMeZnR.js.map} +1 -1
  14. package/dist/bin.js +1 -1
  15. package/dist/{bounded-fs-iRaQcKYL.js → bounded-fs-B31zq2ir.js} +3 -3
  16. package/dist/{bounded-fs-iRaQcKYL.js.map → bounded-fs-B31zq2ir.js.map} +1 -1
  17. package/dist/{ci-install-BGlijoTo.js → ci-install-CYSFbFXd.js} +4 -4
  18. package/dist/{ci-install-BGlijoTo.js.map → ci-install-CYSFbFXd.js.map} +1 -1
  19. package/dist/{debug-BvEbemym.js → debug-BTUMatFI.js} +3 -3
  20. package/dist/{debug-BvEbemym.js.map → debug-BTUMatFI.js.map} +1 -1
  21. package/dist/{gateway-CWoYlPz7.js → gateway-CJ8Jqbll.js} +20 -6
  22. package/dist/{gateway-CWoYlPz7.js.map → gateway-CJ8Jqbll.js.map} +1 -1
  23. package/dist/{headless-Gisv3faN.js → headless-DZ3mq07K.js} +1 -1
  24. package/dist/{headless-Bfi950Qh.js → headless-le-QqOuj.js} +2 -2
  25. package/dist/{headless-Bfi950Qh.js.map → headless-le-QqOuj.js.map} +1 -1
  26. package/dist/{host-resolution-BxnNn8Jm.js → host-resolution-Cht8bL39.js} +4 -4
  27. package/dist/{host-resolution-BxnNn8Jm.js.map → host-resolution-Cht8bL39.js.map} +1 -1
  28. package/dist/{install-CX65IxGa.js → install-55JbRsO-.js} +1 -1
  29. package/dist/{install-CDVeUT_5.js → install-BhnFP3p3.js} +5 -5
  30. package/dist/{install-CDVeUT_5.js.map → install-BhnFP3p3.js.map} +1 -1
  31. package/dist/{interactive-5-Numwwb.js → interactive-9qRL8259.js} +3 -3
  32. package/dist/{interactive-5-Numwwb.js.map → interactive-9qRL8259.js.map} +1 -1
  33. package/dist/{links-Dmj3Wj9X.js → links-5Blqk4Im.js} +3 -3
  34. package/dist/{links-Dmj3Wj9X.js.map → links-5Blqk4Im.js.map} +1 -1
  35. package/dist/{main-5KNn80Vt.js → main-CUIcozEG.js} +24 -21
  36. package/dist/main-CUIcozEG.js.map +1 -0
  37. package/dist/{mcp-Buf9sfFm.js → mcp-D73aCOHK.js} +3 -3
  38. package/dist/{mcp-Buf9sfFm.js.map → mcp-D73aCOHK.js.map} +1 -1
  39. package/dist/{mcp-prompt-streaming-DHPxJK-F.js → mcp-prompt-streaming-B5lIQ0l1.js} +5 -5
  40. package/dist/{mcp-prompt-streaming-DHPxJK-F.js.map → mcp-prompt-streaming-B5lIQ0l1.js.map} +1 -1
  41. package/dist/{models-C9rjXPZ6.js → models-CLTglHFZ.js} +6 -2
  42. package/dist/models-CLTglHFZ.js.map +1 -0
  43. package/dist/{oauth-session-Bi1MLRCC.js → oauth-session-CfkZ339p.js} +2 -2
  44. package/dist/{oauth-session-Bi1MLRCC.js.map → oauth-session-CfkZ339p.js.map} +1 -1
  45. package/dist/{orchestrator-tools-DyKws92o.js → orchestrator-tools-lvNVQhzs.js} +3 -3
  46. package/dist/{orchestrator-tools-DyKws92o.js.map → orchestrator-tools-lvNVQhzs.js.map} +1 -1
  47. package/dist/{package-manager-DpCdmMmB.js → package-manager-BqRNp5y_.js} +4 -4
  48. package/dist/{package-manager-DpCdmMmB.js.map → package-manager-BqRNp5y_.js.map} +1 -1
  49. package/dist/{pi-DTj1hsJe.js → pi-2pYz2OY3.js} +43 -23
  50. package/dist/pi-2pYz2OY3.js.map +1 -0
  51. package/dist/{playground-CiH6zZPb.js → playground-jxZNxRwC.js} +4 -4
  52. package/dist/{playground-CiH6zZPb.js.map → playground-jxZNxRwC.js.map} +1 -1
  53. package/dist/{posthog-integration-CpinLWNO.js → posthog-integration-DxRkw5DI.js} +21 -21
  54. package/dist/{posthog-integration-CpinLWNO.js.map → posthog-integration-DxRkw5DI.js.map} +1 -1
  55. package/dist/programs-D2793-PK.js +3 -0
  56. package/dist/{programs-Bq9Ju9xk.js → programs-eTv2T2rs.js} +129 -54
  57. package/dist/programs-eTv2T2rs.js.map +1 -0
  58. package/dist/provisioning-CtQ0GEHa.js +2 -0
  59. package/dist/{provisioning-D-AM_7DG.js → provisioning-c5JJ30KX.js} +4 -4
  60. package/dist/{provisioning-D-AM_7DG.js.map → provisioning-c5JJ30KX.js.map} +1 -1
  61. package/dist/{queue-tools-BoIITT7w.js → queue-tools-10w8lhEs.js} +14 -5
  62. package/dist/queue-tools-10w8lhEs.js.map +1 -0
  63. package/dist/{results-CDqlHogZ.js → results-C45prSKD.js} +2 -2
  64. package/dist/{results-CDqlHogZ.js.map → results-C45prSKD.js.map} +1 -1
  65. package/dist/{run-DcaVJSeI.js → run-CM24OgPF.js} +10 -10
  66. package/dist/{run-DcaVJSeI.js.map → run-CM24OgPF.js.map} +1 -1
  67. package/dist/{run-CfMArkpV.js → run-jugssomh.js} +7 -7
  68. package/dist/{run-CfMArkpV.js.map → run-jugssomh.js.map} +1 -1
  69. package/dist/run-tool-BZFgFb_2.js +2 -0
  70. package/dist/{run-tool-DJZWnnR9.js → run-tool-DZrZFoGq.js} +13 -13
  71. package/dist/{run-tool-DJZWnnR9.js.map → run-tool-DZrZFoGq.js.map} +1 -1
  72. package/dist/{runners-Cvnk9BcA.js → runners-CoIYt0iI.js} +8 -8
  73. package/dist/{runners-Cvnk9BcA.js.map → runners-CoIYt0iI.js.map} +1 -1
  74. package/dist/{security-Cz3a-d7r.js → security-ppK2MwCn.js} +6 -5
  75. package/dist/{security-Cz3a-d7r.js.map → security-ppK2MwCn.js.map} +1 -1
  76. package/dist/{setup-utils-C7kaDP5X.js → setup-utils-B5E1rXLa.js} +3 -3
  77. package/dist/{setup-utils-C7kaDP5X.js.map → setup-utils-B5E1rXLa.js.map} +1 -1
  78. package/dist/{start-playground-B62_pYfu.js → start-playground-DujiUNFT.js} +7 -7
  79. package/dist/{start-playground-B62_pYfu.js.map → start-playground-DujiUNFT.js.map} +1 -1
  80. package/dist/{subagent-BBfETG17.js → subagent-BdDWA8j5.js} +12 -4
  81. package/dist/subagent-BdDWA8j5.js.map +1 -0
  82. package/dist/{task-CmNe3xeg.js → task-Y8lWoDE7.js} +34 -23
  83. package/dist/task-Y8lWoDE7.js.map +1 -0
  84. package/dist/{telemetry-DKM7VGuJ.js → telemetry-Cwqf0iur.js} +2 -2
  85. package/dist/{telemetry-DKM7VGuJ.js.map → telemetry-Cwqf0iur.js.map} +1 -1
  86. package/dist/{terminal-Bkxwzkhn.js → terminal-BLL-X6YP.js} +397 -36
  87. package/dist/terminal-BLL-X6YP.js.map +1 -0
  88. package/dist/{tools-DZCEvDv9.js → tools-C8k90ISV.js} +13 -13
  89. package/dist/{tools-DZCEvDv9.js.map → tools-C8k90ISV.js.map} +1 -1
  90. package/dist/{tools-Bm0FDT6f.js → tools-g42e5kJz.js} +8 -8
  91. package/dist/{tools-Bm0FDT6f.js.map → tools-g42e5kJz.js.map} +1 -1
  92. package/dist/{tui-tKI95MSr.js → tui-BPWJ-J-k.js} +1 -1
  93. package/dist/{tui-B56jvkbi.js → tui-CBnRWnrm.js} +4 -4
  94. package/dist/tui-CBnRWnrm.js.map +1 -0
  95. package/dist/{upload-step-DqTgn6UB.js → upload-step-CFoxwd5t.js} +3 -3
  96. package/dist/{upload-step-DqTgn6UB.js.map → upload-step-CFoxwd5t.js.map} +1 -1
  97. package/dist/{urls-B82v7gfO.js → urls-BTZhm5eA.js} +2 -2
  98. package/dist/{urls-B82v7gfO.js.map → urls-BTZhm5eA.js.map} +1 -1
  99. package/dist/{wizard-abort-Cd-7sfCw.js → wizard-abort-HtpiSsQO.js} +4 -4
  100. package/dist/{wizard-abort-Cd-7sfCw.js.map → wizard-abort-HtpiSsQO.js.map} +1 -1
  101. package/dist/{yara-hooks-BS0n3ekf.js → yara-hooks-BPYhN9WM.js} +4 -4
  102. package/dist/{yara-hooks-BS0n3ekf.js.map → yara-hooks-BPYhN9WM.js.map} +1 -1
  103. package/dist/{yara-hooks-CxksH-GZ.js → yara-hooks-BwhEDXIt.js} +1 -1
  104. package/package.json +1 -1
  105. package/dist/agent-interface-3YfIWZmY.js.map +0 -1
  106. package/dist/analytics-B_xFshPY.js.map +0 -1
  107. package/dist/analytics-DGDr6-iD.js +0 -2
  108. package/dist/api-DhLSO3ai.js +0 -2
  109. package/dist/api-key-login-DiRuZ8Lm.js +0 -2
  110. package/dist/main-5KNn80Vt.js.map +0 -1
  111. package/dist/models-C9rjXPZ6.js.map +0 -1
  112. package/dist/pi-DTj1hsJe.js.map +0 -1
  113. package/dist/programs-Bq9Ju9xk.js.map +0 -1
  114. package/dist/programs-CnOSdQo1.js +0 -3
  115. package/dist/provisioning-D6Cqbc36.js +0 -2
  116. package/dist/queue-tools-BoIITT7w.js.map +0 -1
  117. package/dist/run-tool-zMLQroVh.js +0 -2
  118. package/dist/subagent-BBfETG17.js.map +0 -1
  119. package/dist/task-CmNe3xeg.js.map +0 -1
  120. package/dist/terminal-Bkxwzkhn.js.map +0 -1
  121. package/dist/tui-B56jvkbi.js.map +0 -1
@@ -0,0 +1,3 @@
1
+ import "./programs-eTv2T2rs.js";
2
+ import { C as FRAMEWORK_REGISTRY } from "./posthog-integration-DxRkw5DI.js";
3
+ export { FRAMEWORK_REGISTRY };
@@ -1,18 +1,18 @@
1
1
  import { n as ErrorCodes } from "./emit-BqLCdV8Y.js";
2
- import { f as VERSION, l as WIZARD_TASK_STREAM_FILE, o as logToFile, p as HEADLESS_FLAG } from "./debug-BvEbemym.js";
3
- import { B as REPLAY_VISION_SUPPORTED, E as ISSUES_URL, G as WIZARD_CONTACT_EMAIL, I as POSTHOG_PROXY_CLIENT_ID, J as WIZARD_OAUTH_SCOPES, L as POSTHOG_STATUS_PAGE_URL, M as POSTHOG_DOCS_URL, Q as WIZARD_PROVISIONING_SCOPES, S as GPT5_6_TERRA_MODEL, dt as resolveLocalDev, f as DEFAULT_AGENT_MODEL, h as EVENTS_AUDIT_REPORT_FILE, j as POSTHOG_DEV_CLIENT_ID, n as analytics, nt as WIZARD_USER_AGENT, o as mayReportScanResults, r as groupsFromUser, rt as getSkillsBaseUrl } from "./analytics-B_xFshPY.js";
2
+ import { f as VERSION, l as WIZARD_TASK_STREAM_FILE, o as logToFile, p as HEADLESS_FLAG } from "./debug-BTUMatFI.js";
3
+ import { $ as WIZARD_PROVISIONING_SCOPES, C as GPT6_SOL_MODEL, D as ISSUES_URL, K as WIZARD_CONTACT_EMAIL, L as POSTHOG_PROXY_CLIENT_ID, M as POSTHOG_DEV_CLIENT_ID, N as POSTHOG_DOCS_URL, R as POSTHOG_STATUS_PAGE_URL, S as GPT5_6_TERRA_MODEL, V as REPLAY_VISION_SUPPORTED, Y as WIZARD_OAUTH_SCOPES, f as DEFAULT_AGENT_MODEL, ft as resolveLocalDev, h as EVENTS_AUDIT_REPORT_FILE, it as getSkillsBaseUrl, n as analytics, o as mayReportScanResults, r as groupsFromUser, rt as WIZARD_USER_AGENT } from "./analytics-GQv--mQm.js";
4
4
  import { a as WizardError, n as sanitizeErrorDetail, t as classifyRunFailure } from "./errors-DhFeR8Sp.js";
5
- import { i as readProjectFile, t as IGNORED_DIRS } from "./bounded-fs-iRaQcKYL.js";
6
- import { n as isUsingTypeScript } from "./setup-utils-C7kaDP5X.js";
7
- import { l as markGrantRevoked, r as currentCredentials, s as rotateAfterUnauthorized, t as configureOAuthSession } from "./oauth-session-Bi1MLRCC.js";
8
- import { m as checkSkillsOriginHealth, s as AgentSignals } from "./gateway-CWoYlPz7.js";
9
- import { R as WIZARD_TOOL_NAMES, c as checkAllSettingsConflicts, d as restoreClaudeSettings, l as classifySettingsConflicts, nt as LONGER_ASK_TIMEOUT_MS, p as registerCleanup, s as backupAndFixClaudeSettings } from "./agent-interface-3YfIWZmY.js";
10
- import { a as getOAuthUrl, s as resolveBaseUrl } from "./urls-B82v7gfO.js";
11
- import { C as FRAMEWORK_REGISTRY, D as runAgent, O as DEFAULT_BINDING, S as detectFramework, _ as detectProjectsWithAgent, a as detectPostHogIntegration, b as noteDetectedFramework, d as DETECTED_WAREHOUSE_SOURCES_KEY, f as detectWarehouseSources, g as toIntegrationCandidates, h as scopeInstallDirToProject, i as ProgramAbort, m as detectIntegrationProjects, n as WAREHOUSE_SOURCE_SCOPE_ADDITIONS, o as reportWarehouseSourcesDetected, p as getDetectedWarehouseSources, r as abortNoFrameworkDetected, s as stampAiSdkDetected, t as config$13, u as findPackageJsons, v as resolveProjectDir, w as SPINNER_MESSAGE, x as gatherFrameworkContext } from "./posthog-integration-CpinLWNO.js";
12
- import { m as appendStatus } from "./pi-DTj1hsJe.js";
13
- import { v as writeJsonAtomic } from "./queue-tools-BoIITT7w.js";
14
- import { C as coerceAuditChecks, S as AUDIT_REPORT_FILE, x as AUDIT_CHECKS_FILE } from "./yara-hooks-BS0n3ekf.js";
15
- import { t as resolveApiKeyProject } from "./api-key-login-oUJQDmOV.js";
5
+ import { i as readProjectFile, t as IGNORED_DIRS } from "./bounded-fs-B31zq2ir.js";
6
+ import { n as isUsingTypeScript } from "./setup-utils-B5E1rXLa.js";
7
+ import { l as markGrantRevoked, r as currentCredentials, s as rotateAfterUnauthorized, t as configureOAuthSession } from "./oauth-session-CfkZ339p.js";
8
+ import { h as checkSkillsOriginHealth, s as AgentSignals } from "./gateway-CJ8Jqbll.js";
9
+ import { R as WIZARD_TOOL_NAMES, c as checkAllSettingsConflicts, d as restoreClaudeSettings, l as classifySettingsConflicts, nt as LONGER_ASK_TIMEOUT_MS, p as registerCleanup, s as backupAndFixClaudeSettings } from "./agent-interface-fcDXqb-_.js";
10
+ import { a as getOAuthUrl, s as resolveBaseUrl } from "./urls-BTZhm5eA.js";
11
+ import { C as FRAMEWORK_REGISTRY, D as runAgent, O as DEFAULT_BINDING, S as detectFramework, _ as detectProjectsWithAgent, a as detectPostHogIntegration, b as noteDetectedFramework, d as DETECTED_WAREHOUSE_SOURCES_KEY, f as detectWarehouseSources, g as toIntegrationCandidates, h as scopeInstallDirToProject, i as ProgramAbort, m as detectIntegrationProjects, n as WAREHOUSE_SOURCE_SCOPE_ADDITIONS, o as reportWarehouseSourcesDetected, p as getDetectedWarehouseSources, r as abortNoFrameworkDetected, s as stampAiSdkDetected, t as config$14, u as findPackageJsons, v as resolveProjectDir, w as SPINNER_MESSAGE, x as gatherFrameworkContext } from "./posthog-integration-DxRkw5DI.js";
12
+ import { m as appendStatus } from "./pi-2pYz2OY3.js";
13
+ import { y as writeJsonAtomic } from "./queue-tools-10w8lhEs.js";
14
+ import { C as coerceAuditChecks, S as AUDIT_REPORT_FILE, x as AUDIT_CHECKS_FILE } from "./yara-hooks-BPYhN9WM.js";
15
+ import { t as resolveApiKeyProject } from "./api-key-login-tysMeZnR.js";
16
16
  import { valid } from "semver";
17
17
  import * as fs$1 from "fs";
18
18
  import fs, { existsSync, readFileSync, readdirSync, statSync } from "fs";
@@ -248,7 +248,7 @@ const MCP_ANALYTICS_ABORT_CASES = [
248
248
  * 'mcp-analytics'` from context-mill — a deliberate breaking change, done then,
249
249
  * not pre-emptively.
250
250
  */
251
- const config$12 = createSkillProgram({
251
+ const config$13 = createSkillProgram({
252
252
  skillId: "mcp-analytics",
253
253
  command: "mcp-analytics",
254
254
  id: "mcp-analytics",
@@ -295,7 +295,7 @@ const REPLAY_VISION_SCOPE_ADDITIONS = [
295
295
  //#endregion
296
296
  //#region src/programs/replay-vision/index.ts
297
297
  const REPLAY_VISION_REPORT_FILE = "posthog-replay-vision-report.md";
298
- function abortUnsupportedPlatform$1(integration) {
298
+ function abortUnsupportedPlatform$2(integration) {
299
299
  const name = FRAMEWORK_REGISTRY[integration]?.metadata.name ?? integration;
300
300
  analytics.wizardCapture("replay-vision unsupported platform", { integration });
301
301
  throw new ProgramAbort({
@@ -333,7 +333,7 @@ const REPLAY_VISION_ABORT_CASES = [{
333
333
  async function detectReplayVisionProject(ctx) {
334
334
  const integration = await detectFramework(ctx.session.installDir);
335
335
  if (!integration) abortNoFrameworkDetected(NO_FRAMEWORK_GUIDANCE);
336
- if (!REPLAY_VISION_SUPPORTED.has(integration)) abortUnsupportedPlatform$1(integration);
336
+ if (!REPLAY_VISION_SUPPORTED.has(integration)) abortUnsupportedPlatform$2(integration);
337
337
  await detectPostHogIntegration(ctx);
338
338
  }
339
339
  /**
@@ -356,7 +356,7 @@ async function detectReplayVisionProject(ctx) {
356
356
  * to the right project (monorepos), then detect the framework — the
357
357
  * headless equivalent of `onReady`.
358
358
  */
359
- const config$11 = {
359
+ const config$12 = {
360
360
  ...createSkillProgram({
361
361
  skillId: "replay-vision-setup",
362
362
  command: "replay-vision",
@@ -373,8 +373,8 @@ const config$11 = {
373
373
  }),
374
374
  binding: {
375
375
  sequence: "orchestrator",
376
- harness: "anthropic",
377
- model: DEFAULT_AGENT_MODEL
376
+ harness: "pi",
377
+ model: GPT6_SOL_MODEL
378
378
  },
379
379
  agentFlow: "replay-vision",
380
380
  onReady: detectReplayVisionProject,
@@ -383,7 +383,7 @@ const config$11 = {
383
383
  await scopeInstallDirToProject(session, runner);
384
384
  const integration = await detectFramework(session.installDir);
385
385
  if (!integration) abortNoFrameworkDetected(NO_FRAMEWORK_GUIDANCE);
386
- if (!REPLAY_VISION_SUPPORTED.has(integration)) abortUnsupportedPlatform$1(integration);
386
+ if (!REPLAY_VISION_SUPPORTED.has(integration)) abortUnsupportedPlatform$2(integration);
387
387
  session.integration = integration;
388
388
  analytics.setTag("integration", integration);
389
389
  const frameworkConfig = FRAMEWORK_REGISTRY[integration];
@@ -414,7 +414,7 @@ const AI_OBSERVABILITY_REPORT_FILE = "posthog-ai-observability-report.md";
414
414
  * the right variant itself (see `customPrompt`). Stays flat while a single
415
415
  * "add AIO to a project" flow is the only action.
416
416
  */
417
- const config$10 = {
417
+ const config$11 = {
418
418
  binding: {
419
419
  sequence: "linear",
420
420
  harness: "pi",
@@ -473,7 +473,7 @@ const METRICS_REPORT_FILE = "posthog-metrics-report.md";
473
473
  * `customPrompt` both pick from the menu and install it. Stays flat while a
474
474
  * single "add metrics to a project" flow is the only action.
475
475
  */
476
- const config$9 = {
476
+ const config$10 = {
477
477
  command: "metrics",
478
478
  description: "Add PostHog application metrics to your project",
479
479
  id: "metrics",
@@ -783,7 +783,7 @@ const DOCS_URL$3 = "https://posthog.com/docs/product-analytics/best-practices";
783
783
  * skill (whose id AuditRunScreen keys its slides on), not to this config.
784
784
  * Registered so its id stays resolvable; nothing dispatches to it today.
785
785
  */
786
- const config$8 = {
786
+ const config$9 = {
787
787
  description: "Audit PostHog event tracking in this project",
788
788
  id: "events-audit",
789
789
  skillId: "events-audit",
@@ -1036,7 +1036,7 @@ const configs = [{
1036
1036
  ...headlessOption,
1037
1037
  ...regionOption
1038
1038
  }
1039
- }, config$8];
1039
+ }, config$9];
1040
1040
  //#endregion
1041
1041
  //#region src/shared/oauth-scopes.ts
1042
1042
  /**
@@ -1122,7 +1122,7 @@ function detectWebAnalyticsPrerequisites(session, setFrameworkContext) {
1122
1122
  }
1123
1123
  setFrameworkContext("detectedPosthogSdks", sdks);
1124
1124
  }
1125
- const config$7 = {
1125
+ const config$8 = {
1126
1126
  ...createSkillProgram({
1127
1127
  skillId: "web-analytics-doctor",
1128
1128
  command: "web-analytics",
@@ -1150,7 +1150,7 @@ const MIGRATION_ABORT_CASES = [{
1150
1150
  body: "The migration needs an existing third-party SDK to migrate from. No calls to the source SDK appear anywhere in this project. If you haven't installed PostHog yet, you don't need this command — run `npx @posthog/wizard@latest` to add PostHog from scratch."
1151
1151
  }];
1152
1152
  const DEFAULT_MIGRATE_SKILL_ID = "migrate-statsig";
1153
- const config$6 = {
1153
+ const config$7 = {
1154
1154
  command: "migrate",
1155
1155
  description: "Migrate to PostHog from another analytics provider",
1156
1156
  id: "migration",
@@ -1266,7 +1266,7 @@ function detectRevenuePrerequisites(session, setFrameworkContext) {
1266
1266
  }
1267
1267
  //#endregion
1268
1268
  //#region src/programs/revenue-analytics/index.ts
1269
- const config$5 = {
1269
+ const config$6 = {
1270
1270
  command: "revenue-analytics",
1271
1271
  description: "Set up PostHog for Revenue Analytics",
1272
1272
  id: "revenue-analytics-setup",
@@ -1374,7 +1374,7 @@ function buildPrompt(session) {
1374
1374
  "Use the `kind` string exactly as printed above for `source_type` — PostHog rejects the display label."
1375
1375
  ].join("\n");
1376
1376
  }
1377
- const config$4 = {
1377
+ const config$5 = {
1378
1378
  command: "warehouse",
1379
1379
  description: "Detect and connect Data Warehouse sources",
1380
1380
  id: "warehouse-source",
@@ -2136,7 +2136,7 @@ const buildRun = (session) => Promise.resolve({
2136
2136
  };
2137
2137
  }
2138
2138
  });
2139
- const config$3 = {
2139
+ const config$4 = {
2140
2140
  ...createSkillProgram({
2141
2141
  skillId: SELF_DRIVING_SKILL_ID,
2142
2142
  command: "self-driving",
@@ -2719,7 +2719,7 @@ const DOCS_URL = "https://posthog.com/docs/error-tracking/upload-source-maps";
2719
2719
  function ensurePostHogCli(variant, log) {
2720
2720
  preinstallPostHogCliOnce("source maps posthog-cli preinstall failed", { variant }, log);
2721
2721
  }
2722
- const config$2 = {
2722
+ const config$3 = {
2723
2723
  command: "upload-source-maps",
2724
2724
  description: "Upload source maps to PostHog Error Tracking",
2725
2725
  id: "error-tracking-upload-source-maps",
@@ -2845,7 +2845,7 @@ const SYMBOL_UPLOAD_CLI_FRAMEWORKS = new Set([
2845
2845
  "go",
2846
2846
  "rust"
2847
2847
  ]);
2848
- function abortUnsupportedPlatform(integration) {
2848
+ function abortUnsupportedPlatform$1(integration) {
2849
2849
  const name = FRAMEWORK_REGISTRY[integration]?.metadata.name ?? integration;
2850
2850
  analytics.wizardCapture("error tracking unsupported platform", { integration });
2851
2851
  throw new ProgramAbort({
@@ -2931,7 +2931,7 @@ const ERROR_TRACKING_RUN = {
2931
2931
  * project (monorepos), then detect the framework — the headless equivalent
2932
2932
  * of the project picker.
2933
2933
  */
2934
- const config$1 = {
2934
+ const config$2 = {
2935
2935
  binding: {
2936
2936
  sequence: "orchestrator",
2937
2937
  harness: "pi",
@@ -2951,7 +2951,7 @@ const config$1 = {
2951
2951
  await scopeInstallDirToProject(session, runner);
2952
2952
  const integration = await detectFramework(session.installDir);
2953
2953
  if (!integration) abortNoFrameworkDetected();
2954
- if (ERROR_TRACKING_UNSUPPORTED.has(integration)) abortUnsupportedPlatform(integration);
2954
+ if (ERROR_TRACKING_UNSUPPORTED.has(integration)) abortUnsupportedPlatform$1(integration);
2955
2955
  session.integration = integration;
2956
2956
  analytics.setTag("integration", integration);
2957
2957
  session.frameworkConfig = FRAMEWORK_REGISTRY[integration];
@@ -2960,6 +2960,79 @@ const config$1 = {
2960
2960
  }
2961
2961
  };
2962
2962
  //#endregion
2963
+ //#region src/programs/feature-flags/scopes.ts
2964
+ const FEATURE_FLAGS_SCOPE_ADDITIONS = ["feature_flag:read", "feature_flag:write"];
2965
+ //#endregion
2966
+ //#region src/programs/feature-flags/index.ts
2967
+ const FEATURE_FLAGS_REPORT_FILE = "posthog-feature-flags-report.md";
2968
+ const FEATURE_FLAGS_DOCS_URL = "https://posthog.com/docs/feature-flags";
2969
+ const FEATURE_FLAGS_STEP_SKILL_ID = "integration-v2-feature-flags-step";
2970
+ /** KMP skill variants carry no `framework` tag, so orchestrator preflight aborts every KMP run. */
2971
+ const FEATURE_FLAGS_UNSUPPORTED = new Set(["kmp"]);
2972
+ function abortUnsupportedPlatform(integration) {
2973
+ const name = FRAMEWORK_REGISTRY[integration]?.metadata.name ?? integration;
2974
+ analytics.wizardCapture("feature flags unsupported platform", { integration });
2975
+ throw new ProgramAbort({
2976
+ code: ErrorCodes.DetectUnsupportedPlatform,
2977
+ message: `The wizard cannot set up feature flags for ${name} projects yet.\n\nSet them up manually:\n ${FEATURE_FLAGS_DOCS_URL}`
2978
+ });
2979
+ }
2980
+ const config$1 = {
2981
+ command: "feature-flags",
2982
+ description: "Set up example PostHog feature flags",
2983
+ id: "feature-flags",
2984
+ binding: {
2985
+ sequence: "orchestrator",
2986
+ harness: "pi",
2987
+ model: DEFAULT_AGENT_MODEL
2988
+ },
2989
+ agentFlow: "feature-flags",
2990
+ handoffNotebook: true,
2991
+ onReady: (ctx) => detectPostHogIntegration(ctx),
2992
+ oauthScopeAdditions: FEATURE_FLAGS_SCOPE_ADDITIONS,
2993
+ cliOptions: {
2994
+ ...headlessOption,
2995
+ ...regionOption
2996
+ },
2997
+ run: {
2998
+ integrationLabel: "feature-flags",
2999
+ successMessage: "Feature flags wired in!",
3000
+ reportFile: FEATURE_FLAGS_REPORT_FILE,
3001
+ docsUrl: FEATURE_FLAGS_DOCS_URL,
3002
+ spinnerMessage: "Setting up your first feature flags...",
3003
+ estimatedDurationMinutes: 5,
3004
+ buildOutroNextSteps: () => ({
3005
+ heading: "Next steps",
3006
+ items: [
3007
+ "Open your app and load the page or endpoint that evaluates each flag",
3008
+ "Find the evaluation on each flag's page in PostHog (it can take a few minutes to show up)",
3009
+ "Turn the flags on when you're ready"
3010
+ ]
3011
+ })
3012
+ },
3013
+ ciPreRun: async (session, runner) => {
3014
+ await scopeInstallDirToProject(session, runner);
3015
+ const integration = await detectFramework(session.installDir);
3016
+ if (!integration) abortNoFrameworkDetected();
3017
+ if (FEATURE_FLAGS_UNSUPPORTED.has(integration)) abortUnsupportedPlatform(integration);
3018
+ session.integration = integration;
3019
+ analytics.setTag("integration", integration);
3020
+ const frameworkConfig = FRAMEWORK_REGISTRY[integration];
3021
+ session.frameworkConfig = frameworkConfig;
3022
+ session.skillId = integration;
3023
+ const context = await gatherFrameworkContext(frameworkConfig, {
3024
+ installDir: session.installDir,
3025
+ debug: session.debug,
3026
+ signup: session.signup,
3027
+ ci: true,
3028
+ benchmark: session.benchmark,
3029
+ yaraReport: session.yaraReport
3030
+ });
3031
+ for (const [key, value] of Object.entries(context)) if (!(key in session.frameworkContext)) session.frameworkContext[key] = value;
3032
+ noteDetectedFramework(session, frameworkConfig, context, runner.log);
3033
+ }
3034
+ };
3035
+ //#endregion
2963
3036
  //#region src/programs/agent-skill/index.ts
2964
3037
  const config = {
2965
3038
  id: "agent-skill",
@@ -2989,20 +3062,21 @@ const config = {
2989
3062
  const [audit, eventsAudit] = configs;
2990
3063
  /** Every program entry, one line each. */
2991
3064
  const PROGRAM_REGISTRY = [
2992
- config$13,
3065
+ config$14,
3066
+ config$6,
2993
3067
  config$5,
2994
- config$4,
3068
+ config$3,
2995
3069
  config$2,
2996
3070
  config$1,
2997
3071
  ...configs,
3072
+ config$8,
2998
3073
  config$7,
2999
- config$6,
3000
- config$3,
3074
+ config$4,
3001
3075
  config,
3076
+ config$13,
3002
3077
  config$12,
3003
3078
  config$11,
3004
- config$10,
3005
- config$9
3079
+ config$10
3006
3080
  ];
3007
3081
  /**
3008
3082
  * Typed program names. Values come from each config's `id`, so there's
@@ -3010,21 +3084,22 @@ const PROGRAM_REGISTRY = [
3010
3084
  * just exposing that config's `id` under a friendly name for call sites.
3011
3085
  */
3012
3086
  const Program = {
3013
- PostHogIntegration: config$13.id,
3014
- RevenueAnalyticsSetup: config$5.id,
3015
- WarehouseSource: config$4.id,
3016
- ErrorTrackingUploadSourceMaps: config$2.id,
3017
- ErrorTracking: config$1.id,
3018
- Migration: config$6.id,
3087
+ PostHogIntegration: config$14.id,
3088
+ RevenueAnalyticsSetup: config$6.id,
3089
+ WarehouseSource: config$5.id,
3090
+ ErrorTrackingUploadSourceMaps: config$3.id,
3091
+ ErrorTracking: config$2.id,
3092
+ FeatureFlags: config$1.id,
3093
+ Migration: config$7.id,
3019
3094
  Audit: audit.id,
3020
3095
  EventsAudit: eventsAudit.id,
3021
- WebAnalyticsDoctor: config$7.id,
3022
- SelfDriving: config$3.id,
3096
+ WebAnalyticsDoctor: config$8.id,
3097
+ SelfDriving: config$4.id,
3023
3098
  AgentSkill: config.id,
3024
- McpAnalytics: config$12.id,
3025
- ReplayVision: config$11.id,
3026
- AiObservability: config$10.id,
3027
- Metrics: config$9.id
3099
+ McpAnalytics: config$13.id,
3100
+ ReplayVision: config$12.id,
3101
+ AiObservability: config$11.id,
3102
+ Metrics: config$10.id
3028
3103
  };
3029
3104
  /**
3030
3105
  * Look up a program config by its id. Callers pass ids from `Program` or
@@ -4877,7 +4952,7 @@ var WizardRunSync = class {
4877
4952
  type: "local_folder",
4878
4953
  project_name: projectName
4879
4954
  },
4880
- ...valid("2.82.0") ? { wizard_version: VERSION } : {},
4955
+ ...valid("2.83.0") ? { wizard_version: VERSION } : {},
4881
4956
  idempotency_key: randomUUID()
4882
4957
  });
4883
4958
  const result = await this.request("POST", "", body, this.tasksAbort.signal);
@@ -5402,6 +5477,6 @@ function apiKeyCredentials(apiKey, options = {}) {
5402
5477
  }) };
5403
5478
  }
5404
5479
  //#endregion
5405
- export { config$7 as $, getProvisioningScopesForProgram as A, SOURCE_MAPS_CONTEXT_KEYS as B, oauthErrorFromTokenBody as C, getCommandPath as D, findProgramConfig as E, detectErrorTrackingProjects as F, detectSelfDrivingIntegrationProjects as G, NO_DEFAULT_LIMIT as H, config$2 as I, POSTHOG_PRESENT_KEY as J, GITHUB_REQUIRED_BODY as K, detectSourceMapsProjects as L, config as M, config$1 as N, getOAuthScopesForProgram as O, ERROR_TRACKING_PROJECT_PATH_KEY as P, config$6 as Q, DISPLAY_NAME as R, oauthErrorFromCallbackParams as S, Program as T, PRICING_LONG as U, config$3 as V, PRICING_SHORT as W, config$4 as X, SELF_DRIVING_INTEGRATE_PATH_KEY as Y, config$5 as Z, missingOAuthScopes as _, headlessOption as _t, PostHogDestination as a, evaluateWizardReadiness as at, buildCallbackErrorHtml as b, buildSession as c, config$10 as ct, SessionStore as d, createSkillProgram as dt, CONNECT_SLACK_SCOPE_ADDITIONS as et, applyAgentProgress as f, CLI_STEERING_TARGETS as ft, getOAuthClientId as g, installSteeringSnippet as gt, OAuthTokenResponseSchema as h, installOrUpdatePostHogCli as ht, createWizardRunSync as i, SIGNUP_WIZARD_READINESS_CONFIG as it, getSubcommandPrograms as j, getProgramConfig as k, TASK_OUTCOMES_KEY as l, config$11 as lt, logIn as m, findTarget as mt, resolveApiKeyLogin as n, getAuditChecks as nt, createFileDestination as o, getBlockingServiceKeys as ot, TaskStatus as p, detectTargets as pt, GITHUB_REQUIRED_MESSAGE as q, TaskStreamPush as r, SERVICE_LABELS as rt, storeInteraction as s, config$9 as st, apiKeyCredentials as t, withScopeAdditions as tt, runProgram as u, config$12 as ut, parseOAuthScopes as v, isHeadless as vt, PROGRAM_REGISTRY as w, buildOAuthFailureMessage as x, OAuthError as y, regionOption as yt, MANUAL_SDK_VARIANTS as z };
5480
+ export { config$5 as $, getProvisioningScopesForProgram as A, detectSourceMapsProjects as B, oauthErrorFromTokenBody as C, getCommandPath as D, findProgramConfig as E, config$1 as F, NO_DEFAULT_LIMIT as G, MANUAL_SDK_VARIANTS as H, config$2 as I, detectSelfDrivingIntegrationProjects as J, PRICING_LONG as K, ERROR_TRACKING_PROJECT_PATH_KEY as L, config as M, FEATURE_FLAGS_STEP_SKILL_ID as N, getOAuthScopesForProgram as O, FEATURE_FLAGS_UNSUPPORTED as P, SELF_DRIVING_INTEGRATE_PATH_KEY as Q, detectErrorTrackingProjects as R, oauthErrorFromCallbackParams as S, regionOption as St, Program as T, SOURCE_MAPS_CONTEXT_KEYS as U, DISPLAY_NAME as V, config$4 as W, GITHUB_REQUIRED_MESSAGE as X, GITHUB_REQUIRED_BODY as Y, POSTHOG_PRESENT_KEY as Z, missingOAuthScopes as _, findTarget as _t, PostHogDestination as a, getAuditChecks as at, buildCallbackErrorHtml as b, headlessOption as bt, buildSession as c, evaluateWizardReadiness as ct, SessionStore as d, config$11 as dt, config$6 as et, applyAgentProgress as f, config$12 as ft, getOAuthClientId as g, detectTargets as gt, OAuthTokenResponseSchema as h, CLI_STEERING_TARGETS as ht, createWizardRunSync as i, withScopeAdditions as it, getSubcommandPrograms as j, getProgramConfig as k, TASK_OUTCOMES_KEY as l, getBlockingServiceKeys as lt, logIn as m, createSkillProgram as mt, resolveApiKeyLogin as n, config$8 as nt, createFileDestination as o, SERVICE_LABELS as ot, TaskStatus as p, config$13 as pt, PRICING_SHORT as q, TaskStreamPush as r, CONNECT_SLACK_SCOPE_ADDITIONS as rt, storeInteraction as s, SIGNUP_WIZARD_READINESS_CONFIG as st, apiKeyCredentials as t, config$7 as tt, runProgram as u, config$10 as ut, parseOAuthScopes as v, installOrUpdatePostHogCli as vt, PROGRAM_REGISTRY as w, buildOAuthFailureMessage as x, isHeadless as xt, OAuthError as y, installSteeringSnippet as yt, config$3 as z };
5406
5481
 
5407
- //# sourceMappingURL=programs-Bq9Ju9xk.js.map
5482
+ //# sourceMappingURL=programs-eTv2T2rs.js.map