@firstpick/pi-package-webui 0.9.5 → 0.9.7

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 (82) hide show
  1. package/README.md +11 -5
  2. package/bin/pi-webui.mjs +457 -77
  3. package/lib/git-workflow-preferences.mjs +21 -1
  4. package/lib/optional-feature-catalog.mjs +1 -1
  5. package/lib/session-actions.mjs +20 -2
  6. package/lib/session-tree-event-targets.mjs +70 -0
  7. package/lib/subagent-launch-policy.mjs +375 -0
  8. package/lib/subagent-launch-slots.mjs +2 -1
  9. package/package.json +1 -1
  10. package/public/app.js +2539 -292
  11. package/public/index.html +87 -31
  12. package/public/service-worker.js +4 -1
  13. package/public/stream-derived-output.mjs +799 -0
  14. package/public/stream-markdown-tail.mjs +204 -0
  15. package/public/stream-output-controller.mjs +193 -51
  16. package/public/stream-render-scheduler.mjs +85 -0
  17. package/public/styles.css +501 -19
  18. package/public/transcript-renderer.mjs +73 -24
  19. package/tests/boot-failure-diagnostics.test.mjs +3 -3
  20. package/tests/browser/composer-action-grid-reorder.spec.mjs +114 -31
  21. package/tests/browser/control-visibility.spec.mjs +141 -2
  22. package/tests/browser/events-tree-context-menu.spec.mjs +240 -0
  23. package/tests/browser/guided-git-fallback.spec.mjs +153 -0
  24. package/tests/browser/mobile-foundation.spec.mjs +28 -0
  25. package/tests/browser/stream-output-isolation.spec.mjs +308 -3
  26. package/tests/browser/user-noticeable-fixes.spec.mjs +204 -0
  27. package/tests/codex-fast-mode-static.test.mjs +2 -2
  28. package/tests/compact-sections-static.test.mjs +4 -0
  29. package/tests/composer-action-grid-reorder-static.test.mjs +8 -7
  30. package/tests/control-visibility-static.test.mjs +66 -3
  31. package/tests/controls-layout-static.test.mjs +3 -3
  32. package/tests/cwd-footer-reliability-static.test.mjs +1 -1
  33. package/tests/events-tree-context-menu-static.test.mjs +131 -0
  34. package/tests/fast-mode-client-static.test.mjs +5 -2
  35. package/tests/feature-decision-output-popup-static.test.mjs +2 -2
  36. package/tests/file-viewer-image-static.test.mjs +3 -3
  37. package/tests/fixtures/fake-pi.mjs +57 -10
  38. package/tests/fixtures/streaming-workloads.mjs +36 -0
  39. package/tests/footer-provider-usage-visual-static.test.mjs +15 -0
  40. package/tests/foreground-transcript-catch-up-static.test.mjs +7 -1
  41. package/tests/git-workflow-preferences.test.mjs +30 -1
  42. package/tests/guided-git-fallback-runtime.test.mjs +418 -0
  43. package/tests/guided-git-fallback-ui-static.test.mjs +60 -0
  44. package/tests/guided-git-message-reliability-static.test.mjs +8 -7
  45. package/tests/interaction-state-stability-static.test.mjs +3 -1
  46. package/tests/intercom-conversation-viewer-static.test.mjs +3 -3
  47. package/tests/intercom-conversations-http.test.mjs +16 -0
  48. package/tests/main-output-loading-static.test.mjs +3 -3
  49. package/tests/middle-button-drag-scroll-static.test.mjs +3 -3
  50. package/tests/mobile-continuity-tablet-static.test.mjs +3 -3
  51. package/tests/mobile-foundation-static.test.mjs +3 -3
  52. package/tests/mobile-phone-experience-static.test.mjs +1 -1
  53. package/tests/mobile-static.test.mjs +80 -67
  54. package/tests/open-issue-wizard-static.test.mjs +1 -1
  55. package/tests/persistent-ui-layout-static.test.mjs +4 -4
  56. package/tests/prompt-input-vertical-scroll-static.test.mjs +26 -0
  57. package/tests/questionnaire-dialog.test.mjs +3 -3
  58. package/tests/remote-auth-settings-harness.test.mjs +23 -0
  59. package/tests/resource-defaults-helper.test.mjs +12 -0
  60. package/tests/runtime-error-visibility.test.mjs +3 -3
  61. package/tests/session-auth-harness.test.mjs +26 -1
  62. package/tests/session-sampling-helper.test.mjs +1 -0
  63. package/tests/session-sampling-ui-static.test.mjs +3 -3
  64. package/tests/session-tree-event-targets.test.mjs +106 -0
  65. package/tests/side-panel-section-height-removal-static.test.mjs +3 -3
  66. package/tests/stream-derived-output.test.mjs +121 -0
  67. package/tests/stream-markdown-tail.test.mjs +218 -0
  68. package/tests/stream-output-controller.test.mjs +119 -4
  69. package/tests/stream-output-isolation-static.test.mjs +27 -6
  70. package/tests/stream-output-workloads.test.mjs +40 -3
  71. package/tests/stream-render-scheduler.test.mjs +115 -0
  72. package/tests/streaming-ui-coupling.test.mjs +1 -1
  73. package/tests/subagent-launch-policy.test.mjs +532 -0
  74. package/tests/subagent-observability-static.test.mjs +2 -2
  75. package/tests/subagents-helper.test.mjs +211 -1
  76. package/tests/syntax-highlighting-static.test.mjs +3 -3
  77. package/tests/tab-close-continuity-static.test.mjs +23 -0
  78. package/tests/theme-customizer-static.test.mjs +1 -1
  79. package/tests/thinking-format-parser.test.mjs +15 -0
  80. package/tests/todo-filter-static.test.mjs +148 -0
  81. package/tests/transcript-markdown-tail.test.mjs +137 -0
  82. package/webui-rpc-helper.mjs +220 -3
