@claudexor/schema 3.1.1 → 3.1.2

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.
Files changed (85) hide show
  1. package/dist/agent-capabilities.d.ts +89 -1
  2. package/dist/agent-capabilities.d.ts.map +1 -1
  3. package/dist/agent-capabilities.js +5 -0
  4. package/dist/agent-capabilities.js.map +1 -1
  5. package/dist/apply-eligibility.d.ts +102 -0
  6. package/dist/apply-eligibility.d.ts.map +1 -1
  7. package/dist/apply-eligibility.js +17 -0
  8. package/dist/apply-eligibility.js.map +1 -1
  9. package/dist/budget.d.ts +4 -4
  10. package/dist/budget.d.ts.map +1 -1
  11. package/dist/budget.js +2 -0
  12. package/dist/budget.js.map +1 -1
  13. package/dist/control-operation-responses.d.ts +133 -29
  14. package/dist/control-operation-responses.d.ts.map +1 -1
  15. package/dist/control-operation-responses.js +25 -0
  16. package/dist/control-operation-responses.js.map +1 -1
  17. package/dist/control-run-detail.d.ts +1405 -197
  18. package/dist/control-run-detail.d.ts.map +1 -1
  19. package/dist/control-run-detail.js +6 -0
  20. package/dist/control-run-detail.js.map +1 -1
  21. package/dist/control-run-retry.d.ts +2 -2
  22. package/dist/control.d.ts +351 -79
  23. package/dist/control.d.ts.map +1 -1
  24. package/dist/control.js +23 -28
  25. package/dist/control.js.map +1 -1
  26. package/dist/decision.d.ts +5 -0
  27. package/dist/decision.d.ts.map +1 -1
  28. package/dist/decision.js +7 -3
  29. package/dist/decision.js.map +1 -1
  30. package/dist/delegation.d.ts +73 -0
  31. package/dist/delegation.d.ts.map +1 -0
  32. package/dist/delegation.js +120 -0
  33. package/dist/delegation.js.map +1 -0
  34. package/dist/events.d.ts +4 -4
  35. package/dist/events.d.ts.map +1 -1
  36. package/dist/events.js +3 -0
  37. package/dist/events.js.map +1 -1
  38. package/dist/harness.d.ts +15 -15
  39. package/dist/harness.d.ts.map +1 -1
  40. package/dist/harness.js +10 -14
  41. package/dist/harness.js.map +1 -1
  42. package/dist/index.d.ts +1 -0
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +1 -0
  45. package/dist/index.js.map +1 -1
  46. package/dist/readiness.d.ts +38 -0
  47. package/dist/readiness.d.ts.map +1 -1
  48. package/dist/readiness.js +4 -0
  49. package/dist/readiness.js.map +1 -1
  50. package/dist/request-requirements.d.ts +7 -7
  51. package/dist/request-requirements.d.ts.map +1 -1
  52. package/dist/request-requirements.js +2 -1
  53. package/dist/request-requirements.js.map +1 -1
  54. package/dist/task.d.ts +42 -0
  55. package/dist/task.d.ts.map +1 -1
  56. package/dist/task.js +11 -0
  57. package/dist/task.js.map +1 -1
  58. package/dist/telemetry.d.ts +87 -49
  59. package/dist/telemetry.d.ts.map +1 -1
  60. package/dist/telemetry.js +6 -9
  61. package/dist/telemetry.js.map +1 -1
  62. package/dist/workspace.d.ts +1 -1
  63. package/dist/workspace.js +7 -7
  64. package/dist/workspace.js.map +1 -1
  65. package/generated/AgentCapabilityCatalog.schema.json +39 -1
  66. package/generated/ControlHarnessListResponse.schema.json +48 -2
  67. package/generated/ControlRunAgainDraft.schema.json +6 -2
  68. package/generated/ControlRunControlResponse.schema.json +8 -0
  69. package/generated/ControlRunDetail.schema.json +116 -14
  70. package/generated/ControlRunListResponse.schema.json +93 -9
  71. package/generated/ControlRunStartRequest.schema.json +6 -2
  72. package/generated/ControlRunSummary.schema.json +93 -9
  73. package/generated/ControlThreadDetail.schema.json +64 -0
  74. package/generated/ControlThreadTurnRequest.schema.json +1 -1
  75. package/generated/DecisionRecord.schema.json +10 -1
  76. package/generated/HarnessManifest.schema.json +2 -2
  77. package/generated/HarnessStatusDto.schema.json +48 -2
  78. package/generated/McpRunHandleResult.schema.json +72 -1
  79. package/generated/McpRunToolResult.schema.json +69 -0
  80. package/generated/RunEvent.schema.json +1 -0
  81. package/generated/RunFailure.schema.json +4 -3
  82. package/generated/RunTelemetry.schema.json +61 -2
  83. package/generated/TaskContract.schema.json +43 -3
  84. package/generated/WorkspaceEnvelope.schema.json +6 -6
  85. package/package.json +2 -2
