@posthog/wizard 2.76.0 → 2.77.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 (115) hide show
  1. package/dist/README.md +16 -15
  2. package/dist/{add-mcp-server-to-clients-Exddicp2.js → add-mcp-server-to-clients-BnRyE4pw.js} +428 -114
  3. package/dist/add-mcp-server-to-clients-BnRyE4pw.js.map +1 -0
  4. package/dist/{agent-interface-CZWRgZMc.js → agent-interface-Avtr_5M5.js} +34 -10
  5. package/dist/agent-interface-Avtr_5M5.js.map +1 -0
  6. package/dist/{agent-prompt-loader-BobuLDIg.js → agent-prompt-loader-CHixNPgY.js} +23 -7
  7. package/dist/agent-prompt-loader-CHixNPgY.js.map +1 -0
  8. package/dist/{agent-runner-C_R1X_UT.js → agent-runner-COOIUJCP.js} +171 -83
  9. package/dist/agent-runner-COOIUJCP.js.map +1 -0
  10. package/dist/{analytics-C_RyE8fz.js → analytics-C67F2vee.js} +2 -2
  11. package/dist/{analytics-C_RyE8fz.js.map → analytics-C67F2vee.js.map} +1 -1
  12. package/dist/analytics-CJA1uLlk.js +2 -0
  13. package/dist/{api-k5aGQpIZ.js → api-Dj1yabTj.js} +3 -3
  14. package/dist/{api-k5aGQpIZ.js.map → api-Dj1yabTj.js.map} +1 -1
  15. package/dist/bin.js +41 -41
  16. package/dist/bin.js.map +1 -1
  17. package/dist/{bounded-fs-BHLy83N9.js → bounded-fs-CWRYuLAn.js} +3 -3
  18. package/dist/bounded-fs-CWRYuLAn.js.map +1 -0
  19. package/dist/{ci-install-CXt4c41q.js → ci-install-CvXL5h13.js} +5 -5
  20. package/dist/{ci-install-CXt4c41q.js.map → ci-install-CvXL5h13.js.map} +1 -1
  21. package/dist/{debug-C5Zz8hmm.js → debug-B4kzIZPi.js} +12 -9
  22. package/dist/debug-B4kzIZPi.js.map +1 -0
  23. package/dist/{debug-BxMMpepn.js → debug-CziFS0cA.js} +1 -1
  24. package/dist/{defaults-DulzMJpN.js → defaults-4c4YwTmW.js} +26 -3
  25. package/dist/defaults-4c4YwTmW.js.map +1 -0
  26. package/dist/{env-api-key-Ca-CrkgV.js → env-api-key-BZ5wE3Y4.js} +2 -2
  27. package/dist/{env-api-key-Ca-CrkgV.js.map → env-api-key-BZ5wE3Y4.js.map} +1 -1
  28. package/dist/{environment-B0uTamFf.js → environment-BEvsey6i.js} +4 -4
  29. package/dist/{environment-B0uTamFf.js.map → environment-BEvsey6i.js.map} +1 -1
  30. package/dist/{errors--OqLxmWR.js → errors-BoJvrdw8.js} +4 -2
  31. package/dist/errors-BoJvrdw8.js.map +1 -0
  32. package/dist/{file-CNstcW8F.js → file-BoD3REGB.js} +2 -2
  33. package/dist/{file-CNstcW8F.js.map → file-BoD3REGB.js.map} +1 -1
  34. package/dist/{file-watcher-CiT-oZpu.js → file-watcher-BPFazvG_.js} +2 -2
  35. package/dist/{file-watcher-CiT-oZpu.js.map → file-watcher-BPFazvG_.js.map} +1 -1
  36. package/dist/{gateway-session-BIVN_Xfr.js → gateway-session-C118uACz.js} +1 -1
  37. package/dist/{gateway-session-C3Uqwc4R.js → gateway-session-xPFv6p5c.js} +5 -5
  38. package/dist/{gateway-session-C3Uqwc4R.js.map → gateway-session-xPFv6p5c.js.map} +1 -1
  39. package/dist/{headless-ui-TpSp-F43.js → headless-ui-CsmQrDIl.js} +2 -2
  40. package/dist/{headless-ui-TpSp-F43.js.map → headless-ui-CsmQrDIl.js.map} +1 -1
  41. package/dist/{interactive-B72L-sO5.js → interactive-Dej-sxvR.js} +2 -2
  42. package/dist/{interactive-B72L-sO5.js.map → interactive-Dej-sxvR.js.map} +1 -1
  43. package/dist/{mcp-CNc6CLK0.js → mcp-Cbuw_xss.js} +2 -2
  44. package/dist/{mcp-CNc6CLK0.js.map → mcp-Cbuw_xss.js.map} +1 -1
  45. package/dist/{mcp-prompt-streaming-BvBNkzjv.js → mcp-prompt-streaming-BU_kuur_.js} +5 -5
  46. package/dist/{mcp-prompt-streaming-BvBNkzjv.js.map → mcp-prompt-streaming-BU_kuur_.js.map} +1 -1
  47. package/dist/{mint-failure-CZ5FZ0Jd.js → mint-failure-BrleGqMd.js} +72 -39
  48. package/dist/mint-failure-BrleGqMd.js.map +1 -0
  49. package/dist/{non-interactive-UeQlnU0U.js → non-interactive-DcOjH2fw.js} +3 -3
  50. package/dist/{non-interactive-UeQlnU0U.js.map → non-interactive-DcOjH2fw.js.map} +1 -1
  51. package/dist/{orchestrator-tools-CLADku26.js → orchestrator-tools-DXwr8Sp3.js} +4 -4
  52. package/dist/orchestrator-tools-DXwr8Sp3.js.map +1 -0
  53. package/dist/{package-manager-CppzeIgu.js → package-manager-DR23m5Jg.js} +2 -2
  54. package/dist/{package-manager-CppzeIgu.js.map → package-manager-DR23m5Jg.js.map} +1 -1
  55. package/dist/{pi-Bs1Tbt0C.js → pi-mY8I2XkG.js} +13 -13
  56. package/dist/{pi-Bs1Tbt0C.js.map → pi-mY8I2XkG.js.map} +1 -1
  57. package/dist/{playground-CZgZX4j0.js → playground-CDUUKLkC.js} +13 -9
  58. package/dist/playground-CDUUKLkC.js.map +1 -0
  59. package/dist/{posthog-BZ3NNCyh.js → posthog-Hc_-9wrr.js} +2 -2
  60. package/dist/{posthog-BZ3NNCyh.js.map → posthog-Hc_-9wrr.js.map} +1 -1
  61. package/dist/{provisioning-Ba7GWKzK.js → provisioning-xfdjhFtA.js} +3 -3
  62. package/dist/{provisioning-Ba7GWKzK.js.map → provisioning-xfdjhFtA.js.map} +1 -1
  63. package/dist/{queue-tools-D09PNS0X.js → queue-tools-C8y_xZJi.js} +8 -4
  64. package/dist/queue-tools-C8y_xZJi.js.map +1 -0
  65. package/dist/{registry-COcpEsMD.js → registry-DTmREJ-f.js} +5 -5
  66. package/dist/{registry-COcpEsMD.js.map → registry-DTmREJ-f.js.map} +1 -1
  67. package/dist/{security-CpAT0fZa.js → security-Dw2oFJjP.js} +5 -5
  68. package/dist/{security-CpAT0fZa.js.map → security-Dw2oFJjP.js.map} +1 -1
  69. package/dist/{setup-utils-BUAoRjw3.js → setup-utils-fjJTBhaB.js} +8 -8
  70. package/dist/setup-utils-fjJTBhaB.js.map +1 -0
  71. package/dist/{start-tui-Bz23_yym.js → start-tui-UNe2xQ0U.js} +25 -25
  72. package/dist/start-tui-UNe2xQ0U.js.map +1 -0
  73. package/dist/{steps-DbsDish5.js → steps-C2yqOk_h.js} +7 -7
  74. package/dist/{steps-DbsDish5.js.map → steps-C2yqOk_h.js.map} +1 -1
  75. package/dist/{store-D5ROpUje.js → store-Bic4Cr3L.js} +5 -32
  76. package/dist/store-Bic4Cr3L.js.map +1 -0
  77. package/dist/{subagent-CSBZnhgK.js → subagent-Dz41vV9j.js} +2 -2
  78. package/dist/{subagent-CSBZnhgK.js.map → subagent-Dz41vV9j.js.map} +1 -1
  79. package/dist/{task-D8sTR7jZ.js → task-5-fw_Vw3.js} +14 -14
  80. package/dist/{task-D8sTR7jZ.js.map → task-5-fw_Vw3.js.map} +1 -1
  81. package/dist/{task-stream-Dl0XEsZ9.js → task-stream-dVzl6b_q.js} +6 -6
  82. package/dist/{task-stream-Dl0XEsZ9.js.map → task-stream-dVzl6b_q.js.map} +1 -1
  83. package/dist/{tasks-BDt427kT.js → tasks-D1c2z1aw.js} +2 -2
  84. package/dist/{tasks-BDt427kT.js.map → tasks-D1c2z1aw.js.map} +1 -1
  85. package/dist/{telemetry-Dp6zjZBj.js → telemetry-BRnxBRWK.js} +3 -3
  86. package/dist/{telemetry-Dp6zjZBj.js.map → telemetry-BRnxBRWK.js.map} +1 -1
  87. package/dist/{terminal-pInlleVD.js → terminal-9bvRa4Qt.js} +38 -34
  88. package/dist/terminal-9bvRa4Qt.js.map +1 -0
  89. package/dist/{tools-MkyMOjQI.js → tools-Dp6i9k70.js} +8 -8
  90. package/dist/{tools-MkyMOjQI.js.map → tools-Dp6i9k70.js.map} +1 -1
  91. package/dist/{wizard-abort-BHLKVKLN.js → wizard-abort-CAcInAxg.js} +1 -1
  92. package/dist/{wizard-abort-BCnUgT9z.js → wizard-abort-lE6umflt.js} +4 -4
  93. package/dist/{wizard-abort-BCnUgT9z.js.map → wizard-abort-lE6umflt.js.map} +1 -1
  94. package/dist/{yara-hooks-BJWVgTpU.js → yara-hooks-BTNJ6MGW.js} +4 -4
  95. package/dist/{yara-hooks-BJWVgTpU.js.map → yara-hooks-BTNJ6MGW.js.map} +1 -1
  96. package/dist/yara-hooks-CFY4pGcW.js +2 -0
  97. package/package.json +8 -1
  98. package/dist/add-mcp-server-to-clients-Exddicp2.js.map +0 -1
  99. package/dist/agent-interface-CZWRgZMc.js.map +0 -1
  100. package/dist/agent-prompt-loader-BobuLDIg.js.map +0 -1
  101. package/dist/agent-runner-C_R1X_UT.js.map +0 -1
  102. package/dist/analytics-DXvdQqyp.js +0 -2
  103. package/dist/bounded-fs-BHLy83N9.js.map +0 -1
  104. package/dist/debug-C5Zz8hmm.js.map +0 -1
  105. package/dist/defaults-DulzMJpN.js.map +0 -1
  106. package/dist/errors--OqLxmWR.js.map +0 -1
  107. package/dist/mint-failure-CZ5FZ0Jd.js.map +0 -1
  108. package/dist/orchestrator-tools-CLADku26.js.map +0 -1
  109. package/dist/playground-CZgZX4j0.js.map +0 -1
  110. package/dist/queue-tools-D09PNS0X.js.map +0 -1
  111. package/dist/setup-utils-BUAoRjw3.js.map +0 -1
  112. package/dist/start-tui-Bz23_yym.js.map +0 -1
  113. package/dist/store-D5ROpUje.js.map +0 -1
  114. package/dist/terminal-pInlleVD.js.map +0 -1
  115. package/dist/yara-hooks-Dp82xJGd.js +0 -2
