@posthog/wizard 2.80.1 → 2.81.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 (134) hide show
  1. package/README.md +19 -17
  2. package/dist/README.md +6 -4
  3. package/dist/{agent-interface-CemBvTAA.js → agent-interface-BFzBnz10.js} +184 -25
  4. package/dist/agent-interface-BFzBnz10.js.map +1 -0
  5. package/dist/{agent-prompt-loader-DPnj6SwU.js → agent-prompt-loader-CbCW6YbP.js} +6 -6
  6. package/dist/{agent-prompt-loader-DPnj6SwU.js.map → agent-prompt-loader-CbCW6YbP.js.map} +1 -1
  7. package/dist/{analytics-D21z3E5l.js → analytics-CGGE7OSa.js} +6 -3
  8. package/dist/analytics-CGGE7OSa.js.map +1 -0
  9. package/dist/analytics-D6NAIJxP.js +2 -0
  10. package/dist/api-DM4uMJ00.js +2 -0
  11. package/dist/{api-DtGIqQ2U.js → api-ZZhiRtbb.js} +3 -2
  12. package/dist/{api-DtGIqQ2U.js.map → api-ZZhiRtbb.js.map} +1 -1
  13. package/dist/api-key-login-C30LRht2.js +2 -0
  14. package/dist/{api-key-login-h3E2G3zu.js → api-key-login-D0KBr1dx.js} +5 -5
  15. package/dist/{api-key-login-h3E2G3zu.js.map → api-key-login-D0KBr1dx.js.map} +1 -1
  16. package/dist/bin.js +2 -2
  17. package/dist/{bounded-fs-CAsuF6al.js → bounded-fs-DwL2Tasp.js} +3 -3
  18. package/dist/{bounded-fs-CAsuF6al.js.map → bounded-fs-DwL2Tasp.js.map} +1 -1
  19. package/dist/{ci-install-CEYE02t-.js → ci-install-DKXrt_ow.js} +7 -7
  20. package/dist/{ci-install-CEYE02t-.js.map → ci-install-DKXrt_ow.js.map} +1 -1
  21. package/dist/{console-log-O828zyiq.js → console-log-DJiTqYT2.js} +3 -3
  22. package/dist/{console-log-O828zyiq.js.map → console-log-DJiTqYT2.js.map} +1 -1
  23. package/dist/{debug-BfQPD2Hg.js → debug-sB20p-Ek.js} +3 -3
  24. package/dist/{debug-BfQPD2Hg.js.map → debug-sB20p-Ek.js.map} +1 -1
  25. package/dist/{emit-RfAewcWv.js → emit-BqLCdV8Y.js} +2 -1
  26. package/dist/{emit-RfAewcWv.js.map → emit-BqLCdV8Y.js.map} +1 -1
  27. package/dist/{errors-CHrJzAZb.js → errors-DhFeR8Sp.js} +3 -3
  28. package/dist/{errors-CHrJzAZb.js.map → errors-DhFeR8Sp.js.map} +1 -1
  29. package/dist/{gateway-D3gIlR6b.js → gateway-Dg4Fm-nC.js} +7 -7
  30. package/dist/{gateway-D3gIlR6b.js.map → gateway-Dg4Fm-nC.js.map} +1 -1
  31. package/dist/{headless-DIX68UUA.js → headless-B3Ol1nkU.js} +1 -1
  32. package/dist/{headless-BJjhP0SI.js → headless-DhTDC9ga.js} +2 -2
  33. package/dist/{headless-BJjhP0SI.js.map → headless-DhTDC9ga.js.map} +1 -1
  34. package/dist/{host-resolution-D8GhEVoX.js → host-resolution-DDYJXiAQ.js} +4 -4
  35. package/dist/{host-resolution-D8GhEVoX.js.map → host-resolution-DDYJXiAQ.js.map} +1 -1
  36. package/dist/{install-Bw8tvDvS.js → install-CZeR38cD.js} +1 -1
  37. package/dist/{install-paPCzPHI.js → install-Dh8Z5R15.js} +41 -55
  38. package/dist/install-Dh8Z5R15.js.map +1 -0
  39. package/dist/{interactive-tdxZKWax.js → interactive-hqHk6kz4.js} +3 -3
  40. package/dist/{interactive-tdxZKWax.js.map → interactive-hqHk6kz4.js.map} +1 -1
  41. package/dist/{links-Cyj6v8kg.js → links-rMot83W2.js} +3 -3
  42. package/dist/{links-Cyj6v8kg.js.map → links-rMot83W2.js.map} +1 -1
  43. package/dist/{main-0p-YxUNa.js → main-DNIeasXx.js} +25 -25
  44. package/dist/main-DNIeasXx.js.map +1 -0
  45. package/dist/{mcp-D3Z5MXhA.js → mcp-SZcGfaOz.js} +3 -3
  46. package/dist/{mcp-D3Z5MXhA.js.map → mcp-SZcGfaOz.js.map} +1 -1
  47. package/dist/{mcp-prompt-streaming-COVbWnHt.js → mcp-prompt-streaming-BuRMBgbo.js} +5 -5
  48. package/dist/{mcp-prompt-streaming-COVbWnHt.js.map → mcp-prompt-streaming-BuRMBgbo.js.map} +1 -1
  49. package/dist/{models-D1SnCzvl.js → models-G1j-wgwe.js} +2 -2
  50. package/dist/{models-D1SnCzvl.js.map → models-G1j-wgwe.js.map} +1 -1
  51. package/dist/{non-interactive-DxRBc73O.js → non-interactive-DkldwWDM.js} +4 -4
  52. package/dist/{non-interactive-DxRBc73O.js.map → non-interactive-DkldwWDM.js.map} +1 -1
  53. package/dist/{oauth-session-Dde79Ycm.js → oauth-session-C2fVSGfr.js} +2 -2
  54. package/dist/{oauth-session-Dde79Ycm.js.map → oauth-session-C2fVSGfr.js.map} +1 -1
  55. package/dist/{orchestrator-tools-BSNhzzkT.js → orchestrator-tools-BchqG7Qi.js} +3 -3
  56. package/dist/{orchestrator-tools-BSNhzzkT.js.map → orchestrator-tools-BchqG7Qi.js.map} +1 -1
  57. package/dist/{package-manager-BRXlXo0p.js → package-manager-B3_qSybg.js} +4 -4
  58. package/dist/{package-manager-BRXlXo0p.js.map → package-manager-B3_qSybg.js.map} +1 -1
  59. package/dist/{pi-cM_4Gd_9.js → pi-Cw7CPXSl.js} +15 -15
  60. package/dist/{pi-cM_4Gd_9.js.map → pi-Cw7CPXSl.js.map} +1 -1
  61. package/dist/{playground-DTKy0XHT.js → playground-CPNrQfb3.js} +4 -4
  62. package/dist/{playground-DTKy0XHT.js.map → playground-CPNrQfb3.js.map} +1 -1
  63. package/dist/{posthog-integration-bwHwE87a.js → posthog-integration-FAWfClH3.js} +63 -50
  64. package/dist/posthog-integration-FAWfClH3.js.map +1 -0
  65. package/dist/programs-DjCmEcxb.js +3 -0
  66. package/dist/{programs-SeT1qNik.js → programs-Ml6OLybj.js} +88 -34
  67. package/dist/programs-Ml6OLybj.js.map +1 -0
  68. package/dist/{provisioning-JbJtq7hq.js → provisioning-BTVL49jD.js} +4 -4
  69. package/dist/{provisioning-JbJtq7hq.js.map → provisioning-BTVL49jD.js.map} +1 -1
  70. package/dist/provisioning-DL0xCJXH.js +2 -0
  71. package/dist/{queue-tools-BIZSJyt6.js → queue-tools-BQfRI_uD.js} +4 -4
  72. package/dist/{queue-tools-BIZSJyt6.js.map → queue-tools-BQfRI_uD.js.map} +1 -1
  73. package/dist/{results-DtKICAdz.js → results-ycm_Tf31.js} +37 -2
  74. package/dist/results-ycm_Tf31.js.map +1 -0
  75. package/dist/{run-CDurA5tO.js → run-Bgg-ctbA.js} +31 -15
  76. package/dist/run-Bgg-ctbA.js.map +1 -0
  77. package/dist/{run-DDCvLILJ.js → run-C6Ei6vvb.js} +10 -10
  78. package/dist/run-C6Ei6vvb.js.map +1 -0
  79. package/dist/{run-tool-DML8JJvt.js → run-tool-CrN2xWzU.js} +32 -16
  80. package/dist/{run-tool-DML8JJvt.js.map → run-tool-CrN2xWzU.js.map} +1 -1
  81. package/dist/run-tool-tNjm8S-E.js +2 -0
  82. package/dist/{runners-Dhu4pZTN.js → runners-GGYJs0Ny.js} +37 -19
  83. package/dist/runners-GGYJs0Ny.js.map +1 -0
  84. package/dist/{security-DEH8Rn0_.js → security-C36p8lu6.js} +44 -52
  85. package/dist/security-C36p8lu6.js.map +1 -0
  86. package/dist/{setup-utils-C5-WM-hS.js → setup-utils-Dfgse6pY.js} +3 -3
  87. package/dist/{setup-utils-C5-WM-hS.js.map → setup-utils-Dfgse6pY.js.map} +1 -1
  88. package/dist/{start-playground-DL4mVEUx.js → start-playground-D0TrdLmc.js} +7 -6
  89. package/dist/{start-playground-DL4mVEUx.js.map → start-playground-D0TrdLmc.js.map} +1 -1
  90. package/dist/{subagent-CnFvAq6E.js → subagent-DR5caRzL.js} +7 -7
  91. package/dist/subagent-DR5caRzL.js.map +1 -0
  92. package/dist/{task-BOScSm4W.js → task-C1qKgsAf.js} +18 -17
  93. package/dist/task-C1qKgsAf.js.map +1 -0
  94. package/dist/{telemetry-CP4rGicd.js → telemetry-Ch9ZJvm7.js} +2 -2
  95. package/dist/{telemetry-CP4rGicd.js.map → telemetry-Ch9ZJvm7.js.map} +1 -1
  96. package/dist/{terminal-J3OD3dN0.js → terminal-D20JFN3J.js} +97 -71
  97. package/dist/terminal-D20JFN3J.js.map +1 -0
  98. package/dist/{tools-CCMV3DmB.js → tools-BZseGChD.js} +15 -15
  99. package/dist/{tools-CCMV3DmB.js.map → tools-BZseGChD.js.map} +1 -1
  100. package/dist/{tools-Cz8tDptL.js → tools-CmSMclOD.js} +8 -8
  101. package/dist/{tools-Cz8tDptL.js.map → tools-CmSMclOD.js.map} +1 -1
  102. package/dist/{tui-Csf7VJxt.js → tui-BXe1D0tc.js} +4 -4
  103. package/dist/{tui-Csf7VJxt.js.map → tui-BXe1D0tc.js.map} +1 -1
  104. package/dist/{tui-BUZ2PWqN.js → tui-DJf3ZPRh.js} +1 -1
  105. package/dist/{upload-step-CEacB2RV.js → upload-step-BlAN7MC5.js} +3 -3
  106. package/dist/{upload-step-CEacB2RV.js.map → upload-step-BlAN7MC5.js.map} +1 -1
  107. package/dist/{urls-BDELGZHq.js → urls-eFaChZ9d.js} +2 -2
  108. package/dist/{urls-BDELGZHq.js.map → urls-eFaChZ9d.js.map} +1 -1
  109. package/dist/{wizard-abort-D3-75KyV.js → wizard-abort-BX3O4Hg4.js} +5 -5
  110. package/dist/{wizard-abort-D3-75KyV.js.map → wizard-abort-BX3O4Hg4.js.map} +1 -1
  111. package/dist/{yara-hooks-D8YDyX7o.js → yara-hooks-C4HOysrM.js} +4 -4
  112. package/dist/{yara-hooks-D8YDyX7o.js.map → yara-hooks-C4HOysrM.js.map} +1 -1
  113. package/dist/{yara-hooks-CZ1tKxy_.js → yara-hooks-DV4EkkZY.js} +1 -1
  114. package/package.json +2 -1
  115. package/dist/agent-interface-CemBvTAA.js.map +0 -1
  116. package/dist/analytics-B3ROGuIr.js +0 -2
  117. package/dist/analytics-D21z3E5l.js.map +0 -1
  118. package/dist/api-IhROOQNv.js +0 -2
  119. package/dist/api-key-login-OEntFvu5.js +0 -2
  120. package/dist/install-paPCzPHI.js.map +0 -1
  121. package/dist/main-0p-YxUNa.js.map +0 -1
  122. package/dist/posthog-integration-bwHwE87a.js.map +0 -1
  123. package/dist/programs-BhtyA3lE.js +0 -3
  124. package/dist/programs-SeT1qNik.js.map +0 -1
  125. package/dist/provisioning-BcXfeCMc.js +0 -2
  126. package/dist/results-DtKICAdz.js.map +0 -1
  127. package/dist/run-CDurA5tO.js.map +0 -1
  128. package/dist/run-DDCvLILJ.js.map +0 -1
  129. package/dist/run-tool-CTq9OOdT.js +0 -2
  130. package/dist/runners-Dhu4pZTN.js.map +0 -1
  131. package/dist/security-DEH8Rn0_.js.map +0 -1
  132. package/dist/subagent-CnFvAq6E.js.map +0 -1
  133. package/dist/task-BOScSm4W.js.map +0 -1
  134. package/dist/terminal-J3OD3dN0.js.map +0 -1
