@claudexor/schema 2.0.0 → 2.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 (128) hide show
  1. package/dist/agent-capabilities.d.ts +24 -24
  2. package/dist/attachment.d.ts +13 -13
  3. package/dist/auth.d.ts +21 -0
  4. package/dist/auth.d.ts.map +1 -1
  5. package/dist/auth.js +54 -0
  6. package/dist/auth.js.map +1 -1
  7. package/dist/budget.d.ts +17 -5
  8. package/dist/budget.d.ts.map +1 -1
  9. package/dist/budget.js +15 -0
  10. package/dist/budget.js.map +1 -1
  11. package/dist/config.d.ts +380 -20
  12. package/dist/config.d.ts.map +1 -1
  13. package/dist/config.js +81 -0
  14. package/dist/config.js.map +1 -1
  15. package/dist/control-gc.d.ts +185 -0
  16. package/dist/control-gc.d.ts.map +1 -0
  17. package/dist/control-gc.js +81 -0
  18. package/dist/control-gc.js.map +1 -0
  19. package/dist/control-operation-responses.d.ts +155 -29
  20. package/dist/control-operation-responses.d.ts.map +1 -1
  21. package/dist/control-run-detail.d.ts +140 -32
  22. package/dist/control-run-detail.d.ts.map +1 -1
  23. package/dist/control-spec.d.ts +6 -6
  24. package/dist/control-thread-apply.d.ts +2 -2
  25. package/dist/control.d.ts +427 -586
  26. package/dist/control.d.ts.map +1 -1
  27. package/dist/control.js +155 -54
  28. package/dist/control.js.map +1 -1
  29. package/dist/credential-profile.d.ts +454 -0
  30. package/dist/credential-profile.d.ts.map +1 -0
  31. package/dist/credential-profile.js +140 -0
  32. package/dist/credential-profile.js.map +1 -0
  33. package/dist/events.d.ts +20 -6
  34. package/dist/events.d.ts.map +1 -1
  35. package/dist/events.js +22 -0
  36. package/dist/events.js.map +1 -1
  37. package/dist/gate.d.ts +3 -3
  38. package/dist/harness.d.ts +243 -88
  39. package/dist/harness.d.ts.map +1 -1
  40. package/dist/harness.js +124 -46
  41. package/dist/harness.js.map +1 -1
  42. package/dist/index.d.ts +4 -0
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +4 -0
  45. package/dist/index.js.map +1 -1
  46. package/dist/orchestrate.d.ts +23 -0
  47. package/dist/orchestrate.d.ts.map +1 -1
  48. package/dist/orchestrate.js +56 -0
  49. package/dist/orchestrate.js.map +1 -1
  50. package/dist/project.d.ts +2 -2
  51. package/dist/quota.d.ts +27 -9
  52. package/dist/quota.d.ts.map +1 -1
  53. package/dist/quota.js +14 -2
  54. package/dist/quota.js.map +1 -1
  55. package/dist/readiness.d.ts +596 -0
  56. package/dist/readiness.d.ts.map +1 -0
  57. package/dist/readiness.js +87 -0
  58. package/dist/readiness.js.map +1 -0
  59. package/dist/request-requirements.d.ts +8 -8
  60. package/dist/request-requirements.d.ts.map +1 -1
  61. package/dist/request-requirements.js +4 -1
  62. package/dist/request-requirements.js.map +1 -1
  63. package/dist/route.d.ts +4 -4
  64. package/dist/setup.d.ts +69 -24
  65. package/dist/setup.d.ts.map +1 -1
  66. package/dist/setup.js +25 -0
  67. package/dist/setup.js.map +1 -1
  68. package/dist/spec.d.ts +4 -4
  69. package/dist/task.d.ts +99 -4
  70. package/dist/task.d.ts.map +1 -1
  71. package/dist/task.js +48 -1
  72. package/dist/task.js.map +1 -1
  73. package/dist/telemetry.d.ts +309 -67
  74. package/dist/telemetry.d.ts.map +1 -1
  75. package/dist/telemetry.js +97 -1
  76. package/dist/telemetry.js.map +1 -1
  77. package/dist/thread.d.ts +26 -15
  78. package/dist/thread.d.ts.map +1 -1
  79. package/dist/thread.js +11 -0
  80. package/dist/thread.js.map +1 -1
  81. package/dist/tool-ref.d.ts +45 -0
  82. package/dist/tool-ref.d.ts.map +1 -0
  83. package/dist/tool-ref.js +45 -0
  84. package/dist/tool-ref.js.map +1 -0
  85. package/dist/workspace.d.ts +2 -2
  86. package/generated/BudgetObservation.schema.json +16 -0
  87. package/generated/ControlCredentialProfileCreateRequest.schema.json +32 -0
  88. package/generated/ControlCredentialProfileCreateResponse.schema.json +142 -0
  89. package/generated/ControlCredentialProfileDeleteResponse.schema.json +107 -0
  90. package/generated/ControlCredentialProfilesResponse.schema.json +155 -0
  91. package/generated/ControlGcReceipt.schema.json +170 -0
  92. package/generated/ControlGcRequest.schema.json +18 -0
  93. package/generated/ControlHarnessListResponse.schema.json +95 -2
  94. package/generated/ControlHarnessModelsResponse.schema.json +19 -0
  95. package/generated/ControlHarnessSettingsPatch.schema.json +9 -0
  96. package/generated/ControlQuotaResponse.schema.json +3 -2
  97. package/generated/ControlRunAgainDraft.schema.json +40 -0
  98. package/generated/ControlRunDetail.schema.json +178 -6
  99. package/generated/ControlRunListResponse.schema.json +174 -3
  100. package/generated/ControlRunStartRequest.schema.json +40 -0
  101. package/generated/ControlRunSummary.schema.json +174 -3
  102. package/generated/ControlSettingsSnapshot.schema.json +10 -0
  103. package/generated/ControlSettingsUpdateRequest.schema.json +9 -0
  104. package/generated/ControlSetupJob.schema.json +8 -0
  105. package/generated/ControlSetupJobCreateRequest.schema.json +5 -0
  106. package/generated/ControlSetupJobEvent.schema.json +8 -0
  107. package/generated/ControlSetupJobListResponse.schema.json +8 -0
  108. package/generated/ControlSetupJobSnapshot.schema.json +8 -0
  109. package/generated/ControlThread.schema.json +16 -4
  110. package/generated/ControlThreadCreateRequest.schema.json +6 -2
  111. package/generated/ControlThreadDetail.schema.json +32 -8
  112. package/generated/ControlThreadListResponse.schema.json +16 -4
  113. package/generated/ControlThreadTurnRequest.schema.json +40 -0
  114. package/generated/ControlThreadUpdateRequest.schema.json +11 -0
  115. package/generated/CredentialProfile.schema.json +78 -0
  116. package/generated/CredentialProfileStatus.schema.json +61 -0
  117. package/generated/GlobalConfig.schema.json +136 -0
  118. package/generated/HarnessEvent.schema.json +62 -5
  119. package/generated/HarnessManifest.schema.json +33 -2
  120. package/generated/HarnessModel.schema.json +19 -0
  121. package/generated/HarnessStatusDto.schema.json +95 -2
  122. package/generated/RunEvent.schema.json +3 -0
  123. package/generated/RunTelemetry.schema.json +202 -2
  124. package/generated/Session.schema.json +14 -0
  125. package/generated/TaskContract.schema.json +65 -4
  126. package/generated/Thread.schema.json +17 -5
  127. package/generated/ThreadHeadPing.schema.json +40 -0
  128. package/package.json +3 -2
