@posthog/wizard 2.16.0 → 2.17.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/README.md +0 -4
- package/dist/{TextBlock-DJVhBkr3.js → TextBlock-D0Ep3zC9.js} +2 -2
- package/dist/{TextBlock-DJVhBkr3.js.map → TextBlock-D0Ep3zC9.js.map} +1 -1
- package/dist/{add-mcp-server-to-clients-9jQjc-CO.js → add-mcp-server-to-clients-D4PK6ulR.js} +39 -6
- package/dist/add-mcp-server-to-clients-D4PK6ulR.js.map +1 -0
- package/dist/{agent-interface-pBnqJL8P.js → agent-interface-7t5DBo2A.js} +34 -8
- package/dist/agent-interface-7t5DBo2A.js.map +1 -0
- package/dist/{agent-runner-H1FP6XTc.js → agent-runner-CTkKLVhp.js} +17 -21
- package/dist/{agent-runner-H1FP6XTc.js.map → agent-runner-CTkKLVhp.js.map} +1 -1
- package/dist/{analytics-DZaUgJte.js → analytics-DN_Gy87F.js} +3 -3
- package/dist/{analytics-DZaUgJte.js.map → analytics-DN_Gy87F.js.map} +1 -1
- package/dist/api-serd0SMY.js +148 -0
- package/dist/api-serd0SMY.js.map +1 -0
- package/dist/bin.js +764 -497
- package/dist/bin.js.map +1 -1
- package/dist/ci-install-BbJ7c3WK.js +73 -0
- package/dist/ci-install-BbJ7c3WK.js.map +1 -0
- package/dist/{debug-B6rX6xye.js → debug-BI-Js0PB.js} +1 -1
- package/dist/{debug-C4jRuzny.js → debug-Bx7nvCWW.js} +12 -6
- package/dist/debug-Bx7nvCWW.js.map +1 -0
- package/dist/{defaults-GbLPuHxj.js → defaults-CPH6eWhN.js} +1 -1
- package/dist/{defaults-GbLPuHxj.js.map → defaults-CPH6eWhN.js.map} +1 -1
- package/dist/{env-api-key-DU8uIEvo.js → env-api-key-B3gE9Un0.js} +4 -2
- package/dist/{env-api-key-DU8uIEvo.js.map → env-api-key-B3gE9Un0.js.map} +1 -1
- package/dist/environment-CiZVSSYt.js +22 -0
- package/dist/environment-CiZVSSYt.js.map +1 -0
- package/dist/{file-utils-DnTSiTJw.js → file-utils-Dy9JncCo.js} +1 -1
- package/dist/{file-utils-DnTSiTJw.js.map → file-utils-Dy9JncCo.js.map} +1 -1
- package/dist/interactive-BwIzklw0.js +11 -0
- package/dist/interactive-BwIzklw0.js.map +1 -0
- package/dist/{mcp-prompt-streaming-DKiaymMt.js → mcp-prompt-streaming-8U9Qs9EV.js} +62 -12
- package/dist/mcp-prompt-streaming-8U9Qs9EV.js.map +1 -0
- package/dist/non-interactive-DTaZnVq_.js +12 -0
- package/dist/non-interactive-DTaZnVq_.js.map +1 -0
- package/dist/{package-json-v_g2YlN1.js → package-json-DCuoye-H.js} +8 -2
- package/dist/{package-json-v_g2YlN1.js.map → package-json-DCuoye-H.js.map} +1 -1
- package/dist/{package-manager-DLt75bit.js → package-manager-CKQLR20D.js} +2 -2
- package/dist/{package-manager-DLt75bit.js.map → package-manager-CKQLR20D.js.map} +1 -1
- package/dist/{start-playground-B40O4tye.js → playground-CR81Mwe3.js} +31 -14
- package/dist/playground-CR81Mwe3.js.map +1 -0
- package/dist/{posthog-7B92c2Ed.js → posthog-BrLFkaji.js} +1 -1
- package/dist/{posthog-7B92c2Ed.js.map → posthog-BrLFkaji.js.map} +1 -1
- package/dist/{posthog-integration-CukaeYil.js → posthog-integration-Bv7987YJ.js} +230 -21
- package/dist/posthog-integration-Bv7987YJ.js.map +1 -0
- package/dist/{provisioning-C_ETLiZE.js → provisioning-C96Kw-9D.js} +9 -4
- package/dist/{provisioning-C_ETLiZE.js.map → provisioning-C96Kw-9D.js.map} +1 -1
- package/dist/{registry-DqbwO5EL.js → registry-B9k73FKR.js} +5 -5
- package/dist/{registry-DqbwO5EL.js.map → registry-B9k73FKR.js.map} +1 -1
- package/dist/{setup-utils-DdAdxUTV.js → setup-utils-Bpfsap9L.js} +80 -175
- package/dist/setup-utils-Bpfsap9L.js.map +1 -0
- package/dist/skill-CPqcV8zp.js +29 -0
- package/dist/skill-CPqcV8zp.js.map +1 -0
- package/dist/{slides-Dpj4j0w_.js → slides-DRbBgsdd.js} +1733 -384
- package/dist/slides-DRbBgsdd.js.map +1 -0
- package/dist/{start-tui-CH_ZzQXx.js → start-tui-BZ7rEf3e.js} +432 -31
- package/dist/start-tui-BZ7rEf3e.js.map +1 -0
- package/dist/{steps-0d9XqvI6.js → steps-DDx35170.js} +6 -6
- package/dist/{steps-0d9XqvI6.js.map → steps-DDx35170.js.map} +1 -1
- package/dist/{task-stream-CoEsidgG.js → task-stream-BI8rJg9H.js} +3 -3
- package/dist/{task-stream-CoEsidgG.js.map → task-stream-BI8rJg9H.js.map} +1 -1
- package/dist/{telemetry-jn2Daxl2.js → telemetry-ByYtIfW0.js} +2 -2
- package/dist/{telemetry-jn2Daxl2.js.map → telemetry-ByYtIfW0.js.map} +1 -1
- package/dist/urls-CTCJIxbR.js +35 -0
- package/dist/urls-CTCJIxbR.js.map +1 -0
- package/dist/{wizard-abort-BjLIgu2s.js → wizard-abort-CY0ibdq1.js} +3 -3
- package/dist/{wizard-abort-BjLIgu2s.js.map → wizard-abort-CY0ibdq1.js.map} +1 -1
- package/dist/{wizard-abort-BlYGA1Jk.js → wizard-abort-QdRxGQp_.js} +1 -1
- package/dist/{wizard-session-Bi95IYca.js → wizard-session-d27JGRGi.js} +2 -3
- package/dist/wizard-session-d27JGRGi.js.map +1 -0
- package/dist/{wizard-session-DPGTaJ4W.js → wizard-session-y304gEEI.js} +1 -1
- package/dist/wizard-ui-YdGFRyu_.js.map +1 -1
- package/package.json +1 -1
- package/dist/add-mcp-server-to-clients-9jQjc-CO.js.map +0 -1
- package/dist/agent-interface-pBnqJL8P.js.map +0 -1
- package/dist/analytics-DqeW7XYt.js +0 -2
- package/dist/debug-C4jRuzny.js.map +0 -1
- package/dist/detection-4eukp9HD.js +0 -206
- package/dist/detection-4eukp9HD.js.map +0 -1
- package/dist/mcp-prompt-streaming-DKiaymMt.js.map +0 -1
- package/dist/package-json-Cttzi3C8.js +0 -2
- package/dist/posthog-integration-CukaeYil.js.map +0 -1
- package/dist/provisioning-Ch6i8dRV.js +0 -2
- package/dist/setup-utils-C5uZ9g60.js +0 -2
- package/dist/setup-utils-DdAdxUTV.js.map +0 -1
- package/dist/slides-Dpj4j0w_.js.map +0 -1
- package/dist/start-playground-B40O4tye.js.map +0 -1
- package/dist/start-tui-CH_ZzQXx.js.map +0 -1
- package/dist/wizard-session-Bi95IYca.js.map +0 -1
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { M as POSTHOG_DOCS_URL, O as Integration, R as REMOTE_SKILLS_BASE_URL, U as WIZARD_TOOLS_MENU_FLAG_KEY, _ as SIGNUP_WIZARD_READINESS_CONFIG, d as relativeToInstallDir, k as OAUTH_PORTS, l as WIZARD_LOG_FILE, m as setUI, q as getSkillsBaseUrl, s as logToFile, y as getBlockingServiceKeys } from "./debug-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { a as
|
|
12
|
-
import { C as
|
|
1
|
+
import { M as POSTHOG_DOCS_URL, O as Integration, R as REMOTE_SKILLS_BASE_URL, U as WIZARD_TOOLS_MENU_FLAG_KEY, _ as SIGNUP_WIZARD_READINESS_CONFIG, d as relativeToInstallDir, k as OAUTH_PORTS, l as WIZARD_LOG_FILE, m as setUI, q as getSkillsBaseUrl, s as logToFile, y as getBlockingServiceKeys } from "./debug-Bx7nvCWW.js";
|
|
2
|
+
import { t as analytics } from "./analytics-DN_Gy87F.js";
|
|
3
|
+
import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-Bpfsap9L.js";
|
|
4
|
+
import { a as getUiHostFromHost } from "./urls-CTCJIxbR.js";
|
|
5
|
+
import { t as ApiError } from "./api-serd0SMY.js";
|
|
6
|
+
import { t as ADDITIONAL_FEATURE_LABELS } from "./wizard-session-d27JGRGi.js";
|
|
7
|
+
import { r as wizardAbort } from "./wizard-abort-CY0ibdq1.js";
|
|
8
|
+
import { b as getAuditChecks, f as downloadSkill, g as AUDIT_CHECKS_KEY, h as AUDIT_CHECKS_FILE, p as fetchSkillMenu, v as AUDIT_SEVERITY_STYLE, y as coerceAuditChecks } from "./agent-interface-7t5DBo2A.js";
|
|
9
|
+
import { t as EVENT_PLAN_FILE } from "./posthog-integration-Bv7987YJ.js";
|
|
10
|
+
import { o as Colors, s as Icons } from "./TextBlock-D0Ep3zC9.js";
|
|
11
|
+
import { a as getProgramConfig, f as getContentBlocks, i as Program, m as STRIPE_SDKS, o as DISPLAY_NAME, p as POSTHOG_SDKS, s as SOURCE_MAPS_CONTEXT_KEYS, u as fetchHealthIssues } from "./bin.js";
|
|
12
|
+
import { A as WizardStore, C as useStdoutDimensions, D as LoadingBox, E as ProgressList, O as SplitView, T as useKeyBindings, _ as ScreenContainer, a as McpSuggestedPromptsScreen, b as ModalOverlay, c as IssueTable, d as ServiceHealthList, f as TipsCard, g as TabContainer, h as HNViewer, i as AuditChecksViewer, l as SEVERITY_LABEL, n as AUDIT_AREA_SLIDES, p as LearnCard, r as VisualBox, s as McpScreen, t as AUDIT_3000_AREA_SLIDES, u as SEVERITY_ORDER, v as EventPlanViewer, w as PickerMenu, x as ConfirmationInput, y as LogViewer } from "./slides-DRbBgsdd.js";
|
|
13
|
+
import { t as ALL_FEATURE_VALUES } from "./defaults-CPH6eWhN.js";
|
|
14
|
+
import { a as getSupportedClients, c as removeMCPServer, i as getInstalledClients, o as getSupportedPluginClients, s as installPlugins, u as isPluginCapable } from "./add-mcp-server-to-clients-D4PK6ulR.js";
|
|
13
15
|
import { spawn, spawnSync } from "node:child_process";
|
|
14
16
|
import { join } from "node:path";
|
|
15
17
|
import * as fs$1 from "fs";
|
|
@@ -33,8 +35,7 @@ var InkUI = class {
|
|
|
33
35
|
}
|
|
34
36
|
outro(message) {
|
|
35
37
|
this.store.pushStatus(stripAnsi(message));
|
|
36
|
-
|
|
37
|
-
this.store.setOutroData(existing ?? {
|
|
38
|
+
if (!this.store.session.outroData) this.store.setOutroData({
|
|
38
39
|
kind: "success",
|
|
39
40
|
message: stripAnsi(message)
|
|
40
41
|
});
|
|
@@ -152,6 +153,17 @@ var InkUI = class {
|
|
|
152
153
|
setDashboardUrl(url) {
|
|
153
154
|
this.store.setDashboardUrl(url);
|
|
154
155
|
}
|
|
156
|
+
setNotebookUrl(url) {
|
|
157
|
+
this.store.setNotebookUrl(url);
|
|
158
|
+
}
|
|
159
|
+
setOutroData(data) {
|
|
160
|
+
const live = this.store.session;
|
|
161
|
+
this.store.setOutroData({
|
|
162
|
+
...data,
|
|
163
|
+
dashboardUrl: live.dashboardUrl ?? data.dashboardUrl ?? void 0,
|
|
164
|
+
notebookUrl: live.notebookUrl ?? data.notebookUrl ?? void 0
|
|
165
|
+
});
|
|
166
|
+
}
|
|
155
167
|
setFrameworkContext(key, value) {
|
|
156
168
|
this.store.setFrameworkContext(key, value);
|
|
157
169
|
}
|
|
@@ -1031,7 +1043,7 @@ const FrameworkPicker = ({ store, onComplete }) => {
|
|
|
1031
1043
|
})),
|
|
1032
1044
|
onSelect: (value) => {
|
|
1033
1045
|
const integration = Array.isArray(value) ? value[0] : value;
|
|
1034
|
-
import("./registry-
|
|
1046
|
+
import("./registry-B9k73FKR.js").then((n) => n.n).then(({ FRAMEWORK_REGISTRY }) => {
|
|
1035
1047
|
const config = FRAMEWORK_REGISTRY[integration];
|
|
1036
1048
|
store.setFrameworkConfig(integration, config);
|
|
1037
1049
|
store.setDetectedFramework(config.metadata.name);
|
|
@@ -2241,18 +2253,28 @@ const openLink$1 = (url) => {
|
|
|
2241
2253
|
stdio: "ignore"
|
|
2242
2254
|
}).unref();
|
|
2243
2255
|
};
|
|
2244
|
-
const AuditAreaPane = ({ checks, reportPath }) => {
|
|
2256
|
+
const AuditAreaPane = ({ checks, reportPath, slides = AUDIT_AREA_SLIDES, dashboardUrl, notebookUrl }) => {
|
|
2245
2257
|
const activeArea = checks.filter((c) => c.status === "pending")[0]?.area;
|
|
2246
|
-
const slide = activeArea ?
|
|
2258
|
+
const slide = activeArea ? slides.find((s) => s.area === activeArea) ?? fallbackSlide$1(activeArea) : null;
|
|
2247
2259
|
useInput((input) => {
|
|
2248
2260
|
if (input.toLowerCase() === "o" && slide?.docsUrl) openLink$1(slide.docsUrl);
|
|
2249
2261
|
});
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2262
|
+
const urlsFooter = dashboardUrl || notebookUrl ? /* @__PURE__ */ jsx(UrlsFooter, {
|
|
2263
|
+
dashboardUrl,
|
|
2264
|
+
notebookUrl
|
|
2265
|
+
}) : null;
|
|
2266
|
+
if (slide) return /* @__PURE__ */ jsxs(Box, {
|
|
2267
|
+
flexDirection: "column",
|
|
2268
|
+
children: [/* @__PURE__ */ jsx(ActiveSlide$1, {
|
|
2269
|
+
slide,
|
|
2270
|
+
hasFindings: checks.some(isFinding$1)
|
|
2271
|
+
}), urlsFooter]
|
|
2253
2272
|
});
|
|
2254
2273
|
if (checks.length === 0) return null;
|
|
2255
|
-
return /* @__PURE__ */
|
|
2274
|
+
return /* @__PURE__ */ jsxs(Box, {
|
|
2275
|
+
flexDirection: "column",
|
|
2276
|
+
children: [/* @__PURE__ */ jsx(WritingReport$1, { reportPath }), urlsFooter]
|
|
2277
|
+
});
|
|
2256
2278
|
};
|
|
2257
2279
|
const ActiveSlide$1 = ({ slide, hasFindings }) => /* @__PURE__ */ jsxs(Box, {
|
|
2258
2280
|
flexDirection: "column",
|
|
@@ -2290,6 +2312,25 @@ const ActiveSlide$1 = ({ slide, hasFindings }) => /* @__PURE__ */ jsxs(Box, {
|
|
|
2290
2312
|
})
|
|
2291
2313
|
]
|
|
2292
2314
|
});
|
|
2315
|
+
const UrlsFooter = ({ dashboardUrl, notebookUrl }) => /* @__PURE__ */ jsxs(Box, {
|
|
2316
|
+
flexDirection: "column",
|
|
2317
|
+
paddingX: 1,
|
|
2318
|
+
marginTop: 1,
|
|
2319
|
+
children: [
|
|
2320
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2321
|
+
dimColor: true,
|
|
2322
|
+
children: "─".repeat(40)
|
|
2323
|
+
}),
|
|
2324
|
+
dashboardUrl && /* @__PURE__ */ jsxs(Text, { children: ["Dashboard: ", /* @__PURE__ */ jsx(Text, {
|
|
2325
|
+
color: "cyan",
|
|
2326
|
+
children: dashboardUrl
|
|
2327
|
+
})] }),
|
|
2328
|
+
notebookUrl && /* @__PURE__ */ jsxs(Text, { children: ["Notebook: ", /* @__PURE__ */ jsx(Text, {
|
|
2329
|
+
color: "cyan",
|
|
2330
|
+
children: notebookUrl
|
|
2331
|
+
})] })
|
|
2332
|
+
]
|
|
2333
|
+
});
|
|
2293
2334
|
const WritingReport$1 = ({ reportPath }) => /* @__PURE__ */ jsxs(Box, {
|
|
2294
2335
|
flexDirection: "column",
|
|
2295
2336
|
paddingX: 1,
|
|
@@ -2318,6 +2359,327 @@ const WritingReport$1 = ({ reportPath }) => /* @__PURE__ */ jsxs(Box, {
|
|
|
2318
2359
|
]
|
|
2319
2360
|
});
|
|
2320
2361
|
//#endregion
|
|
2362
|
+
//#region src/ui/tui/screens/audit/slides/events-audit/detectSdk.tsx
|
|
2363
|
+
const DetectVisual = () => /* @__PURE__ */ jsxs(VisualBox, { children: [
|
|
2364
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2365
|
+
dimColor: true,
|
|
2366
|
+
children: "package.json"
|
|
2367
|
+
}),
|
|
2368
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
2369
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2370
|
+
dimColor: true,
|
|
2371
|
+
children: " └─ "
|
|
2372
|
+
}),
|
|
2373
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2374
|
+
color: "green",
|
|
2375
|
+
children: "posthog-js"
|
|
2376
|
+
}),
|
|
2377
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2378
|
+
dimColor: true,
|
|
2379
|
+
children: " ^1.200.0"
|
|
2380
|
+
})
|
|
2381
|
+
] }),
|
|
2382
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2383
|
+
dimColor: true,
|
|
2384
|
+
children: "requirements.txt"
|
|
2385
|
+
}),
|
|
2386
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
2387
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2388
|
+
dimColor: true,
|
|
2389
|
+
children: " └─ "
|
|
2390
|
+
}),
|
|
2391
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2392
|
+
color: "green",
|
|
2393
|
+
children: "posthog"
|
|
2394
|
+
}),
|
|
2395
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2396
|
+
dimColor: true,
|
|
2397
|
+
children: " ==4.0.1"
|
|
2398
|
+
})
|
|
2399
|
+
] })
|
|
2400
|
+
] });
|
|
2401
|
+
const DetectSdkSlide = {
|
|
2402
|
+
area: "Detect SDK",
|
|
2403
|
+
intro: [
|
|
2404
|
+
"First we find which PostHog SDKs your project uses. The audit needs to know the right languages and frameworks before it looks at any code.",
|
|
2405
|
+
"Only dependency manifests get read here: package.json, requirements.txt, go.mod, and similar files. Source files come in a later step.",
|
|
2406
|
+
"If your project is a monorepo with more than one SDK, we handle each one."
|
|
2407
|
+
],
|
|
2408
|
+
visual: /* @__PURE__ */ jsx(DetectVisual, {}),
|
|
2409
|
+
docsUrl: "https://posthog.com/docs/libraries"
|
|
2410
|
+
};
|
|
2411
|
+
//#endregion
|
|
2412
|
+
//#region src/ui/tui/screens/audit/slides/events-audit/scanSites.tsx
|
|
2413
|
+
const ScanVisual = () => /* @__PURE__ */ jsxs(VisualBox, { children: [
|
|
2414
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2415
|
+
dimColor: true,
|
|
2416
|
+
children: "grep -rn 'posthog\\.(capture|identify|group)'"
|
|
2417
|
+
}),
|
|
2418
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2419
|
+
color: "cyan",
|
|
2420
|
+
children: "src/checkout/Checkout.tsx:88"
|
|
2421
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
2422
|
+
dimColor: true,
|
|
2423
|
+
children: " posthog.capture(...)"
|
|
2424
|
+
})] }),
|
|
2425
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2426
|
+
color: "cyan",
|
|
2427
|
+
children: "src/auth/login.ts:42"
|
|
2428
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
2429
|
+
dimColor: true,
|
|
2430
|
+
children: " posthog.identify(...)"
|
|
2431
|
+
})] }),
|
|
2432
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2433
|
+
color: "cyan",
|
|
2434
|
+
children: "src/onboarding/step.tsx:17"
|
|
2435
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
2436
|
+
dimColor: true,
|
|
2437
|
+
children: " posthog.capture(...)"
|
|
2438
|
+
})] })
|
|
2439
|
+
] });
|
|
2440
|
+
const ScanSitesSlide = {
|
|
2441
|
+
area: "Scan capture sites",
|
|
2442
|
+
intro: [
|
|
2443
|
+
"Next we map every place your code captures PostHog events. This is the inventory the rest of the audit builds on.",
|
|
2444
|
+
"We search your project for PostHog SDK calls: capture, identify, group, and more. No source files are opened yet, that comes in the next step.",
|
|
2445
|
+
"Test files are excluded so they don't pollute the inventory."
|
|
2446
|
+
],
|
|
2447
|
+
visual: /* @__PURE__ */ jsx(ScanVisual, {}),
|
|
2448
|
+
docsUrl: "https://posthog.com/docs/product-analytics/capture-events"
|
|
2449
|
+
};
|
|
2450
|
+
//#endregion
|
|
2451
|
+
//#region src/ui/tui/screens/audit/slides/events-audit/enrichSites.tsx
|
|
2452
|
+
const EnrichVisual = () => /* @__PURE__ */ jsxs(VisualBox, { children: [
|
|
2453
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2454
|
+
dimColor: true,
|
|
2455
|
+
children: "orchestrator"
|
|
2456
|
+
}),
|
|
2457
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2458
|
+
dimColor: true,
|
|
2459
|
+
children: " │"
|
|
2460
|
+
}),
|
|
2461
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
2462
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2463
|
+
dimColor: true,
|
|
2464
|
+
children: " ├─ "
|
|
2465
|
+
}),
|
|
2466
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2467
|
+
color: "cyan",
|
|
2468
|
+
children: "subagent 1"
|
|
2469
|
+
}),
|
|
2470
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2471
|
+
dimColor: true,
|
|
2472
|
+
children: " → part-1.json"
|
|
2473
|
+
})
|
|
2474
|
+
] }),
|
|
2475
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
2476
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2477
|
+
dimColor: true,
|
|
2478
|
+
children: " ├─ "
|
|
2479
|
+
}),
|
|
2480
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2481
|
+
color: "cyan",
|
|
2482
|
+
children: "subagent 2"
|
|
2483
|
+
}),
|
|
2484
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2485
|
+
dimColor: true,
|
|
2486
|
+
children: " → part-2.json"
|
|
2487
|
+
})
|
|
2488
|
+
] }),
|
|
2489
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
2490
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2491
|
+
dimColor: true,
|
|
2492
|
+
children: " └─ "
|
|
2493
|
+
}),
|
|
2494
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2495
|
+
color: "cyan",
|
|
2496
|
+
children: "subagent N"
|
|
2497
|
+
}),
|
|
2498
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2499
|
+
dimColor: true,
|
|
2500
|
+
children: " → part-N.json"
|
|
2501
|
+
})
|
|
2502
|
+
] })
|
|
2503
|
+
] });
|
|
2504
|
+
const EnrichSitesSlide = {
|
|
2505
|
+
area: "Enrich",
|
|
2506
|
+
intro: [
|
|
2507
|
+
"Now we look inside each file that captures events. The goal is to know not just that an event fires, but what it is, where it lives, and what data goes with it.",
|
|
2508
|
+
"For every capture site we pull out the event name, the properties, the area of your codebase it sits in, and the surrounding function or component.",
|
|
2509
|
+
"This is the only step that opens source files. Large codebases run in parallel so it finishes in one pass."
|
|
2510
|
+
],
|
|
2511
|
+
visual: /* @__PURE__ */ jsx(EnrichVisual, {}),
|
|
2512
|
+
docsUrl: "https://posthog.com/docs/product-analytics/best-practices"
|
|
2513
|
+
};
|
|
2514
|
+
//#endregion
|
|
2515
|
+
//#region src/ui/tui/screens/audit/slides/events-audit/queryVolume.tsx
|
|
2516
|
+
const QueryVisual = () => /* @__PURE__ */ jsxs(VisualBox, { children: [
|
|
2517
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2518
|
+
dimColor: true,
|
|
2519
|
+
children: "SELECT event, count() AS volume_30d"
|
|
2520
|
+
}),
|
|
2521
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2522
|
+
dimColor: true,
|
|
2523
|
+
children: "FROM events WHERE timestamp > now() - INTERVAL 30 DAY"
|
|
2524
|
+
}),
|
|
2525
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2526
|
+
dimColor: true,
|
|
2527
|
+
children: "GROUP BY event ORDER BY volume_30d DESC"
|
|
2528
|
+
}),
|
|
2529
|
+
/* @__PURE__ */ jsx(Text, { children: " " }),
|
|
2530
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2531
|
+
color: "cyan",
|
|
2532
|
+
children: "pageview "
|
|
2533
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
2534
|
+
color: "green",
|
|
2535
|
+
children: "12,430"
|
|
2536
|
+
})] }),
|
|
2537
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2538
|
+
color: "cyan",
|
|
2539
|
+
children: "signup_completed "
|
|
2540
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
2541
|
+
color: "green",
|
|
2542
|
+
children: " 840"
|
|
2543
|
+
})] })
|
|
2544
|
+
] });
|
|
2545
|
+
const QueryVolumeSlide = {
|
|
2546
|
+
area: "Query PostHog",
|
|
2547
|
+
intro: [
|
|
2548
|
+
"We ask PostHog how often each event in the inventory has fired in the last 30 days.",
|
|
2549
|
+
"Events your code captures but PostHog has never seen are flagged as phantoms. Phantoms usually mean a typo, a dead code path, or instrumentation that hasn't shipped yet. Worth cleaning up.",
|
|
2550
|
+
"If PostHog isn't reachable the audit still finishes. The report just notes where volume numbers would have gone."
|
|
2551
|
+
],
|
|
2552
|
+
visual: /* @__PURE__ */ jsx(QueryVisual, {}),
|
|
2553
|
+
docsUrl: "https://posthog.com/docs/product-analytics/sql"
|
|
2554
|
+
};
|
|
2555
|
+
//#endregion
|
|
2556
|
+
//#region src/ui/tui/screens/audit/slides/events-audit/writeReport.tsx
|
|
2557
|
+
const ReportVisual = () => /* @__PURE__ */ jsxs(VisualBox, { children: [
|
|
2558
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2559
|
+
dimColor: true,
|
|
2560
|
+
children: "posthog-events-audit-report.md"
|
|
2561
|
+
}),
|
|
2562
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2563
|
+
dimColor: true,
|
|
2564
|
+
children: " # "
|
|
2565
|
+
}), /* @__PURE__ */ jsx(Text, { children: "Identity & segmentation" })] }),
|
|
2566
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2567
|
+
dimColor: true,
|
|
2568
|
+
children: " # "
|
|
2569
|
+
}), /* @__PURE__ */ jsx(Text, { children: "Coverage map" })] }),
|
|
2570
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2571
|
+
dimColor: true,
|
|
2572
|
+
children: " # "
|
|
2573
|
+
}), /* @__PURE__ */ jsx(Text, { children: "Data quality" })] }),
|
|
2574
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2575
|
+
dimColor: true,
|
|
2576
|
+
children: " # "
|
|
2577
|
+
}), /* @__PURE__ */ jsx(Text, { children: "Events by file & area" })] })
|
|
2578
|
+
] });
|
|
2579
|
+
const WriteReportSlide = {
|
|
2580
|
+
area: "Write report",
|
|
2581
|
+
intro: [
|
|
2582
|
+
"We package everything we found into one report at ./posthog-events-audit-report.md. This is what you hand to the team.",
|
|
2583
|
+
"The report covers how users get identified, which parts of your codebase capture which events, data quality issues like duplicates and phantoms, and a volume map of every event your code captures.",
|
|
2584
|
+
"Nothing in your project is modified. The report is the only file you keep."
|
|
2585
|
+
],
|
|
2586
|
+
visual: /* @__PURE__ */ jsx(ReportVisual, {}),
|
|
2587
|
+
docsUrl: "https://posthog.com/docs/product-analytics/best-practices"
|
|
2588
|
+
};
|
|
2589
|
+
//#endregion
|
|
2590
|
+
//#region src/ui/tui/screens/audit/slides/events-audit/createDashboard.tsx
|
|
2591
|
+
const DashboardVisual = () => /* @__PURE__ */ jsxs(VisualBox, { children: [
|
|
2592
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2593
|
+
dimColor: true,
|
|
2594
|
+
children: "events audit dashboard"
|
|
2595
|
+
}),
|
|
2596
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2597
|
+
color: "cyan",
|
|
2598
|
+
children: "pageview "
|
|
2599
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
2600
|
+
color: "green",
|
|
2601
|
+
children: "████████████"
|
|
2602
|
+
})] }),
|
|
2603
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2604
|
+
color: "cyan",
|
|
2605
|
+
children: "signup "
|
|
2606
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
2607
|
+
color: "green",
|
|
2608
|
+
children: "████████"
|
|
2609
|
+
})] }),
|
|
2610
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2611
|
+
color: "cyan",
|
|
2612
|
+
children: "activated "
|
|
2613
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
2614
|
+
color: "green",
|
|
2615
|
+
children: "█████"
|
|
2616
|
+
})] }),
|
|
2617
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2618
|
+
color: "cyan",
|
|
2619
|
+
children: "purchased "
|
|
2620
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
2621
|
+
color: "green",
|
|
2622
|
+
children: "██"
|
|
2623
|
+
})] })
|
|
2624
|
+
] });
|
|
2625
|
+
const CreateDashboardSlide = {
|
|
2626
|
+
area: "Create dashboard",
|
|
2627
|
+
intro: ["Finally we build a live PostHog dashboard for the events your code captures. Use it to watch volume over time, spot new phantoms, and see how traffic shifts as you ship changes.", "Open the dashboard from the wrap-up screen when the audit completes."],
|
|
2628
|
+
visual: /* @__PURE__ */ jsx(DashboardVisual, {}),
|
|
2629
|
+
docsUrl: "https://posthog.com/docs/product-analytics/dashboards"
|
|
2630
|
+
};
|
|
2631
|
+
//#endregion
|
|
2632
|
+
//#region src/ui/tui/screens/audit/slides/events-audit/uploadNotebook.tsx
|
|
2633
|
+
const NotebookVisual = () => /* @__PURE__ */ jsxs(VisualBox, { children: [
|
|
2634
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2635
|
+
dimColor: true,
|
|
2636
|
+
children: "posthog-events-audit-report.md"
|
|
2637
|
+
}),
|
|
2638
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2639
|
+
dimColor: true,
|
|
2640
|
+
children: " │"
|
|
2641
|
+
}),
|
|
2642
|
+
/* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
2643
|
+
dimColor: true,
|
|
2644
|
+
children: " ▼ "
|
|
2645
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
2646
|
+
color: "cyan",
|
|
2647
|
+
children: "PostHog notebook"
|
|
2648
|
+
})] }),
|
|
2649
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2650
|
+
dimColor: true,
|
|
2651
|
+
children: " # Identity & segmentation"
|
|
2652
|
+
}),
|
|
2653
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2654
|
+
dimColor: true,
|
|
2655
|
+
children: " # Coverage map"
|
|
2656
|
+
}),
|
|
2657
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2658
|
+
dimColor: true,
|
|
2659
|
+
children: " # Events by file & area"
|
|
2660
|
+
})
|
|
2661
|
+
] });
|
|
2662
|
+
//#endregion
|
|
2663
|
+
//#region src/ui/tui/screens/audit/slides/events-audit/index.ts
|
|
2664
|
+
const EVENTS_AUDIT_AREA_SLIDES = [
|
|
2665
|
+
DetectSdkSlide,
|
|
2666
|
+
ScanSitesSlide,
|
|
2667
|
+
EnrichSitesSlide,
|
|
2668
|
+
QueryVolumeSlide,
|
|
2669
|
+
WriteReportSlide,
|
|
2670
|
+
CreateDashboardSlide,
|
|
2671
|
+
{
|
|
2672
|
+
area: "Upload notebook",
|
|
2673
|
+
intro: [
|
|
2674
|
+
"Next we upload the report into a PostHog notebook so you can share it with your team as a URL.",
|
|
2675
|
+
"Hang tight.",
|
|
2676
|
+
"The markdown file on disk is still there for you to read locally."
|
|
2677
|
+
],
|
|
2678
|
+
visual: /* @__PURE__ */ jsx(NotebookVisual, {}),
|
|
2679
|
+
docsUrl: "https://posthog.com/docs/notebooks"
|
|
2680
|
+
}
|
|
2681
|
+
];
|
|
2682
|
+
//#endregion
|
|
2321
2683
|
//#region src/ui/tui/screens/audit/PendingChecksList.tsx
|
|
2322
2684
|
function groupByArea$1(checks) {
|
|
2323
2685
|
const order = [];
|
|
@@ -2438,6 +2800,13 @@ const AuditRunScreen = ({ store }) => {
|
|
|
2438
2800
|
const checks = getAuditChecks(store.session);
|
|
2439
2801
|
const reportPath = `./${getProgramConfig(store.router.activeProgram).reportFile ?? "posthog-audit-report.md"}`;
|
|
2440
2802
|
const pendingChecksList = /* @__PURE__ */ jsx(PendingChecksList, { checks });
|
|
2803
|
+
const areaPane = /* @__PURE__ */ jsx(AuditAreaPane, {
|
|
2804
|
+
checks,
|
|
2805
|
+
reportPath,
|
|
2806
|
+
slides: store.session.skillId === "events-audit" ? EVENTS_AUDIT_AREA_SLIDES : AUDIT_AREA_SLIDES,
|
|
2807
|
+
dashboardUrl: store.session.dashboardUrl,
|
|
2808
|
+
notebookUrl: store.session.notebookUrl
|
|
2809
|
+
});
|
|
2441
2810
|
return /* @__PURE__ */ jsx(TabContainer, {
|
|
2442
2811
|
tabs: [
|
|
2443
2812
|
{
|
|
@@ -2448,10 +2817,7 @@ const AuditRunScreen = ({ store }) => {
|
|
|
2448
2817
|
flexGrow: 1,
|
|
2449
2818
|
children: pendingChecksList
|
|
2450
2819
|
}) : /* @__PURE__ */ jsx(SplitView, {
|
|
2451
|
-
left:
|
|
2452
|
-
checks,
|
|
2453
|
-
reportPath
|
|
2454
|
-
}),
|
|
2820
|
+
left: areaPane,
|
|
2455
2821
|
right: pendingChecksList
|
|
2456
2822
|
})
|
|
2457
2823
|
},
|
|
@@ -2551,7 +2917,7 @@ const AuditChecksOutroSection = ({ checks, installDir }) => {
|
|
|
2551
2917
|
children: [
|
|
2552
2918
|
"… and ",
|
|
2553
2919
|
hidden,
|
|
2554
|
-
" more
|
|
2920
|
+
" more. See the report for details."
|
|
2555
2921
|
]
|
|
2556
2922
|
})] })
|
|
2557
2923
|
]
|
|
@@ -2591,6 +2957,20 @@ const AuditOutroScreen = ({ store }) => {
|
|
|
2591
2957
|
bold: true,
|
|
2592
2958
|
children: ["✔ ", outroData.message || "Audit complete!"]
|
|
2593
2959
|
}),
|
|
2960
|
+
outroData.dashboardUrl && /* @__PURE__ */ jsx(Box, {
|
|
2961
|
+
marginTop: 1,
|
|
2962
|
+
children: /* @__PURE__ */ jsxs(Text, { children: ["Dashboard: ", /* @__PURE__ */ jsx(Text, {
|
|
2963
|
+
color: "cyan",
|
|
2964
|
+
children: outroData.dashboardUrl
|
|
2965
|
+
})] })
|
|
2966
|
+
}),
|
|
2967
|
+
outroData.notebookUrl && /* @__PURE__ */ jsx(Box, {
|
|
2968
|
+
marginTop: 1,
|
|
2969
|
+
children: /* @__PURE__ */ jsxs(Text, { children: ["Notebook: ", /* @__PURE__ */ jsx(Text, {
|
|
2970
|
+
color: "cyan",
|
|
2971
|
+
children: outroData.notebookUrl
|
|
2972
|
+
})] })
|
|
2973
|
+
}),
|
|
2594
2974
|
outroData.reportFile && /* @__PURE__ */ jsxs(Box, {
|
|
2595
2975
|
flexDirection: "column",
|
|
2596
2976
|
marginTop: 1,
|
|
@@ -2603,7 +2983,7 @@ const AuditOutroScreen = ({ store }) => {
|
|
|
2603
2983
|
/* @__PURE__ */ jsx(Text, { children: join(store.session.installDir, outroData.reportFile) }),
|
|
2604
2984
|
/* @__PURE__ */ jsx(Text, {
|
|
2605
2985
|
dimColor: true,
|
|
2606
|
-
children: "A markdown file in your project folder
|
|
2986
|
+
children: "A markdown file in your project folder. Open it in any editor to read the full audit."
|
|
2607
2987
|
})
|
|
2608
2988
|
]
|
|
2609
2989
|
}),
|
|
@@ -4122,6 +4502,17 @@ const OutroScreen = ({ store }) => {
|
|
|
4122
4502
|
})
|
|
4123
4503
|
] })
|
|
4124
4504
|
}),
|
|
4505
|
+
outroData.notebookUrl && /* @__PURE__ */ jsx(Box, {
|
|
4506
|
+
marginTop: 1,
|
|
4507
|
+
children: /* @__PURE__ */ jsxs(Text, { children: [
|
|
4508
|
+
"And uploaded the report to a PostHog notebook:",
|
|
4509
|
+
" ",
|
|
4510
|
+
/* @__PURE__ */ jsx(Text, {
|
|
4511
|
+
color: "cyan",
|
|
4512
|
+
children: outroData.notebookUrl
|
|
4513
|
+
})
|
|
4514
|
+
] })
|
|
4515
|
+
}),
|
|
4125
4516
|
outroData.docsUrl && /* @__PURE__ */ jsx(Box, {
|
|
4126
4517
|
marginTop: 1,
|
|
4127
4518
|
children: /* @__PURE__ */ jsxs(Text, { children: ["Learn more: ", /* @__PURE__ */ jsx(Text, {
|
|
@@ -4424,6 +4815,11 @@ const QuestionInput = ({ question, onSubmit }) => {
|
|
|
4424
4815
|
}
|
|
4425
4816
|
};
|
|
4426
4817
|
//#endregion
|
|
4818
|
+
//#region src/steps/add-mcp-server-to-clients/browser-client.ts
|
|
4819
|
+
function isBrowserFinishable(c) {
|
|
4820
|
+
return typeof c === "object" && c !== null && "connectorUrl" in c && "finishInstruction" in c;
|
|
4821
|
+
}
|
|
4822
|
+
//#endregion
|
|
4427
4823
|
//#region src/ui/tui/services/mcp-installer.ts
|
|
4428
4824
|
/**
|
|
4429
4825
|
* McpInstaller — service layer between McpScreen and MCP business logic.
|
|
@@ -4445,7 +4841,11 @@ function createMcpInstaller() {
|
|
|
4445
4841
|
}));
|
|
4446
4842
|
return supported.map((c) => ({
|
|
4447
4843
|
name: c.name,
|
|
4448
|
-
supportsPlugin: isPluginCapable(c) && c.supportsPlugin()
|
|
4844
|
+
supportsPlugin: isPluginCapable(c) && c.supportsPlugin(),
|
|
4845
|
+
finish: isBrowserFinishable(c) ? {
|
|
4846
|
+
url: c.connectorUrl,
|
|
4847
|
+
instruction: c.finishInstruction
|
|
4848
|
+
} : void 0
|
|
4449
4849
|
}));
|
|
4450
4850
|
},
|
|
4451
4851
|
async install(clientNames, features, apiKey) {
|
|
@@ -4497,7 +4897,8 @@ function createMcpSuggestedPromptsServices(_store) {
|
|
|
4497
4897
|
apiKey: void 0,
|
|
4498
4898
|
projectId: void 0,
|
|
4499
4899
|
email: void 0,
|
|
4500
|
-
region: void 0
|
|
4900
|
+
region: void 0,
|
|
4901
|
+
programId: Program.McpTutorial
|
|
4501
4902
|
});
|
|
4502
4903
|
return {
|
|
4503
4904
|
credentials: {
|
|
@@ -4514,7 +4915,7 @@ function createMcpSuggestedPromptsServices(_store) {
|
|
|
4514
4915
|
};
|
|
4515
4916
|
}
|
|
4516
4917
|
async function* runProductionPromptStreaming(args) {
|
|
4517
|
-
const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-
|
|
4918
|
+
const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-8U9Qs9EV.js");
|
|
4518
4919
|
yield* runMcpPromptViaSdk(args);
|
|
4519
4920
|
}
|
|
4520
4921
|
//#endregion
|
|
@@ -4636,4 +5037,4 @@ function startTUI(version, program = Program.PostHogIntegration) {
|
|
|
4636
5037
|
//#endregion
|
|
4637
5038
|
export { startTUI };
|
|
4638
5039
|
|
|
4639
|
-
//# sourceMappingURL=start-tui-
|
|
5040
|
+
//# sourceMappingURL=start-tui-BZ7rEf3e.js.map
|