@posthog/wizard 2.35.0 → 2.37.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 +6 -3
- package/dist/{add-mcp-server-to-clients-to65gLPl.js → add-mcp-server-to-clients-CNn9br9l.js} +6 -6
- package/dist/{add-mcp-server-to-clients-to65gLPl.js.map → add-mcp-server-to-clients-CNn9br9l.js.map} +1 -1
- package/dist/{agent-interface-CXL9i_vX.js → agent-interface-D8jnkEnB.js} +237 -174
- package/dist/agent-interface-D8jnkEnB.js.map +1 -0
- package/dist/{agent-runner-CCTTG_Rn.js → agent-runner-BxIYcxmA.js} +56 -102
- package/dist/agent-runner-BxIYcxmA.js.map +1 -0
- package/dist/{analytics-DP_j88IC.js → analytics-Du8Z_3oX.js} +2 -2
- package/dist/{analytics-DP_j88IC.js.map → analytics-Du8Z_3oX.js.map} +1 -1
- package/dist/{api-Bdxv7mWH.js → api-BqKMQVhj.js} +3 -3
- package/dist/{api-Bdxv7mWH.js.map → api-BqKMQVhj.js.map} +1 -1
- package/dist/bin.js +285 -59
- package/dist/bin.js.map +1 -1
- package/dist/{ci-install-BO-KLPLD.js → ci-install-UlWb3u5t.js} +4 -4
- package/dist/{ci-install-BO-KLPLD.js.map → ci-install-UlWb3u5t.js.map} +1 -1
- package/dist/{debug-Clw8ctxh.js → debug-B4AH8Ahp.js} +1 -1
- package/dist/{debug-DXWxKT5f.js → debug-CZwmzyDx.js} +2 -2
- package/dist/{debug-DXWxKT5f.js.map → debug-CZwmzyDx.js.map} +1 -1
- package/dist/{defaults-4rSse24X.js → defaults-UswXMiTx.js} +1 -1
- package/dist/{defaults-4rSse24X.js.map → defaults-UswXMiTx.js.map} +1 -1
- package/dist/{env-api-key-B3gE9Un0.js → env-api-key-Db-mNPK2.js} +1 -1
- package/dist/{env-api-key-B3gE9Un0.js.map → env-api-key-Db-mNPK2.js.map} +1 -1
- package/dist/{environment-C4HyCWTC.js → environment-BRXwshJO.js} +3 -3
- package/dist/{environment-C4HyCWTC.js.map → environment-BRXwshJO.js.map} +1 -1
- package/dist/{file-utils-CW8XbbZP.js → file-utils-D6CWLaOm.js} +2 -2
- package/dist/{file-utils-CW8XbbZP.js.map → file-utils-D6CWLaOm.js.map} +1 -1
- package/dist/{headless-ui-BoZYhNpE.js → headless-ui-DvkogF0b.js} +2 -2
- package/dist/{headless-ui-BoZYhNpE.js.map → headless-ui-DvkogF0b.js.map} +1 -1
- package/dist/{host-resolution-Dw0fS8h5.js → host-resolution-DrOzdKdY.js} +3 -3
- package/dist/{host-resolution-Dw0fS8h5.js.map → host-resolution-DrOzdKdY.js.map} +1 -1
- package/dist/{interactive-pwrc7QM-.js → interactive-CXL8oJwb.js} +2 -2
- package/dist/{interactive-pwrc7QM-.js.map → interactive-CXL8oJwb.js.map} +1 -1
- package/dist/{mcp-prompt-streaming-DZjjoeu3.js → mcp-prompt-streaming-Dumivcgi.js} +4 -4
- package/dist/{mcp-prompt-streaming-DZjjoeu3.js.map → mcp-prompt-streaming-Dumivcgi.js.map} +1 -1
- package/dist/{non-interactive-BW-MZYrP.js → non-interactive-BI5b25U7.js} +2 -2
- package/dist/{non-interactive-BW-MZYrP.js.map → non-interactive-BI5b25U7.js.map} +1 -1
- package/dist/{package-manager-BgXgJ1Mu.js → package-manager-9nhQBKAy.js} +2 -2
- package/dist/{package-manager-BgXgJ1Mu.js.map → package-manager-9nhQBKAy.js.map} +1 -1
- package/dist/{playground-xuLBqzJM.js → playground-DDYYs2ub.js} +7 -7
- package/dist/{playground-xuLBqzJM.js.map → playground-DDYYs2ub.js.map} +1 -1
- package/dist/{posthog-integration-Bj9WmwDq.js → posthog-integration-Cx4RvC7E.js} +29 -14
- package/dist/posthog-integration-Cx4RvC7E.js.map +1 -0
- package/dist/{provisioning-BF2reo5_.js → provisioning-PosLaOt4.js} +4 -4
- package/dist/{provisioning-BF2reo5_.js.map → provisioning-PosLaOt4.js.map} +1 -1
- package/dist/{registry-Dj17F0a-.js → registry-B43CNAAx.js} +4 -4
- package/dist/{registry-Dj17F0a-.js.map → registry-B43CNAAx.js.map} +1 -1
- package/dist/{setup-utils-DyTlaGOV.js → setup-utils-CR8X8Fmf.js} +19 -11
- package/dist/setup-utils-CR8X8Fmf.js.map +1 -0
- package/dist/{start-tui-S4fBBfmO.js → start-tui-DeewAqJg.js} +374 -24
- package/dist/start-tui-DeewAqJg.js.map +1 -0
- package/dist/{steps-CHgikk6q.js → steps-CPvI-2Ms.js} +7 -7
- package/dist/{steps-CHgikk6q.js.map → steps-CPvI-2Ms.js.map} +1 -1
- package/dist/{store-vr5j37CU.js → store-0uzey9Am.js} +55 -4
- package/dist/store-0uzey9Am.js.map +1 -0
- package/dist/{task-stream-BVF6gi8x.js → task-stream-DkbGqxZv.js} +2 -2
- package/dist/{task-stream-BVF6gi8x.js.map → task-stream-DkbGqxZv.js.map} +1 -1
- package/dist/{telemetry-CR-ilpWe.js → telemetry-DJNpvkYP.js} +3 -3
- package/dist/{telemetry-CR-ilpWe.js.map → telemetry-DJNpvkYP.js.map} +1 -1
- package/dist/{terminal-uzjco-wz.js → terminal-Bd6q58zn.js} +13 -13
- package/dist/{terminal-uzjco-wz.js.map → terminal-Bd6q58zn.js.map} +1 -1
- package/dist/{urls-ChWit8SE.js → urls-B1a2v93j.js} +2 -2
- package/dist/{urls-ChWit8SE.js.map → urls-B1a2v93j.js.map} +1 -1
- package/dist/{wizard-abort-BE_j8xUt.js → wizard-abort-BG8VNOI9.js} +4 -4
- package/dist/{wizard-abort-BE_j8xUt.js.map → wizard-abort-BG8VNOI9.js.map} +1 -1
- package/dist/{wizard-abort-CNYxdjJl.js → wizard-abort-DyAGpw-u.js} +1 -1
- package/dist/{wizard-session-BHoLQueN.js → wizard-session-CqihOtk3.js} +6 -1
- package/dist/wizard-session-CqihOtk3.js.map +1 -0
- package/dist/{wizard-session-D0PJ9lsl.js → wizard-session-xzqycI7i.js} +1 -1
- package/package.json +1 -1
- package/dist/agent-interface-CXL9i_vX.js.map +0 -1
- package/dist/agent-runner-CCTTG_Rn.js.map +0 -1
- package/dist/posthog-integration-Bj9WmwDq.js.map +0 -1
- package/dist/setup-utils-DyTlaGOV.js.map +0 -1
- package/dist/start-tui-S4fBBfmO.js.map +0 -1
- package/dist/store-vr5j37CU.js.map +0 -1
- package/dist/wizard-session-BHoLQueN.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __require } from "./rolldown-runtime-B_-DWIq7.js";
|
|
2
|
-
import { B as POSTHOG_PROPERTY_HEADER_PREFIX, L as POSTHOG_FLAG_HEADER_PREFIX, Y as WIZARD_REMARK_EVENT_NAME, Z as WIZARD_USER_AGENT, a as getLogFilePath, f as skillTmpPath, nt as runtimeEnv, o as initLogFile, p as getUI, q as WIZARD_ORCHESTRATOR_FLAG_KEY, r as debug, s as logToFile, u as WIZARD_YARA_REPORT_FILE } from "./debug-
|
|
3
|
-
import { t as analytics } from "./analytics-
|
|
4
|
-
import { t as HostResolution } from "./host-resolution-
|
|
5
|
-
import { n as ADDITIONAL_FEATURE_PROMPTS } from "./wizard-session-
|
|
6
|
-
import { i as wizardAbort, n as registerCleanup, t as WizardError } from "./wizard-abort-
|
|
2
|
+
import { B as POSTHOG_PROPERTY_HEADER_PREFIX, L as POSTHOG_FLAG_HEADER_PREFIX, Y as WIZARD_REMARK_EVENT_NAME, Z as WIZARD_USER_AGENT, a as getLogFilePath, f as skillTmpPath, nt as runtimeEnv, o as initLogFile, p as getUI, q as WIZARD_ORCHESTRATOR_FLAG_KEY, r as debug, s as logToFile, u as WIZARD_YARA_REPORT_FILE } from "./debug-CZwmzyDx.js";
|
|
3
|
+
import { t as analytics } from "./analytics-Du8Z_3oX.js";
|
|
4
|
+
import { t as HostResolution } from "./host-resolution-DrOzdKdY.js";
|
|
5
|
+
import { n as ADDITIONAL_FEATURE_PROMPTS } from "./wizard-session-CqihOtk3.js";
|
|
6
|
+
import { i as wizardAbort, n as registerCleanup, t as WizardError } from "./wizard-abort-BG8VNOI9.js";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import * as fs$1 from "fs";
|
|
9
9
|
import fs from "fs";
|
|
@@ -13,9 +13,173 @@ import { spawnSync } from "node:child_process";
|
|
|
13
13
|
import axios from "axios";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
import fg from "fast-glob";
|
|
16
|
+
import * as os from "os";
|
|
16
17
|
import { execFileSync } from "child_process";
|
|
17
18
|
import { randomUUID } from "crypto";
|
|
18
|
-
|
|
19
|
+
//#region src/utils/custom-headers.ts
|
|
20
|
+
/**
|
|
21
|
+
* Builds a list of custom headers for ANTHROPIC_CUSTOM_HEADERS.
|
|
22
|
+
*/
|
|
23
|
+
function createCustomHeaders() {
|
|
24
|
+
const entries = [];
|
|
25
|
+
return {
|
|
26
|
+
add(key, value) {
|
|
27
|
+
const name = key.startsWith("x-") || key.startsWith("X-") ? key : `X-${key}`;
|
|
28
|
+
entries.push({
|
|
29
|
+
key: name,
|
|
30
|
+
value
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
addFlag(flagKey, variant) {
|
|
34
|
+
const headerName = POSTHOG_FLAG_HEADER_PREFIX + flagKey.toUpperCase();
|
|
35
|
+
entries.push({
|
|
36
|
+
key: headerName,
|
|
37
|
+
value: variant
|
|
38
|
+
});
|
|
39
|
+
},
|
|
40
|
+
encode() {
|
|
41
|
+
return entries.map(({ key, value }) => `${key}: ${value}`).join("\n");
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/lib/safe-tools.ts
|
|
47
|
+
const LINTING_TOOLS = [
|
|
48
|
+
"codespell",
|
|
49
|
+
"cspell",
|
|
50
|
+
"git-diff-check",
|
|
51
|
+
"gitleaks",
|
|
52
|
+
"trufflehog",
|
|
53
|
+
"asl-validator",
|
|
54
|
+
"ansible-lint",
|
|
55
|
+
"pmd",
|
|
56
|
+
"biome",
|
|
57
|
+
"cfn-lint",
|
|
58
|
+
"cfnlint",
|
|
59
|
+
"checkov",
|
|
60
|
+
"trivy",
|
|
61
|
+
"test-aztemplate",
|
|
62
|
+
"shellcheck",
|
|
63
|
+
"shfmt",
|
|
64
|
+
"buildifier",
|
|
65
|
+
"cpplint",
|
|
66
|
+
"clang-format",
|
|
67
|
+
"clang-tidy",
|
|
68
|
+
"cmake-format",
|
|
69
|
+
"iwyu",
|
|
70
|
+
"pragma-once",
|
|
71
|
+
"dotnet-format",
|
|
72
|
+
"circleci",
|
|
73
|
+
"clj-kondo",
|
|
74
|
+
"coffeelint",
|
|
75
|
+
"commitlint",
|
|
76
|
+
"jscpd",
|
|
77
|
+
"stylelint",
|
|
78
|
+
"prettier",
|
|
79
|
+
"cue-fmt",
|
|
80
|
+
"dart",
|
|
81
|
+
"hadolint",
|
|
82
|
+
"dotenv-linter",
|
|
83
|
+
"editorconfig-checker",
|
|
84
|
+
"actionlint",
|
|
85
|
+
"zizmor",
|
|
86
|
+
"gofmt",
|
|
87
|
+
"gofumpt",
|
|
88
|
+
"goimports",
|
|
89
|
+
"gokart",
|
|
90
|
+
"golangci-lint",
|
|
91
|
+
"golines",
|
|
92
|
+
"semgrep",
|
|
93
|
+
"goreleaser",
|
|
94
|
+
"graphql-schema-linter",
|
|
95
|
+
"npm-groovy-lint",
|
|
96
|
+
"haml-lint",
|
|
97
|
+
"htmlhint",
|
|
98
|
+
"djlint",
|
|
99
|
+
"checkstyle",
|
|
100
|
+
"google-java-format",
|
|
101
|
+
"eslint",
|
|
102
|
+
"next lint",
|
|
103
|
+
"deno",
|
|
104
|
+
"rome",
|
|
105
|
+
"eslint-plugin-jsonc",
|
|
106
|
+
"eslint-plugin-json",
|
|
107
|
+
"eslint-plugin-jsx-a11y",
|
|
108
|
+
"eslint-plugin-react",
|
|
109
|
+
"nbqa",
|
|
110
|
+
"detekt",
|
|
111
|
+
"ktlint",
|
|
112
|
+
"kubeconform",
|
|
113
|
+
"kube-linter",
|
|
114
|
+
"chktex",
|
|
115
|
+
"luacheck",
|
|
116
|
+
"stylua",
|
|
117
|
+
"markdownlint",
|
|
118
|
+
"markdownlint-cli2",
|
|
119
|
+
"markdown-link-check",
|
|
120
|
+
"markdown-table-prettify",
|
|
121
|
+
"remark-lint",
|
|
122
|
+
"textlint",
|
|
123
|
+
"vale",
|
|
124
|
+
"nixpkgs-fmt",
|
|
125
|
+
"spectral",
|
|
126
|
+
"sort-package-json",
|
|
127
|
+
"perlcritic",
|
|
128
|
+
"perltidy",
|
|
129
|
+
"php-cs-fixer",
|
|
130
|
+
"phpcs",
|
|
131
|
+
"phpstan",
|
|
132
|
+
"psalm",
|
|
133
|
+
"oxipng",
|
|
134
|
+
"psscriptanalyzer",
|
|
135
|
+
"prisma",
|
|
136
|
+
"protolint",
|
|
137
|
+
"buf",
|
|
138
|
+
"pylint",
|
|
139
|
+
"flake8",
|
|
140
|
+
"isort",
|
|
141
|
+
"ruff",
|
|
142
|
+
"black",
|
|
143
|
+
"autopep8",
|
|
144
|
+
"bandit",
|
|
145
|
+
"mypy",
|
|
146
|
+
"pyright",
|
|
147
|
+
"sourcery",
|
|
148
|
+
"yapf",
|
|
149
|
+
"lintr",
|
|
150
|
+
"opa",
|
|
151
|
+
"regal",
|
|
152
|
+
"rubocop",
|
|
153
|
+
"brakeman",
|
|
154
|
+
"rufo",
|
|
155
|
+
"standardrb",
|
|
156
|
+
"clippy",
|
|
157
|
+
"rustfmt",
|
|
158
|
+
"scalafmt",
|
|
159
|
+
"osv-scanner",
|
|
160
|
+
"terrascan",
|
|
161
|
+
"tfsec",
|
|
162
|
+
"snakemake --lint",
|
|
163
|
+
"snakefmt",
|
|
164
|
+
"sqlfluff",
|
|
165
|
+
"sql-formatter",
|
|
166
|
+
"sqlfmt",
|
|
167
|
+
"squawk",
|
|
168
|
+
"svgo",
|
|
169
|
+
"stringslint",
|
|
170
|
+
"swiftformat",
|
|
171
|
+
"swiftlint",
|
|
172
|
+
"tflint",
|
|
173
|
+
"terraform",
|
|
174
|
+
"tofu",
|
|
175
|
+
"terragrunt",
|
|
176
|
+
"txtpbfmt",
|
|
177
|
+
"taplo",
|
|
178
|
+
"eslint-plugin-vue",
|
|
179
|
+
"xmllint",
|
|
180
|
+
"yamllint"
|
|
181
|
+
];
|
|
182
|
+
//#endregion
|
|
19
183
|
//#region src/utils/atomic-ledger.ts
|
|
20
184
|
/**
|
|
21
185
|
* Small shared primitives for on-disk ledgers: an atomic JSON writer and a
|
|
@@ -87,6 +251,68 @@ function coerceAuditChecks(parsed) {
|
|
|
87
251
|
return Array.isArray(parsed) ? parsed : [];
|
|
88
252
|
}
|
|
89
253
|
//#endregion
|
|
254
|
+
//#region src/lib/wizard-ask-bridge.ts
|
|
255
|
+
/**
|
|
256
|
+
* WizardAskBridge — host-side promise broker for the `wizard_ask` MCP tool.
|
|
257
|
+
*
|
|
258
|
+
* The `wizard_ask` tool needs to (a) read information from the wizard
|
|
259
|
+
* session (the active skill id, used as the analytics `source`) and
|
|
260
|
+
* (b) drive the TUI overlay. Wiring `wizard-tools.ts` directly to either
|
|
261
|
+
* would couple our pure-data MCP server to the runtime UI layer.
|
|
262
|
+
*
|
|
263
|
+
* The bridge is the seam: `wizard-tools.ts` depends on this interface,
|
|
264
|
+
* and `agent-runner.ts` constructs an implementation that knows about
|
|
265
|
+
* both the session and `getUI()`.
|
|
266
|
+
*/
|
|
267
|
+
/** Sentinel returned for unanswered fields on cancellation or timeout. */
|
|
268
|
+
const CANCELLED_SENTINEL = "__cancelled__";
|
|
269
|
+
function buildCancelledAnswers(questions) {
|
|
270
|
+
const out = {};
|
|
271
|
+
for (const q of questions) out[q.id] = CANCELLED_SENTINEL;
|
|
272
|
+
return out;
|
|
273
|
+
}
|
|
274
|
+
function isFullyCancelled(answers) {
|
|
275
|
+
const values = Object.values(answers);
|
|
276
|
+
if (values.length === 0) return false;
|
|
277
|
+
return values.every((v) => v === CANCELLED_SENTINEL);
|
|
278
|
+
}
|
|
279
|
+
function createWizardAskBridge(opts) {
|
|
280
|
+
const timeoutMs = opts.timeoutMs ?? 3e5;
|
|
281
|
+
return { async request({ questions }) {
|
|
282
|
+
const pending = {
|
|
283
|
+
id: randomUUID(),
|
|
284
|
+
questions,
|
|
285
|
+
source: opts.getSource(),
|
|
286
|
+
richLinks: opts.richLinks ?? false
|
|
287
|
+
};
|
|
288
|
+
const startedAt = Date.now();
|
|
289
|
+
let timer;
|
|
290
|
+
const timeoutPromise = new Promise((resolve) => {
|
|
291
|
+
timer = setTimeout(() => {
|
|
292
|
+
resolve(buildCancelledAnswers(questions));
|
|
293
|
+
}, timeoutMs);
|
|
294
|
+
});
|
|
295
|
+
try {
|
|
296
|
+
const answers = await Promise.race([opts.showQuestion(pending), timeoutPromise]);
|
|
297
|
+
const durationMs = Date.now() - startedAt;
|
|
298
|
+
if (isFullyCancelled(answers)) analytics.wizardCapture("wizard_ask cancelled", {
|
|
299
|
+
source: pending.source,
|
|
300
|
+
question_count: questions.length,
|
|
301
|
+
duration_ms: durationMs,
|
|
302
|
+
timed_out: durationMs >= timeoutMs
|
|
303
|
+
});
|
|
304
|
+
else analytics.wizardCapture("wizard_ask answered", {
|
|
305
|
+
source: pending.source,
|
|
306
|
+
question_count: questions.length,
|
|
307
|
+
duration_ms: durationMs
|
|
308
|
+
});
|
|
309
|
+
return answers;
|
|
310
|
+
} finally {
|
|
311
|
+
if (timer) clearTimeout(timer);
|
|
312
|
+
}
|
|
313
|
+
} };
|
|
314
|
+
}
|
|
315
|
+
//#endregion
|
|
90
316
|
//#region src/lib/secret-vault.ts
|
|
91
317
|
/**
|
|
92
318
|
* Session-scoped secret vault.
|
|
@@ -931,7 +1157,7 @@ async function createWizardToolsServer(options) {
|
|
|
931
1157
|
description: z.string().optional().describe("Optional secondary line shown dimmed and wrapped beneath the label (multi-select only). Use when a choice needs more than a title — e.g. what a custom scout watches and what makes it speak up.")
|
|
932
1158
|
})).optional().describe("Required for kind=single|multi; ignored for kind=text"),
|
|
933
1159
|
required: z.boolean().optional().describe("Defaults to true"),
|
|
934
|
-
sensitive: z.boolean().optional().describe("Only valid for kind='text'. When true, the user's answer is stored in the wizard's secret vault and returned to you as { secretRef: 'secret:...' } instead of the raw string. Use for API keys, tokens, and any other secret the user types in.")
|
|
1160
|
+
sensitive: z.boolean().optional().describe("Only valid for kind='text'. When true, the user's answer is stored in the wizard's secret vault and returned to you as { secretRef: 'secret:...' } instead of the raw string. Use for API keys, tokens, and any other secret the user types in. The secretRef is only resolved by wizard-tools that accept it (e.g. set_env_values) — it is NOT resolved when passed to other MCP tools (e.g. PostHog data-warehouse tools), which will reject it. For a secret that must reach another tool, write it to the env with set_env_values first, or use that tool's own credential-reference flow.")
|
|
935
1161
|
});
|
|
936
1162
|
return createSdkMcpServer({
|
|
937
1163
|
name: SERVER_NAME,
|
|
@@ -945,7 +1171,7 @@ async function createWizardToolsServer(options) {
|
|
|
945
1171
|
auditSeedChecks,
|
|
946
1172
|
auditAddChecks,
|
|
947
1173
|
auditResolveChecks,
|
|
948
|
-
tool("wizard_ask", "Ask the user one or more structured questions and wait for their answers. Use this whenever you would otherwise inline a question in your text output. Batch related questions into a single call —
|
|
1174
|
+
tool("wizard_ask", "Ask the user one or more structured questions and wait for their answers. Use this whenever you would otherwise inline a question in your text output. Batch related questions into a single call (up to 8) rather than asking one at a time; sequential calls are fine when later questions genuinely depend on earlier answers. A fully cancelled or timed-out response does NOT count against the per-run cap — treat it as \"the user declined\" and fall back gracefully (e.g. hand over a deep link) without worrying about a wasted call.", { questions: z.array(askQuestionSchema).min(1).max(8) }, async (args) => {
|
|
949
1175
|
if (!askBridge) return {
|
|
950
1176
|
content: [{
|
|
951
1177
|
type: "text",
|
|
@@ -999,6 +1225,7 @@ async function createWizardToolsServer(options) {
|
|
|
999
1225
|
askCallCount += 1;
|
|
1000
1226
|
try {
|
|
1001
1227
|
const answers = await askBridge.request({ questions: args.questions });
|
|
1228
|
+
if (isFullyCancelled(answers)) askCallCount -= 1;
|
|
1002
1229
|
const sensitiveById = new Map(args.questions.filter((q) => q.sensitive).map((q) => [q.id, q.prompt]));
|
|
1003
1230
|
const sanitised = {};
|
|
1004
1231
|
for (const [id, answer] of Object.entries(answers)) {
|
|
@@ -1048,170 +1275,6 @@ const WIZARD_TOOL_NAMES = {
|
|
|
1048
1275
|
readHandoffs: `mcp__${SERVER_NAME}__read_handoffs`
|
|
1049
1276
|
};
|
|
1050
1277
|
//#endregion
|
|
1051
|
-
//#region src/utils/custom-headers.ts
|
|
1052
|
-
/**
|
|
1053
|
-
* Builds a list of custom headers for ANTHROPIC_CUSTOM_HEADERS.
|
|
1054
|
-
*/
|
|
1055
|
-
function createCustomHeaders() {
|
|
1056
|
-
const entries = [];
|
|
1057
|
-
return {
|
|
1058
|
-
add(key, value) {
|
|
1059
|
-
const name = key.startsWith("x-") || key.startsWith("X-") ? key : `X-${key}`;
|
|
1060
|
-
entries.push({
|
|
1061
|
-
key: name,
|
|
1062
|
-
value
|
|
1063
|
-
});
|
|
1064
|
-
},
|
|
1065
|
-
addFlag(flagKey, variant) {
|
|
1066
|
-
const headerName = POSTHOG_FLAG_HEADER_PREFIX + flagKey.toUpperCase();
|
|
1067
|
-
entries.push({
|
|
1068
|
-
key: headerName,
|
|
1069
|
-
value: variant
|
|
1070
|
-
});
|
|
1071
|
-
},
|
|
1072
|
-
encode() {
|
|
1073
|
-
return entries.map(({ key, value }) => `${key}: ${value}`).join("\n");
|
|
1074
|
-
}
|
|
1075
|
-
};
|
|
1076
|
-
}
|
|
1077
|
-
//#endregion
|
|
1078
|
-
//#region src/lib/safe-tools.ts
|
|
1079
|
-
const LINTING_TOOLS = [
|
|
1080
|
-
"codespell",
|
|
1081
|
-
"cspell",
|
|
1082
|
-
"git-diff-check",
|
|
1083
|
-
"gitleaks",
|
|
1084
|
-
"trufflehog",
|
|
1085
|
-
"asl-validator",
|
|
1086
|
-
"ansible-lint",
|
|
1087
|
-
"pmd",
|
|
1088
|
-
"biome",
|
|
1089
|
-
"cfn-lint",
|
|
1090
|
-
"cfnlint",
|
|
1091
|
-
"checkov",
|
|
1092
|
-
"trivy",
|
|
1093
|
-
"test-aztemplate",
|
|
1094
|
-
"shellcheck",
|
|
1095
|
-
"shfmt",
|
|
1096
|
-
"buildifier",
|
|
1097
|
-
"cpplint",
|
|
1098
|
-
"clang-format",
|
|
1099
|
-
"clang-tidy",
|
|
1100
|
-
"cmake-format",
|
|
1101
|
-
"iwyu",
|
|
1102
|
-
"pragma-once",
|
|
1103
|
-
"dotnet-format",
|
|
1104
|
-
"circleci",
|
|
1105
|
-
"clj-kondo",
|
|
1106
|
-
"coffeelint",
|
|
1107
|
-
"commitlint",
|
|
1108
|
-
"jscpd",
|
|
1109
|
-
"stylelint",
|
|
1110
|
-
"prettier",
|
|
1111
|
-
"cue-fmt",
|
|
1112
|
-
"dart",
|
|
1113
|
-
"hadolint",
|
|
1114
|
-
"dotenv-linter",
|
|
1115
|
-
"editorconfig-checker",
|
|
1116
|
-
"actionlint",
|
|
1117
|
-
"zizmor",
|
|
1118
|
-
"gofmt",
|
|
1119
|
-
"gofumpt",
|
|
1120
|
-
"goimports",
|
|
1121
|
-
"gokart",
|
|
1122
|
-
"golangci-lint",
|
|
1123
|
-
"golines",
|
|
1124
|
-
"semgrep",
|
|
1125
|
-
"goreleaser",
|
|
1126
|
-
"graphql-schema-linter",
|
|
1127
|
-
"npm-groovy-lint",
|
|
1128
|
-
"haml-lint",
|
|
1129
|
-
"htmlhint",
|
|
1130
|
-
"djlint",
|
|
1131
|
-
"checkstyle",
|
|
1132
|
-
"google-java-format",
|
|
1133
|
-
"eslint",
|
|
1134
|
-
"next lint",
|
|
1135
|
-
"deno",
|
|
1136
|
-
"rome",
|
|
1137
|
-
"eslint-plugin-jsonc",
|
|
1138
|
-
"eslint-plugin-json",
|
|
1139
|
-
"eslint-plugin-jsx-a11y",
|
|
1140
|
-
"eslint-plugin-react",
|
|
1141
|
-
"nbqa",
|
|
1142
|
-
"detekt",
|
|
1143
|
-
"ktlint",
|
|
1144
|
-
"kubeconform",
|
|
1145
|
-
"kube-linter",
|
|
1146
|
-
"chktex",
|
|
1147
|
-
"luacheck",
|
|
1148
|
-
"stylua",
|
|
1149
|
-
"markdownlint",
|
|
1150
|
-
"markdownlint-cli2",
|
|
1151
|
-
"markdown-link-check",
|
|
1152
|
-
"markdown-table-prettify",
|
|
1153
|
-
"remark-lint",
|
|
1154
|
-
"textlint",
|
|
1155
|
-
"vale",
|
|
1156
|
-
"nixpkgs-fmt",
|
|
1157
|
-
"spectral",
|
|
1158
|
-
"sort-package-json",
|
|
1159
|
-
"perlcritic",
|
|
1160
|
-
"perltidy",
|
|
1161
|
-
"php-cs-fixer",
|
|
1162
|
-
"phpcs",
|
|
1163
|
-
"phpstan",
|
|
1164
|
-
"psalm",
|
|
1165
|
-
"oxipng",
|
|
1166
|
-
"psscriptanalyzer",
|
|
1167
|
-
"prisma",
|
|
1168
|
-
"protolint",
|
|
1169
|
-
"buf",
|
|
1170
|
-
"pylint",
|
|
1171
|
-
"flake8",
|
|
1172
|
-
"isort",
|
|
1173
|
-
"ruff",
|
|
1174
|
-
"black",
|
|
1175
|
-
"autopep8",
|
|
1176
|
-
"bandit",
|
|
1177
|
-
"mypy",
|
|
1178
|
-
"pyright",
|
|
1179
|
-
"sourcery",
|
|
1180
|
-
"yapf",
|
|
1181
|
-
"lintr",
|
|
1182
|
-
"opa",
|
|
1183
|
-
"regal",
|
|
1184
|
-
"rubocop",
|
|
1185
|
-
"brakeman",
|
|
1186
|
-
"rufo",
|
|
1187
|
-
"standardrb",
|
|
1188
|
-
"clippy",
|
|
1189
|
-
"rustfmt",
|
|
1190
|
-
"scalafmt",
|
|
1191
|
-
"osv-scanner",
|
|
1192
|
-
"terrascan",
|
|
1193
|
-
"tfsec",
|
|
1194
|
-
"snakemake --lint",
|
|
1195
|
-
"snakefmt",
|
|
1196
|
-
"sqlfluff",
|
|
1197
|
-
"sql-formatter",
|
|
1198
|
-
"sqlfmt",
|
|
1199
|
-
"squawk",
|
|
1200
|
-
"svgo",
|
|
1201
|
-
"stringslint",
|
|
1202
|
-
"swiftformat",
|
|
1203
|
-
"swiftlint",
|
|
1204
|
-
"tflint",
|
|
1205
|
-
"terraform",
|
|
1206
|
-
"tofu",
|
|
1207
|
-
"terragrunt",
|
|
1208
|
-
"txtpbfmt",
|
|
1209
|
-
"taplo",
|
|
1210
|
-
"eslint-plugin-vue",
|
|
1211
|
-
"xmllint",
|
|
1212
|
-
"yamllint"
|
|
1213
|
-
];
|
|
1214
|
-
//#endregion
|
|
1215
1278
|
//#region src/lib/skill-install.ts
|
|
1216
1279
|
/**
|
|
1217
1280
|
* Check if command is a PostHog skill installation from MCP.
|
|
@@ -3370,6 +3433,6 @@ function handleSDKMessage(message, options, spinner, signals, receivedSuccessRes
|
|
|
3370
3433
|
}
|
|
3371
3434
|
}
|
|
3372
3435
|
//#endregion
|
|
3373
|
-
export {
|
|
3436
|
+
export { AUDIT_SEVERITY_STYLE as A, QUEUE_DIR_NAME as C, AUDIT_CHECKS_FILE as D, createWizardAskBridge as E, getAuditChecks as M, AUDIT_CHECKS_KEY as O, installSkillById as S, TaskStatus as T, EVENT_PLAN_FILE as _, runAgent as a, downloadSkill as b, classifySettingsConflicts as c, sanitizeAgentSubprocessEnv as d, AgentSignals as f, writeScanReport as g, formatYaraAbortMessage as h, isOrchestratorEnabled as i, coerceAuditChecks as j, AUDIT_REPORT_FILE as k, recoverOrphanedSettingsBackups as l, formatScanReport as m, buildRunTags as n, backupAndFixClaudeSettings as o, flushScanReport as p, initializeAgent as r, checkAllSettingsConflicts as s, buildAgentEnv as t, restoreClaudeSettings as u, SETUP_REPORT_FILE as v, QueueStore as w, fetchSkillMenu as x, WIZARD_TOOL_NAMES as y };
|
|
3374
3437
|
|
|
3375
|
-
//# sourceMappingURL=agent-interface-
|
|
3438
|
+
//# sourceMappingURL=agent-interface-D8jnkEnB.js.map
|