Преглед изворни кода

Merge pull request #1527 from colbymchenry/bugfix/CG-38

CG-38: guarantee an agent-named symbol renders, wherever it sits
Colby Mchenry пре 4 недеља
родитељ
комит
99f2ebf0d1

+ 1 - 0
CHANGELOG.md

@@ -36,6 +36,7 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 - Every file `codegraph_explore` decides to include now actually arrives. A file shown in full could still spend room set aside for files below it — the fix above covered files shown as excerpts but not files shown whole — and the answer's own size bookkeeping under-counted each file's heading, so the answer ran past its limit and a fully prepared file was discarded at the end. A file that no longer fits whole is now shown as excerpts instead of vanishing, and one that overshoots by a little is trimmed to fit rather than dropped.
 - The list of files an answer could not cover — the "explore these names for their source" pointers — is no longer thrown away when the answer is full. It is now budgeted for and trimmed to fit, so a full answer still tells you what it left out and which names to ask for next, instead of ending with no pointers at all.
 - When a `codegraph_explore` answer shows a file as excerpts, a large excerpt that no longer fit was dropped entirely instead of being shortened. If the file's first excerpt happened to be a trivial one — an import block, a one-line helper next to the code you asked about — the excerpt carrying the actual answer was the one thrown away, and the file came back with a quarter of the room it had been given. On real projects that meant the top-ranked file delivered a fraction of its share while a far less relevant file took the rest. Excerpts are now shortened to fit, whole method by whole method, and only dropped when what is left is too small to hold anything readable.
