feat: add persistent desktop assistant workspace
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent
698a15ad14
commit
6ef1795b81
@@ -1,16 +1,41 @@
|
||||
import type {
|
||||
ApprovalDecision,
|
||||
AgentEvent,
|
||||
AgentRequest,
|
||||
AgentRuntimeStatus
|
||||
} from '../../shared/contracts'
|
||||
|
||||
export type RuntimeApprovalRequest = {
|
||||
scopeKey: string
|
||||
title: string
|
||||
description: string
|
||||
toolName?: string
|
||||
argumentSummary?: string
|
||||
allowPermanent?: boolean
|
||||
}
|
||||
|
||||
export type RuntimeAuthorizer = (
|
||||
request: RuntimeApprovalRequest
|
||||
) => Promise<ApprovalDecision>
|
||||
|
||||
export interface AgentRuntime {
|
||||
readonly requiresToolApproval: boolean
|
||||
getStatus(): Promise<AgentRuntimeStatus>
|
||||
testConnection?(): Promise<AgentRuntimeStatus>
|
||||
run(
|
||||
request: AgentRequest,
|
||||
request: AgentExecutionRequest,
|
||||
signal: AbortSignal,
|
||||
authorize?: (requiresToolApproval: boolean) => Promise<void>
|
||||
authorize?: RuntimeAuthorizer
|
||||
): AsyncGenerator<AgentEvent, void, void>
|
||||
dispose(): Promise<void>
|
||||
}
|
||||
|
||||
export type AgentImage = {
|
||||
name: string
|
||||
mediaType: 'image/png' | 'image/jpeg'
|
||||
data: string
|
||||
}
|
||||
|
||||
export type AgentExecutionRequest = AgentRequest & {
|
||||
images?: AgentImage[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user