@posthog/wizard 2.64.1 → 2.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/dist/{add-mcp-server-to-clients-BUqb93_I.js → add-mcp-server-to-clients-ArtlMX9-.js} +5 -5
- package/dist/{add-mcp-server-to-clients-BUqb93_I.js.map → add-mcp-server-to-clients-ArtlMX9-.js.map} +1 -1
- package/dist/{agent-interface-NurnwA01.js → agent-interface-ORzGEFNM.js} +76 -11
- package/dist/agent-interface-ORzGEFNM.js.map +1 -0
- package/dist/{agent-prompt-loader-CbowPuWI.js → agent-prompt-loader-D3w6sc34.js} +10 -5
- package/dist/agent-prompt-loader-D3w6sc34.js.map +1 -0
- package/dist/{agent-runner-DisJWxJa.js → agent-runner-Ca-e2TOQ.js} +25 -18
- package/dist/{agent-runner-DisJWxJa.js.map → agent-runner-Ca-e2TOQ.js.map} +1 -1
- package/dist/analytics-C4j6grao.js +2 -0
- package/dist/{analytics-D3vKvr3l.js → analytics-zBrIVjMV.js} +2 -2
- package/dist/{analytics-D3vKvr3l.js.map → analytics-zBrIVjMV.js.map} +1 -1
- package/dist/{api-Bhe8jpUR.js → api-Wgb7AhrP.js} +3 -3
- package/dist/{api-Bhe8jpUR.js.map → api-Wgb7AhrP.js.map} +1 -1
- package/dist/bin.js +200 -76
- package/dist/bin.js.map +1 -1
- package/dist/{bounded-fs-BeWc675I.js → bounded-fs-DqsVmh4r.js} +3 -3
- package/dist/{bounded-fs-BeWc675I.js.map → bounded-fs-DqsVmh4r.js.map} +1 -1
- package/dist/{ci-install-BpNzfghY.js → ci-install-D1QqmJIc.js} +4 -4
- package/dist/{ci-install-BpNzfghY.js.map → ci-install-D1QqmJIc.js.map} +1 -1
- package/dist/{debug-hy6aWAyk.js → debug-Cm1hvkVy.js} +14 -9
- package/dist/debug-Cm1hvkVy.js.map +1 -0
- package/dist/{debug-DGfRPr2A.js → debug-CtQ13sCW.js} +1 -1
- package/dist/{defaults-mrAre0xM.js → defaults-BHhXrX9F.js} +1 -1
- package/dist/{defaults-mrAre0xM.js.map → defaults-BHhXrX9F.js.map} +1 -1
- package/dist/{env-api-key-CMPe-WJp.js → env-api-key-CdI2XZIz.js} +2 -2
- package/dist/{env-api-key-CMPe-WJp.js.map → env-api-key-CdI2XZIz.js.map} +1 -1
- package/dist/{environment-Ktu0Ktjl.js → environment-BhFvfkQg.js} +4 -4
- package/dist/{environment-Ktu0Ktjl.js.map → environment-BhFvfkQg.js.map} +1 -1
- package/dist/{file-watcher-CqJ1dgjq.js → file-watcher-Dciz09Rr.js} +2 -2
- package/dist/{file-watcher-CqJ1dgjq.js.map → file-watcher-Dciz09Rr.js.map} +1 -1
- package/dist/{headless-ui-zZLgs4QL.js → headless-ui-B4FnKm11.js} +2 -2
- package/dist/{headless-ui-zZLgs4QL.js.map → headless-ui-B4FnKm11.js.map} +1 -1
- package/dist/{interactive-BUw1SEOz.js → interactive-DxHFVYr2.js} +2 -2
- package/dist/{interactive-BUw1SEOz.js.map → interactive-DxHFVYr2.js.map} +1 -1
- package/dist/local-dev-BN6NKQ0B.js +135 -0
- package/dist/local-dev-BN6NKQ0B.js.map +1 -0
- package/dist/{mcp-prompt-streaming-CKyqqB10.js → mcp-prompt-streaming-ro98iUDc.js} +20 -4
- package/dist/mcp-prompt-streaming-ro98iUDc.js.map +1 -0
- package/dist/{mcp-C7NMhhWa.js → mcp-t0UxAPur.js} +2 -2
- package/dist/{mcp-C7NMhhWa.js.map → mcp-t0UxAPur.js.map} +1 -1
- package/dist/{non-interactive-73xGtug6.js → non-interactive-BA2L_jDT.js} +2 -2
- package/dist/{non-interactive-73xGtug6.js.map → non-interactive-BA2L_jDT.js.map} +1 -1
- package/dist/{orchestrator-tools-DcMJzfDH.js → orchestrator-tools-vZmNsHy9.js} +3 -3
- package/dist/{orchestrator-tools-DcMJzfDH.js.map → orchestrator-tools-vZmNsHy9.js.map} +1 -1
- package/dist/{package-json-CDs1ZVKu.js → package-json-D0DCWpe5.js} +1 -1
- package/dist/{package-json-CDs1ZVKu.js.map → package-json-D0DCWpe5.js.map} +1 -1
- package/dist/{package-manager-KweKX3u_.js → package-manager-DgqJdAQk.js} +58 -3
- package/dist/package-manager-DgqJdAQk.js.map +1 -0
- package/dist/{pi-B4p4gpr0.js → pi-nwrCARRp.js} +11 -11
- package/dist/{pi-B4p4gpr0.js.map → pi-nwrCARRp.js.map} +1 -1
- package/dist/{playground-AEkWcB1E.js → playground-xkEke_h0.js} +7 -7
- package/dist/{playground-AEkWcB1E.js.map → playground-xkEke_h0.js.map} +1 -1
- package/dist/{posthog-4PljLcIz.js → posthog-9To56cSd.js} +2 -2
- package/dist/{posthog-4PljLcIz.js.map → posthog-9To56cSd.js.map} +1 -1
- package/dist/{posthog-integration-DKlEg8-Q.js → posthog-integration-CoPvN6YZ.js} +34 -29
- package/dist/posthog-integration-CoPvN6YZ.js.map +1 -0
- package/dist/{provisioning-QsG7HDCm.js → provisioning-BYFSHSHY.js} +3 -3
- package/dist/{provisioning-QsG7HDCm.js.map → provisioning-BYFSHSHY.js.map} +1 -1
- package/dist/{queue-tools-Jlz9dV_B.js → queue-tools-BREbgGSC.js} +3 -3
- package/dist/{queue-tools-Jlz9dV_B.js.map → queue-tools-BREbgGSC.js.map} +1 -1
- package/dist/{registry-PG_nV5Bf.js → registry-DGJQ_8QI.js} +309 -6
- package/dist/registry-DGJQ_8QI.js.map +1 -0
- package/dist/{security-BKUJk-Gg.js → security-wc-naGq5.js} +5 -5
- package/dist/{security-BKUJk-Gg.js.map → security-wc-naGq5.js.map} +1 -1
- package/dist/{setup-utils-DNpldqge.js → setup-utils-Cz0wPLsQ.js} +18 -13
- package/dist/setup-utils-Cz0wPLsQ.js.map +1 -0
- package/dist/smoke-test-ci.sh +12 -1
- package/dist/{start-tui-D4B0-2nr.js → start-tui-DDW9uVnD.js} +114 -25
- package/dist/start-tui-DDW9uVnD.js.map +1 -0
- package/dist/{steps-Dy0AXdGo.js → steps-CZI0B24_.js} +7 -7
- package/dist/{steps-Dy0AXdGo.js.map → steps-CZI0B24_.js.map} +1 -1
- package/dist/{store-DouLLelV.js → store-xMkU8xAa.js} +20 -6
- package/dist/store-xMkU8xAa.js.map +1 -0
- package/dist/{subagent-B4yVs5A2.js → subagent-BztacyoV.js} +2 -2
- package/dist/{subagent-B4yVs5A2.js.map → subagent-BztacyoV.js.map} +1 -1
- package/dist/{task-DRKYEbKM.js → task-CJ7x3McC.js} +29 -18
- package/dist/task-CJ7x3McC.js.map +1 -0
- package/dist/{task-stream-BGUP7yA-.js → task-stream-BK7JQ27G.js} +5 -5
- package/dist/{task-stream-BGUP7yA-.js.map → task-stream-BK7JQ27G.js.map} +1 -1
- package/dist/{tasks-B2GzXsZ0.js → tasks-FGzp_zBd.js} +2 -2
- package/dist/{tasks-B2GzXsZ0.js.map → tasks-FGzp_zBd.js.map} +1 -1
- package/dist/{telemetry-6zaFfCcy.js → telemetry-By56gAtF.js} +3 -3
- package/dist/{telemetry-6zaFfCcy.js.map → telemetry-By56gAtF.js.map} +1 -1
- package/dist/{terminal-Bu3eHFn0.js → terminal-C_rmkaku.js} +39 -31
- package/dist/terminal-C_rmkaku.js.map +1 -0
- package/dist/{tools-DQO5tKJg.js → tools-BpCJgMez.js} +7 -7
- package/dist/tools-BpCJgMez.js.map +1 -0
- package/dist/{wizard-abort-PgTdRS1l.js → wizard-abort-BlDla_Jd.js} +1 -1
- package/dist/{wizard-abort-D6jJh8u5.js → wizard-abort-CzwID162.js} +4 -4
- package/dist/{wizard-abort-D6jJh8u5.js.map → wizard-abort-CzwID162.js.map} +1 -1
- package/dist/{wizard-session-BUhlJ1b8.js → wizard-session-Bn6dO1gE.js} +16 -3
- package/dist/wizard-session-Bn6dO1gE.js.map +1 -0
- package/dist/{wizard-session-DZUDtS5d.js → wizard-session-UxA_A0cA.js} +1 -1
- package/dist/{yara-hooks-DjReXmTQ.js → yara-hooks-BrisBebM.js} +4 -4
- package/dist/{yara-hooks-DjReXmTQ.js.map → yara-hooks-BrisBebM.js.map} +1 -1
- package/dist/yara-hooks-D2B7Fd9G.js +2 -0
- package/package.json +1 -1
- package/dist/agent-interface-NurnwA01.js.map +0 -1
- package/dist/agent-prompt-loader-CbowPuWI.js.map +0 -1
- package/dist/analytics-hNca7GLq.js +0 -2
- package/dist/debug-hy6aWAyk.js.map +0 -1
- package/dist/mcp-prompt-streaming-CKyqqB10.js.map +0 -1
- package/dist/package-manager-KweKX3u_.js.map +0 -1
- package/dist/posthog-integration-DKlEg8-Q.js.map +0 -1
- package/dist/registry-PG_nV5Bf.js.map +0 -1
- package/dist/setup-utils-DNpldqge.js.map +0 -1
- package/dist/start-tui-D4B0-2nr.js.map +0 -1
- package/dist/store-DouLLelV.js.map +0 -1
- package/dist/task-DRKYEbKM.js.map +0 -1
- package/dist/terminal-Bu3eHFn0.js.map +0 -1
- package/dist/tools-DQO5tKJg.js.map +0 -1
- package/dist/wizard-session-BUhlJ1b8.js.map +0 -1
- package/dist/yara-hooks-CN_uFGCu.js +0 -2
package/dist/bin.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Ct as isHeadless, L as Integration, St as headlessOption, U as POSTHOG_DOCS_URL, a as getLogFilePath, f as getUI, gt as VERSION, m as LoggingUI, mt as getSkillsBaseUrl, p as setUI, pt as WIZARD_USER_AGENT, r as debug, s as logToFile, wt as regionOption } from "./debug-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import "./
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { n as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { n as
|
|
2
|
+
import { Ct as isHeadless, L as Integration, St as headlessOption, U as POSTHOG_DOCS_URL, a as getLogFilePath, f as getUI, gt as VERSION, m as LoggingUI, mt as getSkillsBaseUrl, p as setUI, pt as WIZARD_USER_AGENT, r as debug, s as logToFile, wt as regionOption } from "./debug-Cm1hvkVy.js";
|
|
3
|
+
import { a as getLocalDev, i as checkLocalServices, o as initLocalDev, r as POSTHOG_LOCAL_URL, s as localMcpSkillsNotice } from "./local-dev-BN6NKQ0B.js";
|
|
4
|
+
import { n as analytics } from "./analytics-zBrIVjMV.js";
|
|
5
|
+
import { r as setEntryCommand } from "./telemetry-By56gAtF.js";
|
|
6
|
+
import { a as safeReadFile, o as walkProjectFiles } from "./bounded-fs-DqsVmh4r.js";
|
|
7
|
+
import { n as isUsingTypeScript } from "./setup-utils-Cz0wPLsQ.js";
|
|
8
|
+
import { o as handleApiError } from "./api-Wgb7AhrP.js";
|
|
9
|
+
import "./wizard-session-Bn6dO1gE.js";
|
|
10
|
+
import { i as wizardAbort, r as runCleanups } from "./wizard-abort-CzwID162.js";
|
|
11
|
+
import { n as isNonInteractiveEnvironment } from "./environment-BhFvfkQg.js";
|
|
12
|
+
import { n as runAgent, s as authenticate } from "./agent-runner-Ca-e2TOQ.js";
|
|
13
|
+
import { p as writeJsonAtomic } from "./queue-tools-BREbgGSC.js";
|
|
14
|
+
import { C as WIZARD_TOOL_NAMES, E as fetchSkillMenu, l as recoverOrphanedSettingsBackups, p as AgentSignals } from "./agent-interface-ORzGEFNM.js";
|
|
15
|
+
import { S as SETUP_REPORT_FILE, _ as AUDIT_CHECKS_KEY, g as AUDIT_CHECKS_FILE, v as AUDIT_REPORT_FILE } from "./yara-hooks-BrisBebM.js";
|
|
16
|
+
import { i as SPINNER_MESSAGE, t as FRAMEWORK_REGISTRY } from "./registry-DGJQ_8QI.js";
|
|
17
|
+
import { C as scopeInstallDirToProject, D as detectFramework, E as gatherFrameworkContext, S as detectIntegrationProjects, T as resolveProjectDir, _ as HEALTH_CHECK_STEP, a as LINE_CHART_BLOCK, b as getDetectedWarehouseSources, d as isClearBlock, g as detectPostHogIntegration, h as Icons, i as FUNNEL_BLOCK, m as Colors, n as integrationRunStep, o as PRODUCT_SUITE_BLOCK, r as posthogIntegrationConfig, s as StatusPeekTrigger, u as wordWrap, v as WAREHOUSE_ABORT_CASES, x as detectWarehouseSources, y as detectWarehousePrerequisites } from "./posthog-integration-CoPvN6YZ.js";
|
|
18
|
+
import { n as readApiKeyFromEnv } from "./env-api-key-CdI2XZIz.js";
|
|
18
19
|
import { satisfies } from "semver";
|
|
19
20
|
import yargs from "yargs";
|
|
20
21
|
import { hideBin } from "yargs/helpers";
|
|
@@ -66,8 +67,9 @@ function toCommandModule(cmd, parentPath) {
|
|
|
66
67
|
* `POSTHOG_WIZARD` env prefix as well as flags.
|
|
67
68
|
*
|
|
68
69
|
* Options with `hidden: true` are "internal modes" — they don't show up in
|
|
69
|
-
* `--help` but are still accepted on every command. The
|
|
70
|
-
*
|
|
70
|
+
* `--help` but are still accepted on every command. The `--local-*` flags live
|
|
71
|
+
* in the constructor's `!IS_PRODUCTION_BUILD` block instead, so published
|
|
72
|
+
* builds reject them; see `docs/local-dev.md`.
|
|
71
73
|
*/
|
|
72
74
|
const GLOBAL_OPTIONS = {
|
|
73
75
|
debug: {
|
|
@@ -97,12 +99,6 @@ const GLOBAL_OPTIONS = {
|
|
|
97
99
|
describe: "Email address for signup (used with --signup)\nenv: POSTHOG_WIZARD_EMAIL",
|
|
98
100
|
type: "string"
|
|
99
101
|
},
|
|
100
|
-
"local-mcp": {
|
|
101
|
-
default: false,
|
|
102
|
-
describe: "Use local MCP server at http://localhost:8787/mcp\nenv: POSTHOG_WIZARD_LOCAL_MCP",
|
|
103
|
-
type: "boolean",
|
|
104
|
-
hidden: true
|
|
105
|
-
},
|
|
106
102
|
"base-url": {
|
|
107
103
|
describe: "Override the PostHog base URL (e.g. http://localhost:8010), bypassing region resolution. Pins the API host, cloud URL, and OAuth server.\nenv: POSTHOG_WIZARD_BASE_URL",
|
|
108
104
|
type: "string",
|
|
@@ -125,7 +121,15 @@ var Wizard = class Wizard {
|
|
|
125
121
|
cli;
|
|
126
122
|
constructor() {
|
|
127
123
|
let cli = yargs(hideBin(process.argv)).env("POSTHOG_WIZARD").options(GLOBAL_OPTIONS);
|
|
128
|
-
this.cli = cli.
|
|
124
|
+
this.cli = cli.middleware((argv) => {
|
|
125
|
+
initLocalDev(argv);
|
|
126
|
+
const notice = localMcpSkillsNotice({
|
|
127
|
+
localDev: argv.localDev,
|
|
128
|
+
localMcp: argv.localMcp,
|
|
129
|
+
localContextMill: argv.localContextMill
|
|
130
|
+
});
|
|
131
|
+
if (notice) process.stderr.write(`\n\x1b[33m! ${notice}\x1b[0m\n\n`);
|
|
132
|
+
}).strictOptions().strictCommands().fail((msg, err) => {
|
|
129
133
|
const text = msg || err && err.message || "Invalid arguments";
|
|
130
134
|
process.stderr.write(`\n\x1b[1;91m✖ ${text}\x1b[0m\n Run \`wizard --help\` to see available commands and options.\n\n`);
|
|
131
135
|
process.exit(1);
|
|
@@ -156,10 +160,29 @@ var Wizard = class Wizard {
|
|
|
156
160
|
process.stderr.write(`\n\x1b[1;91m✖ The --harness, --sequence, --model, and --capture-aio overrides are not available in published builds.\x1b[0m\n\n`);
|
|
157
161
|
process.exit(1);
|
|
158
162
|
}
|
|
163
|
+
const argvHasLocalTarget = args.some((a) => LOCAL_TARGET_FLAGS.some((f) => a === `--${f}` || a === `--no-${f}` || a.startsWith(`--${f}=`)));
|
|
164
|
+
const envHasLocalTarget = LOCAL_TARGET_ENV_VARS.some((k) => process.env[k] != null && process.env[k] !== "");
|
|
165
|
+
if (argvHasLocalTarget || envHasLocalTarget) {
|
|
166
|
+
process.stderr.write("\n\x1B[1;91m✖ The --local-dev, --local-context-mill, --local-mcp, and --local-posthog targets are not available in published builds.\x1B[0m\n They point the wizard at development servers on localhost.\n\n");
|
|
167
|
+
process.exit(1);
|
|
168
|
+
}
|
|
159
169
|
}
|
|
160
170
|
this.cli.wrap(process.stdout.isTTY ? this.cli.terminalWidth() : 80).argv;
|
|
161
171
|
}
|
|
162
172
|
};
|
|
173
|
+
/** Excludes bare `local`: `wizard mcp add --local` stays available in prod. */
|
|
174
|
+
const LOCAL_TARGET_FLAGS = [
|
|
175
|
+
"local-dev",
|
|
176
|
+
"local-context-mill",
|
|
177
|
+
"local-mcp",
|
|
178
|
+
"local-posthog"
|
|
179
|
+
];
|
|
180
|
+
const LOCAL_TARGET_ENV_VARS = [
|
|
181
|
+
"POSTHOG_WIZARD_LOCAL_DEV",
|
|
182
|
+
"POSTHOG_WIZARD_LOCAL_CONTEXT_MILL",
|
|
183
|
+
"POSTHOG_WIZARD_LOCAL_MCP",
|
|
184
|
+
"POSTHOG_WIZARD_LOCAL_POSTHOG"
|
|
185
|
+
];
|
|
163
186
|
//#endregion
|
|
164
187
|
//#region src/commands/provision.ts
|
|
165
188
|
const provisionCommand = {
|
|
@@ -202,7 +225,7 @@ function runProvision(argv) {
|
|
|
202
225
|
}
|
|
203
226
|
async function provision({ email, region, name, baseUrl, jsonMode }) {
|
|
204
227
|
try {
|
|
205
|
-
const { provisionNewAccount } = await import("./provisioning-
|
|
228
|
+
const { provisionNewAccount } = await import("./provisioning-BYFSHSHY.js").then((n) => n.r);
|
|
206
229
|
if (!jsonMode) getUI().log.info(`Provisioning account for ${email} in ${region}...`);
|
|
207
230
|
emitResult(await provisionNewAccount(email, name, region, { baseUrl }), jsonMode);
|
|
208
231
|
process.exit(0);
|
|
@@ -269,22 +292,22 @@ const basicIntegrationCommand = {
|
|
|
269
292
|
setEntryCommand("integrate");
|
|
270
293
|
(async () => {
|
|
271
294
|
if (isHeadless(argv)) {
|
|
272
|
-
const { runHeadlessInstall } = await import("./ci-install-
|
|
295
|
+
const { runHeadlessInstall } = await import("./ci-install-D1QqmJIc.js");
|
|
273
296
|
return runHeadlessInstall(argv);
|
|
274
297
|
}
|
|
275
298
|
if (argv.ci) {
|
|
276
|
-
const { runCIInstall } = await import("./ci-install-
|
|
299
|
+
const { runCIInstall } = await import("./ci-install-D1QqmJIc.js");
|
|
277
300
|
return runCIInstall(argv);
|
|
278
301
|
}
|
|
279
302
|
if (isNonInteractiveEnvironment()) {
|
|
280
|
-
const { failNonInteractive } = await import("./non-interactive-
|
|
303
|
+
const { failNonInteractive } = await import("./non-interactive-BA2L_jDT.js");
|
|
281
304
|
return failNonInteractive();
|
|
282
305
|
}
|
|
283
306
|
if (argv.playground) {
|
|
284
|
-
const { runPlayground } = await import("./playground-
|
|
307
|
+
const { runPlayground } = await import("./playground-xkEke_h0.js");
|
|
285
308
|
return runPlayground();
|
|
286
309
|
}
|
|
287
|
-
const { runInteractive } = await import("./interactive-
|
|
310
|
+
const { runInteractive } = await import("./interactive-DxHFVYr2.js");
|
|
288
311
|
runInteractive(argv);
|
|
289
312
|
})();
|
|
290
313
|
}
|
|
@@ -2936,7 +2959,10 @@ function toIntegrationReport(report) {
|
|
|
2936
2959
|
}
|
|
2937
2960
|
/** Run the Haiku detector over the repo and classify projects for integration. */
|
|
2938
2961
|
async function detectSelfDrivingIntegrationProjects(session, onEvent) {
|
|
2939
|
-
return toIntegrationReport(await detectIntegrationProjects(session, {
|
|
2962
|
+
return toIntegrationReport(await detectIntegrationProjects(session, {
|
|
2963
|
+
programId: "self-driving",
|
|
2964
|
+
onEvent
|
|
2965
|
+
}));
|
|
2940
2966
|
}
|
|
2941
2967
|
/**
|
|
2942
2968
|
* Prepare the integration phase after the user picked a project on the
|
|
@@ -2952,9 +2978,7 @@ async function prepSelfDrivingIntegration(session) {
|
|
|
2952
2978
|
const context = await gatherFrameworkContext(frameworkConfig, {
|
|
2953
2979
|
installDir: session.installDir,
|
|
2954
2980
|
debug: session.debug,
|
|
2955
|
-
default: false,
|
|
2956
2981
|
signup: session.signup,
|
|
2957
|
-
localMcp: session.localMcp,
|
|
2958
2982
|
ci: session.ci,
|
|
2959
2983
|
benchmark: session.benchmark,
|
|
2960
2984
|
yaraReport: session.yaraReport
|
|
@@ -3773,7 +3797,8 @@ const mcpAddConfig = {
|
|
|
3773
3797
|
label: "Suggested prompts",
|
|
3774
3798
|
screenId: "mcp-suggested-prompts",
|
|
3775
3799
|
show: (s) => s.mcpOutcome === "installed",
|
|
3776
|
-
isComplete: (s) => s.mcpSuggestedPromptsDismissed
|
|
3800
|
+
isComplete: (s) => s.mcpSuggestedPromptsDismissed,
|
|
3801
|
+
reportsAsProgramId: "mcp-tutorial"
|
|
3777
3802
|
}
|
|
3778
3803
|
]
|
|
3779
3804
|
};
|
|
@@ -4006,9 +4031,7 @@ const replayVisionConfig = {
|
|
|
4006
4031
|
const context = await gatherFrameworkContext(frameworkConfig, {
|
|
4007
4032
|
installDir: session.installDir,
|
|
4008
4033
|
debug: session.debug,
|
|
4009
|
-
default: false,
|
|
4010
4034
|
signup: session.signup,
|
|
4011
|
-
localMcp: session.localMcp,
|
|
4012
4035
|
ci: true,
|
|
4013
4036
|
benchmark: session.benchmark,
|
|
4014
4037
|
yaraReport: session.yaraReport
|
|
@@ -4072,6 +4095,70 @@ final report is written to ./${AI_OBSERVABILITY_REPORT_FILE}.`,
|
|
|
4072
4095
|
}
|
|
4073
4096
|
};
|
|
4074
4097
|
//#endregion
|
|
4098
|
+
//#region src/lib/programs/metrics/index.ts
|
|
4099
|
+
const METRICS_STEPS = AGENT_SKILL_STEPS.map((step) => step.id === "intro" ? {
|
|
4100
|
+
...step,
|
|
4101
|
+
screenId: "metrics-intro"
|
|
4102
|
+
} : step);
|
|
4103
|
+
const METRICS_REPORT_FILE = "posthog-metrics-report.md";
|
|
4104
|
+
/**
|
|
4105
|
+
* `wizard metrics` — instrument the project with PostHog application metrics
|
|
4106
|
+
* (`posthog.metrics` counters, gauges, and histograms).
|
|
4107
|
+
*
|
|
4108
|
+
* No `run.skillId`: the context-mill `metrics` group ships one variant per
|
|
4109
|
+
* platform (python, nodejs, javascript, kubernetes, other/OTLP) and the agent
|
|
4110
|
+
* pulls the matching one itself — the flow's tasks and the linear
|
|
4111
|
+
* `customPrompt` both pick from the menu and install it. Stays flat while a
|
|
4112
|
+
* single "add metrics to a project" flow is the only action.
|
|
4113
|
+
*/
|
|
4114
|
+
const metricsConfig = {
|
|
4115
|
+
command: "metrics",
|
|
4116
|
+
description: "Add PostHog application metrics to your project",
|
|
4117
|
+
id: "metrics",
|
|
4118
|
+
agentFlow: "metrics",
|
|
4119
|
+
steps: METRICS_STEPS,
|
|
4120
|
+
reportFile: METRICS_REPORT_FILE,
|
|
4121
|
+
getContentBlocks: getContentBlocks$3,
|
|
4122
|
+
run: {
|
|
4123
|
+
integrationLabel: "metrics",
|
|
4124
|
+
customPrompt: () => `Instrument this project with PostHog application metrics.
|
|
4125
|
+
|
|
4126
|
+
This flow has no pre-installed skill — you install the right one yourself:
|
|
4127
|
+
|
|
4128
|
+
1. Call \`load_skill_menu\` with \`category: "metrics"\`. The menu is the
|
|
4129
|
+
source of truth: one variant per platform.
|
|
4130
|
+
|
|
4131
|
+
2. Pick the variant that matches the project:
|
|
4132
|
+
- Python tooling (\`pyproject.toml\`, \`requirements.txt\`, \`Pipfile\`) →
|
|
4133
|
+
\`metrics-python\` (needs \`posthog\` >= 7.23.0)
|
|
4134
|
+
- \`package.json\` with server-side Node code → \`metrics-nodejs\`
|
|
4135
|
+
(needs \`posthog-node\` >= 5.43.0)
|
|
4136
|
+
- \`package.json\` that is browser-only → \`metrics-javascript\`
|
|
4137
|
+
(needs \`posthog-js\` >= 1.399.0)
|
|
4138
|
+
- Kubernetes manifests / Helm charts and the user wants cluster-level
|
|
4139
|
+
scraping → \`metrics-kubernetes\`
|
|
4140
|
+
- Any other language → \`metrics-other\` (plain OTLP exporter)
|
|
4141
|
+
A full-stack app (e.g. Next.js) usually wants the server variant — metrics
|
|
4142
|
+
measure service work, not user actions. Genuinely ambiguous →
|
|
4143
|
+
\`wizard_ask\` with a multi-choice picker.
|
|
4144
|
+
|
|
4145
|
+
3. Call \`install_skill\` with the picked variant id. Then follow that skill's
|
|
4146
|
+
\`SKILL.md\` and references end-to-end — it covers where to place metrics
|
|
4147
|
+
(middleware, background jobs, external calls, business commit sites) and
|
|
4148
|
+
the low-cardinality attribute rules.
|
|
4149
|
+
|
|
4150
|
+
Make only additive changes — reuse an existing PostHog client by adding the
|
|
4151
|
+
\`metrics\` config to it rather than constructing a second client, and do not
|
|
4152
|
+
touch existing identify calls, event capture, or dashboards. The final report
|
|
4153
|
+
is written to ./${METRICS_REPORT_FILE}.`,
|
|
4154
|
+
successMessage: `Application metrics configured! View the report at ./${METRICS_REPORT_FILE}`,
|
|
4155
|
+
reportFile: METRICS_REPORT_FILE,
|
|
4156
|
+
docsUrl: "https://posthog.com/docs/metrics",
|
|
4157
|
+
spinnerMessage: "Setting up application metrics...",
|
|
4158
|
+
estimatedDurationMinutes: 5
|
|
4159
|
+
}
|
|
4160
|
+
};
|
|
4161
|
+
//#endregion
|
|
4075
4162
|
//#region src/lib/programs/slack/index.ts
|
|
4076
4163
|
const slackConnectConfig = {
|
|
4077
4164
|
id: "slack",
|
|
@@ -4122,6 +4209,7 @@ const PROGRAM_REGISTRY = [
|
|
|
4122
4209
|
mcpAnalyticsConfig,
|
|
4123
4210
|
replayVisionConfig,
|
|
4124
4211
|
aiObservabilityConfig,
|
|
4212
|
+
metricsConfig,
|
|
4125
4213
|
slackConnectConfig
|
|
4126
4214
|
];
|
|
4127
4215
|
/**
|
|
@@ -4147,6 +4235,7 @@ const Program = {
|
|
|
4147
4235
|
McpAnalytics: mcpAnalyticsConfig.id,
|
|
4148
4236
|
ReplayVision: replayVisionConfig.id,
|
|
4149
4237
|
AiObservability: aiObservabilityConfig.id,
|
|
4238
|
+
Metrics: metricsConfig.id,
|
|
4150
4239
|
SlackConnect: slackConnectConfig.id
|
|
4151
4240
|
};
|
|
4152
4241
|
/**
|
|
@@ -4193,13 +4282,13 @@ const mcpAddCommand = {
|
|
|
4193
4282
|
function runMcpAdd(argv) {
|
|
4194
4283
|
const features = parseFeatures(argv.features);
|
|
4195
4284
|
(async () => {
|
|
4196
|
-
const { readApiKeyFromEnv } = await import("./env-api-key-
|
|
4285
|
+
const { readApiKeyFromEnv } = await import("./env-api-key-CdI2XZIz.js").then((n) => n.t);
|
|
4197
4286
|
const apiKey = argv.apiKey || readApiKeyFromEnv();
|
|
4198
4287
|
const debug = argv.debug;
|
|
4199
4288
|
const localMcp = argv.local;
|
|
4200
4289
|
try {
|
|
4201
|
-
const { startTUI } = await import("./start-tui-
|
|
4202
|
-
const { buildSession } = await import("./wizard-session-
|
|
4290
|
+
const { startTUI } = await import("./start-tui-DDW9uVnD.js");
|
|
4291
|
+
const { buildSession } = await import("./wizard-session-UxA_A0cA.js");
|
|
4203
4292
|
const tui = startTUI(VERSION, Program.McpAdd);
|
|
4204
4293
|
tui.store.session = buildSession({
|
|
4205
4294
|
debug,
|
|
@@ -4211,7 +4300,7 @@ function runMcpAdd(argv) {
|
|
|
4211
4300
|
} catch (error) {
|
|
4212
4301
|
if (!isTUIUnavailable(error)) throw error;
|
|
4213
4302
|
setUI(new LoggingUI());
|
|
4214
|
-
const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-
|
|
4303
|
+
const { addMCPServerToClientsStep } = await import("./add-mcp-server-to-clients-ArtlMX9-.js").then((n) => n.r);
|
|
4215
4304
|
await addMCPServerToClientsStep({
|
|
4216
4305
|
local: localMcp,
|
|
4217
4306
|
features,
|
|
@@ -4241,8 +4330,8 @@ function runMcpRemove(argv) {
|
|
|
4241
4330
|
const debug = argv.debug;
|
|
4242
4331
|
const localMcp = argv.local;
|
|
4243
4332
|
try {
|
|
4244
|
-
const { startTUI } = await import("./start-tui-
|
|
4245
|
-
const { buildSession } = await import("./wizard-session-
|
|
4333
|
+
const { startTUI } = await import("./start-tui-DDW9uVnD.js");
|
|
4334
|
+
const { buildSession } = await import("./wizard-session-UxA_A0cA.js");
|
|
4246
4335
|
const tui = startTUI(VERSION, Program.McpRemove);
|
|
4247
4336
|
tui.store.session = buildSession({
|
|
4248
4337
|
debug,
|
|
@@ -4252,7 +4341,7 @@ function runMcpRemove(argv) {
|
|
|
4252
4341
|
} catch (error) {
|
|
4253
4342
|
if (!isTUIUnavailable(error)) throw error;
|
|
4254
4343
|
setUI(new LoggingUI());
|
|
4255
|
-
const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-
|
|
4344
|
+
const { removeMCPServerFromClientsStep } = await import("./add-mcp-server-to-clients-ArtlMX9-.js").then((n) => n.r);
|
|
4256
4345
|
await removeMCPServerFromClientsStep({ local: localMcp });
|
|
4257
4346
|
}
|
|
4258
4347
|
})();
|
|
@@ -4274,8 +4363,8 @@ function runMcpTutorial(argv) {
|
|
|
4274
4363
|
const debug = argv.debug;
|
|
4275
4364
|
const localMcp = argv.local;
|
|
4276
4365
|
try {
|
|
4277
|
-
const { startTUI } = await import("./start-tui-
|
|
4278
|
-
const { buildSession } = await import("./wizard-session-
|
|
4366
|
+
const { startTUI } = await import("./start-tui-DDW9uVnD.js");
|
|
4367
|
+
const { buildSession } = await import("./wizard-session-UxA_A0cA.js");
|
|
4279
4368
|
const tui = startTUI(VERSION, Program.McpTutorial);
|
|
4280
4369
|
tui.store.session = buildSession({
|
|
4281
4370
|
debug,
|
|
@@ -4356,15 +4445,27 @@ function runWizard(config, options) {
|
|
|
4356
4445
|
(async () => {
|
|
4357
4446
|
try {
|
|
4358
4447
|
const installDir = options.installDir || process.cwd();
|
|
4359
|
-
const { startTUI } = await import("./start-tui-
|
|
4360
|
-
const { buildSession, RunPhase } = await import("./wizard-session-
|
|
4361
|
-
const { TaskStreamPush } = await import("./task-stream-
|
|
4362
|
-
const { PostHogDestination } = await import("./posthog-
|
|
4448
|
+
const { startTUI } = await import("./start-tui-DDW9uVnD.js");
|
|
4449
|
+
const { buildSession, RunPhase } = await import("./wizard-session-UxA_A0cA.js");
|
|
4450
|
+
const { TaskStreamPush } = await import("./task-stream-BK7JQ27G.js");
|
|
4451
|
+
const { PostHogDestination } = await import("./posthog-9To56cSd.js");
|
|
4452
|
+
const local = getLocalDev();
|
|
4453
|
+
const localServicesError = await checkLocalServices({
|
|
4454
|
+
...local,
|
|
4455
|
+
localPosthog: local.localPosthog && !options.baseUrl
|
|
4456
|
+
});
|
|
4457
|
+
if (localServicesError) {
|
|
4458
|
+
const { wizardAbort } = await import("./wizard-abort-BlDla_Jd.js");
|
|
4459
|
+
await wizardAbort({ message: localServicesError });
|
|
4460
|
+
return;
|
|
4461
|
+
}
|
|
4363
4462
|
tui = startTUI(WIZARD_VERSION, config.id);
|
|
4364
4463
|
const activeTui = tui;
|
|
4365
4464
|
const session = buildSession({
|
|
4366
4465
|
debug: options.debug,
|
|
4466
|
+
localDev: options.localDev,
|
|
4367
4467
|
localMcp: options.localMcp,
|
|
4468
|
+
localPosthog: options.localPosthog,
|
|
4368
4469
|
installDir,
|
|
4369
4470
|
ci: false,
|
|
4370
4471
|
signup: options.signup,
|
|
@@ -4425,7 +4526,7 @@ function runWizard(config, options) {
|
|
|
4425
4526
|
if (shown(step)) await advanceStep(step, activeTui.store, config);
|
|
4426
4527
|
}
|
|
4427
4528
|
else if (skipAgent) {
|
|
4428
|
-
const { getOrAskForProjectData } = await import("./setup-utils-
|
|
4529
|
+
const { getOrAskForProjectData } = await import("./setup-utils-Cz0wPLsQ.js").then((n) => n.r);
|
|
4429
4530
|
const { projectApiKey, host, accessToken, projectId } = await getOrAskForProjectData({
|
|
4430
4531
|
signup: session.signup,
|
|
4431
4532
|
ci: session.ci,
|
|
@@ -4526,11 +4627,11 @@ function runNonInteractive(config, options, mode) {
|
|
|
4526
4627
|
analytics.setTag("build", mode);
|
|
4527
4628
|
(async () => {
|
|
4528
4629
|
const path = await import("path");
|
|
4529
|
-
const { buildSession, RunPhase, OutroKind } = await import("./wizard-session-
|
|
4530
|
-
const { readEnvironment } = await import("./environment-
|
|
4531
|
-
const { readApiKeyFromEnv } = await import("./env-api-key-
|
|
4532
|
-
const { configureLogFileFromEnvironment, logToFile } = await import("./debug-
|
|
4533
|
-
const { wizardAbort, WizardError } = await import("./wizard-abort-
|
|
4630
|
+
const { buildSession, RunPhase, OutroKind } = await import("./wizard-session-UxA_A0cA.js");
|
|
4631
|
+
const { readEnvironment } = await import("./environment-BhFvfkQg.js").then((n) => n.t);
|
|
4632
|
+
const { readApiKeyFromEnv } = await import("./env-api-key-CdI2XZIz.js").then((n) => n.t);
|
|
4633
|
+
const { configureLogFileFromEnvironment, logToFile } = await import("./debug-CtQ13sCW.js");
|
|
4634
|
+
const { wizardAbort, WizardError } = await import("./wizard-abort-BlDla_Jd.js");
|
|
4534
4635
|
configureLogFileFromEnvironment();
|
|
4535
4636
|
const env = readEnvironment();
|
|
4536
4637
|
const apiKey = options.apiKey ?? readApiKeyFromEnv() ?? void 0;
|
|
@@ -4540,7 +4641,9 @@ function runNonInteractive(config, options, mode) {
|
|
|
4540
4641
|
installDir,
|
|
4541
4642
|
ci: true,
|
|
4542
4643
|
signup: options.signup,
|
|
4644
|
+
localDev: options.localDev,
|
|
4543
4645
|
localMcp: options.localMcp,
|
|
4646
|
+
localPosthog: options.localPosthog,
|
|
4544
4647
|
apiKey,
|
|
4545
4648
|
email: options.email,
|
|
4546
4649
|
projectId: options.projectId,
|
|
@@ -4560,12 +4663,21 @@ function runNonInteractive(config, options, mode) {
|
|
|
4560
4663
|
const runDef = typeof config.run === "object" ? config.run : null;
|
|
4561
4664
|
getUI().intro("Welcome to the PostHog setup wizard");
|
|
4562
4665
|
getUI().log.info(`Running ${config.id} in ${modeLabel(mode)} mode`);
|
|
4666
|
+
const localServicesError = await checkLocalServices({
|
|
4667
|
+
...getLocalDev(),
|
|
4668
|
+
localMcp: session.localMcp,
|
|
4669
|
+
localPosthog: session.baseUrl === POSTHOG_LOCAL_URL
|
|
4670
|
+
});
|
|
4671
|
+
if (localServicesError) {
|
|
4672
|
+
await wizardAbort({ message: localServicesError });
|
|
4673
|
+
return;
|
|
4674
|
+
}
|
|
4563
4675
|
let store = null;
|
|
4564
4676
|
let taskStream = null;
|
|
4565
4677
|
if (mode === "headless") {
|
|
4566
|
-
const { WizardStore } = await import("./store-
|
|
4567
|
-
const { HeadlessUI } = await import("./headless-ui-
|
|
4568
|
-
const { TaskStreamPush, PostHogDestination } = await import("./task-stream-
|
|
4678
|
+
const { WizardStore } = await import("./store-xMkU8xAa.js").then((n) => n.n);
|
|
4679
|
+
const { HeadlessUI } = await import("./headless-ui-B4FnKm11.js");
|
|
4680
|
+
const { TaskStreamPush, PostHogDestination } = await import("./task-stream-BK7JQ27G.js");
|
|
4569
4681
|
store = new WizardStore(config.id);
|
|
4570
4682
|
store.session = session;
|
|
4571
4683
|
setUI(new HeadlessUI(store));
|
|
@@ -4621,7 +4733,7 @@ function runNonInteractive(config, options, mode) {
|
|
|
4621
4733
|
});
|
|
4622
4734
|
}
|
|
4623
4735
|
}
|
|
4624
|
-
const { runAgent } = await import("./agent-runner-
|
|
4736
|
+
const { runAgent } = await import("./agent-runner-Ca-e2TOQ.js").then((n) => n.t);
|
|
4625
4737
|
await runAgent(config, session);
|
|
4626
4738
|
await settleStream(RunPhase.Completed);
|
|
4627
4739
|
} catch (error) {
|
|
@@ -4675,10 +4787,9 @@ function runWizardHeadless(config, options) {
|
|
|
4675
4787
|
* Per-command options shared by every skill-based program command
|
|
4676
4788
|
* (`audit events`, `migrate statsig`, `revenue`, `source-maps`, …).
|
|
4677
4789
|
*
|
|
4678
|
-
* Only flags
|
|
4679
|
-
*
|
|
4680
|
-
*
|
|
4681
|
-
* across every command — no need to repeat them per subcommand.
|
|
4790
|
+
* Only flags unique to skill commands live here. Global flags are declared
|
|
4791
|
+
* once in `wizard.ts` — both in `GLOBAL_OPTIONS` and, for the dev-only ones,
|
|
4792
|
+
* the `Wizard` constructor — and apply to every command automatically.
|
|
4682
4793
|
*/
|
|
4683
4794
|
const skillProgramOptions = { "install-dir": {
|
|
4684
4795
|
describe: "Directory to install in",
|
|
@@ -4790,6 +4901,19 @@ const replayVisionCommand = nativeCommandFactory(replayVisionConfig);
|
|
|
4790
4901
|
*/
|
|
4791
4902
|
const aiObservabilityCommand = nativeCommandFactory(aiObservabilityConfig);
|
|
4792
4903
|
//#endregion
|
|
4904
|
+
//#region src/commands/metrics.ts
|
|
4905
|
+
/**
|
|
4906
|
+
* `wizard metrics` — flat skill command, wire PostHog application metrics
|
|
4907
|
+
* (counters, gauges, histograms via \`posthog.metrics\`) into a project.
|
|
4908
|
+
*
|
|
4909
|
+
* The `metrics` context-mill skill has one variant per platform (python,
|
|
4910
|
+
* nodejs, javascript, kubernetes, other/OTLP); the agent picks the right one
|
|
4911
|
+
* at run time by scanning the project's manifest and (when ambiguous) asking
|
|
4912
|
+
* the user via `wizard_ask`. Stays flat while a single "add metrics to a
|
|
4913
|
+
* project" flow is the only action.
|
|
4914
|
+
*/
|
|
4915
|
+
const metricsCommand = nativeCommandFactory(metricsConfig);
|
|
4916
|
+
//#endregion
|
|
4793
4917
|
//#region src/lib/programs/dispatch-family.ts
|
|
4794
4918
|
/**
|
|
4795
4919
|
* Capture a CLI dispatch error, flush analytics, and exit. The wizard never
|
|
@@ -4852,7 +4976,7 @@ async function dispatchFamily(family, argv) {
|
|
|
4852
4976
|
dispatchProgram(native, argv);
|
|
4853
4977
|
return;
|
|
4854
4978
|
}
|
|
4855
|
-
const skillsBaseUrl = getSkillsBaseUrl(
|
|
4979
|
+
const skillsBaseUrl = getSkillsBaseUrl();
|
|
4856
4980
|
const menu = await fetchSkillMenu(skillsBaseUrl);
|
|
4857
4981
|
if (!menu) return exitDispatchError("registry unreachable", {
|
|
4858
4982
|
family,
|
|
@@ -5762,7 +5886,7 @@ function createFamilyPickerDefault(parentLabel, children, chooser = chooseFamily
|
|
|
5762
5886
|
*/
|
|
5763
5887
|
function familyCommandFactory({ family, description, optionsFrom }) {
|
|
5764
5888
|
const openFamilyEntry = async (argv) => {
|
|
5765
|
-
const toShow = pickerChildrenToShow(buildFamilyPickerChildren(family, (await fetchSkillMenu(getSkillsBaseUrl(
|
|
5889
|
+
const toShow = pickerChildrenToShow(buildFamilyPickerChildren(family, (await fetchSkillMenu(getSkillsBaseUrl()))?.cliEntries ?? []));
|
|
5766
5890
|
if (toShow.length === 1 && toShow[0]?.handler) {
|
|
5767
5891
|
await Promise.resolve(toShow[0].handler(argv));
|
|
5768
5892
|
return;
|
|
@@ -5838,7 +5962,7 @@ async function runDoctorCI(options) {
|
|
|
5838
5962
|
getUI().intro("Welcome to the PostHog setup wizard");
|
|
5839
5963
|
getUI().log.info("Running posthog-doctor in CI mode");
|
|
5840
5964
|
try {
|
|
5841
|
-
const { getOrAskForProjectData } = await import("./setup-utils-
|
|
5965
|
+
const { getOrAskForProjectData } = await import("./setup-utils-Cz0wPLsQ.js").then((n) => n.r);
|
|
5842
5966
|
const { host, accessToken, projectId } = await getOrAskForProjectData({
|
|
5843
5967
|
signup: false,
|
|
5844
5968
|
ci: true,
|
|
@@ -5856,7 +5980,7 @@ async function runDoctorCI(options) {
|
|
|
5856
5980
|
for (const issue of sorted) getUI().log.info(` • [${issue.severity}] ${getKindMeta(issue.kind).title}`);
|
|
5857
5981
|
process.exit(1);
|
|
5858
5982
|
} catch (error) {
|
|
5859
|
-
const { ApiError } = await import("./api-
|
|
5983
|
+
const { ApiError } = await import("./api-Wgb7AhrP.js").then((n) => n.n);
|
|
5860
5984
|
const message = error instanceof ApiError && error.statusCode === 401 ? "Your PostHog API key is invalid or expired." : error instanceof Error ? error.message : String(error);
|
|
5861
5985
|
getUI().log.error(`Doctor failed: ${message}`);
|
|
5862
5986
|
process.exit(1);
|
|
@@ -5938,8 +6062,8 @@ function runSlackConnect(argv) {
|
|
|
5938
6062
|
(async () => {
|
|
5939
6063
|
const debug = argv.debug;
|
|
5940
6064
|
try {
|
|
5941
|
-
const { startTUI } = await import("./start-tui-
|
|
5942
|
-
const { buildSession } = await import("./wizard-session-
|
|
6065
|
+
const { startTUI } = await import("./start-tui-DDW9uVnD.js");
|
|
6066
|
+
const { buildSession } = await import("./wizard-session-UxA_A0cA.js");
|
|
5943
6067
|
const tui = startTUI(VERSION, Program.SlackConnect);
|
|
5944
6068
|
tui.store.session = buildSession({
|
|
5945
6069
|
debug,
|
|
@@ -6016,8 +6140,8 @@ const BROWSABLE_ROLES = new Set(["command", "skill"]);
|
|
|
6016
6140
|
* step's own `menu-fetch-failed` handling, rather than adding a second network
|
|
6017
6141
|
* dependency that could block an otherwise-valid run.
|
|
6018
6142
|
*/
|
|
6019
|
-
async function assertSkillExists(skillName
|
|
6020
|
-
const skillsBaseUrl = getSkillsBaseUrl(
|
|
6143
|
+
async function assertSkillExists(skillName) {
|
|
6144
|
+
const skillsBaseUrl = getSkillsBaseUrl();
|
|
6021
6145
|
const menu = await fetchSkillMenu(skillsBaseUrl);
|
|
6022
6146
|
if (!menu) return;
|
|
6023
6147
|
if (Object.values(menu.categories).flat().some((s) => s.id === skillName)) return;
|
|
@@ -6050,9 +6174,9 @@ const skillCommand = {
|
|
|
6050
6174
|
children: [{
|
|
6051
6175
|
name: "list",
|
|
6052
6176
|
description: "List every browsable skill in the catalog",
|
|
6053
|
-
handler: (
|
|
6177
|
+
handler: () => {
|
|
6054
6178
|
runCommandHandler(async () => {
|
|
6055
|
-
const skillsBaseUrl = getSkillsBaseUrl(
|
|
6179
|
+
const skillsBaseUrl = getSkillsBaseUrl();
|
|
6056
6180
|
const menu = await fetchSkillMenu(skillsBaseUrl);
|
|
6057
6181
|
if (!menu) {
|
|
6058
6182
|
analytics.wizardCapture("cli dispatch error", {
|
|
@@ -6091,7 +6215,7 @@ const skillCommand = {
|
|
|
6091
6215
|
handler: (argv) => {
|
|
6092
6216
|
runCommandHandler(async () => {
|
|
6093
6217
|
const skillName = readSkillName(argv);
|
|
6094
|
-
await assertSkillExists(skillName
|
|
6218
|
+
await assertSkillExists(skillName);
|
|
6095
6219
|
runSkillMode({
|
|
6096
6220
|
...argv,
|
|
6097
6221
|
skill: skillName
|
|
@@ -6269,7 +6393,7 @@ function resolveInstallDir() {
|
|
|
6269
6393
|
if (inline) return inline.slice(14);
|
|
6270
6394
|
return process.env.POSTHOG_WIZARD_INSTALL_DIR ?? process.cwd();
|
|
6271
6395
|
}
|
|
6272
|
-
Wizard.use(basicIntegrationCommand).use(mcpCommand).use(mcpAnalyticsCommand).use(replayVisionCommand).use(aiObservabilityCommand).use(cliCommand).use(auditCommand).use(doctorCommand).use(migrateCommand).use(revenueCommand).use(warehouseCommand).use(selfDrivingCommand).use(slackCommand).use(uploadSourcemapsCommand).use(skillCommand).init();
|
|
6396
|
+
Wizard.use(basicIntegrationCommand).use(mcpCommand).use(mcpAnalyticsCommand).use(replayVisionCommand).use(aiObservabilityCommand).use(metricsCommand).use(cliCommand).use(auditCommand).use(doctorCommand).use(migrateCommand).use(revenueCommand).use(warehouseCommand).use(selfDrivingCommand).use(slackCommand).use(uploadSourcemapsCommand).use(skillCommand).init();
|
|
6273
6397
|
//#endregion
|
|
6274
6398
|
export { STRIPE_SDKS as A, MANUAL_SDK_VARIANTS as C, fetchHealthIssues as D, getKindMeta as E, getContentBlocks$3 as O, MANUAL_SDK_INSTALL as S, SOURCE_MAPS_CONTEXT_KEYS as T, detectSelfDrivingIntegrationProjects as _, useStdoutDimensions as a, DISPLAY_NAME as b, runWizardHeadless as c, PROGRAM_REGISTRY as d, Program as f, PRICING_SHORT as g, PRICING_LONG as h, useKeyboardHintsContext as i, POSTHOG_SDKS as k, runWizardCI as l, NO_DEFAULT_LIMIT as m, useKeyBindings as n, ConfirmButton as o, getProgramConfig as p, KeyboardHintsProvider as r, PromptLabel as s, PickerMenu as t, runWizard as u, SELF_DRIVING_INTEGRATE_PATH_KEY as v, RUST_SDK_CRATE as w, GO_SDK_MODULE as x, AUTOMATABLE_VARIANTS as y };
|
|
6275
6399
|
|