@posthog/wizard 2.47.0 → 2.49.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.
Files changed (87) hide show
  1. package/dist/{add-mcp-server-to-clients-Dg64O4OZ.js → add-mcp-server-to-clients-DnyxFVhW.js} +4 -4
  2. package/dist/{add-mcp-server-to-clients-Dg64O4OZ.js.map → add-mcp-server-to-clients-DnyxFVhW.js.map} +1 -1
  3. package/dist/{agent-interface-RZY46R62.js → agent-interface-Doo3apDE.js} +6 -6
  4. package/dist/{agent-interface-RZY46R62.js.map → agent-interface-Doo3apDE.js.map} +1 -1
  5. package/dist/{agent-runner-D8pEOs_2.js → agent-runner-D7OZPgIV.js} +68 -21
  6. package/dist/{agent-runner-D8pEOs_2.js.map → agent-runner-D7OZPgIV.js.map} +1 -1
  7. package/dist/analytics-AOHLZy1k.js +2 -0
  8. package/dist/{analytics-B4dny8FA.js → analytics-D6gRGiqt.js} +2 -2
  9. package/dist/{analytics-B4dny8FA.js.map → analytics-D6gRGiqt.js.map} +1 -1
  10. package/dist/{api-CdPvsnUm.js → api-ZT2Zd5yp.js} +3 -3
  11. package/dist/{api-CdPvsnUm.js.map → api-ZT2Zd5yp.js.map} +1 -1
  12. package/dist/bin.js +37 -37
  13. package/dist/check-screens.tsx +26 -0
  14. package/dist/{ci-install-g8govb-6.js → ci-install-CQWSPGdM.js} +4 -4
  15. package/dist/{ci-install-g8govb-6.js.map → ci-install-CQWSPGdM.js.map} +1 -1
  16. package/dist/{debug-DQWRmiju.js → debug-D8AJ_YCW.js} +1 -1
  17. package/dist/{debug-BiU-S12q.js → debug-DF51kDvZ.js} +3 -3
  18. package/dist/{debug-BiU-S12q.js.map → debug-DF51kDvZ.js.map} +1 -1
  19. package/dist/{environment-BT0RRheV.js → environment-Csj7vBHM.js} +3 -3
  20. package/dist/{environment-BT0RRheV.js.map → environment-Csj7vBHM.js.map} +1 -1
  21. package/dist/{file-utils-B1_Eciop.js → file-utils-Dj3UqDJz.js} +2 -2
  22. package/dist/{file-utils-B1_Eciop.js.map → file-utils-Dj3UqDJz.js.map} +1 -1
  23. package/dist/{file-watcher-4frv2dFl.js → file-watcher-CQB00KDS.js} +2 -2
  24. package/dist/{file-watcher-4frv2dFl.js.map → file-watcher-CQB00KDS.js.map} +1 -1
  25. package/dist/{headless-ui-DQVBpo0v.js → headless-ui-DfSOfXEo.js} +2 -2
  26. package/dist/{headless-ui-DQVBpo0v.js.map → headless-ui-DfSOfXEo.js.map} +1 -1
  27. package/dist/{interactive-Bgb8njPS.js → interactive-DmRqhAUD.js} +2 -2
  28. package/dist/{interactive-Bgb8njPS.js.map → interactive-DmRqhAUD.js.map} +1 -1
  29. package/dist/{mcp-BEWwXAXk.js → mcp-B_ycbOus.js} +2 -2
  30. package/dist/{mcp-BEWwXAXk.js.map → mcp-B_ycbOus.js.map} +1 -1
  31. package/dist/{mcp-prompt-streaming-MfYiLHox.js → mcp-prompt-streaming-ChEBHPQ-.js} +3 -3
  32. package/dist/{mcp-prompt-streaming-MfYiLHox.js.map → mcp-prompt-streaming-ChEBHPQ-.js.map} +1 -1
  33. package/dist/{non-interactive-C0NbQTcD.js → non-interactive-ViR2FrQC.js} +2 -2
  34. package/dist/{non-interactive-C0NbQTcD.js.map → non-interactive-ViR2FrQC.js.map} +1 -1
  35. package/dist/{orchestrator-tools-KtXpYp6j.js → orchestrator-tools-B0vrJlpS.js} +11 -8
  36. package/dist/orchestrator-tools-B0vrJlpS.js.map +1 -0
  37. package/dist/{package-manager-L1RLE1ne.js → package-manager-B6QAvLyt.js} +2 -2
  38. package/dist/{package-manager-L1RLE1ne.js.map → package-manager-B6QAvLyt.js.map} +1 -1
  39. package/dist/{pi-BMs3MY7y.js → pi-CXhGyUbi.js} +11 -11
  40. package/dist/{pi-BMs3MY7y.js.map → pi-CXhGyUbi.js.map} +1 -1
  41. package/dist/{playground-DZoNrDEM.js → playground-D_cP2oXt.js} +6 -6
  42. package/dist/{playground-DZoNrDEM.js.map → playground-D_cP2oXt.js.map} +1 -1
  43. package/dist/{posthog-integration-BnWgrvts.js → posthog-integration-Bt8jQC7c.js} +14 -14
  44. package/dist/{posthog-integration-BnWgrvts.js.map → posthog-integration-Bt8jQC7c.js.map} +1 -1
  45. package/dist/{provisioning-DS8zDveH.js → provisioning-By5DVLJr.js} +3 -3
  46. package/dist/{provisioning-DS8zDveH.js.map → provisioning-By5DVLJr.js.map} +1 -1
  47. package/dist/{queue-tools-rAN2wwDC.js → queue-tools-3iQHCpWF.js} +18 -9
  48. package/dist/queue-tools-3iQHCpWF.js.map +1 -0
  49. package/dist/{registry-Zp3B2L4q.js → registry-DG8r_Wks.js} +4 -4
  50. package/dist/{registry-Zp3B2L4q.js.map → registry-DG8r_Wks.js.map} +1 -1
  51. package/dist/{security-R8m9JSHq.js → security-BpbwefgM.js} +4 -4
  52. package/dist/{security-R8m9JSHq.js.map → security-BpbwefgM.js.map} +1 -1
  53. package/dist/{setup-utils-BMy5Zj3Z.js → setup-utils-CFejYe1M.js} +7 -7
  54. package/dist/{setup-utils-BMy5Zj3Z.js.map → setup-utils-CFejYe1M.js.map} +1 -1
  55. package/dist/{start-tui-CJ7i0pbr.js → start-tui-BINHq3Yp.js} +17 -17
  56. package/dist/{start-tui-CJ7i0pbr.js.map → start-tui-BINHq3Yp.js.map} +1 -1
  57. package/dist/{steps-CsvYRuTV.js → steps-DhmMIChh.js} +7 -7
  58. package/dist/{steps-CsvYRuTV.js.map → steps-DhmMIChh.js.map} +1 -1
  59. package/dist/{store-CVZL9JJe.js → store-Bj1m0ws-.js} +4 -4
  60. package/dist/{store-CVZL9JJe.js.map → store-Bj1m0ws-.js.map} +1 -1
  61. package/dist/{subagent-C1OOk1kh.js → subagent-DND7lZg6.js} +2 -2
  62. package/dist/{subagent-C1OOk1kh.js.map → subagent-DND7lZg6.js.map} +1 -1
  63. package/dist/{task-BMaazWIr.js → task-CsAczwW6.js} +12 -12
  64. package/dist/task-CsAczwW6.js.map +1 -0
  65. package/dist/{task-stream-DlgLKdMC.js → task-stream-BaiI6TNY.js} +3 -3
  66. package/dist/{task-stream-DlgLKdMC.js.map → task-stream-BaiI6TNY.js.map} +1 -1
  67. package/dist/{tasks-BcsQlnuL.js → tasks-DqDHx5pW.js} +2 -2
  68. package/dist/{tasks-BcsQlnuL.js.map → tasks-DqDHx5pW.js.map} +1 -1
  69. package/dist/{telemetry-3Y8LxNVU.js → telemetry-DXzPfSXl.js} +3 -3
  70. package/dist/{telemetry-3Y8LxNVU.js.map → telemetry-DXzPfSXl.js.map} +1 -1
  71. package/dist/{terminal-B4cCBtMj.js → terminal-DKsibL3T.js} +40 -25
  72. package/dist/terminal-DKsibL3T.js.map +1 -0
  73. package/dist/{tools-C07lR0s-.js → tools-D5pL_r3K.js} +6 -6
  74. package/dist/{tools-C07lR0s-.js.map → tools-D5pL_r3K.js.map} +1 -1
  75. package/dist/{wizard-abort-D1UxHeiE.js → wizard-abort-Br1Dps20.js} +3 -3
  76. package/dist/{wizard-abort-D1UxHeiE.js.map → wizard-abort-Br1Dps20.js.map} +1 -1
  77. package/dist/{wizard-abort-DoI_ZWM-.js → wizard-abort-DG6Atd5I.js} +1 -1
  78. package/dist/yara-hooks-BExxs6sG.js +2 -0
  79. package/dist/{yara-hooks-D9PSjEqo.js → yara-hooks-DEHfsDSF.js} +3 -3
  80. package/dist/{yara-hooks-D9PSjEqo.js.map → yara-hooks-DEHfsDSF.js.map} +1 -1
  81. package/package.json +1 -1
  82. package/dist/analytics-BAhDPsPK.js +0 -2
  83. package/dist/orchestrator-tools-KtXpYp6j.js.map +0 -1
  84. package/dist/queue-tools-rAN2wwDC.js.map +0 -1
  85. package/dist/task-BMaazWIr.js.map +0 -1
  86. package/dist/terminal-B4cCBtMj.js.map +0 -1
  87. package/dist/yara-hooks-ChkXWyzs.js +0 -2
