@posthog/wizard 2.80.1 → 2.81.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -17
- package/dist/README.md +6 -4
- package/dist/{agent-interface-CemBvTAA.js → agent-interface-DMP3DZRd.js} +184 -25
- package/dist/agent-interface-DMP3DZRd.js.map +1 -0
- package/dist/{agent-prompt-loader-DPnj6SwU.js → agent-prompt-loader-BrivWIna.js} +6 -6
- package/dist/{agent-prompt-loader-DPnj6SwU.js.map → agent-prompt-loader-BrivWIna.js.map} +1 -1
- package/dist/{analytics-D21z3E5l.js → analytics-X7JfAmh6.js} +6 -3
- package/dist/analytics-X7JfAmh6.js.map +1 -0
- package/dist/analytics-dcL9EQ4r.js +2 -0
- package/dist/{api-DtGIqQ2U.js → api-BkDwZoL4.js} +3 -2
- package/dist/{api-DtGIqQ2U.js.map → api-BkDwZoL4.js.map} +1 -1
- package/dist/api-BrMGAI-b.js +2 -0
- package/dist/api-key-login-CZEgx2jb.js +2 -0
- package/dist/{api-key-login-h3E2G3zu.js → api-key-login-DE0yKkP4.js} +5 -5
- package/dist/{api-key-login-h3E2G3zu.js.map → api-key-login-DE0yKkP4.js.map} +1 -1
- package/dist/bin.js +2 -2
- package/dist/{bounded-fs-CAsuF6al.js → bounded-fs-iDiqDQ9v.js} +3 -3
- package/dist/{bounded-fs-CAsuF6al.js.map → bounded-fs-iDiqDQ9v.js.map} +1 -1
- package/dist/{ci-install-CEYE02t-.js → ci-install-BAftKh2Z.js} +7 -7
- package/dist/{ci-install-CEYE02t-.js.map → ci-install-BAftKh2Z.js.map} +1 -1
- package/dist/{console-log-O828zyiq.js → console-log-DJiTqYT2.js} +3 -3
- package/dist/{console-log-O828zyiq.js.map → console-log-DJiTqYT2.js.map} +1 -1
- package/dist/{debug-BfQPD2Hg.js → debug-C3tLP-ZW.js} +3 -3
- package/dist/{debug-BfQPD2Hg.js.map → debug-C3tLP-ZW.js.map} +1 -1
- package/dist/{emit-RfAewcWv.js → emit-BqLCdV8Y.js} +2 -1
- package/dist/{emit-RfAewcWv.js.map → emit-BqLCdV8Y.js.map} +1 -1
- package/dist/{errors-CHrJzAZb.js → errors-DhFeR8Sp.js} +3 -3
- package/dist/{errors-CHrJzAZb.js.map → errors-DhFeR8Sp.js.map} +1 -1
- package/dist/{gateway-D3gIlR6b.js → gateway-IQjQ582o.js} +7 -7
- package/dist/{gateway-D3gIlR6b.js.map → gateway-IQjQ582o.js.map} +1 -1
- package/dist/{headless-BJjhP0SI.js → headless-DOhxEmw5.js} +2 -2
- package/dist/{headless-BJjhP0SI.js.map → headless-DOhxEmw5.js.map} +1 -1
- package/dist/{headless-DIX68UUA.js → headless-XNvdWVEp.js} +1 -1
- package/dist/{host-resolution-D8GhEVoX.js → host-resolution-DI2oucSK.js} +4 -4
- package/dist/{host-resolution-D8GhEVoX.js.map → host-resolution-DI2oucSK.js.map} +1 -1
- package/dist/{install-paPCzPHI.js → install-BixbBDLR.js} +41 -55
- package/dist/install-BixbBDLR.js.map +1 -0
- package/dist/{install-Bw8tvDvS.js → install-DaZ6pvEl.js} +1 -1
- package/dist/{interactive-tdxZKWax.js → interactive-WLNQWF0D.js} +3 -3
- package/dist/{interactive-tdxZKWax.js.map → interactive-WLNQWF0D.js.map} +1 -1
- package/dist/{links-Cyj6v8kg.js → links-Bye4fsrj.js} +3 -3
- package/dist/{links-Cyj6v8kg.js.map → links-Bye4fsrj.js.map} +1 -1
- package/dist/{main-0p-YxUNa.js → main-CN8nbuZO.js} +25 -25
- package/dist/main-CN8nbuZO.js.map +1 -0
- package/dist/{mcp-D3Z5MXhA.js → mcp-B2o4d9DS.js} +3 -3
- package/dist/{mcp-D3Z5MXhA.js.map → mcp-B2o4d9DS.js.map} +1 -1
- package/dist/{mcp-prompt-streaming-COVbWnHt.js → mcp-prompt-streaming-COs1DfAm.js} +5 -5
- package/dist/{mcp-prompt-streaming-COVbWnHt.js.map → mcp-prompt-streaming-COs1DfAm.js.map} +1 -1
- package/dist/{models-D1SnCzvl.js → models-Cow22jET.js} +2 -2
- package/dist/{models-D1SnCzvl.js.map → models-Cow22jET.js.map} +1 -1
- package/dist/{non-interactive-DxRBc73O.js → non-interactive-DkldwWDM.js} +4 -4
- package/dist/{non-interactive-DxRBc73O.js.map → non-interactive-DkldwWDM.js.map} +1 -1
- package/dist/{oauth-session-Dde79Ycm.js → oauth-session-Bj_-BY7o.js} +2 -2
- package/dist/{oauth-session-Dde79Ycm.js.map → oauth-session-Bj_-BY7o.js.map} +1 -1
- package/dist/{orchestrator-tools-BSNhzzkT.js → orchestrator-tools-lhFIBGnp.js} +3 -3
- package/dist/{orchestrator-tools-BSNhzzkT.js.map → orchestrator-tools-lhFIBGnp.js.map} +1 -1
- package/dist/{package-manager-BRXlXo0p.js → package-manager-DZ4wcTz3.js} +4 -4
- package/dist/{package-manager-BRXlXo0p.js.map → package-manager-DZ4wcTz3.js.map} +1 -1
- package/dist/{pi-cM_4Gd_9.js → pi-DREdQRPP.js} +15 -15
- package/dist/{pi-cM_4Gd_9.js.map → pi-DREdQRPP.js.map} +1 -1
- package/dist/{playground-DTKy0XHT.js → playground-CJx3lwTH.js} +4 -4
- package/dist/{playground-DTKy0XHT.js.map → playground-CJx3lwTH.js.map} +1 -1
- package/dist/{posthog-integration-bwHwE87a.js → posthog-integration-DDSPdbpw.js} +63 -50
- package/dist/posthog-integration-DDSPdbpw.js.map +1 -0
- package/dist/{programs-SeT1qNik.js → programs-6SFfUBmm.js} +88 -34
- package/dist/programs-6SFfUBmm.js.map +1 -0
- package/dist/programs-DvlhdeM_.js +3 -0
- package/dist/provisioning-CPGWgv7p.js +2 -0
- package/dist/{provisioning-JbJtq7hq.js → provisioning-tRDPH7EQ.js} +4 -4
- package/dist/{provisioning-JbJtq7hq.js.map → provisioning-tRDPH7EQ.js.map} +1 -1
- package/dist/{queue-tools-BIZSJyt6.js → queue-tools-DrJKvFHZ.js} +4 -4
- package/dist/{queue-tools-BIZSJyt6.js.map → queue-tools-DrJKvFHZ.js.map} +1 -1
- package/dist/{results-DtKICAdz.js → results-Crcubw0Q.js} +37 -2
- package/dist/results-Crcubw0Q.js.map +1 -0
- package/dist/{run-DDCvLILJ.js → run-BrIGaPy7.js} +10 -10
- package/dist/run-BrIGaPy7.js.map +1 -0
- package/dist/{run-CDurA5tO.js → run-DVFTMbxf.js} +31 -15
- package/dist/run-DVFTMbxf.js.map +1 -0
- package/dist/{run-tool-DML8JJvt.js → run-tool-CxdPXmlY.js} +37 -21
- package/dist/{run-tool-DML8JJvt.js.map → run-tool-CxdPXmlY.js.map} +1 -1
- package/dist/run-tool-GfISLgEs.js +2 -0
- package/dist/{runners-Dhu4pZTN.js → runners-loOOmHyc.js} +37 -19
- package/dist/runners-loOOmHyc.js.map +1 -0
- package/dist/{security-DEH8Rn0_.js → security-C_grSgIM.js} +44 -52
- package/dist/security-C_grSgIM.js.map +1 -0
- package/dist/{setup-utils-C5-WM-hS.js → setup-utils-BYXbb9NM.js} +3 -3
- package/dist/{setup-utils-C5-WM-hS.js.map → setup-utils-BYXbb9NM.js.map} +1 -1
- package/dist/{start-playground-DL4mVEUx.js → start-playground-Blh0Swil.js} +13 -12
- package/dist/{start-playground-DL4mVEUx.js.map → start-playground-Blh0Swil.js.map} +1 -1
- package/dist/{subagent-CnFvAq6E.js → subagent-DQ_enM8C.js} +7 -7
- package/dist/subagent-DQ_enM8C.js.map +1 -0
- package/dist/{task-BOScSm4W.js → task-Dm9wZbVW.js} +18 -17
- package/dist/task-Dm9wZbVW.js.map +1 -0
- package/dist/{telemetry-CP4rGicd.js → telemetry-NeZhrBeW.js} +2 -2
- package/dist/{telemetry-CP4rGicd.js.map → telemetry-NeZhrBeW.js.map} +1 -1
- package/dist/{terminal-J3OD3dN0.js → terminal-Z4hCXfie.js} +186 -134
- package/dist/terminal-Z4hCXfie.js.map +1 -0
- package/dist/{tools-Cz8tDptL.js → tools-1aM6bI9Y.js} +8 -8
- package/dist/{tools-Cz8tDptL.js.map → tools-1aM6bI9Y.js.map} +1 -1
- package/dist/{tools-CCMV3DmB.js → tools-dUJHRo6X.js} +15 -15
- package/dist/{tools-CCMV3DmB.js.map → tools-dUJHRo6X.js.map} +1 -1
- package/dist/{tui-BUZ2PWqN.js → tui-CCO7VVTA.js} +1 -1
- package/dist/{tui-Csf7VJxt.js → tui-Cmi_ckGg.js} +4 -4
- package/dist/{tui-Csf7VJxt.js.map → tui-Cmi_ckGg.js.map} +1 -1
- package/dist/{upload-step-CEacB2RV.js → upload-step-e2Jp2fcr.js} +3 -3
- package/dist/{upload-step-CEacB2RV.js.map → upload-step-e2Jp2fcr.js.map} +1 -1
- package/dist/{urls-BDELGZHq.js → urls-Cu4RO30x.js} +2 -2
- package/dist/{urls-BDELGZHq.js.map → urls-Cu4RO30x.js.map} +1 -1
- package/dist/{wizard-abort-D3-75KyV.js → wizard-abort-BPEiPCXk.js} +5 -5
- package/dist/{wizard-abort-D3-75KyV.js.map → wizard-abort-BPEiPCXk.js.map} +1 -1
- package/dist/{yara-hooks-CZ1tKxy_.js → yara-hooks-CFD60h78.js} +1 -1
- package/dist/{yara-hooks-D8YDyX7o.js → yara-hooks-canFIYTc.js} +4 -4
- package/dist/{yara-hooks-D8YDyX7o.js.map → yara-hooks-canFIYTc.js.map} +1 -1
- package/package.json +2 -1
- package/dist/agent-interface-CemBvTAA.js.map +0 -1
- package/dist/analytics-B3ROGuIr.js +0 -2
- package/dist/analytics-D21z3E5l.js.map +0 -1
- package/dist/api-IhROOQNv.js +0 -2
- package/dist/api-key-login-OEntFvu5.js +0 -2
- package/dist/install-paPCzPHI.js.map +0 -1
- package/dist/main-0p-YxUNa.js.map +0 -1
- package/dist/posthog-integration-bwHwE87a.js.map +0 -1
- package/dist/programs-BhtyA3lE.js +0 -3
- package/dist/programs-SeT1qNik.js.map +0 -1
- package/dist/provisioning-BcXfeCMc.js +0 -2
- package/dist/results-DtKICAdz.js.map +0 -1
- package/dist/run-CDurA5tO.js.map +0 -1
- package/dist/run-DDCvLILJ.js.map +0 -1
- package/dist/run-tool-CTq9OOdT.js +0 -2
- package/dist/runners-Dhu4pZTN.js.map +0 -1
- package/dist/security-DEH8Rn0_.js.map +0 -1
- package/dist/subagent-CnFvAq6E.js.map +0 -1
- package/dist/task-BOScSm4W.js.map +0 -1
- package/dist/terminal-J3OD3dN0.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { n as ErrorCodes } from "./emit-
|
|
2
|
-
import { c as WIZARD_LOG_FILE, f as VERSION, h as RUN_SURFACE, i as getLogFilePath, o as logToFile, s as WIZARD_BENCHMARK_FILE, t as configureLogFile, v as runtimeEnv } from "./debug-
|
|
3
|
-
import { C as HAIKU_MODEL, D as Integration, G as WIZARD_CONTACT_EMAIL, H as SONNET_5_MODEL, J as WIZARD_OAUTH_SCOPES, M as POSTHOG_DOCS_URL, Q as WIZARD_PROVISIONING_SCOPES, S as GPT5_6_TERRA_MODEL, T as Harness, U as Sequence, V as SETUP_REPORT_FILE, X as WIZARD_ORCHESTRATOR_OVERRIDE_FLAG_KEY, Y as WIZARD_ORCHESTRATOR_FLAG_KEY, Z as WIZARD_ORCHESTRATOR_SEEDED_TASKS_FLAG_KEY, a as ciExcludedTaskTypes, b as GPT5_6_LUNA_MODEL, c as AGENTIC_DETECTION_RETRY_TIMEOUT_MS, n as analytics, o as mayReportScanResults, p as DETECTION_TIMEOUT_MS, q as WIZARD_INTERACTION_EVENT_NAME, rt as getSkillsBaseUrl, s as AGENTIC_DETECTION_FIRST_ATTEMPT_TIMEOUT_MS, tt as WIZARD_SELF_DRIVING_USE_PI_HARNESS_FLAG_KEY, v as EVENT_PLAN_FILE, x as GPT5_6_SOL_MODEL } from "./analytics-
|
|
4
|
-
import { r as
|
|
5
|
-
import {
|
|
6
|
-
import { a as safeReadFile, i as readProjectFile, n as boundedGlob, o as walkProjectFiles } from "./bounded-fs-
|
|
7
|
-
import { n as detectNodePackageManagers, t as detectAllPackageManagers } from "./package-manager-
|
|
1
|
+
import { n as ErrorCodes } from "./emit-BqLCdV8Y.js";
|
|
2
|
+
import { c as WIZARD_LOG_FILE, f as VERSION, h as RUN_SURFACE, i as getLogFilePath, o as logToFile, s as WIZARD_BENCHMARK_FILE, t as configureLogFile, v as runtimeEnv } from "./debug-C3tLP-ZW.js";
|
|
3
|
+
import { C as HAIKU_MODEL, D as Integration, G as WIZARD_CONTACT_EMAIL, H as SONNET_5_MODEL, J as WIZARD_OAUTH_SCOPES, M as POSTHOG_DOCS_URL, Q as WIZARD_PROVISIONING_SCOPES, S as GPT5_6_TERRA_MODEL, T as Harness, U as Sequence, V as SETUP_REPORT_FILE, X as WIZARD_ORCHESTRATOR_OVERRIDE_FLAG_KEY, Y as WIZARD_ORCHESTRATOR_FLAG_KEY, Z as WIZARD_ORCHESTRATOR_SEEDED_TASKS_FLAG_KEY, a as ciExcludedTaskTypes, b as GPT5_6_LUNA_MODEL, c as AGENTIC_DETECTION_RETRY_TIMEOUT_MS, n as analytics, o as mayReportScanResults, p as DETECTION_TIMEOUT_MS, q as WIZARD_INTERACTION_EVENT_NAME, rt as getSkillsBaseUrl, s as AGENTIC_DETECTION_FIRST_ATTEMPT_TIMEOUT_MS, tt as WIZARD_SELF_DRIVING_USE_PI_HARNESS_FLAG_KEY, v as EVENT_PLAN_FILE, x as GPT5_6_SOL_MODEL } from "./analytics-X7JfAmh6.js";
|
|
4
|
+
import { a as WizardError, r as skillErrorCode, t as classifyRunFailure } from "./errors-DhFeR8Sp.js";
|
|
5
|
+
import { r as withUtm, t as openTrackedLink } from "./links-Bye4fsrj.js";
|
|
6
|
+
import { a as safeReadFile, i as readProjectFile, n as boundedGlob, o as walkProjectFiles } from "./bounded-fs-iDiqDQ9v.js";
|
|
7
|
+
import { n as detectNodePackageManagers, t as detectAllPackageManagers } from "./package-manager-DZ4wcTz3.js";
|
|
8
8
|
import { n as getInstalledPackageVersion, r as hasDeclaredDependency, t as getDeclaredVersion } from "./package-json-2UrhE6kP.js";
|
|
9
|
-
import { i as createVersionBucket, n as isUsingTypeScript, r as tryGetPackageJson } from "./setup-utils-
|
|
10
|
-
import { n as currentAccessToken } from "./oauth-session-
|
|
11
|
-
import { d as gatewayAuth, p as useRunGatewayCredential, s as AgentSignals } from "./gateway-
|
|
12
|
-
import { a as requireKnownModel, o as triageModelFor, r as isValidModel } from "./models-
|
|
13
|
-
import {
|
|
14
|
-
import { n as mcpUrlFor } from "./host-resolution-
|
|
15
|
-
import { a as piBackend, d as createEmitSpinner, f as createProgressCollector, l as createAioCapture, u as createEmitLog } from "./pi-
|
|
16
|
-
import { d as uncoveredBySink, g as TaskStatus, h as SkipReason, m as QueueStore, p as QUEUE_DIR_NAME, u as dependencyClosure } from "./queue-tools-
|
|
17
|
-
import { a as flushScanReport, p as scanInstalledSkill$1, s as formatYaraAbortMessage, v as installSkillById, y as fetchSkillMenu } from "./yara-hooks-
|
|
18
|
-
import { a as assembleTaskPrompt, d as taskModelSpec, i as assembleSeedPrompt, n as agentRunTools, o as loadAgentRegistry, s as promptModelFor, t as ASK_TOOL, u as resolveTask } from "./agent-prompt-loader-
|
|
19
|
-
import { r as requestDeepLink } from "./provisioning-
|
|
9
|
+
import { i as createVersionBucket, n as isUsingTypeScript, r as tryGetPackageJson } from "./setup-utils-BYXbb9NM.js";
|
|
10
|
+
import { n as currentAccessToken } from "./oauth-session-Bj_-BY7o.js";
|
|
11
|
+
import { d as gatewayAuth, p as useRunGatewayCredential, s as AgentSignals } from "./gateway-IQjQ582o.js";
|
|
12
|
+
import { a as requireKnownModel, o as triageModelFor, r as isValidModel } from "./models-Cow22jET.js";
|
|
13
|
+
import { B as WIZARD_TOOL_NAMES, at as shouldDisableAsk, ct as parseEnvKeyNames, i as runAgent$1, it as LONGER_ASK_TIMEOUT_MS, lt as toPromptSafeRelativePath, n as buildRunTags, nt as createWizardAskBridge, ot as MAX_ENV_KEY_SET, p as registerCleanup, r as initializeAgent, st as isEnvFileName, ut as createTriageLLMProvider } from "./agent-interface-DMP3DZRd.js";
|
|
14
|
+
import { n as mcpUrlFor } from "./host-resolution-DI2oucSK.js";
|
|
15
|
+
import { a as piBackend, d as createEmitSpinner, f as createProgressCollector, l as createAioCapture, u as createEmitLog } from "./pi-DREdQRPP.js";
|
|
16
|
+
import { d as uncoveredBySink, g as TaskStatus, h as SkipReason, m as QueueStore, p as QUEUE_DIR_NAME, u as dependencyClosure } from "./queue-tools-DrJKvFHZ.js";
|
|
17
|
+
import { a as flushScanReport, p as scanInstalledSkill$1, s as formatYaraAbortMessage, v as installSkillById, y as fetchSkillMenu } from "./yara-hooks-canFIYTc.js";
|
|
18
|
+
import { a as assembleTaskPrompt, d as taskModelSpec, i as assembleSeedPrompt, n as agentRunTools, o as loadAgentRegistry, s as promptModelFor, t as ASK_TOOL, u as resolveTask } from "./agent-prompt-loader-BrivWIna.js";
|
|
19
|
+
import { r as requestDeepLink } from "./provisioning-tRDPH7EQ.js";
|
|
20
20
|
import * as semver from "semver";
|
|
21
21
|
import { major, minVersion } from "semver";
|
|
22
22
|
import fs, { cpSync, existsSync, mkdirSync, readdirSync, rmSync, writeFileSync } from "fs";
|
|
@@ -2042,6 +2042,7 @@ function requireTaskHarness(pick) {
|
|
|
2042
2042
|
if (!harness.runTask) throw new Error(`Harness "${pick.harness}" does not implement runTask; orchestrator mode requires it.`);
|
|
2043
2043
|
return harness;
|
|
2044
2044
|
}
|
|
2045
|
+
/** How an agent result ends the run, or undefined when it doesn't. */
|
|
2045
2046
|
function terminalResult(result) {
|
|
2046
2047
|
switch (result.kind) {
|
|
2047
2048
|
case "success": return;
|
|
@@ -2061,7 +2062,7 @@ function terminalResult(result) {
|
|
|
2061
2062
|
outcome: "failed",
|
|
2062
2063
|
failure: {
|
|
2063
2064
|
code: AGENT_ERROR_CODE[result.classification],
|
|
2064
|
-
message: result.message ?? "Agent failed",
|
|
2065
|
+
message: result.classification === "WIZARD_YARA_VIOLATION" ? formatYaraAbortMessage() : result.message ?? "Agent failed",
|
|
2065
2066
|
error: result.error
|
|
2066
2067
|
}
|
|
2067
2068
|
};
|
|
@@ -2266,6 +2267,10 @@ function drainVerdict(tasks) {
|
|
|
2266
2267
|
blockedTypes: pending.map((t) => t.type)
|
|
2267
2268
|
};
|
|
2268
2269
|
}
|
|
2270
|
+
/** A drain where a required step failed, or where nothing failed but steps were blocked and never ran. */
|
|
2271
|
+
function drainFailureCode(verdict) {
|
|
2272
|
+
return verdict.requiredFailedTypes.length > 0 ? ErrorCodes.AgentOrchestratorTasksFailed : ErrorCodes.AgentOrchestratorTasksBlocked;
|
|
2273
|
+
}
|
|
2269
2274
|
/**
|
|
2270
2275
|
* The one-line "what went wrong" the abort message leads with.
|
|
2271
2276
|
*
|
|
@@ -2788,16 +2793,17 @@ or integrate manually here:
|
|
|
2788
2793
|
const whatFailed = describeDrainFailure(verdict);
|
|
2789
2794
|
const missingScopes = (boot.credentials.missingScopes ?? []).filter((scope) => WIZARD_PROVISIONING_SCOPES.some((required) => required === scope) || !WIZARD_OAUTH_SCOPES.some((requested) => requested === scope));
|
|
2790
2795
|
const message = missingScopes.length > 0 ? `The wizard could not finish setup: ${whatFailed}, and this run was authorized without the following permission${missingScopes.length === 1 ? "" : "s"}: ${missingScopes.join(", ")}.\n\nPlease try again, approving all permissions on the PostHog authorization screen. If it still fails, report it to: ${WIZARD_CONTACT_EMAIL}` : `The wizard was unable to set up PostHog: ${whatFailed}.\n\nPlease report this to: ${WIZARD_CONTACT_EMAIL}`;
|
|
2796
|
+
const code = drainFailureCode(verdict);
|
|
2791
2797
|
return failed({
|
|
2792
|
-
code
|
|
2798
|
+
code,
|
|
2793
2799
|
message,
|
|
2794
|
-
error: new WizardError("orchestrator drain ended with failed tasks", {
|
|
2800
|
+
error: new WizardError(code === ErrorCodes.AgentOrchestratorTasksFailed ? "orchestrator drain ended with failed tasks" : "orchestrator drain ended with blocked tasks", {
|
|
2795
2801
|
tasks_failed: summary.failed,
|
|
2796
2802
|
tasks_blocked: blocked,
|
|
2797
2803
|
failed_types: failedTypes,
|
|
2798
2804
|
missing_oauth_scopes: missingScopes.join(" "),
|
|
2799
2805
|
queue_state: JSON.stringify(store.list())
|
|
2800
|
-
},
|
|
2806
|
+
}, code)
|
|
2801
2807
|
});
|
|
2802
2808
|
}
|
|
2803
2809
|
if (summary.total === 0) return failed({
|
|
@@ -3199,7 +3205,7 @@ function safeErrorMessage(error) {
|
|
|
3199
3205
|
* chunk does not grow.
|
|
3200
3206
|
*/
|
|
3201
3207
|
async function scanInstalledSkill(skillDir, llmProvider) {
|
|
3202
|
-
return (await import("./yara-hooks-
|
|
3208
|
+
return (await import("./yara-hooks-CFD60h78.js")).scanInstalledSkill(skillDir, llmProvider);
|
|
3203
3209
|
}
|
|
3204
3210
|
/**
|
|
3205
3211
|
* The MCP tutorial's prompt stream: one prompt against the PostHog MCP server,
|
|
@@ -3208,7 +3214,7 @@ async function scanInstalledSkill(skillDir, llmProvider) {
|
|
|
3208
3214
|
* startup chunk does not grow.
|
|
3209
3215
|
*/
|
|
3210
3216
|
async function* streamMcpPrompt(args) {
|
|
3211
|
-
yield* (await import("./mcp-prompt-streaming-
|
|
3217
|
+
yield* (await import("./mcp-prompt-streaming-COs1DfAm.js")).streamMcpPrompt(args);
|
|
3212
3218
|
}
|
|
3213
3219
|
//#endregion
|
|
3214
3220
|
//#region src/programs/frameworks/python/utils.ts
|
|
@@ -9927,33 +9933,42 @@ function detectExistingPostHog(ctx, installDir) {
|
|
|
9927
9933
|
* A decided stop, such as an unsupported platform. A program throws it rather
|
|
9928
9934
|
* than exiting: `runProgram` settles it as an aborted outcome from detection
|
|
9929
9935
|
* and a failed one from a run definition, and the CLI turns that into its exit.
|
|
9936
|
+
* `outroData` is the structured outro for hosts that render one; `message` is
|
|
9937
|
+
* the plain text for every other host.
|
|
9930
9938
|
*/
|
|
9931
9939
|
var ProgramAbort = class extends Error {
|
|
9932
9940
|
code;
|
|
9941
|
+
outroData;
|
|
9933
9942
|
constructor(failure) {
|
|
9934
9943
|
super(failure.message);
|
|
9935
9944
|
this.name = "ProgramAbort";
|
|
9936
9945
|
this.code = failure.code;
|
|
9946
|
+
this.outroData = failure.outroData;
|
|
9937
9947
|
}
|
|
9938
9948
|
};
|
|
9939
9949
|
//#endregion
|
|
9940
|
-
//#region src/shared/
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
|
|
9956
|
-
|
|
9950
|
+
//#region src/programs/shared/abort-no-framework.ts
|
|
9951
|
+
function abortNoFrameworkDetected(overrides = {}) {
|
|
9952
|
+
const message = overrides.message ?? "Could not detect a framework";
|
|
9953
|
+
const outroData = {
|
|
9954
|
+
kind: "error",
|
|
9955
|
+
message,
|
|
9956
|
+
instruction: "Run the wizard from an app root directory.",
|
|
9957
|
+
body: "That's the folder containing package.json or an equivalent project file.",
|
|
9958
|
+
docsLabel: "Supported frameworks and manual setup:",
|
|
9959
|
+
docsUrl: "https://posthog.com/docs/libraries",
|
|
9960
|
+
...overrides
|
|
9961
|
+
};
|
|
9962
|
+
throw new ProgramAbort({
|
|
9963
|
+
code: ErrorCodes.DetectNoFramework,
|
|
9964
|
+
message: [
|
|
9965
|
+
message,
|
|
9966
|
+
outroData.instruction,
|
|
9967
|
+
outroData.body,
|
|
9968
|
+
`${outroData.docsLabel} ${outroData.docsUrl}`
|
|
9969
|
+
].join("\n\n"),
|
|
9970
|
+
outroData
|
|
9971
|
+
});
|
|
9957
9972
|
}
|
|
9958
9973
|
//#endregion
|
|
9959
9974
|
//#region src/programs/posthog-integration/handoff.ts
|
|
@@ -10035,7 +10050,7 @@ function warehouseSourceUrl(host, projectId, kind) {
|
|
|
10035
10050
|
* A pointer at the app, not an inline flow. Connecting a source needs
|
|
10036
10051
|
* interactive credential collection, and chaining that as a second agent run
|
|
10037
10052
|
* before the outro would let any of its terminal failure paths end the run
|
|
10038
|
-
* — costing the user the success outro and the post-outro MCP
|
|
10053
|
+
* — costing the user the success outro and the post-outro MCP step on
|
|
10039
10054
|
* a run where PostHog installed fine.
|
|
10040
10055
|
*
|
|
10041
10056
|
* Each source gets its own pre-filled link, because the alternative we shipped
|
|
@@ -10140,16 +10155,13 @@ const config = {
|
|
|
10140
10155
|
eventPlanFile: EVENT_PLAN_FILE,
|
|
10141
10156
|
onReady: (ctx) => detectPostHogIntegration(ctx),
|
|
10142
10157
|
disallowedTools: [WIZARD_TOOL_NAMES.wizardAsk],
|
|
10143
|
-
oauthScopeAdditions: [...
|
|
10158
|
+
oauthScopeAdditions: [...WAREHOUSE_SOURCE_SCOPE_ADDITIONS],
|
|
10144
10159
|
seedTasks: warehouseSeedTasks,
|
|
10145
10160
|
excludedTaskTypes: (flags) => flags["wizard-default-aio-logs"] === "false" ? ["ai-observability", "logs"] : [],
|
|
10146
10161
|
ciPreRun: async (session, runner) => {
|
|
10147
10162
|
await scopeInstallDirToProject(session, runner);
|
|
10148
10163
|
const integration = await detectFramework(session.installDir);
|
|
10149
|
-
if (!integration)
|
|
10150
|
-
code: ErrorCodes.DetectNoFramework,
|
|
10151
|
-
message: "Could not auto-detect your framework for this project."
|
|
10152
|
-
});
|
|
10164
|
+
if (!integration) abortNoFrameworkDetected();
|
|
10153
10165
|
session.integration = integration;
|
|
10154
10166
|
analytics.setTag("integration", integration);
|
|
10155
10167
|
const frameworkConfig = FRAMEWORK_REGISTRY[integration];
|
|
@@ -10167,6 +10179,7 @@ const config = {
|
|
|
10167
10179
|
},
|
|
10168
10180
|
run: async (session, runner) => {
|
|
10169
10181
|
const config = session.frameworkConfig;
|
|
10182
|
+
if (!config) abortNoFrameworkDetected();
|
|
10170
10183
|
const typeScriptDetected = isUsingTypeScript({ installDir: session.installDir });
|
|
10171
10184
|
session.typescript = typeScriptDetected;
|
|
10172
10185
|
analytics.setTag("typescript", typeScriptDetected);
|
|
@@ -10244,7 +10257,7 @@ ${warehouseReportInstruction(session)}
|
|
|
10244
10257
|
postRun: async (sess, credentials) => {
|
|
10245
10258
|
const envVars = config.environment.getEnvVars(credentials.projectApiKey, credentials.host.apiHost);
|
|
10246
10259
|
if (config.environment.uploadToHosting) {
|
|
10247
|
-
const { uploadEnvironmentVariablesStep } = await import("./upload-step-
|
|
10260
|
+
const { uploadEnvironmentVariablesStep } = await import("./upload-step-e2Jp2fcr.js");
|
|
10248
10261
|
const uploadedEnvVars = await uploadEnvironmentVariablesStep(envVars, {
|
|
10249
10262
|
integration: config.metadata.integration,
|
|
10250
10263
|
installDir: sess.installDir,
|
|
@@ -10286,6 +10299,6 @@ ${warehouseReportInstruction(session)}
|
|
|
10286
10299
|
}
|
|
10287
10300
|
};
|
|
10288
10301
|
//#endregion
|
|
10289
|
-
export {
|
|
10302
|
+
export { formatCostUsd as A, FRAMEWORK_REGISTRY as C, runAgent as D, streamMcpPrompt as E, DEFAULT_BINDING as O, detectFramework as S, scanInstalledSkill as T, detectProjectsWithAgent as _, detectPostHogIntegration as a, noteDetectedFramework as b, POSTHOG_SDKS as c, DETECTED_WAREHOUSE_SOURCES_KEY as d, detectWarehouseSources as f, toIntegrationCandidates as g, scopeInstallDirToProject as h, ProgramAbort as i, formatTokenCount as j, computeTokenCostUsd as k, STRIPE_SDKS as l, detectIntegrationProjects as m, WAREHOUSE_SOURCE_SCOPE_ADDITIONS as n, reportWarehouseSourcesDetected as o, getDetectedWarehouseSources as p, abortNoFrameworkDetected as r, stampAiSdkDetected as s, config as t, findPackageJsons as u, resolveProjectDir as v, SPINNER_MESSAGE as w, gatherFrameworkContext as x, loadWizardFlags as y };
|
|
10290
10303
|
|
|
10291
|
-
//# sourceMappingURL=posthog-integration-
|
|
10304
|
+
//# sourceMappingURL=posthog-integration-DDSPdbpw.js.map
|