@posthog/wizard 2.28.0 → 2.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-mcp-server-to-clients-BzCc6be4.js → add-mcp-server-to-clients-B6Pj4IKt.js} +4 -4
- package/dist/{add-mcp-server-to-clients-BzCc6be4.js.map → add-mcp-server-to-clients-B6Pj4IKt.js.map} +1 -1
- package/dist/{agent-interface-DRsyO_6R.js → agent-interface-CVW8H9eF.js} +8 -7
- package/dist/{agent-interface-DRsyO_6R.js.map → agent-interface-CVW8H9eF.js.map} +1 -1
- package/dist/{agent-runner-MPlvLP8K.js → agent-runner-VzTpPaVT.js} +18 -9
- package/dist/agent-runner-VzTpPaVT.js.map +1 -0
- package/dist/{analytics-Ds4CvvcU.js → analytics-DvDjbNmK.js} +2 -2
- package/dist/{analytics-Ds4CvvcU.js.map → analytics-DvDjbNmK.js.map} +1 -1
- package/dist/{api-Dye-Pi5r.js → api-DfpSG5xU.js} +3 -3
- package/dist/{api-Dye-Pi5r.js.map → api-DfpSG5xU.js.map} +1 -1
- package/dist/bin.js +410 -234
- package/dist/bin.js.map +1 -1
- package/dist/{ci-install-6P61txQ4.js → ci-install-Bzfo3nON.js} +4 -4
- package/dist/{ci-install-6P61txQ4.js.map → ci-install-Bzfo3nON.js.map} +1 -1
- package/dist/{debug-BDwqX9QZ.js → debug-CMZ7kqW1.js} +17 -3
- package/dist/debug-CMZ7kqW1.js.map +1 -0
- package/dist/{debug-D2iIa763.js → debug-HQ0NrBA2.js} +1 -1
- package/dist/{environment-BaqpBPme.js → environment-cVP7bGnh.js} +3 -3
- package/dist/{environment-BaqpBPme.js.map → environment-cVP7bGnh.js.map} +1 -1
- package/dist/{file-utils-YnB1jGgs.js → file-utils-D1632P4x.js} +2 -2
- package/dist/{file-utils-YnB1jGgs.js.map → file-utils-D1632P4x.js.map} +1 -1
- package/dist/{interactive-DU3K6B8R.js → interactive-DCIL3NcQ.js} +2 -2
- package/dist/{interactive-DU3K6B8R.js.map → interactive-DCIL3NcQ.js.map} +1 -1
- package/dist/{mcp-prompt-streaming-BQeDKkGA.js → mcp-prompt-streaming-BRoVSf3N.js} +5 -5
- package/dist/mcp-prompt-streaming-BRoVSf3N.js.map +1 -0
- package/dist/{non-interactive-BJctvoie.js → non-interactive-u4VG76Vi.js} +2 -2
- package/dist/{non-interactive-BJctvoie.js.map → non-interactive-u4VG76Vi.js.map} +1 -1
- package/dist/{package-manager-BErboBJc.js → package-manager-0M_uIOP0.js} +2 -2
- package/dist/{package-manager-BErboBJc.js.map → package-manager-0M_uIOP0.js.map} +1 -1
- package/dist/{playground-X-wOeuhv.js → playground-B6wgUvH-.js} +5 -5
- package/dist/{playground-X-wOeuhv.js.map → playground-B6wgUvH-.js.map} +1 -1
- package/dist/{posthog-integration-Bh31wBAT.js → posthog-integration-C_9G_kTS.js} +201 -12
- package/dist/posthog-integration-C_9G_kTS.js.map +1 -0
- package/dist/{provisioning-DpdPWuzQ.js → provisioning-CgCxuoe6.js} +3 -3
- package/dist/{provisioning-DpdPWuzQ.js.map → provisioning-CgCxuoe6.js.map} +1 -1
- package/dist/{registry-CSy1ilMT.js → registry-BgsYtCkS.js} +4 -4
- package/dist/{registry-CSy1ilMT.js.map → registry-BgsYtCkS.js.map} +1 -1
- package/dist/{setup-utils-STqW1cwa.js → setup-utils-DF6EKEeA.js} +9 -9
- package/dist/{setup-utils-STqW1cwa.js.map → setup-utils-DF6EKEeA.js.map} +1 -1
- package/dist/{start-tui-BQJQ9_KJ.js → start-tui-Deaj99It.js} +306 -223
- package/dist/start-tui-Deaj99It.js.map +1 -0
- package/dist/{steps-BxSRheOs.js → steps-AF3ulYYe.js} +7 -7
- package/dist/{steps-BxSRheOs.js.map → steps-AF3ulYYe.js.map} +1 -1
- package/dist/{telemetry-De90OWXL.js → telemetry-DPVvKu5X.js} +3 -3
- package/dist/{telemetry-De90OWXL.js.map → telemetry-DPVvKu5X.js.map} +1 -1
- package/dist/{terminal-D430k0Z1.js → terminal-BVKeWPb3.js} +13 -10
- package/dist/terminal-BVKeWPb3.js.map +1 -0
- package/dist/{urls-DDUXt-oY.js → urls-Bur7Zb7A.js} +2 -2
- package/dist/{urls-DDUXt-oY.js.map → urls-Bur7Zb7A.js.map} +1 -1
- package/dist/{wizard-abort-B_Ri4Ant.js → wizard-abort-D0UMhCP5.js} +3 -3
- package/dist/{wizard-abort-B_Ri4Ant.js.map → wizard-abort-D0UMhCP5.js.map} +1 -1
- package/dist/{wizard-abort-Cht_9Mo0.js → wizard-abort-D3vY7K9a.js} +1 -1
- package/dist/wizard-ui-WZ48rUgr.js.map +1 -1
- package/package.json +1 -1
- package/dist/agent-runner-MPlvLP8K.js.map +0 -1
- package/dist/debug-BDwqX9QZ.js.map +0 -1
- package/dist/mcp-prompt-streaming-BQeDKkGA.js.map +0 -1
- package/dist/posthog-integration-Bh31wBAT.js.map +0 -1
- package/dist/start-tui-BQJQ9_KJ.js.map +0 -1
- package/dist/terminal-D430k0Z1.js.map +0 -1
package/dist/bin.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { t as analytics } from "./analytics-
|
|
4
|
-
import { r as setEntryCommand } from "./telemetry-
|
|
5
|
-
import { n as isUsingTypeScript } from "./setup-utils-
|
|
6
|
-
import { a as getUiHostFromHost, n as getCloudUrlFromRegion } from "./urls-
|
|
7
|
-
import { o as handleApiError } from "./api-
|
|
2
|
+
import { I as POSTHOG_DOCS_URL, Q as WIZARD_USER_AGENT, a as getLogFilePath, h as LoggingUI, m as setUI, nt as VERSION, p as getUI, r as debug, s as logToFile, tt as getSkillsBaseUrl } from "./debug-CMZ7kqW1.js";
|
|
3
|
+
import { t as analytics } from "./analytics-DvDjbNmK.js";
|
|
4
|
+
import { r as setEntryCommand } from "./telemetry-DPVvKu5X.js";
|
|
5
|
+
import { n as isUsingTypeScript } from "./setup-utils-DF6EKEeA.js";
|
|
6
|
+
import { a as getUiHostFromHost, n as getCloudUrlFromRegion } from "./urls-Bur7Zb7A.js";
|
|
7
|
+
import { o as handleApiError } from "./api-DfpSG5xU.js";
|
|
8
8
|
import "./wizard-session-G3VWD6hv.js";
|
|
9
|
-
import { r as runCleanups } from "./wizard-abort-
|
|
10
|
-
import { n as isNonInteractiveEnvironment } from "./environment-
|
|
11
|
-
import { S as AUDIT_REPORT_FILE, b as AUDIT_CHECKS_FILE, c as recoverOrphanedSettingsBackups, h as fetchSkillMenu, p as WIZARD_TOOL_NAMES, u as AgentSignals, x as AUDIT_CHECKS_KEY } from "./agent-interface-
|
|
12
|
-
import { i as SPINNER_MESSAGE } from "./registry-
|
|
13
|
-
import { _ as
|
|
14
|
-
import { n as safeReadFile, r as walkProjectFiles, t as IGNORED_DIRS } from "./file-utils-
|
|
9
|
+
import { r as runCleanups } from "./wizard-abort-D0UMhCP5.js";
|
|
10
|
+
import { n as isNonInteractiveEnvironment } from "./environment-cVP7bGnh.js";
|
|
11
|
+
import { S as AUDIT_REPORT_FILE, b as AUDIT_CHECKS_FILE, c as recoverOrphanedSettingsBackups, h as fetchSkillMenu, p as WIZARD_TOOL_NAMES, u as AgentSignals, x as AUDIT_CHECKS_KEY } from "./agent-interface-CVW8H9eF.js";
|
|
12
|
+
import { i as SPINNER_MESSAGE } from "./registry-BgsYtCkS.js";
|
|
13
|
+
import { _ as parsePyprojectToml, a as PRODUCT_SUITE_BLOCK, f as Colors, g as parsePipfile, i as LINE_CHART_BLOCK, l as isClearBlock, m as HEALTH_CHECK_STEP, n as posthogIntegrationConfig, o as StatusPeekTrigger, p as Icons, r as FUNNEL_BLOCK, v as parseRequirementsTxt } from "./posthog-integration-C_9G_kTS.js";
|
|
14
|
+
import { n as safeReadFile, r as walkProjectFiles, t as IGNORED_DIRS } from "./file-utils-D1632P4x.js";
|
|
15
15
|
import { n as readApiKeyFromEnv } from "./env-api-key-MlzJYAvt.js";
|
|
16
16
|
import { satisfies } from "semver";
|
|
17
17
|
import yargs from "yargs";
|
|
@@ -190,7 +190,7 @@ function runProvision(argv) {
|
|
|
190
190
|
}
|
|
191
191
|
async function provision({ email, region, name, jsonMode }) {
|
|
192
192
|
try {
|
|
193
|
-
const { provisionNewAccount } = await import("./provisioning-
|
|
193
|
+
const { provisionNewAccount } = await import("./provisioning-CgCxuoe6.js").then((n) => n.n);
|
|
194
194
|
if (!jsonMode) getUI().log.info(`Provisioning account for ${email} in ${region}...`);
|
|
195
195
|
emitResult(await provisionNewAccount(email, name, region), jsonMode);
|
|
196
196
|
process.exit(0);
|
|
@@ -255,25 +255,25 @@ const basicIntegrationCommand = {
|
|
|
255
255
|
setEntryCommand("integrate");
|
|
256
256
|
(async () => {
|
|
257
257
|
if (argv.ci) {
|
|
258
|
-
const { runCIInstall } = await import("./ci-install-
|
|
258
|
+
const { runCIInstall } = await import("./ci-install-Bzfo3nON.js");
|
|
259
259
|
return runCIInstall(argv);
|
|
260
260
|
}
|
|
261
261
|
if (isNonInteractiveEnvironment()) {
|
|
262
|
-
const { failNonInteractive } = await import("./non-interactive-
|
|
262
|
+
const { failNonInteractive } = await import("./non-interactive-u4VG76Vi.js");
|
|
263
263
|
return failNonInteractive();
|
|
264
264
|
}
|
|
265
265
|
if (argv.playground) {
|
|
266
|
-
const { runPlayground } = await import("./playground-
|
|
266
|
+
const { runPlayground } = await import("./playground-B6wgUvH-.js");
|
|
267
267
|
return runPlayground();
|
|
268
268
|
}
|
|
269
|
-
const { runInteractive } = await import("./interactive-
|
|
269
|
+
const { runInteractive } = await import("./interactive-DCIL3NcQ.js");
|
|
270
270
|
runInteractive(argv);
|
|
271
271
|
})();
|
|
272
272
|
}
|
|
273
273
|
};
|
|
274
274
|
//#endregion
|
|
275
275
|
//#region src/lib/programs/shared/package-scanning.ts
|
|
276
|
-
const POSTHOG_SDKS
|
|
276
|
+
const POSTHOG_SDKS = [
|
|
277
277
|
"posthog-js",
|
|
278
278
|
"posthog-node",
|
|
279
279
|
"posthog-react-native",
|
|
@@ -306,7 +306,7 @@ function findPackageJsons(installDir, maxDepth = 3) {
|
|
|
306
306
|
if (entry.isFile() && entry.name === "package.json") try {
|
|
307
307
|
const pkg = JSON.parse(readFileSync(fullPath, "utf-8"));
|
|
308
308
|
const depNames = [...Object.keys(pkg.dependencies ?? {}), ...Object.keys(pkg.devDependencies ?? {})];
|
|
309
|
-
const posthogSdks = depNames.filter((d) => POSTHOG_SDKS
|
|
309
|
+
const posthogSdks = depNames.filter((d) => POSTHOG_SDKS.includes(d));
|
|
310
310
|
const stripeSdks = depNames.filter((d) => STRIPE_SDKS.includes(d));
|
|
311
311
|
matches.push({
|
|
312
312
|
path: relative(installDir, fullPath) || "package.json",
|
|
@@ -766,6 +766,293 @@ const SOURCE_DETECTORS = [
|
|
|
766
766
|
ruby: ["sentry-ruby"]
|
|
767
767
|
}
|
|
768
768
|
},
|
|
769
|
+
{
|
|
770
|
+
kind: "Plaid",
|
|
771
|
+
label: "Plaid",
|
|
772
|
+
mode: "in-cli",
|
|
773
|
+
signals: {
|
|
774
|
+
npm: ["plaid"],
|
|
775
|
+
python: ["plaid-python", "plaid"],
|
|
776
|
+
ruby: ["plaid"],
|
|
777
|
+
envKeys: [/^PLAID_/]
|
|
778
|
+
}
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
kind: "Braintree",
|
|
782
|
+
label: "Braintree",
|
|
783
|
+
mode: "in-cli",
|
|
784
|
+
signals: {
|
|
785
|
+
npm: ["braintree"],
|
|
786
|
+
python: ["braintree"],
|
|
787
|
+
ruby: ["braintree"],
|
|
788
|
+
envKeys: [/^BRAINTREE_/]
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
kind: "Square",
|
|
793
|
+
label: "Square",
|
|
794
|
+
mode: "in-cli",
|
|
795
|
+
signals: {
|
|
796
|
+
npm: ["square"],
|
|
797
|
+
python: ["squareup"],
|
|
798
|
+
ruby: ["square"],
|
|
799
|
+
envKeys: [/^SQUARE_/]
|
|
800
|
+
}
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
kind: "GoCardless",
|
|
804
|
+
label: "GoCardless",
|
|
805
|
+
mode: "in-cli",
|
|
806
|
+
signals: {
|
|
807
|
+
npm: ["gocardless-nodejs"],
|
|
808
|
+
python: ["gocardless-pro"],
|
|
809
|
+
ruby: ["gocardless_pro"],
|
|
810
|
+
envKeys: [/^GOCARDLESS_/]
|
|
811
|
+
}
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
kind: "Mollie",
|
|
815
|
+
label: "Mollie",
|
|
816
|
+
mode: "in-cli",
|
|
817
|
+
signals: {
|
|
818
|
+
npm: ["@mollie/api-client"],
|
|
819
|
+
python: ["mollie-api-python"],
|
|
820
|
+
envKeys: [/^MOLLIE_/]
|
|
821
|
+
}
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
kind: "CheckoutCom",
|
|
825
|
+
label: "Checkout.com",
|
|
826
|
+
mode: "in-cli",
|
|
827
|
+
signals: {
|
|
828
|
+
npm: ["checkout-sdk-node"],
|
|
829
|
+
python: ["checkout-sdk"],
|
|
830
|
+
envKeys: [/^CKO_/, /^CHECKOUT_COM_/]
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
kind: "Recurly",
|
|
835
|
+
label: "Recurly",
|
|
836
|
+
mode: "in-cli",
|
|
837
|
+
signals: {
|
|
838
|
+
npm: ["recurly"],
|
|
839
|
+
python: ["recurly"],
|
|
840
|
+
ruby: ["recurly"],
|
|
841
|
+
envKeys: [/^RECURLY_/]
|
|
842
|
+
}
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
kind: "RevenueCat",
|
|
846
|
+
label: "RevenueCat",
|
|
847
|
+
mode: "in-cli",
|
|
848
|
+
signals: {
|
|
849
|
+
npm: [
|
|
850
|
+
"@revenuecat/purchases-js",
|
|
851
|
+
"react-native-purchases",
|
|
852
|
+
"@revenuecat/purchases-capacitor"
|
|
853
|
+
],
|
|
854
|
+
envKeys: [/^REVENUE_?CAT_/]
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
kind: "Twilio",
|
|
859
|
+
label: "Twilio",
|
|
860
|
+
mode: "in-cli",
|
|
861
|
+
signals: {
|
|
862
|
+
npm: ["twilio"],
|
|
863
|
+
python: ["twilio"],
|
|
864
|
+
ruby: ["twilio-ruby"],
|
|
865
|
+
envKeys: [/^TWILIO_/]
|
|
866
|
+
}
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
kind: "SendGrid",
|
|
870
|
+
label: "SendGrid",
|
|
871
|
+
mode: "in-cli",
|
|
872
|
+
signals: {
|
|
873
|
+
npm: ["@sendgrid/mail", "@sendgrid/client"],
|
|
874
|
+
python: ["sendgrid"],
|
|
875
|
+
ruby: ["sendgrid-ruby"],
|
|
876
|
+
envKeys: [/^SENDGRID_/]
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
kind: "Mailgun",
|
|
881
|
+
label: "Mailgun",
|
|
882
|
+
mode: "in-cli",
|
|
883
|
+
signals: {
|
|
884
|
+
npm: ["mailgun.js", "mailgun-js"],
|
|
885
|
+
python: ["mailgun"],
|
|
886
|
+
ruby: ["mailgun-ruby"],
|
|
887
|
+
envKeys: [/^MAILGUN_/]
|
|
888
|
+
}
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
kind: "Postmark",
|
|
892
|
+
label: "Postmark",
|
|
893
|
+
mode: "in-cli",
|
|
894
|
+
signals: {
|
|
895
|
+
npm: ["postmark"],
|
|
896
|
+
python: ["postmarker"],
|
|
897
|
+
ruby: ["postmark"],
|
|
898
|
+
envKeys: [/^POSTMARK_/]
|
|
899
|
+
}
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
kind: "Brevo",
|
|
903
|
+
label: "Brevo",
|
|
904
|
+
mode: "in-cli",
|
|
905
|
+
signals: {
|
|
906
|
+
npm: ["@getbrevo/brevo", "sib-api-v3-sdk"],
|
|
907
|
+
python: ["sib-api-v3-sdk"],
|
|
908
|
+
envKeys: [/^BREVO_/]
|
|
909
|
+
}
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
kind: "MailerLite",
|
|
913
|
+
label: "MailerLite",
|
|
914
|
+
mode: "in-cli",
|
|
915
|
+
signals: {
|
|
916
|
+
npm: ["@mailerlite/mailerlite-nodejs"],
|
|
917
|
+
python: ["mailerlite"],
|
|
918
|
+
envKeys: [/^MAILERLITE_/]
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
kind: "Mailjet",
|
|
923
|
+
label: "Mailjet",
|
|
924
|
+
mode: "in-cli",
|
|
925
|
+
signals: {
|
|
926
|
+
npm: ["node-mailjet"],
|
|
927
|
+
python: ["mailjet-rest"],
|
|
928
|
+
envKeys: [/^MAILJET_/, /^MJ_APIKEY_/]
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
kind: "LaunchDarkly",
|
|
933
|
+
label: "LaunchDarkly",
|
|
934
|
+
mode: "in-cli",
|
|
935
|
+
signals: {
|
|
936
|
+
npm: [
|
|
937
|
+
"launchdarkly-node-server-sdk",
|
|
938
|
+
"@launchdarkly/node-server-sdk",
|
|
939
|
+
"launchdarkly-js-client-sdk",
|
|
940
|
+
"launchdarkly-react-client-sdk"
|
|
941
|
+
],
|
|
942
|
+
python: ["launchdarkly-server-sdk"],
|
|
943
|
+
ruby: ["launchdarkly-server-sdk"],
|
|
944
|
+
envKeys: [/^LAUNCHDARKLY_/, /^LD_SDK_KEY$/]
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
kind: "Optimizely",
|
|
949
|
+
label: "Optimizely",
|
|
950
|
+
mode: "in-cli",
|
|
951
|
+
signals: {
|
|
952
|
+
npm: ["@optimizely/optimizely-sdk"],
|
|
953
|
+
python: ["optimizely-sdk"],
|
|
954
|
+
envKeys: [/^OPTIMIZELY_/]
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
kind: "Braze",
|
|
959
|
+
label: "Braze",
|
|
960
|
+
mode: "in-cli",
|
|
961
|
+
signals: {
|
|
962
|
+
npm: ["@braze/web-sdk", "@braze/react-native-sdk"],
|
|
963
|
+
python: ["braze-client"],
|
|
964
|
+
envKeys: [/^BRAZE_/]
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
kind: "Rollbar",
|
|
969
|
+
label: "Rollbar",
|
|
970
|
+
mode: "in-cli",
|
|
971
|
+
signals: {
|
|
972
|
+
npm: ["rollbar"],
|
|
973
|
+
python: ["rollbar", "pyrollbar"],
|
|
974
|
+
ruby: ["rollbar"],
|
|
975
|
+
envKeys: [/^ROLLBAR_/]
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
kind: "Okta",
|
|
980
|
+
label: "Okta",
|
|
981
|
+
mode: "in-cli",
|
|
982
|
+
signals: {
|
|
983
|
+
npm: [
|
|
984
|
+
"@okta/okta-sdk-nodejs",
|
|
985
|
+
"@okta/okta-auth-js",
|
|
986
|
+
"@okta/okta-react"
|
|
987
|
+
],
|
|
988
|
+
python: ["okta"],
|
|
989
|
+
envKeys: [/^OKTA_/]
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
kind: "WorkOS",
|
|
994
|
+
label: "WorkOS",
|
|
995
|
+
mode: "in-cli",
|
|
996
|
+
signals: {
|
|
997
|
+
npm: ["@workos-inc/node"],
|
|
998
|
+
python: ["workos"],
|
|
999
|
+
envKeys: [/^WORKOS_/]
|
|
1000
|
+
}
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
kind: "Notion",
|
|
1004
|
+
label: "Notion",
|
|
1005
|
+
mode: "in-cli",
|
|
1006
|
+
signals: {
|
|
1007
|
+
npm: ["@notionhq/client"],
|
|
1008
|
+
python: ["notion-client"],
|
|
1009
|
+
envKeys: [/^NOTION_/]
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
kind: "FullStory",
|
|
1014
|
+
label: "FullStory",
|
|
1015
|
+
mode: "in-cli",
|
|
1016
|
+
signals: {
|
|
1017
|
+
npm: ["@fullstory/browser", "@fullstory/react-native"],
|
|
1018
|
+
envKeys: [/^FULLSTORY_/]
|
|
1019
|
+
}
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
kind: "Amplitude",
|
|
1023
|
+
label: "Amplitude",
|
|
1024
|
+
mode: "in-cli",
|
|
1025
|
+
signals: {
|
|
1026
|
+
npm: [
|
|
1027
|
+
"@amplitude/analytics-browser",
|
|
1028
|
+
"@amplitude/analytics-node",
|
|
1029
|
+
"@amplitude/analytics-react-native",
|
|
1030
|
+
"amplitude-js"
|
|
1031
|
+
],
|
|
1032
|
+
python: ["amplitude-analytics"],
|
|
1033
|
+
envKeys: [/^AMPLITUDE_/]
|
|
1034
|
+
}
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
kind: "Mixpanel",
|
|
1038
|
+
label: "Mixpanel",
|
|
1039
|
+
mode: "in-cli",
|
|
1040
|
+
signals: {
|
|
1041
|
+
npm: ["mixpanel", "mixpanel-browser"],
|
|
1042
|
+
python: ["mixpanel"],
|
|
1043
|
+
ruby: ["mixpanel-ruby"],
|
|
1044
|
+
envKeys: [/^MIXPANEL_/]
|
|
1045
|
+
}
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
kind: "Pendo",
|
|
1049
|
+
label: "Pendo",
|
|
1050
|
+
mode: "in-cli",
|
|
1051
|
+
signals: {
|
|
1052
|
+
npm: ["@pendo/agent"],
|
|
1053
|
+
envKeys: [/^PENDO_/]
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
769
1056
|
{
|
|
770
1057
|
kind: "Salesforce",
|
|
771
1058
|
label: "Salesforce",
|
|
@@ -814,6 +1101,31 @@ const SOURCE_DETECTORS = [
|
|
|
814
1101
|
npm: ["@linear/sdk"],
|
|
815
1102
|
envKeys: [/^LINEAR_API_KEY$/]
|
|
816
1103
|
}
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
kind: "Slack",
|
|
1107
|
+
label: "Slack",
|
|
1108
|
+
mode: "deep-link",
|
|
1109
|
+
signals: {
|
|
1110
|
+
npm: ["@slack/web-api", "@slack/bolt"],
|
|
1111
|
+
python: ["slack-sdk", "slack-bolt"],
|
|
1112
|
+
envKeys: [/^SLACK_(BOT|APP|SIGNING|CLIENT)_/]
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
kind: "Github",
|
|
1117
|
+
label: "GitHub",
|
|
1118
|
+
mode: "deep-link",
|
|
1119
|
+
signals: {
|
|
1120
|
+
npm: [
|
|
1121
|
+
"@octokit/rest",
|
|
1122
|
+
"@octokit/core",
|
|
1123
|
+
"@octokit/graphql",
|
|
1124
|
+
"octokit"
|
|
1125
|
+
],
|
|
1126
|
+
python: ["pygithub"],
|
|
1127
|
+
ruby: ["octokit"]
|
|
1128
|
+
}
|
|
817
1129
|
}
|
|
818
1130
|
];
|
|
819
1131
|
//#endregion
|
|
@@ -835,7 +1147,7 @@ const MAX_DEPTH = 3;
|
|
|
835
1147
|
* so the result is naturally deduped).
|
|
836
1148
|
*/
|
|
837
1149
|
function detectWarehouseSources(installDir) {
|
|
838
|
-
const signals = collectSignals
|
|
1150
|
+
const signals = collectSignals(installDir);
|
|
839
1151
|
const detected = [];
|
|
840
1152
|
for (const detector of SOURCE_DETECTORS) {
|
|
841
1153
|
const match = matchDetector(detector, signals);
|
|
@@ -862,7 +1174,7 @@ function matchDetector(detector, signals) {
|
|
|
862
1174
|
}
|
|
863
1175
|
return null;
|
|
864
1176
|
}
|
|
865
|
-
function collectSignals
|
|
1177
|
+
function collectSignals(installDir) {
|
|
866
1178
|
const signals = {
|
|
867
1179
|
npm: /* @__PURE__ */ new Set(),
|
|
868
1180
|
python: /* @__PURE__ */ new Set(),
|
|
@@ -2265,12 +2577,21 @@ const DISPLAY_NAME = {
|
|
|
2265
2577
|
webpack: "Webpack",
|
|
2266
2578
|
rollup: "Rollup"
|
|
2267
2579
|
};
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2580
|
+
/**
|
|
2581
|
+
* Variants the wizard can wire up source-map upload for automatically. The
|
|
2582
|
+
* native variants (react-native, android, flutter, ios) are recognised but not
|
|
2583
|
+
* yet automatable, so the agentic picker treats them as non-instrumentable.
|
|
2584
|
+
*/
|
|
2585
|
+
const AUTOMATABLE_VARIANTS = [
|
|
2586
|
+
"web",
|
|
2587
|
+
"nextjs",
|
|
2588
|
+
"node",
|
|
2589
|
+
"react",
|
|
2590
|
+
"angular",
|
|
2591
|
+
"nuxt",
|
|
2592
|
+
"vite",
|
|
2593
|
+
"webpack",
|
|
2594
|
+
"rollup"
|
|
2274
2595
|
];
|
|
2275
2596
|
/** `[ABORT] <reason>` cases the source maps skill can emit. */
|
|
2276
2597
|
const SOURCE_MAPS_ABORT_CASES = [{
|
|
@@ -2284,199 +2605,40 @@ const SOURCE_MAPS_ABORT_CASES = [{
|
|
|
2284
2605
|
body: "The agent could not identify how to build your project. Source map upload runs as part of the production build. Add a build script to your project and run this wizard again.",
|
|
2285
2606
|
docsUrl: "https://posthog.com/docs/error-tracking/upload-source-maps"
|
|
2286
2607
|
}];
|
|
2287
|
-
function collectSignals(installDir, maxDepth = 3) {
|
|
2288
|
-
const signals = {
|
|
2289
|
-
packageJsons: [],
|
|
2290
|
-
hasXcodeProject: false,
|
|
2291
|
-
hasPodfile: false,
|
|
2292
|
-
hasSwiftPackage: false,
|
|
2293
|
-
hasGradle: false,
|
|
2294
|
-
hasPubspec: false,
|
|
2295
|
-
scannedFileCount: 0
|
|
2296
|
-
};
|
|
2297
|
-
function scan(dir, depth) {
|
|
2298
|
-
if (depth > maxDepth) return;
|
|
2299
|
-
let entries;
|
|
2300
|
-
try {
|
|
2301
|
-
entries = readdirSync(dir, { withFileTypes: true });
|
|
2302
|
-
} catch {
|
|
2303
|
-
return;
|
|
2304
|
-
}
|
|
2305
|
-
for (const entry of entries) {
|
|
2306
|
-
if (entry.name.startsWith(".") && entry.name !== ".") continue;
|
|
2307
|
-
if (IGNORED_DIRS.has(entry.name)) continue;
|
|
2308
|
-
const fullPath = join(dir, entry.name);
|
|
2309
|
-
if (entry.isFile()) {
|
|
2310
|
-
signals.scannedFileCount += 1;
|
|
2311
|
-
if (entry.name === "package.json") try {
|
|
2312
|
-
const pkg = JSON.parse(readFileSync(fullPath, "utf-8"));
|
|
2313
|
-
const deps = new Set([...Object.keys(pkg.dependencies ?? {}), ...Object.keys(pkg.devDependencies ?? {})]);
|
|
2314
|
-
signals.packageJsons.push({
|
|
2315
|
-
path: relative(installDir, fullPath) || "package.json",
|
|
2316
|
-
deps
|
|
2317
|
-
});
|
|
2318
|
-
} catch {}
|
|
2319
|
-
else if (entry.name === "Podfile") signals.hasPodfile = true;
|
|
2320
|
-
else if (entry.name === "Package.swift") signals.hasSwiftPackage = true;
|
|
2321
|
-
else if (entry.name === "pubspec.yaml") signals.hasPubspec = true;
|
|
2322
|
-
else if (entry.name === "build.gradle" || entry.name === "build.gradle.kts" || entry.name === "settings.gradle" || entry.name === "settings.gradle.kts") signals.hasGradle = true;
|
|
2323
|
-
} else if (entry.isDirectory()) if (entry.name.endsWith(".xcodeproj")) signals.hasXcodeProject = true;
|
|
2324
|
-
else scan(fullPath, depth + 1);
|
|
2325
|
-
}
|
|
2326
|
-
}
|
|
2327
|
-
scan(installDir, 0);
|
|
2328
|
-
return signals;
|
|
2329
|
-
}
|
|
2330
|
-
function pickJsVariant(deps) {
|
|
2331
|
-
if (deps.has("react-native")) return "react-native";
|
|
2332
|
-
if (deps.has("nuxt")) return "nuxt";
|
|
2333
|
-
if (deps.has("next")) return "nextjs";
|
|
2334
|
-
if (deps.has("@angular/core")) return "angular";
|
|
2335
|
-
if (deps.has("vite")) return "vite";
|
|
2336
|
-
if (deps.has("webpack")) return "webpack";
|
|
2337
|
-
if (deps.has("rollup")) return "rollup";
|
|
2338
|
-
if (deps.has("react")) return "react";
|
|
2339
|
-
if (deps.has("posthog-node")) return "node";
|
|
2340
|
-
return "web";
|
|
2341
|
-
}
|
|
2342
|
-
function selectVariant(signals) {
|
|
2343
|
-
if (signals.hasPubspec) return "flutter";
|
|
2344
|
-
if (signals.hasXcodeProject || signals.hasPodfile || signals.hasSwiftPackage) return "ios";
|
|
2345
|
-
if (signals.hasGradle) return "android";
|
|
2346
|
-
if (signals.packageJsons.length > 0) {
|
|
2347
|
-
const allDeps = /* @__PURE__ */ new Set();
|
|
2348
|
-
for (const pkg of signals.packageJsons) for (const dep of pkg.deps) allDeps.add(dep);
|
|
2349
|
-
return pickJsVariant(allDeps);
|
|
2350
|
-
}
|
|
2351
|
-
return null;
|
|
2352
|
-
}
|
|
2353
|
-
function hasPostHogSdk(signals) {
|
|
2354
|
-
for (const pkg of signals.packageJsons) for (const sdk of POSTHOG_SDKS) if (pkg.deps.has(sdk)) return true;
|
|
2355
|
-
return signals.hasXcodeProject || signals.hasPodfile || signals.hasSwiftPackage || signals.hasGradle || signals.hasPubspec;
|
|
2356
|
-
}
|
|
2357
2608
|
const SOURCE_MAPS_CONTEXT_KEYS = {
|
|
2358
2609
|
skillVariant: "sourceMapsSkillVariant",
|
|
2359
2610
|
displayName: "sourceMapsDisplayName",
|
|
2360
2611
|
packagePaths: "sourceMapsPackagePaths",
|
|
2361
|
-
detectError: "detectError"
|
|
2612
|
+
detectError: "detectError",
|
|
2613
|
+
selectedVariant: "sourceMapsSelectedVariant",
|
|
2614
|
+
selectedDisplayName: "sourceMapsSelectedDisplayName",
|
|
2615
|
+
selectedPath: "sourceMapsSelectedPath"
|
|
2362
2616
|
};
|
|
2363
|
-
/**
|
|
2364
|
-
* Scan `session.installDir` for platform / build-system signals. Writes
|
|
2365
|
-
* detection results into frameworkContext via the callback — either the
|
|
2366
|
-
* picked skill variant + display name, or a `SourceMapsDetectError`.
|
|
2367
|
-
*
|
|
2368
|
-
* The skill install happens later in the agent run, not here. This step
|
|
2369
|
-
* only picks which variant the prompt should ask the agent to load.
|
|
2370
|
-
*/
|
|
2371
|
-
function detectSourceMapsPrerequisites(session, setFrameworkContext) {
|
|
2372
|
-
const fail = (error) => setFrameworkContext(SOURCE_MAPS_CONTEXT_KEYS.detectError, error);
|
|
2373
|
-
const installDir = session.installDir;
|
|
2374
|
-
if (!existsSync(installDir)) {
|
|
2375
|
-
fail({
|
|
2376
|
-
kind: "bad-directory",
|
|
2377
|
-
path: installDir,
|
|
2378
|
-
reason: "missing"
|
|
2379
|
-
});
|
|
2380
|
-
return;
|
|
2381
|
-
}
|
|
2382
|
-
try {
|
|
2383
|
-
if (!statSync(installDir).isDirectory()) {
|
|
2384
|
-
fail({
|
|
2385
|
-
kind: "bad-directory",
|
|
2386
|
-
path: installDir,
|
|
2387
|
-
reason: "not-dir"
|
|
2388
|
-
});
|
|
2389
|
-
return;
|
|
2390
|
-
}
|
|
2391
|
-
} catch {
|
|
2392
|
-
fail({
|
|
2393
|
-
kind: "bad-directory",
|
|
2394
|
-
path: installDir,
|
|
2395
|
-
reason: "unreadable"
|
|
2396
|
-
});
|
|
2397
|
-
return;
|
|
2398
|
-
}
|
|
2399
|
-
const signals = collectSignals(installDir);
|
|
2400
|
-
const variant = selectVariant(signals);
|
|
2401
|
-
if (variant && [
|
|
2402
|
-
"react-native",
|
|
2403
|
-
"flutter",
|
|
2404
|
-
"ios",
|
|
2405
|
-
"android"
|
|
2406
|
-
].includes(variant)) {
|
|
2407
|
-
fail({
|
|
2408
|
-
kind: "unsupported-platform",
|
|
2409
|
-
detected: variant
|
|
2410
|
-
});
|
|
2411
|
-
return;
|
|
2412
|
-
}
|
|
2413
|
-
if (!variant) {
|
|
2414
|
-
if (signals.scannedFileCount === 0) fail({ kind: "no-project-files" });
|
|
2415
|
-
else fail({
|
|
2416
|
-
kind: "unsupported-platform",
|
|
2417
|
-
detected: "unknown"
|
|
2418
|
-
});
|
|
2419
|
-
return;
|
|
2420
|
-
}
|
|
2421
|
-
if (!hasPostHogSdk(signals)) {
|
|
2422
|
-
fail({
|
|
2423
|
-
kind: "no-posthog-sdk",
|
|
2424
|
-
platform: variant
|
|
2425
|
-
});
|
|
2426
|
-
return;
|
|
2427
|
-
}
|
|
2428
|
-
setFrameworkContext(SOURCE_MAPS_CONTEXT_KEYS.skillVariant, variant);
|
|
2429
|
-
setFrameworkContext(SOURCE_MAPS_CONTEXT_KEYS.displayName, DISPLAY_NAME[variant]);
|
|
2430
|
-
setFrameworkContext(SOURCE_MAPS_CONTEXT_KEYS.packagePaths, signals.packageJsons.map((p) => p.path));
|
|
2431
|
-
}
|
|
2432
2617
|
//#endregion
|
|
2433
2618
|
//#region src/lib/programs/error-tracking-upload-source-maps/steps.ts
|
|
2434
|
-
function
|
|
2435
|
-
|
|
2436
|
-
if (session.signup) {
|
|
2437
|
-
const hardBlocking = getBlockingServiceKeys(session.readinessResult.health, SIGNUP_WIZARD_READINESS_CONFIG);
|
|
2438
|
-
const defaultBlocking = getBlockingServiceKeys(session.readinessResult.health);
|
|
2439
|
-
if (hardBlocking.length === 0 && defaultBlocking.length === 0) return true;
|
|
2440
|
-
return session.outageDismissed;
|
|
2441
|
-
}
|
|
2442
|
-
if (session.readinessResult.decision === "no") return session.outageDismissed;
|
|
2443
|
-
return true;
|
|
2619
|
+
function projectSelected(session) {
|
|
2620
|
+
return session.frameworkContext[SOURCE_MAPS_CONTEXT_KEYS.selectedVariant] != null;
|
|
2444
2621
|
}
|
|
2445
2622
|
const ERROR_TRACKING_UPLOAD_SOURCE_MAPS_PROGRAM = [
|
|
2446
|
-
{
|
|
2447
|
-
id: "detect",
|
|
2448
|
-
label: "Detecting platform",
|
|
2449
|
-
onReady: (ctx) => detectSourceMapsPrerequisites(ctx.session, ctx.setFrameworkContext)
|
|
2450
|
-
},
|
|
2451
2623
|
{
|
|
2452
2624
|
id: "intro",
|
|
2453
2625
|
label: "Welcome",
|
|
2454
2626
|
screenId: "source-maps-intro",
|
|
2455
2627
|
gate: (session) => session.setupConfirmed
|
|
2456
2628
|
},
|
|
2457
|
-
{
|
|
2458
|
-
id: "health-check",
|
|
2459
|
-
label: "Health check",
|
|
2460
|
-
screenId: "health-check",
|
|
2461
|
-
gate: healthCheckReady,
|
|
2462
|
-
onInit: (ctx) => {
|
|
2463
|
-
evaluateWizardReadiness().then((readiness) => {
|
|
2464
|
-
ctx.setReadinessResult(readiness);
|
|
2465
|
-
}).catch(() => {
|
|
2466
|
-
ctx.setReadinessResult({
|
|
2467
|
-
decision: "yes",
|
|
2468
|
-
health: {},
|
|
2469
|
-
reasons: []
|
|
2470
|
-
});
|
|
2471
|
-
});
|
|
2472
|
-
}
|
|
2473
|
-
},
|
|
2474
2629
|
{
|
|
2475
2630
|
id: "auth",
|
|
2476
2631
|
label: "Authentication",
|
|
2477
2632
|
screenId: "auth",
|
|
2478
2633
|
isComplete: (session) => session.credentials !== null
|
|
2479
2634
|
},
|
|
2635
|
+
{
|
|
2636
|
+
id: "detect",
|
|
2637
|
+
label: "Detecting projects",
|
|
2638
|
+
screenId: "source-maps-detect",
|
|
2639
|
+
isComplete: projectSelected,
|
|
2640
|
+
gate: projectSelected
|
|
2641
|
+
},
|
|
2480
2642
|
{
|
|
2481
2643
|
id: "run",
|
|
2482
2644
|
label: "Upload source maps",
|
|
@@ -2501,8 +2663,9 @@ const SOURCE_MAPS_DETECTION_FAILED_PROMPT = `Detection did not pick a source map
|
|
|
2501
2663
|
Emit: ${AgentSignals.ABORT} unsupported-platform
|
|
2502
2664
|
Then halt.`;
|
|
2503
2665
|
function buildSourceMapsUploadPrompt(params) {
|
|
2504
|
-
const { displayName, variant, skillId, projectId, host, settingsUrl, uiHost } = params;
|
|
2666
|
+
const { displayName, variant, skillId, projectPath, projectId, host, settingsUrl, uiHost } = params;
|
|
2505
2667
|
const platformLabel = displayName ?? variant;
|
|
2668
|
+
const inSubproject = projectPath != null && projectPath !== ".";
|
|
2506
2669
|
return `You are wiring up PostHog Error Tracking source map upload for this ${platformLabel} project.
|
|
2507
2670
|
|
|
2508
2671
|
Project context:
|
|
@@ -2510,8 +2673,11 @@ Project context:
|
|
|
2510
2673
|
- PostHog Host: ${host}
|
|
2511
2674
|
- Detected platform: ${platformLabel}
|
|
2512
2675
|
- Skill to use: ${skillId}
|
|
2676
|
+
${inSubproject ? `- Project directory (relative to repo root): ${projectPath}` : "- Project directory: the repo root"}
|
|
2513
2677
|
- Personal API keys settings page: ${settingsUrl}
|
|
2514
2678
|
|
|
2679
|
+
All file changes, build/run commands, and config edits target the project directory above${inSubproject ? ` — this is a monorepo, so scope your work to \`${projectPath}\` and do not touch other packages` : ""}.
|
|
2680
|
+
|
|
2515
2681
|
The skill you install in STEP 2 is the source of truth for the HOW of every
|
|
2516
2682
|
step: its "## Steps" section has an overview, tips and per-technology
|
|
2517
2683
|
examples for each named step, and its reference files carry the exact
|
|
@@ -2992,10 +3158,16 @@ const errorTrackingUploadSourceMapsConfig = {
|
|
|
2992
3158
|
reportFile: REPORT_FILE$1,
|
|
2993
3159
|
getContentBlocks,
|
|
2994
3160
|
requires: ["posthog-integration"],
|
|
2995
|
-
run: (
|
|
2996
|
-
const
|
|
2997
|
-
|
|
2998
|
-
|
|
3161
|
+
run: (_session) => {
|
|
3162
|
+
const readSelection = () => {
|
|
3163
|
+
const variant = getUI().getFrameworkContext(SOURCE_MAPS_CONTEXT_KEYS.selectedVariant);
|
|
3164
|
+
return {
|
|
3165
|
+
variant,
|
|
3166
|
+
displayName: getUI().getFrameworkContext(SOURCE_MAPS_CONTEXT_KEYS.selectedDisplayName),
|
|
3167
|
+
projectPath: getUI().getFrameworkContext(SOURCE_MAPS_CONTEXT_KEYS.selectedPath),
|
|
3168
|
+
skillId: variant ? `error-tracking-upload-source-maps-${variant}` : void 0
|
|
3169
|
+
};
|
|
3170
|
+
};
|
|
2999
3171
|
return Promise.resolve({
|
|
3000
3172
|
integrationLabel: "error-tracking-upload-source-maps",
|
|
3001
3173
|
successMessage: "Source maps wired up!",
|
|
@@ -3006,20 +3178,23 @@ const errorTrackingUploadSourceMapsConfig = {
|
|
|
3006
3178
|
abortCases: SOURCE_MAPS_ABORT_CASES,
|
|
3007
3179
|
askTimeoutMs: 1800 * 1e3,
|
|
3008
3180
|
customPrompt: (ctx) => {
|
|
3181
|
+
const { variant, displayName, projectPath, skillId } = readSelection();
|
|
3009
3182
|
if (!skillId || !variant) return SOURCE_MAPS_DETECTION_FAILED_PROMPT;
|
|
3010
3183
|
const uiHost = getUiHostFromHost(ctx.host).replace(/\/$/, "");
|
|
3011
3184
|
return buildSourceMapsUploadPrompt({
|
|
3012
3185
|
displayName,
|
|
3013
3186
|
variant,
|
|
3014
3187
|
skillId,
|
|
3188
|
+
projectPath,
|
|
3015
3189
|
projectId: ctx.projectId,
|
|
3016
3190
|
host: ctx.host,
|
|
3017
3191
|
settingsUrl: `${uiHost}/project/${ctx.projectId}/settings/user-api-keys`,
|
|
3018
3192
|
uiHost
|
|
3019
3193
|
});
|
|
3020
3194
|
},
|
|
3021
|
-
postRun: (
|
|
3022
|
-
|
|
3195
|
+
postRun: () => {
|
|
3196
|
+
const { variant } = readSelection();
|
|
3197
|
+
if (variant) getUI().setFrameworkContext("sourceMapsCompletedVariant", variant);
|
|
3023
3198
|
return Promise.resolve();
|
|
3024
3199
|
},
|
|
3025
3200
|
buildOutroData: () => {
|
|
@@ -3163,10 +3338,10 @@ function buildSelfDrivingPrompt(ctx) {
|
|
|
3163
3338
|
const inboxUrl = `${projectBase}/inbox`;
|
|
3164
3339
|
const optIn = (value) => value === true ? "ON" : value === false ? "OFF" : "unknown";
|
|
3165
3340
|
const optIns = ctx.teamProductOptIns;
|
|
3166
|
-
return `You are setting up PostHog Self-driving for this project: you will enable the right signal sources, make sure GitHub is connected, tune the scout
|
|
3341
|
+
return `You are setting up PostHog Self-driving for this project: you will enable the right signal sources, make sure GitHub is connected, tune the scout troop, design custom scouts for what this product uniquely needs, and hand the user a configured inbox.
|
|
3167
3342
|
|
|
3168
3343
|
Project URLs:
|
|
3169
|
-
- Integrations settings
|
|
3344
|
+
- Integrations settings: ${integrationsSettingsUrl}
|
|
3170
3345
|
- Organization AI settings: ${orgAiSettingsUrl}
|
|
3171
3346
|
- New data warehouse source (Linear / Zendesk / GitHub issues / pganalyze): ${newWarehouseSourceUrl}
|
|
3172
3347
|
- Self-driving inbox: ${inboxUrl}
|
|
@@ -3193,7 +3368,7 @@ tasks, in this order:
|
|
|
3193
3368
|
3. Connect GitHub (required)
|
|
3194
3369
|
4. Enable signal sources
|
|
3195
3370
|
5. Offer issue-tracker integrations
|
|
3196
|
-
6. Configure the scout
|
|
3371
|
+
6. Configure the scout troop
|
|
3197
3372
|
7. Design custom scouts
|
|
3198
3373
|
8. Write report and hand off
|
|
3199
3374
|
Drive the list with TaskUpdate — mark a task in_progress when you start
|
|
@@ -3231,9 +3406,10 @@ STEP 2 — Read project and current Signals state. (skill: "Read context")
|
|
|
3231
3406
|
|
|
3232
3407
|
STEP 3 — Connect GitHub. REQUIRED. (skill: "Connect GitHub")
|
|
3233
3408
|
Signals cannot research or fix issues without code access. Check for
|
|
3234
|
-
an existing GitHub integration first; if absent, send the user
|
|
3235
|
-
|
|
3236
|
-
|
|
3409
|
+
an existing GitHub integration first; if absent, send the user
|
|
3410
|
+
through the GitHub App connection via wizard_ask exactly as the skill
|
|
3411
|
+
describes (it builds the one-click authorize link), and verify the
|
|
3412
|
+
connection after they confirm. If the user cannot connect now, emit
|
|
3237
3413
|
${AgentSignals.ABORT} github connection declined
|
|
3238
3414
|
and halt — never finish setup without GitHub.
|
|
3239
3415
|
|
|
@@ -3251,20 +3427,20 @@ STEP 5 — Offer issue-tracker integrations. (skill: "Connected tools")
|
|
|
3251
3427
|
never sends the user to paste credentials and never re-prompts. Enable
|
|
3252
3428
|
a source only for a tool the user picked.
|
|
3253
3429
|
|
|
3254
|
-
STEP 6 — Configure the scout
|
|
3255
|
-
Materialize the
|
|
3430
|
+
STEP 6 — Configure the scout troop. (skill: "Scouts")
|
|
3431
|
+
Materialize the troop, then enable only a small set — the "general"
|
|
3256
3432
|
scout plus the one or two specialists for the products this project
|
|
3257
3433
|
uses most — and disable the rest, per the skill.
|
|
3258
3434
|
|
|
3259
3435
|
STEP 7 — Design custom scouts for this product. (skill: "Custom scouts")
|
|
3260
3436
|
You are the only actor that has read this repo — turn that into
|
|
3261
3437
|
coverage per the skill: a real gap analysis of the project's
|
|
3262
|
-
watchable surfaces against what the
|
|
3438
|
+
watchable surfaces against what the built-in troop already covers,
|
|
3263
3439
|
then custom scouts for the uncovered ones. Keep scout bodies
|
|
3264
3440
|
high-level: describe the behavior and signal conditions to watch,
|
|
3265
3441
|
referencing repo evidence by file/function name — never paste raw
|
|
3266
3442
|
source, secrets, env values, or customer data into a scout body.
|
|
3267
|
-
Never edit
|
|
3443
|
+
Never edit built-in scout bodies. Propose all candidates in ONE
|
|
3268
3444
|
batched wizard_ask
|
|
3269
3445
|
before creating anything; the user declining everything (or finding
|
|
3270
3446
|
no gap at all) is a valid outcome, not an abort. Mark the task
|
|
@@ -3281,12 +3457,12 @@ const SELF_DRIVING_TIPS = [
|
|
|
3281
3457
|
{
|
|
3282
3458
|
id: "what-is-a-signal-source",
|
|
3283
3459
|
title: "What's a signal source?",
|
|
3284
|
-
description: "A signal source is
|
|
3460
|
+
description: "A signal source is one of the streams PostHog plugs straight into — your errors, session replays, support, GitHub or Linear issues. Each one watches its own stream and speaks up the moment something specific goes wrong there."
|
|
3285
3461
|
},
|
|
3286
3462
|
{
|
|
3287
3463
|
id: "what-is-a-scout",
|
|
3288
3464
|
title: "What's a scout?",
|
|
3289
|
-
description: "
|
|
3465
|
+
description: "A scout is like an analyst PostHog runs for you on a schedule: rather than watching one stream, it ranges freely across your product data, looking for the bigger trends and surprises — a spike in errors, a funnel quietly dropping — that no single stream would catch."
|
|
3290
3466
|
},
|
|
3291
3467
|
{
|
|
3292
3468
|
id: "findings-in-inbox",
|
|
@@ -3573,7 +3749,7 @@ function runMcpAdd(argv) {
|
|
|
3573
3749
|
const debug = argv.debug;
|
|
3574
3750
|
const localMcp = argv.local;
|
|
3575
3751
|
try {
|
|
3576
|
-
const { startTUI } = await import("./start-tui-
|
|
3752
|
+
const { startTUI } = await import("./start-tui-Deaj99It.js");
|
|
3577
3753
|
const { buildSession } = await import("./wizard-session-wPJtNl4c.js");
|
|
3578
3754
|
const tui = startTUI(VERSION, Program.McpAdd);
|
|
3579
3755
|
tui.store.session = buildSession({
|
|
@@ -3585,7 +3761,7 @@ function runMcpAdd(argv) {
|
|
|
3585
3761
|
} catch (error) {
|
|
3586
3762
|
if (!isTUIUnavailable(error)) throw error;
|
|
3587
3763
|
setUI(new LoggingUI());
|
|
3588
|
-
const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-
|
|
3764
|
+
const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-B6Pj4IKt.js").then((n) => n.r);
|
|
3589
3765
|
await addMCPServerToClientsStep({
|
|
3590
3766
|
local: localMcp,
|
|
3591
3767
|
features,
|
|
@@ -3624,7 +3800,7 @@ function runMcpRemove(argv) {
|
|
|
3624
3800
|
const debug = argv.debug;
|
|
3625
3801
|
const localMcp = argv.local;
|
|
3626
3802
|
try {
|
|
3627
|
-
const { startTUI } = await import("./start-tui-
|
|
3803
|
+
const { startTUI } = await import("./start-tui-Deaj99It.js");
|
|
3628
3804
|
const { buildSession } = await import("./wizard-session-wPJtNl4c.js");
|
|
3629
3805
|
const tui = startTUI(VERSION, Program.McpRemove);
|
|
3630
3806
|
tui.store.session = buildSession({
|
|
@@ -3633,7 +3809,7 @@ function runMcpRemove(argv) {
|
|
|
3633
3809
|
});
|
|
3634
3810
|
} catch {
|
|
3635
3811
|
setUI(new LoggingUI());
|
|
3636
|
-
const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-
|
|
3812
|
+
const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-B6Pj4IKt.js").then((n) => n.r);
|
|
3637
3813
|
await removeMCPServerFromClientsStep({ local: localMcp });
|
|
3638
3814
|
}
|
|
3639
3815
|
})();
|
|
@@ -3655,7 +3831,7 @@ function runMcpTutorial(argv) {
|
|
|
3655
3831
|
const debug = argv.debug;
|
|
3656
3832
|
const localMcp = argv.local;
|
|
3657
3833
|
try {
|
|
3658
|
-
const { startTUI } = await import("./start-tui-
|
|
3834
|
+
const { startTUI } = await import("./start-tui-Deaj99It.js");
|
|
3659
3835
|
const { buildSession } = await import("./wizard-session-wPJtNl4c.js");
|
|
3660
3836
|
const tui = startTUI(VERSION, Program.McpTutorial);
|
|
3661
3837
|
tui.store.session = buildSession({
|
|
@@ -3710,7 +3886,7 @@ function runWizard(config, options) {
|
|
|
3710
3886
|
(async () => {
|
|
3711
3887
|
try {
|
|
3712
3888
|
const installDir = options.installDir || process.cwd();
|
|
3713
|
-
const { startTUI } = await import("./start-tui-
|
|
3889
|
+
const { startTUI } = await import("./start-tui-Deaj99It.js");
|
|
3714
3890
|
const { buildSession, RunPhase } = await import("./wizard-session-wPJtNl4c.js");
|
|
3715
3891
|
const { TaskStreamPush } = await import("./task-stream-BQNSp0qR.js");
|
|
3716
3892
|
const { PostHogDestination } = await import("./posthog-Cr37rnla.js");
|
|
@@ -3766,7 +3942,7 @@ function runWizard(config, options) {
|
|
|
3766
3942
|
await activeTui.store.getGate("health-check");
|
|
3767
3943
|
const skipAgent = config.run == null;
|
|
3768
3944
|
if (skipAgent) {
|
|
3769
|
-
const { getOrAskForProjectData } = await import("./setup-utils-
|
|
3945
|
+
const { getOrAskForProjectData } = await import("./setup-utils-DF6EKEeA.js").then((n) => n.r);
|
|
3770
3946
|
const { projectApiKey, host, accessToken, projectId } = await getOrAskForProjectData({
|
|
3771
3947
|
signup: session.signup,
|
|
3772
3948
|
ci: session.ci,
|
|
@@ -3781,7 +3957,7 @@ function runWizard(config, options) {
|
|
|
3781
3957
|
projectId
|
|
3782
3958
|
});
|
|
3783
3959
|
} else {
|
|
3784
|
-
const { runAgent } = await import("./agent-runner-
|
|
3960
|
+
const { runAgent } = await import("./agent-runner-VzTpPaVT.js");
|
|
3785
3961
|
await runAgent(config, activeTui.store.session);
|
|
3786
3962
|
}
|
|
3787
3963
|
const isDone = () => skipAgent ? activeTui.store.session.outroDismissed : activeTui.store.session.skillsComplete;
|
|
@@ -3858,10 +4034,10 @@ function runWizardCI(config, options) {
|
|
|
3858
4034
|
(async () => {
|
|
3859
4035
|
const path = await import("path");
|
|
3860
4036
|
const { buildSession } = await import("./wizard-session-wPJtNl4c.js");
|
|
3861
|
-
const { readEnvironment } = await import("./environment-
|
|
4037
|
+
const { readEnvironment } = await import("./environment-cVP7bGnh.js").then((n) => n.t);
|
|
3862
4038
|
const { readApiKeyFromEnv } = await import("./env-api-key-MlzJYAvt.js").then((n) => n.t);
|
|
3863
|
-
const { configureLogFileFromEnvironment, logToFile } = await import("./debug-
|
|
3864
|
-
const { wizardAbort, WizardError } = await import("./wizard-abort-
|
|
4039
|
+
const { configureLogFileFromEnvironment, logToFile } = await import("./debug-HQ0NrBA2.js");
|
|
4040
|
+
const { wizardAbort, WizardError } = await import("./wizard-abort-D3vY7K9a.js");
|
|
3865
4041
|
configureLogFileFromEnvironment();
|
|
3866
4042
|
const env = readEnvironment();
|
|
3867
4043
|
const apiKey = options.apiKey ?? readApiKeyFromEnv() ?? void 0;
|
|
@@ -3912,7 +4088,7 @@ function runWizardCI(config, options) {
|
|
|
3912
4088
|
})
|
|
3913
4089
|
});
|
|
3914
4090
|
}
|
|
3915
|
-
const { runAgent } = await import("./agent-runner-
|
|
4091
|
+
const { runAgent } = await import("./agent-runner-VzTpPaVT.js");
|
|
3916
4092
|
await runAgent(config, session);
|
|
3917
4093
|
} catch (error) {
|
|
3918
4094
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -4779,7 +4955,7 @@ async function runDoctorCI(options) {
|
|
|
4779
4955
|
getUI().intro("Welcome to the PostHog setup wizard");
|
|
4780
4956
|
getUI().log.info("Running posthog-doctor in CI mode");
|
|
4781
4957
|
try {
|
|
4782
|
-
const { getOrAskForProjectData } = await import("./setup-utils-
|
|
4958
|
+
const { getOrAskForProjectData } = await import("./setup-utils-DF6EKEeA.js").then((n) => n.r);
|
|
4783
4959
|
const { host, accessToken, projectId } = await getOrAskForProjectData({
|
|
4784
4960
|
signup: false,
|
|
4785
4961
|
ci: true,
|
|
@@ -4796,7 +4972,7 @@ async function runDoctorCI(options) {
|
|
|
4796
4972
|
for (const issue of sorted) getUI().log.info(` • [${issue.severity}] ${getKindMeta(issue.kind).title}`);
|
|
4797
4973
|
process.exit(1);
|
|
4798
4974
|
} catch (error) {
|
|
4799
|
-
const { ApiError } = await import("./api-
|
|
4975
|
+
const { ApiError } = await import("./api-DfpSG5xU.js").then((n) => n.n);
|
|
4800
4976
|
const message = error instanceof ApiError && error.statusCode === 401 ? "Your PostHog API key is invalid or expired." : error instanceof Error ? error.message : String(error);
|
|
4801
4977
|
getUI().log.error(`Doctor failed: ${message}`);
|
|
4802
4978
|
process.exit(1);
|
|
@@ -4892,7 +5068,7 @@ function runSlackConnect(argv) {
|
|
|
4892
5068
|
(async () => {
|
|
4893
5069
|
const debug = argv.debug;
|
|
4894
5070
|
try {
|
|
4895
|
-
const { startTUI } = await import("./start-tui-
|
|
5071
|
+
const { startTUI } = await import("./start-tui-Deaj99It.js");
|
|
4896
5072
|
const { buildSession } = await import("./wizard-session-wPJtNl4c.js");
|
|
4897
5073
|
const tui = startTUI(VERSION, Program.SlackConnect);
|
|
4898
5074
|
tui.store.session = buildSession({ debug });
|
|
@@ -5271,6 +5447,6 @@ function resolveInstallDir() {
|
|
|
5271
5447
|
}
|
|
5272
5448
|
Wizard.use(basicIntegrationCommand).use(mcpCommand).use(cliCommand).use(auditCommand).use(doctorCommand).use(migrateCommand).use(revenueCommand).use(warehouseCommand).use(selfDrivingCommand).use(slackCommand).use(uploadSourcemapsCommand).use(skillCommand).init();
|
|
5273
5449
|
//#endregion
|
|
5274
|
-
export {
|
|
5450
|
+
export { getDetectedWarehouseSources as _, ConfirmButton as a, STRIPE_SDKS as b, runWizard as c, getProgramConfig as d, AUTOMATABLE_VARIANTS as f, fetchHealthIssues as g, getKindMeta as h, useKeyboardHintsContext as i, PROGRAM_REGISTRY as l, SOURCE_MAPS_CONTEXT_KEYS as m, useKeyBindings as n, PromptLabel as o, DISPLAY_NAME as p, KeyboardHintsProvider as r, runWizardCI as s, PickerMenu as t, Program as u, getContentBlocks$2 as v, POSTHOG_SDKS as y };
|
|
5275
5451
|
|
|
5276
5452
|
//# sourceMappingURL=bin.js.map
|