@inferencesh/sdk 0.1.3 → 0.2.1
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 +78 -0
- package/dist/agent.js +188 -0
- package/dist/client.d.ts +116 -10
- package/dist/client.js +194 -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 +208 -0
- package/dist/tool-builder.test.d.ts +1 -0
- package/dist/tool-builder.test.js +291 -0
- package/dist/types.d.ts +625 -2697
- package/dist/types.js +49 -266
- package/package.json +1 -1
package/dist/types.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by tygo. DO NOT EDIT.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
4
|
+
exports.DeviceAuthStatusDenied = exports.DeviceAuthStatusExpired = exports.DeviceAuthStatusApproved = exports.DeviceAuthStatusPending = exports.IntegrationTypeTelegram = exports.IntegrationTypeTeams = exports.IntegrationTypeDiscord = exports.IntegrationTypeSlack = exports.ChatMessageContentTypeTool = exports.ChatMessageContentTypeFile = exports.ChatMessageContentTypeImage = exports.ChatMessageContentTypeReasoning = exports.ChatMessageContentTypeText = exports.ChatMessageStatusCancelled = exports.ChatMessageStatusFailed = exports.ChatMessageStatusReady = exports.ChatMessageStatusPending = exports.ChatMessageRoleTool = exports.ChatMessageRoleAssistant = exports.ChatMessageRoleUser = exports.ChatMessageRoleSystem = exports.PlanStepStatusCancelled = exports.PlanStepStatusCompleted = exports.PlanStepStatusInProgress = exports.PlanStepStatusPending = exports.ChatStatusCompleted = exports.ChatStatusIdle = exports.ChatStatusBusy = exports.VisibilityUnlisted = exports.VisibilityPublic = exports.VisibilityPrivate = exports.GPUTypeApple = exports.GPUTypeAMD = exports.GPUTypeNvidia = exports.GPUTypeIntel = exports.GPUTypeNone = exports.GPUTypeAny = exports.AppCategoryFlow = exports.AppCategoryOther = exports.AppCategory3D = exports.AppCategoryChat = exports.AppCategoryText = exports.AppCategoryAudio = exports.AppCategoryVideo = exports.AppCategoryImage = exports.ToolTypeInternal = exports.ToolTypeClient = exports.ToolTypeHook = exports.ToolTypeAgent = exports.ToolTypeApp = void 0;
|
|
5
|
+
exports.InfraCloud = exports.InfraPrivate = exports.TaskStatusCancelled = exports.TaskStatusFailed = exports.TaskStatusCompleted = exports.TaskStatusUploading = exports.TaskStatusRunning = exports.TaskStatusSettingUp = exports.TaskStatusServing = exports.TaskStatusPreparing = exports.TaskStatusScheduled = exports.TaskStatusQueued = exports.TaskStatusReceived = exports.TaskStatusUnknown = exports.InstanceStatusDeleted = exports.InstanceStatusActive = exports.InstanceStatusPending = exports.CloudShade = exports.CloudVultr = exports.CloudMassedCompute = exports.CloudDatacrunch = exports.CloudPaperspace = exports.CloudOblivus = exports.CloudJarvisLabs = exports.CloudLatitude = exports.CloudRunPod = exports.CloudTensorDock = exports.CloudLambdaLabs = exports.CloudAzure = exports.CloudAWS = exports.ContentUnrated = exports.ContentSelfHarm = exports.ContentDrugs = exports.ContentGore = exports.ContentViolenceGraphic = exports.ContentViolenceNonGraphic = exports.ContentSexualExplicit = exports.ContentSexualSuggestive = exports.ContentSafe = exports.ProjectTypeOther = exports.ProjectTypeFlow = exports.ProjectTypeApp = exports.ProjectTypeAgent = exports.EngineStatusStopped = exports.EngineStatusStopping = exports.EngineStatusPending = exports.EngineStatusRunning = exports.DeviceAuthStatusLoading = exports.DeviceAuthStatusInvalid = exports.DeviceAuthStatusValid = void 0;
|
|
6
|
+
exports.WidgetNodeTypeSelect = exports.WidgetNodeTypeInput = exports.WidgetNodeTypeButton = exports.WidgetNodeTypeBadge = exports.WidgetNodeTypeImage = exports.WidgetNodeTypeMarkdown = exports.WidgetNodeTypeText = exports.RoleSystem = exports.RoleAdmin = exports.RoleUser = exports.RoleGuest = exports.VideoRes4K = exports.VideoRes1440P = exports.VideoRes1080P = exports.VideoRes720P = exports.VideoRes480P = exports.MetaItemTypeRaw = exports.MetaItemTypeAudio = exports.MetaItemTypeVideo = exports.MetaItemTypeImage = exports.MetaItemTypeText = exports.UsageEventResourceTierCloud = exports.UsageEventResourceTierPrivate = exports.PaymentRecordTypeAutoRecharge = exports.PaymentRecordTypeCheckout = exports.PaymentRecordStatusExpired = exports.PaymentRecordStatusFailed = exports.PaymentRecordStatusComplete = exports.PaymentRecordStatusPending = exports.TransactionTypeDebit = exports.TransactionTypeCredit = exports.ToolInvocationStatusCancelled = exports.ToolInvocationStatusFailed = exports.ToolInvocationStatusCompleted = exports.ToolInvocationStatusAwaitingApproval = exports.ToolInvocationStatusAwaitingInput = exports.ToolInvocationStatusInProgress = exports.ToolInvocationStatusPending = exports.TeamRoleMember = exports.TeamRoleAdmin = exports.TeamRoleOwner = exports.TeamTypeSystem = exports.TeamTypeTeam = exports.TeamTypePersonal = exports.TaskLogTypeTask = exports.TaskLogTypeSetup = exports.TaskLogTypeServe = exports.TaskLogTypeRun = exports.TaskLogTypeBuild = exports.InfraPrivateFirst = void 0;
|
|
7
|
+
exports.WidgetNodeTypeStatusBadge = exports.WidgetNodeTypeKeyValue = exports.WidgetNodeTypePlanList = exports.WidgetNodeTypeCol = exports.WidgetNodeTypeRow = exports.WidgetNodeTypeCheckbox = void 0;
|
|
8
|
+
exports.ToolTypeApp = "app"; // App tools - creates a Task
|
|
9
|
+
exports.ToolTypeAgent = "agent"; // Sub-agent tools - creates a sub-Chat
|
|
10
|
+
exports.ToolTypeHook = "hook"; // Webhook tools - HTTP POST to external URL
|
|
11
|
+
exports.ToolTypeClient = "client"; // Client tools - executed by frontend
|
|
12
|
+
exports.ToolTypeInternal = "internal"; // Internal/built-in tools (plan, memory, widget, finish)
|
|
13
13
|
exports.AppCategoryImage = "image";
|
|
14
14
|
exports.AppCategoryVideo = "video";
|
|
15
15
|
exports.AppCategoryAudio = "audio";
|
|
@@ -27,24 +27,24 @@ exports.GPUTypeApple = "apple";
|
|
|
27
27
|
exports.VisibilityPrivate = "private";
|
|
28
28
|
exports.VisibilityPublic = "public";
|
|
29
29
|
exports.VisibilityUnlisted = "unlisted";
|
|
30
|
-
exports.PermRead = "read";
|
|
31
|
-
exports.PermWrite = "write";
|
|
32
|
-
exports.PaymentProviderNone = "";
|
|
33
|
-
exports.PaymentProviderStripe = "stripe";
|
|
34
|
-
exports.BillingStatusActive = "active"; // Normal state. Spending allowed.
|
|
35
|
-
exports.BillingStatusSpendLocked = "spend_locked"; // Spending blocked due to insufficient funds or limits.
|
|
36
|
-
exports.BillingStatusManualHold = "manual_hold"; // Admin-imposed block, not related to balance.
|
|
37
|
-
exports.BillingStatusSuspended = "suspended"; // Payment failure, risk, or compliance issue.
|
|
38
30
|
exports.ChatStatusBusy = "busy";
|
|
39
31
|
exports.ChatStatusIdle = "idle";
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
exports.
|
|
32
|
+
/**
|
|
33
|
+
* ChatStatusWaitingInput ChatStatus = "waiting_input"
|
|
34
|
+
*/
|
|
35
|
+
exports.ChatStatusCompleted = "completed";
|
|
36
|
+
exports.PlanStepStatusPending = "pending";
|
|
37
|
+
exports.PlanStepStatusInProgress = "in_progress";
|
|
38
|
+
exports.PlanStepStatusCompleted = "completed";
|
|
39
|
+
exports.PlanStepStatusCancelled = "cancelled";
|
|
44
40
|
exports.ChatMessageRoleSystem = "system";
|
|
45
41
|
exports.ChatMessageRoleUser = "user";
|
|
46
42
|
exports.ChatMessageRoleAssistant = "assistant";
|
|
47
43
|
exports.ChatMessageRoleTool = "tool";
|
|
44
|
+
exports.ChatMessageStatusPending = "pending"; // Message is being generated
|
|
45
|
+
exports.ChatMessageStatusReady = "ready"; // Message complete, tools ready for execution
|
|
46
|
+
exports.ChatMessageStatusFailed = "failed"; // Message generation failed
|
|
47
|
+
exports.ChatMessageStatusCancelled = "cancelled"; // Message was cancelled
|
|
48
48
|
exports.ChatMessageContentTypeText = "text";
|
|
49
49
|
exports.ChatMessageContentTypeReasoning = "reasoning";
|
|
50
50
|
exports.ChatMessageContentTypeImage = "image";
|
|
@@ -54,41 +54,6 @@ exports.IntegrationTypeSlack = "slack";
|
|
|
54
54
|
exports.IntegrationTypeDiscord = "discord";
|
|
55
55
|
exports.IntegrationTypeTeams = "teams";
|
|
56
56
|
exports.IntegrationTypeTelegram = "telegram";
|
|
57
|
-
exports.ToolInvocationTypeInternal = "internal";
|
|
58
|
-
exports.ToolInvocationTypeApp = "app";
|
|
59
|
-
exports.ToolInvocationTypeAgent = "agent";
|
|
60
|
-
exports.ToolInvocationTypeWidget = "widget";
|
|
61
|
-
exports.ToolInvocationTypePlan = "plan";
|
|
62
|
-
exports.ToolInvocationTypeHook = "hook";
|
|
63
|
-
exports.ToolInvocationTypeUnknown = "unknown";
|
|
64
|
-
exports.ToolInvocationStatusPending = "pending";
|
|
65
|
-
exports.ToolInvocationStatusInProgress = "in_progress";
|
|
66
|
-
exports.ToolInvocationStatusAwaitingInput = "awaiting_input";
|
|
67
|
-
exports.ToolInvocationStatusCompleted = "completed";
|
|
68
|
-
exports.ToolInvocationStatusFailed = "failed";
|
|
69
|
-
exports.ToolInvocationStatusCancelled = "cancelled";
|
|
70
|
-
exports.OpEqual = "eq";
|
|
71
|
-
exports.OpNotEqual = "neq";
|
|
72
|
-
exports.OpIn = "in";
|
|
73
|
-
exports.OpNotIn = "not_in";
|
|
74
|
-
exports.OpGreater = "gt";
|
|
75
|
-
exports.OpGreaterEqual = "gte";
|
|
76
|
-
exports.OpLess = "lt";
|
|
77
|
-
exports.OpLessEqual = "lte";
|
|
78
|
-
exports.OpLike = "like";
|
|
79
|
-
exports.OpILike = "ilike";
|
|
80
|
-
exports.OpContains = "contains";
|
|
81
|
-
exports.OpNotContains = "not_contains";
|
|
82
|
-
/**
|
|
83
|
-
* Null checks
|
|
84
|
-
*/
|
|
85
|
-
exports.OpIsNull = "is_null";
|
|
86
|
-
exports.OpIsNotNull = "is_not_null";
|
|
87
|
-
/**
|
|
88
|
-
* Empty checks (for strings)
|
|
89
|
-
*/
|
|
90
|
-
exports.OpIsEmpty = "is_empty";
|
|
91
|
-
exports.OpIsNotEmpty = "is_not_empty";
|
|
92
57
|
exports.DeviceAuthStatusPending = "pending";
|
|
93
58
|
exports.DeviceAuthStatusApproved = "approved";
|
|
94
59
|
exports.DeviceAuthStatusExpired = "expired";
|
|
@@ -100,148 +65,31 @@ exports.EngineStatusRunning = "running";
|
|
|
100
65
|
exports.EngineStatusPending = "pending";
|
|
101
66
|
exports.EngineStatusStopping = "stopping";
|
|
102
67
|
exports.EngineStatusStopped = "stopped";
|
|
103
|
-
exports.FlowRunStatusUnknown = 0; // 0
|
|
104
|
-
exports.FlowRunStatusPending = 1; // 1
|
|
105
|
-
exports.FlowRunStatusRunning = 2; // 2
|
|
106
|
-
exports.FlowRunStatusCompleted = 3; // 3
|
|
107
|
-
exports.FlowRunStatusFailed = 4; // 4
|
|
108
|
-
exports.FlowRunStatusCancelled = 5; // 5
|
|
109
|
-
exports.GraphNodeTypeUnknown = "unknown";
|
|
110
|
-
exports.GraphNodeTypeJoin = "join";
|
|
111
|
-
exports.GraphNodeTypeSplit = "split";
|
|
112
|
-
exports.GraphNodeTypeTask = "task";
|
|
113
|
-
exports.GraphNodeTypeResource = "resource";
|
|
114
|
-
exports.GraphNodeTypeConditional = "conditional";
|
|
115
|
-
exports.GraphStatusPending = "pending";
|
|
116
|
-
exports.GraphStatusRunning = "running";
|
|
117
|
-
exports.GraphStatusCompleted = "completed";
|
|
118
|
-
exports.GraphStatusFailed = "failed";
|
|
119
|
-
exports.GraphStatusCancelled = "cancelled";
|
|
120
|
-
exports.GraphNodeStatusPending = "pending";
|
|
121
|
-
exports.GraphNodeStatusReady = "ready"; // Dependencies satisfied
|
|
122
|
-
exports.GraphNodeStatusRunning = "running";
|
|
123
|
-
exports.GraphNodeStatusCompleted = "completed";
|
|
124
|
-
exports.GraphNodeStatusFailed = "failed";
|
|
125
|
-
exports.GraphNodeStatusCancelled = "cancelled";
|
|
126
|
-
exports.GraphNodeStatusSkipped = "skipped"; // Conditional branch not taken
|
|
127
|
-
exports.GraphNodeStatusBlocked = "blocked"; // Dependency failed
|
|
128
|
-
exports.GraphEdgeTypeDependency = "dependency"; // Blocking dependency
|
|
129
|
-
exports.GraphEdgeTypeFlow = "flow"; // Non-blocking flow
|
|
130
|
-
exports.GraphEdgeTypeConditional = "conditional"; // Conditional flow
|
|
131
|
-
//////////
|
|
132
|
-
// source: integration.go
|
|
133
|
-
/**
|
|
134
|
-
* Integration providers
|
|
135
|
-
*/
|
|
136
|
-
exports.IntegrationProviderGoogle = "google";
|
|
137
|
-
/**
|
|
138
|
-
* Integration providers
|
|
139
|
-
*/
|
|
140
|
-
exports.IntegrationProviderSlack = "slack";
|
|
141
|
-
/**
|
|
142
|
-
* Integration providers
|
|
143
|
-
*/
|
|
144
|
-
exports.IntegrationProviderNotion = "notion";
|
|
145
|
-
/**
|
|
146
|
-
* Integration providers
|
|
147
|
-
*/
|
|
148
|
-
exports.IntegrationProviderGitHub = "github";
|
|
149
|
-
/**
|
|
150
|
-
* Integration types
|
|
151
|
-
*/
|
|
152
|
-
exports.IntegrationTypeServiceAccount = "service_account";
|
|
153
|
-
/**
|
|
154
|
-
* Integration types
|
|
155
|
-
*/
|
|
156
|
-
exports.IntegrationTypeOAuth = "oauth";
|
|
157
|
-
/**
|
|
158
|
-
* Integration types
|
|
159
|
-
*/
|
|
160
|
-
exports.IntegrationTypeAPIKey = "api_key";
|
|
161
|
-
/**
|
|
162
|
-
* Integration statuses
|
|
163
|
-
*/
|
|
164
|
-
exports.IntegrationStatusConnected = "connected";
|
|
165
|
-
/**
|
|
166
|
-
* Integration statuses
|
|
167
|
-
*/
|
|
168
|
-
exports.IntegrationStatusDisconnected = "disconnected";
|
|
169
|
-
/**
|
|
170
|
-
* Integration statuses
|
|
171
|
-
*/
|
|
172
|
-
exports.IntegrationStatusExpired = "expired";
|
|
173
|
-
/**
|
|
174
|
-
* Integration statuses
|
|
175
|
-
*/
|
|
176
|
-
exports.IntegrationStatusError = "error";
|
|
177
|
-
exports.NotificationChannelEmail = "email";
|
|
178
|
-
exports.NotificationChannelSMS = "sms";
|
|
179
|
-
exports.NotificationChannelPush = "push";
|
|
180
|
-
exports.NotificationChannelSlack = "slack";
|
|
181
|
-
exports.NotificationPriorityLow = "low";
|
|
182
|
-
exports.NotificationPriorityNormal = "normal";
|
|
183
|
-
exports.NotificationPriorityHigh = "high";
|
|
184
|
-
exports.NotificationPriorityCritical = "critical";
|
|
185
|
-
/**
|
|
186
|
-
* Billing notifications
|
|
187
|
-
*/
|
|
188
|
-
exports.NotificationTypeLowBalance = "low_balance";
|
|
189
|
-
exports.NotificationTypeAutoRecharge = "auto_recharge";
|
|
190
|
-
exports.NotificationTypePaymentSuccess = "payment_success";
|
|
191
|
-
exports.NotificationTypePaymentFailed = "payment_failed";
|
|
192
|
-
exports.NotificationTypeUsageSummary = "usage_summary";
|
|
193
|
-
exports.NotificationTypeSpendingLimit = "spending_limit";
|
|
194
|
-
/**
|
|
195
|
-
* Account notifications
|
|
196
|
-
*/
|
|
197
|
-
exports.NotificationTypeWelcome = "welcome";
|
|
198
|
-
exports.NotificationTypePasswordReset = "password_reset";
|
|
199
|
-
exports.NotificationTypeEmailVerify = "email_verify";
|
|
200
|
-
exports.NotificationTypeSecurityAlert = "security_alert";
|
|
201
|
-
/**
|
|
202
|
-
* Task notifications
|
|
203
|
-
*/
|
|
204
|
-
exports.NotificationTypeTaskComplete = "task_complete";
|
|
205
|
-
exports.NotificationTypeTaskFailed = "task_failed";
|
|
206
|
-
/**
|
|
207
|
-
* System notifications
|
|
208
|
-
*/
|
|
209
|
-
exports.NotificationTypeSystemAlert = "system_alert";
|
|
210
|
-
exports.NotificationTypeMaintenance = "maintenance";
|
|
211
|
-
exports.NotificationStatusPending = "pending";
|
|
212
|
-
exports.NotificationStatusSent = "sent";
|
|
213
|
-
exports.NotificationStatusDelivered = "delivered";
|
|
214
|
-
exports.NotificationStatusFailed = "failed";
|
|
215
|
-
exports.NotificationStatusBounced = "bounced";
|
|
216
|
-
exports.NotificationStatusCancelled = "cancelled";
|
|
217
|
-
exports.PageStatusUnknown = 0; // 0
|
|
218
|
-
exports.PageStatusDraft = 1; // 1
|
|
219
|
-
exports.PageStatusPublished = 2; // 2
|
|
220
|
-
exports.PageStatusArchived = 3; // 3
|
|
221
|
-
exports.CommentStatusUnknown = 0; // 0
|
|
222
|
-
exports.CommentStatusDraft = 1; // 1
|
|
223
|
-
exports.CommentStatusPublished = 2; // 2
|
|
224
|
-
exports.CommentStatusArchived = 3; // 3
|
|
225
68
|
exports.ProjectTypeAgent = "agent";
|
|
226
69
|
exports.ProjectTypeApp = "app";
|
|
227
70
|
exports.ProjectTypeFlow = "flow";
|
|
228
71
|
exports.ProjectTypeOther = "other";
|
|
72
|
+
exports.ContentSafe = "safe";
|
|
229
73
|
/**
|
|
230
|
-
*
|
|
74
|
+
* sexual content
|
|
231
75
|
*/
|
|
232
|
-
exports.
|
|
76
|
+
exports.ContentSexualSuggestive = "sexual_suggestive";
|
|
77
|
+
exports.ContentSexualExplicit = "sexual_explicit";
|
|
233
78
|
/**
|
|
234
|
-
*
|
|
79
|
+
* violence
|
|
235
80
|
*/
|
|
236
|
-
exports.
|
|
81
|
+
exports.ContentViolenceNonGraphic = "violence_non_graphic";
|
|
82
|
+
exports.ContentViolenceGraphic = "violence_graphic";
|
|
237
83
|
/**
|
|
238
|
-
*
|
|
84
|
+
* gore
|
|
239
85
|
*/
|
|
240
|
-
exports.
|
|
86
|
+
exports.ContentGore = "gore";
|
|
241
87
|
/**
|
|
242
|
-
*
|
|
88
|
+
* other regulated content
|
|
243
89
|
*/
|
|
244
|
-
exports.
|
|
90
|
+
exports.ContentDrugs = "drugs";
|
|
91
|
+
exports.ContentSelfHarm = "self_harm";
|
|
92
|
+
exports.ContentUnrated = "unrated";
|
|
245
93
|
exports.CloudAWS = "aws";
|
|
246
94
|
exports.CloudAzure = "azure";
|
|
247
95
|
exports.CloudLambdaLabs = "lambdalabs";
|
|
@@ -258,9 +106,6 @@ exports.CloudShade = "shade";
|
|
|
258
106
|
exports.InstanceStatusPending = "pending";
|
|
259
107
|
exports.InstanceStatusActive = "active";
|
|
260
108
|
exports.InstanceStatusDeleted = "deleted";
|
|
261
|
-
exports.InstanceTypeDeploymentTypeVM = "vm";
|
|
262
|
-
exports.InstanceTypeDeploymentTypeContainer = "container";
|
|
263
|
-
exports.InstanceTypeDeploymentTypeBaremetal = "baremetal";
|
|
264
109
|
exports.TaskStatusUnknown = 0; // 0
|
|
265
110
|
exports.TaskStatusReceived = 1; // 1
|
|
266
111
|
exports.TaskStatusQueued = 2; // 2
|
|
@@ -287,40 +132,13 @@ exports.TeamTypeSystem = "system";
|
|
|
287
132
|
exports.TeamRoleOwner = "owner";
|
|
288
133
|
exports.TeamRoleAdmin = "admin";
|
|
289
134
|
exports.TeamRoleMember = "member";
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
exports.
|
|
296
|
-
|
|
297
|
-
* Tool types and parameter types
|
|
298
|
-
*/
|
|
299
|
-
exports.ToolParamTypeObject = "object";
|
|
300
|
-
/**
|
|
301
|
-
* Tool types and parameter types
|
|
302
|
-
*/
|
|
303
|
-
exports.ToolParamTypeString = "string";
|
|
304
|
-
/**
|
|
305
|
-
* Tool types and parameter types
|
|
306
|
-
*/
|
|
307
|
-
exports.ToolParamTypeInteger = "integer";
|
|
308
|
-
/**
|
|
309
|
-
* Tool types and parameter types
|
|
310
|
-
*/
|
|
311
|
-
exports.ToolParamTypeNumber = "number";
|
|
312
|
-
/**
|
|
313
|
-
* Tool types and parameter types
|
|
314
|
-
*/
|
|
315
|
-
exports.ToolParamTypeBoolean = "boolean";
|
|
316
|
-
/**
|
|
317
|
-
* Tool types and parameter types
|
|
318
|
-
*/
|
|
319
|
-
exports.ToolParamTypeArray = "array";
|
|
320
|
-
/**
|
|
321
|
-
* Tool types and parameter types
|
|
322
|
-
*/
|
|
323
|
-
exports.ToolParamTypeNull = "null";
|
|
135
|
+
exports.ToolInvocationStatusPending = "pending";
|
|
136
|
+
exports.ToolInvocationStatusInProgress = "in_progress";
|
|
137
|
+
exports.ToolInvocationStatusAwaitingInput = "awaiting_input"; // Waiting for user input (widgets)
|
|
138
|
+
exports.ToolInvocationStatusAwaitingApproval = "awaiting_approval"; // Waiting for HIL approval
|
|
139
|
+
exports.ToolInvocationStatusCompleted = "completed";
|
|
140
|
+
exports.ToolInvocationStatusFailed = "failed";
|
|
141
|
+
exports.ToolInvocationStatusCancelled = "cancelled";
|
|
324
142
|
exports.TransactionTypeCredit = "credit"; // Adding credits
|
|
325
143
|
exports.TransactionTypeDebit = "debit"; // Removing credits
|
|
326
144
|
exports.PaymentRecordStatusPending = 0;
|
|
@@ -329,18 +147,13 @@ exports.PaymentRecordStatusFailed = 2;
|
|
|
329
147
|
exports.PaymentRecordStatusExpired = 3;
|
|
330
148
|
exports.PaymentRecordTypeCheckout = "checkout"; // Stripe Checkout session (manual top-up)
|
|
331
149
|
exports.PaymentRecordTypeAutoRecharge = "auto_recharge"; // Direct charge (auto-recharge)
|
|
332
|
-
exports.CheckoutSessionStatusOpen = exports.PaymentRecordStatusPending;
|
|
333
|
-
exports.CheckoutSessionStatusComplete = exports.PaymentRecordStatusComplete;
|
|
334
|
-
exports.CheckoutSessionStatusExpired = exports.PaymentRecordStatusExpired;
|
|
335
|
-
exports.StripeTransactionStatusOpen = exports.PaymentRecordStatusPending;
|
|
336
|
-
exports.StripeTransactionStatusComplete = exports.PaymentRecordStatusComplete;
|
|
337
|
-
exports.StripeTransactionStatusExpired = exports.PaymentRecordStatusExpired;
|
|
338
150
|
exports.UsageEventResourceTierPrivate = "private";
|
|
339
151
|
exports.UsageEventResourceTierCloud = "cloud";
|
|
340
152
|
exports.MetaItemTypeText = "text";
|
|
341
153
|
exports.MetaItemTypeImage = "image";
|
|
342
154
|
exports.MetaItemTypeVideo = "video";
|
|
343
155
|
exports.MetaItemTypeAudio = "audio";
|
|
156
|
+
exports.MetaItemTypeRaw = "raw";
|
|
344
157
|
exports.VideoRes480P = "480p";
|
|
345
158
|
exports.VideoRes720P = "720p";
|
|
346
159
|
exports.VideoRes1080P = "1080p";
|
|
@@ -350,6 +163,9 @@ exports.RoleGuest = "guest";
|
|
|
350
163
|
exports.RoleUser = "user";
|
|
351
164
|
exports.RoleAdmin = "admin";
|
|
352
165
|
exports.RoleSystem = "system";
|
|
166
|
+
/**
|
|
167
|
+
* Primitive node types (render literal values)
|
|
168
|
+
*/
|
|
353
169
|
exports.WidgetNodeTypeText = "text";
|
|
354
170
|
exports.WidgetNodeTypeMarkdown = "markdown";
|
|
355
171
|
exports.WidgetNodeTypeImage = "image";
|
|
@@ -360,42 +176,9 @@ exports.WidgetNodeTypeSelect = "select";
|
|
|
360
176
|
exports.WidgetNodeTypeCheckbox = "checkbox";
|
|
361
177
|
exports.WidgetNodeTypeRow = "row";
|
|
362
178
|
exports.WidgetNodeTypeCol = "col";
|
|
363
|
-
//////////
|
|
364
|
-
// source: ws.go
|
|
365
|
-
/**
|
|
366
|
-
* WebSocket message types
|
|
367
|
-
*/
|
|
368
|
-
exports.WSEventTaskStatus = "task_status";
|
|
369
|
-
/**
|
|
370
|
-
* Task WebSocket
|
|
371
|
-
*/
|
|
372
|
-
exports.WSEventTaskLog = "task_log";
|
|
373
|
-
/**
|
|
374
|
-
* Task WebSocket
|
|
375
|
-
*/
|
|
376
|
-
exports.WSEventTaskProgress = "task_progress";
|
|
377
|
-
/**
|
|
378
|
-
* Task WebSocket
|
|
379
|
-
*/
|
|
380
|
-
exports.WSEventTaskOutput = "task_output";
|
|
381
|
-
/**
|
|
382
|
-
* Task WebSocket
|
|
383
|
-
*/
|
|
384
|
-
exports.WSEventTaskFailed = "task_failed";
|
|
385
|
-
exports.WSEventTaskRun = "task_run";
|
|
386
|
-
exports.WSEventTaskCancel = "task_cancel";
|
|
387
|
-
exports.WSEventTaskForceCancel = "task_force_cancel";
|
|
388
|
-
exports.WSEventEngineStop = "engine_stop";
|
|
389
|
-
exports.WSEventEngineDeleteHFCacheRepo = "engine_delete_hfcache_repo";
|
|
390
|
-
/**
|
|
391
|
-
* Engine WebSocket
|
|
392
|
-
*/
|
|
393
|
-
exports.WSEventEngineHeartbeat = "engine_heartbeat";
|
|
394
|
-
/**
|
|
395
|
-
* Engine WebSocket
|
|
396
|
-
*/
|
|
397
|
-
exports.WSEventEngineTelemetry = "engine_telemetry";
|
|
398
179
|
/**
|
|
399
|
-
*
|
|
180
|
+
* Data-bound node types (read from ToolInvocation.Data via DataKey)
|
|
400
181
|
*/
|
|
401
|
-
exports.
|
|
182
|
+
exports.WidgetNodeTypePlanList = "plan-list"; // Renders plan steps from Data
|
|
183
|
+
exports.WidgetNodeTypeKeyValue = "key-value"; // Renders key-value pairs from Data
|
|
184
|
+
exports.WidgetNodeTypeStatusBadge = "status-badge"; // Renders status badge from Data
|