Skip to content

Commit 93f7771

Browse files
dependabot[bot]fazxesclaude
authored
deps: Bump zod from 3.25.76 to 4.2.1 (#2)
* deps: Bump the minor-and-patch group with 6 updates (#1) Bumps the minor-and-patch group with 6 updates: | Package | From | To | | --- | --- | --- | | [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) | `0.561.0` | `0.562.0` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `25.0.2` | `25.0.3` | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.49.0` | `8.50.0` | | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.49.0` | `8.50.0` | | [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.49.0` | `8.50.0` | | [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `7.2.7` | `7.3.0` | Updates `lucide-react` from 0.561.0 to 0.562.0 - [Release notes](https://github.com/lucide-icons/lucide/releases) - [Commits](https://github.com/lucide-icons/lucide/commits/0.562.0/packages/lucide-react) Updates `@types/node` from 25.0.2 to 25.0.3 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@typescript-eslint/eslint-plugin` from 8.49.0 to 8.50.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.50.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.49.0 to 8.50.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.50.0/packages/parser) Updates `typescript-eslint` from 8.49.0 to 8.50.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.50.0/packages/typescript-eslint) Updates `vite` from 7.2.7 to 7.3.0 - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/v7.3.0/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v7.3.0/packages/vite) --- updated-dependencies: - dependency-name: lucide-react dependency-version: 0.562.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@types/node" dependency-version: 25.0.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.50.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@typescript-eslint/parser" dependency-version: 8.50.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: typescript-eslint dependency-version: 8.50.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: vite dependency-version: 7.3.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * deps: Bump zod from 3.25.76 to 4.2.1 Bumps [zod](https://github.com/colinhacks/zod) from 3.25.76 to 4.2.1. - [Release notes](https://github.com/colinhacks/zod/releases) - [Commits](colinhacks/zod@v3.25.76...v4.2.1) --- updated-dependencies: - dependency-name: zod dependency-version: 4.2.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * fix: migrate to Zod 4 API Breaking changes handled: - z.record(value) → z.record(z.string(), value) - z.nativeEnum(Enum) → z.enum(Enum) - z.string().uuid() → z.uuid() - z.string().url() → z.url() - ZodError.format() → ZodError.issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: No9 Labs <no9iolabs@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4821d9e commit 93f7771

11 files changed

Lines changed: 268 additions & 256 deletions

File tree

‎package-lock.json‎

Lines changed: 188 additions & 188 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"framer-motion": "^12.23.26",
7575
"immer": "^11.0.1",
7676
"lexical": "^0.39.0",
77-
"lucide-react": "^0.561.0",
77+
"lucide-react": "^0.562.0",
7878
"next-themes": "^0.4.6",
7979
"react": "^19.2.3",
8080
"react-dom": "^19.2.3",
@@ -89,17 +89,17 @@
8989
"tailwindcss": "^4.0.0",
9090
"tailwindcss-animate": "^1.0.7",
9191
"tw-animate-css": "^1.4.0",
92-
"zod": "^3.23.8",
92+
"zod": "^4.2.1",
9393
"zustand": "^5.0.0"
9494
},
9595
"devDependencies": {
9696
"@eslint/js": "^9.39.2",
9797
"@tauri-apps/cli": "^2.0.0",
98-
"@types/node": "^25.0.2",
98+
"@types/node": "^25.0.3",
9999
"@types/react": "^19.0.2",
100100
"@types/react-dom": "^19.0.2",
101-
"@typescript-eslint/eslint-plugin": "^8.17.0",
102-
"@typescript-eslint/parser": "^8.17.0",
101+
"@typescript-eslint/eslint-plugin": "^8.50.0",
102+
"@typescript-eslint/parser": "^8.50.0",
103103
"@vitejs/plugin-react": "^5.1.2",
104104
"eslint": "^9.39.2",
105105
"eslint-plugin-import-x": "^4.16.1",
@@ -109,7 +109,7 @@
109109
"lint-staged": "^16.2.7",
110110
"prettier": "^3.7.4",
111111
"typescript": "^5.7.2",
112-
"typescript-eslint": "^8.49.0",
113-
"vite": "^7.2.7"
112+
"typescript-eslint": "^8.50.0",
113+
"vite": "^7.3.0"
114114
}
115115
}

