chore: establish YCode replication baseline and TODO
This commit is contained in:
commit
6dc59f89ba
1118 files changed
+196002
No files matched your search
@@ -0,0 +1,62 @@
|
||||
/** YCode transport types for the restored WorkBuddy view contracts. */
|
||||
import type { PreviewArtifact } from './artifacts'
|
||||
export type PermissionMode = 'default-sandbox' | 'full-access'
|
||||
/** Conversation behavior, independent of filesystem approval/permission mode. */
|
||||
export type AgentMode = 'craft' | 'plan' | 'ask'
|
||||
|
||||
export interface ChatAttachment {
|
||||
id: string
|
||||
name: string
|
||||
mimeType: string
|
||||
size: number
|
||||
previewUrl?: string
|
||||
path?: string
|
||||
}
|
||||
|
||||
export interface QuestionOption {
|
||||
id?: string
|
||||
option?: string
|
||||
label?: string
|
||||
question?: string
|
||||
description?: string
|
||||
hint?: string
|
||||
}
|
||||
export interface QuestionItem {
|
||||
id: string
|
||||
question: string
|
||||
options: Array<string | QuestionOption>
|
||||
multiSelect?: boolean
|
||||
}
|
||||
export interface QuestionAnswer {
|
||||
title?: string
|
||||
questions: Array<{ id: string; question: string; answers: string[] }>
|
||||
}
|
||||
export interface PermissionOption { optionId: string; name: string; kind: string }
|
||||
export type InteractionStatus = 'pending' | 'responding' | 'answered' | 'rejected' | 'cancelled' | 'error'
|
||||
interface InteractionBase {
|
||||
id: string
|
||||
runId: string
|
||||
toolCallId: string
|
||||
title: string
|
||||
status: InteractionStatus
|
||||
error?: string
|
||||
}
|
||||
export type ChatInteraction =
|
||||
| (InteractionBase & { kind: 'question'; questions: QuestionItem[]; answer?: QuestionAnswer; skipped?: boolean })
|
||||
| (InteractionBase & { kind: 'approval'; requestId: string; options: PermissionOption[]; selectedOptionId?: string; scope?: string })
|
||||
export type InteractionResponse =
|
||||
| { kind: 'question'; answer: QuestionAnswer; skipped?: boolean }
|
||||
| { kind: 'approval'; optionId: string }
|
||||
|
||||
export interface PlanStep { id: string; text: string; status: 'pending' | 'in_progress' | 'completed' | 'cancelled' }
|
||||
export interface PlanContent { id: string; title: string; steps: PlanStep[]; filePath?: string }
|
||||
export interface TaskContent {
|
||||
id: string
|
||||
title: string
|
||||
description?: string
|
||||
status: 'pending' | 'running' | 'success' | 'error' | 'cancelled'
|
||||
summary?: string
|
||||
toolCount?: number
|
||||
durationMs?: number
|
||||
}
|
||||
export interface ArtifactContent { id: string; name: string; path: string; mimeType?: string; description?: string; preview?: PreviewArtifact }
|
||||
Reference in new issue
Block a user