@@ -1,18 +1,18 @@
1
- import { d as ErrorCodes, o as AgentSignals } from "./errors--OqLxmWR.js";
2
- import { C as AGENTIC_DETECTION_TIMEOUT_MS, K as POSTHOG_DOCS_URL, St as headlessOption, V as Integration, _ as SIGNUP_WIZARD_READINESS_CONFIG, at as WIZARD_INTERACTION_EVENT_NAME, p as getUI, pt as WIZARD_USER_AGENT, r as debug, s as logToFile, v as evaluateWizardReadiness, wt as regionOption, y as getBlockingServiceKeys } from "./debug-C5Zz8hmm.js";
1
+ import { d as ErrorCodes, o as AgentSignals } from "./errors-BoJvrdw8.js";
2
+ import { Et as regionOption, H as Integration, _ as SIGNUP_WIZARD_READINESS_CONFIG, ht as WIZARD_USER_AGENT, p as getUI, q as POSTHOG_DOCS_URL, r as debug, s as logToFile, st as WIZARD_INTERACTION_EVENT_NAME, v as evaluateWizardReadiness, wt as headlessOption, y as getBlockingServiceKeys } from "./debug-B4kzIZPi.js";
3
3
  import { o as mayReportScanResults } from "./wizard-session-FSJCkTcP.js";
