@labelbox/rl-sdk 0.0.0 → 0.0.145

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.
@@ -222,29 +222,25 @@ export class ManagedAgents extends HeyApiClient {
222
222
  });
223
223
  }
224
224
  /**
225
- * List environments
226
- *
227
- * Returns every environment in the calling organization with its full sandbox spec (provider, image, setup, resources, network policy). Soft-deleted environments are omitted, and the response is not paginated.
225
+ * List automations
228
226
  */
229
- listEnvironments(options) {
227
+ listAutomations(options) {
230
228
  return (options?.client ?? this.client).get({
231
229
  responseStyle: 'data',
232
230
  security: [{ scheme: 'bearer', type: 'http' }],
233
- url: '/managed-agents/v1/environments',
231
+ url: '/managed-agents/v1/automations',
234
232
  ...options
235
233
  });
236
234
  }
237
235
  /**
238
- * Create environment
239
- *
240
- * Defines the sandbox an agent session runs in and returns the stored environment, including its generated environment_id. The provider must be one this deployment reports from listSandboxProviders. Nothing is provisioned here: compute is allocated when a session that references the environment starts.
236
+ * Create an automation
241
237
  */
242
- createEnvironment(parameters, options) {
238
+ createAutomation(parameters, options) {
243
239
  const params = buildClientParams([parameters], [{ args: [{ key: 'body', map: 'body' }] }]);
244
240
  return (options?.client ?? this.client).post({
245
241
  responseStyle: 'data',
246
242
  security: [{ scheme: 'bearer', type: 'http' }],
247
- url: '/managed-agents/v1/environments',
243
+ url: '/managed-agents/v1/automations',
248
244
  ...options,
249
245
  ...params,
250
246
  headers: {
@@ -255,46 +251,40 @@ export class ManagedAgents extends HeyApiClient {
255
251
  });
256
252
  }
257
253
  /**
258
- * Soft delete environment
259
- *
260
- * Soft deletes the environment: it disappears from reads and can no longer be referenced by a new session, but nothing is erased. Sessions that already ran against it keep their history. There is no undelete on this API.
254
+ * Delete an automation
261
255
  */
262
- deleteEnvironment(parameters, options) {
263
- const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'environment_id' }] }]);
256
+ deleteAutomation(parameters, options) {
257
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'automation_id' }] }]);
264
258
  return (options?.client ?? this.client).delete({
265
259
  responseStyle: 'data',
266
260
  security: [{ scheme: 'bearer', type: 'http' }],
267
- url: '/managed-agents/v1/environments/{environment_id}',
261
+ url: '/managed-agents/v1/automations/{automation_id}',
268
262
  ...options,
269
263
  ...params
270
264
  });
271
265
  }
272
266
  /**
273
- * Get environment
274
- *
275
- * Returns one environment and its full sandbox spec. A soft-deleted or unknown id is a 404, and an id belonging to another organization is reported the same way.
267
+ * Get an automation
276
268
  */
277
- getEnvironment(parameters, options) {
278
- const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'environment_id' }] }]);
269
+ getAutomation(parameters, options) {
270
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'automation_id' }] }]);
279
271
  return (options?.client ?? this.client).get({
280
272
  responseStyle: 'data',
281
273
  security: [{ scheme: 'bearer', type: 'http' }],
282
- url: '/managed-agents/v1/environments/{environment_id}',
274
+ url: '/managed-agents/v1/automations/{automation_id}',
283
275
  ...options,
284
276
  ...params
285
277
  });
286
278
  }
287
279
  /**
288
- * Update environment
289
- *
290
- * Applies a partial update and returns the stored environment; omitted fields keep their current values. A provider is validated only when the request actually names one. Sessions already running keep the spec they started with, so a change takes effect on the next session start.
280
+ * Replace an automation configuration
291
281
  */
