Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
fix(acp): one card per failure + surface real error line (PRD-8024) (#3536)
Abrahamb726821c6844
diff --git a/.changeset/prd-8024-failed-to-start-card-ux.md b/.changeset/prd-8024-failed-to-start-card-ux.mdnew file mode 100644index 000000000..488a31620--- /dev/null+++ b/.changeset/prd-8024-failed-to-start-card-ux.md@@ -0,0 +1,5 @@+---+"@inkeep/open-knowledge": patch+---++Fix the ACP failed-to-start surface. A retried launch that failed the same way each time used to stack three visually-identical `"Claude couldn't start · initialize failed: ACP connection closed"` cards in the transcript — with the real error buried under a wall of unrelated `npm warn …` lines behind a `Show details` toggle, and the `Retry` button only on the last card. The card now coalesces adjacent identical failures into one entry (with a subtle `(N attempts)` count), pulls the primary error line out of the stderr tail and surfaces it under the headline, and colorizes `error` / `warn` lines when the reader does expand the full detail. Retry is always on the active card because there's now only one.diff --git a/knip.config.ts b/knip.config.tsindex f9179f2d4..78162ec09 100644--- a/knip.config.ts+++ b/knip.config.ts@@ -123,9 +123,7 @@ export default {'packages/server': {entry: ['src/**/*.test.ts', 'src/parse-worker.ts'],project: 'src/**',- ignoreDependencies: [- '@types/shell-quote',- ],+ ignoreDependencies: ['@types/shell-quote'],},'packages/cli': {entry: ['src/**/*.test.ts', 'scripts/*.ts', 'tests/**/*.ts', 'src/parse-worker.ts'],diff --git a/packages/app/src/components/acp/ThreadView.dom.test.tsx b/packages/app/src/components/acp/ThreadView.dom.test.tsxindex 6de738502..6449d9abc 100644--- a/packages/app/src/components/acp/ThreadView.dom.test.tsx+++ b/packages/app/src/components/acp/ThreadView.dom.test.tsx@@ -1806,6 +1806,7 @@ describe('ThreadView retry', () => {text: '',tone: 'error',failure: { reason, agentMessage: 'harness not installed' },+ attempts: 1,};}@@ -1862,6 +1863,7 @@ describe('ThreadView retry', () => {reason: 'auth-required',authMethods: [{ id: 'test_login', name: 'Test Login' }],},+ attempts: 1,},],});@@ -2155,6 +2157,7 @@ describe('ThreadView retry', () => {reason: 'auth-required',authMethods: [{ id: 'test_login', name: 'Test Login' }],},+ attempts: 1,},],});@@ -2190,6 +2193,7 @@ describe('ThreadView retry', () => {},],},+ attempts: 1,},],});@@ -2257,6 +2261,7 @@ describe('ThreadView failure notices', () => {text: '',tone: 'error',failure: null,+ attempts: 1,...overrides,};}@@ -2331,6 +2336,39 @@ describe('ThreadView failure notices', () => {expect(card.textContent).toBe('session setup failed: boom');expect(screen.queryByTestId('agent-thread-notice-details-toggle')).toBeNull();});++ // Regression guard for extractRootCauseLine: npm prints the cause up-front+ // and follows it with an "A complete log of this run can be found in: …"+ // epilogue. A last-match heuristic picks the log-path — the single line+ // this feature exists to skip past.+ test('root-cause line picks the CAUSE, not the "complete log" epilogue', () => {+ const stderr = [+ 'npm error code EUSAGE',+ 'npm error',+ 'npm error usage: npm ci',+ 'npm error',+ 'npm error Run npm help ci for more info',+ 'npm error',+ 'npm error A complete log of this run can be found in: /tmp/log.txt',+ ].join('\n');+ model = makeModel({+ turnActive: false,+ items: [+ notice({+ failure: {+ reason: 'connect',+ agentMessage: 'initialize failed',+ machineDetail: stderr,+ },+ }),+ ],+ });+ render(<ThreadView info={makeInfo({ status: 'error' })} />);++ const rootCause = screen.getByTestId('agent-thread-notice-root-cause');+ expect(rootCause.textContent).toContain('code EUSAGE');+ expect(rootCause.textContent).not.toContain('complete log of this run');+ });});/**diff --git a/packages/app/src/components/acp/ThreadView.tsx b/packages/app/src/components/acp/ThreadView.tsxindex 0ecbf5085..032a101c6 100644--- a/packages/app/src/components/acp/ThreadView.tsx+++ b/packages/app/src/components/acp/ThreadView.tsx@@ -18,6 +18,7 @@ import type {ThreadFailureDetail,ThreadInfo,} from '@inkeep/open-knowledge-core/acp/thread-protocol';+import { plural } from '@lingui/core/macro';import { useLingui } from '@lingui/react/macro';import {ArrowUp,@@ -232,6 +233,59 @@ function isRetryableFailure(failure: ThreadFailureDetail): boolean {return RETRYABLE_FAILURE_REASONS.has(failure.reason);}+/**+ * The one line in an ACP failure's stderr tail that names WHY it failed —+ * pulled out and rendered above the "Show details" toggle so a reader gets+ * the diagnostic without expanding a wall of unrelated warnings. Matches+ * common failure signals from the tools ACP agents spawn (npm/npx, uv/uvx,+ * shell, node). Returns null when nothing looks like an error signal — the+ * card then falls back to the plain "Show details" toggle it always had.+ *+ * FIRST match wins. npm prints the terminating cause up-front (`npm error+ * code EUSAGE`) and follows with a metadata + summary block that ends in+ * `npm error A complete log of this run can be found in: …` — a last-match+ * heuristic surfaces the log-path epilogue instead of the cause, which is+ * exactly what this feature exists to skip past. `\s+\S` after the prefix+ * skips bare `npm error` separator lines (npm block output uses them as+ * blank rules between metadata groups).+ */+const ROOT_CAUSE_PATTERN =+ /^\s*(?:npm\s+(?:error|ERR!)\s+\S|error:\s*\S|Error:\s*\S|fatal:\s*\S|panic:\s*\S)/;+function extractRootCauseLine(machineDetail: string): string | null {+ const lines = machineDetail.split('\n');+ for (let i = 0; i < lines.length; i += 1) {+ const line = lines[i]?.trim() ?? '';+ if (line !== '' && ROOT_CAUSE_PATTERN.test(line)) return line;+ }+ return null;+}++/**+ * Colorize the stderr detail so `error` / `warn` lines are visible at a+ * glance instead of drowning in a wall of same-color monospace. Same+ * classifier as `extractRootCauseLine`, plus an `npm warn` / `warning:`+ * amber tier. Neutral lines keep the container's muted colour.+ */+const STDERR_ERROR_PATTERN = /^\s*(?:npm\s+(?:error|ERR!)|error:|Error:|fatal:|panic:)/;+const STDERR_WARN_PATTERN = /^\s*(?:npm\s+warn|warning:|warn:)/;+function highlightStderr(machineDetail: string): ReactNode {+ const lines = machineDetail.split('\n');+ return lines.map((line, i) => {+ const key = `${i}:${line.slice(0, 32)}`;+ const cls = STDERR_ERROR_PATTERN.test(line)+ ? 'text-red-600 dark:text-red-400'+ : STDERR_WARN_PATTERN.test(line)+ ? 'text-amber-700 dark:text-amber-400'+ : '';+ return (+ <span key={key} className={cls}>+ {line}+ {i < lines.length - 1 ? '\n' : ''}+ </span>+ );+ });+}+export function ThreadView({info,active = true,@@ -2188,6 +2242,10 @@ function ThreadNotice({}};const headline = failure === null ? null : failureHeadline(failure.reason);+ const rootCauseLine =+ failure?.machineDetail !== undefined && failure.machineDetail !== ''+ ? extractRootCauseLine(failure.machineDetail)+ : null;return (<divclassName={cn(@@ -2197,15 +2255,34 @@ function ThreadNotice({: 'border-amber-500/30 bg-amber-500/5 text-amber-700 dark:text-amber-400',)}data-testid="agent-thread-notice"+ data-notice-attempts={item.attempts}>{failure === null ? (item.text) : (<>- <p>{headline}</p>+ <p>+ {headline}+ {item.attempts > 1 ? (+ <span className="ml-1.5 opacity-70" data-testid="agent-thread-notice-attempts">+ {t`(${plural(item.attempts, { one: '# attempt', other: '# attempts' })})`}+ </span>+ ) : null}+ </p>{failure.agentMessage !== undefined && failure.agentMessage !== '' ? (<p className="mt-1 opacity-80">{failure.agentMessage}</p>) : null}+ {rootCauseLine !== null ? (+ // The one line the reader actually needs — pulled out of the+ // stderr wall so they don't have to expand "Show details" and+ // scan for `npm error` / `Error:` themselves.+ <p+ className="mt-1 overflow-x-auto whitespace-pre-wrap break-all font-mono text-[11px]"+ data-testid="agent-thread-notice-root-cause"+ >+ {rootCauseLine}+ </p>+ ) : null}{failure.machineDetail !== undefined && failure.machineDetail !== '' ? (<><Button@@ -2224,7 +2301,7 @@ function ThreadNotice({className="mt-1 overflow-x-auto whitespace-pre-wrap font-mono text-[10px] opacity-70"data-testid="agent-thread-notice-details">- {failure.machineDetail}+ {highlightStderr(failure.machineDetail)}</pre>) : null}</>diff --git a/packages/app/src/lib/acp/thread-event-model.test.ts b/packages/app/src/lib/acp/thread-event-model.test.tsindex b401243f4..83e94a548 100644--- a/packages/app/src/lib/acp/thread-event-model.test.ts+++ b/packages/app/src/lib/acp/thread-event-model.test.ts@@ -224,11 +224,67 @@ describe('buildThreadRenderModel', () => {// A transcript recorded before the server classified failures carries only// the headline string — it still renders, with nothing structured to show.expect(notices).toEqual([- { kind: 'notice', text: 'boom', tone: 'error', failure: null },- { kind: 'notice', text: 'sign in', tone: 'info', failure: null },+ { kind: 'notice', text: 'boom', tone: 'error', failure: null, attempts: 1 },+ { kind: 'notice', text: 'sign in', tone: 'info', failure: null, attempts: 1 },]);});+ test('coalesces identical adjacent error notices into one card with bumped attempt count', () => {+ // A retried launch fires the same status:error event per attempt. Without+ // dedup the transcript stacks three visually-identical cards for one+ // failure — the reader has to click through each to find the retry+ // button on the last. Same reason + agentMessage + machineDetail + tone+ // + text is the "same failure again" heuristic.+ const failure = {+ reason: 'connect' as const,+ agentMessage: 'initialize failed: ACP connection closed',+ machineDetail: 'npm error Override without name: @modelcontextprotocol/sdk>zod',+ };+ const events: ThreadEvent[] = [+ ev({ kind: 'status', status: 'error', detail: 'connect failed', failure, ts: 1 }),+ ev({ kind: 'status', status: 'error', detail: 'connect failed', failure, ts: 2 }),+ ev({ kind: 'status', status: 'error', detail: 'connect failed', failure, ts: 3 }),+ ];+ const notices = buildThreadRenderModel(events).items.filter((i) => i.kind === 'notice');+ expect(notices).toHaveLength(1);+ expect(notices[0]).toMatchObject({ attempts: 3, failure });+ });++ test('a live failure after `ready` does NOT merge into the retired notice', () => {+ // Regression guard for the coalesce/superseded interaction: without the+ // `last.superseded !== true` guard, an identical failure arriving after+ // `ready` retired the previous notice would coalesce into that retired+ // notice (the spread carries `superseded: true` forward), and the view+ // would filter the merged card out entirely — the live failure would+ // render nowhere, with no Retry button.+ const failure = { reason: 'connect' as const, agentMessage: 'boom' };+ const model = buildThreadRenderModel([+ ev({ kind: 'status', status: 'error', detail: 'boom', failure, ts: 1 }),+ ev({ kind: 'status', status: 'ready', ts: 2 }),+ ev({ kind: 'status', status: 'error', detail: 'boom', failure, ts: 3 }),+ ]);+ const notices = model.items.filter((i) => i.kind === 'notice');+ expect(notices).toHaveLength(2);+ expect(notices[0]?.kind === 'notice' && notices[0].superseded).toBe(true);+ expect(notices[1]?.kind === 'notice' && notices[1].superseded).not.toBe(true);+ expect(notices[1]?.kind === 'notice' && notices[1].attempts).toBe(1);+ });++ test('a genuinely different failure between two attempts gets its own card', () => {+ // If the machineDetail changes between attempts (different stderr, e.g.+ // attempt 1 fails on missing node, attempt 2 on install error), the two+ // failures are genuinely distinct — reader needs to see both.+ const first = { reason: 'connect' as const, machineDetail: 'boom-A' };+ const second = { reason: 'connect' as const, machineDetail: 'boom-B' };+ const events: ThreadEvent[] = [+ ev({ kind: 'status', status: 'error', detail: 'x', failure: first, ts: 1 }),+ ev({ kind: 'status', status: 'error', detail: 'x', failure: second, ts: 2 }),+ ];+ const notices = buildThreadRenderModel(events).items.filter((i) => i.kind === 'notice');+ expect(notices).toHaveLength(2);+ expect(notices.every((n) => n.kind === 'notice' && n.attempts === 1)).toBe(true);+ });+test('carries a structured failure onto the notice it produces', () => {const failure = {reason: 'auth-required' as const,@@ -577,8 +633,15 @@ describe('startup failures a later ready retires', () => {]);expect(model.items.filter((i) => i.kind === 'notice' && i.superseded !== true)).toHaveLength(0);- // Marked, not dropped: positions are load-bearing for the fold's indexes.- expect(model.items).toHaveLength(2);+ // Two identical `auth_required` events coalesce into ONE notice with+ // `attempts: 2` before `ready` retires it — see the coalesce test in+ // `buildThreadRenderModel`. Positions still load-bearing: the fold+ // replaced-in-place instead of pushing, so index maps stayed valid.+ expect(model.items).toHaveLength(1);+ const notice = model.items[0];+ if (notice?.kind !== 'notice') throw new Error('unreachable');+ expect(notice.attempts).toBe(2);+ expect(notice.superseded).toBe(true);});// A prompt failure happened inside a live session, so a later `ready` saysdiff --git a/packages/app/src/lib/acp/thread-event-model.ts b/packages/app/src/lib/acp/thread-event-model.tsindex 88f1a7a00..1c73c62d8 100644--- a/packages/app/src/lib/acp/thread-event-model.ts+++ b/packages/app/src/lib/acp/thread-event-model.ts@@ -94,6 +94,13 @@ interface RenderedNotice {* view.*/superseded?: boolean;+ /**+ * How many identical error events collapsed into this notice. 1 for a+ * single failure; N when the launch retried and every attempt failed with+ * the same `reason` + `agentMessage` + `machineDetail`. See the coalesce+ * block in `applyEvent(status)` for the exact match rule.+ */+ attempts: number;}/**@@ -334,12 +341,35 @@ export class ThreadRenderModelBuilder {// A structured failure alone is enough: the view composes its own// copy from `reason`, so the server no longer has to ship a string.if (event.failure !== undefined || (event.detail ?? '') !== '') {- this.items.push({+ const next: RenderedNotice = {kind: 'notice',text: event.detail ?? '',tone: event.status === 'error' ? 'error' : 'info',failure: event.failure ?? null,- });+ attempts: 1,+ };+ // Coalesce adjacent identical failures into ONE card whose+ // attempt count grows. The launch's retry loop fires a status+ // event per attempt, and without this the transcript stacked+ // three visually-identical error cards for one bad spawn — the+ // reader had to click through each to find the retry button on+ // the last. Same `reason` + `agentMessage` + `machineDetail` ++ // `tone` + text is our proxy for "the same failure, again"; if+ // any of those differ the failure is genuinely new and gets its+ // own card.+ const last = this.items[this.items.length - 1];+ // A superseded notice was retired by a later `ready`; merging into+ // it would carry `superseded: true` forward via the spread and the+ // live failure would render nowhere (ThreadView filters superseded+ // out entirely). Force a new card in that case.+ if (last?.kind === 'notice' && last.superseded !== true && isSameFailure(last, next)) {+ this.items[this.items.length - 1] = {+ ...last,+ attempts: last.attempts + 1,+ };+ } else {+ this.items.push(next);+ }}}break;@@ -659,6 +689,24 @@ function normalizeLocations(locations: unknown): Array<{ path: string; line?: nu}));}+/**+ * Two error notices are "the same failure again" when everything the reader+ * would see matches: tone, headline string, and every field of the structured+ * failure the card composes copy from. `attempts` is deliberately excluded —+ * it's the counter we bump on match, not a match input.+ */+function isSameFailure(a: RenderedNotice, b: RenderedNotice): boolean {+ if (a.tone !== b.tone) return false;+ if (a.text !== b.text) return false;+ if ((a.failure === null) !== (b.failure === null)) return false;+ if (a.failure !== null && b.failure !== null) {+ if (a.failure.reason !== b.failure.reason) return false;+ if ((a.failure.agentMessage ?? '') !== (b.failure.agentMessage ?? '')) return false;+ if ((a.failure.machineDetail ?? '') !== (b.failure.machineDetail ?? '')) return false;+ }+ return true;+}+function mergeToolContent(call: RenderedToolCall, content: unknown): void {if (!Array.isArray(content)) return;for (const block of content) {diff --git a/packages/app/src/locales/ar/messages.json b/packages/app/src/locales/ar/messages.jsonindex c11773da5..874a50d40 100644--- a/packages/app/src/locales/ar/messages.json+++ b/packages/app/src/locales/ar/messages.json@@ -1763,6 +1763,22 @@"LXfNU-": ["التنقل والاقتراحات"],"LYufDw": ["فشل تفعيل البحث الدلالي — ", ["detail"]],"LZe2vX": [" · مراجع فقط (بدون محتوى مضمن)"],+ "L_mqhg": [+ "(",+ [+ "0",+ "plural",+ {+ "zero": ["#", " محاولة"],+ "one": ["#", " محاولة"],+ "two": ["#", " محاولتان"],+ "few": ["#", " محاولات"],+ "many": ["#", " محاولة"],+ "other": ["#", " محاولة"]+ }+ ],+ ")"+ ],"LaskKp": ["الإرسال إلى المحادثة (", ["0"], ")"],"Lbl6KA": ["تعذّر التثبيت من ", ["0"], ": ", ["1"]],"LbmLyU": ["لا يمكن تحرير إعداد هذه الأداة بأمان"],diff --git a/packages/app/src/locales/ar/messages.po b/packages/app/src/locales/ar/messages.poindex e23176312..38a99d39e 100644--- a/packages/app/src/locales/ar/messages.po+++ b/packages/app/src/locales/ar/messages.po@@ -100,6 +100,11 @@ msgstr "«{trimmed}» موجود هنا بالفعل"msgid "\"frontmatter\" is a reserved property name"msgstr "«frontmatter» اسم خاصية محجوز"+#. placeholder {0}: item.attempts+#: src/components/acp/ThreadView.tsx+msgid "({0, plural, one {# attempt} other {# attempts}})"+msgstr "({0, plural, zero {# محاولة} one {# محاولة} two {# محاولتان} few {# محاولات} many {# محاولة} other {# محاولة}})"+#: src/components/settings/LintingSection.tsxmsgid "(a bare folder name needs /** after it to match what's inside)"msgstr "(اسم المجلد وحده يحتاج إلى /** بعده ليطابق ما بداخله)"diff --git a/packages/app/src/locales/bn/messages.json b/packages/app/src/locales/bn/messages.jsonindex c70c60198..3097b02b1 100644--- a/packages/app/src/locales/bn/messages.json+++ b/packages/app/src/locales/bn/messages.json@@ -1501,6 +1501,7 @@"LXfNU-": ["নেভিগেশন ও পরামর্শ"],"LYufDw": ["অর্থভিত্তিক অনুসন্ধান চালু করতে ব্যর্থ — ", ["detail"]],"LZe2vX": [" · শুধু রেফারেন্স (কোনো এম্বেড করা বিষয়বস্তু নেই)"],+ "L_mqhg": ["(", ["0", "plural", { "one": ["#", " প্রচেষ্টা"], "other": ["#", " প্রচেষ্টা"] }], ")"],"LaskKp": ["আলাপে পাঠান (", ["0"], ")"],"Lbl6KA": [["0"], " থেকে ইনস্টল করা যায়নি: ", ["1"]],"LbmLyU": ["এই টুলের কনফিগ নিরাপদে সম্পাদনা করা যাচ্ছে না"],diff --git a/packages/app/src/locales/bn/messages.po b/packages/app/src/locales/bn/messages.poindex 6b119d84e..f096f206c 100644--- a/packages/app/src/locales/bn/messages.po+++ b/packages/app/src/locales/bn/messages.po@@ -100,6 +100,11 @@ msgstr "\"{trimmed}\" এখানে আগে থেকেই আছে"msgid "\"frontmatter\" is a reserved property name"msgstr "\"frontmatter\" একটি সংরক্ষিত প্রপার্টি নাম"+#. placeholder {0}: item.attempts+#: src/components/acp/ThreadView.tsx+msgid "({0, plural, one {# attempt} other {# attempts}})"+msgstr "({0, plural, one {# প্রচেষ্টা} other {# প্রচেষ্টা}})"+#: src/components/settings/LintingSection.tsxmsgid "(a bare folder name needs /** after it to match what's inside)"msgstr "(শুধু ফোল্ডারের নামের পরে /** যোগ করলে তবেই ভেতরের বিষয়বস্তু মিলবে)"diff --git a/packages/app/src/locales/en/messages.json b/packages/app/src/locales/en/messages.jsonindex be9561e6e..abfdd9766 100644--- a/packages/app/src/locales/en/messages.json+++ b/packages/app/src/locales/en/messages.json@@ -1538,6 +1538,11 @@"LXfNU-": ["Navigation and suggestions"],"LYufDw": ["Failed to enable semantic search — ", ["detail"]],"LZe2vX": [" · references only (no embedded contents)"],+ "L_mqhg": [+ "(",+ ["0", "plural", { "one": ["#", " attempt"], "other": ["#", " attempts"] }],+ ")"+ ],"LaskKp": ["Send to chat (", ["0"], ")"],"Lbl6KA": ["Couldn't install from ", ["0"], ": ", ["1"]],"LbmLyU": ["Can't safely edit this tool's config"],diff --git a/packages/app/src/locales/en/messages.po b/packages/app/src/locales/en/messages.poindex 09f49d384..854016bac 100644--- a/packages/app/src/locales/en/messages.po+++ b/packages/app/src/locales/en/messages.po@@ -100,6 +100,11 @@ msgstr "\"{trimmed}\" already exists here"msgid "\"frontmatter\" is a reserved property name"msgstr "\"frontmatter\" is a reserved property name"+#. placeholder {0}: item.attempts+#: src/components/acp/ThreadView.tsx+msgid "({0, plural, one {# attempt} other {# attempts}})"+msgstr "({0, plural, one {# attempt} other {# attempts}})"+#: src/components/settings/LintingSection.tsxmsgid "(a bare folder name needs /** after it to match what's inside)"msgstr "(a bare folder name needs /** after it to match what's inside)"diff --git a/packages/app/src/locales/es/messages.json b/packages/app/src/locales/es/messages.jsonindex ca1c29d92..dc91069d5 100644--- a/packages/app/src/locales/es/messages.json+++ b/packages/app/src/locales/es/messages.json@@ -1794,6 +1794,15 @@"LXfNU-": ["Navegación y sugerencias"],"LYufDw": ["No se pudo activar la búsqueda semántica — ", ["detail"]],"LZe2vX": [" · solo referencias (sin contenido incrustado)"],+ "L_mqhg": [+ "(",+ [+ "0",+ "plural",+ { "one": ["#", " intento"], "many": ["#", " intentos"], "other": ["#", " intentos"] }+ ],+ ")"+ ],"LaskKp": ["Enviar al chat (", ["0"], ")"],"Lbl6KA": ["No se pudo instalar desde ", ["0"], ": ", ["1"]],"LbmLyU": ["No se puede editar con seguridad la configuración de esta herramienta"],diff --git a/packages/app/src/locales/es/messages.po b/packages/app/src/locales/es/messages.poindex 8e85581ee..7725550f4 100644--- a/packages/app/src/locales/es/messages.po+++ b/packages/app/src/locales/es/messages.po@@ -100,6 +100,11 @@ msgstr "\"{trimmed}\" ya existe aquí"msgid "\"frontmatter\" is a reserved property name"msgstr "\"frontmatter\" es un nombre de propiedad reservado"+#. placeholder {0}: item.attempts+#: src/components/acp/ThreadView.tsx+msgid "({0, plural, one {# attempt} other {# attempts}})"+msgstr "({0, plural, one {# intento} many {# intentos} other {# intentos}})"+#: src/components/settings/LintingSection.tsxmsgid "(a bare folder name needs /** after it to match what's inside)"msgstr "(un nombre de carpeta solo necesita /** después para coincidir con su contenido)"diff --git a/packages/app/src/locales/fr/messages.json b/packages/app/src/locales/fr/messages.jsonindex 2e20e077c..bb739161d 100644--- a/packages/app/src/locales/fr/messages.json+++ b/packages/app/src/locales/fr/messages.json@@ -1821,6 +1821,15 @@"LXfNU-": ["Navigation et suggestions"],"LYufDw": ["Échec de l'activation de la recherche sémantique — ", ["detail"]],"LZe2vX": [" · références seulement (pas de contenu intégré)"],+ "L_mqhg": [+ "(",+ [+ "0",+ "plural",+ { "one": ["#", " tentative"], "many": ["#", " tentatives"], "other": ["#", " tentatives"] }+ ],+ ")"+ ],"LaskKp": ["Envoyer dans la discussion (", ["0"], ")"],"Lbl6KA": ["Impossible d'installer depuis ", ["0"], " : ", ["1"]],"LbmLyU": ["Impossible de modifier en toute sécurité la configuration de cet outil"],diff --git a/packages/app/src/locales/fr/messages.po b/packages/app/src/locales/fr/messages.poindex ca649e295..d8bc34bba 100644--- a/packages/app/src/locales/fr/messages.po+++ b/packages/app/src/locales/fr/messages.po@@ -100,6 +100,11 @@ msgstr "« {trimmed} » existe déjà ici"msgid "\"frontmatter\" is a reserved property name"msgstr "« frontmatter » est un nom de propriété réservé"+#. placeholder {0}: item.attempts+#: src/components/acp/ThreadView.tsx+msgid "({0, plural, one {# attempt} other {# attempts}})"+msgstr "({0, plural, one {# tentative} many {# tentatives} other {# tentatives}})"+#: src/components/settings/LintingSection.tsxmsgid "(a bare folder name needs /** after it to match what's inside)"msgstr "(un nom de dossier seul doit être suivi de /** pour correspondre à son contenu)"diff --git a/packages/app/src/locales/hi/messages.json b/packages/app/src/locales/hi/messages.jsonindex e4eb6c96f..66987b49e 100644--- a/packages/app/src/locales/hi/messages.json+++ b/packages/app/src/locales/hi/messages.json@@ -1501,6 +1501,7 @@"LXfNU-": ["नेविगेशन और सुझाव"],"LYufDw": ["अर्थ-आधारित खोज सक्षम करने में विफल — ", ["detail"]],"LZe2vX": [" · केवल संदर्भ (कोई एम्बेडेड सामग्री नहीं)"],+ "L_mqhg": ["(", ["0", "plural", { "one": ["#", " प्रयास"], "other": ["#", " प्रयास"] }], ")"],"LaskKp": ["चैट में भेजें (", ["0"], ")"],"Lbl6KA": [["0"], " से इंस्टॉल नहीं किया जा सका: ", ["1"]],"LbmLyU": ["इस टूल के कॉन्फ़िग को सुरक्षित रूप से संपादित नहीं किया जा सकता"],diff --git a/packages/app/src/locales/hi/messages.po b/packages/app/src/locales/hi/messages.poindex 4d517cbaa..51947bc9e 100644--- a/packages/app/src/locales/hi/messages.po+++ b/packages/app/src/locales/hi/messages.po@@ -100,6 +100,11 @@ msgstr "\"{trimmed}\" यहाँ पहले से मौजूद है"msgid "\"frontmatter\" is a reserved property name"msgstr "\"frontmatter\" एक आरक्षित प्रॉपर्टी नाम है"+#. placeholder {0}: item.attempts+#: src/components/acp/ThreadView.tsx+msgid "({0, plural, one {# attempt} other {# attempts}})"+msgstr "({0, plural, one {# प्रयास} other {# प्रयास}})"+#: src/components/settings/LintingSection.tsxmsgid "(a bare folder name needs /** after it to match what's inside)"msgstr "(केवल फ़ोल्डर नाम के बाद /** जोड़ना ज़रूरी है ताकि उसके अंदर की सामग्री मेल खाए)"diff --git a/packages/app/src/locales/id/messages.json b/packages/app/src/locales/id/messages.jsonindex 7753371ff..94a249050 100644--- a/packages/app/src/locales/id/messages.json+++ b/packages/app/src/locales/id/messages.json@@ -1558,6 +1558,7 @@"LXfNU-": ["Navigasi dan saran"],"LYufDw": ["Gagal mengaktifkan pencarian semantik — ", ["detail"]],"LZe2vX": [" · hanya referensi (tanpa konten tertanam)"],+ "L_mqhg": ["(", ["0", "plural", { "other": ["#", " percobaan"] }], ")"],"LaskKp": ["Kirim ke obrolan (", ["0"], ")"],"Lbl6KA": ["Tidak bisa memasang dari ", ["0"], ": ", ["1"]],"LbmLyU": ["Konfigurasi alat ini tidak bisa disunting dengan aman"],diff --git a/packages/app/src/locales/id/messages.po b/packages/app/src/locales/id/messages.poindex 669d86c8a..116f8819d 100644--- a/packages/app/src/locales/id/messages.po+++ b/packages/app/src/locales/id/messages.po@@ -100,6 +100,11 @@ msgstr "\"{trimmed}\" sudah ada di sini"msgid "\"frontmatter\" is a reserved property name"msgstr "\"frontmatter\" adalah nama properti yang dicadangkan"+#. placeholder {0}: item.attempts+#: src/components/acp/ThreadView.tsx+msgid "({0, plural, one {# attempt} other {# attempts}})"+msgstr "({0, plural, other {# percobaan}})"+#: src/components/settings/LintingSection.tsxmsgid "(a bare folder name needs /** after it to match what's inside)"msgstr "(nama folder saja memerlukan /** setelahnya agar cocok dengan isinya)"diff --git a/packages/app/src/locales/pseudo/messages.json b/packages/app/src/locales/pseudo/messages.jsonindex 46d79a2fa..ed44bcdce 100644--- a/packages/app/src/locales/pseudo/messages.json+++ b/packages/app/src/locales/pseudo/messages.json@@ -1538,6 +1538,11 @@"LXfNU-": ["Ńàvĩĝàţĩōń àńď śũĝĝēśţĩōńś"],"LYufDw": ["Ƒàĩĺēď ţō ēńàƀĺē śēḿàńţĩć śēàŕćĥ — ", ["detail"]],"LZe2vX": [" · ŕēƒēŕēńćēś ōńĺŷ (ńō ēḿƀēďďēď ćōńţēńţś)"],+ "L_mqhg": [+ "(",+ ["0", "plural", { "one": ["#", " ãţţêḿƥţ"], "other": ["#", " ãţţêḿƥţś"] }],+ ")"+ ],"LaskKp": ["Śēńď ţō ćĥàţ (", ["0"], ")"],"Lbl6KA": ["Ćōũĺďń'ţ ĩńśţàĺĺ ƒŕōḿ ", ["0"], ": ", ["1"]],"LbmLyU": ["Ćàń'ţ śàƒēĺŷ ēďĩţ ţĥĩś ţōōĺ'ś ćōńƒĩĝ"],diff --git a/packages/app/src/locales/pseudo/messages.po b/packages/app/src/locales/pseudo/messages.poindex 0a0af81e3..d9e3c89d1 100644--- a/packages/app/src/locales/pseudo/messages.po+++ b/packages/app/src/locales/pseudo/messages.po@@ -100,6 +100,11 @@ msgstr ""msgid "\"frontmatter\" is a reserved property name"msgstr ""+#. placeholder {0}: item.attempts+#: src/components/acp/ThreadView.tsx+msgid "({0, plural, one {# attempt} other {# attempts}})"+msgstr "({0, plural, one {# ãttêmpt} other {# ãttêmpts}})"+#: src/components/settings/LintingSection.tsxmsgid "(a bare folder name needs /** after it to match what's inside)"msgstr ""diff --git a/packages/app/src/locales/pt-BR/messages.json b/packages/app/src/locales/pt-BR/messages.jsonindex 90fe02457..2cb283596 100644--- a/packages/app/src/locales/pt-BR/messages.json+++ b/packages/app/src/locales/pt-BR/messages.json@@ -1768,6 +1768,15 @@"LXfNU-": ["Navegação e sugestões"],"LYufDw": ["Falha ao ativar a busca semântica — ", ["detail"]],"LZe2vX": [" · apenas referências (sem conteúdo incorporado)"],+ "L_mqhg": [+ "(",+ [+ "0",+ "plural",+ { "one": ["#", " tentativa"], "many": ["#", " tentativas"], "other": ["#", " tentativas"] }+ ],+ ")"+ ],"LaskKp": ["Enviar para o chat (", ["0"], ")"],"Lbl6KA": ["Não deu para instalar a partir de ", ["0"], ": ", ["1"]],"LbmLyU": ["Não é seguro editar a configuração desta ferramenta"],diff --git a/packages/app/src/locales/pt-BR/messages.po b/packages/app/src/locales/pt-BR/messages.poindex aa26a20e4..bf94e5e39 100644--- a/packages/app/src/locales/pt-BR/messages.po+++ b/packages/app/src/locales/pt-BR/messages.po@@ -100,6 +100,11 @@ msgstr "\"{trimmed}\" já existe aqui"msgid "\"frontmatter\" is a reserved property name"msgstr "\"frontmatter\" é um nome de propriedade reservado"+#. placeholder {0}: item.attempts+#: src/components/acp/ThreadView.tsx+msgid "({0, plural, one {# attempt} other {# attempts}})"+msgstr "({0, plural, one {# tentativa} many {# tentativas} other {# tentativas}})"+#: src/components/settings/LintingSection.tsxmsgid "(a bare folder name needs /** after it to match what's inside)"msgstr "(um nome de pasta sozinho precisa de /** depois para corresponder ao seu conteúdo)"diff --git a/packages/app/src/locales/ur/messages.json b/packages/app/src/locales/ur/messages.jsonindex 101c4ca03..308562282 100644--- a/packages/app/src/locales/ur/messages.json+++ b/packages/app/src/locales/ur/messages.json@@ -1578,6 +1578,7 @@"LXfNU-": ["نیویگیشن اور تجاویز"],"LYufDw": ["معنوی تلاش فعال نہیں ہو سکی — ", ["detail"]],"LZe2vX": [" · صرف حوالہ جات (کوئی ایمبیڈڈ مواد نہیں)"],+ "L_mqhg": ["(", ["0", "plural", { "one": ["#", " کوشش"], "other": ["#", " کوششیں"] }], ")"],"LaskKp": ["چیٹ میں بھیجیں (", ["0"], ")"],"Lbl6KA": [["0"], " سے نصب نہیں ہو سکا: ", ["1"]],"LbmLyU": ["اس ٹول کی کنفیگ محفوظ طریقے سے ترمیم نہیں کی جا سکتی"],diff --git a/packages/app/src/locales/ur/messages.po b/packages/app/src/locales/ur/messages.poindex 1648fbefb..f5f1b0909 100644--- a/packages/app/src/locales/ur/messages.po+++ b/packages/app/src/locales/ur/messages.po@@ -100,6 +100,11 @@ msgstr "«{trimmed}» یہاں پہلے سے موجود ہے"msgid "\"frontmatter\" is a reserved property name"msgstr "«frontmatter» ایک محفوظ خصوصیت کا نام ہے"+#. placeholder {0}: item.attempts+#: src/components/acp/ThreadView.tsx+msgid "({0, plural, one {# attempt} other {# attempts}})"+msgstr "({0, plural, one {# کوشش} other {# کوششیں}})"+#: src/components/settings/LintingSection.tsxmsgid "(a bare folder name needs /** after it to match what's inside)"msgstr "(صرف فولڈر کے نام کے بعد /** لگانا ضروری ہے تاکہ اس کے اندر کا مواد مماثل ہو)"diff --git a/packages/app/src/locales/zh-Hans/messages.json b/packages/app/src/locales/zh-Hans/messages.jsonindex 9ed71ae0b..c9cb745df 100644--- a/packages/app/src/locales/zh-Hans/messages.json+++ b/packages/app/src/locales/zh-Hans/messages.json@@ -1354,6 +1354,7 @@"LXfNU-": ["导航与建议"],"LYufDw": ["开启语义搜索失败——", ["detail"]],"LZe2vX": [" · 仅引用(无嵌入内容)"],+ "L_mqhg": ["(", ["0", "plural", { "other": ["#", " 次尝试"] }], ")"],"LaskKp": ["发送到对话(", ["0"], ")"],"Lbl6KA": ["无法从 ", ["0"], " 安装:", ["1"]],"LbmLyU": ["无法安全地编辑这个工具的配置"],diff --git a/packages/app/src/locales/zh-Hans/messages.po b/packages/app/src/locales/zh-Hans/messages.poindex e9bb8407b..5ed0a9452 100644--- a/packages/app/src/locales/zh-Hans/messages.po+++ b/packages/app/src/locales/zh-Hans/messages.po@@ -100,6 +100,11 @@ msgstr "“{trimmed}”在这里已存在"msgid "\"frontmatter\" is a reserved property name"msgstr "“frontmatter”是保留的属性名"+#. placeholder {0}: item.attempts+#: src/components/acp/ThreadView.tsx+msgid "({0, plural, one {# attempt} other {# attempts}})"+msgstr "({0, plural, other {# 次尝试}})"+#: src/components/settings/LintingSection.tsxmsgid "(a bare folder name needs /** after it to match what's inside)"msgstr "(仅写文件夹名时需要在后面加 /** 才能匹配其中的内容)"diff --git a/packages/app/src/locales/zh-Hant/messages.json b/packages/app/src/locales/zh-Hant/messages.jsonindex 5fe759545..7ca25f8c7 100644--- a/packages/app/src/locales/zh-Hant/messages.json+++ b/packages/app/src/locales/zh-Hant/messages.json@@ -1370,6 +1370,7 @@"LXfNU-": ["導覽與建議"],"LYufDw": ["開啟語意搜尋失敗——", ["detail"]],"LZe2vX": [" · 僅引用(無嵌入內容)"],+ "L_mqhg": ["(", ["0", "plural", { "other": ["#", " 次嘗試"] }], ")"],"LaskKp": ["傳送到對話(", ["0"], ")"],"Lbl6KA": ["無法從 ", ["0"], " 安裝:", ["1"]],"LbmLyU": ["無法安全地編輯這個工具的設定"],diff --git a/packages/app/src/locales/zh-Hant/messages.po b/packages/app/src/locales/zh-Hant/messages.poindex 314b2b707..513b58645 100644--- a/packages/app/src/locales/zh-Hant/messages.po+++ b/packages/app/src/locales/zh-Hant/messages.po@@ -100,6 +100,11 @@ msgstr "「{trimmed}」在這裡已存在"msgid "\"frontmatter\" is a reserved property name"msgstr "「frontmatter」是保留的屬性名稱"+#. placeholder {0}: item.attempts+#: src/components/acp/ThreadView.tsx+msgid "({0, plural, one {# attempt} other {# attempts}})"+msgstr "({0, plural, other {# 次嘗試}})"+#: src/components/settings/LintingSection.tsxmsgid "(a bare folder name needs /** after it to match what's inside)"msgstr "(僅寫資料夾名稱時需要在後面加上 /** 才能符合其中的內容)"diff --git a/packages/core/src/bridge/bind-frontmatter-doc.ts b/packages/core/src/bridge/bind-frontmatter-doc.tsindex dfd95ef49..d7a845280 100644--- a/packages/core/src/bridge/bind-frontmatter-doc.ts+++ b/packages/core/src/bridge/bind-frontmatter-doc.ts@@ -1,4 +1,3 @@-import type * as Y from 'yjs';import type { Err, Ok, Result } from '../config/result.ts';import { type FrontmatterValidationError, toFrontmatterIssue } from '../frontmatter/errors.ts';diff --git a/packages/core/src/bridge/bridge-invariant.ts b/packages/core/src/bridge/bridge-invariant.tsindex 8bfdb40cd..005627195 100644--- a/packages/core/src/bridge/bridge-invariant.ts+++ b/packages/core/src/bridge/bridge-invariant.ts@@ -1,4 +1,3 @@-import { fnv1aDigest } from './hash-util.ts';export type BridgeInvariantSite = 'observer-b' | 'persistence' | 'test-harness';diff --git a/packages/core/src/bridge/compose.ts b/packages/core/src/bridge/compose.tsindex 2a597ec3d..f4cc8a286 100644--- a/packages/core/src/bridge/compose.ts+++ b/packages/core/src/bridge/compose.ts@@ -1,4 +1,3 @@-import { prependFrontmatter, stripFrontmatter } from '../extensions/frontmatter.ts';export type ComposeAdjustment = 'none' | 'body' | 'frontmatter' | 'unresolved';diff --git a/packages/core/src/bridge/divergence-locate.ts b/packages/core/src/bridge/divergence-locate.tsindex d979f4b39..6b505314d 100644--- a/packages/core/src/bridge/divergence-locate.ts+++ b/packages/core/src/bridge/divergence-locate.ts@@ -1,4 +1,3 @@-import { findFirstDivergenceIndex } from './tolerance-telemetry.ts';export const BRIDGE_LINE_KINDS = [diff --git a/packages/core/src/bridge/doc-boundary-space.ts b/packages/core/src/bridge/doc-boundary-space.tsindex 01ef76a9f..8fb428b90 100644--- a/packages/core/src/bridge/doc-boundary-space.ts+++ b/packages/core/src/bridge/doc-boundary-space.ts@@ -1,4 +1,3 @@-import { FRONTMATTER_RE, stripFrontmatter } from '../extensions/frontmatter.ts';import { carriedEdgeEmpties, type DocEdgeEmpties } from '../markdown/doc-edge-blank-runs.ts';diff --git a/packages/core/src/bridge/growth-detect.ts b/packages/core/src/bridge/growth-detect.tsindex 463e89595..9d9c244b0 100644--- a/packages/core/src/bridge/growth-detect.ts+++ b/packages/core/src/bridge/growth-detect.ts@@ -1,4 +1,3 @@-const DEFAULT_MIN_SUBSTANTIVE_LINE_LENGTH = 16;export const DUPLICATION_GATE_MIN_LINE_LENGTH = 8;diff --git a/packages/core/src/bridge/intraline-predicate.ts b/packages/core/src/bridge/intraline-predicate.tsindex 0939885bb..c43fdd7e7 100644--- a/packages/core/src/bridge/intraline-predicate.ts+++ b/packages/core/src/bridge/intraline-predicate.ts@@ -1,4 +1,3 @@-export function rawLineCounts(doc: string): Map<string, number> {const counts = new Map<string, number>();for (const line of doc.split('\n')) {diff --git a/packages/core/src/bridge/merge-three-way.ts b/packages/core/src/bridge/merge-three-way.tsindex c0dc65705..251560a35 100644--- a/packages/core/src/bridge/merge-three-way.ts+++ b/packages/core/src/bridge/merge-three-way.ts@@ -65,7 +65,6 @@ export function tryLineLevelCombine(return { clean: true, merged };}-export type BridgeMergeContentLossSide = 'user' | 'agent';export type BridgeMergeContentLossWhich = 'substring' | 'order' | 'growth';diff --git a/packages/core/src/bridge/normalize.ts b/packages/core/src/bridge/normalize.tsindex dcc5b0690..01ac80099 100644--- a/packages/core/src/bridge/normalize.ts+++ b/packages/core/src/bridge/normalize.ts@@ -1,4 +1,3 @@-import { stripFrontmatter } from '../extensions/frontmatter.ts';import { bodyEdgeEmpties } from './doc-boundary-space.ts';diff --git a/packages/core/src/bridge/pm-structural-equivalence.ts b/packages/core/src/bridge/pm-structural-equivalence.tsindex 0be5203e4..754dc5cc2 100644--- a/packages/core/src/bridge/pm-structural-equivalence.ts+++ b/packages/core/src/bridge/pm-structural-equivalence.ts@@ -32,7 +32,6 @@ const BR_SENTINEL: PmStructuralNode = { type: '__br__' };const BR_LITERAL_RE = /^<br\s*\/?>$/i;-interface DegradeEntry {readonly label: string;readonly severity: ToleranceClassSeverity;@@ -128,7 +127,6 @@ export interface ComparePmStructuralOptions {ignoreAttrs?: (attrKey: string) => boolean;}-/** Rebuild a node with `fn` applied to each child; identity when childless.* Shared by the degrade canonicalizers so none re-implements the walk. */function mapChildren(@@ -250,7 +248,6 @@ function applyDegrades(tree: PmStructuralNode): {return { normalized: current, fired };}-export function comparePmStructural(expected: PmStructuralNode,actual: PmStructuralNode,diff --git a/packages/core/src/bridge/subsequence.ts b/packages/core/src/bridge/subsequence.tsindex dca644141..af20de1e2 100644--- a/packages/core/src/bridge/subsequence.ts+++ b/packages/core/src/bridge/subsequence.ts@@ -1,4 +1,3 @@-/** True when `needle` is a subsequence of `haystack` (two-pointer, O(n+m)):* insertions in `haystack` are free; any dropped or substituted `needle` byte* fails. */diff --git a/packages/core/src/markdown/callout-transformer.ts b/packages/core/src/markdown/callout-transformer.tsindex a363dfd54..83d47404a 100644--- a/packages/core/src/markdown/callout-transformer.ts+++ b/packages/core/src/markdown/callout-transformer.ts@@ -1,4 +1,3 @@-import type { Blockquote, Paragraph, Root } from 'mdast';import type { MdxJsxAttribute, MdxJsxFlowElement } from 'mdast-util-mdx';import { visit } from 'unist-util-visit';diff --git a/packages/core/src/markdown/code-fence.ts b/packages/core/src/markdown/code-fence.tsindex 4499dbc92..9807a7e82 100644--- a/packages/core/src/markdown/code-fence.ts+++ b/packages/core/src/markdown/code-fence.ts@@ -1,4 +1,3 @@-export function selectFenceChar(info: string): '`' | '~' {return info.includes('`') ? '~' : '`';}diff --git a/packages/core/src/markdown/comment-promoter.ts b/packages/core/src/markdown/comment-promoter.tsindex 34704165b..7415c474a 100644--- a/packages/core/src/markdown/comment-promoter.ts+++ b/packages/core/src/markdown/comment-promoter.ts@@ -1,4 +1,3 @@-import type { Nodes, Paragraph, PhrasingContent, Root, RootContent, Text } from 'mdast';import { SKIP, visit } from 'unist-util-visit';import type { VFile } from 'vfile';diff --git a/packages/core/src/markdown/dedent-block-jsx-close.ts b/packages/core/src/markdown/dedent-block-jsx-close.tsindex b6299a948..ece5c02a1 100644--- a/packages/core/src/markdown/dedent-block-jsx-close.ts+++ b/packages/core/src/markdown/dedent-block-jsx-close.ts@@ -1,4 +1,3 @@-import { findFencedRegions, isInsideFence } from './fence-regions.ts';const INDENTED_BLOCK_JSX_CLOSE_RE = /^([ ]{1,3})(<\/[A-Z][A-Za-z0-9_]*\s*>)([ \t]*)$/gm;diff --git a/packages/core/src/markdown/details-accordion-promoter.ts b/packages/core/src/markdown/details-accordion-promoter.tsindex acd398aa6..54774764a 100644--- a/packages/core/src/markdown/details-accordion-promoter.ts+++ b/packages/core/src/markdown/details-accordion-promoter.ts@@ -1,4 +1,3 @@-import type { Nodes, Paragraph, Parent, Root, Text } from 'mdast';import type { MdxJsxAttribute, MdxJsxFlowElement } from 'mdast-util-mdx';import { visit } from 'unist-util-visit';diff --git a/packages/core/src/markdown/div-align-promoter.ts b/packages/core/src/markdown/div-align-promoter.tsindex ba9b56384..43ecdc709 100644--- a/packages/core/src/markdown/div-align-promoter.ts+++ b/packages/core/src/markdown/div-align-promoter.ts@@ -1,4 +1,3 @@-import type { Nodes, Paragraph, Parent, Root, Text } from 'mdast';import type { MdxJsxFlowElement } from 'mdast-util-mdx';import { visit } from 'unist-util-visit';diff --git a/packages/core/src/markdown/fence-regions.ts b/packages/core/src/markdown/fence-regions.tsindex 4513da9bb..6d3f3643e 100644--- a/packages/core/src/markdown/fence-regions.ts+++ b/packages/core/src/markdown/fence-regions.ts@@ -1,4 +1,3 @@-const FENCE_RE = /^(`{3,}|~{3,})/gm;export function findFencedRegions(src: string): Array<[number, number]> {diff --git a/packages/core/src/markdown/fixtures/index.ts b/packages/core/src/markdown/fixtures/index.tsindex 6931623c7..00f5771ee 100644--- a/packages/core/src/markdown/fixtures/index.ts+++ b/packages/core/src/markdown/fixtures/index.ts@@ -1,4 +1,3 @@-import { readFileSync } from 'node:fs';import { dirname, resolve } from 'node:path';import { fileURLToPath } from 'node:url';@@ -9,7 +8,6 @@ function fixturePath(...segments: string[]): string {return resolve(FIXTURES_DIR, ...segments);}-interface GfmExample {section: string;markdown: string;@@ -19,7 +17,6 @@ export function loadGfmExamples(): GfmExample[] {return JSON.parse(readFileSync(fixturePath('gfm', 'examples.json'), 'utf8')) as GfmExample[];}-interface MdxCrashEntry {id: string;input: string;@@ -71,7 +68,6 @@ export function loadLargeEmbedFixtures(): LargeEmbedFixture[] {) as LargeEmbedFixture[];}-export function loadPrd6955Before(): string {return readFileSync(fixturePath('regression', 'prd-6955-before.md'), 'utf8');}@@ -80,7 +76,6 @@ export function loadPrd6955CorruptedTriplicated(): string {return readFileSync(fixturePath('regression', 'prd-6955-corrupted-triplicated.md'), 'utf8');}-export interface NgPinnedCase {id: string;name: string;@@ -97,7 +92,6 @@ export function loadNgPinnedCases(): NgPinnedCase[] {) as NgPinnedCase[];}-export function loadLargeRealistic(): string {return readFileSync(fixturePath('perf', 'large-realistic.md'), 'utf8');}diff --git a/packages/core/src/markdown/fixtures/perf/generate.ts b/packages/core/src/markdown/fixtures/perf/generate.tsindex daa3ef82b..8b1eb8519 100644--- a/packages/core/src/markdown/fixtures/perf/generate.ts+++ b/packages/core/src/markdown/fixtures/perf/generate.ts@@ -1,4 +1,3 @@-import { writeFileSync } from 'node:fs';import { dirname, resolve } from 'node:path';import { fileURLToPath } from 'node:url';@@ -11,7 +10,6 @@ const BASELINE_ONLY_COUNTS = [500, 2500] as const;const SEED = 0xf1de1117;-function mulberry32(seed: number): () => number {let a = seed >>> 0;return () => {@@ -38,7 +36,6 @@ function pickWeighted<T>(rand: () => number, items: readonly [T, number][]): T {return items[items.length - 1][0];}-const WORDS = ['lorem','ipsum',@@ -156,7 +153,6 @@ function mdxBlock(rand: () => number): string {return `<${name}>\n\n${sentence(rand)}\n\n</${name}>`;}-type BlockKind = 'paragraph' | 'heading' | 'list' | 'code' | 'table' | 'mdx';const MIX: readonly [BlockKind, number][] = [@@ -195,7 +191,6 @@ function generateDocument(blockCount: number, seed: number): string {return `${blocks.join('\n\n')}\n`;}-function main(): void {for (const count of [...BLOCK_COUNTS, ...BASELINE_ONLY_COUNTS]) {const doc = generateDocument(count, SEED);diff --git a/packages/core/src/markdown/guard-flanking-matrix.ts b/packages/core/src/markdown/guard-flanking-matrix.tsindex 32c055c5b..420dc0fe5 100644--- a/packages/core/src/markdown/guard-flanking-matrix.ts+++ b/packages/core/src/markdown/guard-flanking-matrix.ts@@ -7,7 +7,6 @@ import {import { BACKSLASH_GUARD_SUBSTITUTIONS, encodeBackslashEscapes } from './backslash-escape-guard.ts';import { ENTITY_REF_GUARD_SUBSTITUTIONS, encodeEntityRefs } from './entity-ref-guard.ts';-export const ATTENTION_DELIMITERS = ['*', '_', '**', '~~', '=='] as const;export type FlankClass = 'whitespace' | 'punctuation' | 'other';diff --git a/packages/core/src/markdown/handler-shadow-audit.ts b/packages/core/src/markdown/handler-shadow-audit.tsindex 283913255..2653473da 100644--- a/packages/core/src/markdown/handler-shadow-audit.ts+++ b/packages/core/src/markdown/handler-shadow-audit.ts@@ -1,4 +1,3 @@-export interface HandlerShadowWitness {input: string;expect: 'byte' | 'byte-and-reparse-type';diff --git a/packages/core/src/markdown/highlight-promoter.ts b/packages/core/src/markdown/highlight-promoter.tsindex 5d1000cc4..da0a81d23 100644--- a/packages/core/src/markdown/highlight-promoter.ts+++ b/packages/core/src/markdown/highlight-promoter.ts@@ -1,4 +1,3 @@-import type { Nodes, Parent, PhrasingContent, Root, Text } from 'mdast';import type { MdxJsxTextElement } from 'mdast-util-mdx';import { SKIP, visit } from 'unist-util-visit';diff --git a/packages/core/src/markdown/html-to-mdast.ts b/packages/core/src/markdown/html-to-mdast.tsindex 9681c0056..787315157 100644--- a/packages/core/src/markdown/html-to-mdast.ts+++ b/packages/core/src/markdown/html-to-mdast.ts@@ -1,4 +1,3 @@-import type { Element as HastElement, Root as HastRoot } from 'hast';import type { List, Nodes as MdastNodes, Root as MdastRoot } from 'mdast';import rehypeParse from 'rehype-parse';@@ -129,8 +128,7 @@ export function htmlToMdast(html: string, options?: HtmlToMdastOptions): MdastRothrow new HtmlPayloadTooLargeError(html.length, maxBytes);}- const processor = unified()- .use(rehypeParse, { fragment: true });+ const processor = unified().use(rehypeParse, { fragment: true });for (const plugin of cleanupPlugins) {processor.use(plugin);diff --git a/packages/core/src/markdown/image-promoter.ts b/packages/core/src/markdown/image-promoter.tsindex 994eb6917..706fa9afb 100644--- a/packages/core/src/markdown/image-promoter.ts+++ b/packages/core/src/markdown/image-promoter.ts@@ -1,4 +1,3 @@-import type { Image, Paragraph, Root } from 'mdast';import type { MdxJsxAttribute, MdxJsxFlowElement } from 'mdast-util-mdx';import { visit } from 'unist-util-visit';diff --git a/packages/core/src/markdown/index.ts b/packages/core/src/markdown/index.tsindex ec1ac1b7e..779e27500 100644--- a/packages/core/src/markdown/index.ts+++ b/packages/core/src/markdown/index.ts@@ -1,4 +1,3 @@-import {type FromProseMirrorOptions,fromPmMark,@@ -207,7 +206,6 @@ export class MarkdownManager {}}-const registry = createRegistry();function destructureAttrs(@@ -256,7 +254,6 @@ function destructureAttrs(return result;}-function hasDirtyDescendant(node: PmNode): boolean {let found = false;node.descendants((child) => {@@ -279,7 +276,6 @@ function effectiveDirty(node: PmNode, freshnessChecker?: StructuralFreshnessChecreturn freshnessChecker ? freshnessChecker.isDiverged(node.toJSON()) : false;}-function isEmptyMdastParagraph(node: MdastNodes): boolean {if (node.type !== 'paragraph') return false;const children = node.children ?? [];@@ -348,7 +344,6 @@ function extractTextFromMdastNodes(nodes: MdastNodes[]): string {return out;}-import {AUDIO_EXTENSIONS,FILE_ATTACHMENT_EXTENSIONS,@@ -601,7 +596,6 @@ function buildMdastToPmHandlers(}));}-if (m.emphasis) {handlers.emphasis = toPmMark(m.emphasis, (node: Emphasis) => ({sourceDelimiter: node.data?.sourceDelimiter ?? '*',@@ -682,7 +676,6 @@ function buildMdastToPmHandlers(}));}-if (m.link) {const sourceLiteralMark = m.sourceLiteral;handlers.link = (node: Link, _parent: MdastParent, state: MdastToPmState) => {@@ -980,7 +973,6 @@ function buildMdastToPmHandlers(};}-const blockUnknownHandler = (node: {type: string;position?: { start: { offset: number }; end: { offset: number } };@@ -1106,7 +1098,6 @@ function buildMdastToPmHandlers(return handlers as RemarkProseMirrorOptions['handlers'];}-function buildPmToMdastHandlers(schema: Schema,freshness: FreshnessCheckerHolder,diff --git a/packages/core/src/markdown/lint/applies-to.ts b/packages/core/src/markdown/lint/applies-to.tsindex b79e9aef7..fa0be9e86 100644--- a/packages/core/src/markdown/lint/applies-to.ts+++ b/packages/core/src/markdown/lint/applies-to.ts@@ -1,4 +1,3 @@-import picomatch from 'picomatch';import { SUPPORTED_DOC_EXTENSIONS } from '../../constants/doc-extensions.ts';diff --git a/packages/core/src/markdown/lint/config-files.ts b/packages/core/src/markdown/lint/config-files.tsindex 94b34dee1..312c9c74b 100644--- a/packages/core/src/markdown/lint/config-files.ts+++ b/packages/core/src/markdown/lint/config-files.ts@@ -1,4 +1,3 @@-const MARKDOWNLINT_JSON_CONFIG_FILES: ReadonlySet<string> = new Set(['.markdownlint.json','.markdownlint.jsonc',diff --git a/packages/core/src/markdown/lint/config-schemas.ts b/packages/core/src/markdown/lint/config-schemas.tsindex 7d97004fb..3d4814597 100644--- a/packages/core/src/markdown/lint/config-schemas.ts+++ b/packages/core/src/markdown/lint/config-schemas.ts@@ -51,7 +51,6 @@ const fullPluginShape = Object.fromEntries(LINT_PLUGINS.map((plugin) => [plugin.id, plugin.sliceSchema]),) as z.ZodRawShape;-export const LinterConfigSchema = z.object({enabled: z.boolean(),plugins: z.object(fullPluginShape),diff --git a/packages/core/src/markdown/lint/default-config.ts b/packages/core/src/markdown/lint/default-config.tsindex a51f2ffb0..d48eea5e4 100644--- a/packages/core/src/markdown/lint/default-config.ts+++ b/packages/core/src/markdown/lint/default-config.ts@@ -6,7 +6,6 @@ export const DEFAULT_MARKDOWNLINT_CONFIG: Record<string, MarkdownlintRuleSettingMD013: false,};-export function resolveMarkdownlintConfig(rules: Record<string, MarkdownlintRuleSetting> | undefined,): Configuration {diff --git a/packages/core/src/markdown/lint/frontmatter-schema-edit.ts b/packages/core/src/markdown/lint/frontmatter-schema-edit.tsindex 9c9542661..ef478e268 100644--- a/packages/core/src/markdown/lint/frontmatter-schema-edit.ts+++ b/packages/core/src/markdown/lint/frontmatter-schema-edit.ts@@ -1,4 +1,3 @@-import { CANONICAL_SCHEMA_DIALECT_URIS, DEFAULT_SCHEMA_DIALECT } from './frontmatter-validate.ts';export interface FrontmatterFieldConstraint {diff --git a/packages/core/src/markdown/lint/frontmatter-validate.ts b/packages/core/src/markdown/lint/frontmatter-validate.tsindex ca6eed91c..eba37cee7 100644--- a/packages/core/src/markdown/lint/frontmatter-validate.ts+++ b/packages/core/src/markdown/lint/frontmatter-validate.ts@@ -1,4 +1,3 @@-import Ajv, { type ValidateFunction } from 'ajv';import Ajv2019 from 'ajv/dist/2019.js';import Ajv2020 from 'ajv/dist/2020.js';diff --git a/packages/core/src/markdown/lint/index.ts b/packages/core/src/markdown/lint/index.tsindex 9c2a0875e..ae5ff2924 100644--- a/packages/core/src/markdown/lint/index.ts+++ b/packages/core/src/markdown/lint/index.ts@@ -1,4 +1,3 @@-import { LINT_PLUGINS, type LinterConfig } from './plugins.ts';import type { LintDiagnostic } from './types.ts';diff --git a/packages/core/src/markdown/lint/okf-frontmatter/materialize.ts b/packages/core/src/markdown/lint/okf-frontmatter/materialize.tsindex f438f1b16..7a5af097e 100644--- a/packages/core/src/markdown/lint/okf-frontmatter/materialize.ts+++ b/packages/core/src/markdown/lint/okf-frontmatter/materialize.ts@@ -1,4 +1,3 @@-import type { OkfRuleId } from '../okf-rule-meta.ts';import { fileNameFor, OKF_SCHEMA_DIR, okfSchemaPathFor } from './paths.ts';import { OKF_FRONTMATTER_REGISTRY } from './registry.ts';diff --git a/packages/core/src/markdown/lint/okf-frontmatter/paths.ts b/packages/core/src/markdown/lint/okf-frontmatter/paths.tsindex c290b6878..1ee913527 100644--- a/packages/core/src/markdown/lint/okf-frontmatter/paths.ts+++ b/packages/core/src/markdown/lint/okf-frontmatter/paths.ts@@ -1,4 +1,3 @@-import type { OkfRuleId } from '../okf-rule-meta.ts';export const OKF_SCHEMA_DIR = '.ok/okf';diff --git a/packages/core/src/markdown/lint/okf-frontmatter/registry.ts b/packages/core/src/markdown/lint/okf-frontmatter/registry.tsindex 5168602d5..de09740c5 100644--- a/packages/core/src/markdown/lint/okf-frontmatter/registry.ts+++ b/packages/core/src/markdown/lint/okf-frontmatter/registry.ts@@ -1,4 +1,3 @@-import { compileAppliesTo } from '../applies-to.ts';import { validateFrontmatterSource } from '../frontmatter-validate.ts';import { isOkfRuleEnabled, type OkfRuleId, type OkfRuleToggles } from '../okf-rule-meta.ts';diff --git a/packages/core/src/markdown/lint/okf-frontmatter/schemas.ts b/packages/core/src/markdown/lint/okf-frontmatter/schemas.tsindex 89845d3d5..f1c37671b 100644--- a/packages/core/src/markdown/lint/okf-frontmatter/schemas.ts+++ b/packages/core/src/markdown/lint/okf-frontmatter/schemas.ts@@ -1,4 +1,3 @@-// file-level form is deliberate: the sibling `biome-ignore` must sit on the line// oxlint-disable unicorn/no-thenablediff --git a/packages/core/src/markdown/lint/okf-project/rules.ts b/packages/core/src/markdown/lint/okf-project/rules.tsindex 8b476332e..6d691ae2b 100644--- a/packages/core/src/markdown/lint/okf-project/rules.ts+++ b/packages/core/src/markdown/lint/okf-project/rules.ts@@ -1,4 +1,3 @@-import { SUPPORTED_DOC_EXTENSIONS } from '../../../constants/doc-extensions.ts';import { isOkfRuleEnabled, type OkfRuleId, type OkfRuleToggles } from '../okf-rule-meta.ts';diff --git a/packages/core/src/markdown/lint/okf-rule-meta.ts b/packages/core/src/markdown/lint/okf-rule-meta.tsindex 44913a9dc..4de50d79f 100644--- a/packages/core/src/markdown/lint/okf-rule-meta.ts+++ b/packages/core/src/markdown/lint/okf-rule-meta.ts@@ -1,4 +1,3 @@-export const OKF_RULE_IDS = ['no-wiki-links','log-shape',diff --git a/packages/core/src/markdown/lint/okf-rules.ts b/packages/core/src/markdown/lint/okf-rules.tsindex d0999b62e..1d5538421 100644--- a/packages/core/src/markdown/lint/okf-rules.ts+++ b/packages/core/src/markdown/lint/okf-rules.ts@@ -1,4 +1,3 @@-import { isOkfRuleEnabled, type OkfRuleId, type OkfRuleToggles } from './okf-rule-meta.ts';import type { OkfRule } from './okf-runner.ts';import { indexShape } from './rules/index-shape.ts';diff --git a/packages/core/src/markdown/lint/okf-runner.ts b/packages/core/src/markdown/lint/okf-runner.tsindex fabb08d6e..de130e3f4 100644--- a/packages/core/src/markdown/lint/okf-runner.ts+++ b/packages/core/src/markdown/lint/okf-runner.ts@@ -1,4 +1,3 @@-import type { Root } from 'mdast';import remarkFrontmatter from 'remark-frontmatter';import remarkGfm from 'remark-gfm';diff --git a/packages/core/src/markdown/lint/plugins.ts b/packages/core/src/markdown/lint/plugins.tsindex 03efcf66c..4b9df9c56 100644--- a/packages/core/src/markdown/lint/plugins.ts+++ b/packages/core/src/markdown/lint/plugins.ts@@ -1,4 +1,3 @@-import { z } from 'zod';import { DEFAULT_MARKDOWNLINT_CONFIG, resolveMarkdownlintConfig } from './default-config.ts';import {@@ -18,7 +17,6 @@ import {type OkfSlice,} from './types.ts';-const MarkdownlintRuleSettingSchema = z.union([z.boolean(),z.enum(MARKDOWNLINT_RULE_SEVERITIES),diff --git a/packages/core/src/markdown/lint/rules/index-shape.ts b/packages/core/src/markdown/lint/rules/index-shape.tsindex fcbb1b56c..59fe9b87d 100644--- a/packages/core/src/markdown/lint/rules/index-shape.ts+++ b/packages/core/src/markdown/lint/rules/index-shape.ts@@ -1,4 +1,3 @@-import type { List, ListItem } from 'mdast';import { EXIT, visit } from 'unist-util-visit';import { defineScopedOkfRule } from '../okf-runner.ts';diff --git a/packages/core/src/markdown/lint/rules/log-shape.ts b/packages/core/src/markdown/lint/rules/log-shape.tsindex 431e4e9c8..e0159519f 100644--- a/packages/core/src/markdown/lint/rules/log-shape.ts+++ b/packages/core/src/markdown/lint/rules/log-shape.ts@@ -1,4 +1,3 @@-import type { Heading } from 'mdast';import { toString as headingText } from 'mdast-util-to-string';import { visit } from 'unist-util-visit';diff --git a/packages/core/src/markdown/lint/rules/no-wiki-links.ts b/packages/core/src/markdown/lint/rules/no-wiki-links.tsindex f75a04d15..2123e977f 100644--- a/packages/core/src/markdown/lint/rules/no-wiki-links.ts+++ b/packages/core/src/markdown/lint/rules/no-wiki-links.ts@@ -1,4 +1,3 @@-import type { Point } from 'unist';import { visit } from 'unist-util-visit';import { defineOkfRule } from '../okf-runner.ts';diff --git a/packages/core/src/markdown/lint/rules/reserved-casing.ts b/packages/core/src/markdown/lint/rules/reserved-casing.tsindex c8b4d8f28..89ef3e4a9 100644--- a/packages/core/src/markdown/lint/rules/reserved-casing.ts+++ b/packages/core/src/markdown/lint/rules/reserved-casing.ts@@ -1,4 +1,3 @@-import { SUPPORTED_DOC_EXTENSIONS } from '../../../constants/doc-extensions.ts';import { defineOkfRule } from '../okf-runner.ts';diff --git a/packages/core/src/markdown/lint/types.ts b/packages/core/src/markdown/lint/types.tsindex 4fa9a5a27..2a8f4a279 100644--- a/packages/core/src/markdown/lint/types.ts+++ b/packages/core/src/markdown/lint/types.ts@@ -1,4 +1,3 @@-import type { BrokenLinkReason } from '../../schemas/api/agent-write.ts';import type { OkfRuleId } from './okf-rule-meta.ts';@@ -106,7 +105,6 @@ export interface OkfSlice {generate?: { index?: boolean };}-interface RuleOptionSpecBase {key: string;description: string;diff --git a/packages/core/src/markdown/lint/validation-counts.ts b/packages/core/src/markdown/lint/validation-counts.tsindex 437cc539a..98238656e 100644--- a/packages/core/src/markdown/lint/validation-counts.ts+++ b/packages/core/src/markdown/lint/validation-counts.ts@@ -1,4 +1,3 @@-export interface ValidationSourceCounts {errorCount: number;warningCount: number;diff --git a/packages/core/src/markdown/math-promoter.ts b/packages/core/src/markdown/math-promoter.tsindex bd79424c7..a5b511f25 100644--- a/packages/core/src/markdown/math-promoter.ts+++ b/packages/core/src/markdown/math-promoter.ts@@ -1,4 +1,3 @@-import type { Code, Root } from 'mdast';import type { Math as MdastMath } from 'mdast-util-math';import type { MdxJsxAttribute, MdxJsxFlowElement } from 'mdast-util-mdx';diff --git a/packages/core/src/markdown/mdast-to-hast-handlers.ts b/packages/core/src/markdown/mdast-to-hast-handlers.tsindex 00fbc0035..ed89371d0 100644--- a/packages/core/src/markdown/mdast-to-hast-handlers.ts+++ b/packages/core/src/markdown/mdast-to-hast-handlers.ts@@ -1,4 +1,3 @@-import type { Comment, Element, ElementContent, Properties } from 'hast';import type { FootnoteDefinition, FootnoteReference } from 'mdast';import type { MdxJsxFlowElement, MdxJsxTextElement } from 'mdast-util-mdx';diff --git a/packages/core/src/markdown/mdast-to-html.ts b/packages/core/src/markdown/mdast-to-html.tsindex df788a80d..8ce2b2492 100644--- a/packages/core/src/markdown/mdast-to-html.ts+++ b/packages/core/src/markdown/mdast-to-html.ts@@ -1,4 +1,3 @@-import type { Element, Root as HastRoot, Text as HastText } from 'hast';import type { Root as MdastRoot, Text as MdastText } from 'mdast';import type { Handler } from 'mdast-util-to-hast';diff --git a/packages/core/src/markdown/merged-walker.ts b/packages/core/src/markdown/merged-walker.tsindex fa3cfcd86..bfd7e3109 100644--- a/packages/core/src/markdown/merged-walker.ts+++ b/packages/core/src/markdown/merged-walker.ts@@ -1,4 +1,3 @@-import type { Nodes, Parent, Root } from 'mdast';import { SKIP, visit } from 'unist-util-visit';import type { VFile } from 'vfile';diff --git a/packages/core/src/markdown/mermaid-promoter.ts b/packages/core/src/markdown/mermaid-promoter.tsindex 17ed2b829..1a897fca8 100644--- a/packages/core/src/markdown/mermaid-promoter.ts+++ b/packages/core/src/markdown/mermaid-promoter.ts@@ -1,4 +1,3 @@-import type { Code, Root } from 'mdast';import type { MdxJsxAttribute, MdxJsxFlowElement } from 'mdast-util-mdx';import { visit } from 'unist-util-visit';diff --git a/packages/core/src/markdown/parse-with-fallback.ts b/packages/core/src/markdown/parse-with-fallback.tsindex 4aa0490c4..d988f4b8b 100644--- a/packages/core/src/markdown/parse-with-fallback.ts+++ b/packages/core/src/markdown/parse-with-fallback.ts@@ -168,7 +168,6 @@ export function parseRecursive(}}-interface VFilePlace {offset?: number;start?: { offset?: number };@@ -187,7 +186,6 @@ function extractErrorOffset(err: unknown): number | undefined {return undefined;}-interface Region {start: number;end: number;@@ -211,7 +209,6 @@ function nearestBlankLineAfter(src: string, offset: number): number | null {return null;}-export interface TagEvent {kind: 'open' | 'close' | 'self-close';name: string;@@ -358,7 +355,6 @@ function findFallbackRegion(src: string, errorOffset: number): Region {return { start: blockStart, end: blockEnd };}-interface SourceBlock {src: string;start: number;@@ -456,7 +452,6 @@ function tryPerBlockFallback(};}-function wholeDocRawText(source: string): JSONContent {return {type: 'doc',diff --git a/packages/core/src/markdown/parser-drop-closure.ts b/packages/core/src/markdown/parser-drop-closure.tsindex 43d420187..e6ab4fd57 100644--- a/packages/core/src/markdown/parser-drop-closure.ts+++ b/packages/core/src/markdown/parser-drop-closure.ts@@ -1,4 +1,3 @@-export type DroppedTokenAdjudication =| {kind: 'format-dof-axis';diff --git a/packages/core/src/markdown/pipeline.ts b/packages/core/src/markdown/pipeline.tsindex 55736041c..0e3224206 100644--- a/packages/core/src/markdown/pipeline.ts+++ b/packages/core/src/markdown/pipeline.ts@@ -1,4 +1,3 @@-import {type FromProseMirrorOptions,fromProseMirror,diff --git a/packages/core/src/markdown/position-aware-join.ts b/packages/core/src/markdown/position-aware-join.tsindex ccf06e94d..91cdf658f 100644--- a/packages/core/src/markdown/position-aware-join.ts+++ b/packages/core/src/markdown/position-aware-join.ts@@ -1,4 +1,3 @@-import type { Join } from 'mdast-util-to-markdown';import type { Position } from 'unist';import { isBlankLineParagraph } from './zero-emission-blocks.ts';diff --git a/packages/core/src/markdown/position-slice.ts b/packages/core/src/markdown/position-slice.tsindex e5b4c9eba..0f399d34c 100644--- a/packages/core/src/markdown/position-slice.ts+++ b/packages/core/src/markdown/position-slice.ts@@ -1,4 +1,3 @@-import type { Nodes, Root } from 'mdast';import { visit } from 'unist-util-visit';import type { VFile } from 'vfile';@@ -477,8 +476,7 @@ export function applyPositionSliceToNode(const first = source[startOff];if (first !== '[' && first !== '<' && !node.title) {node.data.sourceStyle = 'gfm-autolink';- }- else if (first === '[') {+ } else if (first === '[') {const slice = source.slice(startOff, endOff);const closeBracketIdx = slice.lastIndexOf('](');if (closeBracketIdx !== -1) {diff --git a/packages/core/src/markdown/rehype-plugins/skip-notion-whitespace.ts b/packages/core/src/markdown/rehype-plugins/skip-notion-whitespace.tsindex ca225ce9b..db10fa54b 100644--- a/packages/core/src/markdown/rehype-plugins/skip-notion-whitespace.ts+++ b/packages/core/src/markdown/rehype-plugins/skip-notion-whitespace.ts@@ -1,4 +1,3 @@-import type { Comment, Element, Root, Text } from 'hast';import type { Plugin } from 'unified';diff --git a/packages/core/src/markdown/rehype-plugins/strip-cocoa-meta.ts b/packages/core/src/markdown/rehype-plugins/strip-cocoa-meta.tsindex 3a2524a9a..34068d103 100644--- a/packages/core/src/markdown/rehype-plugins/strip-cocoa-meta.ts+++ b/packages/core/src/markdown/rehype-plugins/strip-cocoa-meta.ts@@ -1,4 +1,3 @@-import type { Element, ElementContent, Root } from 'hast';import type { Plugin } from 'unified';diff --git a/packages/core/src/markdown/rehype-plugins/strip-gdocs-wrapper.ts b/packages/core/src/markdown/rehype-plugins/strip-gdocs-wrapper.tsindex 2279a0189..93151d43b 100644--- a/packages/core/src/markdown/rehype-plugins/strip-gdocs-wrapper.ts+++ b/packages/core/src/markdown/rehype-plugins/strip-gdocs-wrapper.ts@@ -1,4 +1,3 @@-import type { Element, Root } from 'hast';import type { Plugin } from 'unified';diff --git a/packages/core/src/markdown/rehype-plugins/strip-github-hovercard.ts b/packages/core/src/markdown/rehype-plugins/strip-github-hovercard.tsindex a0f467c42..188f02d83 100644--- a/packages/core/src/markdown/rehype-plugins/strip-github-hovercard.ts+++ b/packages/core/src/markdown/rehype-plugins/strip-github-hovercard.ts@@ -1,4 +1,3 @@-import type { Element, Root } from 'hast';import type { Plugin } from 'unified';diff --git a/packages/core/src/markdown/rehype-plugins/strip-gmail-classes.ts b/packages/core/src/markdown/rehype-plugins/strip-gmail-classes.tsindex 4e8542a21..4ba2c3418 100644--- a/packages/core/src/markdown/rehype-plugins/strip-gmail-classes.ts+++ b/packages/core/src/markdown/rehype-plugins/strip-gmail-classes.ts@@ -1,4 +1,3 @@-import type { Element, Root } from 'hast';import type { Plugin } from 'unified';diff --git a/packages/core/src/markdown/rehype-plugins/strip-gsheets-wrapper.ts b/packages/core/src/markdown/rehype-plugins/strip-gsheets-wrapper.tsindex a3c96b24a..1a74b1272 100644--- a/packages/core/src/markdown/rehype-plugins/strip-gsheets-wrapper.ts+++ b/packages/core/src/markdown/rehype-plugins/strip-gsheets-wrapper.ts@@ -1,4 +1,3 @@-import type { Element, ElementContent, Root } from 'hast';import type { Plugin } from 'unified';diff --git a/packages/core/src/markdown/rehype-plugins/strip-mso-styles.ts b/packages/core/src/markdown/rehype-plugins/strip-mso-styles.tsindex e95cf43d6..de35e7b79 100644--- a/packages/core/src/markdown/rehype-plugins/strip-mso-styles.ts+++ b/packages/core/src/markdown/rehype-plugins/strip-mso-styles.ts@@ -1,4 +1,3 @@-import type { Comment, Element, ElementContent, Root } from 'hast';import type { Plugin } from 'unified';diff --git a/packages/core/src/markdown/rehype-plugins/strip-slack-classes.ts b/packages/core/src/markdown/rehype-plugins/strip-slack-classes.tsindex ffdb4d5b5..b4be1b2ea 100644--- a/packages/core/src/markdown/rehype-plugins/strip-slack-classes.ts+++ b/packages/core/src/markdown/rehype-plugins/strip-slack-classes.ts@@ -1,4 +1,3 @@-import type { Element, ElementContent, Root } from 'hast';import type { Plugin } from 'unified';diff --git a/packages/core/src/markdown/rehype-plugins/strip-vscode-spans.ts b/packages/core/src/markdown/rehype-plugins/strip-vscode-spans.tsindex e2a96d1a7..3c8d88b7c 100644--- a/packages/core/src/markdown/rehype-plugins/strip-vscode-spans.ts+++ b/packages/core/src/markdown/rehype-plugins/strip-vscode-spans.ts@@ -1,4 +1,3 @@-import type { Element, Root } from 'hast';import type { Plugin } from 'unified';diff --git a/packages/core/src/markdown/resolve-image-url.ts b/packages/core/src/markdown/resolve-image-url.tsindex 0389575ac..cf2c9da8e 100644--- a/packages/core/src/markdown/resolve-image-url.ts+++ b/packages/core/src/markdown/resolve-image-url.ts@@ -1,4 +1,3 @@-import { isRelativeUrl } from './safe-url.ts';function isDevDiagnosticContext(): boolean {diff --git a/packages/core/src/markdown/safe-url.ts b/packages/core/src/markdown/safe-url.tsindex 8be632ba4..4d3250d3a 100644--- a/packages/core/src/markdown/safe-url.ts+++ b/packages/core/src/markdown/safe-url.ts@@ -1,4 +1,3 @@-export const SAFE_URL_SCHEMES = ['https', 'http', 'mailto', 'tel', 'ftp', 'sms'] as const;const SCHEME_ALT = SAFE_URL_SCHEMES.map((s) => `${s}:`).join('|');diff --git a/packages/core/src/markdown/serialize-fidelity.test-helper.ts b/packages/core/src/markdown/serialize-fidelity.test-helper.tsindex 96304e7a5..0dd54070e 100644--- a/packages/core/src/markdown/serialize-fidelity.test-helper.ts+++ b/packages/core/src/markdown/serialize-fidelity.test-helper.ts@@ -1,4 +1,3 @@-import type { JSONContent } from '@tiptap/core';import type { Nodes } from 'mdast';import { expect } from 'vitest';diff --git a/packages/core/src/markdown/serialize-helpers.ts b/packages/core/src/markdown/serialize-helpers.tsindex 93798cf83..7cac5b042 100644--- a/packages/core/src/markdown/serialize-helpers.ts+++ b/packages/core/src/markdown/serialize-helpers.ts@@ -1,4 +1,3 @@-import type { Node as PmNode } from '@tiptap/pm/model';import type {MdxJsxAttribute,diff --git a/packages/core/src/markdown/single-dollar-math-promoter.ts b/packages/core/src/markdown/single-dollar-math-promoter.tsindex 8c08b7a04..b012a5aff 100644--- a/packages/core/src/markdown/single-dollar-math-promoter.ts+++ b/packages/core/src/markdown/single-dollar-math-promoter.ts@@ -1,4 +1,3 @@-import type { PhrasingContent, Root, Text } from 'mdast';import type { InlineMath } from 'mdast-util-math';import { SKIP, visit } from 'unist-util-visit';diff --git a/packages/core/src/markdown/to-markdown-handlers.ts b/packages/core/src/markdown/to-markdown-handlers.tsindex 959cc0bd2..3e79f8cb6 100644--- a/packages/core/src/markdown/to-markdown-handlers.ts+++ b/packages/core/src/markdown/to-markdown-handlers.ts@@ -1,4 +1,3 @@-import type { Nodes, Parents } from 'mdast';import type { MdxJsxAttribute, MdxJsxExpressionAttribute, MdxJsxFlowElement } from 'mdast-util-mdx';import type { Handle, Info, State } from 'mdast-util-to-markdown';diff --git a/packages/core/src/markdown/underline-promoter.ts b/packages/core/src/markdown/underline-promoter.tsindex 6e6d73400..0f1b0f27d 100644--- a/packages/core/src/markdown/underline-promoter.ts+++ b/packages/core/src/markdown/underline-promoter.ts@@ -1,4 +1,3 @@-import type { Nodes, Parent, Root } from 'mdast';import type { MdxJsxTextElement } from 'mdast-util-mdx';import { visit } from 'unist-util-visit';diff --git a/packages/core/src/markdown/unknown-mdast-guard.ts b/packages/core/src/markdown/unknown-mdast-guard.tsindex 932d7d2a8..1a082bda7 100644--- a/packages/core/src/markdown/unknown-mdast-guard.ts+++ b/packages/core/src/markdown/unknown-mdast-guard.ts@@ -1,4 +1,3 @@-import type { Root as MdastRoot } from 'mdast';import type { VFile } from 'vfile';diff --git a/packages/core/src/markdown/whitespace-char-ref.ts b/packages/core/src/markdown/whitespace-char-ref.tsindex ac9f5239b..d578476a7 100644--- a/packages/core/src/markdown/whitespace-char-ref.ts+++ b/packages/core/src/markdown/whitespace-char-ref.ts@@ -1,4 +1,3 @@-const INLINE_WHITESPACE_BY_CODE: ReadonlyMap<number, string> = new Map([[0x20, ' '],[0x09, '\t'],diff --git a/packages/core/src/markdown/wiki-link-micromark.ts b/packages/core/src/markdown/wiki-link-micromark.tsindex afd9936fe..6dad26200 100644--- a/packages/core/src/markdown/wiki-link-micromark.ts+++ b/packages/core/src/markdown/wiki-link-micromark.ts@@ -17,7 +17,6 @@ declare module 'micromark-util-types' {}}-const CODE_BANG = 33; // !const CODE_LBRACKET = 91; // [const CODE_RBRACKET = 93; // ]@@ -261,7 +260,6 @@ export function wikiLinkSyntax(): Extension {};}-function enterWikiLink(this: CompileContext, token: Token) {this.enter({@@ -387,7 +385,6 @@ export const wikiLinkToMarkdown: {unsafe: [{ character: '[', inConstruct: ['phrasing'] }],};-const MICROMARK_EXT = wikiLinkSyntax();export function remarkWikiLink(this: Processor) {