@posthog/wizard 2.64.1 → 2.66.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 +7 -2
- package/dist/{add-mcp-server-to-clients-BUqb93_I.js → add-mcp-server-to-clients-DWDEuDUR.js} +210 -46
- package/dist/add-mcp-server-to-clients-DWDEuDUR.js.map +1 -0
- package/dist/{agent-interface-NurnwA01.js → agent-interface-D3MNaDp3.js} +405 -47
- package/dist/agent-interface-D3MNaDp3.js.map +1 -0
- package/dist/{agent-prompt-loader-CbowPuWI.js → agent-prompt-loader-D8Bajo-L.js} +10 -5
- package/dist/agent-prompt-loader-D8Bajo-L.js.map +1 -0
- package/dist/{agent-runner-DisJWxJa.js → agent-runner-DEeMqJxy.js} +111 -53
- package/dist/agent-runner-DEeMqJxy.js.map +1 -0
- package/dist/{analytics-D3vKvr3l.js → analytics-D8JNuPAT.js} +2 -2
- package/dist/{analytics-D3vKvr3l.js.map → analytics-D8JNuPAT.js.map} +1 -1
- package/dist/analytics-DN3Kzf7H.js +2 -0
- package/dist/{api-Bhe8jpUR.js → api-CemGgyBv.js} +3 -3
- package/dist/{api-Bhe8jpUR.js.map → api-CemGgyBv.js.map} +1 -1
- package/dist/bin.js +245 -93
- package/dist/bin.js.map +1 -1
- package/dist/{bounded-fs-BeWc675I.js → bounded-fs-C6OjqZst.js} +3 -3
- package/dist/{bounded-fs-BeWc675I.js.map → bounded-fs-C6OjqZst.js.map} +1 -1
- package/dist/{ci-install-BpNzfghY.js → ci-install-DIB2n4Ju.js} +4 -4
- package/dist/{ci-install-BpNzfghY.js.map → ci-install-DIB2n4Ju.js.map} +1 -1
- package/dist/{debug-hy6aWAyk.js → debug-BKqv-yfT.js} +14 -9
- package/dist/debug-BKqv-yfT.js.map +1 -0
- package/dist/{debug-DGfRPr2A.js → debug-H-GTKvvU.js} +1 -1
- package/dist/{defaults-mrAre0xM.js → defaults-BHhXrX9F.js} +1 -1
- package/dist/{defaults-mrAre0xM.js.map → defaults-BHhXrX9F.js.map} +1 -1
- package/dist/{env-api-key-CMPe-WJp.js → env-api-key-CzHDwfV2.js} +2 -2
- package/dist/{env-api-key-CMPe-WJp.js.map → env-api-key-CzHDwfV2.js.map} +1 -1
- package/dist/{environment-Ktu0Ktjl.js → environment-Cl-fIQku.js} +4 -4
- package/dist/{environment-Ktu0Ktjl.js.map → environment-Cl-fIQku.js.map} +1 -1
- package/dist/{file-watcher-CqJ1dgjq.js → file-watcher-Cr-4tA-e.js} +2 -2
- package/dist/{file-watcher-CqJ1dgjq.js.map → file-watcher-Cr-4tA-e.js.map} +1 -1
- package/dist/{headless-ui-zZLgs4QL.js → headless-ui-DT3Db1bk.js} +2 -2
- package/dist/{headless-ui-zZLgs4QL.js.map → headless-ui-DT3Db1bk.js.map} +1 -1
- package/dist/{interactive-BUw1SEOz.js → interactive-D3LdFxZG.js} +2 -2
- package/dist/{interactive-BUw1SEOz.js.map → interactive-D3LdFxZG.js.map} +1 -1
- package/dist/local-dev-BN6NKQ0B.js +135 -0
- package/dist/local-dev-BN6NKQ0B.js.map +1 -0
- package/dist/{mcp-C7NMhhWa.js → mcp-BjckYQmP.js} +2 -2
- package/dist/{mcp-C7NMhhWa.js.map → mcp-BjckYQmP.js.map} +1 -1
- package/dist/mcp-install-smoke-test.ts +477 -0
- package/dist/{mcp-prompt-streaming-CKyqqB10.js → mcp-prompt-streaming--sRErHKv.js} +20 -4
- package/dist/mcp-prompt-streaming--sRErHKv.js.map +1 -0
- package/dist/{non-interactive-73xGtug6.js → non-interactive-CNoYoEZp.js} +2 -2
- package/dist/{non-interactive-73xGtug6.js.map → non-interactive-CNoYoEZp.js.map} +1 -1
- package/dist/{orchestrator-tools-DcMJzfDH.js → orchestrator-tools-8bGyDDhn.js} +3 -3
- package/dist/{orchestrator-tools-DcMJzfDH.js.map → orchestrator-tools-8bGyDDhn.js.map} +1 -1
- package/dist/{package-json-CDs1ZVKu.js → package-json-D0DCWpe5.js} +1 -1
- package/dist/{package-json-CDs1ZVKu.js.map → package-json-D0DCWpe5.js.map} +1 -1
- package/dist/{package-manager-KweKX3u_.js → package-manager-BQDHm7ER.js} +58 -3
- package/dist/package-manager-BQDHm7ER.js.map +1 -0
- package/dist/{pi-B4p4gpr0.js → pi-W-4RUPFY.js} +11 -11
- package/dist/{pi-B4p4gpr0.js.map → pi-W-4RUPFY.js.map} +1 -1
- package/dist/{playground-AEkWcB1E.js → playground-uHHgZChe.js} +7 -7
- package/dist/{playground-AEkWcB1E.js.map → playground-uHHgZChe.js.map} +1 -1
- package/dist/{posthog-4PljLcIz.js → posthog-ChzdlmCs.js} +2 -2
- package/dist/{posthog-4PljLcIz.js.map → posthog-ChzdlmCs.js.map} +1 -1
- package/dist/{posthog-integration-DKlEg8-Q.js → posthog-integration-LxEBGkoe.js} +680 -49
- package/dist/posthog-integration-LxEBGkoe.js.map +1 -0
- package/dist/{provisioning-QsG7HDCm.js → provisioning-BHTl91OZ.js} +3 -3
- package/dist/{provisioning-QsG7HDCm.js.map → provisioning-BHTl91OZ.js.map} +1 -1
- package/dist/{queue-tools-Jlz9dV_B.js → queue-tools-DABh1Ssc.js} +33 -7
- package/dist/queue-tools-DABh1Ssc.js.map +1 -0
- package/dist/{registry-PG_nV5Bf.js → registry-CxNpCNAj.js} +309 -6
- package/dist/registry-CxNpCNAj.js.map +1 -0
- package/dist/{security-BKUJk-Gg.js → security-B4jU_-7q.js} +5 -5
- package/dist/{security-BKUJk-Gg.js.map → security-B4jU_-7q.js.map} +1 -1
- package/dist/{setup-utils-DNpldqge.js → setup-utils-aWZEdfwh.js} +18 -13
- package/dist/setup-utils-aWZEdfwh.js.map +1 -0
- package/dist/smoke-test-ci.sh +12 -1
- package/dist/{start-tui-D4B0-2nr.js → start-tui-BQH4mQIZ.js} +138 -27
- package/dist/start-tui-BQH4mQIZ.js.map +1 -0
- package/dist/{steps-Dy0AXdGo.js → steps-5HAqjUvn.js} +7 -7
- package/dist/{steps-Dy0AXdGo.js.map → steps-5HAqjUvn.js.map} +1 -1
- package/dist/{store-DouLLelV.js → store-P_7zUfbj.js} +22 -7
- package/dist/store-P_7zUfbj.js.map +1 -0
- package/dist/{subagent-B4yVs5A2.js → subagent-uGPDXPfS.js} +2 -2
- package/dist/{subagent-B4yVs5A2.js.map → subagent-uGPDXPfS.js.map} +1 -1
- package/dist/{task-DRKYEbKM.js → task-oh8OAnvR.js} +29 -18
- package/dist/task-oh8OAnvR.js.map +1 -0
- package/dist/{task-stream-BGUP7yA-.js → task-stream-jUARpyB5.js} +5 -5
- package/dist/{task-stream-BGUP7yA-.js.map → task-stream-jUARpyB5.js.map} +1 -1
- package/dist/{tasks-B2GzXsZ0.js → tasks-2mu3lAvm.js} +2 -2
- package/dist/{tasks-B2GzXsZ0.js.map → tasks-2mu3lAvm.js.map} +1 -1
- package/dist/{telemetry-6zaFfCcy.js → telemetry-BllPiBKw.js} +3 -3
- package/dist/{telemetry-6zaFfCcy.js.map → telemetry-BllPiBKw.js.map} +1 -1
- package/dist/{terminal-Bu3eHFn0.js → terminal-aWQrDy8s.js} +99 -98
- package/dist/terminal-aWQrDy8s.js.map +1 -0
- package/dist/{tools-DQO5tKJg.js → tools-u8TaJFqa.js} +54 -47
- package/dist/tools-u8TaJFqa.js.map +1 -0
- package/dist/{wizard-abort-D6jJh8u5.js → wizard-abort-D9jiMkZA.js} +4 -4
- package/dist/{wizard-abort-D6jJh8u5.js.map → wizard-abort-D9jiMkZA.js.map} +1 -1
- package/dist/{wizard-abort-PgTdRS1l.js → wizard-abort-pFFH7dcx.js} +1 -1
- package/dist/{wizard-session-DZUDtS5d.js → wizard-session-Cw7-_OcZ.js} +1 -1
- package/dist/{wizard-session-BUhlJ1b8.js → wizard-session-DTyLMPsX.js} +17 -3
- package/dist/wizard-session-DTyLMPsX.js.map +1 -0
- package/dist/{yara-hooks-DjReXmTQ.js → yara-hooks-BXDBIOBq.js} +4 -4
- package/dist/{yara-hooks-DjReXmTQ.js.map → yara-hooks-BXDBIOBq.js.map} +1 -1
- package/dist/yara-hooks-i2jOabhI.js +2 -0
- package/package.json +2 -1
- package/dist/add-mcp-server-to-clients-BUqb93_I.js.map +0 -1
- package/dist/agent-interface-NurnwA01.js.map +0 -1
- package/dist/agent-prompt-loader-CbowPuWI.js.map +0 -1
- package/dist/agent-runner-DisJWxJa.js.map +0 -1
- package/dist/analytics-hNca7GLq.js +0 -2
- package/dist/debug-hy6aWAyk.js.map +0 -1
- package/dist/mcp-prompt-streaming-CKyqqB10.js.map +0 -1
- package/dist/package-manager-KweKX3u_.js.map +0 -1
- package/dist/posthog-integration-DKlEg8-Q.js.map +0 -1
- package/dist/queue-tools-Jlz9dV_B.js.map +0 -1
- package/dist/registry-PG_nV5Bf.js.map +0 -1
- package/dist/setup-utils-DNpldqge.js.map +0 -1
- package/dist/start-tui-D4B0-2nr.js.map +0 -1
- package/dist/store-DouLLelV.js.map +0 -1
- package/dist/task-DRKYEbKM.js.map +0 -1
- package/dist/terminal-Bu3eHFn0.js.map +0 -1
- package/dist/tools-DQO5tKJg.js.map +0 -1
- package/dist/wizard-session-BUhlJ1b8.js.map +0 -1
- package/dist/yara-hooks-CN_uFGCu.js +0 -2
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { $ as REMOTE_SKILLS_BASE_URL, K as POSTHOG_ORG_AI_SETTINGS_URL, L as Integration, R as OAUTH_PORTS, U as POSTHOG_DOCS_URL, Z as POSTHOG_TERMS_URL, d as relativeToInstallDir, g as SIGNUP_WIZARD_READINESS_CONFIG, l as WIZARD_LOG_FILE, p as setUI, q as POSTHOG_PRIVACY_URL, s as logToFile, v as getBlockingServiceKeys, z as OAUTH_TIMEOUT_MS } from "./debug-
|
|
2
|
-
import { n as analytics } from "./analytics-
|
|
3
|
-
import { i as readProjectFile, t as IGNORED_DIRS } from "./bounded-fs-
|
|
4
|
-
import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-
|
|
5
|
-
import { t as ApiError } from "./api-
|
|
6
|
-
import { t as ADDITIONAL_FEATURE_LABELS } from "./wizard-session-
|
|
7
|
-
import { i as wizardAbort } from "./wizard-abort-
|
|
8
|
-
import { a as formatCostUsd, o as formatTokenCount } from "./agent-runner-
|
|
9
|
-
import {
|
|
10
|
-
import { _ as AUDIT_CHECKS_KEY, b as coerceAuditChecks, g as AUDIT_CHECKS_FILE, x as getAuditChecks, y as AUDIT_SEVERITY_STYLE } from "./yara-hooks-
|
|
11
|
-
import { t as FRAMEWORK_REGISTRY } from "./registry-
|
|
12
|
-
import { b as getDetectedWarehouseSources, h as Icons, m as Colors, t as SETUP_REPORT_FILE, w as detectProjectsWithAgent } from "./posthog-integration-
|
|
1
|
+
import { $ as REMOTE_SKILLS_BASE_URL, K as POSTHOG_ORG_AI_SETTINGS_URL, L as Integration, R as OAUTH_PORTS, U as POSTHOG_DOCS_URL, Z as POSTHOG_TERMS_URL, d as relativeToInstallDir, g as SIGNUP_WIZARD_READINESS_CONFIG, l as WIZARD_LOG_FILE, p as setUI, q as POSTHOG_PRIVACY_URL, s as logToFile, v as getBlockingServiceKeys, z as OAUTH_TIMEOUT_MS } from "./debug-BKqv-yfT.js";
|
|
2
|
+
import { n as analytics } from "./analytics-D8JNuPAT.js";
|
|
3
|
+
import { i as readProjectFile, t as IGNORED_DIRS } from "./bounded-fs-C6OjqZst.js";
|
|
4
|
+
import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-aWZEdfwh.js";
|
|
5
|
+
import { t as ApiError } from "./api-CemGgyBv.js";
|
|
6
|
+
import { t as ADDITIONAL_FEATURE_LABELS } from "./wizard-session-DTyLMPsX.js";
|
|
7
|
+
import { i as wizardAbort } from "./wizard-abort-D9jiMkZA.js";
|
|
8
|
+
import { a as formatCostUsd, o as formatTokenCount } from "./agent-runner-DEeMqJxy.js";
|
|
9
|
+
import { A as downloadSkill, j as fetchSkillMenu } from "./agent-interface-D3MNaDp3.js";
|
|
10
|
+
import { _ as AUDIT_CHECKS_KEY, b as coerceAuditChecks, g as AUDIT_CHECKS_FILE, x as getAuditChecks, y as AUDIT_SEVERITY_STYLE } from "./yara-hooks-BXDBIOBq.js";
|
|
11
|
+
import { t as FRAMEWORK_REGISTRY } from "./registry-CxNpCNAj.js";
|
|
12
|
+
import { b as getDetectedWarehouseSources, h as Icons, m as Colors, t as SETUP_REPORT_FILE, w as detectProjectsWithAgent } from "./posthog-integration-LxEBGkoe.js";
|
|
13
13
|
import { A as STRIPE_SDKS, C as MANUAL_SDK_VARIANTS, D as fetchHealthIssues, O as getContentBlocks, S as MANUAL_SDK_INSTALL, T as SOURCE_MAPS_CONTEXT_KEYS, _ as detectSelfDrivingIntegrationProjects, a as useStdoutDimensions, b as DISPLAY_NAME, f as Program, g as PRICING_SHORT, h as PRICING_LONG, k as POSTHOG_SDKS, m as NO_DEFAULT_LIMIT, n as useKeyBindings, p as getProgramConfig, t as PickerMenu, v as SELF_DRIVING_INTEGRATE_PATH_KEY, y as AUTOMATABLE_VARIANTS } from "./bin.js";
|
|
14
|
-
import { r as totalTokenCount, t as WizardStore } from "./store-
|
|
15
|
-
import { A as EventPlanViewer, C as VisualizerTab, D as HNViewer, F as ConfirmationInput, L as ProgressList, M as LinkText, N as extractUrls, O as TabContainer, P as ModalOverlay, R as LoadingBox, S as ServiceHealthList, T as LearnCard, a as useSkillEntry, b as SEVERITY_LABEL, c as SlackConnectScreen, d as AuditChecksViewer, f as seedDemoEvents, g as probeProjectData, i as SkillSourceInfo, j as LogViewer, k as ScreenContainer, l as AUDIT_AREA_SLIDES, m as McpSuggestedPromptsScreen, n as releaseTerminal, o as OutroScreen, r as AiOptInRequiredScreen, s as useDismissOnAnyKey, t as enterDarkTerminal, u as VisualBox, v as McpScreen, w as TipsCard, x as SEVERITY_ORDER, y as IssueTable, z as SplitView } from "./terminal-
|
|
16
|
-
import { c as namesWithStatus, d as toClientResult, l as redactSecrets, t as ALL_FEATURE_VALUES } from "./defaults-
|
|
17
|
-
import { t as startFileWatcher } from "./file-watcher-
|
|
18
|
-
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-
|
|
14
|
+
import { r as totalTokenCount, t as WizardStore } from "./store-P_7zUfbj.js";
|
|
15
|
+
import { A as EventPlanViewer, C as VisualizerTab, D as HNViewer, F as ConfirmationInput, L as ProgressList, M as LinkText, N as extractUrls, O as TabContainer, P as ModalOverlay, R as LoadingBox, S as ServiceHealthList, T as LearnCard, a as useSkillEntry, b as SEVERITY_LABEL, c as SlackConnectScreen, d as AuditChecksViewer, f as seedDemoEvents, g as probeProjectData, i as SkillSourceInfo, j as LogViewer, k as ScreenContainer, l as AUDIT_AREA_SLIDES, m as McpSuggestedPromptsScreen, n as releaseTerminal, o as OutroScreen, r as AiOptInRequiredScreen, s as useDismissOnAnyKey, t as enterDarkTerminal, u as VisualBox, v as McpScreen, w as TipsCard, x as SEVERITY_ORDER, y as IssueTable, z as SplitView } from "./terminal-aWQrDy8s.js";
|
|
16
|
+
import { c as namesWithStatus, d as toClientResult, l as redactSecrets, t as ALL_FEATURE_VALUES } from "./defaults-BHhXrX9F.js";
|
|
17
|
+
import { t as startFileWatcher } from "./file-watcher-Cr-4tA-e.js";
|
|
18
|
+
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-DWDEuDUR.js";
|
|
19
19
|
import { existsSync, readFileSync, readdirSync } from "fs";
|
|
20
20
|
import path, { join } from "path";
|
|
21
21
|
import { join as join$1 } from "node:path";
|
|
@@ -1134,7 +1134,7 @@ const FrameworkPicker = ({ store, onComplete }) => {
|
|
|
1134
1134
|
})),
|
|
1135
1135
|
onSelect: (value) => {
|
|
1136
1136
|
const integration = Array.isArray(value) ? value[0] : value;
|
|
1137
|
-
import("./registry-
|
|
1137
|
+
import("./registry-CxNpCNAj.js").then((n) => n.n).then(({ FRAMEWORK_REGISTRY }) => {
|
|
1138
1138
|
const config = FRAMEWORK_REGISTRY[integration];
|
|
1139
1139
|
store.setFrameworkConfig(integration, config);
|
|
1140
1140
|
store.setDetectedFramework(config.metadata.name);
|
|
@@ -1151,7 +1151,7 @@ const PostHogIntegrationIntroScreen = ({ store }) => {
|
|
|
1151
1151
|
const { session } = store;
|
|
1152
1152
|
const config = session.frameworkConfig;
|
|
1153
1153
|
const frameworkLabel = session.detectedFrameworkLabel ?? config?.metadata.name;
|
|
1154
|
-
const { skillEntry, fetchFailed } = useSkillEntry(session.skillId
|
|
1154
|
+
const { skillEntry, fetchFailed } = useSkillEntry(session.skillId);
|
|
1155
1155
|
const detecting = !session.detectionComplete;
|
|
1156
1156
|
const needsFrameworkPick = session.detectionComplete && !session.frameworkConfig;
|
|
1157
1157
|
const unsupported = session.unsupportedVersion;
|
|
@@ -2132,6 +2132,7 @@ function toSourceMapsReport(report, probes) {
|
|
|
2132
2132
|
async function detectSourceMapsProjects(session, onEvent) {
|
|
2133
2133
|
return toSourceMapsReport(await detectProjectsWithAgent(session, {
|
|
2134
2134
|
targets: SOURCE_MAPS_TARGETS,
|
|
2135
|
+
programId: "error-tracking-upload-source-maps",
|
|
2135
2136
|
purpose: "set up PostHog Error Tracking source-map upload",
|
|
2136
2137
|
rerankIds: JS_RERANK_VARIANTS,
|
|
2137
2138
|
onEvent
|
|
@@ -2537,7 +2538,7 @@ const AgentSkillIntroScreen = ({ store }) => {
|
|
|
2537
2538
|
const [showingMoreInfo, setShowingMoreInfo] = useState(false);
|
|
2538
2539
|
const { session } = store;
|
|
2539
2540
|
const skillId = session.skillId ?? "unknown";
|
|
2540
|
-
const { skillEntry, fetchFailed } = useSkillEntry(skillId
|
|
2541
|
+
const { skillEntry, fetchFailed } = useSkillEntry(skillId);
|
|
2541
2542
|
let body;
|
|
2542
2543
|
if (showingMoreInfo) body = /* @__PURE__ */ jsxs(Box, {
|
|
2543
2544
|
flexDirection: "column",
|
|
@@ -2618,7 +2619,7 @@ const AiObservabilityIntroScreen = ({ store }) => {
|
|
|
2618
2619
|
const [showingMoreInfo, setShowingMoreInfo] = useState(false);
|
|
2619
2620
|
const { session } = store;
|
|
2620
2621
|
const skillId = session.skillId ?? "ai-observability";
|
|
2621
|
-
const { skillEntry, fetchFailed } = useSkillEntry(skillId
|
|
2622
|
+
const { skillEntry, fetchFailed } = useSkillEntry(skillId);
|
|
2622
2623
|
const body = showingMoreInfo ? /* @__PURE__ */ jsxs(Box, {
|
|
2623
2624
|
flexDirection: "column",
|
|
2624
2625
|
width: 56,
|
|
@@ -2689,6 +2690,89 @@ const AiObservabilityIntroScreen = ({ store }) => {
|
|
|
2689
2690
|
});
|
|
2690
2691
|
};
|
|
2691
2692
|
//#endregion
|
|
2693
|
+
//#region src/ui/tui/screens/MetricsIntroScreen.tsx
|
|
2694
|
+
const MetricsIntroScreen = ({ store }) => {
|
|
2695
|
+
useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
|
|
2696
|
+
const [showingMoreInfo, setShowingMoreInfo] = useState(false);
|
|
2697
|
+
const { session } = store;
|
|
2698
|
+
const skillId = session.skillId ?? "metrics";
|
|
2699
|
+
const { skillEntry, fetchFailed } = useSkillEntry(skillId, session.localMcp);
|
|
2700
|
+
const body = showingMoreInfo ? /* @__PURE__ */ jsxs(Box, {
|
|
2701
|
+
flexDirection: "column",
|
|
2702
|
+
width: 56,
|
|
2703
|
+
children: [
|
|
2704
|
+
/* @__PURE__ */ jsx(Box, {
|
|
2705
|
+
marginBottom: 1,
|
|
2706
|
+
children: /* @__PURE__ */ jsxs(Text, { children: ["The wizard is an agent that executes PostHog tasks. Its code is open source: ", /* @__PURE__ */ jsx(Text, {
|
|
2707
|
+
color: "cyan",
|
|
2708
|
+
children: "https://github.com/PostHog/wizard"
|
|
2709
|
+
})] })
|
|
2710
|
+
}),
|
|
2711
|
+
/* @__PURE__ */ jsxs(Text, { children: [
|
|
2712
|
+
"The",
|
|
2713
|
+
" ",
|
|
2714
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2715
|
+
color: "cyan",
|
|
2716
|
+
italic: true,
|
|
2717
|
+
children: "metrics"
|
|
2718
|
+
}),
|
|
2719
|
+
" ",
|
|
2720
|
+
"program instruments your service with PostHog application metrics — counters, gauges, and histograms via",
|
|
2721
|
+
" ",
|
|
2722
|
+
/* @__PURE__ */ jsx(Text, {
|
|
2723
|
+
color: "cyan",
|
|
2724
|
+
children: "posthog.metrics"
|
|
2725
|
+
}),
|
|
2726
|
+
" — at operational choke points: request middleware, background jobs, external calls, and business commit sites. Supports Python, Node.js, web JavaScript, Kubernetes, and any other language via OTLP."
|
|
2727
|
+
] }),
|
|
2728
|
+
/* @__PURE__ */ jsx(Box, {
|
|
2729
|
+
marginTop: 1,
|
|
2730
|
+
children: /* @__PURE__ */ jsx(SkillSourceInfo, {
|
|
2731
|
+
skillId,
|
|
2732
|
+
skillEntry,
|
|
2733
|
+
fetchFailed
|
|
2734
|
+
})
|
|
2735
|
+
})
|
|
2736
|
+
]
|
|
2737
|
+
}) : /* @__PURE__ */ jsx(Box, {
|
|
2738
|
+
flexDirection: "column",
|
|
2739
|
+
alignItems: "center",
|
|
2740
|
+
children: /* @__PURE__ */ jsx(Text, { children: "Let's instrument your service with PostHog application metrics." })
|
|
2741
|
+
});
|
|
2742
|
+
const menuOptions = showingMoreInfo ? [{
|
|
2743
|
+
label: "Back",
|
|
2744
|
+
value: "back"
|
|
2745
|
+
}] : [
|
|
2746
|
+
{
|
|
2747
|
+
label: "Continue",
|
|
2748
|
+
value: "continue"
|
|
2749
|
+
},
|
|
2750
|
+
{
|
|
2751
|
+
label: "More info",
|
|
2752
|
+
value: "more-info"
|
|
2753
|
+
},
|
|
2754
|
+
{
|
|
2755
|
+
label: "Cancel",
|
|
2756
|
+
value: "cancel"
|
|
2757
|
+
}
|
|
2758
|
+
];
|
|
2759
|
+
const handleSelect = (value) => {
|
|
2760
|
+
if (value === "cancel") process.exit(0);
|
|
2761
|
+
else if (value === "more-info") setShowingMoreInfo(true);
|
|
2762
|
+
else if (value === "back") setShowingMoreInfo(false);
|
|
2763
|
+
else store.completeSetup();
|
|
2764
|
+
};
|
|
2765
|
+
return /* @__PURE__ */ jsx(IntroScreenLayout, {
|
|
2766
|
+
installDir: session.installDir,
|
|
2767
|
+
body,
|
|
2768
|
+
showDetection: !showingMoreInfo,
|
|
2769
|
+
programLabel: session.programLabel,
|
|
2770
|
+
skillId: session.skillId,
|
|
2771
|
+
menuOptions,
|
|
2772
|
+
onSelect: handleSelect
|
|
2773
|
+
});
|
|
2774
|
+
};
|
|
2775
|
+
//#endregion
|
|
2692
2776
|
//#region src/ui/tui/screens/SelfDrivingIntroScreen.tsx
|
|
2693
2777
|
/**
|
|
2694
2778
|
* SelfDrivingIntroScreen — Welcome screen for the self-driving flow.
|
|
@@ -3483,7 +3567,7 @@ const AuditIntroScreen = ({ store }) => {
|
|
|
3483
3567
|
const [showingMoreInfo, setShowingMoreInfo] = useState(false);
|
|
3484
3568
|
const { session } = store;
|
|
3485
3569
|
const skillId = session.skillId ?? "audit";
|
|
3486
|
-
const { skillEntry, fetchFailed } = useSkillEntry(skillId
|
|
3570
|
+
const { skillEntry, fetchFailed } = useSkillEntry(skillId);
|
|
3487
3571
|
const body = showingMoreInfo ? /* @__PURE__ */ jsxs(Box, {
|
|
3488
3572
|
flexDirection: "column",
|
|
3489
3573
|
width: 56,
|
|
@@ -5411,6 +5495,11 @@ const QuestionInput = ({ question, onSubmit }) => {
|
|
|
5411
5495
|
}
|
|
5412
5496
|
};
|
|
5413
5497
|
//#endregion
|
|
5498
|
+
//#region src/steps/add-mcp-server-to-clients/login-client.ts
|
|
5499
|
+
function isLoginCapable(client) {
|
|
5500
|
+
return typeof client === "object" && client !== null && "loginCommand" in client;
|
|
5501
|
+
}
|
|
5502
|
+
//#endregion
|
|
5414
5503
|
//#region src/steps/add-mcp-server-to-clients/browser-client.ts
|
|
5415
5504
|
function isBrowserFinishable(c) {
|
|
5416
5505
|
return typeof c === "object" && c !== null && "connectorUrl" in c && "finishInstruction" in c;
|
|
@@ -5438,10 +5527,13 @@ function createMcpInstaller() {
|
|
|
5438
5527
|
return supported.map((c) => ({
|
|
5439
5528
|
name: c.name,
|
|
5440
5529
|
supportsPlugin: isPluginCapable(c) && c.supportsPlugin(),
|
|
5530
|
+
pluginBundlesMcp: isPluginCapable(c) && c.pluginBundlesMcpServer(),
|
|
5441
5531
|
finish: isBrowserFinishable(c) ? {
|
|
5442
5532
|
url: c.connectorUrl,
|
|
5443
5533
|
instruction: c.finishInstruction
|
|
5444
|
-
} : void 0
|
|
5534
|
+
} : void 0,
|
|
5535
|
+
loginCommand: isLoginCapable(c) && c.loginCommand(false) || void 0,
|
|
5536
|
+
pluginLoginCommand: isLoginCapable(c) && c.pluginLoginCommand?.() || void 0
|
|
5445
5537
|
}));
|
|
5446
5538
|
},
|
|
5447
5539
|
async install(clientNames, features, apiKey) {
|
|
@@ -5518,7 +5610,11 @@ function createMcpSuggestedPromptsServices(store) {
|
|
|
5518
5610
|
user: result.user
|
|
5519
5611
|
};
|
|
5520
5612
|
},
|
|
5521
|
-
runPromptStreaming: (args) => runProductionPromptStreaming(
|
|
5613
|
+
runPromptStreaming: (args) => runProductionPromptStreaming({
|
|
5614
|
+
...args,
|
|
5615
|
+
programId: store.analyticsProgramId,
|
|
5616
|
+
integration: store.session.integration ?? void 0
|
|
5617
|
+
}),
|
|
5522
5618
|
probeProjectData: (credentials) => probeProjectData({
|
|
5523
5619
|
accessToken: credentials.accessToken,
|
|
5524
5620
|
projectId: credentials.projectId,
|
|
@@ -5533,7 +5629,7 @@ function createMcpSuggestedPromptsServices(store) {
|
|
|
5533
5629
|
};
|
|
5534
5630
|
}
|
|
5535
5631
|
async function* runProductionPromptStreaming(args) {
|
|
5536
|
-
const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming
|
|
5632
|
+
const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming--sRErHKv.js");
|
|
5537
5633
|
yield* runMcpPromptViaSdk(args);
|
|
5538
5634
|
}
|
|
5539
5635
|
//#endregion
|
|
@@ -5563,6 +5659,7 @@ function createScreens(store, services) {
|
|
|
5563
5659
|
["migration-intro"]: /* @__PURE__ */ jsx(MigrationIntroScreen, { store }),
|
|
5564
5660
|
["agent-skill-intro"]: /* @__PURE__ */ jsx(AgentSkillIntroScreen, { store }),
|
|
5565
5661
|
["ai-observability-intro"]: /* @__PURE__ */ jsx(AiObservabilityIntroScreen, { store }),
|
|
5662
|
+
["metrics-intro"]: /* @__PURE__ */ jsx(MetricsIntroScreen, { store }),
|
|
5566
5663
|
["self-driving-intro"]: /* @__PURE__ */ jsx(SelfDrivingIntroScreen, { store }),
|
|
5567
5664
|
["self-driving-integration-check"]: /* @__PURE__ */ jsx(SelfDrivingIntegrationCheckScreen, { store }),
|
|
5568
5665
|
["self-driving-integration-detect"]: /* @__PURE__ */ jsx(SelfDrivingIntegrationDetectScreen, { store }),
|
|
@@ -5645,10 +5742,21 @@ function tokenCostLine(store) {
|
|
|
5645
5742
|
if (totalTokenCount(usage) === 0) return null;
|
|
5646
5743
|
return `${DIM}${usage.costIsFinal ? "Final cost" : "Cost (estimate)"}: ${formatCostUsd(usage.costUsd)} (in ${formatTokenCount(usage.inputTokens)} · out ${formatTokenCount(usage.outputTokens)} · cache read ${formatTokenCount(usage.cacheReadTokens)} · cache write ${formatTokenCount(usage.cacheCreationTokens)})${RESET_ATTRS}`;
|
|
5647
5744
|
}
|
|
5745
|
+
/**
|
|
5746
|
+
* The one manual step the wizard can't do itself: the editor's own MCP login.
|
|
5747
|
+
* Echoed into scrollback like the handoff prompt — command on its own plain
|
|
5748
|
+
* line so a terminal can triple-click-select it.
|
|
5749
|
+
*/
|
|
5750
|
+
function mcpLoginBlock(store) {
|
|
5751
|
+
const commands = store.session.mcpLoginCommands;
|
|
5752
|
+
if (!commands || commands.length === 0) return null;
|
|
5753
|
+
return `${GREEN}${BOLD}\u2714 Authenticate to finish (opens your browser):${RESET_ATTRS}\n` + commands.join("\n");
|
|
5754
|
+
}
|
|
5648
5755
|
function getExitLine(store) {
|
|
5649
5756
|
const outro = store.session.outroData;
|
|
5650
5757
|
const label = store.session.programLabel ?? "Wizard";
|
|
5651
5758
|
const costLine = tokenCostLine(store);
|
|
5759
|
+
const loginBlock = mcpLoginBlock(store);
|
|
5652
5760
|
if (outro?.kind === "success") {
|
|
5653
5761
|
const message = outro.message ?? `${label} completed successfully.`;
|
|
5654
5762
|
const parts = [`${GREEN}${BOLD}✔${RESET_ATTRS} ${message}${outro.reportFile && !message.includes(outro.reportFile) ? ` Check ./${outro.reportFile} for details.` : ""}`];
|
|
@@ -5658,10 +5766,13 @@ function getExitLine(store) {
|
|
|
5658
5766
|
parts.push(`${DIM}${outro.nextSteps.heading}${RESET_ATTRS}\n${bullets}`);
|
|
5659
5767
|
}
|
|
5660
5768
|
if (outro.handoffPrompt) parts.push(`${DIM}Hand this to your coding agent to finish up (triple-click to select):${RESET_ATTRS}\n` + outro.handoffPrompt);
|
|
5769
|
+
if (loginBlock) parts.push(loginBlock);
|
|
5661
5770
|
if (costLine) parts.push(costLine);
|
|
5662
5771
|
return parts.join("\n\n");
|
|
5663
5772
|
}
|
|
5664
|
-
|
|
5773
|
+
const parts = loginBlock ? [loginBlock] : [`${DIM}${label} exited.${RESET_ATTRS}`];
|
|
5774
|
+
if (costLine) parts.push(costLine);
|
|
5775
|
+
return parts.join("\n\n");
|
|
5665
5776
|
}
|
|
5666
5777
|
//#endregion
|
|
5667
5778
|
//#region src/ui/tui/start-tui.ts
|
|
@@ -5711,4 +5822,4 @@ function startTUI(version, program = Program.PostHogIntegration) {
|
|
|
5711
5822
|
//#endregion
|
|
5712
5823
|
export { startTUI };
|
|
5713
5824
|
|
|
5714
|
-
//# sourceMappingURL=start-tui-
|
|
5825
|
+
//# sourceMappingURL=start-tui-BQH4mQIZ.js.map
|