@@ -0,0 +1,3 @@
1
+ import "./programs-Ml6OLybj.js";
2
+ import { C as FRAMEWORK_REGISTRY } from "./posthog-integration-FAWfClH3.js";
3
+ export { FRAMEWORK_REGISTRY };
@@ -1,18 +1,18 @@
1
- import { n as ErrorCodes } from "./emit-RfAewcWv.js";
2
- import { f as VERSION, l as WIZARD_TASK_STREAM_FILE, o as logToFile, p as HEADLESS_FLAG } from "./debug-BfQPD2Hg.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-D21z3E5l.js";
4
- import { a as WizardError, n as sanitizeErrorDetail, t as classifyRunFailure } from "./errors-CHrJzAZb.js";
5
- import { i as readProjectFile, t as IGNORED_DIRS } from "./bounded-fs-CAsuF6al.js";
6
- import { n as isUsingTypeScript } from "./setup-utils-C5-WM-hS.js";
7
- import { r as currentCredentials, t as configureOAuthSession } from "./oauth-session-Dde79Ycm.js";
8
- import { m as checkSkillsOriginHealth, s as AgentSignals } from "./gateway-D3gIlR6b.js";
9
- import { R as WIZARD_TOOL_NAMES, _ as markGrantRevoked, c as checkAllSettingsConflicts, d as restoreClaudeSettings, g as isGrantRevoked, l as classifySettingsConflicts, nt as LONGER_ASK_TIMEOUT_MS, p as registerCleanup, s as backupAndFixClaudeSettings } from "./agent-interface-CemBvTAA.js";
10
- import { a as getOAuthUrl, s as resolveBaseUrl } from "./urls-BDELGZHq.js";
11
- import { C as detectFramework, O as runAgent, S as gatherFrameworkContext, T as SPINNER_MESSAGE, _ as toIntegrationCandidates, a as ProgramAbort, c as stampAiSdkDetected, d as findPackageJsons, f as DETECTED_WAREHOUSE_SOURCES_KEY, g as scopeInstallDirToProject, h as detectIntegrationProjects, i as withScopeAdditions, k as DEFAULT_BINDING, m as getDetectedWarehouseSources, n as WAREHOUSE_SOURCE_SCOPE_ADDITIONS, o as detectPostHogIntegration, p as detectWarehouseSources, s as reportWarehouseSourcesDetected, t as config$13, v as detectProjectsWithAgent, w as FRAMEWORK_REGISTRY, x as noteDetectedFramework, y as resolveProjectDir } from "./posthog-integration-bwHwE87a.js";
12
- import { p as appendStatus } from "./pi-cM_4Gd_9.js";
13
- import { v as writeJsonAtomic } from "./queue-tools-BIZSJyt6.js";
14
- import { C as coerceAuditChecks, S as AUDIT_REPORT_FILE, x as AUDIT_CHECKS_FILE } from "./yara-hooks-D8YDyX7o.js";
15
- import { t as resolveApiKeyProject } from "./api-key-login-h3E2G3zu.js";
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-sB20p-Ek.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-CGGE7OSa.js";
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-DwL2Tasp.js";
6
+ import { n as isUsingTypeScript } from "./setup-utils-Dfgse6pY.js";
7
+ import { r as currentCredentials, t as configureOAuthSession } from "./oauth-session-C2fVSGfr.js";
8
+ import { m as checkSkillsOriginHealth, s as AgentSignals } from "./gateway-Dg4Fm-nC.js";
9
+ import { B as WIZARD_TOOL_NAMES, _ as markGrantRevoked, c as checkAllSettingsConflicts, d as restoreClaudeSettings, g as isGrantRevoked, it as LONGER_ASK_TIMEOUT_MS, l as classifySettingsConflicts, p as registerCleanup, s as backupAndFixClaudeSettings } from "./agent-interface-BFzBnz10.js";
10
+ import { a as getOAuthUrl, s as resolveBaseUrl } from "./urls-eFaChZ9d.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-FAWfClH3.js";
12
+ import { p as appendStatus } from "./pi-Cw7CPXSl.js";
13
+ import { v as writeJsonAtomic } from "./queue-tools-BQfRI_uD.js";
14
+ import { C as coerceAuditChecks, S as AUDIT_REPORT_FILE, x as AUDIT_CHECKS_FILE } from "./yara-hooks-C4HOysrM.js";
15
+ import { t as resolveApiKeyProject } from "./api-key-login-D0KBr1dx.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";
@@ -196,13 +196,38 @@ const MCP_ANALYTICS_ABORT_CASES = [
196
196
  match: /^unsupported language for mcp analytics$/i,
197
197
  errorCode: ErrorCodes.DetectUnsupportedPlatform,
198
198
  message: "Unsupported language for MCP analytics",
199
- body: "MCP analytics supports TypeScript/JavaScript (`@posthog/mcp`) and Python (`posthog.mcp`, shipped inside the `posthog` package). This project doesn't look like either, so there's nothing to instrument. See https://posthog.com/docs/mcp-analytics for the supported setups."
199
+ body: "MCP analytics supports TypeScript/JavaScript (`@posthog/mcp`), Python (`posthog.mcp`, shipped inside the `posthog` package), Go (`posthogmcpsdk`, for servers built on the official go-sdk), and Ruby (`PostHog::MCP`, shipped inside the `posthog-ruby` gem, experimental). This project doesn't look like any of them, so there's nothing to instrument. See https://posthog.com/docs/mcp-analytics for the supported setups."
200
200
  },
