@inferencesh/sdk 0.6.2 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/actions.js +0 -1
- package/dist/agent/types.d.ts +1 -1
- package/dist/api/agents.d.ts +1 -1
- package/dist/api/engines.d.ts +1 -1
- package/dist/http/client.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +1002 -1664
- package/dist/types.js +108 -156
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -10,118 +10,102 @@ export interface InternalToolsConfig {
|
|
|
10
10
|
host_context?: boolean;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* AgentTool represents a unified tool that can be used by an agent
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
export interface AgentTool {
|
|
16
|
+
name: string;
|
|
17
|
+
display_name?: string;
|
|
18
|
+
description: string;
|
|
19
|
+
type: ToolType;
|
|
20
|
+
require_approval?: boolean;
|
|
21
|
+
app?: AppToolConfig;
|
|
22
|
+
agent?: AgentToolConfig;
|
|
23
|
+
hook?: HookToolConfig;
|
|
24
|
+
http?: HTTPToolConfig;
|
|
25
|
+
call?: HTTPToolConfig;
|
|
26
|
+
mcp?: MCPToolConfig;
|
|
27
|
+
client?: ClientToolConfig;
|
|
28
|
+
internal?: InternalToolConfig;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* InternalToolConfig contains configuration for internal/built-in tools
|
|
32
|
+
*/
|
|
33
|
+
export interface InternalToolConfig {
|
|
34
|
+
category: string;
|
|
35
|
+
operation: string;
|
|
36
|
+
}
|
|
24
37
|
/**
|
|
25
|
-
*
|
|
38
|
+
* SkillConfig defines a skill available to the agent.
|
|
39
|
+
*/
|
|
40
|
+
export interface SkillConfig {
|
|
41
|
+
name: string;
|
|
42
|
+
description: string;
|
|
43
|
+
skill_id?: string;
|
|
44
|
+
version_id?: string;
|
|
45
|
+
url?: string;
|
|
46
|
+
content?: string;
|
|
47
|
+
preload?: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* ContextField declares a context parameter expected by the agent.
|
|
51
|
+
*/
|
|
52
|
+
export interface ContextField {
|
|
53
|
+
name: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
required?: boolean;
|
|
56
|
+
default?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* AgentToolDTO for API responses
|
|
26
60
|
*/
|
|
61
|
+
export interface AgentToolDTO {
|
|
62
|
+
name: string;
|
|
63
|
+
display_name?: string;
|
|
64
|
+
description: string;
|
|
65
|
+
type: ToolType;
|
|
66
|
+
require_approval?: boolean;
|
|
67
|
+
app?: AppToolConfigDTO;
|
|
68
|
+
agent?: AgentToolConfigDTO;
|
|
69
|
+
hook?: HookToolConfigDTO;
|
|
70
|
+
http?: HTTPToolConfigDTO;
|
|
71
|
+
call?: HTTPToolConfigDTO;
|
|
72
|
+
mcp?: MCPToolConfigDTO;
|
|
73
|
+
client?: ClientToolConfigDTO;
|
|
74
|
+
}
|
|
27
75
|
export interface AppToolConfig {
|
|
28
|
-
/**
|
|
29
|
-
* Ref is the human-readable reference: "namespace/name@shortVersionId"
|
|
30
|
-
* This is what users specify in configs/SDKs
|
|
31
|
-
*/
|
|
32
76
|
ref: string;
|
|
33
|
-
/**
|
|
34
|
-
* ID and VersionID are resolved full database UUIDs (populated at runtime)
|
|
35
|
-
*/
|
|
36
77
|
id?: string;
|
|
37
78
|
version_id?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Resolved app object (populated at runtime)
|
|
40
|
-
*/
|
|
41
|
-
app?: App;
|
|
42
|
-
/**
|
|
43
|
-
* Function to call on multi-function apps (empty = app's default function)
|
|
44
|
-
*/
|
|
45
79
|
function?: string;
|
|
46
|
-
/**
|
|
47
|
-
* SessionEnabled allows the agent to control sessions for this tool
|
|
48
|
-
* When true, agent can pass session parameter and sees session_id in output
|
|
49
|
-
*/
|
|
50
80
|
session_enabled?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Pre-configured values
|
|
53
|
-
*/
|
|
54
81
|
setup?: any;
|
|
55
82
|
input?: any;
|
|
56
83
|
}
|
|
57
|
-
/**
|
|
58
|
-
* AgentToolConfig contains configuration for a sub-agent tool
|
|
59
|
-
*/
|
|
60
84
|
export interface AgentToolConfig {
|
|
61
|
-
/**
|
|
62
|
-
* Ref is the human-readable reference: "namespace/name@shortVersionId"
|
|
63
|
-
* This is what users specify in configs/SDKs
|
|
64
|
-
*/
|
|
65
85
|
ref: string;
|
|
66
|
-
/**
|
|
67
|
-
* ID and VersionID are resolved full database UUIDs (populated at runtime)
|
|
68
|
-
*/
|
|
69
86
|
id?: string;
|
|
70
87
|
version_id?: string;
|
|
71
|
-
/**
|
|
72
|
-
* Resolved agent object (populated at runtime)
|
|
73
|
-
*/
|
|
74
|
-
agent?: Agent;
|
|
75
88
|
}
|
|
76
|
-
/**
|
|
77
|
-
* HookToolConfig contains configuration for a webhook tool
|
|
78
|
-
*/
|
|
79
89
|
export interface HookToolConfig {
|
|
80
90
|
url: string;
|
|
81
91
|
secret?: string;
|
|
82
92
|
input_schema?: any;
|
|
83
93
|
output_schema?: any;
|
|
84
94
|
}
|
|
85
|
-
/**
|
|
86
|
-
* ClientToolConfig contains configuration for a frontend-executed tool
|
|
87
|
-
*/
|
|
88
95
|
export interface ClientToolConfig {
|
|
89
96
|
input_schema?: any;
|
|
90
97
|
output_schema?: any;
|
|
91
98
|
}
|
|
92
99
|
/**
|
|
93
|
-
* ToolAuthConfig declares how a tool authenticates.
|
|
100
|
+
* ToolAuthConfig declares how a tool authenticates.
|
|
94
101
|
*/
|
|
95
102
|
export interface ToolAuthConfig {
|
|
96
|
-
/**
|
|
97
|
-
* Type: "integration", "api_key", "bearer", "none"
|
|
98
|
-
*/
|
|
99
103
|
type: string;
|
|
100
|
-
/**
|
|
101
|
-
* For type=integration: which provider to look up (e.g. "google", "mcp", "slack")
|
|
102
|
-
*/
|
|
103
104
|
provider?: string;
|
|
104
|
-
/**
|
|
105
|
-
* For type=integration: specific integration ID (optional — if empty, uses team's primary for provider)
|
|
106
|
-
*/
|
|
107
105
|
integration_id?: string;
|
|
108
|
-
/**
|
|
109
|
-
* For type=api_key or bearer: name of the secret in the team's secret store
|
|
110
|
-
*/
|
|
111
106
|
secret?: string;
|
|
112
|
-
/**
|
|
113
|
-
* For type=api_key: which header to inject (default: "X-API-Key")
|
|
114
|
-
*/
|
|
115
107
|
header?: string;
|
|
116
108
|
}
|
|
117
|
-
/**
|
|
118
|
-
* CallToolConfig is the preferred name for HTTPToolConfig.
|
|
119
|
-
* "call" is the user-facing type; "http" is kept for backward compatibility.
|
|
120
|
-
*/
|
|
121
|
-
export type CallToolConfig = HTTPToolConfig;
|
|
122
|
-
/**
|
|
123
|
-
* HTTPToolConfig contains configuration for an authenticated HTTP tool
|
|
124
|
-
*/
|
|
125
109
|
export interface HTTPToolConfig {
|
|
126
110
|
url: string;
|
|
127
111
|
method?: string;
|
|
@@ -132,86 +116,17 @@ export interface HTTPToolConfig {
|
|
|
132
116
|
input_schema?: any;
|
|
133
117
|
output_schema?: any;
|
|
134
118
|
}
|
|
135
|
-
/**
|
|
136
|
-
* MCPToolConfig contains configuration for a remote MCP server tool
|
|
137
|
-
*/
|
|
138
119
|
export interface MCPToolConfig {
|
|
139
|
-
/**
|
|
140
|
-
* IntegrationID references the MCP integration (has server_url, tokens, cached tools)
|
|
141
|
-
*/
|
|
142
120
|
integration_id: string;
|
|
143
|
-
/**
|
|
144
|
-
* ToolName is the tool name on the remote MCP server
|
|
145
|
-
*/
|
|
146
121
|
tool_name: string;
|
|
147
122
|
}
|
|
148
|
-
/**
|
|
149
|
-
* AgentTool represents a unified tool that can be used by an agent
|
|
150
|
-
*/
|
|
151
|
-
export interface AgentTool {
|
|
152
|
-
name: string;
|
|
153
|
-
display_name?: string;
|
|
154
|
-
description: string;
|
|
155
|
-
type: ToolType;
|
|
156
|
-
/**
|
|
157
|
-
* Human-in-the-Loop: if true, tool execution requires user approval
|
|
158
|
-
*/
|
|
159
|
-
require_approval?: boolean;
|
|
160
|
-
/**
|
|
161
|
-
* Type-specific config (exactly one should be set based on Type)
|
|
162
|
-
*/
|
|
163
|
-
app?: AppToolConfig;
|
|
164
|
-
agent?: AgentToolConfig;
|
|
165
|
-
hook?: HookToolConfig;
|
|
166
|
-
http?: HTTPToolConfig;
|
|
167
|
-
call?: CallToolConfig;
|
|
168
|
-
mcp?: MCPToolConfig;
|
|
169
|
-
client?: ClientToolConfig;
|
|
170
|
-
internal?: InternalToolConfig;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* InternalToolConfig contains configuration for internal/built-in tools
|
|
174
|
-
*/
|
|
175
|
-
export interface InternalToolConfig {
|
|
176
|
-
category: string;
|
|
177
|
-
operation: string;
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* AgentToolDTO for API responses
|
|
181
|
-
*/
|
|
182
|
-
export interface AgentToolDTO {
|
|
183
|
-
name: string;
|
|
184
|
-
display_name?: string;
|
|
185
|
-
description: string;
|
|
186
|
-
type: ToolType;
|
|
187
|
-
/**
|
|
188
|
-
* Human-in-the-Loop: if true, tool execution requires user approval
|
|
189
|
-
*/
|
|
190
|
-
require_approval?: boolean;
|
|
191
|
-
app?: AppToolConfigDTO;
|
|
192
|
-
agent?: AgentToolConfigDTO;
|
|
193
|
-
hook?: HookToolConfigDTO;
|
|
194
|
-
http?: HTTPToolConfigDTO;
|
|
195
|
-
call?: HTTPToolConfigDTO;
|
|
196
|
-
mcp?: MCPToolConfigDTO;
|
|
197
|
-
client?: ClientToolConfigDTO;
|
|
198
|
-
}
|
|
199
123
|
export interface AppToolConfigDTO {
|
|
200
124
|
ref: string;
|
|
201
125
|
id?: string;
|
|
202
126
|
version_id?: string;
|
|
203
127
|
app?: AppDTO;
|
|
204
|
-
/**
|
|
205
|
-
* Function to call on multi-function apps
|
|
206
|
-
*/
|
|
207
128
|
function?: string;
|
|
208
|
-
/**
|
|
209
|
-
* SessionEnabled allows the agent to control sessions for this tool
|
|
210
|
-
*/
|
|
211
129
|
session_enabled?: boolean;
|
|
212
|
-
/**
|
|
213
|
-
* Pre-configured values
|
|
214
|
-
*/
|
|
215
130
|
setup?: any;
|
|
216
131
|
input?: any;
|
|
217
132
|
}
|
|
@@ -246,45 +161,23 @@ export interface MCPToolConfigDTO {
|
|
|
246
161
|
tool_name: string;
|
|
247
162
|
}
|
|
248
163
|
/**
|
|
249
|
-
*
|
|
250
|
-
*/
|
|
251
|
-
export interface CoreAppConfig {
|
|
252
|
-
id?: string;
|
|
253
|
-
version_id?: string;
|
|
254
|
-
/**
|
|
255
|
-
* CoreAppRef is the user-facing ref (namespace/name@shortid) - used in ad-hoc configs, resolved at creation
|
|
256
|
-
*/
|
|
257
|
-
ref?: string;
|
|
258
|
-
/**
|
|
259
|
-
* Setup values for the core app (one-time configuration)
|
|
260
|
-
*/
|
|
261
|
-
setup?: any;
|
|
262
|
-
/**
|
|
263
|
-
* Input default values for the core app
|
|
264
|
-
*/
|
|
265
|
-
input?: any;
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* AgentImages contains display images for an agent (like AppImages)
|
|
164
|
+
* AgentImages contains display images for an agent
|
|
269
165
|
*/
|
|
270
166
|
export interface AgentImages {
|
|
271
167
|
card: string;
|
|
272
168
|
thumbnail: string;
|
|
273
169
|
banner: string;
|
|
274
170
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
images: AgentImages;
|
|
286
|
-
version_id: string;
|
|
287
|
-
version?: AgentVersion;
|
|
171
|
+
/**
|
|
172
|
+
* CoreAppConfigDTO references an app used as the agent's core
|
|
173
|
+
*/
|
|
174
|
+
export interface CoreAppConfigDTO {
|
|
175
|
+
id?: string;
|
|
176
|
+
version_id?: string;
|
|
177
|
+
ref?: string;
|
|
178
|
+
app?: AppDTO;
|
|
179
|
+
setup?: any;
|
|
180
|
+
input?: any;
|
|
288
181
|
}
|
|
289
182
|
/**
|
|
290
183
|
* AgentDTO for API responses
|
|
@@ -292,130 +185,66 @@ export interface Agent extends BaseModel, PermissionModel {
|
|
|
292
185
|
export interface AgentDTO extends BaseModelDTO, PermissionModelDTO, ProjectModelDTO {
|
|
293
186
|
namespace: string;
|
|
294
187
|
name: string;
|
|
295
|
-
/**
|
|
296
|
-
* Display images (like AppDTO)
|
|
297
|
-
*/
|
|
298
188
|
images: AgentImages;
|
|
299
189
|
version_id: string;
|
|
300
190
|
version?: AgentVersionDTO;
|
|
301
191
|
}
|
|
302
|
-
|
|
303
|
-
* SkillConfig defines a skill available to the agent.
|
|
304
|
-
* Skills are loaded on-demand via the skill_get internal tool.
|
|
305
|
-
*/
|
|
306
|
-
export interface SkillConfig {
|
|
307
|
-
name: string;
|
|
192
|
+
export interface AgentVersionDTO extends BaseModelDTO, PermissionModelDTO {
|
|
308
193
|
description: string;
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
194
|
+
system_prompt: string;
|
|
195
|
+
example_prompts: string[];
|
|
196
|
+
core_app?: CoreAppConfigDTO;
|
|
197
|
+
tools: (AgentToolDTO | undefined)[];
|
|
198
|
+
skills: SkillConfig[];
|
|
199
|
+
context?: ContextField[];
|
|
200
|
+
internal_tools?: InternalToolsConfig;
|
|
201
|
+
output_schema?: any;
|
|
314
202
|
}
|
|
315
203
|
/**
|
|
316
|
-
*
|
|
317
|
-
*
|
|
204
|
+
* CreateAgentRequest is the request body for POST /agents
|
|
205
|
+
* For new agents: omit ID, backend generates it
|
|
206
|
+
* For new version of existing agent: include ID
|
|
318
207
|
*/
|
|
319
|
-
export interface
|
|
208
|
+
export interface CreateAgentRequest {
|
|
209
|
+
id?: string;
|
|
320
210
|
name: string;
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
211
|
+
namespace?: string;
|
|
212
|
+
images?: AgentImages;
|
|
213
|
+
/**
|
|
214
|
+
* Version config (embedded - backend generates version ID, timestamps, etc)
|
|
215
|
+
*/
|
|
216
|
+
version?: AgentConfigInput;
|
|
324
217
|
}
|
|
325
218
|
/**
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
* Using Go embedding flattens these fields in JSON serialization.
|
|
219
|
+
* AgentConfigInput is the API input shape for agent version config.
|
|
220
|
+
* Mirrors AgentConfig's JSON contract without gorm tags or runtime pointers.
|
|
329
221
|
*/
|
|
330
|
-
export interface
|
|
331
|
-
/**
|
|
332
|
-
* Optional name for the agent (used for adhoc agent deduplication — reuses existing agent by name).
|
|
333
|
-
* Not persisted as a DB column; only used in API requests.
|
|
334
|
-
*/
|
|
222
|
+
export interface AgentConfigInput {
|
|
335
223
|
name?: string;
|
|
336
224
|
description?: string;
|
|
337
225
|
system_prompt?: string;
|
|
338
226
|
example_prompts?: string[];
|
|
339
|
-
|
|
340
|
-
* Core LLM configuration
|
|
341
|
-
*/
|
|
342
|
-
core_app?: CoreAppConfig;
|
|
343
|
-
/**
|
|
344
|
-
* Tools (apps, agents, hooks, client tools)
|
|
345
|
-
*/
|
|
227
|
+
core_app?: CoreAppConfigInput;
|
|
346
228
|
tools?: (AgentTool | undefined)[];
|
|
347
|
-
/**
|
|
348
|
-
* Skills available to this agent (loaded on-demand via skill_get tool)
|
|
349
|
-
*/
|
|
350
229
|
skills?: SkillConfig[];
|
|
351
|
-
/**
|
|
352
|
-
* Context declares expected context parameters (resolved in tool URL templates via {{context.X}})
|
|
353
|
-
*/
|
|
354
230
|
context?: ContextField[];
|
|
355
|
-
/**
|
|
356
|
-
* Internal tools configuration (plan, memory, widget, finish, skills)
|
|
357
|
-
*/
|
|
358
231
|
internal_tools?: InternalToolsConfig;
|
|
359
|
-
/**
|
|
360
|
-
* Output schema for custom finish tool (sub-agents only)
|
|
361
|
-
*/
|
|
362
232
|
output_schema?: any;
|
|
363
233
|
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
*/
|
|
369
|
-
config_hash: string;
|
|
370
|
-
}
|
|
371
|
-
export interface CoreAppConfigDTO {
|
|
234
|
+
/**
|
|
235
|
+
* CoreAppConfigInput is the API input shape for core app configuration.
|
|
236
|
+
*/
|
|
237
|
+
export interface CoreAppConfigInput {
|
|
372
238
|
id?: string;
|
|
373
239
|
version_id?: string;
|
|
374
240
|
ref?: string;
|
|
375
|
-
app?: AppDTO;
|
|
376
|
-
/**
|
|
377
|
-
* Setup values for the core app (one-time configuration)
|
|
378
|
-
*/
|
|
379
241
|
setup?: any;
|
|
380
|
-
/**
|
|
381
|
-
* Input default values for the core app
|
|
382
|
-
*/
|
|
383
242
|
input?: any;
|
|
384
243
|
}
|
|
385
|
-
export interface AgentVersionDTO extends BaseModelDTO, PermissionModelDTO {
|
|
386
|
-
description: string;
|
|
387
|
-
system_prompt: string;
|
|
388
|
-
example_prompts: string[];
|
|
389
|
-
core_app?: CoreAppConfigDTO;
|
|
390
|
-
/**
|
|
391
|
-
* Unified tools array (apps, agents, hooks, client)
|
|
392
|
-
*/
|
|
393
|
-
tools: (AgentToolDTO | undefined)[];
|
|
394
|
-
/**
|
|
395
|
-
* Skills available to this agent (loaded on-demand via skill_get tool)
|
|
396
|
-
*/
|
|
397
|
-
skills: SkillConfig[];
|
|
398
|
-
/**
|
|
399
|
-
* Context declarations
|
|
400
|
-
*/
|
|
401
|
-
context?: ContextField[];
|
|
402
|
-
/**
|
|
403
|
-
* Internal tools configuration (plan, memory, widget, finish, skills)
|
|
404
|
-
*/
|
|
405
|
-
internal_tools?: InternalToolsConfig;
|
|
406
|
-
/**
|
|
407
|
-
* Output schema for custom finish tool (sub-agents only)
|
|
408
|
-
*/
|
|
409
|
-
output_schema?: any;
|
|
410
|
-
}
|
|
411
|
-
export interface APIRequest<T extends any> {
|
|
412
|
-
timestamp: string;
|
|
413
|
-
data: T;
|
|
414
|
-
}
|
|
415
244
|
export interface APIResponse<T extends any> {
|
|
416
245
|
success: boolean;
|
|
417
246
|
status: number;
|
|
418
|
-
data
|
|
247
|
+
data: T;
|
|
419
248
|
error?: APIError;
|
|
420
249
|
}
|
|
421
250
|
export interface APIError {
|
|
@@ -428,20 +257,9 @@ export interface APIError {
|
|
|
428
257
|
}
|
|
429
258
|
/**
|
|
430
259
|
* ApiAppRunRequest is the request body for /apps/run endpoint.
|
|
431
|
-
* Supports two ways to specify the app:
|
|
432
|
-
* 1. App ref (recommended): "namespace/name@shortid" in the App field
|
|
433
|
-
* 2. Direct IDs: app_id + version_id fields (for internal platform use)
|
|
434
260
|
*/
|
|
435
261
|
export interface ApiAppRunRequest {
|
|
436
|
-
/**
|
|
437
|
-
* App reference in format: namespace/name@shortid (version required)
|
|
438
|
-
* Example: "okaris/flux@abc1"
|
|
439
|
-
* The short ID ensures your code always runs the same version.
|
|
440
|
-
*/
|
|
441
262
|
app?: string;
|
|
442
|
-
/**
|
|
443
|
-
* Deprecated: use App ref instead. Direct ID bypasses ref routing.
|
|
444
|
-
*/
|
|
445
263
|
app_id?: string;
|
|
446
264
|
version_id?: string;
|
|
447
265
|
infra?: Infra;
|
|
@@ -449,165 +267,37 @@ export interface ApiAppRunRequest {
|
|
|
449
267
|
webhook?: string;
|
|
450
268
|
setup?: any;
|
|
451
269
|
input: any;
|
|
452
|
-
/**
|
|
453
|
-
* If true, returns SSE stream instead of JSON response
|
|
454
|
-
*/
|
|
455
270
|
stream?: boolean;
|
|
456
|
-
/**
|
|
457
|
-
* If true, holds the connection open until the task reaches a terminal state and returns the final result.
|
|
458
|
-
* Mutually exclusive with Stream.
|
|
459
|
-
*/
|
|
460
271
|
wait?: boolean;
|
|
461
|
-
/**
|
|
462
|
-
* Function to call on multi-function apps (defaults to "run" or app's default_function)
|
|
463
|
-
*/
|
|
464
272
|
function?: string;
|
|
465
|
-
/**
|
|
466
|
-
* Session control: "new" to start a new session, "sess_xxx" to continue existing session
|
|
467
|
-
* When using sessions, the worker is leased and state persists across calls
|
|
468
|
-
*/
|
|
469
273
|
session?: string;
|
|
470
|
-
/**
|
|
471
|
-
* Session timeout in seconds (1-3600). Only valid when session="new"
|
|
472
|
-
*/
|
|
473
274
|
session_timeout?: number;
|
|
474
|
-
/**
|
|
475
|
-
* Schedule execution for a specific time (ISO 8601 UTC, e.g. "2026-02-24T15:30:00Z").
|
|
476
|
-
* Task stays queued until this time. Past timestamps run immediately.
|
|
477
|
-
*/
|
|
478
275
|
run_at?: string;
|
|
479
|
-
/**
|
|
480
|
-
* Optional metadata (e.g., action to trigger on completion)
|
|
481
|
-
*/
|
|
482
276
|
metadata?: TaskMetadata;
|
|
483
277
|
}
|
|
484
278
|
/**
|
|
485
279
|
* ApiAgentRunRequest is the request body for /agents/run endpoint.
|
|
486
|
-
* Supports both template agents and ad-hoc agents.
|
|
487
280
|
*/
|
|
488
281
|
export interface ApiAgentRunRequest {
|
|
489
|
-
/**
|
|
490
|
-
* Existing chat ID to continue a conversation (optional)
|
|
491
|
-
*/
|
|
492
282
|
chat_id?: string;
|
|
493
|
-
/**
|
|
494
|
-
* Template agent reference in format: namespace/name@shortid
|
|
495
|
-
* Example: "my-org/assistant@abc123"
|
|
496
|
-
* Use this OR AgentConfig, not both
|
|
497
|
-
*/
|
|
498
283
|
agent?: string;
|
|
499
|
-
|
|
500
|
-
* Ad-hoc agent configuration
|
|
501
|
-
* For ad-hoc agents, set core_app.ref to the LLM app reference
|
|
502
|
-
* Example: { "core_app": { "ref": "infsh/claude-sonnet-4@abc123" }, "system_prompt": "..." }
|
|
503
|
-
*/
|
|
504
|
-
agent_config?: AgentConfig;
|
|
505
|
-
/**
|
|
506
|
-
* Optional name for the adhoc agent (used for deduplication and display)
|
|
507
|
-
*/
|
|
284
|
+
agent_config?: AgentConfigInput;
|
|
508
285
|
agent_name?: string;
|
|
509
|
-
/**
|
|
510
|
-
* The message to send
|
|
511
|
-
*/
|
|
512
286
|
input: ChatTaskInput;
|
|
513
|
-
/**
|
|
514
|
-
* Context values for this chat session (used in tool URL templates)
|
|
515
|
-
*/
|
|
516
287
|
context?: {
|
|
517
288
|
[key: string]: string;
|
|
518
289
|
};
|
|
519
|
-
/**
|
|
520
|
-
* If true, returns SSE stream instead of JSON response
|
|
521
|
-
*/
|
|
522
|
-
stream?: boolean;
|
|
523
|
-
}
|
|
524
|
-
/**
|
|
525
|
-
* EmbedAgentRunRequest is the embed variant of ApiAgentRunRequest.
|
|
526
|
-
* Only template agents are supported (no ad-hoc configs).
|
|
527
|
-
*/
|
|
528
|
-
export interface EmbedAgentRunRequest {
|
|
529
|
-
chat_id?: string;
|
|
530
|
-
agent: string;
|
|
531
|
-
input: ChatTaskInput;
|
|
532
290
|
stream?: boolean;
|
|
533
291
|
}
|
|
534
|
-
export interface CreateAgentMessageRequest {
|
|
535
|
-
chat_id?: string;
|
|
536
|
-
agent_id?: string;
|
|
537
|
-
agent_version_id?: string;
|
|
538
|
-
agent?: string;
|
|
539
|
-
tool_call_id?: string;
|
|
540
|
-
input: ChatTaskInput;
|
|
541
|
-
integration_context?: IntegrationContext;
|
|
542
|
-
/**
|
|
543
|
-
* Ad-hoc agent config - use this instead of Agent for embedded configs
|
|
544
|
-
* If provided, creates a chat with this config directly (no agent reference)
|
|
545
|
-
*/
|
|
546
|
-
agent_config?: AgentConfig;
|
|
547
|
-
/**
|
|
548
|
-
* Optional name for the adhoc agent (used for deduplication and display)
|
|
549
|
-
*/
|
|
550
|
-
agent_name?: string;
|
|
551
|
-
/**
|
|
552
|
-
* Context values for this chat session (used in tool URL templates)
|
|
553
|
-
*/
|
|
554
|
-
context?: {
|
|
555
|
-
[key: string]: string;
|
|
556
|
-
};
|
|
557
|
-
}
|
|
558
|
-
export interface CreateAgentMessageResponse {
|
|
559
|
-
user_message?: ChatMessageDTO;
|
|
560
|
-
assistant_message?: ChatMessageDTO;
|
|
561
|
-
}
|
|
562
292
|
/**
|
|
563
293
|
* ToolResultRequest represents a tool result submission
|
|
564
|
-
* For widget actions, clients should JSON-serialize { action, form_data } as the result string
|
|
565
294
|
*/
|
|
566
295
|
export interface ToolResultRequest {
|
|
567
296
|
result: string;
|
|
568
297
|
}
|
|
569
298
|
/**
|
|
570
|
-
*
|
|
571
|
-
*/
|
|
572
|
-
export interface WebhookPayload<T extends any> {
|
|
573
|
-
event: string;
|
|
574
|
-
timestamp: string;
|
|
575
|
-
data: T;
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* HookPayload represents the request body sent to a webhook when a hook tool is invoked
|
|
579
|
-
*/
|
|
580
|
-
export interface HookPayload {
|
|
581
|
-
/**
|
|
582
|
-
* Identification
|
|
583
|
-
*/
|
|
584
|
-
tool_invocation_id: string;
|
|
585
|
-
hook_name: string;
|
|
586
|
-
/**
|
|
587
|
-
* Callback - use this to submit the result back
|
|
588
|
-
*/
|
|
589
|
-
callback_url: string;
|
|
590
|
-
callback_method: string;
|
|
591
|
-
/**
|
|
592
|
-
* Timestamp in RFC3339 format
|
|
593
|
-
*/
|
|
594
|
-
timestamp: string;
|
|
595
|
-
/**
|
|
596
|
-
* The actual tool arguments from the LLM
|
|
597
|
-
*/
|
|
598
|
-
arguments: {
|
|
599
|
-
[key: string]: any;
|
|
600
|
-
};
|
|
601
|
-
}
|
|
602
|
-
/**
|
|
603
|
-
* HookResponse represents the expected response from the hook URL
|
|
604
|
-
* The hook should return 200 with success:true to acknowledge receipt
|
|
605
|
-
* The actual result should be sent via the callback URL
|
|
299
|
+
* PartialFile is the clean DTO version (no gorm tags).
|
|
606
300
|
*/
|
|
607
|
-
export interface HookResponse {
|
|
608
|
-
success: boolean;
|
|
609
|
-
message?: string;
|
|
610
|
-
}
|
|
611
301
|
export interface PartialFile {
|
|
612
302
|
uri: string;
|
|
613
303
|
path?: string;
|
|
@@ -615,67 +305,6 @@ export interface PartialFile {
|
|
|
615
305
|
size?: number;
|
|
616
306
|
filename?: string;
|
|
617
307
|
}
|
|
618
|
-
export interface FileCreateRequest {
|
|
619
|
-
/**
|
|
620
|
-
* Category determines the storage path prefix: "uploads" (default), "inputs", "outputs", "repos"
|
|
621
|
-
*/
|
|
622
|
-
category?: string;
|
|
623
|
-
files: PartialFile[];
|
|
624
|
-
}
|
|
625
|
-
export interface CreateFlowRequest {
|
|
626
|
-
name: string;
|
|
627
|
-
}
|
|
628
|
-
export interface CreateFlowRunRequest {
|
|
629
|
-
flow: string;
|
|
630
|
-
input: any;
|
|
631
|
-
}
|
|
632
|
-
/**
|
|
633
|
-
* CreateAppRequest is the request body for POST /apps
|
|
634
|
-
*/
|
|
635
|
-
export interface CreateAppRequest {
|
|
636
|
-
id?: string;
|
|
637
|
-
namespace?: string;
|
|
638
|
-
name: string;
|
|
639
|
-
description?: string;
|
|
640
|
-
agent_description?: string;
|
|
641
|
-
category?: AppCategory;
|
|
642
|
-
images?: AppImages;
|
|
643
|
-
version?: AppVersion;
|
|
644
|
-
/**
|
|
645
|
-
* PreserveCurrentVersion prevents auto-promoting the new version to current.
|
|
646
|
-
* Default false = new versions become current (what most users expect).
|
|
647
|
-
* Set true for admin deployments where you want to test before promoting.
|
|
648
|
-
*/
|
|
649
|
-
preserve_current_version?: boolean;
|
|
650
|
-
}
|
|
651
|
-
/**
|
|
652
|
-
* CreateAgentRequest is the request body for POST /agents
|
|
653
|
-
* For new agents: omit ID, backend generates it
|
|
654
|
-
* For new version of existing agent: include ID
|
|
655
|
-
*/
|
|
656
|
-
export interface CreateAgentRequest {
|
|
657
|
-
/**
|
|
658
|
-
* Existing agent ID (if updating/versioning)
|
|
659
|
-
*/
|
|
660
|
-
id?: string;
|
|
661
|
-
/**
|
|
662
|
-
* Agent metadata
|
|
663
|
-
*/
|
|
664
|
-
name: string;
|
|
665
|
-
namespace?: string;
|
|
666
|
-
images?: AgentImages;
|
|
667
|
-
/**
|
|
668
|
-
* Version config (embedded - backend generates version ID, timestamps, etc)
|
|
669
|
-
*/
|
|
670
|
-
version?: AgentConfig;
|
|
671
|
-
}
|
|
672
|
-
/**
|
|
673
|
-
* SDKTypes is a phantom struct that references types needed by the SDK.
|
|
674
|
-
* This ensures the typegen traces these types without creating aliases.
|
|
675
|
-
* Frontend uses generics like CursorListResponse<FlowDTO> directly.
|
|
676
|
-
*/
|
|
677
|
-
export interface SDKTypes {
|
|
678
|
-
}
|
|
679
308
|
export interface SkillPublishRequest {
|
|
680
309
|
namespace?: string;
|
|
681
310
|
name: string;
|
|
@@ -686,412 +315,166 @@ export interface SkillPublishRequest {
|
|
|
686
315
|
allowed_tools: string;
|
|
687
316
|
compatibility: string;
|
|
688
317
|
instructions: string;
|
|
689
|
-
files:
|
|
318
|
+
files: KnowledgeFile[];
|
|
690
319
|
metadata?: {
|
|
691
320
|
[key: string]: string;
|
|
692
321
|
};
|
|
693
|
-
/**
|
|
694
|
-
* Lineage — backend infers MutationType from context
|
|
695
|
-
*/
|
|
696
322
|
parent_skill_id?: string;
|
|
697
323
|
parent_version_id?: string;
|
|
698
324
|
source_url?: string;
|
|
699
325
|
version_notes?: string;
|
|
700
|
-
/**
|
|
701
|
-
* Spec fields for roundtrip fidelity
|
|
702
|
-
*/
|
|
703
326
|
disable_model_invocation: boolean;
|
|
704
327
|
user_invocable?: boolean;
|
|
705
328
|
context: string;
|
|
706
329
|
}
|
|
707
|
-
export interface CheckoutCreateRequest {
|
|
708
|
-
amount: number;
|
|
709
|
-
success_url: string;
|
|
710
|
-
cancel_url: string;
|
|
711
|
-
}
|
|
712
|
-
export interface CheckoutCompleteRequest {
|
|
713
|
-
session_id: string;
|
|
714
|
-
}
|
|
715
330
|
/**
|
|
716
|
-
*
|
|
331
|
+
* ScopeGroup identifies a category of scopes for UI grouping
|
|
717
332
|
*/
|
|
718
|
-
export type
|
|
719
|
-
export
|
|
333
|
+
export type ScopeGroup = string;
|
|
334
|
+
export declare const ScopeGroupAgents: ScopeGroup;
|
|
335
|
+
export declare const ScopeGroupApps: ScopeGroup;
|
|
336
|
+
export declare const ScopeGroupConversations: ScopeGroup;
|
|
337
|
+
export declare const ScopeGroupFiles: ScopeGroup;
|
|
338
|
+
export declare const ScopeGroupDatastores: ScopeGroup;
|
|
339
|
+
export declare const ScopeGroupFlows: ScopeGroup;
|
|
340
|
+
export declare const ScopeGroupProjects: ScopeGroup;
|
|
341
|
+
export declare const ScopeGroupTeams: ScopeGroup;
|
|
342
|
+
export declare const ScopeGroupBilling: ScopeGroup;
|
|
343
|
+
export declare const ScopeGroupSecrets: ScopeGroup;
|
|
344
|
+
export declare const ScopeGroupIntegrations: ScopeGroup;
|
|
345
|
+
export declare const ScopeGroupEngines: ScopeGroup;
|
|
346
|
+
export declare const ScopeGroupApiKeys: ScopeGroup;
|
|
347
|
+
export declare const ScopeGroupUser: ScopeGroup;
|
|
348
|
+
export declare const ScopeGroupSettings: ScopeGroup;
|
|
720
349
|
/**
|
|
721
|
-
*
|
|
350
|
+
* ScopeDefinition describes a single scope for UI rendering
|
|
722
351
|
*/
|
|
723
|
-
export interface
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
provider?: string;
|
|
352
|
+
export interface ScopeDefinition {
|
|
353
|
+
value: string;
|
|
354
|
+
label: string;
|
|
355
|
+
description: string;
|
|
356
|
+
group: ScopeGroup;
|
|
729
357
|
}
|
|
730
358
|
/**
|
|
731
|
-
*
|
|
359
|
+
* ScopeGroupDefinition describes a group of scopes for UI rendering
|
|
732
360
|
*/
|
|
733
|
-
export interface
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
approve_url: string;
|
|
738
|
-
expires_in: number;
|
|
739
|
-
interval: number;
|
|
361
|
+
export interface ScopeGroupDefinition {
|
|
362
|
+
id: ScopeGroup;
|
|
363
|
+
label: string;
|
|
364
|
+
description: string;
|
|
740
365
|
}
|
|
741
366
|
/**
|
|
742
|
-
*
|
|
367
|
+
* ScopePreset represents a predefined bundle of scopes for common use cases
|
|
743
368
|
*/
|
|
744
|
-
export interface
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
369
|
+
export interface ScopePreset {
|
|
370
|
+
id: string;
|
|
371
|
+
label: string;
|
|
372
|
+
description: string;
|
|
373
|
+
scopes: string[];
|
|
748
374
|
}
|
|
749
375
|
/**
|
|
750
|
-
*
|
|
376
|
+
* AppPricing configures all pricing using CEL expressions.
|
|
377
|
+
* Empty expressions use defaults. All values in microcents.
|
|
751
378
|
*/
|
|
752
|
-
export interface
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
379
|
+
export interface AppPricing {
|
|
380
|
+
prices: {
|
|
381
|
+
[key: string]: number;
|
|
382
|
+
};
|
|
383
|
+
upstream_pricing?: string;
|
|
384
|
+
resource_expression: string;
|
|
385
|
+
inference_expression: string;
|
|
386
|
+
royalty_expression: string;
|
|
387
|
+
partner_expression: string;
|
|
388
|
+
total_expression: string;
|
|
389
|
+
description: string;
|
|
390
|
+
description_rendered?: string;
|
|
756
391
|
}
|
|
757
392
|
/**
|
|
758
|
-
*
|
|
393
|
+
* AppFunction represents a callable entry point within an app version.
|
|
759
394
|
*/
|
|
760
|
-
export interface
|
|
761
|
-
|
|
762
|
-
|
|
395
|
+
export interface AppFunction {
|
|
396
|
+
name: string;
|
|
397
|
+
description?: string;
|
|
398
|
+
input_schema: any;
|
|
399
|
+
output_schema: any;
|
|
763
400
|
}
|
|
764
401
|
/**
|
|
765
|
-
*
|
|
402
|
+
* AppImages holds developer-provided images for the app.
|
|
766
403
|
*/
|
|
767
|
-
export interface
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
status: DeviceAuthStatus;
|
|
404
|
+
export interface AppImages {
|
|
405
|
+
card: string;
|
|
406
|
+
thumbnail: string;
|
|
407
|
+
banner: string;
|
|
772
408
|
}
|
|
773
409
|
/**
|
|
774
|
-
*
|
|
410
|
+
* AppGPUResource describes GPU requirements.
|
|
775
411
|
*/
|
|
776
|
-
export interface
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
export interface TeamCreateRequest {
|
|
781
|
-
name: string;
|
|
782
|
-
username: string;
|
|
783
|
-
email: string;
|
|
412
|
+
export interface AppGPUResource {
|
|
413
|
+
count: number;
|
|
414
|
+
vram: number;
|
|
415
|
+
type: GPUType;
|
|
784
416
|
}
|
|
785
417
|
/**
|
|
786
|
-
*
|
|
787
|
-
* This marks the team as setup_completed=true after validation
|
|
418
|
+
* AppResources describes resource requirements.
|
|
788
419
|
*/
|
|
789
|
-
export interface
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
export interface TeamMemberAddRequest {
|
|
793
|
-
email: string;
|
|
794
|
-
role: TeamRole;
|
|
420
|
+
export interface AppResources {
|
|
421
|
+
gpu: AppGPUResource;
|
|
422
|
+
ram: number;
|
|
795
423
|
}
|
|
796
|
-
|
|
797
|
-
|
|
424
|
+
/**
|
|
425
|
+
* AppVariant is a named resource/env configuration variant.
|
|
426
|
+
*/
|
|
427
|
+
export interface AppVariant {
|
|
428
|
+
name: string;
|
|
429
|
+
order: number;
|
|
430
|
+
resources: AppResources;
|
|
431
|
+
env: {
|
|
432
|
+
[key: string]: string;
|
|
433
|
+
};
|
|
434
|
+
python: string;
|
|
798
435
|
}
|
|
799
436
|
/**
|
|
800
|
-
*
|
|
437
|
+
* SecretRequirement defines a secret that an app requires to run.
|
|
801
438
|
*/
|
|
802
|
-
export interface
|
|
439
|
+
export interface SecretRequirement {
|
|
803
440
|
key: string;
|
|
804
|
-
value: string;
|
|
805
441
|
description?: string;
|
|
442
|
+
optional?: boolean;
|
|
806
443
|
}
|
|
807
444
|
/**
|
|
808
|
-
*
|
|
445
|
+
* IntegrationRequirement defines an integration capability that an app requires.
|
|
809
446
|
*/
|
|
810
|
-
export interface
|
|
811
|
-
|
|
447
|
+
export interface IntegrationRequirement {
|
|
448
|
+
key: string;
|
|
812
449
|
description?: string;
|
|
450
|
+
optional?: boolean;
|
|
813
451
|
}
|
|
814
452
|
/**
|
|
815
|
-
*
|
|
453
|
+
* AppDTO is the API response for a full app.
|
|
816
454
|
*/
|
|
817
|
-
export interface
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
* For BYOK integrations (e.g., X.com) - contains user-provided credentials
|
|
827
|
-
*/
|
|
828
|
-
metadata?: {
|
|
829
|
-
[key: string]: any;
|
|
830
|
-
};
|
|
455
|
+
export interface AppDTO extends BaseModelDTO, PermissionModelDTO {
|
|
456
|
+
namespace: string;
|
|
457
|
+
name: string;
|
|
458
|
+
description: string;
|
|
459
|
+
agent_description: string;
|
|
460
|
+
category: AppCategory;
|
|
461
|
+
images: AppImages;
|
|
462
|
+
version_id: string;
|
|
463
|
+
version?: AppVersionDTO;
|
|
831
464
|
}
|
|
832
465
|
/**
|
|
833
|
-
*
|
|
466
|
+
* AppVersionDTO is the API response for an app version.
|
|
834
467
|
*/
|
|
835
|
-
export interface
|
|
836
|
-
provider: string;
|
|
837
|
-
type: string;
|
|
838
|
-
code: string;
|
|
839
|
-
state: string;
|
|
840
|
-
/**
|
|
841
|
-
* For PKCE - code_verifier to complete the exchange (required by some providers like X/Twitter)
|
|
842
|
-
*/
|
|
843
|
-
code_verifier?: string;
|
|
844
|
-
}
|
|
845
|
-
/**
|
|
846
|
-
* IntegrationConnectResponse after connecting
|
|
847
|
-
*/
|
|
848
|
-
export interface IntegrationConnectResponse {
|
|
849
|
-
integration?: IntegrationDTO;
|
|
850
|
-
/**
|
|
851
|
-
* For OAuth - redirect URL to start the flow
|
|
852
|
-
*/
|
|
853
|
-
auth_url?: string;
|
|
854
|
-
/**
|
|
855
|
-
* For OAuth - state to be returned with the callback (frontend stores this)
|
|
856
|
-
*/
|
|
857
|
-
state?: string;
|
|
858
|
-
/**
|
|
859
|
-
* For PKCE - code_verifier to be stored and sent back with CompleteOAuth (required by some providers like X/Twitter)
|
|
860
|
-
*/
|
|
861
|
-
code_verifier?: string;
|
|
862
|
-
/**
|
|
863
|
-
* For service accounts - instructions
|
|
864
|
-
*/
|
|
865
|
-
instructions?: string;
|
|
866
|
-
/**
|
|
867
|
-
* RequiresConfirmation — the connect was paused, user must acknowledge and retry with a flag.
|
|
868
|
-
*/
|
|
869
|
-
requires_confirmation?: boolean;
|
|
870
|
-
confirmation_type?: string;
|
|
871
|
-
message?: string;
|
|
872
|
-
}
|
|
873
|
-
export interface ProjectCreateRequest {
|
|
874
|
-
name: string;
|
|
875
|
-
type: ProjectType;
|
|
876
|
-
}
|
|
877
|
-
export interface ProjectUpdateRequest {
|
|
878
|
-
name: string;
|
|
879
|
-
}
|
|
880
|
-
export interface MoveAgentToProjectRequest {
|
|
881
|
-
agent_id: string;
|
|
882
|
-
project_id: string;
|
|
883
|
-
}
|
|
884
|
-
/**
|
|
885
|
-
* WorkerGPUConfig holds GPU identifiers for a worker.
|
|
886
|
-
* GPUs accepts both integer indexes (legacy) and string GPU IDs.
|
|
887
|
-
* Use GPUIndexes() and GPUIDs() to separate them after unmarshaling.
|
|
888
|
-
*/
|
|
889
|
-
export interface WorkerGPUConfig {
|
|
890
|
-
gpus: any[];
|
|
891
|
-
}
|
|
892
|
-
export interface WorkerCPUConfig {
|
|
893
|
-
count: number;
|
|
894
|
-
}
|
|
895
|
-
export interface WorkerConfig {
|
|
896
|
-
gpu: WorkerGPUConfig[];
|
|
897
|
-
cpu: WorkerCPUConfig;
|
|
898
|
-
}
|
|
899
|
-
export interface EngineConfig {
|
|
900
|
-
id: string;
|
|
901
|
-
name: string;
|
|
902
|
-
api_url: string;
|
|
903
|
-
engine_port: string;
|
|
904
|
-
workers: WorkerConfig;
|
|
905
|
-
api_key: string;
|
|
906
|
-
container_mode: boolean;
|
|
907
|
-
network_name: string;
|
|
908
|
-
cache_path: string;
|
|
909
|
-
gpus: string[];
|
|
910
|
-
/**
|
|
911
|
-
* CallbackBasePort overrides the base port for engine↔worker callback APIs.
|
|
912
|
-
* If 0, derived from EnginePort: 5000 + (enginePort - 8163) * 100.
|
|
913
|
-
*/
|
|
914
|
-
callback_base_port: number;
|
|
915
|
-
/**
|
|
916
|
-
* EngineInternalAPIURL is the URL workers use to reach the engine's main API.
|
|
917
|
-
* If empty, derived as http://host.docker.internal:{EnginePort}.
|
|
918
|
-
*/
|
|
919
|
-
engine_internal_api_url: string;
|
|
920
|
-
}
|
|
921
|
-
/**
|
|
922
|
-
* ScopeGroup identifies a category of scopes for UI grouping
|
|
923
|
-
*/
|
|
924
|
-
export type ScopeGroup = string;
|
|
925
|
-
export declare const ScopeGroupAgents: ScopeGroup;
|
|
926
|
-
export declare const ScopeGroupApps: ScopeGroup;
|
|
927
|
-
export declare const ScopeGroupConversations: ScopeGroup;
|
|
928
|
-
export declare const ScopeGroupFiles: ScopeGroup;
|
|
929
|
-
export declare const ScopeGroupDatastores: ScopeGroup;
|
|
930
|
-
export declare const ScopeGroupFlows: ScopeGroup;
|
|
931
|
-
export declare const ScopeGroupProjects: ScopeGroup;
|
|
932
|
-
export declare const ScopeGroupTeams: ScopeGroup;
|
|
933
|
-
export declare const ScopeGroupBilling: ScopeGroup;
|
|
934
|
-
export declare const ScopeGroupSecrets: ScopeGroup;
|
|
935
|
-
export declare const ScopeGroupIntegrations: ScopeGroup;
|
|
936
|
-
export declare const ScopeGroupEngines: ScopeGroup;
|
|
937
|
-
export declare const ScopeGroupApiKeys: ScopeGroup;
|
|
938
|
-
export declare const ScopeGroupUser: ScopeGroup;
|
|
939
|
-
export declare const ScopeGroupSettings: ScopeGroup;
|
|
940
|
-
/**
|
|
941
|
-
* ScopeDefinition describes a single scope for UI rendering
|
|
942
|
-
*/
|
|
943
|
-
export interface ScopeDefinition {
|
|
944
|
-
value: string;
|
|
945
|
-
label: string;
|
|
946
|
-
description: string;
|
|
947
|
-
group: ScopeGroup;
|
|
948
|
-
}
|
|
949
|
-
/**
|
|
950
|
-
* ScopeGroupDefinition describes a group of scopes for UI rendering
|
|
951
|
-
*/
|
|
952
|
-
export interface ScopeGroupDefinition {
|
|
953
|
-
id: ScopeGroup;
|
|
954
|
-
label: string;
|
|
955
|
-
description: string;
|
|
956
|
-
}
|
|
957
|
-
/**
|
|
958
|
-
* ScopePreset represents a predefined bundle of scopes for common use cases
|
|
959
|
-
*/
|
|
960
|
-
export interface ScopePreset {
|
|
961
|
-
id: string;
|
|
962
|
-
label: string;
|
|
963
|
-
description: string;
|
|
964
|
-
scopes: string[];
|
|
965
|
-
}
|
|
966
|
-
export type AppCategory = string;
|
|
967
|
-
export declare const AppCategoryImage: AppCategory;
|
|
968
|
-
export declare const AppCategoryVideo: AppCategory;
|
|
969
|
-
export declare const AppCategoryAudio: AppCategory;
|
|
970
|
-
export declare const AppCategoryText: AppCategory;
|
|
971
|
-
export declare const AppCategoryChat: AppCategory;
|
|
972
|
-
export declare const AppCategory3D: AppCategory;
|
|
973
|
-
export declare const AppCategoryOther: AppCategory;
|
|
974
|
-
export declare const AppCategoryFlow: AppCategory;
|
|
975
|
-
export type GPUType = string;
|
|
976
|
-
export declare const GPUTypeAny: GPUType;
|
|
977
|
-
export declare const GPUTypeNone: GPUType;
|
|
978
|
-
export declare const GPUTypeIntel: GPUType;
|
|
979
|
-
export declare const GPUTypeNvidia: GPUType;
|
|
980
|
-
export declare const GPUTypeAMD: GPUType;
|
|
981
|
-
export declare const GPUTypeApple: GPUType;
|
|
982
|
-
export interface AppImages {
|
|
983
|
-
card: string;
|
|
984
|
-
thumbnail: string;
|
|
985
|
-
banner: string;
|
|
986
|
-
}
|
|
987
|
-
export interface App extends BaseModel, PermissionModel {
|
|
988
|
-
/**
|
|
989
|
-
* Namespace is copied from team.username at creation time and is IMMUTABLE.
|
|
990
|
-
* This ensures stable references like "namespace/name" even if team username changes.
|
|
991
|
-
* Default empty string allows GORM migration to add column, then MigrateAppNamespaces populates it.
|
|
992
|
-
*/
|
|
993
|
-
namespace: string;
|
|
994
|
-
/**
|
|
995
|
-
* Name is IMMUTABLE after creation. Combined with Namespace forms unique identifier.
|
|
996
|
-
*/
|
|
997
|
-
name: string;
|
|
998
|
-
description: string;
|
|
999
|
-
agent_description: string;
|
|
1000
|
-
/**
|
|
1001
|
-
* Category is a fundamental classification of the app (image, video, audio, text, chat, 3d, other)
|
|
1002
|
-
*/
|
|
1003
|
-
category: AppCategory;
|
|
1004
|
-
/**
|
|
1005
|
-
* Developer's images
|
|
1006
|
-
*/
|
|
1007
|
-
images: AppImages;
|
|
1008
|
-
/**
|
|
1009
|
-
* Current version (developer's latest)
|
|
1010
|
-
*/
|
|
1011
|
-
version_id: string;
|
|
1012
|
-
version?: AppVersion;
|
|
1013
|
-
}
|
|
1014
|
-
/**
|
|
1015
|
-
* AppPricing configures all pricing using CEL expressions
|
|
1016
|
-
* Empty expressions use defaults. All values in microcents (1 cent = 1,000,000; 1 dollar = 100,000,000)
|
|
1017
|
-
*/
|
|
1018
|
-
export interface AppPricing {
|
|
1019
|
-
prices: {
|
|
1020
|
-
[key: string]: number;
|
|
1021
|
-
};
|
|
1022
|
-
upstream_pricing?: string;
|
|
1023
|
-
/**
|
|
1024
|
-
* Resource fee expression (compute cost)
|
|
1025
|
-
* Available variables: resources (list of {name, price_per_second}), usage_seconds, prices
|
|
1026
|
-
* Default: sum(resources.map(r, r.price_per_second)) * usage_seconds
|
|
1027
|
-
*/
|
|
1028
|
-
resource_expression: string;
|
|
1029
|
-
/**
|
|
1030
|
-
* CEL expressions for each fee type (result in microcents)
|
|
1031
|
-
* Available variables: inputs, outputs, prices, resource_fee, usage_seconds
|
|
1032
|
-
*/
|
|
1033
|
-
inference_expression: string;
|
|
1034
|
-
royalty_expression: string;
|
|
1035
|
-
partner_expression: string;
|
|
1036
|
-
/**
|
|
1037
|
-
* Total expression combines all fees (can apply weights/discounts)
|
|
1038
|
-
* Available variables: inputs, outputs, prices, resource_fee, usage_seconds, inference_fee, royalty_fee, partner_fee
|
|
1039
|
-
* Default: resource_fee + inference_fee + royalty_fee + partner_fee
|
|
1040
|
-
*/
|
|
1041
|
-
total_expression: string;
|
|
1042
|
-
description: string;
|
|
1043
|
-
/**
|
|
1044
|
-
* DescriptionRendered is the result of evaluating Description against the
|
|
1045
|
-
* static prices map at save time. Frontends should display this rather than
|
|
1046
|
-
* the raw CEL source. Empty string means the description failed to render
|
|
1047
|
-
* (e.g. references variables outside `prices`).
|
|
1048
|
-
*/
|
|
1049
|
-
description_rendered?: string;
|
|
1050
|
-
}
|
|
1051
|
-
export interface AppGPUResource {
|
|
1052
|
-
count: number;
|
|
1053
|
-
vram: number;
|
|
1054
|
-
type: GPUType;
|
|
1055
|
-
}
|
|
1056
|
-
export interface AppResources {
|
|
1057
|
-
gpu: AppGPUResource;
|
|
1058
|
-
ram: number;
|
|
1059
|
-
}
|
|
1060
|
-
export interface AppVariant {
|
|
1061
|
-
name: string;
|
|
1062
|
-
order: number;
|
|
1063
|
-
resources: AppResources;
|
|
1064
|
-
env: {
|
|
1065
|
-
[key: string]: string;
|
|
1066
|
-
};
|
|
1067
|
-
python: string;
|
|
1068
|
-
}
|
|
1069
|
-
/**
|
|
1070
|
-
* AppFunction represents a callable entry point within an app version.
|
|
1071
|
-
* Each function has its own input/output schema while sharing the app's setup.
|
|
1072
|
-
*/
|
|
1073
|
-
export interface AppFunction {
|
|
1074
|
-
name: string;
|
|
1075
|
-
description?: string;
|
|
1076
|
-
input_schema: any;
|
|
1077
|
-
output_schema: any;
|
|
1078
|
-
}
|
|
1079
|
-
export interface AppVersion extends BaseModel {
|
|
1080
|
-
app_id: string;
|
|
468
|
+
export interface AppVersionDTO extends BaseModelDTO {
|
|
1081
469
|
metadata: {
|
|
1082
470
|
[key: string]: any;
|
|
1083
471
|
};
|
|
1084
472
|
repository: string;
|
|
1085
473
|
flow_version_id?: string;
|
|
1086
|
-
flow_version?:
|
|
474
|
+
flow_version?: FlowVersionDTO;
|
|
1087
475
|
setup_schema: any;
|
|
1088
476
|
input_schema: any;
|
|
1089
477
|
output_schema: any;
|
|
1090
|
-
/**
|
|
1091
|
-
* Functions contains the callable entry points for this app version.
|
|
1092
|
-
* Each function has its own input/output schema. If nil/empty, the app uses legacy single-function mode
|
|
1093
|
-
* with InputSchema/OutputSchema at the version level.
|
|
1094
|
-
*/
|
|
1095
478
|
functions?: {
|
|
1096
479
|
[key: string]: AppFunction;
|
|
1097
480
|
};
|
|
@@ -1103,68 +486,19 @@ export interface AppVersion extends BaseModel {
|
|
|
1103
486
|
[key: string]: string;
|
|
1104
487
|
};
|
|
1105
488
|
kernel: string;
|
|
1106
|
-
/**
|
|
1107
|
-
* App requirements - secrets and integrations needed to run this app
|
|
1108
|
-
*/
|
|
1109
489
|
required_secrets?: SecretRequirement[];
|
|
1110
490
|
required_integrations?: IntegrationRequirement[];
|
|
1111
491
|
resources: AppResources;
|
|
1112
|
-
/**
|
|
1113
|
-
* Checksum is the SHA256 checksum of the uploaded zip file
|
|
1114
|
-
*/
|
|
1115
492
|
checksum?: string;
|
|
1116
493
|
}
|
|
494
|
+
/**
|
|
495
|
+
* LicenseRecordDTO is the API response for a license record.
|
|
496
|
+
*/
|
|
1117
497
|
export interface LicenseRecordDTO extends BaseModelDTO {
|
|
1118
498
|
user_id: string;
|
|
1119
499
|
app_id: string;
|
|
1120
500
|
license: string;
|
|
1121
501
|
}
|
|
1122
|
-
export interface AppDTO extends BaseModelDTO, PermissionModelDTO {
|
|
1123
|
-
namespace: string;
|
|
1124
|
-
name: string;
|
|
1125
|
-
description: string;
|
|
1126
|
-
agent_description: string;
|
|
1127
|
-
category: AppCategory;
|
|
1128
|
-
images: AppImages;
|
|
1129
|
-
version_id: string;
|
|
1130
|
-
version?: AppVersionDTO;
|
|
1131
|
-
}
|
|
1132
|
-
export interface AppVersionDTO extends BaseModelDTO {
|
|
1133
|
-
metadata: {
|
|
1134
|
-
[key: string]: any;
|
|
1135
|
-
};
|
|
1136
|
-
repository: string;
|
|
1137
|
-
flow_version_id?: string;
|
|
1138
|
-
flow_version?: FlowVersionDTO;
|
|
1139
|
-
setup_schema: any;
|
|
1140
|
-
input_schema: any;
|
|
1141
|
-
output_schema: any;
|
|
1142
|
-
functions?: {
|
|
1143
|
-
[key: string]: AppFunction;
|
|
1144
|
-
};
|
|
1145
|
-
default_function?: string;
|
|
1146
|
-
variants: {
|
|
1147
|
-
[key: string]: AppVariant;
|
|
1148
|
-
};
|
|
1149
|
-
env: {
|
|
1150
|
-
[key: string]: string;
|
|
1151
|
-
};
|
|
1152
|
-
kernel: string;
|
|
1153
|
-
/**
|
|
1154
|
-
* App requirements
|
|
1155
|
-
*/
|
|
1156
|
-
required_secrets?: SecretRequirement[];
|
|
1157
|
-
required_integrations?: IntegrationRequirement[];
|
|
1158
|
-
resources: AppResources;
|
|
1159
|
-
/**
|
|
1160
|
-
* Checksum is the SHA256 checksum of the uploaded zip file
|
|
1161
|
-
*/
|
|
1162
|
-
checksum?: string;
|
|
1163
|
-
}
|
|
1164
|
-
export type AppSessionStatus = string;
|
|
1165
|
-
export declare const AppSessionStatusActive: AppSessionStatus;
|
|
1166
|
-
export declare const AppSessionStatusEnded: AppSessionStatus;
|
|
1167
|
-
export declare const AppSessionStatusExpired: AppSessionStatus;
|
|
1168
502
|
/**
|
|
1169
503
|
* AppSessionDTO is the external representation
|
|
1170
504
|
*/
|
|
@@ -1180,6 +514,25 @@ export interface AppSessionDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
1180
514
|
last_call_at?: string;
|
|
1181
515
|
idle_timeout?: number;
|
|
1182
516
|
}
|
|
517
|
+
/**
|
|
518
|
+
* AppStoreListingDTO for API responses
|
|
519
|
+
*/
|
|
520
|
+
export interface AppStoreListingDTO {
|
|
521
|
+
id: string;
|
|
522
|
+
created_at: string;
|
|
523
|
+
updated_at: string;
|
|
524
|
+
deleted_at?: string;
|
|
525
|
+
category: string;
|
|
526
|
+
subcategory?: string;
|
|
527
|
+
page_id?: string;
|
|
528
|
+
is_featured: boolean;
|
|
529
|
+
rank: number;
|
|
530
|
+
allows_private_workers: boolean;
|
|
531
|
+
allows_cloud_workers: boolean;
|
|
532
|
+
max_concurrency: number;
|
|
533
|
+
max_concurrency_per_team: number;
|
|
534
|
+
tags?: string[];
|
|
535
|
+
}
|
|
1183
536
|
/**
|
|
1184
537
|
* PublicAppStoreDTO is a lean DTO for public app store display.
|
|
1185
538
|
*/
|
|
@@ -1197,13 +550,6 @@ export interface PublicAppStoreDTO {
|
|
|
1197
550
|
has_approved_version: boolean;
|
|
1198
551
|
page_id?: string;
|
|
1199
552
|
}
|
|
1200
|
-
export interface BaseModel {
|
|
1201
|
-
id: string;
|
|
1202
|
-
short_id: string;
|
|
1203
|
-
created_at: string;
|
|
1204
|
-
updated_at: string;
|
|
1205
|
-
deleted_at?: string;
|
|
1206
|
-
}
|
|
1207
553
|
/**
|
|
1208
554
|
* BaseModelDTO is the contract-layer base embed — same fields, no gorm tags.
|
|
1209
555
|
* All DTOs should embed this instead of BaseModel.
|
|
@@ -1216,19 +562,8 @@ export interface BaseModelDTO {
|
|
|
1216
562
|
deleted_at?: string;
|
|
1217
563
|
}
|
|
1218
564
|
/**
|
|
1219
|
-
*
|
|
565
|
+
* PermissionModelDTO is the contract-layer permission embed.
|
|
1220
566
|
*/
|
|
1221
|
-
export type Visibility = string;
|
|
1222
|
-
export declare const VisibilityPrivate: Visibility;
|
|
1223
|
-
export declare const VisibilityPublic: Visibility;
|
|
1224
|
-
export declare const VisibilityUnlisted: Visibility;
|
|
1225
|
-
export interface PermissionModel {
|
|
1226
|
-
user_id: string;
|
|
1227
|
-
user?: User;
|
|
1228
|
-
team_id: string;
|
|
1229
|
-
team?: Team;
|
|
1230
|
-
visibility: Visibility;
|
|
1231
|
-
}
|
|
1232
567
|
export interface PermissionModelDTO {
|
|
1233
568
|
user_id: string;
|
|
1234
569
|
user?: UserRelationDTO;
|
|
@@ -1244,134 +579,9 @@ export interface ResourceStatusDTO {
|
|
|
1244
579
|
status: any;
|
|
1245
580
|
updated_at: string;
|
|
1246
581
|
}
|
|
1247
|
-
export type ChatStatus = string;
|
|
1248
|
-
export declare const ChatStatusBusy: ChatStatus;
|
|
1249
|
-
export declare const ChatStatusIdle: ChatStatus;
|
|
1250
|
-
export declare const ChatStatusAwaitingInput: ChatStatus;
|
|
1251
|
-
export declare const ChatStatusCompleted: ChatStatus;
|
|
1252
|
-
export interface IntegrationContext {
|
|
1253
|
-
integration_type?: IntegrationType;
|
|
1254
|
-
integration_metadata?: any;
|
|
1255
|
-
}
|
|
1256
|
-
/**
|
|
1257
|
-
* ChatData contains agent-specific data for a chat session
|
|
1258
|
-
*/
|
|
1259
|
-
export interface ChatData {
|
|
1260
|
-
plan_steps: PlanStep[];
|
|
1261
|
-
memory: StringEncodedMap;
|
|
1262
|
-
always_allowed_tools: string[];
|
|
1263
|
-
}
|
|
1264
|
-
/**
|
|
1265
|
-
* PlanStep represents a step in an agent's execution plan
|
|
1266
|
-
*/
|
|
1267
|
-
export interface PlanStep {
|
|
1268
|
-
index: number;
|
|
1269
|
-
title: string;
|
|
1270
|
-
description: string;
|
|
1271
|
-
notes?: string;
|
|
1272
|
-
status: PlanStepStatus;
|
|
1273
|
-
}
|
|
1274
|
-
/**
|
|
1275
|
-
* PlanStepStatus represents the status of a plan step
|
|
1276
|
-
*/
|
|
1277
|
-
export type PlanStepStatus = string;
|
|
1278
|
-
export declare const PlanStepStatusPending: PlanStepStatus;
|
|
1279
|
-
export declare const PlanStepStatusInProgress: PlanStepStatus;
|
|
1280
|
-
export declare const PlanStepStatusCompleted: PlanStepStatus;
|
|
1281
|
-
export declare const PlanStepStatusCancelled: PlanStepStatus;
|
|
1282
|
-
export type ChatMessageRole = string;
|
|
1283
|
-
export declare const ChatMessageRoleSystem: ChatMessageRole;
|
|
1284
|
-
export declare const ChatMessageRoleUser: ChatMessageRole;
|
|
1285
|
-
export declare const ChatMessageRoleAssistant: ChatMessageRole;
|
|
1286
|
-
export declare const ChatMessageRoleTool: ChatMessageRole;
|
|
1287
|
-
/**
|
|
1288
|
-
* ChatMessageStatus represents the lifecycle status of a chat message
|
|
1289
|
-
*/
|
|
1290
|
-
export type ChatMessageStatus = string;
|
|
1291
|
-
export declare const ChatMessageStatusPending: ChatMessageStatus;
|
|
1292
|
-
export declare const ChatMessageStatusReady: ChatMessageStatus;
|
|
1293
|
-
export declare const ChatMessageStatusFailed: ChatMessageStatus;
|
|
1294
|
-
export declare const ChatMessageStatusCancelled: ChatMessageStatus;
|
|
1295
|
-
export type ChatMessageContentType = string;
|
|
1296
|
-
export declare const ChatMessageContentTypeText: ChatMessageContentType;
|
|
1297
|
-
export declare const ChatMessageContentTypeReasoning: ChatMessageContentType;
|
|
1298
|
-
export declare const ChatMessageContentTypeImage: ChatMessageContentType;
|
|
1299
|
-
export declare const ChatMessageContentTypeFile: ChatMessageContentType;
|
|
1300
|
-
export declare const ChatMessageContentTypeTool: ChatMessageContentType;
|
|
1301
|
-
export type IntegrationType = string;
|
|
1302
|
-
export declare const IntegrationTypeSlack: IntegrationType;
|
|
1303
|
-
export declare const IntegrationTypeDiscord: IntegrationType;
|
|
1304
|
-
export declare const IntegrationTypeTeams: IntegrationType;
|
|
1305
|
-
export declare const IntegrationTypeTelegram: IntegrationType;
|
|
1306
|
-
/**
|
|
1307
|
-
* FileRef is a lightweight reference to a file with essential metadata.
|
|
1308
|
-
* Used in chat inputs/context instead of full File objects.
|
|
1309
|
-
*/
|
|
1310
|
-
export interface FileRef {
|
|
1311
|
-
id?: string;
|
|
1312
|
-
uri: string;
|
|
1313
|
-
filename: string;
|
|
1314
|
-
content_type: string;
|
|
1315
|
-
size?: number;
|
|
1316
|
-
}
|
|
1317
|
-
export interface ChatMessageContent {
|
|
1318
|
-
type: ChatMessageContentType;
|
|
1319
|
-
error?: string;
|
|
1320
|
-
text?: string;
|
|
1321
|
-
image?: string;
|
|
1322
|
-
file?: string;
|
|
1323
|
-
tool_calls?: ToolCall[];
|
|
1324
|
-
}
|
|
1325
|
-
/**
|
|
1326
|
-
* ToolCall represents a tool call from an LLM response (wire format)
|
|
1327
|
-
* This is a transport object for parsing LLM responses, not a database model
|
|
1328
|
-
*/
|
|
1329
|
-
export interface ToolCall {
|
|
1330
|
-
id: string;
|
|
1331
|
-
type: string;
|
|
1332
|
-
function: ToolCallFunction;
|
|
1333
|
-
}
|
|
1334
582
|
/**
|
|
1335
|
-
*
|
|
583
|
+
* ChatDTO for API responses
|
|
1336
584
|
*/
|
|
1337
|
-
export interface ToolCallFunction {
|
|
1338
|
-
name: string;
|
|
1339
|
-
arguments: StringEncodedMap;
|
|
1340
|
-
}
|
|
1341
|
-
export interface ChatTaskInput {
|
|
1342
|
-
model?: string;
|
|
1343
|
-
context_size: number;
|
|
1344
|
-
temperature?: number;
|
|
1345
|
-
top_p?: number;
|
|
1346
|
-
reasoning_effort?: string;
|
|
1347
|
-
reasoning_max_tokens?: number;
|
|
1348
|
-
system_prompt: string;
|
|
1349
|
-
context: ChatTaskContextMessage[];
|
|
1350
|
-
role?: ChatMessageRole;
|
|
1351
|
-
text?: string;
|
|
1352
|
-
reasoning?: string;
|
|
1353
|
-
/**
|
|
1354
|
-
* Attachments is the SDK input field with full file metadata
|
|
1355
|
-
*/
|
|
1356
|
-
attachments?: FileRef[];
|
|
1357
|
-
/**
|
|
1358
|
-
* Images and Files are internal fields for task workers (filled from Attachments or context)
|
|
1359
|
-
*/
|
|
1360
|
-
images?: string[];
|
|
1361
|
-
files?: string[];
|
|
1362
|
-
tools?: Tool[];
|
|
1363
|
-
tool_call_id?: string;
|
|
1364
|
-
}
|
|
1365
|
-
export interface ChatTaskContextMessage {
|
|
1366
|
-
role: ChatMessageRole;
|
|
1367
|
-
text?: string;
|
|
1368
|
-
reasoning?: string;
|
|
1369
|
-
images?: string[];
|
|
1370
|
-
files?: string[];
|
|
1371
|
-
tools?: Tool[];
|
|
1372
|
-
tool_calls?: ToolCall[];
|
|
1373
|
-
tool_call_id?: string;
|
|
1374
|
-
}
|
|
1375
585
|
export interface ChatDTO extends BaseModelDTO, PermissionModelDTO {
|
|
1376
586
|
parent_id?: string;
|
|
1377
587
|
parent?: ChatDTO;
|
|
@@ -1381,9 +591,6 @@ export interface ChatDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
1381
591
|
context?: {
|
|
1382
592
|
[key: string]: string;
|
|
1383
593
|
};
|
|
1384
|
-
/**
|
|
1385
|
-
* Agent version reference
|
|
1386
|
-
*/
|
|
1387
594
|
agent_id?: string;
|
|
1388
595
|
agent?: AgentDTO;
|
|
1389
596
|
agent_version_id?: string;
|
|
@@ -1393,6 +600,9 @@ export interface ChatDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
1393
600
|
chat_messages: ChatMessageDTO[];
|
|
1394
601
|
agent_data: ChatData;
|
|
1395
602
|
}
|
|
603
|
+
/**
|
|
604
|
+
* ChatMessageDTO for API responses
|
|
605
|
+
*/
|
|
1396
606
|
export interface ChatMessageDTO extends BaseModelDTO, PermissionModelDTO {
|
|
1397
607
|
chat_id: string;
|
|
1398
608
|
chat?: ChatDTO;
|
|
@@ -1405,9 +615,6 @@ export interface ChatMessageDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
1405
615
|
tool_call_id?: string;
|
|
1406
616
|
tool_invocations?: ToolInvocationDTO[];
|
|
1407
617
|
}
|
|
1408
|
-
export type StringEncodedMap = {
|
|
1409
|
-
[key: string]: any;
|
|
1410
|
-
};
|
|
1411
618
|
/**
|
|
1412
619
|
* SearchRequest represents a search request
|
|
1413
620
|
*/
|
|
@@ -1424,32 +631,6 @@ export interface Filter {
|
|
|
1424
631
|
operator: FilterOperator;
|
|
1425
632
|
value: any;
|
|
1426
633
|
}
|
|
1427
|
-
/**
|
|
1428
|
-
* FilterOperator represents the type of filter operation
|
|
1429
|
-
*/
|
|
1430
|
-
export type FilterOperator = string;
|
|
1431
|
-
export declare const OpEqual: FilterOperator;
|
|
1432
|
-
export declare const OpNotEqual: FilterOperator;
|
|
1433
|
-
export declare const OpIn: FilterOperator;
|
|
1434
|
-
export declare const OpNotIn: FilterOperator;
|
|
1435
|
-
export declare const OpGreater: FilterOperator;
|
|
1436
|
-
export declare const OpGreaterEqual: FilterOperator;
|
|
1437
|
-
export declare const OpLess: FilterOperator;
|
|
1438
|
-
export declare const OpLessEqual: FilterOperator;
|
|
1439
|
-
export declare const OpLike: FilterOperator;
|
|
1440
|
-
export declare const OpILike: FilterOperator;
|
|
1441
|
-
export declare const OpContains: FilterOperator;
|
|
1442
|
-
export declare const OpNotContains: FilterOperator;
|
|
1443
|
-
/**
|
|
1444
|
-
* Null checks
|
|
1445
|
-
*/
|
|
1446
|
-
export declare const OpIsNull: FilterOperator;
|
|
1447
|
-
export declare const OpIsNotNull: FilterOperator;
|
|
1448
|
-
/**
|
|
1449
|
-
* Empty checks (for strings)
|
|
1450
|
-
*/
|
|
1451
|
-
export declare const OpIsEmpty: FilterOperator;
|
|
1452
|
-
export declare const OpIsNotEmpty: FilterOperator;
|
|
1453
634
|
/**
|
|
1454
635
|
* SortOrder represents sorting configuration
|
|
1455
636
|
*/
|
|
@@ -1485,66 +666,67 @@ export interface CursorListResponse<T extends any> {
|
|
|
1485
666
|
items_per_page: number;
|
|
1486
667
|
total_items: number;
|
|
1487
668
|
}
|
|
1488
|
-
export type DeviceAuthStatus = string;
|
|
1489
|
-
export declare const DeviceAuthStatusPending: DeviceAuthStatus;
|
|
1490
|
-
export declare const DeviceAuthStatusApproved: DeviceAuthStatus;
|
|
1491
|
-
export declare const DeviceAuthStatusExpired: DeviceAuthStatus;
|
|
1492
|
-
export declare const DeviceAuthStatusDenied: DeviceAuthStatus;
|
|
1493
|
-
export declare const DeviceAuthStatusValid: DeviceAuthStatus;
|
|
1494
|
-
export declare const DeviceAuthStatusInvalid: DeviceAuthStatus;
|
|
1495
|
-
export declare const DeviceAuthStatusLoading: DeviceAuthStatus;
|
|
1496
669
|
/**
|
|
1497
|
-
*
|
|
670
|
+
* EngineConfig holds engine configuration (no gorm tags).
|
|
1498
671
|
*/
|
|
1499
|
-
export
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
672
|
+
export interface EngineConfig {
|
|
673
|
+
id: string;
|
|
674
|
+
name: string;
|
|
675
|
+
api_url: string;
|
|
676
|
+
engine_port: string;
|
|
677
|
+
workers: WorkerConfig;
|
|
678
|
+
api_key: string;
|
|
679
|
+
container_mode: boolean;
|
|
680
|
+
network_name: string;
|
|
681
|
+
cache_path: string;
|
|
682
|
+
gpus: string[];
|
|
683
|
+
callback_base_port: number;
|
|
684
|
+
engine_internal_api_url: string;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* WorkerGPUConfig defines GPU allocation for a worker.
|
|
688
|
+
*/
|
|
689
|
+
export interface WorkerGPUConfig {
|
|
690
|
+
gpus: any[];
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* WorkerCPUConfig defines CPU allocation for a worker.
|
|
694
|
+
*/
|
|
695
|
+
export interface WorkerCPUConfig {
|
|
696
|
+
count: number;
|
|
697
|
+
}
|
|
698
|
+
/**
|
|
699
|
+
* WorkerConfig defines how workers are allocated on an engine.
|
|
700
|
+
*/
|
|
701
|
+
export interface WorkerConfig {
|
|
702
|
+
gpu: WorkerGPUConfig[];
|
|
703
|
+
cpu: WorkerCPUConfig;
|
|
704
|
+
}
|
|
705
|
+
/**
|
|
706
|
+
* EngineDTO is the full API response for an engine.
|
|
707
|
+
*/
|
|
708
|
+
export interface EngineDTO extends BaseModelDTO, PermissionModelDTO {
|
|
709
|
+
instance?: InstanceDTO;
|
|
1507
710
|
config: EngineConfig;
|
|
1508
711
|
name: string;
|
|
1509
712
|
api_url: string;
|
|
1510
713
|
status: EngineStatus;
|
|
1511
714
|
system_info?: SystemInfo;
|
|
1512
|
-
workers: (
|
|
715
|
+
workers: (WorkerDTO | undefined)[];
|
|
1513
716
|
}
|
|
1514
|
-
|
|
1515
|
-
|
|
717
|
+
/**
|
|
718
|
+
* EngineSummary is a lightweight engine response embedded in tasks.
|
|
719
|
+
*/
|
|
720
|
+
export interface EngineSummary extends BaseModelDTO, PermissionModelDTO {
|
|
721
|
+
instance?: InstanceDTO;
|
|
1516
722
|
name: string;
|
|
1517
723
|
status: EngineStatus;
|
|
1518
|
-
workers: (
|
|
724
|
+
workers: (WorkerSummary | undefined)[];
|
|
1519
725
|
}
|
|
1520
726
|
/**
|
|
1521
|
-
*
|
|
727
|
+
* WorkerDTO is the full API response for a worker.
|
|
1522
728
|
*/
|
|
1523
|
-
export
|
|
1524
|
-
export interface WorkerGPU {
|
|
1525
|
-
id: string;
|
|
1526
|
-
worker_id: string;
|
|
1527
|
-
gpu_id: string;
|
|
1528
|
-
type: GPUType;
|
|
1529
|
-
name: string;
|
|
1530
|
-
vram: number;
|
|
1531
|
-
}
|
|
1532
|
-
export interface WorkerCPU {
|
|
1533
|
-
id: string;
|
|
1534
|
-
worker_id: string;
|
|
1535
|
-
name: string;
|
|
1536
|
-
vendor_id: string;
|
|
1537
|
-
family: string;
|
|
1538
|
-
model: string;
|
|
1539
|
-
cores: number;
|
|
1540
|
-
frequency: string;
|
|
1541
|
-
}
|
|
1542
|
-
export interface WorkerRAM {
|
|
1543
|
-
id: string;
|
|
1544
|
-
worker_id: string;
|
|
1545
|
-
total: number;
|
|
1546
|
-
}
|
|
1547
|
-
export interface WorkerStateDTO extends BaseModelDTO {
|
|
729
|
+
export interface WorkerDTO extends BaseModelDTO {
|
|
1548
730
|
user_id: string;
|
|
1549
731
|
team_id: string;
|
|
1550
732
|
index: number;
|
|
@@ -1554,13 +736,16 @@ export interface WorkerStateDTO extends BaseModelDTO {
|
|
|
1554
736
|
app_id: string;
|
|
1555
737
|
app_version_id: string;
|
|
1556
738
|
active_session_id?: string;
|
|
1557
|
-
gpus
|
|
1558
|
-
cpus
|
|
1559
|
-
rams
|
|
739
|
+
gpus?: WorkerGPU[];
|
|
740
|
+
cpus?: WorkerCPU[];
|
|
741
|
+
rams?: WorkerRAM[];
|
|
1560
742
|
system_info: SystemInfo;
|
|
1561
743
|
warm_apps?: string[];
|
|
1562
744
|
}
|
|
1563
|
-
|
|
745
|
+
/**
|
|
746
|
+
* WorkerSummary is a lightweight worker response.
|
|
747
|
+
*/
|
|
748
|
+
export interface WorkerSummary {
|
|
1564
749
|
id: string;
|
|
1565
750
|
user_id: string;
|
|
1566
751
|
index: number;
|
|
@@ -1571,9 +756,41 @@ export interface WorkerStateSummary {
|
|
|
1571
756
|
app_id: string;
|
|
1572
757
|
app_version_id: string;
|
|
1573
758
|
active_session_id?: string;
|
|
1574
|
-
gpus
|
|
1575
|
-
cpus
|
|
1576
|
-
rams
|
|
759
|
+
gpus?: WorkerGPU[];
|
|
760
|
+
cpus?: WorkerCPU[];
|
|
761
|
+
rams?: WorkerRAM[];
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* WorkerGPU describes a GPU attached to a worker (contract-only, no gorm).
|
|
765
|
+
*/
|
|
766
|
+
export interface WorkerGPU {
|
|
767
|
+
id: string;
|
|
768
|
+
worker_id: string;
|
|
769
|
+
gpu_id: string;
|
|
770
|
+
type: GPUType;
|
|
771
|
+
name: string;
|
|
772
|
+
vram: number;
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* WorkerCPU describes a CPU attached to a worker (contract-only, no gorm).
|
|
776
|
+
*/
|
|
777
|
+
export interface WorkerCPU {
|
|
778
|
+
id: string;
|
|
779
|
+
worker_id: string;
|
|
780
|
+
name: string;
|
|
781
|
+
vendor_id: string;
|
|
782
|
+
family: string;
|
|
783
|
+
model: string;
|
|
784
|
+
cores: number;
|
|
785
|
+
frequency: string;
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* WorkerRAM describes RAM attached to a worker (contract-only, no gorm).
|
|
789
|
+
*/
|
|
790
|
+
export interface WorkerRAM {
|
|
791
|
+
id: string;
|
|
792
|
+
worker_id: string;
|
|
793
|
+
total: number;
|
|
1577
794
|
}
|
|
1578
795
|
/**
|
|
1579
796
|
* FileMetadata holds probed media metadata cached on File records.
|
|
@@ -1588,7 +805,10 @@ export interface FileMetadata {
|
|
|
1588
805
|
channels?: number;
|
|
1589
806
|
codec?: string;
|
|
1590
807
|
}
|
|
1591
|
-
|
|
808
|
+
/**
|
|
809
|
+
* FileDTO for API responses
|
|
810
|
+
*/
|
|
811
|
+
export interface FileDTO extends BaseModelDTO, PermissionModelDTO {
|
|
1592
812
|
path: string;
|
|
1593
813
|
remote_path: string;
|
|
1594
814
|
upload_url: string;
|
|
@@ -1600,50 +820,9 @@ export interface FileDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
1600
820
|
rating: ContentRating;
|
|
1601
821
|
metadata?: FileMetadata;
|
|
1602
822
|
}
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
* After migration these will be populated from parent Flow
|
|
1607
|
-
*/
|
|
1608
|
-
user_id: string;
|
|
1609
|
-
user?: User;
|
|
1610
|
-
team_id: string;
|
|
1611
|
-
team?: Team;
|
|
1612
|
-
flow_id: string;
|
|
1613
|
-
/**
|
|
1614
|
-
* ConfigHash for deduplication - SHA256 of config content
|
|
1615
|
-
*/
|
|
1616
|
-
config_hash: string;
|
|
1617
|
-
/**
|
|
1618
|
-
* GraphVersion is an incrementing counter for optimistic locking on action-based edits
|
|
1619
|
-
*/
|
|
1620
|
-
graph_version: number;
|
|
1621
|
-
/**
|
|
1622
|
-
* Flow graph configuration
|
|
1623
|
-
*/
|
|
1624
|
-
input_schema: any;
|
|
1625
|
-
input: FlowRunInputs;
|
|
1626
|
-
output_schema: any;
|
|
1627
|
-
output_mappings: OutputMappings;
|
|
1628
|
-
node_data: FlowNodeDataMap;
|
|
1629
|
-
nodes: FlowNode[];
|
|
1630
|
-
edges: FlowEdge[];
|
|
1631
|
-
viewport?: FlowViewport;
|
|
1632
|
-
}
|
|
1633
|
-
export interface FlowViewport {
|
|
1634
|
-
x: number;
|
|
1635
|
-
y: number;
|
|
1636
|
-
zoom: number;
|
|
1637
|
-
}
|
|
1638
|
-
export interface FlowNode {
|
|
1639
|
-
id: string;
|
|
1640
|
-
type: string;
|
|
1641
|
-
position: FlowNodePosition;
|
|
1642
|
-
}
|
|
1643
|
-
export interface FlowNodePosition {
|
|
1644
|
-
x: number;
|
|
1645
|
-
y: number;
|
|
1646
|
-
}
|
|
823
|
+
/**
|
|
824
|
+
* FlowNodeData describes a node's data within a flow
|
|
825
|
+
*/
|
|
1647
826
|
export interface FlowNodeData {
|
|
1648
827
|
app?: AppDTO;
|
|
1649
828
|
app_id: string;
|
|
@@ -1656,50 +835,25 @@ export interface FlowNodeData {
|
|
|
1656
835
|
task?: TaskDTO;
|
|
1657
836
|
task_id?: string;
|
|
1658
837
|
}
|
|
838
|
+
/**
|
|
839
|
+
* FlowNodeDataMap maps node IDs to their data
|
|
840
|
+
*/
|
|
1659
841
|
export type FlowNodeDataMap = {
|
|
1660
842
|
[key: string]: FlowNodeData;
|
|
1661
843
|
};
|
|
1662
|
-
export interface FlowEdge {
|
|
1663
|
-
id: string;
|
|
1664
|
-
type: string;
|
|
1665
|
-
source: string;
|
|
1666
|
-
target: string;
|
|
1667
|
-
source_handle?: string;
|
|
1668
|
-
target_handle?: string;
|
|
1669
|
-
}
|
|
1670
|
-
/**
|
|
1671
|
-
* OutputFieldMapping represents a mapping from a source node's field to an output field in the flow output schema.
|
|
1672
|
-
*/
|
|
1673
|
-
export interface OutputFieldMapping {
|
|
1674
|
-
sourceNodeId: string;
|
|
1675
|
-
sourceFieldPath: string;
|
|
1676
|
-
outputFieldName: string;
|
|
1677
|
-
type: string;
|
|
1678
|
-
schema: any;
|
|
1679
|
-
}
|
|
1680
844
|
/**
|
|
1681
|
-
*
|
|
845
|
+
* FlowDTO for API responses
|
|
1682
846
|
*/
|
|
1683
|
-
export type OutputMappings = {
|
|
1684
|
-
[key: string]: OutputFieldMapping;
|
|
1685
|
-
};
|
|
1686
847
|
export interface FlowDTO extends BaseModelDTO, PermissionModelDTO {
|
|
1687
848
|
name: string;
|
|
1688
849
|
description: string;
|
|
1689
850
|
card_image: string;
|
|
1690
851
|
thumbnail: string;
|
|
1691
852
|
banner_image: string;
|
|
1692
|
-
/**
|
|
1693
|
-
* Version references
|
|
1694
|
-
*/
|
|
1695
853
|
draft_version_id: string;
|
|
1696
854
|
draft_version?: FlowVersionDTO;
|
|
1697
855
|
published_version_id: string;
|
|
1698
856
|
published_version?: FlowVersionDTO;
|
|
1699
|
-
/**
|
|
1700
|
-
* Flattened draft version fields for backward compatibility
|
|
1701
|
-
* These come from the draft version (the editable one)
|
|
1702
|
-
*/
|
|
1703
857
|
input_schema: any;
|
|
1704
858
|
input: FlowRunInputs;
|
|
1705
859
|
output_schema: any;
|
|
@@ -1709,6 +863,9 @@ export interface FlowDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
1709
863
|
edges: FlowEdge[];
|
|
1710
864
|
viewport?: FlowViewport;
|
|
1711
865
|
}
|
|
866
|
+
/**
|
|
867
|
+
* FlowVersionDTO for API responses
|
|
868
|
+
*/
|
|
1712
869
|
export interface FlowVersionDTO extends BaseModelDTO {
|
|
1713
870
|
graph_version: number;
|
|
1714
871
|
input_schema: any;
|
|
@@ -1720,17 +877,16 @@ export interface FlowVersionDTO extends BaseModelDTO {
|
|
|
1720
877
|
edges: FlowEdge[];
|
|
1721
878
|
viewport?: FlowViewport;
|
|
1722
879
|
}
|
|
880
|
+
/**
|
|
881
|
+
* NodeTaskDTO represents a node task reference
|
|
882
|
+
*/
|
|
1723
883
|
export interface NodeTaskDTO {
|
|
1724
884
|
task_id: string;
|
|
1725
885
|
task?: TaskDTO;
|
|
1726
886
|
}
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
export declare const FlowRunStatusRunning: FlowRunStatus;
|
|
1731
|
-
export declare const FlowRunStatusCompleted: FlowRunStatus;
|
|
1732
|
-
export declare const FlowRunStatusFailed: FlowRunStatus;
|
|
1733
|
-
export declare const FlowRunStatusCancelled: FlowRunStatus;
|
|
887
|
+
/**
|
|
888
|
+
* FlowRunDTO for API responses
|
|
889
|
+
*/
|
|
1734
890
|
export interface FlowRunDTO extends BaseModelDTO, PermissionModelDTO {
|
|
1735
891
|
flow_id: string;
|
|
1736
892
|
flow_version_id: string;
|
|
@@ -1748,56 +904,6 @@ export interface FlowRunDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
1748
904
|
[key: string]: NodeTaskDTO | undefined;
|
|
1749
905
|
};
|
|
1750
906
|
}
|
|
1751
|
-
/**
|
|
1752
|
-
* Connection represents a connection between nodes in a flow
|
|
1753
|
-
*/
|
|
1754
|
-
export interface FlowNodeConnection {
|
|
1755
|
-
nodeId: string;
|
|
1756
|
-
key: string;
|
|
1757
|
-
type: string;
|
|
1758
|
-
previousValue: any;
|
|
1759
|
-
}
|
|
1760
|
-
export type FlowRunInputs = {
|
|
1761
|
-
[key: string]: {
|
|
1762
|
-
[key: string]: FlowRunInput;
|
|
1763
|
-
};
|
|
1764
|
-
};
|
|
1765
|
-
export interface FlowRunInput {
|
|
1766
|
-
Connection?: FlowNodeConnection;
|
|
1767
|
-
Value: any;
|
|
1768
|
-
}
|
|
1769
|
-
export type GraphNodeType = string;
|
|
1770
|
-
export declare const GraphNodeTypeUnknown: GraphNodeType;
|
|
1771
|
-
export declare const GraphNodeTypeJoin: GraphNodeType;
|
|
1772
|
-
export declare const GraphNodeTypeSplit: GraphNodeType;
|
|
1773
|
-
export declare const GraphNodeTypeExecution: GraphNodeType;
|
|
1774
|
-
export declare const GraphNodeTypeResource: GraphNodeType;
|
|
1775
|
-
export declare const GraphNodeTypeApproval: GraphNodeType;
|
|
1776
|
-
export declare const GraphNodeTypeConditional: GraphNodeType;
|
|
1777
|
-
export declare const GraphNodeTypeFlowNode: GraphNodeType;
|
|
1778
|
-
/**
|
|
1779
|
-
* GraphNodeStatus represents the status of a node
|
|
1780
|
-
*/
|
|
1781
|
-
export type GraphNodeStatus = string;
|
|
1782
|
-
export declare const GraphNodeStatusPending: GraphNodeStatus;
|
|
1783
|
-
export declare const GraphNodeStatusReady: GraphNodeStatus;
|
|
1784
|
-
export declare const GraphNodeStatusRunning: GraphNodeStatus;
|
|
1785
|
-
export declare const GraphNodeStatusCompleted: GraphNodeStatus;
|
|
1786
|
-
export declare const GraphNodeStatusFailed: GraphNodeStatus;
|
|
1787
|
-
export declare const GraphNodeStatusCancelled: GraphNodeStatus;
|
|
1788
|
-
export declare const GraphNodeStatusSkipped: GraphNodeStatus;
|
|
1789
|
-
export declare const GraphNodeStatusBlocked: GraphNodeStatus;
|
|
1790
|
-
/**
|
|
1791
|
-
* GraphEdgeType defines the type of edge relationship
|
|
1792
|
-
*/
|
|
1793
|
-
export type GraphEdgeType = string;
|
|
1794
|
-
export declare const GraphEdgeTypeDependency: GraphEdgeType;
|
|
1795
|
-
export declare const GraphEdgeTypeFlow: GraphEdgeType;
|
|
1796
|
-
export declare const GraphEdgeTypeConditional: GraphEdgeType;
|
|
1797
|
-
export declare const GraphEdgeTypeExecution: GraphEdgeType;
|
|
1798
|
-
export declare const GraphEdgeTypeParent: GraphEdgeType;
|
|
1799
|
-
export declare const GraphEdgeTypeAncestor: GraphEdgeType;
|
|
1800
|
-
export declare const GraphEdgeTypeDuplicate: GraphEdgeType;
|
|
1801
907
|
/**
|
|
1802
908
|
* GraphNodeDTO is the API representation of a graph node
|
|
1803
909
|
*/
|
|
@@ -1829,41 +935,75 @@ export interface ChatTraceDTO {
|
|
|
1829
935
|
graph_id: string;
|
|
1830
936
|
nodes: (GraphNodeDTO | undefined)[];
|
|
1831
937
|
edges: (GraphEdgeDTO | undefined)[];
|
|
1832
|
-
/**
|
|
1833
|
-
* Summary stats
|
|
1834
|
-
*/
|
|
1835
938
|
total_steps: number;
|
|
1836
939
|
completed_steps: number;
|
|
1837
940
|
running_steps: number;
|
|
1838
941
|
failed_steps: number;
|
|
1839
942
|
}
|
|
1840
943
|
/**
|
|
1841
|
-
*
|
|
944
|
+
* InstanceDTO is the API representation of a cloud instance.
|
|
1842
945
|
*/
|
|
1843
|
-
export
|
|
946
|
+
export interface InstanceDTO extends BaseModelDTO, PermissionModelDTO {
|
|
947
|
+
cloud: InstanceCloudProvider;
|
|
948
|
+
name: string;
|
|
949
|
+
region: string;
|
|
950
|
+
shade_cloud: boolean;
|
|
951
|
+
shade_instance_type: string;
|
|
952
|
+
cloud_instance_type: string;
|
|
953
|
+
cloud_assigned_id: string;
|
|
954
|
+
os?: string;
|
|
955
|
+
ssh_key_id?: string;
|
|
956
|
+
ssh_user: string;
|
|
957
|
+
ssh_port: number;
|
|
958
|
+
ip: string;
|
|
959
|
+
status: InstanceStatus;
|
|
960
|
+
cost_estimate: string;
|
|
961
|
+
hourly_price: number;
|
|
962
|
+
template_id?: string;
|
|
963
|
+
volume_ids?: string[];
|
|
964
|
+
tags?: string[];
|
|
965
|
+
configuration?: any;
|
|
966
|
+
launch_configuration?: any;
|
|
967
|
+
auto_delete?: any;
|
|
968
|
+
alert?: any;
|
|
969
|
+
volume_mount?: any;
|
|
970
|
+
envs?: any;
|
|
971
|
+
}
|
|
1844
972
|
/**
|
|
1845
|
-
*
|
|
973
|
+
* InstanceTypeDTO is the API representation of a cloud instance type.
|
|
1846
974
|
*/
|
|
1847
|
-
export interface
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
975
|
+
export interface InstanceTypeDTO extends BaseModelDTO, PermissionModelDTO {
|
|
976
|
+
cloud: InstanceCloudProvider;
|
|
977
|
+
region: string;
|
|
978
|
+
shade_instance_type: string;
|
|
979
|
+
cloud_instance_type: string;
|
|
980
|
+
deployment_type: InstanceTypeDeploymentType;
|
|
981
|
+
hourly_price: number;
|
|
982
|
+
configuration?: InstanceTypeConfiguration;
|
|
983
|
+
availability: InstanceTypeAvailability[];
|
|
984
|
+
boot_time?: InstanceTypeBootTime;
|
|
985
|
+
}
|
|
986
|
+
export interface InstanceTypeConfiguration {
|
|
987
|
+
gpu_type: string;
|
|
988
|
+
interconnect: string;
|
|
989
|
+
memory_in_gb: number;
|
|
990
|
+
num_gpus: number;
|
|
991
|
+
os_options: string[];
|
|
992
|
+
storage_in_gb: number;
|
|
993
|
+
vcpus: number;
|
|
994
|
+
vram_per_gpu_in_gb: number;
|
|
995
|
+
}
|
|
996
|
+
export interface InstanceTypeAvailability {
|
|
997
|
+
available: boolean;
|
|
998
|
+
region: string;
|
|
999
|
+
}
|
|
1000
|
+
export interface InstanceTypeBootTime {
|
|
1001
|
+
average_seconds: number;
|
|
1002
|
+
updated_at: string;
|
|
1003
|
+
sample_size: number;
|
|
1864
1004
|
}
|
|
1865
1005
|
/**
|
|
1866
|
-
* KnowledgeFile represents a file in a knowledge entry
|
|
1006
|
+
* KnowledgeFile represents a file in a knowledge entry
|
|
1867
1007
|
*/
|
|
1868
1008
|
export interface KnowledgeFile {
|
|
1869
1009
|
path: string;
|
|
@@ -1872,7 +1012,62 @@ export interface KnowledgeFile {
|
|
|
1872
1012
|
hash: string;
|
|
1873
1013
|
content?: string;
|
|
1874
1014
|
}
|
|
1875
|
-
|
|
1015
|
+
/**
|
|
1016
|
+
* SkillDTO for API responses (backward-compatible naming)
|
|
1017
|
+
*/
|
|
1018
|
+
export interface SkillDTO extends BaseModelDTO, PermissionModelDTO {
|
|
1019
|
+
namespace: string;
|
|
1020
|
+
name: string;
|
|
1021
|
+
description: string;
|
|
1022
|
+
repo_url?: string;
|
|
1023
|
+
version_id: string;
|
|
1024
|
+
version?: SkillVersionDTO;
|
|
1025
|
+
}
|
|
1026
|
+
export interface SkillVersionDTO extends BaseModelDTO {
|
|
1027
|
+
skill_id: string;
|
|
1028
|
+
instructions: KnowledgeFile;
|
|
1029
|
+
files: KnowledgeFile[];
|
|
1030
|
+
content_hash: string;
|
|
1031
|
+
description: string;
|
|
1032
|
+
tags: string[];
|
|
1033
|
+
allowed_tools?: string;
|
|
1034
|
+
compatibility?: string;
|
|
1035
|
+
license?: string;
|
|
1036
|
+
source_url?: string;
|
|
1037
|
+
mutation_type?: string;
|
|
1038
|
+
version_notes?: string;
|
|
1039
|
+
disable_model_invocation?: boolean;
|
|
1040
|
+
user_invocable?: boolean;
|
|
1041
|
+
context?: string;
|
|
1042
|
+
metadata?: {
|
|
1043
|
+
[key: string]: string;
|
|
1044
|
+
};
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* SkillLineageResponse is returned by the lineage endpoint.
|
|
1048
|
+
*/
|
|
1049
|
+
export interface SkillLineageResponse {
|
|
1050
|
+
skill: SkillLineageSkillRef;
|
|
1051
|
+
parents: SkillLineageSkillRef[];
|
|
1052
|
+
siblings: SkillLineageSkillRef[];
|
|
1053
|
+
forks: SkillLineageSkillRef[];
|
|
1054
|
+
duplicates: SkillLineageSkillRef[];
|
|
1055
|
+
fork_depth: number;
|
|
1056
|
+
}
|
|
1057
|
+
/**
|
|
1058
|
+
* SkillLineageSkillRef is a compact skill reference for lineage responses.
|
|
1059
|
+
*/
|
|
1060
|
+
export interface SkillLineageSkillRef {
|
|
1061
|
+
id: string;
|
|
1062
|
+
namespace: string;
|
|
1063
|
+
name: string;
|
|
1064
|
+
version_count?: number;
|
|
1065
|
+
parent_version_id?: string;
|
|
1066
|
+
versions_since_fork?: number;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* PublicSkillStoreDTO for public skill store display
|
|
1070
|
+
*/
|
|
1876
1071
|
export interface PublicSkillStoreDTO {
|
|
1877
1072
|
id: string;
|
|
1878
1073
|
category: string;
|
|
@@ -1884,41 +1079,34 @@ export interface PublicSkillStoreDTO {
|
|
|
1884
1079
|
rank: number;
|
|
1885
1080
|
has_approved_version: boolean;
|
|
1886
1081
|
}
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
export
|
|
1891
|
-
|
|
1082
|
+
/**
|
|
1083
|
+
* SkillStoreListingDTO for API responses
|
|
1084
|
+
*/
|
|
1085
|
+
export interface SkillStoreListingDTO {
|
|
1086
|
+
id: string;
|
|
1087
|
+
created_at: string;
|
|
1088
|
+
updated_at: string;
|
|
1089
|
+
deleted_at?: string;
|
|
1090
|
+
category: string;
|
|
1091
|
+
is_featured: boolean;
|
|
1092
|
+
rank: number;
|
|
1093
|
+
installs: number;
|
|
1094
|
+
uses: number;
|
|
1095
|
+
tags?: string[];
|
|
1096
|
+
}
|
|
1097
|
+
/**
|
|
1098
|
+
* PageMetadata holds metadata for a page
|
|
1099
|
+
*/
|
|
1892
1100
|
export interface PageMetadata {
|
|
1893
1101
|
title: string;
|
|
1894
1102
|
description: string;
|
|
1895
1103
|
image: string;
|
|
1896
1104
|
tags: string[];
|
|
1897
|
-
/**
|
|
1898
|
-
* Docs-specific fields
|
|
1899
|
-
*/
|
|
1900
1105
|
order?: number;
|
|
1901
1106
|
type?: string;
|
|
1902
1107
|
icon?: string;
|
|
1903
1108
|
hide_from_nav?: boolean;
|
|
1904
1109
|
}
|
|
1905
|
-
/**
|
|
1906
|
-
* PageType represents the type of page content
|
|
1907
|
-
*/
|
|
1908
|
-
export type PageType = string;
|
|
1909
|
-
export declare const PageTypeDoc: PageType;
|
|
1910
|
-
export declare const PageTypeBlog: PageType;
|
|
1911
|
-
export declare const PageTypePage: PageType;
|
|
1912
|
-
export interface PageDTO extends BaseModelDTO, PermissionModelDTO {
|
|
1913
|
-
is_featured: boolean;
|
|
1914
|
-
title: string;
|
|
1915
|
-
content: string;
|
|
1916
|
-
excerpt: string;
|
|
1917
|
-
status: PageStatus;
|
|
1918
|
-
type: PageType;
|
|
1919
|
-
metadata: PageMetadata;
|
|
1920
|
-
slug: string;
|
|
1921
|
-
}
|
|
1922
1110
|
/**
|
|
1923
1111
|
* MenuItem represents an item in a menu (can be nested)
|
|
1924
1112
|
*/
|
|
@@ -1934,6 +1122,22 @@ export interface MenuItem {
|
|
|
1934
1122
|
expanded?: boolean;
|
|
1935
1123
|
children?: MenuItem[];
|
|
1936
1124
|
}
|
|
1125
|
+
/**
|
|
1126
|
+
* PageDTO for API responses
|
|
1127
|
+
*/
|
|
1128
|
+
export interface PageDTO extends BaseModelDTO, PermissionModelDTO {
|
|
1129
|
+
is_featured: boolean;
|
|
1130
|
+
title: string;
|
|
1131
|
+
content: string;
|
|
1132
|
+
excerpt: string;
|
|
1133
|
+
status: PageStatus;
|
|
1134
|
+
type: PageType;
|
|
1135
|
+
metadata: PageMetadata;
|
|
1136
|
+
slug: string;
|
|
1137
|
+
}
|
|
1138
|
+
/**
|
|
1139
|
+
* MenuDTO for API responses
|
|
1140
|
+
*/
|
|
1937
1141
|
export interface MenuDTO extends BaseModelDTO, PermissionModelDTO {
|
|
1938
1142
|
name: string;
|
|
1939
1143
|
slug: string;
|
|
@@ -1941,40 +1145,12 @@ export interface MenuDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
1941
1145
|
items: MenuItem[];
|
|
1942
1146
|
}
|
|
1943
1147
|
/**
|
|
1944
|
-
*
|
|
1148
|
+
* ProjectModelDTO provides optional project association for DTOs
|
|
1945
1149
|
*/
|
|
1946
|
-
export type ProjectType = string;
|
|
1947
|
-
export declare const ProjectTypeAgent: ProjectType;
|
|
1948
|
-
export declare const ProjectTypeApp: ProjectType;
|
|
1949
|
-
export declare const ProjectTypeFlow: ProjectType;
|
|
1950
|
-
export declare const ProjectTypeOther: ProjectType;
|
|
1951
|
-
/**
|
|
1952
|
-
* ProjectModel provides optional project association for models
|
|
1953
|
-
*/
|
|
1954
|
-
export interface ProjectModel {
|
|
1955
|
-
project_id?: string;
|
|
1956
|
-
project?: Project;
|
|
1957
|
-
}
|
|
1958
1150
|
export interface ProjectModelDTO {
|
|
1959
1151
|
project_id?: string;
|
|
1960
1152
|
project?: ProjectDTO;
|
|
1961
1153
|
}
|
|
1962
|
-
/**
|
|
1963
|
-
* Project represents a container for organizing related resources
|
|
1964
|
-
*/
|
|
1965
|
-
export interface Project extends BaseModel, PermissionModel {
|
|
1966
|
-
name: string;
|
|
1967
|
-
description: string;
|
|
1968
|
-
type: ProjectType;
|
|
1969
|
-
color?: string;
|
|
1970
|
-
icon?: string;
|
|
1971
|
-
/**
|
|
1972
|
-
* For future: nested folders/projects
|
|
1973
|
-
*/
|
|
1974
|
-
parent_id?: string;
|
|
1975
|
-
parent?: Project;
|
|
1976
|
-
children: (Project | undefined)[];
|
|
1977
|
-
}
|
|
1978
1154
|
/**
|
|
1979
1155
|
* ProjectDTO for API responses
|
|
1980
1156
|
*/
|
|
@@ -1988,44 +1164,6 @@ export interface ProjectDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
1988
1164
|
parent?: ProjectDTO;
|
|
1989
1165
|
children: (ProjectDTO | undefined)[];
|
|
1990
1166
|
}
|
|
1991
|
-
export type ContentRating = string;
|
|
1992
|
-
export declare const ContentSafe: ContentRating;
|
|
1993
|
-
/**
|
|
1994
|
-
* sexual content
|
|
1995
|
-
*/
|
|
1996
|
-
export declare const ContentSexualSuggestive: ContentRating;
|
|
1997
|
-
export declare const ContentSexualExplicit: ContentRating;
|
|
1998
|
-
/**
|
|
1999
|
-
* violence
|
|
2000
|
-
*/
|
|
2001
|
-
export declare const ContentViolenceNonGraphic: ContentRating;
|
|
2002
|
-
export declare const ContentViolenceGraphic: ContentRating;
|
|
2003
|
-
/**
|
|
2004
|
-
* gore
|
|
2005
|
-
*/
|
|
2006
|
-
export declare const ContentGore: ContentRating;
|
|
2007
|
-
/**
|
|
2008
|
-
* other regulated content
|
|
2009
|
-
*/
|
|
2010
|
-
export declare const ContentDrugs: ContentRating;
|
|
2011
|
-
export declare const ContentSelfHarm: ContentRating;
|
|
2012
|
-
export declare const ContentUnrated: ContentRating;
|
|
2013
|
-
/**
|
|
2014
|
-
* SecretRequirement defines a secret that an app requires to run
|
|
2015
|
-
*/
|
|
2016
|
-
export interface SecretRequirement {
|
|
2017
|
-
key: string;
|
|
2018
|
-
description?: string;
|
|
2019
|
-
optional?: boolean;
|
|
2020
|
-
}
|
|
2021
|
-
/**
|
|
2022
|
-
* IntegrationRequirement defines an integration capability that an app requires
|
|
2023
|
-
*/
|
|
2024
|
-
export interface IntegrationRequirement {
|
|
2025
|
-
key: string;
|
|
2026
|
-
description?: string;
|
|
2027
|
-
optional?: boolean;
|
|
2028
|
-
}
|
|
2029
1167
|
/**
|
|
2030
1168
|
* RequirementError represents a single missing requirement with actionable info
|
|
2031
1169
|
*/
|
|
@@ -2043,94 +1181,13 @@ export interface SetupAction {
|
|
|
2043
1181
|
provider?: string;
|
|
2044
1182
|
scopes?: string[];
|
|
2045
1183
|
}
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
export
|
|
2053
|
-
export declare const CloudJarvisLabs: InstanceCloudProvider;
|
|
2054
|
-
export declare const CloudOblivus: InstanceCloudProvider;
|
|
2055
|
-
export declare const CloudPaperspace: InstanceCloudProvider;
|
|
2056
|
-
export declare const CloudDatacrunch: InstanceCloudProvider;
|
|
2057
|
-
export declare const CloudMassedCompute: InstanceCloudProvider;
|
|
2058
|
-
export declare const CloudVultr: InstanceCloudProvider;
|
|
2059
|
-
export declare const CloudShade: InstanceCloudProvider;
|
|
2060
|
-
export type InstanceStatus = string;
|
|
2061
|
-
export declare const InstanceStatusPending: InstanceStatus;
|
|
2062
|
-
export declare const InstanceStatusActive: InstanceStatus;
|
|
2063
|
-
export declare const InstanceStatusDeleted: InstanceStatus;
|
|
2064
|
-
export interface Instance extends BaseModel, PermissionModel {
|
|
2065
|
-
cloud: InstanceCloudProvider;
|
|
2066
|
-
name: string;
|
|
2067
|
-
region: string;
|
|
2068
|
-
shade_cloud: boolean;
|
|
2069
|
-
shade_instance_type: string;
|
|
2070
|
-
cloud_instance_type: string;
|
|
2071
|
-
cloud_assigned_id: string;
|
|
2072
|
-
os?: string;
|
|
2073
|
-
ssh_key_id?: string;
|
|
2074
|
-
ssh_user: string;
|
|
2075
|
-
ssh_port: number;
|
|
2076
|
-
ip: string;
|
|
2077
|
-
status: InstanceStatus;
|
|
2078
|
-
cost_estimate: string;
|
|
2079
|
-
hourly_price: number;
|
|
2080
|
-
template_id?: string;
|
|
2081
|
-
volume_ids?: string[];
|
|
2082
|
-
tags?: string[];
|
|
2083
|
-
configuration?: InstanceConfiguration;
|
|
2084
|
-
launch_configuration?: InstanceLaunchConfiguration;
|
|
2085
|
-
auto_delete?: InstanceThresholdConfig;
|
|
2086
|
-
alert?: InstanceThresholdConfig;
|
|
2087
|
-
volume_mount?: InstanceVolumeMountConfig;
|
|
2088
|
-
envs?: InstanceEnvVar[];
|
|
2089
|
-
}
|
|
2090
|
-
export interface InstanceConfiguration {
|
|
2091
|
-
gpu_type: string;
|
|
2092
|
-
interconnect: string;
|
|
2093
|
-
memory_in_gb: number;
|
|
2094
|
-
num_gpus: number;
|
|
2095
|
-
os: string;
|
|
2096
|
-
storage_in_gb: number;
|
|
2097
|
-
vcpus: number;
|
|
2098
|
-
vram_per_gpu_in_gb: number;
|
|
2099
|
-
}
|
|
2100
|
-
export interface InstanceLaunchConfiguration {
|
|
2101
|
-
type: string;
|
|
2102
|
-
docker_configuration?: InstanceDockerConfig;
|
|
2103
|
-
script_configuration?: InstanceScriptConfig;
|
|
2104
|
-
}
|
|
2105
|
-
export interface InstanceDockerConfig {
|
|
2106
|
-
image: string;
|
|
2107
|
-
args?: string;
|
|
2108
|
-
shared_memory_in_gb?: number;
|
|
2109
|
-
envs?: InstanceEnvVar[];
|
|
2110
|
-
port_mappings?: InstancePortMapping[];
|
|
2111
|
-
volume_mounts?: InstanceVolumeMount[];
|
|
2112
|
-
}
|
|
2113
|
-
export interface InstanceScriptConfig {
|
|
2114
|
-
base64_script: string;
|
|
2115
|
-
}
|
|
2116
|
-
export interface InstancePortMapping {
|
|
2117
|
-
host_port: number;
|
|
2118
|
-
container_port: number;
|
|
2119
|
-
}
|
|
2120
|
-
export interface InstanceVolumeMount {
|
|
2121
|
-
host_path: string;
|
|
2122
|
-
container_path: string;
|
|
2123
|
-
}
|
|
2124
|
-
export interface InstanceThresholdConfig {
|
|
2125
|
-
date_threshold?: string;
|
|
2126
|
-
spend_threshold?: string;
|
|
2127
|
-
}
|
|
2128
|
-
export interface InstanceVolumeMountConfig {
|
|
2129
|
-
auto: boolean;
|
|
2130
|
-
}
|
|
2131
|
-
export interface InstanceEnvVar {
|
|
2132
|
-
name: string;
|
|
2133
|
-
value: string;
|
|
1184
|
+
/**
|
|
1185
|
+
* SDKTypes is a phantom type for gotypegen dependency tracing.
|
|
1186
|
+
* Types listed here (and their transitive dependencies) are included
|
|
1187
|
+
* in the generated SDK output (TypeScript, Python, Go).
|
|
1188
|
+
* To expose a type to SDK consumers: reference it in this struct.
|
|
1189
|
+
*/
|
|
1190
|
+
export interface SDKTypes {
|
|
2134
1191
|
}
|
|
2135
1192
|
/**
|
|
2136
1193
|
* Hardware/System related types
|
|
@@ -2229,7 +1286,7 @@ export interface CachedRepoInfo {
|
|
|
2229
1286
|
size_on_disk_str: string;
|
|
2230
1287
|
nb_files: number;
|
|
2231
1288
|
refs: string[];
|
|
2232
|
-
|
|
1289
|
+
revisions: CachedRevisionInfo[];
|
|
2233
1290
|
}
|
|
2234
1291
|
/**
|
|
2235
1292
|
* HFCacheInfo represents information about the Huggingface cache
|
|
@@ -2241,47 +1298,9 @@ export interface HFCacheInfo {
|
|
|
2241
1298
|
warnings: string[];
|
|
2242
1299
|
}
|
|
2243
1300
|
/**
|
|
2244
|
-
*
|
|
2245
|
-
*
|
|
2246
|
-
* - Stored as int in DB for compact storage. New statuses can be added with any int value.
|
|
2247
|
-
* - Logical ordering is defined by statusOrder map, NOT by the int values.
|
|
2248
|
-
* - To add a new status: add const with next available int, add to statusOrder at correct position.
|
|
2249
|
-
* - SQL queries use explicit lists (IN, NOT IN) via helper functions, not range comparisons.
|
|
2250
|
-
* - This design allows future migration to string-based storage without breaking changes.
|
|
2251
|
-
*/
|
|
2252
|
-
export type TaskStatus = number;
|
|
2253
|
-
export declare const TaskStatusUnknown: TaskStatus;
|
|
2254
|
-
export declare const TaskStatusReceived: TaskStatus;
|
|
2255
|
-
export declare const TaskStatusQueued: TaskStatus;
|
|
2256
|
-
export declare const TaskStatusDispatched: TaskStatus;
|
|
2257
|
-
export declare const TaskStatusPreparing: TaskStatus;
|
|
2258
|
-
export declare const TaskStatusServing: TaskStatus;
|
|
2259
|
-
export declare const TaskStatusSettingUp: TaskStatus;
|
|
2260
|
-
export declare const TaskStatusRunning: TaskStatus;
|
|
2261
|
-
export declare const TaskStatusCancelling: TaskStatus;
|
|
2262
|
-
export declare const TaskStatusUploading: TaskStatus;
|
|
2263
|
-
export declare const TaskStatusCompleted: TaskStatus;
|
|
2264
|
-
export declare const TaskStatusFailed: TaskStatus;
|
|
2265
|
-
export declare const TaskStatusCancelled: TaskStatus;
|
|
2266
|
-
export type Infra = string;
|
|
2267
|
-
export declare const InfraPrivate: Infra;
|
|
2268
|
-
export declare const InfraCloud: Infra;
|
|
2269
|
-
export declare const InfraPrivateFirst: Infra;
|
|
2270
|
-
/**
|
|
2271
|
-
* TaskAction defines an action to execute when a task reaches a specific status.
|
|
2272
|
-
* Used by the action projector to trigger side effects (e.g., updating app covers).
|
|
2273
|
-
*/
|
|
2274
|
-
export interface TaskAction {
|
|
2275
|
-
key: string;
|
|
2276
|
-
on: string;
|
|
2277
|
-
params?: any;
|
|
2278
|
-
}
|
|
2279
|
-
/**
|
|
2280
|
-
* TaskMetadata holds optional metadata attached to a task.
|
|
1301
|
+
* TaskEvent represents a single status transition event.
|
|
1302
|
+
* Duplicated here (no gorm tags) so DTOs can reference it without importing models.
|
|
2281
1303
|
*/
|
|
2282
|
-
export interface TaskMetadata {
|
|
2283
|
-
action?: TaskAction;
|
|
2284
|
-
}
|
|
2285
1304
|
export interface TaskEvent {
|
|
2286
1305
|
id: string;
|
|
2287
1306
|
created_at: string;
|
|
@@ -2289,12 +1308,9 @@ export interface TaskEvent {
|
|
|
2289
1308
|
task_id: string;
|
|
2290
1309
|
status: TaskStatus;
|
|
2291
1310
|
}
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
export declare const TaskLogTypeServe: TaskLogType;
|
|
2296
|
-
export declare const TaskLogTypeSetup: TaskLogType;
|
|
2297
|
-
export declare const TaskLogTypeTask: TaskLogType;
|
|
1311
|
+
/**
|
|
1312
|
+
* TaskLog represents a single log entry for a task.
|
|
1313
|
+
*/
|
|
2298
1314
|
export interface TaskLog {
|
|
2299
1315
|
id: string;
|
|
2300
1316
|
created_at: string;
|
|
@@ -2303,6 +1319,9 @@ export interface TaskLog {
|
|
|
2303
1319
|
log_type: TaskLogType;
|
|
2304
1320
|
content: string;
|
|
2305
1321
|
}
|
|
1322
|
+
/**
|
|
1323
|
+
* TaskDTO is the full API response for a task.
|
|
1324
|
+
*/
|
|
2306
1325
|
export interface TaskDTO extends BaseModelDTO, PermissionModelDTO {
|
|
2307
1326
|
graph_id?: string;
|
|
2308
1327
|
user_public_key: string;
|
|
@@ -2324,9 +1343,9 @@ export interface TaskDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
2324
1343
|
agent_version_id?: string;
|
|
2325
1344
|
agent?: AgentDTO;
|
|
2326
1345
|
engine_id?: string;
|
|
2327
|
-
engine?:
|
|
1346
|
+
engine?: EngineSummary;
|
|
2328
1347
|
worker_id?: string;
|
|
2329
|
-
worker?:
|
|
1348
|
+
worker?: WorkerSummary;
|
|
2330
1349
|
run_at?: string;
|
|
2331
1350
|
webhook?: string;
|
|
2332
1351
|
setup?: any;
|
|
@@ -2336,51 +1355,12 @@ export interface TaskDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
2336
1355
|
rating: ContentRating;
|
|
2337
1356
|
events: TaskEvent[];
|
|
2338
1357
|
logs: TaskLog[];
|
|
2339
|
-
usage_events: (
|
|
1358
|
+
usage_events: (UsageEventDTO | undefined)[];
|
|
2340
1359
|
session_id?: string;
|
|
2341
1360
|
session_timeout?: number;
|
|
2342
1361
|
}
|
|
2343
|
-
export type TeamType = string;
|
|
2344
|
-
export declare const TeamTypePersonal: TeamType;
|
|
2345
|
-
export declare const TeamTypeTeam: TeamType;
|
|
2346
|
-
export declare const TeamTypeSystem: TeamType;
|
|
2347
|
-
export type TeamStatus = string;
|
|
2348
|
-
export declare const TeamStatusActive: TeamStatus;
|
|
2349
|
-
export declare const TeamStatusSuspended: TeamStatus;
|
|
2350
|
-
export declare const TeamStatusTerminated: TeamStatus;
|
|
2351
|
-
export interface Team extends BaseModel {
|
|
2352
|
-
type: TeamType;
|
|
2353
|
-
username: string;
|
|
2354
|
-
email: string;
|
|
2355
|
-
name: string;
|
|
2356
|
-
avatar_url: string;
|
|
2357
|
-
/**
|
|
2358
|
-
* SetupCompleted indicates whether the team has completed initial setup (chosen a username)
|
|
2359
|
-
* Personal teams start with SetupCompleted=false and a generated temporary username
|
|
2360
|
-
*/
|
|
2361
|
-
setup_completed: boolean;
|
|
2362
|
-
/**
|
|
2363
|
-
* MaxConcurrency limits total active tasks for this team (0 = use default)
|
|
2364
|
-
*/
|
|
2365
|
-
max_concurrency: number;
|
|
2366
|
-
status: TeamStatus;
|
|
2367
|
-
}
|
|
2368
|
-
export interface TeamDTO extends BaseModelDTO {
|
|
2369
|
-
type: TeamType;
|
|
2370
|
-
name: string;
|
|
2371
|
-
username: string;
|
|
2372
|
-
avatar_url: string;
|
|
2373
|
-
email: string;
|
|
2374
|
-
setup_completed: boolean;
|
|
2375
|
-
max_concurrency: number;
|
|
2376
|
-
status: TeamStatus;
|
|
2377
|
-
}
|
|
2378
|
-
export type TeamRole = string;
|
|
2379
|
-
export declare const TeamRoleOwner: TeamRole;
|
|
2380
|
-
export declare const TeamRoleAdmin: TeamRole;
|
|
2381
|
-
export declare const TeamRoleMember: TeamRole;
|
|
2382
1362
|
/**
|
|
2383
|
-
*
|
|
1363
|
+
* TeamRelationDTO is a lightweight team reference embedded in other DTOs.
|
|
2384
1364
|
*/
|
|
2385
1365
|
export interface TeamRelationDTO {
|
|
2386
1366
|
id: string;
|
|
@@ -2398,17 +1378,6 @@ export interface ToolInvocationFunction {
|
|
|
2398
1378
|
name: string;
|
|
2399
1379
|
arguments: StringEncodedMap;
|
|
2400
1380
|
}
|
|
2401
|
-
/**
|
|
2402
|
-
* ToolInvocationStatus represents the execution status of a tool invocation
|
|
2403
|
-
*/
|
|
2404
|
-
export type ToolInvocationStatus = string;
|
|
2405
|
-
export declare const ToolInvocationStatusPending: ToolInvocationStatus;
|
|
2406
|
-
export declare const ToolInvocationStatusInProgress: ToolInvocationStatus;
|
|
2407
|
-
export declare const ToolInvocationStatusAwaitingInput: ToolInvocationStatus;
|
|
2408
|
-
export declare const ToolInvocationStatusAwaitingApproval: ToolInvocationStatus;
|
|
2409
|
-
export declare const ToolInvocationStatusCompleted: ToolInvocationStatus;
|
|
2410
|
-
export declare const ToolInvocationStatusFailed: ToolInvocationStatus;
|
|
2411
|
-
export declare const ToolInvocationStatusCancelled: ToolInvocationStatus;
|
|
2412
1381
|
/**
|
|
2413
1382
|
* ToolInvocationDTO for API responses
|
|
2414
1383
|
*/
|
|
@@ -2421,49 +1390,16 @@ export interface ToolInvocationDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
2421
1390
|
function: ToolInvocationFunction;
|
|
2422
1391
|
status: ToolInvocationStatus;
|
|
2423
1392
|
result?: string;
|
|
2424
|
-
/**
|
|
2425
|
-
* Unified fields
|
|
2426
|
-
*/
|
|
2427
1393
|
data?: any;
|
|
2428
1394
|
widget?: Widget;
|
|
2429
1395
|
}
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
export interface ToolFunction {
|
|
2435
|
-
name: string;
|
|
2436
|
-
description: string;
|
|
2437
|
-
parameters?: ToolParameters;
|
|
2438
|
-
required?: string[];
|
|
2439
|
-
}
|
|
2440
|
-
export interface ToolParameters {
|
|
2441
|
-
type: string;
|
|
2442
|
-
title: string;
|
|
2443
|
-
properties?: ToolParameterProperties;
|
|
2444
|
-
required?: string[];
|
|
2445
|
-
}
|
|
2446
|
-
export type ToolParameterProperties = {
|
|
2447
|
-
[key: string]: ToolParameterProperty;
|
|
2448
|
-
};
|
|
2449
|
-
export interface ToolParameterProperty {
|
|
2450
|
-
type: string;
|
|
2451
|
-
title: string;
|
|
2452
|
-
description: string;
|
|
2453
|
-
properties?: ToolParameterProperties;
|
|
2454
|
-
items?: ToolParameterProperty;
|
|
2455
|
-
required?: string[];
|
|
2456
|
-
}
|
|
2457
|
-
export type UsageEventResourceTier = string;
|
|
2458
|
-
export declare const UsageEventResourceTierPrivate: UsageEventResourceTier;
|
|
2459
|
-
export declare const UsageEventResourceTierCloud: UsageEventResourceTier;
|
|
2460
|
-
export interface UsageEvent extends BaseModel, PermissionModel {
|
|
1396
|
+
/**
|
|
1397
|
+
* UsageEventDTO is the API representation of a usage event.
|
|
1398
|
+
*/
|
|
1399
|
+
export interface UsageEventDTO extends BaseModelDTO, PermissionModelDTO {
|
|
2461
1400
|
usage_billing_record_id: string;
|
|
2462
1401
|
reference_id: string;
|
|
2463
1402
|
resource_id: string;
|
|
2464
|
-
/**
|
|
2465
|
-
* Resource tier
|
|
2466
|
-
*/
|
|
2467
1403
|
tier: UsageEventResourceTier;
|
|
2468
1404
|
type: string;
|
|
2469
1405
|
model: string;
|
|
@@ -2471,35 +1407,7 @@ export interface UsageEvent extends BaseModel, PermissionModel {
|
|
|
2471
1407
|
unit: string;
|
|
2472
1408
|
}
|
|
2473
1409
|
/**
|
|
2474
|
-
*
|
|
2475
|
-
*/
|
|
2476
|
-
export interface User {
|
|
2477
|
-
BaseModel: BaseModel;
|
|
2478
|
-
default_team_id: string;
|
|
2479
|
-
role: Role;
|
|
2480
|
-
email: string;
|
|
2481
|
-
email_verified: boolean;
|
|
2482
|
-
name: string;
|
|
2483
|
-
full_name: string;
|
|
2484
|
-
avatar_url: string;
|
|
2485
|
-
metadata: UserMetadata;
|
|
2486
|
-
}
|
|
2487
|
-
export type Role = string;
|
|
2488
|
-
export declare const RoleGuest: Role;
|
|
2489
|
-
export declare const RoleUser: Role;
|
|
2490
|
-
export declare const RoleAdmin: Role;
|
|
2491
|
-
export declare const RoleSystem: Role;
|
|
2492
|
-
export interface UserDTO extends BaseModelDTO {
|
|
2493
|
-
default_team_id: string;
|
|
2494
|
-
role: Role;
|
|
2495
|
-
email: string;
|
|
2496
|
-
name: string;
|
|
2497
|
-
full_name: string;
|
|
2498
|
-
avatar_url: string;
|
|
2499
|
-
metadata: UserMetadata;
|
|
2500
|
-
}
|
|
2501
|
-
/**
|
|
2502
|
-
* User-related types
|
|
1410
|
+
* UserRelationDTO is a lightweight user reference embedded in other DTOs.
|
|
2503
1411
|
*/
|
|
2504
1412
|
export interface UserRelationDTO {
|
|
2505
1413
|
id: string;
|
|
@@ -2508,14 +1416,6 @@ export interface UserRelationDTO {
|
|
|
2508
1416
|
role: Role;
|
|
2509
1417
|
avatar_url: string;
|
|
2510
1418
|
}
|
|
2511
|
-
export interface UserMetadata {
|
|
2512
|
-
user_id: string;
|
|
2513
|
-
completed_onboarding: boolean;
|
|
2514
|
-
use_case: string;
|
|
2515
|
-
use_case_reason: string;
|
|
2516
|
-
use_case_privacy: string;
|
|
2517
|
-
signup_source: string;
|
|
2518
|
-
}
|
|
2519
1419
|
/**
|
|
2520
1420
|
* WidgetAction represents an action triggered by a widget button
|
|
2521
1421
|
*/
|
|
@@ -2534,57 +1434,7 @@ export interface WidgetActionButton {
|
|
|
2534
1434
|
variant?: string;
|
|
2535
1435
|
}
|
|
2536
1436
|
/**
|
|
2537
|
-
*
|
|
2538
|
-
* Primitives (literal values): text, markdown, image, badge, button, input, select, checkbox, row, col
|
|
2539
|
-
* Data-bound (read from ToolInvocation.Data): plan-list, key-value, status-badge
|
|
2540
|
-
*/
|
|
2541
|
-
export type WidgetNodeType = string;
|
|
2542
|
-
/**
|
|
2543
|
-
* Primitive node types (render literal values)
|
|
2544
|
-
*/
|
|
2545
|
-
export declare const WidgetNodeTypeText: WidgetNodeType;
|
|
2546
|
-
export declare const WidgetNodeTypeMarkdown: WidgetNodeType;
|
|
2547
|
-
export declare const WidgetNodeTypeImage: WidgetNodeType;
|
|
2548
|
-
export declare const WidgetNodeTypeBadge: WidgetNodeType;
|
|
2549
|
-
export declare const WidgetNodeTypeButton: WidgetNodeType;
|
|
2550
|
-
export declare const WidgetNodeTypeInput: WidgetNodeType;
|
|
2551
|
-
export declare const WidgetNodeTypeSelect: WidgetNodeType;
|
|
2552
|
-
export declare const WidgetNodeTypeCheckbox: WidgetNodeType;
|
|
2553
|
-
export declare const WidgetNodeTypeRow: WidgetNodeType;
|
|
2554
|
-
export declare const WidgetNodeTypeCol: WidgetNodeType;
|
|
2555
|
-
/**
|
|
2556
|
-
* Layout node types
|
|
2557
|
-
*/
|
|
2558
|
-
export declare const WidgetNodeTypeBox: WidgetNodeType;
|
|
2559
|
-
export declare const WidgetNodeTypeSpacer: WidgetNodeType;
|
|
2560
|
-
export declare const WidgetNodeTypeDivider: WidgetNodeType;
|
|
2561
|
-
export declare const WidgetNodeTypeForm: WidgetNodeType;
|
|
2562
|
-
/**
|
|
2563
|
-
* Typography node types
|
|
2564
|
-
*/
|
|
2565
|
-
export declare const WidgetNodeTypeTitle: WidgetNodeType;
|
|
2566
|
-
export declare const WidgetNodeTypeCaption: WidgetNodeType;
|
|
2567
|
-
export declare const WidgetNodeTypeLabel: WidgetNodeType;
|
|
2568
|
-
/**
|
|
2569
|
-
* Control node types
|
|
2570
|
-
*/
|
|
2571
|
-
export declare const WidgetNodeTypeTextarea: WidgetNodeType;
|
|
2572
|
-
export declare const WidgetNodeTypeRadioGroup: WidgetNodeType;
|
|
2573
|
-
export declare const WidgetNodeTypeDatePicker: WidgetNodeType;
|
|
2574
|
-
/**
|
|
2575
|
-
* Content node types
|
|
2576
|
-
*/
|
|
2577
|
-
export declare const WidgetNodeTypeIcon: WidgetNodeType;
|
|
2578
|
-
export declare const WidgetNodeTypeChart: WidgetNodeType;
|
|
2579
|
-
export declare const WidgetNodeTypeTransition: WidgetNodeType;
|
|
2580
|
-
/**
|
|
2581
|
-
* Data-bound node types (deprecated - use templates instead)
|
|
2582
|
-
*/
|
|
2583
|
-
export declare const WidgetNodeTypePlanList: WidgetNodeType;
|
|
2584
|
-
export declare const WidgetNodeTypeKeyValue: WidgetNodeType;
|
|
2585
|
-
export declare const WidgetNodeTypeStatusBadge: WidgetNodeType;
|
|
2586
|
-
/**
|
|
2587
|
-
* WidgetNode represents a UI element in a widget (text, input, select, etc.)
|
|
1437
|
+
* WidgetNode represents a UI element in a widget (text, input, select, etc.)
|
|
2588
1438
|
*/
|
|
2589
1439
|
export interface WidgetNode {
|
|
2590
1440
|
type: WidgetNodeType;
|
|
@@ -2684,3 +1534,491 @@ export interface Widget {
|
|
|
2684
1534
|
children?: WidgetNode[];
|
|
2685
1535
|
actions?: WidgetActionButton[];
|
|
2686
1536
|
}
|
|
1537
|
+
export type AppCategory = string;
|
|
1538
|
+
export declare const AppCategoryImage: AppCategory;
|
|
1539
|
+
export declare const AppCategoryVideo: AppCategory;
|
|
1540
|
+
export declare const AppCategoryAudio: AppCategory;
|
|
1541
|
+
export declare const AppCategoryText: AppCategory;
|
|
1542
|
+
export declare const AppCategoryChat: AppCategory;
|
|
1543
|
+
export declare const AppCategory3D: AppCategory;
|
|
1544
|
+
export declare const AppCategoryOther: AppCategory;
|
|
1545
|
+
export declare const AppCategoryFlow: AppCategory;
|
|
1546
|
+
export type GPUType = string;
|
|
1547
|
+
export declare const GPUTypeAny: GPUType;
|
|
1548
|
+
export declare const GPUTypeNone: GPUType;
|
|
1549
|
+
export declare const GPUTypeIntel: GPUType;
|
|
1550
|
+
export declare const GPUTypeNvidia: GPUType;
|
|
1551
|
+
export declare const GPUTypeAMD: GPUType;
|
|
1552
|
+
export declare const GPUTypeApple: GPUType;
|
|
1553
|
+
/**
|
|
1554
|
+
* Visibility represents the visibility level of a resource
|
|
1555
|
+
*/
|
|
1556
|
+
export type Visibility = string;
|
|
1557
|
+
export declare const VisibilityPrivate: Visibility;
|
|
1558
|
+
export declare const VisibilityPublic: Visibility;
|
|
1559
|
+
export declare const VisibilityUnlisted: Visibility;
|
|
1560
|
+
export type ChatStatus = string;
|
|
1561
|
+
export declare const ChatStatusBusy: ChatStatus;
|
|
1562
|
+
export declare const ChatStatusIdle: ChatStatus;
|
|
1563
|
+
export declare const ChatStatusAwaitingInput: ChatStatus;
|
|
1564
|
+
export declare const ChatStatusCompleted: ChatStatus;
|
|
1565
|
+
export type PlanStepStatus = string;
|
|
1566
|
+
export declare const PlanStepStatusPending: PlanStepStatus;
|
|
1567
|
+
export declare const PlanStepStatusInProgress: PlanStepStatus;
|
|
1568
|
+
export declare const PlanStepStatusCompleted: PlanStepStatus;
|
|
1569
|
+
export declare const PlanStepStatusCancelled: PlanStepStatus;
|
|
1570
|
+
export type ChatMessageRole = string;
|
|
1571
|
+
export declare const ChatMessageRoleSystem: ChatMessageRole;
|
|
1572
|
+
export declare const ChatMessageRoleUser: ChatMessageRole;
|
|
1573
|
+
export declare const ChatMessageRoleAssistant: ChatMessageRole;
|
|
1574
|
+
export declare const ChatMessageRoleTool: ChatMessageRole;
|
|
1575
|
+
export type ChatMessageStatus = string;
|
|
1576
|
+
export declare const ChatMessageStatusPending: ChatMessageStatus;
|
|
1577
|
+
export declare const ChatMessageStatusReady: ChatMessageStatus;
|
|
1578
|
+
export declare const ChatMessageStatusFailed: ChatMessageStatus;
|
|
1579
|
+
export declare const ChatMessageStatusCancelled: ChatMessageStatus;
|
|
1580
|
+
export type ChatMessageContentType = string;
|
|
1581
|
+
export declare const ChatMessageContentTypeText: ChatMessageContentType;
|
|
1582
|
+
export declare const ChatMessageContentTypeReasoning: ChatMessageContentType;
|
|
1583
|
+
export declare const ChatMessageContentTypeImage: ChatMessageContentType;
|
|
1584
|
+
export declare const ChatMessageContentTypeFile: ChatMessageContentType;
|
|
1585
|
+
export declare const ChatMessageContentTypeTool: ChatMessageContentType;
|
|
1586
|
+
/**
|
|
1587
|
+
* ChatData contains agent-specific data for a chat session
|
|
1588
|
+
*/
|
|
1589
|
+
export interface ChatData {
|
|
1590
|
+
plan_steps: PlanStep[];
|
|
1591
|
+
memory: StringEncodedMap;
|
|
1592
|
+
always_allowed_tools: string[];
|
|
1593
|
+
}
|
|
1594
|
+
/**
|
|
1595
|
+
* PlanStep represents a step in an agent's execution plan
|
|
1596
|
+
*/
|
|
1597
|
+
export interface PlanStep {
|
|
1598
|
+
index: number;
|
|
1599
|
+
title: string;
|
|
1600
|
+
description: string;
|
|
1601
|
+
notes?: string;
|
|
1602
|
+
status: PlanStepStatus;
|
|
1603
|
+
}
|
|
1604
|
+
/**
|
|
1605
|
+
* ChatMessageContent represents the content of a chat message
|
|
1606
|
+
*/
|
|
1607
|
+
export interface ChatMessageContent {
|
|
1608
|
+
type: ChatMessageContentType;
|
|
1609
|
+
error?: string;
|
|
1610
|
+
text?: string;
|
|
1611
|
+
image?: string;
|
|
1612
|
+
file?: string;
|
|
1613
|
+
tool_calls?: ToolCall[];
|
|
1614
|
+
}
|
|
1615
|
+
/**
|
|
1616
|
+
* ChatTaskInput is the input envelope for a chat LLM task
|
|
1617
|
+
*/
|
|
1618
|
+
export interface ChatTaskInput {
|
|
1619
|
+
model?: string;
|
|
1620
|
+
context_size: number;
|
|
1621
|
+
temperature?: number;
|
|
1622
|
+
top_p?: number;
|
|
1623
|
+
reasoning_effort?: string;
|
|
1624
|
+
reasoning_max_tokens?: number;
|
|
1625
|
+
system_prompt: string;
|
|
1626
|
+
context: ChatTaskContextMessage[];
|
|
1627
|
+
role?: ChatMessageRole;
|
|
1628
|
+
text?: string;
|
|
1629
|
+
reasoning?: string;
|
|
1630
|
+
/**
|
|
1631
|
+
* Attachments is the SDK input field with full file metadata
|
|
1632
|
+
*/
|
|
1633
|
+
attachments?: FileRef[];
|
|
1634
|
+
/**
|
|
1635
|
+
* Images and Files are internal fields for task workers (filled from Attachments or context)
|
|
1636
|
+
*/
|
|
1637
|
+
images?: string[];
|
|
1638
|
+
files?: string[];
|
|
1639
|
+
tools?: Tool[];
|
|
1640
|
+
tool_call_id?: string;
|
|
1641
|
+
}
|
|
1642
|
+
/**
|
|
1643
|
+
* ChatTaskContextMessage represents a message in the chat context for LLM tasks
|
|
1644
|
+
*/
|
|
1645
|
+
export interface ChatTaskContextMessage {
|
|
1646
|
+
role: ChatMessageRole;
|
|
1647
|
+
text?: string;
|
|
1648
|
+
reasoning?: string;
|
|
1649
|
+
images?: string[];
|
|
1650
|
+
files?: string[];
|
|
1651
|
+
tools?: Tool[];
|
|
1652
|
+
tool_calls?: ToolCall[];
|
|
1653
|
+
tool_call_id?: string;
|
|
1654
|
+
}
|
|
1655
|
+
export type StringEncodedMap = {
|
|
1656
|
+
[key: string]: any;
|
|
1657
|
+
};
|
|
1658
|
+
/**
|
|
1659
|
+
* EngineStatus represents the status of an engine.
|
|
1660
|
+
*/
|
|
1661
|
+
export type EngineStatus = string;
|
|
1662
|
+
export declare const EngineStatusRunning: EngineStatus;
|
|
1663
|
+
export declare const EngineStatusPending: EngineStatus;
|
|
1664
|
+
export declare const EngineStatusDraining: EngineStatus;
|
|
1665
|
+
export declare const EngineStatusStopping: EngineStatus;
|
|
1666
|
+
export declare const EngineStatusStopped: EngineStatus;
|
|
1667
|
+
/**
|
|
1668
|
+
* WorkerStatus represents the status of a worker.
|
|
1669
|
+
*/
|
|
1670
|
+
export type WorkerStatus = string;
|
|
1671
|
+
export declare const WorkerStatusReserved: WorkerStatus;
|
|
1672
|
+
export declare const WorkerStatusBusy: WorkerStatus;
|
|
1673
|
+
export declare const WorkerStatusIdle: WorkerStatus;
|
|
1674
|
+
export declare const WorkerStatusInactive: WorkerStatus;
|
|
1675
|
+
export type FlowRunStatus = number;
|
|
1676
|
+
export declare const FlowRunStatusUnknown: FlowRunStatus;
|
|
1677
|
+
export declare const FlowRunStatusPending: FlowRunStatus;
|
|
1678
|
+
export declare const FlowRunStatusRunning: FlowRunStatus;
|
|
1679
|
+
export declare const FlowRunStatusCompleted: FlowRunStatus;
|
|
1680
|
+
export declare const FlowRunStatusFailed: FlowRunStatus;
|
|
1681
|
+
export declare const FlowRunStatusCancelled: FlowRunStatus;
|
|
1682
|
+
/**
|
|
1683
|
+
* FlowViewport represents the viewport state of a flow canvas
|
|
1684
|
+
*/
|
|
1685
|
+
export interface FlowViewport {
|
|
1686
|
+
x: number;
|
|
1687
|
+
y: number;
|
|
1688
|
+
zoom: number;
|
|
1689
|
+
}
|
|
1690
|
+
/**
|
|
1691
|
+
* FlowNode represents a node in a flow graph
|
|
1692
|
+
*/
|
|
1693
|
+
export interface FlowNode {
|
|
1694
|
+
id: string;
|
|
1695
|
+
type: string;
|
|
1696
|
+
position: FlowNodePosition;
|
|
1697
|
+
}
|
|
1698
|
+
/**
|
|
1699
|
+
* FlowNodePosition represents the position of a node
|
|
1700
|
+
*/
|
|
1701
|
+
export interface FlowNodePosition {
|
|
1702
|
+
x: number;
|
|
1703
|
+
y: number;
|
|
1704
|
+
}
|
|
1705
|
+
/**
|
|
1706
|
+
* FlowEdge represents an edge between nodes in a flow graph
|
|
1707
|
+
*/
|
|
1708
|
+
export interface FlowEdge {
|
|
1709
|
+
id: string;
|
|
1710
|
+
type: string;
|
|
1711
|
+
source: string;
|
|
1712
|
+
target: string;
|
|
1713
|
+
source_handle?: string;
|
|
1714
|
+
target_handle?: string;
|
|
1715
|
+
}
|
|
1716
|
+
/**
|
|
1717
|
+
* FlowNodeConnection represents a connection between nodes in a flow
|
|
1718
|
+
*/
|
|
1719
|
+
export interface FlowNodeConnection {
|
|
1720
|
+
nodeId: string;
|
|
1721
|
+
key: string;
|
|
1722
|
+
type: string;
|
|
1723
|
+
previousValue: any;
|
|
1724
|
+
}
|
|
1725
|
+
/**
|
|
1726
|
+
* FlowRunInputs maps node IDs to their input key-value pairs
|
|
1727
|
+
*/
|
|
1728
|
+
export type FlowRunInputs = {
|
|
1729
|
+
[key: string]: {
|
|
1730
|
+
[key: string]: FlowRunInput;
|
|
1731
|
+
};
|
|
1732
|
+
};
|
|
1733
|
+
/**
|
|
1734
|
+
* FlowRunInput represents a single input value or connection for a flow node
|
|
1735
|
+
*/
|
|
1736
|
+
export interface FlowRunInput {
|
|
1737
|
+
Connection?: FlowNodeConnection;
|
|
1738
|
+
Value: any;
|
|
1739
|
+
}
|
|
1740
|
+
/**
|
|
1741
|
+
* OutputFieldMapping represents a mapping from a source node's field to an output field
|
|
1742
|
+
*/
|
|
1743
|
+
export interface OutputFieldMapping {
|
|
1744
|
+
sourceNodeId: string;
|
|
1745
|
+
sourceFieldPath: string;
|
|
1746
|
+
outputFieldName: string;
|
|
1747
|
+
type: string;
|
|
1748
|
+
schema: any;
|
|
1749
|
+
}
|
|
1750
|
+
/**
|
|
1751
|
+
* OutputMappings is a map of output field name to OutputFieldMapping
|
|
1752
|
+
*/
|
|
1753
|
+
export type OutputMappings = {
|
|
1754
|
+
[key: string]: OutputFieldMapping;
|
|
1755
|
+
};
|
|
1756
|
+
export type GraphNodeType = string;
|
|
1757
|
+
export declare const GraphNodeTypeUnknown: GraphNodeType;
|
|
1758
|
+
export declare const GraphNodeTypeJoin: GraphNodeType;
|
|
1759
|
+
export declare const GraphNodeTypeSplit: GraphNodeType;
|
|
1760
|
+
export declare const GraphNodeTypeExecution: GraphNodeType;
|
|
1761
|
+
export declare const GraphNodeTypeResource: GraphNodeType;
|
|
1762
|
+
export declare const GraphNodeTypeApproval: GraphNodeType;
|
|
1763
|
+
export declare const GraphNodeTypeConditional: GraphNodeType;
|
|
1764
|
+
export declare const GraphNodeTypeFlowNode: GraphNodeType;
|
|
1765
|
+
/**
|
|
1766
|
+
* GraphNodeStatus represents the status of a node
|
|
1767
|
+
*/
|
|
1768
|
+
export type GraphNodeStatus = string;
|
|
1769
|
+
export declare const GraphNodeStatusPending: GraphNodeStatus;
|
|
1770
|
+
export declare const GraphNodeStatusReady: GraphNodeStatus;
|
|
1771
|
+
export declare const GraphNodeStatusRunning: GraphNodeStatus;
|
|
1772
|
+
export declare const GraphNodeStatusCompleted: GraphNodeStatus;
|
|
1773
|
+
export declare const GraphNodeStatusFailed: GraphNodeStatus;
|
|
1774
|
+
export declare const GraphNodeStatusCancelled: GraphNodeStatus;
|
|
1775
|
+
export declare const GraphNodeStatusSkipped: GraphNodeStatus;
|
|
1776
|
+
export declare const GraphNodeStatusBlocked: GraphNodeStatus;
|
|
1777
|
+
/**
|
|
1778
|
+
* GraphEdgeType defines the type of edge relationship
|
|
1779
|
+
*/
|
|
1780
|
+
export type GraphEdgeType = string;
|
|
1781
|
+
export declare const GraphEdgeTypeDependency: GraphEdgeType;
|
|
1782
|
+
export declare const GraphEdgeTypeFlow: GraphEdgeType;
|
|
1783
|
+
export declare const GraphEdgeTypeConditional: GraphEdgeType;
|
|
1784
|
+
export declare const GraphEdgeTypeExecution: GraphEdgeType;
|
|
1785
|
+
export declare const GraphEdgeTypeParent: GraphEdgeType;
|
|
1786
|
+
export declare const GraphEdgeTypeAncestor: GraphEdgeType;
|
|
1787
|
+
export declare const GraphEdgeTypeDuplicate: GraphEdgeType;
|
|
1788
|
+
export type PageStatus = number;
|
|
1789
|
+
export declare const PageStatusUnknown: PageStatus;
|
|
1790
|
+
export declare const PageStatusDraft: PageStatus;
|
|
1791
|
+
export declare const PageStatusPublished: PageStatus;
|
|
1792
|
+
export declare const PageStatusArchived: PageStatus;
|
|
1793
|
+
/**
|
|
1794
|
+
* PageType represents the type of page content
|
|
1795
|
+
*/
|
|
1796
|
+
export type PageType = string;
|
|
1797
|
+
export declare const PageTypeDoc: PageType;
|
|
1798
|
+
export declare const PageTypeBlog: PageType;
|
|
1799
|
+
export declare const PageTypePage: PageType;
|
|
1800
|
+
/**
|
|
1801
|
+
* ToolInvocationStatus represents the execution status of a tool invocation
|
|
1802
|
+
*/
|
|
1803
|
+
export type ToolInvocationStatus = string;
|
|
1804
|
+
export declare const ToolInvocationStatusPending: ToolInvocationStatus;
|
|
1805
|
+
export declare const ToolInvocationStatusInProgress: ToolInvocationStatus;
|
|
1806
|
+
export declare const ToolInvocationStatusAwaitingInput: ToolInvocationStatus;
|
|
1807
|
+
export declare const ToolInvocationStatusAwaitingApproval: ToolInvocationStatus;
|
|
1808
|
+
export declare const ToolInvocationStatusCompleted: ToolInvocationStatus;
|
|
1809
|
+
export declare const ToolInvocationStatusFailed: ToolInvocationStatus;
|
|
1810
|
+
export declare const ToolInvocationStatusCancelled: ToolInvocationStatus;
|
|
1811
|
+
/**
|
|
1812
|
+
* ToolType represents the type of tool (used in both AgentTool definition and ToolInvocation)
|
|
1813
|
+
*/
|
|
1814
|
+
export type ToolType = string;
|
|
1815
|
+
export declare const ToolTypeApp: ToolType;
|
|
1816
|
+
export declare const ToolTypeAgent: ToolType;
|
|
1817
|
+
export declare const ToolTypeHook: ToolType;
|
|
1818
|
+
export declare const ToolTypeHTTP: ToolType;
|
|
1819
|
+
export declare const ToolTypeCall: ToolType;
|
|
1820
|
+
export declare const ToolTypeMCP: ToolType;
|
|
1821
|
+
export declare const ToolTypeClient: ToolType;
|
|
1822
|
+
export declare const ToolTypeInternal: ToolType;
|
|
1823
|
+
export type InstanceCloudProvider = string;
|
|
1824
|
+
export declare const CloudAWS: InstanceCloudProvider;
|
|
1825
|
+
export declare const CloudAzure: InstanceCloudProvider;
|
|
1826
|
+
export declare const CloudLambdaLabs: InstanceCloudProvider;
|
|
1827
|
+
export declare const CloudTensorDock: InstanceCloudProvider;
|
|
1828
|
+
export declare const CloudRunPod: InstanceCloudProvider;
|
|
1829
|
+
export declare const CloudLatitude: InstanceCloudProvider;
|
|
1830
|
+
export declare const CloudJarvisLabs: InstanceCloudProvider;
|
|
1831
|
+
export declare const CloudOblivus: InstanceCloudProvider;
|
|
1832
|
+
export declare const CloudPaperspace: InstanceCloudProvider;
|
|
1833
|
+
export declare const CloudDatacrunch: InstanceCloudProvider;
|
|
1834
|
+
export declare const CloudMassedCompute: InstanceCloudProvider;
|
|
1835
|
+
export declare const CloudVultr: InstanceCloudProvider;
|
|
1836
|
+
export declare const CloudShade: InstanceCloudProvider;
|
|
1837
|
+
export type InstanceStatus = string;
|
|
1838
|
+
export declare const InstanceStatusPending: InstanceStatus;
|
|
1839
|
+
export declare const InstanceStatusActive: InstanceStatus;
|
|
1840
|
+
export declare const InstanceStatusDeleted: InstanceStatus;
|
|
1841
|
+
export type InstanceTypeDeploymentType = string;
|
|
1842
|
+
export declare const InstanceTypeDeploymentTypeVM: InstanceTypeDeploymentType;
|
|
1843
|
+
export declare const InstanceTypeDeploymentTypeContainer: InstanceTypeDeploymentType;
|
|
1844
|
+
export declare const InstanceTypeDeploymentTypeBaremetal: InstanceTypeDeploymentType;
|
|
1845
|
+
export type AppSessionStatus = string;
|
|
1846
|
+
export declare const AppSessionStatusActive: AppSessionStatus;
|
|
1847
|
+
export declare const AppSessionStatusEnded: AppSessionStatus;
|
|
1848
|
+
export declare const AppSessionStatusExpired: AppSessionStatus;
|
|
1849
|
+
/**
|
|
1850
|
+
* ProjectType represents different types of projects
|
|
1851
|
+
*/
|
|
1852
|
+
export type ProjectType = string;
|
|
1853
|
+
export declare const ProjectTypeAgent: ProjectType;
|
|
1854
|
+
export declare const ProjectTypeApp: ProjectType;
|
|
1855
|
+
export declare const ProjectTypeFlow: ProjectType;
|
|
1856
|
+
export declare const ProjectTypeOther: ProjectType;
|
|
1857
|
+
export type UsageEventResourceTier = string;
|
|
1858
|
+
export declare const UsageEventResourceTierPrivate: UsageEventResourceTier;
|
|
1859
|
+
export declare const UsageEventResourceTierCloud: UsageEventResourceTier;
|
|
1860
|
+
export type FilterOperator = string;
|
|
1861
|
+
export declare const OpEqual: FilterOperator;
|
|
1862
|
+
export declare const OpNotEqual: FilterOperator;
|
|
1863
|
+
export declare const OpIn: FilterOperator;
|
|
1864
|
+
export declare const OpNotIn: FilterOperator;
|
|
1865
|
+
export declare const OpGreater: FilterOperator;
|
|
1866
|
+
export declare const OpGreaterEqual: FilterOperator;
|
|
1867
|
+
export declare const OpLess: FilterOperator;
|
|
1868
|
+
export declare const OpLessEqual: FilterOperator;
|
|
1869
|
+
export declare const OpLike: FilterOperator;
|
|
1870
|
+
export declare const OpILike: FilterOperator;
|
|
1871
|
+
export declare const OpContains: FilterOperator;
|
|
1872
|
+
export declare const OpNotContains: FilterOperator;
|
|
1873
|
+
export declare const OpIsNull: FilterOperator;
|
|
1874
|
+
export declare const OpIsNotNull: FilterOperator;
|
|
1875
|
+
export declare const OpIsEmpty: FilterOperator;
|
|
1876
|
+
export declare const OpIsNotEmpty: FilterOperator;
|
|
1877
|
+
export type ContentRating = string;
|
|
1878
|
+
export declare const ContentSafe: ContentRating;
|
|
1879
|
+
export declare const ContentSexualSuggestive: ContentRating;
|
|
1880
|
+
export declare const ContentSexualExplicit: ContentRating;
|
|
1881
|
+
export declare const ContentViolenceNonGraphic: ContentRating;
|
|
1882
|
+
export declare const ContentViolenceGraphic: ContentRating;
|
|
1883
|
+
export declare const ContentGore: ContentRating;
|
|
1884
|
+
export declare const ContentUnrated: ContentRating;
|
|
1885
|
+
export type WidgetNodeType = string;
|
|
1886
|
+
export declare const WidgetNodeTypeText: WidgetNodeType;
|
|
1887
|
+
export declare const WidgetNodeTypeMarkdown: WidgetNodeType;
|
|
1888
|
+
export declare const WidgetNodeTypeImage: WidgetNodeType;
|
|
1889
|
+
export declare const WidgetNodeTypeBadge: WidgetNodeType;
|
|
1890
|
+
export declare const WidgetNodeTypeButton: WidgetNodeType;
|
|
1891
|
+
export declare const WidgetNodeTypeInput: WidgetNodeType;
|
|
1892
|
+
export declare const WidgetNodeTypeSelect: WidgetNodeType;
|
|
1893
|
+
export declare const WidgetNodeTypeCheckbox: WidgetNodeType;
|
|
1894
|
+
export declare const WidgetNodeTypeRow: WidgetNodeType;
|
|
1895
|
+
export declare const WidgetNodeTypeCol: WidgetNodeType;
|
|
1896
|
+
export declare const WidgetNodeTypeBox: WidgetNodeType;
|
|
1897
|
+
export declare const WidgetNodeTypeSpacer: WidgetNodeType;
|
|
1898
|
+
export declare const WidgetNodeTypeDivider: WidgetNodeType;
|
|
1899
|
+
export declare const WidgetNodeTypeForm: WidgetNodeType;
|
|
1900
|
+
export declare const WidgetNodeTypeTitle: WidgetNodeType;
|
|
1901
|
+
export declare const WidgetNodeTypeCaption: WidgetNodeType;
|
|
1902
|
+
export declare const WidgetNodeTypeLabel: WidgetNodeType;
|
|
1903
|
+
export declare const WidgetNodeTypeTextarea: WidgetNodeType;
|
|
1904
|
+
export declare const WidgetNodeTypeRadioGroup: WidgetNodeType;
|
|
1905
|
+
export declare const WidgetNodeTypeDatePicker: WidgetNodeType;
|
|
1906
|
+
export declare const WidgetNodeTypeIcon: WidgetNodeType;
|
|
1907
|
+
export declare const WidgetNodeTypeChart: WidgetNodeType;
|
|
1908
|
+
export declare const WidgetNodeTypeTransition: WidgetNodeType;
|
|
1909
|
+
export declare const WidgetNodeTypePlanList: WidgetNodeType;
|
|
1910
|
+
export declare const WidgetNodeTypeKeyValue: WidgetNodeType;
|
|
1911
|
+
export declare const WidgetNodeTypeStatusBadge: WidgetNodeType;
|
|
1912
|
+
/**
|
|
1913
|
+
* TaskStatus represents the state of a task in its lifecycle.
|
|
1914
|
+
*/
|
|
1915
|
+
export type TaskStatus = number;
|
|
1916
|
+
export declare const TaskStatusUnknown: TaskStatus;
|
|
1917
|
+
export declare const TaskStatusReceived: TaskStatus;
|
|
1918
|
+
export declare const TaskStatusQueued: TaskStatus;
|
|
1919
|
+
export declare const TaskStatusDispatched: TaskStatus;
|
|
1920
|
+
export declare const TaskStatusPreparing: TaskStatus;
|
|
1921
|
+
export declare const TaskStatusServing: TaskStatus;
|
|
1922
|
+
export declare const TaskStatusSettingUp: TaskStatus;
|
|
1923
|
+
export declare const TaskStatusRunning: TaskStatus;
|
|
1924
|
+
export declare const TaskStatusCancelling: TaskStatus;
|
|
1925
|
+
export declare const TaskStatusUploading: TaskStatus;
|
|
1926
|
+
export declare const TaskStatusCompleted: TaskStatus;
|
|
1927
|
+
export declare const TaskStatusFailed: TaskStatus;
|
|
1928
|
+
export declare const TaskStatusCancelled: TaskStatus;
|
|
1929
|
+
/**
|
|
1930
|
+
* Infra defines where a task should run.
|
|
1931
|
+
*/
|
|
1932
|
+
export type Infra = string;
|
|
1933
|
+
export declare const InfraPrivate: Infra;
|
|
1934
|
+
export declare const InfraCloud: Infra;
|
|
1935
|
+
export declare const InfraPrivateFirst: Infra;
|
|
1936
|
+
/**
|
|
1937
|
+
* TaskLogType defines the type of task log.
|
|
1938
|
+
*/
|
|
1939
|
+
export type TaskLogType = number;
|
|
1940
|
+
export declare const TaskLogTypeBuild: TaskLogType;
|
|
1941
|
+
export declare const TaskLogTypeRun: TaskLogType;
|
|
1942
|
+
export declare const TaskLogTypeServe: TaskLogType;
|
|
1943
|
+
export declare const TaskLogTypeSetup: TaskLogType;
|
|
1944
|
+
export declare const TaskLogTypeTask: TaskLogType;
|
|
1945
|
+
/**
|
|
1946
|
+
* TaskAction defines an action to execute when a task reaches a specific status.
|
|
1947
|
+
*/
|
|
1948
|
+
export interface TaskAction {
|
|
1949
|
+
key: string;
|
|
1950
|
+
on: string;
|
|
1951
|
+
params?: any;
|
|
1952
|
+
}
|
|
1953
|
+
/**
|
|
1954
|
+
* TaskMetadata holds optional metadata attached to a task.
|
|
1955
|
+
*/
|
|
1956
|
+
export interface TaskMetadata {
|
|
1957
|
+
action?: TaskAction;
|
|
1958
|
+
}
|
|
1959
|
+
export type TeamType = string;
|
|
1960
|
+
export declare const TeamTypePersonal: TeamType;
|
|
1961
|
+
export declare const TeamTypeTeam: TeamType;
|
|
1962
|
+
export declare const TeamTypeSystem: TeamType;
|
|
1963
|
+
/**
|
|
1964
|
+
* ToolCall represents a tool call from an LLM response (wire format)
|
|
1965
|
+
* This is a transport object for parsing LLM responses, not a database model
|
|
1966
|
+
*/
|
|
1967
|
+
export interface ToolCall {
|
|
1968
|
+
id: string;
|
|
1969
|
+
type: string;
|
|
1970
|
+
function: ToolCallFunction;
|
|
1971
|
+
}
|
|
1972
|
+
/**
|
|
1973
|
+
* ToolCallFunction contains the function name and arguments from an LLM tool call
|
|
1974
|
+
*/
|
|
1975
|
+
export interface ToolCallFunction {
|
|
1976
|
+
name: string;
|
|
1977
|
+
arguments: StringEncodedMap;
|
|
1978
|
+
}
|
|
1979
|
+
/**
|
|
1980
|
+
* FileRef is a lightweight reference to a file with essential metadata.
|
|
1981
|
+
* Used in chat inputs/context instead of full File objects.
|
|
1982
|
+
*/
|
|
1983
|
+
export interface FileRef {
|
|
1984
|
+
id?: string;
|
|
1985
|
+
uri: string;
|
|
1986
|
+
filename: string;
|
|
1987
|
+
content_type: string;
|
|
1988
|
+
size?: number;
|
|
1989
|
+
}
|
|
1990
|
+
/**
|
|
1991
|
+
* Tool represents a tool definition for LLM function calling
|
|
1992
|
+
*/
|
|
1993
|
+
export interface Tool {
|
|
1994
|
+
type: string;
|
|
1995
|
+
function: ToolFunction;
|
|
1996
|
+
}
|
|
1997
|
+
export interface ToolFunction {
|
|
1998
|
+
name: string;
|
|
1999
|
+
description: string;
|
|
2000
|
+
parameters?: ToolParameters;
|
|
2001
|
+
required?: string[];
|
|
2002
|
+
}
|
|
2003
|
+
export interface ToolParameters {
|
|
2004
|
+
type: string;
|
|
2005
|
+
title: string;
|
|
2006
|
+
properties?: ToolParameterProperties;
|
|
2007
|
+
required?: string[];
|
|
2008
|
+
}
|
|
2009
|
+
export type ToolParameterProperties = {
|
|
2010
|
+
[key: string]: ToolParameterProperty;
|
|
2011
|
+
};
|
|
2012
|
+
export interface ToolParameterProperty {
|
|
2013
|
+
type: string;
|
|
2014
|
+
title: string;
|
|
2015
|
+
description: string;
|
|
2016
|
+
properties?: ToolParameterProperties;
|
|
2017
|
+
items?: ToolParameterProperty;
|
|
2018
|
+
required?: string[];
|
|
2019
|
+
}
|
|
2020
|
+
export type Role = string;
|
|
2021
|
+
export declare const RoleGuest: Role;
|
|
2022
|
+
export declare const RoleUser: Role;
|
|
2023
|
+
export declare const RoleAdmin: Role;
|
|
2024
|
+
export declare const RoleSystem: Role;
|