package/dist/config.d.ts CHANGED
@@ -324,12 +324,122 @@ export declare const GlobalConfig: z.ZodObject<{
324
324
  reviewer_timeout_ms?: number | undefined;
325
325
  harness_inactivity_timeout_ms?: number | undefined;
326
326
  }>>;
327
+ /**
328
+ * Disk retention for engine-owned runtime artifacts (W3.6). The daemon's
329
+ * retention service deletes ONLY terminal, unreferenced run trees past
330
+ * their age — active/queued/blocked runs, runs referenced by live
331
+ * threads, and undelivered/applyable work products always survive, and
332
+ * the newest N runs per project survive regardless of age.
333
+ */
334
+ retention: z.ZodDefault<z.ZodObject<{
335
+ runs_max_age_days: z.ZodDefault<z.ZodNumber>;
336
+ reviews_max_age_days: z.ZodDefault<z.ZodNumber>;
337
+ keep_last_runs_per_project: z.ZodDefault<z.ZodNumber>;
338
+ }, "strict", z.ZodTypeAny, {
339
+ runs_max_age_days: number;
340
+ reviews_max_age_days: number;
341
+ keep_last_runs_per_project: number;
342
+ }, {
343
+ runs_max_age_days?: number | undefined;
344
+ reviews_max_age_days?: number | undefined;
345
+ keep_last_runs_per_project?: number | undefined;
346
+ }>>;
347
+ /**
348
+ * Durable NON-SECRET credential-profile registry (INV-135): additional
349
+ * credential identities per harness beyond the engine default. Uniqueness
350
+ * of (harness_id, profile_id) is enforced here; secret material lives in
351
+ * the vendor dir or the secret store, never in config.
352
+ */
353
+ credential_profiles: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
354
+ profile_id: z.ZodString;
355
+ harness_id: z.ZodString;
356
+ display_name: z.ZodString;
357
+ credential_kind: z.ZodEnum<["config_dir_login", "oauth_token", "api_key"]>;
358
+ isolation_locator: z.ZodDefault<z.ZodNullable<z.ZodString>>;
359
+ secret_ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
360
+ enabled: z.ZodDefault<z.ZodBoolean>;
361
+ created_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
362
+ }, "strict", z.ZodTypeAny, {
363
+ profile_id: string;
364
+ harness_id: string;
365
+ display_name: string;
366
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
367
+ isolation_locator: string | null;
368
+ secret_ref: string | null;
369
+ enabled: boolean;
370
+ created_at: string | null;
371
+ }, {
372
+ profile_id: string;
373
+ harness_id: string;
374
+ display_name: string;
375
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
376
+ isolation_locator?: string | null | undefined;
377
+ secret_ref?: string | null | undefined;
378
+ enabled?: boolean | undefined;
379
+ created_at?: string | null | undefined;
380
+ }>, {
381
+ profile_id: string;
382
+ harness_id: string;
383
+ display_name: string;
384
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
385
+ isolation_locator: string | null;
386
+ secret_ref: string | null;
387
+ enabled: boolean;
388
+ created_at: string | null;
389
+ }, {
390
+ profile_id: string;
391
+ harness_id: string;
392
+ display_name: string;
393
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
394
+ isolation_locator?: string | null | undefined;
395
+ secret_ref?: string | null | undefined;
396
+ enabled?: boolean | undefined;
397
+ created_at?: string | null | undefined;
398
+ }>, "many">>, {
399
+ profile_id: string;
400
+ harness_id: string;
401
+ display_name: string;
402
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
403
+ isolation_locator: string | null;
404
+ secret_ref: string | null;
405
+ enabled: boolean;
406
+ created_at: string | null;
407
+ }[], {
408
+ profile_id: string;
409
+ harness_id: string;
410
+ display_name: string;
411
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
412
+ isolation_locator?: string | null | undefined;
413
+ secret_ref?: string | null | undefined;
414
+ enabled?: boolean | undefined;
415
+ created_at?: string | null | undefined;
416
+ }[] | undefined>;
327
417
  harnesses: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
