@inferencesh/sdk 0.4.0 → 0.4.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/dist/types.d.ts +18 -1
- package/dist/types.js +8 -7
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -143,7 +143,6 @@ export interface ClientToolConfigDTO {
|
|
|
143
143
|
export interface CoreAppConfig {
|
|
144
144
|
id: string;
|
|
145
145
|
version_id: string;
|
|
146
|
-
app?: App;
|
|
147
146
|
}
|
|
148
147
|
export interface Agent {
|
|
149
148
|
BaseModel: BaseModel;
|
|
@@ -409,6 +408,10 @@ export interface PartialFile {
|
|
|
409
408
|
filename?: string;
|
|
410
409
|
}
|
|
411
410
|
export interface FileCreateRequest {
|
|
411
|
+
/**
|
|
412
|
+
* Category determines the storage path prefix: "uploads" (default), "inputs", "outputs", "repos"
|
|
413
|
+
*/
|
|
414
|
+
category?: string;
|
|
412
415
|
files: PartialFile[];
|
|
413
416
|
}
|
|
414
417
|
export interface CreateFlowRequest {
|
|
@@ -1354,6 +1357,19 @@ export interface GPU {
|
|
|
1354
1357
|
memory_total: number;
|
|
1355
1358
|
temperature: number;
|
|
1356
1359
|
}
|
|
1360
|
+
/**
|
|
1361
|
+
* TaskStatus represents the state of a task in its lifecycle.
|
|
1362
|
+
* DESIGN NOTES:
|
|
1363
|
+
* - Stored as int in DB for compact storage and efficient equality checks.
|
|
1364
|
+
* - The int values are ordered to allow SQL range queries (status < ?) for performance.
|
|
1365
|
+
* - IMPORTANT: If you add new statuses in the MIDDLE of the sequence, you must:
|
|
1366
|
+
* 1. Write a migration to shift existing values
|
|
1367
|
+
* 2. Update SDKs and frontends
|
|
1368
|
+
* - ALTERNATIVE: Add new statuses at the END to avoid migrations, but then you
|
|
1369
|
+
* cannot use range comparisons (< >) and must use explicit checks (IN, NOT IN).
|
|
1370
|
+
* - Kubernetes/Temporal use strings and explicit checks for maximum flexibility.
|
|
1371
|
+
* Consider switching to strings if range comparisons become a maintenance burden.
|
|
1372
|
+
*/
|
|
1357
1373
|
export type TaskStatus = number;
|
|
1358
1374
|
export declare const TaskStatusUnknown: TaskStatus;
|
|
1359
1375
|
export declare const TaskStatusReceived: TaskStatus;
|
|
@@ -1363,6 +1379,7 @@ export declare const TaskStatusPreparing: TaskStatus;
|
|
|
1363
1379
|
export declare const TaskStatusServing: TaskStatus;
|
|
1364
1380
|
export declare const TaskStatusSettingUp: TaskStatus;
|
|
1365
1381
|
export declare const TaskStatusRunning: TaskStatus;
|
|
1382
|
+
export declare const TaskStatusCancelling: TaskStatus;
|
|
1366
1383
|
export declare const TaskStatusUploading: TaskStatus;
|
|
1367
1384
|
export declare const TaskStatusCompleted: TaskStatus;
|
|
1368
1385
|
export declare const TaskStatusFailed: TaskStatus;
|
package/dist/types.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Code generated by tygo. DO NOT EDIT.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
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.ChatStatusAwaitingInput = 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.
|
|
6
|
-
exports.
|
|
7
|
-
exports.WidgetNodeTypeStatusBadge = exports.WidgetNodeTypeKeyValue = exports.WidgetNodeTypePlanList = exports.WidgetNodeTypeCol = exports.WidgetNodeTypeRow = exports.WidgetNodeTypeCheckbox = exports.WidgetNodeTypeSelect = void 0;
|
|
5
|
+
exports.TaskStatusCancelled = exports.TaskStatusFailed = exports.TaskStatusCompleted = exports.TaskStatusUploading = exports.TaskStatusCancelling = 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 = exports.DeviceAuthStatusDenied = void 0;
|
|
6
|
+
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 = exports.InfraCloud = exports.InfraPrivate = void 0;
|
|
7
|
+
exports.WidgetNodeTypeStatusBadge = exports.WidgetNodeTypeKeyValue = exports.WidgetNodeTypePlanList = exports.WidgetNodeTypeCol = exports.WidgetNodeTypeRow = exports.WidgetNodeTypeCheckbox = exports.WidgetNodeTypeSelect = exports.WidgetNodeTypeInput = void 0;
|
|
8
8
|
exports.ToolTypeApp = "app"; // App tools - creates a Task
|
|
9
9
|
exports.ToolTypeAgent = "agent"; // Sub-agent tools - creates a sub-Chat
|
|
10
10
|
exports.ToolTypeHook = "hook"; // Webhook tools - HTTP POST to external URL
|
|
@@ -112,10 +112,11 @@ exports.TaskStatusPreparing = 4; // 4
|
|
|
112
112
|
exports.TaskStatusServing = 5; // 5
|
|
113
113
|
exports.TaskStatusSettingUp = 6; // 6
|
|
114
114
|
exports.TaskStatusRunning = 7; // 7
|
|
115
|
-
exports.
|
|
116
|
-
exports.
|
|
117
|
-
exports.
|
|
118
|
-
exports.
|
|
115
|
+
exports.TaskStatusCancelling = 8; // 8 - Graceful cancellation in progress
|
|
116
|
+
exports.TaskStatusUploading = 9; // 9
|
|
117
|
+
exports.TaskStatusCompleted = 10; // 10
|
|
118
|
+
exports.TaskStatusFailed = 11; // 11
|
|
119
|
+
exports.TaskStatusCancelled = 12; // 12
|
|
119
120
|
exports.InfraPrivate = "private";
|
|
120
121
|
exports.InfraCloud = "cloud";
|
|
121
122
|
exports.InfraPrivateFirst = "private_first";
|