refactor and add local execution profile

This commit is contained in:
Arjun 2026-02-12 15:11:50 +05:30 committed by Ramnique Singh
parent e1d50c62da
commit 1a82226ea6
21 changed files with 380 additions and 53 deletions

View file

@ -0,0 +1,15 @@
import { z } from 'zod';
export const ExecutionProfile = z.discriminatedUnion('mode', [
z.object({ mode: z.literal('local') }),
z.object({
mode: z.literal('cloud'),
session: z.object({
accessToken: z.string(),
refreshToken: z.string().optional(),
userId: z.string(),
}),
}),
]);
export type ExecutionProfile = z.infer<typeof ExecutionProfile>;

View file

@ -7,4 +7,5 @@ export * as mcp from './mcp.js';
export * as agentSchedule from './agent-schedule.js';
export * as agentScheduleState from './agent-schedule-state.js';
export * as serviceEvents from './service-events.js';
export * as executionProfile from './execution-profile.js';
export { PrefixLogger };

View file

@ -395,6 +395,10 @@ const ipcSchemas = {
req: z.object({ path: z.string() }),
res: z.object({ data: z.string(), mimeType: z.string(), size: z.number() }),
},
'stt:transcribe': {
req: z.object({ audioBase64: z.string(), mimeType: z.string() }),
res: z.object({ transcript: z.string().nullable() }),
},
} as const;
// ============================================================================