Refactor protocol and app parsing around zod schemas
8 months ago
Authored
mweinbachReplace client/server protocol parsing and IPC/input validation with shared zod schemas. Add shared structured-input parsing and migrate TUI, desktop, and portal JSON parsing paths. Preserve client-message parser error semantics while removing manual schema dispatch plumbing.
Co-authored-by: Codex <noreply@openai.com>
Parent1d9ecda
17 files changed
- apps/TUI/component/prompt/frecency.tsx+12−1
- apps/TUI/component/prompt/history.tsx+12−1
- apps/TUI/component/prompt/stash.tsx+11−1
- apps/TUI/context/kv.tsx+7−1
- apps/TUI/context/sync.tsx+1−34
- apps/desktop/electron/ipc.ts+72−76
- apps/desktop/electron/preload.ts+49−146
- apps/desktop/src/app/store.helpers.ts+93−52
- apps/desktop/src/lib/desktopSchemas.ts
+143
−0
apps/desktop/src/lib/wsProtocol.ts+7−29apps/portal/components/dashboard.tsx+97−7apps/portal/lib/harness.ts+22−12src/client/agentSocket.ts+9−29src/server/protocol.ts+4−0src/server/protocolEventParser.ts+306−0src/server/protocolParser.ts+120−65src/shared/structuredInput.ts+45−0