328
418
  enabled: z.ZodDefault<z.ZodBoolean>;
329
419
  default_model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
330
420
  effort: z.ZodDefault<z.ZodNullable<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
331
421
  max_turns: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
332
422
  max_rounds: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
423
+ /**
424
+ * ONE typed profile-selection policy (INV-135, W5.4): what happens
425
+ * when the selected credential profile hits its vendor limit.
426
+ * Rotation is OPT-IN and rotates only on typed vendor-limit
427
+ * signals or proactive headroom breaches — never on ordinary
428
+ * network errors.
429
+ */
430
+ profile_policy: z.ZodDefault<z.ZodObject<{
431
+ limit_action: z.ZodDefault<z.ZodEnum<["fail", "ask", "rotate"]>>;
432
+ rotation_eligible: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
433
+ headroom_threshold: z.ZodDefault<z.ZodNumber>;
434
+ }, "strict", z.ZodTypeAny, {
435
+ limit_action: "ask" | "fail" | "rotate";
436
+ rotation_eligible: string[];
437
+ headroom_threshold: number;
438
+ }, {
439
+ limit_action?: "ask" | "fail" | "rotate" | undefined;
440
+ rotation_eligible?: string[] | undefined;
441
+ headroom_threshold?: number | undefined;
442
+ }>>;
333
443
  tools_allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
