mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-08 01:43:07 +00:00
refactor: remove passthrough() from zod schemas and make validation explicit
- Replace .passthrough() with explicit field definitions across all schemas - Add missing optional fields (homeDir, happyHomeDir, happyLibDir, displayName) - Refactor RawJSONLinesSchema to use structured base schema for clarity - Improve schema validation strictness and type safety - Update Machine interface to reflect explicit fields instead of index signature
This commit is contained in:
@@ -6,7 +6,7 @@ const CodexSessionEventSchema = z.object({
|
||||
timestamp: z.string().optional(),
|
||||
type: z.string(),
|
||||
payload: z.unknown().optional()
|
||||
}).passthrough();
|
||||
});
|
||||
|
||||
export type CodexSessionEvent = z.infer<typeof CodexSessionEventSchema>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user