@posthog/wizard 2.78.0 → 2.79.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 +20 -11
- package/dist/{add-mcp-server-to-clients-JMv8LP-O.js → add-mcp-server-to-clients-amlJWW7W.js} +5 -5
- package/dist/{add-mcp-server-to-clients-JMv8LP-O.js.map → add-mcp-server-to-clients-amlJWW7W.js.map} +1 -1
- package/dist/{agent-bCZ3i3fh.js → agent-CNrEC-9v.js} +130 -31
- package/dist/agent-CNrEC-9v.js.map +1 -0
- package/dist/{agent-interface-BAOIHuXS.js → agent-interface-BXvmAm4c.js} +48 -22
- package/dist/agent-interface-BXvmAm4c.js.map +1 -0
- package/dist/{agent-prompt-loader-7Pd4CfZO.js → agent-prompt-loader-DiKUbhi_.js} +5 -5
- package/dist/{agent-prompt-loader-7Pd4CfZO.js.map → agent-prompt-loader-DiKUbhi_.js.map} +1 -1
- package/dist/analytics-DxwRi2Hf.js +2 -0
- package/dist/{analytics-CHCZ_qUR.js → analytics-VRYdebXW.js} +4 -4
- package/dist/{analytics-CHCZ_qUR.js.map → analytics-VRYdebXW.js.map} +1 -1
- package/dist/{api-Diy_2fp8.js → api-DGuJTzjr.js} +3 -3
- package/dist/{api-Diy_2fp8.js.map → api-DGuJTzjr.js.map} +1 -1
- package/dist/bin.js +56 -53
- package/dist/bin.js.map +1 -1
- package/dist/{bounded-fs-Bx9zTe6m.js → bounded-fs-Cpn129A4.js} +3 -3
- package/dist/{bounded-fs-Bx9zTe6m.js.map → bounded-fs-Cpn129A4.js.map} +1 -1
- package/dist/{ci-install-CDdQYsPe.js → ci-install-BPA6gzEq.js} +6 -6
- package/dist/ci-install-BPA6gzEq.js.map +1 -0
- package/dist/{constants-jFI2SaE1.js → constants-CuJfQEcC.js} +3 -3
- package/dist/{constants-jFI2SaE1.js.map → constants-CuJfQEcC.js.map} +1 -1
- package/dist/{debug-M2gV2iDq.js → debug-B9k4ideV.js} +1 -1
- package/dist/{debug-Ch4BDOtD.js → debug-Cj-8vfXY.js} +2 -2
- package/dist/{debug-Ch4BDOtD.js.map → debug-Cj-8vfXY.js.map} +1 -1
- package/dist/{endpoints-DCVbM06L.js → endpoints-DnIX0pZH.js} +3 -3
- package/dist/{endpoints-DCVbM06L.js.map → endpoints-DnIX0pZH.js.map} +1 -1
- package/dist/{env-api-key-Qx8NnYHm.js → env-api-key-BWdKpGEr.js} +2 -2
- package/dist/{env-api-key-Qx8NnYHm.js.map → env-api-key-BWdKpGEr.js.map} +1 -1
- package/dist/{environment-B07Bmxae.js → environment-DZYUSCpV.js} +4 -4
- package/dist/{environment-B07Bmxae.js.map → environment-DZYUSCpV.js.map} +1 -1
- package/dist/{errors-CQ9kttJD.js → errors-ddDE6MbA.js} +4 -46
- package/dist/errors-ddDE6MbA.js.map +1 -0
- package/dist/{file-BcLTjU16.js → file-dEhr-l3n.js} +3 -3
- package/dist/file-dEhr-l3n.js.map +1 -0
- package/dist/{file-watcher-DWc_bTs6.js → file-watcher-CPM-Nn9L.js} +2 -2
- package/dist/{file-watcher-DWc_bTs6.js.map → file-watcher-CPM-Nn9L.js.map} +1 -1
- package/dist/{gateway-CjoShdLa.js → gateway-CVU1G0H3.js} +38 -8
- package/dist/gateway-CVU1G0H3.js.map +1 -0
- package/dist/{headless-ui-BFFmYC4v.js → headless-ui-pY2xB5ug.js} +2 -2
- package/dist/{headless-ui-BFFmYC4v.js.map → headless-ui-pY2xB5ug.js.map} +1 -1
- package/dist/{interactive-D6zV7brJ.js → interactive-BOGlinZe.js} +2 -2
- package/dist/interactive-BOGlinZe.js.map +1 -0
- package/dist/{logging-ui-_TwoMNbG.js → logging-ui-CUxNYF2t.js} +4 -4
- package/dist/{logging-ui-_TwoMNbG.js.map → logging-ui-CUxNYF2t.js.map} +1 -1
- package/dist/{mcp-DAgaoGk5.js → mcp-JcsBBnWv.js} +4 -4
- package/dist/{mcp-DAgaoGk5.js.map → mcp-JcsBBnWv.js.map} +1 -1
- package/dist/{mcp-prompt-streaming-I2U_X7BC.js → mcp-prompt-streaming-B-p_Pvb2.js} +6 -6
- package/dist/mcp-prompt-streaming-B-p_Pvb2.js.map +1 -0
- package/dist/{mint-failure-D4nd2XmZ.js → mint-failure-CZFZpHpW.js} +687 -125
- package/dist/mint-failure-CZFZpHpW.js.map +1 -0
- package/dist/{models-DDdBJKwT.js → models-DnAY67Lg.js} +2 -2
- package/dist/{models-DDdBJKwT.js.map → models-DnAY67Lg.js.map} +1 -1
- package/dist/{non-interactive-Dzow7YKY.js → non-interactive-DR1CWXY1.js} +3 -3
- package/dist/{non-interactive-Dzow7YKY.js.map → non-interactive-DR1CWXY1.js.map} +1 -1
- package/dist/{oauth-session-DJ8h6GFa.js → oauth-session-CQTFOk-I.js} +2 -2
- package/dist/{oauth-session-DJ8h6GFa.js.map → oauth-session-CQTFOk-I.js.map} +1 -1
- package/dist/{orchestrator-tools-szcdscwn.js → orchestrator-tools-CBdt-SXO.js} +3 -3
- package/dist/{orchestrator-tools-szcdscwn.js.map → orchestrator-tools-CBdt-SXO.js.map} +1 -1
- package/dist/{pi-D3h5Ok0i.js → pi-BtqcLX3y.js} +143 -44
- package/dist/pi-BtqcLX3y.js.map +1 -0
- package/dist/{playground-5AB4WgNF.js → playground-Dz-ZVjBk.js} +9 -9
- package/dist/playground-Dz-ZVjBk.js.map +1 -0
- package/dist/{posthog-DNn574nW.js → posthog-6Uqw_Eux.js} +3 -3
- package/dist/posthog-6Uqw_Eux.js.map +1 -0
- package/dist/{provisioning-B8uSqRZk.js → provisioning-Zf7yPcEs.js} +4 -4
- package/dist/{provisioning-B8uSqRZk.js.map → provisioning-Zf7yPcEs.js.map} +1 -1
- package/dist/{queue-tools-9OOVx5TE.js → queue-tools-B7_aCyd-.js} +3 -3
- package/dist/{queue-tools-9OOVx5TE.js.map → queue-tools-B7_aCyd-.js.map} +1 -1
- package/dist/{registry-8YG-kuXk.js → registry-B6iLGorH.js} +49 -49
- package/dist/registry-B6iLGorH.js.map +1 -0
- package/dist/{run-agent-legacy-d7rWlzQR.js → run-agent-legacy-6WcYMaR9.js} +822 -1020
- package/dist/run-agent-legacy-6WcYMaR9.js.map +1 -0
- package/dist/{security-Cg_4a7vB.js → security-lkBwWbrK.js} +16 -6
- package/dist/security-lkBwWbrK.js.map +1 -0
- package/dist/{setup-utils-CmTCTPkX.js → setup-utils-dCViCC6s.js} +11 -11
- package/dist/setup-utils-dCViCC6s.js.map +1 -0
- package/dist/{start-tui-CB2PZs1x.js → start-tui-oCWMgsDP.js} +26 -26
- package/dist/start-tui-oCWMgsDP.js.map +1 -0
- package/dist/{steps-BZcXRJNY.js → steps-gx0Pq4I4.js} +7 -7
- package/dist/{steps-BZcXRJNY.js.map → steps-gx0Pq4I4.js.map} +1 -1
- package/dist/{store-UN7c-ASf.js → store-xYy_6Ruv.js} +10 -10
- package/dist/store-xYy_6Ruv.js.map +1 -0
- package/dist/{subagent-BofIDK-O.js → subagent-Bfy0sfhU.js} +3 -3
- package/dist/{subagent-BofIDK-O.js.map → subagent-Bfy0sfhU.js.map} +1 -1
- package/dist/{task-r9t1UhQP.js → task-BOfw7GPc.js} +16 -16
- package/dist/{task-r9t1UhQP.js.map → task-BOfw7GPc.js.map} +1 -1
- package/dist/{task-stream-CMUilu54.js → task-stream-kYlm9qd0.js} +9 -9
- package/dist/task-stream-kYlm9qd0.js.map +1 -0
- package/dist/{telemetry-D6ruCtnv.js → telemetry-Bpv-Mh5B.js} +3 -3
- package/dist/{telemetry-D6ruCtnv.js.map → telemetry-Bpv-Mh5B.js.map} +1 -1
- package/dist/{terminal-DrGyci_a.js → terminal-D07EQ2y0.js} +15 -15
- package/dist/terminal-D07EQ2y0.js.map +1 -0
- package/dist/{tools-Dyfh9aCD.js → tools-Cc41af5W.js} +8 -8
- package/dist/{tools-Dyfh9aCD.js.map → tools-Cc41af5W.js.map} +1 -1
- package/dist/{ui-BBVuTM1v.js → ui-CGXtC7Vn.js} +3 -3
- package/dist/{ui-BBVuTM1v.js.map → ui-CGXtC7Vn.js.map} +1 -1
- package/dist/{version-aXxpgRKx.js → version-Cadof0Z_.js} +2 -2
- package/dist/{version-aXxpgRKx.js.map → version-Cadof0Z_.js.map} +1 -1
- package/dist/{wizard-abort-BBkiUxfS.js → wizard-abort-HDbP3YcS.js} +6 -6
- package/dist/{wizard-abort-BBkiUxfS.js.map → wizard-abort-HDbP3YcS.js.map} +1 -1
- package/dist/wizard-abort-Y-Ip2K4z.js +3 -0
- package/dist/wizard-session-2w4Ru-Wz.js.map +1 -1
- package/dist/yara-hooks-B49RIk5d.js +2 -0
- package/dist/{yara-hooks-DCeMDd1o.js → yara-hooks-DCfROpZt.js} +5 -5
- package/dist/{yara-hooks-DCeMDd1o.js.map → yara-hooks-DCfROpZt.js.map} +1 -1
- package/package.json +2 -1
- package/dist/agent-bCZ3i3fh.js.map +0 -1
- package/dist/agent-interface-BAOIHuXS.js.map +0 -1
- package/dist/analytics-BcV-WCM4.js +0 -2
- package/dist/ci-install-CDdQYsPe.js.map +0 -1
- package/dist/errors-CQ9kttJD.js.map +0 -1
- package/dist/file-BcLTjU16.js.map +0 -1
- package/dist/gateway-CjoShdLa.js.map +0 -1
- package/dist/interactive-D6zV7brJ.js.map +0 -1
- package/dist/mcp-prompt-streaming-I2U_X7BC.js.map +0 -1
- package/dist/mint-failure-D4nd2XmZ.js.map +0 -1
- package/dist/pi-D3h5Ok0i.js.map +0 -1
- package/dist/playground-5AB4WgNF.js.map +0 -1
- package/dist/posthog-DNn574nW.js.map +0 -1
- package/dist/registry-8YG-kuXk.js.map +0 -1
- package/dist/run-agent-legacy-d7rWlzQR.js.map +0 -1
- package/dist/security-Cg_4a7vB.js.map +0 -1
- package/dist/setup-utils-CmTCTPkX.js.map +0 -1
- package/dist/start-tui-CB2PZs1x.js.map +0 -1
- package/dist/store-UN7c-ASf.js.map +0 -1
- package/dist/task-stream-CMUilu54.js.map +0 -1
- package/dist/terminal-DrGyci_a.js.map +0 -1
- package/dist/wizard-abort-BU4aLyvh.js +0 -3
- package/dist/yara-hooks-DSGuCU9A.js +0 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { n as __require } from "./rolldown-runtime-B_-DWIq7.js";
|
|
2
|
-
import {
|
|
3
|
-
import { a as getLogFilePath, o as initLogFile, r as debug, s as logToFile, v as runtimeEnv } from "./debug-
|
|
4
|
-
import { Y as WIZARD_REMARK_EVENT_NAME, c as CONTEXT_MILL_URL, et as wizardUserAgentForProgram, o as AWS_SKILLS_BASE_URL } from "./constants-
|
|
5
|
-
import { n as analytics } from "./analytics-
|
|
6
|
-
import { a as safeReadFile, i as readProjectFile, o as walkProjectFiles } from "./bounded-fs-
|
|
7
|
-
import { t as registerCleanup } from "./wizard-abort-
|
|
8
|
-
import { i as gatewayApiFor, l as
|
|
9
|
-
import { i as modelCapabilities, o as triageModelFor } from "./models-
|
|
10
|
-
import { _ as coerceAuditChecks, h as AUDIT_CHECKS_FILE, l as prewarmYaraScanner, n as createPostToolUseYaraHooks, p as scanInstalledSkill, r as createPreToolUseYaraHooks } from "./yara-hooks-
|
|
11
|
-
import { l as buildOrchestratorTools, v as makeMutex, y as writeJsonAtomic } from "./queue-tools-
|
|
2
|
+
import { i as classifyAuthFailure } from "./errors-ddDE6MbA.js";
|
|
3
|
+
import { a as getLogFilePath, o as initLogFile, r as debug, s as logToFile, v as runtimeEnv } from "./debug-Cj-8vfXY.js";
|
|
4
|
+
import { Y as WIZARD_REMARK_EVENT_NAME, c as CONTEXT_MILL_URL, et as wizardUserAgentForProgram, o as AWS_SKILLS_BASE_URL } from "./constants-CuJfQEcC.js";
|
|
5
|
+
import { n as analytics } from "./analytics-VRYdebXW.js";
|
|
6
|
+
import { a as safeReadFile, i as readProjectFile, o as walkProjectFiles } from "./bounded-fs-Cpn129A4.js";
|
|
7
|
+
import { t as registerCleanup } from "./wizard-abort-HDbP3YcS.js";
|
|
8
|
+
import { c as REMARK_INSTRUCTION, f as gatewayAuth, i as gatewayApiFor, l as RESUME_INSTRUCTION, n as buildGatewayModel, p as isPastRefresh, s as AgentSignals, u as buildWizardPropertiesBlob } from "./gateway-CVU1G0H3.js";
|
|
9
|
+
import { i as modelCapabilities, o as triageModelFor } from "./models-DnAY67Lg.js";
|
|
10
|
+
import { _ as coerceAuditChecks, h as AUDIT_CHECKS_FILE, l as prewarmYaraScanner, n as createPostToolUseYaraHooks, p as scanInstalledSkill, r as createPreToolUseYaraHooks } from "./yara-hooks-DCfROpZt.js";
|
|
11
|
+
import { l as buildOrchestratorTools, v as makeMutex, y as writeJsonAtomic } from "./queue-tools-B7_aCyd-.js";
|
|
12
12
|
import { createRequire } from "node:module";
|
|
13
13
|
import * as fs$1 from "fs";
|
|
14
14
|
import fs from "fs";
|
|
@@ -18,9 +18,9 @@ import { spawnSync } from "node:child_process";
|
|
|
18
18
|
import { closeSync, constants, fchmodSync, lstatSync, openSync, renameSync, unlinkSync, writeSync } from "node:fs";
|
|
19
19
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
20
20
|
import { z } from "zod";
|
|
21
|
+
import { randomUUID as randomUUID$1 } from "crypto";
|
|
21
22
|
import * as os from "os";
|
|
22
23
|
import { unzipSync } from "fflate";
|
|
23
|
-
import { randomUUID as randomUUID$1 } from "crypto";
|
|
24
24
|
//#region src/agent/triage-provider.ts
|
|
25
25
|
const TRIAGE_MAX_TOKENS = 16384;
|
|
26
26
|
const TRIAGE_TIMEOUT_MS = 2e4;
|
|
@@ -2405,7 +2405,7 @@ var AgentOutputSignals = class {
|
|
|
2405
2405
|
}
|
|
2406
2406
|
};
|
|
2407
2407
|
//#endregion
|
|
2408
|
-
//#region src/
|
|
2408
|
+
//#region src/shared/agent-env-isolation.ts
|
|
2409
2409
|
/**
|
|
2410
2410
|
* Credential isolation for the Claude Agent SDK subprocess.
|
|
2411
2411
|
*
|
|
@@ -2997,6 +2997,10 @@ function buildAgentEnv(wizardMetadata, wizardFlags, teamId) {
|
|
|
2997
2997
|
* this guard is a belt-and-suspenders second line.
|
|
2998
2998
|
*/
|
|
2999
2999
|
function wizardCanUseTool(toolName, input, context = {}) {
|
|
3000
|
+
if (context.readOnly && !READ_ONLY_TOOLS.includes(toolName)) return {
|
|
3001
|
+
behavior: "deny",
|
|
3002
|
+
message: `Tool ${toolName} is disabled for read-only runs.`
|
|
3003
|
+
};
|
|
3000
3004
|
if (context.disallowedTools?.includes(toolName)) {
|
|
3001
3005
|
logToFile(`Denying disallowed tool: ${toolName}`);
|
|
3002
3006
|
return {
|
|
@@ -3137,10 +3141,12 @@ async function initializeAgent(config, options) {
|
|
|
3137
3141
|
workingDirectory: config.workingDirectory,
|
|
3138
3142
|
mcpServers,
|
|
3139
3143
|
model,
|
|
3144
|
+
outputFormat: config.outputFormat,
|
|
3140
3145
|
posthogApiKey: config.posthogApiKey,
|
|
3141
3146
|
currentPosthogApiKey: config.currentPosthogApiKey,
|
|
3142
3147
|
wizardFlags: config.wizardFlags,
|
|
3143
3148
|
wizardMetadata: config.wizardMetadata,
|
|
3149
|
+
readOnly: config.readOnly,
|
|
3144
3150
|
allowedTools: config.allowedTools,
|
|
3145
3151
|
disallowedTools: config.disallowedTools,
|
|
3146
3152
|
getPendingQuestion: config.getPendingQuestion,
|
|
@@ -3199,9 +3205,15 @@ function sdkResultFailure(message) {
|
|
|
3199
3205
|
if (message.subtype === "success" && message.is_error !== true) return void 0;
|
|
3200
3206
|
const errors = Array.isArray(message.errors) ? message.errors : [];
|
|
3201
3207
|
const detail = errors.map((error) => typeof error === "string" ? error : JSON.stringify(error)).join("; ") || (typeof message.result === "string" ? message.result : String(message.subtype ?? "SDK result failed"));
|
|
3208
|
+
const status = sdkErrorStatus(message.api_error_status) ?? sdkErrorStatus(message.status) ?? errors.map(sdkErrorStatus).find((code) => code !== void 0) ?? sdkErrorStatus(message.result);
|
|
3209
|
+
if (message.subtype === "error_max_structured_output_retries") return {
|
|
3210
|
+
kind: "failure",
|
|
3211
|
+
classification: "WIZARD_INVALID_STRUCTURED_OUTPUT",
|
|
3212
|
+
message: detail
|
|
3213
|
+
};
|
|
3202
3214
|
return {
|
|
3203
3215
|
kind: "failure",
|
|
3204
|
-
classification:
|
|
3216
|
+
classification: status === 429 ? "WIZARD_RATE_LIMIT" : "WIZARD_API_ERROR",
|
|
3205
3217
|
message: detail
|
|
3206
3218
|
};
|
|
3207
3219
|
}
|
|
@@ -3281,7 +3293,10 @@ async function runAgent(agentConfig, prompt, options, spinner, config, middlewar
|
|
|
3281
3293
|
logToFile(`${AgentSignals.BENCHMARK} Middleware finalize error:`, e);
|
|
3282
3294
|
}
|
|
3283
3295
|
spinner.stop(successMessage);
|
|
3284
|
-
return {
|
|
3296
|
+
return {
|
|
3297
|
+
kind: "success",
|
|
3298
|
+
structuredOutput: lastResultMessage?.structured_output
|
|
3299
|
+
};
|
|
3285
3300
|
};
|
|
3286
3301
|
let abortController = new AbortController();
|
|
3287
3302
|
const onExternalAbort = () => {
|
|
@@ -3307,7 +3322,7 @@ async function runAgent(agentConfig, prompt, options, spinner, config, middlewar
|
|
|
3307
3322
|
}, timeoutMs) : void 0;
|
|
3308
3323
|
try {
|
|
3309
3324
|
const disallow = new Set(agentConfig.disallowedTools ?? []);
|
|
3310
|
-
const allowedTools = [...BASE_ALLOWED_TOOLS, ...agentConfig.allowedTools ?? []].filter((t) => !disallow.has(t));
|
|
3325
|
+
const allowedTools = (agentConfig.readOnly ? READ_ONLY_TOOLS : [...BASE_ALLOWED_TOOLS, ...agentConfig.allowedTools ?? []]).filter((t) => !disallow.has(t));
|
|
3311
3326
|
const inheritedMcpServerNames = Object.keys(agentConfig.mcpServers);
|
|
3312
3327
|
const triageProvider = agentConfig.triageProvider;
|
|
3313
3328
|
const onYaraTerminate = (reason) => {
|
|
@@ -3330,18 +3345,19 @@ async function runAgent(agentConfig, prompt, options, spinner, config, middlewar
|
|
|
3330
3345
|
abortController,
|
|
3331
3346
|
resume,
|
|
3332
3347
|
model: agentConfig.model,
|
|
3348
|
+
outputFormat: agentConfig.outputFormat,
|
|
3333
3349
|
cwd: agentConfig.workingDirectory,
|
|
3334
|
-
permissionMode: "acceptEdits",
|
|
3350
|
+
permissionMode: agentConfig.readOnly ? "default" : "acceptEdits",
|
|
3335
3351
|
betas: ["context-1m-2025-08-07"],
|
|
3336
|
-
mcpServers: agentConfig.mcpServers,
|
|
3337
|
-
agents: { "general-purpose": {
|
|
3352
|
+
mcpServers: agentConfig.readOnly ? {} : agentConfig.mcpServers,
|
|
3353
|
+
agents: agentConfig.readOnly ? void 0 : { "general-purpose": {
|
|
3338
3354
|
description: "General-purpose subagent. Inherits the parent run's tools plus the PostHog and wizard-tools MCP servers, so it can call mcp__posthog-wizard__* directly instead of curling the REST API.",
|
|
3339
3355
|
prompt: "You are a general-purpose subagent for the PostHog wizard. Prefer the authenticated mcp__posthog-wizard__* MCP tools over raw HTTP — they are already authenticated for this project. Only fall back to other transports if no MCP tool covers the operation.",
|
|
3340
3356
|
mcpServers: inheritedMcpServerNames,
|
|
3341
3357
|
disallowedTools: agentConfig.disallowedTools ? [...agentConfig.disallowedTools] : void 0
|
|
3342
3358
|
} },
|
|
3343
|
-
settingSources: ["project"],
|
|
3344
|
-
skills: "all",
|
|
3359
|
+
settingSources: agentConfig.readOnly ? [] : ["project"],
|
|
3360
|
+
skills: agentConfig.readOnly ? [] : "all",
|
|
3345
3361
|
allowedTools,
|
|
3346
3362
|
sandbox: {
|
|
3347
3363
|
enabled: true,
|
|
@@ -3398,6 +3414,7 @@ async function runAgent(agentConfig, prompt, options, spinner, config, middlewar
|
|
|
3398
3414
|
input
|
|
3399
3415
|
});
|
|
3400
3416
|
const result = wizardCanUseTool(toolName, input, {
|
|
3417
|
+
readOnly: agentConfig.readOnly,
|
|
3401
3418
|
wizardAskPending: agentConfig.getPendingQuestion?.() != null,
|
|
3402
3419
|
disallowedTools: agentConfig.disallowedTools
|
|
3403
3420
|
});
|
|
@@ -3413,7 +3430,7 @@ async function runAgent(agentConfig, prompt, options, spinner, config, middlewar
|
|
|
3413
3430
|
harness: "anthropic"
|
|
3414
3431
|
})
|
|
3415
3432
|
},
|
|
3416
|
-
tools: {
|
|
3433
|
+
tools: agentConfig.readOnly ? [...READ_ONLY_TOOLS] : {
|
|
3417
3434
|
type: "preset",
|
|
3418
3435
|
preset: "claude_code"
|
|
3419
3436
|
},
|
|
@@ -3688,6 +3705,10 @@ async function runAgent(agentConfig, prompt, options, spinner, config, middlewar
|
|
|
3688
3705
|
message: `Agent run timed out after ${timeoutMs / 1e3}s`
|
|
3689
3706
|
};
|
|
3690
3707
|
}
|
|
3708
|
+
if (terminalFailure) {
|
|
3709
|
+
spinner.stop(errorMessage);
|
|
3710
|
+
return terminalFailure;
|
|
3711
|
+
}
|
|
3691
3712
|
const apiErrorMessage = signals.apiErrorMessage() ?? "Unknown API error";
|
|
3692
3713
|
if (signals.hasApiErrorStatus(429)) {
|
|
3693
3714
|
logToFile("Agent error (caught): RATE_LIMIT");
|
|
@@ -3764,6 +3785,11 @@ let TaskTool = /* @__PURE__ */ function(TaskTool) {
|
|
|
3764
3785
|
* init handler has to recognise this server in the SDK's status report.
|
|
3765
3786
|
*/
|
|
3766
3787
|
const POSTHOG_MCP_SERVER_NAME = "posthog-wizard";
|
|
3788
|
+
const READ_ONLY_TOOLS = [
|
|
3789
|
+
"Read",
|
|
3790
|
+
"Glob",
|
|
3791
|
+
"Grep"
|
|
3792
|
+
];
|
|
3767
3793
|
const BASE_ALLOWED_TOOLS = [
|
|
3768
3794
|
"Read",
|
|
3769
3795
|
"Write",
|
|
@@ -4051,4 +4077,4 @@ function handleSDKMessage(message, options, spinner, signals, emit, receivedSucc
|
|
|
4051
4077
|
//#endregion
|
|
4052
4078
|
export { vaultSensitiveAnswers as $, CHECK_ENV_KEYS_FILE_PATH_DESCRIPTION as A, describeAskCancellation as B, AUDIT_ADD_CHECKS_PARAM_DESCRIPTION as C, AUDIT_SEED_CHECKS_PARAM_DESCRIPTION as D, AUDIT_SEED_CHECKS_DESCRIPTION as E, WIZARD_ASK_TOOL_DESCRIPTION as F, mergeEnvValues as G, ensureGitignoreCoverage as H, WIZARD_TOOL_NAMES as I, resolveAuditChecks as J, normaliseAskSubject as K, addAuditChecks as L, WIZARD_ASK_KIND_DESCRIPTION as M, WIZARD_ASK_SENSITIVE_DESCRIPTION as N, AUDIT_STATUSES as O, WIZARD_ASK_SUBJECT_DESCRIPTION as P, templateEnvWriteRefusal as Q, checkEnvKeys as R, AUDIT_ADD_CHECKS_DESCRIPTION as S, AUDIT_RESOLVE_CHECKS_PARAM_DESCRIPTION as T, installSkillById as U, downloadSkill as V, legacyKeyNameRefusal as W, resolveEnvSecretRefs as X, resolveEnvPath as Y, seedAuditChecks as Z, createSecretVault as _, wizardCanUseTool as a, MAX_ENV_KEY_SET as at, PUBLISH_HANDOFF_TOOL_NAME as b, checkAllSettingsConflicts as c, toPromptSafeRelativePath as ct, restoreClaudeSettings as d, fetchSkillMenu as et, sanitizeAgentSubprocessEnv as f, assembleCommandments as g, markGrantRevoked as h, runAgent as i, isFullyCancelled as it, ENV_FILE_PATH_DESCRIPTION as j, CHECK_ENV_KEYS_DESCRIPTION as k, classifySettingsConflicts as l, createTriageLLMProvider as lt, isGrantRevoked as m, buildRunTags as n, LONGER_ASK_TIMEOUT_MS as nt, createIsolatedAgentConfigDir as o, isEnvFileName as ot, AgentOutputSignals as p, resolveAskQuestionKinds as q, initializeAgent as r, createWizardAskBridge as rt, backupAndFixClaudeSettings as s, parseEnvKeyNames as st, buildAgentEnv as t, fetchWithRetry as tt, recoverOrphanedSettingsBackups as u, PUBLISH_HANDOFF_CONTENT_DESCRIPTION as v, AUDIT_RESOLVE_CHECKS_DESCRIPTION as w, publishHandoff as x, PUBLISH_HANDOFF_DESCRIPTION as y, createAskAccounting as z };
|
|
4053
4079
|
|
|
4054
|
-
//# sourceMappingURL=agent-interface-
|
|
4080
|
+
//# sourceMappingURL=agent-interface-BXvmAm4c.js.map
|