292
- updateEnvironment(parameters, options) {
293
- const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'environment_id' }, { key: 'body', map: 'body' }] }]);
294
- return (options?.client ?? this.client).patch({
282
+ updateAutomation(parameters, options) {
283
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'automation_id' }, { key: 'body', map: 'body' }] }]);
284
+ return (options?.client ?? this.client).put({
295
285
  responseStyle: 'data',
296
286
  security: [{ scheme: 'bearer', type: 'http' }],
297
- url: '/managed-agents/v1/environments/{environment_id}',
287
+ url: '/managed-agents/v1/automations/{automation_id}',
298
288
  ...options,
299
289
  ...params,
300
290
  headers: {
@@ -305,135 +295,97 @@ export class ManagedAgents extends HeyApiClient {
305
295
  });
306
296
  }
307
297
  /**
308
- * List connected third-party accounts
309
- *
310
- * Returns the organization's connected third-party accounts, each with its provider, account login, resource selection, and state. A connection holds no secret material, so nothing here needs to be redacted.
311
- */
312
- listIntegrationConnections(options) {
313
- return (options?.client ?? this.client).get({
314
- responseStyle: 'data',
315
- security: [{ scheme: 'bearer', type: 'http' }],
316
- url: '/managed-agents/v1/integrations/connections',
317
- ...options
318
- });
319
- }
320
- /**
321
- * Disconnect an account and retire the grants that used it
322
- *
323
- * Disconnects the account and retires every credential grant that referenced it, returning how many grants were revoked. Agents holding those grants lose access to the provider on their next session; existing sessions are not torn down.
298
+ * Run an automation with a manual JSON payload
324
299
  */
325
- deleteIntegrationConnection(parameters, options) {
326
- const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'connection_id' }] }]);
327
- return (options?.client ?? this.client).delete({
300
+ runAutomation(parameters, options) {
301
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'automation_id' }, { key: 'body', map: 'body' }] }]);
302
+ return (options?.client ?? this.client).post({
328
303
  responseStyle: 'data',
329
304
  security: [{ scheme: 'bearer', type: 'http' }],
330
- url: '/managed-agents/v1/integrations/connections/{connection_id}',
305
+ url: '/managed-agents/v1/automations/{automation_id}/runs',
331
306
  ...options,
332
- ...params
307
+ ...params,
308
+ headers: {
309
+ 'Content-Type': 'application/json',
310
+ ...options?.headers,
311
+ ...params.headers
312
+ }
333
313
  });
334
314
  }
335
315
  /**
336
- * Get one connected account
316
+ * List environments
337
317
  *
338
- * Returns one connected account. An unknown id, or one belonging to another organization, is reported as a 404.
318
+ * Returns every environment in the calling organization with its full sandbox spec (provider, image, setup, resources, network policy). Soft-deleted environments are omitted, and the response is not paginated.
339
319
  */
340
- getIntegrationConnection(parameters, options) {
341
- const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'connection_id' }] }]);
320
+ listEnvironments(options) {
342
321
  return (options?.client ?? this.client).get({
343
322
  responseStyle: 'data',
344
323
  security: [{ scheme: 'bearer', type: 'http' }],
345
- url: '/managed-agents/v1/integrations/connections/{connection_id}',
346
- ...options,
347
- ...params
324
+ url: '/managed-agents/v1/environments',
325
+ ...options
348
326
  });
349
327
  }
350
328
  /**
351
- * Check a connection against the provider and try minting a token
329
+ * Create environment
352
330
  *
353
- * Checks a connection against the provider and tries to mint a short-lived access token, returning what the provider reported. A suspended or revoked installation is still HTTP 200 with ok=false, so read that field rather than the status code.
331
+ * Defines the sandbox an agent session runs in and returns the stored environment, including its generated environment_id. The provider must be one this deployment reports from listSandboxProviders. Nothing is provisioned here: compute is allocated when a session that references the environment starts.
354
332
  */
