@inferencesh/sdk 0.38.1 → 0.38.3
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 +73 -4
- package/dist/types.js +9 -0
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -2719,8 +2719,9 @@ export interface CredentialDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
2719
2719
|
error_message?: string;
|
|
2720
2720
|
/**
|
|
2721
2721
|
* Secrets are the secret rows linked to the credential (a key's values),
|
|
2722
|
-
* by row and key, never by value. Filled on the vault's api_key configs
|
|
2723
|
-
*
|
|
2722
|
+
* by row and key, never by value. Filled on the vault's api_key configs,
|
|
2723
|
+
* on a config's app when it is the caller's workspace's own (which of
|
|
2724
|
+
* its keys are set) and on the admin provider tree.
|
|
2724
2725
|
*/
|
|
2725
2726
|
secrets?: CredentialSecretRef[];
|
|
2726
2727
|
}
|
|
@@ -2796,6 +2797,19 @@ export interface CredentialConfigDTO {
|
|
|
2796
2797
|
* login itself.
|
|
2797
2798
|
*/
|
|
2798
2799
|
app?: CredentialDTO;
|
|
2800
|
+
/**
|
|
2801
|
+
* AppNoun is what that app is called ("GitHub App") when it is not an
|
|
2802
|
+
* OAuth sign-in app: its logins connect something other than a person
|
|
2803
|
+
* signing in (an installation). Empty: an OAuth app logins sign in
|
|
2804
|
+
* through.
|
|
2805
|
+
*/
|
|
2806
|
+
app_noun?: string;
|
|
2807
|
+
/**
|
|
2808
|
+
* HookURL is where App delivers its events (the GitHub App's webhook
|
|
2809
|
+
* URL, to paste in its settings): the platform's app's, or this
|
|
2810
|
+
* workspace's own app's. Empty when the provider's apps deliver none.
|
|
2811
|
+
*/
|
|
2812
|
+
hook_url?: string;
|
|
2799
2813
|
/**
|
|
2800
2814
|
* AuthProviderID is set when the provider is one the team defined
|
|
2801
2815
|
* itself (models.AuthProvider), so the UI can offer edit and remove.
|
|
@@ -2953,6 +2967,11 @@ export interface EngineDTO extends BaseModelDTO, PermissionModelDTO {
|
|
|
2953
2967
|
*/
|
|
2954
2968
|
last_update?: UpdateStatus;
|
|
2955
2969
|
system_info?: SystemInfo;
|
|
2970
|
+
/**
|
|
2971
|
+
* Capacity is what the engine last reported it offers and has given
|
|
2972
|
+
* out; nil from an engine that does not report it.
|
|
2973
|
+
*/
|
|
2974
|
+
capacity?: EngineCapacity;
|
|
2956
2975
|
workers: (WorkerDTO | undefined)[];
|
|
2957
2976
|
}
|
|
2958
2977
|
/**
|
|
@@ -3060,7 +3079,7 @@ export interface WorkerRAM {
|
|
|
3060
3079
|
* a task lists the ones it needs (Task.Requires); the scheduler only sends
|
|
3061
3080
|
* a task to an engine that has every one it needs.
|
|
3062
3081
|
*/
|
|
3063
|
-
export type EngineCapability = "egress_gateway" | "sandboxes";
|
|
3082
|
+
export type EngineCapability = "egress_gateway" | "sandboxes" | "capacity";
|
|
3064
3083
|
/**
|
|
3065
3084
|
* EngineCapabilityEgressGateway: the engine runs its sandboxes behind
|
|
3066
3085
|
* the egress gateway, so it can take bound secrets (the v2 secrets
|
|
@@ -3072,11 +3091,57 @@ export declare const EngineCapabilityEgressGateway: EngineCapability;
|
|
|
3072
3091
|
* space up, so it can take sandbox_start (INF-833).
|
|
3073
3092
|
*/
|
|
3074
3093
|
export declare const EngineCapabilitySandboxes: EngineCapability;
|
|
3094
|
+
/**
|
|
3095
|
+
* EngineCapabilityCapacity: the engine reports EngineTelemetry.Capacity
|
|
3096
|
+
* (INF-1156).
|
|
3097
|
+
*/
|
|
3098
|
+
export declare const EngineCapabilityCapacity: EngineCapability;
|
|
3075
3099
|
/**
|
|
3076
3100
|
* EngineCapabilities is a set of capabilities, kept as a list. Nil and
|
|
3077
3101
|
* empty are the same: nothing beyond the base contract.
|
|
3078
3102
|
*/
|
|
3079
3103
|
export type EngineCapabilities = EngineCapability[];
|
|
3104
|
+
/**
|
|
3105
|
+
* EngineCapacity is what an engine offers and what it has given out
|
|
3106
|
+
* (INF-1156): the machine, the host reserve kept back from it, what is
|
|
3107
|
+
* left to give (allocatable), what it has promised (committed: app
|
|
3108
|
+
* workers' quotas and sandbox boxes' sizes) and what is in use now.
|
|
3109
|
+
* Reported by engines with EngineCapabilityCapacity.
|
|
3110
|
+
*/
|
|
3111
|
+
export interface EngineCapacity {
|
|
3112
|
+
/**
|
|
3113
|
+
* CPUs are the logical CPUs (hardware threads) the engine may use;
|
|
3114
|
+
* Cores the physical cores they are on.
|
|
3115
|
+
*/
|
|
3116
|
+
cpus: number;
|
|
3117
|
+
cores: number;
|
|
3118
|
+
memory_bytes: number;
|
|
3119
|
+
/**
|
|
3120
|
+
* DiskBytes and DiskFreeBytes are the volume the engine's data is on.
|
|
3121
|
+
*/
|
|
3122
|
+
disk_bytes: number;
|
|
3123
|
+
disk_free_bytes: number;
|
|
3124
|
+
gpus?: CapacityGPU[];
|
|
3125
|
+
reserve: CapacityAmount;
|
|
3126
|
+
allocatable: CapacityAmount;
|
|
3127
|
+
committed: CapacityAmount;
|
|
3128
|
+
used: CapacityAmount;
|
|
3129
|
+
}
|
|
3130
|
+
/**
|
|
3131
|
+
* CapacityAmount is an amount of CPU and memory. CPUs are logical CPUs,
|
|
3132
|
+
* fractional for use (1.5 is one and a half CPUs busy).
|
|
3133
|
+
*/
|
|
3134
|
+
export interface CapacityAmount {
|
|
3135
|
+
cpus: number;
|
|
3136
|
+
memory_bytes: number;
|
|
3137
|
+
}
|
|
3138
|
+
/**
|
|
3139
|
+
* CapacityGPU is one GPU of an engine.
|
|
3140
|
+
*/
|
|
3141
|
+
export interface CapacityGPU {
|
|
3142
|
+
id: string;
|
|
3143
|
+
vram_bytes: number;
|
|
3144
|
+
}
|
|
3080
3145
|
/**
|
|
3081
3146
|
* EntitlementDTO for API responses
|
|
3082
3147
|
*/
|
|
@@ -7650,7 +7715,7 @@ export declare const ContentUnrated: ContentRating;
|
|
|
7650
7715
|
/**
|
|
7651
7716
|
* CredentialProvider names the external service a credential is for.
|
|
7652
7717
|
*/
|
|
7653
|
-
export type CredentialProvider = "google" | "google-sa" | "slack" | "notion" | "github" | "x" | "microsoft" | "salesforce" | "discord" | "gcp" | "reddit";
|
|
7718
|
+
export type CredentialProvider = "google" | "google-sa" | "slack" | "notion" | "github" | "github-app" | "x" | "microsoft" | "salesforce" | "discord" | "gcp" | "reddit";
|
|
7654
7719
|
/**
|
|
7655
7720
|
* Credential.Provider is a plain string; cast with string(...) when assigning.
|
|
7656
7721
|
*/
|
|
@@ -7671,6 +7736,10 @@ export declare const CredentialProviderNotion: CredentialProvider;
|
|
|
7671
7736
|
* Credential.Provider is a plain string; cast with string(...) when assigning.
|
|
7672
7737
|
*/
|
|
7673
7738
|
export declare const CredentialProviderGitHub: CredentialProvider;
|
|
7739
|
+
/**
|
|
7740
|
+
* Credential.Provider is a plain string; cast with string(...) when assigning.
|
|
7741
|
+
*/
|
|
7742
|
+
export declare const CredentialProviderGitHubApp: CredentialProvider;
|
|
7674
7743
|
/**
|
|
7675
7744
|
* Credential.Provider is a plain string; cast with string(...) when assigning.
|
|
7676
7745
|
*/
|
package/dist/types.js
CHANGED
|
@@ -449,6 +449,11 @@ export const EngineCapabilityEgressGateway = "egress_gateway";
|
|
|
449
449
|
* space up, so it can take sandbox_start (INF-833).
|
|
450
450
|
*/
|
|
451
451
|
export const EngineCapabilitySandboxes = "sandboxes";
|
|
452
|
+
/**
|
|
453
|
+
* EngineCapabilityCapacity: the engine reports EngineTelemetry.Capacity
|
|
454
|
+
* (INF-1156).
|
|
455
|
+
*/
|
|
456
|
+
export const EngineCapabilityCapacity = "capacity";
|
|
452
457
|
export const ErrorCodeInvalidRequest = "invalid_request";
|
|
453
458
|
export const ErrorCodeValidationError = "validation_error";
|
|
454
459
|
export const ErrorCodeUnauthorized = "unauthorized";
|
|
@@ -1477,6 +1482,10 @@ export const CredentialProviderNotion = "notion";
|
|
|
1477
1482
|
* Credential.Provider is a plain string; cast with string(...) when assigning.
|
|
1478
1483
|
*/
|
|
1479
1484
|
export const CredentialProviderGitHub = "github";
|
|
1485
|
+
/**
|
|
1486
|
+
* Credential.Provider is a plain string; cast with string(...) when assigning.
|
|
1487
|
+
*/
|
|
1488
|
+
export const CredentialProviderGitHubApp = "github-app";
|
|
1480
1489
|
/**
|
|
1481
1490
|
* Credential.Provider is a plain string; cast with string(...) when assigning.
|
|
1482
1491
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inferencesh/sdk",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.3",
|
|
4
4
|
"description": "Official JavaScript/TypeScript SDK for inference.sh - Run AI models with a simple API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"globals": "^17.12.0",
|
|
94
94
|
"hono": "^4.13.1",
|
|
95
95
|
"jest": "^30.4.2",
|
|
96
|
-
"next": "^16.
|
|
96
|
+
"next": "^16.4.1",
|
|
97
97
|
"prettier": "^3.6.2",
|
|
98
98
|
"react": "^19.2.3",
|
|
99
99
|
"rimraf": "^6.0.1",
|