4
- import { n as analytics } from "./analytics-C_RyE8fz.js";
5
- import { i as withUtm, n as openTrackedLink } from "./telemetry-Dp6zjZBj.js";
6
- import "./bounded-fs-BHLy83N9.js";
7
- import { i as tryGetPackageJson, n as isUsingTypeScript } from "./setup-utils-BUAoRjw3.js";
8
- import { i as requestDeepLink } from "./provisioning-Ba7GWKzK.js";
9
- import { s as handleApiError } from "./api-k5aGQpIZ.js";
10
- import { i as wizardAbort } from "./wizard-abort-BCnUgT9z.js";
11
- import { R as WIZARD_TOOL_NAMES, it as LONGER_ASK_TIMEOUT_MS } from "./agent-interface-CZWRgZMc.js";
12
- import { _ as detectProjectsWithAgent, b as detectFramework, f as findPackageJsons, g as detectWarehouseSources, h as getDetectedWarehouseSources, m as detectWarehousePrerequisites, n as runAgent, p as WAREHOUSE_ABORT_CASES, r as shouldDisableAsk, s as detectPostHogIntegration, v as resolveProjectDir, x as authenticate, y as gatherFrameworkContext } from "./agent-runner-C_R1X_UT.js";
13
- import { i as SPINNER_MESSAGE, t as FRAMEWORK_REGISTRY } from "./registry-COcpEsMD.js";
14
- import { S as SETUP_REPORT_FILE$1, _ as AUDIT_CHECKS_KEY, g as AUDIT_CHECKS_FILE, h as EVENT_PLAN_FILE, v as AUDIT_REPORT_FILE } from "./yara-hooks-BJWVgTpU.js";
15
- import { C as writeJsonAtomic } from "./queue-tools-D09PNS0X.js";
4
+ import { n as analytics } from "./analytics-C67F2vee.js";
5
+ import { i as withUtm, n as openTrackedLink } from "./telemetry-BRnxBRWK.js";
6
+ import "./bounded-fs-CWRYuLAn.js";
7
+ import { i as tryGetPackageJson, n as isUsingTypeScript } from "./setup-utils-fjJTBhaB.js";
8
+ import { i as requestDeepLink } from "./provisioning-xfdjhFtA.js";
9
+ import { s as handleApiError } from "./api-Dj1yabTj.js";
10
+ import { i as wizardAbort } from "./wizard-abort-lE6umflt.js";
11
+ import { R as WIZARD_TOOL_NAMES, it as LONGER_ASK_TIMEOUT_MS } from "./agent-interface-Avtr_5M5.js";
12
+ import { C as authenticate, S as detectFramework, _ as detectWarehouseSources, b as resolveProjectDir, c as detectPostHogIntegration, g as getDetectedWarehouseSources, h as detectWarehousePrerequisites, m as WAREHOUSE_ABORT_CASES, n as runAgent, p as findPackageJsons, r as shouldDisableAsk, v as AgenticDetectionTimeoutError, x as gatherFrameworkContext, y as detectProjectsWithAgent } from "./agent-runner-COOIUJCP.js";
13
+ import { i as SPINNER_MESSAGE, t as FRAMEWORK_REGISTRY } from "./registry-DTmREJ-f.js";
14
+ import { S as SETUP_REPORT_FILE$1, _ as AUDIT_CHECKS_KEY, g as AUDIT_CHECKS_FILE, h as EVENT_PLAN_FILE, v as AUDIT_REPORT_FILE } from "./yara-hooks-BTNJ6MGW.js";
15
+ import { w as writeJsonAtomic } from "./queue-tools-C8y_xZJi.js";
16
16
  import { existsSync, readFileSync, readdirSync, statSync } from "fs";
