@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.
@@ -79,6 +79,29 @@ export type AdminStatsDto = {
79
79
  runs: number;
80
80
  }>;
81
81
  };
82
+ /**
83
+ * Agent-service transcript events, ordered by sequence ascending.
84
+ */
85
+ export type AgentRunEventListDto = Array<{
86
+ /**
87
+ * Monotonically increasing sequence number assigned by the agent-service.
88
+ */
89
+ sequence: number;
90
+ /**
91
+ * Category of the event: lifecycle markers (started, launched, done, error), stdio (stdout, stderr), structured event payloads (event), agent observations (observation), and setup/snapshot phases.
92
+ */
93
+ event_type: 'started' | 'stdout' | 'stderr' | 'event' | 'observation' | 'process_exited' | 'snapshotting' | 'launched' | 'setup_started' | 'setup_completed' | 'input_delivered' | 'done' | 'error';
94
+ /**
95
+ * Payload of the event; shape varies by event_type.
96
+ */
97
+ data: {
98
+ [key: string]: unknown;
99
+ };
100
+ /**
101
+ * Timestamp when the agent-service emitted the event (ISO-8601, UTC).
102
+ */
103
+ created_at: string;
104
+ }>;
82
105
  /**
83
106
  * Skill detail: catalog metadata plus a signed URL for the current SKILL.md bundle contents.
84
107
  */
@@ -7131,6 +7154,38 @@ export type ListWorkspaceEntriesResponseDto = {
7131
7154
  */
7132
7155
  directoryTruncated: boolean;
7133
7156
  };
7157
+ /**
7158
+ * Live transcript events together with the generation token of the run they came from.
7159
+ */
7160
+ export type LiveTranscriptEnvelopeDto = {
7161
+ /**
7162
+ * Live transcript events, ordered by sequence ascending.
7163
+ */
7164
+ events: Array<{
7165
+ /**
7166
+ * Monotonically increasing sequence number assigned by the agent-service.
7167
+ */
7168
+ sequence: number;
7169
+ /**
7170
+ * Category of the event: lifecycle markers (started, launched, done, error), stdio (stdout, stderr), structured event payloads (event), agent observations (observation), and setup/snapshot phases.
7171
+ */
7172
+ event_type: 'started' | 'stdout' | 'stderr' | 'event' | 'observation' | 'process_exited' | 'snapshotting' | 'launched' | 'setup_started' | 'setup_completed' | 'input_delivered' | 'done' | 'error';
7173
+ /**
7174
+ * Payload of the event; shape varies by event_type.
7175
+ */
7176
+ data: {
7177
+ [key: string]: unknown;
7178
+ };
7179
+ /**
7180
+ * Timestamp when the agent-service emitted the event (ISO-8601, UTC).
7181
+ */
7182
+ created_at: string;
7183
+ }>;
7184
+ /**
7185
+ * 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.
7186
+ */
7187
+ generation: string | null;
7188
+ };
7134
7189
  /**
7135
7190
  * Optional request body for locking a problem version.
7136
7191
  */
@@ -10558,6 +10613,12 @@ export type ManagedAgentsSession = {
10558
10613
  * 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.
10559
10614
  */
10560
10615
  last_activity_at?: unknown;
10616
+ /**
10617
+ * 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.
10618
+ */
10619
+ metadata?: {
10620
+ [key: string]: string;
10621
+ };
10561
10622
  /**
10562
10623
  * Model reference the session's turns run on (UUID), resolved at start from the agent version or the start request.
10563
10624
  */
@@ -11150,6 +11211,12 @@ export type ManagedAgentsStartSessionRequest = {
11150
11211
  * 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.
11151
11212
  */
11152
11213
  message?: string;
11214
+ /**
11215
+ * 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.
11216
+ */
11217
+ metadata?: {
11218
+ [key: string]: string;
11219
+ };
11153
11220
  outcome?: ManagedAgentsDefineOutcomeRequest;
11154
11221
  /**
11155
11222
  * Labelbox project this session's work is attributed to, which the model gateway bills against. Required when the chosen model runs on an account restricted to customer projects, such as the Anthropic HDO models; the start is rejected without it.
@@ -17546,6 +17613,10 @@ export type RolloutTraceResponseDto = {
17546
17613
  * True when the event stream was trimmed to the most recent window.
17547
17614
  */
17548
17615
  truncated: boolean;
17616
+ /**
17617
+ * 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.
17618
+ */
17619
+ generation?: string | null;
17549
17620
  };
17550
17621
  /**
17551
17622
  * Array of rubrics.
@@ -18164,10 +18235,6 @@ export type RunConfigProbeRunDto = {
18164
18235
  */
18165
18236
  runAt: string;
18166
18237
  } | null;