@@ -1,17 +1,17 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-B_-DWIq7.js";
2
- import { A as GPT5_4_MODEL, Ct as runtimeEnv, D as DEFAULT_AGENT_MODEL, F as GPT5_MINI_MODEL, I as GPT5_MODEL, M as GPT5_6_LUNA_MODEL, N as GPT5_6_SOL_MODEL, P as GPT5_6_TERRA_MODEL, R as Harness, St as RUN_SURFACE, _ as evaluateWizardReadiness, _t as WIZARD_USE_PI_HARNESS_FLAG_KEY, a as getLogFilePath, c as WIZARD_BENCHMARK_FILE, dt as WIZARD_PI_MODEL_FLAG_KEY, f as getUI, g as SIGNUP_WIZARD_READINESS_CONFIG, h as SERVICE_LABELS, i as enableDebugLogs, it as Sequence, j as GPT5_5_MODEL, l as WIZARD_LOG_FILE, lt as WIZARD_ORCHESTRATOR_FLAG_KEY, mt as WIZARD_SELF_DRIVING_USE_PI_HARNESS_FLAG_KEY, o as initLogFile, rt as SONNET_5_MODEL, s as logToFile, t as configureLogFile, ut as WIZARD_PI_EFFORT_FLAG_KEY, v as getBlockingServiceKeys, vt as getSkillsBaseUrl } from "./debug-BiU-S12q.js";
3
- import { a as ciExcludedTaskTypes, n as analytics, r as groupsFromUser } from "./analytics-B4dny8FA.js";
4
- import { t as getOrAskForProjectData } from "./setup-utils-BMy5Zj3Z.js";
2
+ import { A as GPT5_4_MODEL, Ct as runtimeEnv, D as DEFAULT_AGENT_MODEL, F as GPT5_MINI_MODEL, I as GPT5_MODEL, M as GPT5_6_LUNA_MODEL, N as GPT5_6_SOL_MODEL, P as GPT5_6_TERRA_MODEL, R as Harness, St as RUN_SURFACE, _ as evaluateWizardReadiness, _t as WIZARD_USE_PI_HARNESS_FLAG_KEY, a as getLogFilePath, c as WIZARD_BENCHMARK_FILE, dt as WIZARD_PI_MODEL_FLAG_KEY, f as getUI, g as SIGNUP_WIZARD_READINESS_CONFIG, h as SERVICE_LABELS, i as enableDebugLogs, it as Sequence, j as GPT5_5_MODEL, l as WIZARD_LOG_FILE, lt as WIZARD_ORCHESTRATOR_FLAG_KEY, mt as WIZARD_SELF_DRIVING_USE_PI_HARNESS_FLAG_KEY, o as initLogFile, rt as SONNET_5_MODEL, s as logToFile, t as configureLogFile, ut as WIZARD_PI_EFFORT_FLAG_KEY, v as getBlockingServiceKeys, vt as getSkillsBaseUrl } from "./debug-DF51kDvZ.js";
3
+ import { a as ciExcludedTaskTypes, n as analytics, r as groupsFromUser } from "./analytics-D6gRGiqt.js";
4
+ import { t as getOrAskForProjectData } from "./setup-utils-CFejYe1M.js";
5
5
  import "./wizard-session-tp4Zdbwl.js";
