-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Expand file tree
/
Copy pathtypes.ts
More file actions
67 lines (65 loc) · 2.09 KB
/
Copy pathtypes.ts
File metadata and controls
67 lines (65 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import type { CodeLanguage } from '@/lib/execution/languages'
import type { ToolResponse } from '@/tools/types'
export interface CodeExecutionInput {
code: Array<{ content: string; id: string }> | string
/** Original user-authored code used for error display after execution-time reference resolution. */
sourceCode?: string
language?: CodeLanguage
useLocalVM?: boolean
/**
* Workflow Function blocks pass milliseconds. Copilot/Mothership tool calls pass seconds
* and are converted at the request boundary.
*/
timeout?: number
memoryLimit?: number
title?: string
outputPath?: string
outputFormat?: 'json' | 'csv' | 'txt' | 'md' | 'html'
outputTable?: string
outputSandboxPath?: string
outputMimeType?: string
overwriteFileId?: string
inputs?: {
files?: Array<{ path: string; sandboxPath?: string }>
directories?: Array<{ path: string; sandboxPath?: string }>
tables?: Array<{ path?: string; tableId?: string; sandboxPath?: string }>
}
outputs?: {
files?: Array<{
path: string
mode: 'create' | 'overwrite'
sandboxPath?: string
format?: 'json' | 'csv' | 'txt' | 'md' | 'html'
mimeType?: string
}>
}
envVars?: Record<string, string>
workflowVariables?: Record<string, unknown>
blockData?: Record<string, unknown>
blockNameMapping?: Record<string, string>
blockOutputSchemas?: Record<string, Record<string, unknown>>
/** Pre-resolved block output variables from the executor, injected as VM globals. */
contextVariables?: Record<string, unknown>
_context?: {
workflowId?: string
executionId?: string
largeValueExecutionIds?: string[]
largeValueKeys?: string[]
fileKeys?: string[]
allowLargeValueWorkflowScope?: boolean
userId?: string
workspaceId?: string
copilotToolExecution?: boolean
}
isCustomTool?: boolean
_sandboxFiles?: Array<
| { type?: 'content'; path: string; content: string; encoding?: 'base64' }
| { type: 'url'; path: string; url: string }
>
}
export interface CodeExecutionOutput extends ToolResponse {
output: {
result: any
stdout: string
}
}