334
444
  tools_deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
335
445
  fallback_model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -338,24 +448,34 @@ export declare const GlobalConfig: z.ZodObject<{
338
448
  auth_preference: z.ZodDefault<z.ZodEnum<["subscription", "api_key", "auto"]>>;
339
449
  }, "strict", z.ZodTypeAny, {
340
450
  fallback_model: string | null;
341
- max_turns: number | null;
451
+ enabled: boolean;
342
452
  web: "off" | "auto" | "cached" | "live";
453
+ max_turns: number | null;
343
454
  auth_preference: "auto" | "subscription" | "api_key";
344
- enabled: boolean;
345
455
  effort: "low" | "medium" | "high" | "xhigh" | "max" | null;
346
456
  default_model: string | null;
347
457
  max_rounds: number | null;
458
+ profile_policy: {
459
+ limit_action: "ask" | "fail" | "rotate";
460
+ rotation_eligible: string[];
461
+ headroom_threshold: number;
462
+ };
348
463
  tools_allow: string[];
349
464
  tools_deny: string[];
350
465
  }, {
351
466
  fallback_model?: string | null | undefined;
352
- max_turns?: number | null | undefined;
467
+ enabled?: boolean | undefined;
353
468
  web?: "off" | "auto" | "cached" | "live" | undefined;
469
+ max_turns?: number | null | undefined;
354
470
  auth_preference?: "auto" | "subscription" | "api_key" | undefined;
355
- enabled?: boolean | undefined;
356
471
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
357
472
  default_model?: string | null | undefined;
358
473
  max_rounds?: number | null | undefined;
474
+ profile_policy?: {
475
+ limit_action?: "ask" | "fail" | "rotate" | undefined;
476
+ rotation_eligible?: string[] | undefined;
477
+ headroom_threshold?: number | undefined;
478
+ } | undefined;
359
479
  tools_allow?: string[] | undefined;
360
480
  tools_deny?: string[] | undefined;
361
481
  }>>>;
@@ -363,13 +483,18 @@ export declare const GlobalConfig: z.ZodObject<{
363
483
  version: 1;
364
484
  harnesses: Record<string, {
365
485
  fallback_model: string | null;
366
- max_turns: number | null;
486
+ enabled: boolean;
367
487
  web: "off" | "auto" | "cached" | "live";
488
+ max_turns: number | null;
368
489
  auth_preference: "auto" | "subscription" | "api_key";
369
- enabled: boolean;
370
490
  effort: "low" | "medium" | "high" | "xhigh" | "max" | null;
371
491
  default_model: string | null;
372
492
  max_rounds: number | null;
493
+ profile_policy: {
494
+ limit_action: "ask" | "fail" | "rotate";
495
+ rotation_eligible: string[];
496
+ headroom_threshold: number;
497
+ };
373
498
  tools_allow: string[];
374
499
  tools_deny: string[];
375
500
  }>;
@@ -406,17 +531,37 @@ export declare const GlobalConfig: z.ZodObject<{
406
531
  reviewer_timeout_ms: number;
407
532
  harness_inactivity_timeout_ms: number;
408
533
  };
534
+ retention: {
535
+ runs_max_age_days: number;
536
+ reviews_max_age_days: number;
537
+ keep_last_runs_per_project: number;
538
+ };
539
+ credential_profiles: {
540
+ profile_id: string;
541
+ harness_id: string;
542
+ display_name: string;
543
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
544
+ isolation_locator: string | null;
545
+ secret_ref: string | null;
546
+ enabled: boolean;
547
+ created_at: string | null;
548
+ }[];
409
549
  }, {
410
550
  version?: 1 | undefined;
411
551
  harnesses?: Record<string, {
412
552
  fallback_model?: string | null | undefined;
413
- max_turns?: number | null | undefined;
553
+ enabled?: boolean | undefined;
414
554
  web?: "off" | "auto" | "cached" | "live" | undefined;
555
+ max_turns?: number | null | undefined;
415
556
  auth_preference?: "auto" | "subscription" | "api_key" | undefined;
416
- enabled?: boolean | undefined;
417
557
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
418
558
  default_model?: string | null | undefined;
419
559
  max_rounds?: number | null | undefined;
560
+ profile_policy?: {
561
+ limit_action?: "ask" | "fail" | "rotate" | undefined;
562
+ rotation_eligible?: string[] | undefined;
563
+ headroom_threshold?: number | undefined;
564
+ } | undefined;
420
565
  tools_allow?: string[] | undefined;
421
566
  tools_deny?: string[] | undefined;
422
567
  }> | undefined;
@@ -453,6 +598,21 @@ export declare const GlobalConfig: z.ZodObject<{
453
598
  reviewer_timeout_ms?: number | undefined;
454
599
  harness_inactivity_timeout_ms?: number | undefined;
455
600
  } | undefined;
601
+ retention?: {
602
+ runs_max_age_days?: number | undefined;
603
+ reviews_max_age_days?: number | undefined;
604
+ keep_last_runs_per_project?: number | undefined;
605
+ } | undefined;
606
+ credential_profiles?: {
607
+ profile_id: string;
608
+ harness_id: string;
609
+ display_name: string;
610
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
611
+ isolation_locator?: string | null | undefined;
612
+ secret_ref?: string | null | undefined;
613
+ enabled?: boolean | undefined;
614
+ created_at?: string | null | undefined;
615
+ }[] | undefined;
456
616
  }>;
