diff --git a/packages/stage-shared/src/url.ts b/packages/stage-shared/src/url.ts index 2d5fc6913..08536cbcf 100644 --- a/packages/stage-shared/src/url.ts +++ b/packages/stage-shared/src/url.ts @@ -1,14 +1,7 @@ import { isUrlMode } from './environment' export function isUrl(url: string) { - try { - // eslint-disable-next-line no-new - new URL(url) - return true - } - catch { - return false - } + return URL.canParse(url) } export function withBase(url: string) { diff --git a/packages/vishot-runtime/src/vue/components/screen-navigator/screen-navigator.test.ts b/packages/vishot-runtime/src/vue/components/screen-navigator/screen-navigator.test.ts index 549d0f87d..a448ec840 100644 --- a/packages/vishot-runtime/src/vue/components/screen-navigator/screen-navigator.test.ts +++ b/packages/vishot-runtime/src/vue/components/screen-navigator/screen-navigator.test.ts @@ -14,6 +14,7 @@ beforeAll(() => { value: vi.fn(), }) + // eslint-disable-next-line no-extend-native Object.defineProperty(Object.prototype, 'scrollIntoView', { configurable: true, value: vi.fn(), @@ -28,10 +29,10 @@ afterAll(() => { if (originalObjectScrollIntoView === undefined) { // Keep Object prototype clean when this shim didn't exist before the test run. - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete delete (Object.prototype as { scrollIntoView?: unknown }).scrollIntoView } else { + // eslint-disable-next-line no-extend-native Object.defineProperty(Object.prototype, 'scrollIntoView', { configurable: true, value: originalObjectScrollIntoView, diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 6a557069b..2246bedc3 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -84,7 +84,6 @@ catalog: alien-signals: ^3.1.2 async-mutex: 0.5.0 better-auth: ^1.6.2 - better-call: ^2.0.3 builder-util-runtime: ^9.5.1 cac: ^7.0.0 capacitor-native-settings: ^8.1.0 diff --git a/services/computer-use-mcp/fixtures/fake-runner.mjs b/services/computer-use-mcp/fixtures/fake-runner.mjs index ac2192b50..89ba2fdb3 100644 --- a/services/computer-use-mcp/fixtures/fake-runner.mjs +++ b/services/computer-use-mcp/fixtures/fake-runner.mjs @@ -1,16 +1,17 @@ -import { createInterface } from 'node:readline' +import { env } from 'node:process' +import { createInterface, exit, stdin, stdout } from 'node:readline' // TODO(@nekomeowww): try now to directly embed binary / base64, even tests. `xz` warned us. const tinyPngBase64 = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAusB9Wn8vO0AAAAASUVORK5CYII=' const state = { - sessionTag: process.env.FAKE_RUNNER_SESSION_TAG || 'vm-local-1', - displayId: process.env.FAKE_RUNNER_DISPLAY_ID || ':99', - hostName: process.env.FAKE_RUNNER_HOST_NAME || 'fake-remote', - remoteUser: process.env.FAKE_RUNNER_REMOTE_USER || 'airi', - width: Number.parseInt(process.env.FAKE_RUNNER_WIDTH || '1280', 10), - height: Number.parseInt(process.env.FAKE_RUNNER_HEIGHT || '720', 10), - observationBaseUrl: process.env.FAKE_RUNNER_OBSERVATION_BASE_URL || '', + sessionTag: env.FAKE_RUNNER_SESSION_TAG || 'vm-local-1', + displayId: env.FAKE_RUNNER_DISPLAY_ID || ':99', + hostName: env.FAKE_RUNNER_HOST_NAME || 'fake-remote', + remoteUser: env.FAKE_RUNNER_REMOTE_USER || 'airi', + width: Number.parseInt(env.FAKE_RUNNER_WIDTH || '1280', 10), + height: Number.parseInt(env.FAKE_RUNNER_HEIGHT || '720', 10), + observationBaseUrl: env.FAKE_RUNNER_OBSERVATION_BASE_URL || '', } function executionTarget() { @@ -61,11 +62,11 @@ function displayInfo() { } function writeResponse(response) { - process.stdout.write(`${JSON.stringify(response)}\n`) + stdout.write(`${JSON.stringify(response)}\n`) } const rl = createInterface({ - input: process.stdin, + input: stdin, crlfDelay: Infinity, }) @@ -76,8 +77,8 @@ rl.on('line', (line) => { } const request = JSON.parse(trimmed) - if (process.env.FAKE_RUNNER_CLOSE_ON_MUTATION === '1' && ['click', 'typeText', 'pressKeys', 'scroll'].includes(request.method)) { - process.exit(1) + if (env.FAKE_RUNNER_CLOSE_ON_MUTATION === '1' && ['click', 'typeText', 'pressKeys', 'scroll'].includes(request.method)) { + exit(1) } switch (request.method) { @@ -183,6 +184,6 @@ rl.on('line', (line) => { ok: true, }, }) - process.exit(0) + exit(0) } }) diff --git a/services/computer-use-mcp/fixtures/interactive-echo.mjs b/services/computer-use-mcp/fixtures/interactive-echo.mjs index db9c814d4..0abee3e6f 100644 --- a/services/computer-use-mcp/fixtures/interactive-echo.mjs +++ b/services/computer-use-mcp/fixtures/interactive-echo.mjs @@ -12,15 +12,16 @@ * exercising the real PTY read/write/lifecycle path. */ +import { exit, stdin, stdout } from 'node:process' import { createInterface } from 'node:readline' -const rl = createInterface({ input: process.stdin, output: process.stdout }) +const rl = createInterface({ input: stdin, output: stdout }) -process.stdout.write('READY> ') +stdout.write('READY> ') rl.once('line', (line) => { - process.stdout.write(`ECHO: ${line}\n`) - process.stdout.write('DONE\n') + stdout.write(`ECHO: ${line}\n`) + stdout.write('DONE\n') rl.close() - process.exit(0) + exit(0) }) diff --git a/services/minecraft/src/cognitive/conscious/prompts/brain-prompt.md b/services/minecraft/src/cognitive/conscious/prompts/brain-prompt.md index d4911dae8..68c9d2bf7 100644 --- a/services/minecraft/src/cognitive/conscious/prompts/brain-prompt.md +++ b/services/minecraft/src/cognitive/conscious/prompts/brain-prompt.md @@ -222,7 +222,9 @@ Push an episodic alert to AIRI. Use for significant, non-routine events only. ```js // Example — low health +// eslint-disable-next-line no-restricted-globals if (self.health <= 4) { + // eslint-disable-next-line no-restricted-globals notifyAiri('Under attack and low health', `Health: ${self.health}. Retreating.`, 'immediate') await goToCoordinate({ x: mem.safeSpot.x, y: mem.safeSpot.y, z: mem.safeSpot.z, closeness: 2 }) }