WIP: Refactor and polyfill updates

- Add crypto polyfill for Expo
- Update daemon client and websocket server
- Simplify codex agent tests
This commit is contained in:
Mohamed Boudra
2026-01-13 11:06:21 +07:00
parent 868f9fb571
commit 2fa7ec17cb
11 changed files with 94 additions and 73 deletions
@@ -1,4 +1,3 @@
import { nanoid } from "nanoid";
import type { z } from "zod";
import {
AgentCreateFailedStatusPayloadSchema,
@@ -754,7 +753,7 @@ export class DaemonClientV2 {
text: string,
options?: SendMessageOptions
): Promise<void> {
const messageId = options?.messageId ?? nanoid();
const messageId = options?.messageId ?? crypto.randomUUID();
const message = SessionInboundMessageSchema.parse({
type: "send_agent_message",
agentId,
@@ -1354,7 +1353,7 @@ export class DaemonClientV2 {
// ============================================================================
private createRequestId(requestId?: string): string {
return requestId ?? nanoid();
return requestId ?? crypto.randomUUID();
}
private cleanupTransport(): void {