@labelbox/recursion-sdk 0.0.171 → 0.0.173

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.
@@ -6408,7 +6408,7 @@ export type ImagesResponseDto = {
6408
6408
  */
6409
6409
  export type ImportPlatformLimitsDto = {
6410
6410
  /**
6411
- * Per-environment maximum import file size in bytes; null means the platform default is in effect.
6411
+ * Platform import-file ceiling in bytes derived from the import worker memory limit; null means no platform ceiling is available.
6412
6412
  */
6413
6413
  maxImportFileSizeBytes: number | null;
6414
6414
  };
@@ -163,6 +163,7 @@ export const CONCEPT_REFERENCE = {
163
163
  related: [
164
164
  'concept:grading-strategies',
165
165
  'concept:run-config-roles',
166
+ 'concept:re-grading-runs',
166
167
  'recipe:add-and-refine-a-rubric',
167
168
  'recipe:create-and-grade-a-problem',
168
169
  'resource:rubrics',
@@ -246,6 +247,18 @@ export const CONCEPT_REFERENCE = {
246
247
  domain: 'review-qa',
247
248
  related: ['recipe:gate-a-stage-on-qa', 'resource:qa', 'resource:qa-gates'],
248
249
  },
250
+ 're-grading-runs': {
251
+ id: 're-grading-runs',
252
+ title: 'Re-grading runs',
253
+ domain: 'review-qa',
254
+ related: [
255
+ 'concept:how-grading-works',
256
+ 'concept:runs-transcripts-and-results',
257
+ 'recipe:regrade-a-run',
258
+ 'recipe:create-and-grade-a-problem',
259
+ 'resource:problem-runs',
260
+ ],
261
+ },
249
262
  'run-config-anatomy': {
250
263
  id: 'run-config-anatomy',
251
264
  title: 'Anatomy of a run config',
@@ -279,6 +292,7 @@ export const CONCEPT_REFERENCE = {
279
292
  'resource:transcripts',
280
293
  'resource:problem-runs',
281
294
  'concept:how-async-work-runs',
295
+ 'concept:re-grading-runs',
282
296
  ],
283
297
  },
284
298
  'secrets-and-credentials': {
@@ -9275,6 +9275,578 @@ export const RECIPE_REFERENCE = {
9275
9275
  ],
9276
9276
  },
9277
9277
  },
9278
+ 'regrade-a-run': {
9279
+ id: 'regrade-a-run',
9280
+ title: 'Re-grade a run',
9281
+ goal: 'Re-score a finished run WITHOUT re-running the solver: create and grade a problem, then re-grade that run against its existing solver transcript — a fast, cheap way to refresh the grade without paying the solver cost again. The prior grade is kept in grade history, so you retain the original result.',
9282
+ category: 'problems',
9283
+ video: 'regrade-a-run.mp4',
9284
+ walkthrough: [
9285
+ {
9286
+ caption: 'Open a problem in the editor',
9287
+ image: '01-open-a-problem-in-the-editor.png',
9288
+ description: 'Open a draft problem version in the editor to configure it.',
9289
+ },
9290
+ {
9291
+ caption: 'Set the task prompt',
9292
+ image: '02-set-the-task-prompt.png',
9293
+ description: 'Write the instruction the solver agent will be given.',
9294
+ },
9295
+ {
9296
+ caption: 'Add a rubric criterion',
9297
+ image: '03-add-a-rubric-criterion.png',
9298
+ description: 'Define how the answer is graded — the criterion the grader checks against.',
9299
+ },
9300
+ {
9301
+ caption: 'Lock the version',
9302
+ image: '04-lock-the-version.png',
9303
+ description: "Lock the version to make it runnable; a locked version can't be edited.",
9304
+ },
9305
+ {
9306
+ caption: 'Run the problem',
9307
+ image: '05-run-the-problem.png',
9308
+ description: 'Start a run — the solver attempts the task in a sandboxed container.',
9309
+ },
9310
+ {
9311
+ caption: 'Review the grade',
9312
+ image: '06-review-the-grade.png',
9313
+ description: 'When grading finishes, the run shows its score against the rubric.',
9314
+ },
9315
+ {
9316
+ caption: 'Open the run to re-grade it',
9317
+ image: '07-open-the-run-to-re-grade-it.png',
9318
+ description: "Open the run's attempt preview, where the Regrade control lives.",
9319
+ },
9320
+ {
9321
+ caption: 'Re-grade without re-running the solver',
9322
+ image: '08-re-grade-without-re-running-the-solver.png',
9323
+ description: 'Re-grade the run — only grading re-runs; the solver transcript is reused.',
9324
+ },
9325
+ {
9326
+ caption: 'See the updated grade',
9327
+ image: '09-see-the-updated-grade.png',
9328
+ description: 'The run shows a Regraded badge and the fresh score; the prior grade moves to grade history.',
9329
+ },
9330
+ ],
9331
+ steps: [
9332
+ {
9333
+ kind: 'intelligence',
9334
+ caption: 'Create a project in Intelligence (its rl-gym environment syncs automatically)',
9335
+ phase: 'setup',
9336
+ gql: {
9337
+ query: 'mutation CreateProject($data: ProjectCreateInput!) {\n createProject(data: $data) {\n id\n }\n}',
9338
+ variables: {
9339
+ data: {
9340
+ name: 'Recipe demo project',
9341
+ allowedMediaType: 'RL',
9342
+ dataRowCount: 1,
9343
+ },
9344
+ },
9345
+ },
9346
+ captures: {
9347
+ projectId: 'createProject.id',
9348
+ },
9349
+ },
9350
+ {
9351
+ kind: 'intelligence',
9352
+ caption: "Find the project's initial labeling queue (reserve a task from it)",
9353
+ phase: 'setup',
9354
+ gql: {
9355
+ query: 'query ProjectTaskQueues($project: WhereUniqueIdInput!) {\n project(where: $project) {\n taskQueues {\n id\n queueType\n }\n }\n}',
9356
+ variables: {
9357
+ project: {
9358
+ id: {
9359
+ $ref: 'projectId',
9360
+ },
9361
+ },
9362
+ },
9363
+ },
9364
+ captures: {
9365
+ queueId: 'project.taskQueues[queueType=INITIAL_LABELING_QUEUE].id',
9366
+ },
9367
+ },
9368
+ {
9369
+ kind: 'intelligence',
9370
+ caption: 'Reserve a task to get a problem to author (data rows sync shortly after the project is created — retry until a task is returned)',
9371
+ phase: 'setup',
9372
+ gql: {
9373
+ query: 'mutation NextRlTask($where: ReserveRlTaskInput!) {\n nextRlTask(where: $where) {\n task {\n problem {\n id\n }\n }\n }\n}',
9374
+ variables: {
9375
+ where: {
9376
+ queueId: {
9377
+ $ref: 'queueId',
9378
+ },
9379
+ },
9380
+ },
9381
+ },
9382
+ captures: {
9383
+ problemId: 'nextRlTask.task.problem.id',
9384
+ },
9385
+ },
9386
+ {
9387
+ kind: 'sdk',
9388
+ operationId: 'getProblem',
9389
+ caption: "Look up the reserved problem's environment",
9390
+ phase: 'setup',
9391
+ inputs: {
9392
+ problemId: {
9393
+ $ref: 'problemId',
9394
+ },
9395
+ },
9396
+ captures: {
9397
+ environmentId: 'environmentId',
9398
+ },
9399
+ },
9400
+ {
9401
+ kind: 'sdk',
9402
+ operationId: 'listProblemVersionsForProblem',
9403
+ caption: 'Open the draft version the reservation created',
9404
+ phase: 'setup',
9405
+ inputs: {
9406
+ problemId: {
9407
+ $ref: 'problemId',
9408
+ },
9409
+ },
9410
+ captures: {
9411
+ problemVersionId: '[].id',
9412
+ },
9413
+ },
9414
+ {
9415
+ kind: 'sdk',
9416
+ operationId: 'createCustomerSecret',
9417
+ caption: 'Provision the Anthropic API key as a customer secret for the solver',
9418
+ phase: 'setup',
9419
+ inputs: {
9420
+ scope: {
9421
+ value: {
9422
+ level: 'env',
9423
+ id: {
9424
+ $ref: 'environmentId',
9425
+ },
9426
+ },
9427
+ },
9428
+ name: {
9429
+ value: 'ANTHROPIC_API_KEY',
9430
+ },
9431
+ upstreamHost: {
9432
+ value: 'api.anthropic.com',
9433
+ },
9434
+ headerName: {
9435
+ value: 'x-api-key',
9436
+ },
9437
+ },
9438
+ captures: {
9439
+ solverSecretId: 'id',
9440
+ },
9441
+ },
9442
+ {
9443
+ kind: 'sdk',
9444
+ operationId: 'createRunConfig',
9445
+ caption: "Create the solver run-config identity, scoped to the evaluation's environment",
9446
+ phase: 'setup',
9447
+ inputs: {
9448
+ scope: {
9449
+ value: {
9450
+ level: 'env',
9451
+ id: {
9452
+ $ref: 'environmentId',
9453
+ },
9454
+ },
9455
+ },
9456
+ type: {
9457
+ value: 'agent-harness',
9458
+ },
9459
+ name: {
9460
+ value: 'Baseline solver',
9461
+ },
9462
+ },
9463
+ captures: {
9464
+ solverRunConfigVersionId: 'initialVersionId',
9465
+ },
9466
+ },
9467
+ {
9468
+ kind: 'sdk',
9469
+ operationId: 'updateRunConfigVersion',
9470
+ caption: 'Configure the solver draft: harness image, model, egress allowlist, and the secret declaration',
9471
+ phase: 'setup',
9472
+ inputs: {
9473
+ runConfigVersionId: {
9474
+ $ref: 'solverRunConfigVersionId',
9475
+ },
9476
+ config: {
9477
+ value: {
9478
+ harnessImageUrl: 'us-central1-docker.pkg.dev/lb-ml-prod/agent-service/claude-code:latest',
9479
+ envVars: {
9480
+ ANTHROPIC_MODEL: 'claude-haiku-4-5-20251001',
9481
+ },
9482
+ args: '--max-turns 30',
9483
+ allowedDomains: ['api.anthropic.com'],
9484
+ customerSecrets: [
9485
+ {
9486
+ envVarName: 'ANTHROPIC_API_KEY',
9487
+ },
9488
+ ],
9489
+ timeoutSeconds: 600,
9490
+ },
9491
+ },
9492
+ },
9493
+ captures: {},
9494
+ },
9495
+ {
9496
+ kind: 'sdk',
9497
+ operationId: 'attachCustomerSecret',
9498
+ caption: 'Attach the customer secret to the solver draft version',
9499
+ phase: 'setup',
9500
+ inputs: {
9501
+ runConfigVersionId: {
9502
+ $ref: 'solverRunConfigVersionId',
9503
+ },
9504
+ customerSecretId: {
9505
+ $ref: 'solverSecretId',
9506
+ },
9507
+ },
9508
+ captures: {},
9509
+ },
9510
+ {
9511
+ kind: 'sdk',
9512
+ operationId: 'lockRunConfigVersion',
9513
+ caption: 'Lock the verified solver version — only a locked version can be referenced as a solver',
9514
+ phase: 'setup',
9515
+ inputs: {
9516
+ runConfigVersionId: {
9517
+ $ref: 'solverRunConfigVersionId',
9518
+ },
9519
+ },
9520
+ captures: {},
9521
+ },
9522
+ {
9523
+ kind: 'sdk',
9524
+ operationId: 'createCustomerSecret',
9525
+ caption: 'Provision the Anthropic API key as a customer secret for the grader',
9526
+ phase: 'setup',
9527
+ inputs: {
9528
+ scope: {
9529
+ value: {
9530
+ level: 'env',
9531
+ id: {
9532
+ $ref: 'environmentId',
9533
+ },
9534
+ },
9535
+ },
9536
+ name: {
9537
+ value: 'ANTHROPIC_API_KEY',
9538
+ },
9539
+ upstreamHost: {
9540
+ value: 'api.anthropic.com',
9541
+ },
9542
+ headerName: {
9543
+ value: 'x-api-key',
9544
+ },
9545
+ },
9546
+ captures: {
9547
+ graderSecretId: 'id',
9548
+ },
9549
+ },
9550
+ {
9551
+ kind: 'sdk',
9552
+ operationId: 'createRunConfig',
9553
+ caption: "Create the grader run-config identity, scoped to the evaluation's environment",
9554
+ phase: 'setup',
9555
+ inputs: {
9556
+ scope: {
9557
+ value: {
9558
+ level: 'env',
9559
+ id: {
9560
+ $ref: 'environmentId',
9561
+ },
9562
+ },
9563
+ },
9564
+ type: {
9565
+ value: 'agent-harness',
9566
+ },
9567
+ name: {
9568
+ value: 'Recipe grader',
9569
+ },
9570
+ },
9571
+ captures: {
9572
+ graderRunConfigVersionId: 'initialVersionId',
9573
+ },
9574
+ },
9575
+ {
9576
+ kind: 'sdk',
9577
+ operationId: 'updateRunConfigVersion',
9578
+ caption: 'Configure the grader draft: harness image, model, egress allowlist, and the secret declaration',
9579
+ phase: 'setup',
9580
+ inputs: {
9581
+ runConfigVersionId: {
9582
+ $ref: 'graderRunConfigVersionId',
9583
+ },
9584
+ config: {
9585
+ value: {
9586
+ harnessImageUrl: 'us-central1-docker.pkg.dev/lb-ml-prod/agent-service/claude-code:latest',
9587
+ args: '--model claude-haiku-4-5-20251001 --max-turns 10',
9588
+ allowedDomains: ['api.anthropic.com'],
9589
+ customerSecrets: [
9590
+ {
9591
+ envVarName: 'ANTHROPIC_API_KEY',
9592
+ },
9593
+ ],
9594
+ timeoutSeconds: 600,
9595
+ },
9596
+ },
9597
+ },
9598
+ captures: {},
9599
+ },
9600
+ {
9601
+ kind: 'sdk',
9602
+ operationId: 'attachCustomerSecret',
9603
+ caption: 'Attach the customer secret to the grader draft version',
9604
+ phase: 'setup',
9605
+ inputs: {
9606
+ runConfigVersionId: {
9607
+ $ref: 'graderRunConfigVersionId',
9608
+ },
9609
+ customerSecretId: {
9610
+ $ref: 'graderSecretId',
9611
+ },
9612
+ },
9613
+ captures: {},
9614
+ },
9615
+ {
9616
+ kind: 'sdk',
9617
+ operationId: 'lockRunConfigVersion',
9618
+ caption: 'Lock the verified grader version — only a locked version can be referenced as the grader',
9619
+ phase: 'setup',
9620
+ inputs: {
9621
+ runConfigVersionId: {
9622
+ $ref: 'graderRunConfigVersionId',
9623
+ },
9624
+ },
9625
+ captures: {},
9626
+ },
9627
+ {
9628
+ kind: 'sdk',
9629
+ operationId: 'updateProblemVersion',
9630
+ caption: 'Set the task prompt and grade it against the rubric',
9631
+ phase: 'main',
9632
+ inputs: {
9633
+ problemVersionId: {
9634
+ $ref: 'problemVersionId',
9635
+ },
9636
+ prompt: {
9637
+ value: 'What is the capital of Germany? Answer with just the city name.',
9638
+ },
9639
+ gradingConfig: {
9640
+ value: {
9641
+ type: 'rubric',
9642
+ },
9643
+ },
9644
+ },
9645
+ captures: {},
9646
+ },
9647
+ {
9648
+ kind: 'sdk',
9649
+ operationId: 'createProblemVersionRubric',
9650
+ caption: 'Add a rubric to the version',
9651
+ phase: 'main',
9652
+ inputs: {
9653
+ problemVersionId: {
9654
+ $ref: 'problemVersionId',
9655
+ },
9656
+ },
9657
+ captures: {
9658
+ rubricId: 'id',
9659
+ },
9660
+ },
9661
+ {
9662
+ kind: 'sdk',
9663
+ operationId: 'updateProblemVersionRubric',
9664
+ caption: 'Define the rubric criterion',
9665
+ phase: 'main',
9666
+ inputs: {
9667
+ problemVersionId: {
9668
+ $ref: 'problemVersionId',
9669
+ },
9670
+ rubricId: {
9671
+ $ref: 'rubricId',
9672
+ },
9673
+ criterion: {
9674
+ value: 'The answer must be Berlin.',
9675
+ },
9676
+ weight: {
9677
+ value: 1,
9678
+ },
9679
+ },
9680
+ captures: {},
9681
+ },
9682
+ {
9683
+ kind: 'sdk',
9684
+ operationId: 'lockProblemVersion',
9685
+ caption: 'Lock the version to make it runnable',
9686
+ phase: 'main',
9687
+ inputs: {
9688
+ problemVersionId: {
9689
+ $ref: 'problemVersionId',
9690
+ },
9691
+ },
9692
+ captures: {},
9693
+ },
9694
+ {
9695
+ kind: 'sdk',
9696
+ operationId: 'bulkCreateProblemRuns',
9697
+ caption: 'Grade a solver run against the locked version',
9698
+ phase: 'main',
9699
+ inputs: {
9700
+ environmentId: {
9701
+ $ref: 'environmentId',
9702
+ },
9703
+ problemVersionIds: {
9704
+ value: [
9705
+ {
9706
+ $ref: 'problemVersionId',
9707
+ },
9708
+ ],
9709
+ },
9710
+ nAttemptsPerProblem: {
9711
+ value: 1,
9712
+ },
9713
+ runConfigVersionIds: {
9714
+ value: [
9715
+ {
9716
+ $ref: 'solverRunConfigVersionId',
9717
+ },
9718
+ ],
9719
+ },
9720
+ graderRunConfigVersionId: {
9721
+ $ref: 'graderRunConfigVersionId',
9722
+ },
9723
+ name: {
9724
+ value: 'Run to re-grade',
9725
+ },
9726
+ },
9727
+ captures: {
9728
+ problemRunId: 'problemRunIds[]',
9729
+ },
9730
+ },
9731
+ {
9732
+ kind: 'sdk',
9733
+ operationId: 'getProblemRun',
9734
+ caption: 'Wait for the solver run to finish',
9735
+ phase: 'main',
9736
+ inputs: {
9737
+ problemRunId: {
9738
+ $ref: 'problemRunId',
9739
+ },
9740
+ },
9741
+ captures: {},
9742
+ },
9743
+ {
9744
+ kind: 'sdk',
9745
+ operationId: 'getProblemRun',
9746
+ caption: 'Wait for the first grade to finalize',
9747
+ phase: 'main',
9748
+ inputs: {
9749
+ problemRunId: {
9750
+ $ref: 'problemRunId',
9751
+ },
9752
+ },
9753
+ captures: {
9754
+ initialScore: 'finalScore',
9755
+ },
9756
+ },
9757
+ {
9758
+ kind: 'sdk',
9759
+ operationId: 'regradeProblemRun',
9760
+ caption: 'Re-grade the run without re-running the solver',
9761
+ phase: 'main',
9762
+ inputs: {
9763
+ problemRunId: {
9764
+ $ref: 'problemRunId',
9765
+ },
9766
+ },
9767
+ captures: {
9768
+ regradeJobV2Id: 'jobV2Id',
9769
+ },
9770
+ },
9771
+ {
9772
+ kind: 'sdk',
9773
+ operationId: 'getJobV2ForEnvironment',
9774
+ caption: 'Wait for the re-grade to finish',
9775
+ phase: 'main',
9776
+ inputs: {
9777
+ environmentId: {
9778
+ $ref: 'environmentId',
9779
+ },
9780
+ jobV2Id: {
9781
+ $ref: 'regradeJobV2Id',
9782
+ },
9783
+ },
9784
+ captures: {},
9785
+ },
9786
+ {
9787
+ kind: 'sdk',
9788
+ operationId: 'getProblemRun',
9789
+ caption: 'Read the new grade',
9790
+ phase: 'main',
9791
+ inputs: {
9792
+ problemRunId: {
9793
+ $ref: 'problemRunId',
9794
+ },
9795
+ },
9796
+ captures: {
9797
+ regradedScore: 'finalScore',
9798
+ },
9799
+ },
9800
+ {
9801
+ kind: 'sdk',
9802
+ operationId: 'getProblemRun',
9803
+ caption: 'Confirm the run records the re-grade',
9804
+ phase: 'main',
9805
+ inputs: {
9806
+ problemRunId: {
9807
+ $ref: 'problemRunId',
9808
+ },
9809
+ },
9810
+ captures: {
9811
+ regradeCount: 'regradeCount',
9812
+ },
9813
+ },
9814
+ ],
9815
+ sdk: {
9816
+ setup: "// In Intelligence: Create a project in Intelligence (its rl-gym environment syncs automatically)\nconst projectIdResponse = await fetch('https://app.labelbox.com/api/_gql', {\n method: 'POST',\n headers: {\n Authorization: 'Bearer ' + process.env.LABELBOX_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n query: `mutation CreateProject($data: ProjectCreateInput!) {\n createProject(data: $data) {\n id\n }\n}`,\n variables: { data: { name: 'Recipe demo project', allowedMediaType: 'RL', dataRowCount: 1 } },\n }),\n}).then((response) => response.json());\nif (projectIdResponse.errors?.length) throw new Error(projectIdResponse.errors.map((error) => error.message).join('; '));\nconst projectId = projectIdResponse.data?.createProject?.id;\nif (!projectId) throw new Error('projectId is missing or false in the response (it may still be syncing, or the operation failed) — retry');\n\n// In Intelligence: Find the project's initial labeling queue (reserve a task from it)\nconst queueIdResponse = await fetch('https://app.labelbox.com/api/_gql', {\n method: 'POST',\n headers: {\n Authorization: 'Bearer ' + process.env.LABELBOX_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n query: `query ProjectTaskQueues($project: WhereUniqueIdInput!) {\n project(where: $project) {\n taskQueues {\n id\n queueType\n }\n }\n}`,\n variables: { project: { id: projectId } },\n }),\n}).then((response) => response.json());\nif (queueIdResponse.errors?.length) throw new Error(queueIdResponse.errors.map((error) => error.message).join('; '));\nconst queueId = queueIdResponse.data?.project?.taskQueues?.find((item) => item.queueType === \"INITIAL_LABELING_QUEUE\")?.id;\nif (!queueId) throw new Error('queueId is missing or false in the response (it may still be syncing, or the operation failed) — retry');\n\n// In Intelligence: Reserve a task to get a problem to author (data rows sync shortly after the project is created — retry until a task is returned)\nconst problemIdResponse = await fetch('https://app.labelbox.com/api/_gql', {\n method: 'POST',\n headers: {\n Authorization: 'Bearer ' + process.env.LABELBOX_API_KEY,\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n query: `mutation NextRlTask($where: ReserveRlTaskInput!) {\n nextRlTask(where: $where) {\n task {\n problem {\n id\n }\n }\n }\n}`,\n variables: { where: { queueId: queueId } },\n }),\n}).then((response) => response.json());\nif (problemIdResponse.errors?.length) throw new Error(problemIdResponse.errors.map((error) => error.message).join('; '));\nconst problemId = problemIdResponse.data?.nextRlTask?.task?.problem?.id;\nif (!problemId) throw new Error('problemId is missing or false in the response (it may still be syncing, or the operation failed) — retry');\n\n// Look up the reserved problem's environment\nconst problem = await rl.problems.get({\n problemId,\n});\nconst environmentId = problem.environmentId;\n\n// Open the draft version the reservation created\nconst problemVersion = await rl.problemVersions.listForProblem({\n problemId,\n});\nconst problemVersionId = problemVersion[0]?.id;\nif (problemVersionId == null) throw new Error('problemVersionId not found in the response (it may still be syncing) — retry');\n\n// Provision the Anthropic API key as a customer secret for the solver\nconst customerSecret = await rl.customerSecrets.create({\n body: {\n scope: { level: 'env', id: environmentId },\n name: 'ANTHROPIC_API_KEY',\n upstreamHost: 'api.anthropic.com',\n headerName: 'x-api-key',\n value: '<value>',\n },\n});\nconst solverSecretId = customerSecret.id;\n\n// Create the solver run-config identity, scoped to the evaluation's environment\nconst runConfig = await rl.runConfigs.create({\n body: {\n scope: { level: 'env', id: environmentId },\n type: 'agent-harness',\n name: 'Baseline solver',\n },\n});\nconst solverRunConfigVersionId = runConfig.initialVersionId;\n\n// Configure the solver draft: harness image, model, egress allowlist, and the secret declaration\nawait rl.runConfigVersions.update({\n runConfigVersionId: solverRunConfigVersionId,\n body: {\n config: { harnessImageUrl: 'us-central1-docker.pkg.dev/lb-ml-prod/agent-service/claude-code:latest', envVars: { ANTHROPIC_MODEL: 'claude-haiku-4-5-20251001' }, args: '--max-turns 30', allowedDomains: ['api.anthropic.com'], customerSecrets: [{ envVarName: 'ANTHROPIC_API_KEY' }], timeoutSeconds: 600 },\n },\n});\n\n// Attach the customer secret to the solver draft version\nawait rl.customerSecrets.attach({\n runConfigVersionId: solverRunConfigVersionId,\n customerSecretId: solverSecretId,\n});\n\n// Lock the verified solver version — only a locked version can be referenced as a solver\nawait rl.runConfigVersions.lock({\n runConfigVersionId: solverRunConfigVersionId,\n});\n\n// Provision the Anthropic API key as a customer secret for the grader\nconst customerSecret2 = await rl.customerSecrets.create({\n body: {\n scope: { level: 'env', id: environmentId },\n name: 'ANTHROPIC_API_KEY',\n upstreamHost: 'api.anthropic.com',\n headerName: 'x-api-key',\n value: '<value>',\n },\n});\nconst graderSecretId = customerSecret2.id;\n\n// Create the grader run-config identity, scoped to the evaluation's environment\nconst runConfig2 = await rl.runConfigs.create({\n body: {\n scope: { level: 'env', id: environmentId },\n type: 'agent-harness',\n name: 'Recipe grader',\n },\n});\nconst graderRunConfigVersionId = runConfig2.initialVersionId;\n\n// Configure the grader draft: harness image, model, egress allowlist, and the secret declaration\nawait rl.runConfigVersions.update({\n runConfigVersionId: graderRunConfigVersionId,\n body: {\n config: { harnessImageUrl: 'us-central1-docker.pkg.dev/lb-ml-prod/agent-service/claude-code:latest', args: '--model claude-haiku-4-5-20251001 --max-turns 10', allowedDomains: ['api.anthropic.com'], customerSecrets: [{ envVarName: 'ANTHROPIC_API_KEY' }], timeoutSeconds: 600 },\n },\n});\n\n// Attach the customer secret to the grader draft version\nawait rl.customerSecrets.attach({\n runConfigVersionId: graderRunConfigVersionId,\n customerSecretId: graderSecretId,\n});\n\n// Lock the verified grader version — only a locked version can be referenced as the grader\nawait rl.runConfigVersions.lock({\n runConfigVersionId: graderRunConfigVersionId,\n});",
9817
+ main: "// Set the task prompt and grade it against the rubric\nawait rl.problemVersions.update({\n problemVersionId,\n body: {\n prompt: 'What is the capital of Germany? Answer with just the city name.',\n gradingConfig: { type: 'rubric' },\n },\n});\n\n// Add a rubric to the version\nconst rubric = await rl.rubrics.create({\n problemVersionId,\n});\nconst rubricId = rubric.id;\n\n// Define the rubric criterion\nawait rl.rubrics.update({\n problemVersionId,\n rubricId,\n body: {\n criterion: 'The answer must be Berlin.',\n weight: 1,\n },\n});\n\n// Lock the version to make it runnable\nawait rl.problemVersions.lock({\n problemVersionId,\n});\n\n// Grade a solver run against the locked version\nconst problemRun = await rl.problemRuns.bulkCreate({\n body: {\n environmentId,\n name: 'Run to re-grade',\n problemVersionIds: [problemVersionId],\n nAttemptsPerProblem: 1,\n runConfigVersionIds: [solverRunConfigVersionId],\n graderRunConfigVersionId,\n },\n});\nconst problemRunId = problemRun.problemRunIds[0];\nif (problemRunId == null) throw new Error('problemRunId not found in the response (it may still be syncing) — retry');\n\n// Wait for the solver run to finish\nlet problemRun2;\nconst problemRun2Deadline = Date.now() + 900000;\nfor (;;) {\n problemRun2 = await rl.problemRuns.get({\n problemRunId,\n });\n if (['failed', 'cancelled'].includes(problemRun2.status)) throw new Error('reached a terminal failure state: ' + problemRun2.status);\n if (['grading', 'completed'].includes(problemRun2.status)) break;\n if (Date.now() > problemRun2Deadline) throw new Error('timed out after 900000ms waiting for a terminal state');\n await new Promise((resolve) => setTimeout(resolve, 5000));\n}\n\n// Wait for the first grade to finalize\nlet problemRun3;\nconst problemRun3Deadline = Date.now() + 900000;\nfor (;;) {\n problemRun3 = await rl.problemRuns.get({\n problemRunId,\n });\n if (['failed', 'cancelled'].includes(problemRun3.status)) throw new Error('reached a terminal failure state: ' + problemRun3.status);\n if (problemRun3.gradedAt != null) break;\n if (Date.now() > problemRun3Deadline) throw new Error('timed out after 900000ms waiting for a terminal state');\n await new Promise((resolve) => setTimeout(resolve, 5000));\n}\nconst initialScore = problemRun3.finalScore;\n\n// Re-grade the run without re-running the solver\nconst problemRun4 = await rl.problemRuns.regrade({\n problemRunId,\n});\nconst regradeJobV2Id = problemRun4.jobV2Id;\n\n// Wait for the re-grade to finish\nlet jobsV2;\nconst jobsV2Deadline = Date.now() + 900000;\nfor (;;) {\n jobsV2 = await rl.jobsV2.getForEnvironment({\n environmentId,\n jobV2Id: regradeJobV2Id,\n });\n if (['failed', 'cancelled'].includes(jobsV2.status)) throw new Error('reached a terminal failure state: ' + jobsV2.status);\n if (['completed'].includes(jobsV2.status)) break;\n if (Date.now() > jobsV2Deadline) throw new Error('timed out after 900000ms waiting for a terminal state');\n await new Promise((resolve) => setTimeout(resolve, 5000));\n}\n\n// Read the new grade\nconst problemRun5 = await rl.problemRuns.get({\n problemRunId,\n});\nconst regradedScore = problemRun5.finalScore;\n\n// Confirm the run records the re-grade\nconst problemRun6 = await rl.problemRuns.get({\n problemRunId,\n});\nconst regradeCount = problemRun6.regradeCount;",
9818
+ },
9819
+ cli: {
9820
+ setup: '# In Intelligence: Create a project in Intelligence (its rl-gym environment syncs automatically)\nPROJECT_ID=$(curl -s -X POST "https://app.labelbox.com/api/_gql" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"query\\": \\"mutation CreateProject(\\$data: ProjectCreateInput!) {\\\\n createProject(data: \\$data) {\\\\n id\\\\n }\\\\n}\\", \\"variables\\": { \\"data\\": { \\"name\\": \\"Recipe demo project\\", \\"allowedMediaType\\": \\"RL\\", \\"dataRowCount\\": 1 } } }" \\\n | jq -r \'.data.createProject.id\')\n\n# In Intelligence: Find the project\'s initial labeling queue (reserve a task from it)\nQUEUE_ID=$(curl -s -X POST "https://app.labelbox.com/api/_gql" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"query\\": \\"query ProjectTaskQueues(\\$project: WhereUniqueIdInput!) {\\\\n project(where: \\$project) {\\\\n taskQueues {\\\\n id\\\\n queueType\\\\n }\\\\n }\\\\n}\\", \\"variables\\": { \\"project\\": { \\"id\\": \\"$PROJECT_ID\\" } } }" \\\n | jq -r \'.data.project.taskQueues[] | select(.queueType == "INITIAL_LABELING_QUEUE") | .id\')\n\n# In Intelligence: Reserve a task to get a problem to author (data rows sync shortly after the project is created — retry until a task is returned)\nPROBLEM_ID=$(curl -s -X POST "https://app.labelbox.com/api/_gql" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"query\\": \\"mutation NextRlTask(\\$where: ReserveRlTaskInput!) {\\\\n nextRlTask(where: \\$where) {\\\\n task {\\\\n problem {\\\\n id\\\\n }\\\\n }\\\\n }\\\\n}\\", \\"variables\\": { \\"where\\": { \\"queueId\\": \\"$QUEUE_ID\\" } } }" \\\n | jq -r \'.data.nextRlTask.task.problem.id\')\n\n# Look up the reserved problem\'s environment\nENVIRONMENT_ID=$(rl problems get \\\n --problem-id "$PROBLEM_ID" \\\n | jq -r \'.environmentId\')\n\n# Open the draft version the reservation created\nPROBLEM_VERSION_ID=$(rl problem-versions list-for-problem \\\n --problem-id "$PROBLEM_ID" \\\n | jq -r \'.[0].id\')\n\n# Provision the Anthropic API key as a customer secret for the solver\nSOLVER_SECRET_ID=$(rl customer-secrets create \\\n --data "{ \\"scope\\": { \\"level\\": \\"env\\", \\"id\\": \\"$ENVIRONMENT_ID\\" }, \\"name\\": \\"ANTHROPIC_API_KEY\\", \\"upstreamHost\\": \\"api.anthropic.com\\", \\"headerName\\": \\"x-api-key\\", \\"value\\": \\"<value>\\" }" \\\n | jq -r \'.id\')\n\n# Create the solver run-config identity, scoped to the evaluation\'s environment\nSOLVER_RUN_CONFIG_VERSION_ID=$(rl run-configs create \\\n --data "{ \\"scope\\": { \\"level\\": \\"env\\", \\"id\\": \\"$ENVIRONMENT_ID\\" }, \\"type\\": \\"agent-harness\\", \\"name\\": \\"Baseline solver\\" }" \\\n | jq -r \'.initialVersionId\')\n\n# Configure the solver draft: harness image, model, egress allowlist, and the secret declaration\nrl run-config-versions update \\\n --run-config-version-id "$SOLVER_RUN_CONFIG_VERSION_ID" \\\n --data "{ \\"config\\": { \\"harnessImageUrl\\": \\"us-central1-docker.pkg.dev/lb-ml-prod/agent-service/claude-code:latest\\", \\"envVars\\": { \\"ANTHROPIC_MODEL\\": \\"claude-haiku-4-5-20251001\\" }, \\"args\\": \\"--max-turns 30\\", \\"allowedDomains\\": [\\"api.anthropic.com\\"], \\"customerSecrets\\": [{ \\"envVarName\\": \\"ANTHROPIC_API_KEY\\" }], \\"timeoutSeconds\\": 600 } }"\n\n# Attach the customer secret to the solver draft version\nrl customer-secrets attach \\\n --run-config-version-id "$SOLVER_RUN_CONFIG_VERSION_ID" \\\n --customer-secret-id "$SOLVER_SECRET_ID"\n\n# Lock the verified solver version — only a locked version can be referenced as a solver\nrl run-config-versions lock \\\n --run-config-version-id "$SOLVER_RUN_CONFIG_VERSION_ID"\n\n# Provision the Anthropic API key as a customer secret for the grader\nGRADER_SECRET_ID=$(rl customer-secrets create \\\n --data "{ \\"scope\\": { \\"level\\": \\"env\\", \\"id\\": \\"$ENVIRONMENT_ID\\" }, \\"name\\": \\"ANTHROPIC_API_KEY\\", \\"upstreamHost\\": \\"api.anthropic.com\\", \\"headerName\\": \\"x-api-key\\", \\"value\\": \\"<value>\\" }" \\\n | jq -r \'.id\')\n\n# Create the grader run-config identity, scoped to the evaluation\'s environment\nGRADER_RUN_CONFIG_VERSION_ID=$(rl run-configs create \\\n --data "{ \\"scope\\": { \\"level\\": \\"env\\", \\"id\\": \\"$ENVIRONMENT_ID\\" }, \\"type\\": \\"agent-harness\\", \\"name\\": \\"Recipe grader\\" }" \\\n | jq -r \'.initialVersionId\')\n\n# Configure the grader draft: harness image, model, egress allowlist, and the secret declaration\nrl run-config-versions update \\\n --run-config-version-id "$GRADER_RUN_CONFIG_VERSION_ID" \\\n --data "{ \\"config\\": { \\"harnessImageUrl\\": \\"us-central1-docker.pkg.dev/lb-ml-prod/agent-service/claude-code:latest\\", \\"args\\": \\"--model claude-haiku-4-5-20251001 --max-turns 10\\", \\"allowedDomains\\": [\\"api.anthropic.com\\"], \\"customerSecrets\\": [{ \\"envVarName\\": \\"ANTHROPIC_API_KEY\\" }], \\"timeoutSeconds\\": 600 } }"\n\n# Attach the customer secret to the grader draft version\nrl customer-secrets attach \\\n --run-config-version-id "$GRADER_RUN_CONFIG_VERSION_ID" \\\n --customer-secret-id "$GRADER_SECRET_ID"\n\n# Lock the verified grader version — only a locked version can be referenced as the grader\nrl run-config-versions lock \\\n --run-config-version-id "$GRADER_RUN_CONFIG_VERSION_ID"',
9821
+ main: '# Set the task prompt and grade it against the rubric\nrl problem-versions update \\\n --problem-version-id "$PROBLEM_VERSION_ID" \\\n --data "{ \\"prompt\\": \\"What is the capital of Germany? Answer with just the city name.\\", \\"gradingConfig\\": { \\"type\\": \\"rubric\\" } }"\n\n# Add a rubric to the version\nRUBRIC_ID=$(rl rubrics create \\\n --problem-version-id "$PROBLEM_VERSION_ID" \\\n | jq -r \'.id\')\n\n# Define the rubric criterion\nrl rubrics update \\\n --problem-version-id "$PROBLEM_VERSION_ID" \\\n --rubric-id "$RUBRIC_ID" \\\n --data "{ \\"criterion\\": \\"The answer must be Berlin.\\", \\"weight\\": 1 }"\n\n# Lock the version to make it runnable\nrl problem-versions lock \\\n --problem-version-id "$PROBLEM_VERSION_ID"\n\n# Grade a solver run against the locked version\nPROBLEM_RUN_ID=$(rl problem-runs bulk-create \\\n --data "{ \\"environmentId\\": \\"$ENVIRONMENT_ID\\", \\"name\\": \\"Run to re-grade\\", \\"problemVersionIds\\": [\\"$PROBLEM_VERSION_ID\\"], \\"nAttemptsPerProblem\\": 1, \\"runConfigVersionIds\\": [\\"$SOLVER_RUN_CONFIG_VERSION_ID\\"], \\"graderRunConfigVersionId\\": \\"$GRADER_RUN_CONFIG_VERSION_ID\\" }" \\\n | jq -r \'.problemRunIds[0]\')\n\n# Wait for the solver run to finish\ndeadline=$(( $(date +%s) + 900 ))\nwhile :; do\n response=$(rl problem-runs get \\\n --problem-run-id "$PROBLEM_RUN_ID")\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in failed|cancelled) echo "reached a terminal failure state: $response" >&2; exit 1 ;; esac\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in grading|completed) break ;; esac\n [ "$(date +%s)" -ge "$deadline" ] && { echo "timed out waiting for a terminal state" >&2; exit 1; }\n sleep 5\ndone\n\n# Wait for the first grade to finalize\ndeadline=$(( $(date +%s) + 900 ))\nwhile :; do\n response=$(rl problem-runs get \\\n --problem-run-id "$PROBLEM_RUN_ID")\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in failed|cancelled) echo "reached a terminal failure state: $response" >&2; exit 1 ;; esac\n printf \'%s\' "$response" | jq -e \'.gradedAt != null\' >/dev/null && { break; }\n [ "$(date +%s)" -ge "$deadline" ] && { echo "timed out waiting for a terminal state" >&2; exit 1; }\n sleep 5\ndone\nINITIAL_SCORE=$(printf \'%s\' "$response" | jq -r \'.finalScore\')\n\n# Re-grade the run without re-running the solver\nREGRADE_JOB_V2_ID=$(rl problem-runs regrade \\\n --problem-run-id "$PROBLEM_RUN_ID" \\\n | jq -r \'.jobV2Id\')\n\n# Wait for the re-grade to finish\ndeadline=$(( $(date +%s) + 900 ))\nwhile :; do\n response=$(rl jobs-v2 get-for-environment \\\n --environment-id "$ENVIRONMENT_ID" \\\n --job-v2-id "$REGRADE_JOB_V2_ID")\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in failed|cancelled) echo "reached a terminal failure state: $response" >&2; exit 1 ;; esac\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in completed) break ;; esac\n [ "$(date +%s)" -ge "$deadline" ] && { echo "timed out waiting for a terminal state" >&2; exit 1; }\n sleep 5\ndone\n\n# Read the new grade\nREGRADED_SCORE=$(rl problem-runs get \\\n --problem-run-id "$PROBLEM_RUN_ID" \\\n | jq -r \'.finalScore\')\n\n# Confirm the run records the re-grade\nREGRADE_COUNT=$(rl problem-runs get \\\n --problem-run-id "$PROBLEM_RUN_ID" \\\n | jq -r \'.regradeCount\')',
9822
+ },
9823
+ curl: {
9824
+ setup: '# In Intelligence: Create a project in Intelligence (its rl-gym environment syncs automatically)\nPROJECT_ID=$(curl -s -X POST "https://app.labelbox.com/api/_gql" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"query\\": \\"mutation CreateProject(\\$data: ProjectCreateInput!) {\\\\n createProject(data: \\$data) {\\\\n id\\\\n }\\\\n}\\", \\"variables\\": { \\"data\\": { \\"name\\": \\"Recipe demo project\\", \\"allowedMediaType\\": \\"RL\\", \\"dataRowCount\\": 1 } } }" \\\n | jq -r \'.data.createProject.id\')\n\n# In Intelligence: Find the project\'s initial labeling queue (reserve a task from it)\nQUEUE_ID=$(curl -s -X POST "https://app.labelbox.com/api/_gql" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"query\\": \\"query ProjectTaskQueues(\\$project: WhereUniqueIdInput!) {\\\\n project(where: \\$project) {\\\\n taskQueues {\\\\n id\\\\n queueType\\\\n }\\\\n }\\\\n}\\", \\"variables\\": { \\"project\\": { \\"id\\": \\"$PROJECT_ID\\" } } }" \\\n | jq -r \'.data.project.taskQueues[] | select(.queueType == "INITIAL_LABELING_QUEUE") | .id\')\n\n# In Intelligence: Reserve a task to get a problem to author (data rows sync shortly after the project is created — retry until a task is returned)\nPROBLEM_ID=$(curl -s -X POST "https://app.labelbox.com/api/_gql" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"query\\": \\"mutation NextRlTask(\\$where: ReserveRlTaskInput!) {\\\\n nextRlTask(where: \\$where) {\\\\n task {\\\\n problem {\\\\n id\\\\n }\\\\n }\\\\n }\\\\n}\\", \\"variables\\": { \\"where\\": { \\"queueId\\": \\"$QUEUE_ID\\" } } }" \\\n | jq -r \'.data.nextRlTask.task.problem.id\')\n\n# Look up the reserved problem\'s environment\nENVIRONMENT_ID=$(curl -s -X GET "https://api.recursion.labelbox.com/v1/problems/$PROBLEM_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n | jq -r \'.environmentId\')\n\n# Open the draft version the reservation created\nPROBLEM_VERSION_ID=$(curl -s -X GET "https://api.recursion.labelbox.com/v1/problems/$PROBLEM_ID/versions" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n | jq -r \'.[0].id\')\n\n# Provision the Anthropic API key as a customer secret for the solver\nSOLVER_SECRET_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/v1/customer-secrets" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"scope\\": { \\"level\\": \\"env\\", \\"id\\": \\"$ENVIRONMENT_ID\\" }, \\"name\\": \\"ANTHROPIC_API_KEY\\", \\"upstreamHost\\": \\"api.anthropic.com\\", \\"headerName\\": \\"x-api-key\\", \\"value\\": \\"<value>\\" }" \\\n | jq -r \'.id\')\n\n# Create the solver run-config identity, scoped to the evaluation\'s environment\nSOLVER_RUN_CONFIG_VERSION_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/v1/run-configs" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"scope\\": { \\"level\\": \\"env\\", \\"id\\": \\"$ENVIRONMENT_ID\\" }, \\"type\\": \\"agent-harness\\", \\"name\\": \\"Baseline solver\\" }" \\\n | jq -r \'.initialVersionId\')\n\n# Configure the solver draft: harness image, model, egress allowlist, and the secret declaration\ncurl -s -X PATCH "https://api.recursion.labelbox.com/v1/run-config-versions/$SOLVER_RUN_CONFIG_VERSION_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"config\\": { \\"harnessImageUrl\\": \\"us-central1-docker.pkg.dev/lb-ml-prod/agent-service/claude-code:latest\\", \\"envVars\\": { \\"ANTHROPIC_MODEL\\": \\"claude-haiku-4-5-20251001\\" }, \\"args\\": \\"--max-turns 30\\", \\"allowedDomains\\": [\\"api.anthropic.com\\"], \\"customerSecrets\\": [{ \\"envVarName\\": \\"ANTHROPIC_API_KEY\\" }], \\"timeoutSeconds\\": 600 } }"\n\n# Attach the customer secret to the solver draft version\ncurl -s -X POST "https://api.recursion.labelbox.com/v1/run-config-versions/$SOLVER_RUN_CONFIG_VERSION_ID/customer-secrets/$SOLVER_SECRET_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY"\n\n# Lock the verified solver version — only a locked version can be referenced as a solver\ncurl -s -X POST "https://api.recursion.labelbox.com/v1/run-config-versions/$SOLVER_RUN_CONFIG_VERSION_ID/lock" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY"\n\n# Provision the Anthropic API key as a customer secret for the grader\nGRADER_SECRET_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/v1/customer-secrets" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"scope\\": { \\"level\\": \\"env\\", \\"id\\": \\"$ENVIRONMENT_ID\\" }, \\"name\\": \\"ANTHROPIC_API_KEY\\", \\"upstreamHost\\": \\"api.anthropic.com\\", \\"headerName\\": \\"x-api-key\\", \\"value\\": \\"<value>\\" }" \\\n | jq -r \'.id\')\n\n# Create the grader run-config identity, scoped to the evaluation\'s environment\nGRADER_RUN_CONFIG_VERSION_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/v1/run-configs" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"scope\\": { \\"level\\": \\"env\\", \\"id\\": \\"$ENVIRONMENT_ID\\" }, \\"type\\": \\"agent-harness\\", \\"name\\": \\"Recipe grader\\" }" \\\n | jq -r \'.initialVersionId\')\n\n# Configure the grader draft: harness image, model, egress allowlist, and the secret declaration\ncurl -s -X PATCH "https://api.recursion.labelbox.com/v1/run-config-versions/$GRADER_RUN_CONFIG_VERSION_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"config\\": { \\"harnessImageUrl\\": \\"us-central1-docker.pkg.dev/lb-ml-prod/agent-service/claude-code:latest\\", \\"args\\": \\"--model claude-haiku-4-5-20251001 --max-turns 10\\", \\"allowedDomains\\": [\\"api.anthropic.com\\"], \\"customerSecrets\\": [{ \\"envVarName\\": \\"ANTHROPIC_API_KEY\\" }], \\"timeoutSeconds\\": 600 } }"\n\n# Attach the customer secret to the grader draft version\ncurl -s -X POST "https://api.recursion.labelbox.com/v1/run-config-versions/$GRADER_RUN_CONFIG_VERSION_ID/customer-secrets/$GRADER_SECRET_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY"\n\n# Lock the verified grader version — only a locked version can be referenced as the grader\ncurl -s -X POST "https://api.recursion.labelbox.com/v1/run-config-versions/$GRADER_RUN_CONFIG_VERSION_ID/lock" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY"',
9825
+ main: '# Set the task prompt and grade it against the rubric\ncurl -s -X PATCH "https://api.recursion.labelbox.com/v1/versions/$PROBLEM_VERSION_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"prompt\\": \\"What is the capital of Germany? Answer with just the city name.\\", \\"gradingConfig\\": { \\"type\\": \\"rubric\\" } }"\n\n# Add a rubric to the version\nRUBRIC_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/v1/versions/$PROBLEM_VERSION_ID/rubrics" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n | jq -r \'.id\')\n\n# Define the rubric criterion\ncurl -s -X PATCH "https://api.recursion.labelbox.com/v1/versions/$PROBLEM_VERSION_ID/rubrics/$RUBRIC_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"criterion\\": \\"The answer must be Berlin.\\", \\"weight\\": 1 }"\n\n# Lock the version to make it runnable\ncurl -s -X PUT "https://api.recursion.labelbox.com/v1/versions/$PROBLEM_VERSION_ID/lock" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY"\n\n# Grade a solver run against the locked version\nPROBLEM_RUN_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/v1/problem-runs/bulk" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n -H "Content-Type: application/json" \\\n -d "{ \\"environmentId\\": \\"$ENVIRONMENT_ID\\", \\"name\\": \\"Run to re-grade\\", \\"problemVersionIds\\": [\\"$PROBLEM_VERSION_ID\\"], \\"nAttemptsPerProblem\\": 1, \\"runConfigVersionIds\\": [\\"$SOLVER_RUN_CONFIG_VERSION_ID\\"], \\"graderRunConfigVersionId\\": \\"$GRADER_RUN_CONFIG_VERSION_ID\\" }" \\\n | jq -r \'.problemRunIds[0]\')\n\n# Wait for the solver run to finish\ndeadline=$(( $(date +%s) + 900 ))\nwhile :; do\n response=$(curl -s -X GET "https://api.recursion.labelbox.com/v1/problem-runs/$PROBLEM_RUN_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY")\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in failed|cancelled) echo "reached a terminal failure state: $response" >&2; exit 1 ;; esac\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in grading|completed) break ;; esac\n [ "$(date +%s)" -ge "$deadline" ] && { echo "timed out waiting for a terminal state" >&2; exit 1; }\n sleep 5\ndone\n\n# Wait for the first grade to finalize\ndeadline=$(( $(date +%s) + 900 ))\nwhile :; do\n response=$(curl -s -X GET "https://api.recursion.labelbox.com/v1/problem-runs/$PROBLEM_RUN_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY")\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in failed|cancelled) echo "reached a terminal failure state: $response" >&2; exit 1 ;; esac\n printf \'%s\' "$response" | jq -e \'.gradedAt != null\' >/dev/null && { break; }\n [ "$(date +%s)" -ge "$deadline" ] && { echo "timed out waiting for a terminal state" >&2; exit 1; }\n sleep 5\ndone\nINITIAL_SCORE=$(printf \'%s\' "$response" | jq -r \'.finalScore\')\n\n# Re-grade the run without re-running the solver\nREGRADE_JOB_V2_ID=$(curl -s -X POST "https://api.recursion.labelbox.com/v1/problem-runs/$PROBLEM_RUN_ID/regrade" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n | jq -r \'.jobV2Id\')\n\n# Wait for the re-grade to finish\ndeadline=$(( $(date +%s) + 900 ))\nwhile :; do\n response=$(curl -s -X GET "https://api.recursion.labelbox.com/v1/environments/$ENVIRONMENT_ID/jobs-v2/$REGRADE_JOB_V2_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY")\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in failed|cancelled) echo "reached a terminal failure state: $response" >&2; exit 1 ;; esac\n case "$(printf \'%s\' "$response" | jq -r \'.status\')" in completed) break ;; esac\n [ "$(date +%s)" -ge "$deadline" ] && { echo "timed out waiting for a terminal state" >&2; exit 1; }\n sleep 5\ndone\n\n# Read the new grade\nREGRADED_SCORE=$(curl -s -X GET "https://api.recursion.labelbox.com/v1/problem-runs/$PROBLEM_RUN_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n | jq -r \'.finalScore\')\n\n# Confirm the run records the re-grade\nREGRADE_COUNT=$(curl -s -X GET "https://api.recursion.labelbox.com/v1/problem-runs/$PROBLEM_RUN_ID" \\\n -H "Authorization: Bearer $LABELBOX_API_KEY" \\\n | jq -r \'.regradeCount\')',
9826
+ },
9827
+ related: {
9828
+ requires: [
9829
+ {
9830
+ type: 'state',
9831
+ explanation: 'a project with data rows exists to reserve a problem from',
9832
+ via: {
9833
+ type: 'recipe',
9834
+ id: 'create-a-project-with-data-rows',
9835
+ },
9836
+ },
9837
+ ],
9838
+ learnMore: [
9839
+ {
9840
+ type: 'concept',
9841
+ id: 're-grading-runs',
9842
+ },
9843
+ {
9844
+ type: 'concept',
9845
+ id: 'how-grading-works',
9846
+ },
9847
+ ],
9848
+ },
9849
+ },
9278
9850
  'remove-a-cost-limit': {
9279
9851
  id: 'remove-a-cost-limit',
9280
9852
  title: 'Remove a cost limit',
@@ -17613,8 +17613,8 @@ export const SDK_REFERENCE = {
17613
17613
  name: 'maxImportFileSizeBytes',
17614
17614
  required: true,
17615
17615
  type: 'integer',
17616
- description: 'Per-environment maximum import file size in bytes; null means the platform default is in effect.',
17617
- example: 104857600,
17616
+ description: 'Platform import-file ceiling in bytes derived from the import worker memory limit; null means no platform ceiling is available.',
17617
+ example: 5726623061,
17618
17618
  nullable: true,
17619
17619
  exclusiveMinimum: 0,
17620
17620
  maximum: 9007199254740991,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@labelbox/recursion-sdk",
3
- "version": "0.0.171",
3
+ "version": "0.0.173",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",