@superlinked/sie-sdk 0.6.9 → 0.6.11

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/index.d.cts CHANGED
@@ -360,17 +360,25 @@ interface CapacityInfo {
360
360
  workers: WorkerInfo[];
361
361
  }
362
362
  /**
363
- * Pool specification for creating resource pools.
363
+ * Pool specification returned by the gateway.
364
364
  */
365
365
  interface PoolSpec {
366
366
  /** Pool name (used in GPU param as "poolName/machineProfile") */
367
367
  name: string;
368
+ /** Helm/NATS queue namespace backing this logical pool */
369
+ queue_pool?: string;
370
+ /** Optional bundle constraint for this pool */
371
+ bundle?: string | null;
368
372
  /** Machine profile requirements for pool readiness, e.g., { l4: 2, "a100-40gb": 1 } */
369
373
  gpus?: Record<string, number>;
370
- /** Optional maximum assigned workers per machine profile */
371
- gpuCaps?: Record<string, number>;
372
374
  /** Optional maximum assigned workers per machine profile, as returned by the gateway */
373
375
  gpu_caps?: Record<string, number>;
376
+ /** Optional TTL for dynamic pool leases */
377
+ ttl_seconds?: number | null;
378
+ /** Minimum workers kept warm for this pool */
379
+ minimum_worker_count?: number;
380
+ /** Models pinned for this pool */
381
+ pinned_models?: string[];
374
382
  }
375
383
  /**
376
384
  * Pool status information.
@@ -396,10 +404,7 @@ interface PoolInfo {
396
404
  /** Pool name */
397
405
  name: string;
398
406
  /** Pool specification */
399
- spec: {
400
- gpus?: Record<string, number>;
401
- gpu_caps?: Record<string, number>;
402
- };
407
+ spec: PoolSpec;
403
408
  /** Pool status */
404
409
  status: PoolStatus;
405
410
  }
@@ -924,7 +929,7 @@ declare function toFloat32Array(arr: number[]): Float32Array;
924
929
  * ```typescript
925
930
  * const client = new SIEClient("http://gateway:8080");
926
931
  *
927
- * // Create a dedicated pool
932
+ * // Create a logical pool backed by the cluster's default worker queue
928
933
  * await client.createPool("eval-bench", { l4: 2 });
929
934
  *
930
935
  * // Use pool for requests
@@ -1228,12 +1233,15 @@ declare class SIEClient {
1228
1233
  /**
1229
1234
  * Create or update a resource pool for isolated capacity.
1230
1235
  *
1231
- * Pools provide dedicated worker capacity, isolated from other clients.
1232
- * Workers are assigned to pools and only serve requests from that pool.
1236
+ * Pools provide logical capacity isolation. By default they draw from the
1237
+ * cluster's `default` Helm/NATS queue; pass `queuePool` only when the cluster
1238
+ * has a dedicated physical worker queue declared under
1239
+ * `queueRouting.staticQueuePools` for this workload.
1233
1240
  *
1234
1241
  * @param name - Pool name (used in GPU param as "poolName/machineProfile")
1235
1242
  * @param gpus - Optional machine profile requirements for pool readiness, e.g., { "l4": 2, "l4-spot": 1 }
1236
1243
  * @param gpuCaps - Optional maximum assigned workers per machine profile
1244
+ * @param queuePool - Optional Helm/NATS queue namespace backing this logical pool. Defaults to "default".
1237
1245
  *
1238
1246
  * @example
1239
1247
  * ```typescript