355
- probeIntegrationConnection(parameters, options) {
356
- const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'connection_id' }] }]);
333
+ createEnvironment(parameters, options) {
334
+ const params = buildClientParams([parameters], [{ args: [{ key: 'body', map: 'body' }] }]);
357
335
  return (options?.client ?? this.client).post({
358
336
  responseStyle: 'data',
359
337
  security: [{ scheme: 'bearer', type: 'http' }],
360
- url: '/managed-agents/v1/integrations/connections/{connection_id}/probe',
338
+ url: '/managed-agents/v1/environments',
361
339
  ...options,
362
- ...params
340
+ ...params,
341
+ headers: {
342
+ 'Content-Type': 'application/json',
343
+ ...options?.headers,
344
+ ...params.headers
345
+ }
363
346
  });
364
347
  }
365
348
  /**
366
- * List the repositories a connection can reach, for the grant picker
349
+ * Soft delete environment
367
350
  *
368
- * Returns the repositories this connection can reach, for building a grant picker. Results are paged by the 1-based page query parameter at up to 100 repositories per page; the list comes from the provider live, so it reflects the installation's current access.
369
- */
370
- listIntegrationRepositories(parameters, options) {
371
- const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'connection_id' }, { in: 'query', key: 'page' }] }]);
372
- return (options?.client ?? this.client).get({
373
- responseStyle: 'data',
374
- security: [{ scheme: 'bearer', type: 'http' }],
375
- url: '/managed-agents/v1/integrations/connections/{connection_id}/repositories',
376
- ...options,
377
- ...params
378
- });
379
- }
380
- /**
381
- * List pull requests for a connected repository
351
+ * Soft deletes the environment: it disappears from reads and can no longer be referenced by a new session, but nothing is erased. Sessions that already ran against it keep their history. There is no undelete on this API.
382
352
  */
383
- listIntegrationPullRequests(parameters, options) {
384
- const params = buildClientParams([parameters], [{ args: [
385
- { in: 'path', key: 'connection_id' },
386
- { in: 'path', key: 'repository' },
387
- { in: 'query', key: 'state' },
388
- { in: 'query', key: 'page' }
389
- ] }]);
390
- return (options?.client ?? this.client).get({
353
+ deleteEnvironment(parameters, options) {
354
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'environment_id' }] }]);
355
+ return (options?.client ?? this.client).delete({
391
356
  responseStyle: 'data',
392
357
  security: [{ scheme: 'bearer', type: 'http' }],
393
- url: '/managed-agents/v1/integrations/connections/{connection_id}/repositories/{repository}/pull-requests',
358
+ url: '/managed-agents/v1/environments/{environment_id}',
394
359
  ...options,
395
360
  ...params
396
361
  });
397
362
  }
398
363
  /**
399
- * List the native integrations this deployment supports
364
+ * Get environment
400
365
  *
401
- * Returns the third-party integrations this deployment supports. Providers that the deployment has not configured are listed too, with their configured state, so a caller can tell "not set up here" apart from "not offered".
366
+ * Returns one environment and its full sandbox spec. A soft-deleted or unknown id is a 404, and an id belonging to another organization is reported the same way.
402
367
  */
403
- listIntegrationProviders(options) {
368
+ getEnvironment(parameters, options) {
369
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'environment_id' }] }]);
404
370
  return (options?.client ?? this.client).get({
405
371
  responseStyle: 'data',
406
372
  security: [{ scheme: 'bearer', type: 'http' }],
407
- url: '/managed-agents/v1/integrations/providers',
408
- ...options
409
- });
410
- }
411
- /**
412
- * Begin authorizing a third-party account connection
413
- *
414
- * Begins authorizing a third-party account connection and returns the provider URL to send the operator to, together with a single-use, short-lived state nonce. Nothing is connected until completeIntegrationInstall is called with that nonce.
415
- */
416
- startIntegrationInstall(parameters, options) {
417
- const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'provider' }] }]);
418
- return (options?.client ?? this.client).post({
419
- responseStyle: 'data',
420
- security: [{ scheme: 'bearer', type: 'http' }],
421
- url: '/managed-agents/v1/integrations/{provider}/install',
373
+ url: '/managed-agents/v1/environments/{environment_id}',
422
374
  ...options,
423
375
  ...params
424
376
  });