457
617
  export type GlobalConfig = z.infer<typeof GlobalConfig>;
458
618
  /** The fully-resolved effective config after precedence merge. */
@@ -771,12 +931,122 @@ export declare const ResolvedConfig: z.ZodObject<{
771
931
  reviewer_timeout_ms?: number | undefined;
772
932
  harness_inactivity_timeout_ms?: number | undefined;
773
933
  }>>;
934
+ /**
935
+ * Disk retention for engine-owned runtime artifacts (W3.6). The daemon's
936
+ * retention service deletes ONLY terminal, unreferenced run trees past
937
+ * their age — active/queued/blocked runs, runs referenced by live
938
+ * threads, and undelivered/applyable work products always survive, and
939
+ * the newest N runs per project survive regardless of age.
940
+ */
941
+ retention: z.ZodDefault<z.ZodObject<{
942
+ runs_max_age_days: z.ZodDefault<z.ZodNumber>;
943
+ reviews_max_age_days: z.ZodDefault<z.ZodNumber>;
944
+ keep_last_runs_per_project: z.ZodDefault<z.ZodNumber>;
945
+ }, "strict", z.ZodTypeAny, {
946
+ runs_max_age_days: number;
947
+ reviews_max_age_days: number;
948
+ keep_last_runs_per_project: number;
949
+ }, {
950
+ runs_max_age_days?: number | undefined;
951
+ reviews_max_age_days?: number | undefined;
952
+ keep_last_runs_per_project?: number | undefined;
953
+ }>>;
954
+ /**
955
+ * Durable NON-SECRET credential-profile registry (INV-135): additional
956
+ * credential identities per harness beyond the engine default. Uniqueness
957
+ * of (harness_id, profile_id) is enforced here; secret material lives in
958
+ * the vendor dir or the secret store, never in config.
959
+ */
960
+ credential_profiles: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
961
+ profile_id: z.ZodString;
962
+ harness_id: z.ZodString;
963
+ display_name: z.ZodString;
964
+ credential_kind: z.ZodEnum<["config_dir_login", "oauth_token", "api_key"]>;
965
+ isolation_locator: z.ZodDefault<z.ZodNullable<z.ZodString>>;
966
+ secret_ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
967
+ enabled: z.ZodDefault<z.ZodBoolean>;
968
+ created_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
969
+ }, "strict", z.ZodTypeAny, {
970
+ profile_id: string;
971
+ harness_id: string;
972
+ display_name: string;
973
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
974
+ isolation_locator: string | null;
975
+ secret_ref: string | null;
976
+ enabled: boolean;
977
+ created_at: string | null;
978
+ }, {
979
+ profile_id: string;
980
+ harness_id: string;
981
+ display_name: string;
982
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
983
+ isolation_locator?: string | null | undefined;
984
+ secret_ref?: string | null | undefined;
985
+ enabled?: boolean | undefined;
986
+ created_at?: string | null | undefined;
987
+ }>, {
988
+ profile_id: string;
989
+ harness_id: string;
990
+ display_name: string;
991
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
992
+ isolation_locator: string | null;
993
+ secret_ref: string | null;
994
+ enabled: boolean;
995
+ created_at: string | null;
996
+ }, {
997
+ profile_id: string;
998
+ harness_id: string;
999
+ display_name: string;
1000
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
1001
+ isolation_locator?: string | null | undefined;
1002
+ secret_ref?: string | null | undefined;
1003
+ enabled?: boolean | undefined;
1004
+ created_at?: string | null | undefined;
1005
+ }>, "many">>, {
1006
+ profile_id: string;
1007
+ harness_id: string;
1008
+ display_name: string;
1009
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
1010
+ isolation_locator: string | null;
1011
+ secret_ref: string | null;
1012
+ enabled: boolean;
1013
+ created_at: string | null;
1014
+ }[], {
1015
+ profile_id: string;
1016
+ harness_id: string;
1017
+ display_name: string;
1018
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
1019
+ isolation_locator?: string | null | undefined;
1020
+ secret_ref?: string | null | undefined;
1021
+ enabled?: boolean | undefined;
1022
+ created_at?: string | null | undefined;
1023
+ }[] | undefined>;
774
1024
  harnesses: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
