mirror of
https://github.com/stablyai/orca.git
synced 2026-09-24 00:02:24 +00:00
* refactor runtime contracts and transports * test(web): repoint two-phase timeout seam at the transport that now owns call()
76 lines
1.5 KiB
TypeScript
76 lines
1.5 KiB
TypeScript
import type { RasterImageDimensions } from './raster-image-dimensions'
|
|
|
|
export type RuntimeFileListEntry = {
|
|
relativePath: string
|
|
basename: string
|
|
kind: 'text' | 'binary'
|
|
}
|
|
|
|
export type RuntimeFileListResult = {
|
|
worktree: string
|
|
rootPath: string
|
|
files: RuntimeFileListEntry[]
|
|
totalCount: number
|
|
truncated: boolean
|
|
quickOpenSearchVersion?: number
|
|
}
|
|
|
|
export type RuntimeFileOpenResult = {
|
|
worktree: string
|
|
relativePath: string
|
|
kind: 'markdown' | 'text' | 'binary' | 'image'
|
|
opened: boolean
|
|
}
|
|
|
|
export type RuntimeFileReadResult = {
|
|
worktree: string
|
|
relativePath: string
|
|
content: string
|
|
truncated: boolean
|
|
byteLength: number
|
|
}
|
|
|
|
export type RuntimeTerminalPathOpenTarget =
|
|
| {
|
|
kind: 'worktree-file'
|
|
provider: 'local' | 'ssh'
|
|
relativePath: string
|
|
absolutePath: string
|
|
}
|
|
| {
|
|
kind: 'absolute-file'
|
|
provider: 'local' | 'ssh'
|
|
absolutePath: string
|
|
grantId: string
|
|
readOnly?: true
|
|
}
|
|
| { kind: 'unsupported'; reason: string }
|
|
|
|
export type RuntimeNativeChatFileContext = {
|
|
tabId: string
|
|
sessionId: string
|
|
}
|
|
|
|
export type RuntimeTerminalPathResolution = {
|
|
worktree: string
|
|
relativePath: string | null
|
|
absolutePath: string | null
|
|
exists: boolean
|
|
isDirectory: boolean
|
|
openTarget?: RuntimeTerminalPathOpenTarget
|
|
}
|
|
|
|
export type RuntimeFilePreviewResult = {
|
|
content: string
|
|
isBinary: boolean
|
|
isImage?: boolean
|
|
mimeType?: string
|
|
imageDimensions?: RasterImageDimensions
|
|
}
|
|
|
|
export type RuntimeFileReadChunkResult = {
|
|
contentBase64: string
|
|
bytesRead: number
|
|
eof: boolean
|
|
}
|