@inferencesh/sdk 0.38.1 → 0.38.2

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 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
- * and the admin provider tree.
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,13 @@ 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;
2799
2807
  /**
2800
2808
  * AuthProviderID is set when the provider is one the team defined
2801
2809
  * itself (models.AuthProvider), so the UI can offer edit and remove.
@@ -2953,6 +2961,11 @@ export interface EngineDTO extends BaseModelDTO, PermissionModelDTO {
2953
2961
  */
2954
2962
  last_update?: UpdateStatus;
2955
2963
  system_info?: SystemInfo;
2964
+ /**
2965
+ * Capacity is what the engine last reported it offers and has given
2966
+ * out; nil from an engine that does not report it.
2967
+ */
2968
+ capacity?: EngineCapacity;
2956
2969
  workers: (WorkerDTO | undefined)[];
2957
2970
  }
2958
2971
  /**
@@ -3060,7 +3073,7 @@ export interface WorkerRAM {
3060
3073
  * a task lists the ones it needs (Task.Requires); the scheduler only sends
3061
3074
  * a task to an engine that has every one it needs.
3062
3075
  */
3063
- export type EngineCapability = "egress_gateway" | "sandboxes";
3076
+ export type EngineCapability = "egress_gateway" | "sandboxes" | "capacity";
3064
3077
  /**
3065
3078
  * EngineCapabilityEgressGateway: the engine runs its sandboxes behind
3066
3079
  * the egress gateway, so it can take bound secrets (the v2 secrets
@@ -3072,11 +3085,57 @@ export declare const EngineCapabilityEgressGateway: EngineCapability;
3072
3085
  * space up, so it can take sandbox_start (INF-833).
3073
3086
  */
3074
3087
  export declare const EngineCapabilitySandboxes: EngineCapability;
3088
+ /**
3089
+ * EngineCapabilityCapacity: the engine reports EngineTelemetry.Capacity
3090
+ * (INF-1156).
3091
+ */
3092
+ export declare const EngineCapabilityCapacity: EngineCapability;
3075
3093
  /**
3076
3094
  * EngineCapabilities is a set of capabilities, kept as a list. Nil and
3077
3095
  * empty are the same: nothing beyond the base contract.
3078
3096
  */
3079
3097
  export type EngineCapabilities = EngineCapability[];
3098
+ /**
3099
+ * EngineCapacity is what an engine offers and what it has given out
3100
+ * (INF-1156): the machine, the host reserve kept back from it, what is
3101
+ * left to give (allocatable), what it has promised (committed: app
3102
+ * workers' quotas and sandbox boxes' sizes) and what is in use now.
3103
+ * Reported by engines with EngineCapabilityCapacity.
3104
+ */
3105
+ export interface EngineCapacity {
3106
+ /**
3107
+ * CPUs are the logical CPUs (hardware threads) the engine may use;
3108
+ * Cores the physical cores they are on.
3109
+ */
3110
+ cpus: number;
3111
+ cores: number;
3112
+ memory_bytes: number;
3113
+ /**
3114
+ * DiskBytes and DiskFreeBytes are the volume the engine's data is on.
3115
+ */
3116
+ disk_bytes: number;
3117
+ disk_free_bytes: number;
3118
+ gpus?: CapacityGPU[];
3119
+ reserve: CapacityAmount;
3120
+ allocatable: CapacityAmount;
3121
+ committed: CapacityAmount;
3122
+ used: CapacityAmount;
3123
+ }
3124
+ /**
3125
+ * CapacityAmount is an amount of CPU and memory. CPUs are logical CPUs,
3126
+ * fractional for use (1.5 is one and a half CPUs busy).
3127
+ */
3128
+ export interface CapacityAmount {
3129
+ cpus: number;
3130
+ memory_bytes: number;
3131
+ }
3132
+ /**
3133
+ * CapacityGPU is one GPU of an engine.
3134
+ */
3135
+ export interface CapacityGPU {
3136
+ id: string;
3137
+ vram_bytes: number;
3138
+ }
3080
3139
  /**
3081
3140
  * EntitlementDTO for API responses
3082
3141
  */
@@ -7650,7 +7709,7 @@ export declare const ContentUnrated: ContentRating;
7650
7709
  /**
7651
7710
  * CredentialProvider names the external service a credential is for.
7652
7711
  */
7653
- export type CredentialProvider = "google" | "google-sa" | "slack" | "notion" | "github" | "x" | "microsoft" | "salesforce" | "discord" | "gcp" | "reddit";
7712
+ export type CredentialProvider = "google" | "google-sa" | "slack" | "notion" | "github" | "github-app" | "x" | "microsoft" | "salesforce" | "discord" | "gcp" | "reddit";
7654
7713
  /**
7655
7714
  * Credential.Provider is a plain string; cast with string(...) when assigning.
7656
7715
  */
@@ -7671,6 +7730,10 @@ export declare const CredentialProviderNotion: CredentialProvider;
7671
7730
  * Credential.Provider is a plain string; cast with string(...) when assigning.
7672
7731
  */
7673
7732
  export declare const CredentialProviderGitHub: CredentialProvider;
7733
+ /**
7734
+ * Credential.Provider is a plain string; cast with string(...) when assigning.
7735
+ */
7736
+ export declare const CredentialProviderGitHubApp: CredentialProvider;
7674
7737
  /**
7675
7738
  * Credential.Provider is a plain string; cast with string(...) when assigning.
7676
7739
  */
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.1",
3
+ "version": "0.38.2",
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.3.6",
96
+ "next": "^16.4.1",
97
97
  "prettier": "^3.6.2",
98
98
  "react": "^19.2.3",
99
99
  "rimraf": "^6.0.1",