18167
- /**
18168
- * 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.
18169
- */
18170
- liveTranscript: string | null;
18171
18238
  /**
18172
18239
  * Timestamp when the probe-run row was created (ISO-8601, UTC).
18173
18240
  */
@@ -18234,10 +18301,6 @@ export type RunConfigProbeRunListDto = Array<{
18234
18301
  */
18235
18302
  runAt: string;
18236
18303
  } | null;
18237
- /**
18238
- * 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.
18239
- */
18240
- liveTranscript: string | null;
18241
18304
  /**
18242
18305
  * Timestamp when the probe-run row was created (ISO-8601, UTC).
18243
18306
  */
@@ -25911,6 +25974,14 @@ export type GetManagedAgentsV1SessionsData = {
25911
25974
  tag_ids?: string;
25912
25975
  external_source_type?: string;
25913
25976
  external_source_id?: string;
25977
+ /**
25978
+ * 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.
25979
+ */
25980
+ metadata?: Array<string>;
25981
+ /**
25982
+ * Require the root session to carry this caller-defined metadata key with any value. Repeatable; every listed key must be present.
25983
+ */
25984
+ metadata_key?: Array<string>;
25914
25985
  /**
25915
25986
  * Return only root sessions. Use this for model-cost list rows so children cannot consume the bounded page before their tree root.
25916
25987
  */
@@ -31729,7 +31800,16 @@ export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveData =
31729
31800
  */
31730
31801
  qaJobId: string;
31731
31802
  };
31732
- query?: never;
31803
+ query?: {
31804
+ /**
31805
+ * Return only events whose sequence is greater than this value. Omit to read the whole transcript.
31806
+ */
31807
+ after?: string;
31808
+ /**
31809
+ * 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.
31810
+ */
31811
+ envelope?: 'true' | 'false';
31812
+ };
31733
31813
  url: '/v1/environments/{environmentId}/qa-jobs/{qaJobId}/transcript/live';
31734
31814
  };
31735
31815
  export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveErrors = {
@@ -31761,7 +31841,7 @@ export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveErrors
31761
31841
  export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveError = GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveErrors[keyof GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveErrors];
31762
31842
  export type GetV1EnvironmentsByEnvironmentIdQaJobsByQaJobIdTranscriptLiveResponses = {
31763
31843
  /**
31764
- * Live transcript events as a JSON-encoded array
31844
+ * 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
31765
31845
  */
31766
31846
  200: string;
31767
31847
  };
@@ -35210,7 +35290,16 @@ export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventLogData = {
35210
35290
  */
35211
35291
  jobV2Id: string;
35212
35292
  };
35213
- query?: never;
35293
+ query?: {
35294
+ /**
35295
+ * Return only events whose sequence is greater than this value. Omit to read the whole transcript.
35296
+ */
35297
+ after?: string;
35298
+ /**
35299
+ * 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.
35300
+ */
35301
+ envelope?: 'true' | 'false';
35302
+ };
35214
35303
  url: '/v1/organizations/{organizationId}/jobs-v2/{jobV2Id}/event-log';
35215
35304
  };