775
1025
  enabled: z.ZodDefault<z.ZodBoolean>;
776
1026
  default_model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
777
1027
  effort: z.ZodDefault<z.ZodNullable<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
778
1028
  max_turns: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
779
1029
  max_rounds: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1030
+ /**
1031
+ * ONE typed profile-selection policy (INV-135, W5.4): what happens
1032
+ * when the selected credential profile hits its vendor limit.
1033
+ * Rotation is OPT-IN and rotates only on typed vendor-limit
1034
+ * signals or proactive headroom breaches — never on ordinary
1035
+ * network errors.
1036
+ */
1037
+ profile_policy: z.ZodDefault<z.ZodObject<{
1038
+ limit_action: z.ZodDefault<z.ZodEnum<["fail", "ask", "rotate"]>>;
1039
+ rotation_eligible: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1040
+ headroom_threshold: z.ZodDefault<z.ZodNumber>;
1041
+ }, "strict", z.ZodTypeAny, {
1042
+ limit_action: "ask" | "fail" | "rotate";
1043
+ rotation_eligible: string[];
1044
+ headroom_threshold: number;
1045
+ }, {
1046
+ limit_action?: "ask" | "fail" | "rotate" | undefined;
1047
+ rotation_eligible?: string[] | undefined;
1048
+ headroom_threshold?: number | undefined;
1049
+ }>>;
780
1050
  tools_allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
781
1051
  tools_deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
782
1052
  fallback_model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
@@ -785,24 +1055,34 @@ export declare const ResolvedConfig: z.ZodObject<{
785
1055
  auth_preference: z.ZodDefault<z.ZodEnum<["subscription", "api_key", "auto"]>>;
786
1056
  }, "strict", z.ZodTypeAny, {
787
1057
  fallback_model: string | null;
788
- max_turns: number | null;
1058
+ enabled: boolean;
789
1059
  web: "off" | "auto" | "cached" | "live";
1060
+ max_turns: number | null;
790
1061
  auth_preference: "auto" | "subscription" | "api_key";
791
- enabled: boolean;
792
1062
  effort: "low" | "medium" | "high" | "xhigh" | "max" | null;
793
1063
  default_model: string | null;
794
1064
  max_rounds: number | null;
1065
+ profile_policy: {
1066
+ limit_action: "ask" | "fail" | "rotate";
1067
+ rotation_eligible: string[];
1068
+ headroom_threshold: number;
1069
+ };
795
1070
  tools_allow: string[];
796
1071
  tools_deny: string[];
797
1072
  }, {
798
1073
  fallback_model?: string | null | undefined;
799
- max_turns?: number | null | undefined;
1074
+ enabled?: boolean | undefined;
800
1075
  web?: "off" | "auto" | "cached" | "live" | undefined;
1076
+ max_turns?: number | null | undefined;
801
1077
  auth_preference?: "auto" | "subscription" | "api_key" | undefined;
802
- enabled?: boolean | undefined;
803
1078
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
804
1079
  default_model?: string | null | undefined;
805
1080
  max_rounds?: number | null | undefined;
1081
+ profile_policy?: {
1082
+ limit_action?: "ask" | "fail" | "rotate" | undefined;
1083
+ rotation_eligible?: string[] | undefined;
1084
+ headroom_threshold?: number | undefined;
1085
+ } | undefined;
806
1086
  tools_allow?: string[] | undefined;
807
1087
  tools_deny?: string[] | undefined;
808
1088
  }>>>;
