Open-source AI coworkers that each get a computer of their own: a browser, files and tools, with every action decided before it happens and recorded after. Bring any AG-UI agent.
fix: fail the lint check on the warnings it reports (#75) (#120)
Nathan πΆ Tarberte9ac71fa6512
diff --git a/agent-computer/tests/shell.test.ts b/agent-computer/tests/shell.test.tsindex f83c8322..048e4291 100644--- a/agent-computer/tests/shell.test.ts+++ b/agent-computer/tests/shell.test.ts@@ -216,6 +216,7 @@ describe("the command that actually runs", () => {);const result = await createShell(root, source()).run({+ // biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture β this asserts on unexpanded placeholder text, so a real template would break the test.command: 'echo "[${MARKER:-clean}]"',});diff --git a/biome.json b/biome.jsonindex e1c542f3..753a792c 100644--- a/biome.json+++ b/biome.json@@ -21,5 +21,17 @@"parser": {"tailwindDirectives": true}- }+ },+ "overrides": [+ {+ "includes": ["**/tests/**", "**/*.test.ts", "**/*.test.tsx"],+ "linter": {+ "rules": {+ "style": {+ "noNonNullAssertion": "off"+ }+ }+ }+ }+ ]}diff --git a/package.json b/package.jsonindex d202dbbf..451c99c9 100644--- a/package.json+++ b/package.json@@ -15,7 +15,7 @@"generate:app-config": "bun --env-file=.env scripts/generate-app-config.ts","format": "bunx biome format --write .","format:check": "bunx biome format .",- "lint": "bunx biome lint .",+ "lint": "bunx biome lint --error-on-warnings .","test": "bun test","typecheck": "bun run --filter '*' typecheck","test:ci": "bun scripts/test-ci.ts",diff --git a/server/tests/skill-ownership.integration.test.ts b/server/tests/skill-ownership.integration.test.tsindex cdb44a40..770f7d80 100644--- a/server/tests/skill-ownership.integration.test.ts+++ b/server/tests/skill-ownership.integration.test.ts@@ -1,6 +1,6 @@import { afterAll, beforeAll, describe, expect, test } from "bun:test";import { randomUUID } from "node:crypto";-import { eq, inArray } from "drizzle-orm";+import { inArray } from "drizzle-orm";import { createAuditStore } from "../src/audit";import type { ActionPolicy } from "../src/computer/policy";import { createDatabase } from "../src/db/client";@@ -24,7 +24,7 @@ const database = createDatabase(TEST_POOL,);-let policy: ActionPolicy = { mode: "enforce", deny: [], allow: ["true"] };+const policy: ActionPolicy = { mode: "enforce", deny: [], allow: ["true"] };const store = createPluginStore({database,diff --git a/server/tests/tenant-package.test.ts b/server/tests/tenant-package.test.tsindex 5e1dc3c8..911e9684 100644--- a/server/tests/tenant-package.test.ts+++ b/server/tests/tenant-package.test.ts@@ -606,6 +606,7 @@ describe("expanding a package file against the environment", () => {test("takes the value from the environment", () => {expect(+ // biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture β this asserts on unexpanded placeholder text, so a real template would break the test.expandEnvironment("endpoint: ${AG_UI_URL}", file, {AG_UI_URL: "https://bots.example.test/ag-ui",}),@@ -615,6 +616,7 @@ describe("expanding a package file against the environment", () => {test("falls back to the default when the name is not set", () => {expect(expandEnvironment(+ // biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture β this asserts on unexpanded placeholder text, so a real template would break the test."endpoint: ${AG_UI_URL:-http://localhost:4200}",file,{},@@ -624,6 +626,7 @@ describe("expanding a package file against the environment", () => {test("prefers the environment over the default", () => {expect(+ // biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture β this asserts on unexpanded placeholder text, so a real template would break the test.expandEnvironment("endpoint: ${AG_UI_URL:-http://localhost:4200}", file, {AG_UI_URL: "https://bots.example.test",}),@@ -632,6 +635,7 @@ describe("expanding a package file against the environment", () => {test("treats an empty value as unset", () => {expect(+ // biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture β this asserts on unexpanded placeholder text, so a real template would break the test.expandEnvironment("endpoint: ${AG_UI_URL:-http://localhost:4200}", file, {AG_UI_URL: "",}),@@ -639,12 +643,14 @@ describe("expanding a package file against the environment", () => {});test("an empty default is allowed and is not an error", () => {+ // biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture β this asserts on unexpanded placeholder text, so a real template would break the test.expect(expandEnvironment("suffix: ${NOTHING:-}", file, {})).toBe("suffix: ",);});test("refuses a name with neither a value nor a default", () => {+ // biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture β this asserts on unexpanded placeholder text, so a real template would break the test.expect(() => expandEnvironment("endpoint: ${AG_UI_URL}", file, {})).toThrow(/agents\.yaml refers to \$\{AG_UI_URL\}/,);diff --git a/tests/compose.test.ts b/tests/compose.test.tsindex ce020334..c80b6eba 100644--- a/tests/compose.test.ts+++ b/tests/compose.test.ts@@ -10,6 +10,7 @@ test("provides PostgreSQL with pgvector for local development", () => {expect(compose).toContain("postgres:");expect(compose).toContain("pgvector/pgvector:");+ // biome-ignore lint/suspicious/noTemplateCurlyInString: the literal `${...}` is the fixture β this asserts on unexpanded placeholder text, so a real template would break the test.expect(compose).toContain("${POSTGRES_PORT:-5432}:5432");});