201
201
  {
202
202
  match: /^no mcp server found$/i,
203
203
  message: "No MCP server found",
204
204
  body: "This command instruments an existing MCP server with PostHog analytics, but no MCP server was found in this project. If you just want PostHog product analytics, run `npx @posthog/wizard` instead."
205
205
  },
206
+ {
207
+ match: /^go mcp server is not built on the official go-sdk$/i,
208
+ message: "Go MCP server not built on the official go-sdk",
209
+ body: "The Go SDK instruments servers built on the official `github.com/modelcontextprotocol/go-sdk`. This server uses another library, so there is no one-line setup. See https://posthog.com/docs/mcp-analytics/installation/go for the supported setup."
210
+ },
211
+ {
212
+ match: /^go toolchain older than 1\.25$/i,
213
+ message: "Go toolchain older than 1.25",
214
+ body: "`posthogmcpsdk` needs Go 1.25 or later, and the installed toolchain couldn't switch to a newer one. Upgrade Go, then run the command again."
215
+ },
216
+ {
217
+ match: /^ruby mcp server is not built on the official mcp gem$/i,
218
+ message: "Ruby MCP server not built on the official mcp gem",
219
+ body: "The Ruby SDK instruments servers built on the official `mcp` gem, or a custom dispatcher through `PostHog::MCP::Client`. This server uses another library. See https://posthog.com/docs/mcp-analytics/installation/ruby for the supported setups."
220
+ },
221
+ {
222
+ match: /^ruby older than 3\.0$/i,
223
+ message: "Ruby older than 3.0",
224
+ body: "`PostHog::MCP` needs Ruby 3.0 or later. Upgrade Ruby, then run the command again."
225
+ },
226
+ {
227
+ match: /^ruby mcp gem older than 1\.4$/i,
228
+ message: "Ruby mcp gem older than 1.4",
229
+ body: "`PostHog::MCP.instrument` needs the `mcp` gem at 1.4 or later. The wizard doesn't change your `mcp` version. Upgrade it, then run the command again."
230
+ },
206
231
  {
207
232
  match: /^could not locate the server entry point$/i,
208
233
  message: "Could not locate the MCP server entry point",
@@ -212,10 +237,10 @@ const MCP_ANALYTICS_ABORT_CASES = [
212
237
  /**
213
238
  * `wizard mcp-analytics` — flat skill command.
214
239
  *
215
- * Instruments the user's own MCP server with the `@posthog/mcp` SDK so it
216
- * reports `$mcp_*` analytics about itself. This is the opposite of
217
- * `wizard mcp add` (which installs the PostHog MCP *server* into a coding
218
- * agent) — keep the two distinct.
240
+ * Instruments the user's own MCP server with the PostHog MCP SDK for its
241
+ * language (TypeScript, Python, Go, or Ruby) so it reports `$mcp_*` analytics about
242
+ * itself. This is the opposite of `wizard mcp add` (which installs the
243
+ * PostHog MCP *server* into a coding agent) — keep the two distinct.
219
244
  *
220
245
  * Flat while instrumenting is the only action. If an uninstrument / `remove`
221
246
  * leaf ever lands, restructure into a family with `familyCommandFactory` and
@@ -229,7 +254,7 @@ const config$12 = createSkillProgram({
229
254
  id: "mcp-analytics",
230
255
  description: "Add PostHog MCP Analytics to your MCP server",
231
256
  integrationLabel: "mcp-analytics",
232
- customPrompt: `Instrument this project's MCP server with PostHog MCP analytics. Run the \`mcp-analytics\` skill end-to-end: detect the server style, install \`@posthog/mcp\` and \`posthog-node\`, wrap the server (or use \`PostHogMCP\` for a custom dispatcher), wire the project API key and host, and verify. Make only additive changes — do not alter tool behavior. The final report is written to ./${MCP_ANALYTICS_REPORT_FILE}.`,
257
+ customPrompt: `Instrument this project's MCP server with PostHog MCP analytics. Run the \`mcp-analytics\` skill end-to-end: detect the language and server style, install the PostHog MCP SDK for that language (\`@posthog/mcp\` for TypeScript, \`posthog\` for Python, \`posthogmcpsdk\` for Go, \`posthog-ruby\` for Ruby), wrap the server (or use the custom-dispatcher client where the skill says so), wire the project API key and host, and verify. Make only additive changes — do not alter tool behavior. For a Ruby server, the report must open by saying the Ruby SDK is experimental and not officially supported. The final report is written to ./${MCP_ANALYTICS_REPORT_FILE}.`,
233
258
  successMessage: `MCP analytics configured! View the report at ./${MCP_ANALYTICS_REPORT_FILE}`,
234
259
  reportFile: MCP_ANALYTICS_REPORT_FILE,
235
260
  docsUrl: "https://posthog.com/docs/mcp-analytics",
@@ -281,6 +306,11 @@ If this repo also contains a web or mobile app, run the command from that projec
281
306
  https://posthog.com/docs/session-replay`
282
307
  });
283
308
  }
309
+ const NO_FRAMEWORK_GUIDANCE = {
310
+ message: "Could not find a Replay Vision compatible framework",
311
+ docsLabel: "Supported replay platforms:",
312
+ docsUrl: "https://posthog.com/docs/session-replay"
313
+ };
284
314
  /**
285
315
  * `[ABORT]` reasons the replay-vision skill emits when the run can't proceed.
286
316
  * Kept in sync with the stop conditions in the skill's `description.md`
@@ -302,7 +332,8 @@ const REPLAY_VISION_ABORT_CASES = [{
302
332
  */
303
333
  async function detectReplayVisionProject(ctx) {
304
334
  const integration = await detectFramework(ctx.session.installDir);
305
- if (integration && !REPLAY_VISION_SUPPORTED.has(integration)) abortUnsupportedPlatform$1(integration);
335
+ if (!integration) abortNoFrameworkDetected(NO_FRAMEWORK_GUIDANCE);
336
+ if (!REPLAY_VISION_SUPPORTED.has(integration)) abortUnsupportedPlatform$1(integration);
306
337
  await detectPostHogIntegration(ctx);
307
338
  }
308
339
  /**
@@ -351,10 +382,7 @@ const config$11 = {
351
382
  ciPreRun: async (session, runner) => {
352
383
  await scopeInstallDirToProject(session, runner);
353
384
  const integration = await detectFramework(session.installDir);
354
- if (!integration) throw new ProgramAbort({
355
- code: ErrorCodes.DetectNoFramework,
356
- message: "Could not auto-detect your framework for this project."
357
- });
385
+ if (!integration) abortNoFrameworkDetected(NO_FRAMEWORK_GUIDANCE);
358
386
  if (!REPLAY_VISION_SUPPORTED.has(integration)) abortUnsupportedPlatform$1(integration);
359
387
  session.integration = integration;
360
388
  analytics.setTag("integration", integration);
@@ -1009,6 +1037,24 @@ const configs = [{
1009
1037
  }
1010
1038
  }, config$8];
1011
1039
  //#endregion
1040
+ //#region src/shared/oauth-scopes.ts
1041
+ /**
1042
+ * Extra scope the Connect-Slack step needs on top of `WIZARD_OAUTH_SCOPES`.
1043
+ *
1044
+ * The step polls `/api/projects/:id/integrations/` (`fetchSlackConnected`)
1045
+ * to render the already-connected variant and to flip live once the user
1046
+ * completes the Slack OAuth step in the browser. Without `integration:read`
1047
+ * the first poll 403s, the screen stops polling, and an already-connected
1048
+ * project is nagged with the connect nudge. Used by the `wizard slack` tool,
1049
+ * where the step is the whole flow.
1050
+ */
1051
+ const CONNECT_SLACK_SCOPE_ADDITIONS = ["integration:read"];
1052
+ /** `base` then `additions`, deduped, base first. */
1053
+ function withScopeAdditions(base, additions) {
1054
+ if (!additions || additions.length === 0) return base;
1055
+ return [...new Set([...base, ...additions])];
1056
+ }
1057
+ //#endregion
1012
1058
  //#region src/programs/web-analytics-doctor/detect.ts
1013
1059
  const WEB_ANALYTICS_ABORT_CASES = [
1014
1060
  {
@@ -2903,10 +2949,7 @@ const config$1 = {
2903
2949
  ciPreRun: async (session, runner) => {
2904
2950
  await scopeInstallDirToProject(session, runner);
2905
2951
  const integration = await detectFramework(session.installDir);
2906
- if (!integration) throw new ProgramAbort({
2907
- code: ErrorCodes.DetectNoFramework,
2908
- message: "Could not auto-detect your framework for this project."
2909
- });
2952
+ if (!integration) abortNoFrameworkDetected();
2910
2953
  if (ERROR_TRACKING_UNSUPPORTED.has(integration)) abortUnsupportedPlatform(integration);
2911
2954
  session.integration = integration;
2912
2955
  analytics.setTag("integration", integration);
@@ -3880,7 +3923,8 @@ async function invokeProgram(programId, callerInput, options) {
3880
3923
  const runResults = [];
3881
3924
  const artifacts = {};
3882
3925
  const settle = (outcome, failure) => {
3883
- if (failure) recordFailure(store, failure);
3926
+ if (failure && signal.aborted) recordCancel(store, failure);
3927
+ else if (failure) recordFailure(store, failure);
3884
3928
  else recordSuccess(store);
3885
3929
  const diagnostics = progress.diagnostics();
3886
3930
  for (const diagnostic of diagnostics) logToFile(`[agent-runner] progress diagnostic (${diagnostic.eventKind} run=${diagnostic.runId}): ${diagnostic.message}`);
@@ -4281,6 +4325,16 @@ function recordFailure(store, failure) {
4281
4325
  store.setRunPhase("error");
4282
4326
  });
4283
4327
  }
4328
+ /** A settled caller cancel, recorded in the store: the cancel outro and the phase. */
4329
+ function recordCancel(store, failure) {
4330
+ store.batch(() => {
4331
+ store.setOutroData({
4332
+ kind: "cancel",
4333
+ message: failure.message
4334
+ });
4335
+ store.setRunPhase("error");
4336
+ });
4337
+ }
4284
4338
  /** Service health, once per invocation, unless the host already checked it. A failure stops the run. */
4285
4339
  async function checkReadiness(programId, config, store, context) {
4286
4340
  const known = store.session.readinessResult;
@@ -4820,7 +4874,7 @@ var WizardRunSync = class {
4820
4874
  type: "local_folder",
4821
4875
  project_name: projectName
4822
4876
  },
4823
- ...valid("2.80.1") ? { wizard_version: VERSION } : {},
4877
+ ...valid("2.81.0") ? { wizard_version: VERSION } : {},
4824
4878
  idempotency_key: randomUUID()
4825
4879
  });
4826
4880
  const result = await this.request("POST", "", body, this.tasksAbort.signal);
@@ -5343,6 +5397,6 @@ function apiKeyCredentials(apiKey, options = {}) {
5343
5397
  }) };
5344
5398
  }
5345
5399
  //#endregion
5346
- 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 _, regionOption as _t, PostHogDestination as a, config$9 as at, buildCallbackErrorHtml as b, buildSession as c, config$12 as ct, SessionStore as d, detectTargets as dt, getAuditChecks as et, applyAgentProgress as f, findTarget as ft, getOAuthClientId as g, isHeadless as gt, OAuthTokenResponseSchema as h, headlessOption as ht, createWizardRunSync as i, getBlockingServiceKeys as it, getSubcommandPrograms as j, getProgramConfig as k, TASK_OUTCOMES_KEY as l, createSkillProgram as lt, logIn as m, installSteeringSnippet as mt, resolveApiKeyLogin as n, SIGNUP_WIZARD_READINESS_CONFIG as nt, createFileDestination as o, config$10 as ot, TaskStatus as p, installOrUpdatePostHogCli as pt, GITHUB_REQUIRED_MESSAGE as q, TaskStreamPush as r, evaluateWizardReadiness as rt, storeInteraction as s, config$11 as st, apiKeyCredentials as t, SERVICE_LABELS as tt, runProgram as u, CLI_STEERING_TARGETS as ut, parseOAuthScopes as v, PROGRAM_REGISTRY as w, buildOAuthFailureMessage as x, OAuthError as y, MANUAL_SDK_VARIANTS as z };
5400
+ 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 };
5347
5401
 
5348
- //# sourceMappingURL=programs-SeT1qNik.js.map
5402
+ //# sourceMappingURL=programs-Ml6OLybj.js.map