@inferencesh/sdk 0.1.3 → 0.2.0
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/README.md +98 -8
- package/dist/agent.d.ts +75 -0
- package/dist/agent.js +196 -0
- package/dist/client.d.ts +111 -10
- package/dist/client.js +175 -13
- package/dist/client.test.js +5 -5
- package/dist/index.d.ts +3 -1
- package/dist/index.js +18 -2
- package/dist/stream.d.ts +8 -0
- package/dist/stream.js +48 -0
- package/dist/tool-builder.d.ts +82 -0
- package/dist/tool-builder.js +212 -0
- package/dist/tool-builder.test.d.ts +1 -0
- package/dist/tool-builder.test.js +291 -0
- package/dist/types.d.ts +625 -2719
- package/dist/types.js +45 -266
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,228 +1,247 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
owner_read: boolean;
|
|
10
|
-
owner_write: boolean;
|
|
11
|
-
owner_exec: boolean;
|
|
12
|
-
team_read: boolean;
|
|
13
|
-
team_write: boolean;
|
|
14
|
-
team_exec: boolean;
|
|
15
|
-
other_read: boolean;
|
|
16
|
-
other_write: boolean;
|
|
17
|
-
other_exec: boolean;
|
|
1
|
+
/**
|
|
2
|
+
* InternalToolsConfig controls which built-in tools are enabled for an agent
|
|
3
|
+
*/
|
|
4
|
+
export interface InternalToolsConfig {
|
|
5
|
+
plan?: boolean;
|
|
6
|
+
memory?: boolean;
|
|
7
|
+
widget?: boolean;
|
|
8
|
+
finish?: boolean;
|
|
18
9
|
}
|
|
19
10
|
/**
|
|
20
|
-
*
|
|
11
|
+
* ToolType represents the type of tool (used in both AgentTool definition and ToolInvocation)
|
|
21
12
|
*/
|
|
22
|
-
export
|
|
13
|
+
export type ToolType = string;
|
|
14
|
+
export declare const ToolTypeApp: ToolType;
|
|
15
|
+
export declare const ToolTypeAgent: ToolType;
|
|
16
|
+
export declare const ToolTypeHook: ToolType;
|
|
17
|
+
export declare const ToolTypeClient: ToolType;
|
|
18
|
+
export declare const ToolTypeInternal: ToolType;
|
|
19
|
+
/**
|
|
20
|
+
* AppToolConfig contains configuration for an app tool
|
|
21
|
+
*/
|
|
22
|
+
export interface AppToolConfig {
|
|
23
23
|
id: string;
|
|
24
|
-
version_id
|
|
25
|
-
|
|
24
|
+
version_id?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Resolved at runtime, not stored
|
|
27
|
+
*/
|
|
26
28
|
app?: App;
|
|
27
|
-
description: string;
|
|
28
|
-
}
|
|
29
|
-
export interface AgentAppDTO {
|
|
30
|
-
id: string;
|
|
31
|
-
version_id: string;
|
|
32
|
-
variant: string;
|
|
33
|
-
app?: AppDTO;
|
|
34
|
-
description: string;
|
|
35
29
|
}
|
|
36
|
-
|
|
30
|
+
/**
|
|
31
|
+
* AgentToolConfig contains configuration for a sub-agent tool
|
|
32
|
+
*/
|
|
33
|
+
export interface AgentToolConfig {
|
|
37
34
|
id: string;
|
|
38
|
-
version_id
|
|
35
|
+
version_id?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Resolved at runtime, not stored
|
|
38
|
+
*/
|
|
39
39
|
agent?: Agent;
|
|
40
|
-
description: string;
|
|
41
|
-
}
|
|
42
|
-
export interface SubAgentDTO {
|
|
43
|
-
id: string;
|
|
44
|
-
version_id: string;
|
|
45
|
-
agent?: AgentDTO;
|
|
46
|
-
description: string;
|
|
47
40
|
}
|
|
48
41
|
/**
|
|
49
|
-
*
|
|
42
|
+
* HookToolConfig contains configuration for a webhook tool
|
|
50
43
|
*/
|
|
51
|
-
export interface
|
|
52
|
-
name: string;
|
|
53
|
-
description: string;
|
|
44
|
+
export interface HookToolConfig {
|
|
54
45
|
url: string;
|
|
55
46
|
secret?: string;
|
|
56
47
|
input_schema?: any;
|
|
48
|
+
output_schema?: any;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* ClientToolConfig contains configuration for a frontend-executed tool
|
|
52
|
+
*/
|
|
53
|
+
export interface ClientToolConfig {
|
|
54
|
+
input_schema?: any;
|
|
55
|
+
output_schema?: any;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* AgentTool represents a unified tool that can be used by an agent
|
|
59
|
+
*/
|
|
60
|
+
export interface AgentTool {
|
|
61
|
+
name: string;
|
|
62
|
+
display_name?: string;
|
|
63
|
+
description: string;
|
|
64
|
+
type: ToolType;
|
|
65
|
+
/**
|
|
66
|
+
* Human-in-the-Loop: if true, tool execution requires user approval
|
|
67
|
+
*/
|
|
68
|
+
require_approval?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Type-specific config (exactly one should be set based on Type)
|
|
71
|
+
*/
|
|
72
|
+
app?: AppToolConfig;
|
|
73
|
+
agent?: AgentToolConfig;
|
|
74
|
+
hook?: HookToolConfig;
|
|
75
|
+
client?: ClientToolConfig;
|
|
57
76
|
}
|
|
58
77
|
/**
|
|
59
|
-
*
|
|
78
|
+
* AgentToolDTO for API responses
|
|
60
79
|
*/
|
|
61
|
-
export interface
|
|
80
|
+
export interface AgentToolDTO {
|
|
62
81
|
name: string;
|
|
82
|
+
display_name?: string;
|
|
63
83
|
description: string;
|
|
84
|
+
type: ToolType;
|
|
85
|
+
/**
|
|
86
|
+
* Human-in-the-Loop: if true, tool execution requires user approval
|
|
87
|
+
*/
|
|
88
|
+
require_approval?: boolean;
|
|
89
|
+
app?: AppToolConfigDTO;
|
|
90
|
+
agent?: AgentToolConfigDTO;
|
|
91
|
+
hook?: HookToolConfigDTO;
|
|
92
|
+
client?: ClientToolConfigDTO;
|
|
93
|
+
}
|
|
94
|
+
export interface AppToolConfigDTO {
|
|
95
|
+
id: string;
|
|
96
|
+
version_id?: string;
|
|
97
|
+
app?: AppDTO;
|
|
98
|
+
}
|
|
99
|
+
export interface AgentToolConfigDTO {
|
|
100
|
+
id: string;
|
|
101
|
+
version_id?: string;
|
|
102
|
+
agent?: AgentDTO;
|
|
103
|
+
}
|
|
104
|
+
export interface HookToolConfigDTO {
|
|
64
105
|
url: string;
|
|
65
106
|
secret?: string;
|
|
66
107
|
input_schema?: any;
|
|
108
|
+
output_schema?: any;
|
|
109
|
+
}
|
|
110
|
+
export interface ClientToolConfigDTO {
|
|
111
|
+
input_schema?: any;
|
|
112
|
+
output_schema?: any;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* CoreAppConfig references an app used as the agent's core
|
|
116
|
+
*/
|
|
117
|
+
export interface CoreAppConfig {
|
|
118
|
+
id: string;
|
|
119
|
+
version_id: string;
|
|
120
|
+
app?: App;
|
|
67
121
|
}
|
|
68
122
|
export interface Agent {
|
|
69
123
|
BaseModel: BaseModel;
|
|
70
124
|
PermissionModel: PermissionModel;
|
|
125
|
+
ProjectModel: ProjectModel;
|
|
71
126
|
/**
|
|
72
127
|
* Basic info
|
|
73
128
|
*/
|
|
129
|
+
namespace: string;
|
|
74
130
|
name: string;
|
|
75
|
-
project_id?: string;
|
|
76
|
-
project?: Project;
|
|
77
131
|
version_id: string;
|
|
78
132
|
version?: AgentVersion;
|
|
79
|
-
is_active: boolean;
|
|
80
133
|
}
|
|
81
134
|
/**
|
|
82
135
|
* AgentDTO for API responses
|
|
83
136
|
*/
|
|
84
|
-
export interface AgentDTO extends BaseModel, PermissionModelDTO {
|
|
137
|
+
export interface AgentDTO extends BaseModel, PermissionModelDTO, ProjectModelDTO {
|
|
138
|
+
namespace: string;
|
|
85
139
|
name: string;
|
|
86
|
-
project_id?: string;
|
|
87
|
-
project?: ProjectDTO;
|
|
88
140
|
version_id: string;
|
|
89
141
|
version?: AgentVersionDTO;
|
|
90
|
-
is_active: boolean;
|
|
91
142
|
}
|
|
92
143
|
export interface AgentVersion {
|
|
93
144
|
BaseModel: BaseModel;
|
|
94
145
|
PermissionModel: PermissionModel;
|
|
146
|
+
agent_id: string;
|
|
95
147
|
description: string;
|
|
96
148
|
system_prompt: string;
|
|
97
|
-
prompt_template: string;
|
|
98
149
|
example_prompts: string[];
|
|
99
|
-
core_app?:
|
|
150
|
+
core_app?: CoreAppConfig;
|
|
100
151
|
core_app_input?: any;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
152
|
+
/**
|
|
153
|
+
* Unified tools array (apps, agents, hooks)
|
|
154
|
+
*/
|
|
155
|
+
tools: (AgentTool | undefined)[];
|
|
156
|
+
/**
|
|
157
|
+
* Internal tools configuration (plan, memory, widget, finish)
|
|
158
|
+
*/
|
|
159
|
+
internal_tools?: InternalToolsConfig;
|
|
160
|
+
/**
|
|
161
|
+
* Output schema for custom finish tool (sub-agents only)
|
|
162
|
+
*/
|
|
163
|
+
output_schema?: any;
|
|
164
|
+
}
|
|
165
|
+
export interface CoreAppConfigDTO {
|
|
166
|
+
id: string;
|
|
167
|
+
version_id: string;
|
|
168
|
+
app?: AppDTO;
|
|
104
169
|
}
|
|
105
170
|
export interface AgentVersionDTO extends BaseModel, PermissionModelDTO {
|
|
106
171
|
description: string;
|
|
107
172
|
system_prompt: string;
|
|
108
|
-
prompt_template: string;
|
|
109
173
|
example_prompts: string[];
|
|
110
|
-
core_app?:
|
|
174
|
+
core_app?: CoreAppConfigDTO;
|
|
111
175
|
core_app_input?: any;
|
|
112
|
-
sub_agents: (SubAgentDTO | undefined)[];
|
|
113
|
-
apps: (AgentAppDTO | undefined)[];
|
|
114
|
-
hooks: (AgentHookDTO | undefined)[];
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* TimeWindow represents a single analytics time window
|
|
118
|
-
*/
|
|
119
|
-
export interface TimeWindow {
|
|
120
|
-
start: string;
|
|
121
|
-
end: string;
|
|
122
|
-
count: number;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* TaskStatusWindow represents a single analytics time window with task status
|
|
126
|
-
*/
|
|
127
|
-
export interface TaskStatusWindow {
|
|
128
|
-
start: string;
|
|
129
|
-
status: TaskStatus;
|
|
130
|
-
count: number;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* AppAnalytics represents usage statistics for an app
|
|
134
|
-
*/
|
|
135
|
-
export interface AppAnalytics {
|
|
136
|
-
app_id: string;
|
|
137
|
-
app_username: string;
|
|
138
|
-
app_name: string;
|
|
139
|
-
version_id: string;
|
|
140
|
-
variant: string;
|
|
141
|
-
task_count: number;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* TimeSeriesMetrics contains all time-series data
|
|
145
|
-
*/
|
|
146
|
-
export interface TimeSeriesMetrics {
|
|
147
|
-
active_users: TimeWindow[];
|
|
148
|
-
new_users: TimeWindow[];
|
|
149
|
-
tasks_by_status: TaskStatusWindow[];
|
|
150
|
-
new_engines: TimeWindow[];
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* TotalMetrics contains total counts for the time window
|
|
154
|
-
*/
|
|
155
|
-
export interface TotalMetrics {
|
|
156
|
-
active_users: number;
|
|
157
|
-
new_users: number;
|
|
158
|
-
tasks: number;
|
|
159
|
-
new_engines: number;
|
|
160
176
|
/**
|
|
161
|
-
*
|
|
177
|
+
* Unified tools array (apps, agents, hooks, client)
|
|
162
178
|
*/
|
|
163
|
-
|
|
179
|
+
tools: (AgentToolDTO | undefined)[];
|
|
164
180
|
/**
|
|
165
|
-
*
|
|
181
|
+
* Internal tools configuration (plan, memory, widget, finish)
|
|
166
182
|
*/
|
|
167
|
-
|
|
183
|
+
internal_tools?: InternalToolsConfig;
|
|
168
184
|
/**
|
|
169
|
-
*
|
|
185
|
+
* Output schema for custom finish tool (sub-agents only)
|
|
170
186
|
*/
|
|
171
|
-
|
|
172
|
-
top_apps: AppAnalytics[];
|
|
187
|
+
output_schema?: any;
|
|
173
188
|
}
|
|
174
189
|
/**
|
|
175
|
-
*
|
|
190
|
+
* AgentRuntimeConfig is a self-contained, flattened config for chat execution.
|
|
191
|
+
* This is either snapshotted from an Agent template or provided ad-hoc.
|
|
192
|
+
* It's portable and can be serialized to JSON or YAML.
|
|
176
193
|
*/
|
|
177
|
-
export interface
|
|
194
|
+
export interface AgentRuntimeConfig {
|
|
178
195
|
/**
|
|
179
|
-
*
|
|
196
|
+
* Origin tracking (optional, for lineage when snapshotted from template)
|
|
180
197
|
*/
|
|
181
|
-
|
|
182
|
-
|
|
198
|
+
agent_id?: string;
|
|
199
|
+
agent_version_id?: string;
|
|
183
200
|
/**
|
|
184
|
-
*
|
|
201
|
+
* Identity
|
|
185
202
|
*/
|
|
186
|
-
|
|
187
|
-
|
|
203
|
+
name: string;
|
|
204
|
+
namespace?: string;
|
|
205
|
+
description?: string;
|
|
188
206
|
/**
|
|
189
|
-
*
|
|
207
|
+
* Prompts
|
|
190
208
|
*/
|
|
191
|
-
|
|
192
|
-
|
|
209
|
+
system_prompt: string;
|
|
210
|
+
example_prompts?: string[];
|
|
193
211
|
/**
|
|
194
|
-
*
|
|
212
|
+
* Core LLM
|
|
195
213
|
*/
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
*/
|
|
211
|
-
export interface AnalyticsRequest {
|
|
212
|
-
start: string;
|
|
213
|
-
end: string;
|
|
214
|
-
resolution: string;
|
|
214
|
+
core_app?: CoreAppConfig;
|
|
215
|
+
core_app_input?: any;
|
|
216
|
+
/**
|
|
217
|
+
* Tools (apps, agents, hooks, client tools)
|
|
218
|
+
*/
|
|
219
|
+
tools?: (AgentTool | undefined)[];
|
|
220
|
+
/**
|
|
221
|
+
* Internal tools configuration (plan, memory, widget, finish)
|
|
222
|
+
*/
|
|
223
|
+
internal_tools?: InternalToolsConfig;
|
|
224
|
+
/**
|
|
225
|
+
* Output schema for custom finish tool (sub-agents only)
|
|
226
|
+
*/
|
|
227
|
+
output_schema?: any;
|
|
215
228
|
}
|
|
216
229
|
/**
|
|
217
|
-
*
|
|
218
|
-
*/
|
|
219
|
-
/**
|
|
220
|
-
* AuthenticatedUser represents the user data we store in context
|
|
230
|
+
* AgentRuntimeConfigDTO for API responses
|
|
221
231
|
*/
|
|
222
|
-
export interface
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
232
|
+
export interface AgentRuntimeConfigDTO {
|
|
233
|
+
agent_id?: string;
|
|
234
|
+
agent_version_id?: string;
|
|
235
|
+
name: string;
|
|
236
|
+
namespace?: string;
|
|
237
|
+
description?: string;
|
|
238
|
+
system_prompt: string;
|
|
239
|
+
example_prompts?: string[];
|
|
240
|
+
core_app?: CoreAppConfigDTO;
|
|
241
|
+
core_app_input?: any;
|
|
242
|
+
tools?: (AgentToolDTO | undefined)[];
|
|
243
|
+
internal_tools?: InternalToolsConfig;
|
|
244
|
+
output_schema?: any;
|
|
226
245
|
}
|
|
227
246
|
export interface APIRequest<T extends any> {
|
|
228
247
|
timestamp: string;
|
|
@@ -238,86 +257,102 @@ export interface APIError {
|
|
|
238
257
|
code: string;
|
|
239
258
|
message: string;
|
|
240
259
|
}
|
|
241
|
-
export interface WorkerGPUConfig {
|
|
242
|
-
gpus: number[];
|
|
243
|
-
}
|
|
244
|
-
export interface WorkerCPUConfig {
|
|
245
|
-
count: number;
|
|
246
|
-
}
|
|
247
|
-
export interface WorkerConfig {
|
|
248
|
-
gpu: WorkerGPUConfig[];
|
|
249
|
-
cpu: WorkerCPUConfig;
|
|
250
|
-
}
|
|
251
|
-
export interface EngineConfig {
|
|
252
|
-
id: string;
|
|
253
|
-
name: string;
|
|
254
|
-
api_url: string;
|
|
255
|
-
engine_port: string;
|
|
256
|
-
workers: WorkerConfig;
|
|
257
|
-
api_key: string;
|
|
258
|
-
container_mode: boolean;
|
|
259
|
-
network_name: string;
|
|
260
|
-
cache_path: string;
|
|
261
|
-
gpus: string[];
|
|
262
|
-
}
|
|
263
|
-
export interface RemoteEngineCreateRequest {
|
|
264
|
-
name: string;
|
|
265
|
-
instance_type?: InstanceType;
|
|
266
|
-
start_time: string;
|
|
267
|
-
end_time: string;
|
|
268
|
-
}
|
|
269
|
-
export interface CheckoutCreateRequest {
|
|
270
|
-
amount: number;
|
|
271
|
-
success_url: string;
|
|
272
|
-
cancel_url: string;
|
|
273
|
-
}
|
|
274
|
-
export interface CheckoutCompleteRequest {
|
|
275
|
-
session_id: string;
|
|
276
|
-
}
|
|
277
260
|
/**
|
|
278
|
-
*
|
|
261
|
+
* ApiAppRunRequest is the request body for /apps/run endpoint.
|
|
262
|
+
* Version pinning is required for stability.
|
|
279
263
|
*/
|
|
280
|
-
export
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}
|
|
294
|
-
export interface CreateApiKeyRequest {
|
|
295
|
-
name: string;
|
|
296
|
-
}
|
|
297
|
-
export interface CreateTaskRequest {
|
|
298
|
-
id?: string;
|
|
299
|
-
app_id: string;
|
|
300
|
-
version_id?: string;
|
|
301
|
-
variant?: string;
|
|
302
|
-
infra: Infra;
|
|
303
|
-
workers: string[];
|
|
264
|
+
export interface ApiAppRunRequest {
|
|
265
|
+
/**
|
|
266
|
+
* App reference in format: namespace/name@shortid (version required)
|
|
267
|
+
* Example: "okaris/flux@abc1"
|
|
268
|
+
* The short ID ensures your code always runs the same version.
|
|
269
|
+
*/
|
|
270
|
+
app: string;
|
|
271
|
+
/**
|
|
272
|
+
* Deprecated: Use namespace/name@shortid format in App field instead.
|
|
273
|
+
*/
|
|
274
|
+
version?: string;
|
|
275
|
+
infra?: Infra;
|
|
276
|
+
workers?: string[];
|
|
304
277
|
webhook?: string;
|
|
278
|
+
setup?: any;
|
|
305
279
|
input: any;
|
|
306
|
-
|
|
307
|
-
|
|
280
|
+
/**
|
|
281
|
+
* If true, returns SSE stream instead of JSON response
|
|
282
|
+
*/
|
|
283
|
+
stream?: boolean;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* ApiTaskRequest is an alias for ApiAppRunRequest (deprecated name)
|
|
287
|
+
*/
|
|
288
|
+
export type ApiTaskRequest = ApiAppRunRequest;
|
|
289
|
+
/**
|
|
290
|
+
* ApiAgentRunRequest is the request body for /agents/run endpoint.
|
|
291
|
+
* Supports both template agents and ad-hoc agents.
|
|
292
|
+
*/
|
|
293
|
+
export interface ApiAgentRunRequest {
|
|
294
|
+
/**
|
|
295
|
+
* Existing chat ID to continue a conversation (optional)
|
|
296
|
+
*/
|
|
308
297
|
chat_id?: string;
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
298
|
+
/**
|
|
299
|
+
* Template agent reference in format: namespace/name@shortid
|
|
300
|
+
* Example: "my-org/assistant@abc123"
|
|
301
|
+
* Use this OR core_app, not both
|
|
302
|
+
*/
|
|
303
|
+
agent?: string;
|
|
304
|
+
/**
|
|
305
|
+
* Core LLM app reference for ad-hoc agents in format: namespace/name@shortid
|
|
306
|
+
* Example: "infsh/claude-sonnet-4@1195p4sq"
|
|
307
|
+
* Use this for ad-hoc agents (without a saved template)
|
|
308
|
+
*/
|
|
309
|
+
core_app?: string;
|
|
310
|
+
/**
|
|
311
|
+
* LLM parameters for ad-hoc agents (temperature, top_p, context_size, etc.)
|
|
312
|
+
*/
|
|
313
|
+
core_app_input?: any;
|
|
314
|
+
/**
|
|
315
|
+
* Agent configuration for ad-hoc agents
|
|
316
|
+
*/
|
|
317
|
+
name?: string;
|
|
318
|
+
description?: string;
|
|
319
|
+
system_prompt?: string;
|
|
320
|
+
example_prompts?: string[];
|
|
321
|
+
/**
|
|
322
|
+
* Tools configuration for ad-hoc agents
|
|
323
|
+
*/
|
|
324
|
+
tools?: (AgentTool | undefined)[];
|
|
325
|
+
internal_tools?: InternalToolsConfig;
|
|
326
|
+
/**
|
|
327
|
+
* The message to send
|
|
328
|
+
*/
|
|
329
|
+
input: ChatTaskInput;
|
|
330
|
+
/**
|
|
331
|
+
* If true, returns SSE stream instead of JSON response
|
|
332
|
+
*/
|
|
333
|
+
stream?: boolean;
|
|
313
334
|
}
|
|
335
|
+
/**
|
|
336
|
+
* ApiAgentMessageRequest is an alias for ApiAgentRunRequest (deprecated name)
|
|
337
|
+
*/
|
|
338
|
+
export type ApiAgentMessageRequest = ApiAgentRunRequest;
|
|
314
339
|
export interface CreateAgentMessageRequest {
|
|
315
340
|
chat_id?: string;
|
|
316
341
|
agent_id?: string;
|
|
317
342
|
agent_version_id?: string;
|
|
343
|
+
agent?: string;
|
|
318
344
|
tool_call_id?: string;
|
|
319
345
|
input: ChatTaskInput;
|
|
320
346
|
integration_context?: IntegrationContext;
|
|
347
|
+
/**
|
|
348
|
+
* Ad-hoc agent config - use this instead of Agent for embedded configs
|
|
349
|
+
* If provided, creates a chat with this config directly (no agent reference)
|
|
350
|
+
*/
|
|
351
|
+
agent_config?: AgentRuntimeConfig;
|
|
352
|
+
}
|
|
353
|
+
export interface CreateChatMessageResponse {
|
|
354
|
+
user_message?: ChatMessageDTO;
|
|
355
|
+
assistant_message?: ChatMessageDTO;
|
|
321
356
|
}
|
|
322
357
|
/**
|
|
323
358
|
* WidgetActionRequest represents a user's response to a widget
|
|
@@ -343,12 +378,6 @@ export interface HookPayload {
|
|
|
343
378
|
*/
|
|
344
379
|
tool_invocation_id: string;
|
|
345
380
|
hook_name: string;
|
|
346
|
-
/**
|
|
347
|
-
* Context
|
|
348
|
-
*/
|
|
349
|
-
chat_id: string;
|
|
350
|
-
agent_id?: string;
|
|
351
|
-
agent_version_id?: string;
|
|
352
381
|
/**
|
|
353
382
|
* Callback - use this to submit the result back
|
|
354
383
|
*/
|
|
@@ -374,57 +403,6 @@ export interface HookResponse {
|
|
|
374
403
|
success: boolean;
|
|
375
404
|
message?: string;
|
|
376
405
|
}
|
|
377
|
-
export interface ApiTaskRequest {
|
|
378
|
-
app: string;
|
|
379
|
-
version?: string;
|
|
380
|
-
variant?: string;
|
|
381
|
-
infra?: Infra;
|
|
382
|
-
workers?: string[];
|
|
383
|
-
webhook?: string;
|
|
384
|
-
input: any;
|
|
385
|
-
}
|
|
386
|
-
export interface CreateFlowRequest {
|
|
387
|
-
name: string;
|
|
388
|
-
}
|
|
389
|
-
export interface CreateFlowRunRequest {
|
|
390
|
-
flow: string;
|
|
391
|
-
input: any;
|
|
392
|
-
}
|
|
393
|
-
/**
|
|
394
|
-
* Request/Response Types
|
|
395
|
-
*/
|
|
396
|
-
export interface EngineAPIRequest {
|
|
397
|
-
data: {
|
|
398
|
-
[key: string]: any;
|
|
399
|
-
};
|
|
400
|
-
metadata: EngineAPIRequestMetadata;
|
|
401
|
-
}
|
|
402
|
-
export interface WorkerAPIRequest {
|
|
403
|
-
input: {
|
|
404
|
-
[key: string]: any;
|
|
405
|
-
};
|
|
406
|
-
metadata: WorkerAPIRequestMetadata;
|
|
407
|
-
}
|
|
408
|
-
export interface EngineAPIRequestMetadata {
|
|
409
|
-
worker_id: string;
|
|
410
|
-
app_id: string;
|
|
411
|
-
app_version_id: string;
|
|
412
|
-
app_variant: string;
|
|
413
|
-
gpu_ids: string[];
|
|
414
|
-
task_id: string;
|
|
415
|
-
}
|
|
416
|
-
export interface WorkerAPIRequestMetadata {
|
|
417
|
-
worker_id: string;
|
|
418
|
-
app_id: string;
|
|
419
|
-
app_version_id: string;
|
|
420
|
-
app_variant: string;
|
|
421
|
-
gpu_ids: string[];
|
|
422
|
-
task_id: string;
|
|
423
|
-
}
|
|
424
|
-
export interface AppsGetResponse {
|
|
425
|
-
apps: App[];
|
|
426
|
-
total: number;
|
|
427
|
-
}
|
|
428
406
|
export interface PartialFile {
|
|
429
407
|
uri: string;
|
|
430
408
|
path?: string;
|
|
@@ -435,209 +413,26 @@ export interface PartialFile {
|
|
|
435
413
|
export interface FileCreateRequest {
|
|
436
414
|
files: PartialFile[];
|
|
437
415
|
}
|
|
438
|
-
export interface
|
|
439
|
-
|
|
440
|
-
user_env: any;
|
|
416
|
+
export interface CreateFlowRequest {
|
|
417
|
+
name: string;
|
|
441
418
|
}
|
|
442
|
-
export interface
|
|
443
|
-
|
|
444
|
-
|
|
419
|
+
export interface CreateFlowRunRequest {
|
|
420
|
+
flow: string;
|
|
421
|
+
input: any;
|
|
445
422
|
}
|
|
446
|
-
export interface
|
|
447
|
-
tasks_queued: number;
|
|
448
|
-
tasks_processed: number;
|
|
449
|
-
tasks_failed: number;
|
|
450
|
-
processing_errors: number;
|
|
451
|
-
last_error?: string;
|
|
452
|
-
last_error_time?: string;
|
|
453
|
-
queue_metrics?: QueueMetrics[];
|
|
454
|
-
updated_at: string;
|
|
455
|
-
}
|
|
456
|
-
export interface QueueMetrics {
|
|
457
|
-
enqueued: number;
|
|
458
|
-
dequeued: number;
|
|
459
|
-
expired: number;
|
|
460
|
-
dlq: number;
|
|
461
|
-
in_flight: number;
|
|
462
|
-
}
|
|
463
|
-
export interface PageCreateRequest {
|
|
464
|
-
title: string;
|
|
465
|
-
content: string;
|
|
466
|
-
excerpt: string;
|
|
467
|
-
status: PageStatus;
|
|
468
|
-
metadata: PageMetadata;
|
|
469
|
-
slug: string;
|
|
470
|
-
visibility: Visibility;
|
|
471
|
-
is_featured: boolean;
|
|
472
|
-
}
|
|
473
|
-
export type PageUpdateRequest = PageCreateRequest;
|
|
474
|
-
export interface CommentCreateRequest {
|
|
475
|
-
page_id: string;
|
|
476
|
-
content: string;
|
|
477
|
-
}
|
|
478
|
-
export type CommentUpdateRequest = CommentCreateRequest;
|
|
479
|
-
export interface MenuCreateRequest {
|
|
480
|
-
name: string;
|
|
481
|
-
slug: string;
|
|
482
|
-
description: string;
|
|
483
|
-
items: MenuItem[];
|
|
484
|
-
}
|
|
485
|
-
export type MenuUpdateRequest = MenuCreateRequest;
|
|
486
|
-
export interface TransactionCreateRequest {
|
|
487
|
-
user_id: string;
|
|
488
|
-
team_id: string;
|
|
489
|
-
type: TransactionType;
|
|
423
|
+
export interface CheckoutCreateRequest {
|
|
490
424
|
amount: number;
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
metadata: {
|
|
494
|
-
[key: string]: any;
|
|
495
|
-
};
|
|
496
|
-
}
|
|
497
|
-
export interface PublicEnginesForResourcesRequest {
|
|
498
|
-
resources: AppResources;
|
|
499
|
-
}
|
|
500
|
-
export interface PublicEnginesForResourcesResponse {
|
|
501
|
-
can_run: boolean;
|
|
502
|
-
min_price: number;
|
|
503
|
-
max_price: number;
|
|
504
|
-
error?: string;
|
|
505
|
-
}
|
|
506
|
-
export interface EnginesForResourcesRequest {
|
|
507
|
-
resources: AppResources;
|
|
508
|
-
}
|
|
509
|
-
export interface PrivateEngineResponse {
|
|
510
|
-
workers: WorkerStateSummary[];
|
|
511
|
-
}
|
|
512
|
-
export interface CloudEngineResponse {
|
|
513
|
-
can_run: boolean;
|
|
514
|
-
min_price: number;
|
|
515
|
-
max_price: number;
|
|
516
|
-
}
|
|
517
|
-
export interface EnginesForResourcesResponse {
|
|
518
|
-
private: PrivateEngineResponse;
|
|
519
|
-
cloud: CloudEngineResponse;
|
|
520
|
-
error?: string;
|
|
521
|
-
}
|
|
522
|
-
export interface TeamCreateRequest {
|
|
523
|
-
name: string;
|
|
524
|
-
username: string;
|
|
525
|
-
email: string;
|
|
526
|
-
}
|
|
527
|
-
export interface FeatureTaskRequest {
|
|
528
|
-
is_featured: boolean;
|
|
529
|
-
}
|
|
530
|
-
export interface TeamMemberAddRequest {
|
|
531
|
-
email: string;
|
|
532
|
-
role: TeamRole;
|
|
533
|
-
}
|
|
534
|
-
export interface TeamMemberUpdateRoleRequest {
|
|
535
|
-
role: TeamRole;
|
|
536
|
-
}
|
|
537
|
-
/**
|
|
538
|
-
* HandleSlackEventRequest models the outer event envelope and its inner event ("event") as received from Slack Events API.
|
|
539
|
-
* It is designed for maximum compatibility with the event_callback style JSON, url_verification, and app_rate_limited events.
|
|
540
|
-
*/
|
|
541
|
-
export interface HandleSlackEventRequest {
|
|
542
|
-
type: string;
|
|
543
|
-
token: string;
|
|
544
|
-
team_id?: string;
|
|
545
|
-
api_app_id?: string;
|
|
546
|
-
event?: any;
|
|
547
|
-
authed_users?: string[];
|
|
548
|
-
authed_teams?: string[];
|
|
549
|
-
authorizations?: SlackEventAuthorization[];
|
|
550
|
-
event_context?: string;
|
|
551
|
-
event_id?: string;
|
|
552
|
-
event_time?: number;
|
|
553
|
-
challenge?: string;
|
|
554
|
-
is_ext_shared_channel?: boolean;
|
|
555
|
-
context_team_id?: string;
|
|
556
|
-
context_enterprise_id?: string;
|
|
557
|
-
/**
|
|
558
|
-
* App Rate Limiting
|
|
559
|
-
*/
|
|
560
|
-
minute_rate_limited?: number;
|
|
561
|
-
}
|
|
562
|
-
export interface SlackEventAuthorization {
|
|
563
|
-
enterprise_id?: string;
|
|
564
|
-
team_id: string;
|
|
565
|
-
user_id: string;
|
|
566
|
-
is_bot: boolean;
|
|
567
|
-
is_enterprise_install?: boolean;
|
|
568
|
-
}
|
|
569
|
-
/**
|
|
570
|
-
* Example: define inner events you want to care about and unmarshal HandleSlackEventRequest.Event as needed.
|
|
571
|
-
* Common message event payload, not all fields are present for all types.
|
|
572
|
-
*/
|
|
573
|
-
export interface SlackMessageEvent {
|
|
574
|
-
type: string;
|
|
575
|
-
subtype?: string;
|
|
576
|
-
channel?: string;
|
|
577
|
-
user?: string;
|
|
578
|
-
text?: string;
|
|
579
|
-
ts?: string;
|
|
580
|
-
event_ts?: string;
|
|
581
|
-
thread_ts?: string;
|
|
582
|
-
bot_id?: string;
|
|
583
|
-
bot_profile?: {
|
|
584
|
-
id?: string;
|
|
585
|
-
};
|
|
586
|
-
}
|
|
587
|
-
/**
|
|
588
|
-
* SlackThreadMessage represents a message from a Slack thread (from conversations.replies)
|
|
589
|
-
*/
|
|
590
|
-
export interface SlackThreadMessage {
|
|
591
|
-
type: string;
|
|
592
|
-
subtype?: string;
|
|
593
|
-
user?: string;
|
|
594
|
-
text?: string;
|
|
595
|
-
ts?: string;
|
|
596
|
-
thread_ts?: string;
|
|
597
|
-
parent_user_id?: string;
|
|
598
|
-
bot_id?: string;
|
|
599
|
-
bot_profile?: {
|
|
600
|
-
id?: string;
|
|
601
|
-
name?: string;
|
|
602
|
-
};
|
|
603
|
-
}
|
|
604
|
-
export interface ProjectCreateRequest {
|
|
605
|
-
name: string;
|
|
606
|
-
type: ProjectType;
|
|
607
|
-
}
|
|
608
|
-
export interface ProjectUpdateRequest {
|
|
609
|
-
name: string;
|
|
610
|
-
}
|
|
611
|
-
export interface MoveAgentToProjectRequest {
|
|
612
|
-
agent_id: string;
|
|
613
|
-
project_id: string;
|
|
614
|
-
}
|
|
615
|
-
/**
|
|
616
|
-
* CELEvalRequest is the request for evaluating CEL expressions
|
|
617
|
-
*/
|
|
618
|
-
export interface CELEvalRequest {
|
|
619
|
-
pricing: AppPricing;
|
|
620
|
-
output_meta?: OutputMeta;
|
|
621
|
-
resource_cost: number;
|
|
622
|
-
resource_ms: number;
|
|
425
|
+
success_url: string;
|
|
426
|
+
cancel_url: string;
|
|
623
427
|
}
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
*/
|
|
627
|
-
export interface CELEvalResult {
|
|
628
|
-
value: number;
|
|
629
|
-
error?: string;
|
|
428
|
+
export interface CheckoutCompleteRequest {
|
|
429
|
+
session_id: string;
|
|
630
430
|
}
|
|
631
431
|
/**
|
|
632
|
-
*
|
|
432
|
+
* Legacy aliases for backward compatibility
|
|
633
433
|
*/
|
|
634
|
-
export
|
|
635
|
-
|
|
636
|
-
royalty_fee: CELEvalResult;
|
|
637
|
-
partner_fee: CELEvalResult;
|
|
638
|
-
total: CELEvalResult;
|
|
639
|
-
description: string;
|
|
640
|
-
}
|
|
434
|
+
export type StripeCheckoutCreateRequest = CheckoutCreateRequest;
|
|
435
|
+
export type StripeCheckoutCompleteRequest = CheckoutCompleteRequest;
|
|
641
436
|
/**
|
|
642
437
|
* DeviceAuthResponse is returned when a device initiates auth
|
|
643
438
|
*/
|
|
@@ -687,6 +482,25 @@ export interface MeResponse {
|
|
|
687
482
|
user?: UserDTO;
|
|
688
483
|
team?: TeamDTO;
|
|
689
484
|
}
|
|
485
|
+
export interface TeamCreateRequest {
|
|
486
|
+
name: string;
|
|
487
|
+
username: string;
|
|
488
|
+
email: string;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* TeamSetupRequest is used for completing team setup (choosing username)
|
|
492
|
+
* This marks the team as setup_completed=true after validation
|
|
493
|
+
*/
|
|
494
|
+
export interface TeamSetupRequest {
|
|
495
|
+
username: string;
|
|
496
|
+
}
|
|
497
|
+
export interface TeamMemberAddRequest {
|
|
498
|
+
email: string;
|
|
499
|
+
role: TeamRole;
|
|
500
|
+
}
|
|
501
|
+
export interface TeamMemberUpdateRoleRequest {
|
|
502
|
+
role: TeamRole;
|
|
503
|
+
}
|
|
690
504
|
/**
|
|
691
505
|
* SecretCreateRequest for creating a new secret
|
|
692
506
|
*/
|
|
@@ -713,6 +527,12 @@ export interface IntegrationConnectRequest {
|
|
|
713
527
|
* For API Key type
|
|
714
528
|
*/
|
|
715
529
|
api_key?: string;
|
|
530
|
+
/**
|
|
531
|
+
* For BYOK integrations (e.g., X.com) - contains user-provided credentials
|
|
532
|
+
*/
|
|
533
|
+
metadata?: {
|
|
534
|
+
[key: string]: any;
|
|
535
|
+
};
|
|
716
536
|
}
|
|
717
537
|
/**
|
|
718
538
|
* IntegrationCompleteOAuthRequest for completing an OAuth flow
|
|
@@ -722,6 +542,10 @@ export interface IntegrationCompleteOAuthRequest {
|
|
|
722
542
|
type: string;
|
|
723
543
|
code: string;
|
|
724
544
|
state: string;
|
|
545
|
+
/**
|
|
546
|
+
* For PKCE - code_verifier to complete the exchange (required by some providers like X/Twitter)
|
|
547
|
+
*/
|
|
548
|
+
code_verifier?: string;
|
|
725
549
|
}
|
|
726
550
|
/**
|
|
727
551
|
* IntegrationConnectResponse after connecting
|
|
@@ -736,30 +560,26 @@ export interface IntegrationConnectResponse {
|
|
|
736
560
|
* For OAuth - state to be returned with the callback (frontend stores this)
|
|
737
561
|
*/
|
|
738
562
|
state?: string;
|
|
563
|
+
/**
|
|
564
|
+
* For PKCE - code_verifier to be stored and sent back with CompleteOAuth (required by some providers like X/Twitter)
|
|
565
|
+
*/
|
|
566
|
+
code_verifier?: string;
|
|
739
567
|
/**
|
|
740
568
|
* For service accounts - instructions
|
|
741
569
|
*/
|
|
742
570
|
instructions?: string;
|
|
743
571
|
}
|
|
744
|
-
export interface
|
|
745
|
-
BaseModel: BaseModel;
|
|
746
|
-
PermissionModel: PermissionModel;
|
|
572
|
+
export interface ProjectCreateRequest {
|
|
747
573
|
name: string;
|
|
748
|
-
|
|
749
|
-
last_used_at: string;
|
|
574
|
+
type: ProjectType;
|
|
750
575
|
}
|
|
751
|
-
export interface
|
|
576
|
+
export interface ProjectUpdateRequest {
|
|
752
577
|
name: string;
|
|
753
|
-
key: string;
|
|
754
|
-
last_used_at: string;
|
|
755
578
|
}
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
export declare const AppStatusActive: AppStatus;
|
|
761
|
-
export declare const AppStatusInactive: AppStatus;
|
|
762
|
-
export declare const AppStatusPending: AppStatus;
|
|
579
|
+
export interface MoveAgentToProjectRequest {
|
|
580
|
+
agent_id: string;
|
|
581
|
+
project_id: string;
|
|
582
|
+
}
|
|
763
583
|
export type AppCategory = string;
|
|
764
584
|
export declare const AppCategoryImage: AppCategory;
|
|
765
585
|
export declare const AppCategoryVideo: AppCategory;
|
|
@@ -784,56 +604,31 @@ export interface AppImages {
|
|
|
784
604
|
export interface App {
|
|
785
605
|
BaseModel: BaseModel;
|
|
786
606
|
PermissionModel: PermissionModel;
|
|
607
|
+
/**
|
|
608
|
+
* Namespace is copied from team.username at creation time and is IMMUTABLE.
|
|
609
|
+
* This ensures stable references like "namespace/name" even if team username changes.
|
|
610
|
+
* Default empty string allows GORM migration to add column, then MigrateAppNamespaces populates it.
|
|
611
|
+
*/
|
|
612
|
+
namespace: string;
|
|
613
|
+
/**
|
|
614
|
+
* Name is IMMUTABLE after creation. Combined with Namespace forms unique identifier.
|
|
615
|
+
*/
|
|
787
616
|
name: string;
|
|
788
617
|
description: string;
|
|
789
618
|
agent_description: string;
|
|
619
|
+
/**
|
|
620
|
+
* Category is a fundamental classification of the app (image, video, audio, text, chat, 3d, other)
|
|
621
|
+
*/
|
|
790
622
|
category: AppCategory;
|
|
791
|
-
page_id?: string;
|
|
792
|
-
license: string;
|
|
793
|
-
license_mandatory: boolean;
|
|
794
|
-
needs_hf_token: boolean;
|
|
795
|
-
hf_model_url: string;
|
|
796
|
-
commercial: boolean;
|
|
797
|
-
status: AppStatus;
|
|
798
|
-
is_featured: boolean;
|
|
799
|
-
is_verified: boolean;
|
|
800
|
-
rank: number;
|
|
801
|
-
images: AppImages;
|
|
802
|
-
version_id: string;
|
|
803
|
-
version?: AppVersion;
|
|
804
|
-
allows_private_workers: boolean;
|
|
805
|
-
allows_cloud_workers: boolean;
|
|
806
|
-
fees: AppFees;
|
|
807
|
-
}
|
|
808
|
-
/**
|
|
809
|
-
* AppPricing configures all pricing using CEL expressions
|
|
810
|
-
* CEL context includes: inputs, outputs, prices, resource_cost
|
|
811
|
-
* Empty expressions are skipped (evaluate to 0)
|
|
812
|
-
*/
|
|
813
|
-
export interface AppPricing {
|
|
814
|
-
prices: {
|
|
815
|
-
[key: string]: number;
|
|
816
|
-
};
|
|
817
623
|
/**
|
|
818
|
-
*
|
|
819
|
-
* Available variables: inputs, outputs, prices, resource_cost
|
|
624
|
+
* Developer's images
|
|
820
625
|
*/
|
|
821
|
-
|
|
822
|
-
royalty_expression: string;
|
|
823
|
-
partner_expression: string;
|
|
626
|
+
images: AppImages;
|
|
824
627
|
/**
|
|
825
|
-
*
|
|
826
|
-
* Available variables: inputs, outputs, prices, resource_cost, inference_fee, royalty_fee, partner_fee
|
|
827
|
-
* If empty, defaults to: resource_cost + inference_fee + royalty_fee + partner_fee
|
|
628
|
+
* Current version (developer's latest)
|
|
828
629
|
*/
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
}
|
|
832
|
-
/**
|
|
833
|
-
* AppFees contains pricing configuration for an app
|
|
834
|
-
*/
|
|
835
|
-
export interface AppFees {
|
|
836
|
-
app_pricing: AppPricing;
|
|
630
|
+
version_id: string;
|
|
631
|
+
version?: AppVersion;
|
|
837
632
|
}
|
|
838
633
|
export interface AppGPUResource {
|
|
839
634
|
count: number;
|
|
@@ -855,102 +650,69 @@ export interface AppVariant {
|
|
|
855
650
|
}
|
|
856
651
|
export interface AppVersion {
|
|
857
652
|
BaseModel: BaseModel;
|
|
653
|
+
/**
|
|
654
|
+
* ShortID is a human-friendly version identifier (e.g., "abc123")
|
|
655
|
+
* Unique within the app, used in references like "namespace/app@abc123"
|
|
656
|
+
*/
|
|
657
|
+
short_id: string;
|
|
858
658
|
app_id: string;
|
|
859
|
-
|
|
860
|
-
[key: string]:
|
|
659
|
+
metadata: {
|
|
660
|
+
[key: string]: any;
|
|
861
661
|
};
|
|
862
662
|
repository: string;
|
|
863
663
|
flow_id?: string;
|
|
864
664
|
flow?: Flow;
|
|
665
|
+
setup_schema: any;
|
|
865
666
|
input_schema: any;
|
|
866
667
|
output_schema: any;
|
|
867
|
-
metadata: {
|
|
868
|
-
[key: string]: any;
|
|
869
|
-
};
|
|
870
|
-
/**
|
|
871
|
-
* App requirements - secrets and integrations needed to run this app
|
|
872
|
-
*/
|
|
873
|
-
required_secrets?: SecretRequirement[];
|
|
874
|
-
required_integrations?: IntegrationRequirement[];
|
|
875
|
-
}
|
|
876
|
-
export interface AppConfig {
|
|
877
|
-
name: string;
|
|
878
|
-
description: string;
|
|
879
|
-
category: AppCategory;
|
|
880
|
-
status: AppStatus;
|
|
881
|
-
images: AppImages;
|
|
882
|
-
input_schema: any;
|
|
883
|
-
output_schema: any;
|
|
884
|
-
metadata: {
|
|
885
|
-
[key: string]: any;
|
|
886
|
-
};
|
|
887
668
|
variants: {
|
|
888
669
|
[key: string]: AppVariant;
|
|
889
670
|
};
|
|
671
|
+
env: {
|
|
672
|
+
[key: string]: string;
|
|
673
|
+
};
|
|
674
|
+
kernel: string;
|
|
890
675
|
/**
|
|
891
|
-
* App requirements -
|
|
676
|
+
* App requirements - secrets and integrations needed to run this app
|
|
892
677
|
*/
|
|
893
678
|
required_secrets?: SecretRequirement[];
|
|
894
679
|
required_integrations?: IntegrationRequirement[];
|
|
895
|
-
|
|
896
|
-
export interface LicenseRecord {
|
|
897
|
-
id: string;
|
|
898
|
-
created_at: string;
|
|
899
|
-
updated_at: string;
|
|
900
|
-
deleted_at?: string;
|
|
901
|
-
user_id: string;
|
|
902
|
-
app_id: string;
|
|
903
|
-
license: string;
|
|
680
|
+
resources: AppResources;
|
|
904
681
|
}
|
|
905
682
|
export interface AppDTO extends BaseModel, PermissionModelDTO {
|
|
683
|
+
namespace: string;
|
|
906
684
|
name: string;
|
|
907
685
|
description: string;
|
|
908
686
|
agent_description: string;
|
|
909
687
|
category: AppCategory;
|
|
910
|
-
page_id?: string;
|
|
911
|
-
license: string;
|
|
912
|
-
license_mandatory: boolean;
|
|
913
|
-
needs_hf_token: boolean;
|
|
914
|
-
hf_model_url: string;
|
|
915
|
-
commercial: boolean;
|
|
916
|
-
status: AppStatus;
|
|
917
|
-
is_featured: boolean;
|
|
918
|
-
is_verified: boolean;
|
|
919
|
-
rank: number;
|
|
920
688
|
images: AppImages;
|
|
921
689
|
version_id: string;
|
|
922
690
|
version?: AppVersionDTO;
|
|
923
|
-
variants: {
|
|
924
|
-
[key: string]: AppVariant;
|
|
925
|
-
};
|
|
926
|
-
fees: AppFees;
|
|
927
|
-
allows_private_workers: boolean;
|
|
928
|
-
allows_cloud_workers: boolean;
|
|
929
691
|
}
|
|
930
692
|
export interface AppVersionDTO extends BaseModel {
|
|
931
|
-
|
|
932
|
-
|
|
693
|
+
short_id: string;
|
|
694
|
+
metadata: {
|
|
695
|
+
[key: string]: any;
|
|
933
696
|
};
|
|
934
697
|
repository: string;
|
|
935
698
|
flow?: FlowDTO;
|
|
699
|
+
setup_schema: any;
|
|
936
700
|
input_schema: any;
|
|
937
701
|
output_schema: any;
|
|
938
|
-
|
|
939
|
-
[key: string]:
|
|
702
|
+
variants: {
|
|
703
|
+
[key: string]: AppVariant;
|
|
704
|
+
};
|
|
705
|
+
env: {
|
|
706
|
+
[key: string]: string;
|
|
940
707
|
};
|
|
708
|
+
kernel: string;
|
|
941
709
|
/**
|
|
942
710
|
* App requirements
|
|
943
711
|
*/
|
|
944
712
|
required_secrets?: SecretRequirement[];
|
|
945
713
|
required_integrations?: IntegrationRequirement[];
|
|
714
|
+
resources: AppResources;
|
|
946
715
|
}
|
|
947
|
-
export interface ChatModelCapabilities {
|
|
948
|
-
Image: boolean;
|
|
949
|
-
Images: boolean;
|
|
950
|
-
Files: boolean;
|
|
951
|
-
Reasoning: boolean;
|
|
952
|
-
}
|
|
953
|
-
export type Model = any;
|
|
954
716
|
export interface BaseModel {
|
|
955
717
|
id: string;
|
|
956
718
|
created_at: string;
|
|
@@ -964,7 +726,6 @@ export type Visibility = string;
|
|
|
964
726
|
export declare const VisibilityPrivate: Visibility;
|
|
965
727
|
export declare const VisibilityPublic: Visibility;
|
|
966
728
|
export declare const VisibilityUnlisted: Visibility;
|
|
967
|
-
export type Permissioned = any;
|
|
968
729
|
export interface PermissionModel {
|
|
969
730
|
user_id: string;
|
|
970
731
|
user?: User;
|
|
@@ -979,386 +740,82 @@ export interface PermissionModelDTO {
|
|
|
979
740
|
team?: TeamRelationDTO;
|
|
980
741
|
visibility: Visibility;
|
|
981
742
|
}
|
|
982
|
-
export
|
|
983
|
-
export declare const
|
|
984
|
-
export
|
|
985
|
-
Role: Role;
|
|
986
|
-
UserID: string;
|
|
987
|
-
TeamID: string;
|
|
988
|
-
}
|
|
989
|
-
/**
|
|
990
|
-
* Versioned interface for optimistic locking
|
|
991
|
-
*/
|
|
992
|
-
export type Versioned = any;
|
|
743
|
+
export type ChatStatus = string;
|
|
744
|
+
export declare const ChatStatusBusy: ChatStatus;
|
|
745
|
+
export declare const ChatStatusIdle: ChatStatus;
|
|
993
746
|
/**
|
|
994
|
-
*
|
|
747
|
+
* ChatStatusWaitingInput ChatStatus = "waiting_input"
|
|
995
748
|
*/
|
|
996
|
-
export
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
export interface EncryptedModel {
|
|
1001
|
-
user_public_key: string;
|
|
1002
|
-
/**
|
|
1003
|
-
* PRE key is extremely sensitive, it must be deleted as soon as the task is delivered to the engine
|
|
1004
|
-
*/
|
|
1005
|
-
user_pre_key: string;
|
|
1006
|
-
engine_public_key: string;
|
|
749
|
+
export declare const ChatStatusCompleted: ChatStatus;
|
|
750
|
+
export interface IntegrationContext {
|
|
751
|
+
integration_type?: IntegrationType;
|
|
752
|
+
integration_metadata?: any;
|
|
1007
753
|
}
|
|
1008
754
|
/**
|
|
1009
|
-
*
|
|
755
|
+
* ChatData contains agent-specific data for a chat session
|
|
1010
756
|
*/
|
|
1011
|
-
export interface
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
brand?: string;
|
|
1015
|
-
exp_month?: number;
|
|
1016
|
-
exp_year?: number;
|
|
757
|
+
export interface ChatData {
|
|
758
|
+
plan_steps: PlanStep[];
|
|
759
|
+
memory: StringEncodedMap;
|
|
1017
760
|
}
|
|
1018
761
|
/**
|
|
1019
|
-
*
|
|
1020
|
-
*/
|
|
1021
|
-
export type PaymentProvider = string;
|
|
1022
|
-
export declare const PaymentProviderNone: PaymentProvider;
|
|
1023
|
-
export declare const PaymentProviderStripe: PaymentProvider;
|
|
1024
|
-
export type BillingStatus = string;
|
|
1025
|
-
export declare const BillingStatusActive: BillingStatus;
|
|
1026
|
-
export declare const BillingStatusSpendLocked: BillingStatus;
|
|
1027
|
-
export declare const BillingStatusManualHold: BillingStatus;
|
|
1028
|
-
export declare const BillingStatusSuspended: BillingStatus;
|
|
1029
|
-
/**
|
|
1030
|
-
* Billing holds billing information that can be owned by a user or team
|
|
1031
|
-
* OwnerID is the user ID if no group, or the team/group ID if a group exists
|
|
762
|
+
* PlanStep represents a step in an agent's execution plan
|
|
1032
763
|
*/
|
|
1033
|
-
export interface
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
*/
|
|
1040
|
-
balance: number;
|
|
1041
|
-
/**
|
|
1042
|
-
* Currency code (e.g., "USD")
|
|
1043
|
-
*/
|
|
1044
|
-
currency: string;
|
|
764
|
+
export interface PlanStep {
|
|
765
|
+
index: number;
|
|
766
|
+
title: string;
|
|
767
|
+
description: string;
|
|
768
|
+
notes?: string;
|
|
769
|
+
status: PlanStepStatus;
|
|
1045
770
|
}
|
|
1046
771
|
/**
|
|
1047
|
-
*
|
|
772
|
+
* PlanStepStatus represents the status of a plan step
|
|
1048
773
|
*/
|
|
1049
|
-
export
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
774
|
+
export type PlanStepStatus = string;
|
|
775
|
+
export declare const PlanStepStatusPending: PlanStepStatus;
|
|
776
|
+
export declare const PlanStepStatusInProgress: PlanStepStatus;
|
|
777
|
+
export declare const PlanStepStatusCompleted: PlanStepStatus;
|
|
778
|
+
export declare const PlanStepStatusCancelled: PlanStepStatus;
|
|
779
|
+
export type ChatMessageRole = string;
|
|
780
|
+
export declare const ChatMessageRoleSystem: ChatMessageRole;
|
|
781
|
+
export declare const ChatMessageRoleUser: ChatMessageRole;
|
|
782
|
+
export declare const ChatMessageRoleAssistant: ChatMessageRole;
|
|
783
|
+
export declare const ChatMessageRoleTool: ChatMessageRole;
|
|
784
|
+
export type ChatMessageContentType = string;
|
|
785
|
+
export declare const ChatMessageContentTypeText: ChatMessageContentType;
|
|
786
|
+
export declare const ChatMessageContentTypeReasoning: ChatMessageContentType;
|
|
787
|
+
export declare const ChatMessageContentTypeImage: ChatMessageContentType;
|
|
788
|
+
export declare const ChatMessageContentTypeFile: ChatMessageContentType;
|
|
789
|
+
export declare const ChatMessageContentTypeTool: ChatMessageContentType;
|
|
790
|
+
export type IntegrationType = string;
|
|
791
|
+
export declare const IntegrationTypeSlack: IntegrationType;
|
|
792
|
+
export declare const IntegrationTypeDiscord: IntegrationType;
|
|
793
|
+
export declare const IntegrationTypeTeams: IntegrationType;
|
|
794
|
+
export declare const IntegrationTypeTelegram: IntegrationType;
|
|
795
|
+
export interface ChatMessageContent {
|
|
796
|
+
type: ChatMessageContentType;
|
|
797
|
+
error?: string;
|
|
798
|
+
text?: string;
|
|
799
|
+
image?: string;
|
|
800
|
+
file?: string;
|
|
801
|
+
tool_calls?: ToolCall[];
|
|
1053
802
|
}
|
|
1054
803
|
/**
|
|
1055
|
-
*
|
|
804
|
+
* ToolCall represents a tool call from an LLM response (wire format)
|
|
805
|
+
* This is a transport object for parsing LLM responses, not a database model
|
|
1056
806
|
*/
|
|
1057
|
-
export interface
|
|
1058
|
-
|
|
807
|
+
export interface ToolCall {
|
|
808
|
+
id: string;
|
|
809
|
+
type: string;
|
|
810
|
+
function: ToolCallFunction;
|
|
1059
811
|
}
|
|
1060
812
|
/**
|
|
1061
|
-
*
|
|
1062
|
-
* Fields align with Stripe's address format for easy integration
|
|
813
|
+
* ToolCallFunction contains the function name and arguments from an LLM tool call
|
|
1063
814
|
*/
|
|
1064
|
-
export interface
|
|
1065
|
-
line1: string;
|
|
1066
|
-
line2: string;
|
|
1067
|
-
city: string;
|
|
1068
|
-
state: string;
|
|
1069
|
-
postal_code: string;
|
|
1070
|
-
country: string;
|
|
1071
|
-
}
|
|
1072
|
-
/**
|
|
1073
|
-
* BillingSettings holds user-editable billing preferences and configuration
|
|
1074
|
-
* Linked to a Billing account via BillingID
|
|
1075
|
-
*/
|
|
1076
|
-
export interface BillingSettings {
|
|
1077
|
-
BaseModel: BaseModel;
|
|
1078
|
-
PermissionModel: PermissionModel;
|
|
1079
|
-
/**
|
|
1080
|
-
* Spending Controls
|
|
1081
|
-
* SpendingLimit is the maximum amount allowed to spend per billing period (in micro-cents, 0 = unlimited)
|
|
1082
|
-
*/
|
|
1083
|
-
spending_limit: number;
|
|
1084
|
-
/**
|
|
1085
|
-
* LowBalanceThreshold triggers alerts when balance drops below this amount (in micro-cents) default to 1 USD
|
|
1086
|
-
*/
|
|
1087
|
-
low_balance_threshold: number;
|
|
1088
|
-
/**
|
|
1089
|
-
* Auto-Recharge Settings
|
|
1090
|
-
*/
|
|
1091
|
-
auto_recharge_enabled: boolean;
|
|
1092
|
-
auto_recharge_amount: number;
|
|
1093
|
-
auto_recharge_threshold: number;
|
|
1094
|
-
/**
|
|
1095
|
-
* Notification Settings
|
|
1096
|
-
*/
|
|
1097
|
-
billing_email: string;
|
|
1098
|
-
low_balance_alerts: boolean;
|
|
1099
|
-
usage_summary_enabled: boolean;
|
|
1100
|
-
usage_summary_interval: string;
|
|
1101
|
-
/**
|
|
1102
|
-
* Business Information (for invoicing)
|
|
1103
|
-
*/
|
|
1104
|
-
company_name: string;
|
|
1105
|
-
tax_id: string;
|
|
1106
|
-
/**
|
|
1107
|
-
* Payment Integration (provider-agnostic)
|
|
1108
|
-
*/
|
|
1109
|
-
payment_provider: PaymentProvider;
|
|
1110
|
-
provider_customer_id: string;
|
|
1111
|
-
payment_method_id?: string;
|
|
1112
|
-
payment_method_label?: string;
|
|
1113
|
-
provider_metadata: {
|
|
1114
|
-
[key: string]: any;
|
|
1115
|
-
};
|
|
1116
|
-
}
|
|
1117
|
-
/**
|
|
1118
|
-
* BillingSettingsDTO is the data transfer object for BillingSettings
|
|
1119
|
-
*/
|
|
1120
|
-
export interface BillingSettingsDTO extends BaseModel, PermissionModelDTO {
|
|
1121
|
-
/**
|
|
1122
|
-
* Spending Controls
|
|
1123
|
-
*/
|
|
1124
|
-
spending_limit: number;
|
|
1125
|
-
low_balance_threshold: number;
|
|
1126
|
-
/**
|
|
1127
|
-
* Auto-Recharge Settings
|
|
1128
|
-
*/
|
|
1129
|
-
auto_recharge_enabled: boolean;
|
|
1130
|
-
auto_recharge_amount: number;
|
|
1131
|
-
auto_recharge_threshold: number;
|
|
1132
|
-
/**
|
|
1133
|
-
* Notification Settings
|
|
1134
|
-
*/
|
|
1135
|
-
billing_email: string;
|
|
1136
|
-
low_balance_alerts: boolean;
|
|
1137
|
-
usage_summary_enabled: boolean;
|
|
1138
|
-
usage_summary_interval: string;
|
|
1139
|
-
/**
|
|
1140
|
-
* Business Information
|
|
1141
|
-
*/
|
|
1142
|
-
company_name: string;
|
|
1143
|
-
tax_id: string;
|
|
1144
|
-
address: Address;
|
|
1145
|
-
/**
|
|
1146
|
-
* Payment Integration (read-only for user, provider-agnostic)
|
|
1147
|
-
*/
|
|
1148
|
-
payment_provider: PaymentProvider;
|
|
1149
|
-
has_payment_method: boolean;
|
|
1150
|
-
payment_method_label?: string;
|
|
1151
|
-
}
|
|
1152
|
-
/**
|
|
1153
|
-
* BillingSettingsUpdateRequest represents the fields a user can update
|
|
1154
|
-
*/
|
|
1155
|
-
export interface BillingSettingsUpdateRequest {
|
|
1156
|
-
/**
|
|
1157
|
-
* Spending Controls
|
|
1158
|
-
*/
|
|
1159
|
-
spending_limit?: number;
|
|
1160
|
-
low_balance_threshold?: number;
|
|
1161
|
-
/**
|
|
1162
|
-
* Auto-Recharge Settings
|
|
1163
|
-
*/
|
|
1164
|
-
auto_recharge_enabled?: boolean;
|
|
1165
|
-
auto_recharge_amount?: number;
|
|
1166
|
-
auto_recharge_threshold?: number;
|
|
1167
|
-
/**
|
|
1168
|
-
* Notification Settings
|
|
1169
|
-
*/
|
|
1170
|
-
billing_email?: string;
|
|
1171
|
-
low_balance_alerts?: boolean;
|
|
1172
|
-
usage_summary_enabled?: boolean;
|
|
1173
|
-
usage_summary_interval?: string;
|
|
1174
|
-
/**
|
|
1175
|
-
* Business Information
|
|
1176
|
-
*/
|
|
1177
|
-
company_name?: string;
|
|
1178
|
-
tax_id?: string;
|
|
1179
|
-
address?: Address;
|
|
1180
|
-
}
|
|
1181
|
-
/**
|
|
1182
|
-
* SetupCheckoutRequest is the request to create a Stripe Checkout session for saving payment methods
|
|
1183
|
-
*/
|
|
1184
|
-
export interface SetupCheckoutRequest {
|
|
1185
|
-
success_url: string;
|
|
1186
|
-
cancel_url: string;
|
|
1187
|
-
}
|
|
1188
|
-
/**
|
|
1189
|
-
* SetupCheckoutResponse is returned when creating a Stripe Checkout session for setup
|
|
1190
|
-
*/
|
|
1191
|
-
export interface SetupCheckoutResponse {
|
|
1192
|
-
session_id: string;
|
|
1193
|
-
session_url: string;
|
|
1194
|
-
}
|
|
1195
|
-
/**
|
|
1196
|
-
* SetupCheckoutCompleteRequest is the request to complete the setup after returning from Stripe
|
|
1197
|
-
*/
|
|
1198
|
-
export interface SetupCheckoutCompleteRequest {
|
|
1199
|
-
session_id: string;
|
|
1200
|
-
}
|
|
1201
|
-
/**
|
|
1202
|
-
* PaymentMethodResponse is the response after successfully saving a payment method
|
|
1203
|
-
*/
|
|
1204
|
-
export interface PaymentMethodResponse {
|
|
1205
|
-
last4: string;
|
|
1206
|
-
brand: string;
|
|
1207
|
-
}
|
|
1208
|
-
export type ChatType = string;
|
|
1209
|
-
export type ChatStatus = string;
|
|
1210
|
-
export declare const ChatStatusBusy: ChatStatus;
|
|
1211
|
-
export declare const ChatStatusIdle: ChatStatus;
|
|
1212
|
-
export interface Chat {
|
|
1213
|
-
BaseModel: BaseModel;
|
|
1214
|
-
PermissionModel: PermissionModel;
|
|
1215
|
-
agent_id?: string;
|
|
1216
|
-
agent_version_id?: string;
|
|
1217
|
-
agent?: Agent;
|
|
1218
|
-
tool_call_id?: string;
|
|
1219
|
-
parent_id?: string;
|
|
1220
|
-
parent?: Chat;
|
|
1221
|
-
children: (Chat | undefined)[];
|
|
1222
|
-
name: string;
|
|
1223
|
-
description: string;
|
|
1224
|
-
chat_messages: ChatMessage[];
|
|
1225
|
-
agent_data: AgentData;
|
|
1226
|
-
status: ChatStatus;
|
|
1227
|
-
integration_context?: IntegrationContext;
|
|
1228
|
-
}
|
|
1229
|
-
export interface IntegrationContext {
|
|
1230
|
-
integration_type?: IntegrationType;
|
|
1231
|
-
integration_metadata?: any;
|
|
1232
|
-
}
|
|
1233
|
-
export interface AgentData {
|
|
1234
|
-
plan_steps: AgentPlanStep[];
|
|
1235
|
-
memory: StringEncodedMap;
|
|
1236
|
-
}
|
|
1237
|
-
export interface AgentPlanStep {
|
|
1238
|
-
index: number;
|
|
1239
|
-
title: string;
|
|
1240
|
-
description: string;
|
|
1241
|
-
notes?: string;
|
|
1242
|
-
status: AgentPlanStepStatus;
|
|
1243
|
-
}
|
|
1244
|
-
export type AgentPlanStepStatus = string;
|
|
1245
|
-
export declare const AgentPlanStepStatusPending: AgentPlanStepStatus;
|
|
1246
|
-
export declare const AgentPlanStepStatusInProgress: AgentPlanStepStatus;
|
|
1247
|
-
export declare const AgentPlanStepStatusCompleted: AgentPlanStepStatus;
|
|
1248
|
-
export declare const AgentPlanStepStatusCancelled: AgentPlanStepStatus;
|
|
1249
|
-
export type ChatMessageRole = string;
|
|
1250
|
-
export declare const ChatMessageRoleSystem: ChatMessageRole;
|
|
1251
|
-
export declare const ChatMessageRoleUser: ChatMessageRole;
|
|
1252
|
-
export declare const ChatMessageRoleAssistant: ChatMessageRole;
|
|
1253
|
-
export declare const ChatMessageRoleTool: ChatMessageRole;
|
|
1254
|
-
export type ChatMessageContentType = string;
|
|
1255
|
-
export declare const ChatMessageContentTypeText: ChatMessageContentType;
|
|
1256
|
-
export declare const ChatMessageContentTypeReasoning: ChatMessageContentType;
|
|
1257
|
-
export declare const ChatMessageContentTypeImage: ChatMessageContentType;
|
|
1258
|
-
export declare const ChatMessageContentTypeFile: ChatMessageContentType;
|
|
1259
|
-
export declare const ChatMessageContentTypeTool: ChatMessageContentType;
|
|
1260
|
-
export type IntegrationType = string;
|
|
1261
|
-
export declare const IntegrationTypeSlack: IntegrationType;
|
|
1262
|
-
export declare const IntegrationTypeDiscord: IntegrationType;
|
|
1263
|
-
export declare const IntegrationTypeTeams: IntegrationType;
|
|
1264
|
-
export declare const IntegrationTypeTelegram: IntegrationType;
|
|
1265
|
-
export interface ChatMessageContent {
|
|
1266
|
-
type: ChatMessageContentType;
|
|
1267
|
-
error?: string;
|
|
1268
|
-
text?: string;
|
|
1269
|
-
image?: string;
|
|
1270
|
-
file?: string;
|
|
1271
|
-
tool_calls?: ToolInvocation[];
|
|
1272
|
-
}
|
|
1273
|
-
export interface ToolInvocationFunction {
|
|
815
|
+
export interface ToolCallFunction {
|
|
1274
816
|
name: string;
|
|
1275
817
|
arguments: StringEncodedMap;
|
|
1276
818
|
}
|
|
1277
|
-
/**
|
|
1278
|
-
* Define an auxiliary struct to avoid recursive UnmarshalJSON calls
|
|
1279
|
-
*/
|
|
1280
|
-
export interface Aux {
|
|
1281
|
-
name: string;
|
|
1282
|
-
arguments: any;
|
|
1283
|
-
}
|
|
1284
|
-
export type ToolInvocationType = string;
|
|
1285
|
-
export declare const ToolInvocationTypeInternal: ToolInvocationType;
|
|
1286
|
-
export declare const ToolInvocationTypeApp: ToolInvocationType;
|
|
1287
|
-
export declare const ToolInvocationTypeAgent: ToolInvocationType;
|
|
1288
|
-
export declare const ToolInvocationTypeWidget: ToolInvocationType;
|
|
1289
|
-
export declare const ToolInvocationTypePlan: ToolInvocationType;
|
|
1290
|
-
export declare const ToolInvocationTypeHook: ToolInvocationType;
|
|
1291
|
-
export declare const ToolInvocationTypeUnknown: ToolInvocationType;
|
|
1292
|
-
export type ToolInvocationStatus = string;
|
|
1293
|
-
export declare const ToolInvocationStatusPending: ToolInvocationStatus;
|
|
1294
|
-
export declare const ToolInvocationStatusInProgress: ToolInvocationStatus;
|
|
1295
|
-
export declare const ToolInvocationStatusAwaitingInput: ToolInvocationStatus;
|
|
1296
|
-
export declare const ToolInvocationStatusCompleted: ToolInvocationStatus;
|
|
1297
|
-
export declare const ToolInvocationStatusFailed: ToolInvocationStatus;
|
|
1298
|
-
export declare const ToolInvocationStatusCancelled: ToolInvocationStatus;
|
|
1299
|
-
export interface AgentToolInvocation {
|
|
1300
|
-
BaseModel: BaseModel;
|
|
1301
|
-
PermissionModel: PermissionModel;
|
|
1302
|
-
chat_message_id: string;
|
|
1303
|
-
tool_invocation_id: string;
|
|
1304
|
-
type: ToolInvocationType;
|
|
1305
|
-
execution_id?: string;
|
|
1306
|
-
function: ToolInvocationFunction;
|
|
1307
|
-
status: ToolInvocationStatus;
|
|
1308
|
-
result?: string;
|
|
1309
|
-
widget?: Widget;
|
|
1310
|
-
plan_steps?: AgentPlanStep[];
|
|
1311
|
-
}
|
|
1312
|
-
export interface AgentToolInvocationDTO extends BaseModel, PermissionModelDTO {
|
|
1313
|
-
chat_message_id: string;
|
|
1314
|
-
tool_invocation_id: string;
|
|
1315
|
-
type: ToolInvocationType;
|
|
1316
|
-
execution_id?: string;
|
|
1317
|
-
function: ToolInvocationFunction;
|
|
1318
|
-
status: ToolInvocationStatus;
|
|
1319
|
-
result?: string;
|
|
1320
|
-
widget?: Widget;
|
|
1321
|
-
plan_steps?: AgentPlanStep[];
|
|
1322
|
-
}
|
|
1323
|
-
/**
|
|
1324
|
-
* This is a transport object, not a database model
|
|
1325
|
-
*/
|
|
1326
|
-
export interface ToolInvocation {
|
|
1327
|
-
id: string;
|
|
1328
|
-
type: string;
|
|
1329
|
-
function: ToolInvocationFunction;
|
|
1330
|
-
}
|
|
1331
|
-
export interface ChatMessage {
|
|
1332
|
-
BaseModel: BaseModel;
|
|
1333
|
-
PermissionModel: PermissionModel;
|
|
1334
|
-
chat_id: string;
|
|
1335
|
-
chat?: Chat;
|
|
1336
|
-
order: number;
|
|
1337
|
-
task_id?: string;
|
|
1338
|
-
task_status?: TaskStatus;
|
|
1339
|
-
role: ChatMessageRole;
|
|
1340
|
-
content: ChatMessageContent[];
|
|
1341
|
-
tools?: Tool[];
|
|
1342
|
-
tool_call_id?: string;
|
|
1343
|
-
tool_invocations?: AgentToolInvocation[];
|
|
1344
|
-
integration_context?: IntegrationContext;
|
|
1345
|
-
}
|
|
1346
|
-
export interface LLMUsage {
|
|
1347
|
-
stop_reason: string;
|
|
1348
|
-
time_to_first_token: number;
|
|
1349
|
-
tokens_per_second: number;
|
|
1350
|
-
prompt_tokens: number;
|
|
1351
|
-
completion_tokens: number;
|
|
1352
|
-
total_tokens: number;
|
|
1353
|
-
reasoning_tokens: number;
|
|
1354
|
-
reasoning_time: number;
|
|
1355
|
-
}
|
|
1356
|
-
export interface ChatTaskOutput {
|
|
1357
|
-
response: string;
|
|
1358
|
-
reasoning?: string;
|
|
1359
|
-
tool_calls?: ToolInvocation[];
|
|
1360
|
-
usage?: LLMUsage;
|
|
1361
|
-
}
|
|
1362
819
|
export interface ChatTaskInput {
|
|
1363
820
|
model?: string;
|
|
1364
821
|
context_size: number;
|
|
@@ -1377,19 +834,6 @@ export interface ChatTaskInput {
|
|
|
1377
834
|
tools?: Tool[];
|
|
1378
835
|
tool_call_id?: string;
|
|
1379
836
|
}
|
|
1380
|
-
export interface BaseLLMInput {
|
|
1381
|
-
app_id: string;
|
|
1382
|
-
app_version_id?: string;
|
|
1383
|
-
app_variant?: string;
|
|
1384
|
-
model?: string;
|
|
1385
|
-
system_prompt: string;
|
|
1386
|
-
tools?: Tool[];
|
|
1387
|
-
context_size: number;
|
|
1388
|
-
temperature?: number;
|
|
1389
|
-
top_p?: number;
|
|
1390
|
-
reasoning_effort?: string;
|
|
1391
|
-
reasoning_max_tokens?: number;
|
|
1392
|
-
}
|
|
1393
837
|
export interface ChatTaskContextMessage {
|
|
1394
838
|
role: ChatMessageRole;
|
|
1395
839
|
text?: string;
|
|
@@ -1399,7 +843,7 @@ export interface ChatTaskContextMessage {
|
|
|
1399
843
|
file?: string;
|
|
1400
844
|
files?: string[];
|
|
1401
845
|
tools?: Tool[];
|
|
1402
|
-
tool_calls?:
|
|
846
|
+
tool_calls?: ToolCall[];
|
|
1403
847
|
tool_call_id?: string;
|
|
1404
848
|
}
|
|
1405
849
|
export interface ChatDTO extends BaseModel, PermissionModelDTO {
|
|
@@ -1407,13 +851,11 @@ export interface ChatDTO extends BaseModel, PermissionModelDTO {
|
|
|
1407
851
|
parent?: ChatDTO;
|
|
1408
852
|
children: (ChatDTO | undefined)[];
|
|
1409
853
|
status: ChatStatus;
|
|
1410
|
-
|
|
1411
|
-
agent_version_id?: string;
|
|
1412
|
-
agent?: AgentDTO;
|
|
854
|
+
agent_config?: AgentRuntimeConfigDTO;
|
|
1413
855
|
name: string;
|
|
1414
856
|
description: string;
|
|
1415
857
|
chat_messages: ChatMessageDTO[];
|
|
1416
|
-
agent_data:
|
|
858
|
+
agent_data: ChatData;
|
|
1417
859
|
}
|
|
1418
860
|
export interface ChatMessageDTO extends BaseModel, PermissionModelDTO {
|
|
1419
861
|
chat_id: string;
|
|
@@ -1425,124 +867,11 @@ export interface ChatMessageDTO extends BaseModel, PermissionModelDTO {
|
|
|
1425
867
|
content: ChatMessageContent[];
|
|
1426
868
|
tools?: Tool[];
|
|
1427
869
|
tool_call_id?: string;
|
|
1428
|
-
tool_invocations?:
|
|
870
|
+
tool_invocations?: ToolInvocationDTO[];
|
|
1429
871
|
}
|
|
1430
872
|
export type StringEncodedMap = {
|
|
1431
873
|
[key: string]: any;
|
|
1432
874
|
};
|
|
1433
|
-
/**
|
|
1434
|
-
* SearchRequest represents a search request
|
|
1435
|
-
*/
|
|
1436
|
-
export interface SearchRequest {
|
|
1437
|
-
fields: string[];
|
|
1438
|
-
term: string;
|
|
1439
|
-
exact: boolean;
|
|
1440
|
-
}
|
|
1441
|
-
/**
|
|
1442
|
-
* FilterRequest represents a filter request
|
|
1443
|
-
*/
|
|
1444
|
-
export interface FilterRequest {
|
|
1445
|
-
field: string;
|
|
1446
|
-
operator: string;
|
|
1447
|
-
value: any;
|
|
1448
|
-
}
|
|
1449
|
-
/**
|
|
1450
|
-
* ListRequest represents a list request with all options
|
|
1451
|
-
*/
|
|
1452
|
-
export interface ListRequest {
|
|
1453
|
-
page: number;
|
|
1454
|
-
page_size: number;
|
|
1455
|
-
search?: SearchRequest;
|
|
1456
|
-
filters: Filter[];
|
|
1457
|
-
sort: SortOrder[];
|
|
1458
|
-
preloads: string[];
|
|
1459
|
-
fields: string[];
|
|
1460
|
-
permissions: string[];
|
|
1461
|
-
include_others: boolean;
|
|
1462
|
-
}
|
|
1463
|
-
export interface ListResponse<T extends any> {
|
|
1464
|
-
items: T[];
|
|
1465
|
-
total: number;
|
|
1466
|
-
page: number;
|
|
1467
|
-
page_size: number;
|
|
1468
|
-
total_pages: number;
|
|
1469
|
-
}
|
|
1470
|
-
/**
|
|
1471
|
-
* Filter represents a single filter condition
|
|
1472
|
-
*/
|
|
1473
|
-
export interface Filter {
|
|
1474
|
-
field: string;
|
|
1475
|
-
operator: FilterOperator;
|
|
1476
|
-
value: any;
|
|
1477
|
-
}
|
|
1478
|
-
/**
|
|
1479
|
-
* FilterOperator represents the type of filter operation
|
|
1480
|
-
*/
|
|
1481
|
-
export type FilterOperator = string;
|
|
1482
|
-
export declare const OpEqual: FilterOperator;
|
|
1483
|
-
export declare const OpNotEqual: FilterOperator;
|
|
1484
|
-
export declare const OpIn: FilterOperator;
|
|
1485
|
-
export declare const OpNotIn: FilterOperator;
|
|
1486
|
-
export declare const OpGreater: FilterOperator;
|
|
1487
|
-
export declare const OpGreaterEqual: FilterOperator;
|
|
1488
|
-
export declare const OpLess: FilterOperator;
|
|
1489
|
-
export declare const OpLessEqual: FilterOperator;
|
|
1490
|
-
export declare const OpLike: FilterOperator;
|
|
1491
|
-
export declare const OpILike: FilterOperator;
|
|
1492
|
-
export declare const OpContains: FilterOperator;
|
|
1493
|
-
export declare const OpNotContains: FilterOperator;
|
|
1494
|
-
/**
|
|
1495
|
-
* Null checks
|
|
1496
|
-
*/
|
|
1497
|
-
export declare const OpIsNull: FilterOperator;
|
|
1498
|
-
export declare const OpIsNotNull: FilterOperator;
|
|
1499
|
-
/**
|
|
1500
|
-
* Empty checks (for strings)
|
|
1501
|
-
*/
|
|
1502
|
-
export declare const OpIsEmpty: FilterOperator;
|
|
1503
|
-
export declare const OpIsNotEmpty: FilterOperator;
|
|
1504
|
-
/**
|
|
1505
|
-
* SortOrder represents sorting configuration
|
|
1506
|
-
*/
|
|
1507
|
-
export interface SortOrder {
|
|
1508
|
-
field: string;
|
|
1509
|
-
dir: string;
|
|
1510
|
-
}
|
|
1511
|
-
/**
|
|
1512
|
-
* CursorListRequest represents a cursor-based list request with all options
|
|
1513
|
-
*/
|
|
1514
|
-
export interface CursorListRequest {
|
|
1515
|
-
cursor: string;
|
|
1516
|
-
limit: number;
|
|
1517
|
-
direction: string;
|
|
1518
|
-
search?: SearchRequest;
|
|
1519
|
-
filters: Filter[];
|
|
1520
|
-
preloads: string[];
|
|
1521
|
-
sort: SortOrder[];
|
|
1522
|
-
fields: string[];
|
|
1523
|
-
permissions: string[];
|
|
1524
|
-
include_others: boolean;
|
|
1525
|
-
}
|
|
1526
|
-
/**
|
|
1527
|
-
* CursorListResponse represents a cursor-based paginated response
|
|
1528
|
-
*/
|
|
1529
|
-
export interface CursorListResponse<T extends any> {
|
|
1530
|
-
items: T[];
|
|
1531
|
-
next_cursor: string;
|
|
1532
|
-
prev_cursor: string;
|
|
1533
|
-
has_next: boolean;
|
|
1534
|
-
has_previous: boolean;
|
|
1535
|
-
items_per_page: number;
|
|
1536
|
-
total_items: number;
|
|
1537
|
-
}
|
|
1538
|
-
/**
|
|
1539
|
-
* CursorConfig represents the configuration for cursor-based pagination
|
|
1540
|
-
*/
|
|
1541
|
-
export interface CursorConfig {
|
|
1542
|
-
field: string;
|
|
1543
|
-
direction: string;
|
|
1544
|
-
value: any;
|
|
1545
|
-
}
|
|
1546
875
|
export type DeviceAuthStatus = string;
|
|
1547
876
|
export declare const DeviceAuthStatusPending: DeviceAuthStatus;
|
|
1548
877
|
export declare const DeviceAuthStatusApproved: DeviceAuthStatus;
|
|
@@ -1551,21 +880,6 @@ export declare const DeviceAuthStatusDenied: DeviceAuthStatus;
|
|
|
1551
880
|
export declare const DeviceAuthStatusValid: DeviceAuthStatus;
|
|
1552
881
|
export declare const DeviceAuthStatusInvalid: DeviceAuthStatus;
|
|
1553
882
|
export declare const DeviceAuthStatusLoading: DeviceAuthStatus;
|
|
1554
|
-
/**
|
|
1555
|
-
* DeviceAuthCode represents a device authorization code for device/CLI authentication
|
|
1556
|
-
*/
|
|
1557
|
-
export interface DeviceAuthCode {
|
|
1558
|
-
id: string;
|
|
1559
|
-
user_code: string;
|
|
1560
|
-
device_code: string;
|
|
1561
|
-
status: DeviceAuthStatus;
|
|
1562
|
-
user_id: string;
|
|
1563
|
-
team_id: string;
|
|
1564
|
-
api_key: string;
|
|
1565
|
-
expires_at: string;
|
|
1566
|
-
created_at: string;
|
|
1567
|
-
updated_at: string;
|
|
1568
|
-
}
|
|
1569
883
|
/**
|
|
1570
884
|
* Engine-related types
|
|
1571
885
|
*/
|
|
@@ -1574,34 +888,6 @@ export declare const EngineStatusRunning: EngineStatus;
|
|
|
1574
888
|
export declare const EngineStatusPending: EngineStatus;
|
|
1575
889
|
export declare const EngineStatusStopping: EngineStatus;
|
|
1576
890
|
export declare const EngineStatusStopped: EngineStatus;
|
|
1577
|
-
export interface EngineState {
|
|
1578
|
-
BaseModel: BaseModel;
|
|
1579
|
-
PermissionModel: PermissionModel;
|
|
1580
|
-
instance?: Instance;
|
|
1581
|
-
transaction_id: string;
|
|
1582
|
-
config: EngineConfig;
|
|
1583
|
-
public_key: string;
|
|
1584
|
-
name: string;
|
|
1585
|
-
api_url: string;
|
|
1586
|
-
status: EngineStatus;
|
|
1587
|
-
system_info?: SystemInfo;
|
|
1588
|
-
workers: (WorkerState | undefined)[];
|
|
1589
|
-
}
|
|
1590
|
-
export interface LocalEngineState {
|
|
1591
|
-
id: string;
|
|
1592
|
-
name: string;
|
|
1593
|
-
config: EngineConfig;
|
|
1594
|
-
public_key: string;
|
|
1595
|
-
}
|
|
1596
|
-
export interface EngineStateDTO extends BaseModel, PermissionModelDTO {
|
|
1597
|
-
instance?: Instance;
|
|
1598
|
-
config: EngineConfig;
|
|
1599
|
-
name: string;
|
|
1600
|
-
api_url: string;
|
|
1601
|
-
status: EngineStatus;
|
|
1602
|
-
system_info?: SystemInfo;
|
|
1603
|
-
workers: (WorkerStateDTO | undefined)[];
|
|
1604
|
-
}
|
|
1605
891
|
export interface EngineStateSummary extends BaseModel, PermissionModelDTO {
|
|
1606
892
|
instance?: Instance;
|
|
1607
893
|
name: string;
|
|
@@ -1612,22 +898,6 @@ export interface EngineStateSummary extends BaseModel, PermissionModelDTO {
|
|
|
1612
898
|
* Worker-related types
|
|
1613
899
|
*/
|
|
1614
900
|
export type WorkerStatus = string;
|
|
1615
|
-
export interface WorkerState {
|
|
1616
|
-
BaseModel: BaseModel;
|
|
1617
|
-
PermissionModel: PermissionModel;
|
|
1618
|
-
index: number;
|
|
1619
|
-
status: WorkerStatus;
|
|
1620
|
-
status_updated_at?: string;
|
|
1621
|
-
engine_id: string;
|
|
1622
|
-
engine?: EngineState;
|
|
1623
|
-
task_id?: string;
|
|
1624
|
-
app_id: string;
|
|
1625
|
-
app_version_id: string;
|
|
1626
|
-
variant: string;
|
|
1627
|
-
gpus: WorkerGPU[];
|
|
1628
|
-
cpus: WorkerCPU[];
|
|
1629
|
-
rams: WorkerRAM[];
|
|
1630
|
-
}
|
|
1631
901
|
export interface WorkerGPU {
|
|
1632
902
|
id: string;
|
|
1633
903
|
worker_id: string;
|
|
@@ -1651,21 +921,6 @@ export interface WorkerRAM {
|
|
|
1651
921
|
worker_id: string;
|
|
1652
922
|
total: number;
|
|
1653
923
|
}
|
|
1654
|
-
export interface WorkerStateDTO extends BaseModel {
|
|
1655
|
-
user_id: string;
|
|
1656
|
-
team_id: string;
|
|
1657
|
-
index: number;
|
|
1658
|
-
status: WorkerStatus;
|
|
1659
|
-
engine_id: string;
|
|
1660
|
-
task_id?: string;
|
|
1661
|
-
app_id: string;
|
|
1662
|
-
app_version_id: string;
|
|
1663
|
-
app_variant: string;
|
|
1664
|
-
gpus: WorkerGPU[];
|
|
1665
|
-
cpus: WorkerCPU[];
|
|
1666
|
-
rams: WorkerRAM[];
|
|
1667
|
-
system_info: SystemInfo;
|
|
1668
|
-
}
|
|
1669
924
|
export interface WorkerStateSummary {
|
|
1670
925
|
id: string;
|
|
1671
926
|
user_id: string;
|
|
@@ -1676,7 +931,6 @@ export interface WorkerStateSummary {
|
|
|
1676
931
|
task_id?: string;
|
|
1677
932
|
app_id: string;
|
|
1678
933
|
app_version_id: string;
|
|
1679
|
-
app_variant: string;
|
|
1680
934
|
gpus: WorkerGPU[];
|
|
1681
935
|
cpus: WorkerCPU[];
|
|
1682
936
|
rams: WorkerRAM[];
|
|
@@ -1691,6 +945,7 @@ export interface File {
|
|
|
1691
945
|
content_type: string;
|
|
1692
946
|
size: number;
|
|
1693
947
|
filename: string;
|
|
948
|
+
rating: ContentRating;
|
|
1694
949
|
}
|
|
1695
950
|
export interface FileDTO extends BaseModel, PermissionModelDTO {
|
|
1696
951
|
path: string;
|
|
@@ -1700,6 +955,7 @@ export interface FileDTO extends BaseModel, PermissionModelDTO {
|
|
|
1700
955
|
content_type: string;
|
|
1701
956
|
size: number;
|
|
1702
957
|
filename: string;
|
|
958
|
+
rating: ContentRating;
|
|
1703
959
|
}
|
|
1704
960
|
export interface Flow {
|
|
1705
961
|
BaseModel: BaseModel;
|
|
@@ -1736,9 +992,9 @@ export interface FlowNodeData {
|
|
|
1736
992
|
app?: AppDTO;
|
|
1737
993
|
app_id: string;
|
|
1738
994
|
app_version_id: string;
|
|
1739
|
-
app_variant: string;
|
|
1740
995
|
infra: Infra;
|
|
1741
996
|
workers: string[];
|
|
997
|
+
setup?: any;
|
|
1742
998
|
additional?: any;
|
|
1743
999
|
task?: TaskDTO;
|
|
1744
1000
|
task_id?: string;
|
|
@@ -1785,56 +1041,6 @@ export interface FlowDTO extends BaseModel, PermissionModelDTO {
|
|
|
1785
1041
|
edges: FlowEdge[];
|
|
1786
1042
|
viewport?: FlowViewport;
|
|
1787
1043
|
}
|
|
1788
|
-
export interface NodeTaskDTO {
|
|
1789
|
-
task_id: string;
|
|
1790
|
-
task?: TaskDTO;
|
|
1791
|
-
}
|
|
1792
|
-
export type FlowRunStatus = number;
|
|
1793
|
-
export declare const FlowRunStatusUnknown: FlowRunStatus;
|
|
1794
|
-
export declare const FlowRunStatusPending: FlowRunStatus;
|
|
1795
|
-
export declare const FlowRunStatusRunning: FlowRunStatus;
|
|
1796
|
-
export declare const FlowRunStatusCompleted: FlowRunStatus;
|
|
1797
|
-
export declare const FlowRunStatusFailed: FlowRunStatus;
|
|
1798
|
-
export declare const FlowRunStatusCancelled: FlowRunStatus;
|
|
1799
|
-
export interface FlowRun {
|
|
1800
|
-
BaseModel: BaseModel;
|
|
1801
|
-
PermissionModel: PermissionModel;
|
|
1802
|
-
task_id?: string;
|
|
1803
|
-
flow_id: string;
|
|
1804
|
-
flow: Flow;
|
|
1805
|
-
status: FlowRunStatus;
|
|
1806
|
-
error?: string;
|
|
1807
|
-
flow_run_started?: string;
|
|
1808
|
-
flow_run_finished?: string;
|
|
1809
|
-
flow_run_cancelled?: string;
|
|
1810
|
-
input: FlowRunInputs;
|
|
1811
|
-
fail_on_error: boolean;
|
|
1812
|
-
output: any;
|
|
1813
|
-
infra?: Infra;
|
|
1814
|
-
workers?: string[];
|
|
1815
|
-
node_task_map: {
|
|
1816
|
-
[key: string]: string;
|
|
1817
|
-
};
|
|
1818
|
-
node_tasks: {
|
|
1819
|
-
[key: string]: NodeTask;
|
|
1820
|
-
};
|
|
1821
|
-
}
|
|
1822
|
-
export interface FlowRunDTO extends BaseModel, PermissionModelDTO {
|
|
1823
|
-
flow_id: string;
|
|
1824
|
-
flow?: FlowDTO;
|
|
1825
|
-
task_id?: string;
|
|
1826
|
-
status: FlowRunStatus;
|
|
1827
|
-
error?: string;
|
|
1828
|
-
flow_run_started?: string;
|
|
1829
|
-
flow_run_finished?: string;
|
|
1830
|
-
flow_run_cancelled?: string;
|
|
1831
|
-
input: FlowRunInputs;
|
|
1832
|
-
fail_on_error: boolean;
|
|
1833
|
-
output: any;
|
|
1834
|
-
node_tasks: {
|
|
1835
|
-
[key: string]: NodeTaskDTO | undefined;
|
|
1836
|
-
};
|
|
1837
|
-
}
|
|
1838
1044
|
/**
|
|
1839
1045
|
* Connection represents a connection between nodes in a flow
|
|
1840
1046
|
*/
|
|
@@ -1842,816 +1048,39 @@ export interface FlowNodeConnection {
|
|
|
1842
1048
|
nodeId: string;
|
|
1843
1049
|
key: string;
|
|
1844
1050
|
type: string;
|
|
1845
|
-
previousValue: any;
|
|
1846
|
-
}
|
|
1847
|
-
export type FlowRunInputs = {
|
|
1848
|
-
[key: string]: {
|
|
1849
|
-
[key: string]: FlowRunInput;
|
|
1850
|
-
};
|
|
1851
|
-
};
|
|
1852
|
-
export interface FlowRunInput {
|
|
1853
|
-
Connection?: FlowNodeConnection;
|
|
1854
|
-
Value: any;
|
|
1855
|
-
}
|
|
1856
|
-
export interface NodeTask {
|
|
1857
|
-
task_id: string;
|
|
1858
|
-
task?: Task;
|
|
1859
|
-
}
|
|
1860
|
-
/**
|
|
1861
|
-
* NodePosition represents x,y coordinates
|
|
1862
|
-
*/
|
|
1863
|
-
export interface NodePosition {
|
|
1864
|
-
x: number;
|
|
1865
|
-
y: number;
|
|
1866
|
-
}
|
|
1867
|
-
/**
|
|
1868
|
-
* CoordinateExtent represents a bounding box with [x1, y1, x2, y2]
|
|
1869
|
-
*/
|
|
1870
|
-
export type CoordinateExtent = number[];
|
|
1871
|
-
export interface NodeHandle {
|
|
1872
|
-
x: number;
|
|
1873
|
-
y: number;
|
|
1874
|
-
position: string;
|
|
1875
|
-
id: string;
|
|
1876
|
-
width: number;
|
|
1877
|
-
height: number;
|
|
1878
|
-
type: string;
|
|
1879
|
-
name: string;
|
|
1880
|
-
}
|
|
1881
|
-
export type GraphNodeType = string;
|
|
1882
|
-
export declare const GraphNodeTypeUnknown: GraphNodeType;
|
|
1883
|
-
export declare const GraphNodeTypeJoin: GraphNodeType;
|
|
1884
|
-
export declare const GraphNodeTypeSplit: GraphNodeType;
|
|
1885
|
-
export declare const GraphNodeTypeTask: GraphNodeType;
|
|
1886
|
-
export declare const GraphNodeTypeResource: GraphNodeType;
|
|
1887
|
-
export declare const GraphNodeTypeConditional: GraphNodeType;
|
|
1888
|
-
/**
|
|
1889
|
-
* GraphNode represents a node in the execution graph
|
|
1890
|
-
*/
|
|
1891
|
-
export interface GraphNode {
|
|
1892
|
-
BaseModel: BaseModel;
|
|
1893
|
-
graph_id: string;
|
|
1894
|
-
type: GraphNodeType;
|
|
1895
|
-
resource_id: string;
|
|
1896
|
-
resource_type: string;
|
|
1897
|
-
status: GraphNodeStatus;
|
|
1898
|
-
/**
|
|
1899
|
-
* Dependency barrier counters
|
|
1900
|
-
*/
|
|
1901
|
-
required_deps: number;
|
|
1902
|
-
completed_deps: number;
|
|
1903
|
-
metadata: StringEncodedMap;
|
|
1904
|
-
/**
|
|
1905
|
-
* Timing
|
|
1906
|
-
*/
|
|
1907
|
-
ready_at?: string;
|
|
1908
|
-
started_at?: string;
|
|
1909
|
-
completed_at?: string;
|
|
1910
|
-
retry_count?: number;
|
|
1911
|
-
}
|
|
1912
|
-
/**
|
|
1913
|
-
* GraphEdge represents a dependency between nodes
|
|
1914
|
-
*/
|
|
1915
|
-
export interface GraphEdge {
|
|
1916
|
-
BaseModel: BaseModel;
|
|
1917
|
-
type: GraphEdgeType;
|
|
1918
|
-
from: string;
|
|
1919
|
-
to: string;
|
|
1920
|
-
}
|
|
1921
|
-
/**
|
|
1922
|
-
* GraphStatus represents the overall status of the graph
|
|
1923
|
-
*/
|
|
1924
|
-
export type GraphStatus = string;
|
|
1925
|
-
export declare const GraphStatusPending: GraphStatus;
|
|
1926
|
-
export declare const GraphStatusRunning: GraphStatus;
|
|
1927
|
-
export declare const GraphStatusCompleted: GraphStatus;
|
|
1928
|
-
export declare const GraphStatusFailed: GraphStatus;
|
|
1929
|
-
export declare const GraphStatusCancelled: GraphStatus;
|
|
1930
|
-
/**
|
|
1931
|
-
* GraphNodeStatus represents the status of a node
|
|
1932
|
-
*/
|
|
1933
|
-
export type GraphNodeStatus = string;
|
|
1934
|
-
export declare const GraphNodeStatusPending: GraphNodeStatus;
|
|
1935
|
-
export declare const GraphNodeStatusReady: GraphNodeStatus;
|
|
1936
|
-
export declare const GraphNodeStatusRunning: GraphNodeStatus;
|
|
1937
|
-
export declare const GraphNodeStatusCompleted: GraphNodeStatus;
|
|
1938
|
-
export declare const GraphNodeStatusFailed: GraphNodeStatus;
|
|
1939
|
-
export declare const GraphNodeStatusCancelled: GraphNodeStatus;
|
|
1940
|
-
export declare const GraphNodeStatusSkipped: GraphNodeStatus;
|
|
1941
|
-
export declare const GraphNodeStatusBlocked: GraphNodeStatus;
|
|
1942
|
-
/**
|
|
1943
|
-
* GraphEdgeType defines the type of edge relationship
|
|
1944
|
-
*/
|
|
1945
|
-
export type GraphEdgeType = string;
|
|
1946
|
-
export declare const GraphEdgeTypeDependency: GraphEdgeType;
|
|
1947
|
-
export declare const GraphEdgeTypeFlow: GraphEdgeType;
|
|
1948
|
-
export declare const GraphEdgeTypeConditional: GraphEdgeType;
|
|
1949
|
-
/**
|
|
1950
|
-
* EdgeBuilder is the fluent API for creating graph edges
|
|
1951
|
-
* Usage: service.Wire(ctx, authCtx).Resource(x).FlowsTo().Resource(y)
|
|
1952
|
-
*/
|
|
1953
|
-
export type GraphEdgeBuilder = any;
|
|
1954
|
-
/**
|
|
1955
|
-
* GraphEdgeTarget completes the edge to a target
|
|
1956
|
-
*/
|
|
1957
|
-
export type GraphEdgeTarget = any;
|
|
1958
|
-
/**
|
|
1959
|
-
* Integration providers
|
|
1960
|
-
*/
|
|
1961
|
-
export declare const IntegrationProviderGoogle = "google";
|
|
1962
|
-
/**
|
|
1963
|
-
* Integration providers
|
|
1964
|
-
*/
|
|
1965
|
-
export declare const IntegrationProviderSlack = "slack";
|
|
1966
|
-
/**
|
|
1967
|
-
* Integration providers
|
|
1968
|
-
*/
|
|
1969
|
-
export declare const IntegrationProviderNotion = "notion";
|
|
1970
|
-
/**
|
|
1971
|
-
* Integration providers
|
|
1972
|
-
*/
|
|
1973
|
-
export declare const IntegrationProviderGitHub = "github";
|
|
1974
|
-
/**
|
|
1975
|
-
* Integration types
|
|
1976
|
-
*/
|
|
1977
|
-
export declare const IntegrationTypeServiceAccount = "service_account";
|
|
1978
|
-
/**
|
|
1979
|
-
* Integration types
|
|
1980
|
-
*/
|
|
1981
|
-
export declare const IntegrationTypeOAuth = "oauth";
|
|
1982
|
-
/**
|
|
1983
|
-
* Integration types
|
|
1984
|
-
*/
|
|
1985
|
-
export declare const IntegrationTypeAPIKey = "api_key";
|
|
1986
|
-
/**
|
|
1987
|
-
* Integration statuses
|
|
1988
|
-
*/
|
|
1989
|
-
export declare const IntegrationStatusConnected = "connected";
|
|
1990
|
-
/**
|
|
1991
|
-
* Integration statuses
|
|
1992
|
-
*/
|
|
1993
|
-
export declare const IntegrationStatusDisconnected = "disconnected";
|
|
1994
|
-
/**
|
|
1995
|
-
* Integration statuses
|
|
1996
|
-
*/
|
|
1997
|
-
export declare const IntegrationStatusExpired = "expired";
|
|
1998
|
-
/**
|
|
1999
|
-
* Integration statuses
|
|
2000
|
-
*/
|
|
2001
|
-
export declare const IntegrationStatusError = "error";
|
|
2002
|
-
/**
|
|
2003
|
-
* StringSlice is a custom type for storing string slices in the database
|
|
2004
|
-
*/
|
|
2005
|
-
export type StringSlice = string[];
|
|
2006
|
-
/**
|
|
2007
|
-
* Integration represents a connected external service integration
|
|
2008
|
-
*/
|
|
2009
|
-
export interface Integration {
|
|
2010
|
-
BaseModel: BaseModel;
|
|
2011
|
-
PermissionModel: PermissionModel;
|
|
2012
|
-
/**
|
|
2013
|
-
* Provider identifies the service (google, slack, notion, etc.)
|
|
2014
|
-
*/
|
|
2015
|
-
provider: string;
|
|
2016
|
-
/**
|
|
2017
|
-
* Type identifies the integration type (service_account, oauth, api_key)
|
|
2018
|
-
*/
|
|
2019
|
-
type: string;
|
|
2020
|
-
/**
|
|
2021
|
-
* Status of the integration
|
|
2022
|
-
*/
|
|
2023
|
-
status: string;
|
|
2024
|
-
/**
|
|
2025
|
-
* Display name for the integration (user-friendly)
|
|
2026
|
-
*/
|
|
2027
|
-
display_name: string;
|
|
2028
|
-
/**
|
|
2029
|
-
* OAuth fields - tokens stored in secrets table for centralized encryption/rotation
|
|
2030
|
-
*/
|
|
2031
|
-
scopes: StringSlice;
|
|
2032
|
-
expires_at?: string;
|
|
2033
|
-
/**
|
|
2034
|
-
* Service Account fields
|
|
2035
|
-
*/
|
|
2036
|
-
service_account_email: string;
|
|
2037
|
-
/**
|
|
2038
|
-
* Generic metadata for provider-specific data
|
|
2039
|
-
*/
|
|
2040
|
-
metadata: {
|
|
2041
|
-
[key: string]: any;
|
|
2042
|
-
};
|
|
2043
|
-
/**
|
|
2044
|
-
* Error message if status is "error"
|
|
2045
|
-
*/
|
|
2046
|
-
error_message?: string;
|
|
2047
|
-
}
|
|
2048
|
-
/**
|
|
2049
|
-
* IntegrationDTO for API responses (never exposes tokens)
|
|
2050
|
-
*/
|
|
2051
|
-
export interface IntegrationDTO extends BaseModel, PermissionModelDTO {
|
|
2052
|
-
provider: string;
|
|
2053
|
-
type: string;
|
|
2054
|
-
status: string;
|
|
2055
|
-
display_name: string;
|
|
2056
|
-
scopes: StringSlice;
|
|
2057
|
-
expires_at?: string;
|
|
2058
|
-
service_account_email?: string;
|
|
2059
|
-
metadata?: {
|
|
2060
|
-
[key: string]: any;
|
|
2061
|
-
};
|
|
2062
|
-
error_message?: string;
|
|
2063
|
-
}
|
|
2064
|
-
/**
|
|
2065
|
-
* OAuthConfig for OAuth providers
|
|
2066
|
-
*/
|
|
2067
|
-
export interface OAuthConfig {
|
|
2068
|
-
ClientID: string;
|
|
2069
|
-
ClientSecret: string;
|
|
2070
|
-
RedirectURL: string;
|
|
2071
|
-
Scopes: string[];
|
|
2072
|
-
}
|
|
2073
|
-
/**
|
|
2074
|
-
* IntegrationCredentials returned by GetCredentials for runtime injection
|
|
2075
|
-
*/
|
|
2076
|
-
export interface IntegrationCredentials {
|
|
2077
|
-
Provider: string;
|
|
2078
|
-
Type: string;
|
|
2079
|
-
Secrets: {
|
|
2080
|
-
[key: string]: string;
|
|
2081
|
-
};
|
|
2082
|
-
}
|
|
2083
|
-
/**
|
|
2084
|
-
* ServerCapabilities represents the server's supported features
|
|
2085
|
-
*/
|
|
2086
|
-
export interface ServerCapabilitiesLogging {
|
|
2087
|
-
level: string;
|
|
2088
|
-
}
|
|
2089
|
-
export interface ServerCapabilitiesPrompts {
|
|
2090
|
-
listChanged: boolean;
|
|
2091
|
-
}
|
|
2092
|
-
export interface ServerCapabilitiesResources {
|
|
2093
|
-
subscribe: boolean;
|
|
2094
|
-
listChanged: boolean;
|
|
2095
|
-
}
|
|
2096
|
-
export interface ServerCapabilitiesTools {
|
|
2097
|
-
listChanged: boolean;
|
|
2098
|
-
}
|
|
2099
|
-
export interface ServerCapabilities {
|
|
2100
|
-
logging: ServerCapabilitiesLogging;
|
|
2101
|
-
prompts: ServerCapabilitiesPrompts;
|
|
2102
|
-
resources: ServerCapabilitiesResources;
|
|
2103
|
-
tools: ServerCapabilitiesTools;
|
|
2104
|
-
}
|
|
2105
|
-
/**
|
|
2106
|
-
* ServerInfo represents information about the server
|
|
2107
|
-
*/
|
|
2108
|
-
export interface ServerInfo {
|
|
2109
|
-
name: string;
|
|
2110
|
-
title: string;
|
|
2111
|
-
version: string;
|
|
2112
|
-
}
|
|
2113
|
-
/**
|
|
2114
|
-
* InitializeResponse represents the server's response to an initialization request
|
|
2115
|
-
*/
|
|
2116
|
-
export interface InitializeResponse {
|
|
2117
|
-
protocolVersion: string;
|
|
2118
|
-
capabilities: ServerCapabilities;
|
|
2119
|
-
serverInfo: ServerInfo;
|
|
2120
|
-
instructions?: string;
|
|
2121
|
-
}
|
|
2122
|
-
/**
|
|
2123
|
-
* CancellationParams represents the parameters for a cancellation notification
|
|
2124
|
-
*/
|
|
2125
|
-
export interface CancellationParams {
|
|
2126
|
-
requestId: string;
|
|
2127
|
-
reason?: string;
|
|
2128
|
-
}
|
|
2129
|
-
/**
|
|
2130
|
-
* ProgressParams represents progress update parameters
|
|
2131
|
-
*/
|
|
2132
|
-
export interface ProgressParams {
|
|
2133
|
-
requestId: string;
|
|
2134
|
-
progress: number;
|
|
2135
|
-
message?: string;
|
|
2136
|
-
}
|
|
2137
|
-
/**
|
|
2138
|
-
* ResourceRequest represents a request for resource operations
|
|
2139
|
-
*/
|
|
2140
|
-
export interface ResourceRequest {
|
|
2141
|
-
operation: string;
|
|
2142
|
-
id?: string;
|
|
2143
|
-
userId?: string;
|
|
2144
|
-
resource?: any;
|
|
2145
|
-
listOptions?: ListRequest;
|
|
2146
|
-
}
|
|
2147
|
-
/**
|
|
2148
|
-
* ResourceResponse represents a response for resource operations
|
|
2149
|
-
*/
|
|
2150
|
-
export interface ResourceResponse {
|
|
2151
|
-
resources: Resource[];
|
|
2152
|
-
nextCursor?: string;
|
|
2153
|
-
}
|
|
2154
|
-
/**
|
|
2155
|
-
* Resource represents a resource item
|
|
2156
|
-
*/
|
|
2157
|
-
export interface Resource {
|
|
2158
|
-
uri: string;
|
|
2159
|
-
name: string;
|
|
2160
|
-
title?: string;
|
|
2161
|
-
description?: string;
|
|
2162
|
-
mimeType?: string;
|
|
2163
|
-
size?: number;
|
|
2164
|
-
}
|
|
2165
|
-
/**
|
|
2166
|
-
* ResourceContent represents resource content
|
|
2167
|
-
*/
|
|
2168
|
-
export interface ResourceContent {
|
|
2169
|
-
uri: string;
|
|
2170
|
-
name: string;
|
|
2171
|
-
title?: string;
|
|
2172
|
-
mimeType?: string;
|
|
2173
|
-
text?: string;
|
|
2174
|
-
blob?: string;
|
|
2175
|
-
}
|
|
2176
|
-
/**
|
|
2177
|
-
* ResourceReadResponse represents a response for resource read operations
|
|
2178
|
-
*/
|
|
2179
|
-
export interface ResourceReadResponse {
|
|
2180
|
-
contents: ResourceContent[];
|
|
2181
|
-
}
|
|
2182
|
-
/**
|
|
2183
|
-
* PromptRequest represents a request for prompt operations
|
|
2184
|
-
*/
|
|
2185
|
-
export interface PromptRequest {
|
|
2186
|
-
operation: string;
|
|
2187
|
-
id?: string;
|
|
2188
|
-
prompt?: string;
|
|
2189
|
-
listOptions?: ListRequest;
|
|
2190
|
-
}
|
|
2191
|
-
/**
|
|
2192
|
-
* PromptResponse represents a response for prompt operations
|
|
2193
|
-
*/
|
|
2194
|
-
export interface PromptResponse {
|
|
2195
|
-
prompts: Prompt[];
|
|
2196
|
-
nextCursor?: string;
|
|
2197
|
-
}
|
|
2198
|
-
/**
|
|
2199
|
-
* Prompt represents a prompt item
|
|
2200
|
-
*/
|
|
2201
|
-
export interface Prompt {
|
|
2202
|
-
name: string;
|
|
2203
|
-
title?: string;
|
|
2204
|
-
description?: string;
|
|
2205
|
-
arguments?: PromptArg[];
|
|
2206
|
-
messages?: PromptMessage[];
|
|
2207
|
-
}
|
|
2208
|
-
/**
|
|
2209
|
-
* PromptArg represents a prompt argument
|
|
2210
|
-
*/
|
|
2211
|
-
export interface PromptArg {
|
|
2212
|
-
name: string;
|
|
2213
|
-
description: string;
|
|
2214
|
-
required: boolean;
|
|
2215
|
-
}
|
|
2216
|
-
/**
|
|
2217
|
-
* PromptMessage represents a message in a prompt
|
|
2218
|
-
*/
|
|
2219
|
-
export interface PromptMessage {
|
|
2220
|
-
role: string;
|
|
2221
|
-
content: PromptContent;
|
|
2222
|
-
}
|
|
2223
|
-
/**
|
|
2224
|
-
* PromptContent represents content in a prompt message
|
|
2225
|
-
*/
|
|
2226
|
-
export interface PromptContent {
|
|
2227
|
-
type: string;
|
|
2228
|
-
text?: string;
|
|
2229
|
-
data?: string;
|
|
2230
|
-
mimeType?: string;
|
|
2231
|
-
}
|
|
2232
|
-
/**
|
|
2233
|
-
* ToolRequest represents a request for tool operations
|
|
2234
|
-
*/
|
|
2235
|
-
export interface ToolListRequest {
|
|
2236
|
-
cursor?: string;
|
|
2237
|
-
}
|
|
2238
|
-
/**
|
|
2239
|
-
* ToolResponse represents a response for tool operations
|
|
2240
|
-
*/
|
|
2241
|
-
export interface ToolListResponse {
|
|
2242
|
-
tools: MCPTool[];
|
|
2243
|
-
nextCursor?: string;
|
|
2244
|
-
}
|
|
2245
|
-
/**
|
|
2246
|
-
* Tool represents a tool item
|
|
2247
|
-
*/
|
|
2248
|
-
export interface MCPTool {
|
|
2249
|
-
name: string;
|
|
2250
|
-
title?: string;
|
|
2251
|
-
description: string;
|
|
2252
|
-
inputSchema: any;
|
|
2253
|
-
outputSchema?: any;
|
|
2254
|
-
}
|
|
2255
|
-
/**
|
|
2256
|
-
* ToolCallRequest represents a request to call a tool
|
|
2257
|
-
*/
|
|
2258
|
-
export interface ToolCallRequest {
|
|
2259
|
-
name: string;
|
|
2260
|
-
arguments: {
|
|
2261
|
-
[key: string]: any;
|
|
2262
|
-
};
|
|
2263
|
-
}
|
|
2264
|
-
/**
|
|
2265
|
-
* ToolCallResponse represents a response from a tool call
|
|
2266
|
-
*/
|
|
2267
|
-
export interface ToolCallResponse {
|
|
2268
|
-
content: ToolContent[];
|
|
2269
|
-
structuredContent?: any;
|
|
2270
|
-
isError: boolean;
|
|
2271
|
-
}
|
|
2272
|
-
/**
|
|
2273
|
-
* ToolContent represents content in a tool response
|
|
2274
|
-
*/
|
|
2275
|
-
export interface ToolContent {
|
|
2276
|
-
type: string;
|
|
2277
|
-
text?: string;
|
|
2278
|
-
data?: string;
|
|
2279
|
-
mimeType?: string;
|
|
2280
|
-
resource?: ResourceContent;
|
|
2281
|
-
}
|
|
2282
|
-
/**
|
|
2283
|
-
* JSONRPCRequest represents a JSON-RPC request
|
|
2284
|
-
*/
|
|
2285
|
-
export interface JSONRPCRequest {
|
|
2286
|
-
jsonrpc: string;
|
|
2287
|
-
id: any;
|
|
2288
|
-
method: string;
|
|
2289
|
-
params?: any;
|
|
2290
|
-
}
|
|
2291
|
-
/**
|
|
2292
|
-
* JSONRPCResponse represents a JSON-RPC response
|
|
2293
|
-
*/
|
|
2294
|
-
export interface JSONRPCResponse {
|
|
2295
|
-
jsonrpc: string;
|
|
2296
|
-
id: any;
|
|
2297
|
-
result?: any;
|
|
2298
|
-
error?: JSONRPCError;
|
|
2299
|
-
}
|
|
2300
|
-
/**
|
|
2301
|
-
* JSONRPCError represents a JSON-RPC error
|
|
2302
|
-
*/
|
|
2303
|
-
export interface JSONRPCError {
|
|
2304
|
-
code: number;
|
|
2305
|
-
message: string;
|
|
2306
|
-
data?: any;
|
|
2307
|
-
}
|
|
2308
|
-
/**
|
|
2309
|
-
* NotificationMessage represents a notification message
|
|
2310
|
-
*/
|
|
2311
|
-
export interface NotificationMessage {
|
|
2312
|
-
jsonrpc: string;
|
|
2313
|
-
method: string;
|
|
2314
|
-
params?: any;
|
|
2315
|
-
}
|
|
2316
|
-
/**
|
|
2317
|
-
* ConnectedEvent represents a connected event
|
|
2318
|
-
*/
|
|
2319
|
-
export interface ConnectedEvent {
|
|
2320
|
-
event: string;
|
|
2321
|
-
timestamp: string;
|
|
2322
|
-
}
|
|
2323
|
-
/**
|
|
2324
|
-
* ResourceTemplate represents a resource template
|
|
2325
|
-
*/
|
|
2326
|
-
export interface ResourceTemplate {
|
|
2327
|
-
uriTemplate: string;
|
|
2328
|
-
name: string;
|
|
2329
|
-
title?: string;
|
|
2330
|
-
description?: string;
|
|
2331
|
-
mimeType?: string;
|
|
2332
|
-
}
|
|
2333
|
-
/**
|
|
2334
|
-
* ResourceTemplateResponse represents a response for resource template operations
|
|
2335
|
-
*/
|
|
2336
|
-
export interface ResourceTemplateResponse {
|
|
2337
|
-
resourceTemplates: ResourceTemplate[];
|
|
2338
|
-
}
|
|
2339
|
-
/**
|
|
2340
|
-
* NotificationChannel represents a delivery channel
|
|
2341
|
-
*/
|
|
2342
|
-
export type NotificationChannel = string;
|
|
2343
|
-
export declare const NotificationChannelEmail: NotificationChannel;
|
|
2344
|
-
export declare const NotificationChannelSMS: NotificationChannel;
|
|
2345
|
-
export declare const NotificationChannelPush: NotificationChannel;
|
|
2346
|
-
export declare const NotificationChannelSlack: NotificationChannel;
|
|
2347
|
-
/**
|
|
2348
|
-
* NotificationPriority represents notification priority
|
|
2349
|
-
*/
|
|
2350
|
-
export type NotificationPriority = string;
|
|
2351
|
-
export declare const NotificationPriorityLow: NotificationPriority;
|
|
2352
|
-
export declare const NotificationPriorityNormal: NotificationPriority;
|
|
2353
|
-
export declare const NotificationPriorityHigh: NotificationPriority;
|
|
2354
|
-
export declare const NotificationPriorityCritical: NotificationPriority;
|
|
2355
|
-
/**
|
|
2356
|
-
* NotificationType represents the type/category of notification
|
|
2357
|
-
*/
|
|
2358
|
-
export type NotificationType = string;
|
|
2359
|
-
/**
|
|
2360
|
-
* Billing notifications
|
|
2361
|
-
*/
|
|
2362
|
-
export declare const NotificationTypeLowBalance: NotificationType;
|
|
2363
|
-
export declare const NotificationTypeAutoRecharge: NotificationType;
|
|
2364
|
-
export declare const NotificationTypePaymentSuccess: NotificationType;
|
|
2365
|
-
export declare const NotificationTypePaymentFailed: NotificationType;
|
|
2366
|
-
export declare const NotificationTypeUsageSummary: NotificationType;
|
|
2367
|
-
export declare const NotificationTypeSpendingLimit: NotificationType;
|
|
2368
|
-
/**
|
|
2369
|
-
* Account notifications
|
|
2370
|
-
*/
|
|
2371
|
-
export declare const NotificationTypeWelcome: NotificationType;
|
|
2372
|
-
export declare const NotificationTypePasswordReset: NotificationType;
|
|
2373
|
-
export declare const NotificationTypeEmailVerify: NotificationType;
|
|
2374
|
-
export declare const NotificationTypeSecurityAlert: NotificationType;
|
|
2375
|
-
/**
|
|
2376
|
-
* Task notifications
|
|
2377
|
-
*/
|
|
2378
|
-
export declare const NotificationTypeTaskComplete: NotificationType;
|
|
2379
|
-
export declare const NotificationTypeTaskFailed: NotificationType;
|
|
2380
|
-
/**
|
|
2381
|
-
* System notifications
|
|
2382
|
-
*/
|
|
2383
|
-
export declare const NotificationTypeSystemAlert: NotificationType;
|
|
2384
|
-
export declare const NotificationTypeMaintenance: NotificationType;
|
|
2385
|
-
/**
|
|
2386
|
-
* NotificationStatus represents the status of a notification
|
|
2387
|
-
*/
|
|
2388
|
-
export type NotificationStatus = string;
|
|
2389
|
-
export declare const NotificationStatusPending: NotificationStatus;
|
|
2390
|
-
export declare const NotificationStatusSent: NotificationStatus;
|
|
2391
|
-
export declare const NotificationStatusDelivered: NotificationStatus;
|
|
2392
|
-
export declare const NotificationStatusFailed: NotificationStatus;
|
|
2393
|
-
export declare const NotificationStatusBounced: NotificationStatus;
|
|
2394
|
-
export declare const NotificationStatusCancelled: NotificationStatus;
|
|
2395
|
-
/**
|
|
2396
|
-
* Notification represents a notification stored in the database
|
|
2397
|
-
*/
|
|
2398
|
-
export interface Notification {
|
|
2399
|
-
BaseModel: BaseModel;
|
|
2400
|
-
PermissionModel: PermissionModel;
|
|
2401
|
-
/**
|
|
2402
|
-
* Notification details
|
|
2403
|
-
*/
|
|
2404
|
-
type: NotificationType;
|
|
2405
|
-
channel: NotificationChannel;
|
|
2406
|
-
priority: NotificationPriority;
|
|
2407
|
-
status: NotificationStatus;
|
|
2408
|
-
/**
|
|
2409
|
-
* Recipient info
|
|
2410
|
-
*/
|
|
2411
|
-
recipient_email: string;
|
|
2412
|
-
recipient_phone: string;
|
|
2413
|
-
/**
|
|
2414
|
-
* Content
|
|
2415
|
-
*/
|
|
2416
|
-
subject: string;
|
|
2417
|
-
body: string;
|
|
2418
|
-
html_body: string;
|
|
2419
|
-
/**
|
|
2420
|
-
* Template support
|
|
2421
|
-
*/
|
|
2422
|
-
template_id: string;
|
|
2423
|
-
template_data: {
|
|
2424
|
-
[key: string]: any;
|
|
2425
|
-
};
|
|
2426
|
-
/**
|
|
2427
|
-
* Metadata for extensibility
|
|
2428
|
-
*/
|
|
2429
|
-
metadata: {
|
|
2430
|
-
[key: string]: any;
|
|
2431
|
-
};
|
|
2432
|
-
/**
|
|
2433
|
-
* Scheduling
|
|
2434
|
-
*/
|
|
2435
|
-
scheduled_at?: string;
|
|
2436
|
-
expires_at?: string;
|
|
2437
|
-
/**
|
|
2438
|
-
* Delivery tracking
|
|
2439
|
-
*/
|
|
2440
|
-
sent_at?: string;
|
|
2441
|
-
delivered_at?: string;
|
|
2442
|
-
failed_at?: string;
|
|
2443
|
-
/**
|
|
2444
|
-
* Provider info
|
|
2445
|
-
*/
|
|
2446
|
-
provider_name: string;
|
|
2447
|
-
provider_id: string;
|
|
2448
|
-
/**
|
|
2449
|
-
* Error tracking
|
|
2450
|
-
*/
|
|
2451
|
-
error_message: string;
|
|
2452
|
-
retry_count: number;
|
|
2453
|
-
max_retries: number;
|
|
2454
|
-
/**
|
|
2455
|
-
* Reference to related entity (e.g., task_id, transaction_id)
|
|
2456
|
-
*/
|
|
2457
|
-
reference_type: string;
|
|
2458
|
-
reference_id: string;
|
|
2459
|
-
}
|
|
2460
|
-
/**
|
|
2461
|
-
* NotificationDTO is the data transfer object
|
|
2462
|
-
*/
|
|
2463
|
-
export interface NotificationDTO extends BaseModel, PermissionModelDTO {
|
|
2464
|
-
type: NotificationType;
|
|
2465
|
-
channel: NotificationChannel;
|
|
2466
|
-
priority: NotificationPriority;
|
|
2467
|
-
status: NotificationStatus;
|
|
2468
|
-
recipient_email?: string;
|
|
2469
|
-
subject: string;
|
|
2470
|
-
body?: string;
|
|
2471
|
-
scheduled_at?: string;
|
|
2472
|
-
sent_at?: string;
|
|
2473
|
-
delivered_at?: string;
|
|
2474
|
-
failed_at?: string;
|
|
2475
|
-
error_message?: string;
|
|
2476
|
-
retry_count: number;
|
|
2477
|
-
reference_type?: string;
|
|
2478
|
-
reference_id?: string;
|
|
2479
|
-
}
|
|
2480
|
-
export interface NotificationPreferences {
|
|
2481
|
-
BaseModel: BaseModel;
|
|
2482
|
-
PermissionModel: PermissionModel;
|
|
2483
|
-
/**
|
|
2484
|
-
* Channel preferences
|
|
2485
|
-
*/
|
|
2486
|
-
email_enabled: boolean;
|
|
2487
|
-
sms_enabled: boolean;
|
|
2488
|
-
push_enabled: boolean;
|
|
2489
|
-
slack_enabled: boolean;
|
|
2490
|
-
/**
|
|
2491
|
-
* Type preferences (which notification types to receive)
|
|
2492
|
-
*/
|
|
2493
|
-
billing_notifications: boolean;
|
|
2494
|
-
task_notifications: boolean;
|
|
2495
|
-
system_notifications: boolean;
|
|
2496
|
-
marketing_emails: boolean;
|
|
2497
|
-
/**
|
|
2498
|
-
* Quiet hours (don't send non-critical notifications during these hours)
|
|
2499
|
-
*/
|
|
2500
|
-
quiet_hours_enabled: boolean;
|
|
2501
|
-
quiet_hours_start: string;
|
|
2502
|
-
quiet_hours_end: string;
|
|
2503
|
-
timezone: string;
|
|
2504
|
-
}
|
|
2505
|
-
/**
|
|
2506
|
-
* NotificationPreferencesDTO is the data transfer object
|
|
2507
|
-
*/
|
|
2508
|
-
export interface NotificationPreferencesDTO extends BaseModel, PermissionModelDTO {
|
|
2509
|
-
email_enabled: boolean;
|
|
2510
|
-
sms_enabled: boolean;
|
|
2511
|
-
push_enabled: boolean;
|
|
2512
|
-
slack_enabled: boolean;
|
|
2513
|
-
billing_notifications: boolean;
|
|
2514
|
-
task_notifications: boolean;
|
|
2515
|
-
system_notifications: boolean;
|
|
2516
|
-
marketing_emails: boolean;
|
|
2517
|
-
quiet_hours_enabled: boolean;
|
|
2518
|
-
quiet_hours_start?: string;
|
|
2519
|
-
quiet_hours_end?: string;
|
|
2520
|
-
timezone: string;
|
|
2521
|
-
}
|
|
2522
|
-
/**
|
|
2523
|
-
* CreateNotificationRequest is the request to create a notification
|
|
2524
|
-
*/
|
|
2525
|
-
export interface CreateNotificationRequest {
|
|
2526
|
-
type: NotificationType;
|
|
2527
|
-
channel: NotificationChannel;
|
|
2528
|
-
priority?: NotificationPriority;
|
|
2529
|
-
recipient_email?: string;
|
|
2530
|
-
recipient_phone?: string;
|
|
2531
|
-
subject: string;
|
|
2532
|
-
body: string;
|
|
2533
|
-
html_body?: string;
|
|
2534
|
-
template_id?: string;
|
|
2535
|
-
template_data?: {
|
|
2536
|
-
[key: string]: any;
|
|
2537
|
-
};
|
|
2538
|
-
metadata?: {
|
|
2539
|
-
[key: string]: any;
|
|
2540
|
-
};
|
|
2541
|
-
scheduled_at?: string;
|
|
2542
|
-
reference_type?: string;
|
|
2543
|
-
reference_id?: string;
|
|
2544
|
-
}
|
|
2545
|
-
/**
|
|
2546
|
-
* UpdateNotificationPreferencesRequest is the request to update preferences
|
|
2547
|
-
*/
|
|
2548
|
-
export interface UpdateNotificationPreferencesRequest {
|
|
2549
|
-
email_enabled?: boolean;
|
|
2550
|
-
sms_enabled?: boolean;
|
|
2551
|
-
push_enabled?: boolean;
|
|
2552
|
-
slack_enabled?: boolean;
|
|
2553
|
-
billing_notifications?: boolean;
|
|
2554
|
-
task_notifications?: boolean;
|
|
2555
|
-
system_notifications?: boolean;
|
|
2556
|
-
marketing_emails?: boolean;
|
|
2557
|
-
quiet_hours_enabled?: boolean;
|
|
2558
|
-
quiet_hours_start?: string;
|
|
2559
|
-
quiet_hours_end?: string;
|
|
2560
|
-
timezone?: string;
|
|
2561
|
-
}
|
|
2562
|
-
export type PageStatus = number;
|
|
2563
|
-
export declare const PageStatusUnknown: PageStatus;
|
|
2564
|
-
export declare const PageStatusDraft: PageStatus;
|
|
2565
|
-
export declare const PageStatusPublished: PageStatus;
|
|
2566
|
-
export declare const PageStatusArchived: PageStatus;
|
|
2567
|
-
export interface PageMetadata {
|
|
2568
|
-
title: string;
|
|
2569
|
-
description: string;
|
|
2570
|
-
image: string;
|
|
2571
|
-
tags: string[];
|
|
2572
|
-
/**
|
|
2573
|
-
* Docs-specific fields
|
|
2574
|
-
*/
|
|
2575
|
-
order?: number;
|
|
2576
|
-
type?: string;
|
|
2577
|
-
icon?: string;
|
|
2578
|
-
hide_from_nav?: boolean;
|
|
2579
|
-
}
|
|
2580
|
-
export interface Page {
|
|
2581
|
-
BaseModel: BaseModel;
|
|
2582
|
-
PermissionModel: PermissionModel;
|
|
2583
|
-
is_featured: boolean;
|
|
2584
|
-
title: string;
|
|
2585
|
-
content: string;
|
|
2586
|
-
excerpt: string;
|
|
2587
|
-
status: PageStatus;
|
|
2588
|
-
slug: string;
|
|
2589
|
-
metadata: PageMetadata;
|
|
2590
|
-
}
|
|
2591
|
-
export interface PageDTO extends BaseModel, PermissionModelDTO {
|
|
2592
|
-
is_featured: boolean;
|
|
2593
|
-
title: string;
|
|
2594
|
-
content: string;
|
|
2595
|
-
excerpt: string;
|
|
2596
|
-
status: PageStatus;
|
|
2597
|
-
metadata: PageMetadata;
|
|
2598
|
-
slug: string;
|
|
2599
|
-
}
|
|
2600
|
-
export type CommentStatus = number;
|
|
2601
|
-
export declare const CommentStatusUnknown: CommentStatus;
|
|
2602
|
-
export declare const CommentStatusDraft: CommentStatus;
|
|
2603
|
-
export declare const CommentStatusPublished: CommentStatus;
|
|
2604
|
-
export declare const CommentStatusArchived: CommentStatus;
|
|
2605
|
-
export interface Comment {
|
|
2606
|
-
BaseModel: BaseModel;
|
|
2607
|
-
PermissionModel: PermissionModel;
|
|
2608
|
-
page_id: string;
|
|
2609
|
-
content: string;
|
|
2610
|
-
status: CommentStatus;
|
|
2611
|
-
/**
|
|
2612
|
-
* Relationships
|
|
2613
|
-
*/
|
|
2614
|
-
parent_comment_id?: string;
|
|
2615
|
-
children: Comment[];
|
|
2616
|
-
}
|
|
2617
|
-
export interface CommentDTO extends BaseModel, PermissionModelDTO {
|
|
2618
|
-
page_id: string;
|
|
2619
|
-
content: string;
|
|
2620
|
-
parent_comment_id?: string;
|
|
2621
|
-
children: CommentDTO[];
|
|
2622
|
-
status: CommentStatus;
|
|
1051
|
+
previousValue: any;
|
|
2623
1052
|
}
|
|
2624
|
-
export
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
*/
|
|
2633
|
-
items: MenuItem[];
|
|
1053
|
+
export type FlowRunInputs = {
|
|
1054
|
+
[key: string]: {
|
|
1055
|
+
[key: string]: FlowRunInput;
|
|
1056
|
+
};
|
|
1057
|
+
};
|
|
1058
|
+
export interface FlowRunInput {
|
|
1059
|
+
Connection?: FlowNodeConnection;
|
|
1060
|
+
Value: any;
|
|
2634
1061
|
}
|
|
2635
1062
|
/**
|
|
2636
|
-
*
|
|
1063
|
+
* StringSlice is a custom type for storing string slices in the database
|
|
1064
|
+
*/
|
|
1065
|
+
export type StringSlice = string[];
|
|
1066
|
+
/**
|
|
1067
|
+
* IntegrationDTO for API responses (never exposes tokens)
|
|
2637
1068
|
*/
|
|
2638
|
-
export interface
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
description: string;
|
|
2654
|
-
items: MenuItem[];
|
|
1069
|
+
export interface IntegrationDTO extends BaseModel, PermissionModelDTO {
|
|
1070
|
+
provider: string;
|
|
1071
|
+
type: string;
|
|
1072
|
+
status: string;
|
|
1073
|
+
display_name: string;
|
|
1074
|
+
scopes: StringSlice;
|
|
1075
|
+
expires_at?: string;
|
|
1076
|
+
service_account_email?: string;
|
|
1077
|
+
metadata?: {
|
|
1078
|
+
[key: string]: any;
|
|
1079
|
+
};
|
|
1080
|
+
account_identifier?: string;
|
|
1081
|
+
account_name?: string;
|
|
1082
|
+
is_primary: boolean;
|
|
1083
|
+
error_message?: string;
|
|
2655
1084
|
}
|
|
2656
1085
|
/**
|
|
2657
1086
|
* ProjectType represents different types of projects
|
|
@@ -2661,6 +1090,17 @@ export declare const ProjectTypeAgent: ProjectType;
|
|
|
2661
1090
|
export declare const ProjectTypeApp: ProjectType;
|
|
2662
1091
|
export declare const ProjectTypeFlow: ProjectType;
|
|
2663
1092
|
export declare const ProjectTypeOther: ProjectType;
|
|
1093
|
+
/**
|
|
1094
|
+
* ProjectModel provides optional project association for models
|
|
1095
|
+
*/
|
|
1096
|
+
export interface ProjectModel {
|
|
1097
|
+
project_id?: string;
|
|
1098
|
+
project?: Project;
|
|
1099
|
+
}
|
|
1100
|
+
export interface ProjectModelDTO {
|
|
1101
|
+
project_id?: string;
|
|
1102
|
+
project?: ProjectDTO;
|
|
1103
|
+
}
|
|
2664
1104
|
/**
|
|
2665
1105
|
* Project represents a container for organizing related resources
|
|
2666
1106
|
*/
|
|
@@ -2692,6 +1132,28 @@ export interface ProjectDTO extends BaseModel, PermissionModelDTO {
|
|
|
2692
1132
|
parent?: ProjectDTO;
|
|
2693
1133
|
children: (ProjectDTO | undefined)[];
|
|
2694
1134
|
}
|
|
1135
|
+
export type ContentRating = string;
|
|
1136
|
+
export declare const ContentSafe: ContentRating;
|
|
1137
|
+
/**
|
|
1138
|
+
* sexual content
|
|
1139
|
+
*/
|
|
1140
|
+
export declare const ContentSexualSuggestive: ContentRating;
|
|
1141
|
+
export declare const ContentSexualExplicit: ContentRating;
|
|
1142
|
+
/**
|
|
1143
|
+
* violence
|
|
1144
|
+
*/
|
|
1145
|
+
export declare const ContentViolenceNonGraphic: ContentRating;
|
|
1146
|
+
export declare const ContentViolenceGraphic: ContentRating;
|
|
1147
|
+
/**
|
|
1148
|
+
* gore
|
|
1149
|
+
*/
|
|
1150
|
+
export declare const ContentGore: ContentRating;
|
|
1151
|
+
/**
|
|
1152
|
+
* other regulated content
|
|
1153
|
+
*/
|
|
1154
|
+
export declare const ContentDrugs: ContentRating;
|
|
1155
|
+
export declare const ContentSelfHarm: ContentRating;
|
|
1156
|
+
export declare const ContentUnrated: ContentRating;
|
|
2695
1157
|
/**
|
|
2696
1158
|
* SecretRequirement defines a secret that an app requires to run
|
|
2697
1159
|
*/
|
|
@@ -2725,205 +1187,6 @@ export interface SetupAction {
|
|
|
2725
1187
|
provider?: string;
|
|
2726
1188
|
scopes?: string[];
|
|
2727
1189
|
}
|
|
2728
|
-
/**
|
|
2729
|
-
* Capability represents an integration capability that can be requested by apps
|
|
2730
|
-
*/
|
|
2731
|
-
export interface Capability {
|
|
2732
|
-
key: string;
|
|
2733
|
-
provider: string;
|
|
2734
|
-
type: string;
|
|
2735
|
-
scopes?: string[];
|
|
2736
|
-
satisfies?: string[];
|
|
2737
|
-
display_name: string;
|
|
2738
|
-
description?: string;
|
|
2739
|
-
available: boolean;
|
|
2740
|
-
}
|
|
2741
|
-
/**
|
|
2742
|
-
* CapabilitiesResponse is the API response for listing available capabilities
|
|
2743
|
-
*/
|
|
2744
|
-
export interface CapabilitiesResponse {
|
|
2745
|
-
capabilities: Capability[];
|
|
2746
|
-
}
|
|
2747
|
-
/**
|
|
2748
|
-
* CheckRequirementsRequest is the request body for checking requirements
|
|
2749
|
-
*/
|
|
2750
|
-
export interface CheckRequirementsRequest {
|
|
2751
|
-
secrets?: SecretRequirement[];
|
|
2752
|
-
integrations?: IntegrationRequirement[];
|
|
2753
|
-
}
|
|
2754
|
-
/**
|
|
2755
|
-
* CheckRequirementsResponse is the API response for checking requirements
|
|
2756
|
-
*/
|
|
2757
|
-
export interface CheckRequirementsResponse {
|
|
2758
|
-
satisfied: boolean;
|
|
2759
|
-
errors?: RequirementError[];
|
|
2760
|
-
}
|
|
2761
|
-
/**
|
|
2762
|
-
* RequirementsNotMetError is a specific error type for missing requirements
|
|
2763
|
-
* This allows API handlers to detect this case and return structured errors
|
|
2764
|
-
*/
|
|
2765
|
-
export interface RequirementsNotMetError {
|
|
2766
|
-
Errors: RequirementError[];
|
|
2767
|
-
}
|
|
2768
|
-
export interface ResourcePrice {
|
|
2769
|
-
CentsPerHour: number;
|
|
2770
|
-
NanosPerSecond: number;
|
|
2771
|
-
}
|
|
2772
|
-
/**
|
|
2773
|
-
* SchemaConverter handles conversion from JSON Schema to tool format
|
|
2774
|
-
*/
|
|
2775
|
-
export interface SchemaConverter {
|
|
2776
|
-
}
|
|
2777
|
-
/**
|
|
2778
|
-
* RequiredField represents a required field with its name and description
|
|
2779
|
-
*/
|
|
2780
|
-
export interface SchemaField {
|
|
2781
|
-
Name: string;
|
|
2782
|
-
Description: string;
|
|
2783
|
-
}
|
|
2784
|
-
/**
|
|
2785
|
-
* Secret represents a single key-value secret for a team (one row per key)
|
|
2786
|
-
*/
|
|
2787
|
-
export interface Secret {
|
|
2788
|
-
BaseModel: BaseModel;
|
|
2789
|
-
PermissionModel: PermissionModel;
|
|
2790
|
-
/**
|
|
2791
|
-
* Key is the environment variable name (e.g., "API_KEY", "DATABASE_URL")
|
|
2792
|
-
*/
|
|
2793
|
-
key: string;
|
|
2794
|
-
/**
|
|
2795
|
-
* Value is the secret value - uses SensitiveString to prevent accidental exposure
|
|
2796
|
-
*/
|
|
2797
|
-
value: SensitiveString;
|
|
2798
|
-
/**
|
|
2799
|
-
* Description is optional metadata about the secret
|
|
2800
|
-
*/
|
|
2801
|
-
description?: string;
|
|
2802
|
-
/**
|
|
2803
|
-
* Internal marks this secret as system-managed (e.g., integration tokens)
|
|
2804
|
-
* Internal secrets are hidden from user-facing lists but can still be used
|
|
2805
|
-
*/
|
|
2806
|
-
internal: boolean;
|
|
2807
|
-
}
|
|
2808
|
-
/**
|
|
2809
|
-
* SecretDTO for API responses - VALUE IS NEVER EXPOSED
|
|
2810
|
-
*/
|
|
2811
|
-
export interface SecretDTO extends BaseModel, PermissionModelDTO {
|
|
2812
|
-
key: string;
|
|
2813
|
-
masked_value: string;
|
|
2814
|
-
description?: string;
|
|
2815
|
-
internal?: boolean;
|
|
2816
|
-
}
|
|
2817
|
-
/**
|
|
2818
|
-
* SecretMap represents a map of secret key-value pairs (used for transport to workers)
|
|
2819
|
-
*/
|
|
2820
|
-
export type SecretMap = {
|
|
2821
|
-
[key: string]: string;
|
|
2822
|
-
};
|
|
2823
|
-
/**
|
|
2824
|
-
* SecretsLegacy stores encrypted key-value pairs as a blob (DEPRECATED)
|
|
2825
|
-
* Use Secret (individual rows) instead
|
|
2826
|
-
*/
|
|
2827
|
-
export interface SecretsLegacy {
|
|
2828
|
-
BaseModel: BaseModel;
|
|
2829
|
-
PermissionModel: PermissionModel;
|
|
2830
|
-
/**
|
|
2831
|
-
* base64 encoded JSON of key-value pairs
|
|
2832
|
-
*/
|
|
2833
|
-
data: SensitiveString;
|
|
2834
|
-
}
|
|
2835
|
-
/**
|
|
2836
|
-
* GoogleIntegration represents the Google Cloud integration state for a team
|
|
2837
|
-
*/
|
|
2838
|
-
export interface GoogleIntegration {
|
|
2839
|
-
enabled: boolean;
|
|
2840
|
-
service_account_email: string;
|
|
2841
|
-
created_at?: string;
|
|
2842
|
-
}
|
|
2843
|
-
/**
|
|
2844
|
-
* GoogleIntegrationDTO for API responses (doesn't expose the key)
|
|
2845
|
-
*/
|
|
2846
|
-
export interface GoogleIntegrationDTO {
|
|
2847
|
-
enabled: boolean;
|
|
2848
|
-
service_account_email: string;
|
|
2849
|
-
created_at?: string;
|
|
2850
|
-
}
|
|
2851
|
-
/**
|
|
2852
|
-
* GoogleIntegrationCreateRequest is the request to enable Google integration
|
|
2853
|
-
*/
|
|
2854
|
-
export interface GoogleIntegrationCreateRequest {
|
|
2855
|
-
}
|
|
2856
|
-
/**
|
|
2857
|
-
* GoogleIntegrationCreateResponse is the response after enabling Google integration
|
|
2858
|
-
*/
|
|
2859
|
-
export interface GoogleIntegrationCreateResponse {
|
|
2860
|
-
service_account_email: string;
|
|
2861
|
-
instructions: string;
|
|
2862
|
-
}
|
|
2863
|
-
/**
|
|
2864
|
-
* Secret keys for Google integration
|
|
2865
|
-
*/
|
|
2866
|
-
export declare const SecretGoogleServiceAccountEmail = "GOOGLE_SERVICE_ACCOUNT_EMAIL";
|
|
2867
|
-
/**
|
|
2868
|
-
* Secret keys for Google integration
|
|
2869
|
-
*/
|
|
2870
|
-
export declare const SecretGoogleServiceAccountJSON = "GOOGLE_SERVICE_ACCOUNT_JSON";
|
|
2871
|
-
/**
|
|
2872
|
-
* Secret keys for Google integration
|
|
2873
|
-
*/
|
|
2874
|
-
export declare const SecretGoogleAccessToken = "GOOGLE_ACCESS_TOKEN";
|
|
2875
|
-
/**
|
|
2876
|
-
* GoogleAccessToken represents a temporary access token for a service account
|
|
2877
|
-
*/
|
|
2878
|
-
export interface GoogleAccessToken {
|
|
2879
|
-
access_token: string;
|
|
2880
|
-
token_type: string;
|
|
2881
|
-
expires_in: number;
|
|
2882
|
-
service_account_email: string;
|
|
2883
|
-
}
|
|
2884
|
-
/**
|
|
2885
|
-
* SystemMetadata stores system-level configuration that needs to persist
|
|
2886
|
-
*/
|
|
2887
|
-
export interface SystemMetadata {
|
|
2888
|
-
key: string;
|
|
2889
|
-
value: string;
|
|
2890
|
-
}
|
|
2891
|
-
/**
|
|
2892
|
-
* SystemMetadataKeyFingerprint stores the current encryption key fingerprint
|
|
2893
|
-
*/
|
|
2894
|
-
export declare const SystemMetadataKeyFingerprint = "encryption_key_fingerprint";
|
|
2895
|
-
/**
|
|
2896
|
-
* SensitiveString is a string type that prevents accidental exposure of secrets.
|
|
2897
|
-
* It implements custom JSON marshaling, SQL scanning, and fmt.Stringer to always
|
|
2898
|
-
* redact the value unless explicitly accessed via .Expose().
|
|
2899
|
-
* Security features:
|
|
2900
|
-
* - Envelope encryption at rest: DEK encrypted with KEK, data encrypted with DEK
|
|
2901
|
-
* - JSON serialization: always returns "" (empty string)
|
|
2902
|
-
* - fmt.Sprintf with %s, %v, %#v: always returns "[REDACTED]"
|
|
2903
|
-
* - Only .Expose() returns the actual value - audit all call sites!
|
|
2904
|
-
* Encryption is enabled when SECRETS_ENCRYPTION_KEY env var is set.
|
|
2905
|
-
* Values are stored as "enc:v2:<encrypted_dek>:<encrypted_data>" in the database.
|
|
2906
|
-
* Key rotation only re-encrypts the DEK, not the data.
|
|
2907
|
-
*/
|
|
2908
|
-
export interface SensitiveString {
|
|
2909
|
-
}
|
|
2910
|
-
export interface Session {
|
|
2911
|
-
id: string;
|
|
2912
|
-
hash: string;
|
|
2913
|
-
token: string;
|
|
2914
|
-
user_id: string;
|
|
2915
|
-
user?: User;
|
|
2916
|
-
created_at: string;
|
|
2917
|
-
expires_at: string;
|
|
2918
|
-
ip: string;
|
|
2919
|
-
user_agent: string;
|
|
2920
|
-
city: string;
|
|
2921
|
-
country: string;
|
|
2922
|
-
os: string;
|
|
2923
|
-
browser: string;
|
|
2924
|
-
browser_version: string;
|
|
2925
|
-
is_anonymous: boolean;
|
|
2926
|
-
}
|
|
2927
1190
|
export type InstanceCloudProvider = string;
|
|
2928
1191
|
export declare const CloudAWS: InstanceCloudProvider;
|
|
2929
1192
|
export declare const CloudAzure: InstanceCloudProvider;
|
|
@@ -2962,235 +1225,58 @@ export interface Instance {
|
|
|
2962
1225
|
hourly_price: number;
|
|
2963
1226
|
template_id?: string;
|
|
2964
1227
|
volume_ids?: string[];
|
|
2965
|
-
tags?: string[];
|
|
2966
|
-
configuration?: InstanceConfiguration;
|
|
2967
|
-
launch_configuration?: InstanceLaunchConfiguration;
|
|
2968
|
-
auto_delete?: InstanceThresholdConfig;
|
|
2969
|
-
alert?: InstanceThresholdConfig;
|
|
2970
|
-
volume_mount?: InstanceVolumeMountConfig;
|
|
2971
|
-
envs?: InstanceEnvVar[];
|
|
2972
|
-
}
|
|
2973
|
-
export interface InstanceRequest {
|
|
2974
|
-
cloud: InstanceCloudProvider;
|
|
2975
|
-
name: string;
|
|
2976
|
-
region: string;
|
|
2977
|
-
shade_cloud: boolean;
|
|
2978
|
-
shade_instance_type: string;
|
|
2979
|
-
os?: string;
|
|
2980
|
-
ssh_key_id?: string;
|
|
2981
|
-
template_id?: string;
|
|
2982
|
-
volume_ids?: string[];
|
|
2983
|
-
tags?: string[];
|
|
2984
|
-
launch_configuration?: InstanceLaunchConfiguration;
|
|
2985
|
-
auto_delete?: InstanceThresholdConfig;
|
|
2986
|
-
alert?: InstanceThresholdConfig;
|
|
2987
|
-
volume_mount?: InstanceVolumeMountConfig;
|
|
2988
|
-
envs?: InstanceEnvVar[];
|
|
2989
|
-
}
|
|
2990
|
-
export interface InstanceConfiguration {
|
|
2991
|
-
gpu_type: string;
|
|
2992
|
-
interconnect: string;
|
|
2993
|
-
memory_in_gb: number;
|
|
2994
|
-
num_gpus: number;
|
|
2995
|
-
os: string;
|
|
2996
|
-
storage_in_gb: number;
|
|
2997
|
-
vcpus: number;
|
|
2998
|
-
vram_per_gpu_in_gb: number;
|
|
2999
|
-
}
|
|
3000
|
-
export interface InstanceLaunchConfiguration {
|
|
3001
|
-
type: string;
|
|
3002
|
-
docker_configuration?: InstanceDockerConfig;
|
|
3003
|
-
script_configuration?: InstanceScriptConfig;
|
|
3004
|
-
}
|
|
3005
|
-
export interface InstanceDockerConfig {
|
|
3006
|
-
image: string;
|
|
3007
|
-
args?: string;
|
|
3008
|
-
shared_memory_in_gb?: number;
|
|
3009
|
-
envs?: InstanceEnvVar[];
|
|
3010
|
-
port_mappings?: InstancePortMapping[];
|
|
3011
|
-
volume_mounts?: InstanceVolumeMount[];
|
|
3012
|
-
}
|
|
3013
|
-
export interface InstanceScriptConfig {
|
|
3014
|
-
base64_script: string;
|
|
3015
|
-
}
|
|
3016
|
-
export interface InstancePortMapping {
|
|
3017
|
-
host_port: number;
|
|
3018
|
-
container_port: number;
|
|
3019
|
-
}
|
|
3020
|
-
export interface InstanceVolumeMount {
|
|
3021
|
-
host_path: string;
|
|
3022
|
-
container_path: string;
|
|
3023
|
-
}
|
|
3024
|
-
export interface InstanceThresholdConfig {
|
|
3025
|
-
date_threshold?: string;
|
|
3026
|
-
spend_threshold?: string;
|
|
3027
|
-
}
|
|
3028
|
-
export interface InstanceVolumeMountConfig {
|
|
3029
|
-
auto: boolean;
|
|
3030
|
-
}
|
|
3031
|
-
export interface InstanceEnvVar {
|
|
3032
|
-
name: string;
|
|
3033
|
-
value: string;
|
|
3034
|
-
}
|
|
3035
|
-
export type InstanceTypeDeploymentType = string;
|
|
3036
|
-
export declare const InstanceTypeDeploymentTypeVM: InstanceTypeDeploymentType;
|
|
3037
|
-
export declare const InstanceTypeDeploymentTypeContainer: InstanceTypeDeploymentType;
|
|
3038
|
-
export declare const InstanceTypeDeploymentTypeBaremetal: InstanceTypeDeploymentType;
|
|
3039
|
-
export interface InstanceType extends BaseModel, PermissionModel {
|
|
3040
|
-
cloud: InstanceCloudProvider;
|
|
3041
|
-
region: string;
|
|
3042
|
-
shade_instance_type: string;
|
|
3043
|
-
cloud_instance_type: string;
|
|
3044
|
-
deployment_type: InstanceTypeDeploymentType;
|
|
3045
|
-
hourly_price: number;
|
|
3046
|
-
configuration?: InstanceTypeConfiguration;
|
|
3047
|
-
availability: InstanceTypeAvailability[];
|
|
3048
|
-
boot_time?: InstanceTypeBootTime;
|
|
3049
|
-
}
|
|
3050
|
-
export interface InstanceTypeConfiguration {
|
|
3051
|
-
gpu_type: string;
|
|
3052
|
-
interconnect: string;
|
|
3053
|
-
memory_in_gb: number;
|
|
3054
|
-
num_gpus: number;
|
|
3055
|
-
os_options: string[];
|
|
3056
|
-
storage_in_gb: number;
|
|
3057
|
-
vcpus: number;
|
|
3058
|
-
vram_per_gpu_in_gb: number;
|
|
3059
|
-
}
|
|
3060
|
-
export interface InstanceTypeAvailability {
|
|
3061
|
-
available: boolean;
|
|
3062
|
-
region: string;
|
|
3063
|
-
}
|
|
3064
|
-
export interface InstanceTypeBootTime {
|
|
3065
|
-
average_seconds: number;
|
|
3066
|
-
updated_at: string;
|
|
3067
|
-
sample_size: number;
|
|
3068
|
-
}
|
|
3069
|
-
export interface SlackResponse {
|
|
3070
|
-
Body: string;
|
|
3071
|
-
ContentType: string;
|
|
3072
|
-
}
|
|
3073
|
-
/**
|
|
3074
|
-
* SlackIntegrationMetadata contains Slack-specific context for chat messages
|
|
3075
|
-
* This is stored in ChatMessage.IntegrationMetadata as JSON
|
|
3076
|
-
*/
|
|
3077
|
-
export interface SlackIntegrationMetadata {
|
|
3078
|
-
channel: string;
|
|
3079
|
-
thread_ts: string;
|
|
3080
|
-
team_id?: string;
|
|
3081
|
-
user_id?: string;
|
|
3082
|
-
bot_message_ts?: string;
|
|
3083
|
-
stream_started?: boolean;
|
|
3084
|
-
stream_ts?: string;
|
|
3085
|
-
}
|
|
3086
|
-
/**
|
|
3087
|
-
* SlackBlock represents a Slack Block Kit block
|
|
3088
|
-
*/
|
|
3089
|
-
export interface SlackBlock {
|
|
3090
|
-
type: string;
|
|
3091
|
-
text?: any;
|
|
3092
|
-
}
|
|
3093
|
-
/**
|
|
3094
|
-
* SlackTextObject represents a text object in Slack Block Kit
|
|
3095
|
-
*/
|
|
3096
|
-
export interface SlackTextObject {
|
|
3097
|
-
type: string;
|
|
3098
|
-
text: string;
|
|
3099
|
-
}
|
|
3100
|
-
/**
|
|
3101
|
-
* SlackPostMessageRequest represents the payload for posting a message to Slack
|
|
3102
|
-
*/
|
|
3103
|
-
export interface SlackPostMessageRequest {
|
|
3104
|
-
channel: string;
|
|
3105
|
-
text?: string;
|
|
3106
|
-
markdown_text?: string;
|
|
3107
|
-
blocks?: SlackBlock[];
|
|
3108
|
-
thread_ts?: string;
|
|
3109
|
-
mrkdwn?: boolean;
|
|
1228
|
+
tags?: string[];
|
|
1229
|
+
configuration?: InstanceConfiguration;
|
|
1230
|
+
launch_configuration?: InstanceLaunchConfiguration;
|
|
1231
|
+
auto_delete?: InstanceThresholdConfig;
|
|
1232
|
+
alert?: InstanceThresholdConfig;
|
|
1233
|
+
volume_mount?: InstanceVolumeMountConfig;
|
|
1234
|
+
envs?: InstanceEnvVar[];
|
|
3110
1235
|
}
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
1236
|
+
export interface InstanceConfiguration {
|
|
1237
|
+
gpu_type: string;
|
|
1238
|
+
interconnect: string;
|
|
1239
|
+
memory_in_gb: number;
|
|
1240
|
+
num_gpus: number;
|
|
1241
|
+
os: string;
|
|
1242
|
+
storage_in_gb: number;
|
|
1243
|
+
vcpus: number;
|
|
1244
|
+
vram_per_gpu_in_gb: number;
|
|
3119
1245
|
}
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
export interface SlackAssistantThreadsSetStatusRequest {
|
|
3125
|
-
channel_id: string;
|
|
3126
|
-
thread_ts: string;
|
|
3127
|
-
status: string;
|
|
3128
|
-
loading_messages?: string[];
|
|
1246
|
+
export interface InstanceLaunchConfiguration {
|
|
1247
|
+
type: string;
|
|
1248
|
+
docker_configuration?: InstanceDockerConfig;
|
|
1249
|
+
script_configuration?: InstanceScriptConfig;
|
|
3129
1250
|
}
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
1251
|
+
export interface InstanceDockerConfig {
|
|
1252
|
+
image: string;
|
|
1253
|
+
args?: string;
|
|
1254
|
+
shared_memory_in_gb?: number;
|
|
1255
|
+
envs?: InstanceEnvVar[];
|
|
1256
|
+
port_mappings?: InstancePortMapping[];
|
|
1257
|
+
volume_mounts?: InstanceVolumeMount[];
|
|
3136
1258
|
}
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
*/
|
|
3140
|
-
export interface SlackAPIResponse {
|
|
3141
|
-
ok: boolean;
|
|
3142
|
-
error?: string;
|
|
3143
|
-
ts?: string;
|
|
1259
|
+
export interface InstanceScriptConfig {
|
|
1260
|
+
base64_script: string;
|
|
3144
1261
|
}
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
export interface SlackConversationsRepliesResponse {
|
|
3149
|
-
ok: boolean;
|
|
3150
|
-
error?: string;
|
|
3151
|
-
messages: SlackThreadMessage[];
|
|
1262
|
+
export interface InstancePortMapping {
|
|
1263
|
+
host_port: number;
|
|
1264
|
+
container_port: number;
|
|
3152
1265
|
}
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
export interface SlackStartStreamRequest {
|
|
3157
|
-
channel: string;
|
|
3158
|
-
thread_ts: string;
|
|
3159
|
-
markdown_text?: string;
|
|
3160
|
-
recipient_user_id?: string;
|
|
3161
|
-
recipient_team_id?: string;
|
|
1266
|
+
export interface InstanceVolumeMount {
|
|
1267
|
+
host_path: string;
|
|
1268
|
+
container_path: string;
|
|
3162
1269
|
}
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
export interface SlackAppendStreamRequest {
|
|
3167
|
-
channel: string;
|
|
3168
|
-
ts: string;
|
|
3169
|
-
markdown_text?: string;
|
|
1270
|
+
export interface InstanceThresholdConfig {
|
|
1271
|
+
date_threshold?: string;
|
|
1272
|
+
spend_threshold?: string;
|
|
3170
1273
|
}
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
*/
|
|
3174
|
-
export interface SlackStopStreamRequest {
|
|
3175
|
-
channel: string;
|
|
3176
|
-
ts: string;
|
|
1274
|
+
export interface InstanceVolumeMountConfig {
|
|
1275
|
+
auto: boolean;
|
|
3177
1276
|
}
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
export interface SystemInfo {
|
|
3182
|
-
hostname: string;
|
|
3183
|
-
ipv4: string;
|
|
3184
|
-
ipv6: string;
|
|
3185
|
-
mac_address: string;
|
|
3186
|
-
os: string;
|
|
3187
|
-
docker: Docker;
|
|
3188
|
-
wsl2: WSL2;
|
|
3189
|
-
cpus: CPU[];
|
|
3190
|
-
ram: RAM;
|
|
3191
|
-
volumes: Volume[];
|
|
3192
|
-
hf_cache: HFCacheInfo;
|
|
3193
|
-
gpus: GPU[];
|
|
1277
|
+
export interface InstanceEnvVar {
|
|
1278
|
+
name: string;
|
|
1279
|
+
value: string;
|
|
3194
1280
|
}
|
|
3195
1281
|
export interface TelemetrySystemInfo {
|
|
3196
1282
|
cpus: CPU[];
|
|
@@ -3198,19 +1284,6 @@ export interface TelemetrySystemInfo {
|
|
|
3198
1284
|
gpus: GPU[];
|
|
3199
1285
|
volumes: Volume[];
|
|
3200
1286
|
}
|
|
3201
|
-
export interface Docker {
|
|
3202
|
-
binary_path: string;
|
|
3203
|
-
installed: boolean;
|
|
3204
|
-
socket_path: string;
|
|
3205
|
-
socket_available: boolean;
|
|
3206
|
-
running: boolean;
|
|
3207
|
-
version: string;
|
|
3208
|
-
}
|
|
3209
|
-
export interface WSL2 {
|
|
3210
|
-
installed: boolean;
|
|
3211
|
-
enabled: boolean;
|
|
3212
|
-
version: string;
|
|
3213
|
-
}
|
|
3214
1287
|
export interface CPU {
|
|
3215
1288
|
name: string;
|
|
3216
1289
|
vendor_id: string;
|
|
@@ -3252,54 +1325,6 @@ export interface GPU {
|
|
|
3252
1325
|
memory_total: number;
|
|
3253
1326
|
temperature: number;
|
|
3254
1327
|
}
|
|
3255
|
-
/**
|
|
3256
|
-
* CachedRevisionInfo represents information about a cached revision
|
|
3257
|
-
*/
|
|
3258
|
-
export interface CachedRevisionInfo {
|
|
3259
|
-
commit_hash: string;
|
|
3260
|
-
snapshot_path: string;
|
|
3261
|
-
last_modified: string;
|
|
3262
|
-
size_on_disk: number;
|
|
3263
|
-
size_on_disk_str: string;
|
|
3264
|
-
nb_files: number;
|
|
3265
|
-
refs: string[];
|
|
3266
|
-
}
|
|
3267
|
-
/**
|
|
3268
|
-
* CachedRepoInfo represents information about a cached repository
|
|
3269
|
-
*/
|
|
3270
|
-
export interface CachedRepoInfo {
|
|
3271
|
-
repo_id: string;
|
|
3272
|
-
repo_type: string;
|
|
3273
|
-
repo_path: string;
|
|
3274
|
-
last_accessed: string;
|
|
3275
|
-
last_modified: string;
|
|
3276
|
-
size_on_disk: number;
|
|
3277
|
-
size_on_disk_str: string;
|
|
3278
|
-
nb_files: number;
|
|
3279
|
-
refs: string[];
|
|
3280
|
-
Revisions: CachedRevisionInfo[];
|
|
3281
|
-
}
|
|
3282
|
-
/**
|
|
3283
|
-
* HFCacheInfo represents information about the Huggingface cache
|
|
3284
|
-
*/
|
|
3285
|
-
export interface HFCacheInfo {
|
|
3286
|
-
cache_dir: string;
|
|
3287
|
-
repos: CachedRepoInfo[];
|
|
3288
|
-
size_on_disk: number;
|
|
3289
|
-
warnings: string[];
|
|
3290
|
-
}
|
|
3291
|
-
/**
|
|
3292
|
-
* DeletionStrategy represents a strategy for deleting revisions
|
|
3293
|
-
*/
|
|
3294
|
-
export interface DeletionStrategy {
|
|
3295
|
-
repos: CachedRepoInfo[];
|
|
3296
|
-
snapshots: string[];
|
|
3297
|
-
expected_freed_size: number;
|
|
3298
|
-
expected_freed_size_str: string;
|
|
3299
|
-
}
|
|
3300
|
-
export interface CacheNotFoundError {
|
|
3301
|
-
cache_dir: string;
|
|
3302
|
-
}
|
|
3303
1328
|
export type TaskStatus = number;
|
|
3304
1329
|
export declare const TaskStatusUnknown: TaskStatus;
|
|
3305
1330
|
export declare const TaskStatusReceived: TaskStatus;
|
|
@@ -3317,53 +1342,6 @@ export type Infra = string;
|
|
|
3317
1342
|
export declare const InfraPrivate: Infra;
|
|
3318
1343
|
export declare const InfraCloud: Infra;
|
|
3319
1344
|
export declare const InfraPrivateFirst: Infra;
|
|
3320
|
-
export interface Task {
|
|
3321
|
-
BaseModel: BaseModel;
|
|
3322
|
-
PermissionModel: PermissionModel;
|
|
3323
|
-
VersionedStruct: VersionedStruct;
|
|
3324
|
-
EncryptedModel: EncryptedModel;
|
|
3325
|
-
is_featured: boolean;
|
|
3326
|
-
status: TaskStatus;
|
|
3327
|
-
/**
|
|
3328
|
-
* Foreign keys
|
|
3329
|
-
*/
|
|
3330
|
-
app_id: string;
|
|
3331
|
-
app?: App;
|
|
3332
|
-
version_id: string;
|
|
3333
|
-
app_version?: AppVersion;
|
|
3334
|
-
variant: string;
|
|
3335
|
-
infra: Infra;
|
|
3336
|
-
workers: string[];
|
|
3337
|
-
engine_id?: string;
|
|
3338
|
-
engine?: EngineState;
|
|
3339
|
-
worker_id?: string;
|
|
3340
|
-
worker?: WorkerState;
|
|
3341
|
-
flow_id?: string;
|
|
3342
|
-
flow_run_id?: string;
|
|
3343
|
-
sub_flow_run_id?: string;
|
|
3344
|
-
/**
|
|
3345
|
-
* This part should be all replaced by the new graph model
|
|
3346
|
-
*/
|
|
3347
|
-
chat_id?: string;
|
|
3348
|
-
agent_id?: string;
|
|
3349
|
-
agent_version_id?: string;
|
|
3350
|
-
agent?: Agent;
|
|
3351
|
-
tool_call_id?: string;
|
|
3352
|
-
webhook?: string;
|
|
3353
|
-
input: any;
|
|
3354
|
-
output: any;
|
|
3355
|
-
error: string;
|
|
3356
|
-
nsfw: boolean;
|
|
3357
|
-
/**
|
|
3358
|
-
* Relationships
|
|
3359
|
-
*/
|
|
3360
|
-
events: TaskEvent[];
|
|
3361
|
-
logs: TaskLog[];
|
|
3362
|
-
telemetry: TimescaleTask[];
|
|
3363
|
-
usage_events: (UsageEvent | undefined)[];
|
|
3364
|
-
transaction_id?: string;
|
|
3365
|
-
transaction?: Transaction;
|
|
3366
|
-
}
|
|
3367
1345
|
export interface TaskEvent {
|
|
3368
1346
|
id: string;
|
|
3369
1347
|
created_at: string;
|
|
@@ -3410,10 +1388,11 @@ export interface TaskDTO extends BaseModel, PermissionModelDTO {
|
|
|
3410
1388
|
worker_id?: string;
|
|
3411
1389
|
worker?: WorkerStateSummary;
|
|
3412
1390
|
webhook?: string;
|
|
1391
|
+
setup?: any;
|
|
3413
1392
|
input: any;
|
|
3414
1393
|
output: any;
|
|
3415
1394
|
error: string;
|
|
3416
|
-
|
|
1395
|
+
rating: ContentRating;
|
|
3417
1396
|
events: TaskEvent[];
|
|
3418
1397
|
logs: TaskLog[];
|
|
3419
1398
|
telemetry: TimescaleTask[];
|
|
@@ -3428,7 +1407,6 @@ export interface TimescaleTask {
|
|
|
3428
1407
|
task_seq: number;
|
|
3429
1408
|
app_id: string;
|
|
3430
1409
|
app_version_id: string;
|
|
3431
|
-
app_variant: string;
|
|
3432
1410
|
engine_id: string;
|
|
3433
1411
|
engine_resources: TelemetrySystemInfo;
|
|
3434
1412
|
worker_id: string;
|
|
@@ -3445,6 +1423,11 @@ export interface Team {
|
|
|
3445
1423
|
email: string;
|
|
3446
1424
|
name: string;
|
|
3447
1425
|
avatar_url: string;
|
|
1426
|
+
/**
|
|
1427
|
+
* SetupCompleted indicates whether the team has completed initial setup (chosen a username)
|
|
1428
|
+
* Personal teams start with SetupCompleted=false and a generated temporary username
|
|
1429
|
+
*/
|
|
1430
|
+
setup_completed: boolean;
|
|
3448
1431
|
}
|
|
3449
1432
|
export interface TeamDTO extends BaseModel {
|
|
3450
1433
|
type: TeamType;
|
|
@@ -3452,21 +1435,12 @@ export interface TeamDTO extends BaseModel {
|
|
|
3452
1435
|
username: string;
|
|
3453
1436
|
avatar_url: string;
|
|
3454
1437
|
email: string;
|
|
1438
|
+
setup_completed: boolean;
|
|
3455
1439
|
}
|
|
3456
1440
|
export type TeamRole = string;
|
|
3457
1441
|
export declare const TeamRoleOwner: TeamRole;
|
|
3458
1442
|
export declare const TeamRoleAdmin: TeamRole;
|
|
3459
1443
|
export declare const TeamRoleMember: TeamRole;
|
|
3460
|
-
export interface TeamMember {
|
|
3461
|
-
BaseModel: BaseModel;
|
|
3462
|
-
}
|
|
3463
|
-
export interface TeamMemberDTO {
|
|
3464
|
-
id: string;
|
|
3465
|
-
user_id: string;
|
|
3466
|
-
team_id: string;
|
|
3467
|
-
role: TeamRole;
|
|
3468
|
-
user?: UserRelationDTO;
|
|
3469
|
-
}
|
|
3470
1444
|
/**
|
|
3471
1445
|
* Team-related types
|
|
3472
1446
|
*/
|
|
@@ -3477,39 +1451,43 @@ export interface TeamRelationDTO {
|
|
|
3477
1451
|
type: TeamType;
|
|
3478
1452
|
username: string;
|
|
3479
1453
|
avatar_url: string;
|
|
1454
|
+
setup_completed: boolean;
|
|
3480
1455
|
}
|
|
3481
1456
|
/**
|
|
3482
|
-
*
|
|
3483
|
-
*/
|
|
3484
|
-
export declare const ToolTypeFunction = "function";
|
|
3485
|
-
/**
|
|
3486
|
-
* Tool types and parameter types
|
|
3487
|
-
*/
|
|
3488
|
-
export declare const ToolParamTypeObject = "object";
|
|
3489
|
-
/**
|
|
3490
|
-
* Tool types and parameter types
|
|
1457
|
+
* ToolInvocationFunction contains the function details for a tool invocation
|
|
3491
1458
|
*/
|
|
3492
|
-
export
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
export declare const ToolParamTypeInteger = "integer";
|
|
3497
|
-
/**
|
|
3498
|
-
* Tool types and parameter types
|
|
3499
|
-
*/
|
|
3500
|
-
export declare const ToolParamTypeNumber = "number";
|
|
3501
|
-
/**
|
|
3502
|
-
* Tool types and parameter types
|
|
3503
|
-
*/
|
|
3504
|
-
export declare const ToolParamTypeBoolean = "boolean";
|
|
1459
|
+
export interface ToolInvocationFunction {
|
|
1460
|
+
name: string;
|
|
1461
|
+
arguments: StringEncodedMap;
|
|
1462
|
+
}
|
|
3505
1463
|
/**
|
|
3506
|
-
*
|
|
1464
|
+
* ToolInvocationStatus represents the execution status of a tool invocation
|
|
3507
1465
|
*/
|
|
3508
|
-
export
|
|
1466
|
+
export type ToolInvocationStatus = string;
|
|
1467
|
+
export declare const ToolInvocationStatusPending: ToolInvocationStatus;
|
|
1468
|
+
export declare const ToolInvocationStatusInProgress: ToolInvocationStatus;
|
|
1469
|
+
export declare const ToolInvocationStatusAwaitingInput: ToolInvocationStatus;
|
|
1470
|
+
export declare const ToolInvocationStatusAwaitingApproval: ToolInvocationStatus;
|
|
1471
|
+
export declare const ToolInvocationStatusCompleted: ToolInvocationStatus;
|
|
1472
|
+
export declare const ToolInvocationStatusFailed: ToolInvocationStatus;
|
|
1473
|
+
export declare const ToolInvocationStatusCancelled: ToolInvocationStatus;
|
|
3509
1474
|
/**
|
|
3510
|
-
*
|
|
1475
|
+
* ToolInvocationDTO for API responses
|
|
3511
1476
|
*/
|
|
3512
|
-
export
|
|
1477
|
+
export interface ToolInvocationDTO extends BaseModel, PermissionModelDTO {
|
|
1478
|
+
chat_message_id: string;
|
|
1479
|
+
tool_invocation_id: string;
|
|
1480
|
+
type: ToolType;
|
|
1481
|
+
execution_id?: string;
|
|
1482
|
+
function: ToolInvocationFunction;
|
|
1483
|
+
status: ToolInvocationStatus;
|
|
1484
|
+
result?: string;
|
|
1485
|
+
/**
|
|
1486
|
+
* Unified fields
|
|
1487
|
+
*/
|
|
1488
|
+
data?: any;
|
|
1489
|
+
widget?: Widget;
|
|
1490
|
+
}
|
|
3513
1491
|
export interface Tool {
|
|
3514
1492
|
type: string;
|
|
3515
1493
|
function: ToolFunction;
|
|
@@ -3560,21 +1538,6 @@ export interface Transaction {
|
|
|
3560
1538
|
[key: string]: any;
|
|
3561
1539
|
};
|
|
3562
1540
|
}
|
|
3563
|
-
export interface TransactionDTO extends BaseModel, PermissionModelDTO {
|
|
3564
|
-
type: TransactionType;
|
|
3565
|
-
amount: number;
|
|
3566
|
-
reference: string;
|
|
3567
|
-
notes: string;
|
|
3568
|
-
payment_record_id?: string;
|
|
3569
|
-
payment_record?: PaymentRecord;
|
|
3570
|
-
usage_billing_record_id?: string;
|
|
3571
|
-
usage_billing_record?: UsageBillingRecord;
|
|
3572
|
-
usage_billing_refund_id?: string;
|
|
3573
|
-
usage_billing_refund?: UsageBillingRefund;
|
|
3574
|
-
metadata: {
|
|
3575
|
-
[key: string]: any;
|
|
3576
|
-
};
|
|
3577
|
-
}
|
|
3578
1541
|
/**
|
|
3579
1542
|
* PaymentRecordStatus represents the status of a payment
|
|
3580
1543
|
*/
|
|
@@ -3607,19 +1570,6 @@ export interface PaymentRecord {
|
|
|
3607
1570
|
session_id: string;
|
|
3608
1571
|
session_url: string;
|
|
3609
1572
|
}
|
|
3610
|
-
/**
|
|
3611
|
-
* Legacy aliases for backward compatibility
|
|
3612
|
-
*/
|
|
3613
|
-
export type CheckoutSessionStatus = PaymentRecordStatus;
|
|
3614
|
-
export type CheckoutSession = PaymentRecord;
|
|
3615
|
-
export type StripeTransactionStatus = PaymentRecordStatus;
|
|
3616
|
-
export type StripeTransaction = PaymentRecord;
|
|
3617
|
-
export declare const CheckoutSessionStatusOpen: number;
|
|
3618
|
-
export declare const CheckoutSessionStatusComplete: number;
|
|
3619
|
-
export declare const CheckoutSessionStatusExpired: number;
|
|
3620
|
-
export declare const StripeTransactionStatusOpen: number;
|
|
3621
|
-
export declare const StripeTransactionStatusComplete: number;
|
|
3622
|
-
export declare const StripeTransactionStatusExpired: number;
|
|
3623
1573
|
export type UsageEventResourceTier = string;
|
|
3624
1574
|
export declare const UsageEventResourceTierPrivate: UsageEventResourceTier;
|
|
3625
1575
|
export declare const UsageEventResourceTierCloud: UsageEventResourceTier;
|
|
@@ -3631,6 +1581,7 @@ export declare const MetaItemTypeText: MetaItemType;
|
|
|
3631
1581
|
export declare const MetaItemTypeImage: MetaItemType;
|
|
3632
1582
|
export declare const MetaItemTypeVideo: MetaItemType;
|
|
3633
1583
|
export declare const MetaItemTypeAudio: MetaItemType;
|
|
1584
|
+
export declare const MetaItemTypeRaw: MetaItemType;
|
|
3634
1585
|
/**
|
|
3635
1586
|
* VideoResolution represents standard video resolution presets
|
|
3636
1587
|
*/
|
|
@@ -3699,40 +1650,69 @@ export interface UsageEvent {
|
|
|
3699
1650
|
quantity: number;
|
|
3700
1651
|
unit: string;
|
|
3701
1652
|
}
|
|
3702
|
-
export interface UsageEventSummary {
|
|
3703
|
-
tier_usage: {
|
|
3704
|
-
[key: UsageEventResourceTier]: number;
|
|
3705
|
-
};
|
|
3706
|
-
type_usage: {
|
|
3707
|
-
[key: string]: number;
|
|
3708
|
-
};
|
|
3709
|
-
model_usage: {
|
|
3710
|
-
[key: string]: number;
|
|
3711
|
-
};
|
|
3712
|
-
total_usage: number;
|
|
3713
|
-
}
|
|
3714
1653
|
export interface UsageBillingRecord {
|
|
3715
1654
|
BaseModel: BaseModel;
|
|
3716
1655
|
PermissionModel: PermissionModel;
|
|
3717
|
-
usage_events: (UsageEvent | undefined)[];
|
|
3718
1656
|
/**
|
|
3719
1657
|
* Fee breakdown (all in microcents)
|
|
3720
1658
|
*/
|
|
3721
1659
|
total: number;
|
|
1660
|
+
/**
|
|
1661
|
+
* User debit (total charged)
|
|
1662
|
+
*/
|
|
3722
1663
|
user_debit_transaction_id: string;
|
|
3723
1664
|
user_debit_transaction?: Transaction;
|
|
3724
|
-
|
|
3725
|
-
|
|
1665
|
+
/**
|
|
1666
|
+
* Resource owner credit (for providing compute)
|
|
1667
|
+
*/
|
|
1668
|
+
resource_credit_transaction_id: string;
|
|
1669
|
+
resource_credit_transaction?: Transaction;
|
|
1670
|
+
/**
|
|
1671
|
+
* Creator royalty credit (app creator earnings)
|
|
1672
|
+
*/
|
|
1673
|
+
royalty_credit_transaction_id: string;
|
|
1674
|
+
royalty_credit_transaction?: Transaction;
|
|
1675
|
+
/**
|
|
1676
|
+
* Inference fee credit (platform fee)
|
|
1677
|
+
*/
|
|
1678
|
+
inference_credit_transaction_id: string;
|
|
1679
|
+
inference_credit_transaction?: Transaction;
|
|
1680
|
+
/**
|
|
1681
|
+
* Partner fee credit (cloud API fee)
|
|
1682
|
+
*/
|
|
1683
|
+
partner_credit_transaction_id: string;
|
|
1684
|
+
partner_credit_transaction?: Transaction;
|
|
3726
1685
|
}
|
|
3727
1686
|
export interface UsageBillingRefund {
|
|
3728
1687
|
BaseModel: BaseModel;
|
|
3729
1688
|
PermissionModel: PermissionModel;
|
|
3730
1689
|
usage_billing_record_id: string;
|
|
3731
1690
|
usage_billing_record?: UsageBillingRecord;
|
|
1691
|
+
/**
|
|
1692
|
+
* User refund (total refunded)
|
|
1693
|
+
*/
|
|
3732
1694
|
user_debit_refund_transaction_id: string;
|
|
3733
1695
|
user_debit_refund_transaction?: Transaction;
|
|
3734
|
-
|
|
3735
|
-
|
|
1696
|
+
/**
|
|
1697
|
+
* Resource owner reversal
|
|
1698
|
+
*/
|
|
1699
|
+
resource_credit_refund_transaction_id: string;
|
|
1700
|
+
resource_credit_refund_transaction?: Transaction;
|
|
1701
|
+
/**
|
|
1702
|
+
* Creator royalty reversal
|
|
1703
|
+
*/
|
|
1704
|
+
royalty_credit_refund_transaction_id: string;
|
|
1705
|
+
royalty_credit_refund_transaction?: Transaction;
|
|
1706
|
+
/**
|
|
1707
|
+
* Inference fee reversal
|
|
1708
|
+
*/
|
|
1709
|
+
inference_credit_refund_transaction_id: string;
|
|
1710
|
+
inference_credit_refund_transaction?: Transaction;
|
|
1711
|
+
/**
|
|
1712
|
+
* Partner fee reversal
|
|
1713
|
+
*/
|
|
1714
|
+
partner_credit_refund_transaction_id: string;
|
|
1715
|
+
partner_credit_refund_transaction?: Transaction;
|
|
3736
1716
|
}
|
|
3737
1717
|
/**
|
|
3738
1718
|
* User-related types
|
|
@@ -3741,7 +1721,6 @@ export interface User {
|
|
|
3741
1721
|
BaseModel: BaseModel;
|
|
3742
1722
|
default_team_id: string;
|
|
3743
1723
|
role: Role;
|
|
3744
|
-
username: string;
|
|
3745
1724
|
email: string;
|
|
3746
1725
|
name: string;
|
|
3747
1726
|
full_name: string;
|
|
@@ -3756,7 +1735,6 @@ export declare const RoleSystem: Role;
|
|
|
3756
1735
|
export interface UserDTO extends BaseModel {
|
|
3757
1736
|
default_team_id: string;
|
|
3758
1737
|
role: Role;
|
|
3759
|
-
username: string;
|
|
3760
1738
|
email: string;
|
|
3761
1739
|
name: string;
|
|
3762
1740
|
full_name: string;
|
|
@@ -3771,7 +1749,6 @@ export interface UserRelationDTO {
|
|
|
3771
1749
|
created_at: string;
|
|
3772
1750
|
updated_at: string;
|
|
3773
1751
|
role: Role;
|
|
3774
|
-
username: string;
|
|
3775
1752
|
avatar_url: string;
|
|
3776
1753
|
}
|
|
3777
1754
|
export interface UserMetadata {
|
|
@@ -3798,7 +1775,15 @@ export interface WidgetActionButton {
|
|
|
3798
1775
|
action: WidgetAction;
|
|
3799
1776
|
variant?: string;
|
|
3800
1777
|
}
|
|
1778
|
+
/**
|
|
1779
|
+
* WidgetNodeType constants
|
|
1780
|
+
* Primitives (literal values): text, markdown, image, badge, button, input, select, checkbox, row, col
|
|
1781
|
+
* Data-bound (read from ToolInvocation.Data): plan-list, key-value, status-badge
|
|
1782
|
+
*/
|
|
3801
1783
|
export type WidgetNodeType = string;
|
|
1784
|
+
/**
|
|
1785
|
+
* Primitive node types (render literal values)
|
|
1786
|
+
*/
|
|
3802
1787
|
export declare const WidgetNodeTypeText: WidgetNodeType;
|
|
3803
1788
|
export declare const WidgetNodeTypeMarkdown: WidgetNodeType;
|
|
3804
1789
|
export declare const WidgetNodeTypeImage: WidgetNodeType;
|
|
@@ -3809,6 +1794,12 @@ export declare const WidgetNodeTypeSelect: WidgetNodeType;
|
|
|
3809
1794
|
export declare const WidgetNodeTypeCheckbox: WidgetNodeType;
|
|
3810
1795
|
export declare const WidgetNodeTypeRow: WidgetNodeType;
|
|
3811
1796
|
export declare const WidgetNodeTypeCol: WidgetNodeType;
|
|
1797
|
+
/**
|
|
1798
|
+
* Data-bound node types (read from ToolInvocation.Data via DataKey)
|
|
1799
|
+
*/
|
|
1800
|
+
export declare const WidgetNodeTypePlanList: WidgetNodeType;
|
|
1801
|
+
export declare const WidgetNodeTypeKeyValue: WidgetNodeType;
|
|
1802
|
+
export declare const WidgetNodeTypeStatusBadge: WidgetNodeType;
|
|
3812
1803
|
/**
|
|
3813
1804
|
* WidgetNode represents a UI element in a widget (text, input, select, etc.)
|
|
3814
1805
|
*/
|
|
@@ -3827,6 +1818,11 @@ export interface WidgetNode {
|
|
|
3827
1818
|
defaultChecked?: boolean;
|
|
3828
1819
|
children?: WidgetNode[];
|
|
3829
1820
|
gap?: number;
|
|
1821
|
+
/**
|
|
1822
|
+
* Data binding - for data-bound node types, specifies which key in ToolInvocation.Data to read
|
|
1823
|
+
* Empty string means read entire Data object (useful for key-value display)
|
|
1824
|
+
*/
|
|
1825
|
+
dataKey?: string;
|
|
3830
1826
|
}
|
|
3831
1827
|
/**
|
|
3832
1828
|
* WidgetSelectOption represents an option in a select widget
|
|
@@ -3836,7 +1832,9 @@ export interface WidgetSelectOption {
|
|
|
3836
1832
|
value: string;
|
|
3837
1833
|
}
|
|
3838
1834
|
/**
|
|
3839
|
-
* Widget represents an interactive
|
|
1835
|
+
* Widget represents an interactive widget for display in chat
|
|
1836
|
+
* Type is either "ui" (structured nodes) or "html" (raw HTML)
|
|
1837
|
+
* For "ui" widgets, data-bound nodes read values from ToolInvocation.Data
|
|
3840
1838
|
*/
|
|
3841
1839
|
export interface Widget {
|
|
3842
1840
|
type: string;
|
|
@@ -3853,95 +1851,3 @@ export interface Widget {
|
|
|
3853
1851
|
export type WidgetFormData = {
|
|
3854
1852
|
[key: string]: any;
|
|
3855
1853
|
};
|
|
3856
|
-
/**
|
|
3857
|
-
* WidgetActionResult represents the result of a widget action submission
|
|
3858
|
-
*/
|
|
3859
|
-
export interface WidgetActionResult {
|
|
3860
|
-
action: WidgetAction;
|
|
3861
|
-
form_data?: WidgetFormData;
|
|
3862
|
-
}
|
|
3863
|
-
/**
|
|
3864
|
-
* WebSocket message types
|
|
3865
|
-
*/
|
|
3866
|
-
export declare const WSEventTaskStatus = "task_status";
|
|
3867
|
-
/**
|
|
3868
|
-
* Task WebSocket
|
|
3869
|
-
*/
|
|
3870
|
-
export declare const WSEventTaskLog = "task_log";
|
|
3871
|
-
/**
|
|
3872
|
-
* Task WebSocket
|
|
3873
|
-
*/
|
|
3874
|
-
export declare const WSEventTaskProgress = "task_progress";
|
|
3875
|
-
/**
|
|
3876
|
-
* Task WebSocket
|
|
3877
|
-
*/
|
|
3878
|
-
export declare const WSEventTaskOutput = "task_output";
|
|
3879
|
-
/**
|
|
3880
|
-
* Task WebSocket
|
|
3881
|
-
*/
|
|
3882
|
-
export declare const WSEventTaskFailed = "task_failed";
|
|
3883
|
-
export interface WsTaskStatusPayload {
|
|
3884
|
-
task_id: string;
|
|
3885
|
-
time: string;
|
|
3886
|
-
status: TaskStatus;
|
|
3887
|
-
}
|
|
3888
|
-
export interface WsTaskLogPayload {
|
|
3889
|
-
task_id: string;
|
|
3890
|
-
log_type: TaskLogType;
|
|
3891
|
-
logs: string;
|
|
3892
|
-
}
|
|
3893
|
-
export interface WsTaskOutputPayload {
|
|
3894
|
-
task_id: string;
|
|
3895
|
-
output: string;
|
|
3896
|
-
}
|
|
3897
|
-
export interface WsTaskFailedPayload {
|
|
3898
|
-
task_id: string;
|
|
3899
|
-
error: string;
|
|
3900
|
-
}
|
|
3901
|
-
export declare const WSEventTaskRun = "task_run";
|
|
3902
|
-
export declare const WSEventTaskCancel = "task_cancel";
|
|
3903
|
-
export declare const WSEventTaskForceCancel = "task_force_cancel";
|
|
3904
|
-
export declare const WSEventEngineStop = "engine_stop";
|
|
3905
|
-
export declare const WSEventEngineDeleteHFCacheRepo = "engine_delete_hfcache_repo";
|
|
3906
|
-
export interface WsTaskRunPayload {
|
|
3907
|
-
task: TaskDTO;
|
|
3908
|
-
secrets: string;
|
|
3909
|
-
}
|
|
3910
|
-
export interface WsTaskCancelPayload {
|
|
3911
|
-
task: TaskDTO;
|
|
3912
|
-
}
|
|
3913
|
-
export interface WsTaskForceCancelPayload {
|
|
3914
|
-
task: TaskDTO;
|
|
3915
|
-
}
|
|
3916
|
-
/**
|
|
3917
|
-
* Engine WebSocket
|
|
3918
|
-
*/
|
|
3919
|
-
export declare const WSEventEngineHeartbeat = "engine_heartbeat";
|
|
3920
|
-
/**
|
|
3921
|
-
* Engine WebSocket
|
|
3922
|
-
*/
|
|
3923
|
-
export declare const WSEventEngineTelemetry = "engine_telemetry";
|
|
3924
|
-
export type WorkerStatusMap = {
|
|
3925
|
-
[key: string]: WorkerStatus;
|
|
3926
|
-
};
|
|
3927
|
-
export interface WsEngineHeartbeatPayload {
|
|
3928
|
-
engine_id: string;
|
|
3929
|
-
engine_status: EngineStatus;
|
|
3930
|
-
worker_statuses: WorkerStatusMap;
|
|
3931
|
-
}
|
|
3932
|
-
export interface WsEngineTelemetryPayload {
|
|
3933
|
-
engine_id: string;
|
|
3934
|
-
engine_state: EngineState;
|
|
3935
|
-
}
|
|
3936
|
-
export interface WsEngineDeleteHFCacheRepoPayload {
|
|
3937
|
-
repo_id: string;
|
|
3938
|
-
}
|
|
3939
|
-
/**
|
|
3940
|
-
* Worker WebSocket
|
|
3941
|
-
*/
|
|
3942
|
-
export declare const WSEventWorkerUpdate = "worker_update";
|
|
3943
|
-
export interface WsWorkerUpdatePayload {
|
|
3944
|
-
engine_id: string;
|
|
3945
|
-
worker_id: string;
|
|
3946
|
-
worker_state: WorkerState;
|
|
3947
|
-
}
|