package/dist/control.d.ts CHANGED
@@ -164,6 +164,7 @@ export declare const ControlRunStartRequest: z.ZodObject<{
164
164
  * lineage; POST /threads/:id/turns is the public turn surface. */
165
165
  turnId: z.ZodOptional<z.ZodString>;
166
166
  parentRunId: z.ZodOptional<z.ZodString>;
167
+ delegatedFromRunId: z.ZodOptional<z.ZodString>;
167
168
  retryOf: z.ZodOptional<z.ZodString>;
168
169
  /** When set, this turn implements an approved plan (mode is forced to
169
170
  * agent); the plan is DELIVERED AS A FILE (planRef), never re-embedded
@@ -216,8 +217,9 @@ export declare const ControlRunStartRequest: z.ZodObject<{
216
217
  * routed harness declares `capability_profile.mcp_injection`, the engine
217
218
  * injects the scoped Claudexor delegation belt (ask/plan/isolated sub-run/
218
219
  * best-of/status/result) into the harness sandbox so the harness can spawn
219
- * bounded isolated sub-runs. Refused (typed preflight) on a non-agent mode
220
- * or a harness that cannot inject. Default off. */
220
+ * bounded isolated sub-runs. A known unavailable belt or incapable harness
221
+ * degrades before start to ordinary Agent with a durable warning; a
222
+ * non-agent mode still refuses the incoherent strategy flag. Default off. */
221
223
  delegate: z.ZodOptional<z.ZodBoolean>;
222
224
  /** Hard wall-clock deadline for the WHOLE run, measured from scheduler
223
225
  * start. On expiry the run is cooperatively cancelled (hard-kill fallback)
@@ -272,6 +274,9 @@ export declare const ControlRunStartRequest: z.ZodObject<{
272
274
  sha256: string;
273
275
  runId: string;
274
276
  } | undefined;
277
+ retryOf?: string | undefined;
278
+ parentRunId?: string | undefined;
279
+ delegatedFromRunId?: string | undefined;
275
280
  models?: Record<string, string> | undefined;
276
281
  harnesses?: string[] | undefined;
277
282
  model?: string | undefined;
@@ -282,7 +287,6 @@ export declare const ControlRunStartRequest: z.ZodObject<{
282
287
  envAllowlist: string[];
283
288
  cwd?: string | undefined;
284
289
  }[] | undefined;
285
- retryOf?: string | undefined;
286
290
  primaryHarness?: string | undefined;
287
291
  routingGoal?: "auto" | "quality" | "economy" | undefined;
288
292
  efforts?: Record<string, string> | undefined;
@@ -306,7 +310,6 @@ export declare const ControlRunStartRequest: z.ZodObject<{
306
310
  path: string;
307
311
  reason?: string | undefined;
308
312
  }[] | undefined;
309
- parentRunId?: string | undefined;
310
313
  reviewerPanel?: {
311
314
  harness: string;
312
315
  model?: string | undefined;
@@ -337,6 +340,9 @@ export declare const ControlRunStartRequest: z.ZodObject<{
337
340
  sha256: string;
338
341
  runId: string;
339
342
  } | undefined;
343
+ retryOf?: string | undefined;
344
+ parentRunId?: string | undefined;
345
+ delegatedFromRunId?: string | undefined;
340
346
  models?: Record<string, string> | undefined;
341
347
  harnesses?: string[] | undefined;
342
348
  model?: string | undefined;
@@ -347,7 +353,6 @@ export declare const ControlRunStartRequest: z.ZodObject<{
347
353
  cwd?: string | undefined;
348
354
  envAllowlist?: string[] | undefined;
349
355
  }[] | undefined;
350
- retryOf?: string | undefined;
351
356
  scope?: {
352
357
  kind: "project";
353
358
  root: string;
@@ -381,7 +386,6 @@ export declare const ControlRunStartRequest: z.ZodObject<{
381
386
  path: string;
382
387
  reason?: string | undefined;
383
388
  }[] | undefined;
384
- parentRunId?: string | undefined;
385
389
  reviewerPanel?: {
386
390
  harness: string;
387
391
  model?: string | undefined;
@@ -422,13 +426,13 @@ export declare const ControlRunRetryResponse: z.ZodObject<{
422
426
  }, "strict", z.ZodTypeAny, {
423
427
  state: string;
424
428
  turnId: string | null;
429
+ retryOf: string;
425
430
  jobId: string;
426
431
  runId: string | null;
427
- retryOf: string;
428
432
  }, {
429
433
  state: string;
430
- jobId: string;
431
434
  retryOf: string;
435
+ jobId: string;
432
436
  turnId?: string | null | undefined;
433
437
  runId?: string | null | undefined;
434
438
  }>;
@@ -572,6 +576,7 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
572
576
  * lineage; POST /threads/:id/turns is the public turn surface. */
573
577
  turnId: z.ZodOptional<z.ZodString>;
574
578
  parentRunId: z.ZodOptional<z.ZodString>;
579
+ delegatedFromRunId: z.ZodOptional<z.ZodString>;
575
580
  retryOf: z.ZodOptional<z.ZodString>;
576
581
  /** When set, this turn implements an approved plan (mode is forced to
577
582
  * agent); the plan is DELIVERED AS A FILE (planRef), never re-embedded
@@ -624,8 +629,9 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
624
629
  * routed harness declares `capability_profile.mcp_injection`, the engine
625
630
  * injects the scoped Claudexor delegation belt (ask/plan/isolated sub-run/
626
631
  * best-of/status/result) into the harness sandbox so the harness can spawn
627
- * bounded isolated sub-runs. Refused (typed preflight) on a non-agent mode
628
- * or a harness that cannot inject. Default off. */
632
+ * bounded isolated sub-runs. A known unavailable belt or incapable harness
633
+ * degrades before start to ordinary Agent with a durable warning; a
634
+ * non-agent mode still refuses the incoherent strategy flag. Default off. */
629
635
  delegate: z.ZodOptional<z.ZodBoolean>;
630
636
  /** Hard wall-clock deadline for the WHOLE run, measured from scheduler
631
637
  * start. On expiry the run is cooperatively cancelled (hard-kill fallback)
@@ -680,6 +686,9 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
680
686
  sha256: string;
681
687
  runId: string;
682
688
  } | undefined;
689
+ retryOf?: string | undefined;
690
+ parentRunId?: string | undefined;
691
+ delegatedFromRunId?: string | undefined;
683
692
  models?: Record<string, string> | undefined;
684
693
  harnesses?: string[] | undefined;
685
694
  model?: string | undefined;
@@ -690,7 +699,6 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
690
699
  envAllowlist: string[];
691
700
  cwd?: string | undefined;
692
701
  }[] | undefined;
693
- retryOf?: string | undefined;
694
702
  primaryHarness?: string | undefined;
695
703
  routingGoal?: "auto" | "quality" | "economy" | undefined;
696
704
  efforts?: Record<string, string> | undefined;
@@ -714,7 +722,6 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
714
722
  path: string;
715
723
  reason?: string | undefined;
716
724
  }[] | undefined;
717
- parentRunId?: string | undefined;
718
725
  reviewerPanel?: {
719
726
  harness: string;
720
727
  model?: string | undefined;
@@ -745,6 +752,9 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
745
752
  sha256: string;
746
753
  runId: string;
747
754
  } | undefined;
755
+ retryOf?: string | undefined;
756
+ parentRunId?: string | undefined;
757
+ delegatedFromRunId?: string | undefined;
748
758
  models?: Record<string, string> | undefined;
749
759
  harnesses?: string[] | undefined;
750
760
  model?: string | undefined;
@@ -755,7 +765,6 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
755
765
  cwd?: string | undefined;
756
766
  envAllowlist?: string[] | undefined;
757
767
  }[] | undefined;
758
- retryOf?: string | undefined;
759
768
  scope?: {
760
769
  kind: "project";
761
770
  root: string;
@@ -789,7 +798,6 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
789
798
  path: string;
790
799
  reason?: string | undefined;
791
800
  }[] | undefined;
792
- parentRunId?: string | undefined;
793
801
  reviewerPanel?: {
794
802
  harness: string;
795
803
  model?: string | undefined;
@@ -846,6 +854,9 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
846
854
  sha256: string;
847
855
  runId: string;
848
856
  } | undefined;
857
+ retryOf?: string | undefined;
858
+ parentRunId?: string | undefined;
859
+ delegatedFromRunId?: string | undefined;
849
860
  models?: Record<string, string> | undefined;
850
861
  harnesses?: string[] | undefined;
851
862
  model?: string | undefined;
@@ -856,7 +867,6 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
856
867
  envAllowlist: string[];
857
868
  cwd?: string | undefined;
858
869
  }[] | undefined;
859
- retryOf?: string | undefined;
860
870
  primaryHarness?: string | undefined;
861
871
  routingGoal?: "auto" | "quality" | "economy" | undefined;
862
872
  efforts?: Record<string, string> | undefined;
@@ -880,7 +890,6 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
880
890
  path: string;
881
891
  reason?: string | undefined;
882
892
  }[] | undefined;
883
- parentRunId?: string | undefined;
884
893
  reviewerPanel?: {
885
894
  harness: string;
886
895
  model?: string | undefined;
@@ -919,6 +928,9 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
919
928
  sha256: string;
920
929
  runId: string;
921
930
  } | undefined;
931
+ retryOf?: string | undefined;
932
+ parentRunId?: string | undefined;
933
+ delegatedFromRunId?: string | undefined;
922
934
  models?: Record<string, string> | undefined;
923
935
  harnesses?: string[] | undefined;
924
936
  model?: string | undefined;
@@ -929,7 +941,6 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
929
941
  cwd?: string | undefined;
930
942
  envAllowlist?: string[] | undefined;
931
943
  }[] | undefined;
932
- retryOf?: string | undefined;
933
944
  scope?: {
934
945
  kind: "project";
935
946
  root: string;
@@ -963,7 +974,6 @@ export declare const ControlRunAgainDraft: z.ZodObject<{
963
974
  path: string;
964
975
  reason?: string | undefined;
965
976
  }[] | undefined;
966
- parentRunId?: string | undefined;
967
977
  reviewerPanel?: {
968
978
  harness: string;
969
979
  model?: string | undefined;
@@ -999,12 +1009,12 @@ export declare const ControlQueuedRunInfo: z.ZodObject<{
999
1009
  error?: string | undefined;
1000
1010
  }>;
1001
1011
  export type ControlQueuedRunInfo = z.infer<typeof ControlQueuedRunInfo>;
1002
- export declare const RunFailureCode: z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable"]>;
1012
+ export declare const RunFailureCode: z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout"]>;
1003
1013
  export type RunFailureCode = z.infer<typeof RunFailureCode>;
1004
1014
  export declare const RunFailure: z.ZodObject<{
1005
1015
  phase: z.ZodDefault<z.ZodString>;
1006
1016
  category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "config_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
1007
- code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable"]>>>;
1017
+ code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout"]>>>;
1008
1018
  harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1009
1019
  attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1010
1020
  safeMessage: z.ZodString;
@@ -1014,7 +1024,7 @@ export declare const RunFailure: z.ZodObject<{
1014
1024
  runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1015
1025
  nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1016
1026
  }, "strip", z.ZodTypeAny, {
1017
- code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null;
1027
+ code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | "delegation_child_drain_timeout" | null;
1018
1028
  harnessId: string | null;
1019
1029
  attemptId: string | null;
1020
1030
  runDir: string | null;
@@ -1027,7 +1037,7 @@ export declare const RunFailure: z.ZodObject<{
1027
1037
  nextActions: string[];
1028
1038
  }, {
1029
1039
  safeMessage: string;
1030
- code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null | undefined;
1040
+ code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | "delegation_child_drain_timeout" | null | undefined;
1031
1041
  harnessId?: string | null | undefined;
1032
1042
  attemptId?: string | null | undefined;
1033
1043
  runDir?: string | null | undefined;
@@ -1214,6 +1224,39 @@ export type ControlRunResult = z.infer<typeof ControlRunResult>;
1214
1224
  export declare const ControlRunSummary: z.ZodObject<{
1215
1225
  jobId: z.ZodString;
1216
1226
  runId: z.ZodString;
1227
+ parentRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1228
+ delegatedFromRunId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1229
+ delegation: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodObject<{
1230
+ requested: z.ZodDefault<z.ZodBoolean>;
1231
+ effective: z.ZodDefault<z.ZodBoolean>;
1232
+ used: z.ZodDefault<z.ZodBoolean>;
1233
+ reason: z.ZodDefault<z.ZodEnum<["pending", "not_requested", "injected_unused", "used", "runtime_unavailable", "manifest_unsupported", "access_profile_incompatible", "partially_degraded", "startup_failed"]>>;
1234
+ remediation: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1235
+ }, "strict", z.ZodTypeAny, {
1236
+ requested: boolean;
1237
+ effective: boolean;
1238
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
1239
+ remediation: string | null;
1240
+ used: boolean;
1241
+ }, {
1242
+ requested?: boolean | undefined;
1243
+ effective?: boolean | undefined;
1244
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
1245
+ remediation?: string | null | undefined;
1246
+ used?: boolean | undefined;
1247
+ }>, {
1248
+ requested: boolean;
1249
+ effective: boolean;
1250
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
1251
+ remediation: string | null;
1252
+ used: boolean;
1253
+ }, {
1254
+ requested?: boolean | undefined;
1255
+ effective?: boolean | undefined;
1256
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
1257
+ remediation?: string | null | undefined;
1258
+ used?: boolean | undefined;
1259
+ }>>>;
1217
1260
  taskId: z.ZodOptional<z.ZodString>;
1218
1261
  state: z.ZodEnum<["queued", "running", "succeeded", "failed", "cancelled", "interrupted"]>;
1219
1262
  runDir: z.ZodOptional<z.ZodString>;
@@ -1221,7 +1264,7 @@ export declare const ControlRunSummary: z.ZodObject<{
1221
1264
  failure: z.ZodDefault<z.ZodNullable<z.ZodObject<{
1222
1265
  phase: z.ZodDefault<z.ZodString>;
1223
1266
  category: z.ZodDefault<z.ZodEnum<["validation", "project", "auth", "harness_unavailable", "harness_error", "config_error", "budget", "policy", "cancelled", "internal", "unknown"]>>;
1224
- code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable"]>>>;
1267
+ code: z.ZodDefault<z.ZodNullable<z.ZodEnum<["finite_zero", "hard_cap", "estimate_headroom", "unknown_paid_in_flight", "budget_overshoot", "cost_unverifiable", "delegation_child_drain_timeout"]>>>;
1225
1268
  harnessId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1226
1269
  attemptId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1227
1270
  safeMessage: z.ZodString;
@@ -1231,7 +1274,7 @@ export declare const ControlRunSummary: z.ZodObject<{
1231
1274
  runDir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1232
1275
  nextActions: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1233
1276
  }, "strip", z.ZodTypeAny, {
1234
- code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null;
1277
+ code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | "delegation_child_drain_timeout" | null;
1235
1278
  harnessId: string | null;
1236
1279
  attemptId: string | null;
1237
1280
  runDir: string | null;
@@ -1244,7 +1287,7 @@ export declare const ControlRunSummary: z.ZodObject<{
1244
1287
  nextActions: string[];
1245
1288
  }, {
1246
1289
  safeMessage: string;
1247
- code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null | undefined;
1290
+ code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | "delegation_child_drain_timeout" | null | undefined;
1248
1291
  harnessId?: string | null | undefined;
1249
1292
  attemptId?: string | null | undefined;
1250
1293
  runDir?: string | null | undefined;
@@ -1429,28 +1472,28 @@ export declare const ControlRunSummary: z.ZodObject<{
1429
1472
  errorSummary?: string | null | undefined;
1430
1473
  }>>;
1431
1474
  requestRequirements: z.ZodDefault<z.ZodArray<z.ZodObject<{
1432
- capability: z.ZodEnum<["browser", "path_deny"]>;
1475
+ capability: z.ZodEnum<["browser", "path_deny", "delegation"]>;
1433
1476
  harness_id: z.ZodString;
1434
1477
  eligible: z.ZodBoolean;
1435
1478
  requested: z.ZodBoolean;
1436
1479
  effective: z.ZodBoolean;
1437
- reason: z.ZodEnum<["not_requested", "effective", "manifest_unsupported", "web_policy_off", "access_profile_incompatible", "postdiff_only"]>;
1480
+ reason: z.ZodEnum<["not_requested", "effective", "manifest_unsupported", "web_policy_off", "access_profile_incompatible", "runtime_unavailable", "postdiff_only"]>;
1438
1481
  evidence_refs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1439
1482
  }, "strip", z.ZodTypeAny, {
1440
1483
  requested: boolean;
1441
1484
  effective: boolean;
1442
1485
  harness_id: string;
1443
- reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible" | "postdiff_only";
1486
+ reason: "effective" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "access_profile_incompatible" | "web_policy_off" | "postdiff_only";
1444
1487
  evidence_refs: string[];
1445
1488
  eligible: boolean;
1446
- capability: "browser" | "path_deny";
1489
+ capability: "browser" | "delegation" | "path_deny";
1447
1490
  }, {
1448
1491
  requested: boolean;
1449
1492
  effective: boolean;
1450
1493
  harness_id: string;
1451
- reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible" | "postdiff_only";
1494
+ reason: "effective" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "access_profile_incompatible" | "web_policy_off" | "postdiff_only";
1452
1495
  eligible: boolean;
1453
- capability: "browser" | "path_deny";
1496
+ capability: "browser" | "delegation" | "path_deny";
1454
1497
  evidence_refs?: string[] | undefined;
1455
1498
  }>, "many">>;
1456
1499
  toolPermissionPolicy: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -1616,7 +1659,7 @@ export declare const ControlRunSummary: z.ZodObject<{
1616
1659
  paid_fallback: z.ZodEnum<["never", "when_unavailable", "allowed_within_cap"]>;
1617
1660
  order: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1618
1661
  dropped: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1619
- reason: z.ZodEnum<["subscription_entitlement_first", "lowest_incremental_cash", "quality_tier", "expiring_quota_slack", "all_incremental_cash_unknown", "declared_order"]>;
1662
+ reason: z.ZodEnum<["subscription_entitlement_first", "lowest_incremental_cash", "quality_tier", "expiring_quota_slack", "all_incremental_cash_unknown", "delegate_effective_first", "explicit_primary", "declared_order"]>;
1620
1663
  entries: z.ZodDefault<z.ZodArray<z.ZodObject<{
1621
1664
  harness_id: z.ZodString;
1622
1665
  billing_knowledge: z.ZodEnum<["proven_zero", "subscription_entitlement", "metered", "unknown"]>;
@@ -1640,13 +1683,13 @@ export declare const ControlRunSummary: z.ZodObject<{
1640
1683
  incremental_cost_usd: number | null;
1641
1684
  eligible: boolean;
1642
1685
  }[];
1643
- reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
1686
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "delegate_effective_first" | "explicit_primary" | "declared_order";
1644
1687
  goal: "auto" | "quality" | "economy";
1645
1688
  paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
1646
1689
  order: string[];
1647
1690
  dropped: string[];
1648
1691
  }, {
1649
- reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
1692
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "delegate_effective_first" | "explicit_primary" | "declared_order";
1650
1693
  goal: "auto" | "quality" | "economy";
1651
1694
  paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
1652
1695
  entries?: {
@@ -1679,6 +1722,15 @@ export declare const ControlRunSummary: z.ZodObject<{
1679
1722
  finishedAt: z.ZodOptional<z.ZodString>;
1680
1723
  }, "strip", z.ZodTypeAny, {
1681
1724
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
1725
+ parentRunId: string | null;
1726
+ delegatedFromRunId: string | null;
1727
+ delegation: {
1728
+ requested: boolean;
1729
+ effective: boolean;
1730
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
1731
+ remediation: string | null;
1732
+ used: boolean;
1733
+ } | null;
1682
1734
  project: {
1683
1735
  kind: "none" | "project";
1684
1736
  context: "off" | "auto";
@@ -1688,7 +1740,7 @@ export declare const ControlRunSummary: z.ZodObject<{
1688
1740
  jobId: string;
1689
1741
  runId: string;
1690
1742
  failure: {
1691
- code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null;
1743
+ code: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | "delegation_child_drain_timeout" | null;
1692
1744
  harnessId: string | null;
1693
1745
  attemptId: string | null;
1694
1746
  runDir: string | null;
@@ -1717,10 +1769,10 @@ export declare const ControlRunSummary: z.ZodObject<{
1717
1769
  requested: boolean;
1718
1770
  effective: boolean;
1719
1771
  harness_id: string;
1720
- reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible" | "postdiff_only";
1772
+ reason: "effective" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "access_profile_incompatible" | "web_policy_off" | "postdiff_only";
1721
1773
  evidence_refs: string[];
1722
1774
  eligible: boolean;
1723
- capability: "browser" | "path_deny";
1775
+ capability: "browser" | "delegation" | "path_deny";
1724
1776
  }[];
1725
1777
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
1726
1778
  toolWarningsTotal: number;
@@ -1769,7 +1821,7 @@ export declare const ControlRunSummary: z.ZodObject<{
1769
1821
  incremental_cost_usd: number | null;
1770
1822
  eligible: boolean;
1771
1823
  }[];
1772
- reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
1824
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "delegate_effective_first" | "explicit_primary" | "declared_order";
1773
1825
  goal: "auto" | "quality" | "economy";
1774
1826
  paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
1775
1827
  order: string[];
@@ -1845,6 +1897,15 @@ export declare const ControlRunSummary: z.ZodObject<{
1845
1897
  mode?: "ask" | "plan" | "agent" | undefined;
1846
1898
  prompt?: string | undefined;
1847
1899
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
1900
+ parentRunId?: string | null | undefined;
1901
+ delegatedFromRunId?: string | null | undefined;
1902
+ delegation?: {
1903
+ requested?: boolean | undefined;
1904
+ effective?: boolean | undefined;
1905
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
1906
+ remediation?: string | null | undefined;
1907
+ used?: boolean | undefined;
1908
+ } | null | undefined;
1848
1909
  harnesses?: string[] | undefined;
1849
1910
  model?: string | undefined;
1850
1911
  tests?: {
@@ -1882,7 +1943,7 @@ export declare const ControlRunSummary: z.ZodObject<{
1882
1943
  }[] | undefined;
1883
1944
  failure?: {
1884
1945
  safeMessage: string;
1885
- code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | null | undefined;
1946
+ code?: "budget_overshoot" | "cost_unverifiable" | "finite_zero" | "hard_cap" | "estimate_headroom" | "unknown_paid_in_flight" | "delegation_child_drain_timeout" | null | undefined;
1886
1947
  harnessId?: string | null | undefined;
1887
1948
  attemptId?: string | null | undefined;
1888
1949
  runDir?: string | null | undefined;
@@ -1933,9 +1994,9 @@ export declare const ControlRunSummary: z.ZodObject<{
1933
1994
  requested: boolean;
1934
1995
  effective: boolean;
1935
1996
  harness_id: string;
1936
- reason: "effective" | "not_requested" | "manifest_unsupported" | "web_policy_off" | "access_profile_incompatible" | "postdiff_only";
1997
+ reason: "effective" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "access_profile_incompatible" | "web_policy_off" | "postdiff_only";
1937
1998
  eligible: boolean;
1938
- capability: "browser" | "path_deny";
1999
+ capability: "browser" | "delegation" | "path_deny";
1939
2000
  evidence_refs?: string[] | undefined;
1940
2001
  }[] | undefined;
1941
2002
  toolPermissionPolicy?: Record<string, unknown> | undefined;
@@ -1980,7 +2041,7 @@ export declare const ControlRunSummary: z.ZodObject<{
1980
2041
  observedModel?: string | null | undefined;
1981
2042
  } | null | undefined;
1982
2043
  routingRationale?: {
1983
- reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "declared_order";
2044
+ reason: "subscription_entitlement_first" | "lowest_incremental_cash" | "quality_tier" | "expiring_quota_slack" | "all_incremental_cash_unknown" | "delegate_effective_first" | "explicit_primary" | "declared_order";
1984
2045
  goal: "auto" | "quality" | "economy";
1985
2046
  paid_fallback: "never" | "when_unavailable" | "allowed_within_cap";
1986
2047
  entries?: {
@@ -2232,20 +2293,6 @@ export declare const ControlInteractionAnswerRequest: z.ZodObject<{
2232
2293
  }[] | undefined;
2233
2294
  }>;
2234
2295
  export type ControlInteractionAnswerRequest = z.infer<typeof ControlInteractionAnswerRequest>;
2235
- export declare const ControlInteractionAnswerResponse: z.ZodObject<{
2236
- accepted: z.ZodBoolean;
2237
- status: z.ZodEnum<["delivered", "not_found", "already_resolved", "rejected"]>;
2238
- message: z.ZodOptional<z.ZodString>;
2239
- }, "strip", z.ZodTypeAny, {
2240
- status: "rejected" | "delivered" | "not_found" | "already_resolved";
2241
- accepted: boolean;
2242
- message?: string | undefined;
2243
- }, {
2244
- status: "rejected" | "delivered" | "not_found" | "already_resolved";
2245
- accepted: boolean;
2246
- message?: string | undefined;
2247
- }>;
2248
- export type ControlInteractionAnswerResponse = z.infer<typeof ControlInteractionAnswerResponse>;
2249
2296
  export declare const RunControlTarget: z.ZodObject<{
2250
2297
  attemptId: z.ZodOptional<z.ZodString>;
2251
2298
  harnessId: z.ZodOptional<z.ZodString>;
@@ -2365,23 +2412,6 @@ export declare const ControlRunControlRequest: z.ZodObject<{
2365
2412
  };
2366
2413
  }>;
2367
2414
  export type ControlRunControlRequest = z.infer<typeof ControlRunControlRequest>;
2368
- export declare const ControlRunControlResponse: z.ZodObject<{
2369
- accepted: z.ZodBoolean;
2370
- status: z.ZodDefault<z.ZodEnum<["applied", "queued", "rejected", "unsupported"]>>;
2371
- runId: z.ZodOptional<z.ZodString>;
2372
- message: z.ZodOptional<z.ZodString>;
2373
- }, "strip", z.ZodTypeAny, {
2374
- status: "unsupported" | "rejected" | "queued" | "applied";
2375
- accepted: boolean;
2376
- message?: string | undefined;
2377
- runId?: string | undefined;
2378
- }, {
2379
- accepted: boolean;
2380
- message?: string | undefined;
2381
- status?: "unsupported" | "rejected" | "queued" | "applied" | undefined;
2382
- runId?: string | undefined;
2383
- }>;
2384
- export type ControlRunControlResponse = z.infer<typeof ControlRunControlResponse>;
2385
2415
  export declare const ApplyTarget: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2386
2416
  kind: z.ZodLiteral<"original_project">;
2387
2417
  }, "strict", z.ZodTypeAny, {
@@ -2785,8 +2815,47 @@ export declare const ControlTurnRunCard: z.ZodObject<{
2785
2815
  outputReadyState: z.ZodDefault<z.ZodEnum<["pending", "finalizing", "ready", "diagnostic"]>>;
2786
2816
  waitingOnUser: z.ZodDefault<z.ZodBoolean>;
2787
2817
  finishedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2818
+ delegation: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodObject<{
2819
+ requested: z.ZodDefault<z.ZodBoolean>;
2820
+ effective: z.ZodDefault<z.ZodBoolean>;
2821
+ used: z.ZodDefault<z.ZodBoolean>;
2822
+ reason: z.ZodDefault<z.ZodEnum<["pending", "not_requested", "injected_unused", "used", "runtime_unavailable", "manifest_unsupported", "access_profile_incompatible", "partially_degraded", "startup_failed"]>>;
2823
+ remediation: z.ZodDefault<z.ZodNullable<z.ZodString>>;
2824
+ }, "strict", z.ZodTypeAny, {
2825
+ requested: boolean;
2826
+ effective: boolean;
2827
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
2828
+ remediation: string | null;
2829
+ used: boolean;
2830
+ }, {
2831
+ requested?: boolean | undefined;
2832
+ effective?: boolean | undefined;
2833
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
2834
+ remediation?: string | null | undefined;
2835
+ used?: boolean | undefined;
2836
+ }>, {
2837
+ requested: boolean;
2838
+ effective: boolean;
2839
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
2840
+ remediation: string | null;
2841
+ used: boolean;
2842
+ }, {
2843
+ requested?: boolean | undefined;
2844
+ effective?: boolean | undefined;
2845
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
2846
+ remediation?: string | null | undefined;
2847
+ used?: boolean | undefined;
2848
+ }>>>;
2849
+ delegatedChildRunIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2788
2850
  }, "strip", z.ZodTypeAny, {
2789
2851
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
2852
+ delegation: {
2853
+ requested: boolean;
2854
+ effective: boolean;
2855
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
2856
+ remediation: string | null;
2857
+ used: boolean;
2858
+ } | null;
2790
2859
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
2791
2860
  result: {
2792
2861
  kind: "plan" | "none" | "patch" | "answer" | "report";
@@ -2821,6 +2890,7 @@ export declare const ControlTurnRunCard: z.ZodObject<{
2821
2890
  } | null;
2822
2891
  waitingOnUser: boolean;
2823
2892
  finishedAt: string | null;
2893
+ delegatedChildRunIds: string[];
2824
2894
  mode?: "ask" | "plan" | "agent" | undefined;
2825
2895
  n?: number | undefined;
2826
2896
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
@@ -2828,6 +2898,13 @@ export declare const ControlTurnRunCard: z.ZodObject<{
2828
2898
  }, {
2829
2899
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
2830
2900
  mode?: "ask" | "plan" | "agent" | undefined;
2901
+ delegation?: {
2902
+ requested?: boolean | undefined;
2903
+ effective?: boolean | undefined;
2904
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
2905
+ remediation?: string | null | undefined;
2906
+ used?: boolean | undefined;
2907
+ } | null | undefined;
2831
2908
  n?: number | undefined;
2832
2909
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
2833
2910
  spendUsd?: number | null | undefined;
@@ -2865,6 +2942,7 @@ export declare const ControlTurnRunCard: z.ZodObject<{
2865
2942
  } | null | undefined;
2866
2943
  waitingOnUser?: boolean | undefined;
2867
2944
  finishedAt?: string | null | undefined;
2945
+ delegatedChildRunIds?: string[] | undefined;
2868
2946
  }>;
2869
2947
  export type ControlTurnRunCard = z.infer<typeof ControlTurnRunCard>;
2870
2948
  export declare const ControlThreadTurn: z.ZodObject<{
@@ -3023,8 +3101,47 @@ export declare const ControlThreadTurn: z.ZodObject<{
3023
3101
  outputReadyState: z.ZodDefault<z.ZodEnum<["pending", "finalizing", "ready", "diagnostic"]>>;
3024
3102
  waitingOnUser: z.ZodDefault<z.ZodBoolean>;
3025
3103
  finishedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3104
+ delegation: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodObject<{
3105
+ requested: z.ZodDefault<z.ZodBoolean>;
3106
+ effective: z.ZodDefault<z.ZodBoolean>;
3107
+ used: z.ZodDefault<z.ZodBoolean>;
3108
+ reason: z.ZodDefault<z.ZodEnum<["pending", "not_requested", "injected_unused", "used", "runtime_unavailable", "manifest_unsupported", "access_profile_incompatible", "partially_degraded", "startup_failed"]>>;
3109
+ remediation: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3110
+ }, "strict", z.ZodTypeAny, {
3111
+ requested: boolean;
3112
+ effective: boolean;
3113
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
3114
+ remediation: string | null;
3115
+ used: boolean;
3116
+ }, {
3117
+ requested?: boolean | undefined;
3118
+ effective?: boolean | undefined;
3119
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
3120
+ remediation?: string | null | undefined;
3121
+ used?: boolean | undefined;
3122
+ }>, {
3123
+ requested: boolean;
3124
+ effective: boolean;
3125
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
3126
+ remediation: string | null;
3127
+ used: boolean;
3128
+ }, {
3129
+ requested?: boolean | undefined;
3130
+ effective?: boolean | undefined;
3131
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
3132
+ remediation?: string | null | undefined;
3133
+ used?: boolean | undefined;
3134
+ }>>>;
3135
+ delegatedChildRunIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3026
3136
  }, "strip", z.ZodTypeAny, {
3027
3137
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
3138
+ delegation: {
3139
+ requested: boolean;
3140
+ effective: boolean;
3141
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
3142
+ remediation: string | null;
3143
+ used: boolean;
3144
+ } | null;
3028
3145
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
3029
3146
  result: {
3030
3147
  kind: "plan" | "none" | "patch" | "answer" | "report";
@@ -3059,6 +3176,7 @@ export declare const ControlThreadTurn: z.ZodObject<{
3059
3176
  } | null;
3060
3177
  waitingOnUser: boolean;
3061
3178
  finishedAt: string | null;
3179
+ delegatedChildRunIds: string[];
3062
3180
  mode?: "ask" | "plan" | "agent" | undefined;
3063
3181
  n?: number | undefined;
3064
3182
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
@@ -3066,6 +3184,13 @@ export declare const ControlThreadTurn: z.ZodObject<{
3066
3184
  }, {
3067
3185
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
3068
3186
  mode?: "ask" | "plan" | "agent" | undefined;
3187
+ delegation?: {
3188
+ requested?: boolean | undefined;
3189
+ effective?: boolean | undefined;
3190
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
3191
+ remediation?: string | null | undefined;
3192
+ used?: boolean | undefined;
3193
+ } | null | undefined;
3069
3194
  n?: number | undefined;
3070
3195
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
3071
3196
  spendUsd?: number | null | undefined;
@@ -3103,6 +3228,7 @@ export declare const ControlThreadTurn: z.ZodObject<{
3103
3228
  } | null | undefined;
3104
3229
  waitingOnUser?: boolean | undefined;
3105
3230
  finishedAt?: string | null | undefined;
3231
+ delegatedChildRunIds?: string[] | undefined;
3106
3232
  }>>>;
3107
3233
  /** Why this turn has NO run (enqueue/preflight refusal, e.g. the trust
3108
3234
  * gate) — surfaces render it as an inline failure card with the remedy;
@@ -3178,12 +3304,19 @@ export declare const ControlThreadTurn: z.ZodObject<{
3178
3304
  } | null;
3179
3305
  threadId: string;
3180
3306
  planRunId: string | null;
3181
- runId: string | null;
3182
3307
  parentRunId: string | null;
3308
+ runId: string | null;
3183
3309
  planHash: string | null;
3184
3310
  planReadinessOverridden: boolean;
3185
3311
  run: {
3186
3312
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
3313
+ delegation: {
3314
+ requested: boolean;
3315
+ effective: boolean;
3316
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
3317
+ remediation: string | null;
3318
+ used: boolean;
3319
+ } | null;
3187
3320
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
3188
3321
  result: {
3189
3322
  kind: "plan" | "none" | "patch" | "answer" | "report";
@@ -3218,6 +3351,7 @@ export declare const ControlThreadTurn: z.ZodObject<{
3218
3351
  } | null;
3219
3352
  waitingOnUser: boolean;
3220
3353
  finishedAt: string | null;
3354
+ delegatedChildRunIds: string[];
3221
3355
  mode?: "ask" | "plan" | "agent" | undefined;
3222
3356
  n?: number | undefined;
3223
3357
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
@@ -3245,13 +3379,20 @@ export declare const ControlThreadTurn: z.ZodObject<{
3245
3379
  } | null | undefined;
3246
3380
  } | null | undefined;
3247
3381
  planRunId?: string | null | undefined;
3248
- runId?: string | null | undefined;
3249
3382
  parentRunId?: string | null | undefined;
3383
+ runId?: string | null | undefined;
3250
3384
  planHash?: string | null | undefined;
3251
3385
  planReadinessOverridden?: boolean | undefined;
3252
3386
  run?: {
3253
3387
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
3254
3388
  mode?: "ask" | "plan" | "agent" | undefined;
3389
+ delegation?: {
3390
+ requested?: boolean | undefined;
3391
+ effective?: boolean | undefined;
3392
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
3393
+ remediation?: string | null | undefined;
3394
+ used?: boolean | undefined;
3395
+ } | null | undefined;
3255
3396
  n?: number | undefined;
3256
3397
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
3257
3398
  spendUsd?: number | null | undefined;
@@ -3289,6 +3430,7 @@ export declare const ControlThreadTurn: z.ZodObject<{
3289
3430
  } | null | undefined;
3290
3431
  waitingOnUser?: boolean | undefined;
3291
3432
  finishedAt?: string | null | undefined;
3433
+ delegatedChildRunIds?: string[] | undefined;
3292
3434
  } | null | undefined;
3293
3435
  enqueueError?: {
3294
3436
  message: string;
@@ -3792,8 +3934,47 @@ export declare const ControlThreadDetail: z.ZodObject<{
3792
3934
  outputReadyState: z.ZodDefault<z.ZodEnum<["pending", "finalizing", "ready", "diagnostic"]>>;
3793
3935
  waitingOnUser: z.ZodDefault<z.ZodBoolean>;
3794
3936
  finishedAt: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3937
+ delegation: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodObject<{
3938
+ requested: z.ZodDefault<z.ZodBoolean>;
3939
+ effective: z.ZodDefault<z.ZodBoolean>;
3940
+ used: z.ZodDefault<z.ZodBoolean>;
3941
+ reason: z.ZodDefault<z.ZodEnum<["pending", "not_requested", "injected_unused", "used", "runtime_unavailable", "manifest_unsupported", "access_profile_incompatible", "partially_degraded", "startup_failed"]>>;
3942
+ remediation: z.ZodDefault<z.ZodNullable<z.ZodString>>;
3943
+ }, "strict", z.ZodTypeAny, {
3944
+ requested: boolean;
3945
+ effective: boolean;
3946
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
3947
+ remediation: string | null;
3948
+ used: boolean;
3949
+ }, {
3950
+ requested?: boolean | undefined;
3951
+ effective?: boolean | undefined;
3952
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
3953
+ remediation?: string | null | undefined;
3954
+ used?: boolean | undefined;
3955
+ }>, {
3956
+ requested: boolean;
3957
+ effective: boolean;
3958
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
3959
+ remediation: string | null;
3960
+ used: boolean;
3961
+ }, {
3962
+ requested?: boolean | undefined;
3963
+ effective?: boolean | undefined;
3964
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
3965
+ remediation?: string | null | undefined;
3966
+ used?: boolean | undefined;
3967
+ }>>>;
3968
+ delegatedChildRunIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3795
3969
  }, "strip", z.ZodTypeAny, {
3796
3970
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
3971
+ delegation: {
3972
+ requested: boolean;
3973
+ effective: boolean;
3974
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
3975
+ remediation: string | null;
3976
+ used: boolean;
3977
+ } | null;
3797
3978
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
3798
3979
  result: {
3799
3980
  kind: "plan" | "none" | "patch" | "answer" | "report";
@@ -3828,6 +4009,7 @@ export declare const ControlThreadDetail: z.ZodObject<{
3828
4009
  } | null;
3829
4010
  waitingOnUser: boolean;
3830
4011
  finishedAt: string | null;
4012
+ delegatedChildRunIds: string[];
3831
4013
  mode?: "ask" | "plan" | "agent" | undefined;
3832
4014
  n?: number | undefined;
3833
4015
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
@@ -3835,6 +4017,13 @@ export declare const ControlThreadDetail: z.ZodObject<{
3835
4017
  }, {
3836
4018
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
3837
4019
  mode?: "ask" | "plan" | "agent" | undefined;
4020
+ delegation?: {
4021
+ requested?: boolean | undefined;
4022
+ effective?: boolean | undefined;
4023
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
4024
+ remediation?: string | null | undefined;
4025
+ used?: boolean | undefined;
4026
+ } | null | undefined;
3838
4027
  n?: number | undefined;
3839
4028
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
3840
4029
  spendUsd?: number | null | undefined;
@@ -3872,6 +4061,7 @@ export declare const ControlThreadDetail: z.ZodObject<{
3872
4061
  } | null | undefined;
3873
4062
  waitingOnUser?: boolean | undefined;
3874
4063
  finishedAt?: string | null | undefined;
4064
+ delegatedChildRunIds?: string[] | undefined;
3875
4065
  }>>>;
3876
4066
  /** Why this turn has NO run (enqueue/preflight refusal, e.g. the trust
3877
4067
  * gate) — surfaces render it as an inline failure card with the remedy;
@@ -3947,12 +4137,19 @@ export declare const ControlThreadDetail: z.ZodObject<{
3947
4137
  } | null;
3948
4138
  threadId: string;
3949
4139
  planRunId: string | null;
3950
- runId: string | null;
3951
4140
  parentRunId: string | null;
4141
+ runId: string | null;
3952
4142
  planHash: string | null;
3953
4143
  planReadinessOverridden: boolean;
3954
4144
  run: {
3955
4145
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
4146
+ delegation: {
4147
+ requested: boolean;
4148
+ effective: boolean;
4149
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
4150
+ remediation: string | null;
4151
+ used: boolean;
4152
+ } | null;
3956
4153
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
3957
4154
  result: {
3958
4155
  kind: "plan" | "none" | "patch" | "answer" | "report";
@@ -3987,6 +4184,7 @@ export declare const ControlThreadDetail: z.ZodObject<{
3987
4184
  } | null;
3988
4185
  waitingOnUser: boolean;
3989
4186
  finishedAt: string | null;
4187
+ delegatedChildRunIds: string[];
3990
4188
  mode?: "ask" | "plan" | "agent" | undefined;
3991
4189
  n?: number | undefined;
3992
4190
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
@@ -4014,13 +4212,20 @@ export declare const ControlThreadDetail: z.ZodObject<{
4014
4212
  } | null | undefined;
4015
4213
  } | null | undefined;
4016
4214
  planRunId?: string | null | undefined;
4017
- runId?: string | null | undefined;
4018
4215
  parentRunId?: string | null | undefined;
4216
+ runId?: string | null | undefined;
4019
4217
  planHash?: string | null | undefined;
4020
4218
  planReadinessOverridden?: boolean | undefined;
4021
4219
  run?: {
4022
4220
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
4023
4221
  mode?: "ask" | "plan" | "agent" | undefined;
4222
+ delegation?: {
4223
+ requested?: boolean | undefined;
4224
+ effective?: boolean | undefined;
4225
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
4226
+ remediation?: string | null | undefined;
4227
+ used?: boolean | undefined;
4228
+ } | null | undefined;
4024
4229
  n?: number | undefined;
4025
4230
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
4026
4231
  spendUsd?: number | null | undefined;
@@ -4058,6 +4263,7 @@ export declare const ControlThreadDetail: z.ZodObject<{
4058
4263
  } | null | undefined;
4059
4264
  waitingOnUser?: boolean | undefined;
4060
4265
  finishedAt?: string | null | undefined;
4266
+ delegatedChildRunIds?: string[] | undefined;
4061
4267
  } | null | undefined;
4062
4268
  enqueueError?: {
4063
4269
  message: string;
@@ -4112,12 +4318,19 @@ export declare const ControlThreadDetail: z.ZodObject<{
4112
4318
  } | null;
4113
4319
  threadId: string;
4114
4320
  planRunId: string | null;
4115
- runId: string | null;
4116
4321
  parentRunId: string | null;
4322
+ runId: string | null;
4117
4323
  planHash: string | null;
4118
4324
  planReadinessOverridden: boolean;
4119
4325
  run: {
4120
4326
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
4327
+ delegation: {
4328
+ requested: boolean;
4329
+ effective: boolean;
4330
+ reason: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed";
4331
+ remediation: string | null;
4332
+ used: boolean;
4333
+ } | null;
4121
4334
  outputReadyState: "pending" | "finalizing" | "ready" | "diagnostic";
4122
4335
  result: {
4123
4336
  kind: "plan" | "none" | "patch" | "answer" | "report";
@@ -4152,6 +4365,7 @@ export declare const ControlThreadDetail: z.ZodObject<{
4152
4365
  } | null;
4153
4366
  waitingOnUser: boolean;
4154
4367
  finishedAt: string | null;
4368
+ delegatedChildRunIds: string[];
4155
4369
  mode?: "ask" | "plan" | "agent" | undefined;
4156
4370
  n?: number | undefined;
4157
4371
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
@@ -4210,13 +4424,20 @@ export declare const ControlThreadDetail: z.ZodObject<{
4210
4424
  } | null | undefined;
4211
4425
  } | null | undefined;
4212
4426
  planRunId?: string | null | undefined;
4213
- runId?: string | null | undefined;
4214
4427
  parentRunId?: string | null | undefined;
4428
+ runId?: string | null | undefined;
4215
4429
  planHash?: string | null | undefined;
4216
4430
  planReadinessOverridden?: boolean | undefined;
4217
4431
  run?: {
4218
4432
  state: "failed" | "cancelled" | "running" | "succeeded" | "interrupted" | "queued";
4219
4433
  mode?: "ask" | "plan" | "agent" | undefined;
4434
+ delegation?: {
4435
+ requested?: boolean | undefined;
4436
+ effective?: boolean | undefined;
4437
+ reason?: "pending" | "runtime_unavailable" | "manifest_unsupported" | "not_requested" | "injected_unused" | "used" | "access_profile_incompatible" | "partially_degraded" | "startup_failed" | undefined;
4438
+ remediation?: string | null | undefined;
4439
+ used?: boolean | undefined;
4440
+ } | null | undefined;
4220
4441
  n?: number | undefined;
4221
4442
  strategy?: "attempts" | "create" | "race" | "until_clean" | "deep_scan" | null | undefined;
4222
4443
  spendUsd?: number | null | undefined;
@@ -4254,6 +4475,7 @@ export declare const ControlThreadDetail: z.ZodObject<{
4254
4475
  } | null | undefined;
4255
4476
  waitingOnUser?: boolean | undefined;
4256
4477
  finishedAt?: string | null | undefined;
4478
+ delegatedChildRunIds?: string[] | undefined;
4257
4479
  } | null | undefined;
4258
4480
  enqueueError?: {
4259
4481
  message: string;
@@ -4689,6 +4911,32 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
4689
4911
  status: "ok" | "rejected";
4690
4912
  message?: string | null | undefined;
4691
4913
  }>>>;
4914
+ delegation: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodObject<{
4915
+ available: z.ZodBoolean;
4916
+ reason: z.ZodEnum<["ready", "runtime_unavailable", "manifest_unsupported"]>;
4917
+ remediation: z.ZodDefault<z.ZodNullable<z.ZodString>>;
4918
+ requiresFullAccess: z.ZodDefault<z.ZodBoolean>;
4919
+ }, "strict", z.ZodTypeAny, {
4920
+ available: boolean;
4921
+ reason: "ready" | "runtime_unavailable" | "manifest_unsupported";
4922
+ remediation: string | null;
4923
+ requiresFullAccess: boolean;
4924
+ }, {
4925
+ available: boolean;
4926
+ reason: "ready" | "runtime_unavailable" | "manifest_unsupported";
4927
+ remediation?: string | null | undefined;
4928
+ requiresFullAccess?: boolean | undefined;
4929
+ }>, {
4930
+ available: boolean;
4931
+ reason: "ready" | "runtime_unavailable" | "manifest_unsupported";
4932
+ remediation: string | null;
4933
+ requiresFullAccess: boolean;
4934
+ }, {
4935
+ available: boolean;
4936
+ reason: "ready" | "runtime_unavailable" | "manifest_unsupported";
4937
+ remediation?: string | null | undefined;
4938
+ requiresFullAccess?: boolean | undefined;
4939
+ }>>>;
4692
4940
  }, "strip", z.ZodTypeAny, {
4693
4941
  status: "unavailable" | "ok" | "degraded";
4694
4942
  readiness: {
@@ -4709,6 +4957,12 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
4709
4957
  enabledIntents: string[];
4710
4958
  disabledIntents: string[];
4711
4959
  configuredModel: string | null;
4960
+ delegation: {
4961
+ available: boolean;
4962
+ reason: "ready" | "runtime_unavailable" | "manifest_unsupported";
4963
+ remediation: string | null;
4964
+ requiresFullAccess: boolean;
4965
+ } | null;
4712
4966
  routableIntents: string[];
4713
4967
  authSources: {
4714
4968
  source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
@@ -4870,6 +5124,12 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
4870
5124
  enabledIntents?: string[] | undefined;
4871
5125
  disabledIntents?: string[] | undefined;
4872
5126
  configuredModel?: string | null | undefined;
5127
+ delegation?: {
5128
+ available: boolean;
5129
+ reason: "ready" | "runtime_unavailable" | "manifest_unsupported";
5130
+ remediation?: string | null | undefined;
5131
+ requiresFullAccess?: boolean | undefined;
5132
+ } | null | undefined;
4873
5133
  routableIntents?: string[] | undefined;
4874
5134
  authSources?: {
4875
5135
  source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
@@ -4903,6 +5163,12 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
4903
5163
  enabledIntents: string[];
4904
5164
  disabledIntents: string[];
4905
5165
  configuredModel: string | null;
5166
+ delegation: {
5167
+ available: boolean;
5168
+ reason: "ready" | "runtime_unavailable" | "manifest_unsupported";
5169
+ remediation: string | null;
5170
+ requiresFullAccess: boolean;
5171
+ } | null;
4906
5172
  routableIntents: string[];
4907
5173
  authSources: {
4908
5174
  source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
@@ -5066,6 +5332,12 @@ export declare const ControlHarnessListResponse: z.ZodObject<{
5066
5332
  enabledIntents?: string[] | undefined;
5067
5333
  disabledIntents?: string[] | undefined;
5068
5334
  configuredModel?: string | null | undefined;
5335
+ delegation?: {
5336
+ available: boolean;
5337
+ reason: "ready" | "runtime_unavailable" | "manifest_unsupported";
5338
+ remediation?: string | null | undefined;
5339
+ requiresFullAccess?: boolean | undefined;
5340
+ } | null | undefined;
5069
5341
  routableIntents?: string[] | undefined;
5070
5342
  authSources?: {
5071
5343
  source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";