6
- import { i as wizardAbort, n as registerCleanup, t as WizardError } from "./wizard-abort-D1UxHeiE.js";
7
- import { n as isNonInteractiveEnvironment } from "./environment-BT0RRheV.js";
8
- import { O as fetchWithRetry, S as installSkillById, c as classifySettingsConflicts, i as runAgent$1, k as createWizardAskBridge, n as buildRunTags, o as backupAndFixClaudeSettings, p as AgentSignals, r as initializeAgent, s as checkAllSettingsConflicts, u as restoreClaudeSettings, x as fetchSkillMenu } from "./agent-interface-RZY46R62.js";
9
- import { a as QUEUE_DIR_NAME, o as QueueStore, s as TaskStatus } from "./queue-tools-rAN2wwDC.js";
10
- import { a as flushScanReport, o as formatScanReport, p as writeScanReport, s as formatYaraAbortMessage } from "./yara-hooks-D9PSjEqo.js";
11
- import { r as detectNodePackageManagers } from "./package-manager-L1RLE1ne.js";
12
- import { a as piBackend, l as isThinkingLevel } from "./pi-BMs3MY7y.js";
13
- import { t as FRAMEWORK_REGISTRY } from "./registry-Zp3B2L4q.js";
14
- import fs, { existsSync, rmSync } from "fs";
6
+ import { i as wizardAbort, n as registerCleanup, t as WizardError } from "./wizard-abort-Br1Dps20.js";
7
+ import { n as isNonInteractiveEnvironment } from "./environment-Csj7vBHM.js";
8
+ import { O as fetchWithRetry, S as installSkillById, c as classifySettingsConflicts, i as runAgent$1, k as createWizardAskBridge, n as buildRunTags, o as backupAndFixClaudeSettings, p as AgentSignals, r as initializeAgent, s as checkAllSettingsConflicts, u as restoreClaudeSettings, x as fetchSkillMenu } from "./agent-interface-Doo3apDE.js";
9
+ import { c as TaskStatus, o as QUEUE_DIR_NAME, s as QueueStore } from "./queue-tools-3iQHCpWF.js";
10
+ import { a as flushScanReport, o as formatScanReport, p as writeScanReport, s as formatYaraAbortMessage } from "./yara-hooks-DEHfsDSF.js";
11
+ import { r as detectNodePackageManagers } from "./package-manager-B6QAvLyt.js";
12
+ import { a as piBackend, l as isThinkingLevel } from "./pi-CXhGyUbi.js";
13
+ import { t as FRAMEWORK_REGISTRY } from "./registry-DG8r_Wks.js";
14
+ import fs, { cpSync, existsSync, mkdirSync, readdirSync, rmSync, writeFileSync } from "fs";
15
15
  import * as path$1 from "path";