17
17
  import path, { join } from "path";
18
18
  import * as os from "node:os";
@@ -55,8 +55,6 @@ async function detectIntegrationProjects(session, options) {
55
55
  function chooseIntegrationProject(projects) {
56
56
  return projects.find((p) => p.recommended === true && p.targetId != null) ?? projects.find((p) => p.targetId != null && !p.hasPostHog);
57
57
  }
58
- /** Sentinel for a scan that outran AGENTIC_DETECTION_TIMEOUT_MS. */
59
- const TIMED_OUT = Symbol("timed-out");
60
58
  function captureOutcome(outcome, properties = {}) {
61
59
  analytics.wizardCapture("agentic detection", {
62
60
  outcome,
@@ -74,13 +72,18 @@ async function scopeInstallDirToProject(session) {
74
72
  const startedAt = Date.now();
75
73
  let report;
76
74
  try {
77
- report = await Promise.race([detectIntegrationProjects(session, {
75
+ report = await detectIntegrationProjects(session, {
78
76
  programId: "posthog-integration",
79
77
  recommend: true,
80
78
  onEvent: (line) => logToFile("[agentic detect]", line)
81
- }), new Promise((resolve) => setTimeout(() => resolve(TIMED_OUT), AGENTIC_DETECTION_TIMEOUT_MS))]);
79
+ });
82
80
  } catch (err) {
83
81
  const error = err instanceof Error ? err : new Error(String(err));
82
+ if (error instanceof AgenticDetectionTimeoutError) {
83
+ captureOutcome("timeout", { duration_ms: Date.now() - startedAt });
84
+ getUI().log.warn(`${error.message}; continuing with the install dir as-is.`);
85
+ return;
86
+ }
84
87
  analytics.captureException(error, { step: "agentic_detection" });
85
88
  captureOutcome("error", {
86
89
  duration_ms: Date.now() - startedAt,
@@ -89,11 +92,6 @@ async function scopeInstallDirToProject(session) {
89
92
  getUI().log.warn(`Project scan failed (${error.message}); continuing with the install dir as-is.`);
90
93
  return;
91
94
  }
92
- if (report === TIMED_OUT) {
93
- captureOutcome("timeout", { duration_ms: Date.now() - startedAt });
94
- getUI().log.warn(`Project scan timed out after ${AGENTIC_DETECTION_TIMEOUT_MS / 1e3}s; continuing with the install dir as-is.`);
95
- return;
96
- }
97
95
  const { projects } = report;
98
96
  const recommended = projects.find((p) => p.recommended === true);
99
97
  const scanProperties = {
@@ -757,7 +755,7 @@ const PRODUCT_SUITE_BLOCK = {
757
755
  color: "cyan",
758
756
  children: "◆ "
759
757
  }),
760
- "PostHog Code"
758
+ "PostHog Desktop"
761
759
  ] })
762
760
  ]
763
761
  };
@@ -1227,6 +1225,24 @@ function resolveContinueUrl(sess, host, deepLink) {
1227
1225
  /** Sources listed with their own link before the outro falls back to a summary line. */
1228
1226
  const WAREHOUSE_LINK_LIMIT = 3;
1229
1227
  /**
1228
+ * How many detected sources the seeded step is allowed to collect credentials
1229
+ * for.
1230
+ *
1231
+ * The step's cost to the user is one credential prompt per source, and the
1232
+ * wizard knows the count at seed time: detection keys off dependency and
1233
+ * `.env` key names, so an ordinary app can match a dozen sources it has no
1234
+ * intention of importing. Offering all of them asks a person to agree, up
1235
+ * front, to an interrogation whose length they cannot see — and the runs
1236
+ * offered more than a handful answer none of the prompts at all, while the
1237
+ * short ones are where every connected source comes from.
1238
+ *
1239
+ * So the step takes the first few and the outro carries the rest as links,
1240
+ * which is the same trade {@link WAREHOUSE_LINK_LIMIT} already makes for a
1241
+ * list too long to read. Ordering is the registry's, which groups databases
1242
+ * ahead of the API-key SaaS that inflates the tail.
1243
+ */
1244
+ const WAREHOUSE_SEED_LIMIT = 3;
1245
+ /**
1230
1246
  * The app's new-source page, pre-selected to one source kind.
1231
1247
  *
1232
1248
  * `kind` is matched case-insensitively against the connector list, and a kind
@@ -1254,13 +1270,15 @@ function warehouseSourceUrl(host, projectId, kind) {
1254
1270
  *
1255
1271
  * Returns undefined when nothing was detected, so the outro is unchanged for
1256
1272
  * projects with no connectable source — and when the run's own warehouse step
1257
- * connected them, where every bullet here would ask the user to redo work the
1258
- * wizard just did and send them at a new-source form that would collide with
1259
- * the source already created.
1273
+ * connected everything it was given, where every bullet here would ask the
1274
+ * user to redo work the wizard just did and send them at a new-source form
1275
+ * that would collide with the source already created. A completed step is
1276
+ * only ever given the first {@link WAREHOUSE_SEED_LIMIT} sources, so anything
1277
+ * past that is still unconnected and still belongs here.
1260
1278
  */
1261
1279
  function buildWarehouseNextSteps(sess, host, projectId, completedSeededTypes) {
1262
- if (completedSeededTypes.includes(WAREHOUSE_SEED_TASK_TYPE)) return void 0;
1263
- const sources = getDetectedWarehouseSources(sess);
1280
+ const detected = getDetectedWarehouseSources(sess);
1281
+ const sources = completedSeededTypes.includes(WAREHOUSE_SEED_TASK_TYPE) ? detected.slice(WAREHOUSE_SEED_LIMIT) : detected;
1264
1282
  if (sources.length === 0) return void 0;
1265
1283
  const listed = sources.slice(0, WAREHOUSE_LINK_LIMIT);
1266
1284
  const items = listed.map((s) => `Connect ${s.label}: ${warehouseSourceUrl(host, projectId, s.kind)}`);
@@ -1301,19 +1319,24 @@ function warehouseReportInstruction(sess) {
1301
1319
  *
1302
1320
  * Empty when nothing was detected, and in CI, signup, and any other run where
1303
1321
  * `wizard_ask` is disabled — a credential prompt nobody can answer would burn
1304
- * the task's whole timeout and then fail the run.
1322
+ * the task's whole timeout and then fail the run. Capped at
1323
+ * {@link WAREHOUSE_SEED_LIMIT} sources, with the rest handed over as outro
1324
+ * links by {@link buildWarehouseNextSteps}.
1305
1325
  */
1306
1326
  const warehouseSeedTasks = (sess) => {
1307
1327
  if (shouldDisableAsk(sess)) return [];
1308
1328
  const sources = getDetectedWarehouseSources(sess);
1309
1329
  if (sources.length === 0) return [];
1330
+ const offered = sources.slice(0, WAREHOUSE_SEED_LIMIT);
1331
+ const deferred = sources.length - offered.length;
1310
1332
  if (mayReportScanResults(sess)) analytics.wizardCapture("orchestrator warehouse task queued", {
1311
1333
  warehouse_source_count: sources.length,
1312
- warehouse_source_kinds: sources.map((s) => s.kind)
1334
+ warehouse_source_kinds: sources.map((s) => s.kind),
1335
+ warehouse_offered_count: offered.length
1313
1336
  });
1314
1337
  return [{
1315
1338
  type: WAREHOUSE_SEED_TASK_TYPE,
1316
- inputs: { sources: sources.map((s) => ({
1339
+ inputs: { sources: offered.map((s) => ({
1317
1340
  kind: s.kind,
1318
1341
  label: s.label,
1319
1342
  mode: s.mode,
@@ -1321,8 +1344,12 @@ const warehouseSeedTasks = (sess) => {
1321
1344
  })) },
1322
1345
  notice: {
1323
1346
  title: "Connect your data sources",
1324
- body: ["We detected some warehouse sources we can connect to enrich your PostHog data. Answer now, and we connect them at the end of the run, after your code changes. We will ask you for the credentials at that point, and beep when we do.", "You can select [Skip] if you'd like to do this later in PostHog."],
1325
- items: sources.map((s) => s.label),
1347
+ body: [
1348
+ "We detected some warehouse sources we can connect to enrich your PostHog data. Answer now, and we connect them at the end of the run, after your code changes. We will ask you for the credentials at that point, and beep when we do.",
1349
+ ...deferred > 0 ? [`We found ${deferred} more we can connect. Those are listed with a link each at the end, so this step stays short.`] : [],
1350
+ "You can select [Skip] if you'd like to do this later in PostHog."
1351
+ ],
1352
+ items: offered.map((s) => s.label),
1326
1353
  docsLabel: "Learn more about warehouse sources",
1327
1354
  docsUrl: WAREHOUSE_SOURCES_DOCS_URL,
1328
1355
  prompt: "Connect these during setup?",
@@ -1341,6 +1368,7 @@ const posthogIntegrationConfig = {
1341
1368
  getContentBlocks: getContentBlocks$5,
1342
1369
  disallowedTools: [WIZARD_TOOL_NAMES.wizardAsk],
1343
1370
  seedTasks: warehouseSeedTasks,
1371
+ excludedTaskTypes: (flags) => flags["wizard-default-aio-logs"] === "false" ? ["ai-observability", "logs"] : [],
1344
1372
  ciPreRun: async (session) => {
1345
1373
  await scopeInstallDirToProject(session);
1346
1374
  const integration = await detectFramework(session.installDir);
@@ -1384,6 +1412,7 @@ const posthogIntegrationConfig = {
1384
1412
  const versionBucket = config.detection.getVersionBucket(frameworkVersion);
1385
1413
  analytics.setTag(`${config.metadata.integration}-version`, versionBucket);
1386
1414
  }
1415
+ const skillCategoryInstruction = (await analytics.getAllFlagsForWizard())["wizard-default-aio-logs"] !== "false" ? `Choose a skill from the \`integration\` category that matches this project's framework. Start with this framework skill; load the AI Observability and Logs skills when its workflow calls for them, and follow each installed skill's own steps to completion — framework first, then AI Observability, then Logs — before verification and the setup report. Both are included by default where applicable; the skills define applicability and how to report skipped work. These three categories — \`integration\`, \`ai-observability\`, \`logs\` — are the only ones this run uses. Do NOT load or install skills from any other category (llm-analytics, error-tracking, feature-flags, audit, etc.) — those are handled separately. In particular, \`ai-observability\` is the category for AI Observability; do not substitute \`llm-analytics\`.` : `Choose a skill from the \`integration\` category that matches this project's framework. The \`integration\` category is the ONLY one this run uses. Do NOT load or install skills from any other category (ai-observability, logs, llm-analytics, error-tracking, feature-flags, audit, etc.) — those are handled separately. If the installed skill's workflow contains an "AI Observability and Logs" section, skip that entire section: this run excludes both products.`;
1387
1416
  const frameworkContext = session.frameworkContext;
1388
1417
  const contextTags = config.analytics.getTags(frameworkContext);
1389
1418
  Object.entries(contextTags).forEach(([key, value]) => {
@@ -1417,10 +1446,10 @@ Project context:
1417
1446
 
1418
1447
  Instructions (follow these steps IN ORDER - do not skip or reorder):
1419
1448
 
1420
- STEP 1: Call load_skill_menu (from the wizard-tools MCP server) to see available skills.
1449
+ STEP 1: Call load_skill_menu (from the wizard-tools MCP server) with category: "integration" to see available framework skills.
1421
1450
  If the tool fails, emit: ${AgentSignals.ERROR_MCP_MISSING} Could not load skill menu and halt.
1422
1451
 
1423
- Choose a skill from the \`integration\` category that matches this project's framework. Do NOT pick skills from other categories (llm-analytics, error-tracking, feature-flags, omnibus, etc.) — those are handled separately.
1452
+ ${skillCategoryInstruction}
1424
1453
  If no suitable integration skill is found, emit: ${AgentSignals.ERROR_RESOURCE_MISSING} Could not find a suitable skill for this project.
1425
1454
 
1426
1455
  STEP 2: Call install_skill (from the wizard-tools MCP server) with the chosen skill ID (e.g., "integration-nextjs-app-router").
@@ -1444,7 +1473,7 @@ ${warehouseReportInstruction(session)}
1444
1473
  postRun: async (sess, credentials) => {
1445
1474
  const envVars = config.environment.getEnvVars(credentials.projectApiKey, credentials.host.apiHost);
1446
1475
  if (config.environment.uploadToHosting) {
1447
- const { uploadEnvironmentVariablesStep } = await import("./steps-DbsDish5.js");
1476
+ const { uploadEnvironmentVariablesStep } = await import("./steps-C2yqOk_h.js");
1448
1477
  const uploadedEnvVars = await uploadEnvironmentVariablesStep(envVars, {
1449
1478
  integration: config.metadata.integration,
1450
1479
  session: sess
@@ -5497,7 +5526,7 @@ const AI_OBSERVABILITY_STEPS = AGENT_SKILL_STEPS.map((step) => step.id === "intr
5497
5526
  const AI_OBSERVABILITY_REPORT_FILE = "posthog-ai-observability-report.md";
5498
5527
  /**
5499
5528
  * `wizard ai-observability` — wrap the project's LLM client calls so they emit
5500
- * `$ai_generation` events into LLM Analytics.
5529
+ * `$ai_generation` events into AI Observability.
5501
5530
  *
5502
5531
  * No `run.skillId`: the context-mill `ai-observability` group ships one variant
5503
5532
  * per (LLM provider × language) and the wizard does no provider detection —
@@ -5509,6 +5538,10 @@ const aiObservabilityConfig = {
5509
5538
  command: "ai-observability",
5510
5539
  description: "Add PostHog AI Observability to your LLM calls",
5511
5540
  id: "ai-observability",
5541
+ cliOptions: {
5542
+ ...headlessOption,
5543
+ ...regionOption
5544
+ },
5512
5545
  steps: AI_OBSERVABILITY_STEPS,
5513
5546
  reportFile: AI_OBSERVABILITY_REPORT_FILE,
5514
5547
  getContentBlocks: getContentBlocks$4,
@@ -5736,4 +5769,4 @@ function isRunFailure(session) {
5736
5769
  //#endregion
5737
5770
  export { wordWrap as $, installOrUpdatePostHogCli as A, webAnalyticsDoctorConfig as B, ERROR_TRACKING_PROJECT_PATH_KEY as C, CLI_STEERING_TARGETS as D, errorTrackingUploadSourceMapsConfig as E, MANUAL_SDK_INSTALL as F, createSkillProgram as G, getKindMeta as H, MANUAL_SDK_VARIANTS as I, getContentBlocks$4 as J, warehouseSourceConfig as K, RUST_SDK_CRATE as L, AUTOMATABLE_VARIANTS as M, DISPLAY_NAME as N, detectTargets as O, GO_SDK_MODULE as P, computeVisibleRange as Q, SOURCE_MAPS_CONTEXT_KEYS as R, errorTrackingConfig as S, replayVisionConfig as T, fetchHealthIssues as U, posthogDoctorConfig as V, auditConfig as W, posthogIntegrationConfig as X, SETUP_REPORT_FILE as Y, TextBlock as Z, PRICING_SHORT as _, PROGRAM_REGISTRY as a, GITHUB_REQUIRED_MESSAGE as b, getCommandPath as c, metricsConfig as d, isClearBlock as et, aiObservabilityConfig as f, PRICING_LONG as g, NO_DEFAULT_LIMIT as h, isRunFailure as i, Icons as it, installSteeringSnippet as j, findTarget as k, getLaunchablePrograms as l, selfDrivingConfig as m, MINT_FAILURE_CONTACT as n, isObjectBlock as nt, Program as o, mcpAnalyticsConfig as p, revenueAnalyticsConfig as q, MINT_FAILURE_MESSAGE as r, Colors as rt, agentSkillConfig as s, MINT_FAILURE_BODY as t, isLinesBlock as tt, getProgramConfig as u, detectSelfDrivingIntegrationProjects as v, detectErrorTrackingProjects as w, SELF_DRIVING_INTEGRATE_PATH_KEY as x, GITHUB_REQUIRED_BODY as y, migrationConfig as z };
5738
5771
 
5739
- //# sourceMappingURL=mint-failure-CZ5FZ0Jd.js.map
5772
+ //# sourceMappingURL=mint-failure-BrleGqMd.js.map