@posthog/wizard 2.56.0 → 2.58.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 (95) hide show
  1. package/dist/{add-mcp-server-to-clients-CVA6Wbmu.js → add-mcp-server-to-clients-63P59vxz.js} +4 -4
  2. package/dist/{add-mcp-server-to-clients-CVA6Wbmu.js.map → add-mcp-server-to-clients-63P59vxz.js.map} +1 -1
  3. package/dist/{agent-interface-CaSQlcUF.js → agent-interface-DX6gTS9D.js} +54 -7
  4. package/dist/agent-interface-DX6gTS9D.js.map +1 -0
  5. package/dist/{agent-prompt-loader-BON_ZfNn.js → agent-prompt-loader-B6gToq6A.js} +5 -5
  6. package/dist/{agent-prompt-loader-BON_ZfNn.js.map → agent-prompt-loader-B6gToq6A.js.map} +1 -1
  7. package/dist/{agent-runner-DmqRgcNz.js → agent-runner-Dp581Sva.js} +28 -20
  8. package/dist/agent-runner-Dp581Sva.js.map +1 -0
  9. package/dist/analytics-BJ8Iz5jm.js +2 -0
  10. package/dist/{analytics-Bcj98zOG.js → analytics-Bvq5-kCh.js} +2 -2
  11. package/dist/{analytics-Bcj98zOG.js.map → analytics-Bvq5-kCh.js.map} +1 -1
  12. package/dist/{api-BT317Fnl.js → api-Ca6ntEhK.js} +3 -3
  13. package/dist/{api-BT317Fnl.js.map → api-Ca6ntEhK.js.map} +1 -1
  14. package/dist/bin.js +38 -38
  15. package/dist/{bounded-fs-DZEUmLFS.js → bounded-fs-B4JlDu5o.js} +3 -3
  16. package/dist/{bounded-fs-DZEUmLFS.js.map → bounded-fs-B4JlDu5o.js.map} +1 -1
  17. package/dist/{ci-install-Jcf6VvMs.js → ci-install-Dv13uR0A.js} +4 -4
  18. package/dist/{ci-install-Jcf6VvMs.js.map → ci-install-Dv13uR0A.js.map} +1 -1
  19. package/dist/{debug-B_d72khs.js → debug-CXSslVYE.js} +1 -1
  20. package/dist/{debug-B6VsAfeE.js → debug-Di-I0xld.js} +4 -3
  21. package/dist/debug-Di-I0xld.js.map +1 -0
  22. package/dist/{environment-Dn-Vd-J3.js → environment-CDirVbtE.js} +4 -4
  23. package/dist/{environment-Dn-Vd-J3.js.map → environment-CDirVbtE.js.map} +1 -1
  24. package/dist/{file-watcher-ucN_7-SB.js → file-watcher-NMZvcGgN.js} +2 -2
  25. package/dist/{file-watcher-ucN_7-SB.js.map → file-watcher-NMZvcGgN.js.map} +1 -1
  26. package/dist/{headless-ui-DhtLuoOS.js → headless-ui-DdWlD7hz.js} +5 -2
  27. package/dist/{headless-ui-DhtLuoOS.js.map → headless-ui-DdWlD7hz.js.map} +1 -1
  28. package/dist/{interactive-BU4h53in.js → interactive-CafIogBs.js} +2 -2
  29. package/dist/{interactive-BU4h53in.js.map → interactive-CafIogBs.js.map} +1 -1
  30. package/dist/{mcp-BT6xPsZJ.js → mcp-BNSNGjkQ.js} +2 -2
  31. package/dist/{mcp-BT6xPsZJ.js.map → mcp-BNSNGjkQ.js.map} +1 -1
  32. package/dist/{mcp-prompt-streaming-Ba9zJ2JZ.js → mcp-prompt-streaming-Cm51cE2c.js} +3 -3
  33. package/dist/{mcp-prompt-streaming-Ba9zJ2JZ.js.map → mcp-prompt-streaming-Cm51cE2c.js.map} +1 -1
  34. package/dist/{non-interactive-DWiL-3rV.js → non-interactive-B5Mw8p2W.js} +2 -2
  35. package/dist/{non-interactive-DWiL-3rV.js.map → non-interactive-B5Mw8p2W.js.map} +1 -1
  36. package/dist/{orchestrator-tools-DAoHvBKb.js → orchestrator-tools-BpC54zL6.js} +3 -3
  37. package/dist/{orchestrator-tools-DAoHvBKb.js.map → orchestrator-tools-BpC54zL6.js.map} +1 -1
  38. package/dist/{package-manager-CQjuD9E0.js → package-manager-C04G-yHj.js} +2 -2
  39. package/dist/{package-manager-CQjuD9E0.js.map → package-manager-C04G-yHj.js.map} +1 -1
  40. package/dist/{pi-DdVeXjmn.js → pi-CUwlmNp-.js} +11 -11
  41. package/dist/{pi-DdVeXjmn.js.map → pi-CUwlmNp-.js.map} +1 -1
  42. package/dist/{playground-CkMYkXiw.js → playground-BOiANd3j.js} +6 -6
  43. package/dist/{playground-CkMYkXiw.js.map → playground-BOiANd3j.js.map} +1 -1
  44. package/dist/{posthog-DDLIrku0.js → posthog-Dz1JvV4p.js} +6 -2
  45. package/dist/posthog-Dz1JvV4p.js.map +1 -0
  46. package/dist/{posthog-integration-Cdwv-ohr.js → posthog-integration-BbzluO9E.js} +24 -41
  47. package/dist/{posthog-integration-Cdwv-ohr.js.map → posthog-integration-BbzluO9E.js.map} +1 -1
  48. package/dist/{provisioning-sDvZgL0E.js → provisioning-BiZdXls3.js} +3 -3
  49. package/dist/{provisioning-sDvZgL0E.js.map → provisioning-BiZdXls3.js.map} +1 -1
  50. package/dist/{queue-tools-DfDkhfpu.js → queue-tools-CogIYMnp.js} +3 -3
  51. package/dist/{queue-tools-DfDkhfpu.js.map → queue-tools-CogIYMnp.js.map} +1 -1
  52. package/dist/{registry-Bs7-Q1J9.js → registry-Cre35rWW.js} +5 -5
  53. package/dist/{registry-Bs7-Q1J9.js.map → registry-Cre35rWW.js.map} +1 -1
  54. package/dist/{security-DPVT9zKY.js → security-CbqWpm90.js} +4 -4
  55. package/dist/{security-DPVT9zKY.js.map → security-CbqWpm90.js.map} +1 -1
  56. package/dist/{setup-utils-Bh_HUFPV.js → setup-utils-DJzrAj8A.js} +8 -8
  57. package/dist/{setup-utils-Bh_HUFPV.js.map → setup-utils-DJzrAj8A.js.map} +1 -1
  58. package/dist/{start-tui-DEgpLYEQ.js → start-tui-DI-CdvAc.js} +21 -18
  59. package/dist/start-tui-DI-CdvAc.js.map +1 -0
  60. package/dist/{steps-BjLuR8HU.js → steps-BG1S5Jcd.js} +7 -7
  61. package/dist/{steps-BjLuR8HU.js.map → steps-BG1S5Jcd.js.map} +1 -1
  62. package/dist/{store-DGt4jqrg.js → store-DM0yBeJ8.js} +15 -4
  63. package/dist/store-DM0yBeJ8.js.map +1 -0
  64. package/dist/{subagent-CaXNaC3O.js → subagent-wK5z6Uwj.js} +2 -2
  65. package/dist/{subagent-CaXNaC3O.js.map → subagent-wK5z6Uwj.js.map} +1 -1
  66. package/dist/{task-jhwY_uF-.js → task-DsdeBF3X.js} +14 -13
  67. package/dist/task-DsdeBF3X.js.map +1 -0
  68. package/dist/{task-stream-aKusWX0h.js → task-stream-CkkIJLFH.js} +7 -5
  69. package/dist/task-stream-CkkIJLFH.js.map +1 -0
  70. package/dist/{tasks-BWdKP9g7.js → tasks-CVqcXShx.js} +2 -2
  71. package/dist/{tasks-BWdKP9g7.js.map → tasks-CVqcXShx.js.map} +1 -1
  72. package/dist/{telemetry-JfMjqBNP.js → telemetry-C5Aokvv-.js} +3 -3
  73. package/dist/{telemetry-JfMjqBNP.js.map → telemetry-C5Aokvv-.js.map} +1 -1
  74. package/dist/{terminal-B6ojVY0g.js → terminal-CeyBQI8S.js} +11 -11
  75. package/dist/{terminal-B6ojVY0g.js.map → terminal-CeyBQI8S.js.map} +1 -1
  76. package/dist/{tools-DTBsb5U5.js → tools-DqWBgJbS.js} +19 -7
  77. package/dist/tools-DqWBgJbS.js.map +1 -0
  78. package/dist/{wizard-abort-CeTBd8IM.js → wizard-abort-DjVeqr37.js} +1 -1
  79. package/dist/{wizard-abort-CDIfvSu2.js → wizard-abort-XOuqDEDH.js} +3 -3
  80. package/dist/{wizard-abort-CDIfvSu2.js.map → wizard-abort-XOuqDEDH.js.map} +1 -1
  81. package/dist/yara-hooks-CoSmTEgf.js +2 -0
  82. package/dist/{yara-hooks-DyEPTBZF.js → yara-hooks-QuIJX1gt.js} +4 -4
  83. package/dist/{yara-hooks-DyEPTBZF.js.map → yara-hooks-QuIJX1gt.js.map} +1 -1
  84. package/package.json +1 -1
  85. package/dist/agent-interface-CaSQlcUF.js.map +0 -1
  86. package/dist/agent-runner-DmqRgcNz.js.map +0 -1
  87. package/dist/analytics-CUMQqMBD.js +0 -2
  88. package/dist/debug-B6VsAfeE.js.map +0 -1
  89. package/dist/posthog-DDLIrku0.js.map +0 -1
  90. package/dist/start-tui-DEgpLYEQ.js.map +0 -1
  91. package/dist/store-DGt4jqrg.js.map +0 -1
  92. package/dist/task-jhwY_uF-.js.map +0 -1
  93. package/dist/task-stream-aKusWX0h.js.map +0 -1
  94. package/dist/tools-DTBsb5U5.js.map +0 -1
  95. package/dist/yara-hooks-DAnlPC5v.js +0 -2