425
377
  }
426
378
  /**
427
- * Finish connecting a third-party account after the provider redirect
379
+ * Update environment
428
380
  *
429
- * Finishes an authorization begun by startIntegrationInstall and returns the created connection. The organization comes from the caller's own credentials and the state nonce, never from the provider redirect, and the selected account or installation is verified against the authorizing user before it is trusted. The state nonce is single-use.
381
+ * Applies a partial update and returns the stored environment; omitted fields keep their current values. A provider is validated only when the request actually names one. Sessions already running keep the spec they started with, so a change takes effect on the next session start.
430
382
  */
431
- completeIntegrationInstall(parameters, options) {
432
- const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'provider' }, { key: 'body', map: 'body' }] }]);
433
- return (options?.client ?? this.client).post({
383
+ updateEnvironment(parameters, options) {
384
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'environment_id' }, { key: 'body', map: 'body' }] }]);
385
+ return (options?.client ?? this.client).patch({
434
386
  responseStyle: 'data',
435
387
  security: [{ scheme: 'bearer', type: 'http' }],
436
- url: '/managed-agents/v1/integrations/{provider}/install/complete',
388
+ url: '/managed-agents/v1/environments/{environment_id}',
437
389
  ...options,
438
390
  ...params,
439
391
  headers: {
@@ -1344,7 +1296,7 @@ export class ManagedAgents extends HeyApiClient {
1344
1296
  });
1345
1297
  }
1346
1298
  /**
1347
- * List a connection's wake rule bindings
1299
+ * List compatibility wake rule bindings
1348
1300
  *
1349
1301
  * Reachable with a Labelbox API key through this API, which authorizes the caller and then calls the upstream service with its own credential. The upstream operation is not callable with a customer key directly.
1350
1302
  */
@@ -1359,7 +1311,7 @@ export class ManagedAgents extends HeyApiClient {
1359
1311
  });
1360
1312
  }
1361
1313
  /**
1362
- * Create a wake rule binding provider events to an agent
1314
+ * Create a compatibility wake rule binding provider events to an agent
1363
1315
  *
1364
1316
  * Reachable with a Labelbox API key through this API, which authorizes the caller and then calls the upstream service with its own credential. The upstream operation is not callable with a customer key directly.
1365
1317
  */
@@ -1379,7 +1331,7 @@ export class ManagedAgents extends HeyApiClient {
1379
1331
  });
1380
1332
  }
1381
1333
  /**
1382
- * Retire a wake rule binding
1334
+ * Retire a compatibility wake rule binding
1383
1335
  *
1384
1336
  * Reachable with a Labelbox API key through this API, which authorizes the caller and then calls the upstream service with its own credential. The upstream operation is not callable with a customer key directly.
1385
1337
  */
@@ -1394,7 +1346,7 @@ export class ManagedAgents extends HeyApiClient {
1394
1346
  });
1395
1347
  }
1396
1348
  /**
1397
- * Partially update a repository or messaging automation trigger binding
1349
+ * Partially update a compatibility wake rule binding
1398
1350
  *
1399
1351
  * Reachable with a Labelbox API key through this API, which authorizes the caller and then calls the upstream service with its own credential. The upstream operation is not callable with a customer key directly.
1400
1352
  */
