@inferencesh/sdk 0.5.17 → 0.5.19
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 +137 -20
- package/dist/types.js +10 -0
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -395,6 +395,9 @@ export interface APIError {
|
|
|
395
395
|
code: string;
|
|
396
396
|
message: string;
|
|
397
397
|
suggestions?: string[];
|
|
398
|
+
meta?: {
|
|
399
|
+
[key: string]: any;
|
|
400
|
+
};
|
|
398
401
|
}
|
|
399
402
|
/**
|
|
400
403
|
* ApiAppRunRequest is the request body for /apps/run endpoint.
|
|
@@ -675,6 +678,7 @@ export interface AuthResponse {
|
|
|
675
678
|
session_id: string;
|
|
676
679
|
otp_required?: boolean;
|
|
677
680
|
redirect_to?: string;
|
|
681
|
+
provider?: string;
|
|
678
682
|
}
|
|
679
683
|
/**
|
|
680
684
|
* DeviceAuthResponse is returned when a device initiates auth
|
|
@@ -812,6 +816,12 @@ export interface IntegrationConnectResponse {
|
|
|
812
816
|
* For service accounts - instructions
|
|
813
817
|
*/
|
|
814
818
|
instructions?: string;
|
|
819
|
+
/**
|
|
820
|
+
* RequiresConfirmation — the connect was paused, user must acknowledge and retry with a flag.
|
|
821
|
+
*/
|
|
822
|
+
requires_confirmation?: boolean;
|
|
823
|
+
confirmation_type?: string;
|
|
824
|
+
message?: string;
|
|
815
825
|
}
|
|
816
826
|
export interface ProjectCreateRequest {
|
|
817
827
|
name: string;
|
|
@@ -954,6 +964,43 @@ export interface App extends BaseModel, PermissionModel {
|
|
|
954
964
|
version_id: string;
|
|
955
965
|
version?: AppVersion;
|
|
956
966
|
}
|
|
967
|
+
/**
|
|
968
|
+
* AppPricing configures all pricing using CEL expressions
|
|
969
|
+
* Empty expressions use defaults. All values in nanocents (1 cent = 1,000,000,000)
|
|
970
|
+
*/
|
|
971
|
+
export interface AppPricing {
|
|
972
|
+
prices: {
|
|
973
|
+
[key: string]: number;
|
|
974
|
+
};
|
|
975
|
+
upstream_pricing?: string;
|
|
976
|
+
/**
|
|
977
|
+
* Resource fee expression (compute cost)
|
|
978
|
+
* Available variables: resources (list of {name, price_per_second}), usage_seconds, prices
|
|
979
|
+
* Default: sum(resources.map(r, r.price_per_second)) * usage_seconds
|
|
980
|
+
*/
|
|
981
|
+
resource_expression: string;
|
|
982
|
+
/**
|
|
983
|
+
* CEL expressions for each fee type (result in nanocents)
|
|
984
|
+
* Available variables: inputs, outputs, prices, resource_fee, usage_seconds
|
|
985
|
+
*/
|
|
986
|
+
inference_expression: string;
|
|
987
|
+
royalty_expression: string;
|
|
988
|
+
partner_expression: string;
|
|
989
|
+
/**
|
|
990
|
+
* Total expression combines all fees (can apply weights/discounts)
|
|
991
|
+
* Available variables: inputs, outputs, prices, resource_fee, usage_seconds, inference_fee, royalty_fee, partner_fee
|
|
992
|
+
* Default: resource_fee + inference_fee + royalty_fee + partner_fee
|
|
993
|
+
*/
|
|
994
|
+
total_expression: string;
|
|
995
|
+
description: string;
|
|
996
|
+
/**
|
|
997
|
+
* DescriptionRendered is the result of evaluating Description against the
|
|
998
|
+
* static prices map at save time. Frontends should display this rather than
|
|
999
|
+
* the raw CEL source. Empty string means the description failed to render
|
|
1000
|
+
* (e.g. references variables outside `prices`).
|
|
1001
|
+
*/
|
|
1002
|
+
description_rendered?: string;
|
|
1003
|
+
}
|
|
957
1004
|
export interface AppGPUResource {
|
|
958
1005
|
count: number;
|
|
959
1006
|
vram: number;
|
|
@@ -1103,6 +1150,23 @@ export interface AppSession extends BaseModel, PermissionModel {
|
|
|
1103
1150
|
worker?: WorkerState;
|
|
1104
1151
|
task?: Task;
|
|
1105
1152
|
}
|
|
1153
|
+
/**
|
|
1154
|
+
* PublicAppStoreDTO is a lean DTO for public app store display.
|
|
1155
|
+
*/
|
|
1156
|
+
export interface PublicAppStoreDTO {
|
|
1157
|
+
id: string;
|
|
1158
|
+
category: string;
|
|
1159
|
+
subcategory?: string;
|
|
1160
|
+
tags?: string[];
|
|
1161
|
+
namespace: string;
|
|
1162
|
+
name: string;
|
|
1163
|
+
description: string;
|
|
1164
|
+
images: AppImages;
|
|
1165
|
+
is_featured: boolean;
|
|
1166
|
+
rank: number;
|
|
1167
|
+
has_approved_version: boolean;
|
|
1168
|
+
page_id?: string;
|
|
1169
|
+
}
|
|
1106
1170
|
export interface BaseModel {
|
|
1107
1171
|
id: string;
|
|
1108
1172
|
short_id: string;
|
|
@@ -1812,6 +1876,73 @@ export interface KnowledgeFile {
|
|
|
1812
1876
|
content?: string;
|
|
1813
1877
|
}
|
|
1814
1878
|
export type SkillFile = KnowledgeFile;
|
|
1879
|
+
export interface PublicSkillStoreDTO {
|
|
1880
|
+
id: string;
|
|
1881
|
+
category: string;
|
|
1882
|
+
tags?: string[];
|
|
1883
|
+
namespace: string;
|
|
1884
|
+
name: string;
|
|
1885
|
+
description: string;
|
|
1886
|
+
is_featured: boolean;
|
|
1887
|
+
rank: number;
|
|
1888
|
+
has_approved_version: boolean;
|
|
1889
|
+
}
|
|
1890
|
+
export type PageStatus = number;
|
|
1891
|
+
export declare const PageStatusUnknown: PageStatus;
|
|
1892
|
+
export declare const PageStatusDraft: PageStatus;
|
|
1893
|
+
export declare const PageStatusPublished: PageStatus;
|
|
1894
|
+
export declare const PageStatusArchived: PageStatus;
|
|
1895
|
+
export interface PageMetadata {
|
|
1896
|
+
title: string;
|
|
1897
|
+
description: string;
|
|
1898
|
+
image: string;
|
|
1899
|
+
tags: string[];
|
|
1900
|
+
/**
|
|
1901
|
+
* Docs-specific fields
|
|
1902
|
+
*/
|
|
1903
|
+
order?: number;
|
|
1904
|
+
type?: string;
|
|
1905
|
+
icon?: string;
|
|
1906
|
+
hide_from_nav?: boolean;
|
|
1907
|
+
}
|
|
1908
|
+
/**
|
|
1909
|
+
* PageType represents the type of page content
|
|
1910
|
+
*/
|
|
1911
|
+
export type PageType = string;
|
|
1912
|
+
export declare const PageTypeDoc: PageType;
|
|
1913
|
+
export declare const PageTypeBlog: PageType;
|
|
1914
|
+
export declare const PageTypePage: PageType;
|
|
1915
|
+
export interface PageDTO extends BaseModel, PermissionModelDTO {
|
|
1916
|
+
is_featured: boolean;
|
|
1917
|
+
title: string;
|
|
1918
|
+
content: string;
|
|
1919
|
+
excerpt: string;
|
|
1920
|
+
status: PageStatus;
|
|
1921
|
+
type: PageType;
|
|
1922
|
+
metadata: PageMetadata;
|
|
1923
|
+
slug: string;
|
|
1924
|
+
}
|
|
1925
|
+
/**
|
|
1926
|
+
* MenuItem represents an item in a menu (can be nested)
|
|
1927
|
+
*/
|
|
1928
|
+
export interface MenuItem {
|
|
1929
|
+
id: string;
|
|
1930
|
+
label: string;
|
|
1931
|
+
slug?: string;
|
|
1932
|
+
page_id?: string;
|
|
1933
|
+
url?: string;
|
|
1934
|
+
icon?: string;
|
|
1935
|
+
order: number;
|
|
1936
|
+
is_group?: boolean;
|
|
1937
|
+
expanded?: boolean;
|
|
1938
|
+
children?: MenuItem[];
|
|
1939
|
+
}
|
|
1940
|
+
export interface MenuDTO extends BaseModel, PermissionModelDTO {
|
|
1941
|
+
name: string;
|
|
1942
|
+
slug: string;
|
|
1943
|
+
description: string;
|
|
1944
|
+
items: MenuItem[];
|
|
1945
|
+
}
|
|
1815
1946
|
/**
|
|
1816
1947
|
* ProjectType represents different types of projects
|
|
1817
1948
|
*/
|
|
@@ -2030,12 +2161,6 @@ export interface SystemInfo {
|
|
|
2030
2161
|
hf_cache: HFCacheInfo;
|
|
2031
2162
|
gpus: GPU[];
|
|
2032
2163
|
}
|
|
2033
|
-
export interface TelemetrySystemInfo {
|
|
2034
|
-
cpus: CPU[];
|
|
2035
|
-
ram: RAM;
|
|
2036
|
-
gpus: GPU[];
|
|
2037
|
-
volumes: Volume[];
|
|
2038
|
-
}
|
|
2039
2164
|
export interface Docker {
|
|
2040
2165
|
binary_path: string;
|
|
2041
2166
|
installed: boolean;
|
|
@@ -2215,7 +2340,6 @@ export interface Task extends BaseModel, PermissionModel {
|
|
|
2215
2340
|
*/
|
|
2216
2341
|
events: TaskEvent[];
|
|
2217
2342
|
logs: TaskLog[];
|
|
2218
|
-
telemetry: TimescaleTask[];
|
|
2219
2343
|
usage_events: (UsageEvent | undefined)[];
|
|
2220
2344
|
/**
|
|
2221
2345
|
* Secret refs for billing (tracks ownership to determine partner fee)
|
|
@@ -2290,27 +2414,18 @@ export interface TaskDTO extends BaseModel, PermissionModelDTO {
|
|
|
2290
2414
|
rating: ContentRating;
|
|
2291
2415
|
events: TaskEvent[];
|
|
2292
2416
|
logs: TaskLog[];
|
|
2293
|
-
telemetry: TimescaleTask[];
|
|
2294
2417
|
usage_events: (UsageEvent | undefined)[];
|
|
2295
2418
|
session_id?: string;
|
|
2296
2419
|
session_timeout?: number;
|
|
2297
2420
|
}
|
|
2298
|
-
export interface TimescaleTask {
|
|
2299
|
-
id: string;
|
|
2300
|
-
timestamp: string;
|
|
2301
|
-
task_id?: string;
|
|
2302
|
-
task_seq: number;
|
|
2303
|
-
app_id: string;
|
|
2304
|
-
app_version_id: string;
|
|
2305
|
-
engine_id: string;
|
|
2306
|
-
engine_resources: TelemetrySystemInfo;
|
|
2307
|
-
worker_id: string;
|
|
2308
|
-
system_info: TelemetrySystemInfo;
|
|
2309
|
-
}
|
|
2310
2421
|
export type TeamType = string;
|
|
2311
2422
|
export declare const TeamTypePersonal: TeamType;
|
|
2312
2423
|
export declare const TeamTypeTeam: TeamType;
|
|
2313
2424
|
export declare const TeamTypeSystem: TeamType;
|
|
2425
|
+
export type TeamStatus = string;
|
|
2426
|
+
export declare const TeamStatusActive: TeamStatus;
|
|
2427
|
+
export declare const TeamStatusSuspended: TeamStatus;
|
|
2428
|
+
export declare const TeamStatusTerminated: TeamStatus;
|
|
2314
2429
|
export interface Team extends BaseModel {
|
|
2315
2430
|
type: TeamType;
|
|
2316
2431
|
username: string;
|
|
@@ -2326,6 +2441,7 @@ export interface Team extends BaseModel {
|
|
|
2326
2441
|
* MaxConcurrency limits total active tasks for this team (0 = use default)
|
|
2327
2442
|
*/
|
|
2328
2443
|
max_concurrency: number;
|
|
2444
|
+
status: TeamStatus;
|
|
2329
2445
|
}
|
|
2330
2446
|
export interface TeamDTO extends BaseModel {
|
|
2331
2447
|
type: TeamType;
|
|
@@ -2335,6 +2451,7 @@ export interface TeamDTO extends BaseModel {
|
|
|
2335
2451
|
email: string;
|
|
2336
2452
|
setup_completed: boolean;
|
|
2337
2453
|
max_concurrency: number;
|
|
2454
|
+
status: TeamStatus;
|
|
2338
2455
|
}
|
|
2339
2456
|
export type TeamRole = string;
|
|
2340
2457
|
export declare const TeamRoleOwner: TeamRole;
|
package/dist/types.js
CHANGED
|
@@ -129,6 +129,13 @@ export const GraphEdgeTypeExecution = "execution"; // Node → Resource executio
|
|
|
129
129
|
export const GraphEdgeTypeParent = "parent"; // Parent resource → child resource (e.g. skill fork)
|
|
130
130
|
export const GraphEdgeTypeAncestor = "ancestor"; // Specific version → child resource (fork point)
|
|
131
131
|
export const GraphEdgeTypeDuplicate = "duplicate"; // Skill → skill with identical content hash
|
|
132
|
+
export const PageStatusUnknown = 0; // 0
|
|
133
|
+
export const PageStatusDraft = 1; // 1
|
|
134
|
+
export const PageStatusPublished = 2; // 2
|
|
135
|
+
export const PageStatusArchived = 3; // 3
|
|
136
|
+
export const PageTypeDoc = "doc"; // Documentation page
|
|
137
|
+
export const PageTypeBlog = "blog"; // Blog post
|
|
138
|
+
export const PageTypePage = "page"; // Generic page/landing
|
|
132
139
|
export const ProjectTypeAgent = "agent";
|
|
133
140
|
export const ProjectTypeApp = "app";
|
|
134
141
|
export const ProjectTypeFlow = "flow";
|
|
@@ -194,6 +201,9 @@ export const TaskLogTypeTask = 4;
|
|
|
194
201
|
export const TeamTypePersonal = "personal";
|
|
195
202
|
export const TeamTypeTeam = "team";
|
|
196
203
|
export const TeamTypeSystem = "system";
|
|
204
|
+
export const TeamStatusActive = "active";
|
|
205
|
+
export const TeamStatusSuspended = "suspended";
|
|
206
|
+
export const TeamStatusTerminated = "terminated";
|
|
197
207
|
export const TeamRoleOwner = "owner";
|
|
198
208
|
export const TeamRoleAdmin = "admin";
|
|
199
209
|
export const TeamRoleMember = "member";
|