@@ -810,13 +1090,18 @@ export declare const ResolvedConfig: z.ZodObject<{
810
1090
  version: 1;
811
1091
  harnesses: Record<string, {
812
1092
  fallback_model: string | null;
813
- max_turns: number | null;
1093
+ enabled: boolean;
814
1094
  web: "off" | "auto" | "cached" | "live";
1095
+ max_turns: number | null;
815
1096
  auth_preference: "auto" | "subscription" | "api_key";
816
- enabled: boolean;
817
1097
  effort: "low" | "medium" | "high" | "xhigh" | "max" | null;
818
1098
  default_model: string | null;
819
1099
  max_rounds: number | null;
1100
+ profile_policy: {
1101
+ limit_action: "ask" | "fail" | "rotate";
1102
+ rotation_eligible: string[];
1103
+ headroom_threshold: number;
1104
+ };
820
1105
  tools_allow: string[];
821
1106
  tools_deny: string[];
822
1107
  }>;
@@ -853,17 +1138,37 @@ export declare const ResolvedConfig: z.ZodObject<{
853
1138
  reviewer_timeout_ms: number;
854
1139
  harness_inactivity_timeout_ms: number;
855
1140
  };
1141
+ retention: {
1142
+ runs_max_age_days: number;
1143
+ reviews_max_age_days: number;
1144
+ keep_last_runs_per_project: number;
1145
+ };
1146
+ credential_profiles: {
1147
+ profile_id: string;
1148
+ harness_id: string;
1149
+ display_name: string;
1150
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
1151
+ isolation_locator: string | null;
1152
+ secret_ref: string | null;
1153
+ enabled: boolean;
1154
+ created_at: string | null;
1155
+ }[];
856
1156
  }, {
857
1157
  version?: 1 | undefined;
858
1158
  harnesses?: Record<string, {
859
1159
  fallback_model?: string | null | undefined;
860
- max_turns?: number | null | undefined;
1160
+ enabled?: boolean | undefined;
861
1161
  web?: "off" | "auto" | "cached" | "live" | undefined;
1162
+ max_turns?: number | null | undefined;
862
1163
  auth_preference?: "auto" | "subscription" | "api_key" | undefined;
863
- enabled?: boolean | undefined;
864
1164
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
865
1165
  default_model?: string | null | undefined;
866
1166
  max_rounds?: number | null | undefined;
1167
+ profile_policy?: {
1168
+ limit_action?: "ask" | "fail" | "rotate" | undefined;
1169
+ rotation_eligible?: string[] | undefined;
1170
+ headroom_threshold?: number | undefined;
1171
+ } | undefined;
867
1172
  tools_allow?: string[] | undefined;
868
1173
  tools_deny?: string[] | undefined;
869
1174
  }> | undefined;
@@ -900,6 +1205,21 @@ export declare const ResolvedConfig: z.ZodObject<{
900
1205
  reviewer_timeout_ms?: number | undefined;
901
1206
  harness_inactivity_timeout_ms?: number | undefined;
902
1207
  } | undefined;
1208
+ retention?: {
1209
+ runs_max_age_days?: number | undefined;
1210
+ reviews_max_age_days?: number | undefined;
1211
+ keep_last_runs_per_project?: number | undefined;
1212
+ } | undefined;
1213
+ credential_profiles?: {
1214
+ profile_id: string;
1215
+ harness_id: string;
1216
+ display_name: string;
1217
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
1218
+ isolation_locator?: string | null | undefined;
1219
+ secret_ref?: string | null | undefined;
1220
+ enabled?: boolean | undefined;
1221
+ created_at?: string | null | undefined;
1222
+ }[] | undefined;
903
1223
  }>;
