@labelbox/recursion-sdk 0.0.161 → 0.0.163
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 +28 -6
- package/dist/generated/sdk.gen.js +52 -10
- package/dist/generated/types.gen.d.ts +187 -19
- package/dist/reference/resources-reference.generated.js +1 -0
- package/dist/reference/sdk-reference.generated.js +421 -31
- package/package.json +1 -1
|
@@ -17816,12 +17816,12 @@ export const SDK_REFERENCE = {
|
|
|
17816
17816
|
namespace: 'jobsV2',
|
|
17817
17817
|
method: 'getEventLogForOrganization',
|
|
17818
17818
|
signature: 'rl.jobsV2.getEventLogForOrganization({ organizationId, jobV2Id })',
|
|
17819
|
-
example: "const result = await rl.jobsV2.getEventLogForOrganization({\n organizationId: '<organizationId>',\n jobV2Id: '<jobV2Id>',\n});",
|
|
17819
|
+
example: "const result = await rl.jobsV2.getEventLogForOrganization({\n organizationId: '<organizationId>',\n jobV2Id: '<jobV2Id>',\n // optional: after, envelope\n});",
|
|
17820
17820
|
cliInvocation: 'rl jobs-v2 get-event-log-for-organization',
|
|
17821
17821
|
cliExample: 'rl jobs-v2 get-event-log-for-organization \\\n --organization-id <organizationId> \\\n --job-v2-id <jobV2Id>',
|
|
17822
17822
|
curlExample: "curl -X GET 'https://api.recursion.labelbox.com/v1/organizations/<organizationId>/jobs-v2/<jobV2Id>/event-log' \\\n -H 'Authorization: Bearer $LABELBOX_API_KEY'",
|
|
17823
17823
|
summary: 'Read the raw agent-service event log for an org-scoped jobs_v2 row',
|
|
17824
|
-
description: "Returns this job's own agent-service run event replay verbatim (lifecycle markers, stdout/stderr, and contract-event envelopes alike), oldest to newest, capped to a bounded recent window with a truncated flag. Empty when the job has no agent-service run yet.",
|
|
17824
|
+
description: "Returns this job's own agent-service run event replay verbatim (lifecycle markers, stdout/stderr, and contract-event envelopes alike), oldest to newest, capped to a bounded recent window with a truncated flag; with the after cursor only newer events are returned, still capped to the window. Empty when the job has no agent-service run yet.",
|
|
17825
17825
|
httpMethod: 'get',
|
|
17826
17826
|
path: '/v1/organizations/{organizationId}/jobs-v2/{jobV2Id}/event-log',
|
|
17827
17827
|
requiredPermissions: ['jobs:read'],
|
|
@@ -17842,6 +17842,22 @@ export const SDK_REFERENCE = {
|
|
|
17842
17842
|
description: 'Stable jobs_v2 identifier (UUID). One row per background-work unit in the generic, strategy-driven job framework.',
|
|
17843
17843
|
format: 'uuid',
|
|
17844
17844
|
},
|
|
17845
|
+
{
|
|
17846
|
+
name: 'after',
|
|
17847
|
+
in: 'query',
|
|
17848
|
+
required: false,
|
|
17849
|
+
type: 'string',
|
|
17850
|
+
description: 'Return only events whose sequence is greater than this value. Omit to read the whole transcript.',
|
|
17851
|
+
pattern: '^\\d+$',
|
|
17852
|
+
},
|
|
17853
|
+
{
|
|
17854
|
+
name: 'envelope',
|
|
17855
|
+
in: 'query',
|
|
17856
|
+
required: false,
|
|
17857
|
+
type: 'string',
|
|
17858
|
+
description: 'When true, wrap the events in an object that also carries the generation token of the run they came from. Omit for the bare event array.',
|
|
17859
|
+
enum: ['true', 'false'],
|
|
17860
|
+
},
|
|
17845
17861
|
],
|
|
17846
17862
|
response: {
|
|
17847
17863
|
type: 'RolloutTraceResponseDto',
|
|
@@ -17904,6 +17920,13 @@ export const SDK_REFERENCE = {
|
|
|
17904
17920
|
type: 'boolean',
|
|
17905
17921
|
description: 'True when the event stream was trimmed to the most recent window.',
|
|
17906
17922
|
},
|
|
17923
|
+
{
|
|
17924
|
+
name: 'generation',
|
|
17925
|
+
required: false,
|
|
17926
|
+
type: 'string',
|
|
17927
|
+
description: 'Opaque token identifying the run the events came from. It changes when the run is resubmitted and sequences restart, so a client holding an after cursor should discard what it holds and re-read; null while the job has no run yet.',
|
|
17928
|
+
nullable: true,
|
|
17929
|
+
},
|
|
17907
17930
|
],
|
|
17908
17931
|
},
|
|
17909
17932
|
},
|
|
@@ -19990,12 +20013,12 @@ export const SDK_REFERENCE = {
|
|
|
19990
20013
|
namespace: 'jobsV2',
|
|
19991
20014
|
method: 'getRolloutEventsForOrganization',
|
|
19992
20015
|
signature: 'rl.jobsV2.getRolloutEventsForOrganization({ organizationId, jobV2Id, rolloutRunId })',
|
|
19993
|
-
example: "const result = await rl.jobsV2.getRolloutEventsForOrganization({\n organizationId: '<organizationId>',\n jobV2Id: '<jobV2Id>',\n rolloutRunId: '<rolloutRunId>',\n});",
|
|
20016
|
+
example: "const result = await rl.jobsV2.getRolloutEventsForOrganization({\n organizationId: '<organizationId>',\n jobV2Id: '<jobV2Id>',\n rolloutRunId: '<rolloutRunId>',\n // optional: after, envelope\n});",
|
|
19994
20017
|
cliInvocation: 'rl jobs-v2 get-rollout-events-for-organization',
|
|
19995
20018
|
cliExample: 'rl jobs-v2 get-rollout-events-for-organization \\\n --organization-id <organizationId> \\\n --job-v2-id <jobV2Id> \\\n --rollout-run-id <rolloutRunId>',
|
|
19996
20019
|
curlExample: "curl -X GET 'https://api.recursion.labelbox.com/v1/organizations/<organizationId>/jobs-v2/<jobV2Id>/rollouts/<rolloutRunId>/events' \\\n -H 'Authorization: Bearer $LABELBOX_API_KEY'",
|
|
19997
20020
|
summary: "Read a rollout's trace events for an org-scoped jobs_v2 row",
|
|
19998
|
-
description: "Verifies rolloutRunId was reported by this job's own ingested telemetry before proxying agent-service, and bounds the returned event window.",
|
|
20021
|
+
description: "Verifies rolloutRunId was reported by this job's own ingested telemetry before proxying agent-service, and bounds the returned event window; with the after cursor only newer events are returned, still capped to the window.",
|
|
19999
20022
|
httpMethod: 'get',
|
|
20000
20023
|
path: '/v1/organizations/{organizationId}/jobs-v2/{jobV2Id}/rollouts/{rolloutRunId}/events',
|
|
20001
20024
|
requiredPermissions: ['jobs:read'],
|
|
@@ -20024,6 +20047,22 @@ export const SDK_REFERENCE = {
|
|
|
20024
20047
|
description: 'Opaque agent-service run id of the rollout to trace.',
|
|
20025
20048
|
minLength: 1,
|
|
20026
20049
|
},
|
|
20050
|
+
{
|
|
20051
|
+
name: 'after',
|
|
20052
|
+
in: 'query',
|
|
20053
|
+
required: false,
|
|
20054
|
+
type: 'string',
|
|
20055
|
+
description: 'Return only events whose sequence is greater than this value. Omit to read the whole transcript.',
|
|
20056
|
+
pattern: '^\\d+$',
|
|
20057
|
+
},
|
|
20058
|
+
{
|
|
20059
|
+
name: 'envelope',
|
|
20060
|
+
in: 'query',
|
|
20061
|
+
required: false,
|
|
20062
|
+
type: 'string',
|
|
20063
|
+
description: 'When true, wrap the events in an object that also carries the generation token of the run they came from. Omit for the bare event array.',
|
|
20064
|
+
enum: ['true', 'false'],
|
|
20065
|
+
},
|
|
20027
20066
|
],
|
|
20028
20067
|
response: {
|
|
20029
20068
|
type: 'RolloutTraceResponseDto',
|
|
@@ -20086,6 +20125,13 @@ export const SDK_REFERENCE = {
|
|
|
20086
20125
|
type: 'boolean',
|
|
20087
20126
|
description: 'True when the event stream was trimmed to the most recent window.',
|
|
20088
20127
|
},
|
|
20128
|
+
{
|
|
20129
|
+
name: 'generation',
|
|
20130
|
+
required: false,
|
|
20131
|
+
type: 'string',
|
|
20132
|
+
description: 'Opaque token identifying the run the events came from. It changes when the run is resubmitted and sequences restart, so a client holding an after cursor should discard what it holds and re-read; null while the job has no run yet.',
|
|
20133
|
+
nullable: true,
|
|
20134
|
+
},
|
|
20089
20135
|
],
|
|
20090
20136
|
},
|
|
20091
20137
|
},
|
|
@@ -20161,12 +20207,12 @@ export const SDK_REFERENCE = {
|
|
|
20161
20207
|
namespace: 'qa',
|
|
20162
20208
|
method: 'getLiveJobTranscript',
|
|
20163
20209
|
signature: 'rl.qa.getLiveJobTranscript({ environmentId, qaJobId })',
|
|
20164
|
-
example: "const result = await rl.qa.getLiveJobTranscript({\n environmentId: '<environmentId>',\n qaJobId: '<qaJobId>',\n});",
|
|
20210
|
+
example: "const result = await rl.qa.getLiveJobTranscript({\n environmentId: '<environmentId>',\n qaJobId: '<qaJobId>',\n // optional: after, envelope\n});",
|
|
20165
20211
|
cliInvocation: 'rl qa get-live-job-transcript',
|
|
20166
20212
|
cliExample: 'rl qa get-live-job-transcript \\\n --environment-id <environmentId> \\\n --qa-job-id <qaJobId>',
|
|
20167
20213
|
curlExample: "curl -X GET 'https://api.recursion.labelbox.com/v1/environments/<environmentId>/qa-jobs/<qaJobId>/transcript/live' \\\n -H 'Authorization: Bearer $LABELBOX_API_KEY'",
|
|
20168
20214
|
summary: 'Proxy live transcript from agent service for active QA jobs',
|
|
20169
|
-
description: 'Proxies the
|
|
20215
|
+
description: 'Proxies the event stream from the agent service for an active job, serialized as a JSON array of events; with the after cursor only newer events are returned. Only available while the job is pending, submitting, or running.',
|
|
20170
20216
|
httpMethod: 'get',
|
|
20171
20217
|
path: '/v1/environments/{environmentId}/qa-jobs/{qaJobId}/transcript/live',
|
|
20172
20218
|
requiredPermissions: ['qa:read', 'transcripts:read'],
|
|
@@ -20187,13 +20233,193 @@ export const SDK_REFERENCE = {
|
|
|
20187
20233
|
description: 'Stable QA-job identifier (UUID).',
|
|
20188
20234
|
format: 'uuid',
|
|
20189
20235
|
},
|
|
20236
|
+
{
|
|
20237
|
+
name: 'after',
|
|
20238
|
+
in: 'query',
|
|
20239
|
+
required: false,
|
|
20240
|
+
type: 'string',
|
|
20241
|
+
description: 'Return only events whose sequence is greater than this value. Omit to read the whole transcript.',
|
|
20242
|
+
pattern: '^\\d+$',
|
|
20243
|
+
},
|
|
20244
|
+
{
|
|
20245
|
+
name: 'envelope',
|
|
20246
|
+
in: 'query',
|
|
20247
|
+
required: false,
|
|
20248
|
+
type: 'string',
|
|
20249
|
+
description: 'When true, wrap the events in an object that also carries the generation token of the run they came from. Omit for the bare event array.',
|
|
20250
|
+
enum: ['true', 'false'],
|
|
20251
|
+
},
|
|
20190
20252
|
],
|
|
20191
20253
|
response: {
|
|
20192
20254
|
type: 'string',
|
|
20193
|
-
description: 'Live transcript events as a JSON-encoded array (text/plain)',
|
|
20255
|
+
description: 'Live transcript events as a JSON-encoded array, or a JSON-encoded object with the events and the run generation when the envelope flag is set (text/plain)',
|
|
20194
20256
|
},
|
|
20195
20257
|
responseMediaType: 'text/plain',
|
|
20196
20258
|
},
|
|
20259
|
+
getLiveRunConfigProbeRunTranscript: {
|
|
20260
|
+
operationId: 'getLiveRunConfigProbeRunTranscript',
|
|
20261
|
+
tag: 'run-configs',
|
|
20262
|
+
callPath: ['probeRuns', 'getLiveTranscript'],
|
|
20263
|
+
namespace: 'probeRuns',
|
|
20264
|
+
method: 'getLiveTranscript',
|
|
20265
|
+
signature: 'rl.probeRuns.getLiveTranscript({ runConfigProbeRunId })',
|
|
20266
|
+
example: "const result = await rl.probeRuns.getLiveTranscript({\n runConfigProbeRunId: '<runConfigProbeRunId>',\n // optional: after, envelope\n});",
|
|
20267
|
+
cliInvocation: 'rl probe-runs get-live-transcript',
|
|
20268
|
+
cliExample: 'rl probe-runs get-live-transcript \\\n --run-config-probe-run-id <runConfigProbeRunId>',
|
|
20269
|
+
curlExample: "curl -X GET 'https://api.recursion.labelbox.com/v1/run-config-probe-runs/<runConfigProbeRunId>/transcript/live' \\\n -H 'Authorization: Bearer $LABELBOX_API_KEY'",
|
|
20270
|
+
summary: 'Read the in-flight transcript of a probe-run',
|
|
20271
|
+
description: 'Proxies agent-service transcript events while the probe-run is pending or running; with the after cursor only newer events are returned.',
|
|
20272
|
+
httpMethod: 'get',
|
|
20273
|
+
path: '/v1/run-config-probe-runs/{runConfigProbeRunId}/transcript/live',
|
|
20274
|
+
requiredPermissions: ['run-configs:read'],
|
|
20275
|
+
params: [
|
|
20276
|
+
{
|
|
20277
|
+
name: 'runConfigProbeRunId',
|
|
20278
|
+
in: 'path',
|
|
20279
|
+
required: true,
|
|
20280
|
+
type: 'string',
|
|
20281
|
+
description: 'Stable probe-run identifier (UUID). Probe runs validate a run-config version before locking.',
|
|
20282
|
+
format: 'uuid',
|
|
20283
|
+
},
|
|
20284
|
+
{
|
|
20285
|
+
name: 'after',
|
|
20286
|
+
in: 'query',
|
|
20287
|
+
required: false,
|
|
20288
|
+
type: 'string',
|
|
20289
|
+
description: 'Return only events whose sequence is greater than this value. Omit to read the whole transcript.',
|
|
20290
|
+
pattern: '^\\d+$',
|
|
20291
|
+
},
|
|
20292
|
+
{
|
|
20293
|
+
name: 'envelope',
|
|
20294
|
+
in: 'query',
|
|
20295
|
+
required: false,
|
|
20296
|
+
type: 'string',
|
|
20297
|
+
description: 'When true, wrap the events in an object that also carries the generation token of the run they came from. Omit for the bare event array.',
|
|
20298
|
+
enum: ['true', 'false'],
|
|
20299
|
+
},
|
|
20300
|
+
],
|
|
20301
|
+
response: {
|
|
20302
|
+
type: 'AgentRunEventListDto | LiveTranscriptEnvelopeDto',
|
|
20303
|
+
variants: [
|
|
20304
|
+
{
|
|
20305
|
+
name: 'variant 1',
|
|
20306
|
+
type: 'AgentRunEventListDto',
|
|
20307
|
+
description: 'Agent-service transcript events, ordered by sequence ascending.',
|
|
20308
|
+
items: {
|
|
20309
|
+
type: 'object',
|
|
20310
|
+
description: 'Single event emitted by the agent-service while running a solver or grader.',
|
|
20311
|
+
fields: [
|
|
20312
|
+
{
|
|
20313
|
+
name: 'sequence',
|
|
20314
|
+
required: true,
|
|
20315
|
+
type: 'number',
|
|
20316
|
+
description: 'Monotonically increasing sequence number assigned by the agent-service.',
|
|
20317
|
+
},
|
|
20318
|
+
{
|
|
20319
|
+
name: 'event_type',
|
|
20320
|
+
required: true,
|
|
20321
|
+
type: 'string',
|
|
20322
|
+
description: 'Category of the event: lifecycle markers (started, launched, done, error), stdio (stdout, stderr), structured event payloads (event), agent observations (observation), and setup/snapshot phases.',
|
|
20323
|
+
enum: [
|
|
20324
|
+
'started',
|
|
20325
|
+
'stdout',
|
|
20326
|
+
'stderr',
|
|
20327
|
+
'event',
|
|
20328
|
+
'observation',
|
|
20329
|
+
'process_exited',
|
|
20330
|
+
'snapshotting',
|
|
20331
|
+
'launched',
|
|
20332
|
+
'setup_started',
|
|
20333
|
+
'setup_completed',
|
|
20334
|
+
'input_delivered',
|
|
20335
|
+
'done',
|
|
20336
|
+
'error',
|
|
20337
|
+
],
|
|
20338
|
+
},
|
|
20339
|
+
{
|
|
20340
|
+
name: 'data',
|
|
20341
|
+
required: true,
|
|
20342
|
+
type: 'object',
|
|
20343
|
+
description: 'Payload of the event; shape varies by event_type.',
|
|
20344
|
+
},
|
|
20345
|
+
{
|
|
20346
|
+
name: 'created_at',
|
|
20347
|
+
required: true,
|
|
20348
|
+
type: 'string',
|
|
20349
|
+
description: 'Timestamp when the agent-service emitted the event (ISO-8601, UTC).',
|
|
20350
|
+
},
|
|
20351
|
+
],
|
|
20352
|
+
},
|
|
20353
|
+
},
|
|
20354
|
+
{
|
|
20355
|
+
name: 'variant 2',
|
|
20356
|
+
type: 'LiveTranscriptEnvelopeDto',
|
|
20357
|
+
description: 'Live transcript events together with the generation token of the run they came from.',
|
|
20358
|
+
fields: [
|
|
20359
|
+
{
|
|
20360
|
+
name: 'events',
|
|
20361
|
+
required: true,
|
|
20362
|
+
type: 'object[]',
|
|
20363
|
+
description: 'Live transcript events, ordered by sequence ascending.',
|
|
20364
|
+
items: {
|
|
20365
|
+
type: 'object',
|
|
20366
|
+
description: 'Single event emitted by the agent-service while running a solver or grader.',
|
|
20367
|
+
fields: [
|
|
20368
|
+
{
|
|
20369
|
+
name: 'sequence',
|
|
20370
|
+
required: true,
|
|
20371
|
+
type: 'number',
|
|
20372
|
+
description: 'Monotonically increasing sequence number assigned by the agent-service.',
|
|
20373
|
+
},
|
|
20374
|
+
{
|
|
20375
|
+
name: 'event_type',
|
|
20376
|
+
required: true,
|
|
20377
|
+
type: 'string',
|
|
20378
|
+
description: 'Category of the event: lifecycle markers (started, launched, done, error), stdio (stdout, stderr), structured event payloads (event), agent observations (observation), and setup/snapshot phases.',
|
|
20379
|
+
enum: [
|
|
20380
|
+
'started',
|
|
20381
|
+
'stdout',
|
|
20382
|
+
'stderr',
|
|
20383
|
+
'event',
|
|
20384
|
+
'observation',
|
|
20385
|
+
'process_exited',
|
|
20386
|
+
'snapshotting',
|
|
20387
|
+
'launched',
|
|
20388
|
+
'setup_started',
|
|
20389
|
+
'setup_completed',
|
|
20390
|
+
'input_delivered',
|
|
20391
|
+
'done',
|
|
20392
|
+
'error',
|
|
20393
|
+
],
|
|
20394
|
+
},
|
|
20395
|
+
{
|
|
20396
|
+
name: 'data',
|
|
20397
|
+
required: true,
|
|
20398
|
+
type: 'object',
|
|
20399
|
+
description: 'Payload of the event; shape varies by event_type.',
|
|
20400
|
+
},
|
|
20401
|
+
{
|
|
20402
|
+
name: 'created_at',
|
|
20403
|
+
required: true,
|
|
20404
|
+
type: 'string',
|
|
20405
|
+
description: 'Timestamp when the agent-service emitted the event (ISO-8601, UTC).',
|
|
20406
|
+
},
|
|
20407
|
+
],
|
|
20408
|
+
},
|
|
20409
|
+
},
|
|
20410
|
+
{
|
|
20411
|
+
name: 'generation',
|
|
20412
|
+
required: true,
|
|
20413
|
+
type: 'string',
|
|
20414
|
+
description: 'Opaque token identifying the run the events came from. It changes when the run is resubmitted and sequences restart, so a client holding an after cursor should discard what it holds and re-read; null while the job has no run yet.',
|
|
20415
|
+
nullable: true,
|
|
20416
|
+
},
|
|
20417
|
+
],
|
|
20418
|
+
},
|
|
20419
|
+
],
|
|
20420
|
+
description: 'Live transcript events, or wrapped with the run generation when the envelope flag is set',
|
|
20421
|
+
},
|
|
20422
|
+
},
|
|
20197
20423
|
getLiveSynthesizerRunTranscript: {
|
|
20198
20424
|
operationId: 'getLiveSynthesizerRunTranscript',
|
|
20199
20425
|
tag: 'synthesizer',
|
|
@@ -20201,12 +20427,12 @@ export const SDK_REFERENCE = {
|
|
|
20201
20427
|
namespace: 'synthesizerRuns',
|
|
20202
20428
|
method: 'getLiveTranscript',
|
|
20203
20429
|
signature: 'rl.synthesizerRuns.getLiveTranscript({ problemVersionId, synthesizerRunId })',
|
|
20204
|
-
example: "const result = await rl.synthesizerRuns.getLiveTranscript({\n problemVersionId: '<problemVersionId>',\n synthesizerRunId: '<synthesizerRunId>',\n});",
|
|
20430
|
+
example: "const result = await rl.synthesizerRuns.getLiveTranscript({\n problemVersionId: '<problemVersionId>',\n synthesizerRunId: '<synthesizerRunId>',\n // optional: after, envelope\n});",
|
|
20205
20431
|
cliInvocation: 'rl synthesizer-runs get-live-transcript',
|
|
20206
20432
|
cliExample: 'rl synthesizer-runs get-live-transcript \\\n --problem-version-id <problemVersionId> \\\n --synthesizer-run-id <synthesizerRunId>',
|
|
20207
20433
|
curlExample: "curl -X GET 'https://api.recursion.labelbox.com/v1/versions/<problemVersionId>/synthesizer-runs/<synthesizerRunId>/transcript/live' \\\n -H 'Authorization: Bearer $LABELBOX_API_KEY'",
|
|
20208
20434
|
summary: 'Proxy live transcript from agent service for active synthesizer runs',
|
|
20209
|
-
description: 'Proxies the
|
|
20435
|
+
description: 'Proxies the event stream from the agent service for an active run, serialized as a JSON array of events; with the after cursor only newer events are returned. Only available while the run is pending or running.',
|
|
20210
20436
|
httpMethod: 'get',
|
|
20211
20437
|
path: '/v1/versions/{problemVersionId}/synthesizer-runs/{synthesizerRunId}/transcript/live',
|
|
20212
20438
|
requiredPermissions: ['versions:read', 'transcripts:read'],
|
|
@@ -20227,10 +20453,26 @@ export const SDK_REFERENCE = {
|
|
|
20227
20453
|
description: 'Stable synthesizer-run identifier (UUID). One execution of a synthesizer job.',
|
|
20228
20454
|
format: 'uuid',
|
|
20229
20455
|
},
|
|
20456
|
+
{
|
|
20457
|
+
name: 'after',
|
|
20458
|
+
in: 'query',
|
|
20459
|
+
required: false,
|
|
20460
|
+
type: 'string',
|
|
20461
|
+
description: 'Return only events whose sequence is greater than this value. Omit to read the whole transcript.',
|
|
20462
|
+
pattern: '^\\d+$',
|
|
20463
|
+
},
|
|
20464
|
+
{
|
|
20465
|
+
name: 'envelope',
|
|
20466
|
+
in: 'query',
|
|
20467
|
+
required: false,
|
|
20468
|
+
type: 'string',
|
|
20469
|
+
description: 'When true, wrap the events in an object that also carries the generation token of the run they came from. Omit for the bare event array.',
|
|
20470
|
+
enum: ['true', 'false'],
|
|
20471
|
+
},
|
|
20230
20472
|
],
|
|
20231
20473
|
response: {
|
|
20232
20474
|
type: 'string',
|
|
20233
|
-
description: 'Live transcript events as a JSON-encoded array (text/plain)',
|
|
20475
|
+
description: 'Live transcript events as a JSON-encoded array, or a JSON-encoded object with the events and the run generation when the envelope flag is set (text/plain)',
|
|
20234
20476
|
},
|
|
20235
20477
|
responseMediaType: 'text/plain',
|
|
20236
20478
|
},
|
|
@@ -20241,12 +20483,12 @@ export const SDK_REFERENCE = {
|
|
|
20241
20483
|
namespace: 'problemRuns',
|
|
20242
20484
|
method: 'getLiveTranscript',
|
|
20243
20485
|
signature: 'rl.problemRuns.getLiveTranscript({ problemRunId })',
|
|
20244
|
-
example: "const result = await rl.problemRuns.getLiveTranscript({\n problemRunId: '<problemRunId>',\n});",
|
|
20486
|
+
example: "const result = await rl.problemRuns.getLiveTranscript({\n problemRunId: '<problemRunId>',\n // optional: after, envelope\n});",
|
|
20245
20487
|
cliInvocation: 'rl problem-runs get-live-transcript',
|
|
20246
20488
|
cliExample: 'rl problem-runs get-live-transcript \\\n --problem-run-id <problemRunId>',
|
|
20247
20489
|
curlExample: "curl -X GET 'https://api.recursion.labelbox.com/v1/problem-runs/<problemRunId>/transcript/live' \\\n -H 'Authorization: Bearer $LABELBOX_API_KEY'",
|
|
20248
20490
|
summary: 'Stream the in-flight transcript for an active run',
|
|
20249
|
-
description: 'Returns a JSON array of AgentRunEvent objects — proxied from agent-service for native runs (pending/running) and from Taiga for taiga-provenance runs (pending/running/grading). The active-status set widens for taiga rows because the task transcript on Taiga is fully written by the time the run is in grading.',
|
|
20491
|
+
description: 'Returns a JSON array of AgentRunEvent objects — proxied from agent-service for native runs (pending/running) and from Taiga for taiga-provenance runs (pending/running/grading). The active-status set widens for taiga rows because the task transcript on Taiga is fully written by the time the run is in grading. Native runs honour the after cursor and return only newer events; Taiga runs always return the whole transcript.',
|
|
20250
20492
|
httpMethod: 'get',
|
|
20251
20493
|
path: '/v1/problem-runs/{problemRunId}/transcript/live',
|
|
20252
20494
|
requiredPermissions: ['transcripts:read'],
|
|
@@ -20259,10 +20501,143 @@ export const SDK_REFERENCE = {
|
|
|
20259
20501
|
description: 'Stable problem-run identifier (UUID). One solver attempt at one problem version.',
|
|
20260
20502
|
format: 'uuid',
|
|
20261
20503
|
},
|
|
20504
|
+
{
|
|
20505
|
+
name: 'after',
|
|
20506
|
+
in: 'query',
|
|
20507
|
+
required: false,
|
|
20508
|
+
type: 'string',
|
|
20509
|
+
description: 'Return only events whose sequence is greater than this value. Omit to read the whole transcript.',
|
|
20510
|
+
pattern: '^\\d+$',
|
|
20511
|
+
},
|
|
20512
|
+
{
|
|
20513
|
+
name: 'envelope',
|
|
20514
|
+
in: 'query',
|
|
20515
|
+
required: false,
|
|
20516
|
+
type: 'string',
|
|
20517
|
+
description: 'When true, wrap the events in an object that also carries the generation token of the run they came from. Omit for the bare event array.',
|
|
20518
|
+
enum: ['true', 'false'],
|
|
20519
|
+
},
|
|
20262
20520
|
],
|
|
20263
20521
|
response: {
|
|
20264
|
-
type: '
|
|
20265
|
-
|
|
20522
|
+
type: 'AgentRunEventListDto | LiveTranscriptEnvelopeDto',
|
|
20523
|
+
variants: [
|
|
20524
|
+
{
|
|
20525
|
+
name: 'variant 1',
|
|
20526
|
+
type: 'AgentRunEventListDto',
|
|
20527
|
+
description: 'Agent-service transcript events, ordered by sequence ascending.',
|
|
20528
|
+
items: {
|
|
20529
|
+
type: 'object',
|
|
20530
|
+
description: 'Single event emitted by the agent-service while running a solver or grader.',
|
|
20531
|
+
fields: [
|
|
20532
|
+
{
|
|
20533
|
+
name: 'sequence',
|
|
20534
|
+
required: true,
|
|
20535
|
+
type: 'number',
|
|
20536
|
+
description: 'Monotonically increasing sequence number assigned by the agent-service.',
|
|
20537
|
+
},
|
|
20538
|
+
{
|
|
20539
|
+
name: 'event_type',
|
|
20540
|
+
required: true,
|
|
20541
|
+
type: 'string',
|
|
20542
|
+
description: 'Category of the event: lifecycle markers (started, launched, done, error), stdio (stdout, stderr), structured event payloads (event), agent observations (observation), and setup/snapshot phases.',
|
|
20543
|
+
enum: [
|
|
20544
|
+
'started',
|
|
20545
|
+
'stdout',
|
|
20546
|
+
'stderr',
|
|
20547
|
+
'event',
|
|
20548
|
+
'observation',
|
|
20549
|
+
'process_exited',
|
|
20550
|
+
'snapshotting',
|
|
20551
|
+
'launched',
|
|
20552
|
+
'setup_started',
|
|
20553
|
+
'setup_completed',
|
|
20554
|
+
'input_delivered',
|
|
20555
|
+
'done',
|
|
20556
|
+
'error',
|
|
20557
|
+
],
|
|
20558
|
+
},
|
|
20559
|
+
{
|
|
20560
|
+
name: 'data',
|
|
20561
|
+
required: true,
|
|
20562
|
+
type: 'object',
|
|
20563
|
+
description: 'Payload of the event; shape varies by event_type.',
|
|
20564
|
+
},
|
|
20565
|
+
{
|
|
20566
|
+
name: 'created_at',
|
|
20567
|
+
required: true,
|
|
20568
|
+
type: 'string',
|
|
20569
|
+
description: 'Timestamp when the agent-service emitted the event (ISO-8601, UTC).',
|
|
20570
|
+
},
|
|
20571
|
+
],
|
|
20572
|
+
},
|
|
20573
|
+
},
|
|
20574
|
+
{
|
|
20575
|
+
name: 'variant 2',
|
|
20576
|
+
type: 'LiveTranscriptEnvelopeDto',
|
|
20577
|
+
description: 'Live transcript events together with the generation token of the run they came from.',
|
|
20578
|
+
fields: [
|
|
20579
|
+
{
|
|
20580
|
+
name: 'events',
|
|
20581
|
+
required: true,
|
|
20582
|
+
type: 'object[]',
|
|
20583
|
+
description: 'Live transcript events, ordered by sequence ascending.',
|
|
20584
|
+
items: {
|
|
20585
|
+
type: 'object',
|
|
20586
|
+
description: 'Single event emitted by the agent-service while running a solver or grader.',
|
|
20587
|
+
fields: [
|
|
20588
|
+
{
|
|
20589
|
+
name: 'sequence',
|
|
20590
|
+
required: true,
|
|
20591
|
+
type: 'number',
|
|
20592
|
+
description: 'Monotonically increasing sequence number assigned by the agent-service.',
|
|
20593
|
+
},
|
|
20594
|
+
{
|
|
20595
|
+
name: 'event_type',
|
|
20596
|
+
required: true,
|
|
20597
|
+
type: 'string',
|
|
20598
|
+
description: 'Category of the event: lifecycle markers (started, launched, done, error), stdio (stdout, stderr), structured event payloads (event), agent observations (observation), and setup/snapshot phases.',
|
|
20599
|
+
enum: [
|
|
20600
|
+
'started',
|
|
20601
|
+
'stdout',
|
|
20602
|
+
'stderr',
|
|
20603
|
+
'event',
|
|
20604
|
+
'observation',
|
|
20605
|
+
'process_exited',
|
|
20606
|
+
'snapshotting',
|
|
20607
|
+
'launched',
|
|
20608
|
+
'setup_started',
|
|
20609
|
+
'setup_completed',
|
|
20610
|
+
'input_delivered',
|
|
20611
|
+
'done',
|
|
20612
|
+
'error',
|
|
20613
|
+
],
|
|
20614
|
+
},
|
|
20615
|
+
{
|
|
20616
|
+
name: 'data',
|
|
20617
|
+
required: true,
|
|
20618
|
+
type: 'object',
|
|
20619
|
+
description: 'Payload of the event; shape varies by event_type.',
|
|
20620
|
+
},
|
|
20621
|
+
{
|
|
20622
|
+
name: 'created_at',
|
|
20623
|
+
required: true,
|
|
20624
|
+
type: 'string',
|
|
20625
|
+
description: 'Timestamp when the agent-service emitted the event (ISO-8601, UTC).',
|
|
20626
|
+
},
|
|
20627
|
+
],
|
|
20628
|
+
},
|
|
20629
|
+
},
|
|
20630
|
+
{
|
|
20631
|
+
name: 'generation',
|
|
20632
|
+
required: true,
|
|
20633
|
+
type: 'string',
|
|
20634
|
+
description: 'Opaque token identifying the run the events came from. It changes when the run is resubmitted and sequences restart, so a client holding an after cursor should discard what it holds and re-read; null while the job has no run yet.',
|
|
20635
|
+
nullable: true,
|
|
20636
|
+
},
|
|
20637
|
+
],
|
|
20638
|
+
},
|
|
20639
|
+
],
|
|
20640
|
+
description: 'Live transcript events as a JSON array, or wrapped with the run generation when the envelope flag is set',
|
|
20266
20641
|
},
|
|
20267
20642
|
},
|
|
20268
20643
|
getMarketplaceImage: {
|
|
@@ -25233,13 +25608,6 @@ export const SDK_REFERENCE = {
|
|
|
25233
25608
|
},
|
|
25234
25609
|
],
|
|
25235
25610
|
},
|
|
25236
|
-
{
|
|
25237
|
-
name: 'liveTranscript',
|
|
25238
|
-
required: true,
|
|
25239
|
-
type: 'string',
|
|
25240
|
-
description: 'JSON-encoded array of agent-service events observed so far while the probe is in flight. Null when no live events are available or the probe is terminal.',
|
|
25241
|
-
nullable: true,
|
|
25242
|
-
},
|
|
25243
25611
|
{
|
|
25244
25612
|
name: 'createdAt',
|
|
25245
25613
|
required: true,
|
|
@@ -37679,13 +38047,6 @@ export const SDK_REFERENCE = {
|
|
|
37679
38047
|
},
|
|
37680
38048
|
],
|
|
37681
38049
|
},
|
|
37682
|
-
{
|
|
37683
|
-
name: 'liveTranscript',
|
|
37684
|
-
required: true,
|
|
37685
|
-
type: 'string',
|
|
37686
|
-
description: 'JSON-encoded array of agent-service events observed so far while the probe is in flight. Null when no live events are available or the probe is terminal.',
|
|
37687
|
-
nullable: true,
|
|
37688
|
-
},
|
|
37689
38050
|
{
|
|
37690
38051
|
name: 'createdAt',
|
|
37691
38052
|
required: true,
|
|
@@ -50934,6 +51295,12 @@ export const SDK_REFERENCE = {
|
|
|
50934
51295
|
description: 'RFC 3339 timestamp of when the agent loop last made progress. Distinct from updated_at, which any metadata write touches. Absent for sessions that run no loop.',
|
|
50935
51296
|
format: 'date-time',
|
|
50936
51297
|
},
|
|
51298
|
+
{
|
|
51299
|
+
name: 'metadata',
|
|
51300
|
+
required: false,
|
|
51301
|
+
type: 'object',
|
|
51302
|
+
description: "Caller-defined string key/value pairs supplied when the session was started, e.g. ids from your own system. Immutable, present on root sessions only, and filterable with metadata=key:value or metadata_key=key on GET /v1/sessions. At most 32 entries; keys use letters, digits, '_', '.', and '-' up to 64 characters; values are 1-512 characters.",
|
|
51303
|
+
},
|
|
50937
51304
|
{
|
|
50938
51305
|
name: 'model_ref_id',
|
|
50939
51306
|
required: false,
|
|
@@ -53360,7 +53727,7 @@ export const SDK_REFERENCE = {
|
|
|
53360
53727
|
namespace: 'managedAgents',
|
|
53361
53728
|
method: 'listSessions',
|
|
53362
53729
|
signature: 'rl.managedAgents.listSessions()',
|
|
53363
|
-
example: 'const result = await rl.managedAgents.listSessions({\n // optional: status, kind, agent_id, tag_ids, external_source_type, external_source_id, root_only, limit\n});',
|
|
53730
|
+
example: 'const result = await rl.managedAgents.listSessions({\n // optional: status, kind, agent_id, tag_ids, external_source_type, external_source_id, metadata, metadata_key, root_only, limit\n});',
|
|
53364
53731
|
cliInvocation: 'rl managed-agents list-sessions',
|
|
53365
53732
|
cliExample: 'rl managed-agents list-sessions',
|
|
53366
53733
|
curlExample: "curl -X GET 'https://api.recursion.labelbox.com/managed-agents/v1/sessions' \\\n -H 'Authorization: Bearer $LABELBOX_API_KEY'",
|
|
@@ -53410,6 +53777,22 @@ export const SDK_REFERENCE = {
|
|
|
53410
53777
|
required: false,
|
|
53411
53778
|
type: 'string',
|
|
53412
53779
|
},
|
|
53780
|
+
{
|
|
53781
|
+
name: 'metadata',
|
|
53782
|
+
in: 'query',
|
|
53783
|
+
required: false,
|
|
53784
|
+
type: 'string[]',
|
|
53785
|
+
description: "Exact-match filter on caller-defined session metadata as key:value, split at the first colon. Repeat the parameter to require several pairs; a session's root must carry every one (AND semantics). Children of a matching root match too, so combine with root_only to list only the roots.",
|
|
53786
|
+
maxItems: 32,
|
|
53787
|
+
},
|
|
53788
|
+
{
|
|
53789
|
+
name: 'metadata_key',
|
|
53790
|
+
in: 'query',
|
|
53791
|
+
required: false,
|
|
53792
|
+
type: 'string[]',
|
|
53793
|
+
description: 'Require the root session to carry this caller-defined metadata key with any value. Repeatable; every listed key must be present.',
|
|
53794
|
+
maxItems: 32,
|
|
53795
|
+
},
|
|
53413
53796
|
{
|
|
53414
53797
|
name: 'root_only',
|
|
53415
53798
|
in: 'query',
|
|
@@ -54655,10 +55038,10 @@ export const SDK_REFERENCE = {
|
|
|
54655
55038
|
method: 'startSession',
|
|
54656
55039
|
bodyKey: 'body',
|
|
54657
55040
|
signature: 'rl.managedAgents.startSession({ body })',
|
|
54658
|
-
example: 'const result = await rl.managedAgents.startSession({\n body: {\n agent_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n credential_refs: [\n {\n credential_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n vault_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"\n }\n ],\n environment_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n external_source_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n external_source_type: "example",\n idempotency_key: "example",\n message: "example",\n outcome: {\n description: "example",\n grader_model_ref_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n max_iterations: 1,\n rubric: "example"\n },\n project_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n skip_default_outcome: true,\n vault_ids: [\n "example"\n ]\n },\n});',
|
|
55041
|
+
example: 'const result = await rl.managedAgents.startSession({\n body: {\n agent_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n credential_refs: [\n {\n credential_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n vault_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"\n }\n ],\n environment_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n external_source_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n external_source_type: "example",\n idempotency_key: "example",\n message: "example",\n metadata: {\n key: "example"\n },\n outcome: {\n description: "example",\n grader_model_ref_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n max_iterations: 1,\n rubric: "example"\n },\n project_id: "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n skip_default_outcome: true,\n vault_ids: [\n "example"\n ]\n },\n});',
|
|
54659
55042
|
cliInvocation: 'rl managed-agents start-session',
|
|
54660
55043
|
cliExample: "rl managed-agents start-session \\\n --agent_id '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d' \\\n --environment_id '9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d' \\\n --from-json body.json",
|
|
54661
|
-
curlExample: 'curl -X POST \'https://api.recursion.labelbox.com/managed-agents/v1/sessions\' \\\n -H \'Authorization: Bearer $LABELBOX_API_KEY\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "agent_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "credential_refs": [\n {\n "credential_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "vault_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"\n }\n ],\n "environment_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "external_source_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "external_source_type": "example",\n "idempotency_key": "example",\n "message": "example",\n "outcome": {\n "description": "example",\n "grader_model_ref_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "max_iterations": 1,\n "rubric": "example"\n },\n "project_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "skip_default_outcome": true,\n "vault_ids": [\n "example"\n ]\n }\'',
|
|
55044
|
+
curlExample: 'curl -X POST \'https://api.recursion.labelbox.com/managed-agents/v1/sessions\' \\\n -H \'Authorization: Bearer $LABELBOX_API_KEY\' \\\n -H \'Content-Type: application/json\' \\\n -d \'{\n "agent_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "credential_refs": [\n {\n "credential_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "vault_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d"\n }\n ],\n "environment_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "external_source_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "external_source_type": "example",\n "idempotency_key": "example",\n "message": "example",\n "metadata": {\n "key": "example"\n },\n "outcome": {\n "description": "example",\n "grader_model_ref_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "max_iterations": 1,\n "rubric": "example"\n },\n "project_id": "9f8b1c2d-3e4f-5a6b-7c8d-9e0f1a2b3c4d",\n "skip_default_outcome": true,\n "vault_ids": [\n "example"\n ]\n }\'',
|
|
54662
55045
|
summary: 'Start a managed session',
|
|
54663
55046
|
description: 'Starts a managed agent session and returns 202 with its session_id and status_path; the agent runs asynchronously, so poll getSession or subscribe with streamSessionEvents to follow it. Sandbox compute is provisioned here, which is where a session begins costing money. Send an Idempotency-Key header to make retries safe: the same key with the same body returns the original session, and with a different body is rejected.',
|
|
54664
55047
|
httpMethod: 'post',
|
|
@@ -54732,6 +55115,13 @@ export const SDK_REFERENCE = {
|
|
|
54732
55115
|
type: 'string',
|
|
54733
55116
|
description: "Opening user message for the session, and the context the agent works from. Send it alongside an outcome to supply facts the agent needs without making them part of what the grader measures; the grader never sees it. Kept in the session's system prompt for the whole run, so context compaction cannot summarize it away.",
|
|
54734
55117
|
},
|
|
55118
|
+
{
|
|
55119
|
+
name: 'metadata',
|
|
55120
|
+
in: 'body',
|
|
55121
|
+
required: false,
|
|
55122
|
+
type: 'object',
|
|
55123
|
+
description: "Caller-defined string key/value pairs stored on the session, e.g. ids that map it back to your own system. Write-once: they cannot be changed after start. At most 32 entries; keys use letters, digits, '_', '.', and '-' up to 64 characters; values are 1-512 characters without control characters. Returned as metadata on GET /v1/sessions and filterable with metadata=key:value (repeatable, AND) or metadata_key=key.",
|
|
55124
|
+
},
|
|
54735
55125
|
{
|
|
54736
55126
|
name: 'outcome',
|
|
54737
55127
|
in: 'body',
|