feat: improve runtime visibility and browser interaction

This commit is contained in:
lofyer
2026-08-07 17:53:14 +08:00
parent 2c715e5e81
commit 53d18e2b06
36 changed files with 1680 additions and 907 deletions
+6
View File
@@ -660,6 +660,8 @@ export type AgentEvent =
| 'failed'
| 'recoverable'
summary: string
input?: string
output?: string
error?: string
}
| {
@@ -728,6 +730,7 @@ export const browserLiveStateSchema = z
'loading',
'ready',
'acting',
'interactive',
'failed',
'stopped'
]),
@@ -753,6 +756,8 @@ export const browserStopRequestSchema = z
})
.strict()
export const browserInteractRequestSchema = browserStopRequestSchema
export const knowledgeIdSchema = z.string().uuid()
export const knowledgeCreateSchema = z
.object({
@@ -919,6 +924,7 @@ export type DesktopApi = {
onEvent: (listener: (event: AgentEvent) => void) => () => void
}
browser: {
interact: (conversationId: string) => Promise<void>
stop: (conversationId: string) => Promise<void>
onState: (listener: (state: BrowserLiveState) => void) => () => void
}