@@ -1,7 +1,8 @@
1
- import { createHash } from "node:crypto";
1
+ import { createHash, randomUUID } from "node:crypto";
2
2
  import { closeSync, existsSync, fstatSync, openSync, readFileSync, readSync } from "node:fs";
3
3
  import path from "node:path";
4
4
  import { AgentSession, formatSkillsForPrompt } from "@earendil-works/pi-coding-agent";
5
+ import { Type } from "typebox";
5
6
  import {
6
7
  AGENT_RUN_PROVIDER_EVENT,
7
8
  AgentRunIndex,
@@ -14,9 +15,11 @@ import {
14
15
  resolveResourceSelection,
15
16
  } from "./lib/resource-selection.mjs";
16
17
  import { mutatePiRuntimeFollowUpQueue } from "./lib/queue-mutation.mjs";
18
+ import { applySubagentLaunchSlotDefaults } from "./lib/subagent-launch-policy.mjs";
17
19
  import {
18
20
  formatSubagentLaunchSlotGuidance,
19
21
  resolveSubagentLaunchSlotProjectKey,
22
+ subagentLaunchSlotRevision,
20
23
  subagentLaunchSlotScopeEntry,
21
24
  } from "./lib/subagent-launch-slots.mjs";
22
25
  import { SUBAGENT_GATE_UPDATE_EVENT } from "./lib/subagent-gate.mjs";
@@ -88,6 +91,17 @@ const SUBAGENT_TELEMETRY_CONTEXT_WINDOW_LIMIT = 16_000_000;
88
91
  const SUBAGENT_TELEMETRY_RESPONSE_DURATION_MS = 15 * 60 * 1000;
89
92
  const SUBAGENT_TELEMETRY_SPEED_LIMIT = 1_000_000;
90
93
  const STATS_INITIAL_PROMPT_ESTIMATE_TYPE = "stats_initial_prompt_estimate";
94
+ const SUBAGENT_DEVIATION_PERMIT_LIMIT = 8;
95
+ const SUBAGENT_DEVIATION_PERMIT_TTL_MS = 2 * 60 * 1000;
96
+ const SUBAGENT_DEVIATION_REQUESTED_MODEL_LIMIT = 280;
97
+ const SUBAGENT_DEVIATION_REASON_LIMIT = 500;
98
+
99
+ const SubagentModelDeviationParams = Type.Object({
100
+ role: Type.Literal("reviewer"),
101
+ occurrence: Type.Integer({ minimum: 1, maximum: SUBAGENT_DEVIATION_PERMIT_LIMIT }),
102
+ requestedModel: Type.String({ minLength: 1, maxLength: SUBAGENT_DEVIATION_REQUESTED_MODEL_LIMIT }),
103
+ reason: Type.String({ minLength: 1, maxLength: SUBAGENT_DEVIATION_REASON_LIMIT }),
104
+ }, { additionalProperties: false });
91
105
 
92
106
  const ACTIVE_COMMAND_SESSION_KEY = Symbol.for("pi.webui.helper.activeCommandSession");
93
107
 
@@ -942,6 +956,11 @@ export default function webuiRpcHelper(pi) {
942
956
  let resourceRpcActive = false;
943
957
  let sessionSamplingParams = {};
944
958
  let subagentLaunchSlotGuidance = "";
959
+ let subagentLaunchSlotRoles = null;
960
+ let subagentLaunchSlotSnapshotLoadFailed = false;
961
+ let activeSubagentLaunchSlotRevision = null;
962
+ let subagentLaunchSlotGeneration = 0;
963
+ let subagentModelDeviationPermits = [];
945
964
  let subagentContext = null;
946
965
  let subagentBridgeAvailable = false;
947
966
  let subagentPollTimer = null;
@@ -2133,14 +2152,153 @@ export default function webuiRpcHelper(pi) {
2133
2152
  return (await readWebuiSettings()).resourceDefaults;
2134
2153
  }
2135
2154
 
2155
+ function clearSubagentModelDeviationPermits() {
2156
+ subagentModelDeviationPermits = [];
2157
+ }
2158
+
2159
+ function pruneSubagentModelDeviationPermits(now = Date.now()) {
2160
+ subagentModelDeviationPermits = subagentModelDeviationPermits.filter((permit) => permit.expiresAt > now
2161
+ && permit.slotRevision === activeSubagentLaunchSlotRevision
2162
+ && permit.helperGeneration === subagentLaunchSlotGeneration);
2163
+ return subagentModelDeviationPermits;
2164
+ }
2165
+
2166
+ function subagentModelDeviationDescriptors() {
2167
+ return pruneSubagentModelDeviationPermits().map((permit) => ({
2168
+ id: permit.id,
2169
+ role: permit.role,
2170
+ occurrence: permit.occurrence,
2171
+ requestedModel: permit.requestedModel,
2172
+ expiresAt: permit.expiresAt,
2173
+ }));
2174
+ }
2175
+
2176
+ function removeSubagentModelDeviationPermits(ids) {
2177
+ const consumed = new Set(ids);
2178
+ if (!consumed.size) return;
2179
+ subagentModelDeviationPermits = subagentModelDeviationPermits.filter((permit) => !consumed.has(permit.id));
2180
+ }
2181
+
2182
+ async function approveSubagentModelDeviation(params = {}) {
2183
+ pruneSubagentModelDeviationPermits();
2184
+ if (!subagentLaunchSlotRoles || !activeSubagentLaunchSlotRevision) {
2185
+ throw new Error("Reviewer model deviation approval is unavailable until the active WebUI launch-slot snapshot loads.");
2186
+ }
2187
+ if (params.role !== "reviewer" || !Number.isInteger(params.occurrence)
2188
+ || params.occurrence < 1 || params.occurrence > SUBAGENT_DEVIATION_PERMIT_LIMIT) {
2189
+ throw new Error("Reviewer model deviation approval requires reviewer occurrence 1 through 8.");
2190
+ }
2191
+ if (typeof params.requestedModel !== "string" || params.requestedModel.length > SUBAGENT_DEVIATION_REQUESTED_MODEL_LIMIT) {
2192
+ throw new Error(`Requested model must be at most ${SUBAGENT_DEVIATION_REQUESTED_MODEL_LIMIT} characters.`);
2193
+ }
2194
+ const requestedModel = params.requestedModel.trim();
2195
+ if (!requestedModel) throw new Error("Requested model must not be blank.");
2196
+ if (typeof params.reason !== "string" || params.reason.length > SUBAGENT_DEVIATION_REASON_LIMIT) {
2197
+ throw new Error(`Deviation reason must be at most ${SUBAGENT_DEVIATION_REASON_LIMIT} characters.`);
2198
+ }
2199
+ const reason = params.reason.trim();
2200
+ if (!reason) throw new Error("Deviation reason must not be blank.");
2201
+ if (subagentModelDeviationPermits.length >= SUBAGENT_DEVIATION_PERMIT_LIMIT) {
2202
+ throw new Error("The active WebUI tab already has 8 unused reviewer model deviation permits.");
2203
+ }
2204
+
2205
+ const approvalSlotRevision = activeSubagentLaunchSlotRevision;
2206
+ const approvalGeneration = subagentLaunchSlotGeneration;
2207
+ const context = subagentContext;
2208
+ if (context?.hasUI !== true || typeof context.ui?.confirm !== "function") {
2209
+ throw new Error("Reviewer model deviation approval requires an interactive WebUI confirmation.");
2210
+ }
2211
+ const confirmed = await context.ui.confirm(
2212
+ "Authorize reviewer model deviation?",
2213
+ `Allow reviewer occurrence ${params.occurrence} to use ${requestedModel} once within 2 minutes?\n\nReason: ${reason}`,
2214
+ );
2215
+ if (confirmed !== true) throw new Error("Reviewer model deviation approval was not confirmed by the user.");
2216
+
2217
+ pruneSubagentModelDeviationPermits();
2218
+ if (!subagentLaunchSlotRoles || !activeSubagentLaunchSlotRevision) {
2219
+ throw new Error("Reviewer model deviation approval is unavailable until the active WebUI launch-slot snapshot loads.");
2220
+ }
2221
+ if (activeSubagentLaunchSlotRevision !== approvalSlotRevision || subagentLaunchSlotGeneration !== approvalGeneration) {
2222
+ throw new Error("Reviewer model deviation approval expired because the active WebUI launch-slot snapshot changed during confirmation.");
2223
+ }
2224
+ if (subagentModelDeviationPermits.length >= SUBAGENT_DEVIATION_PERMIT_LIMIT) {
2225
+ throw new Error("The active WebUI tab already has 8 unused reviewer model deviation permits.");
2226
+ }
2227
+ const createdAt = Date.now();
2228
+ const permit = {
2229
+ id: randomUUID(),
2230
+ role: "reviewer",
2231
+ occurrence: params.occurrence,
2232
+ requestedModel,
2233
+ reason,
2234
+ slotRevision: activeSubagentLaunchSlotRevision,
2235
+ helperGeneration: subagentLaunchSlotGeneration,
2236
+ createdAt,
2237
+ expiresAt: createdAt + SUBAGENT_DEVIATION_PERMIT_TTL_MS,
2238
+ };
2239
+ subagentModelDeviationPermits.push(permit);
2240
+ return {
2241
+ content: [{
2242
+ type: "text",
2243
+ text: `Approved one reviewer occurrence ${permit.occurrence} launch with ${permit.requestedModel}. The local permit expires in 2 minutes and is consumed by one admitted launch or leased workflow.`,
2244
+ }],
2245
+ details: {
2246
+ permitId: permit.id,
2247
+ role: permit.role,
2248
+ occurrence: permit.occurrence,
2249
+ requestedModel: permit.requestedModel,
2250
+ createdAt: permit.createdAt,
2251
+ expiresAt: permit.expiresAt,
2252
+ },
2253
+ };
2254
+ }
2255
+
2256
+ function reviewerModelPolicyBlockReason(decisions) {
2257
+ const decision = decisions[0];
2258
+ const more = decisions.length > 1 ? ` (${decisions.length - 1} more mismatch${decisions.length === 2 ? "" : "es"} also blocked.)` : "";
2259
+ return `Reviewer occurrence ${decision.occurrence} model mismatch: expected ${decision.expectedModel}, requested ${decision.requestedModel}. Retry with ${decision.correctionModel} or omit model to use the configured slot; use approve_subagent_model_deviation only after explicit user authorization.${more}`;
2260
+ }
2261
+
2262
+ function inputRequestsReviewer(input) {
2263
+ const role = (value) => typeof value === "string" ? value.trim() : "";
2264
+ if (!isPlainObject(input)) return false;
2265
+ if (role(input.agent) === "reviewer") return true;
2266
+ if (Array.isArray(input.tasks) && input.tasks.some((task) => role(task?.agent) === "reviewer")) return true;
2267
+ return Array.isArray(input.chain) && input.chain.some((step) => role(step?.agent) === "reviewer"
2268
+ || (Array.isArray(step?.parallel) && step.parallel.some((task) => role(task?.agent) === "reviewer"))
2269
+ || role(step?.parallel?.agent) === "reviewer");
2270
+ }
2271
+
2272
+ function launchNeedsLoadedSlotSnapshot(toolName, input) {
2273
+ if (!isPlainObject(input) || input.action !== undefined || input.resume !== undefined) return false;
2274
+ if (toolName === "subagent" && typeof input.workflowScript === "string" && input.workflowScript.trim()) return true;
2275
+ return inputRequestsReviewer(input);
2276
+ }
2277
+
2136
2278
  async function loadSubagentLaunchSlotGuidance(ctx) {
2279
+ const generation = ++subagentLaunchSlotGeneration;
2280
+ clearSubagentModelDeviationPermits();
2281
+ activeSubagentLaunchSlotRevision = null;
2137
2282
  try {
2138
2283
  const settings = await readWebuiSettings();
2139
2284
  const projectKey = await resolveSubagentLaunchSlotProjectKey(ctx?.cwd);
2140
2285
  const effective = subagentLaunchSlotScopeEntry(settings.subagentLaunchSlots, "project", projectKey);
2141
- subagentLaunchSlotGuidance = formatSubagentLaunchSlotGuidance(effective.entry.roles);
2286
+ const revision = subagentLaunchSlotRevision(settings.subagentLaunchSlots, "project", projectKey);
2287
+ if (generation !== subagentLaunchSlotGeneration) return;
2288
+ subagentLaunchSlotRoles = effective.entry.roles;
2289
+ subagentLaunchSlotSnapshotLoadFailed = false;
2290
+ activeSubagentLaunchSlotRevision = revision;
2291
+ const assignments = formatSubagentLaunchSlotGuidance(subagentLaunchSlotRoles);
2292
+ subagentLaunchSlotGuidance = assignments
2293
+ ? `${assignments}\nExplicit reviewer model or thinking mismatches are blocked before launch. The approve_subagent_model_deviation tool is valid only after the user explicitly authorizes that exact reviewer occurrence and requested model, and it always requires interactive confirmation.`
2294
+ : "";
2142
2295
  } catch (error) {
2296
+ if (generation !== subagentLaunchSlotGeneration) return;
2297
+ subagentLaunchSlotRoles = null;
2298
+ subagentLaunchSlotSnapshotLoadFailed = true;
2143
2299
  subagentLaunchSlotGuidance = "";
2300
+ activeSubagentLaunchSlotRevision = null;
2301
+ clearSubagentModelDeviationPermits();
2144
2302
  console.warn(`Web UI subagent launch slots could not be read: ${error instanceof Error ? error.message : String(error)}`);
2145
2303
  }
2146
2304
  }
@@ -2325,7 +2483,22 @@ export default function webuiRpcHelper(pi) {
2325
2483
  function dismissSubagentRun(payload = {}) {
2326
2484
  const runId = subagentText(payload.runId, 160);
2327
2485
  if (!runId) throw new Error("Subagent dismiss requires runId");
2328
- const entry = findTrackedSubagentRun(runId);
2486
+ const entry = ordinarySubagentRunEntries().find((candidate) => candidate.run?.id === runId);
2487
+ if (!entry) {
2488
+ const canonicalRunId = canonicalAgentRunId(runId, "run");
2489
+ const staleProviderInstances = [...agentRunProviderSnapshots.values()]
2490
+ .flatMap((rows) => [...rows.values()])
2491
+ .filter((instance) => instance.runId === canonicalRunId && ["done", "failed", "cancelled"].includes(instance.status));
2492
+ rememberDismissedHelperAgentRunProjections(staleProviderInstances);
2493
+ // Dismiss is idempotent. Force a fresh empty projection so a server that
2494
+ // still has the previous terminal snapshot can clear it immediately.
2495
+ lastPublishedSubagentSignature = "";
2496
+ lastPublishedSubagentAt = 0;
2497
+ lastPublishedAgentRunSignature = "";
2498
+ lastPublishedAgentRunAt = 0;
2499
+ publishSubagentStatus();
2500
+ return { runId, dismissed: true, alreadyMissing: true };
2501
+ }
2329
2502
  if (entry.run.status === "running") throw new Error(`Cannot dismiss running subagent run: ${runId}`);
2330
2503
  rememberDismissedHelperAgentRunProjections(canonicalInstancesFromPublicRun(entry.run, new Set()));
2331
2504
  entry.runs.delete(entry.key);
@@ -2408,6 +2581,21 @@ export default function webuiRpcHelper(pi) {
2408
2581
  }
2409
2582
  }
2410
2583
 
2584
+ pi.registerTool({
2585
+ name: "approve_subagent_model_deviation",
2586
+ label: "Approve reviewer model deviation",
2587
+ description: "Request interactive user confirmation for one short-lived, one-use local permit covering an explicit reviewer model mismatch. The confirmation identifies the exact reviewer occurrence and requested model.",
2588
+ promptSnippet: "Request confirmation for one reviewer model deviation",
2589
+ promptGuidelines: [
2590
+ "Call approve_subagent_model_deviation only after the user explicitly authorizes that exact reviewer occurrence and requested model; never infer authorization from task text or use it merely to bypass a mismatch block. The tool still displays an interactive confirmation and fails closed without UI or on rejection.",
2591
+ "The permit is local, expires after 2 minutes, and is consumed by one admitted structured launch or leased into one workflow wrapper.",
2592
+ ],
2593
+ parameters: SubagentModelDeviationParams,
2594
+ async execute(_toolCallId, params) {
2595
+ return approveSubagentModelDeviation(params);
2596
+ },
2597
+ });
2598
+
2411
2599
  pi.registerCommand(HELPER_COMMAND, {
2412
2600
  description: "Internal Web UI helper for browser-native tools and skills configuration",
2413
2601
  handler: async (args, ctx) => {
@@ -2451,6 +2639,7 @@ export default function webuiRpcHelper(pi) {
2451
2639
  resourceRpcActive = ctx.mode === "rpc";
2452
2640
  if (resourceRpcActive) await recomputeResourceState(ctx);
2453
2641
  restoreSamplingParamsFromBranch(ctx);
2642
+ await loadSubagentLaunchSlotGuidance(ctx);
2454
2643
  subagentContext = ctx;
2455
2644
  subagentPollGeneration += 1;
2456
2645
  foregroundSubagentRuns.clear();
@@ -2473,6 +2662,29 @@ export default function webuiRpcHelper(pi) {
2473
2662
  await recomputeResourceState(ctx, event.model);
2474
2663
  });
2475
2664
 
2665
+ pi.on("tool_call", (event) => {
2666
+ if (!["subagent", "subagent_gate"].includes(event.toolName)) return;
2667
+ const deviations = subagentModelDeviationDescriptors();
2668
+ if (!subagentLaunchSlotRoles) {
2669
+ if (subagentLaunchSlotSnapshotLoadFailed && launchNeedsLoadedSlotSnapshot(event.toolName, event.input)) {
2670
+ return {
2671
+ block: true,
2672
+ reason: "Reviewer launch policy is unavailable because the WebUI launch-slot snapshot could not be loaded. Reload the active tab after fixing settings before launching reviewers or workflows.",
2673
+ };
2674
+ }
2675
+ return;
2676
+ }
2677
+ const report = applySubagentLaunchSlotDefaults(event.toolName, event.input, subagentLaunchSlotRoles, { deviations });
2678
+ if (report.blocked.length) {
2679
+ return { block: true, reason: reviewerModelPolicyBlockReason(report.blocked) };
2680
+ }
2681
+ const workflowWrapped = report.applied.some((item) => item.location === "workflowScript" && item.reason === "runtime-role-defaults");
2682
+ removeSubagentModelDeviationPermits(workflowWrapped
2683
+ ? deviations.map((deviation) => deviation.id)
2684
+ : report.consumedDeviationIds);
2685
+ return undefined;
2686
+ });
2687
+
2476
2688
  pi.on("tool_execution_start", (event, ctx) => {
2477
2689
  if (event.toolName !== "subagent" || event.args?.action) return;
2478
2690
  const id = subagentText(event.toolCallId, 160);
@@ -2578,6 +2790,11 @@ export default function webuiRpcHelper(pi) {
2578
2790
  resourceGeneration += 1;
2579
2791
  subagentContext = null;
2580
2792
  subagentLaunchSlotGuidance = "";
2793
+ subagentLaunchSlotRoles = null;
2794
+ subagentLaunchSlotSnapshotLoadFailed = false;
2795
+ activeSubagentLaunchSlotRevision = null;
2796
+ subagentLaunchSlotGeneration += 1;
2797
+ clearSubagentModelDeviationPermits();
2581
2798
  subagentPollGeneration += 1;
2582
2799
  clearTimeout(subagentPollTimer);
2583
2800
  subagentPollTimer = null;