@@ -1247,7 +1255,7 @@ declare class SIEClient {
1247
1255
  * await client.deletePool("eval-bench");
1248
1256
  * ```
1249
1257
  */
1250
- createPool(name: string, gpus?: Record<string, number>, gpuCaps?: Record<string, number>): Promise<void>;
1258
+ createPool(name: string, gpus?: Record<string, number>, gpuCaps?: Record<string, number>, queuePool?: string): Promise<void>;
1251
1259
  /**
1252
1260
  * Get information about a pool.
1253
1261
  *
@@ -1360,7 +1368,7 @@ declare class SIEClient {
1360
1368
  private detectEndpointType;
1361
1369
  }
1362
1370
 
1363
- declare const SDK_VERSION = "0.6.9";
1371
+ declare const SDK_VERSION = "0.6.11";
1364
1372
 
1365
1373
  /**
1366
1374
  * Helpers for converting SIE encode results to plain JavaScript types.
package/dist/index.d.ts CHANGED
@@ -360,17 +360,25 @@ interface CapacityInfo {
360
360
  workers: WorkerInfo[];
361
361
  }
362
362
  /**
363
- * Pool specification for creating resource pools.
363
+ * Pool specification returned by the gateway.
364
364
  */
365
365
  interface PoolSpec {
366
366
  /** Pool name (used in GPU param as "poolName/machineProfile") */
367
367
  name: string;
368
+ /** Helm/NATS queue namespace backing this logical pool */
369
+ queue_pool?: string;
370
+ /** Optional bundle constraint for this pool */
371
+ bundle?: string | null;
368
372
  /** Machine profile requirements for pool readiness, e.g., { l4: 2, "a100-40gb": 1 } */
369
373
  gpus?: Record<string, number>;
370
- /** Optional maximum assigned workers per machine profile */
371
- gpuCaps?: Record<string, number>;
372
374
  /** Optional maximum assigned workers per machine profile, as returned by the gateway */
373
375
  gpu_caps?: Record<string, number>;
376
+ /** Optional TTL for dynamic pool leases */
377
+ ttl_seconds?: number | null;
378
+ /** Minimum workers kept warm for this pool */
379
+ minimum_worker_count?: number;
380
+ /** Models pinned for this pool */
381
+ pinned_models?: string[];
374
382
  }
375
383
  /**
376
384
  * Pool status information.
@@ -396,10 +404,7 @@ interface PoolInfo {
396
404
  /** Pool name */
397
405
  name: string;
398
406
  /** Pool specification */
399
- spec: {
400
- gpus?: Record<string, number>;
401
- gpu_caps?: Record<string, number>;
402
- };
407
+ spec: PoolSpec;
403
408
  /** Pool status */
404
409
  status: PoolStatus;
405
410
  }
@@ -924,7 +929,7 @@ declare function toFloat32Array(arr: number[]): Float32Array;
924
929
  * ```typescript
925
930
  * const client = new SIEClient("http://gateway:8080");
926
931
  *
927
- * // Create a dedicated pool
932
+ * // Create a logical pool backed by the cluster's default worker queue
928
933
  * await client.createPool("eval-bench", { l4: 2 });
929
934
  *
930
935
  * // Use pool for requests
@@ -1228,12 +1233,15 @@ declare class SIEClient {
1228
1233
  /**
1229
1234
  * Create or update a resource pool for isolated capacity.
1230
1235
  *
1231
- * Pools provide dedicated worker capacity, isolated from other clients.
1232
- * Workers are assigned to pools and only serve requests from that pool.
1236
+ * Pools provide logical capacity isolation. By default they draw from the
1237
+ * cluster's `default` Helm/NATS queue; pass `queuePool` only when the cluster
1238
+ * has a dedicated physical worker queue declared under
1239
+ * `queueRouting.staticQueuePools` for this workload.
1233
1240
  *
1234
1241
  * @param name - Pool name (used in GPU param as "poolName/machineProfile")
1235
1242
  * @param gpus - Optional machine profile requirements for pool readiness, e.g., { "l4": 2, "l4-spot": 1 }
1236
1243
  * @param gpuCaps - Optional maximum assigned workers per machine profile
1244
+ * @param queuePool - Optional Helm/NATS queue namespace backing this logical pool. Defaults to "default".
1237
1245
  *
1238
1246
  * @example
1239
1247
  * ```typescript
@@ -1247,7 +1255,7 @@ declare class SIEClient {
1247
1255
  * await client.deletePool("eval-bench");
1248
1256
  * ```
1249
1257
  */
1250
- createPool(name: string, gpus?: Record<string, number>, gpuCaps?: Record<string, number>): Promise<void>;
1258
+ createPool(name: string, gpus?: Record<string, number>, gpuCaps?: Record<string, number>, queuePool?: string): Promise<void>;
1251
1259
  /**
1252
1260
  * Get information about a pool.
1253
1261
  *
@@ -1360,7 +1368,7 @@ declare class SIEClient {
1360
1368
  private detectEndpointType;
1361
1369
  }
1362
1370
 
1363
- declare const SDK_VERSION = "0.6.9";
1371
+ declare const SDK_VERSION = "0.6.11";
1364
1372
 
1365
1373
  /**
1366
1374
  * Helpers for converting SIE encode results to plain JavaScript types.
package/dist/index.js CHANGED
@@ -854,7 +854,7 @@ function extractDataPayload(block) {
854
854
  }
855
855
 
856
856
  // src/version.ts
857
- var SDK_VERSION = "0.6.9";
857
+ var SDK_VERSION = "0.6.11";
858
858
 
859
859
  // src/client.ts
860
860
  function sleep2(ms) {
@@ -1631,12 +1631,15 @@ var SIEClient = class {
1631
1631
  /**
1632
1632
  * Create or update a resource pool for isolated capacity.
1633
1633
  *
1634
- * Pools provide dedicated worker capacity, isolated from other clients.
1635
- * Workers are assigned to pools and only serve requests from that pool.
1634
+ * Pools provide logical capacity isolation. By default they draw from the
1635
+ * cluster's `default` Helm/NATS queue; pass `queuePool` only when the cluster
1636
+ * has a dedicated physical worker queue declared under
1637
+ * `queueRouting.staticQueuePools` for this workload.
1636
1638
  *
1637
1639
  * @param name - Pool name (used in GPU param as "poolName/machineProfile")
1638
1640
  * @param gpus - Optional machine profile requirements for pool readiness, e.g., { "l4": 2, "l4-spot": 1 }
1639
1641
  * @param gpuCaps - Optional maximum assigned workers per machine profile
1642
+ * @param queuePool - Optional Helm/NATS queue namespace backing this logical pool. Defaults to "default".
1640
1643
  *
1641
1644
  * @example
1642
1645
  * ```typescript
@@ -1650,7 +1653,7 @@ var SIEClient = class {
1650
1653
  * await client.deletePool("eval-bench");
1651
1654
  * ```
1652
1655
  */
1653
- async createPool(name, gpus, gpuCaps) {
1656
+ async createPool(name, gpus, gpuCaps, queuePool) {
1654
1657
  const alreadyTracking = this.pools.has(name);
1655
1658
  const requestBody = {
1656
1659
  name
@@ -1661,6 +1664,9 @@ var SIEClient = class {
1661
1664
  if (gpuCaps) {
1662
1665
  requestBody.gpu_caps = gpuCaps;
1663
1666
  }
1667
+ if (queuePool) {
1668
+ requestBody.queue_pool = queuePool;
1669
+ }
1664
1670
  const url = `${this.baseUrl}/v1/pools`;
1665
1671
  const headers = {
1666
1672
  "Content-Type": JSON_CONTENT_TYPE,