@posthog/wizard 2.81.1 → 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.
- package/dist/{agent-interface-DMP3DZRd.js → agent-interface-fcDXqb-_.js} +285 -66
- package/dist/agent-interface-fcDXqb-_.js.map +1 -0
- package/dist/{agent-prompt-loader-BrivWIna.js → agent-prompt-loader-F9gGPMt0.js} +6 -6
- package/dist/{agent-prompt-loader-BrivWIna.js.map → agent-prompt-loader-F9gGPMt0.js.map} +1 -1
- package/dist/analytics-C9QnGvuc.js +2 -0
- package/dist/{analytics-X7JfAmh6.js → analytics-GQv--mQm.js} +6 -4
- package/dist/analytics-GQv--mQm.js.map +1 -0
- package/dist/api-CsXfZKkq.js +2 -0
- package/dist/{api-BkDwZoL4.js → api-WUOSLXPJ.js} +71 -3
- package/dist/{api-BkDwZoL4.js.map → api-WUOSLXPJ.js.map} +1 -1
- package/dist/api-key-login-CDSxsYtP.js +2 -0
- package/dist/{api-key-login-DE0yKkP4.js → api-key-login-tysMeZnR.js} +5 -5
- package/dist/{api-key-login-DE0yKkP4.js.map → api-key-login-tysMeZnR.js.map} +1 -1
- package/dist/bin.js +1 -1
- package/dist/{bounded-fs-iDiqDQ9v.js → bounded-fs-B31zq2ir.js} +6 -4
- package/dist/bounded-fs-B31zq2ir.js.map +1 -0
- package/dist/{ci-install-BAftKh2Z.js → ci-install-CYSFbFXd.js} +4 -4
- package/dist/{ci-install-BAftKh2Z.js.map → ci-install-CYSFbFXd.js.map} +1 -1
- package/dist/{debug-C3tLP-ZW.js → debug-BTUMatFI.js} +3 -3
- package/dist/{debug-C3tLP-ZW.js.map → debug-BTUMatFI.js.map} +1 -1
- package/dist/{gateway-IQjQ582o.js → gateway-CJ8Jqbll.js} +20 -6
- package/dist/{gateway-IQjQ582o.js.map → gateway-CJ8Jqbll.js.map} +1 -1
- package/dist/{headless-XNvdWVEp.js → headless-DZ3mq07K.js} +1 -1
- package/dist/{headless-DOhxEmw5.js → headless-le-QqOuj.js} +2 -2
- package/dist/{headless-DOhxEmw5.js.map → headless-le-QqOuj.js.map} +1 -1
- package/dist/{host-resolution-DI2oucSK.js → host-resolution-Cht8bL39.js} +4 -4
- package/dist/{host-resolution-DI2oucSK.js.map → host-resolution-Cht8bL39.js.map} +1 -1
- package/dist/{install-DaZ6pvEl.js → install-55JbRsO-.js} +1 -1
- package/dist/{install-BixbBDLR.js → install-BhnFP3p3.js} +5 -5
- package/dist/{install-BixbBDLR.js.map → install-BhnFP3p3.js.map} +1 -1
- package/dist/{interactive-WLNQWF0D.js → interactive-9qRL8259.js} +3 -3
- package/dist/{interactive-WLNQWF0D.js.map → interactive-9qRL8259.js.map} +1 -1
- package/dist/{links-Bye4fsrj.js → links-5Blqk4Im.js} +3 -3
- package/dist/{links-Bye4fsrj.js.map → links-5Blqk4Im.js.map} +1 -1
- package/dist/{main-CN8nbuZO.js → main-CUIcozEG.js} +24 -21
- package/dist/main-CUIcozEG.js.map +1 -0
- package/dist/{mcp-B2o4d9DS.js → mcp-D73aCOHK.js} +3 -3
- package/dist/{mcp-B2o4d9DS.js.map → mcp-D73aCOHK.js.map} +1 -1
- package/dist/{mcp-prompt-streaming-COs1DfAm.js → mcp-prompt-streaming-B5lIQ0l1.js} +5 -5
- package/dist/{mcp-prompt-streaming-COs1DfAm.js.map → mcp-prompt-streaming-B5lIQ0l1.js.map} +1 -1
- package/dist/{models-Cow22jET.js → models-CLTglHFZ.js} +6 -2
- package/dist/models-CLTglHFZ.js.map +1 -0
- package/dist/{oauth-session-Bj_-BY7o.js → oauth-session-CfkZ339p.js} +45 -3
- package/dist/oauth-session-CfkZ339p.js.map +1 -0
- package/dist/{orchestrator-tools-lhFIBGnp.js → orchestrator-tools-lvNVQhzs.js} +3 -3
- package/dist/{orchestrator-tools-lhFIBGnp.js.map → orchestrator-tools-lvNVQhzs.js.map} +1 -1
- package/dist/{package-manager-DZ4wcTz3.js → package-manager-BqRNp5y_.js} +4 -4
- package/dist/{package-manager-DZ4wcTz3.js.map → package-manager-BqRNp5y_.js.map} +1 -1
- package/dist/{pi-DREdQRPP.js → pi-2pYz2OY3.js} +61 -24
- package/dist/pi-2pYz2OY3.js.map +1 -0
- package/dist/{playground-CJx3lwTH.js → playground-jxZNxRwC.js} +4 -4
- package/dist/{playground-CJx3lwTH.js.map → playground-jxZNxRwC.js.map} +1 -1
- package/dist/{posthog-integration-DDSPdbpw.js → posthog-integration-DxRkw5DI.js} +79 -36
- package/dist/posthog-integration-DxRkw5DI.js.map +1 -0
- package/dist/{programs-DvlhdeM_.js → programs-D2793-PK.js} +2 -2
- package/dist/{programs-6SFfUBmm.js → programs-eTv2T2rs.js} +142 -62
- package/dist/programs-eTv2T2rs.js.map +1 -0
- package/dist/provisioning-CtQ0GEHa.js +2 -0
- package/dist/{provisioning-tRDPH7EQ.js → provisioning-c5JJ30KX.js} +4 -4
- package/dist/{provisioning-tRDPH7EQ.js.map → provisioning-c5JJ30KX.js.map} +1 -1
- package/dist/{queue-tools-DrJKvFHZ.js → queue-tools-10w8lhEs.js} +14 -5
- package/dist/queue-tools-10w8lhEs.js.map +1 -0
- package/dist/{results-Crcubw0Q.js → results-C45prSKD.js} +2 -2
- package/dist/{results-Crcubw0Q.js.map → results-C45prSKD.js.map} +1 -1
- package/dist/{run-DVFTMbxf.js → run-CM24OgPF.js} +10 -10
- package/dist/{run-DVFTMbxf.js.map → run-CM24OgPF.js.map} +1 -1
- package/dist/{run-BrIGaPy7.js → run-jugssomh.js} +7 -7
- package/dist/{run-BrIGaPy7.js.map → run-jugssomh.js.map} +1 -1
- package/dist/run-tool-BZFgFb_2.js +2 -0
- package/dist/{run-tool-CxdPXmlY.js → run-tool-DZrZFoGq.js} +13 -13
- package/dist/{run-tool-CxdPXmlY.js.map → run-tool-DZrZFoGq.js.map} +1 -1
- package/dist/{runners-loOOmHyc.js → runners-CoIYt0iI.js} +8 -8
- package/dist/{runners-loOOmHyc.js.map → runners-CoIYt0iI.js.map} +1 -1
- package/dist/{security-C_grSgIM.js → security-ppK2MwCn.js} +6 -5
- package/dist/{security-C_grSgIM.js.map → security-ppK2MwCn.js.map} +1 -1
- package/dist/{setup-utils-BYXbb9NM.js → setup-utils-B5E1rXLa.js} +3 -3
- package/dist/{setup-utils-BYXbb9NM.js.map → setup-utils-B5E1rXLa.js.map} +1 -1
- package/dist/{start-playground-Blh0Swil.js → start-playground-DujiUNFT.js} +7 -7
- package/dist/{start-playground-Blh0Swil.js.map → start-playground-DujiUNFT.js.map} +1 -1
- package/dist/{subagent-DQ_enM8C.js → subagent-BdDWA8j5.js} +12 -4
- package/dist/subagent-BdDWA8j5.js.map +1 -0
- package/dist/{task-Dm9wZbVW.js → task-Y8lWoDE7.js} +46 -23
- package/dist/task-Y8lWoDE7.js.map +1 -0
- package/dist/{telemetry-NeZhrBeW.js → telemetry-Cwqf0iur.js} +2 -2
- package/dist/{telemetry-NeZhrBeW.js.map → telemetry-Cwqf0iur.js.map} +1 -1
- package/dist/{terminal-Z4hCXfie.js → terminal-BLL-X6YP.js} +401 -41
- package/dist/terminal-BLL-X6YP.js.map +1 -0
- package/dist/{tools-dUJHRo6X.js → tools-C8k90ISV.js} +13 -13
- package/dist/{tools-dUJHRo6X.js.map → tools-C8k90ISV.js.map} +1 -1
- package/dist/{tools-1aM6bI9Y.js → tools-g42e5kJz.js} +15 -11
- package/dist/tools-g42e5kJz.js.map +1 -0
- package/dist/{tui-CCO7VVTA.js → tui-BPWJ-J-k.js} +1 -1
- package/dist/{tui-Cmi_ckGg.js → tui-CBnRWnrm.js} +4 -4
- package/dist/tui-CBnRWnrm.js.map +1 -0
- package/dist/{upload-step-e2Jp2fcr.js → upload-step-CFoxwd5t.js} +3 -3
- package/dist/{upload-step-e2Jp2fcr.js.map → upload-step-CFoxwd5t.js.map} +1 -1
- package/dist/{urls-Cu4RO30x.js → urls-BTZhm5eA.js} +2 -2
- package/dist/{urls-Cu4RO30x.js.map → urls-BTZhm5eA.js.map} +1 -1
- package/dist/{wizard-abort-BPEiPCXk.js → wizard-abort-HtpiSsQO.js} +4 -4
- package/dist/{wizard-abort-BPEiPCXk.js.map → wizard-abort-HtpiSsQO.js.map} +1 -1
- package/dist/{yara-hooks-canFIYTc.js → yara-hooks-BPYhN9WM.js} +4 -4
- package/dist/{yara-hooks-canFIYTc.js.map → yara-hooks-BPYhN9WM.js.map} +1 -1
- package/dist/{yara-hooks-CFD60h78.js → yara-hooks-BwhEDXIt.js} +1 -1
- package/package.json +1 -1
- package/dist/agent-interface-DMP3DZRd.js.map +0 -1
- package/dist/analytics-X7JfAmh6.js.map +0 -1
- package/dist/analytics-dcL9EQ4r.js +0 -2
- package/dist/api-BrMGAI-b.js +0 -2
- package/dist/api-key-login-CZEgx2jb.js +0 -2
- package/dist/bounded-fs-iDiqDQ9v.js.map +0 -1
- package/dist/main-CN8nbuZO.js.map +0 -1
- package/dist/models-Cow22jET.js.map +0 -1
- package/dist/oauth-session-Bj_-BY7o.js.map +0 -1
- package/dist/pi-DREdQRPP.js.map +0 -1
- package/dist/posthog-integration-DDSPdbpw.js.map +0 -1
- package/dist/programs-6SFfUBmm.js.map +0 -1
- package/dist/provisioning-CPGWgv7p.js +0 -2
- package/dist/queue-tools-DrJKvFHZ.js.map +0 -1
- package/dist/run-tool-GfISLgEs.js +0 -2
- package/dist/subagent-DQ_enM8C.js.map +0 -1
- package/dist/task-Dm9wZbVW.js.map +0 -1
- package/dist/terminal-Z4hCXfie.js.map +0 -1
- package/dist/tools-1aM6bI9Y.js.map +0 -1
- package/dist/tui-Cmi_ckGg.js.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./programs-
|
|
2
|
-
import { C as FRAMEWORK_REGISTRY } from "./posthog-integration-
|
|
1
|
+
import "./programs-eTv2T2rs.js";
|
|
2
|
+
import { C as FRAMEWORK_REGISTRY } from "./posthog-integration-DxRkw5DI.js";
|
|
3
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-
|
|
3
|
-
import {
|
|
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-
|
|
6
|
-
import { n as isUsingTypeScript } from "./setup-utils-
|
|
7
|
-
import { r as currentCredentials, t as configureOAuthSession } from "./oauth-session-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { a as getOAuthUrl, s as resolveBaseUrl } from "./urls-
|
|
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$
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { C as coerceAuditChecks, S as AUDIT_REPORT_FILE, x as AUDIT_CHECKS_FILE } from "./yara-hooks-
|
|
15
|
-
import { t as resolveApiKeyProject } from "./api-key-login-
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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: "
|
|
377
|
-
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$
|
|
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$
|
|
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$
|
|
476
|
+
const config$10 = {
|
|
477
477
|
command: "metrics",
|
|
478
478
|
description: "Add PostHog application metrics to your project",
|
|
479
479
|
id: "metrics",
|
|
@@ -483,6 +483,7 @@ const config$9 = {
|
|
|
483
483
|
model: DEFAULT_AGENT_MODEL
|
|
484
484
|
},
|
|
485
485
|
agentFlow: "metrics",
|
|
486
|
+
handoffNotebook: true,
|
|
486
487
|
reportFile: METRICS_REPORT_FILE,
|
|
487
488
|
run: {
|
|
488
489
|
integrationLabel: "metrics",
|
|
@@ -782,7 +783,7 @@ const DOCS_URL$3 = "https://posthog.com/docs/product-analytics/best-practices";
|
|
|
782
783
|
* skill (whose id AuditRunScreen keys its slides on), not to this config.
|
|
783
784
|
* Registered so its id stays resolvable; nothing dispatches to it today.
|
|
784
785
|
*/
|
|
785
|
-
const config$
|
|
786
|
+
const config$9 = {
|
|
786
787
|
description: "Audit PostHog event tracking in this project",
|
|
787
788
|
id: "events-audit",
|
|
788
789
|
skillId: "events-audit",
|
|
@@ -1035,7 +1036,7 @@ const configs = [{
|
|
|
1035
1036
|
...headlessOption,
|
|
1036
1037
|
...regionOption
|
|
1037
1038
|
}
|
|
1038
|
-
}, config$
|
|
1039
|
+
}, config$9];
|
|
1039
1040
|
//#endregion
|
|
1040
1041
|
//#region src/shared/oauth-scopes.ts
|
|
1041
1042
|
/**
|
|
@@ -1121,7 +1122,7 @@ function detectWebAnalyticsPrerequisites(session, setFrameworkContext) {
|
|
|
1121
1122
|
}
|
|
1122
1123
|
setFrameworkContext("detectedPosthogSdks", sdks);
|
|
1123
1124
|
}
|
|
1124
|
-
const config$
|
|
1125
|
+
const config$8 = {
|
|
1125
1126
|
...createSkillProgram({
|
|
1126
1127
|
skillId: "web-analytics-doctor",
|
|
1127
1128
|
command: "web-analytics",
|
|
@@ -1149,7 +1150,7 @@ const MIGRATION_ABORT_CASES = [{
|
|
|
1149
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."
|
|
1150
1151
|
}];
|
|
1151
1152
|
const DEFAULT_MIGRATE_SKILL_ID = "migrate-statsig";
|
|
1152
|
-
const config$
|
|
1153
|
+
const config$7 = {
|
|
1153
1154
|
command: "migrate",
|
|
1154
1155
|
description: "Migrate to PostHog from another analytics provider",
|
|
1155
1156
|
id: "migration",
|
|
@@ -1265,7 +1266,7 @@ function detectRevenuePrerequisites(session, setFrameworkContext) {
|
|
|
1265
1266
|
}
|
|
1266
1267
|
//#endregion
|
|
1267
1268
|
//#region src/programs/revenue-analytics/index.ts
|
|
1268
|
-
const config$
|
|
1269
|
+
const config$6 = {
|
|
1269
1270
|
command: "revenue-analytics",
|
|
1270
1271
|
description: "Set up PostHog for Revenue Analytics",
|
|
1271
1272
|
id: "revenue-analytics-setup",
|
|
@@ -1373,7 +1374,7 @@ function buildPrompt(session) {
|
|
|
1373
1374
|
"Use the `kind` string exactly as printed above for `source_type` — PostHog rejects the display label."
|
|
1374
1375
|
].join("\n");
|
|
1375
1376
|
}
|
|
1376
|
-
const config$
|
|
1377
|
+
const config$5 = {
|
|
1377
1378
|
command: "warehouse",
|
|
1378
1379
|
description: "Detect and connect Data Warehouse sources",
|
|
1379
1380
|
id: "warehouse-source",
|
|
@@ -2135,7 +2136,7 @@ const buildRun = (session) => Promise.resolve({
|
|
|
2135
2136
|
};
|
|
2136
2137
|
}
|
|
2137
2138
|
});
|
|
2138
|
-
const config$
|
|
2139
|
+
const config$4 = {
|
|
2139
2140
|
...createSkillProgram({
|
|
2140
2141
|
skillId: SELF_DRIVING_SKILL_ID,
|
|
2141
2142
|
command: "self-driving",
|
|
@@ -2718,7 +2719,7 @@ const DOCS_URL = "https://posthog.com/docs/error-tracking/upload-source-maps";
|
|
|
2718
2719
|
function ensurePostHogCli(variant, log) {
|
|
2719
2720
|
preinstallPostHogCliOnce("source maps posthog-cli preinstall failed", { variant }, log);
|
|
2720
2721
|
}
|
|
2721
|
-
const config$
|
|
2722
|
+
const config$3 = {
|
|
2722
2723
|
command: "upload-source-maps",
|
|
2723
2724
|
description: "Upload source maps to PostHog Error Tracking",
|
|
2724
2725
|
id: "error-tracking-upload-source-maps",
|
|
@@ -2844,7 +2845,7 @@ const SYMBOL_UPLOAD_CLI_FRAMEWORKS = new Set([
|
|
|
2844
2845
|
"go",
|
|
2845
2846
|
"rust"
|
|
2846
2847
|
]);
|
|
2847
|
-
function abortUnsupportedPlatform(integration) {
|
|
2848
|
+
function abortUnsupportedPlatform$1(integration) {
|
|
2848
2849
|
const name = FRAMEWORK_REGISTRY[integration]?.metadata.name ?? integration;
|
|
2849
2850
|
analytics.wizardCapture("error tracking unsupported platform", { integration });
|
|
2850
2851
|
throw new ProgramAbort({
|
|
@@ -2930,7 +2931,7 @@ const ERROR_TRACKING_RUN = {
|
|
|
2930
2931
|
* project (monorepos), then detect the framework — the headless equivalent
|
|
2931
2932
|
* of the project picker.
|
|
2932
2933
|
*/
|
|
2933
|
-
const config$
|
|
2934
|
+
const config$2 = {
|
|
2934
2935
|
binding: {
|
|
2935
2936
|
sequence: "orchestrator",
|
|
2936
2937
|
harness: "pi",
|
|
@@ -2950,7 +2951,7 @@ const config$1 = {
|
|
|
2950
2951
|
await scopeInstallDirToProject(session, runner);
|
|
2951
2952
|
const integration = await detectFramework(session.installDir);
|
|
2952
2953
|
if (!integration) abortNoFrameworkDetected();
|
|
2953
|
-
if (ERROR_TRACKING_UNSUPPORTED.has(integration)) abortUnsupportedPlatform(integration);
|
|
2954
|
+
if (ERROR_TRACKING_UNSUPPORTED.has(integration)) abortUnsupportedPlatform$1(integration);
|
|
2954
2955
|
session.integration = integration;
|
|
2955
2956
|
analytics.setTag("integration", integration);
|
|
2956
2957
|
session.frameworkConfig = FRAMEWORK_REGISTRY[integration];
|
|
@@ -2959,6 +2960,79 @@ const config$1 = {
|
|
|
2959
2960
|
}
|
|
2960
2961
|
};
|
|
2961
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
|
|
2962
3036
|
//#region src/programs/agent-skill/index.ts
|
|
2963
3037
|
const config = {
|
|
2964
3038
|
id: "agent-skill",
|
|
@@ -2978,7 +3052,8 @@ const config = {
|
|
|
2978
3052
|
successMessage: `${skillId} complete!`,
|
|
2979
3053
|
estimatedDurationMinutes: 5,
|
|
2980
3054
|
reportFile: `posthog-${skillId}-report.md`,
|
|
2981
|
-
docsUrl: POSTHOG_DOCS_URL
|
|
3055
|
+
docsUrl: POSTHOG_DOCS_URL,
|
|
3056
|
+
handoffNotebook: skillId.startsWith("integration-")
|
|
2982
3057
|
});
|
|
2983
3058
|
}
|
|
2984
3059
|
};
|
|
@@ -2987,20 +3062,21 @@ const config = {
|
|
|
2987
3062
|
const [audit, eventsAudit] = configs;
|
|
2988
3063
|
/** Every program entry, one line each. */
|
|
2989
3064
|
const PROGRAM_REGISTRY = [
|
|
2990
|
-
config$
|
|
3065
|
+
config$14,
|
|
3066
|
+
config$6,
|
|
2991
3067
|
config$5,
|
|
2992
|
-
config$
|
|
3068
|
+
config$3,
|
|
2993
3069
|
config$2,
|
|
2994
3070
|
config$1,
|
|
2995
3071
|
...configs,
|
|
3072
|
+
config$8,
|
|
2996
3073
|
config$7,
|
|
2997
|
-
config$
|
|
2998
|
-
config$3,
|
|
3074
|
+
config$4,
|
|
2999
3075
|
config,
|
|
3076
|
+
config$13,
|
|
3000
3077
|
config$12,
|
|
3001
3078
|
config$11,
|
|
3002
|
-
config$10
|
|
3003
|
-
config$9
|
|
3079
|
+
config$10
|
|
3004
3080
|
];
|
|
3005
3081
|
/**
|
|
3006
3082
|
* Typed program names. Values come from each config's `id`, so there's
|
|
@@ -3008,21 +3084,22 @@ const PROGRAM_REGISTRY = [
|
|
|
3008
3084
|
* just exposing that config's `id` under a friendly name for call sites.
|
|
3009
3085
|
*/
|
|
3010
3086
|
const Program = {
|
|
3011
|
-
PostHogIntegration: config$
|
|
3012
|
-
RevenueAnalyticsSetup: config$
|
|
3013
|
-
WarehouseSource: config$
|
|
3014
|
-
ErrorTrackingUploadSourceMaps: config$
|
|
3015
|
-
ErrorTracking: config$
|
|
3016
|
-
|
|
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,
|
|
3017
3094
|
Audit: audit.id,
|
|
3018
3095
|
EventsAudit: eventsAudit.id,
|
|
3019
|
-
WebAnalyticsDoctor: config$
|
|
3020
|
-
SelfDriving: config$
|
|
3096
|
+
WebAnalyticsDoctor: config$8.id,
|
|
3097
|
+
SelfDriving: config$4.id,
|
|
3021
3098
|
AgentSkill: config.id,
|
|
3022
|
-
McpAnalytics: config$
|
|
3023
|
-
ReplayVision: config$
|
|
3024
|
-
AiObservability: config$
|
|
3025
|
-
Metrics: config$
|
|
3099
|
+
McpAnalytics: config$13.id,
|
|
3100
|
+
ReplayVision: config$12.id,
|
|
3101
|
+
AiObservability: config$11.id,
|
|
3102
|
+
Metrics: config$10.id
|
|
3026
3103
|
};
|
|
3027
3104
|
/**
|
|
3028
3105
|
* Look up a program config by its id. Callers pass ids from `Program` or
|
|
@@ -4108,6 +4185,7 @@ async function invokeProgram(programId, callerInput, options) {
|
|
|
4108
4185
|
wizardFlagPayloads: { ...flags.payloads },
|
|
4109
4186
|
allowedTools: planned.config.allowedTools,
|
|
4110
4187
|
disallowedTools: planned.config.disallowedTools,
|
|
4188
|
+
handoffNotebook: agentRun.handoffNotebook ?? planned.config.handoffNotebook,
|
|
4111
4189
|
agentFlow: planned.config.agentFlow,
|
|
4112
4190
|
excludedTaskTypes: planned.config.excludedTaskTypes,
|
|
4113
4191
|
seedTasks: planned.config.seedTasks ? () => planned.config.seedTasks(session()) : void 0,
|
|
@@ -4874,7 +4952,7 @@ var WizardRunSync = class {
|
|
|
4874
4952
|
type: "local_folder",
|
|
4875
4953
|
project_name: projectName
|
|
4876
4954
|
},
|
|
4877
|
-
...valid("2.
|
|
4955
|
+
...valid("2.83.0") ? { wizard_version: VERSION } : {},
|
|
4878
4956
|
idempotency_key: randomUUID()
|
|
4879
4957
|
});
|
|
4880
4958
|
const result = await this.request("POST", "", body, this.tasksAbort.signal);
|
|
@@ -4928,15 +5006,17 @@ var WizardRunSync = class {
|
|
|
4928
5006
|
};
|
|
4929
5007
|
}, signal, 5e3);
|
|
4930
5008
|
if (method === "POST" && [200, 201].includes(res.status) || method === "PUT" && res.status === 204 || method === "PATCH" && res.status === 200) return data ?? true;
|
|
4931
|
-
|
|
5009
|
+
let recovery;
|
|
5010
|
+
if (res.status === 401 && !refreshed && method !== "POST") {
|
|
4932
5011
|
refreshed = true;
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
5012
|
+
recovery = await this.bounded(() => rotateAfterUnauthorized(current, { requireRefreshToken: true }), signal, 5e3);
|
|
5013
|
+
}
|
|
5014
|
+
if (recovery?.kind === "unchanged") {
|
|
5015
|
+
this.authDisabled = true;
|
|
5016
|
+
this.report("OAuth refresh could not recover the grant; authorize again");
|
|
5017
|
+
return;
|
|
4939
5018
|
}
|
|
5019
|
+
if (recovery?.kind === "rotated") continue;
|
|
4940
5020
|
if (res.status === 401 || res.status === 403) this.authDisabled = true;
|
|
4941
5021
|
if (res.status === 429 && !rateLimited) {
|
|
4942
5022
|
rateLimited = true;
|
|
@@ -5397,6 +5477,6 @@ function apiKeyCredentials(apiKey, options = {}) {
|
|
|
5397
5477
|
}) };
|
|
5398
5478
|
}
|
|
5399
5479
|
//#endregion
|
|
5400
|
-
export { config$
|
|
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 };
|
|
5401
5481
|
|
|
5402
|
-
//# sourceMappingURL=programs-
|
|
5482
|
+
//# sourceMappingURL=programs-eTv2T2rs.js.map
|