35216
35305
  export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdEventLogErrors = {
@@ -35361,7 +35450,16 @@ export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRu
35361
35450
  */
35362
35451
  rolloutRunId: string;
35363
35452
  };
35364
- query?: never;
35453
+ query?: {
35454
+ /**
35455
+ * Return only events whose sequence is greater than this value. Omit to read the whole transcript.
35456
+ */
35457
+ after?: string;
35458
+ /**
35459
+ * 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.
35460
+ */
35461
+ envelope?: 'true' | 'false';
35462
+ };
35365
35463
  url: '/v1/organizations/{organizationId}/jobs-v2/{jobV2Id}/rollouts/{rolloutRunId}/events';
35366
35464
  };
35367
35465
  export type GetV1OrganizationsByOrganizationIdJobsV2ByJobV2IdRolloutsByRolloutRunIdEventsErrors = {
@@ -36917,7 +37015,16 @@ export type GetV1ProblemRunsByProblemRunIdTranscriptLiveData = {
36917
37015
  */
36918
37016
  problemRunId: string;
36919
37017
  };
36920
- query?: never;
37018
+ query?: {
37019
+ /**
37020
+ * Return only events whose sequence is greater than this value. Omit to read the whole transcript.
37021
+ */
37022
+ after?: string;
37023
+ /**
37024
+ * 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.
37025
+ */
37026
+ envelope?: 'true' | 'false';
37027
+ };
36921
37028
  url: '/v1/problem-runs/{problemRunId}/transcript/live';
36922
37029
  };
