@posthog/wizard 2.38.1 → 2.39.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 +70 -13
- package/dist/{add-mcp-server-to-clients-BB1_aH5M.js → add-mcp-server-to-clients-Ci0I1vbS.js} +6 -6
- package/dist/{add-mcp-server-to-clients-BB1_aH5M.js.map → add-mcp-server-to-clients-Ci0I1vbS.js.map} +1 -1
- package/dist/{agent-interface-kOuzXg84.js → agent-interface-BR3zAUpM.js} +30 -623
- package/dist/agent-interface-BR3zAUpM.js.map +1 -0
- package/dist/{agent-runner-DZhaiwD5.js → agent-runner-B1fzwFzc.js} +33 -18
- package/dist/agent-runner-B1fzwFzc.js.map +1 -0
- package/dist/{analytics-Z_2kCTpB.js → analytics-C7Oc3yWZ.js} +3 -2
- package/dist/analytics-C7Oc3yWZ.js.map +1 -0
- package/dist/analytics-tVERo8XR.js +2 -0
- package/dist/{api-CwhOyprf.js → api-DSG-l8Ql.js} +3 -3
- package/dist/{api-CwhOyprf.js.map → api-DSG-l8Ql.js.map} +1 -1
- package/dist/bin.js +513 -137
- package/dist/bin.js.map +1 -1
- package/dist/{ci-install-CWDY86uB.js → ci-install-DeAd2HYP.js} +4 -4
- package/dist/{ci-install-CWDY86uB.js.map → ci-install-DeAd2HYP.js.map} +1 -1
- package/dist/{debug-CaRHQrDY.js → debug-BZnZ7Gvh.js} +39 -16
- package/dist/debug-BZnZ7Gvh.js.map +1 -0
- package/dist/{debug-BmdpjMub.js → debug-DtgfvuKF.js} +1 -1
- package/dist/{defaults-a0e6IRjP.js → defaults-BxiMLkQY.js} +1 -1
- package/dist/{defaults-a0e6IRjP.js.map → defaults-BxiMLkQY.js.map} +1 -1
- package/dist/{env-api-key-DEl3LJBv.js → env-api-key-DDVkPQmo.js} +1 -1
- package/dist/{env-api-key-DEl3LJBv.js.map → env-api-key-DDVkPQmo.js.map} +1 -1
- package/dist/{environment-knibpXF2.js → environment-QNoUem74.js} +3 -3
- package/dist/{environment-knibpXF2.js.map → environment-QNoUem74.js.map} +1 -1
- package/dist/{file-utils-DWYX_G1o.js → file-utils-UqdMTR9x.js} +2 -2
- package/dist/{file-utils-DWYX_G1o.js.map → file-utils-UqdMTR9x.js.map} +1 -1
- package/dist/{headless-ui-C4JCi9Zz.js → headless-ui-DtFktXIa.js} +2 -2
- package/dist/{headless-ui-C4JCi9Zz.js.map → headless-ui-DtFktXIa.js.map} +1 -1
- package/dist/{host-resolution-C18FwVrM.js → host-resolution-DjQvur4X.js} +3 -3
- package/dist/{host-resolution-C18FwVrM.js.map → host-resolution-DjQvur4X.js.map} +1 -1
- package/dist/{interactive-46qgS-UA.js → interactive-_8v2Ymw2.js} +2 -2
- package/dist/{interactive-46qgS-UA.js.map → interactive-_8v2Ymw2.js.map} +1 -1
- package/dist/{mcp-QWL5Obf3.js → mcp-BX34188X.js} +2 -2
- package/dist/{mcp-QWL5Obf3.js.map → mcp-BX34188X.js.map} +1 -1
- package/dist/{mcp-prompt-streaming-BpNkFksF.js → mcp-prompt-streaming-l1zsmQQc.js} +4 -4
- package/dist/{mcp-prompt-streaming-BpNkFksF.js.map → mcp-prompt-streaming-l1zsmQQc.js.map} +1 -1
- package/dist/{non-interactive-3_T1d0cj.js → non-interactive-BBCGIDP5.js} +2 -2
- package/dist/{non-interactive-3_T1d0cj.js.map → non-interactive-BBCGIDP5.js.map} +1 -1
- package/dist/{package-manager-C5VVQHQ-.js → package-manager-FY9qPU4z.js} +2 -2
- package/dist/{package-manager-C5VVQHQ-.js.map → package-manager-FY9qPU4z.js.map} +1 -1
- package/dist/{playground-CbzUpMuN.js → playground-B9Gesj-w.js} +5 -5
- package/dist/{playground-CbzUpMuN.js.map → playground-B9Gesj-w.js.map} +1 -1
- package/dist/{posthog-BESrI6-T.js → posthog-BHbtnNQE.js} +1 -1
- package/dist/{posthog-BESrI6-T.js.map → posthog-BHbtnNQE.js.map} +1 -1
- package/dist/{posthog-integration-6vdi4wRB.js → posthog-integration-CMNtIV97.js} +39 -20
- package/dist/posthog-integration-CMNtIV97.js.map +1 -0
- package/dist/{provisioning-DK0tS98H.js → provisioning-BInfIJy5.js} +4 -4
- package/dist/{provisioning-DK0tS98H.js.map → provisioning-BInfIJy5.js.map} +1 -1
- package/dist/{registry-DfXVjxsP.js → registry-BsPnELr-.js} +11 -8
- package/dist/{registry-DfXVjxsP.js.map → registry-BsPnELr-.js.map} +1 -1
- package/dist/security-CSlaLY6P.js +204 -0
- package/dist/security-CSlaLY6P.js.map +1 -0
- package/dist/{setup-utils-v9I6PQyP.js → setup-utils-DfRLklZ3.js} +9 -9
- package/dist/{setup-utils-v9I6PQyP.js.map → setup-utils-DfRLklZ3.js.map} +1 -1
- package/dist/{start-tui-CylEL6i_.js → start-tui-H_BSAFdp.js} +143 -81
- package/dist/start-tui-H_BSAFdp.js.map +1 -0
- package/dist/{steps-DQdpexNM.js → steps-z89LzfJG.js} +7 -7
- package/dist/{steps-DQdpexNM.js.map → steps-z89LzfJG.js.map} +1 -1
- package/dist/{store-Db0X2V5D.js → store-B3B76DgD.js} +7 -5
- package/dist/{store-Db0X2V5D.js.map → store-B3B76DgD.js.map} +1 -1
- package/dist/{subagent-Pk9jRXRf.js → subagent-CV59ljO1.js} +2 -2
- package/dist/{subagent-Pk9jRXRf.js.map → subagent-CV59ljO1.js.map} +1 -1
- package/dist/{task-stream-rC4IEUHC.js → task-stream-d-R9J0g4.js} +2 -2
- package/dist/{task-stream-rC4IEUHC.js.map → task-stream-d-R9J0g4.js.map} +1 -1
- package/dist/{tasks-B46phMJu.js → tasks-DkX454Mg.js} +2 -2
- package/dist/{tasks-B46phMJu.js.map → tasks-DkX454Mg.js.map} +1 -1
- package/dist/{telemetry-BJAHymMq.js → telemetry-BCIe6Kli.js} +3 -3
- package/dist/{telemetry-BJAHymMq.js.map → telemetry-BCIe6Kli.js.map} +1 -1
- package/dist/{terminal-BTQSAkC-.js → terminal-CPXW44sU.js} +13 -12
- package/dist/{terminal-BTQSAkC-.js.map → terminal-CPXW44sU.js.map} +1 -1
- package/dist/{tools-C_m5knXt.js → tools-C4BqVrt6.js} +4 -4
- package/dist/{tools-C_m5knXt.js.map → tools-C4BqVrt6.js.map} +1 -1
- package/dist/types-evL_rPob.js +46 -0
- package/dist/types-evL_rPob.js.map +1 -0
- package/dist/{urls-BCmeQMIb.js → urls-D1AehCBN.js} +2 -2
- package/dist/{urls-BCmeQMIb.js.map → urls-D1AehCBN.js.map} +1 -1
- package/dist/warlock-smoke-test.ts +165 -0
- package/dist/{wizard-abort-DkngXmxN.js → wizard-abort-5fOIcY8w.js} +3 -3
- package/dist/{wizard-abort-DkngXmxN.js.map → wizard-abort-5fOIcY8w.js.map} +1 -1
- package/dist/{wizard-abort-CMzW4LVM.js → wizard-abort-Ce2RceZ1.js} +1 -1
- package/dist/{wizard-tools-C8nVWLeI.js → wizard-tools-xvIrJeNN.js} +44 -102
- package/dist/wizard-tools-xvIrJeNN.js.map +1 -0
- package/dist/yara-hooks-7MEXlgqm.js +2 -0
- package/dist/yara-hooks-DNn1Jqih.js +635 -0
- package/dist/yara-hooks-DNn1Jqih.js.map +1 -0
- package/package.json +5 -3
- package/dist/agent-interface-kOuzXg84.js.map +0 -1
- package/dist/agent-runner-DZhaiwD5.js.map +0 -1
- package/dist/analytics-B1SC2jaf.js +0 -2
- package/dist/analytics-Z_2kCTpB.js.map +0 -1
- package/dist/debug-CaRHQrDY.js.map +0 -1
- package/dist/posthog-integration-6vdi4wRB.js.map +0 -1
- package/dist/security-BMVH_bjk.js +0 -431
- package/dist/security-BMVH_bjk.js.map +0 -1
- package/dist/start-tui-CylEL6i_.js.map +0 -1
- package/dist/wizard-tools-C8nVWLeI.js.map +0 -1
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as analytics } from "./analytics-
|
|
3
|
-
import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-
|
|
4
|
-
import { o as getUiHostFromHost } from "./urls-
|
|
5
|
-
import { t as ApiError } from "./api-
|
|
1
|
+
import { B as POSTHOG_DOCS_URL, F as OAUTH_PORTS, H as POSTHOG_ORG_AI_SETTINGS_URL, I as OAUTH_TIMEOUT_MS, P as Integration, U as POSTHOG_PRIVACY_URL, Y as REMOTE_SKILLS_BASE_URL, d as relativeToInstallDir, g as SIGNUP_WIZARD_READINESS_CONFIG, l as WIZARD_LOG_FILE, ot as WIZARD_TOOLS_MENU_FLAG_KEY, p as setUI, q as POSTHOG_TERMS_URL, s as logToFile, v as getBlockingServiceKeys } from "./debug-BZnZ7Gvh.js";
|
|
2
|
+
import { n as analytics } from "./analytics-C7Oc3yWZ.js";
|
|
3
|
+
import { o as extractOAuthCode, t as getOrAskForProjectData } from "./setup-utils-DfRLklZ3.js";
|
|
4
|
+
import { o as getUiHostFromHost } from "./urls-D1AehCBN.js";
|
|
5
|
+
import { t as ApiError } from "./api-DSG-l8Ql.js";
|
|
6
6
|
import { t as ADDITIONAL_FEATURE_LABELS } from "./wizard-session-BoXAZEOf.js";
|
|
7
|
-
import { i as wizardAbort } from "./wizard-abort-
|
|
8
|
-
import { a as formatTokenCount, i as formatCostUsd } from "./agent-runner-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
7
|
+
import { i as wizardAbort } from "./wizard-abort-5fOIcY8w.js";
|
|
8
|
+
import { a as formatTokenCount, i as formatCostUsd } from "./agent-runner-B1fzwFzc.js";
|
|
9
|
+
import { i as fetchSkillMenu, r as downloadSkill } from "./wizard-tools-xvIrJeNN.js";
|
|
10
|
+
import { a as coerceAuditChecks, i as AUDIT_SEVERITY_STYLE, n as AUDIT_CHECKS_KEY, o as getAuditChecks, t as AUDIT_CHECKS_FILE } from "./types-evL_rPob.js";
|
|
11
|
+
import { m as EVENT_PLAN_FILE } from "./yara-hooks-DNn1Jqih.js";
|
|
12
|
+
import { t as FRAMEWORK_REGISTRY } from "./registry-BsPnELr-.js";
|
|
13
|
+
import { g as detectProjectsWithAgent, m as Icons, p as Colors, t as SETUP_REPORT_FILE } from "./posthog-integration-CMNtIV97.js";
|
|
13
14
|
import { C as STRIPE_SDKS, S as POSTHOG_SDKS, _ as SOURCE_MAPS_CONTEXT_KEYS, b as getDetectedWarehouseSources, d as Program, f as getProgramConfig, g as DISPLAY_NAME, h as AUTOMATABLE_VARIANTS, m as SELF_DRIVING_INTEGRATE_PATH_KEY, n as useKeyBindings, p as detectSelfDrivingIntegrationProjects, t as PickerMenu, x as getContentBlocks, y as fetchHealthIssues } from "./bin.js";
|
|
14
|
-
import { r as totalTokenCount, t as WizardStore } from "./store-
|
|
15
|
-
import { A as ConfirmationInput, C as TabContainer, D as LinkText, E as LogViewer, F as SplitView, M as useStdoutDimensions, N as ProgressList, O as extractUrls, P as LoadingBox, S as HNViewer, T as EventPlanViewer, _ as SEVERITY_ORDER, a as useSkillEntry, b as LearnCard, c as SlackConnectScreen, d as AuditChecksViewer, f as McpSuggestedPromptsScreen, g as SEVERITY_LABEL, h as IssueTable, i as SkillSourceInfo, k as ModalOverlay, l as AUDIT_AREA_SLIDES, m as McpScreen, n as releaseTerminal, o as OutroScreen, r as AiOptInRequiredScreen, s as useDismissOnAnyKey, t as enterDarkTerminal, u as VisualBox, v as ServiceHealthList, w as ScreenContainer, y as TipsCard } from "./terminal-
|
|
16
|
-
import { t as ALL_FEATURE_VALUES } from "./defaults-
|
|
17
|
-
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-
|
|
15
|
+
import { r as totalTokenCount, t as WizardStore } from "./store-B3B76DgD.js";
|
|
16
|
+
import { A as ConfirmationInput, C as TabContainer, D as LinkText, E as LogViewer, F as SplitView, M as useStdoutDimensions, N as ProgressList, O as extractUrls, P as LoadingBox, S as HNViewer, T as EventPlanViewer, _ as SEVERITY_ORDER, a as useSkillEntry, b as LearnCard, c as SlackConnectScreen, d as AuditChecksViewer, f as McpSuggestedPromptsScreen, g as SEVERITY_LABEL, h as IssueTable, i as SkillSourceInfo, k as ModalOverlay, l as AUDIT_AREA_SLIDES, m as McpScreen, n as releaseTerminal, o as OutroScreen, r as AiOptInRequiredScreen, s as useDismissOnAnyKey, t as enterDarkTerminal, u as VisualBox, v as ServiceHealthList, w as ScreenContainer, y as TipsCard } from "./terminal-CPXW44sU.js";
|
|
17
|
+
import { t as ALL_FEATURE_VALUES } from "./defaults-BxiMLkQY.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-Ci0I1vbS.js";
|
|
18
19
|
import * as fs$1 from "fs";
|
|
19
20
|
import path from "path";
|
|
20
21
|
import { join as join$1 } from "node:path";
|
|
@@ -269,7 +270,7 @@ const HealthCheckScreen = ({ store }) => {
|
|
|
269
270
|
if (menu) {
|
|
270
271
|
const prefix = `integration-${integration}`;
|
|
271
272
|
const skills = (menu.categories["integration"] ?? []).filter((s) => s.id.startsWith(prefix));
|
|
272
|
-
for (const skill of skills) downloadSkill(skill, store.session.installDir, ".posthog/skills");
|
|
273
|
+
for (const skill of skills) await downloadSkill(skill, store.session.installDir, ".posthog/skills");
|
|
273
274
|
}
|
|
274
275
|
setDownloaded(true);
|
|
275
276
|
};
|
|
@@ -1079,7 +1080,7 @@ const FrameworkPicker = ({ store, onComplete }) => {
|
|
|
1079
1080
|
})),
|
|
1080
1081
|
onSelect: (value) => {
|
|
1081
1082
|
const integration = Array.isArray(value) ? value[0] : value;
|
|
1082
|
-
import("./registry-
|
|
1083
|
+
import("./registry-BsPnELr-.js").then((n) => n.n).then(({ FRAMEWORK_REGISTRY }) => {
|
|
1083
1084
|
const config = FRAMEWORK_REGISTRY[integration];
|
|
1084
1085
|
store.setFrameworkConfig(integration, config);
|
|
1085
1086
|
store.setDetectedFramework(config.metadata.name);
|
|
@@ -2087,7 +2088,7 @@ const SourceMapsDetectScreen = ({ store }) => {
|
|
|
2087
2088
|
]
|
|
2088
2089
|
})]
|
|
2089
2090
|
}),
|
|
2090
|
-
/* @__PURE__ */ jsx(BlockedSummary
|
|
2091
|
+
/* @__PURE__ */ jsx(BlockedSummary, { blocked }),
|
|
2091
2092
|
/* @__PURE__ */ jsx(Box, {
|
|
2092
2093
|
marginTop: 1,
|
|
2093
2094
|
children: /* @__PURE__ */ jsx(PickerMenu, {
|
|
@@ -2142,7 +2143,7 @@ const SourceMapsDetectScreen = ({ store }) => {
|
|
|
2142
2143
|
}),
|
|
2143
2144
|
/* @__PURE__ */ jsx(Box, {
|
|
2144
2145
|
marginTop: 1,
|
|
2145
|
-
children: /* @__PURE__ */ jsx(BlockedSummary
|
|
2146
|
+
children: /* @__PURE__ */ jsx(BlockedSummary, { blocked })
|
|
2146
2147
|
})
|
|
2147
2148
|
]
|
|
2148
2149
|
});
|
|
@@ -2151,7 +2152,7 @@ const SourceMapsDetectScreen = ({ store }) => {
|
|
|
2151
2152
|
* Collapses the non-instrumentable projects into a short count line (or two)
|
|
2152
2153
|
* instead of listing every one — a monorepo can have dozens.
|
|
2153
2154
|
*/
|
|
2154
|
-
const BlockedSummary
|
|
2155
|
+
const BlockedSummary = ({ blocked }) => {
|
|
2155
2156
|
const unsupported = blocked.filter((p) => p.variant == null).length;
|
|
2156
2157
|
const missingSdk = blocked.length - unsupported;
|
|
2157
2158
|
if (blocked.length === 0) return null;
|
|
@@ -2479,10 +2480,11 @@ const SelfDrivingIntroScreen = ({ store }) => {
|
|
|
2479
2480
|
marginTop: 1,
|
|
2480
2481
|
paddingLeft: 4,
|
|
2481
2482
|
children: [
|
|
2482
|
-
/* @__PURE__ */ jsxs(Text, { children: ["•", " Watches errors, replays,
|
|
2483
|
-
/* @__PURE__ */ jsxs(Text, { children: ["•", " Runs scouts
|
|
2483
|
+
/* @__PURE__ */ jsxs(Text, { children: ["•", " Watches your signal sources: errors, replays, connected tools"] }),
|
|
2484
|
+
/* @__PURE__ */ jsxs(Text, { children: ["•", " Runs scouts – scheduled agents that scan for issues"] }),
|
|
2485
|
+
/* @__PURE__ */ jsxs(Text, { children: ["•", " Groups signals into prioritized reports in your inbox"] }),
|
|
2484
2486
|
/* @__PURE__ */ jsxs(Text, { children: ["•", " Researches findings in your code via GitHub"] }),
|
|
2485
|
-
/* @__PURE__ */ jsxs(Text, { children: ["•", "
|
|
2487
|
+
/* @__PURE__ */ jsxs(Text, { children: ["•", " Measures shipped fixes, and reopens the loop if the pattern persists"] })
|
|
2486
2488
|
]
|
|
2487
2489
|
})
|
|
2488
2490
|
]
|
|
@@ -2494,7 +2496,7 @@ const SelfDrivingIntroScreen = ({ store }) => {
|
|
|
2494
2496
|
/* @__PURE__ */ jsx(Box, {
|
|
2495
2497
|
flexDirection: "column",
|
|
2496
2498
|
marginTop: 1,
|
|
2497
|
-
children: /* @__PURE__ */ jsx(Text, { children: "PostHog
|
|
2499
|
+
children: /* @__PURE__ */ jsx(Text, { children: "PostHog watches how people really use your product, finds issues, and proposes fixes." })
|
|
2498
2500
|
}),
|
|
2499
2501
|
/* @__PURE__ */ jsxs(Box, {
|
|
2500
2502
|
flexDirection: "column",
|
|
@@ -2502,10 +2504,10 @@ const SelfDrivingIntroScreen = ({ store }) => {
|
|
|
2502
2504
|
alignItems: "center",
|
|
2503
2505
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
2504
2506
|
dimColor: true,
|
|
2505
|
-
children: "
|
|
2507
|
+
children: "An agent will connect GitHub, enable signal sources, and tune your scouts."
|
|
2506
2508
|
}), /* @__PURE__ */ jsx(Text, {
|
|
2507
2509
|
dimColor: true,
|
|
2508
|
-
children: "
|
|
2510
|
+
children: "About 10 minutes, with a few questions along the way."
|
|
2509
2511
|
})]
|
|
2510
2512
|
})
|
|
2511
2513
|
]
|
|
@@ -2609,7 +2611,7 @@ const SelfDrivingIntegrationCheckScreen = ({ store }) => {
|
|
|
2609
2611
|
flexDirection: "column",
|
|
2610
2612
|
children: /* @__PURE__ */ jsx(Text, {
|
|
2611
2613
|
dimColor: true,
|
|
2612
|
-
children: "
|
|
2614
|
+
children: "This will kick off an agent to explore your project and find existing PostHog integrations. Self-driving reads PostHog data, so we'll set that up first: it gives your signal sources something to watch."
|
|
2613
2615
|
})
|
|
2614
2616
|
}),
|
|
2615
2617
|
/* @__PURE__ */ jsx(Box, {
|
|
@@ -2629,12 +2631,11 @@ const SelfDrivingIntegrationCheckScreen = ({ store }) => {
|
|
|
2629
2631
|
//#region src/ui/tui/screens/SelfDrivingIntegrationDetectScreen.tsx
|
|
2630
2632
|
/**
|
|
2631
2633
|
* SelfDrivingIntegrationDetectScreen — runs the Haiku detector over the repo,
|
|
2632
|
-
* streams progress, then renders a picker of
|
|
2633
|
-
*
|
|
2634
|
-
*
|
|
2635
|
-
*
|
|
2636
|
-
*
|
|
2637
|
-
* picker so the run can still proceed.
|
|
2634
|
+
* streams progress, then renders a picker of projects. Two kinds are offered:
|
|
2635
|
+
* set-up-here (supported framework, no SDK yet; writes framework + path for
|
|
2636
|
+
* the integrate-run phase) and continue-with-existing (already has PostHog;
|
|
2637
|
+
* sets integrate=false and skips straight to Self-driving). On a detection
|
|
2638
|
+
* error, falls back to a manual framework picker.
|
|
2638
2639
|
*
|
|
2639
2640
|
* Runs after auth — the detector needs credentials.
|
|
2640
2641
|
*/
|
|
@@ -2656,6 +2657,13 @@ const SelfDrivingIntegrationDetectScreen = ({ store }) => {
|
|
|
2656
2657
|
store.setFrameworkContext(SELF_DRIVING_INTEGRATE_PATH_KEY, p.path);
|
|
2657
2658
|
store.setFrameworkConfig(p.integration, FRAMEWORK_REGISTRY[p.integration]);
|
|
2658
2659
|
};
|
|
2660
|
+
const continueWithExisting = (p) => {
|
|
2661
|
+
store.setFrameworkContext(SELF_DRIVING_INTEGRATE_PATH_KEY, p.path);
|
|
2662
|
+
store.setIntegrate(false, {
|
|
2663
|
+
via: "existing-integration-detected",
|
|
2664
|
+
path: p.path
|
|
2665
|
+
});
|
|
2666
|
+
};
|
|
2659
2667
|
useEffect(() => {
|
|
2660
2668
|
if (!accessToken || started.current) return;
|
|
2661
2669
|
started.current = true;
|
|
@@ -2748,8 +2756,25 @@ const SelfDrivingIntegrationDetectScreen = ({ store }) => {
|
|
|
2748
2756
|
});
|
|
2749
2757
|
const { report } = state;
|
|
2750
2758
|
const instrumentable = report.projects.filter((p) => p.instrumentable);
|
|
2751
|
-
const
|
|
2752
|
-
|
|
2759
|
+
const existing = report.projects.filter((p) => p.continuable);
|
|
2760
|
+
const unsupported = report.projects.filter((p) => !p.instrumentable && !p.continuable);
|
|
2761
|
+
const NEW = "new:";
|
|
2762
|
+
const EXISTING = "existing:";
|
|
2763
|
+
const dispatch = (value) => {
|
|
2764
|
+
const v = Array.isArray(value) ? value[0] : value;
|
|
2765
|
+
if (v === CANCEL) {
|
|
2766
|
+
process.exit(0);
|
|
2767
|
+
return;
|
|
2768
|
+
}
|
|
2769
|
+
if (v.startsWith(EXISTING)) {
|
|
2770
|
+
const p = existing.find((x) => x.path === v.slice(9));
|
|
2771
|
+
if (p) continueWithExisting(p);
|
|
2772
|
+
return;
|
|
2773
|
+
}
|
|
2774
|
+
const p = instrumentable.find((x) => x.path === v.slice(4));
|
|
2775
|
+
if (p) choose(p);
|
|
2776
|
+
};
|
|
2777
|
+
if (instrumentable.length === 0 && existing.length === 0) return /* @__PURE__ */ jsxs(Box, {
|
|
2753
2778
|
flexDirection: "column",
|
|
2754
2779
|
children: [
|
|
2755
2780
|
/* @__PURE__ */ jsxs(Box, {
|
|
@@ -2768,7 +2793,7 @@ const SelfDrivingIntegrationDetectScreen = ({ store }) => {
|
|
|
2768
2793
|
]
|
|
2769
2794
|
})]
|
|
2770
2795
|
}),
|
|
2771
|
-
/* @__PURE__ */ jsx(
|
|
2796
|
+
/* @__PURE__ */ jsx(UnsupportedSummary, { unsupported }),
|
|
2772
2797
|
/* @__PURE__ */ jsx(Box, {
|
|
2773
2798
|
marginTop: 1,
|
|
2774
2799
|
children: /* @__PURE__ */ jsx(PickerMenu, {
|
|
@@ -2781,14 +2806,73 @@ const SelfDrivingIntegrationDetectScreen = ({ store }) => {
|
|
|
2781
2806
|
})
|
|
2782
2807
|
]
|
|
2783
2808
|
});
|
|
2809
|
+
if (instrumentable.length === 0) return /* @__PURE__ */ jsxs(Box, {
|
|
2810
|
+
flexDirection: "column",
|
|
2811
|
+
children: [
|
|
2812
|
+
/* @__PURE__ */ jsxs(Box, {
|
|
2813
|
+
flexDirection: "column",
|
|
2814
|
+
marginBottom: 1,
|
|
2815
|
+
children: [/* @__PURE__ */ jsxs(Text, {
|
|
2816
|
+
bold: true,
|
|
2817
|
+
color: Colors.accent,
|
|
2818
|
+
children: [Icons.check, " PostHog is already set up"]
|
|
2819
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
2820
|
+
dimColor: true,
|
|
2821
|
+
children: "Continue straight to Self-driving."
|
|
2822
|
+
})]
|
|
2823
|
+
}),
|
|
2824
|
+
/* @__PURE__ */ jsx(PickerMenu, {
|
|
2825
|
+
message: existing.length === 1 ? "Continue with your existing PostHog install?" : "Which project should Self-driving use?",
|
|
2826
|
+
options: [...existing.map((p) => ({
|
|
2827
|
+
label: projectLabel(p),
|
|
2828
|
+
value: `${EXISTING}${p.path}`
|
|
2829
|
+
})), {
|
|
2830
|
+
label: "Exit",
|
|
2831
|
+
value: CANCEL
|
|
2832
|
+
}],
|
|
2833
|
+
onSelect: dispatch
|
|
2834
|
+
}),
|
|
2835
|
+
/* @__PURE__ */ jsx(Box, {
|
|
2836
|
+
marginTop: 1,
|
|
2837
|
+
children: /* @__PURE__ */ jsx(UnsupportedSummary, { unsupported })
|
|
2838
|
+
})
|
|
2839
|
+
]
|
|
2840
|
+
});
|
|
2784
2841
|
const single = instrumentable.length === 1;
|
|
2785
|
-
const
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2842
|
+
const HEAD = "head:";
|
|
2843
|
+
const spacer = (id) => ({
|
|
2844
|
+
label: " ",
|
|
2845
|
+
value: `${HEAD}${id}`,
|
|
2846
|
+
disabled: true
|
|
2847
|
+
});
|
|
2848
|
+
const heading = (id, label) => ({
|
|
2849
|
+
label,
|
|
2850
|
+
value: `${HEAD}${id}`,
|
|
2851
|
+
disabled: true,
|
|
2852
|
+
header: true
|
|
2853
|
+
});
|
|
2854
|
+
const options = [
|
|
2855
|
+
heading("new", "New PostHog integration:"),
|
|
2856
|
+
...instrumentable.map((p) => ({
|
|
2857
|
+
label: projectLabel(p),
|
|
2858
|
+
value: `${NEW}${p.path}`,
|
|
2859
|
+
indent: true
|
|
2860
|
+
})),
|
|
2861
|
+
...existing.length > 0 ? [
|
|
2862
|
+
spacer("gap1"),
|
|
2863
|
+
heading("existing", "Existing integrations:"),
|
|
2864
|
+
...existing.map((p) => ({
|
|
2865
|
+
label: projectLabel(p),
|
|
2866
|
+
value: `${EXISTING}${p.path}`,
|
|
2867
|
+
indent: true
|
|
2868
|
+
}))
|
|
2869
|
+
] : [],
|
|
2870
|
+
spacer("gap2"),
|
|
2871
|
+
{
|
|
2872
|
+
label: "Cancel",
|
|
2873
|
+
value: CANCEL
|
|
2874
|
+
}
|
|
2875
|
+
];
|
|
2792
2876
|
return /* @__PURE__ */ jsxs(Box, {
|
|
2793
2877
|
flexDirection: "column",
|
|
2794
2878
|
children: [
|
|
@@ -2807,57 +2891,35 @@ const SelfDrivingIntegrationDetectScreen = ({ store }) => {
|
|
|
2807
2891
|
})
|
|
2808
2892
|
}),
|
|
2809
2893
|
/* @__PURE__ */ jsx(PickerMenu, {
|
|
2810
|
-
message: single ? "Set up PostHog here? Confirm to continue." :
|
|
2894
|
+
message: single && existing.length === 0 ? "Set up PostHog here? Confirm to continue." : void 0,
|
|
2811
2895
|
options,
|
|
2812
|
-
onSelect:
|
|
2813
|
-
const path = Array.isArray(value) ? value[0] : value;
|
|
2814
|
-
if (path === CANCEL) {
|
|
2815
|
-
process.exit(0);
|
|
2816
|
-
return;
|
|
2817
|
-
}
|
|
2818
|
-
const chosen = instrumentable.find((p) => p.path === path);
|
|
2819
|
-
if (chosen) choose(chosen);
|
|
2820
|
-
}
|
|
2896
|
+
onSelect: dispatch
|
|
2821
2897
|
}),
|
|
2822
2898
|
/* @__PURE__ */ jsx(Box, {
|
|
2823
2899
|
marginTop: 1,
|
|
2824
|
-
children: /* @__PURE__ */ jsx(
|
|
2900
|
+
children: /* @__PURE__ */ jsx(UnsupportedSummary, { unsupported })
|
|
2825
2901
|
})
|
|
2826
2902
|
]
|
|
2827
2903
|
});
|
|
2828
2904
|
};
|
|
2829
2905
|
/**
|
|
2830
|
-
* Collapses
|
|
2831
|
-
*
|
|
2906
|
+
* Collapses unsupported-stack projects into a count line (already-has-PostHog
|
|
2907
|
+
* projects are real picker options, not summarised).
|
|
2832
2908
|
*/
|
|
2833
|
-
const
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
if (blocked.length === 0) return null;
|
|
2837
|
-
return /* @__PURE__ */ jsxs(Box, {
|
|
2909
|
+
const UnsupportedSummary = ({ unsupported }) => {
|
|
2910
|
+
if (unsupported.length === 0) return null;
|
|
2911
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
2838
2912
|
flexDirection: "column",
|
|
2839
|
-
children:
|
|
2913
|
+
children: /* @__PURE__ */ jsxs(Text, {
|
|
2840
2914
|
dimColor: true,
|
|
2841
2915
|
children: [
|
|
2842
2916
|
"(… ",
|
|
2843
|
-
|
|
2917
|
+
unsupported.length,
|
|
2844
2918
|
" project",
|
|
2845
|
-
|
|
2846
|
-
" ",
|
|
2847
|
-
"already ",
|
|
2848
|
-
alreadyIntegrated === 1 ? "has" : "have",
|
|
2849
|
-
" PostHog)"
|
|
2850
|
-
]
|
|
2851
|
-
}), unsupported > 0 && /* @__PURE__ */ jsxs(Text, {
|
|
2852
|
-
dimColor: true,
|
|
2853
|
-
children: [
|
|
2854
|
-
"(… ",
|
|
2855
|
-
unsupported,
|
|
2856
|
-
" project",
|
|
2857
|
-
unsupported === 1 ? "" : "s",
|
|
2919
|
+
unsupported.length === 1 ? "" : "s",
|
|
2858
2920
|
" not supported yet)"
|
|
2859
2921
|
]
|
|
2860
|
-
})
|
|
2922
|
+
})
|
|
2861
2923
|
});
|
|
2862
2924
|
};
|
|
2863
2925
|
//#endregion
|
|
@@ -2891,14 +2953,14 @@ const SelfDrivingHandoffScreen = ({ store }) => {
|
|
|
2891
2953
|
marginTop: 1,
|
|
2892
2954
|
children: /* @__PURE__ */ jsx(Text, {
|
|
2893
2955
|
dimColor: true,
|
|
2894
|
-
children: "
|
|
2956
|
+
children: "Next, the agent connects GitHub, turns on signal sources, and tunes the scouts that watch your product data."
|
|
2895
2957
|
})
|
|
2896
2958
|
}),
|
|
2897
2959
|
/* @__PURE__ */ jsx(Box, {
|
|
2898
2960
|
marginTop: 1,
|
|
2899
2961
|
children: /* @__PURE__ */ jsx(Text, {
|
|
2900
2962
|
dimColor: true,
|
|
2901
|
-
children: "
|
|
2963
|
+
children: "About 10 more minutes, and it needs your input a few times. Keep this terminal open."
|
|
2902
2964
|
})
|
|
2903
2965
|
})
|
|
2904
2966
|
]
|
|
@@ -4953,7 +5015,7 @@ function createMcpSuggestedPromptsServices(store) {
|
|
|
4953
5015
|
};
|
|
4954
5016
|
}
|
|
4955
5017
|
async function* runProductionPromptStreaming(args) {
|
|
4956
|
-
const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-
|
|
5018
|
+
const { runMcpPromptViaSdk } = await import("./mcp-prompt-streaming-l1zsmQQc.js");
|
|
4957
5019
|
yield* runMcpPromptViaSdk(args);
|
|
4958
5020
|
}
|
|
4959
5021
|
//#endregion
|
|
@@ -5125,4 +5187,4 @@ function startTUI(version, program = Program.PostHogIntegration) {
|
|
|
5125
5187
|
//#endregion
|
|
5126
5188
|
export { startTUI };
|
|
5127
5189
|
|
|
5128
|
-
//# sourceMappingURL=start-tui-
|
|
5190
|
+
//# sourceMappingURL=start-tui-H_BSAFdp.js.map
|