Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: clear server lint warning baseline (#10487)
[._.]/ Adam Eivyff2336cff183
diff --git a/server/lib/branchUpstreamGuard.test.js b/server/lib/branchUpstreamGuard.test.jsindex 02703f11b4..d6406d778d 100644--- a/server/lib/branchUpstreamGuard.test.js+++ b/server/lib/branchUpstreamGuard.test.js@@ -27,7 +27,7 @@ import {let repo;let scratch;-async function commit(subject) {+async function _commit(subject) {await writeFile(join(repo, `${subject.replace(/\W+/g, '-')}.txt`), subject);await execGit(['add', '-A'], repo);await execGit(['commit', '-m', subject], repo);diff --git a/server/lib/fableLoomContinuity.js b/server/lib/fableLoomContinuity.jsindex fd10ba64ef..5cf91d111b 100644--- a/server/lib/fableLoomContinuity.js+++ b/server/lib/fableLoomContinuity.js@@ -81,7 +81,6 @@ export function analyzeEpisodeContinuity({const {orderedNodes,- depthById,predecessorsByNodeId,convergenceNodeIds,unreachableNodeIds,diff --git a/server/lib/fileCore.js b/server/lib/fileCore.jsindex b53a673dfa..379b54b9f1 100644--- a/server/lib/fileCore.js+++ b/server/lib/fileCore.js@@ -40,7 +40,7 @@ const WIN_RETRY_DELAY_MS = 10;// "this rename can never work".const WIN_RENAME_LOCK_CODES = ['EPERM', 'EACCES', 'EEXIST', 'EBUSY'];// read failures with the same transient meaning on the reader side.-const WIN_READ_LOCK_CODES = ['EPERM', 'EACCES', 'EBUSY'];+const _WIN_READ_LOCK_CODES = ['EPERM', 'EACCES', 'EBUSY'];const FILE_WATCH_FALLBACK_POLL_MS = 5000;/** Normalize Node statfs block counts into byte totals and compatibility aliases. */diff --git a/server/lib/httpClient.test.js b/server/lib/httpClient.test.jsindex 84679fc60b..c25262ef45 100644--- a/server/lib/httpClient.test.js+++ b/server/lib/httpClient.test.js@@ -109,7 +109,7 @@ describe('httpClient', () => {mockFetch.mockResolvedValueOnce(json({ id: 1 }, 201))const client = createHttpClient({ baseURL: 'http://localhost:3000' })- const result = await client.post('/items', { name: 'test' })+ const _result = await client.post('/items', { name: 'test' })const calledOptions = mockFetch.mock.calls[0][1]expect(calledOptions.method).toBe('POST')diff --git a/server/lib/localModelTuning.js b/server/lib/localModelTuning.jsindex dff5f18ca6..93e6645a26 100644--- a/server/lib/localModelTuning.js+++ b/server/lib/localModelTuning.js@@ -234,7 +234,7 @@ export const TUNING_SPECS = Object.freeze(Object.fromEntries(/** Knob specs for one runtime, or `[]` for a runtime with none declared. */export const tuningSpecsFor = (runtimeId) => TUNING_SPECS[runtimeId] || [];-const specById = (runtimeId, id) => tuningSpecsFor(runtimeId).find((s) => s.id === id) || null;+const _specById = (runtimeId, id) => tuningSpecsFor(runtimeId).find((s) => s.id === id) || null;const clamp = (value, min, max) => Math.min(max ?? Infinity, Math.max(min ?? -Infinity, value));diff --git a/server/lib/storyBible.test.js b/server/lib/storyBible.test.jsindex f7f44c4089..8b803c4f98 100644--- a/server/lib/storyBible.test.js+++ b/server/lib/storyBible.test.js@@ -32,7 +32,6 @@ const {stripCanonControlFields,CANON_CONTROL_FIELDS,SERVER_OWNED_CHARACTER_FIELDS,- trimTo,filterCanonForIssue,filterCanonListForIssue,isCanonEntryGatedForIssue,diff --git a/server/lib/workTracker.js b/server/lib/workTracker.jsindex 15a7723e74..6fa8d5c221 100644--- a/server/lib/workTracker.js+++ b/server/lib/workTracker.js@@ -298,7 +298,7 @@ function metricLabelNoun(count) {export function formatTrackerInstructions(tracker, options = {}) {const referenceWatchPreset = TRACKER_FILING_PRESETS['reference-watch'];const {- slugPrefix, label, issueLabel, labelDescription,+ slugPrefix, issueLabel, labelDescription,extraLabels = [],planItemBody, bodyRequirements, planCommitMessage,} = { ...referenceWatchPreset, ...options };diff --git a/server/routes/agentTools.js b/server/routes/agentTools.jsindex 26ff66db43..316b132274 100644--- a/server/routes/agentTools.js+++ b/server/routes/agentTools.js@@ -97,7 +97,7 @@ router.post('/publish-post', asyncHandler(async (req, res) => {console.log(`🛠️ POST /api/agents/tools/publish-post agent=${data.agentId} submolt=${data.submolt}`);- const { client, agent, account } = await getClientAndAgent(data.accountId, data.agentId);+ const { client, agent } = await getClientAndAgent(data.accountId, data.agentId);client.aiConfig = agent.aiConfig?.challenge || agent.aiConfig;const result = await client.createPost(data.submolt, data.title, data.content);const post = result?.post || result;diff --git a/server/routes/imageGen.js b/server/routes/imageGen.jsindex f82a34684a..a894f45d22 100644--- a/server/routes/imageGen.js+++ b/server/routes/imageGen.js@@ -263,7 +263,7 @@ const generateSchema = z.object({// allowlist below so the route never silently relabels (e.g. HEIC) bytes// as ".png".const ACCEPTED_INIT_IMAGE_MIME = new Set(['image/png', 'image/jpeg', 'image/webp']);-const MIME_TO_EXT = { 'image/png': '.png', 'image/jpeg': '.jpg', 'image/webp': '.webp' };+const _MIME_TO_EXT = { 'image/png': '.png', 'image/jpeg': '.jpg', 'image/webp': '.webp' };// Multi-reference editing accepts up to 4 references on dedicated field names.// The legacy single `initImage` upload (mflux i2i) stays on its own slot so adiff --git a/server/routes/moltworldTools.js b/server/routes/moltworldTools.jsindex 9afa0cb1b8..88870d2b9f 100644--- a/server/routes/moltworldTools.js+++ b/server/routes/moltworldTools.js@@ -79,7 +79,7 @@ router.post('/build', asyncHandler(async (req, res) => {console.log(`🧱 POST /api/agents/tools/moltworld/build account=${data.accountId}`);- const { client, agent } = await getClientAndAgent(data.accountId, data.agentId);+ const { client } = await getClientAndAgent(data.accountId, data.agentId);const result = await client.build({x: data.x,y: data.y,@@ -110,7 +110,7 @@ router.post('/explore', asyncHandler(async (req, res) => {console.log(`🌍 POST /api/agents/tools/moltworld/explore agent=${data.agentId}`);- const { client, agent, account } = await getClientAndAgent(data.accountId, data.agentId);+ const { client, account } = await getClientAndAgent(data.accountId, data.agentId);// Use provided coordinates or random positionconst x = data.x ?? Math.floor(Math.random() * 480) - 240;diff --git a/server/routes/musicVideoAutoReview.test.js b/server/routes/musicVideoAutoReview.test.jsindex 71c5ace951..485810fa82 100644--- a/server/routes/musicVideoAutoReview.test.js+++ b/server/routes/musicVideoAutoReview.test.js@@ -65,9 +65,6 @@ vi.mock('../lib/processEnv.js', async (importOriginal) => ({}));vi.mock('../lib/ffmpeg.js', async (importOriginal) => {const real = await importOriginal();- const { writeFileSync: write, mkdirSync: mkdir } = await import('fs');- const { join: joinPath } = await import('path');- const { PATHS } = await import('../lib/fileUtils.js');return {...real,findFfmpeg: vi.fn(async () => (h.analysisAvailable ? 'ffmpeg' : null)),diff --git a/server/scripts/reconcileCanonCatalog.test.js b/server/scripts/reconcileCanonCatalog.test.jsindex d8795c72a0..4f076c5d7d 100644--- a/server/scripts/reconcileCanonCatalog.test.js+++ b/server/scripts/reconcileCanonCatalog.test.js@@ -114,7 +114,7 @@ describe('reconcileCanonCatalog', () => {{ id: 'u-new', characters: [{ id: 'e', ingredientId: 'cat-chr-m', name: 'Multi', v: 'new', updatedAt: '2026-03-01T00:00:00.000Z' }] },];- const result = await reconcileCanonCatalog();+ const _result = await reconcileCanonCatalog();// u-old loses to the original row (catalog stamped back onto it); u-mid and// u-new each beat the ORIGINAL row, but only the strictly-newer copy writes.diff --git a/server/services/agentActionExecutor.js b/server/services/agentActionExecutor.jsindex 73d1538c4f..c49fa9f298 100644--- a/server/services/agentActionExecutor.js+++ b/server/services/agentActionExecutor.js@@ -528,7 +528,7 @@ async function executeMoltworldSay(client, params) {* Moltworld think — send a thought*/async function executeMoltworldThink(client, params) {- const result = await client.think(params.thought || 'Thinking...');+ const _result = await client.think(params.thought || 'Thinking...');console.log(`💭 Moltworld: Thought "${(params.thought || '').substring(0, 50)}"`);return { type: 'mw_think', thought: params.thought };}diff --git a/server/services/agentCliSpawning.js b/server/services/agentCliSpawning.jsindex c86493d6a7..3007cd36eb 100644--- a/server/services/agentCliSpawning.js+++ b/server/services/agentCliSpawning.js@@ -53,7 +53,7 @@ import { isOllamaBackedProvider } from './providers.js';import { isPublicReviewRestrictedProfile } from '../lib/agentExecutionProfiles.js';import { createStreamJsonParser, summarizeToolInput, safeParse } from '../lib/streamJsonParser.js';-const AGENTS_DIR = PATHS.cosAgents;+const _AGENTS_DIR = PATHS.cosAgents;/*** Build spawn command and arguments for a CLI provider.diff --git a/server/services/agentLifecycle.test.js b/server/services/agentLifecycle.test.jsindex 634f165313..5b2a319cab 100644--- a/server/services/agentLifecycle.test.js+++ b/server/services/agentLifecycle.test.js@@ -577,7 +577,7 @@ function trackedCompletionPreamble() {// body and can't be reached without mocking its 40+ imports. Anchored on// `runAgentSpawn` (the guarded body extracted from spawnAgentForTask, #2548).-const RUN_SPAWN_START = AGENT_SPAWN_OWNER_SRC.indexOf('export async function prepareAgentSpawn');+const _RUN_SPAWN_START = AGENT_SPAWN_OWNER_SRC.indexOf('export async function prepareAgentSpawn');const RUN_SPAWN_BODY = AGENT_SPAWN_OWNER_SRC;describe('runAgentSpawn source — handedOff pre-spawn vs post-handoff split', () => {diff --git a/server/services/agentTuiSpawning.test.js b/server/services/agentTuiSpawning.test.jsindex 3a44e65456..ef90d37dd1 100644--- a/server/services/agentTuiSpawning.test.js+++ b/server/services/agentTuiSpawning.test.js@@ -1263,7 +1263,7 @@ describe('spawnTuiAgent runtime', () => {// raw.txt tail surfaced in the error.vi.mocked(readFile).mockResolvedValue('Error: claude exited at startup\n');- const spawnPromise = runSpawn();+ const _spawnPromise = runSpawn();await flushMicrotasks();await capturedOnData(Buffer.from('booting...\n' + CODEX_COMPOSER));diff --git a/server/services/appleHealthClinical.js b/server/services/appleHealthClinical.jsindex fb386f7ff2..eb17a0c363 100644--- a/server/services/appleHealthClinical.js+++ b/server/services/appleHealthClinical.js@@ -281,7 +281,7 @@ export async function importClinicalRecords(jsonStrings, io) {// Count what changedconst newDates = merged.tests.filter(t => !existingDates.has(t.date)).length;- const newValues = fhirData.totalParsed;+ const _newValues = fhirData.totalParsed;await ensureDir(PATHS.meatspace);await atomicWrite(BLOOD_TESTS_FILE, merged);diff --git a/server/services/appleHealthXml.test.js b/server/services/appleHealthXml.test.jsindex 7ee1e6f707..76b05fee61 100644--- a/server/services/appleHealthXml.test.js+++ b/server/services/appleHealthXml.test.js@@ -137,14 +137,14 @@ describe('importAppleHealthXml temp-file lifecycle', () => {describe('importAppleHealthXml upsert behavior', () => {let dir;let xmlPath;- let readCalls;+ let _readCalls;let writeCalls;beforeEach(async () => {streams.length = 0;trace.length = 0;parser.impl = null;- readCalls = [];+ _readCalls = [];writeCalls = [];// Track calls to readDayFile and writeDayFilediff --git a/server/services/artificialAnalysis.js b/server/services/artificialAnalysis.jsindex 3d0c534632..275343c23a 100644--- a/server/services/artificialAnalysis.js+++ b/server/services/artificialAnalysis.js@@ -66,7 +66,7 @@ export function transformAAModelsToObservations(models, options = {}) {for (const m of models) {if (!m || !m.name) continue;- const { baseName, modelSlug, effort, configDetail } = parseModelNameAndEffort(m.name);+ const { modelSlug, effort, configDetail } = parseModelNameAndEffort(m.name);const provider = m.model_creator?.name || 'Unknown';const providerSlug = slugify(provider);diff --git a/server/services/autobiography.test.js b/server/services/autobiography.test.jsindex e9f675d695..87c87517f7 100644--- a/server/services/autobiography.test.js+++ b/server/services/autobiography.test.js@@ -372,13 +372,13 @@ describe('Autobiography - saveStory', () => {});describe('Autobiography - updateStory', () => {- let savedData;+ let _savedData;beforeEach(() => {vi.clearAllMocks();- savedData = null;+ _savedData = null;writeFile.mockImplementation(async (_path, content) => {- savedData = JSON.parse(content);+ _savedData = JSON.parse(content);});});diff --git a/server/services/backup.test.js b/server/services/backup.test.jsindex 2ad5e7b907..05e83b4049 100644--- a/server/services/backup.test.js+++ b/server/services/backup.test.js@@ -1992,7 +1992,7 @@ describe('restorePostgres', () => {});describe('runBackup pg status propagation', () => {- let backup;+ let _backup;beforeEach(async () => {vi.clearAllMocks();vi.resetModules();diff --git a/server/services/catalogDBRevisions.test.js b/server/services/catalogDBRevisions.test.jsindex 1572933228..1a97996e9e 100644--- a/server/services/catalogDBRevisions.test.js+++ b/server/services/catalogDBRevisions.test.js@@ -90,7 +90,7 @@ vi.mock('./instanceIdentity.js', () => ({getInstanceId: vi.fn(async () => 'inst-test'),}));-const db = await import('../lib/db.js');+const _db = await import('../lib/db.js');const {createIngredient,updateIngredient,diff --git a/server/services/catalogIngestSources.test.js b/server/services/catalogIngestSources.test.jsindex acf0fbd4f2..26b235ff05 100644--- a/server/services/catalogIngestSources.test.js+++ b/server/services/catalogIngestSources.test.js@@ -59,7 +59,7 @@ const catalogDB = await import('./catalogDB.js');const catalogExtraction = await import('./catalogExtraction.js');const browserService = await import('./browserService.js');const brainStorage = await import('./brainStorage.js');-const fsp = await import('fs/promises');+const _fsp = await import('fs/promises');const dnsp = await import('dns/promises');const fileUtils = await import('../lib/fileUtils.js');const {@@ -219,7 +219,7 @@ describe('ingestFromVoice', () => {const transcribeFn = vi.fn().mockResolvedValue({ text: 'spoken memo text' });const persistFn = vi.fn().mockResolvedValue('voice-memo-abc.wav');- const { scrap, draft, mediaKey } = await ingestFromVoice(+ const { draft, mediaKey } = await ingestFromVoice({ audioBase64: wavBase64, mimeType: 'audio/wav', title: 'My memo' },{ transcribeFn, persistFn },);diff --git a/server/services/chatgptZipImport.test.js b/server/services/chatgptZipImport.test.jsindex 53cabc2ad3..4487425fa1 100644--- a/server/services/chatgptZipImport.test.js+++ b/server/services/chatgptZipImport.test.js@@ -35,7 +35,7 @@ const WAV = Buffer.concat([Buffer.from('RIFF'), Buffer.alloc(4), Buffer.from('WAconst PDF = Buffer.concat([Buffer.from('%PDF-1.4'), Buffer.alloc(8)]);let TMP;-let extractChatgptZip, makeAssetResolver, importChatgptZip, sniffExtension, datAssetId;+let extractChatgptZip, makeAssetResolver, _importChatgptZip, sniffExtension, datAssetId;describe('chatgptZipImport service', () => {beforeEach(async () => {@@ -43,7 +43,7 @@ describe('chatgptZipImport service', () => {const mod = await import('./chatgptZipImport.js');extractChatgptZip = mod.extractChatgptZip;makeAssetResolver = mod.makeAssetResolver;- importChatgptZip = mod.importChatgptZip;+ _importChatgptZip = mod.importChatgptZip;sniffExtension = mod.__test.sniffExtension;datAssetId = mod.__test.datAssetId;});diff --git a/server/services/clinvar.js b/server/services/clinvar.jsindex ee36504b93..7f9d555578 100644--- a/server/services/clinvar.js+++ b/server/services/clinvar.js@@ -69,7 +69,7 @@ async function downloadClinvar(onProgress) {const reader = response.body.getReader();let downloaded = 0;- const writable = new WritableStream({+ const _writable = new WritableStream({write(chunk) {downloaded += chunk.length;writer.write(chunk);diff --git a/server/services/cosAdmissionReservations.js b/server/services/cosAdmissionReservations.jsindex b6dc2f386a..06a5be1b26 100644--- a/server/services/cosAdmissionReservations.js+++ b/server/services/cosAdmissionReservations.js@@ -10,7 +10,7 @@ const globalReservations = new Map();const actionReservations = new Map();let reservationSequence = 0;-const noopRelease = () => {};+const _noopRelease = () => {};function reserve(map, reservationId) {const token = ++reservationSequence;diff --git a/server/services/creativeDirector/projectsDB.test.js b/server/services/creativeDirector/projectsDB.test.jsindex 34eb442af4..1525198e44 100644--- a/server/services/creativeDirector/projectsDB.test.js+++ b/server/services/creativeDirector/projectsDB.test.js@@ -40,7 +40,7 @@ let skipReason = '';skipReason = `Postgres not reachable (${health.error || 'no connection'})`;} else {await ensureSchema().catch(() => {});- const recheck = await checkHealth().catch(() => ({}));+ const _recheck = await checkHealth().catch(() => ({}));// hasSchema is the memory-schema flag; ensureSchema also creates our table.// Probe the table directly so we don't couple to the memory schema state.const probe = await query(diff --git a/server/services/dbAdmin.js b/server/services/dbAdmin.jsindex 1932ffada9..0c0bfe1d72 100644--- a/server/services/dbAdmin.js+++ b/server/services/dbAdmin.js@@ -104,7 +104,7 @@ function runCmd(cmd, args, timeout = 120_000, env = process.env) {const runDbScript = (args) => runCmd(bashBinary, [dbScript, ...args]);-function parseDbMode(stdout) {+function _parseDbMode(stdout) {const match = stdout.match(/Current mode:\s*(\w+)/);if (!match) console.warn('🗄️ Failed to parse mode from db.sh output');return match?.[1] || 'docker';diff --git a/server/services/deckPrompts.test.js b/server/services/deckPrompts.test.jsindex 74de678fcf..43a3d73fd8 100644--- a/server/services/deckPrompts.test.js+++ b/server/services/deckPrompts.test.js@@ -8,7 +8,7 @@ vi.mock('./promptRunner.js', () => ({}));const {- castDeckFromUniverse, generateDeckCardPrompts, buildCardPromptsPrompt, PROMPTS_PER_CALL, salvagePromptPairs, __testing,+ castDeckFromUniverse, generateDeckCardPrompts, buildCardPromptsPrompt, salvagePromptPairs, __testing,} = await import('./deckPrompts.js');const deck = { name: 'Deck', kind: 'tarot', description: 'A lighthouse deck', styleNotes: 'engraved', influences: { embrace: ['sepia'], avoid: [] }, layoutPrompt: 'Full card' };diff --git a/server/services/eidoverseFoundationLedger.test.js b/server/services/eidoverseFoundationLedger.test.jsindex b8e974af33..78c3253fa5 100644--- a/server/services/eidoverseFoundationLedger.test.js+++ b/server/services/eidoverseFoundationLedger.test.js@@ -527,7 +527,7 @@ describe('building on a foundation inherited from a peer (#7631)', () => {});it('refuses a second peer\'s envelope claiming an origin this install already holds, rather than overwriting the genuine record', async () => {- const { candidate, inherited } = await inheritPeerFoundation({ sourceInstanceId: 'instance-peer-one' });+ const { candidate } = await inheritPeerFoundation({ sourceInstanceId: 'instance-peer-one' });// The laundering the storage key made free: the origin is the field that// chooses the key, the sender hashes its own claims, so re-fingerprintingdiff --git a/server/services/featureAgents.test.js b/server/services/featureAgents.test.jsindex 636f019c76..a6d6f6e86b 100644--- a/server/services/featureAgents.test.js+++ b/server/services/featureAgents.test.js@@ -5,7 +5,7 @@ import { calculateBackoff, generateTaskFromFeatureAgent } from './featureAgents.* Tests for feature agents pure logic.*/-const MIN_BACKOFF_MS = 60 * 60 * 1000;+const _MIN_BACKOFF_MS = 60 * 60 * 1000;const MAX_BACKOFF_MS = 24 * 60 * 60 * 1000;describe('Feature Agent Backoff Calculation', () => {diff --git a/server/services/gsdService.js b/server/services/gsdService.jsindex 905c700990..dc9ef50685 100644--- a/server/services/gsdService.js+++ b/server/services/gsdService.js@@ -376,7 +376,7 @@ export async function getGsdPendingActions(appId) {if (!project) return []const actions = []- const currentPhase = project.state?.frontmatter?.current_phase+ const _currentPhase = project.state?.frontmatter?.current_phasefor (const phase of project.phases) {const hasPlans = phase.plans?.length > 0diff --git a/server/services/identity.test.js b/server/services/identity.test.jsindex e12346ae9a..2c64139195 100644--- a/server/services/identity.test.js+++ b/server/services/identity.test.js@@ -620,7 +620,7 @@ describe('computeGoalUrgency', () => {// === Integration tests (mock fs + genome service) ===describe('Integration: deriveChronotype', () => {- let deriveChronotype, getChronotype, updateChronotypeBehavioral, getIdentityStatus;+ let deriveChronotype, getChronotype, updateChronotypeBehavioral, _getIdentityStatus;beforeEach(async () => {vi.resetModules();@@ -660,7 +660,7 @@ describe('Integration: deriveChronotype', () => {deriveChronotype = mod.deriveChronotype;getChronotype = mod.getChronotype;updateChronotypeBehavioral = mod.updateChronotypeBehavioral;- getIdentityStatus = mod.getIdentityStatus;+ _getIdentityStatus = mod.getIdentityStatus;});it('should derive chronotype from genome markers', async () => {@@ -1196,7 +1196,7 @@ describe('Integration: Progress Log', () => {});describe('Integration: Calendar Linking', () => {- let createGoal, linkCalendarToGoal, unlinkCalendarFromGoal, getGoals;+ let createGoal, linkCalendarToGoal, unlinkCalendarFromGoal, _getGoals;beforeEach(async () => {vi.resetModules();@@ -1219,7 +1219,7 @@ describe('Integration: Calendar Linking', () => {createGoal = mod.createGoal;linkCalendarToGoal = mod.linkCalendarToGoal;unlinkCalendarFromGoal = mod.unlinkCalendarFromGoal;- getGoals = mod.getGoals;+ _getGoals = mod.getGoals;});it('should link a calendar to a goal', async () => {diff --git a/server/services/issueWatcher.js b/server/services/issueWatcher.jsindex 21b9e310ba..8a80cf9a94 100644--- a/server/services/issueWatcher.js+++ b/server/services/issueWatcher.js@@ -1151,7 +1151,7 @@ async function analyzePendingIssueComments({ app, interval, input, pending }) {async function runScheduledIssueIntake({ app, interval } = {}) {const input = await gatherIssueWatcherInput({ app });if (input.skip) return input;- const { jevBatchGate, runUntrustedContentAnalysis } = await import('./untrustedContent.js');+ const { jevBatchGate } = await import('./untrustedContent.js');const gate = await jevIssueReplyGate(input, jevBatchGate);// Every comment settled locally: the chat model is never woken, which is the// whole point of the gate on the highest-volume decision PortOS makes. Thediff --git a/server/services/loops.test.js b/server/services/loops.test.jsindex ec36c38c72..9a8cbc5ead 100644--- a/server/services/loops.test.js+++ b/server/services/loops.test.js@@ -498,7 +498,7 @@ describe('loops.js', () => {try {await triggerLoop(loop.id);await flushAsync();- } catch (err) {+ } catch (_err) {threw = true;}expect(threw).toBe(false);@@ -696,7 +696,7 @@ describe('loops.js', () => {});it('allows subsequent iterations after an early rejection when using the timer', async () => {- const loop = await createLoop({+ const _loop = await createLoop({prompt: 'timer recovery test',interval: '30s',runImmediately: false,diff --git a/server/services/loras.test.js b/server/services/loras.test.jsindex 0e56091238..695542bed9 100644--- a/server/services/loras.test.js+++ b/server/services/loras.test.js@@ -22,7 +22,7 @@ const sha256Hex = (buf) => createHash('sha256').update(buf).digest('hex');let tmpRoot;let tmpLoras;let lorasService;-let civitaiLib;+let _civitaiLib;let atomicWriteHook;// Sidecar writes the service has enqueued but not yet finished (#6265).@@ -91,7 +91,7 @@ beforeEach(async () => {getSettings: async () => ({}),}));lorasService = await import('./loras.js');- civitaiLib = await import('../lib/civitai.js');+ _civitaiLib = await import('../lib/civitai.js');// Module identity at the read, asserted once per test. Every fixture below// writes through the raw `tmpLoras` path while the service resolves its owndiff --git a/server/services/mediaJobQueue/index.js b/server/services/mediaJobQueue/index.jsindex 3928830149..71cb92d9ea 100644--- a/server/services/mediaJobQueue/index.js+++ b/server/services/mediaJobQueue/index.js@@ -492,7 +492,7 @@ async function persistTerminalTransition(job) {try {await persist();return;- } catch (error) {+ } catch (_error) {job.persistenceError = true;mediaJobEvents.emit('changed', {});if (attempt === 2) {@@ -1234,7 +1234,7 @@ async function runJobLifecycle(job, markDispatched, permit) {if (disposable && isRemoteMediaJob(job) && job.params?.remotePeerReservation === true) {job.params = { ...job.params, remotePeerReservation: false };try { await persist(); }- catch (error) {+ catch (_error) {job.params = { ...job.params, remotePeerReservation: true };maintenance.markResourceUnsettled('media', job.id);return { ok: false };diff --git a/server/services/musicVideo/castAndSetsService.test.js b/server/services/musicVideo/castAndSetsService.test.jsindex bea181e074..60298cdbd2 100644--- a/server/services/musicVideo/castAndSetsService.test.js+++ b/server/services/musicVideo/castAndSetsService.test.js@@ -100,7 +100,7 @@ async function until(check, label, diagnostics) {const details = diagnostics ? `: ${JSON.stringify(await diagnostics())}` : '';throw new Error(`timed out waiting for ${label}${details}`);}- const observed = changes;+ const _observed = changes;const remaining = deadline - Date.now();// Wait for event with a small timeout to re-check the condition// even if no event fires (e.g., state changed before subscription).diff --git a/server/services/musicVideo/documentTemplates/layered/engine.js b/server/services/musicVideo/documentTemplates/layered/engine.jsindex c032d34fbe..fba3dd5ae1 100644--- a/server/services/musicVideo/documentTemplates/layered/engine.js+++ b/server/services/musicVideo/documentTemplates/layered/engine.js@@ -221,7 +221,7 @@g.addColorStop(0, 'rgba(0,0,0,0)'); g.addColorStop(1, `rgba(0,0,0,${strength})`);ctx.fillStyle = g; ctx.fillRect(0, 0, W, H);}- function flash(k, color = '#fff') { if (k <= 0.001) return; ctx.save(); ctx.globalAlpha = clamp(k); ctx.fillStyle = color; ctx.fillRect(0, 0, W, H); ctx.restore(); }+ function _flash(k, color = '#fff') { if (k <= 0.001) return; ctx.save(); ctx.globalAlpha = clamp(k); ctx.fillStyle = color; ctx.fillRect(0, 0, W, H); ctx.restore(); }function glitch(t, strength) {if (strength <= 0.02) return;const f = frameOf(t);diff --git a/server/services/musicVideo/productionService.test.js b/server/services/musicVideo/productionService.test.jsindex 1cab9711e4..18b600ea6a 100644--- a/server/services/musicVideo/productionService.test.js+++ b/server/services/musicVideo/productionService.test.js@@ -108,7 +108,7 @@ function seedProject(overrides = {}) {const current = () => clone(store.get('mv-example'));const theRun = () => current().productionRuns[0];-const liveSteps = () => theRun().steps.filter((s) => s.status === 'reserved' || s.status === 'queued');+const _liveSteps = () => theRun().steps.filter((s) => s.status === 'reserved' || s.status === 'queued');// The queue double: a dispatch lands one queued job tagged with the step.const enqueueing = ({ stepKind, tag }) => {diff --git a/server/services/musicVideo/publish/index.test.js b/server/services/musicVideo/publish/index.test.jsindex b02610c831..e8b133685d 100644--- a/server/services/musicVideo/publish/index.test.js+++ b/server/services/musicVideo/publish/index.test.js@@ -96,7 +96,7 @@ describe('publish drafts (#9282)', () => {const id = await readyProject();const { connect, pages } = fakeBrowser();const adapters = { stackerNews: adapter() };- const first = await preparePublishDraft(id, 'stackerNews', {}, { connect, adapters, platforms });+ const _first = await preparePublishDraft(id, 'stackerNews', {}, { connect, adapters, platforms });const second = await preparePublishDraft(id, 'stackerNews', {}, { connect, adapters, platforms });expect(pages[0].closed).toBe(true);expect(await discardPublishDraft(id, second.draftId)).toBe(true);diff --git a/server/services/ollamaManager.js b/server/services/ollamaManager.jsindex 4809d86572..679274d505 100644--- a/server/services/ollamaManager.js+++ b/server/services/ollamaManager.js@@ -101,7 +101,7 @@ let lastLoadedModelsError = null// Mirrors lmStudioManager's `getLastListError`.let lastInstalledModelsError = nulllet lastCheckAt = null-let managedProcess = null+let _managedProcess = nulllet managedProcessPid = null// What PortOS knows about the Ollama daemon that is up RIGHT NOW. Every field// describes ONE live process, so the whole record is written by `recordDaemon`@@ -412,11 +412,11 @@ async function waitForAvailability(expected, timeoutMs, shouldAbort = () => fals}function rememberManagedProcess(child) {- managedProcess = child+ _managedProcess = childmanagedProcessPid = child.pidchild.on('exit', () => {if (managedProcessPid === child.pid) {- managedProcess = null+ _managedProcess = nullmanagedProcessPid = null}})diff --git a/server/services/openrouterBenchmarks.js b/server/services/openrouterBenchmarks.jsindex 7d4cdb99e8..6573727fec 100644--- a/server/services/openrouterBenchmarks.js+++ b/server/services/openrouterBenchmarks.js@@ -10,7 +10,7 @@ import { parseModelNameAndEffort, slugify } from './artificialAnalysis.js';const OPENROUTER_MODELS_URL = 'https://openrouter.ai/api/v1/models';const OPENROUTER_ENDPOINTS_URL = 'https://openrouter.ai/api/v1/models';const OPENROUTER_REQUEST_TIMEOUT_MS = 15_000;-const OPENROUTER_ENDPOINT_CONCURRENCY = 8;+const _OPENROUTER_ENDPOINT_CONCURRENCY = 8;const ENDPOINT_WINDOW = '30m-p50';const identityHash = value => createHash('sha256').update(JSON.stringify(value)).digest('hex').slice(0, 24);@@ -255,7 +255,7 @@ function endpointRequestUrl(modelId) {return OPENROUTER_ENDPOINTS_URL + '/' + encodeURIComponent(parts[0]) + '/' + encodeURIComponent(parts[1]) + '/endpoints';}-async function fetchOpenRouterModelEndpoints(model) {+async function _fetchOpenRouterModelEndpoints(model) {const url = endpointRequestUrl(model.id);let response;try {@@ -281,7 +281,7 @@ async function fetchOpenRouterModelEndpoints(model) {return { model, endpoints: payload.data.endpoints };}-async function mapWithConcurrency(items, limit, mapper) {+async function _mapWithConcurrency(items, limit, mapper) {const results = new Array(items.length);let cursor = 0;let failure = null;diff --git a/server/services/peerUsage.test.js b/server/services/peerUsage.test.jsindex 66d19587c3..001d0a291c 100644--- a/server/services/peerUsage.test.js+++ b/server/services/peerUsage.test.js@@ -25,7 +25,7 @@ vi.mock('./usage.js', async () => {return { ...actual, getUsage: () => localUsage };});-const { buildUsageDigest, getUsage } = await import('./usage.js');+const { buildUsageDigest } = await import('./usage.js');const {getUsageSnapshot,getUsageManifest,diff --git a/server/services/persistentMindIssueCapability.js b/server/services/persistentMindIssueCapability.jsindex 4ad44d7870..f7ea448855 100644--- a/server/services/persistentMindIssueCapability.js+++ b/server/services/persistentMindIssueCapability.js@@ -167,7 +167,7 @@ export async function filePersistentMindIssue(args) {// scrubs its own copy, so the text is scrubbed exactly once rather than// twice for the same request.const title = scrubForgeIssueText(args.title);- const body = scrubForgeIssueText(args.body);+ const _body = scrubForgeIssueText(args.body);// An all-punctuation title normalizes to the empty string, which would match// every other such title — only a title with real content can dedupe.diff --git a/server/services/pipeline/applyCuts.test.js b/server/services/pipeline/applyCuts.test.jsindex a24dd96951..f98ae8ebf8 100644--- a/server/services/pipeline/applyCuts.test.js+++ b/server/services/pipeline/applyCuts.test.js@@ -37,11 +37,11 @@ describe('locateCutSpan', () => {it('refuses ambiguous quote (multiple occurrences)', () => {const text = 'The fox jumps high. Another fox jumps high. A third fox jumps high.';const quote = 'fox jumps high. Another fox jumps'; // appears once exactly, so need different test- const result = locateCutSpan(text, quote);+ const _result = locateCutSpan(text, quote);// This particular quote is unique, so let's test a truly ambiguous caseconst text2 = 'She said hello and he replied hello and then she said hello again.';const quote2 = 'said hello and he replied hello';- const result2 = locateCutSpan(text2, quote2);+ const _result2 = locateCutSpan(text2, quote2);// Actually this is also unique. Let's use a simpler case.const text3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ';const quote3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';diff --git a/server/services/pipeline/arcPlanner.test.js b/server/services/pipeline/arcPlanner.test.jsindex 2c1a7668e6..2371c4ff68 100644--- a/server/services/pipeline/arcPlanner.test.js+++ b/server/services/pipeline/arcPlanner.test.js@@ -790,7 +790,7 @@ describe('arcPlanner — verifyVolume', () => {const s = await setupSeries();await seriesSvc.updateSeries(s.id, { arc: { logline: 'L' } });const v1 = await seasonsSvc.createSeason(s.id, { title: 'V1', logline: 'one' });- const v2 = await seasonsSvc.createSeason(s.id, { title: 'V2', logline: 'two', endingHook: 'hook2' });+ const _v2 = await seasonsSvc.createSeason(s.id, { title: 'V2', logline: 'two', endingHook: 'hook2' });const v3 = await seasonsSvc.createSeason(s.id, { title: 'V3', logline: 'three' });const v4 = await seasonsSvc.createSeason(s.id, { title: 'V4', logline: 'four' });diff --git a/server/services/pipeline/arcPlanner/manuscriptDerive.js b/server/services/pipeline/arcPlanner/manuscriptDerive.jsindex e9c800acd8..5d0efbeba1 100644--- a/server/services/pipeline/arcPlanner/manuscriptDerive.js+++ b/server/services/pipeline/arcPlanner/manuscriptDerive.js@@ -109,7 +109,7 @@ export async function deriveFromManuscript(seriesId, { providerOverride, modelOvERR_VALIDATION,);}- const { arc, seasons, raw, runId, providerId, model } = await generateArcFromSource(seriesId, {+ const { arc, seasons, runId, providerId, model } = await generateArcFromSource(seriesId, {sourceText, providerOverride, modelOverride,});const issues = (await listIssues({ seriesId })).sort(compareIssuesInSeries);diff --git a/server/services/pipeline/autoRunner.test.js b/server/services/pipeline/autoRunner.test.jsindex 1345e232a3..00b2c68983 100644--- a/server/services/pipeline/autoRunner.test.js+++ b/server/services/pipeline/autoRunner.test.js@@ -55,7 +55,7 @@ const issuesSvc = await import('./issues.js');const autoRunner = await import('./autoRunner.js');// Drain any in-flight microtasks/promises spawned by startAutoRunTextStages.-const flush = () => new Promise((r) => setImmediate(r));+const _flush = () => new Promise((r) => setImmediate(r));const waitFor = async (predicate, { timeoutMs = 1000, intervalMs = 5 } = {}) => {const start = Date.now();diff --git a/server/services/pipeline/covers.js b/server/services/pipeline/covers.jsindex dca642543f..2450602c69 100644--- a/server/services/pipeline/covers.js+++ b/server/services/pipeline/covers.js@@ -76,7 +76,7 @@ export function composeComicCoverPrompt({export function composeTitleScreenPrompt({series, world, issue, extraStyle = '',}) {- const seriesName = (series?.name || '').trim();+ const _seriesName = (series?.name || '').trim();const issueNumber = Number.isFinite(issue?.number) ? Math.max(1, Math.floor(issue.number)) : null;const issueTitle = (issue?.title || '').trim();diff --git a/server/services/pipeline/editorial/checkRunner.test.js b/server/services/pipeline/editorial/checkRunner.test.jsindex 0ab0cf9a33..78b0f4fed9 100644--- a/server/services/pipeline/editorial/checkRunner.test.js+++ b/server/services/pipeline/editorial/checkRunner.test.js@@ -1321,7 +1321,7 @@ describe('runEditorialChecks — dependency-aware staleness (#1627)', () => {// dependent's finding is re-fingerprinted as stale (its own source is canon).it('marks a dependency-consuming finding stale when the dependency\'s source drifts', async () => {const naming = getCheck('naming.dissimilar-names'); // deterministic, sources: ['canon']- const infoDump = getCheck('prose.info-dumping'); // LLM, sources: ['manuscript']+ const _infoDump = getCheck('prose.info-dumping'); // LLM, sources: ['manuscript']const hadDeps = Object.prototype.hasOwnProperty.call(naming, 'dependsOn');const originalDeps = naming.dependsOn;naming.dependsOn = ['prose.info-dumping']; // naming now depends on a manuscript readerdiff --git a/server/services/pipeline/editorial/comparativeRank.test.js b/server/services/pipeline/editorial/comparativeRank.test.jsindex 9d6a15c9a2..2b43e105fb 100644--- a/server/services/pipeline/editorial/comparativeRank.test.js+++ b/server/services/pipeline/editorial/comparativeRank.test.js@@ -33,7 +33,7 @@ vi.mock('../readerPanelDigest.js', () => ({computeSourceContentHash: vi.fn(async () => 'HASH-v1'),}));-const fileUtils = await import('../../../lib/fileUtils.js');+const _fileUtils = await import('../../../lib/fileUtils.js');const stageRunner = await import('../../stageRunner.js');const issuesSvc = await import('../issues.js');const digest = await import('../readerPanelDigest.js');@@ -49,7 +49,6 @@ const {getComparativeRank,eligibleIssues,START_RATING,- ELO_K,TOURNAMENT_STOP,__testing,} = await import('./comparativeRank.js');diff --git a/server/services/pipeline/foundationJudge.test.js b/server/services/pipeline/foundationJudge.test.jsindex 421555e8b9..dbe6a3cfc3 100644--- a/server/services/pipeline/foundationJudge.test.js+++ b/server/services/pipeline/foundationJudge.test.js@@ -68,7 +68,6 @@ const arcPlanner = await import('./arcPlanner.js');const issuesSvc = await import('./issues.js');const {judgeFoundation,- getFoundationJudge,computeWeightedScore,weakestDimension,foundationGateStatus,diff --git a/server/services/pipeline/issues.test.js b/server/services/pipeline/issues.test.jsindex 92743a5c3e..72a446dee0 100644--- a/server/services/pipeline/issues.test.js+++ b/server/services/pipeline/issues.test.js@@ -958,9 +958,9 @@ describe('pipeline issues service', () => {});it('renumberInline skips tombstones — surviving issues stay contiguous', async () => {- const a = await svc.createIssue({ seriesId: 'ser-renum', title: 'A' });+ const _a = await svc.createIssue({ seriesId: 'ser-renum', title: 'A' });const b = await svc.createIssue({ seriesId: 'ser-renum', title: 'B' });- const c = await svc.createIssue({ seriesId: 'ser-renum', title: 'C' });+ const _c = await svc.createIssue({ seriesId: 'ser-renum', title: 'C' });await svc.deleteIssue(b.id);const live = await svc.listIssues({ seriesId: 'ser-renum' });expect(live.map((i) => i.title)).toEqual(['A', 'C']);diff --git a/server/services/pipeline/seasons.test.js b/server/services/pipeline/seasons.test.jsindex a607309792..170ba3a878 100644--- a/server/services/pipeline/seasons.test.js+++ b/server/services/pipeline/seasons.test.js@@ -87,7 +87,7 @@ describe('pipeline seasons service', () => {it('updateSeason re-sorts when number changes', async () => {const s = await setupSeries();const a = await svc.createSeason(s.id, { title: 'A', number: 1 });- const b = await svc.createSeason(s.id, { title: 'B', number: 2 });+ const _b = await svc.createSeason(s.id, { title: 'B', number: 2 });await svc.updateSeason(s.id, a.id, { number: 3 });const seasons = await svc.listSeasons(s.id);expect(seasons.map((x) => x.title)).toEqual(['B', 'A']);diff --git a/server/services/pipeline/seriesAutopilot.test.js b/server/services/pipeline/seriesAutopilot.test.jsindex 8eea0a2082..81e4aae157 100644--- a/server/services/pipeline/seriesAutopilot.test.js+++ b/server/services/pipeline/seriesAutopilot.test.js@@ -249,7 +249,7 @@ const { resolveNextStep, requiredScriptStages, scriptStructurallyReady, visualReconst VALID_SCRIPT = 'PAGE 1\nPANEL 1\nA scene.';const ready = (output = 'x') => ({ status: 'ready', output });-const empty = () => ({ status: 'empty', output: '' });+const _empty = () => ({ status: 'empty', output: '' });const waitFor = async (predicate, { timeoutMs = 2000, intervalMs = 5 } = {}) => {const start = Date.now();diff --git a/server/services/pipeline/textStages.test.js b/server/services/pipeline/textStages.test.jsindex a0046afbdf..dde4d575b7 100644--- a/server/services/pipeline/textStages.test.js+++ b/server/services/pipeline/textStages.test.js@@ -337,7 +337,7 @@ describe('pipeline text stage generator', () => {title: 'V1', logline: 'volume logline', synopsis: 'volume synopsis',endingHook: 'the bridge falls', episodeCountTarget: 8,});- const i1 = await issuesSvc.createIssue({+ const _i1 = await issuesSvc.createIssue({seriesId: series.id, title: 'Pilot', seasonId: sea.id, arcPosition: 1, arcRole: 'pilot',});const i2 = await issuesSvc.createIssue({diff --git a/server/services/pm2Standardizer.js b/server/services/pm2Standardizer.jsindex c8a231f9db..c53edcadb2 100644--- a/server/services/pm2Standardizer.js+++ b/server/services/pm2Standardizer.js@@ -265,7 +265,7 @@ async function gatherConfigContext(dirPath) {['packages/web/vite.config.ts', join(dirPath, 'packages/web')]];- for (const [relPath, fullDir] of vitePaths) {+ for (const [relPath, _fullDir] of vitePaths) {const fullPath = join(dirPath, relPath);if (existsSync(fullPath)) {const content = await readFile(fullPath, 'utf-8').catch(() => '');diff --git a/server/services/privacyBrokers.db.test.js b/server/services/privacyBrokers.db.test.jsindex 6ceb39e9ad..2f8203beff 100644--- a/server/services/privacyBrokers.db.test.js+++ b/server/services/privacyBrokers.db.test.js@@ -46,7 +46,7 @@ describe.skipIf(!runDb)('privacy brokers DB round-trip', () => {'test-evidence-seal', 'test-evidence-erase', 'test-evidence-legacy', 'test-evidence-vault',];const createdVaultIds = [];- const vaultTableWasEmpty = false;+ const _vaultTableWasEmpty = false;const testStart = new Date().toISOString();beforeAll(async () => {diff --git a/server/services/privacyOptOut.db.test.js b/server/services/privacyOptOut.db.test.jsindex 4364cc7110..419d3b956b 100644--- a/server/services/privacyOptOut.db.test.js+++ b/server/services/privacyOptOut.db.test.js@@ -61,7 +61,7 @@ describe.skipIf(!runDb)('privacy opt-out engine DB round-trip', () => {await query(`DELETE FROM privacy_broker_cases`).catch(() => {});// A web-form broker + an email broker, inserted directly (auto source so the// curated seed idempotency is untouched).- for (const [id, name, optout, antibot] of [+ for (const [id, name, optout, _antibot] of [[brokerId, 'Test OptOut Broker', { method: 'web_form', url: 'https://test-optout.example/optout', playbook: ['step 1'] }, false],[emailBrokerId, 'Test OptOut Email', { method: 'email', email: '[email protected]', url: 'https://test-optout.example' }, false],]) {diff --git a/server/services/privacyOptOut.test.js b/server/services/privacyOptOut.test.jsindex 49e90d1979..96583a7ef9 100644--- a/server/services/privacyOptOut.test.js+++ b/server/services/privacyOptOut.test.js@@ -43,12 +43,12 @@ vi.mock('./messageSync.js', () => ({ getMessages: vi.fn(async () => ({ messages:vi.mock('./settings.js', () => ({ getSettings: vi.fn(async () => ({ privacy: { recheck: {} } })) }));const {- DISCLOSURE_ALLOWLIST, buildDisclosurePayload, computeDisclosedFields, renderDisclosedSummary,+ DISCLOSURE_ALLOWLIST, buildDisclosurePayload, computeDisclosedFields,chooseLane, chooseEmailTemplate, fillTemplate, renderOptOutEmail,brokerDomains, scoreVerificationEmail, planOptOutActions,emailLane, webFormLane, runOptOutPass, runVerificationPass, getOptOutDigest,} = await import('./privacyOptOut.js');-const scan = await import('./privacyScan.js');+const _scan = await import('./privacyScan.js');const settings = await import('./settings.js');beforeEach(() => {diff --git a/server/services/repoCloner.test.js b/server/services/repoCloner.test.jsindex 14ad8660ce..68a7241775 100644--- a/server/services/repoCloner.test.js+++ b/server/services/repoCloner.test.js@@ -324,7 +324,7 @@ describe('pullRepo', () => {child.emit('close', 0);- const result = await expect(resultPromise).resolves.toMatchObject({+ const _result = await expect(resultPromise).resolves.toMatchObject({success: true});// Verify that child.kill() was NOT called by the timeout@@ -376,7 +376,7 @@ describe('pullRepo', () => {await vi.waitFor(() => expect(spawn).toHaveBeenCalled());// Get a reference to the timeout so we can verify it was called- const timeoutHandle = vi.useFakeTimers();+ const _timeoutHandle = vi.useFakeTimers();// Simulate close eventchild.emit('close', 0);diff --git a/server/services/sharing/buckets.js b/server/services/sharing/buckets.jsindex 6743d5e614..70972bde4f 100644--- a/server/services/sharing/buckets.js+++ b/server/services/sharing/buckets.js@@ -68,7 +68,7 @@ async function assertPathUsable(path) {let st;try {st = await stat(path);- } catch (err) {+ } catch (_err) {throw codedError(`Bucket path does not exist or is unreadable: ${path}`, ERR_PATH_UNUSABLE);}if (!st.isDirectory()) {@@ -76,7 +76,7 @@ async function assertPathUsable(path) {}try {await access(path, constants.R_OK | constants.W_OK);- } catch (err) {+ } catch (_err) {throw codedError(`Bucket path is not writable: ${path}`, ERR_PATH_UNUSABLE);}}diff --git a/server/services/sharing/integration.test.js b/server/services/sharing/integration.test.jsindex a473ea63ba..4c05ca7070 100644--- a/server/services/sharing/integration.test.js+++ b/server/services/sharing/integration.test.js@@ -1653,7 +1653,7 @@ describe('sharing round-trip', () => {it('migrates legacy series canon arrays into the linked universe on import (pre-B.4 peer)', async () => {const bucket = await buckets.createBucket({ name: 'LegacyCanonBucket', path: tempBucket, mode: 'auto-merge' });- const fs = await import('fs');+ const _fs = await import('fs');// Local target universe — the migration writes incoming canon here.const uni = await universeSvc.createUniverse({ name: 'Pre-B.4 Universe' });diff --git a/server/services/storyBuilder.js b/server/services/storyBuilder.jsindex 989ed141b8..d8513b057e 100644--- a/server/services/storyBuilder.js+++ b/server/services/storyBuilder.js@@ -74,7 +74,7 @@ export const storyBuilderStore = () => store();export const ERR_NOT_FOUND = 'STORY_BUILDER_NOT_FOUND';export const ERR_VALIDATION = 'STORY_BUILDER_VALIDATION';-const SESSION_ID_RE = /^stb-[A-Za-z0-9-]+$/;+const _SESSION_ID_RE = /^stb-[A-Za-z0-9-]+$/;export const TITLE_MAX = 200;export const SEED_MAX = 4000;export const INTAKE_MODES = Object.freeze(['seed', 'import']);diff --git a/server/services/streamingDetect.js b/server/services/streamingDetect.jsindex 14cd932bc7..fc5e750420 100644--- a/server/services/streamingDetect.js+++ b/server/services/streamingDetect.js@@ -278,7 +278,7 @@ export function parseEcosystemConfig(content) {// This regex captures app objects including nested bracesconst appBlockRegex = /\{\s*name\s*:\s*['"]([^'"]+)['"]/g;let match;- let lastIndex = 0;+ let _lastIndex = 0;while ((match = appBlockRegex.exec(content)) !== null) {const processName = match[1];@@ -487,7 +487,7 @@ export function parseEcosystemConfig(content) {const usesVite = /\bvite\b/i.test(appBlock) || /VITE_PORT/i.test(appBlock);processes.push({ name: processName, port, ports, cwd, usesVite });- lastIndex = endPos;+ _lastIndex = endPos;}// Post-process: when an app has both an API process and Vite dev processes,diff --git a/server/services/systemHealthSnapshot.js b/server/services/systemHealthSnapshot.jsindex abb6a26961..39ee04821a 100644--- a/server/services/systemHealthSnapshot.js+++ b/server/services/systemHealthSnapshot.js@@ -392,7 +392,7 @@ export async function getSystemHealthSnapshot() {const uptime = process.uptime();const uptimeFormatted = formatDuration(uptime * 1000);- const responseTime = Date.now() - startTime;+ const _responseTime = Date.now() - startTime;return {timestamp: new Date().toISOString(),diff --git a/server/services/videoGen/fal.test.js b/server/services/videoGen/fal.test.jsindex 134b654b8a..d90624eb0f 100644--- a/server/services/videoGen/fal.test.js+++ b/server/services/videoGen/fal.test.js@@ -407,7 +407,7 @@ describe('videoGen/fal — cancel abandoned renders (#8340)', () => {const completed = vi.fn();videoGenEvents.on('completed', completed);- const job = await fal.generateVideo({ apiKey: 'test-key', modelId: 'fal-ai/x', prompt: 'retry me' });+ const _job = await fal.generateVideo({ apiKey: 'test-key', modelId: 'fal-ai/x', prompt: 'retry me' });// Two failed status attempts, each separated by the normal poll interval,// then a third attempt that reports COMPLETED.diff --git a/server/services/videoGen/local.test.js b/server/services/videoGen/local.test.jsindex 5b90037a62..68fac43410 100644--- a/server/services/videoGen/local.test.js+++ b/server/services/videoGen/local.test.js@@ -1011,7 +1011,7 @@ describe('extractLastFrame — anchor selection', () => {** Returns the array of per-chunk params in call order.*/-async function runChainAndCaptureArgs(chainParams, totalChunks) {+async function _runChainAndCaptureArgs(chainParams, totalChunks) {const captured = [];const innerJobIds = [];diff --git a/server/services/voice/llm.js b/server/services/voice/llm.jsindex fa26989017..8218864292 100644--- a/server/services/voice/llm.js+++ b/server/services/voice/llm.js@@ -442,7 +442,7 @@ export const streamChat = async (messages, opts = {}) => {// open/close tag are held across chunks. All tag spellings handled in parallel.const STRIP_TAGS = [...TOOL_TAG_SPELLINGS, 'think', 'thinking', 'reasoning'];const OPEN_TAGS = STRIP_TAGS.map((s) => `<${s}>`);- const CLOSE_TAGS = STRIP_TAGS.map((s) => `</${s}>`);+ const _CLOSE_TAGS = STRIP_TAGS.map((s) => `</${s}>`);let activeClose = null; // set when we entered a tool blocklet tailHold = '';// Find the earliest match of any candidate in `data`, starting at 0.diff --git a/server/services/writersRoom/local.js b/server/services/writersRoom/local.jsindex c5880c39cb..0d13df0841 100644--- a/server/services/writersRoom/local.js+++ b/server/services/writersRoom/local.js@@ -807,7 +807,7 @@ export async function promoteExercise(id) {const text = typeof existing.appendedText === 'string' ? existing.appendedText.trim() : '';if (!text) throw badRequest('Exercise has no text to promote');- const { manifest, body } = await getWorkWithBody(existing.workId);+ const { body } = await getWorkWithBody(existing.workId);const nextBody = body.trimEnd() === '' ? text : `${body.trimEnd()}\n\n${text}\n`;const { manifest: updatedManifest } = await saveDraftBody(existing.workId, nextBody);const promoted = {