‎src/hooks/use-tauri.ts‎

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export function useTauri(options: UseTauriOptions = {}): UseTauriReturn {
6666
if (!result.success) {
6767
if (debug) {
6868
console.warn('[Snowflake] Invalid message:', event.data);
69-
console.warn('[Snowflake] Errors:', result.error.format());
69+
console.warn('[Snowflake] Errors:', result.error.issues);
7070
}
7171
return;
7272
}
@@ -120,7 +120,7 @@ export function useTauri(options: UseTauriOptions = {}): UseTauriReturn {
120120
(message: WebviewMessage): void => {
121121
const result = WebviewMessageSchema.safeParse(message);
122122
if (!result.success) {
123-
console.error('[Snowflake] Invalid outgoing message:', result.error.format());
123+
console.error('[Snowflake] Invalid outgoing message:', result.error.issues);
124124
return;
125125
}
126126

@@ -308,8 +308,18 @@ function handleMockMessage(message: WebviewMessage): void {
308308
children: [
309309
{ name: 'src', path: `${mockPath}/src`, isDirectory: true, isFile: false },
310310
{ name: 'tests', path: `${mockPath}/tests`, isDirectory: true, isFile: false },
311-
{ name: 'package.json', path: `${mockPath}/package.json`, isDirectory: false, isFile: true },
312-
{ name: 'README.md', path: `${mockPath}/README.md`, isDirectory: false, isFile: true },
311+
{
312+
name: 'package.json',
313+
path: `${mockPath}/package.json`,
314+
isDirectory: false,
315+
isFile: true,
316+
},
317+
{
318+
name: 'README.md',
319+
path: `${mockPath}/README.md`,
320+
isDirectory: false,
321+
isFile: true,
322+
},
313323
],
314324
},
315325
'*'
@@ -401,19 +411,13 @@ function handleMockMessage(message: WebviewMessage): void {
401411

402412
export interface AgentStreamCallbacks {
403413
onChunk: (content: string, messageId: string) => void;
404-
onComplete: (
405-
messageId: string,
406-
usage?: { input_tokens: number; output_tokens: number }
407-
) => void;
414+
onComplete: (messageId: string, usage?: { input_tokens: number; output_tokens: number }) => void;
408415
onError: (error: string, messageId: string) => void;
409416
onToolStart?: (toolName: string, messageId: string) => void;
410417
onToolEnd?: (toolName: string, success: boolean, messageId: string) => void;
411418
}
412419

413-
export function useAgentStream(
414-
sessionId: string,
415-
callbacks: AgentStreamCallbacks
416-
): void {
420+
export function useAgentStream(sessionId: string, callbacks: AgentStreamCallbacks): void {
417421
const { onChunk, onComplete, onError, onToolStart, onToolEnd } = callbacks;
418422

419423
const handleMessage = useCallback(

‎src/types/agent.ts‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export enum ToolCallStatus {
4343
export const ToolCallSchema = z.object({
4444
id: z.string(),
4545
name: z.string(),
46-
status: z.nativeEnum(ToolCallStatus),
47-
parameters: z.record(z.any()),
46+
status: z.enum(ToolCallStatus),
47+
parameters: z.record(z.string(), z.any()),
4848
result: z.any().optional(),
4949
error: z.string().optional(),
5050
startTime: z.number(),
@@ -76,7 +76,7 @@ export const AgentTaskSchema = z.object({
7676
id: z.string(),
7777
title: z.string(),
7878
description: z.string().optional(),
79-
status: z.nativeEnum(TaskStatus),
79+
status: z.enum(TaskStatus),
8080
priority: z.enum(['low', 'medium', 'high', 'critical']).optional(),
8181
parentTaskId: z.string().optional(),
8282
dependsOn: z.array(z.string()).optional(),
@@ -100,7 +100,7 @@ export const AgentTaskSchema = z.object({
100100
* Agent state schema
101101
*/
102102
export const AgentStateSchema = z.object({
103-
phase: z.nativeEnum(AgentPhase),
103+
phase: z.enum(AgentPhase),
104104
currentTask: AgentTaskSchema.optional(),
105105
taskQueue: z.array(AgentTaskSchema),
106106
completedTasks: z.array(AgentTaskSchema),
@@ -153,7 +153,7 @@ export const AgentCapabilitySchema = z.object({
153153
*/
154154
export const AgentMetricsSchema = z.object({
155155
timestamp: z.number(),
156-
phase: z.nativeEnum(AgentPhase),
156+
phase: z.enum(AgentPhase),
157157
activeTasks: z.number(),
158158
completedTasks: z.number(),
159159
failedTasks: z.number(),
@@ -354,9 +354,7 @@ export function calculateAgentStatistics(state: AgentState): AgentState['statist
354354
const failedTasks = allTasks.filter((t) => t.status === TaskStatus.FAILED);
355355

356356
const allToolCalls = allTasks.flatMap((t) => t.toolCalls ?? []);
357-
const successfulToolCalls = allToolCalls.filter(
358-
(tc) => tc.status === ToolCallStatus.COMPLETED
359-
);
357+
const successfulToolCalls = allToolCalls.filter((tc) => tc.status === ToolCallStatus.COMPLETED);
360358
const failedToolCalls = allToolCalls.filter((tc) => tc.status === ToolCallStatus.FAILED);
361359

362360
const taskDurations = completedTasks

‎src/types/conversation.ts‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const WorkspaceConfigSchema = z.object({
1515
gitBranch: z.string().optional(),
1616
excludePatterns: z.array(z.string()).optional(),
1717
includePatterns: z.array(z.string()).optional(),
18-
customSettings: z.record(z.any()).optional(),
18+
customSettings: z.record(z.string(), z.any()).optional(),
1919
});
2020

2121
/**
@@ -65,7 +65,7 @@ export const ConversationSchema = ConversationMetaSchema.extend({
6565
files: z.array(z.string()).optional(),
6666
activeTasks: z.array(z.string()).optional(),
6767
pinnedFiles: z.array(z.string()).optional(),
68-
environment: z.record(z.string()).optional(),
68+
environment: z.record(z.string(), z.string()).optional(),
6969
})
7070
.optional(),
7171
settings: z
@@ -183,17 +183,14 @@ export function filterConversations(
183183
}
184184

185185
if (filter.tags && filter.tags.length > 0) {
186-
filtered = filtered.filter((c) =>
187-
filter.tags?.some((tag) => c.tags?.includes(tag)) ?? false
188-
);
186+
filtered = filtered.filter((c) => filter.tags?.some((tag) => c.tags?.includes(tag)) ?? false);
189187
}
190188

191189
if (filter.searchQuery) {
192190
const query = filter.searchQuery.toLowerCase();
193191
filtered = filtered.filter(
194192
(c) =>
195-
c.title.toLowerCase().includes(query) ||
196-
c.lastMessagePreview?.toLowerCase().includes(query)
193+
c.title.toLowerCase().includes(query) || c.lastMessagePreview?.toLowerCase().includes(query)
197194
);
198195
}
199196

‎src/types/diff.ts‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export enum DiffChangeType {
2626
* Diff line schema
2727
*/
2828
export const DiffLineSchema = z.object({
29-
type: z.nativeEnum(DiffLineType),
29+
type: z.enum(DiffLineType),
3030
content: z.string(),
3131
oldLineNumber: z.number().optional(),
3232
newLineNumber: z.number().optional(),
@@ -53,7 +53,7 @@ export const DiffHunkSchema = z.object({
5353
export const FileDiffSchema = z.object({
5454
oldPath: z.string(),
5555
newPath: z.string(),
56-
changeType: z.nativeEnum(DiffChangeType),
56+
changeType: z.enum(DiffChangeType),
5757
hunks: z.array(DiffHunkSchema),
5858
additions: z.number(),
5959
deletions: z.number(),
@@ -77,7 +77,7 @@ export const DiffSummarySchema = z.object({
7777
path: z.string(),
7878
additions: z.number(),
7979
deletions: z.number(),
80-
changeType: z.nativeEnum(DiffChangeType),
80+
changeType: z.enum(DiffChangeType),
8181
})
8282
),
8383
});
@@ -304,11 +304,7 @@ export function collapseDiffHunks(hunks: DiffHunk[], minGapSize = 3): DiffHunk[]
304304
)
305305
);
306306

307-
const combinedLines: DiffLine[] = [
308-
...current.lines,
309-
...gapLines,
310-
...next.lines,
311-
];
307+
const combinedLines: DiffLine[] = [...current.lines, ...gapLines, ...next.lines];
312308

313309
const newOldLines = next.oldStart + next.oldLines - current.oldStart;
314310
const newNewLines = next.newStart + next.newLines - current.newStart;

‎src/types/file.ts‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const FileMetadataSchema = z.object({
5858
export const FileChangeSchema = z.object({
5959
id: z.string(),
6060
path: z.string(),
61-
status: z.nativeEnum(FileStatus),
61+
status: z.enum(FileStatus),
6262
oldPath: z.string().optional(), // For rename/move operations
6363
timestamp: z.number(),
6464
changes: z
@@ -76,7 +76,7 @@ export const FileChangeSchema = z.object({
7676
*/
7777
export const FileOperationSchema = z.object({
7878
id: z.string(),
79-
type: z.nativeEnum(FileOperationType),
79+
type: z.enum(FileOperationType),
8080
path: z.string(),
8181
timestamp: z.number(),
8282
status: z.enum(['pending', 'in_progress', 'completed', 'failed']),
@@ -146,7 +146,7 @@ export const FileSearchResultSchema = z.object({
146146
*/
147147
export const FileDiffStatsSchema = z.object({
148148
path: z.string(),
149-
status: z.nativeEnum(FileStatus),
149+
status: z.enum(FileStatus),
150150
additions: z.number(),
151151
deletions: z.number(),
152152
changes: z.number(),
@@ -293,7 +293,10 @@ export function sortFileTreeNodes(nodes: FileTreeNode[]): FileTreeNode[] {
293293
});
294294
}
295295

296-
export function flattenFileTree(node: FileTreeNode, depth = 0): (FileTreeNode & { depth: number })[] {
296+
export function flattenFileTree(
297+
node: FileTreeNode,
298+
depth = 0
299+
): (FileTreeNode & { depth: number })[] {
297300
const result: (FileTreeNode & { depth: number })[] = [{ ...node, depth }];
298301

299302
if (node.children && node.expanded) {

‎src/types/message.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const ToolCallContentSchema = z.object({
8383
type: z.literal(MessageContentType.TOOL_CALL),
8484
toolName: z.string(),
8585
toolCallId: z.string(),
86-
parameters: z.record(z.any()),
86+
parameters: z.record(z.string(), z.any()),
8787
});
8888

8989
/**
@@ -118,7 +118,7 @@ export const ChatBaseMessageSchema = z.object({
118118
id: z.string(),
119119
conversationId: z.string(),
120120
timestamp: z.number(),
121-
status: z.nativeEnum(MessageStatus),
121+
status: z.enum(MessageStatus),
122122
content: z.array(MessageContentSchema),
123123
metadata: z
124124
.object({

‎src/types/protocol.ts‎

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { z } from 'zod';
44
// SHARED PRIMITIVES
55
// ═══════════════════════════════════════════════════════════════
66

7-
const UUIDSchema = z.string().uuid();
7+
const UUIDSchema = z.uuid();
88
const SessionIdSchema = z.string().min(1);
99

1010
// Input mode: default (ask permission), accept (auto-approve), plan (read-only)
@@ -32,7 +32,7 @@ export const ElementContextSchema = z.object({
3232
componentName: z.string(),
3333
filePath: z.string(),
3434
lineNumber: z.number(),
35-
props: z.record(z.unknown()),
35+
props: z.record(z.string(), z.unknown()),
3636
componentStack: z.array(z.string()),
3737
tagName: z.string(),
3838
selector: z.string(),
@@ -124,7 +124,7 @@ export const AgentStartSchema = z.object({
124124
uuid: UUIDSchema,
125125
session_id: SessionIdSchema,
126126
task: z.string(),
127-
context: z.record(z.unknown()).optional(),
127+
context: z.record(z.string(), z.unknown()).optional(),
128128
});
129129

130130
export const AgentStopSchema = z.object({
@@ -277,7 +277,7 @@ export const DiffOpenSchema = z.object({
277277
export const UrlOpenSchema = z.object({
278278
type: z.literal('url:open'),
279279
uuid: UUIDSchema,
280-
url: z.string().url(),
280+
url: z.url(),
281281
});
282282

283283
// Permission response (webview → extension)
@@ -674,7 +674,7 @@ export const ToolStartSchema = z.object({
674674
message_id: z.string(),
675675
tool_id: z.string(),
676676
tool_name: z.string(),
677-
tool_input: z.record(z.unknown()),
677+
tool_input: z.record(z.string(), z.unknown()),
678678
});
679679

680680
export const ToolEndSchema = z.object({
@@ -695,7 +695,7 @@ export const PermissionRequestSchema = z.object({
695695
session_id: SessionIdSchema,
696696
request_id: z.string(),
697697
tool_name: z.string(),
698-
tool_input: z.record(z.unknown()),
698+
tool_input: z.record(z.string(), z.unknown()),
699699
});
700700

701701
// Input mode changed (from extension to webview)
@@ -969,7 +969,7 @@ export const ReactElementContextSchema = z.object({
969969
componentName: z.string(),
970970
filePath: z.string(),
971971
lineNumber: z.number(),
972-
props: z.record(z.unknown()),
972+
props: z.record(z.string(), z.unknown()),
973973
componentStack: z.array(z.string()),
974974
// DOM info
975975
tagName: z.string(),
@@ -1366,13 +1366,27 @@ export function isProtocolTerminalMessage(
13661366

13671367
export function isProtocolFileMessage(
13681368
msg: ExtensionMessage
1369-
): msg is FileContent | FileChanged | FileWritten | FileTreeResponse | FileTreeError | FileListResponse {
1369+
): msg is
1370+
| FileContent
1371+
| FileChanged
1372+
| FileWritten
1373+
| FileTreeResponse
1374+
| FileTreeError
1375+
| FileListResponse {
13701376
return msg.type.startsWith('file:');
13711377
}
13721378

13731379
export function isProtocolBrowserMessage(
13741380
msg: ExtensionMessage
1375-
): msg is BrowserCreated | BrowserNavigated | BrowserElementSelected | BrowserLoading | BrowserError | BrowserDestroyed | BrowserOpen | BrowserClose {
1381+
): msg is
1382+
| BrowserCreated
1383+
| BrowserNavigated
1384+
| BrowserElementSelected
1385+
| BrowserLoading
1386+
| BrowserError
1387+
| BrowserDestroyed
1388+
| BrowserOpen
1389+
| BrowserClose {
13761390
return msg.type.startsWith('browser:');
13771391
}
13781392

0 commit comments

Comments
 (0)