Skip to content

Commit 36597e1

Browse files
lalaluneclaude
andcommitted
chore: WS-1 fix remaining biome error-level findings in safe files
useLiteralKeys/useOptionalChain/useNodejsImportProtocol/noUnusedImports/ noUnusedVariables/noUnusedFunctionParameters across build-mobile-bundle.mjs, generate-registry.js, the registry vite config, device-bridge-client.ts, final-checks, the core live-test harnesses, a couple test files. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0ae5784 commit 36597e1

13 files changed

Lines changed: 22 additions & 24 deletions

File tree

packages/agent/scripts/build-mobile-bundle.mjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ if (TARGET === "ios" || TARGET === "ios-jsc") {
316316
stubsDir,
317317
"ios-child-process.cjs",
318318
);
319-
nativeStubs["child_process"] = path.join(stubsDir, "ios-child-process.cjs");
319+
nativeStubs.child_process = path.join(stubsDir, "ios-child-process.cjs");
320320
nativeStubs["node:os"] = path.join(stubsDir, "ios-os.cjs");
321321
// Note: `bun:ffi` is provided natively by the iOS Bun runtime; the
322322
// ios-ffi.cjs stub only loads in dev/desktop fallbacks where this bundle
@@ -333,17 +333,17 @@ if (TARGET === "ios-jsc") {
333333
const throwStub = path.join(stubsDir, "ios-jsc-throw.cjs");
334334
const dnsStub = path.join(stubsDir, "ios-jsc-dns.cjs");
335335
nativeStubs["node:net"] = throwStub;
336-
nativeStubs["net"] = throwStub;
336+
nativeStubs.net = throwStub;
337337
nativeStubs["node:tls"] = throwStub;
338-
nativeStubs["tls"] = throwStub;
338+
nativeStubs.tls = throwStub;
339339
nativeStubs["node:dgram"] = throwStub;
340-
nativeStubs["dgram"] = throwStub;
340+
nativeStubs.dgram = throwStub;
341341
nativeStubs["node:cluster"] = throwStub;
342-
nativeStubs["cluster"] = throwStub;
342+
nativeStubs.cluster = throwStub;
343343
nativeStubs["node:worker_threads"] = throwStub;
344-
nativeStubs["worker_threads"] = throwStub;
344+
nativeStubs.worker_threads = throwStub;
345345
nativeStubs["node:dns"] = dnsStub;
346-
nativeStubs["dns"] = dnsStub;
346+
nativeStubs.dns = dnsStub;
347347
nativeStubs["node:dns/promises"] = dnsStub;
348348
nativeStubs["dns/promises"] = dnsStub;
349349
nativeStubs["bun:ffi"] = path.join(stubsDir, "ios-ffi.cjs");

packages/app-core/src/benchmark/lifeops-fake-backend.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,10 +1330,9 @@ export class LifeOpsFakeBackend {
13301330
? `Re: ${parent.subject}`
13311331
: pickString(kw, ["subject"], "Re:");
13321332
const fromEmail = pickString(kw, ["from_email"], "me@example.test");
1333-
const toEmails =
1334-
parent && parent.from_email
1335-
? [parent.from_email]
1336-
: pickStringArray(kw, ["to_emails"]);
1333+
const toEmails = parent?.from_email
1334+
? [parent.from_email]
1335+
: pickStringArray(kw, ["to_emails"]);
13371336
if (toEmails.length === 0) {
13381337
throw new Error(
13391338
`MESSAGE/draft_reply needs a parent email or to_emails (parent=${parentId})`,

packages/app/test/ui-smoke/ai-qa-capture.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
type AiQaRoute,
88
type ReadyCheck,
99
SETTINGS_SECTIONS,
10-
THEMES,
1110
type Theme,
1211
VIEWPORT_SIZES,
1312
type ViewportName,

packages/core/src/features/advanced-capabilities/providers/facts.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ describe("factsProvider keyword retrieval", () => {
119119
// vi.setSystemTime, so pin Date.now() directly. This is the only
120120
// timestamp facts.ts reads when ranking current facts.
121121
const fixedNow = Date.parse("2026-05-11T12:00:00.000Z");
122-
const nowSpy = vi.spyOn(Date, "now").mockReturnValue(fixedNow);
122+
const _nowSpy = vi.spyOn(Date, "now").mockReturnValue(fixedNow);
123123
const runtime = makeRuntime({
124124
facts: [
125125
memory(

packages/core/test/live/orchestrator-live-failover.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import assert from "node:assert/strict";
22
import fs from "node:fs";
33
import os from "node:os";
44
import path from "node:path";
5-
import type { AgentRuntime, IAgentRuntime } from "@elizaos/core";
5+
import type { AgentRuntime } from "@elizaos/core";
66
import type { SwarmCoordinator } from "@elizaos/plugin-agent-orchestrator";
77
import { PTYService } from "@elizaos/plugin-agent-orchestrator";
88
import { elizaOSCloudPlugin } from "@elizaos/plugin-elizacloud";

packages/core/test/live/orchestrator-task-thread-integration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import assert from "node:assert/strict";
22
import fs from "node:fs";
33
import os from "node:os";
44
import path from "node:path";
5-
import type { AgentRuntime, IAgentRuntime } from "@elizaos/core";
5+
import type { AgentRuntime } from "@elizaos/core";
66
import type { SwarmCoordinator } from "@elizaos/plugin-agent-orchestrator";
77
import { PTYService } from "@elizaos/plugin-agent-orchestrator";
88
import { createTestRuntime } from "../helpers/pglite-runtime.ts";

packages/core/test/live/orchestrator-task-thread-restart.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import assert from "node:assert/strict";
22
import fs from "node:fs";
33
import os from "node:os";
44
import path from "node:path";
5-
import type { AgentRuntime, IAgentRuntime } from "@elizaos/core";
5+
import type { AgentRuntime } from "@elizaos/core";
66
import type { SwarmCoordinator } from "@elizaos/plugin-agent-orchestrator";
77
import { PTYService } from "@elizaos/plugin-agent-orchestrator";
88
import { createTestRuntime } from "../helpers/pglite-runtime.ts";

packages/core/test/live/research-task-thread-live.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { spawn } from "node:child_process";
33
import fs from "node:fs";
44
import os from "node:os";
55
import path from "node:path";
6-
import type { AgentRuntime, IAgentRuntime } from "@elizaos/core";
6+
import type { AgentRuntime } from "@elizaos/core";
77
import { SwarmCoordinator } from "@elizaos/plugin-agent-orchestrator";
88
import { createTestRuntime } from "../helpers/pglite-runtime.ts";
99

packages/core/test/live/task-agent-live-smoke.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import fs from "node:fs";
33
import { createServer, type Server } from "node:http";
44
import net from "node:net";
55
import path from "node:path";
6-
import type { AgentRuntime, IAgentRuntime } from "@elizaos/core";
6+
import type { AgentRuntime } from "@elizaos/core";
77
import {
88
cleanForChat,
99
listAgentsAction,

packages/native-plugins/llama/src/device-bridge-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ export class DeviceBridgeClient {
378378
: hardware.cpuCores
379379
: hardware.cpuCores;
380380
const gpu = useNativeOverride
381-
? native?.gpu && native.gpu.available
381+
? native?.gpu?.available
382382
? ({
383383
backend:
384384
native.gpu.backend === "metal" ||

0 commit comments

Comments
 (0)