16
16
  import path from "path";
17
17
  import { z } from "zod";
@@ -1764,7 +1764,7 @@ function commandmentsReference(ctx) {
1764
1764
  if (!ctx.commandmentsPath) return null;
1765
1765
  return `Framework rules for this integration are at \`${ctx.commandmentsPath}\`. Read them before you edit and follow them.`;
1766
1766
  }
1767
- const TASK_BASICS = `You are one isolated task in a larger PostHog workflow, run as a fresh agent with no memory of the other tasks beyond the context you are given. 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 \`skipped\` and say why, rather than marking it done.`;
1767
+ const TASK_BASICS = `You are one isolated task in a larger PostHog workflow, run as a fresh agent with no memory of the other tasks beyond the context you are given. 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.`;
1768
1768
  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.`;
1769
1769
  /**
1770
1770
  * Points the agent at its installed task instructions (the HOW). They live under
@@ -1949,6 +1949,8 @@ function renderHandoffContext(task, store) {
1949
1949
  lines.push(`- did: ${handoff.did}`);
1950
1950
  lines.push(`- for you: ${handoff.forNextAgent}`);
1951
1951
  if (handoff.filesTouched?.length) lines.push(`- files: ${handoff.filesTouched.join(", ")}`);
1952
+ if (handoff.evidence) lines.push(`- evidence: ${handoff.evidence}`);
1953
+ if (handoff.assumptions) lines.push(`- assumed: ${handoff.assumptions}`);
1952
1954
  lines.push("");
1953
1955
  }
1954
1956
  if (lines.length === 0) return "";
@@ -1998,6 +2000,36 @@ const EMPTY_PROMPT = {};
1998
2000
  * task resolve to a prompt fetched at startup into the registry. The wizard side
1999
2001
  * stays product-ignorant: it is the queue, the executor, and the loader.
2000
2002
  */
2003
+ /** Docs page (`django.md`, `nuxt-js-3-6.md`) — steps start with a digit, agent artifacts (`SKILL.md`, `EXAMPLE*`, `COMMANDMENTS.md`) have uppercase. */
2004
+ const isDocPage = (name) => name.endsWith(".md") && name === name.toLowerCase() && !/^\d/.test(name);
2005
+ /** Copy only the framework docs pages out of the run cache into .claude/skills — the one durable artifact an orchestrator run leaves. Never clobbers an existing install. */
2006
+ function promoteReferenceSkill(referenceDir, claudeSkillsDir, referenceSkillId) {
2007
+ const target = path$1.join(claudeSkillsDir, referenceSkillId);
2008
+ const refs = path$1.join(referenceDir, "references");
2009
+ if (!existsSync(refs) || existsSync(target)) return;
2010
+ const docs = readdirSync(refs).filter(isDocPage);
2011
+ if (docs.length === 0) return;
2012
+ mkdirSync(path$1.join(target, "references"), { recursive: true });
2013
+ for (const f of docs) cpSync(path$1.join(refs, f), path$1.join(target, "references", f));
2014
+ writeFileSync(path$1.join(target, ".posthog-wizard"), "");
2015
+ }
2016
+ /**
2017
+ * Remove skills that task agents installed durably mid-run (load_skill):
2018
+ * wizard-marked, new this run, and not the framework reference docs.
2019
+ * User-authored and pre-existing skills stay.
2020
+ */
2021
+ function sweepRunInstalledSkills(claudeSkillsDir, preexistingSkills, referenceSkillId) {
2022
+ if (!existsSync(claudeSkillsDir)) return;
2023
+ for (const id of readdirSync(claudeSkillsDir)) {
2024
+ if (preexistingSkills.has(id) || id === referenceSkillId) continue;
2025
+ if (!existsSync(path$1.join(claudeSkillsDir, id, ".posthog-wizard"))) continue;
2026
+ rmSync(path$1.join(claudeSkillsDir, id), {
2027
+ recursive: true,
2028
+ force: true
2029
+ });
2030
+ logToFile(`[orchestrator] removed run-installed skill ${id}`);
2031
+ }
2032
+ }
2001
2033
  function toTodoStatus(status) {
2002
2034
  switch (status) {
2003
2035
  case TaskStatus.Running: return "in_progress";
@@ -2103,11 +2135,13 @@ async function runOrchestrator(session, programConfig, boot) {
2103
2135
  } });
2104
2136
  let examplePath;
2105
2137
  let commandmentsPath;
2138
+ let referenceInstallPath;
2106
2139
  const menuSkillEntries = await fetchSkillMenuEntries(boot.skillsBaseUrl);
2107
2140
  const referenceSkillId = session.skillId ? resolveReferenceSkillId(menuSkillEntries, session.skillId) : void 0;
2108
2141
  if (referenceSkillId) {
2109
2142
  const ref = await installSkillById(referenceSkillId, session.installDir, boot.skillsBaseUrl, path$1.join(QUEUE_DIR_NAME, "reference"));
2110
2143
  if (ref.kind === "ok") {
2144
+ referenceInstallPath = ref.path;
2111
2145
  const example = path$1.join(ref.path, "references", "EXAMPLE.md");
2112
2146
  if (existsSync(path$1.join(session.installDir, example))) examplePath = example;
2113
2147
  const commandments = path$1.join(ref.path, "references", "COMMANDMENTS.md");
@@ -2176,7 +2210,6 @@ or integrate manually here:
2176
2210
  spinnerMessage: "Planning the integration...",
2177
2211
  successMessage: "Planned the integration",
2178
2212
  additionalFeatureQueue: [],
2179
- requestRemark: false,
2180
2213
  analyticsProperties: {
2181
2214
  task_type: "seed",
2182
2215
  harness: seedPick.harness
@@ -2189,7 +2222,8 @@ or integrate manually here:
2189
2222
  });
2190
2223
  renderQueue();
2191
2224
  const taskSkillsRoot = path$1.join(QUEUE_DIR_NAME, "skills");
2192
- let remarkRequested = false;
2225
+ const claudeSkillsDir = path$1.join(session.installDir, ".claude", "skills");
2226
+ const preexistingSkills = new Set(existsSync(claudeSkillsDir) ? readdirSync(claudeSkillsDir) : []);
2193
2227
  const runTask = async (task) => {
2194
2228
  renderQueue();
2195
2229
  try {
@@ -2205,8 +2239,6 @@ or integrate manually here:
2205
2239
  if (result.kind === "ok") skillPaths.push(path$1.join(result.path, "SKILL.md"));
2206
2240
  else logToFile(`[orchestrator] skill install failed type=${task.type} skill=${variantId} ${result.kind}`);
2207
2241
  }
2208
- const requestRemark = !store.list().some((t) => t.id !== task.id && (t.status === TaskStatus.Pending || t.status === TaskStatus.Running)) && !remarkRequested;
2209
- if (requestRemark) remarkRequested = true;
2210
2242
  const taskPick = resolveHarness(switchboardCtx, task.type);
2211
2243
  const taskHarness = requireTaskHarness(taskPick);
2212
2244
  const taskModel = taskModelSpec(registry, task, taskPick.harness);
@@ -2224,7 +2256,6 @@ or integrate manually here:
2224
2256
  spinnerMessage: "",
2225
2257
  successMessage: "",
2226
2258
  additionalFeatureQueue: [],
2227
- requestRemark,
2228
2259
  analyticsProperties: {
2229
2260
  task_type: task.type,
2230
2261
  task_id: task.id,
@@ -2232,12 +2263,22 @@ or integrate manually here:
2232
2263
  }
2233
2264
  });
2234
2265
  } finally {
2266
+ try {
2267
+ sweepRunInstalledSkills(claudeSkillsDir, preexistingSkills, referenceSkillId);
2268
+ } catch (err) {
2269
+ logToFile(`[orchestrator] per-task skill sweep failed: ${String(err)}`);
2270
+ }
2235
2271
  renderQueue();
2236
2272
  }
2237
2273
  };
2238
2274
  try {
2239
2275
  await drainQueue(store, runTask);
2240
2276
  } finally {
2277
+ try {
2278
+ if (referenceSkillId && referenceInstallPath) promoteReferenceSkill(path$1.join(session.installDir, referenceInstallPath), claudeSkillsDir, referenceSkillId);
2279
+ } catch (err) {
2280
+ analytics.captureException(err instanceof Error ? err : new Error(String(err)), { step: "orchestrator_reference_promote" });
2281
+ }
2241
2282
  try {
2242
2283
  rmSync(path$1.join(session.installDir, QUEUE_DIR_NAME), {
2243
2284
  recursive: true,
@@ -2246,6 +2287,11 @@ or integrate manually here:
2246
2287
  } catch (err) {
2247
2288
  analytics.captureException(err instanceof Error ? err : new Error(String(err)), { step: "orchestrator_cache_cleanup" });
2248
2289
  }
2290
+ try {
2291
+ sweepRunInstalledSkills(claudeSkillsDir, preexistingSkills, referenceSkillId);
2292
+ } catch (err) {
2293
+ analytics.captureException(err instanceof Error ? err : new Error(String(err)), { step: "orchestrator_skill_sweep" });
2294
+ }
2249
2295
  }
2250
2296
  renderQueue();
2251
2297
  const summary = store.summary();
@@ -2254,7 +2300,7 @@ or integrate manually here:
2254
2300
  tasks_total: summary.total,
2255
2301
  tasks_done: summary.done,
2256
2302
  tasks_failed: summary.failed,
2257
- tasks_skipped: summary.skipped,
2303
+ tasks_skipped: summary[TaskStatus.Skipped],
2258
2304
  total_duration_ms: Date.now() - runStartMs,
2259
2305
  ...metrics.summary(),
2260
2306
  dynamic_enqueue_count: store.list().filter((t) => t.enqueuedBy !== "orchestrator").length,
@@ -2263,7 +2309,8 @@ or integrate manually here:
2263
2309
  const buildTask = store.list().find((t) => t.type === "build");
2264
2310
  const conflict = buildTask ? store.readHandoff(buildTask.id)?.conflict : void 0;
2265
2311
  const reportFile = existsSync(path$1.join(session.installDir, "posthog-setup-report.md")) ? "posthog-setup-report.md" : store.queuePath;
2266
- const message = conflict ? "PostHog set up, with one conflict to review." : `PostHog set up: ${summary.done}/${summary.total} steps completed.`;
2312
+ const notRequired = summary[TaskStatus.Skipped];
2313
+ const message = conflict ? "PostHog set up, with one conflict to review." : `PostHog set up: ${summary.done}/${summary.total - notRequired} steps completed${notRequired > 0 ? ` (${notRequired} skipped as not required)` : ""}.`;
2267
2314
  getUI().setOutroData({
2268
2315
  kind: "success",
2269
2316
  message,
@@ -2524,4 +2571,4 @@ var agent_runner_exports = /* @__PURE__ */ __exportAll({ runAgent: () => runAgen
2524
2571
  //#endregion
2525
2572
  export { formatTokenCount as a, formatCostUsd as i, runAgent as n, authenticate as o, computeTokenCostUsd as r, agent_runner_exports as t };
2526
2573
 
2527
- //# sourceMappingURL=agent-runner-D8pEOs_2.js.map
2574
+ //# sourceMappingURL=agent-runner-D7OZPgIV.js.map