@@ -1514,7 +1466,7 @@ export class ManagedAgents extends HeyApiClient {
1514
1466
  /**
1515
1467
  * Register a credential reference in a vault
1516
1468
  *
1517
- * Registers one credential in a vault and returns the stored reference. Supply exactly one of secret_value (encrypted under the organization's key and stored as ciphertext) or secret_ref (material you already stored yourself). The secret is never echoed back on this or any later response.
1469
+ * Registers one credential in a vault and returns the stored reference. Supply exactly one of secret_value (encrypted under the organization's key and stored as ciphertext) or secret_ref (material you already stored yourself) for secret-backed kinds. Integration grants carry neither; they reference a connected account that mints short-lived credentials. Secret material is never echoed back on this or any later response.
1518
1470
  */
1519
1471
  createVaultCredential(parameters, options) {
1520
1472
  const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'vault_id' }, { key: 'body', map: 'body' }] }]);
@@ -1585,6 +1537,79 @@ export class ManagedAgents extends HeyApiClient {
1585
1537
  }
1586
1538
  });
1587
1539
  }
1540
+ /**
1541
+ * List webhook endpoints
1542
+ */
1543
+ listWebhookEndpoints(options) {
1544
+ return (options?.client ?? this.client).get({
1545
+ responseStyle: 'data',
1546
+ security: [{ scheme: 'bearer', type: 'http' }],
1547
+ url: '/managed-agents/v1/webhook-endpoints',
1548
+ ...options
1549
+ });
1550
+ }
1551
+ /**
1552
+ * Create a configurable webhook endpoint
1553
+ */
1554
+ createWebhookEndpoint(parameters, options) {
1555
+ const params = buildClientParams([parameters], [{ args: [{ key: 'body', map: 'body' }] }]);
1556
+ return (options?.client ?? this.client).post({
1557
+ responseStyle: 'data',
1558
+ security: [{ scheme: 'bearer', type: 'http' }],
1559
+ url: '/managed-agents/v1/webhook-endpoints',
1560
+ ...options,
1561
+ ...params,
1562
+ headers: {
1563
+ 'Content-Type': 'application/json',
1564
+ ...options?.headers,
1565
+ ...params.headers
1566
+ }
1567
+ });
1568
+ }
1569
+ /**
1570
+ * Delete a webhook endpoint
1571
+ */
1572
+ deleteWebhookEndpoint(parameters, options) {
1573
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'endpoint_id' }] }]);
1574
+ return (options?.client ?? this.client).delete({
1575
+ responseStyle: 'data',
1576
+ security: [{ scheme: 'bearer', type: 'http' }],
1577
+ url: '/managed-agents/v1/webhook-endpoints/{endpoint_id}',
1578
+ ...options,
1579
+ ...params
1580
+ });
1581
+ }
1582
+ /**
1583
+ * Get a webhook endpoint
1584
+ */
1585
+ getWebhookEndpoint(parameters, options) {
1586
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'endpoint_id' }] }]);
1587
+ return (options?.client ?? this.client).get({
1588
+ responseStyle: 'data',
1589
+ security: [{ scheme: 'bearer', type: 'http' }],
1590
+ url: '/managed-agents/v1/webhook-endpoints/{endpoint_id}',
1591
+ ...options,
1592
+ ...params
1593
+ });
1594
+ }
1595
+ /**
1596
+ * Replace a webhook endpoint configuration
1597
+ */
1598
+ updateWebhookEndpoint(parameters, options) {
1599
+ const params = buildClientParams([parameters], [{ args: [{ in: 'path', key: 'endpoint_id' }, { key: 'body', map: 'body' }] }]);
1600
+ return (options?.client ?? this.client).put({
1601
+ responseStyle: 'data',
1602
+ security: [{ scheme: 'bearer', type: 'http' }],
1603
+ url: '/managed-agents/v1/webhook-endpoints/{endpoint_id}',
1604
+ ...options,
1605
+ ...params,
1606
+ headers: {
1607
+ 'Content-Type': 'application/json',
1608
+ ...options?.headers,
1609
+ ...params.headers
1610
+ }
1611
+ });
1612
+ }
1588
1613
  }
1589
1614
  export class Computes extends HeyApiClient {
1590
1615
  /**