feat: expand secure assistant workflows
Harden runtime execution and add local knowledge, Smart Heartbeat, usage visibility, responsive product surfaces, and cross-platform packaging support. 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
6ef1795b81
commit
b3fdf96962
@@ -18,15 +18,45 @@ export type RuntimeAuthorizer = (
|
||||
request: RuntimeApprovalRequest
|
||||
) => Promise<ApprovalDecision>
|
||||
|
||||
export type RuntimeGeneratedImageEvent = {
|
||||
requestId: string
|
||||
type: 'generated-image'
|
||||
mimeType: 'image/png' | 'image/jpeg' | 'image/webp'
|
||||
data: string
|
||||
title: string
|
||||
}
|
||||
|
||||
export type RuntimeModelUsageEvent = {
|
||||
requestId: string
|
||||
type: 'model-usage'
|
||||
callId: string
|
||||
runtime: 'model' | 'continue' | 'opencode'
|
||||
provider: string
|
||||
model: string
|
||||
inputTokens: number
|
||||
outputTokens: number
|
||||
cacheReadTokens: number
|
||||
cacheWriteTokens: number
|
||||
reportedTotalTokens?: number
|
||||
}
|
||||
|
||||
export type RuntimeEvent =
|
||||
| AgentEvent
|
||||
| RuntimeGeneratedImageEvent
|
||||
| RuntimeModelUsageEvent
|
||||
|
||||
export interface AgentRuntime {
|
||||
readonly requiresToolApproval: boolean
|
||||
readonly supportsToolExecution: boolean
|
||||
readonly capability?: 'chat' | 'image-generation'
|
||||
getStatus(): Promise<AgentRuntimeStatus>
|
||||
testConnection?(): Promise<AgentRuntimeStatus>
|
||||
run(
|
||||
request: AgentExecutionRequest,
|
||||
signal: AbortSignal,
|
||||
authorize?: RuntimeAuthorizer
|
||||
): AsyncGenerator<AgentEvent, void, void>
|
||||
): AsyncGenerator<RuntimeEvent, void, void>
|
||||
releaseConversation?(conversationId: string): Promise<void>
|
||||
dispose(): Promise<void>
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user