+- When you name a symbol in a `codegraph_explore` query, its definition now actually comes back. Two cases previously lost it. If the symbols you named don't call one another — sibling functions inside the same factory or module are the everyday example — CodeGraph stopped treating them as symbols you had asked for, and answered with whatever sat at the top of their file instead; on one 1,400-line file that meant a same-stem `QueuedMessage` interface on line 70 came back while the `queueMessage` function on line 1087 did not. And when an answer had to be trimmed to fit, it was trimmed from the bottom of the file down, so a symbol near the end of a long file was always the first thing cut. Trimming now protects the definitions you named wherever they sit in the file.
 - The blast-radius section of `codegraph_explore` flagged "no covering tests found" whenever no test called a symbol directly — falsely branding helpers that tests exercise through their callers as untested (about 40% of flagged symbols in a measured sample). The check now follows caller chains up to 3 hops and reports indirect coverage as "tested via callers"; when nothing is found it states exactly what was checked instead of an unconditional warning. Thanks @inth3shadows for measuring the false-positive rate. (#1475)
 
 ## [1.5.0] - 2026-07-21

+ 199 - 0
__tests__/explore-named-symbol-render.test.ts

@@ -0,0 +1,199 @@
+/**
+ * Standing gate for THE GUARANTEE (task CG-38): if the agent names a symbol and
+ * that symbol's file is admitted to the response, the symbol's DEFINITION renders.
+ *
+ * This is the measurement the CG-24 epic never had. Its probes all score the
+ * response in aggregate — envelope share, per-file spend, source totals, file
+ * counts — and every one of them is green on a response that returns 25K of
+ * source from the right file and still omits the function the agent asked for by
+ * name. That is what CG-38 was: on a 1,414-line Svelte store, `queueMessage`
+ * (L1087) and `flushQueuedMessages` (L1102) never rendered even though their file
+ * won rank #1 with 67% of the envelope; the agent got the same-stem
+ * `QueuedMessage` INTERFACE at L70 and had to Read the file to find the
+ * functions. Longstanding, not an epic regression — the controlled bisect (index
+ * held fixed, engine varied across every epic merge point) found it at every
+ * build including pre-epic.
+ *
+ * Two independent causes, and the fixture below fails on either:
+ *
+ *   1. `buildFlowFromNamedSymbols` returned EMPTY — throwing away the NAMED-SYMBOL
+ *      IDENTITY along with the narrative — whenever the named symbols happened not
+ *      to form a call chain. Two sibling closures in one factory produce no chain,
+ *      no synthesized hop and no dispatch boundary, so both defs lost the
+ *      importance-9 rank that the named-def injection exists to give them.
+ *   2. The ceiling trim cut in SOURCE ORDER, so whatever survived the shrink at
+ *      the END of a large file was always the first thing dropped.
+ *
+ * The fixture mirrors the reported file's geometry deliberately: a decoy
+ * same-stem interface at L70, a factory closure at L104 spanning ~92% of the file
+ * (so every symbol merges into ONE cluster), the target functions past L1000, and
+ * a 2,500-line generated `.d.ts` for the ranker to penalise.
+ */
+import { describe, it, expect, beforeAll, afterAll } from 'vitest';
+import * as fs from 'fs';
+import * as path from 'path';
+import * as os from 'os';
+import CodeGraph from '../src/index';
+import { ToolHandler } from '../src/mcp/tools';
+
+const FIXTURE = 'tail-render-ts';
+const TARGET = 'src/lib/session-store.ts';
+
+let dir: string;
+let cg: CodeGraph;
+
+/** Every `<n>\t<text>` line number the response actually sent. */
+function renderedLines(response: string): Set<number> {
+  const out = new Set<number>();
+  for (const m of response.matchAll(/^(\d+)\t/gm)) out.add(Number(m[1]));
+  return out;
+}
+
+async function explore(query: string): Promise<string> {
+  const res = await new ToolHandler(cg).execute('codegraph_explore', { query });
+  return res.content?.[0]?.text ?? '';
+}
+
+function defLineOf(name: string): number {
+  const node = cg.getNodesByName(name).find((n) => n.filePath === TARGET && n.startLine > 0);
+  expect(node, `${name} is not indexed in ${TARGET}`).toBeDefined();
+  return node!.startLine;
+}
+
+beforeAll(async () => {
+  dir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-cg38-'));
+  fs.cpSync(path.join(__dirname, 'fixtures', FIXTURE), dir, { recursive: true });
+  fs.rmSync(path.join(dir, '.codegraph'), { recursive: true, force: true });
+  cg = CodeGraph.initSync(dir);
+  await cg.indexAll();
+}, 180_000);
+
+afterAll(() => {
+  cg?.destroy();
+  if (dir && fs.existsSync(dir)) fs.rmSync(dir, { recursive: true, force: true });
+});
+
+describe('CG-38 fixture shape — if this rots, the gate below means nothing', () => {
+  it('puts the target functions past L1000 of a ~1,400-line file', () => {
+    const lines = fs.readFileSync(path.join(dir, TARGET), 'utf-8').split('\n');
+    expect(lines.length).toBeGreaterThan(1300);
+    expect(defLineOf('queueMessage')).toBeGreaterThan(1000);
+    expect(defLineOf('flushQueuedMessages')).toBeGreaterThan(1000);
+  });
+
+  it('wraps them in a closure spanning most of the file, so they all cluster as one', () => {
+    const lines = fs.readFileSync(path.join(dir, TARGET), 'utf-8').split('\n');
+    const factory = cg.getNodesByName('createSessionStore')
+      .find((n) => n.filePath === TARGET)!;
+    expect(factory).toBeDefined();
+    expect(factory.endLine - factory.startLine + 1).toBeGreaterThan(lines.length * 0.5);
+  });
+
+  it('carries the same-stem decoy near the top', () => {
+    const decoy = cg.getNodesByName('QueuedMessage').find((n) => n.filePath === TARGET)!;
+    expect(decoy).toBeDefined();
+    expect(decoy.kind).toBe('interface');
+    expect(decoy.startLine).toBeLessThan(100);
+  });
+
+  it('carries a generated declaration file for the ranker to penalise', () => {
+    const dts = path.join(dir, 'types/worker-configuration.d.ts');
+    expect(fs.existsSync(dts)).toBe(true);
+    expect(fs.readFileSync(dts, 'utf-8').split('\n').length).toBeGreaterThan(2000);
+  });
+
+  it('neither target calls the other — that absence is what produced no flow', () => {
+    const queue = cg.getNodesByName('queueMessage').find((n) => n.filePath === TARGET)!;
+    const flush = cg.getNodesByName('flushQueuedMessages').find((n) => n.filePath === TARGET)!;
+    const between = [...cg.getCallees(queue.id), ...cg.getCallees(flush.id)]
+      .filter(({ node }) => node.id === queue.id || node.id === flush.id);
+    expect(between).toHaveLength(0);
+  });
+});
+
+describe('CG-38 — an agent-named symbol renders its definition', () => {
+  /**
+   * Both reported query shapes. They fail for different reasons — the symbol bag
+   * never built a flow at all, the prose question built one and then lost the
+   * tail to the ceiling trim — so a fix for one does not imply the other.
+   */
+  const CASES: Array<{ shape: string; query: string; symbols: string[] }> = [
+    {
+      shape: 'symbol bag',
+      query: 'queueMessage flushQueuedMessages',
+      symbols: ['queueMessage', 'flushQueuedMessages'],
+    },
+    {
+      shape: 'prose question',
+      query: 'how does queueMessage hand its entries to flushQueuedMessages',
+      symbols: ['queueMessage', 'flushQueuedMessages'],
+    },
+    {
+      shape: 'three siblings, with the decoy interface competing',
+      query: 'explain queueMessage, removeQueuedMessage and flushQueuedMessages',
+      symbols: ['queueMessage', 'removeQueuedMessage', 'flushQueuedMessages'],
+    },
+  ];
+
+  for (const { shape, query, symbols } of CASES) {
+    it(`renders every named definition — ${shape}`, async () => {
+      const response = await explore(query);
+      const lines = renderedLines(response);
+      for (const name of symbols) {
+        const line = defLineOf(name);
+        // The NAME alone proves nothing: it appears in the section header's
+        // symbol list and at call sites whether or not the body was sent. Only
+        // the definition LINE being among the rendered lines counts.
+        expect(lines.has(line), `${name} (${TARGET}:${line}) did not render for "${query}"`)
+          .toBe(true);
+      }
+    }, 120_000);
+  }
+
+  it('never steers the agent to Read', async () => {
+    const response = await explore('queueMessage flushQueuedMessages');
+    expect(response).not.toMatch(/\buse Read\b|\bRead the file\b/i);
+  }, 120_000);
+});
+
+describe('CG-38 — a penalty on one file cannot shrink an unrelated file\'s render', () => {
+  /**
+   * The issue's sharpest lead: on an index where the generated `.d.ts` was NOT
+   * flagged, the target file rendered ~581 lines including both symbols; on an
+   * index where it WAS flagged, the same engine rendered 12. `rankPenalty` scales
+   * `fileGraphScore`, which moves the relevance gate (6% of max) and so reshuffles
+   * the admitted set — a demotion of one file must not cost an unrelated
+   * top-ranked file its source.
+   *
+   * Flipping `files.generated` on that one row holds the INDEX constant and
+   * attributes any delta to the ranker alone (the CG-25 method).
+   */
+  const DTS = 'types/worker-configuration.d.ts';
+  const QUERY = 'queueMessage flushQueuedMessages';
+
+  it('renders the same named definitions with the .d.ts flagged and unflagged', async () => {
+    const setGenerated = (value: number) => {
+      // eslint-disable-next-line @typescript-eslint/no-explicit-any
+      const db = (cg as any).db?.getDatabase?.() ?? (cg as any).db?.db;
+      db.prepare('UPDATE files SET generated = ? WHERE path = ?').run(value, DTS);
+    };
+    const linesFor = async () => renderedLines(await explore(QUERY));
+
+    const flagged = await linesFor();
+    setGenerated(0);
+    try {
+      const unflagged = await linesFor();
+      for (const name of ['queueMessage', 'flushQueuedMessages']) {
+        const line = defLineOf(name);
+        expect(flagged.has(line), `${name} missing with the .d.ts FLAGGED`).toBe(true);
+        expect(unflagged.has(line), `${name} missing with the .d.ts UNFLAGGED`).toBe(true);
+      }
+      // The guarantee is about the named defs, not byte equality — the penalty is
+      // supposed to move bytes around. What it must never do is cost the
+      // top-ranked file the source the agent asked for.
+      expect(unflagged.size).toBeGreaterThan(0);
+    } finally {
+      setGenerated(1);
+    }
+  }, 180_000);
+});

+ 39 - 0
__tests__/fixtures/tail-render-ts/README.md

@@ -0,0 +1,39 @@
+# tail-render-ts — CG-38
+
+An agent-named symbol sitting in the TAIL of a large file must render.
+
+This mirrors the geometry of the reported file (a 1,414-line Svelte chat store)
+closely enough that the same two defects reproduce, and it is that geometry — not
+any individual line — that the fixture exists to hold:
+
+| | line | why it matters |
+|---|---|---|
+| `QueuedMessage` (interface) | 70 | the DECOY. Same stem as the query token, near the top, cheap to render — it is what the broken build returned *instead of* the functions. |
+| `createSessionStore` (function) | 104–1417 | the ENVELOPE. Spans ~92% of the file, and `function` is deliberately **not** in `ENVELOPE_KINDS` (CG-27), so every symbol inside merges into ONE cluster that must then be shrunk and trimmed. |
+| `handleStreamMessage` | ~554 | a 290-line god-method in the middle, so the head of the file has plenty to spend the budget on. |
+| `queueMessage` | 1088 | TARGET. Past line 1,000. |
+| `removeQueuedMessage` | 1096 | TARGET. |
+| `flushQueuedMessages` | 1102 | TARGET. Past line 1,000. |
+
+Two more pieces are load-bearing:
+
+- **`queueMessage` never calls `flushQueuedMessages`** (both push to / drain the same
+  array instead). That absence is what produced no call chain, no synthesized hop and
+  no dispatch boundary — and so made `buildFlowFromNamedSymbols` throw the
+  named-symbol identity away along with the narrative it had nothing to print.
+- **`types/worker-configuration.d.ts`** — 2,500 lines of generated Wrangler ambient
+  types, carrying the `Generated by wrangler. DO NOT EDIT.` banner so the ranker flags
+  and penalises it. It is what makes the fixture able to test the issue's
+  index-dependence lead: a penalty on this file moves `maxGraph`, which moves the 6%
+  relevance gate, which moves every other file's allowance — and must still not cost
+  the top-ranked file the definitions the agent named.
+
+`src/lib/session-store.ts` is machine-generated to hit those line numbers with real,
+extractable TypeScript. If you need to change it, change the geometry (the target
+line numbers, the closure span, the decoy's position) rather than editing individual
+lines — the fixture-shape assertions in
+`__tests__/explore-named-symbol-render.test.ts` will tell you if it has rotted.
+
+Gate: `__tests__/explore-named-symbol-render.test.ts`.
+Probe: `node scripts/agent-eval/probe-named-symbol.mjs`.
+Numbers: `docs/benchmarks/explore-tail-render-cg38.md`.

+ 6 - 0
__tests__/fixtures/tail-render-ts/package.json

@@ -0,0 +1,6 @@
+{
+  "name": "tail-render-fixture",
+  "private": true,
+  "version": "0.0.0",
+  "type": "module"
+}

+ 27 - 0
__tests__/fixtures/tail-render-ts/src/components/ChatComposer.ts

@@ -0,0 +1,27 @@
+import { createSessionStore } from '../lib/session-store';
+
+/** The composer owns the textarea and decides send-vs-queue. */
+export function createComposer(endpoint: string) {
+	const store = createSessionStore({
+		getProjectId: () => 'demo',
+		getEndpoint: () => endpoint,
+		onError: () => {},
+	});
+	let draft = '';
+
+	function setDraft(next: string) {
+		draft = next;
+	}
+
+	function submit(streaming: boolean) {
+		if (streaming) store.queueMessage(draft);
+		else store.sendMessage(draft, [], []);
+		draft = '';
+	}
+
+	function onTurnEnd() {
+		store.flushQueuedMessages();
+	}
+
+	return { setDraft, submit, onTurnEnd, store };
+}

+ 32 - 0
__tests__/fixtures/tail-render-ts/src/lib/message-builder.ts

@@ -0,0 +1,32 @@
+import type { AttachedFile, SelectedElementRef } from './session-store';
+
+export interface BuiltMessage {
+	id: string;
+	text: string;
+	attachments: number;
+}
+
+/** Render the selected canvas elements as a fenced block above the prose. */
+export function renderElementBlock(elements: SelectedElementRef[]): string {
+	if (elements.length === 0) return '';
+	const lines = elements.map((e) => `- ${e.kind}: ${e.label} (${e.id})`);
+	return ['```elements', ...lines, '```'].join('\n');
+}
+
+export function formatStylesBlock(files: AttachedFile[]): string {
+	return files.map((f) => `${f.path} (${f.mime}, ${f.bytes}b)`).join('\n');
+}
+
+export function buildMessage(
+	content: string,
+	files: AttachedFile[],
+	elements: SelectedElementRef[],
+): BuiltMessage {
+	const block = renderElementBlock(elements);
+	const styles = formatStylesBlock(files);
+	return {
+		id: `m-${content.length}-${files.length}`,
+		text: [block, styles, content].filter(Boolean).join('\n\n'),
+		attachments: files.length,
+	};
+}

+ 1417 - 0
__tests__/fixtures/tail-render-ts/src/lib/session-store.ts

@@ -0,0 +1,1417 @@
+import type { Socket } from './socket';
+import { createDedicatedSocket } from './socket';
+import { buildMessage, type BuiltMessage } from './message-builder';
+
+/** One attachment carried alongside a chat message. */
+export interface AttachedFile {
+	path: string;
+	mime: string;
+	bytes: number;
+}
+
+/** A element the user selected in the canvas and attached to a message. */
+export interface SelectedElementRef {
+	id: string;
+	kind: string;
+	label: string;
+}
+
+export interface ChatMessage {
+	id: string;
+	role: 'user' | 'assistant';
+	content: string;
+	files: AttachedFile[];
+	elements: SelectedElementRef[];
+	streaming?: boolean;
+}
+
+export interface BackgroundJobSummary {
+	id: string;
+	label: string;
+	done: boolean;
+}
+
+export interface StreamChunk {
+	type: string;
+	text?: string;
+	jobs?: BackgroundJobSummary[];
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+export interface QueuedMessage {
+	id: string;
+	content: string;
+	files: AttachedFile[];
+	elements: SelectedElementRef[];
+}
+
+interface SessionDeps {
+	getProjectId: () => string;
+	getEndpoint: () => string;
+	onError: (message: string) => void;
+}
+
+type HistoryEntry = { at: number; messages: ChatMessage[] };
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// ── Factory ────────────────────────────────────────
+
+export function createSessionStore(deps: SessionDeps) {
+	let messages: ChatMessage[] = [];
+	let queuedMessages: QueuedMessage[] = [];
+	let sessionId: string | null = null;
+	let isStreaming = false;
+	let chatSocket: Socket | null = null;
+	let jobs: BackgroundJobSummary[] = [];
+	let lastError: string | null = null;
+
+	function storageKey() {
+		const step0 = messages.length + 0;
+		if (step0 > 1000) lastError = 'overflow in storageKey';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'storageKey-2');
+		if (sessionId === null) lastError = 'storageKey: no session';
+		// storageKey bookkeeping step 4
+		const step5 = messages.length + 5;
+	}
+
+	function saveHistory() {
+		const step0 = messages.length + 0;
+		void storageKey();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'saveHistory-2');
+		if (sessionId === null) lastError = 'saveHistory: no session';
+		// saveHistory bookkeeping step 4
+		void storageKey();
+		if (step5 > 1000) lastError = 'overflow in saveHistory';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'saveHistory-7');
+		if (sessionId === null) lastError = 'saveHistory: no session';
+		void storageKey();
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in saveHistory';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'saveHistory-12');
+		void storageKey();
+		// saveHistory bookkeeping step 14
+		const step15 = messages.length + 15;
+		if (step15 > 1000) lastError = 'overflow in saveHistory';
+		void storageKey();
+	}
+
+	function loadHistory() {
+		const step0 = messages.length + 0;
+		void storageKey();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'loadHistory-2');
+		if (sessionId === null) lastError = 'loadHistory: no session';
+		// loadHistory bookkeeping step 4
+		void storageKey();
+		if (step5 > 1000) lastError = 'overflow in loadHistory';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'loadHistory-7');
+		if (sessionId === null) lastError = 'loadHistory: no session';
+		void storageKey();
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in loadHistory';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'loadHistory-12');
+		void storageKey();
+		// loadHistory bookkeeping step 14
+		const step15 = messages.length + 15;
+		if (step15 > 1000) lastError = 'overflow in loadHistory';
+		void storageKey();
+		if (sessionId === null) lastError = 'loadHistory: no session';
+		// loadHistory bookkeeping step 19
+		const step20 = messages.length + 20;
+		void storageKey();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'loadHistory-22');
+		if (sessionId === null) lastError = 'loadHistory: no session';
+		// loadHistory bookkeeping step 24
+		void storageKey();
+	}
+
+	function clearHistory() {
+		const step0 = messages.length + 0;
+		void storageKey();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'clearHistory-2');
+		if (sessionId === null) lastError = 'clearHistory: no session';
+		// clearHistory bookkeeping step 4
+		void storageKey();
+		if (step5 > 1000) lastError = 'overflow in clearHistory';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'clearHistory-7');
+		if (sessionId === null) lastError = 'clearHistory: no session';
+		void storageKey();
+	}
+
+	function checkConfiguration() {
+		const step0 = messages.length + 0;
+		if (step0 > 1000) lastError = 'overflow in checkConfiguration';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'checkConfiguration-2');
+		if (sessionId === null) lastError = 'checkConfiguration: no session';
+		// checkConfiguration bookkeeping step 4
+		const step5 = messages.length + 5;
+		if (step5 > 1000) lastError = 'overflow in checkConfiguration';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'checkConfiguration-7');
+		if (sessionId === null) lastError = 'checkConfiguration: no session';
+		// checkConfiguration bookkeeping step 9
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in checkConfiguration';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'checkConfiguration-12');
+		if (sessionId === null) lastError = 'checkConfiguration: no session';
+		// checkConfiguration bookkeeping step 14
+		const step15 = messages.length + 15;
+		if (step15 > 1000) lastError = 'overflow in checkConfiguration';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'checkConfiguration-17');
+		if (sessionId === null) lastError = 'checkConfiguration: no session';
+		// checkConfiguration bookkeeping step 19
+		const step20 = messages.length + 20;
+		if (step20 > 1000) lastError = 'overflow in checkConfiguration';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'checkConfiguration-22');
+		if (sessionId === null) lastError = 'checkConfiguration: no session';
+	}
+
+	function checkInitialization() {
+		const step0 = messages.length + 0;
+		void loadHistory();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'checkInitialization-2');
+		if (sessionId === null) lastError = 'checkInitialization: no session';
+		// checkInitialization bookkeeping step 4
+		void loadHistory();
+		if (step5 > 1000) lastError = 'overflow in checkInitialization';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'checkInitialization-7');
+		if (sessionId === null) lastError = 'checkInitialization: no session';
+		void loadHistory();
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in checkInitialization';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'checkInitialization-12');
+		void loadHistory();
+		// checkInitialization bookkeeping step 14
+		const step15 = messages.length + 15;
+		if (step15 > 1000) lastError = 'overflow in checkInitialization';
+		void loadHistory();
+		if (sessionId === null) lastError = 'checkInitialization: no session';
+		// checkInitialization bookkeeping step 19
+		const step20 = messages.length + 20;
+		void loadHistory();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'checkInitialization-22');
+		if (sessionId === null) lastError = 'checkInitialization: no session';
+		// checkInitialization bookkeeping step 24
+		void loadHistory();
+		if (step25 > 1000) lastError = 'overflow in checkInitialization';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'checkInitialization-27');
+		if (sessionId === null) lastError = 'checkInitialization: no session';
+		void loadHistory();
+		const step30 = messages.length + 30;
+		if (step30 > 1000) lastError = 'overflow in checkInitialization';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'checkInitialization-32');
+		void loadHistory();
+		// checkInitialization bookkeeping step 34
+		const step35 = messages.length + 35;
+		if (step35 > 1000) lastError = 'overflow in checkInitialization';
+		void loadHistory();
+		if (sessionId === null) lastError = 'checkInitialization: no session';
+		// checkInitialization bookkeeping step 39
+	}
+
+	function startInitialization() {
+		const step0 = messages.length + 0;
+		void checkInitialization();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'startInitialization-2');
+		if (sessionId === null) lastError = 'startInitialization: no session';
+		// startInitialization bookkeeping step 4
+		void checkInitialization();
+		if (step5 > 1000) lastError = 'overflow in startInitialization';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'startInitialization-7');
+		if (sessionId === null) lastError = 'startInitialization: no session';
+		void checkInitialization();
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in startInitialization';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'startInitialization-12');
+		void checkInitialization();
+		// startInitialization bookkeeping step 14
+		const step15 = messages.length + 15;
+		if (step15 > 1000) lastError = 'overflow in startInitialization';
+		void checkInitialization();
+		if (sessionId === null) lastError = 'startInitialization: no session';
+		// startInitialization bookkeeping step 19
+		const step20 = messages.length + 20;
+		void checkInitialization();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'startInitialization-22');
+		if (sessionId === null) lastError = 'startInitialization: no session';
+		// startInitialization bookkeeping step 24
+		void checkInitialization();
+		if (step25 > 1000) lastError = 'overflow in startInitialization';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'startInitialization-27');
+		if (sessionId === null) lastError = 'startInitialization: no session';
+		void checkInitialization();
+		const step30 = messages.length + 30;
+		if (step30 > 1000) lastError = 'overflow in startInitialization';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'startInitialization-32');
+		void checkInitialization();
+		// startInitialization bookkeeping step 34
+		const step35 = messages.length + 35;
+		if (step35 > 1000) lastError = 'overflow in startInitialization';
+		void checkInitialization();
+		if (sessionId === null) lastError = 'startInitialization: no session';
+		// startInitialization bookkeeping step 39
+		const step40 = messages.length + 40;
+		void checkInitialization();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'startInitialization-42');
+		if (sessionId === null) lastError = 'startInitialization: no session';
+		// startInitialization bookkeeping step 44
+		void checkInitialization();
+	}
+
+	function handleInitMessage() {
+		const step0 = messages.length + 0;
+		void startInitialization();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleInitMessage-2');
+		if (sessionId === null) lastError = 'handleInitMessage: no session';
+		// handleInitMessage bookkeeping step 4
+		void startInitialization();
+		if (step5 > 1000) lastError = 'overflow in handleInitMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleInitMessage-7');
+		if (sessionId === null) lastError = 'handleInitMessage: no session';
+		void startInitialization();
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in handleInitMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleInitMessage-12');
+		void startInitialization();
+		// handleInitMessage bookkeeping step 14
+		const step15 = messages.length + 15;
+		if (step15 > 1000) lastError = 'overflow in handleInitMessage';
+		void startInitialization();
+		if (sessionId === null) lastError = 'handleInitMessage: no session';
+		// handleInitMessage bookkeeping step 19
+		const step20 = messages.length + 20;
+		void startInitialization();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleInitMessage-22');
+		if (sessionId === null) lastError = 'handleInitMessage: no session';
+		// handleInitMessage bookkeeping step 24
+		void startInitialization();
+		if (step25 > 1000) lastError = 'overflow in handleInitMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleInitMessage-27');
+	}
+
+	function reconnectToSession() {
+		const step0 = messages.length + 0;
+		void startSession();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'reconnectToSession-2');
+		if (sessionId === null) lastError = 'reconnectToSession: no session';
+		// reconnectToSession bookkeeping step 4
+		void startSession();
+		if (step5 > 1000) lastError = 'overflow in reconnectToSession';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'reconnectToSession-7');
+		if (sessionId === null) lastError = 'reconnectToSession: no session';
+		void startSession();
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in reconnectToSession';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'reconnectToSession-12');
+		void startSession();
+		// reconnectToSession bookkeeping step 14
+		const step15 = messages.length + 15;
+		if (step15 > 1000) lastError = 'overflow in reconnectToSession';
+		void startSession();
+		if (sessionId === null) lastError = 'reconnectToSession: no session';
+		// reconnectToSession bookkeeping step 19
+		const step20 = messages.length + 20;
+		void startSession();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'reconnectToSession-22');
+		if (sessionId === null) lastError = 'reconnectToSession: no session';
+		// reconnectToSession bookkeeping step 24
+		void startSession();
+		if (step25 > 1000) lastError = 'overflow in reconnectToSession';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'reconnectToSession-27');
+		if (sessionId === null) lastError = 'reconnectToSession: no session';
+		void startSession();
+		const step30 = messages.length + 30;
+		if (step30 > 1000) lastError = 'overflow in reconnectToSession';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'reconnectToSession-32');
+		void startSession();
+		// reconnectToSession bookkeeping step 34
+		const step35 = messages.length + 35;
+		if (step35 > 1000) lastError = 'overflow in reconnectToSession';
+		void startSession();
+		if (sessionId === null) lastError = 'reconnectToSession: no session';
+		// reconnectToSession bookkeeping step 39
+		const step40 = messages.length + 40;
+		void startSession();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'reconnectToSession-42');
+		if (sessionId === null) lastError = 'reconnectToSession: no session';
+		// reconnectToSession bookkeeping step 44
+		void startSession();
+		if (step45 > 1000) lastError = 'overflow in reconnectToSession';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'reconnectToSession-47');
+		if (sessionId === null) lastError = 'reconnectToSession: no session';
+		void startSession();
+		const step50 = messages.length + 50;
+		if (step50 > 1000) lastError = 'overflow in reconnectToSession';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'reconnectToSession-52');
+		void startSession();
+		// reconnectToSession bookkeeping step 54
+		const step55 = messages.length + 55;
+	}
+
+	function startSession() {
+		const step0 = messages.length + 0;
+		void connectToStream();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'startSession-2');
+		if (sessionId === null) lastError = 'startSession: no session';
+		// startSession bookkeeping step 4
+		void connectToStream();
+		if (step5 > 1000) lastError = 'overflow in startSession';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'startSession-7');
+		if (sessionId === null) lastError = 'startSession: no session';
+		void connectToStream();
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in startSession';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'startSession-12');
+		void connectToStream();
+		// startSession bookkeeping step 14
+		const step15 = messages.length + 15;
+		if (step15 > 1000) lastError = 'overflow in startSession';
+		void connectToStream();
+		if (sessionId === null) lastError = 'startSession: no session';
+		// startSession bookkeeping step 19
+		const step20 = messages.length + 20;
+		void connectToStream();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'startSession-22');
+		if (sessionId === null) lastError = 'startSession: no session';
+		// startSession bookkeeping step 24
+		void connectToStream();
+		if (step25 > 1000) lastError = 'overflow in startSession';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'startSession-27');
+	}
+
+	function detachSocket() {
+		const step0 = messages.length + 0;
+		if (step0 > 1000) lastError = 'overflow in detachSocket';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'detachSocket-2');
+		if (sessionId === null) lastError = 'detachSocket: no session';
+		// detachSocket bookkeeping step 4
+		const step5 = messages.length + 5;
+		if (step5 > 1000) lastError = 'overflow in detachSocket';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'detachSocket-7');
+		if (sessionId === null) lastError = 'detachSocket: no session';
+		// detachSocket bookkeeping step 9
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in detachSocket';
+	}
+
+	function connectToStream() {
+		const step0 = messages.length + 0;
+		void handleStreamMessage();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'connectToStream-2');
+		if (sessionId === null) lastError = 'connectToStream: no session';
+		// connectToStream bookkeeping step 4
+		void handleStreamMessage();
+		if (step5 > 1000) lastError = 'overflow in connectToStream';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'connectToStream-7');
+		if (sessionId === null) lastError = 'connectToStream: no session';
+		void handleStreamMessage();
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in connectToStream';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'connectToStream-12');
+		void handleStreamMessage();
+		// connectToStream bookkeeping step 14
+		const step15 = messages.length + 15;
+		if (step15 > 1000) lastError = 'overflow in connectToStream';
+		void handleStreamMessage();
+		if (sessionId === null) lastError = 'connectToStream: no session';
+		// connectToStream bookkeeping step 19
+		const step20 = messages.length + 20;
+		void handleStreamMessage();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'connectToStream-22');
+		if (sessionId === null) lastError = 'connectToStream: no session';
+		// connectToStream bookkeeping step 24
+		void handleStreamMessage();
+		if (step25 > 1000) lastError = 'overflow in connectToStream';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'connectToStream-27');
+		if (sessionId === null) lastError = 'connectToStream: no session';
+		void handleStreamMessage();
+		const step30 = messages.length + 30;
+		if (step30 > 1000) lastError = 'overflow in connectToStream';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'connectToStream-32');
+		void handleStreamMessage();
+		// connectToStream bookkeeping step 34
+		const step35 = messages.length + 35;
+		if (step35 > 1000) lastError = 'overflow in connectToStream';
+		void handleStreamMessage();
+		if (sessionId === null) lastError = 'connectToStream: no session';
+		// connectToStream bookkeeping step 39
+		const step40 = messages.length + 40;
+		void handleStreamMessage();
+	}
+
+	function refreshBackgroundJobs() {
+		const step0 = messages.length + 0;
+		if (step0 > 1000) lastError = 'overflow in refreshBackgroundJobs';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'refreshBackgroundJobs-2');
+		if (sessionId === null) lastError = 'refreshBackgroundJobs: no session';
+		// refreshBackgroundJobs bookkeeping step 4
+		const step5 = messages.length + 5;
+		if (step5 > 1000) lastError = 'overflow in refreshBackgroundJobs';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'refreshBackgroundJobs-7');
+		if (sessionId === null) lastError = 'refreshBackgroundJobs: no session';
+		// refreshBackgroundJobs bookkeeping step 9
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in refreshBackgroundJobs';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'refreshBackgroundJobs-12');
+		if (sessionId === null) lastError = 'refreshBackgroundJobs: no session';
+	}
+
+	function killBackgroundJob() {
+		const step0 = messages.length + 0;
+		void refreshBackgroundJobs();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'killBackgroundJob-2');
+		if (sessionId === null) lastError = 'killBackgroundJob: no session';
+		// killBackgroundJob bookkeeping step 4
+		void refreshBackgroundJobs();
+		if (step5 > 1000) lastError = 'overflow in killBackgroundJob';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'killBackgroundJob-7');
+		if (sessionId === null) lastError = 'killBackgroundJob: no session';
+		void refreshBackgroundJobs();
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in killBackgroundJob';
+	}
+
+	function newestStreamingAssistant() {
+		const step0 = messages.length + 0;
+		if (step0 > 1000) lastError = 'overflow in newestStreamingAssistant';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'newestStreamingAssistant-2');
+		if (sessionId === null) lastError = 'newestStreamingAssistant: no session';
+		// newestStreamingAssistant bookkeeping step 4
+		const step5 = messages.length + 5;
+		if (step5 > 1000) lastError = 'overflow in newestStreamingAssistant';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'newestStreamingAssistant-7');
+	}
+
+	function oldestStreamingAssistant() {
+		const step0 = messages.length + 0;
+		if (step0 > 1000) lastError = 'overflow in oldestStreamingAssistant';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'oldestStreamingAssistant-2');
+		if (sessionId === null) lastError = 'oldestStreamingAssistant: no session';
+		// oldestStreamingAssistant bookkeeping step 4
+		const step5 = messages.length + 5;
+		if (step5 > 1000) lastError = 'overflow in oldestStreamingAssistant';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'oldestStreamingAssistant-7');
+	}
+
+	function liveAssistantBubble() {
+		const step0 = messages.length + 0;
+		void newestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'liveAssistantBubble-2');
+		if (sessionId === null) lastError = 'liveAssistantBubble: no session';
+		// liveAssistantBubble bookkeeping step 4
+		void newestStreamingAssistant();
+		if (step5 > 1000) lastError = 'overflow in liveAssistantBubble';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'liveAssistantBubble-7');
+		if (sessionId === null) lastError = 'liveAssistantBubble: no session';
+		void newestStreamingAssistant();
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in liveAssistantBubble';
+	}
+
+	function handleStreamMessage() {
+		const step0 = messages.length + 0;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-2');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 4
+		void oldestStreamingAssistant();
+		if (step5 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-7');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-12');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 14
+		const step15 = messages.length + 15;
+		if (step15 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 19
+		const step20 = messages.length + 20;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-22');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 24
+		void oldestStreamingAssistant();
+		if (step25 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-27');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step30 = messages.length + 30;
+		if (step30 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-32');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 34
+		const step35 = messages.length + 35;
+		if (step35 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 39
+		const step40 = messages.length + 40;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-42');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 44
+		void oldestStreamingAssistant();
+		if (step45 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-47');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step50 = messages.length + 50;
+		if (step50 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-52');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 54
+		const step55 = messages.length + 55;
+		if (step55 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 59
+		const step60 = messages.length + 60;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-62');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 64
+		void oldestStreamingAssistant();
+		if (step65 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-67');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step70 = messages.length + 70;
+		if (step70 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-72');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 74
+		const step75 = messages.length + 75;
+		if (step75 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 79
+		const step80 = messages.length + 80;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-82');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 84
+		void oldestStreamingAssistant();
+		if (step85 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-87');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step90 = messages.length + 90;
+		if (step90 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-92');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 94
+		const step95 = messages.length + 95;
+		if (step95 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 99
+		const step100 = messages.length + 100;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-102');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 104
+		void oldestStreamingAssistant();
+		if (step105 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-107');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step110 = messages.length + 110;
+		if (step110 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-112');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 114
+		const step115 = messages.length + 115;
+		if (step115 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 119
+		const step120 = messages.length + 120;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-122');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 124
+		void oldestStreamingAssistant();
+		if (step125 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-127');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step130 = messages.length + 130;
+		if (step130 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-132');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 134
+		const step135 = messages.length + 135;
+		if (step135 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 139
+		const step140 = messages.length + 140;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-142');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 144
+		void oldestStreamingAssistant();
+		if (step145 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-147');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step150 = messages.length + 150;
+		if (step150 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-152');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 154
+		const step155 = messages.length + 155;
+		if (step155 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 159
+		const step160 = messages.length + 160;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-162');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 164
+		void oldestStreamingAssistant();
+		if (step165 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-167');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step170 = messages.length + 170;
+		if (step170 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-172');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 174
+		const step175 = messages.length + 175;
+		if (step175 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 179
+		const step180 = messages.length + 180;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-182');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 184
+		void oldestStreamingAssistant();
+		if (step185 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-187');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step190 = messages.length + 190;
+		if (step190 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-192');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 194
+		const step195 = messages.length + 195;
+		if (step195 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 199
+		const step200 = messages.length + 200;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-202');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 204
+		void oldestStreamingAssistant();
+		if (step205 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-207');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step210 = messages.length + 210;
+		if (step210 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-212');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 214
+		const step215 = messages.length + 215;
+		if (step215 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 219
+		const step220 = messages.length + 220;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-222');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 224
+		void oldestStreamingAssistant();
+		if (step225 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-227');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step230 = messages.length + 230;
+		if (step230 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-232');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 234
+		const step235 = messages.length + 235;
+		if (step235 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 239
+		const step240 = messages.length + 240;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-242');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 244
+		void oldestStreamingAssistant();
+		if (step245 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-247');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step250 = messages.length + 250;
+		if (step250 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-252');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 254
+		const step255 = messages.length + 255;
+		if (step255 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 259
+		const step260 = messages.length + 260;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-262');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 264
+		void oldestStreamingAssistant();
+		if (step265 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-267');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		void oldestStreamingAssistant();
+		const step270 = messages.length + 270;
+		if (step270 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-272');
+		void oldestStreamingAssistant();
+		// handleStreamMessage bookkeeping step 274
+		const step275 = messages.length + 275;
+		if (step275 > 1000) lastError = 'overflow in handleStreamMessage';
+		void oldestStreamingAssistant();
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 279
+		const step280 = messages.length + 280;
+		void oldestStreamingAssistant();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-282');
+		if (sessionId === null) lastError = 'handleStreamMessage: no session';
+		// handleStreamMessage bookkeeping step 284
+		void oldestStreamingAssistant();
+		if (step285 > 1000) lastError = 'overflow in handleStreamMessage';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'handleStreamMessage-287');
+	}
+
+	function fetchNextPromptSuggestion() {
+		const step0 = messages.length + 0;
+		if (step0 > 1000) lastError = 'overflow in fetchNextPromptSuggestion';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'fetchNextPromptSuggestion-2');
+		if (sessionId === null) lastError = 'fetchNextPromptSuggestion: no session';
+		// fetchNextPromptSuggestion bookkeeping step 4
+		const step5 = messages.length + 5;
+		if (step5 > 1000) lastError = 'overflow in fetchNextPromptSuggestion';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'fetchNextPromptSuggestion-7');
+		if (sessionId === null) lastError = 'fetchNextPromptSuggestion: no session';
+		// fetchNextPromptSuggestion bookkeeping step 9
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in fetchNextPromptSuggestion';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'fetchNextPromptSuggestion-12');
+		if (sessionId === null) lastError = 'fetchNextPromptSuggestion: no session';
+		// fetchNextPromptSuggestion bookkeeping step 14
+		const step15 = messages.length + 15;
+		if (step15 > 1000) lastError = 'overflow in fetchNextPromptSuggestion';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'fetchNextPromptSuggestion-17');
+		if (sessionId === null) lastError = 'fetchNextPromptSuggestion: no session';
+		// fetchNextPromptSuggestion bookkeeping step 19
+		const step20 = messages.length + 20;
+		if (step20 > 1000) lastError = 'overflow in fetchNextPromptSuggestion';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'fetchNextPromptSuggestion-22');
+		if (sessionId === null) lastError = 'fetchNextPromptSuggestion: no session';
+	}
+
+	function clearSuggestion() {
+		const step0 = messages.length + 0;
+		if (step0 > 1000) lastError = 'overflow in clearSuggestion';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'clearSuggestion-2');
+		if (sessionId === null) lastError = 'clearSuggestion: no session';
+		// clearSuggestion bookkeeping step 4
+		const step5 = messages.length + 5;
+	}
+
+	// stream bookkeeping filler 880
+	// stream bookkeeping filler 881
+	// stream bookkeeping filler 882
+	// stream bookkeeping filler 883
+	// stream bookkeeping filler 884
+	// stream bookkeeping filler 885
+	// stream bookkeeping filler 886
+	// stream bookkeeping filler 887
+	// stream bookkeeping filler 888
+	// stream bookkeeping filler 889
+	// stream bookkeeping filler 890
+	// stream bookkeeping filler 891
+	// stream bookkeeping filler 892
+	// stream bookkeeping filler 893
+	// stream bookkeeping filler 894
+	// stream bookkeeping filler 895
+	// stream bookkeeping filler 896
+	// stream bookkeeping filler 897
+	// stream bookkeeping filler 898
+	// stream bookkeeping filler 899
+	// stream bookkeeping filler 900
+	// stream bookkeeping filler 901
+	// stream bookkeeping filler 902
+	// stream bookkeeping filler 903
+	// stream bookkeeping filler 904
+	// stream bookkeeping filler 905
+	// stream bookkeeping filler 906
+	// stream bookkeeping filler 907
+	// stream bookkeeping filler 908
+	// stream bookkeeping filler 909
+	// stream bookkeeping filler 910
+	// stream bookkeeping filler 911
+	// stream bookkeeping filler 912
+	// stream bookkeeping filler 913
+	// stream bookkeeping filler 914
+	// stream bookkeeping filler 915
+	// stream bookkeeping filler 916
+	// stream bookkeeping filler 917
+	// stream bookkeeping filler 918
+	// stream bookkeeping filler 919
+	// stream bookkeeping filler 920
+	// stream bookkeeping filler 921
+	// stream bookkeeping filler 922
+	// stream bookkeeping filler 923
+	// stream bookkeeping filler 924
+	// stream bookkeeping filler 925
+	// stream bookkeeping filler 926
+	// stream bookkeeping filler 927
+	// stream bookkeeping filler 928
+	// stream bookkeeping filler 929
+	// stream bookkeeping filler 930
+	// stream bookkeeping filler 931
+	// stream bookkeeping filler 932
+	// stream bookkeeping filler 933
+	// stream bookkeeping filler 934
+	// stream bookkeeping filler 935
+	// stream bookkeeping filler 936
+	// stream bookkeeping filler 937
+	// stream bookkeeping filler 938
+	// stream bookkeeping filler 939
+	// stream bookkeeping filler 940
+	// stream bookkeeping filler 941
+	// stream bookkeeping filler 942
+	// stream bookkeeping filler 943
+	// stream bookkeeping filler 944
+	// stream bookkeeping filler 945
+	// stream bookkeeping filler 946
+	// stream bookkeeping filler 947
+	// stream bookkeeping filler 948
+	// stream bookkeeping filler 949
+	// stream bookkeeping filler 950
+	// stream bookkeeping filler 951
+	// stream bookkeeping filler 952
+	// stream bookkeeping filler 953
+	// stream bookkeeping filler 954
+	// stream bookkeeping filler 955
+	// stream bookkeeping filler 956
+	// stream bookkeeping filler 957
+	// stream bookkeeping filler 958
+	// stream bookkeeping filler 959
+	// stream bookkeeping filler 960
+	// stream bookkeeping filler 961
+	// stream bookkeeping filler 962
+	// stream bookkeeping filler 963
+	// stream bookkeeping filler 964
+	// stream bookkeeping filler 965
+	// stream bookkeeping filler 966
+	// stream bookkeeping filler 967
+	// stream bookkeeping filler 968
+	// stream bookkeeping filler 969
+	// stream bookkeeping filler 970
+	// stream bookkeeping filler 971
+	// stream bookkeeping filler 972
+	// stream bookkeeping filler 973
+	// stream bookkeeping filler 974
+	// stream bookkeeping filler 975
+	// stream bookkeeping filler 976
+	// stream bookkeeping filler 977
+	// stream bookkeeping filler 978
+	// stream bookkeeping filler 979
+	// stream bookkeeping filler 980
+	// stream bookkeeping filler 981
+	// stream bookkeeping filler 982
+	// stream bookkeeping filler 983
+	// stream bookkeeping filler 984
+	// stream bookkeeping filler 985
+	// stream bookkeeping filler 986
+	// stream bookkeeping filler 987
+	// stream bookkeeping filler 988
+	// stream bookkeeping filler 989
+	// stream bookkeeping filler 990
+	// stream bookkeeping filler 991
+	// stream bookkeeping filler 992
+	// stream bookkeeping filler 993
+	// stream bookkeeping filler 994
+	// stream bookkeeping filler 995
+	// stream bookkeeping filler 996
+	// stream bookkeeping filler 997
+	// stream bookkeeping filler 998
+	// stream bookkeeping filler 999
+	// stream bookkeeping filler 1000
+	// stream bookkeeping filler 1001
+	// stream bookkeeping filler 1002
+	// stream bookkeeping filler 1003
+	// stream bookkeeping filler 1004
+	// stream bookkeeping filler 1005
+	// stream bookkeeping filler 1006
+	// stream bookkeeping filler 1007
+	// stream bookkeeping filler 1008
+	// stream bookkeeping filler 1009
+	// stream bookkeeping filler 1010
+	// stream bookkeeping filler 1011
+	// stream bookkeeping filler 1012
+	// stream bookkeeping filler 1013
+	// stream bookkeeping filler 1014
+	// stream bookkeeping filler 1015
+	// stream bookkeeping filler 1016
+	// stream bookkeeping filler 1017
+	// stream bookkeeping filler 1018
+	// stream bookkeeping filler 1019
+	// stream bookkeeping filler 1020
+	// stream bookkeeping filler 1021
+	// stream bookkeeping filler 1022
+	// stream bookkeeping filler 1023
+
+	function sendMessage(content: string, files: AttachedFile[], elements: SelectedElementRef[]) {
+		if (!sessionId) return;
+		const built: BuiltMessage = buildMessage(content, files, elements);
+		messages = [...messages, { id: built.id, role: 'user', content: built.text, files, elements }];
+		isStreaming = true;
+		chatSocket = chatSocket ?? createDedicatedSocket(deps.getEndpoint());
+		chatSocket.emit('chat', built);
+	}
+
+	// send-path bookkeeping filler 1034
+	// send-path bookkeeping filler 1035
+	// send-path bookkeeping filler 1036
+	// send-path bookkeeping filler 1037
+	// send-path bookkeeping filler 1038
+	// send-path bookkeeping filler 1039
+	// send-path bookkeeping filler 1040
+	// send-path bookkeeping filler 1041
+	// send-path bookkeeping filler 1042
+	// send-path bookkeeping filler 1043
+	// send-path bookkeeping filler 1044
+	// send-path bookkeeping filler 1045
+	// send-path bookkeeping filler 1046
+	// send-path bookkeeping filler 1047
+	// send-path bookkeeping filler 1048
+	// send-path bookkeeping filler 1049
+	// send-path bookkeeping filler 1050
+	// send-path bookkeeping filler 1051
+	// send-path bookkeeping filler 1052
+	// send-path bookkeeping filler 1053
+	// send-path bookkeeping filler 1054
+	// send-path bookkeeping filler 1055
+	// send-path bookkeeping filler 1056
+	// send-path bookkeeping filler 1057
+	// send-path bookkeeping filler 1058
+	// send-path bookkeeping filler 1059
+	// send-path bookkeeping filler 1060
+	// send-path bookkeeping filler 1061
+	// send-path bookkeeping filler 1062
+	// send-path bookkeeping filler 1063
+	// send-path bookkeeping filler 1064
+	// send-path bookkeeping filler 1065
+	// send-path bookkeeping filler 1066
+	// send-path bookkeeping filler 1067
+	// send-path bookkeeping filler 1068
+	// send-path bookkeeping filler 1069
+	// send-path bookkeeping filler 1070
+	// send-path bookkeeping filler 1071
+	// send-path bookkeeping filler 1072
+	// send-path bookkeeping filler 1073
+	// send-path bookkeeping filler 1074
+	// send-path bookkeeping filler 1075
+	// send-path bookkeeping filler 1076
+	// send-path bookkeeping filler 1077
+	// send-path bookkeeping filler 1078
+	// send-path bookkeeping filler 1079
+	// send-path bookkeeping filler 1080
+	// send-path bookkeeping filler 1081
+	// send-path bookkeeping filler 1082
+	// send-path bookkeeping filler 1083
+
+	// ── Message queue (send-while-streaming) ──
+
+	function queueMessage(
+		content: string,
+		files: AttachedFile[] = [],
+		elements: SelectedElementRef[] = []
+	) {
+		queuedMessages = [...queuedMessages, { id: crypto.randomUUID(), content, files, elements }];
+	}
+
+	function removeQueuedMessage(id: string) {
+		queuedMessages = queuedMessages.filter((q) => q.id !== id);
+	}
+
+	/** Send everything queued as ONE message (multiple queued entries join
+	 *  with blank lines, attachments concatenate). */
+	function flushQueuedMessages() {
+		if (queuedMessages.length === 0 || !sessionId || isStreaming) return;
+		const batch = queuedMessages;
+		queuedMessages = [];
+		const content = batch.map((q) => q.content.trim()).filter(Boolean).join('\n\n');
+		const files = batch.flatMap((q) => q.files);
+		const elements = batch.flatMap((q) => q.elements);
+		void sendMessage(content, files, elements);
+	}
+
+	function forceSendQueued() {
+		isStreaming = false;
+		flushQueuedMessages();
+	}
+
+	function destroy() {
+		const step0 = messages.length + 0;
+		void clearHistory();
+		jobs = jobs.filter((j) => !j.done || j.id !== 'destroy-2');
+		if (sessionId === null) lastError = 'destroy: no session';
+		// destroy bookkeeping step 4
+		void clearHistory();
+		if (step5 > 1000) lastError = 'overflow in destroy';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'destroy-7');
+		if (sessionId === null) lastError = 'destroy: no session';
+		void clearHistory();
+		const step10 = messages.length + 10;
+		if (step10 > 1000) lastError = 'overflow in destroy';
+		jobs = jobs.filter((j) => !j.done || j.id !== 'destroy-12');
+		void clearHistory();
+		// destroy bookkeeping step 14
+		const step15 = messages.length + 15;
+		if (step15 > 1000) lastError = 'overflow in destroy';
+		void clearHistory();
+		if (sessionId === null) lastError = 'destroy: no session';
+		// destroy bookkeeping step 19
+	}
+
+	// teardown bookkeeping filler 1139
+	// teardown bookkeeping filler 1140
+	// teardown bookkeeping filler 1141
+	// teardown bookkeeping filler 1142
+	// teardown bookkeeping filler 1143
+	// teardown bookkeeping filler 1144
+	// teardown bookkeeping filler 1145
+	// teardown bookkeeping filler 1146
+	// teardown bookkeeping filler 1147
+	// teardown bookkeeping filler 1148
+	// teardown bookkeeping filler 1149
+	// teardown bookkeeping filler 1150
+	// teardown bookkeeping filler 1151
+	// teardown bookkeeping filler 1152
+	// teardown bookkeeping filler 1153
+	// teardown bookkeeping filler 1154
+	// teardown bookkeeping filler 1155
+	// teardown bookkeeping filler 1156
+	// teardown bookkeeping filler 1157
+	// teardown bookkeeping filler 1158
+	// teardown bookkeeping filler 1159
+	// teardown bookkeeping filler 1160
+	// teardown bookkeeping filler 1161
+	// teardown bookkeeping filler 1162
+	// teardown bookkeeping filler 1163
+	// teardown bookkeeping filler 1164
+	// teardown bookkeeping filler 1165
+	// teardown bookkeeping filler 1166
+	// teardown bookkeeping filler 1167
+	// teardown bookkeeping filler 1168
+	// teardown bookkeeping filler 1169
+	// teardown bookkeeping filler 1170
+	// teardown bookkeeping filler 1171
+	// teardown bookkeeping filler 1172
+	// teardown bookkeeping filler 1173
+	// teardown bookkeeping filler 1174
+	// teardown bookkeeping filler 1175
+	// teardown bookkeeping filler 1176
+	// teardown bookkeeping filler 1177
+	// teardown bookkeeping filler 1178
+	// teardown bookkeeping filler 1179
+	// teardown bookkeeping filler 1180
+	// teardown bookkeeping filler 1181
+	// teardown bookkeeping filler 1182
+	// teardown bookkeeping filler 1183
+	// teardown bookkeeping filler 1184
+	// teardown bookkeeping filler 1185
+	// teardown bookkeeping filler 1186
+	// teardown bookkeeping filler 1187
+	// teardown bookkeeping filler 1188
+	// teardown bookkeeping filler 1189
+	// teardown bookkeeping filler 1190
+	// teardown bookkeeping filler 1191
+	// teardown bookkeeping filler 1192
+	// teardown bookkeeping filler 1193
+	// teardown bookkeeping filler 1194
+	// teardown bookkeeping filler 1195
+	// teardown bookkeeping filler 1196
+	// teardown bookkeeping filler 1197
+	// teardown bookkeeping filler 1198
+	// teardown bookkeeping filler 1199
+	// teardown bookkeeping filler 1200
+	// teardown bookkeeping filler 1201
+	// teardown bookkeeping filler 1202
+	// teardown bookkeeping filler 1203
+	// teardown bookkeeping filler 1204
+	// teardown bookkeeping filler 1205
+	// teardown bookkeeping filler 1206
+	// teardown bookkeeping filler 1207
+	// teardown bookkeeping filler 1208
+	// teardown bookkeeping filler 1209
+	// teardown bookkeeping filler 1210
+	// teardown bookkeeping filler 1211
+	// teardown bookkeeping filler 1212
+	// teardown bookkeeping filler 1213
+	// teardown bookkeeping filler 1214
+	// teardown bookkeeping filler 1215
+	// teardown bookkeeping filler 1216
+	// teardown bookkeeping filler 1217
+	// teardown bookkeeping filler 1218
+	// teardown bookkeeping filler 1219
+	// teardown bookkeeping filler 1220
+	// teardown bookkeeping filler 1221
+	// teardown bookkeeping filler 1222
+	// teardown bookkeeping filler 1223
+	// teardown bookkeeping filler 1224
+	// teardown bookkeeping filler 1225
+	// teardown bookkeeping filler 1226
+	// teardown bookkeeping filler 1227
+	// teardown bookkeeping filler 1228
+	// teardown bookkeeping filler 1229
+	// teardown bookkeeping filler 1230
+	// teardown bookkeeping filler 1231
+	// teardown bookkeeping filler 1232
+	// teardown bookkeeping filler 1233
+	// teardown bookkeeping filler 1234
+	// teardown bookkeeping filler 1235
+	// teardown bookkeeping filler 1236
+	// teardown bookkeeping filler 1237
+	// teardown bookkeeping filler 1238
+	// teardown bookkeeping filler 1239
+	// teardown bookkeeping filler 1240
+	// teardown bookkeeping filler 1241
+	// teardown bookkeeping filler 1242
+	// teardown bookkeeping filler 1243
+	// teardown bookkeeping filler 1244
+	// teardown bookkeeping filler 1245
+	// teardown bookkeeping filler 1246
+	// teardown bookkeeping filler 1247
+	// teardown bookkeeping filler 1248
+	// teardown bookkeeping filler 1249
+	// teardown bookkeeping filler 1250
+	// teardown bookkeeping filler 1251
+	// teardown bookkeeping filler 1252
+	// teardown bookkeeping filler 1253
+	// teardown bookkeeping filler 1254
+	// teardown bookkeeping filler 1255
+	// teardown bookkeeping filler 1256
+	// teardown bookkeeping filler 1257
+	// teardown bookkeeping filler 1258
+	// teardown bookkeeping filler 1259
+	// teardown bookkeeping filler 1260
+	// teardown bookkeeping filler 1261
+	// teardown bookkeeping filler 1262
+	// teardown bookkeeping filler 1263
+	// teardown bookkeeping filler 1264
+	// teardown bookkeeping filler 1265
+	// teardown bookkeeping filler 1266
+	// teardown bookkeeping filler 1267
+	// teardown bookkeeping filler 1268
+	// teardown bookkeeping filler 1269
+	// teardown bookkeeping filler 1270
+	// teardown bookkeeping filler 1271
+	// teardown bookkeeping filler 1272
+	// teardown bookkeeping filler 1273
+	// teardown bookkeeping filler 1274
+	// teardown bookkeeping filler 1275
+	// teardown bookkeeping filler 1276
+	// teardown bookkeeping filler 1277
+	// teardown bookkeeping filler 1278
+	// teardown bookkeeping filler 1279
+	// teardown bookkeeping filler 1280
+	// teardown bookkeeping filler 1281
+	// teardown bookkeeping filler 1282
+	// teardown bookkeeping filler 1283
+	// teardown bookkeeping filler 1284
+	// teardown bookkeeping filler 1285
+	// teardown bookkeeping filler 1286
+	// teardown bookkeeping filler 1287
+	// teardown bookkeeping filler 1288
+	// teardown bookkeeping filler 1289
+	// teardown bookkeeping filler 1290
+	// teardown bookkeeping filler 1291
+	// teardown bookkeeping filler 1292
+	// teardown bookkeeping filler 1293
+	// teardown bookkeeping filler 1294
+	// teardown bookkeeping filler 1295
+	// teardown bookkeeping filler 1296
+	// teardown bookkeeping filler 1297
+	// teardown bookkeeping filler 1298
+	// teardown bookkeeping filler 1299
+	// teardown bookkeeping filler 1300
+	// teardown bookkeeping filler 1301
+	// teardown bookkeeping filler 1302
+	// teardown bookkeeping filler 1303
+	// teardown bookkeeping filler 1304
+	// teardown bookkeeping filler 1305
+	// teardown bookkeeping filler 1306
+	// teardown bookkeeping filler 1307
+	// teardown bookkeeping filler 1308
+	// teardown bookkeeping filler 1309
+	// teardown bookkeeping filler 1310
+	// teardown bookkeeping filler 1311
+	// teardown bookkeeping filler 1312
+	// teardown bookkeeping filler 1313
+	// teardown bookkeeping filler 1314
+	// teardown bookkeeping filler 1315
+	// teardown bookkeeping filler 1316
+	// teardown bookkeeping filler 1317
+	// teardown bookkeeping filler 1318
+	// teardown bookkeeping filler 1319
+	// teardown bookkeeping filler 1320
+	// teardown bookkeeping filler 1321
+	// teardown bookkeeping filler 1322
+	// teardown bookkeeping filler 1323
+	// teardown bookkeeping filler 1324
+	// teardown bookkeeping filler 1325
+	// teardown bookkeeping filler 1326
+	// teardown bookkeeping filler 1327
+	// teardown bookkeeping filler 1328
+	// teardown bookkeeping filler 1329
+	// teardown bookkeeping filler 1330
+	// teardown bookkeeping filler 1331
+	// teardown bookkeeping filler 1332
+	// teardown bookkeeping filler 1333
+	// teardown bookkeeping filler 1334
+	// teardown bookkeeping filler 1335
+	// teardown bookkeeping filler 1336
+	// teardown bookkeeping filler 1337
+	// teardown bookkeeping filler 1338
+	// teardown bookkeeping filler 1339
+	// teardown bookkeeping filler 1340
+	// teardown bookkeeping filler 1341
+	// teardown bookkeeping filler 1342
+	// teardown bookkeeping filler 1343
+	// teardown bookkeeping filler 1344
+	// teardown bookkeeping filler 1345
+	// teardown bookkeeping filler 1346
+	// teardown bookkeeping filler 1347
+	// teardown bookkeeping filler 1348
+	// teardown bookkeeping filler 1349
+	// teardown bookkeeping filler 1350
+	// teardown bookkeeping filler 1351
+	// teardown bookkeeping filler 1352
+	// teardown bookkeeping filler 1353
+	// teardown bookkeeping filler 1354
+	// teardown bookkeeping filler 1355
+	// teardown bookkeeping filler 1356
+	// teardown bookkeeping filler 1357
+	// teardown bookkeeping filler 1358
+	// teardown bookkeeping filler 1359
+	// teardown bookkeeping filler 1360
+	// teardown bookkeeping filler 1361
+	// teardown bookkeeping filler 1362
+	// teardown bookkeeping filler 1363
+	// teardown bookkeeping filler 1364
+	// teardown bookkeeping filler 1365
+	// teardown bookkeeping filler 1366
+	// teardown bookkeeping filler 1367
+	// teardown bookkeeping filler 1368
+	// teardown bookkeeping filler 1369
+	// teardown bookkeeping filler 1370
+	// teardown bookkeeping filler 1371
+	// teardown bookkeeping filler 1372
+	// teardown bookkeeping filler 1373
+	// teardown bookkeeping filler 1374
+	// teardown bookkeeping filler 1375
+	// teardown bookkeeping filler 1376
+	// teardown bookkeeping filler 1377
+	// teardown bookkeeping filler 1378
+	// teardown bookkeeping filler 1379
+	// teardown bookkeeping filler 1380
+	// teardown bookkeeping filler 1381
+	// teardown bookkeeping filler 1382
+	// teardown bookkeeping filler 1383
+	// teardown bookkeeping filler 1384
+	// teardown bookkeeping filler 1385
+	// teardown bookkeeping filler 1386
+	// teardown bookkeeping filler 1387
+	// teardown bookkeeping filler 1388
+	// teardown bookkeeping filler 1389
+	// teardown bookkeeping filler 1390
+	// teardown bookkeeping filler 1391
+	// teardown bookkeeping filler 1392
+	// teardown bookkeeping filler 1393
+	// teardown bookkeeping filler 1394
+	// teardown bookkeeping filler 1395
+	// teardown bookkeeping filler 1396
+	// teardown bookkeeping filler 1397
+	// teardown bookkeeping filler 1398
+	// teardown bookkeeping filler 1399
+	// teardown bookkeeping filler 1400
+	// teardown bookkeeping filler 1401
+	// teardown bookkeeping filler 1402
+	// teardown bookkeeping filler 1403
+
+	return {
+		get messages() { return messages; },
+		get queuedMessages() { return queuedMessages; },
+		sendMessage,
+		queueMessage,
+		removeQueuedMessage,
+		flushQueuedMessages,
+		forceSendQueued,
+		startSession,
+		destroy,
+	};
+}

+ 27 - 0
__tests__/fixtures/tail-render-ts/src/lib/socket.ts

@@ -0,0 +1,27 @@
+export interface Socket {
+	emit(event: string, payload: unknown): void;
+	on(event: string, handler: (chunk: unknown) => void): void;
+	close(): void;
+}
+
+/** One socket per chat session, so two tabs never receive each other's chunks. */
+export function createDedicatedSocket(endpoint: string): Socket {
+	const handlers = new Map<string, Array<(chunk: unknown) => void>>();
+	return {
+		emit(event, payload) {
+			void endpoint;
+			void event;
+			void payload;
+		},
+		on(event, handler) {
+			handlers.set(event, [...(handlers.get(event) ?? []), handler]);
+		},
+		close() {
+			handlers.clear();
+		},
+	};
+}
+
+export function describeSocket(socket: Socket | null): string {
+	return socket ? 'connected' : 'detached';
+}

+ 2527 - 0
__tests__/fixtures/tail-render-ts/types/worker-configuration.d.ts

@@ -0,0 +1,2527 @@
+// Generated by wrangler. DO NOT EDIT.
+// Runtime types for the worker environment.
+
+declare interface QueueBinding0 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch0 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding1 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch1 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding2 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch2 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding3 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch3 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding4 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch4 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding5 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch5 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding6 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch6 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding7 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch7 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding8 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch8 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding9 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch9 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding10 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch10 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding11 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch11 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding12 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch12 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding13 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch13 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding14 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch14 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding15 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch15 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding16 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch16 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding17 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch17 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding18 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch18 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding19 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch19 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding20 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch20 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding21 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch21 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding22 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch22 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding23 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch23 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding24 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch24 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding25 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch25 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding26 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch26 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding27 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch27 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding28 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch28 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding29 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch29 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding30 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch30 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding31 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch31 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding32 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch32 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding33 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch33 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding34 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch34 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding35 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch35 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding36 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch36 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding37 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch37 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding38 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch38 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding39 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch39 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding40 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch40 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding41 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch41 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding42 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch42 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding43 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch43 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding44 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch44 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding45 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch45 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding46 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch46 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding47 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch47 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding48 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch48 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding49 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch49 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding50 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch50 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding51 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch51 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding52 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch52 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding53 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch53 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding54 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch54 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding55 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch55 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding56 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch56 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding57 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch57 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding58 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch58 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding59 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch59 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding60 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch60 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding61 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch61 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding62 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch62 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding63 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch63 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding64 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch64 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding65 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch65 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding66 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch66 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding67 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch67 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding68 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch68 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding69 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch69 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding70 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch70 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding71 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch71 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding72 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch72 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding73 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch73 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding74 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch74 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding75 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch75 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding76 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch76 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding77 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch77 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding78 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch78 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding79 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch79 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding80 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch80 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding81 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch81 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding82 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch82 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding83 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch83 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding84 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch84 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding85 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch85 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding86 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch86 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding87 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch87 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding88 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch88 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding89 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch89 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding90 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch90 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding91 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch91 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding92 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch92 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding93 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch93 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding94 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch94 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding95 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch95 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding96 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch96 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding97 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch97 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding98 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch98 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding99 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch99 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding100 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch100 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding101 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch101 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding102 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch102 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding103 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch103 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding104 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch104 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding105 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch105 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding106 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch106 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding107 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch107 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding108 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch108 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding109 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch109 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding110 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch110 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding111 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch111 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding112 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch112 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding113 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch113 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding114 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch114 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding115 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch115 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding116 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch116 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding117 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch117 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding118 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch118 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding119 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch119 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding120 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch120 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding121 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch121 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding122 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch122 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding123 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch123 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding124 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch124 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding125 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch125 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding126 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch126 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding127 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch127 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding128 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch128 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding129 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch129 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding130 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch130 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding131 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch131 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding132 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch132 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding133 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch133 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding134 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch134 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding135 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch135 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding136 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch136 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding137 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch137 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding138 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch138 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding139 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch139 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding140 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch140 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding141 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch141 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding142 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch142 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding143 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch143 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding144 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch144 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding145 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch145 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding146 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch146 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding147 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch147 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding148 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch148 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding149 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch149 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding150 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch150 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding151 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch151 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding152 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch152 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding153 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch153 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding154 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch154 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding155 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch155 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding156 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch156 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding157 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch157 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding158 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch158 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding159 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch159 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding160 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch160 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding161 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch161 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding162 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch162 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding163 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch163 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding164 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch164 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding165 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch165 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding166 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch166 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding167 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch167 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding168 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch168 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding169 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch169 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding170 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch170 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding171 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch171 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding172 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch172 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding173 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch173 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding174 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch174 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding175 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch175 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding176 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch176 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding177 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch177 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding178 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch178 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding179 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch179 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding180 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch180 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding181 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch181 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding182 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch182 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding183 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch183 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding184 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch184 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding185 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch185 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding186 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch186 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding187 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch187 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding188 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch188 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding189 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch189 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding190 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch190 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding191 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch191 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding192 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch192 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding193 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch193 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding194 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch194 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding195 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch195 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding196 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch196 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding197 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch197 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding198 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch198 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding199 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch199 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding200 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch200 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding201 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch201 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding202 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch202 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding203 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch203 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding204 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch204 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding205 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch205 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding206 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch206 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding207 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch207 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding208 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch208 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding209 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch209 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding210 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch210 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding211 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch211 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding212 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch212 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding213 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch213 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding214 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch214 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding215 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch215 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding216 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch216 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding217 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch217 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding218 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch218 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding219 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch219 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding220 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch220 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding221 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch221 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding222 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch222 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding223 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch223 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding224 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch224 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding225 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch225 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding226 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch226 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding227 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch227 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding228 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch228 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding229 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch229 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding230 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch230 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding231 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch231 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding232 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch232 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding233 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch233 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding234 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch234 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding235 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch235 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding236 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch236 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding237 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch237 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding238 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch238 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding239 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch239 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding240 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch240 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding241 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch241 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding242 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch242 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding243 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch243 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding244 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch244 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding245 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch245 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding246 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch246 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding247 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch247 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding248 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch248 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding249 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch249 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding250 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch250 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding251 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch251 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding252 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch252 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding253 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch253 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding254 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch254 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding255 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch255 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding256 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch256 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding257 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch257 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding258 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch258 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding259 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch259 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding260 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch260 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding261 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch261 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding262 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch262 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding263 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch263 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding264 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch264 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding265 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch265 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding266 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch266 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding267 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch267 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding268 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch268 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding269 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch269 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding270 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch270 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding271 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch271 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding272 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch272 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding273 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch273 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding274 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch274 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding275 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch275 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding276 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch276 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding277 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch277 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding278 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch278 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding279 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch279 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding280 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch280 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding281 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch281 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding282 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch282 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding283 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch283 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding284 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch284 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding285 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch285 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding286 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch286 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding287 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch287 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding288 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch288 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding289 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch289 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding290 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch290 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding291 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch291 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding292 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch292 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding293 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch293 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding294 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch294 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding295 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch295 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding296 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch296 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding297 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch297 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding298 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch298 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding299 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch299 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding300 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch300 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding301 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch301 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding302 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch302 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding303 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch303 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding304 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch304 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding305 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch305 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding306 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch306 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding307 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch307 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding308 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch308 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding309 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch309 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding310 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch310 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding311 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch311 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding312 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch312 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding313 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch313 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding314 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch314 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding315 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch315 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding316 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch316 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding317 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch317 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding318 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch318 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding319 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch319 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding320 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch320 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding321 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch321 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding322 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch322 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding323 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch323 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding324 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch324 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding325 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch325 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding326 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch326 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding327 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch327 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding328 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch328 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding329 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch329 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding330 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch330 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding331 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch331 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding332 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch332 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding333 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch333 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding334 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch334 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding335 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch335 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding336 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch336 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding337 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch337 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding338 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch338 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding339 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch339 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding340 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch340 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding341 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch341 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding342 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch342 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding343 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch343 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding344 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch344 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding345 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch345 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding346 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch346 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding347 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch347 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding348 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch348 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding349 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch349 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding350 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch350 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding351 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch351 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding352 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch352 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding353 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch353 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding354 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch354 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding355 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch355 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding356 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch356 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding357 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch357 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding358 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch358 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding359 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch359 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding360 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch360 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding361 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch361 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding362 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch362 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding363 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch363 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding364 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch364 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding365 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch365 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding366 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch366 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding367 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch367 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding368 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch368 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding369 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch369 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding370 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch370 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding371 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch371 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding372 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch372 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding373 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch373 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding374 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch374 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding375 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch375 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding376 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch376 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding377 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch377 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding378 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch378 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding379 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch379 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding380 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch380 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding381 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch381 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding382 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch382 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding383 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch383 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding384 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch384 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding385 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch385 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding386 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch386 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding387 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch387 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding388 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch388 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding389 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch389 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding390 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch390 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding391 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch391 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding392 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch392 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding393 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch393 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding394 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch394 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding395 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch395 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding396 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch396 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding397 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch397 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding398 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch398 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding399 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch399 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding400 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch400 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding401 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch401 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding402 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch402 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding403 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch403 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding404 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch404 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding405 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch405 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding406 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch406 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding407 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch407 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding408 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch408 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding409 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch409 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding410 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch410 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding411 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch411 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding412 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch412 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding413 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch413 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding414 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch414 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding415 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch415 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding416 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch416 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding417 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch417 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding418 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch418 = { messages: unknown[]; queue: string };
+
+declare interface QueueBinding419 {
+	send(message: unknown): Promise<void>;
+	sendBatch(messages: unknown[]): Promise<void>;
+}
+declare type QueuedMessageBatch419 = { messages: unknown[]; queue: string };
+
+declare global {
+	interface Env { QUEUE: QueueBinding0 }
+}
+export {};

+ 17 - 12
docs/benchmarks/explore-noise-epic-cg24.md

@@ -52,13 +52,13 @@ change at all**.
 Deterministic across the 6-repo suite: no repo truncates, none loses a file,
 okhttp gains one, every repo lands at or under the 25,000 hard ceiling.
 
-## Open
+## Follow-up — CG-38 (closed)
 
-**CG-38** — agent-named symbols in the tail of a large file never render. On the
+**Agent-named symbols in the tail of a large file never rendered.** On the
 motivating repo, `queueMessage` (line 1087) and `flushQueuedMessages` (1102) in a
-1,414-line file are absent from the response on both prose and symbol-bag
-queries, even when that file wins rank #1 with 67% of the envelope. The response
-returns the `QueuedMessage` *interface* at line 70 — a fuzzy near-match on the
+1,414-line file were absent from the response on both prose and symbol-bag
+queries, even when that file won rank #1 with 67% of the envelope. The response
+returned the `QueuedMessage` *interface* at line 70 — a fuzzy near-match on the
 query token — instead of the function.
 
 **Pre-existing, not caused by this epic.** A controlled bisect (index held fixed,
@@ -67,15 +67,20 @@ lines here and CG-36 rendering 463; the symbols render at neither. The epic
 strictly improves the case. An earlier claim that the epic regressed it was
 wrong — it compared runs across two different indexes.
 
-Sharpest lead: an earlier index of the same repo with the `.d.ts` **not** flagged
-generated rendered 581 lines including both symbols on the pre-epic engine, where
-the current flagged index renders 12. A penalty on one file should not shrink an
-unrelated top-ranked file's render; `rankPenalty` scales `fileGraphScore`, which
-moves the relevance gate and reshuffles the admitted set.
+Two independent causes, both longstanding: `buildFlowFromNamedSymbols` discarded
+the named-symbol IDENTITY along with the narrative whenever the named symbols did
+not form a call chain, so the importance-9 injection never ran; and the ceiling
+trim cut in SOURCE order, so a named def at the end of a large file was always the
+first thing dropped. Full account, plus the ranker-penalty lead (real, and
+orthogonal — the defs are absent at both `generated` flag states on the old build
+and present at both on the new one): `explore-tail-render-cg38.md`.
 
 This epic's probes measure envelope share, starvation, source totals and file
-counts. **None measures "did the agent-named symbol render"** — which is why this
-survived the whole epic. CG-38 requires the fixture that closes that gap.
+counts. **None measured "did the agent-named symbol render"** — which is why this
+survived the whole epic. `scripts/agent-eval/probe-named-symbol.mjs`,
+`__tests__/fixtures/tail-render-ts` and
+`__tests__/explore-named-symbol-render.test.ts` close that gap: per-symbol and
+binary, checking the definition LINE against the response's rendered lines.
 
 CG-36's own measurement is worth carrying forward, because the issue named the wrong
 fix point: both real cases (`query.py`, `RealInterceptorChain.kt`) lost on

+ 185 - 0
docs/benchmarks/explore-tail-render-cg38.md

@@ -0,0 +1,185 @@
+# CG-38 — an agent-named symbol in the tail of a large file never rendered
+
+**Status: fixed.** Two independent causes, both longstanding. Not a CG-24 regression —
+the controlled bisect (index held fixed, engine varied across every epic merge point)
+found the symptom at every build including pre-epic.
+
+## The report
+
+On a 1,414-line Svelte store, `codegraph_explore` never returned `queueMessage`
+(L1087) or `flushQueuedMessages` (L1102) — on a bare symbol bag *or* a prose
+question — even though their file won rank #1 with score 127 and 67.3% of the
+envelope. What came back instead was the same-stem `QueuedMessage` **interface** at
+L70. The agent had to Read the file to find the two functions it had asked for by
+name, which is the one outcome explore exists to prevent.
+
+CLAUDE.md's *"guarantee named symbols render"* — the importance-9 named-def
+injection — was not holding.
+
+## What it actually was
+
+### 1. The named-symbol IDENTITY was discarded with the narrative
+
+`buildFlowFromNamedSymbols` returns two unrelated things: the Flow prose, and the
+SET of node ids the agent named. Downstream, that set is what injects a named def
+into its file's cluster ranges and ranks it **importance 9** — the entire mechanism
+behind the guarantee.
+
+Its last gate was:
+
+```ts
+if (!hasMain && synthLines.length === 0 && !boundaryText && !polyText) return EMPTY;
+```
+
+`EMPTY` zeroes `namedNodeIds` too. So whenever the named symbols happened not to
+produce anything to *print*, the guarantee silently switched off. Two sibling
+closures in one factory are exactly that case: `queueMessage` and
+`flushQueuedMessages` never call each other, so there is no chain, no synthesized
+hop and no dispatch boundary — and both defs lost importance 9. The file then
+rendered from its head, which is how a 6-line interface displaced two functions
+1,000 lines below it.
+
+Measured: `flow.namedNodeIds` was **empty** on the reported query, while
+`findAllSymbols` resolved both tokens to exactly 1 node each.
+
+The fix separates the two outputs (`identityOnly()`), restricted to **shape-precise
+tokens** (camelCase / PascalCase / snake_case / qualified — the same test the gather
+path uses). With a narrative present, the prose is itself corroboration and that path
+is unchanged; with nothing corroborating it, only an unambiguous symbol reference may
+promote, so an English word in a prose question that happens to exact-match a
+callable cannot earn importance 9.
+
+### 2. The ceiling trim cut in SOURCE ORDER
+
+Restoring importance 9 was not enough — the symbols still did not render.
+
+`shrinkCluster` *had* kept them: on the reported query it emitted a block spanning
+`1022-1121`, which covers both. But the shrink's output measured **26,297 chars
+against a 16,532 cap**, so `windowToCeiling` fired, and it fills parts in source
+order and drops everything after the first overrun:
+
+```
+shrunk:   101-107, 197-226, ..., 648-989, 1022-1121      (26,297)
+windowed: 101-107, 197-226, ..., 648-839                 (16,532)   ← tail gone
+```
+
+A trim that cuts in source order will always take the END of a large file first —
+which is precisely where an agent-named symbol is most likely to be, and least
+likely to be reachable any other way. `windowToCeiling` already had the concept it
+needed (`focusLine`, for the spine's next-hop call site, CG-30); it just wasn't told
+about named defs. It now takes a `focusLines` list — spine call site plus every
+member at importance ≥ 9, capped at 6 — and:
+
+- tries the **full-ceiling** fill FIRST, holding back 40% only when a focus line is
+  actually left uncovered (so a cluster whose head already reaches its focus keeps
+  the whole ceiling for source — an improvement on the old unconditional hold-back);
+- **splits** the reserve evenly between the uncovered focus lines with carry-forward,
+  rather than handing it out greedily in source order. Greedy reproduced the bug one
+  level down: on the prose query, four focus lines resolved and the two earliest took
+  the entire reserve, dropping `flushQueuedMessages` again.
+
+## The accounting gap — found, measured, deliberately NOT shipped
+
+`shrinkCluster`'s fit test uses the raw source span
+(`slice().join('\n').length`) while the render adds `contextPadding` around every
+block and a line-number prefix to every line. On the reported file that estimate ran
+**~60% under** (16.5K accounted, 26.3K rendered).
+
+An exact projection (prefix-summed line costs, mirroring the merge + padding
+`buildSection` performs) was built and measured. **It is worse, and it is not
+shipped:**
+
+| | main | exact accounting | exact + spend-the-remainder |
+|---|---|---|---|
+| django | 20,719 | 20,747 | 20,747 |
+| excalidraw | 19,704 | **19,606** | **19,606** |
+| okhttp | 18,651 | 18,766 | 18,766 |
+| tokio | 21,582 | **21,424** | 21,555 |
+| gin | 11,952 | 12,082 | 12,082 |
+| alamofire | 11,849 | 11,849 | 11,849 |
+| `probe-allocation` | 4 PASS | **payroll-go FAIL** | **payroll-go FAIL** |
+
+The mechanism: exact accounting stops at the last member that fits **whole**, and the
+released bytes carry forward to lower-ranked files. On `payroll-go` that moved 1,296
+chars out of the rank-#2 answer file `cycle.go` and into the rank-#5
+`payslipstore/store.go`, taking `runPayrollCycleAll`'s `s.store.Upsert(ctx, slip)`
+call — the "create" half of the query — with it.
+
+So the slack is doing no harm where it is: `bound()` clamps the render to the ceiling
+exactly, so the over-keep costs no bytes. What the slack must **not** do is decide
+*which* members survive — and that is the ceiling trim's job, which is what this task
+fixed. The comment on `shrinkCluster` now says so, so the next reader does not
+"fix" it.
+
+## The index-dependence lead — explained, and orthogonal
+
+The issue's sharpest lead was that flagging the ambient `.d.ts` as `generated` seemed
+to make an unrelated file's render *worse*. Flipping `files.generated` on that one row
+(the CG-25 method — holds the index constant, attributes the delta to the ranker
+alone) confirms the mechanism is real:
+
+| | `generated=1` | `generated=0` |
+|---|---|---|
+| `.d.ts` graphScore | 0.1875 | 0.75 |
+| `maxGraph` | 0.3297 | 0.75 |
+| gate (6% of max) | 0.0198 | 0.0450 |
+| files ranked | 3 | 2 |
+| rank-#1 allowance | 9,100 | 8,166 |
+
+`rankPenalty` scales `fileGraphScore`, `fileGraphScore` sets `maxGraph`, and the
+relevance gate is 6% of `maxGraph` — so a penalty on one file does move the admitted
+set and every other file's allowance. Confirmed.
+
+But it is **not** what hid the symbols. On main they are absent at *both* flag states
+(render stops at L316 / L381); with the fix they are present at *both*. The
+allocation moves; the guarantee does not depend on it. Pinned by the last case in
+`__tests__/explore-named-symbol-render.test.ts`.
+
+## Results
+
+Real repro (`queueMessage` L1087 / `flushQueuedMessages` L1102), all shapes:
+
+| query shape | main | fixed |
+|---|---|---|
+| symbol bag | absent | **both render** |
+| prose, symbols named | absent | **both render** |
+| symbols + decoy interface | absent | **both render** |
+| prose, no symbols named | absent | **both render** |
+
+Fixture (`__tests__/fixtures/tail-render-ts`, 7 symbol checks over 3 query shapes):
+**7/7 fail on main, 7/7 pass** — deterministic over 4 consecutive runs per arm.
+
+Standing bars, all held:
+
+- `probe-allocation.mjs` — payroll-go / starved-cluster / dense-header / self-query all PASS
+- `probe-file-spend.mjs` — no starvation flags
+- `probe-suite-envelope.mjs` — **byte-identical to main on all six repos** (20,719 /
+  19,704 / 18,651 / 21,582 / 11,952 / 11,849), same file counts
+- full suite green
+
+The suite being byte-identical is the point: the focus windows only change what a
+render does once it has *already* overrun its ceiling, which none of the six suite
+queries does.
+
+## Instruments
+
+- `scripts/agent-eval/probe-named-symbol.mjs` — the measurement the epic lacked.
+  Per-SYMBOL and binary: is the symbol's **definition line** among the response's
+  rendered lines? The name alone proves nothing — it appears in the section header's
+  symbol list and at call sites whether or not the body was sent, which is exactly how
+  this hid through a whole epic of aggregate probes.
+- `__tests__/fixtures/tail-render-ts` — mirrors the reported file's geometry: decoy
+  same-stem interface at L70, factory closure at L104 spanning ~92% of the file (so
+  every symbol merges into ONE cluster), targets at L1088/L1096/L1102, plus a
+  2,500-line generated `.d.ts` for the ranker to penalise. Generated by script; edit
+  the geometry, not individual lines.
+- `__tests__/explore-named-symbol-render.test.ts` — the standing gate, including the
+  fixture-shape assertions (if the fixture rots, the gate means nothing).
+
+## Method note
+
+A `git stash -- <path>` "baseline" reverts to **HEAD**, not to `main`. With a WIP
+commit on the branch that silently measures your own change against itself — it
+produced a clean "passes on main" here that was pure fiction. Use the file swap
+(`git show main:<path> > <path>`), as `.kommandr/memory/baseline-builds-use-fresh-file-swap`
+already says for builds.

+ 163 - 0
scripts/agent-eval/probe-named-symbol.mjs

@@ -0,0 +1,163 @@
+#!/usr/bin/env node
+/**
+ * "Did the symbol the agent NAMED actually render?" (CG-38).
+ *
+ * This is the measurement the whole CG-24 epic was missing. Every other probe
+ * here scores the response in AGGREGATE — `probe-suite-envelope.mjs` measures how
+ * much source came back, `probe-file-spend.mjs` measures whether the bytes went
+ * to the files that earned them, `probe-allocation.mjs` measures group shares.
+ * All three are green on a response that returns 25K of source from the right
+ * file and still omits the one function the agent asked for by name. That is
+ * exactly what CG-38 was: `queueMessage` at L1087 of a 1,414-line file, whose
+ * file won rank #1 with 67% of the envelope, never rendered — the agent got a
+ * same-stem `QueuedMessage` INTERFACE at L70 instead and had to Read the file.
+ *
+ * So the assertion here is per-SYMBOL and binary: for each named symbol, does its
+ * definition line appear in the rendered source? Nothing else can substitute —
+ * not the file being present, not its share, not its byte count.
+ *
+ * Usage (needs a current `npm run build`):
+ *   node scripts/agent-eval/probe-named-symbol.mjs
+ *   node scripts/agent-eval/probe-named-symbol.mjs --verbose
+ *   # any indexed repo, ad hoc:
+ *   node scripts/agent-eval/probe-named-symbol.mjs <repo> "<query>" sym1 sym2
+ *
+ * Exit code is 1 when any expected symbol is missing, so this can gate.
+ */
+import { cpSync, mkdtempSync, rmSync, readFileSync, existsSync } from 'node:fs';
+import { tmpdir } from 'node:os';
+import { join, resolve, dirname } from 'node:path';
+import { fileURLToPath, pathToFileURL } from 'node:url';
+
+const HERE = dirname(fileURLToPath(import.meta.url));
+const REPO = resolve(HERE, '..', '..');
+
+const load = async (rel) => import(pathToFileURL(resolve(REPO, rel)).href);
+const idxMod = await load('dist/index.js');
+const toolsMod = await load('dist/mcp/tools.js');
+const CodeGraph = idxMod.default?.default ?? idxMod.default ?? idxMod.CodeGraph;
+const { ToolHandler } = toolsMod;
+
+/**
+ * The fixture cases. `symbols` are what the agent names; each must come back with
+ * its DEFINITION rendered. The queries deliberately cover both shapes the bug was
+ * reported on — a bare symbol bag and a prose question — because the failure had
+ * a different cause on each and a fix for one does not imply the other.
+ */
+const FIXTURE = '__tests__/fixtures/tail-render-ts';
+const CASES = [
+  {
+    id: 'tail-symbol-bag',
+    why: 'two sibling closures past L1000, named directly; neither calls the other',
+    query: 'queueMessage flushQueuedMessages',
+    symbols: ['queueMessage', 'flushQueuedMessages'],
+  },
+  {
+    id: 'tail-prose',
+    why: 'same two symbols named inside a prose question',
+    query: 'how does queueMessage hand its entries to flushQueuedMessages',
+    symbols: ['queueMessage', 'flushQueuedMessages'],
+  },
+  {
+    id: 'tail-with-decoy',
+    why: 'the same-stem QueuedMessage interface at L70 must not stand in for the functions',
+    query: 'explain queueMessage, removeQueuedMessage and flushQueuedMessages',
+    symbols: ['queueMessage', 'removeQueuedMessage', 'flushQueuedMessages'],
+  },
+];
+
+/** Every `<n>\t<text>` line number present in the response's source blocks. */
+function renderedLines(response) {
+  const out = new Set();
+  for (const m of response.matchAll(/^(\d+)\t/gm)) out.add(Number(m[1]));
+  return out;
+}
+
+/**
+ * A symbol counts as rendered only when its DECLARATION line is among the lines
+ * the response actually sent — not when its name merely appears somewhere (it
+ * shows up in the section header symbol list and in call sites regardless, which
+ * is precisely how this defect hid for a whole epic).
+ */
+function check(cg, response, names) {
+  const lines = renderedLines(response);
+  return names.map((name) => {
+    const node = (cg.getNodesByName?.(name) ?? []).find((n) => n.startLine > 0);
+    return {
+      name,
+      file: node?.filePath ?? '(not indexed)',
+      line: node?.startLine ?? 0,
+      rendered: !!node && lines.has(node.startLine),
+    };
+  });
+}
+
+async function runCase(root, { query, symbols }) {
+  const cg = CodeGraph.openSync(root);
+  try {
+    const res = await new ToolHandler(cg).execute('codegraph_explore', { query });
+    const response = res.content?.[0]?.text ?? '';
+    return { response, results: check(cg, response, symbols) };
+  } finally {
+    try { cg.close?.(); } catch { /* already closed */ }
+  }
+}
+
+const argv = process.argv.slice(2);
+const verbose = argv.includes('--verbose');
+const positional = argv.filter((a) => !a.startsWith('--'));
+
+let failures = 0;
+let checked = 0;
+
+if (positional.length >= 3) {
+  // Ad-hoc mode: <repo> "<query>" sym...
+  const [repo, query, ...symbols] = positional;
+  const { response, results } = await runCase(resolve(repo), { query, symbols });
+  console.log(`\n${repo}\n  query "${query}"  ·  ${response.length} chars\n`);
+  for (const r of results) {
+    checked += 1;
+    if (!r.rendered) failures += 1;
+    console.log(`   ${r.rendered ? 'PASS' : 'FAIL'}  ${r.name}  ${r.file}:${r.line}`);
+  }
+} else {
+  const src = join(REPO, FIXTURE);
+  if (!existsSync(src)) {
+    console.error(`fixture missing: ${src}`);
+    process.exit(2);
+  }
+  const dir = mkdtempSync(join(tmpdir(), 'cg-named-'));
+  try {
+    cpSync(src, dir, { recursive: true });
+    rmSync(join(dir, '.codegraph'), { recursive: true, force: true });
+    const cg = CodeGraph.initSync(dir);
+    await cg.indexAll();
+    cg.close?.();
+
+    console.log(`\ntail-render-ts  ·  agent-named symbols must render\n`);
+    for (const c of CASES) {
+      const { response, results } = await runCase(dir, c);
+      console.log(`── ${c.id} — ${c.why}`);
+      console.log(`   query   "${c.query}"`);
+      console.log(`   response ${response.length.toLocaleString()} chars`);
+      for (const r of results) {
+        checked += 1;
+        if (!r.rendered) failures += 1;
+        console.log(`   ${r.rendered ? 'PASS' : 'FAIL'}  ${r.name} defined at ${r.file}:${r.line}`
+          + (r.rendered ? '' : '  — DEFINITION NOT IN RESPONSE'));
+      }
+      if (verbose && failures) {
+        const spans = [...renderedLines(response)].sort((a, b) => a - b);
+        console.log(`   rendered lines: ${spans[0]}..${spans[spans.length - 1]} (${spans.length} lines)`);
+      }
+      console.log();
+    }
+  } finally {
+    rmSync(dir, { recursive: true, force: true });
+  }
+}
+
+console.log(failures === 0
+  ? `Every agent-named symbol rendered (${checked} checked).`
+  : `${failures} of ${checked} agent-named symbols did NOT render.`);
+process.exit(failures === 0 ? 0 : 1);

+ 138 - 31
src/mcp/tools.ts

@@ -2542,6 +2542,14 @@ export class ToolHandler {
       // fed only to the dynamic-dispatch-links scan below.
       const dynNamed = new Map<string, Node>();
       const DYN_KINDS = new Set(['constant', 'variable', 'field', 'property']);
+      // Nodes resolved from a SHAPE-PRECISE token (camelCase / PascalCase /
+      // snake_case / qualified) — the same test the gather path uses. It is the
+      // difference between "the agent named this symbol" and "an ordinary English
+      // word in a prose question collided with a callable", and it is what makes
+      // the narrative-less return below safe (see `identityOnly`).
+      const isPreciseToken = (x: string) =>
+        /[._$]|::|\//.test(x) || /[a-z][A-Z]/.test(x) || /^[A-Z]/.test(x);
+      const preciseNamedIds = new Set<string>();
       const hasHeuristicEdge = (id: string): boolean =>
         [...cg.getCallers(id), ...cg.getCallees(id)].some(({ edge }) => edge.provenance === 'heuristic');
       for (const t of tokens) {
@@ -2560,9 +2568,11 @@ export class ToolHandler {
             });
         const kept = pick.slice(0, 6);
         tokenNodes.set(t, kept.map((n) => n.id));
+        const precise = isPreciseToken(t);
         for (const n of kept) {
           named.set(n.id, n);
           if (specific) uniqueNamedNodeIds.add(n.id);
+          if (precise) preciseNamedIds.add(n.id);
         }
         // Same token, non-callable synth endpoints (capped, precision-gated on an
         // actual heuristic edge so plain config constants never qualify).
@@ -2575,6 +2585,7 @@ export class ToolHandler {
             if (CALLABLE.has(n.kind) || !DYN_KINDS.has(n.kind) || dynNamed.has(n.id)) continue;
             if (hasHeuristicEdge(n.id)) {
               dynNamed.set(n.id, n);
+              if (precise) preciseNamedIds.add(n.id);
               tokenDyn++;
             }
             if (dynNamed.size >= 12 || tokenDyn >= 4) break;
@@ -2606,6 +2617,35 @@ export class ToolHandler {
         }
         return synthLines;
       };
+      /**
+       * No narrative to print — but the agent still NAMED symbols, and their
+       * identity is a separate output from the prose (CG-38).
+       *
+       * `namedNodeIds` is not decoration: downstream it injects the named def into
+       * the file's cluster ranges and ranks it importance 9, which is the whole
+       * mechanism behind "a symbol the agent named renders" (the assembler's
+       * named-def injection). Returning EMPTY here threw that away whenever the
+       * named symbols happened not to form a call chain — two sibling closures in
+       * one factory (`queueMessage` / `flushQueuedMessages`, neither calling the
+       * other) produce no chain, no synth hop and no dispatch boundary, so BOTH
+       * defs lost importance 9 and the file rendered from its head instead: the
+       * agent got the `QueuedMessage` interface at L70 and had to Read the file
+       * for the functions at L1087/L1102 it had asked for by name.
+       *
+       * Restricted to SHAPE-PRECISE tokens. With a narrative present the prose is
+       * itself corroboration that the resolution was right, so that path keeps
+       * every named id as before; with nothing corroborating it, only an
+       * unambiguous symbol reference may promote — an English word in a prose
+       * question that happens to exact-match a callable must not earn importance 9.
+       * Same distinction, same test, as the gather path's `isPreciseToken`.
+       */
+      const identityOnly = () => (preciseNamedIds.size === 0 ? EMPTY : {
+        text: '',
+        pathNodeIds: new Set<string>(),
+        namedNodeIds: new Set<string>(preciseNamedIds),
+        uniqueNamedNodeIds: new Set<string>([...uniqueNamedNodeIds].filter((id) => preciseNamedIds.has(id))),
+        spineCallSites: new Map<string, number>(),
+      });
       if (named.size < 2) {
         // <2 CALLABLES resolved. Two recoveries before giving up: (1) synthesized
         // edges among named CONSTANT/VARIABLE endpoints — RTK thunk→thunk is
@@ -2614,7 +2654,7 @@ export class ToolHandler {
         // dynamic-dispatch site that EXPLAINS a half-connected flow.
         const synthLines = collectSynthLinks(null);
         const boundaries = named.size === 0 ? '' : (this.buildDynamicBoundaries(cg, [...named.values()], named) || '');
-        if (synthLines.length === 0 && !boundaries) return EMPTY;
+        if (synthLines.length === 0 && !boundaries) return identityOnly();
         const out: string[] = [];
         if (synthLines.length) out.push(
           '**Dynamic-dispatch links among your symbols**',
@@ -2729,7 +2769,7 @@ export class ToolHandler {
         hasMain ? (e: Edge) => pathIds.has(e.source) && pathIds.has(e.target) : null
       );
 
-      if (!hasMain && synthLines.length === 0 && !boundaryText && !polyText) return EMPTY;
+      if (!hasMain && synthLines.length === 0 && !boundaryText && !polyText) return identityOnly();
       const out: string[] = [];
       if (hasMain) {
         out.push('**Flow (call path among the symbols you queried)**', '');
@@ -4996,6 +5036,19 @@ export class ToolHandler {
        * keeps every rule that matters: only whole symbol ranges are emitted, so a
        * body is never cut, and the members are chosen by the same importance the
        * cluster ranking uses. Returns null when nothing needed shrinking.
+       *
+       * `sizeOf` measures the RAW source span, while the render adds
+       * `contextPadding` around every block and a line-number prefix to every
+       * line — so this over-keeps (measured ~60% under on a 1,414-line file:
+       * 16.5K accounted, 26.3K rendered). That is deliberate, not an oversight:
+       * `bound()` clamps the result to the ceiling exactly, so the slack costs no
+       * bytes, and making the estimate exact instead measured WORSE — it stops at
+       * the last member that fits whole, and the released bytes carry forward to
+       * lower-ranked files (payroll-go's `runPayrollCycleAll` body lost its
+       * `s.store.Upsert` call to a rank-5 file). What the slack must NOT do is
+       * decide WHICH members survive: that is the ceiling trim's job, and CG-38 is
+       * why that trim now protects the named spans instead of cutting in source
+       * order. See `docs/benchmarks/explore-tail-render-cg38.md`.
        */
       const shrinkCluster = (c: ExploreCluster, cap: number): SectionPart[] | null => {
         if (c.members.length < 2) return null;
@@ -5088,45 +5141,81 @@ export class ToolHandler {
        * it or re-send it. Below that floor the part is simply dropped — unless
        * nothing has been emitted at all, where the floor wins over the ceiling
        * because an empty section is the one outcome worse than an oversize one.
+       *
+       * `focusLines` are the lines this trim must not lose: the spine's next-hop
+       * call site (CG-30) and every definition the agent NAMED inside the cluster
+       * (CG-38). The head fill is source-ordered, so a named def in the TAIL of a
+       * large file is otherwise always the first thing an over-ceiling render
+       * drops — the one span the agent asked for by name, cut in favour of
+       * head-of-file filler it did not ask for. The full-ceiling fill is tried
+       * FIRST and the 60% hold-back applies only when a focus line is actually
+       * left uncovered, so a cluster whose head already reaches its focus keeps
+       * the whole ceiling for source.
        */
       const windowToCeiling = (
         parts: ReadonlyArray<SectionPart>,
         ceiling: number,
-        focusLine?: number,
+        focusLines: ReadonlyArray<number> = [],
       ): SectionPart[] => {
-        const emit: ExploreLineRange[] = [];
         const inParts = (line: number) =>
           parts.some((p) => line >= p.range.start && line <= p.range.end);
-        const needFocus = typeof focusLine === 'number' && focusLine > 0 && inParts(focusLine);
-        // Hold room back for the call site so the head window can't eat all of it.
-        const headRoom = needFocus ? Math.floor(ceiling * 0.6) : ceiling;
-        let used = 0;
-        for (const p of parts) {
-          const join = emit.length > 0 ? GAP_MARKER.length : 0;
-          if (used + join + p.text.length <= headRoom) {
-            emit.push(p.range);
-            used += join + p.text.length;
-            continue;
-          }
-          const first = emit.length === 0;
-          const win = headWindowOf(
-            p.range, Math.max(0, headRoom - used - join), first ? MIN_WINDOW_LINES : 0);
-          if (win && (first || win.end - win.start + 1 >= MIN_WINDOW_LINES)) {
-            emit.push(win);
-            used += join + renderSpan(win).length;
+        const focus = [...new Set(focusLines)]
+          .filter((l) => typeof l === 'number' && l > 0 && inParts(l))
+          .sort((a, b) => a - b);
+        /** Source-ordered fill of whole parts, the overrunning one cut to a head window. */
+        const fill = (room: number): { emit: ExploreLineRange[]; used: number } => {
+          const emit: ExploreLineRange[] = [];
+          let used = 0;
+          for (const p of parts) {
+            const join = emit.length > 0 ? GAP_MARKER.length : 0;
+            if (used + join + p.text.length <= room) {
+              emit.push(p.range);
+              used += join + p.text.length;
+              continue;
+            }
+            const first = emit.length === 0;
+            const win = headWindowOf(
+              p.range, Math.max(0, room - used - join), first ? MIN_WINDOW_LINES : 0);
+            if (win && (first || win.end - win.start + 1 >= MIN_WINDOW_LINES)) {
+              emit.push(win);
+              used += join + renderSpan(win).length;
+            }
+            break;
           }
-          break;
+          return { emit, used };
+        };
+        let { emit, used } = fill(ceiling);
+        const reached = () => (emit.length ? emit[emit.length - 1]!.end : 0);
+        if (focus.some((l) => l > reached())) {
+          // Hold room back for the focus windows so the head can't eat all of it.
+          ({ emit, used } = fill(Math.floor(ceiling * 0.6)));
         }
-        const last = emit[emit.length - 1];
-        if (needFocus && (!last || focusLine! > last.end)) {
-          const host = parts.find((p) => focusLine! >= p.range.start && focusLine! <= p.range.end)!;
-          const lo = Math.max(host.range.start, focusLine! - SPINE_WINDOW, last ? last.end + 1 : 0);
-          const hi = Math.min(host.range.end, focusLine! + SPINE_WINDOW);
-          const win = centeredWindowOf(
-            focusLine!, lo, hi, Math.max(0, ceiling - used - GAP_MARKER.length));
+        // What is left is SPLIT between the uncovered focus lines rather than
+        // handed to them in order. Greedy-in-source-order reproduces the very bug
+        // this guards: on a prose query resolving four focus lines, the two
+        // earliest took the whole reserve and `flushQueuedMessages` at L1102 —
+        // named in the question — was dropped again. A skipped or undersized
+        // window returns its share to the pool for the ones after it.
+        let covered = reached();
+        let room = Math.max(0, ceiling - used);
+        const pending = focus.filter((l) => l > covered);
+        for (let i = 0; i < pending.length; i++) {
+          const line = pending[i]!;
+          if (line <= covered) continue; // an earlier window already reached it
+          const share = Math.floor(room / (pending.length - i)) - GAP_MARKER.length;
+          if (share <= 0) continue;
+          const host = parts.find((p) => line >= p.range.start && line <= p.range.end)!;
+          const lo = Math.max(host.range.start, line - SPINE_WINDOW, covered + 1);
+          const hi = Math.min(host.range.end, line + SPINE_WINDOW);
+          const win = centeredWindowOf(line, lo, hi, share);
           // Same sliver floor as the head window — a two-line peek at the call
           // site teaches the next call's dedup to shred the block around it.
-          if (win && win.end - win.start + 1 >= MIN_WINDOW_LINES) emit.push(win);
+          if (!win || win.end - win.start + 1 < MIN_WINDOW_LINES) continue;
+          emit.push(win);
+          const cost = GAP_MARKER.length + renderSpan(win).length;
+          used += cost;
+          room -= cost;
+          covered = win.end;
         }
         // Never empty: a section with no source sends the agent to Read.
         if (emit.length === 0 && parts.length > 0) {
@@ -5138,6 +5227,24 @@ export class ToolHandler {
           .map((r) => ({ range: r, text: renderSpan(r) }));
       };
 
+      /**
+       * The lines a ceiling trim of this cluster must not lose: the spine's
+       * next-hop call site, and the definition line of every member the agent
+       * NAMED or that is a query entry point (importance >= 9). Capped, because
+       * each one costs a window and too many turn a section into confetti; the
+       * most important come first, source order within a tier so the windows read
+       * top-down.
+       */
+      const MAX_FOCUS_LINES = 6;
+      const focusLinesOf = (c: ExploreCluster): number[] => {
+        const named = c.members
+          .filter((m) => m.importance >= 9)
+          .sort((a, b) => b.importance - a.importance || a.start - b.start)
+          .slice(0, MAX_FOCUS_LINES)
+          .map((m) => m.start);
+        return c.spineCallLine ? [c.spineCallLine, ...named] : named;
+      };
+
       /**
        * One cluster's final parts: built, shrunk if it overruns `cap`, then
        * passed through the session history (CG-18).
@@ -5165,7 +5272,7 @@ export class ToolHandler {
           if (!Number.isFinite(ceiling) || sectionText(r.parts).length <= ceiling) return r;
           // Windows are subsets of spans dedupeSpans already cleared, so the record
           // still only ever claims source that was actually sent.
-          const parts = windowToCeiling(r.parts, ceiling, c.spineCallLine);
+          const parts = windowToCeiling(r.parts, ceiling, focusLinesOf(c));
           return { parts, covered: r.covered, shrunk: true };
         };
         if (sectionText(base.parts).length <= cap) {