feat: add computer control and managed browser

This commit is contained in:
lofyer
2026-08-05 12:55:24 +08:00
parent 2f549387a6
commit 38ac2206f2
92 changed files with 21028 additions and 766 deletions
+12 -1
View File
@@ -2,6 +2,16 @@ import { z } from 'zod'
export const assistantIdSchema = z.string().uuid()
export const workModeSchema = z.enum(['ask', 'plan', 'execute'])
export const interactiveWorkModes = ['ask', 'execute'] as const
export type WorkMode = z.infer<typeof workModeSchema>
export type InteractiveWorkMode = (typeof interactiveWorkModes)[number]
export function normalizeInteractiveWorkMode(
workMode: WorkMode | undefined
): InteractiveWorkMode {
return workMode === 'execute' ? 'execute' : 'ask'
}
export const projectCreateSchema = z
.object({
@@ -14,7 +24,6 @@ export const projectCreateSchema = z
export const projectUpdateSchema = projectCreateSchema
export type WorkMode = z.infer<typeof workModeSchema>
export type ProjectCreateInput = z.infer<typeof projectCreateSchema>
export const conversationSnapshotSchema = z
@@ -44,6 +53,7 @@ export const conversationSnapshotSchema = z
'running',
'completed',
'failed',
'recoverable',
'cancelled',
'interrupted'
]),
@@ -433,6 +443,7 @@ export const expertCreateSchema = z
.strict()
export type ExpertCreateInput = z.infer<typeof expertCreateSchema>
export type ExpertUpdateInput = ExpertCreateInput
export type AssistantExpert = ExpertCreateInput & {
id: string