xonecas.io
64875
Mc

mini-coder / commit 11a2103

chore: update dependencies and migrate biome config to v2

xonecas2026-03-08 11a210325d9318e562a1443439af9ab25867fcca parent db762c5

22 files changed

biome.json+6−7
@@ -1,7 +1,9 @@
11 {
2- "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3- "organizeImports": {
4- "enabled": true
2+ "$schema": "https://biomejs.dev/schemas/2.4.6/schema.json",
3+ "vcs": {
4+ "enabled": true,
5+ "clientKind": "git",
6+ "useIgnoreFile": true
57 },
68 "formatter": {
79 "enabled": true
@@ -21,7 +23,7 @@
2123 "suspicious": {
2224 "noDebugger": "error",
2325 "noExplicitAny": "error",
24- "noConsoleLog": "error"
26+ "noConsole": "error"
2527 },
2628 "correctness": {
2729 "noUnusedVariables": "error",
@@ -32,8 +34,5 @@
3234 },
3335 "javascript": {
3436 "globals": ["Bun", "Timer"]
35- },
36- "files": {
37- "ignore": ["node_modules", "dist"]
3837 }
3938 }
package.json+9−9
@@ -18,23 +18,23 @@
1818 "jscpd": "jscpd src"
1919 },
2020 "dependencies": {
21- "@ai-sdk/anthropic": "^3.0.46",
22- "@ai-sdk/google": "^3.0.30",
23- "@ai-sdk/openai": "^3.0.30",
24- "@ai-sdk/openai-compatible": "^2.0.30",
25- "@modelcontextprotocol/sdk": "^1.26.0",
26- "ai": "^6.0.94",
21+ "@ai-sdk/anthropic": "^3.0.58",
22+ "@ai-sdk/google": "^3.0.43",
23+ "@ai-sdk/openai": "^3.0.41",
24+ "@ai-sdk/openai-compatible": "^2.0.35",
25+ "@modelcontextprotocol/sdk": "^1.27.1",
26+ "ai": "^6.0.116",
2727 "ignore": "^7.0.5",
2828 "ollama-ai-provider": "^1.2.0",
29- "yoctocolors": "^2.1.1",
29+ "yoctocolors": "^2.1.2",
3030 "zod": "^4.3.6"
3131 },
3232 "devDependencies": {
33- "@biomejs/biome": "^1.9.4",
33+ "@biomejs/biome": "^2.4.6",
3434 "@types/bun": "latest",
3535 "jscpd": "^4.0.8",
3636 "knip": "^5.86.0",
37- "typescript": "^5.8.3"
37+ "typescript": "^5.9.3"
3838 },
3939 "license": "MIT"
4040 }
src/agent/agent.ts+5−9
@@ -2,25 +2,21 @@ import * as c from "yoctocolors";
22 import { loadAgents } from "../cli/agents.ts";
33 import type { CommandContext } from "../cli/commands.ts";
44 import { tildePath } from "../cli/output.ts";
5-import type { AgentReporter } from "./reporter.ts";
6-
7-import { type ThinkingEffort, getContextWindow } from "../llm-api/providers.ts";
5+import { getContextWindow, type ThinkingEffort } from "../llm-api/providers.ts";
86 import type { ToolDef } from "../llm-api/types.ts";
97 import { connectMcpServer } from "../mcp/client.ts";
10-
118 import {
129 listMcpServers,
1310 setPreferredModel,
1411 setPreferredThinkingEffort,
1512 } from "../session/db/index.ts";
16-import { createSubagentRunner } from "./subagent-runner.ts";
17-import { buildToolSet } from "./tools.ts";
18-import { undoLastTurn } from "./undo-snapshot.ts";
19-
2013 import { getGitBranch } from "./agent-helpers.ts";
21-
2214 import { runInputLoop } from "./input-loop.ts";
15+import type { AgentReporter } from "./reporter.ts";
2316 import { SessionRunner } from "./session-runner.ts";
17+import { createSubagentRunner } from "./subagent-runner.ts";
18+import { buildToolSet } from "./tools.ts";
19+import { undoLastTurn } from "./undo-snapshot.ts";
2420
2521 interface AgentOptions {
2622 model: string;
src/agent/input-loop.ts+1−1
@@ -1,6 +1,6 @@
11 import * as c from "yoctocolors";
22 import { type CommandContext, handleCommand } from "../cli/commands.ts";
3-import { readline, type InputResult } from "../cli/input.ts";
3+import { type InputResult, readline } from "../cli/input.ts";
44 import { PREFIX } from "../cli/output.ts";
55 import type { CoreMessage } from "../llm-api/turn.ts";
66 import { saveMessages } from "../session/db/index.ts";
src/agent/session-runner.ts+1−1
@@ -1,8 +1,8 @@
11 import * as c from "yoctocolors";
22 import type { ImageAttachment } from "../cli/image-types.ts";
33 import { watchForCancel } from "../cli/input.ts";
4-import { resolveModel } from "../llm-api/providers.ts";
54 import type { ThinkingEffort } from "../llm-api/providers.ts";
5+import { resolveModel } from "../llm-api/providers.ts";
66 import type { CoreMessage } from "../llm-api/turn.ts";
77 import { runTurn } from "../llm-api/turn.ts";
88 import type { ToolDef } from "../llm-api/types.ts";
src/agent/subagent-runner.ts+2−3
@@ -2,15 +2,16 @@ import { tmpdir } from "node:os";
22 import { join } from "node:path";
33 import { loadAgents } from "../cli/agents.ts";
44 import { formatSubagentLabel } from "../cli/output.ts";
5+import type { ThinkingEffort } from "../llm-api/providers.ts";
56 import { resolveModel } from "../llm-api/providers.ts";
67 import { type CoreMessage, runTurn } from "../llm-api/turn.ts";
78 import type { SubagentOutput } from "../tools/subagent.ts";
89 import {
9- MergeInProgressError,
1010 cleanupBranch,
1111 createWorktree,
1212 initializeWorktree,
1313 isGitRepo,
14+ MergeInProgressError,
1415 mergeWorktree,
1516 removeWorktree,
1617 syncDirtyStateToWorktree,
@@ -19,8 +20,6 @@ import type { AgentReporter } from "./reporter.ts";
1920 import { buildSystemPrompt } from "./system-prompt.ts";
2021 import { buildToolSet } from "./tools.ts";
2122
22-import type { ThinkingEffort } from "../llm-api/providers.ts";
23-
2423 function makeWorktreeBranch(laneId: string): string {
2524 return `mc-sub-${laneId}`;
2625 }
src/agent/tools.ts+6−7
@@ -1,13 +1,7 @@
11 import type { ToolDef } from "../llm-api/types.ts";
2-import { webContentTool, webSearchTool } from "../tools/exa.ts";
3-import {
4- type SubagentOutput,
5- createSubagentTool,
6- getSubagentMergeError,
7-} from "../tools/subagent.ts";
8-
92 import type { CreateOutput } from "../tools/create.ts";
103 import { createTool } from "../tools/create.ts";
4+import { webContentTool, webSearchTool } from "../tools/exa.ts";
115 import type { GlobOutput } from "../tools/glob.ts";
126 import { globTool } from "../tools/glob.ts";
137 import type { GrepOutput } from "../tools/grep.ts";
@@ -31,6 +25,11 @@ import type { ReplaceOutput } from "../tools/replace.ts";
3125 import { replaceTool } from "../tools/replace.ts";
3226 import type { ShellOutput } from "../tools/shell.ts";
3327 import { shellTool } from "../tools/shell.ts";
28+import {
29+ createSubagentTool,
30+ getSubagentMergeError,
31+ type SubagentOutput,
32+} from "../tools/subagent.ts";
3433
3534 // ─── Tool wrappers ────────────────────────────────────────────────────────────
3635
src/agent/undo-snapshot.ts+1−1
@@ -2,8 +2,8 @@ import type { CoreMessage } from "../llm-api/turn.ts";
22 import { deleteLastTurn } from "../session/db/index.ts";
33 import type { ActiveSession } from "../session/manager.ts";
44 import {
5- type SnapshotRestoreResult,
65 restoreSnapshot,
6+ type SnapshotRestoreResult,
77 } from "../tools/snapshot.ts";
88 import type { AgentReporter } from "./reporter.ts";
99
src/cli/commands.ts+5−6
@@ -1,16 +1,15 @@
11 import * as c from "yoctocolors";
2-import { fetchAvailableModels } from "../llm-api/providers.ts";
32 import type { ThinkingEffort } from "../llm-api/providers.ts";
4-import {
5- type SubagentOutput,
6- getSubagentMergeError,
7-} from "../tools/subagent.ts";
8-
3+import { fetchAvailableModels } from "../llm-api/providers.ts";
94 import {
105 deleteMcpServer,
116 listMcpServers,
127 upsertMcpServer,
138 } from "../session/db/index.ts";
9+import {
10+ getSubagentMergeError,
11+ type SubagentOutput,
12+} from "../tools/subagent.ts";
1413 import { loadAgents } from "./agents.ts";
1514 import {
1615 type CustomCommand,
src/cli/load-markdown-configs.ts+1−1
@@ -1,4 +1,4 @@
1-import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
1+import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
22 import { homedir } from "node:os";
33 import { basename, join } from "node:path";
44 import { warnConventionConflicts } from "./config-conflicts.ts";
src/cli/output-reporter.ts+1−1
@@ -7,7 +7,6 @@ import type {
77 } from "../agent/reporter.ts";
88 import type { TurnEvent } from "../llm-api/types.ts";
99 import {
10- Spinner,
1110 renderError,
1211 renderHook,
1312 renderInfo,
@@ -15,6 +14,7 @@ import {
1514 renderSubagentEvent,
1615 renderTurn,
1716 restoreTerminal,
17+ Spinner,
1818 writeln,
1919 } from "./output.ts";
2020
src/cli/output.ts+3−3
@@ -82,13 +82,13 @@ export function renderInfo(msg: string): void {
8282 writeln(`${G.info} ${c.dim(msg)}`);
8383 }
8484
85+export { renderError } from "./error-render.ts";
8586 // Re-exports
8687 export { Spinner } from "./spinner.ts";
88+export { renderStatusBar } from "./status-bar.ts";
8789 export { renderTurn } from "./stream-render.ts";
8890 export {
8991 formatSubagentLabel,
90- renderSubagentEvent,
9192 renderHook,
93+ renderSubagentEvent,
9294 } from "./tool-render.ts";
93-export { renderStatusBar } from "./status-bar.ts";
94-export { renderError } from "./error-render.ts";
src/cli/terminal-io.ts+0−1
@@ -1,5 +1,4 @@
11 class TerminalIO {
2- private cleanupHandlers: Set<() => void> = new Set();
32 private rawModeEnabled = false;
43 private interruptHandler: (() => void) | null = null;
54
src/index.ts+1−1
@@ -2,13 +2,13 @@
22 import * as c from "yoctocolors";
33 import { runAgent } from "./agent/agent.ts";
44 import { initErrorLog } from "./cli/error-log.ts";
5-import { CliReporter } from "./cli/output-reporter.ts";
65 import {
76 registerTerminalCleanup,
87 renderBanner,
98 renderError,
109 writeln,
1110 } from "./cli/output.ts";
11+import { CliReporter } from "./cli/output-reporter.ts";
1212 import { initApiLog } from "./llm-api/api-log.ts";
1313 import {
1414 initModelInfoCache,
src/llm-api/model-info.test.ts+1−1
@@ -1,11 +1,11 @@
11 import { describe, expect, test } from "bun:test";
22 import {
3- MODEL_INFO_TTL_MS,
43 buildModelMatchIndex,
54 getProvidersToRefreshFromEnv,
65 getRemoteProvidersFromEnv,
76 isProviderVisibleInSnapshot,
87 isStaleTimestamp,
8+ MODEL_INFO_TTL_MS,
99 matchCanonicalModelId,
1010 normalizeModelId,
1111 parseModelsDevCapabilities,
src/llm-api/model-info.ts+2−2
@@ -1,9 +1,9 @@
11 import {
2- type ModelCapabilityRow,
3- type ProviderModelRow,
42 listModelCapabilities,
53 listModelInfoState,
64 listProviderModels,
5+ type ModelCapabilityRow,
6+ type ProviderModelRow,
77 replaceModelCapabilities,
88 replaceProviderModels,
99 setModelInfoState,
src/llm-api/turn.ts+3−3
@@ -1,10 +1,10 @@
1-import { dynamicTool, jsonSchema, stepCountIs, streamText } from "ai";
21 import type { FlexibleSchema, StepResult } from "ai";
2+import { dynamicTool, jsonSchema, stepCountIs, streamText } from "ai";
33 import { logApiEvent } from "./api-log.ts";
4-import { parseModelString } from "./providers.ts";
54 import {
6- type ThinkingEffort,
75 getThinkingProviderOptions,
6+ parseModelString,
7+ type ThinkingEffort,
88 } from "./providers.ts";
99 import type { ToolDef, TurnEvent } from "./types.ts";
1010
src/session/db/index.ts+3−3
@@ -1,7 +1,7 @@
11 export * from "./connection.ts";
2-export * from "./session-repo.ts";
2+export * from "./mcp-repo.ts";
33 export * from "./message-repo.ts";
4+export * from "./model-info-repo.ts";
5+export * from "./session-repo.ts";
46 export * from "./settings-repo.ts";
5-export * from "./mcp-repo.ts";
67 export * from "./snapshot-repo.ts";
7-export * from "./model-info-repo.ts";
src/session/manager.ts+1−1
@@ -2,12 +2,12 @@ import * as c from "yoctocolors";
22 import { tildePath, writeln } from "../cli/output.ts";
33 import type { CoreMessage } from "../llm-api/turn.ts";
44 import {
5- type SessionRow,
65 createSession,
76 generateSessionId,
87 getSession,
98 listSessions,
109 loadMessages,
10+ type SessionRow,
1111 touchSession,
1212 } from "./db/index.ts";
1313
src/tools/hooks.ts+1−1
@@ -1,4 +1,4 @@
1-import { constants, accessSync } from "node:fs";
1+import { accessSync, constants } from "node:fs";
22 import { homedir } from "node:os";
33 import { join } from "node:path";
44
src/tools/snapshot.ts+1−1
@@ -18,9 +18,9 @@
1818 import { readFileSync, unlinkSync } from "node:fs";
1919 import { join } from "node:path";
2020 import {
21- type SnapshotFile,
2221 deleteSnapshot,
2322 loadSnapshot,
23+ type SnapshotFile,
2424 saveSnapshot,
2525 } from "../session/db/index.ts";
2626
src/tools/worktree.test.ts+1−1
@@ -9,12 +9,12 @@ import {
99 import { tmpdir } from "node:os";
1010 import { join } from "node:path";
1111 import {
12- MergeInProgressError,
1312 cleanupBranch,
1413 createWorktree,
1514 hasDirtyWorkingTree,
1615 initializeWorktree,
1716 isGitRepo,
17+ MergeInProgressError,
1818 mergeWorktree,
1919 removeWorktree,
2020 syncDirtyStateToWorktree,