@@ -1,3 +1,4 @@
1
+ import { s as logToFile } from "./debug-Di-I0xld.js";
1
2
  //#region src/lib/task-stream/destinations/posthog.ts
2
3
  const MAX_ATTEMPTS = 3;
3
4
  const BASE_BACKOFF_MS = 500;
@@ -74,7 +75,10 @@ var PostHogDestination = class {
74
75
  backoff = Math.min(backoff * 2, MAX_BACKOFF_MS);
75
76
  continue;
76
77
  }
77
- if (response.ok) return;
78
+ if (response.ok) {
79
+ logToFile(`[task-stream] wizard/sessions push ok: ${response.status}`);
80
+ return;
81
+ }
78
82
  const status = response.status;
79
83
  if (status === 401 || status === 403) {
80
84
  this.disabled = true;
@@ -117,4 +121,4 @@ var PostHogDestination = class {
117
121
  //#endregion
118
122
  export { PostHogDestination };
119
123
 
120
- //# sourceMappingURL=posthog-DDLIrku0.js.map
124
+ //# sourceMappingURL=posthog-Dz1JvV4p.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"posthog-Dz1JvV4p.js","names":[],"sources":["../src/lib/task-stream/destinations/posthog.ts"],"sourcesContent":["/**\n * PostHog destination — pushes wizard run state to the PostHog backend\n * via `POST /api/projects/{project_id}/wizard/sessions/`.\n *\n * The endpoint is an upsert keyed by `(team, session_id)`: 201 means\n * the row was created, 200 means it was updated. Both are success.\n *\n * Failure handling is fail-silent: never throws to the caller, never\n * writes to stdout/stderr, never blocks the agent. Errors flow through\n * the optional `onError` callback for the wizard's debug log.\n *\n * Retry policy:\n * 5xx / network → exponential backoff base 500ms cap 8s, max 3 attempts\n * 429 → honour `Retry-After` (seconds), single retry\n * 401 / 403 → disable for the rest of the run, no further pushes\n * 400 → give up for this push, do not disable\n * other 4xx → give up for this push, do not disable\n */\n\nimport type {\n TaskStreamDestination,\n TaskStreamUpdate,\n StreamEvent,\n} from '@lib/task-stream/types';\nimport type { Credentials } from '@lib/wizard-session';\nimport { logToFile } from '@utils/debug';\n\nexport interface PostHogDestinationOptions {\n /**\n * Lazy credential resolver — called on every send. Returns null\n * before authentication has completed; in that case the send is a\n * no-op (no HTTP request).\n */\n getCredentials: () => Credentials | null;\n /** Receives every error for the wizard's internal logfile. */\n onError?: (err: Error) => void;\n /** Override for tests. Defaults to global fetch. */\n fetchImpl?: typeof fetch;\n /** Override for tests. Defaults to setTimeout. */\n sleep?: (ms: number) => Promise<void>;\n}\n\nconst MAX_ATTEMPTS = 3;\nconst BASE_BACKOFF_MS = 500;\nconst MAX_BACKOFF_MS = 8000;\nconst DEFAULT_RETRY_AFTER_MS = 1000;\n// setTimeout silently clamps anything above 2^31-1 ms to fire\n// immediately, so any Retry-After-derived sleep must be capped.\nconst MAX_RETRY_AFTER_MS = 60_000;\n\nfunction defaultSleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\nfunction parseRetryAfter(value: string | null): number {\n if (!value) return DEFAULT_RETRY_AFTER_MS;\n const seconds = Number(value);\n if (Number.isFinite(seconds) && seconds >= 0) {\n return Math.min(Math.ceil(seconds * 1000), MAX_RETRY_AFTER_MS);\n }\n // HTTP-date form — best-effort.\n const date = Date.parse(value);\n if (Number.isFinite(date)) {\n return Math.min(Math.max(0, date - Date.now()), MAX_RETRY_AFTER_MS);\n }\n return DEFAULT_RETRY_AFTER_MS;\n}\n\n/**\n * Strip the internal-only `timestamp` field before sending. The\n * backend schema in the RFC does not define it.\n */\nfunction toWirePayload(\n payload: TaskStreamUpdate,\n): Omit<TaskStreamUpdate, 'timestamp'> {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { timestamp: _unused, ...rest } = payload;\n return rest;\n}\n\nexport class PostHogDestination implements TaskStreamDestination {\n readonly name = 'posthog';\n\n private readonly getCredentials: () => Credentials | null;\n private readonly onError: (err: Error) => void;\n private readonly fetchImpl: typeof fetch;\n private readonly sleep: (ms: number) => Promise<void>;\n\n private disabled = false;\n\n constructor(opts: PostHogDestinationOptions) {\n this.getCredentials = opts.getCredentials;\n this.onError = opts.onError ?? (() => undefined);\n this.fetchImpl = opts.fetchImpl ?? ((...args) => fetch(...args));\n this.sleep = opts.sleep ?? defaultSleep;\n }\n\n async send(_event: StreamEvent, payload: TaskStreamUpdate): Promise<void> {\n if (this.disabled) return;\n const creds = this.getCredentials();\n if (!creds) return;\n\n await this.postWithRetry(creds, toWirePayload(payload));\n }\n\n private buildRequest(\n creds: Credentials,\n body: object,\n ): { url: string; init: Parameters<typeof fetch>[1] } {\n const url = `${creds.host.apiHost.replace(/\\/$/, '')}/api/projects/${\n creds.projectId\n }/wizard/sessions/`;\n return {\n url,\n init: {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${creds.accessToken}`,\n },\n body: JSON.stringify(body),\n },\n };\n }\n\n private async postWithRetry(creds: Credentials, body: object): Promise<void> {\n const { url, init } = this.buildRequest(creds, body);\n let attempt = 0;\n let backoff = BASE_BACKOFF_MS;\n let retriedAfter429 = false;\n\n while (attempt < MAX_ATTEMPTS) {\n attempt += 1;\n let response: Response;\n try {\n response = await this.fetchImpl(url, init);\n } catch (err) {\n if (attempt >= MAX_ATTEMPTS) {\n this.onError(err instanceof Error ? err : new Error(String(err)));\n return;\n }\n await this.sleep(backoff);\n backoff = Math.min(backoff * 2, MAX_BACKOFF_MS);\n continue;\n }\n\n if (response.ok) {\n logToFile(`[task-stream] wizard/sessions push ok: ${response.status}`);\n return;\n }\n\n const status = response.status;\n\n if (status === 401 || status === 403) {\n this.disabled = true;\n this.onError(new Error(`wizard/sessions auth failed: ${status}`));\n return;\n }\n\n if (status === 429) {\n if (retriedAfter429) {\n this.onError(new Error('wizard/sessions rate limited'));\n return;\n }\n retriedAfter429 = true;\n const wait = parseRetryAfter(response.headers.get('Retry-After'));\n await this.sleep(wait);\n // Don't count this against the 5xx attempt budget.\n attempt -= 1;\n continue;\n }\n\n if (status >= 500) {\n if (attempt >= MAX_ATTEMPTS) {\n this.onError(new Error(`wizard/sessions server error: ${status}`));\n return;\n }\n await this.sleep(backoff);\n backoff = Math.min(backoff * 2, MAX_BACKOFF_MS);\n continue;\n }\n\n if (status === 400) {\n let detail = '';\n try {\n detail = await response.text();\n } catch {\n // ignore\n }\n this.onError(new Error(`wizard/sessions bad request (400): ${detail}`));\n return;\n }\n\n this.onError(new Error(`wizard/sessions unexpected status: ${status}`));\n return;\n }\n }\n}\n"],"mappings":";;AA0CA,MAAM,eAAe;AACrB,MAAM,kBAAkB;AACxB,MAAM,iBAAiB;AACvB,MAAM,yBAAyB;AAG/B,MAAM,qBAAqB;AAE3B,SAAS,aAAa,IAA2B;AAC/C,QAAO,IAAI,SAAS,YAAY,WAAW,SAAS,GAAG,CAAC;;AAG1D,SAAS,gBAAgB,OAA8B;AACrD,KAAI,CAAC,MAAO,QAAO;CACnB,MAAM,UAAU,OAAO,MAAM;AAC7B,KAAI,OAAO,SAAS,QAAQ,IAAI,WAAW,EACzC,QAAO,KAAK,IAAI,KAAK,KAAK,UAAU,IAAK,EAAE,mBAAmB;CAGhE,MAAM,OAAO,KAAK,MAAM,MAAM;AAC9B,KAAI,OAAO,SAAS,KAAK,CACvB,QAAO,KAAK,IAAI,KAAK,IAAI,GAAG,OAAO,KAAK,KAAK,CAAC,EAAE,mBAAmB;AAErE,QAAO;;;;;;AAOT,SAAS,cACP,SACqC;CAErC,MAAM,EAAE,WAAW,SAAS,GAAG,SAAS;AACxC,QAAO;;AAGT,IAAa,qBAAb,MAAiE;CAC/D,OAAgB;CAEhB;CACA;CACA;CACA;CAEA,WAAmB;CAEnB,YAAY,MAAiC;AAC3C,OAAK,iBAAiB,KAAK;AAC3B,OAAK,UAAU,KAAK,kBAAkB,KAAA;AACtC,OAAK,YAAY,KAAK,eAAe,GAAG,SAAS,MAAM,GAAG,KAAK;AAC/D,OAAK,QAAQ,KAAK,SAAS;;CAG7B,MAAM,KAAK,QAAqB,SAA0C;AACxE,MAAI,KAAK,SAAU;EACnB,MAAM,QAAQ,KAAK,gBAAgB;AACnC,MAAI,CAAC,MAAO;AAEZ,QAAM,KAAK,cAAc,OAAO,cAAc,QAAQ,CAAC;;CAGzD,aACE,OACA,MACoD;AAIpD,SAAO;GACL,KAJU,GAAG,MAAM,KAAK,QAAQ,QAAQ,OAAO,GAAG,CAAC,gBACnD,MAAM,UACP;GAGC,MAAM;IACJ,QAAQ;IACR,SAAS;KACP,gBAAgB;KAChB,eAAe,UAAU,MAAM;KAChC;IACD,MAAM,KAAK,UAAU,KAAK;IAC3B;GACF;;CAGH,MAAc,cAAc,OAAoB,MAA6B;EAC3E,MAAM,EAAE,KAAK,SAAS,KAAK,aAAa,OAAO,KAAK;EACpD,IAAI,UAAU;EACd,IAAI,UAAU;EACd,IAAI,kBAAkB;AAEtB,SAAO,UAAU,cAAc;AAC7B,cAAW;GACX,IAAI;AACJ,OAAI;AACF,eAAW,MAAM,KAAK,UAAU,KAAK,KAAK;YACnC,KAAK;AACZ,QAAI,WAAW,cAAc;AAC3B,UAAK,QAAQ,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,IAAI,CAAC,CAAC;AACjE;;AAEF,UAAM,KAAK,MAAM,QAAQ;AACzB,cAAU,KAAK,IAAI,UAAU,GAAG,eAAe;AAC/C;;AAGF,OAAI,SAAS,IAAI;AACf,cAAU,0CAA0C,SAAS,SAAS;AACtE;;GAGF,MAAM,SAAS,SAAS;AAExB,OAAI,WAAW,OAAO,WAAW,KAAK;AACpC,SAAK,WAAW;AAChB,SAAK,wBAAQ,IAAI,MAAM,gCAAgC,SAAS,CAAC;AACjE;;AAGF,OAAI,WAAW,KAAK;AAClB,QAAI,iBAAiB;AACnB,UAAK,wBAAQ,IAAI,MAAM,+BAA+B,CAAC;AACvD;;AAEF,sBAAkB;IAClB,MAAM,OAAO,gBAAgB,SAAS,QAAQ,IAAI,cAAc,CAAC;AACjE,UAAM,KAAK,MAAM,KAAK;AAEtB,eAAW;AACX;;AAGF,OAAI,UAAU,KAAK;AACjB,QAAI,WAAW,cAAc;AAC3B,UAAK,wBAAQ,IAAI,MAAM,iCAAiC,SAAS,CAAC;AAClE;;AAEF,UAAM,KAAK,MAAM,QAAQ;AACzB,cAAU,KAAK,IAAI,UAAU,GAAG,eAAe;AAC/C;;AAGF,OAAI,WAAW,KAAK;IAClB,IAAI,SAAS;AACb,QAAI;AACF,cAAS,MAAM,SAAS,MAAM;YACxB;AAGR,SAAK,wBAAQ,IAAI,MAAM,sCAAsC,SAAS,CAAC;AACvE;;AAGF,QAAK,wBAAQ,IAAI,MAAM,sCAAsC,SAAS,CAAC;AACvE"}
@@ -1,16 +1,16 @@
1
- import { L as Integration, N as HAIKU_MODEL, O as DETECTION_TIMEOUT_MS, _ as evaluateWizardReadiness, at as WIZARD_INTERACTION_EVENT_NAME, f as getUI, g as SIGNUP_WIZARD_READINESS_CONFIG, pt as getSkillsBaseUrl, s as logToFile, v as getBlockingServiceKeys, x as AGENTIC_DETECTION_TIMEOUT_MS } from "./debug-B6VsAfeE.js";
2
- import { n as analytics } from "./analytics-Bcj98zOG.js";
3
- import { i as withUtm, n as openTrackedLink } from "./telemetry-JfMjqBNP.js";
4
- import { a as safeReadFile, i as readProjectFile, o as walkProjectFiles } from "./bounded-fs-DZEUmLFS.js";
5
- import { i as tryGetPackageJson, n as isUsingTypeScript } from "./setup-utils-Bh_HUFPV.js";
6
- import { i as requestDeepLink } from "./provisioning-sDvZgL0E.js";
1
+ import { L as Integration, N as HAIKU_MODEL, O as DETECTION_TIMEOUT_MS, _ as evaluateWizardReadiness, at as WIZARD_INTERACTION_EVENT_NAME, f as getUI, g as SIGNUP_WIZARD_READINESS_CONFIG, pt as getSkillsBaseUrl, s as logToFile, v as getBlockingServiceKeys, x as AGENTIC_DETECTION_TIMEOUT_MS } from "./debug-Di-I0xld.js";
2
+ import { n as analytics } from "./analytics-Bvq5-kCh.js";
3
+ import { i as withUtm, n as openTrackedLink } from "./telemetry-C5Aokvv-.js";
4
+ import { a as safeReadFile, i as readProjectFile, o as walkProjectFiles } from "./bounded-fs-B4JlDu5o.js";
5
+ import { i as tryGetPackageJson, n as isUsingTypeScript } from "./setup-utils-DJzrAj8A.js";
6
+ import { i as requestDeepLink } from "./provisioning-BiZdXls3.js";
7
7
  import "./wizard-session-CwgR5y3-.js";
8
- import { i as wizardAbort } from "./wizard-abort-CDIfvSu2.js";
9
- import { n as runAgent, o as authenticate } from "./agent-runner-DmqRgcNz.js";
10
- import { i as runAgent$1, p as AgentSignals, r as initializeAgent, v as WIZARD_TOOL_NAMES } from "./agent-interface-CaSQlcUF.js";
11
- import { h as EVENT_PLAN_FILE } from "./yara-hooks-DyEPTBZF.js";
12
- import { r as detectNodePackageManagers } from "./package-manager-CQjuD9E0.js";
13
- import { i as SPINNER_MESSAGE, t as FRAMEWORK_REGISTRY } from "./registry-Bs7-Q1J9.js";
8
+ import { i as wizardAbort } from "./wizard-abort-XOuqDEDH.js";
9
+ import { n as runAgent, o as authenticate } from "./agent-runner-Dp581Sva.js";
10
+ import { S as WIZARD_TOOL_NAMES, i as runAgent$1, p as AgentSignals, r as initializeAgent } from "./agent-interface-DX6gTS9D.js";
11
+ import { h as EVENT_PLAN_FILE } from "./yara-hooks-QuIJX1gt.js";
12
+ import { r as detectNodePackageManagers } from "./package-manager-C04G-yHj.js";
13
+ import { i as SPINNER_MESSAGE, t as FRAMEWORK_REGISTRY } from "./registry-Cre35rWW.js";
14
14
  import * as semver from "semver";
15
15
  import { existsSync, statSync } from "fs";
16
16
  import { isAbsolute, join, resolve, sep } from "path";
@@ -3587,32 +3587,16 @@ const getContentBlocks = (store) => [
3587
3587
  //#endregion
3588
3588
  //#region src/lib/programs/posthog-integration/handoff.ts
3589
3589
  /**
3590
- * The coding-agent handoff prompt.
3591
- *
3592
- * The wizard finishes a successful run by emitting `posthog-setup-report.md` —
3593
- * which now ends with a "Verify before merging" checklist the agent fills in
3594
- * from the context-mill skill (see the basic-integration conclude step). This
3595
- * is the one-line prompt the operator pastes into their own coding agent to
3596
- * close the gap between "wizard finished" and "PostHog merged": read the
3597
- * report, work the checklist, open a PR.
3598
- *
3599
- * Kept as a pure helper so the exact wording is easy to review and test in
3600
- * isolation. It is surfaced through `OutroData.handoffPrompt`, which the wizard
3601
- * prints to the terminal's main buffer on exit (where it survives in scrollback
3602
- * and stays triple-click-selectable); it is NOT written into any file — the
3603
- * verification content itself lives in the report.
3604
- *
3605
- * The wording asks the agent to investigate each checklist item and get the
3606
- * operator's explicit consent before making any changes — so actions with real
3607
- * implications (e.g. uploading source maps, editing CI) are surfaced and
3608
- * approved, not applied silently. It deliberately stops there: no PR mandate or
3609
- * edit-style rules, since the operator pastes this into their own agent and
3610
- * governs how changes ultimately land.
3611
- *
3612
- * Background: https://github.com/PostHog/wizard/issues/447
3590
+ * The one-line prompt the operator pastes into their own coding agent after a
3591
+ * run: open the setup-report notebook, work its "Verify before merging"
3592
+ * checklist. Surfaced via `OutroData.handoffPrompt` (printed to scrollback on
3593
+ * exit); only exists when the run captured a notebook URL, since no report
3594
+ * file is written. The wording demands investigate-then-approval, and stops
3595
+ * there — the operator's own agent governs how changes land. Background:
3596
+ * https://github.com/PostHog/wizard/issues/447
3613
3597
  */
3614
- function buildCodingAgentPrompt(reportFile) {
3615
- return `Read \`${reportFile}\` and work through its "Verify before merging" checklist: investigate each item, then list the changes you'd make and get my approval before applying any of them.`;
3598
+ function buildCodingAgentPrompt(notebookUrl) {
3599
+ return `Open ${notebookUrl} (the PostHog setup report) and work through its "Verify before merging" checklist: investigate each item, then list the changes you'd make and get my approval before applying any of them.`;
3616
3600
  }
3617
3601
  //#endregion
3618
3602
  //#region src/lib/programs/posthog-integration/index.ts
@@ -3768,7 +3752,7 @@ ${warehouseReportInstruction(session)}
3768
3752
  postRun: async (sess, credentials) => {
3769
3753
  const envVars = config.environment.getEnvVars(credentials.projectApiKey, credentials.host.apiHost);
3770
3754
  if (config.environment.uploadToHosting) {
3771
- const { uploadEnvironmentVariablesStep } = await import("./steps-BjLuR8HU.js");
3755
+ const { uploadEnvironmentVariablesStep } = await import("./steps-BG1S5Jcd.js");
3772
3756
  const uploadedEnvVars = await uploadEnvironmentVariablesStep(envVars, {
3773
3757
  integration: config.metadata.integration,
3774
3758
  session: sess
@@ -3796,13 +3780,12 @@ ${warehouseReportInstruction(session)}
3796
3780
  return {
3797
3781
  kind: "success",
3798
3782
  message: "Successfully installed PostHog!",
3799
- reportFile: SETUP_REPORT_FILE,
3800
3783
  changes: [...config.ui.getOutroChanges(frameworkContext), Object.keys(envVars).length > 0 ? "Added environment variables to .env file" : ""].filter(Boolean),
3801
3784
  docsUrl: config.metadata.docsUrl,
3802
3785
  continueUrl,
3803
3786
  nextSteps: buildWarehouseNextSteps(sess),
3804
3787
  notebookUrl: sess.notebookUrl ?? void 0,
3805
- handoffPrompt: buildCodingAgentPrompt(SETUP_REPORT_FILE)
3788
+ handoffPrompt: sess.notebookUrl ? buildCodingAgentPrompt(sess.notebookUrl) : void 0
3806
3789
  };
3807
3790
  }
3808
3791
  };
@@ -3825,4 +3808,4 @@ const integrationRunStep = {
3825
3808
  //#endregion
3826
3809
  export { resolveProjectDir as C, detectProjectsWithAgent as S, WAREHOUSE_ABORT_CASES as _, LINE_CHART_BLOCK as a, detectWarehouseSources as b, TextBlock as c, isClearBlock as d, isLinesBlock as f, HEALTH_CHECK_STEP as g, Icons as h, FUNNEL_BLOCK as i, computeVisibleRange as l, Colors as m, integrationRunStep as n, PRODUCT_SUITE_BLOCK as o, isObjectBlock as p, posthogIntegrationConfig as r, StatusPeekTrigger as s, SETUP_REPORT_FILE as t, wordWrap as u, detectWarehousePrerequisites as v, gatherFrameworkContext as w, detectIntegrationProjects as x, getDetectedWarehouseSources as y };
3827
3810
 
3828
- //# sourceMappingURL=posthog-integration-Cdwv-ohr.js.map
3811
+ //# sourceMappingURL=posthog-integration-BbzluO9E.js.map