@posthog/wizard 2.60.0 → 2.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-mcp-server-to-clients-CM30npkB.js → add-mcp-server-to-clients-KNIHRN_m.js} +190 -60
- package/dist/add-mcp-server-to-clients-KNIHRN_m.js.map +1 -0
- package/dist/{agent-interface-CybBFwnk.js → agent-interface-Bm4ZNGGV.js} +7 -7
- package/dist/{agent-interface-CybBFwnk.js.map → agent-interface-Bm4ZNGGV.js.map} +1 -1
- package/dist/{agent-prompt-loader-DL32ioJX.js → agent-prompt-loader-CsHNQXsY.js} +38 -11
- package/dist/agent-prompt-loader-CsHNQXsY.js.map +1 -0
- package/dist/{agent-runner-DUyxA1TQ.js → agent-runner-DLAvB67P.js} +119 -19
- package/dist/agent-runner-DLAvB67P.js.map +1 -0
- package/dist/{analytics-B9V7x1Ma.js → analytics-CkIyBHfd.js} +2 -2
- package/dist/{analytics-B9V7x1Ma.js.map → analytics-CkIyBHfd.js.map} +1 -1
- package/dist/analytics-kxgLEv7U.js +2 -0
- package/dist/{api-OHLXhKTy.js → api-XHQTOfIi.js} +3 -3
- package/dist/{api-OHLXhKTy.js.map → api-XHQTOfIi.js.map} +1 -1
- package/dist/bin.js +288 -134
- package/dist/bin.js.map +1 -1
- package/dist/{bounded-fs-xkhfF3JS.js → bounded-fs-B-qlKB0h.js} +3 -3
- package/dist/{bounded-fs-xkhfF3JS.js.map → bounded-fs-B-qlKB0h.js.map} +1 -1
- package/dist/{ci-install-B31ciXo4.js → ci-install-C9BAoO2n.js} +4 -4
- package/dist/{ci-install-B31ciXo4.js.map → ci-install-C9BAoO2n.js.map} +1 -1
- package/dist/{debug-D3Ucw2y1.js → debug-8-IIHr5f.js} +6 -3
- package/dist/debug-8-IIHr5f.js.map +1 -0
- package/dist/{debug-Cx9Delbc.js → debug-npp6DzBK.js} +1 -1
- package/dist/{defaults-BWLIffh5.js → defaults-mrAre0xM.js} +28 -2
- package/dist/defaults-mrAre0xM.js.map +1 -0
- package/dist/{environment-BN8ROaHv.js → environment-BffaZJRI.js} +4 -4
- package/dist/{environment-BN8ROaHv.js.map → environment-BffaZJRI.js.map} +1 -1
- package/dist/{file-watcher-CzBnjben.js → file-watcher-BreVxzh0.js} +2 -2
- package/dist/{file-watcher-CzBnjben.js.map → file-watcher-BreVxzh0.js.map} +1 -1
- package/dist/{headless-ui-DoQlIoeh.js → headless-ui-Dy_l8hCT.js} +2 -2
- package/dist/{headless-ui-DoQlIoeh.js.map → headless-ui-Dy_l8hCT.js.map} +1 -1
- package/dist/{interactive-DeFFwXME.js → interactive-C9vepji1.js} +2 -2
- package/dist/{interactive-DeFFwXME.js.map → interactive-C9vepji1.js.map} +1 -1
- package/dist/{mcp-CBskrEsK.js → mcp-C5Zheplw.js} +2 -2
- package/dist/{mcp-CBskrEsK.js.map → mcp-C5Zheplw.js.map} +1 -1
- package/dist/{mcp-prompt-streaming-B1upRE9N.js → mcp-prompt-streaming-DEerU5M3.js} +3 -3
- package/dist/{mcp-prompt-streaming-B1upRE9N.js.map → mcp-prompt-streaming-DEerU5M3.js.map} +1 -1
- package/dist/{non-interactive-BUmW9f9P.js → non-interactive-C9vQaJF2.js} +2 -2
- package/dist/{non-interactive-BUmW9f9P.js.map → non-interactive-C9vQaJF2.js.map} +1 -1
- package/dist/{orchestrator-tools-bM9GOq3c.js → orchestrator-tools-Bw97ahf6.js} +3 -3
- package/dist/{orchestrator-tools-bM9GOq3c.js.map → orchestrator-tools-Bw97ahf6.js.map} +1 -1
- package/dist/{package-manager-ByVEmFPR.js → package-manager-Cm5vbUDR.js} +2 -2
- package/dist/{package-manager-ByVEmFPR.js.map → package-manager-Cm5vbUDR.js.map} +1 -1
- package/dist/{pi-C7wbP2z-.js → pi-BocAqBQZ.js} +11 -11
- package/dist/{pi-C7wbP2z-.js.map → pi-BocAqBQZ.js.map} +1 -1
- package/dist/{playground-Df_ZzalF.js → playground-DmGHAiON.js} +25 -788
- package/dist/playground-DmGHAiON.js.map +1 -0
- package/dist/{posthog-DLklk2yT.js → posthog-BitL59Wc.js} +2 -2
- package/dist/{posthog-DLklk2yT.js.map → posthog-BitL59Wc.js.map} +1 -1
- package/dist/{posthog-integration-CxIj49T4.js → posthog-integration-DbZ2oza2.js} +110 -33
- package/dist/posthog-integration-DbZ2oza2.js.map +1 -0
- package/dist/{provisioning-BpqrbURn.js → provisioning-CzRepu4H.js} +3 -3
- package/dist/{provisioning-BpqrbURn.js.map → provisioning-CzRepu4H.js.map} +1 -1
- package/dist/{queue-tools-QVKYMX_C.js → queue-tools-OynU-m2F.js} +37 -7
- package/dist/queue-tools-OynU-m2F.js.map +1 -0
- package/dist/{registry-CboWk-Ny.js → registry-eXzDlt51.js} +5 -5
- package/dist/{registry-CboWk-Ny.js.map → registry-eXzDlt51.js.map} +1 -1
- package/dist/{security-aWRzd8V1.js → security-DqByFEpl.js} +5 -5
- package/dist/{security-aWRzd8V1.js.map → security-DqByFEpl.js.map} +1 -1
- package/dist/{setup-utils-VtxhrSx8.js → setup-utils-C2rGcUFv.js} +9 -9
- package/dist/setup-utils-C2rGcUFv.js.map +1 -0
- package/dist/{start-tui-CzMiitZJ.js → start-tui-BYTQwgvK.js} +137 -42
- package/dist/start-tui-BYTQwgvK.js.map +1 -0
- package/dist/{steps-9PddZ-BV.js → steps-CMIyEySI.js} +7 -7
- package/dist/{steps-9PddZ-BV.js.map → steps-CMIyEySI.js.map} +1 -1
- package/dist/{store-V71P5KpB.js → store-pBYMaEuj.js} +25 -5
- package/dist/store-pBYMaEuj.js.map +1 -0
- package/dist/{subagent-CcBKBSR-.js → subagent-ZDD6XCmm.js} +2 -2
- package/dist/{subagent-CcBKBSR-.js.map → subagent-ZDD6XCmm.js.map} +1 -1
- package/dist/{task-BRktXvCV.js → task-1KHCdViK.js} +36 -23
- package/dist/task-1KHCdViK.js.map +1 -0
- package/dist/{task-stream-CFAXlJLv.js → task-stream-DAU6Z6u6.js} +5 -5
- package/dist/{task-stream-CFAXlJLv.js.map → task-stream-DAU6Z6u6.js.map} +1 -1
- package/dist/{tasks-CyLSHCmC.js → tasks-BBo0_AZG.js} +2 -2
- package/dist/{tasks-CyLSHCmC.js.map → tasks-BBo0_AZG.js.map} +1 -1
- package/dist/{telemetry-mi4dua6_.js → telemetry-DSzPCPtQ.js} +3 -3
- package/dist/{telemetry-mi4dua6_.js.map → telemetry-DSzPCPtQ.js.map} +1 -1
- package/dist/{terminal-B-37htZb.js → terminal-DW8x0UNT.js} +978 -71
- package/dist/terminal-DW8x0UNT.js.map +1 -0
- package/dist/{tools-BWaoKBAO.js → tools-DCH7Ji4V.js} +6 -6
- package/dist/{tools-BWaoKBAO.js.map → tools-DCH7Ji4V.js.map} +1 -1
- package/dist/{wizard-abort-D0HFMYCV.js → wizard-abort-B_Sa9K3g.js} +1 -1
- package/dist/{wizard-abort-Bgx_JOfw.js → wizard-abort-Cz916Qq5.js} +4 -4
- package/dist/{wizard-abort-Bgx_JOfw.js.map → wizard-abort-Cz916Qq5.js.map} +1 -1
- package/dist/{wizard-session-CwgR5y3-.js → wizard-session-BUhlJ1b8.js} +2 -1
- package/dist/wizard-session-BUhlJ1b8.js.map +1 -0
- package/dist/{wizard-session-DsK16SGs.js → wizard-session-DZUDtS5d.js} +1 -1
- package/dist/yara-hooks-BVEBOdMu.js +2 -0
- package/dist/{yara-hooks-Cj8x2YV4.js → yara-hooks-DgScuNrT.js} +4 -4
- package/dist/{yara-hooks-Cj8x2YV4.js.map → yara-hooks-DgScuNrT.js.map} +1 -1
- package/package.json +2 -1
- package/dist/add-mcp-server-to-clients-CM30npkB.js.map +0 -1
- package/dist/agent-prompt-loader-DL32ioJX.js.map +0 -1
- package/dist/agent-runner-DUyxA1TQ.js.map +0 -1
- package/dist/analytics-HdW5e8_o.js +0 -2
- package/dist/debug-D3Ucw2y1.js.map +0 -1
- package/dist/defaults-BWLIffh5.js.map +0 -1
- package/dist/playground-Df_ZzalF.js.map +0 -1
- package/dist/posthog-integration-CxIj49T4.js.map +0 -1
- package/dist/queue-tools-QVKYMX_C.js.map +0 -1
- package/dist/setup-utils-VtxhrSx8.js.map +0 -1
- package/dist/start-tui-CzMiitZJ.js.map +0 -1
- package/dist/store-V71P5KpB.js.map +0 -1
- package/dist/task-BRktXvCV.js.map +0 -1
- package/dist/terminal-B-37htZb.js.map +0 -1
- package/dist/wizard-session-CwgR5y3-.js.map +0 -1
- package/dist/yara-hooks-CIQRywtg.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { s as logToFile } from "./debug-
|
|
2
|
-
import { n as analytics } from "./analytics-
|
|
3
|
-
import {
|
|
4
|
-
import { M as fetchWithRetry } from "./agent-interface-
|
|
1
|
+
import { s as logToFile } from "./debug-8-IIHr5f.js";
|
|
2
|
+
import { n as analytics } from "./analytics-CkIyBHfd.js";
|
|
3
|
+
import { f as isThinkingLevel } from "./queue-tools-OynU-m2F.js";
|
|
4
|
+
import { M as fetchWithRetry, S as WIZARD_TOOL_NAMES } from "./agent-interface-Bm4ZNGGV.js";
|
|
5
5
|
//#region src/lib/agent/agent-prompt-loader.ts
|
|
6
6
|
function projectContext(ctx) {
|
|
7
7
|
return `You have access to the PostHog MCP server and the wizard tools.
|
|
@@ -34,7 +34,16 @@ function renderToolInventory(toolNames) {
|
|
|
34
34
|
return `Your tools for this task: ${toolNames.join(", ")}. Do not look for a tool that is not listed or treat its absence as a problem to report. Later tasks in this run hold tools you do not: when your task needs one, hand that work off in your handoff for the task that can do it, or note it for the final report.`;
|
|
35
35
|
}
|
|
36
36
|
const TASK_BASICS = `You are one step in a larger PostHog workflow made of several tasks, run as a fresh agent with no memory of the other tasks beyond the context you are given. Other tasks — before and after you — own the rest of the work, so stay strictly on your own task: do not do a neighbouring step's job, redo what an upstream handoff already did, or reach beyond what you were asked. Do only your task, then report exactly once by calling complete_task with a structured handoff: what your goal was, what you did, and what the next agent should know. When you are given context from previous steps, trust it — those agents already did their work, so do not re-verify or re-read what their handoffs tell you. Build on it and move fast. Read a file before you edit it, so your own changes do not duplicate what is already there. Work only inside this project's own directory: never read, list, or search (find, ls, grep, glob) outside it — not the OS, not other projects, not global package caches. If your task seems to need something outside this directory, it does not — skip that part and say so in your handoff rather than hunting across the filesystem. If your task does not apply to this project — there is genuinely nothing for it to do — report it with status \`not needed\` and say why, rather than marking it done.`;
|
|
37
|
-
const SEED_BASICS = `You are the orchestrator. Plan the work and seed the queue with enqueue_task — each call returns an id you can pass as a dependency to a later task. Give each task a short label for the UI — the action in a few words, not file names, class names, or other specifics. You are not a task yourself: do not call complete_task and do not edit the project.`;
|
|
37
|
+
const SEED_BASICS = `You are the orchestrator. Plan the work and seed the queue with enqueue_task — each call returns an id you can pass as a dependency to a later task. Give each task a short label for the UI — the action in a few words, not file names, class names, or other specifics. The last task you queue, the one that reports on the run, must depend on every other task in the queue — directly, or through a task it already depends on. You are not a task yourself: do not call complete_task and do not edit the project.`;
|
|
38
|
+
/**
|
|
39
|
+
* Tasks the wizard queued before the planner ran. It has to see them: they are
|
|
40
|
+
* part of the run it is planning around, and the task that reports last has to
|
|
41
|
+
* depend on them. Their ids are real, so it can wire the edge directly.
|
|
42
|
+
*/
|
|
43
|
+
function preQueuedTasks(tasks) {
|
|
44
|
+
if (tasks.length === 0) return null;
|
|
45
|
+
return `The queue already holds these tasks, placed by the wizard from what it found in this project. Do not queue them again — plan around them, and make sure the reporting task ends up depending on each one:\n${tasks.map((t) => `- ${t.type} (id: ${t.id})`).join("\n")}`;
|
|
46
|
+
}
|
|
38
47
|
/**
|
|
39
48
|
* Points the agent at its installed task instructions (the HOW). They live under
|
|
40
49
|
* the wizard's run dir, not `.claude/skills/`, so the SDK does not auto-load
|
|
@@ -56,12 +65,13 @@ function assembleTaskPrompt(ctx, body, skillPaths = []) {
|
|
|
56
65
|
].filter(Boolean).join("\n\n");
|
|
57
66
|
}
|
|
58
67
|
/** The seed agent's full prompt: injected basics, then the authored intent. */
|
|
59
|
-
function assembleSeedPrompt(ctx, body) {
|
|
68
|
+
function assembleSeedPrompt(ctx, body, preQueued = []) {
|
|
60
69
|
return [
|
|
61
70
|
projectContext(ctx),
|
|
62
71
|
SEED_BASICS,
|
|
72
|
+
preQueuedTasks(preQueued),
|
|
63
73
|
body
|
|
64
|
-
].join("\n\n");
|
|
74
|
+
].filter(Boolean).join("\n\n");
|
|
65
75
|
}
|
|
66
76
|
/** Orchestrator tools are MCP tools under the `posthog-wizard` server. Frontmatter
|
|
67
77
|
* names them short (e.g. `enqueue_task`); the SDK gates on the full name. */
|
|
@@ -71,6 +81,14 @@ const ORCHESTRATOR_TOOLS = new Set([
|
|
|
71
81
|
"complete_task",
|
|
72
82
|
"read_handoffs"
|
|
73
83
|
]);
|
|
84
|
+
/** The one tool that stops a task until a person answers. Named short in frontmatter. */
|
|
85
|
+
const ASK_TOOL = "wizard_ask";
|
|
86
|
+
/** The same tool as the anthropic SDK names it, on the hosted PostHog server. */
|
|
87
|
+
const POSTHOG_MCP_SDK_TOOL = "mcp__posthog-wizard__exec";
|
|
88
|
+
/** Whether a task asked for the PostHog MCP — accepts either spelling. */
|
|
89
|
+
function allowsPostHogMcp(allowedTools) {
|
|
90
|
+
return (allowedTools ?? []).some((name) => name === "posthog_exec" || name === POSTHOG_MCP_SDK_TOOL);
|
|
91
|
+
}
|
|
74
92
|
/** The queue tools a task holds — all of them minus its disallows. Short names.
|
|
75
93
|
* Single source for both the injected inventory and the harness's tool grant. */
|
|
76
94
|
function queueTools(disallowedTools) {
|
|
@@ -99,14 +117,20 @@ function buildRegistry(prompts, flow, opts) {
|
|
|
99
117
|
};
|
|
100
118
|
});
|
|
101
119
|
const byType = new Map(inFlow.map((p) => [p.type, p]));
|
|
120
|
+
const tasks = inFlow.filter((p) => !p.seed);
|
|
102
121
|
return {
|
|
103
|
-
types:
|
|
122
|
+
types: tasks.map((p) => p.type),
|
|
123
|
+
enqueueableTypes: tasks.filter((p) => !p.runnerSeeded).map((p) => p.type),
|
|
124
|
+
sinkTypes: tasks.filter((p) => p.sink).map((p) => p.type),
|
|
125
|
+
runnerSeededTypes: tasks.filter((p) => p.runnerSeeded).map((p) => p.type),
|
|
104
126
|
seed: inFlow.find((p) => p.seed),
|
|
105
127
|
get: (type) => byType.get(type)
|
|
106
128
|
};
|
|
107
129
|
}
|
|
108
|
-
/** A native tool passes through; an
|
|
130
|
+
/** A native tool passes through; an MCP tool gets its fully-qualified name. */
|
|
109
131
|
function expandToolName(name) {
|
|
132
|
+
if (name === "wizard_ask") return WIZARD_TOOL_NAMES.wizardAsk;
|
|
133
|
+
if (name === "posthog_exec") return POSTHOG_MCP_SDK_TOOL;
|
|
110
134
|
return ORCHESTRATOR_TOOLS.has(name) ? `${ORCHESTRATOR_TOOL_PREFIX}${name}` : name;
|
|
111
135
|
}
|
|
112
136
|
/** A prompt's allow/disallow lists with orchestrator tool names MCP-qualified. */
|
|
@@ -157,6 +181,8 @@ function parseAgentPrompt(text, fallbackType, fallbackFlow) {
|
|
|
157
181
|
label: typeof fields.label === "string" ? fields.label : void 0,
|
|
158
182
|
flow: typeof fields.flow === "string" ? fields.flow : fallbackFlow,
|
|
159
183
|
seed: fields.seed === "true",
|
|
184
|
+
sink: fields.sink === "true",
|
|
185
|
+
runnerSeeded: fields.runnerSeeded === "true",
|
|
160
186
|
modelPi: str(fields.model_pi),
|
|
161
187
|
effortPi: effort(fields.effort_pi, "effort_pi"),
|
|
162
188
|
modelSdk: str(fields.model_sdk),
|
|
@@ -234,6 +260,7 @@ function renderHandoffContext(task, store) {
|
|
|
234
260
|
if (handoff.filesTouched?.length) lines.push(`- files: ${handoff.filesTouched.join(", ")}`);
|
|
235
261
|
if (handoff.evidence) lines.push(`- evidence: ${handoff.evidence}`);
|
|
236
262
|
if (handoff.assumptions) lines.push(`- assumed: ${handoff.assumptions}`);
|
|
263
|
+
if (handoff.reportSection) lines.push(`- report section:\n${handoff.reportSection}`);
|
|
237
264
|
lines.push("");
|
|
238
265
|
}
|
|
239
266
|
if (lines.length === 0) return "";
|
|
@@ -270,6 +297,6 @@ function taskModelSpec(registry, task, harness) {
|
|
|
270
297
|
}
|
|
271
298
|
const EMPTY_PROMPT = {};
|
|
272
299
|
//#endregion
|
|
273
|
-
export {
|
|
300
|
+
export { assembleTaskPrompt as a, queueTools as c, taskModelSpec as d, assembleSeedPrompt as i, renderToolInventory as l, agentRunTools as n, loadAgentRegistry as o, allowsPostHogMcp as r, promptModelFor as s, ASK_TOOL as t, resolveTask as u };
|
|
274
301
|
|
|
275
|
-
//# sourceMappingURL=agent-prompt-loader-
|
|
302
|
+
//# sourceMappingURL=agent-prompt-loader-CsHNQXsY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-prompt-loader-CsHNQXsY.js","names":[],"sources":["../src/lib/agent/agent-prompt-loader.ts"],"sourcesContent":["/**\n * Agent-prompt loader + registry.\n *\n * Agent prompts are the WHAT of a task: a markdown file per type, served from\n * context-mill as the `agents` content type (parallel to skills). The frontmatter\n * carries the artifacts the executor needs — model, the mini-skills to load (the\n * HOW), the tools the task may use, and its dependencies — and the body is the\n * instruction the agent reads.\n *\n * The registry is fetched once at startup and scoped to one flow — agents\n * declare `flow` and (for the planner) `seed: true` in frontmatter, so each\n * program (integration, audit, migration, ...) ships its own agent set and the\n * loader stays generic. Every prompt is downloaded and parsed up front, so\n * resolving a task to its run config is synchronous and adds no mid-drain\n * network latency. The registry's type list also drives `enqueue_task`\n * validation.\n */\nimport type {\n QueueStore,\n QueuedTask,\n} from './runner/sequence/orchestrator/queue';\nimport type { ResolvedTask } from './runner/sequence/orchestrator/executor';\nimport type { HostResolution } from '@lib/host-resolution';\nimport {\n isThinkingLevel,\n type ThinkingLevel,\n} from './runner/switchboard/models';\nimport { logToFile } from '@utils/debug';\nimport { analytics } from '@utils/analytics';\nimport { fetchWithRetry } from '@lib/fetch-retry';\nimport { WIZARD_TOOL_NAMES } from '@lib/wizard-tools/tools';\n\n/**\n * The basics the client injects around every agent-prompt body. The `/agents/`\n * files carry intent only (goal, success criteria); the wizard owns the I/O\n * contract — who the agent is, how it reports, how it surfaces progress — so the\n * authored prompts never restate it.\n */\nexport interface OrchestratorPromptContext {\n projectId: number;\n projectApiKey: string;\n host: HostResolution;\n /** Path to the framework's reference implementation (EXAMPLE.md), if available. */\n examplePath?: string;\n /** Path to the framework's rules (COMMANDMENTS.md), if available. */\n commandmentsPath?: string;\n}\n\nfunction projectContext(ctx: OrchestratorPromptContext): string {\n return `You have access to the PostHog MCP server and the wizard tools.\n\nProject context:\n- PostHog Project ID: ${ctx.projectId}\n- PostHog public token: ${ctx.projectApiKey}\n- PostHog Host: ${ctx.host.apiHost}`;\n}\n\n/** Points the agent at the framework's reference integration to learn patterns from. */\nfunction exampleReference(ctx: OrchestratorPromptContext): string | null {\n if (!ctx.examplePath) return null;\n return `A reference PostHog integration for this framework is at \\`${ctx.examplePath}\\`. It shows the target implementation pattern. Reference its patterns and conventions, adapting them to this codebase.`;\n}\n\n/** The framework's rules ship with the reference skill; every task follows them. */\nfunction commandmentsReference(ctx: OrchestratorPromptContext): string | null {\n if (!ctx.commandmentsPath) return null;\n return `Framework rules for this integration are at \\`${ctx.commandmentsPath}\\`. Read them before you edit and follow them.`;\n}\n\n/**\n * The task's own tool list, injected so an agent never has to discover a tool's\n * absence by trying it — and never reports that absence as a finding. Later\n * tasks hold tools this one does not, so work it cannot do is handed on rather\n * than attempted.\n */\n/** Renders the inventory from the tool names a harness actually registered for\n * the run — the one complete list, in the vocabulary the agent will call. */\nexport function renderToolInventory(toolNames: readonly string[]): string {\n if (toolNames.length === 0) return '';\n return `Your tools for this task: ${toolNames.join(\n ', ',\n )}. Do not look for a tool that is not listed or treat its absence as a problem to report. Later tasks in this run hold tools you do not: when your task needs one, hand that work off in your handoff for the task that can do it, or note it for the final report.`;\n}\n\nconst TASK_BASICS = `You are one step in a larger PostHog workflow made of several tasks, run as a fresh agent with no memory of the other tasks beyond the context you are given. Other tasks — before and after you — own the rest of the work, so stay strictly on your own task: do not do a neighbouring step's job, redo what an upstream handoff already did, or reach beyond what you were asked. Do only your task, then report exactly once by calling complete_task with a structured handoff: what your goal was, what you did, and what the next agent should know. When you are given context from previous steps, trust it — those agents already did their work, so do not re-verify or re-read what their handoffs tell you. Build on it and move fast. Read a file before you edit it, so your own changes do not duplicate what is already there. Work only inside this project's own directory: never read, list, or search (find, ls, grep, glob) outside it — not the OS, not other projects, not global package caches. If your task seems to need something outside this directory, it does not — skip that part and say so in your handoff rather than hunting across the filesystem. If your task does not apply to this project — there is genuinely nothing for it to do — report it with status \\`not needed\\` and say why, rather than marking it done.`;\n\nconst SEED_BASICS = `You are the orchestrator. Plan the work and seed the queue with enqueue_task — each call returns an id you can pass as a dependency to a later task. Give each task a short label for the UI — the action in a few words, not file names, class names, or other specifics. The last task you queue, the one that reports on the run, must depend on every other task in the queue — directly, or through a task it already depends on. You are not a task yourself: do not call complete_task and do not edit the project.`;\n\n/**\n * Tasks the wizard queued before the planner ran. It has to see them: they are\n * part of the run it is planning around, and the task that reports last has to\n * depend on them. Their ids are real, so it can wire the edge directly.\n */\nfunction preQueuedTasks(\n tasks: readonly { id: string; type: string }[],\n): string | null {\n if (tasks.length === 0) return null;\n const lines = tasks.map((t) => `- ${t.type} (id: ${t.id})`);\n return `The queue already holds these tasks, placed by the wizard from what it found in this project. Do not queue them again — plan around them, and make sure the reporting task ends up depending on each one:\\n${lines.join(\n '\\n',\n )}`;\n}\n\n/**\n * Points the agent at its installed task instructions (the HOW). They live under\n * the wizard's run dir, not `.claude/skills/`, so the SDK does not auto-load\n * them — the prompt has to name them.\n */\nfunction skillReference(paths: readonly string[]): string | null {\n if (paths.length === 0) return null;\n const list = paths.map((p) => `\\`${p}\\``).join(', ');\n return `Your task instructions are at ${list}. Read them before you start and follow them. They are wizard scaffolding, not part of the project.`;\n}\n\n/** A task agent's full prompt: injected basics, then the authored intent. */\nexport function assembleTaskPrompt(\n ctx: OrchestratorPromptContext,\n body: string,\n skillPaths: readonly string[] = [],\n): string {\n return [\n projectContext(ctx),\n exampleReference(ctx),\n commandmentsReference(ctx),\n skillReference(skillPaths),\n TASK_BASICS,\n body,\n ]\n .filter(Boolean)\n .join('\\n\\n');\n}\n\n/** The seed agent's full prompt: injected basics, then the authored intent. */\nexport function assembleSeedPrompt(\n ctx: OrchestratorPromptContext,\n body: string,\n preQueued: readonly { id: string; type: string }[] = [],\n): string {\n return [projectContext(ctx), SEED_BASICS, preQueuedTasks(preQueued), body]\n .filter(Boolean)\n .join('\\n\\n');\n}\n\n/** Orchestrator tools are MCP tools under the `posthog-wizard` server. Frontmatter\n * names them short (e.g. `enqueue_task`); the SDK gates on the full name. */\nconst ORCHESTRATOR_TOOL_PREFIX = 'mcp__posthog-wizard__';\nconst ORCHESTRATOR_TOOLS = new Set([\n 'enqueue_task',\n 'complete_task',\n 'read_handoffs',\n]);\n\n/** The one tool that stops a task until a person answers. Named short in frontmatter. */\nexport const ASK_TOOL = 'wizard_ask';\n\n/**\n * The PostHog MCP, as an agent asks for it in frontmatter. Every tool a task\n * gets is granted by its own prompt, this one included: a task that never names\n * it never has the server wired in, and one that does gets it under this name\n * on both harnesses.\n */\nexport const POSTHOG_MCP_TOOL = 'posthog_exec';\n/** The same tool as the anthropic SDK names it, on the hosted PostHog server. */\nconst POSTHOG_MCP_SDK_TOOL = 'mcp__posthog-wizard__exec';\n\n/** Whether a task asked for the PostHog MCP — accepts either spelling. */\nexport function allowsPostHogMcp(\n allowedTools: readonly string[] | undefined,\n): boolean {\n return (allowedTools ?? []).some(\n (name) => name === POSTHOG_MCP_TOOL || name === POSTHOG_MCP_SDK_TOOL,\n );\n}\n\n/** The queue tools a task holds — all of them minus its disallows. Short names.\n * Single source for both the injected inventory and the harness's tool grant. */\nexport function queueTools(disallowedTools: readonly string[]): string[] {\n const disallowed = new Set(\n disallowedTools.map((n) => n.replace(ORCHESTRATOR_TOOL_PREFIX, '')),\n );\n return [...ORCHESTRATOR_TOOLS].filter((t) => !disallowed.has(t));\n}\n\n/** A parsed agent prompt. The frontmatter fields plus the markdown body. */\nexport interface AgentPrompt {\n type: string;\n /** Human-readable title for the TUI; falls back to `type` when absent. */\n label?: string;\n /** The flow this agent belongs to (the program id, e.g. \\`posthog-integration\\`). */\n flow?: string;\n /** Marks the flow's planner: it seeds the queue and is not an enqueueable task. */\n seed: boolean;\n /** Marks a task that runs last: it must depend on every other task in the queue. */\n sink: boolean;\n /**\n * Marks a task only the wizard may queue. The planner never sees the type, so\n * whether it runs is a decision the client makes from what it detected, not\n * one an agent can reach — it can neither invent the task nor forget it.\n */\n runnerSeeded: boolean;\n /** Per-profile model + effort. `pi` = the gpt/pi harness, `sdk` = the anthropic\n * harness. The mapping is not 1:1 across providers, so each agent names both. */\n modelPi?: string;\n effortPi?: ThinkingLevel;\n modelSdk?: string;\n effortSdk?: ThinkingLevel;\n skills: string[];\n allowedTools: string[];\n disallowedTools: string[];\n dependsOn: string[];\n body: string;\n}\n\n/** The model + effort an agent runs on for a given harness — `pi` picks the gpt\n * column, anything else the sdk (anthropic) column. */\nexport function promptModelFor(\n prompt: AgentPrompt,\n harness: string,\n): { model?: string; effort?: ThinkingLevel } {\n const pi = harness === 'pi';\n return {\n model: pi ? prompt.modelPi : prompt.modelSdk,\n effort: pi ? prompt.effortPi : prompt.effortSdk,\n };\n}\n\nexport interface AgentRegistry {\n /** The flow's task types — every prompt except the seed. */\n readonly types: string[];\n /** The types an agent may enqueue: `types` minus the runner-seeded ones. */\n readonly enqueueableTypes: string[];\n /** The types that run last and must depend on the whole queue. */\n readonly sinkTypes: string[];\n /** The types only the wizard queues, from what it detected before the run. */\n readonly runnerSeededTypes: string[];\n /** The flow's planner, the one prompt marked `seed: true` in its frontmatter. */\n readonly seed?: AgentPrompt;\n get(type: string): AgentPrompt | undefined;\n}\n\n/** The registry for one flow's prompts. Pure; the loader feeds it the fetched set. */\nexport function buildRegistry(\n prompts: readonly AgentPrompt[],\n flow: string,\n opts?: {\n exclude?: readonly string[];\n /** Per-stage pi model/effort overlays, keyed by task type ('seed' for the planner). Applied here — the one place prompts enter the wizard — so every downstream read sees the effective spec. */\n overrides?: Record<\n string,\n { model?: string; effort?: ThinkingLevel } | undefined\n >;\n },\n): AgentRegistry {\n // The harness can exclude task types (CI excludes dashboards). An excluded\n // type does not exist for the run: the seed cannot enqueue it and no agent\n // is ever spun up for it.\n const excluded = new Set(opts?.exclude ?? []);\n const inFlow = prompts\n .filter((p) => p.flow === flow && !excluded.has(p.type))\n .map((p) => {\n const o = opts?.overrides?.[p.seed ? 'seed' : p.type];\n if (!o) return p;\n return {\n ...p,\n modelPi: o.model ?? p.modelPi,\n effortPi: o.effort ?? p.effortPi,\n };\n });\n const byType = new Map(inFlow.map((p) => [p.type, p]));\n const tasks = inFlow.filter((p) => !p.seed);\n return {\n types: tasks.map((p) => p.type),\n enqueueableTypes: tasks.filter((p) => !p.runnerSeeded).map((p) => p.type),\n sinkTypes: tasks.filter((p) => p.sink).map((p) => p.type),\n runnerSeededTypes: tasks.filter((p) => p.runnerSeeded).map((p) => p.type),\n seed: inFlow.find((p) => p.seed),\n get: (type) => byType.get(type),\n };\n}\n\ninterface AgentMenu {\n /** `flow` arrived with context-mill's flow-scoped agents folder; older menus omit it. */\n agents: { id: string; flow?: string; downloadUrl: string }[];\n}\n\n/** A native tool passes through; an MCP tool gets its fully-qualified name. */\nfunction expandToolName(name: string): string {\n if (name === ASK_TOOL) return WIZARD_TOOL_NAMES.wizardAsk;\n if (name === POSTHOG_MCP_TOOL) return POSTHOG_MCP_SDK_TOOL;\n return ORCHESTRATOR_TOOLS.has(name)\n ? `${ORCHESTRATOR_TOOL_PREFIX}${name}`\n : name;\n}\n\n/** A prompt's allow/disallow lists with orchestrator tool names MCP-qualified. */\nexport function agentRunTools(prompt: AgentPrompt): {\n allowedTools: string[];\n disallowedTools: string[];\n} {\n return {\n allowedTools: prompt.allowedTools.map(expandToolName),\n disallowedTools: prompt.disallowedTools.map(expandToolName),\n };\n}\n\nfunction toStringArray(value: unknown): string[] {\n if (!Array.isArray(value)) return [];\n return value.filter((v): v is string => typeof v === 'string');\n}\n\n/**\n * Parse the leading `---` frontmatter block and the markdown body. The\n * frontmatter is a small, known schema (scalars and inline `[a, b]` arrays), so\n * a tiny parser covers it without a YAML dependency. Inline `# comments` after a\n * value are stripped. `fallbackType` (the menu id) and `fallbackFlow` (the\n * menu entry's flow) apply when the frontmatter omits `type:`/`flow:`.\n */\nexport function parseAgentPrompt(\n text: string,\n fallbackType: string,\n fallbackFlow?: string,\n): AgentPrompt {\n const match = text.match(/^---\\r?\\n([\\s\\S]*?)\\r?\\n---\\r?\\n?([\\s\\S]*)$/);\n const frontmatter = match ? match[1] : '';\n const body = (match ? match[2] : text).trim();\n\n const fields: Record<string, unknown> = {};\n for (const rawLine of frontmatter.split(/\\r?\\n/)) {\n const line = rawLine.replace(/\\s+#.*$/, '').trim();\n if (!line || line.startsWith('#')) continue;\n const kv = line.match(/^([\\w-]+):\\s*(.*)$/);\n if (!kv) continue;\n const [, key, raw] = kv;\n if (raw.startsWith('[') && raw.endsWith(']')) {\n fields[key] = raw\n .slice(1, -1)\n .split(',')\n .map((s) => s.trim().replace(/^['\"]|['\"]$/g, ''))\n .filter(Boolean);\n } else {\n fields[key] = raw.replace(/^['\"]|['\"]$/g, '');\n }\n }\n\n const str = (v: unknown) => (typeof v === 'string' ? v : undefined);\n // Effort is remote data — reject typos here so downstream carries ThinkingLevel.\n const effort = (v: unknown, key: string): ThinkingLevel | undefined => {\n if (v === undefined) return undefined;\n if (isThinkingLevel(v)) return v;\n logToFile(\n `[agent-prompt] ${fallbackType}: ignoring invalid ${key} \"${String(v)}\"`,\n );\n analytics.wizardCapture('agent prompt invalid effort', {\n task_type: fallbackType,\n key,\n value: String(v),\n });\n return undefined;\n };\n return {\n type: typeof fields.type === 'string' ? fields.type : fallbackType,\n label: typeof fields.label === 'string' ? fields.label : undefined,\n flow: typeof fields.flow === 'string' ? fields.flow : fallbackFlow,\n seed: fields.seed === 'true',\n sink: fields.sink === 'true',\n runnerSeeded: fields.runnerSeeded === 'true',\n modelPi: str(fields.model_pi),\n effortPi: effort(fields.effort_pi, 'effort_pi'),\n modelSdk: str(fields.model_sdk),\n effortSdk: effort(fields.effort_sdk, 'effort_sdk'),\n skills: toStringArray(fields.skills),\n allowedTools: toStringArray(fields.allowedTools),\n disallowedTools: toStringArray(fields.disallowedTools),\n dependsOn: toStringArray(fields.dependsOn),\n body,\n };\n}\n\nasync function fetchText(url: string): Promise<string> {\n const res = await fetchWithRetry(url);\n return res.text();\n}\n\n/**\n * Fetch the agent menu and every agent prompt it lists, parse them, and build\n * the registry for one flow. Throws if the menu cannot be fetched — the\n * orchestrator cannot run without its prompts.\n */\nexport async function loadAgentRegistry(\n skillsBaseUrl: string,\n flow: string,\n opts?: Parameters<typeof buildRegistry>[2],\n): Promise<AgentRegistry> {\n const menuRaw = await fetchText(`${skillsBaseUrl}/agent-menu.json`);\n const menu = JSON.parse(menuRaw) as AgentMenu;\n\n // Menus that carry a flow per entry let us skip other flows' prompts before\n // fetching them; entries without one are fetched and filtered by their\n // frontmatter in buildRegistry, as before.\n const entries = (menu.agents ?? []).filter(\n (entry) => !entry.flow || entry.flow === flow,\n );\n const prompts = await Promise.all(\n entries.map(async (entry) => {\n const text = await fetchText(entry.downloadUrl);\n return parseAgentPrompt(text, entry.id, entry.flow);\n }),\n );\n\n return buildRegistry(prompts, flow, opts);\n}\n\n/**\n * Render a task's own inputs into a section, so a fanned-out task (e.g. one\n * `capture` per event) sees the specific thing it owns. Empty when there are none.\n */\nfunction renderInputs(task: QueuedTask): string {\n const entries = Object.entries(task.inputs ?? {});\n if (entries.length === 0) return '';\n const lines = entries.map(([k, v]) => `- ${k}: ${formatInputValue(v)}`);\n return `## Your task input\\n\\n${lines.join('\\n')}`;\n}\n\nfunction formatInputValue(value: unknown): string {\n if (typeof value === 'string') return value;\n return JSON.stringify(value);\n}\n\n/**\n * The ids of every task `task` transitively depends on — the full upstream\n * chain, not just direct dependencies — ordered roots-first, each once. A `seen`\n * set dedupes diamonds and guards against cycles.\n */\nfunction ancestorIds(task: QueuedTask, store: QueueStore): string[] {\n const seen = new Set<string>();\n const ordered: string[] = [];\n const visit = (id: string): void => {\n if (seen.has(id)) return;\n seen.add(id);\n const t = store.get(id);\n if (!t) return;\n for (const dep of t.dependsOn) visit(dep); // ancestors before dependents\n ordered.push(id);\n };\n for (const dep of task.dependsOn) visit(dep);\n return ordered;\n}\n\n/**\n * Render the handoffs of every step `task` transitively depends on into a context\n * section, so a fresh agent sees the whole upstream chain — not just its direct\n * dependencies. Reliability over token economy: a step must never have to\n * re-discover what any ancestor already established just because an intermediate\n * handoff happened to omit it. Empty when there are no completed ancestors.\n */\nfunction renderHandoffContext(task: QueuedTask, store: QueueStore): string {\n const lines: string[] = [];\n for (const id of ancestorIds(task, store)) {\n const dep = store.get(id);\n const handoff = store.readHandoff(id);\n if (!dep || !handoff) continue;\n lines.push(`### ${dep.type}`);\n lines.push(`- did: ${handoff.did}`);\n lines.push(`- for you: ${handoff.forNextAgent}`);\n if (handoff.filesTouched?.length) {\n lines.push(`- files: ${handoff.filesTouched.join(', ')}`);\n }\n if (handoff.evidence) {\n lines.push(`- evidence: ${handoff.evidence}`);\n }\n if (handoff.assumptions) {\n lines.push(`- assumed: ${handoff.assumptions}`);\n }\n if (handoff.reportSection) {\n lines.push(`- report section:\\n${handoff.reportSection}`);\n }\n lines.push('');\n }\n if (lines.length === 0) return '';\n return `## Context from previous steps\\n\\n${lines.join('\\n')}`.trim();\n}\n\n/**\n * Resolve a queued task to its run config: the prompt body (with upstream\n * handoffs appended), the model, and the tool lists with orchestrator tool names\n * MCP-qualified. The model precedence is enqueue override, then prompt, then\n * default. Throws if no prompt is registered for the task's type.\n */\nexport function resolveTask(\n registry: AgentRegistry,\n task: QueuedTask,\n store: QueueStore,\n): ResolvedTask {\n const prompt = registry.get(task.type);\n if (!prompt) {\n throw new Error(`No agent prompt registered for task type \"${task.type}\"`);\n }\n\n const body = [\n renderInputs(task),\n prompt.body,\n renderHandoffContext(task, store),\n ]\n .filter(Boolean)\n .join('\\n\\n');\n\n return {\n ...agentRunTools(prompt),\n prompt: body,\n skills: prompt.skills,\n };\n}\n\n/** The model + effort a task runs on for a harness: enqueue override, then the\n * prompt's per-profile frontmatter; the caller's switchboard pick is the fallback. */\nexport function taskModelSpec(\n registry: AgentRegistry,\n task: QueuedTask,\n harness: string,\n): { model?: string; effort?: ThinkingLevel } {\n const picked = promptModelFor(\n registry.get(task.type) ?? EMPTY_PROMPT,\n harness,\n );\n return {\n model: task.model ?? picked.model,\n effort: picked.effort,\n };\n}\n\nconst EMPTY_PROMPT = {} as AgentPrompt;\n"],"mappings":";;;;;AAgDA,SAAS,eAAe,KAAwC;AAC9D,QAAO;;;wBAGe,IAAI,UAAU;0BACZ,IAAI,cAAc;kBAC1B,IAAI,KAAK;;;AAI3B,SAAS,iBAAiB,KAA+C;AACvE,KAAI,CAAC,IAAI,YAAa,QAAO;AAC7B,QAAO,8DAA8D,IAAI,YAAY;;;AAIvF,SAAS,sBAAsB,KAA+C;AAC5E,KAAI,CAAC,IAAI,iBAAkB,QAAO;AAClC,QAAO,iDAAiD,IAAI,iBAAiB;;;;;;;;;;AAW/E,SAAgB,oBAAoB,WAAsC;AACxE,KAAI,UAAU,WAAW,EAAG,QAAO;AACnC,QAAO,6BAA6B,UAAU,KAC5C,KACD,CAAC;;AAGJ,MAAM,cAAc;AAEpB,MAAM,cAAc;;;;;;AAOpB,SAAS,eACP,OACe;AACf,KAAI,MAAM,WAAW,EAAG,QAAO;AAE/B,QAAO,8MADO,MAAM,KAAK,MAAM,KAAK,EAAE,KAAK,QAAQ,EAAE,GAAG,GAAG,CACgK,KACzN,KACD;;;;;;;AAQH,SAAS,eAAe,OAAyC;AAC/D,KAAI,MAAM,WAAW,EAAG,QAAO;AAE/B,QAAO,iCADM,MAAM,KAAK,MAAM,KAAK,EAAE,IAAI,CAAC,KAAK,KAAK,CACP;;;AAI/C,SAAgB,mBACd,KACA,MACA,aAAgC,EAAE,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ldown-runtime-B_-DWIq7.js";
|
|
2
|
-
import { A as GPT5_6_LUNA_MODEL, D as DEFAULT_AGENT_MODEL, F as Harness, M as GPT5_6_TERRA_MODEL, _ as evaluateWizardReadiness, _t as RUN_SURFACE, a as getLogFilePath, bt as runtimeEnv, c as WIZARD_BENCHMARK_FILE, ct as WIZARD_ORCHESTRATOR_OVERRIDE_FLAG_KEY, dt as WIZARD_SELF_DRIVING_USE_PI_HARNESS_FLAG_KEY, et as SONNET_5_MODEL, f as getUI, g as SIGNUP_WIZARD_READINESS_CONFIG, h as SERVICE_LABELS, i as enableDebugLogs, j as GPT5_6_SOL_MODEL, l as WIZARD_LOG_FILE, o as initLogFile, pt as getSkillsBaseUrl, rt as WIZARD_CONTACT_EMAIL, s as logToFile, st as WIZARD_ORCHESTRATOR_FLAG_KEY, t as configureLogFile, tt as Sequence, v as getBlockingServiceKeys } from "./debug-
|
|
3
|
-
import { a as ciExcludedTaskTypes, n as analytics, r as groupsFromUser } from "./analytics-
|
|
4
|
-
import { t as getOrAskForProjectData } from "./setup-utils-
|
|
5
|
-
import "./wizard-session-
|
|
6
|
-
import { i as wizardAbort, n as registerCleanup, t as WizardError } from "./wizard-abort-
|
|
7
|
-
import { n as isNonInteractiveEnvironment } from "./environment-
|
|
8
|
-
import { c as
|
|
9
|
-
import { E as installSkillById, F as createTriageLLMProvider, N as createWizardAskBridge, T as fetchSkillMenu, c as classifySettingsConflicts, i as runAgent$1, n as buildRunTags, o as backupAndFixClaudeSettings, p as AgentSignals, r as initializeAgent, s as checkAllSettingsConflicts, u as restoreClaudeSettings } from "./agent-interface-
|
|
10
|
-
import { a as flushScanReport, m as writeScanReport, o as formatScanReport, s as formatYaraAbortMessage } from "./yara-hooks-
|
|
11
|
-
import { a as piBackend, s as createAioCapture } from "./pi-
|
|
12
|
-
import { r as detectNodePackageManagers } from "./package-manager-
|
|
13
|
-
import { t as FRAMEWORK_REGISTRY } from "./registry-
|
|
14
|
-
import { a as
|
|
2
|
+
import { A as GPT5_6_LUNA_MODEL, D as DEFAULT_AGENT_MODEL, F as Harness, M as GPT5_6_TERRA_MODEL, _ as evaluateWizardReadiness, _t as RUN_SURFACE, a as getLogFilePath, bt as runtimeEnv, c as WIZARD_BENCHMARK_FILE, ct as WIZARD_ORCHESTRATOR_OVERRIDE_FLAG_KEY, dt as WIZARD_SELF_DRIVING_USE_PI_HARNESS_FLAG_KEY, et as SONNET_5_MODEL, f as getUI, g as SIGNUP_WIZARD_READINESS_CONFIG, h as SERVICE_LABELS, i as enableDebugLogs, j as GPT5_6_SOL_MODEL, l as WIZARD_LOG_FILE, o as initLogFile, pt as getSkillsBaseUrl, rt as WIZARD_CONTACT_EMAIL, s as logToFile, st as WIZARD_ORCHESTRATOR_FLAG_KEY, t as configureLogFile, tt as Sequence, v as getBlockingServiceKeys } from "./debug-8-IIHr5f.js";
|
|
3
|
+
import { a as ciExcludedTaskTypes, n as analytics, r as groupsFromUser } from "./analytics-CkIyBHfd.js";
|
|
4
|
+
import { t as getOrAskForProjectData } from "./setup-utils-C2rGcUFv.js";
|
|
5
|
+
import "./wizard-session-BUhlJ1b8.js";
|
|
6
|
+
import { i as wizardAbort, n as registerCleanup, t as WizardError } from "./wizard-abort-Cz916Qq5.js";
|
|
7
|
+
import { n as isNonInteractiveEnvironment } from "./environment-BffaZJRI.js";
|
|
8
|
+
import { c as QueueStore, h as requireKnownModel, l as TaskStatus, o as uncoveredBySink, p as isValidModel, s as QUEUE_DIR_NAME } from "./queue-tools-OynU-m2F.js";
|
|
9
|
+
import { E as installSkillById, F as createTriageLLMProvider, N as createWizardAskBridge, T as fetchSkillMenu, c as classifySettingsConflicts, i as runAgent$1, n as buildRunTags, o as backupAndFixClaudeSettings, p as AgentSignals, r as initializeAgent, s as checkAllSettingsConflicts, u as restoreClaudeSettings } from "./agent-interface-Bm4ZNGGV.js";
|
|
10
|
+
import { a as flushScanReport, m as writeScanReport, o as formatScanReport, s as formatYaraAbortMessage } from "./yara-hooks-DgScuNrT.js";
|
|
11
|
+
import { a as piBackend, s as createAioCapture } from "./pi-BocAqBQZ.js";
|
|
12
|
+
import { r as detectNodePackageManagers } from "./package-manager-Cm5vbUDR.js";
|
|
13
|
+
import { t as FRAMEWORK_REGISTRY } from "./registry-eXzDlt51.js";
|
|
14
|
+
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-CsHNQXsY.js";
|
|
15
15
|
import fs, { cpSync, existsSync, mkdirSync, readdirSync, rmSync, writeFileSync } from "fs";
|
|
16
16
|
import * as path$1 from "path";
|
|
17
17
|
import path from "path";
|
|
@@ -109,7 +109,7 @@ const anthropicBackend = {
|
|
|
109
109
|
}, middleware);
|
|
110
110
|
},
|
|
111
111
|
async runTask(inputs) {
|
|
112
|
-
const { session, programConfig, boot, prompt, spinner, model, allowedTools, disallowedTools, orchestrator, spinnerMessage, successMessage, errorMessage, additionalFeatureQueue, requestRemark, analyticsProperties } = inputs;
|
|
112
|
+
const { session, programConfig, boot, prompt, spinner, model, allowedTools, disallowedTools, askBridge, orchestrator, spinnerMessage, successMessage, errorMessage, additionalFeatureQueue, requestRemark, analyticsProperties } = inputs;
|
|
113
113
|
const options = sessionToOptions(session);
|
|
114
114
|
const capture = createAioCapture({
|
|
115
115
|
enabled: session.captureAio,
|
|
@@ -128,6 +128,7 @@ const anthropicBackend = {
|
|
|
128
128
|
wizardFlags: boot.wizardFlags,
|
|
129
129
|
wizardMetadata: boot.wizardMetadata,
|
|
130
130
|
integrationLabel: programConfig.id,
|
|
131
|
+
askBridge,
|
|
131
132
|
orchestrator,
|
|
132
133
|
capture
|
|
133
134
|
}, options),
|
|
@@ -1732,6 +1733,45 @@ function resolveSkillVariantId(entries, skillId, framework) {
|
|
|
1732
1733
|
function resolveReferenceSkillId(entries, framework) {
|
|
1733
1734
|
return resolveSkillVariantId(entries, "integration", framework);
|
|
1734
1735
|
}
|
|
1736
|
+
/**
|
|
1737
|
+
* A task that asks the user waits on a person, not on a model: long enough to
|
|
1738
|
+
* open a database console or mint a restricted API key. The drain waits it out
|
|
1739
|
+
* — the executor holds the task's promise — so the only real limit is this one.
|
|
1740
|
+
*/
|
|
1741
|
+
const TASK_ASK_TIMEOUT_MS = 1200 * 1e3;
|
|
1742
|
+
/** Whether a task's prompt lets it ask the user, and so needs the ask bridge. */
|
|
1743
|
+
function canAsk(prompt) {
|
|
1744
|
+
return (prompt?.allowedTools ?? []).includes(ASK_TOOL);
|
|
1745
|
+
}
|
|
1746
|
+
/** How many tasks deep in the graph a task sits — 0 when it depends on nothing. */
|
|
1747
|
+
function graphDepth(task, byId, memo) {
|
|
1748
|
+
const cached = memo.get(task.id);
|
|
1749
|
+
if (cached !== void 0) return cached;
|
|
1750
|
+
memo.set(task.id, 0);
|
|
1751
|
+
const depth = task.dependsOn.reduce((deepest, id) => {
|
|
1752
|
+
const dep = byId.get(id);
|
|
1753
|
+
return dep ? Math.max(deepest, graphDepth(dep, byId, memo) + 1) : deepest;
|
|
1754
|
+
}, 0);
|
|
1755
|
+
memo.set(task.id, depth);
|
|
1756
|
+
return depth;
|
|
1757
|
+
}
|
|
1758
|
+
/**
|
|
1759
|
+
* The queue in the order the user should read it, which is not the order tasks
|
|
1760
|
+
* were queued. Tasks the wizard seeded before the planner ran are queued first
|
|
1761
|
+
* but are optional side quests, so they sit at the end of the tier they run in
|
|
1762
|
+
* — the list reads as the run unfolds, and the first line is work that actually
|
|
1763
|
+
* started. Ordering only; nothing here changes what runs when.
|
|
1764
|
+
*/
|
|
1765
|
+
function displayOrder(tasks, isOptional) {
|
|
1766
|
+
const byId = new Map(tasks.map((t) => [t.id, t]));
|
|
1767
|
+
const memo = /* @__PURE__ */ new Map();
|
|
1768
|
+
return tasks.map((task, index) => ({
|
|
1769
|
+
task,
|
|
1770
|
+
depth: graphDepth(task, byId, memo),
|
|
1771
|
+
optional: isOptional(task) ? 1 : 0,
|
|
1772
|
+
index
|
|
1773
|
+
})).sort((a, b) => a.depth - b.depth || a.optional - b.optional || a.index - b.index).map((entry) => entry.task);
|
|
1774
|
+
}
|
|
1735
1775
|
async function runOrchestrator(session, programConfig, boot) {
|
|
1736
1776
|
const runId = randomUUID();
|
|
1737
1777
|
const switchboardCtx = {
|
|
@@ -1860,16 +1900,57 @@ or integrate manually here:
|
|
|
1860
1900
|
analytics.wizardCapture("orchestrator started", { program_id: programConfig.id });
|
|
1861
1901
|
getUI().startRun();
|
|
1862
1902
|
const labelFor = (t) => t.label ?? registry.get(t.type)?.label ?? t.type;
|
|
1863
|
-
const renderQueue = () => getUI().syncTodos(store.list().map((t) => ({
|
|
1903
|
+
const renderQueue = () => getUI().syncTodos(displayOrder(store.list(), (t) => registry.runnerSeededTypes.includes(t.type)).map((t) => ({
|
|
1864
1904
|
content: labelFor(t),
|
|
1865
1905
|
status: toTodoStatus(t.status),
|
|
1866
1906
|
activeForm: labelFor(t)
|
|
1867
1907
|
})));
|
|
1868
1908
|
const orchestratorCtx = (currentTaskId) => ({
|
|
1869
1909
|
store,
|
|
1870
|
-
validTypes: registry.
|
|
1910
|
+
validTypes: registry.enqueueableTypes,
|
|
1911
|
+
sinkTypes: registry.sinkTypes,
|
|
1871
1912
|
currentTaskId
|
|
1872
1913
|
});
|
|
1914
|
+
const seededTypes = [];
|
|
1915
|
+
for (const seeded of programConfig.seedTasks?.(session) ?? []) {
|
|
1916
|
+
if (!registry.runnerSeededTypes.includes(seeded.type)) {
|
|
1917
|
+
logToFile(`[orchestrator] skipping runner-seeded task "${seeded.type}": not a runner-seeded type in this flow`);
|
|
1918
|
+
continue;
|
|
1919
|
+
}
|
|
1920
|
+
if (seeded.notice) {
|
|
1921
|
+
const keep = await getUI().showTaskNotice(seeded.notice);
|
|
1922
|
+
analytics.wizardCapture("orchestrator task notice answered", {
|
|
1923
|
+
type: seeded.type,
|
|
1924
|
+
kept: keep
|
|
1925
|
+
});
|
|
1926
|
+
if (!keep) {
|
|
1927
|
+
logToFile(`[orchestrator] user declined runner-seeded ${seeded.type}`);
|
|
1928
|
+
continue;
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
store.enqueue({
|
|
1932
|
+
type: seeded.type,
|
|
1933
|
+
label: seeded.label,
|
|
1934
|
+
inputs: seeded.inputs,
|
|
1935
|
+
enqueuedBy: "orchestrator"
|
|
1936
|
+
});
|
|
1937
|
+
seededTypes.push(seeded.type);
|
|
1938
|
+
logToFile(`[orchestrator] runner-seeded task ${seeded.type}`);
|
|
1939
|
+
}
|
|
1940
|
+
const askingTypes = seededTypes.filter((type) => canAsk(registry.get(type)));
|
|
1941
|
+
analytics.setTag("orchestrator_awaits_user", askingTypes.length > 0);
|
|
1942
|
+
analytics.setTag("orchestrator_runner_seeded_types", seededTypes.join(",") || "none");
|
|
1943
|
+
if (askingTypes.length > 0) analytics.wizardCapture("orchestrator awaits user", {
|
|
1944
|
+
task_types: askingTypes,
|
|
1945
|
+
ask_timeout_ms: TASK_ASK_TIMEOUT_MS
|
|
1946
|
+
});
|
|
1947
|
+
const askBridge = shouldDisableAsk(session) ? void 0 : createWizardAskBridge({
|
|
1948
|
+
getSource: () => session.skillId ?? programConfig.id,
|
|
1949
|
+
showQuestion: (q) => getUI().requestQuestion(q),
|
|
1950
|
+
cancelQuestion: () => getUI().cancelPendingQuestion(),
|
|
1951
|
+
richLinks: false,
|
|
1952
|
+
timeoutMs: TASK_ASK_TIMEOUT_MS
|
|
1953
|
+
});
|
|
1873
1954
|
const spinner = getUI().spinner();
|
|
1874
1955
|
const seedPick = resolveHarness(switchboardCtx, "seed");
|
|
1875
1956
|
const seedHarness = requireTaskHarness(seedPick);
|
|
@@ -1878,7 +1959,7 @@ or integrate manually here:
|
|
|
1878
1959
|
session,
|
|
1879
1960
|
programConfig,
|
|
1880
1961
|
boot,
|
|
1881
|
-
prompt: assembleSeedPrompt(promptContext, seedPrompt.body),
|
|
1962
|
+
prompt: assembleSeedPrompt(promptContext, seedPrompt.body, store.list()),
|
|
1882
1963
|
spinner,
|
|
1883
1964
|
model: requireKnownModel(seedModel.model, seedPick.model),
|
|
1884
1965
|
effort: seedModel.effort,
|
|
@@ -1898,6 +1979,24 @@ or integrate manually here:
|
|
|
1898
1979
|
types: store.list().map((t) => t.type)
|
|
1899
1980
|
});
|
|
1900
1981
|
renderQueue();
|
|
1982
|
+
const unwaited = store.list().filter((t) => registry.sinkTypes.includes(t.type)).flatMap((sink) => uncoveredBySink({
|
|
1983
|
+
store,
|
|
1984
|
+
validTypes: registry.types,
|
|
1985
|
+
sinkTypes: registry.sinkTypes
|
|
1986
|
+
}, {
|
|
1987
|
+
type: sink.type,
|
|
1988
|
+
dependsOn: sink.dependsOn
|
|
1989
|
+
}).filter((t) => t.id !== sink.id));
|
|
1990
|
+
if (unwaited.length > 0) {
|
|
1991
|
+
analytics.wizardCapture("orchestrator sink invariant violated", { uncovered_types: unwaited.map((t) => t.type) });
|
|
1992
|
+
await wizardAbort({
|
|
1993
|
+
message: `The wizard could not plan this setup: the final step would have skipped ${unwaited.map((t) => t.type).join(", ")}.\n\nPlease report this to: ${WIZARD_CONTACT_EMAIL}`,
|
|
1994
|
+
error: new WizardError("orchestrator sink does not cover the queue", {
|
|
1995
|
+
uncovered: unwaited.map((t) => `${t.type} (${t.id})`).join(", "),
|
|
1996
|
+
queue_state: JSON.stringify(store.list())
|
|
1997
|
+
})
|
|
1998
|
+
});
|
|
1999
|
+
}
|
|
1901
2000
|
const taskSkillsRoot = path$1.join(QUEUE_DIR_NAME, "skills");
|
|
1902
2001
|
const claudeSkillsDir = path$1.join(session.installDir, ".claude", "skills");
|
|
1903
2002
|
const preexistingSkills = new Set(existsSync(claudeSkillsDir) ? readdirSync(claudeSkillsDir) : []);
|
|
@@ -1935,6 +2034,7 @@ or integrate manually here:
|
|
|
1935
2034
|
effort: taskModel.effort,
|
|
1936
2035
|
allowedTools: resolved.allowedTools,
|
|
1937
2036
|
disallowedTools: resolved.disallowedTools,
|
|
2037
|
+
askBridge: canAsk(registry.get(task.type)) ? askBridge : void 0,
|
|
1938
2038
|
orchestrator: orchestratorCtx(task.id),
|
|
1939
2039
|
spinnerMessage: "",
|
|
1940
2040
|
successMessage: "",
|
|
@@ -2396,6 +2496,6 @@ function tagBinding(boot, binding) {
|
|
|
2396
2496
|
//#region src/lib/agent/agent-runner.ts
|
|
2397
2497
|
var agent_runner_exports = /* @__PURE__ */ __exportAll({ runAgent: () => runAgent });
|
|
2398
2498
|
//#endregion
|
|
2399
|
-
export {
|
|
2499
|
+
export { formatCostUsd as a, computeTokenCostUsd as i, runAgent as n, formatTokenCount as o, shouldDisableAsk as r, authenticate as s, agent_runner_exports as t };
|
|
2400
2500
|
|
|
2401
|
-
//# sourceMappingURL=agent-runner-
|
|
2501
|
+
//# sourceMappingURL=agent-runner-DLAvB67P.js.map
|