@labelbox/recursion-sdk 0.0.163 → 0.0.165
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/generated/index.d.ts +1 -1
- package/dist/generated/sdk.gen.d.ts +16 -1
- package/dist/generated/sdk.gen.js +24 -0
- package/dist/generated/types.gen.d.ts +338 -0
- package/dist/reference/resources-reference.generated.js +1 -0
- package/dist/reference/sdk-reference.generated.js +145 -4
- package/package.json +1 -1
|
@@ -2977,6 +2977,7 @@ export const RESOURCE_REFERENCE = {
|
|
|
2977
2977
|
'managedAgentsListSessionModelCostNodes',
|
|
2978
2978
|
'managedAgentsListSessionModelCosts',
|
|
2979
2979
|
'managedAgentsListSessionOutcomes',
|
|
2980
|
+
'managedAgentsListSessionResourceSamples',
|
|
2980
2981
|
'managedAgentsListSessionThreads',
|
|
2981
2982
|
'managedAgentsListSessionUsage',
|
|
2982
2983
|
'managedAgentsListSessions',
|
|
@@ -51960,7 +51960,7 @@ export const SDK_REFERENCE = {
|
|
|
51960
51960
|
namespace: 'managedAgents',
|
|
51961
51961
|
method: 'getSessionTree',
|
|
51962
51962
|
signature: 'rl.managedAgents.getSessionTree({ session_id })',
|
|
51963
|
-
example: "const result = await rl.managedAgents.getSessionTree({\n session_id: '<session_id>',\n // optional: hydrate, payloads\n});",
|
|
51963
|
+
example: "const result = await rl.managedAgents.getSessionTree({\n session_id: '<session_id>',\n // optional: hydrate, image_urls, payloads\n});",
|
|
51964
51964
|
cliInvocation: 'rl managed-agents get-session-tree',
|
|
51965
51965
|
cliExample: 'rl managed-agents get-session-tree \\\n --session_id <session_id>',
|
|
51966
51966
|
curlExample: "curl -X GET 'https://api.recursion.labelbox.com/managed-agents/v1/sessions/<session_id>/tree' \\\n -H 'Authorization: Bearer $LABELBOX_API_KEY'",
|
|
@@ -51978,6 +51978,14 @@ export const SDK_REFERENCE = {
|
|
|
51978
51978
|
description: 'Opt-in compatibility mode. images rehydrates private image refs under strict response caps; omitted by default.',
|
|
51979
51979
|
enum: ['images'],
|
|
51980
51980
|
},
|
|
51981
|
+
{
|
|
51982
|
+
name: 'image_urls',
|
|
51983
|
+
in: 'query',
|
|
51984
|
+
required: false,
|
|
51985
|
+
type: 'string',
|
|
51986
|
+
description: 'Set to signed to add a short-lived url (and url_expires_at) to every stored image block the caller may read. Omitted when the deployment has no URL signing configured; the authenticated /images proxy always works.',
|
|
51987
|
+
enum: ['signed'],
|
|
51988
|
+
},
|
|
51981
51989
|
{
|
|
51982
51990
|
name: 'payloads',
|
|
51983
51991
|
in: 'query',
|
|
@@ -53397,7 +53405,7 @@ export const SDK_REFERENCE = {
|
|
|
53397
53405
|
namespace: 'managedAgents',
|
|
53398
53406
|
method: 'listSessionEvents',
|
|
53399
53407
|
signature: 'rl.managedAgents.listSessionEvents({ session_id })',
|
|
53400
|
-
example: "const result = await rl.managedAgents.listSessionEvents({\n session_id: '<session_id>',\n // optional: after_event_id, limit, hydrate, payloads\n});",
|
|
53408
|
+
example: "const result = await rl.managedAgents.listSessionEvents({\n session_id: '<session_id>',\n // optional: after_event_id, limit, hydrate, image_urls, payloads\n});",
|
|
53401
53409
|
cliInvocation: 'rl managed-agents list-session-events',
|
|
53402
53410
|
cliExample: 'rl managed-agents list-session-events \\\n --session_id <session_id>',
|
|
53403
53411
|
curlExample: "curl -X GET 'https://api.recursion.labelbox.com/managed-agents/v1/sessions/<session_id>/events' \\\n -H 'Authorization: Bearer $LABELBOX_API_KEY'",
|
|
@@ -53429,6 +53437,14 @@ export const SDK_REFERENCE = {
|
|
|
53429
53437
|
description: 'Opt-in compatibility mode. images rehydrates private image refs under strict response caps; omitted by default.',
|
|
53430
53438
|
enum: ['images'],
|
|
53431
53439
|
},
|
|
53440
|
+
{
|
|
53441
|
+
name: 'image_urls',
|
|
53442
|
+
in: 'query',
|
|
53443
|
+
required: false,
|
|
53444
|
+
type: 'string',
|
|
53445
|
+
description: 'Set to signed to add a short-lived url (and url_expires_at) to every stored image block the caller may read. Omitted when the deployment has no URL signing configured; the authenticated /images proxy always works.',
|
|
53446
|
+
enum: ['signed'],
|
|
53447
|
+
},
|
|
53432
53448
|
{
|
|
53433
53449
|
name: 'payloads',
|
|
53434
53450
|
in: 'query',
|
|
@@ -53643,6 +53659,131 @@ export const SDK_REFERENCE = {
|
|
|
53643
53659
|
],
|
|
53644
53660
|
},
|
|
53645
53661
|
},
|
|
53662
|
+
managedAgentsListSessionResourceSamples: {
|
|
53663
|
+
operationId: 'managedAgentsListSessionResourceSamples',
|
|
53664
|
+
tag: 'managed-agents',
|
|
53665
|
+
callPath: ['managedAgents', 'listSessionResourceSamples'],
|
|
53666
|
+
namespace: 'managedAgents',
|
|
53667
|
+
method: 'listSessionResourceSamples',
|
|
53668
|
+
signature: 'rl.managedAgents.listSessionResourceSamples({ session_id })',
|
|
53669
|
+
example: "const result = await rl.managedAgents.listSessionResourceSamples({\n session_id: '<session_id>',\n // optional: from, to, resolution, limit, page_token\n});",
|
|
53670
|
+
cliInvocation: 'rl managed-agents list-session-resource-samples',
|
|
53671
|
+
cliExample: 'rl managed-agents list-session-resource-samples \\\n --session_id <session_id>',
|
|
53672
|
+
curlExample: "curl -X GET 'https://api.recursion.labelbox.com/managed-agents/v1/sessions/<session_id>/resource-samples' \\\n -H 'Authorization: Bearer $LABELBOX_API_KEY'",
|
|
53673
|
+
summary: 'Read sandbox CPU, memory, and GPU usage for a session tree',
|
|
53674
|
+
description: "Returns the tree's sandbox attachments and one page of per-minute resource usage buckets for them, ordered by attachment then time. Each bucket carries the minute's average and peak; resolution=raw adds the individual samples as parallel arrays indexed by offsets_ms. A tree whose compute was released and revived has several attachments; follow revived_from_sandbox_id to connect them. live reports whether a sandbox is still attached, which is the cue to keep polling. An empty sandboxes list means the tree never ran in a sandbox or sampling is disabled; an attachment with sampling_source=unsupported means the sandbox could not measure itself.",
|
|
53675
|
+
httpMethod: 'get',
|
|
53676
|
+
path: '/managed-agents/v1/sessions/{session_id}/resource-samples',
|
|
53677
|
+
requiredPermissions: ['managed-agents:read'],
|
|
53678
|
+
params: [
|
|
53679
|
+
{
|
|
53680
|
+
name: 'from',
|
|
53681
|
+
in: 'query',
|
|
53682
|
+
required: false,
|
|
53683
|
+
type: 'string',
|
|
53684
|
+
description: 'Inclusive lower bound on bucket_start, RFC 3339. Omit for the start of the tree.',
|
|
53685
|
+
format: 'date-time',
|
|
53686
|
+
},
|
|
53687
|
+
{
|
|
53688
|
+
name: 'to',
|
|
53689
|
+
in: 'query',
|
|
53690
|
+
required: false,
|
|
53691
|
+
type: 'string',
|
|
53692
|
+
description: 'Exclusive upper bound on bucket_start, RFC 3339. Omit for now.',
|
|
53693
|
+
format: 'date-time',
|
|
53694
|
+
},
|
|
53695
|
+
{
|
|
53696
|
+
name: 'resolution',
|
|
53697
|
+
in: 'query',
|
|
53698
|
+
required: false,
|
|
53699
|
+
type: 'string',
|
|
53700
|
+
description: "minute returns per-minute summaries only; raw also includes each bucket's per-sample arrays at the producer's cadence (five seconds by default). Use raw for the window on screen and minute for the overview.",
|
|
53701
|
+
enum: ['minute', 'raw'],
|
|
53702
|
+
default: 'minute',
|
|
53703
|
+
},
|
|
53704
|
+
{
|
|
53705
|
+
name: 'limit',
|
|
53706
|
+
in: 'query',
|
|
53707
|
+
required: false,
|
|
53708
|
+
type: 'integer',
|
|
53709
|
+
description: "Maximum buckets per page, across all of the tree's sandbox attachments.",
|
|
53710
|
+
default: 120,
|
|
53711
|
+
minimum: 1,
|
|
53712
|
+
maximum: 720,
|
|
53713
|
+
},
|
|
53714
|
+
{
|
|
53715
|
+
name: 'page_token',
|
|
53716
|
+
in: 'query',
|
|
53717
|
+
required: false,
|
|
53718
|
+
type: 'string',
|
|
53719
|
+
description: "Signed continuation token from a previous page's next_page_token. Bound to the organization, session, and filters it was issued for.",
|
|
53720
|
+
},
|
|
53721
|
+
{
|
|
53722
|
+
name: 'session_id',
|
|
53723
|
+
in: 'path',
|
|
53724
|
+
required: true,
|
|
53725
|
+
type: 'string',
|
|
53726
|
+
description: 'Any session id (UUID) in the tree. The sandbox is shared by the whole tree, so every id in it returns the same usage.',
|
|
53727
|
+
format: 'uuid',
|
|
53728
|
+
},
|
|
53729
|
+
],
|
|
53730
|
+
response: {
|
|
53731
|
+
type: 'ManagedAgentsSessionResourceSamplesResponse',
|
|
53732
|
+
description: 'Sandbox CPU, memory, and accelerator usage for a session tree, as minute buckets per sandbox attachment. Samples are what the sandbox measured of itself, drained to the control plane on tool calls and on read.',
|
|
53733
|
+
fields: [
|
|
53734
|
+
{
|
|
53735
|
+
name: 'as_of',
|
|
53736
|
+
required: false,
|
|
53737
|
+
type: 'string',
|
|
53738
|
+
description: 'RFC 3339 server time at which the page was read.',
|
|
53739
|
+
format: 'date-time',
|
|
53740
|
+
},
|
|
53741
|
+
{
|
|
53742
|
+
name: 'buckets',
|
|
53743
|
+
required: false,
|
|
53744
|
+
type: 'unknown',
|
|
53745
|
+
description: 'One page of minute buckets ordered by (sandbox_id, bucket_start). Each bucket names its attachment; join on sandboxes to place it on a lane.',
|
|
53746
|
+
},
|
|
53747
|
+
{
|
|
53748
|
+
name: 'live',
|
|
53749
|
+
required: false,
|
|
53750
|
+
type: 'boolean',
|
|
53751
|
+
description: 'True while a sandbox that can be sampled is still attached to the tree. A client keeps polling while this is true and stops once it turns false; an attached sandbox that cannot measure itself does not keep it true.',
|
|
53752
|
+
},
|
|
53753
|
+
{
|
|
53754
|
+
name: 'next_page_token',
|
|
53755
|
+
required: false,
|
|
53756
|
+
type: 'string',
|
|
53757
|
+
description: 'Present when more buckets remain. Pass as page_token with the same query to continue.',
|
|
53758
|
+
},
|
|
53759
|
+
{
|
|
53760
|
+
name: 'resolution',
|
|
53761
|
+
required: false,
|
|
53762
|
+
type: 'string',
|
|
53763
|
+
description: 'Resolution the buckets were read at.',
|
|
53764
|
+
enum: ['minute', 'raw'],
|
|
53765
|
+
},
|
|
53766
|
+
{
|
|
53767
|
+
name: 'root_session_id',
|
|
53768
|
+
required: false,
|
|
53769
|
+
type: 'string',
|
|
53770
|
+
description: 'Root of the tree the usage belongs to.',
|
|
53771
|
+
},
|
|
53772
|
+
{
|
|
53773
|
+
name: 'sandboxes',
|
|
53774
|
+
required: false,
|
|
53775
|
+
type: 'unknown',
|
|
53776
|
+
description: 'Every sandbox attachment the tree has had, oldest first, including ones that have since been released or closed. Empty when the tree never had a sandbox or sampling is disabled. Complete on every page.',
|
|
53777
|
+
},
|
|
53778
|
+
{
|
|
53779
|
+
name: 'session_id',
|
|
53780
|
+
required: false,
|
|
53781
|
+
type: 'string',
|
|
53782
|
+
description: 'Session id named in the request.',
|
|
53783
|
+
},
|
|
53784
|
+
],
|
|
53785
|
+
},
|
|
53786
|
+
},
|
|
53646
53787
|
managedAgentsListSessionThreads: {
|
|
53647
53788
|
operationId: 'managedAgentsListSessionThreads',
|
|
53648
53789
|
tag: 'managed-agents',
|
|
@@ -54762,10 +54903,10 @@ export const SDK_REFERENCE = {
|
|
|
54762
54903
|
method: 'sendSessionEvents',
|
|
54763
54904
|
bodyKey: 'body',
|
|
54764
54905
|
signature: 'rl.managedAgents.sendSessionEvents({ session_id, body })',
|
|
54765
|
-
example: 'const result = await rl.managedAgents.sendSessionEvents({\n session_id: \'<session_id>\',\n body: {\n actor: "human:api",\n events: [\n {\n actor: "human:api",\n content: [\n {\n byte_size: 1,\n content: [],\n data: "example",\n encrypted_content: "example",\n height: 1,\n id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n input: {\n key: "example"\n },\n is_error: true,\n media_type: "example",\n name: "example-name",\n omitted_bytes: 1,\n payload: "example",\n provider: "example",\n provider_payload: "example",\n redacted: true,\n semantic_hint: "example",\n sha256: "example",\n signature: "example",\n summary: [],\n text: "example",\n tool_use_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n type: "example",\n uri: "example",\n width: 1\n }\n ],\n text: "example",\n type: "user.message"\n }\n ],\n message: "example"\n },\n});',
|
|
54906
|
+
example: 'const result = await rl.managedAgents.sendSessionEvents({\n session_id: \'<session_id>\',\n body: {\n actor: "human:api",\n events: [\n {\n actor: "human:api",\n content: [\n {\n byte_size: 1,\n content: [],\n data: "example",\n encrypted_content: "example",\n height: 1,\n id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n input: {\n key: "example"\n },\n is_error: true,\n media_type: "example",\n name: "example-name",\n omitted_bytes: 1,\n payload: "example",\n provider: "example",\n provider_payload: "example",\n redacted: true,\n semantic_hint: "example",\n sha256: "example",\n signature: "example",\n summary: [],\n text: "example",\n tool_use_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n type: "example",\n uri: "example",\n url: "https://example.com",\n url_expires_at: "2026-02-18T09:30:00Z",\n width: 1\n }\n ],\n text: "example",\n type: "user.message"\n }\n ],\n message: "example"\n },\n});',
|
|
54766
54907
|
cliInvocation: 'rl managed-agents send-session-events',
|
|
54767
54908
|
cliExample: 'rl managed-agents send-session-events \\\n --session_id <session_id> \\\n --from-json body.json',
|
|
54768
|
-
curlExample: 'curl -X POST \'https://api.recursion.labelbox.com/managed-agents/v1/sessions/<session_id>/events\' \\\n -H \'Authorization: Bearer $LABELBOX_API_KEY\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "actor": "human:api",\n "events": [\n {\n "actor": "human:api",\n "content": [\n {\n "byte_size": 1,\n "content": [],\n "data": "example",\n "encrypted_content": "example",\n "height": 1,\n "id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "input": {\n "key": "example"\n },\n "is_error": true,\n "media_type": "example",\n "name": "example-name",\n "omitted_bytes": 1,\n "payload": "example",\n "provider": "example",\n "provider_payload": "example",\n "redacted": true,\n "semantic_hint": "example",\n "sha256": "example",\n "signature": "example",\n "summary": [],\n "text": "example",\n "tool_use_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "type": "example",\n "uri": "example",\n "width": 1\n }\n ],\n "text": "example",\n "type": "user.message"\n }\n ],\n "message": "example"\n }\'',
|
|
54909
|
+
curlExample: 'curl -X POST \'https://api.recursion.labelbox.com/managed-agents/v1/sessions/<session_id>/events\' \\\n -H \'Authorization: Bearer $LABELBOX_API_KEY\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "actor": "human:api",\n "events": [\n {\n "actor": "human:api",\n "content": [\n {\n "byte_size": 1,\n "content": [],\n "data": "example",\n "encrypted_content": "example",\n "height": 1,\n "id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "input": {\n "key": "example"\n },\n "is_error": true,\n "media_type": "example",\n "name": "example-name",\n "omitted_bytes": 1,\n "payload": "example",\n "provider": "example",\n "provider_payload": "example",\n "redacted": true,\n "semantic_hint": "example",\n "sha256": "example",\n "signature": "example",\n "summary": [],\n "text": "example",\n "tool_use_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "type": "example",\n "uri": "example",\n "url": "https://example.com",\n "url_expires_at": "2026-02-18T09:30:00Z",\n "width": 1\n }\n ],\n "text": "example",\n "type": "user.message"\n }\n ],\n "message": "example"\n }\'',
|
|
54769
54910
|
summary: 'Append user/system events to a session',
|
|
54770
54911
|
description: 'Appends user or system events to a session and returns how many were accepted. A running session is signalled so the agent wakes and sees them; once the workflow is gone the events are appended to the transcript instead, which the temporal_signaled field distinguishes. Events are appended in the order given. An omitted or empty events array yields exactly one user turn built from message; the request fails with 400 only when every entry sent was dropped, leaving nothing to append.',
|
|
54771
54912
|
httpMethod: 'post',
|