904
1224
  sources: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
905
1225
  }, "strip", z.ZodTypeAny, {
@@ -942,13 +1262,18 @@ export declare const ResolvedConfig: z.ZodObject<{
942
1262
  version: 1;
943
1263
  harnesses: Record<string, {
944
1264
  fallback_model: string | null;
945
- max_turns: number | null;
1265
+ enabled: boolean;
946
1266
  web: "off" | "auto" | "cached" | "live";
1267
+ max_turns: number | null;
947
1268
  auth_preference: "auto" | "subscription" | "api_key";
948
- enabled: boolean;
949
1269
  effort: "low" | "medium" | "high" | "xhigh" | "max" | null;
950
1270
  default_model: string | null;
951
1271
  max_rounds: number | null;
1272
+ profile_policy: {
1273
+ limit_action: "ask" | "fail" | "rotate";
1274
+ rotation_eligible: string[];
1275
+ headroom_threshold: number;
1276
+ };
952
1277
  tools_allow: string[];
953
1278
  tools_deny: string[];
954
1279
  }>;
@@ -985,6 +1310,21 @@ export declare const ResolvedConfig: z.ZodObject<{
985
1310
  reviewer_timeout_ms: number;
986
1311
  harness_inactivity_timeout_ms: number;
987
1312
  };
1313
+ retention: {
1314
+ runs_max_age_days: number;
1315
+ reviews_max_age_days: number;
1316
+ keep_last_runs_per_project: number;
1317
+ };
1318
+ credential_profiles: {
1319
+ profile_id: string;
1320
+ harness_id: string;
1321
+ display_name: string;
1322
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
1323
+ isolation_locator: string | null;
1324
+ secret_ref: string | null;
1325
+ enabled: boolean;
1326
+ created_at: string | null;
1327
+ }[];
988
1328
  };
989
1329
  sources: string[];
990
1330
  }, {
@@ -1027,13 +1367,18 @@ export declare const ResolvedConfig: z.ZodObject<{
1027
1367
  version?: 1 | undefined;
1028
1368
  harnesses?: Record<string, {
1029
1369
  fallback_model?: string | null | undefined;
1030
- max_turns?: number | null | undefined;
1370
+ enabled?: boolean | undefined;
1031
1371
  web?: "off" | "auto" | "cached" | "live" | undefined;
1372
+ max_turns?: number | null | undefined;
1032
1373
  auth_preference?: "auto" | "subscription" | "api_key" | undefined;
1033
- enabled?: boolean | undefined;
1034
1374
  effort?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
1035
1375
  default_model?: string | null | undefined;
1036
1376
  max_rounds?: number | null | undefined;
1377
+ profile_policy?: {
1378
+ limit_action?: "ask" | "fail" | "rotate" | undefined;
1379
+ rotation_eligible?: string[] | undefined;
1380
+ headroom_threshold?: number | undefined;
1381
+ } | undefined;
1037
1382
  tools_allow?: string[] | undefined;
1038
1383
  tools_deny?: string[] | undefined;
1039
1384
  }> | undefined;
@@ -1070,6 +1415,21 @@ export declare const ResolvedConfig: z.ZodObject<{
1070
1415
  reviewer_timeout_ms?: number | undefined;
1071
1416
  harness_inactivity_timeout_ms?: number | undefined;
1072
1417
  } | undefined;
1418
+ retention?: {
1419
+ runs_max_age_days?: number | undefined;
1420
+ reviews_max_age_days?: number | undefined;
1421
+ keep_last_runs_per_project?: number | undefined;
1422
+ } | undefined;
1423
+ credential_profiles?: {
1424
+ profile_id: string;
1425
+ harness_id: string;
1426
+ display_name: string;
1427
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
1428
+ isolation_locator?: string | null | undefined;
1429
+ secret_ref?: string | null | undefined;
1430
+ enabled?: boolean | undefined;
1431
+ created_at?: string | null | undefined;
1432
+ }[] | undefined;
1073
1433
  };
1074
1434
  sources?: string[] | undefined;
1075
1435
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,aAAa,gCAIvB,CAAC;AACJ,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCvB,CAAC;AACJ,MAAM,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