@posthog/wizard 2.81.0 → 2.81.1
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-BFzBnz10.js → agent-interface-DMP3DZRd.js} +8 -8
- package/dist/{agent-interface-BFzBnz10.js.map → agent-interface-DMP3DZRd.js.map} +1 -1
- package/dist/{agent-prompt-loader-CbCW6YbP.js → agent-prompt-loader-BrivWIna.js} +6 -6
- package/dist/{agent-prompt-loader-CbCW6YbP.js.map → agent-prompt-loader-BrivWIna.js.map} +1 -1
- package/dist/{analytics-CGGE7OSa.js → analytics-X7JfAmh6.js} +2 -2
- package/dist/{analytics-CGGE7OSa.js.map → analytics-X7JfAmh6.js.map} +1 -1
- package/dist/analytics-dcL9EQ4r.js +2 -0
- package/dist/{api-ZZhiRtbb.js → api-BkDwZoL4.js} +2 -2
- package/dist/{api-ZZhiRtbb.js.map → api-BkDwZoL4.js.map} +1 -1
- package/dist/api-BrMGAI-b.js +2 -0
- package/dist/api-key-login-CZEgx2jb.js +2 -0
- package/dist/{api-key-login-D0KBr1dx.js → api-key-login-DE0yKkP4.js} +5 -5
- package/dist/{api-key-login-D0KBr1dx.js.map → api-key-login-DE0yKkP4.js.map} +1 -1
- package/dist/bin.js +1 -1
- package/dist/{bounded-fs-DwL2Tasp.js → bounded-fs-iDiqDQ9v.js} +3 -3
- package/dist/{bounded-fs-DwL2Tasp.js.map → bounded-fs-iDiqDQ9v.js.map} +1 -1
- package/dist/{ci-install-DKXrt_ow.js → ci-install-BAftKh2Z.js} +4 -4
- package/dist/{ci-install-DKXrt_ow.js.map → ci-install-BAftKh2Z.js.map} +1 -1
- package/dist/{debug-sB20p-Ek.js → debug-C3tLP-ZW.js} +3 -3
- package/dist/{debug-sB20p-Ek.js.map → debug-C3tLP-ZW.js.map} +1 -1
- package/dist/{gateway-Dg4Fm-nC.js → gateway-IQjQ582o.js} +5 -5
- package/dist/{gateway-Dg4Fm-nC.js.map → gateway-IQjQ582o.js.map} +1 -1
- package/dist/{headless-DhTDC9ga.js → headless-DOhxEmw5.js} +2 -2
- package/dist/{headless-DhTDC9ga.js.map → headless-DOhxEmw5.js.map} +1 -1
- package/dist/{headless-B3Ol1nkU.js → headless-XNvdWVEp.js} +1 -1
- package/dist/{host-resolution-DDYJXiAQ.js → host-resolution-DI2oucSK.js} +4 -4
- package/dist/{host-resolution-DDYJXiAQ.js.map → host-resolution-DI2oucSK.js.map} +1 -1
- package/dist/{install-Dh8Z5R15.js → install-BixbBDLR.js} +5 -5
- package/dist/{install-Dh8Z5R15.js.map → install-BixbBDLR.js.map} +1 -1
- package/dist/{install-CZeR38cD.js → install-DaZ6pvEl.js} +1 -1
- package/dist/{interactive-hqHk6kz4.js → interactive-WLNQWF0D.js} +3 -3
- package/dist/{interactive-hqHk6kz4.js.map → interactive-WLNQWF0D.js.map} +1 -1
- package/dist/{links-rMot83W2.js → links-Bye4fsrj.js} +3 -3
- package/dist/{links-rMot83W2.js.map → links-Bye4fsrj.js.map} +1 -1
- package/dist/{main-DNIeasXx.js → main-CN8nbuZO.js} +20 -20
- package/dist/{main-DNIeasXx.js.map → main-CN8nbuZO.js.map} +1 -1
- package/dist/{mcp-SZcGfaOz.js → mcp-B2o4d9DS.js} +3 -3
- package/dist/{mcp-SZcGfaOz.js.map → mcp-B2o4d9DS.js.map} +1 -1
- package/dist/{mcp-prompt-streaming-BuRMBgbo.js → mcp-prompt-streaming-COs1DfAm.js} +5 -5
- package/dist/{mcp-prompt-streaming-BuRMBgbo.js.map → mcp-prompt-streaming-COs1DfAm.js.map} +1 -1
- package/dist/{models-G1j-wgwe.js → models-Cow22jET.js} +2 -2
- package/dist/{models-G1j-wgwe.js.map → models-Cow22jET.js.map} +1 -1
- package/dist/{oauth-session-C2fVSGfr.js → oauth-session-Bj_-BY7o.js} +2 -2
- package/dist/{oauth-session-C2fVSGfr.js.map → oauth-session-Bj_-BY7o.js.map} +1 -1
- package/dist/{orchestrator-tools-BchqG7Qi.js → orchestrator-tools-lhFIBGnp.js} +3 -3
- package/dist/{orchestrator-tools-BchqG7Qi.js.map → orchestrator-tools-lhFIBGnp.js.map} +1 -1
- package/dist/{package-manager-B3_qSybg.js → package-manager-DZ4wcTz3.js} +4 -4
- package/dist/{package-manager-B3_qSybg.js.map → package-manager-DZ4wcTz3.js.map} +1 -1
- package/dist/{pi-Cw7CPXSl.js → pi-DREdQRPP.js} +12 -12
- package/dist/{pi-Cw7CPXSl.js.map → pi-DREdQRPP.js.map} +1 -1
- package/dist/{playground-CPNrQfb3.js → playground-CJx3lwTH.js} +4 -4
- package/dist/{playground-CPNrQfb3.js.map → playground-CJx3lwTH.js.map} +1 -1
- package/dist/{posthog-integration-FAWfClH3.js → posthog-integration-DDSPdbpw.js} +20 -20
- package/dist/{posthog-integration-FAWfClH3.js.map → posthog-integration-DDSPdbpw.js.map} +1 -1
- package/dist/{programs-Ml6OLybj.js → programs-6SFfUBmm.js} +15 -15
- package/dist/{programs-Ml6OLybj.js.map → programs-6SFfUBmm.js.map} +1 -1
- package/dist/programs-DvlhdeM_.js +3 -0
- package/dist/provisioning-CPGWgv7p.js +2 -0
- package/dist/{provisioning-BTVL49jD.js → provisioning-tRDPH7EQ.js} +4 -4
- package/dist/{provisioning-BTVL49jD.js.map → provisioning-tRDPH7EQ.js.map} +1 -1
- package/dist/{queue-tools-BQfRI_uD.js → queue-tools-DrJKvFHZ.js} +4 -4
- package/dist/{queue-tools-BQfRI_uD.js.map → queue-tools-DrJKvFHZ.js.map} +1 -1
- package/dist/{results-ycm_Tf31.js → results-Crcubw0Q.js} +2 -2
- package/dist/{results-ycm_Tf31.js.map → results-Crcubw0Q.js.map} +1 -1
- package/dist/{run-C6Ei6vvb.js → run-BrIGaPy7.js} +7 -7
- package/dist/{run-C6Ei6vvb.js.map → run-BrIGaPy7.js.map} +1 -1
- package/dist/{run-Bgg-ctbA.js → run-DVFTMbxf.js} +10 -10
- package/dist/{run-Bgg-ctbA.js.map → run-DVFTMbxf.js.map} +1 -1
- package/dist/{run-tool-CrN2xWzU.js → run-tool-CxdPXmlY.js} +18 -18
- package/dist/{run-tool-CrN2xWzU.js.map → run-tool-CxdPXmlY.js.map} +1 -1
- package/dist/run-tool-GfISLgEs.js +2 -0
- package/dist/{runners-GGYJs0Ny.js → runners-loOOmHyc.js} +8 -8
- package/dist/{runners-GGYJs0Ny.js.map → runners-loOOmHyc.js.map} +1 -1
- package/dist/{security-C36p8lu6.js → security-C_grSgIM.js} +5 -5
- package/dist/{security-C36p8lu6.js.map → security-C_grSgIM.js.map} +1 -1
- package/dist/{setup-utils-Dfgse6pY.js → setup-utils-BYXbb9NM.js} +3 -3
- package/dist/{setup-utils-Dfgse6pY.js.map → setup-utils-BYXbb9NM.js.map} +1 -1
- package/dist/{start-playground-D0TrdLmc.js → start-playground-Blh0Swil.js} +13 -13
- package/dist/{start-playground-D0TrdLmc.js.map → start-playground-Blh0Swil.js.map} +1 -1
- package/dist/{subagent-DR5caRzL.js → subagent-DQ_enM8C.js} +3 -3
- package/dist/{subagent-DR5caRzL.js.map → subagent-DQ_enM8C.js.map} +1 -1
- package/dist/{task-C1qKgsAf.js → task-Dm9wZbVW.js} +14 -14
- package/dist/{task-C1qKgsAf.js.map → task-Dm9wZbVW.js.map} +1 -1
- package/dist/{telemetry-Ch9ZJvm7.js → telemetry-NeZhrBeW.js} +2 -2
- package/dist/{telemetry-Ch9ZJvm7.js.map → telemetry-NeZhrBeW.js.map} +1 -1
- package/dist/{terminal-D20JFN3J.js → terminal-Z4hCXfie.js} +115 -89
- package/dist/terminal-Z4hCXfie.js.map +1 -0
- package/dist/{tools-CmSMclOD.js → tools-1aM6bI9Y.js} +8 -8
- package/dist/{tools-CmSMclOD.js.map → tools-1aM6bI9Y.js.map} +1 -1
- package/dist/{tools-BZseGChD.js → tools-dUJHRo6X.js} +13 -13
- package/dist/{tools-BZseGChD.js.map → tools-dUJHRo6X.js.map} +1 -1
- package/dist/{tui-DJf3ZPRh.js → tui-CCO7VVTA.js} +1 -1
- package/dist/{tui-BXe1D0tc.js → tui-Cmi_ckGg.js} +4 -4
- package/dist/{tui-BXe1D0tc.js.map → tui-Cmi_ckGg.js.map} +1 -1
- package/dist/{upload-step-BlAN7MC5.js → upload-step-e2Jp2fcr.js} +3 -3
- package/dist/{upload-step-BlAN7MC5.js.map → upload-step-e2Jp2fcr.js.map} +1 -1
- package/dist/{urls-eFaChZ9d.js → urls-Cu4RO30x.js} +2 -2
- package/dist/{urls-eFaChZ9d.js.map → urls-Cu4RO30x.js.map} +1 -1
- package/dist/{wizard-abort-BX3O4Hg4.js → wizard-abort-BPEiPCXk.js} +4 -4
- package/dist/{wizard-abort-BX3O4Hg4.js.map → wizard-abort-BPEiPCXk.js.map} +1 -1
- package/dist/{yara-hooks-DV4EkkZY.js → yara-hooks-CFD60h78.js} +1 -1
- package/dist/{yara-hooks-C4HOysrM.js → yara-hooks-canFIYTc.js} +4 -4
- package/dist/{yara-hooks-C4HOysrM.js.map → yara-hooks-canFIYTc.js.map} +1 -1
- package/package.json +1 -1
- package/dist/analytics-D6NAIJxP.js +0 -2
- package/dist/api-DM4uMJ00.js +0 -2
- package/dist/api-key-login-C30LRht2.js +0 -2
- package/dist/programs-DjCmEcxb.js +0 -3
- package/dist/provisioning-DL0xCJXH.js +0 -2
- package/dist/run-tool-tNjm8S-E.js +0 -2
- package/dist/terminal-D20JFN3J.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { n as ErrorCodes } from "./emit-BqLCdV8Y.js";
|
|
2
|
-
import { d as relativeToInstallDir, i as getLogFilePath, o as logToFile } from "./debug-
|
|
3
|
-
import { A as POSTHOG_APP_URL, B as REPLAY_VISION_SUPPORTED, D as Integration, E as ISSUES_URL, F as POSTHOG_PRIVACY_URL, J as WIZARD_OAUTH_SCOPES, M as POSTHOG_DOCS_URL, O as OAUTH_PORTS, P as POSTHOG_ORG_AI_SETTINGS_URL, Q as WIZARD_PROVISIONING_SCOPES, R as POSTHOG_TERMS_URL, V as SETUP_REPORT_FILE, i as sessionProperties, k as OAUTH_TIMEOUT_MS, m as DUMMY_PROJECT_API_KEY, n as analytics, nt as WIZARD_USER_AGENT, rt as getSkillsBaseUrl } from "./analytics-
|
|
4
|
-
import { A as getProvisioningScopesForProgram, B as SOURCE_MAPS_CONTEXT_KEYS, C as oauthErrorFromTokenBody, D as getCommandPath, E as findProgramConfig, F as detectErrorTrackingProjects, G as detectSelfDrivingIntegrationProjects, H as NO_DEFAULT_LIMIT, J as POSTHOG_PRESENT_KEY, K as GITHUB_REQUIRED_BODY, L as detectSourceMapsProjects, O as getOAuthScopesForProgram, P as ERROR_TRACKING_PROJECT_PATH_KEY, R as DISPLAY_NAME, S as oauthErrorFromCallbackParams, T as Program, U as PRICING_LONG, W as PRICING_SHORT, Y as SELF_DRIVING_INTEGRATE_PATH_KEY, _ as missingOAuthScopes, at as evaluateWizardReadiness, b as buildCallbackErrorHtml, c as buildSession, d as SessionStore, et as CONNECT_SLACK_SCOPE_ADDITIONS, f as applyAgentProgress, g as getOAuthClientId, h as OAuthTokenResponseSchema, it as SIGNUP_WIZARD_READINESS_CONFIG, j as getSubcommandPrograms, k as getProgramConfig, nt as getAuditChecks, ot as getBlockingServiceKeys, q as GITHUB_REQUIRED_MESSAGE, rt as SERVICE_LABELS, tt as withScopeAdditions, v as parseOAuthScopes, x as buildOAuthFailureMessage, y as OAuthError, z as MANUAL_SDK_VARIANTS } from "./programs-
|
|
2
|
+
import { d as relativeToInstallDir, i as getLogFilePath, o as logToFile } from "./debug-C3tLP-ZW.js";
|
|
3
|
+
import { A as POSTHOG_APP_URL, B as REPLAY_VISION_SUPPORTED, D as Integration, E as ISSUES_URL, F as POSTHOG_PRIVACY_URL, J as WIZARD_OAUTH_SCOPES, M as POSTHOG_DOCS_URL, O as OAUTH_PORTS, P as POSTHOG_ORG_AI_SETTINGS_URL, Q as WIZARD_PROVISIONING_SCOPES, R as POSTHOG_TERMS_URL, V as SETUP_REPORT_FILE, i as sessionProperties, k as OAUTH_TIMEOUT_MS, m as DUMMY_PROJECT_API_KEY, n as analytics, nt as WIZARD_USER_AGENT, rt as getSkillsBaseUrl } from "./analytics-X7JfAmh6.js";
|
|
4
|
+
import { A as getProvisioningScopesForProgram, B as SOURCE_MAPS_CONTEXT_KEYS, C as oauthErrorFromTokenBody, D as getCommandPath, E as findProgramConfig, F as detectErrorTrackingProjects, G as detectSelfDrivingIntegrationProjects, H as NO_DEFAULT_LIMIT, J as POSTHOG_PRESENT_KEY, K as GITHUB_REQUIRED_BODY, L as detectSourceMapsProjects, O as getOAuthScopesForProgram, P as ERROR_TRACKING_PROJECT_PATH_KEY, R as DISPLAY_NAME, S as oauthErrorFromCallbackParams, T as Program, U as PRICING_LONG, W as PRICING_SHORT, Y as SELF_DRIVING_INTEGRATE_PATH_KEY, _ as missingOAuthScopes, at as evaluateWizardReadiness, b as buildCallbackErrorHtml, c as buildSession, d as SessionStore, et as CONNECT_SLACK_SCOPE_ADDITIONS, f as applyAgentProgress, g as getOAuthClientId, h as OAuthTokenResponseSchema, it as SIGNUP_WIZARD_READINESS_CONFIG, j as getSubcommandPrograms, k as getProgramConfig, nt as getAuditChecks, ot as getBlockingServiceKeys, q as GITHUB_REQUIRED_MESSAGE, rt as SERVICE_LABELS, tt as withScopeAdditions, v as parseOAuthScopes, x as buildOAuthFailureMessage, y as OAuthError, z as MANUAL_SDK_VARIANTS } from "./programs-6SFfUBmm.js";
|
|
5
5
|
import "./errors-DhFeR8Sp.js";
|
|
6
|
-
import { r as withUtm, t as openTrackedLink } from "./links-
|
|
7
|
-
import { t as withProgress } from "./telemetry-
|
|
8
|
-
import { t as detectOrgAndProject } from "./setup-utils-
|
|
9
|
-
import { r as currentCredentials } from "./oauth-session-
|
|
10
|
-
import { g as isGrantRevoked } from "./agent-interface-
|
|
11
|
-
import { a as getOAuthUrl, i as getIntegrationAuthorizeUrl, s as resolveBaseUrl } from "./urls-
|
|
12
|
-
import { t as HostResolution } from "./host-resolution-
|
|
13
|
-
import { A as formatCostUsd, C as FRAMEWORK_REGISTRY, E as streamMcpPrompt, c as POSTHOG_SDKS, j as formatTokenCount, k as computeTokenCostUsd, l as STRIPE_SDKS, p as getDetectedWarehouseSources } from "./posthog-integration-
|
|
14
|
-
import { y as fetchSkillMenu } from "./yara-hooks-
|
|
15
|
-
import { n as namesWithStatus, o as summarizeFailure, t as isOk } from "./results-
|
|
16
|
-
import { f as getKindMeta, l as MCP_TUTORIAL_SCOPE_ADDITIONS, n as getTool, p as fetchHealthIssues
|
|
17
|
-
import { a as fetchGithubConnected, c as fetchUserData, n as ApiError, o as fetchProjectData, s as fetchSlackConnected } from "./api-
|
|
6
|
+
import { r as withUtm, t as openTrackedLink } from "./links-Bye4fsrj.js";
|
|
7
|
+
import { t as withProgress } from "./telemetry-NeZhrBeW.js";
|
|
8
|
+
import { t as detectOrgAndProject } from "./setup-utils-BYXbb9NM.js";
|
|
9
|
+
import { r as currentCredentials } from "./oauth-session-Bj_-BY7o.js";
|
|
10
|
+
import { g as isGrantRevoked } from "./agent-interface-DMP3DZRd.js";
|
|
11
|
+
import { a as getOAuthUrl, i as getIntegrationAuthorizeUrl, s as resolveBaseUrl } from "./urls-Cu4RO30x.js";
|
|
12
|
+
import { t as HostResolution } from "./host-resolution-DI2oucSK.js";
|
|
13
|
+
import { A as formatCostUsd, C as FRAMEWORK_REGISTRY, E as streamMcpPrompt, c as POSTHOG_SDKS, j as formatTokenCount, k as computeTokenCostUsd, l as STRIPE_SDKS, p as getDetectedWarehouseSources } from "./posthog-integration-DDSPdbpw.js";
|
|
14
|
+
import { y as fetchSkillMenu } from "./yara-hooks-canFIYTc.js";
|
|
15
|
+
import { n as namesWithStatus, o as summarizeFailure, t as isOk } from "./results-Crcubw0Q.js";
|
|
16
|
+
import { f as getKindMeta, l as MCP_TUTORIAL_SCOPE_ADDITIONS, n as getTool, p as fetchHealthIssues } from "./tools-dUJHRo6X.js";
|
|
17
|
+
import { a as fetchGithubConnected, c as fetchUserData, n as ApiError, o as fetchProjectData, s as fetchSlackConnected } from "./api-BkDwZoL4.js";
|
|
18
18
|
import { n as AVAILABLE_FEATURES, o as isAllFeaturesSelected, t as ALL_FEATURE_VALUES } from "./defaults-DDVl3tKN.js";
|
|
19
|
-
import { n as provisionNewAccount, r as requestDeepLink, t as ProvisionedAccountUnreadableError } from "./provisioning-
|
|
20
|
-
import { r as wizardAbort } from "./wizard-abort-
|
|
19
|
+
import { n as provisionNewAccount, r as requestDeepLink, t as ProvisionedAccountUnreadableError } from "./provisioning-tRDPH7EQ.js";
|
|
20
|
+
import { r as wizardAbort } from "./wizard-abort-BPEiPCXk.js";
|
|
21
21
|
import { a as useStdoutDimensions, c as wrapAndTruncate, d as isObjectBlock, f as ConfirmButton, h as Icons, i as useKeyboardHintsContext, l as isClearBlock, m as Colors, n as useKeyBindings, o as computeVisibleRange, p as PromptLabel, r as KeyboardHintsProvider, s as wordWrap, t as PickerMenu, u as isLinesBlock } from "./PickerMenu-BGGeYqd-.js";
|
|
22
22
|
import * as fs$1 from "fs";
|
|
23
23
|
import path from "path";
|
|
@@ -7054,7 +7054,7 @@ const FrameworkPicker = ({ store, onComplete }) => {
|
|
|
7054
7054
|
})),
|
|
7055
7055
|
onSelect: (value) => {
|
|
7056
7056
|
const integration = Array.isArray(value) ? value[0] : value;
|
|
7057
|
-
import("./programs-
|
|
7057
|
+
import("./programs-DvlhdeM_.js").then(({ FRAMEWORK_REGISTRY }) => {
|
|
7058
7058
|
const config = FRAMEWORK_REGISTRY[integration];
|
|
7059
7059
|
store.setFrameworkConfig(integration, config);
|
|
7060
7060
|
store.setDetectedFramework(config.metadata.name);
|
|
@@ -9675,10 +9675,11 @@ const TUI_TOOLS$3 = { "posthog-doctor": {
|
|
|
9675
9675
|
* importing business logic directly. Testable, no dynamic imports.
|
|
9676
9676
|
*
|
|
9677
9677
|
* Supports two modes via the `mode` prop:
|
|
9678
|
-
* - 'install': detect clients →
|
|
9678
|
+
* - 'install': detect clients → pick clients (esc cancels) → pick features → install
|
|
9679
9679
|
* - 'remove': detect installed clients → confirm → remove
|
|
9680
9680
|
*
|
|
9681
|
-
*
|
|
9681
|
+
* A successful install ends on one screen: results, any login commands, sample
|
|
9682
|
+
* prompts and the tutorial command. When done, calls store.setMcpComplete().
|
|
9682
9683
|
*/
|
|
9683
9684
|
const markDone = (store, outcome, clients = [], featuresSelected, loginCommands = []) => {
|
|
9684
9685
|
store.setMcpComplete(outcome, clients, featuresSelected, loginCommands);
|
|
@@ -9770,7 +9771,7 @@ const DoneContinue = ({ onContinue }) => {
|
|
|
9770
9771
|
})
|
|
9771
9772
|
});
|
|
9772
9773
|
};
|
|
9773
|
-
const McpScreen = ({ store, installer, mode = "install" }) => {
|
|
9774
|
+
const McpScreen = ({ store, installer, mode = "install", samplePrompts = [] }) => {
|
|
9774
9775
|
useSyncExternalStore((cb) => store.subscribe(cb), () => store.getSnapshot());
|
|
9775
9776
|
useInput(() => void 0);
|
|
9776
9777
|
const isRemove = mode === "remove";
|
|
@@ -9781,6 +9782,7 @@ const McpScreen = ({ store, installer, mode = "install" }) => {
|
|
|
9781
9782
|
const [pluginResults, setPluginResults] = useState([]);
|
|
9782
9783
|
const [detectError, setDetectError] = useState(null);
|
|
9783
9784
|
const [flowError, setFlowError] = useState(null);
|
|
9785
|
+
const [loginCommands, setLoginCommands] = useState([]);
|
|
9784
9786
|
const finishFlow = useRef(null);
|
|
9785
9787
|
useEffect(() => {
|
|
9786
9788
|
(async () => {
|
|
@@ -9791,7 +9793,7 @@ const McpScreen = ({ store, installer, mode = "install" }) => {
|
|
|
9791
9793
|
setTimeout(() => markDone(store, "no_clients"), 1500);
|
|
9792
9794
|
} else {
|
|
9793
9795
|
setClients(detected);
|
|
9794
|
-
setPhase("ask");
|
|
9796
|
+
setPhase(isRemove ? "ask" : "pick");
|
|
9795
9797
|
}
|
|
9796
9798
|
} catch (err) {
|
|
9797
9799
|
setDetectError(errorText(err));
|
|
@@ -9817,14 +9819,15 @@ const McpScreen = ({ store, installer, mode = "install" }) => {
|
|
|
9817
9819
|
}
|
|
9818
9820
|
setPhase("feature-select");
|
|
9819
9821
|
};
|
|
9820
|
-
const handleConfirm = () => {
|
|
9821
|
-
if (isRemove) doRemove();
|
|
9822
|
-
else if (clients.length === 1) proceedAfterClientPick([clients[0].name]);
|
|
9823
|
-
else setPhase("pick");
|
|
9824
|
-
};
|
|
9825
9822
|
const handleSkip = () => {
|
|
9826
9823
|
markDone(store, "skipped");
|
|
9827
9824
|
};
|
|
9825
|
+
useKeyBindings("mcp-skip", phase === "pick" ? [{
|
|
9826
|
+
match: "escape",
|
|
9827
|
+
label: "esc",
|
|
9828
|
+
action: "cancel",
|
|
9829
|
+
handler: handleSkip
|
|
9830
|
+
}] : []);
|
|
9828
9831
|
const doInstall = async (names, features) => {
|
|
9829
9832
|
setPhase("working");
|
|
9830
9833
|
let mcpResult = [];
|
|
@@ -9849,6 +9852,7 @@ const McpScreen = ({ store, installer, mode = "install" }) => {
|
|
|
9849
9852
|
const outcome = ready.length > 0 ? "installed" : "failed";
|
|
9850
9853
|
const featuresReport = reportFeatures(features ?? [...ALL_FEATURE_VALUES]);
|
|
9851
9854
|
const logins = oauthFlow ? pendingLoginCommands(clients, mcpResult, pluginResult) : [];
|
|
9855
|
+
setLoginCommands(logins);
|
|
9852
9856
|
finishFlow.current = doneOnEnter(store, outcome, ready.map((r) => r.name), featuresReport, logins);
|
|
9853
9857
|
setPhase("done");
|
|
9854
9858
|
};
|
|
@@ -9865,11 +9869,7 @@ const McpScreen = ({ store, installer, mode = "install" }) => {
|
|
|
9865
9869
|
finishFlow.current = doneOnEnter(store, removed.length > 0 ? "installed" : "failed", removed.map((r) => r.name));
|
|
9866
9870
|
setPhase("done");
|
|
9867
9871
|
};
|
|
9868
|
-
const
|
|
9869
|
-
"Ask your agent: \"List my feature flags\" — and it does.",
|
|
9870
|
-
"Run SQL, build dashboards, ship flags, all from your IDE.",
|
|
9871
|
-
"No copy-pasting tokens or context. Your agent has the keys."
|
|
9872
|
-
];
|
|
9872
|
+
const installValueLines = ["Ask your agent: \"List my feature flags\" — and it does.", "Run SQL, build dashboards, ship flags, all from your IDE."];
|
|
9873
9873
|
const okMcpNames = mcpResults.filter(isOk).map((r) => r.name);
|
|
9874
9874
|
const finishNotes = clients.flatMap((c) => c.finish && okMcpNames.includes(c.name) ? [{
|
|
9875
9875
|
name: c.name,
|
|
@@ -9883,13 +9883,14 @@ const McpScreen = ({ store, installer, mode = "install" }) => {
|
|
|
9883
9883
|
const pluginAlreadyInstalled = namesWithStatus(pluginResults, "unchanged");
|
|
9884
9884
|
const failures = [...mcpResults, ...pluginResults].filter((r) => r.status === "failed").map((r) => r.detail ? `${r.name} — ${r.detail}` : r.name);
|
|
9885
9885
|
const hasAnyResult = installedNow.length + alreadyInstalled.length + pluginInstalled.length + pluginAlreadyInstalled.length + failures.length + finishNotes.length > 0;
|
|
9886
|
+
const installSucceeded = !isRemove && [...mcpResults, ...pluginResults].some(isOk);
|
|
9886
9887
|
return /* @__PURE__ */ jsxs(Box, {
|
|
9887
9888
|
flexDirection: "column",
|
|
9888
9889
|
flexGrow: 1,
|
|
9889
9890
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
9890
9891
|
bold: true,
|
|
9891
9892
|
color: Colors.accent,
|
|
9892
|
-
children: isRemove ? "Remove the PostHog MCP" : "Install the MCP so you can chat to your data"
|
|
9893
|
+
children: isRemove ? "Remove the PostHog MCP" : phase === "done" && installSucceeded ? "You're all set — chat to your data from your client" : "Install the MCP so you can chat to your data"
|
|
9893
9894
|
}), /* @__PURE__ */ jsxs(Box, {
|
|
9894
9895
|
marginTop: 1,
|
|
9895
9896
|
flexDirection: "column",
|
|
@@ -9924,36 +9925,28 @@ const McpScreen = ({ store, installer, mode = "install" }) => {
|
|
|
9924
9925
|
" MCP clients detected. Skipping..."
|
|
9925
9926
|
]
|
|
9926
9927
|
})),
|
|
9927
|
-
phase === "ask" && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
}, bullet))
|
|
9939
|
-
}),
|
|
9940
|
-
/* @__PURE__ */ jsxs(Text, {
|
|
9941
|
-
dimColor: true,
|
|
9942
|
-
children: ["Detected: ", clients.map((c) => c.name).join(", ")]
|
|
9943
|
-
}),
|
|
9944
|
-
/* @__PURE__ */ jsx(Box, {
|
|
9945
|
-
marginTop: 1,
|
|
9946
|
-
children: /* @__PURE__ */ jsx(ConfirmationInput, {
|
|
9947
|
-
message: `${isRemove ? "Remove" : "Install"} the PostHog MCP server${clients.some((c) => c.supportsPlugin) ? " and plugin" : ""}?`,
|
|
9948
|
-
confirmLabel: isRemove ? "Remove" : "Install",
|
|
9949
|
-
cancelLabel: "No thanks",
|
|
9950
|
-
onConfirm: handleConfirm,
|
|
9951
|
-
onCancel: handleSkip
|
|
9952
|
-
})
|
|
9928
|
+
phase === "ask" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Text, {
|
|
9929
|
+
dimColor: true,
|
|
9930
|
+
children: ["Detected: ", clients.map((c) => c.name).join(", ")]
|
|
9931
|
+
}), /* @__PURE__ */ jsx(Box, {
|
|
9932
|
+
marginTop: 1,
|
|
9933
|
+
children: /* @__PURE__ */ jsx(ConfirmationInput, {
|
|
9934
|
+
message: `Remove the PostHog MCP server${clients.some((c) => c.supportsPlugin) ? " and plugin" : ""}?`,
|
|
9935
|
+
confirmLabel: "Remove",
|
|
9936
|
+
cancelLabel: "No thanks",
|
|
9937
|
+
onConfirm: () => void doRemove(),
|
|
9938
|
+
onCancel: handleSkip
|
|
9953
9939
|
})
|
|
9954
|
-
] }),
|
|
9955
|
-
phase === "pick" && /* @__PURE__ */ jsx(
|
|
9956
|
-
|
|
9940
|
+
})] }),
|
|
9941
|
+
phase === "pick" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Box, {
|
|
9942
|
+
flexDirection: "column",
|
|
9943
|
+
marginBottom: 1,
|
|
9944
|
+
children: installValueLines.map((line) => /* @__PURE__ */ jsx(Text, {
|
|
9945
|
+
dimColor: true,
|
|
9946
|
+
children: line
|
|
9947
|
+
}, line))
|
|
9948
|
+
}), /* @__PURE__ */ jsx(PickerMenu, {
|
|
9949
|
+
message: `Select clients to install the PostHog MCP server${clients.some((c) => c.supportsPlugin) ? " and plugin" : ""}`,
|
|
9957
9950
|
options: clients.map((c) => ({
|
|
9958
9951
|
label: c.name,
|
|
9959
9952
|
value: c.name,
|
|
@@ -9962,9 +9955,14 @@ const McpScreen = ({ store, installer, mode = "install" }) => {
|
|
|
9962
9955
|
})),
|
|
9963
9956
|
mode: "multi",
|
|
9964
9957
|
onSelect: (selected) => {
|
|
9965
|
-
|
|
9958
|
+
const names = Array.isArray(selected) ? selected : [selected];
|
|
9959
|
+
if (names.length === 0) {
|
|
9960
|
+
handleSkip();
|
|
9961
|
+
return;
|
|
9962
|
+
}
|
|
9963
|
+
proceedAfterClientPick(names);
|
|
9966
9964
|
}
|
|
9967
|
-
}),
|
|
9965
|
+
})] }),
|
|
9968
9966
|
phase === "feature-select" && /* @__PURE__ */ jsx(GroupedPickerMenu, {
|
|
9969
9967
|
message: "Select the PostHog areas your agent can reach",
|
|
9970
9968
|
groups: AVAILABLE_FEATURES,
|
|
@@ -10027,6 +10025,21 @@ const McpScreen = ({ store, installer, mode = "install" }) => {
|
|
|
10027
10025
|
icon: "✖",
|
|
10028
10026
|
note: "Run with --debug for the full output, or report it at github.com/PostHog/wizard/issues."
|
|
10029
10027
|
}),
|
|
10028
|
+
loginCommands.length > 0 && /* @__PURE__ */ jsxs(Box, {
|
|
10029
|
+
flexDirection: "column",
|
|
10030
|
+
marginBottom: 1,
|
|
10031
|
+
children: [/* @__PURE__ */ jsx(Box, {
|
|
10032
|
+
marginBottom: 1,
|
|
10033
|
+
children: /* @__PURE__ */ jsx(Text, { children: "Authenticate to finish (opens your browser):" })
|
|
10034
|
+
}), loginCommands.map((command) => /* @__PURE__ */ jsxs(Text, { children: [/* @__PURE__ */ jsx(Text, {
|
|
10035
|
+
dimColor: true,
|
|
10036
|
+
children: "$ "
|
|
10037
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
10038
|
+
bold: true,
|
|
10039
|
+
color: Colors.primary,
|
|
10040
|
+
children: command
|
|
10041
|
+
})] }, command))]
|
|
10042
|
+
}),
|
|
10030
10043
|
finishNotes.map((note) => /* @__PURE__ */ jsxs(Box, {
|
|
10031
10044
|
flexDirection: "column",
|
|
10032
10045
|
marginTop: 1,
|
|
@@ -10060,7 +10073,37 @@ const McpScreen = ({ store, installer, mode = "install" }) => {
|
|
|
10060
10073
|
children: [" ", "(If it didn't open, paste the URL above.)"]
|
|
10061
10074
|
})
|
|
10062
10075
|
]
|
|
10063
|
-
}, note.name))
|
|
10076
|
+
}, note.name)),
|
|
10077
|
+
installSucceeded && /* @__PURE__ */ jsxs(Box, {
|
|
10078
|
+
flexDirection: "column",
|
|
10079
|
+
marginTop: finishNotes.length > 0 ? 1 : 0,
|
|
10080
|
+
children: [samplePrompts.length > 0 && /* @__PURE__ */ jsxs(Box, {
|
|
10081
|
+
flexDirection: "column",
|
|
10082
|
+
marginBottom: 1,
|
|
10083
|
+
children: [/* @__PURE__ */ jsx(Text, { children: "Open your client and try a prompt like:" }), samplePrompts.map((prompt) => /* @__PURE__ */ jsxs(Text, { children: [
|
|
10084
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10085
|
+
color: Colors.primary,
|
|
10086
|
+
children: Icons.triangleSmallRight
|
|
10087
|
+
}),
|
|
10088
|
+
" ",
|
|
10089
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10090
|
+
dimColor: true,
|
|
10091
|
+
children: prompt
|
|
10092
|
+
})
|
|
10093
|
+
] }, prompt))]
|
|
10094
|
+
}), /* @__PURE__ */ jsxs(Text, {
|
|
10095
|
+
dimColor: true,
|
|
10096
|
+
children: [
|
|
10097
|
+
"Take the guided tour anytime with",
|
|
10098
|
+
" ",
|
|
10099
|
+
/* @__PURE__ */ jsx(Text, {
|
|
10100
|
+
bold: true,
|
|
10101
|
+
children: "npx @posthog/wizard mcp tutorial"
|
|
10102
|
+
}),
|
|
10103
|
+
"."
|
|
10104
|
+
]
|
|
10105
|
+
})]
|
|
10106
|
+
})
|
|
10064
10107
|
] }) : flowError ? /* @__PURE__ */ jsxs(Box, {
|
|
10065
10108
|
flexDirection: "column",
|
|
10066
10109
|
children: [
|
|
@@ -10099,13 +10142,6 @@ const MCP_ADD_FLOW = [{
|
|
|
10099
10142
|
label: "Add MCP server",
|
|
10100
10143
|
screenId: "mcp-add",
|
|
10101
10144
|
isComplete: (s) => s.mcpComplete
|
|
10102
|
-
}, {
|
|
10103
|
-
id: "mcp-suggested-prompts",
|
|
10104
|
-
label: "Suggested prompts",
|
|
10105
|
-
screenId: "mcp-suggested-prompts",
|
|
10106
|
-
show: (s) => s.mcpOutcome === "installed",
|
|
10107
|
-
isComplete: (s) => s.mcpSuggestedPromptsDismissed,
|
|
10108
|
-
reportsAsProgramId: "mcp-tutorial"
|
|
10109
10145
|
}];
|
|
10110
10146
|
/**
|
|
10111
10147
|
* `wizard mcp remove` — single-step uninstall flow.
|
|
@@ -11585,9 +11621,7 @@ async function probeProjectData(args) {
|
|
|
11585
11621
|
//#endregion
|
|
11586
11622
|
//#region src/tui/tools/mcp/screens/McpSuggestedPromptsScreen.tsx
|
|
11587
11623
|
/**
|
|
11588
|
-
* McpSuggestedPromptsScreen —
|
|
11589
|
-
* standalone `wizard mcp add` tool, and as the entry point for
|
|
11590
|
-
* `wizard mcp tutorial`.
|
|
11624
|
+
* McpSuggestedPromptsScreen — the `wizard mcp tutorial` screen.
|
|
11591
11625
|
*
|
|
11592
11626
|
* Phases:
|
|
11593
11627
|
* 1. Choose — opens with a Log in / Exit picker, framed by a
|
|
@@ -11634,7 +11668,7 @@ const McpSuggestedPromptsScreen = ({ store, services }) => {
|
|
|
11634
11668
|
...properties
|
|
11635
11669
|
});
|
|
11636
11670
|
}, [programId]);
|
|
11637
|
-
const [phase, setPhase] = useState(
|
|
11671
|
+
const [phase, setPhase] = useState("choose");
|
|
11638
11672
|
const [profile, setProfile] = useState(null);
|
|
11639
11673
|
const greeting = useMemo(() => getRoleGreeting(session.roleAtOrganization), [session.roleAtOrganization]);
|
|
11640
11674
|
const pickerCandidates = useMemo(() => getTutorialPicker(session.roleAtOrganization, session.integration, profile), [
|
|
@@ -13320,7 +13354,8 @@ function createMcpSuggestedPromptsServices(store) {
|
|
|
13320
13354
|
const shared = { screens: {
|
|
13321
13355
|
["mcp-add"]: (store, services) => /* @__PURE__ */ jsx(McpScreen, {
|
|
13322
13356
|
store,
|
|
13323
|
-
installer: services.mcpInstaller
|
|
13357
|
+
installer: services.mcpInstaller,
|
|
13358
|
+
samplePrompts: getRolePrompts(store.session.roleAtOrganization, store.session.integration).slice(0, 3).map((p) => p.prompt)
|
|
13324
13359
|
}),
|
|
13325
13360
|
["mcp-remove"]: (store, services) => /* @__PURE__ */ jsx(McpScreen, {
|
|
13326
13361
|
store,
|
|
@@ -16054,19 +16089,10 @@ var WizardStore = class {
|
|
|
16054
16089
|
list.push(fn);
|
|
16055
16090
|
this._enterScreenHooks.set(screen, list);
|
|
16056
16091
|
}
|
|
16057
|
-
/**
|
|
16058
|
-
* The program `screen` reports under — its step's `reportsAsProgramId` if it
|
|
16059
|
-
* claims one, else the running program (also the fallback for overlays and
|
|
16060
|
-
* screens with no owning step).
|
|
16061
|
-
*/
|
|
16062
|
-
_programIdForScreen(screen) {
|
|
16063
|
-
const program = this.router.activeProgram;
|
|
16064
|
-
return flowOwner(program).flow.find((s) => s.screenId === screen)?.reportsAsProgramId ?? program;
|
|
16065
|
-
}
|
|
16066
16092
|
/** The program the visible screen reports under; screens stamp this on their
|
|
16067
16093
|
* own events rather than relying on the run-level `program_id` tag. */
|
|
16068
16094
|
get analyticsProgramId() {
|
|
16069
|
-
return this.
|
|
16095
|
+
return this.router.activeProgram;
|
|
16070
16096
|
}
|
|
16071
16097
|
/**
|
|
16072
16098
|
* Detect screen transitions, run enter-screen hooks, and fire analytics.
|
|
@@ -16081,7 +16107,7 @@ var WizardStore = class {
|
|
|
16081
16107
|
if (hooks) for (const fn of hooks) fn();
|
|
16082
16108
|
analytics.wizardCapture(`screen ${next}`, {
|
|
16083
16109
|
from_screen: prev,
|
|
16084
|
-
program_id: this.
|
|
16110
|
+
program_id: this.router.activeProgram,
|
|
16085
16111
|
...sessionProperties(this.session)
|
|
16086
16112
|
});
|
|
16087
16113
|
}
|
|
@@ -16185,4 +16211,4 @@ function releaseTerminal() {
|
|
|
16185
16211
|
//#endregion
|
|
16186
16212
|
export { AUDIT_AREA_SLIDES as A, totalTokenCount as B, assembleProfile as C, getTuiProgram as D, IssueTable as E, ContentSequencer as F, ModalOverlay as G, LogViewer as H, HNViewer as I, ProgressList as J, ConfirmationInput as K, TabContainer as L, IntroScreenLayout as M, PRIVACY_PANEL_LABEL as N, displayProgress as O, PrivacyPanel as P, getContentBlocks$5 as Q, ScreenContainer as R, McpSuggestedPromptsScreen as S, McpScreen as T, LinkText as U, EventPlanViewer as V, extractUrls as W, SplitView as X, LoadingBox as Y, CardLayout as Z, getTuiTool as _, SlackConnectScreen as a, extractOAuthCode as b, LearnCard as c, MINT_FAILURE_BODY as d, MINT_FAILURE_CONTACT as f, listFlowOwners as g, flowOwner as h, OutroScreen as i, AuditChecksViewer as j, useDismissOnAnyKey as k, AiOptInRequiredScreen as l, isRunFailure as m, releaseTerminal as n, TipsCard as o, MINT_FAILURE_MESSAGE as p, GroupedPickerMenu as q, WizardStore as r, VisualizerTab as s, enterDarkTerminal as t, ServiceHealthList as u, seededProfile as v, TAILORED_ROLES as w, abortOnScreens as x, getOrAskForProjectData as y, ViewportTooSmall as z };
|
|
16187
16213
|
|
|
16188
|
-
//# sourceMappingURL=terminal-
|
|
16214
|
+
//# sourceMappingURL=terminal-Z4hCXfie.js.map
|