36923
37030
  export type GetV1ProblemRunsByProblemRunIdTranscriptLiveErrors = {
@@ -36949,11 +37056,9 @@ export type GetV1ProblemRunsByProblemRunIdTranscriptLiveErrors = {
36949
37056
  export type GetV1ProblemRunsByProblemRunIdTranscriptLiveError = GetV1ProblemRunsByProblemRunIdTranscriptLiveErrors[keyof GetV1ProblemRunsByProblemRunIdTranscriptLiveErrors];
36950
37057
  export type GetV1ProblemRunsByProblemRunIdTranscriptLiveResponses = {
36951
37058
  /**
36952
- * Live transcript events as a JSON array
37059
+ * Live transcript events as a JSON array, or wrapped with the run generation when the envelope flag is set
36953
37060
  */
36954
- 200: Array<{
36955
- [key: string]: unknown;
36956
- }>;
37061
+ 200: AgentRunEventListDto | LiveTranscriptEnvelopeDto;
36957
37062
  };
36958
37063
  export type GetV1ProblemRunsByProblemRunIdTranscriptLiveResponse = GetV1ProblemRunsByProblemRunIdTranscriptLiveResponses[keyof GetV1ProblemRunsByProblemRunIdTranscriptLiveResponses];
36959
37064
  export type GetV1ProblemRunsByProblemRunIdWorkspaceEntriesData = {
@@ -38334,6 +38439,60 @@ export type PostV1RunConfigProbeRunsByRunConfigProbeRunIdCancelResponses = {
38334
38439
  204: void;
38335
38440
  };
38336
38441
  export type PostV1RunConfigProbeRunsByRunConfigProbeRunIdCancelResponse = PostV1RunConfigProbeRunsByRunConfigProbeRunIdCancelResponses[keyof PostV1RunConfigProbeRunsByRunConfigProbeRunIdCancelResponses];
38442
+ export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveData = {
38443
+ body?: never;
38444
+ path: {
38445
+ /**
38446
+ * Stable probe-run identifier (UUID). Probe runs validate a run-config version before locking.
38447
+ */
38448
+ runConfigProbeRunId: string;
38449
+ };
38450
+ query?: {
38451
+ /**
38452
+ * Return only events whose sequence is greater than this value. Omit to read the whole transcript.
38453
+ */
38454
+ after?: string;
38455
+ /**
38456
+ * 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.
38457
+ */
38458
+ envelope?: 'true' | 'false';
38459
+ };
38460
+ url: '/v1/run-config-probe-runs/{runConfigProbeRunId}/transcript/live';
38461
+ };
38462
+ export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveErrors = {
38463
+ /**
38464
+ * Request body, path parameter, or query parameter failed schema validation. The `message` field carries the Zod field-error map.
38465
+ */
38466
+ 400: ApiErrorResponse;
38467
+ /**
38468
+ * Missing, malformed, or unknown `X-User-External-Id` header (when supplied for an end-user call).
38469
+ */
38470
+ 401: ApiErrorResponse | TargetApiErrorAuthHeaderMissing | TargetApiErrorOrgHeaderMissing;
38471
+ /**
38472
+ * Caller is missing a required permission, or the request scope (organization / environment / problem) does not resolve to the caller.
38473
+ */
38474
+ 403: ApiErrorResponse;
38475
+ /**
38476
+ * Probe-run not found or not in flight
38477
+ */
38478
+ 404: unknown;
38479
+ /**
38480
+ * Rate limit exceeded for the caller (per-user, per-environment, or per-IP tracker depending on auth context).
38481
+ */
38482
+ 429: ApiErrorResponse;
38483
+ /**
38484
+ * Unexpected server error. The response body is the generic `{ statusCode, message }` shape for an unhandled error, or the target error envelope `{ error: { code, message } }` for a framework-owned invariant violation.
38485
+ */
38486
+ 500: ApiErrorResponse | TargetApiErrorInvariantViolation;
38487
+ };
38488
+ export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveError = GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveErrors[keyof GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveErrors];
38489
+ export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveResponses = {
38490
+ /**
38491
+ * Live transcript events, or wrapped with the run generation when the envelope flag is set
38492
+ */
38493
+ 200: AgentRunEventListDto | LiveTranscriptEnvelopeDto;
38494
+ };
38495
+ export type GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveResponse = GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveResponses[keyof GetV1RunConfigProbeRunsByRunConfigProbeRunIdTranscriptLiveResponses];
38337
38496
  export type DeleteV1RunConfigVersionsByRunConfigVersionIdData = {
38338
38497
  body?: never;
38339
38498
  path: {
@@ -40667,7 +40826,16 @@ export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTran
40667
40826
  */
40668
40827
  synthesizerRunId: string;
40669
40828
  };
40670
- query?: never;
40829
+ query?: {
40830
+ /**
40831
+ * Return only events whose sequence is greater than this value. Omit to read the whole transcript.
40832
+ */
40833
+ after?: string;
40834
+ /**
40835
+ * 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.
40836
+ */
40837
+ envelope?: 'true' | 'false';
40838
+ };
40671
40839
  url: '/v1/versions/{problemVersionId}/synthesizer-runs/{synthesizerRunId}/transcript/live';
40672
40840
  };
40673
40841
  export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveErrors = {
@@ -40699,7 +40867,7 @@ export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTran
40699
40867
  export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveError = GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveErrors[keyof GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveErrors];
40700
40868
  export type GetV1VersionsByProblemVersionIdSynthesizerRunsBySynthesizerRunIdTranscriptLiveResponses = {
40701
40869
  /**
40702
- * Live transcript events as a JSON-encoded array
40870
+ * 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
40703
40871
  */
40704
40872
  200: string;
40705
40873
  };
@@ -6589,6 +6589,7 @@ export const RESOURCE_REFERENCE = {
6589
6589
  'discardRunConfigVersion',
6590
6590
  'discoverMcpToolsForRunConfigVersion',
6591
6591
  'getInheritedRunConfigDefaultForEnvironment',
6592
+ 'getLiveRunConfigProbeRunTranscript',
6592
6593
  'getRunConfig',
6593
6594
  'getRunConfigProbeRun',
6594
6595
  'getRunConfigVersion',