@claudexor/schema 3.0.4 → 3.1.1

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 (146) hide show
  1. package/dist/agent-capabilities.d.ts +45 -8
  2. package/dist/agent-capabilities.d.ts.map +1 -1
  3. package/dist/agent-capabilities.js +14 -0
  4. package/dist/agent-capabilities.js.map +1 -1
  5. package/dist/apply-eligibility.d.ts +384 -18
  6. package/dist/apply-eligibility.d.ts.map +1 -1
  7. package/dist/apply-eligibility.js +20 -1
  8. package/dist/apply-eligibility.js.map +1 -1
  9. package/dist/budget.d.ts +84 -9
  10. package/dist/budget.d.ts.map +1 -1
  11. package/dist/budget.js +46 -0
  12. package/dist/budget.js.map +1 -1
  13. package/dist/config.d.ts +97 -65
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +12 -1
  16. package/dist/config.js.map +1 -1
  17. package/dist/control-operation-responses.d.ts +311 -89
  18. package/dist/control-operation-responses.d.ts.map +1 -1
  19. package/dist/control-operation-responses.js +33 -3
  20. package/dist/control-operation-responses.js.map +1 -1
  21. package/dist/control-run-detail.d.ts +613 -163
  22. package/dist/control-run-detail.d.ts.map +1 -1
  23. package/dist/control-run-detail.js +28 -2
  24. package/dist/control-run-detail.js.map +1 -1
  25. package/dist/control-run-retry.d.ts +1 -1
  26. package/dist/control-run-scope.d.ts +1 -1
  27. package/dist/control-thread-apply.d.ts +10 -0
  28. package/dist/control-thread-apply.d.ts.map +1 -1
  29. package/dist/control.d.ts +791 -232
  30. package/dist/control.d.ts.map +1 -1
  31. package/dist/control.js +76 -2
  32. package/dist/control.js.map +1 -1
  33. package/dist/decision.d.ts +205 -9
  34. package/dist/decision.d.ts.map +1 -1
  35. package/dist/decision.js +69 -1
  36. package/dist/decision.js.map +1 -1
  37. package/dist/deep-scan.d.ts +27 -0
  38. package/dist/deep-scan.d.ts.map +1 -0
  39. package/dist/deep-scan.js +27 -0
  40. package/dist/deep-scan.js.map +1 -0
  41. package/dist/delivery.d.ts +13 -0
  42. package/dist/delivery.d.ts.map +1 -1
  43. package/dist/delivery.js +15 -0
  44. package/dist/delivery.js.map +1 -1
  45. package/dist/effort.d.ts +132 -0
  46. package/dist/effort.d.ts.map +1 -0
  47. package/dist/effort.js +167 -0
  48. package/dist/effort.js.map +1 -0
  49. package/dist/events.d.ts +59 -4
  50. package/dist/events.d.ts.map +1 -1
  51. package/dist/events.js +91 -0
  52. package/dist/events.js.map +1 -1
  53. package/dist/gate.d.ts +2 -2
  54. package/dist/harness.d.ts +209 -28
  55. package/dist/harness.d.ts.map +1 -1
  56. package/dist/harness.js +107 -14
  57. package/dist/harness.js.map +1 -1
  58. package/dist/index.d.ts +4 -0
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +4 -0
  61. package/dist/index.js.map +1 -1
  62. package/dist/operation.d.ts +193 -10
  63. package/dist/operation.d.ts.map +1 -1
  64. package/dist/operation.js +45 -0
  65. package/dist/operation.js.map +1 -1
  66. package/dist/output-schema-dialect.d.ts +22 -0
  67. package/dist/output-schema-dialect.d.ts.map +1 -0
  68. package/dist/output-schema-dialect.js +37 -0
  69. package/dist/output-schema-dialect.js.map +1 -0
  70. package/dist/output-schema.d.ts +26 -2
  71. package/dist/output-schema.d.ts.map +1 -1
  72. package/dist/output-schema.js +313 -16
  73. package/dist/output-schema.js.map +1 -1
  74. package/dist/plan.d.ts +2 -2
  75. package/dist/problem.d.ts +3 -3
  76. package/dist/project.d.ts +47 -12
  77. package/dist/project.d.ts.map +1 -1
  78. package/dist/project.js +32 -0
  79. package/dist/project.js.map +1 -1
  80. package/dist/readiness.d.ts +62 -7
  81. package/dist/readiness.d.ts.map +1 -1
  82. package/dist/recovery.d.ts +14 -14
  83. package/dist/review.d.ts +7 -7
  84. package/dist/route.d.ts +2 -2
  85. package/dist/setup.d.ts +288 -94
  86. package/dist/setup.d.ts.map +1 -1
  87. package/dist/setup.js +90 -6
  88. package/dist/setup.js.map +1 -1
  89. package/dist/status-projection.d.ts +79 -4
  90. package/dist/status-projection.d.ts.map +1 -1
  91. package/dist/status-projection.js +161 -4
  92. package/dist/status-projection.js.map +1 -1
  93. package/dist/task.d.ts +70 -53
  94. package/dist/task.d.ts.map +1 -1
  95. package/dist/task.js +18 -8
  96. package/dist/task.js.map +1 -1
  97. package/dist/telemetry.d.ts +795 -32
  98. package/dist/telemetry.d.ts.map +1 -1
  99. package/dist/telemetry.js +177 -4
  100. package/dist/telemetry.js.map +1 -1
  101. package/dist/tool-ref.d.ts +14 -0
  102. package/dist/tool-ref.d.ts.map +1 -1
  103. package/dist/tool-ref.js +15 -0
  104. package/dist/tool-ref.js.map +1 -1
  105. package/dist/work-report.d.ts +131 -0
  106. package/dist/work-report.d.ts.map +1 -0
  107. package/dist/work-report.js +124 -0
  108. package/dist/work-report.js.map +1 -0
  109. package/dist/workspace.d.ts +2 -2
  110. package/generated/AgentCapabilityCatalog.schema.json +39 -8
  111. package/generated/ControlApplyCheckResponse.schema.json +5 -0
  112. package/generated/ControlDeliveryResponse.schema.json +14 -0
  113. package/generated/ControlHarnessListResponse.schema.json +64 -9
  114. package/generated/ControlHarnessSettingsPatch.schema.json +4 -8
  115. package/generated/ControlOperationCatalog.schema.json +74 -0
  116. package/generated/ControlOperationDescriptor.schema.json +74 -0
  117. package/generated/ControlOperationParameter.schema.json +75 -0
  118. package/generated/ControlProjectRemoveReceipt.schema.json +58 -0
  119. package/generated/ControlRunAgainDraft.schema.json +14 -7
  120. package/generated/ControlRunDetail.schema.json +406 -16
  121. package/generated/ControlRunListResponse.schema.json +232 -10
  122. package/generated/ControlRunStartRequest.schema.json +14 -7
  123. package/generated/ControlRunSummary.schema.json +218 -9
  124. package/generated/ControlSettingsSnapshot.schema.json +4 -8
  125. package/generated/ControlSettingsUpdateRequest.schema.json +4 -8
  126. package/generated/ControlSetupJobCreateRequest.schema.json +2 -1
  127. package/generated/ControlSetupJobEvent.schema.json +28 -0
  128. package/generated/ControlSetupJobSnapshot.schema.json +28 -0
  129. package/generated/ControlThreadApplyResponse.schema.json +14 -0
  130. package/generated/ControlThreadDetail.schema.json +94 -1
  131. package/generated/ControlThreadTurnRequest.schema.json +14 -7
  132. package/generated/DecisionRecord.schema.json +178 -2
  133. package/generated/GlobalConfig.schema.json +4 -8
  134. package/generated/HarnessEvent.schema.json +79 -1
  135. package/generated/HarnessManifest.schema.json +64 -9
  136. package/generated/HarnessStatusDto.schema.json +64 -9
  137. package/generated/McpRunHandleResult.schema.json +286 -1
  138. package/generated/McpRunToolResult.schema.json +171 -1
  139. package/generated/ProjectConfig.schema.json +26 -0
  140. package/generated/RoutePoolDegradedPayload.schema.json +79 -0
  141. package/generated/RunEvent.schema.json +8 -1
  142. package/generated/RunFailure.schema.json +23 -1
  143. package/generated/RunTelemetry.schema.json +376 -1
  144. package/generated/StructuredOutputConformance.schema.json +83 -0
  145. package/generated/TaskContract.schema.json +13 -1
  146. package/package.json +2 -2
@@ -0,0 +1,79 @@
1
+ {
2
+ "$ref": "#/definitions/RoutePoolDegradedPayload",
3
+ "definitions": {
4
+ "RoutePoolDegradedPayload": {
5
+ "type": "object",
6
+ "properties": {
7
+ "requested_harnesses": {
8
+ "type": "array",
9
+ "items": {
10
+ "type": "string"
11
+ },
12
+ "description": "The pool the resolver considered (explicit ids or auto-derived)."
13
+ },
14
+ "effective_harnesses": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string"
18
+ },
19
+ "description": "Distinct harnesses that actually route, in attempt order."
20
+ },
21
+ "requested_n": {
22
+ "type": "integer",
23
+ "description": "The requested candidate width for this run."
24
+ },
25
+ "effective_n": {
26
+ "type": "integer",
27
+ "description": "Distinct candidates that will run; never inflated by duplication."
28
+ },
29
+ "dropped_lanes": {
30
+ "type": "array",
31
+ "items": {
32
+ "type": "object",
33
+ "properties": {
34
+ "harness_id": {
35
+ "type": "string",
36
+ "description": "The dropped lane's harness id."
37
+ },
38
+ "stage": {
39
+ "type": "string",
40
+ "enum": [
41
+ "discovery",
42
+ "settings",
43
+ "credential",
44
+ "doctor",
45
+ "capability",
46
+ "access",
47
+ "web",
48
+ "attachment"
49
+ ],
50
+ "description": "The routing stage at which an auto-pool lane was dropped."
51
+ },
52
+ "detail": {
53
+ "type": "string",
54
+ "description": "Redacted human reason the lane was dropped."
55
+ }
56
+ },
57
+ "required": [
58
+ "harness_id",
59
+ "stage",
60
+ "detail"
61
+ ],
62
+ "additionalProperties": false
63
+ },
64
+ "description": "Every lane excluded from the auto pool, with its typed stage and reason."
65
+ }
66
+ },
67
+ "required": [
68
+ "requested_harnesses",
69
+ "effective_harnesses",
70
+ "requested_n",
71
+ "effective_n",
72
+ "dropped_lanes"
73
+ ],
74
+ "additionalProperties": false,
75
+ "description": "Typed payload for route.pool.degraded: the requested-vs-effective route receipt for an auto pool that dropped lanes or clamped width, validated before being stamped onto the RunEvent payload."
76
+ }
77
+ },
78
+ "$schema": "http://json-schema.org/draft-07/schema#"
79
+ }
@@ -35,6 +35,7 @@
35
35
  "task.contract.created",
36
36
  "context.pack.created",
37
37
  "project.git.initialized",
38
+ "project.claude_bridge.created",
38
39
  "budget.lease.created",
39
40
  "budget.observation",
40
41
  "budget.cash",
@@ -53,6 +54,7 @@
53
54
  "route.transient.exhausted",
54
55
  "route.fallback.auth_switched",
55
56
  "route.primary.diverged",
57
+ "route.pool.degraded",
56
58
  "session.continuity",
57
59
  "interaction.requested",
58
60
  "interaction.answered",
@@ -66,10 +68,13 @@
66
68
  "council.member.failed",
67
69
  "council.merged",
68
70
  "budget.quota_pressure",
71
+ "delegation.belt.unavailable",
69
72
  "output.ready",
70
73
  "gate.started",
71
74
  "gate.completed",
75
+ "review.preflight",
72
76
  "review.started",
77
+ "review.skipped",
73
78
  "reviewer.started",
74
79
  "reviewer.first_event",
75
80
  "reviewer.auth_switched",
@@ -86,7 +91,9 @@
86
91
  "control.rejected",
87
92
  "run.blocked",
88
93
  "run.completed",
89
- "run.failed"
94
+ "run.failed",
95
+ "run.continuation",
96
+ "run.continuation.denied"
90
97
  ],
91
98
  "description": "Type of an append-only run event, covering run lifecycle, contract/context creation, budget, routing fallbacks, harness activity, interactions, gates, review, arbitration, work products, and control verbs."
92
99
  },
@@ -17,6 +17,7 @@
17
17
  "auth",
18
18
  "harness_unavailable",
19
19
  "harness_error",
20
+ "config_error",
20
21
  "budget",
21
22
  "policy",
22
23
  "cancelled",
@@ -24,7 +25,28 @@
24
25
  "unknown"
25
26
  ],
26
27
  "default": "unknown",
27
- "description": "Typed failure category (validation, project, auth, harness, budget, policy, cancelled, internal, unknown)."
28
+ "description": "Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness."
29
+ },
30
+ "code": {
31
+ "anyOf": [
32
+ {
33
+ "type": "string",
34
+ "enum": [
35
+ "finite_zero",
36
+ "hard_cap",
37
+ "estimate_headroom",
38
+ "unknown_paid_in_flight",
39
+ "budget_overshoot",
40
+ "cost_unverifiable"
41
+ ],
42
+ "description": "Machine-readable failure sub-code within a RunFailure category (today the typed budget-denial reasons produced by the budget ledger)."
43
+ },
44
+ {
45
+ "type": "null"
46
+ }
47
+ ],
48
+ "description": "Machine-readable failure sub-code within the category (today the typed budget-denial reason from the ledger); null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage.",
49
+ "default": null
28
50
  },
29
51
  "harnessId": {
30
52
  "type": [
@@ -135,6 +135,16 @@
135
135
  "description": "Web-evidence verdict for an attempt/run: none (no web activity), attempted, satisfied (required evidence produced), failed, or unverified.",
136
136
  "default": "none"
137
137
  },
138
+ "verification": {
139
+ "type": "string",
140
+ "enum": [
141
+ "verified",
142
+ "dispatched",
143
+ "none"
144
+ ],
145
+ "default": "none",
146
+ "description": "Retrieval strength of the web evidence: verified (typed retrieval), dispatched (completed but no typed outcome), or none."
147
+ },
138
148
  "tool": {
139
149
  "type": [
140
150
  "string",
@@ -320,6 +330,9 @@
320
330
  "status": {
321
331
  "$ref": "#/definitions/RunTelemetry/properties/web/properties/status"
322
332
  },
333
+ "verification": {
334
+ "$ref": "#/definitions/RunTelemetry/properties/web/properties/verification"
335
+ },
323
336
  "tool": {
324
337
  "$ref": "#/definitions/RunTelemetry/properties/web/properties/tool"
325
338
  },
@@ -430,7 +443,26 @@
430
443
  "unknown"
431
444
  ],
432
445
  "default": "unknown",
433
- "description": "Kind of transient failure."
446
+ "description": "Fine-grained kind of transient failure (adapter-declared)."
447
+ },
448
+ "category": {
449
+ "type": "string",
450
+ "enum": [
451
+ "timeout",
452
+ "rate_limited",
453
+ "auth_failed",
454
+ "capability_refused",
455
+ "process_crash",
456
+ "config_error",
457
+ "unknown_harness_error"
458
+ ],
459
+ "description": "Typed failure category (GH #31) the retry policy and required-actions read; orthogonal to kind.",
460
+ "default": "unknown_harness_error"
461
+ },
462
+ "retryable": {
463
+ "type": "boolean",
464
+ "default": false,
465
+ "description": "Whether the classified category is retryable (the centralized retry-policy gate)."
434
466
  },
435
467
  "retry_delay_ms": {
436
468
  "anyOf": [
@@ -444,6 +476,34 @@
444
476
  ],
445
477
  "default": null,
446
478
  "description": "Suggested retry delay in milliseconds, when reported."
479
+ },
480
+ "http_status": {
481
+ "anyOf": [
482
+ {
483
+ "type": "integer"
484
+ },
485
+ {
486
+ "type": "null"
487
+ }
488
+ ],
489
+ "default": null,
490
+ "description": "Vendor HTTP status code disclosed by the error, when any; null otherwise."
491
+ },
492
+ "signal": {
493
+ "type": [
494
+ "string",
495
+ "null"
496
+ ],
497
+ "default": null,
498
+ "description": "Process termination signal (e.g. SIGKILL) when a crash killed the child; null otherwise."
499
+ },
500
+ "adapter_code": {
501
+ "type": [
502
+ "string",
503
+ "null"
504
+ ],
505
+ "default": null,
506
+ "description": "Vendor/adapter error-category code passed verbatim as evidence; null when none."
447
507
  }
448
508
  },
449
509
  "additionalProperties": false,
@@ -478,6 +538,11 @@
478
538
  "default": false,
479
539
  "description": "True when required web evidence was not satisfied."
480
540
  },
541
+ "delegation_belt_unavailable": {
542
+ "type": "boolean",
543
+ "default": false,
544
+ "description": "True when --delegate requested the belt but the injected MCP server failed to become operational (QA-024); blocks a silent clean success."
545
+ },
481
546
  "tool_warnings_count": {
482
547
  "type": "integer",
483
548
  "minimum": 0,
@@ -494,12 +559,163 @@
494
559
  ],
495
560
  "description": "Outcome of one attempt: success, success_with_warnings, blocked, or failed.",
496
561
  "default": "success"
562
+ },
563
+ "work_state": {
564
+ "type": "object",
565
+ "properties": {
566
+ "state": {
567
+ "type": "string",
568
+ "enum": [
569
+ "completed",
570
+ "needs_input",
571
+ "incomplete",
572
+ "unverified"
573
+ ],
574
+ "description": "Folded work state: the WorkReport state, or unverified when no report was obtainable (transport unsupported / lane gated)."
575
+ },
576
+ "source": {
577
+ "type": "string",
578
+ "enum": [
579
+ "constrained",
580
+ "validated",
581
+ "absent"
582
+ ],
583
+ "description": "Provenance of a WorkReport: constrained (native schema transport), validated (whole-answer JSON), or absent (no transport could carry one — a disclosed absence, not a failure)."
584
+ },
585
+ "required_inputs": {
586
+ "type": "array",
587
+ "items": {
588
+ "type": "object",
589
+ "properties": {
590
+ "kind": {
591
+ "type": "string",
592
+ "enum": [
593
+ "file",
594
+ "context",
595
+ "credential",
596
+ "permission",
597
+ "decision",
598
+ "external_dependency"
599
+ ],
600
+ "description": "Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency."
601
+ },
602
+ "locator": {
603
+ "anyOf": [
604
+ {
605
+ "type": "string",
606
+ "maxLength": 512
607
+ },
608
+ {
609
+ "type": "null"
610
+ }
611
+ ],
612
+ "default": null,
613
+ "description": "Concrete pointer to the missing thing (path/url/name); null when unnameable."
614
+ },
615
+ "description": {
616
+ "type": "string",
617
+ "maxLength": 1024,
618
+ "description": "Human-readable description of what is needed and why."
619
+ }
620
+ },
621
+ "required": [
622
+ "kind",
623
+ "description"
624
+ ],
625
+ "additionalProperties": false,
626
+ "description": "One blocking input a needs_input/incomplete WorkReport lists."
627
+ },
628
+ "maxItems": 16,
629
+ "description": "Carried through from a needs_input/incomplete WorkReport for honest disclosure."
630
+ }
631
+ },
632
+ "required": [
633
+ "state",
634
+ "source"
635
+ ],
636
+ "additionalProperties": false,
637
+ "description": "D-16 model-attested work outcome for the attempt (from its WorkReport), orthogonal to status; absent when the route has no work_report transport."
497
638
  }
498
639
  },
499
640
  "additionalProperties": false,
500
641
  "description": "Contract/outcome truth for one attempt; tool errors are tracked separately from deliverable production.",
501
642
  "default": {}
502
643
  },
644
+ "delegation_belt": {
645
+ "type": "object",
646
+ "properties": {
647
+ "requested": {
648
+ "type": "boolean",
649
+ "default": false,
650
+ "description": "A Claudexor delegation belt MCP server was injected into this attempt's sandbox."
651
+ },
652
+ "server_name": {
653
+ "type": [
654
+ "string",
655
+ "null"
656
+ ],
657
+ "default": null,
658
+ "description": "The injected belt MCP server name (as the harness reports it); null when unknown."
659
+ },
660
+ "ready": {
661
+ "type": "boolean",
662
+ "default": false,
663
+ "description": "The harness reported the injected belt MCP server as connected/ready."
664
+ },
665
+ "failed": {
666
+ "type": "boolean",
667
+ "default": false,
668
+ "description": "The harness reported the injected belt MCP server as failed to start."
669
+ },
670
+ "tool_evidence": {
671
+ "type": "boolean",
672
+ "default": false,
673
+ "description": "At least one belt tool (mcp__<server>__*) was actually invoked in this attempt."
674
+ }
675
+ },
676
+ "additionalProperties": false,
677
+ "description": "Runtime readiness receipt for the injected Claudexor delegation belt on one attempt (QA-024)."
678
+ },
679
+ "browser": {
680
+ "type": "object",
681
+ "properties": {
682
+ "requested": {
683
+ "type": "boolean",
684
+ "default": false,
685
+ "description": "The engine armed (injected) the browser MCP for this attempt."
686
+ },
687
+ "server_name": {
688
+ "type": [
689
+ "string",
690
+ "null"
691
+ ],
692
+ "default": null,
693
+ "description": "The injected browser MCP server name; null when not armed."
694
+ },
695
+ "attempted": {
696
+ "type": "boolean",
697
+ "default": false,
698
+ "description": "At least one browser MCP tool call (matched to the injected server) occurred."
699
+ },
700
+ "satisfied": {
701
+ "type": "boolean",
702
+ "default": false,
703
+ "description": "At least one browser MCP tool call succeeded (trusted live-web activity)."
704
+ },
705
+ "failed": {
706
+ "type": "boolean",
707
+ "default": false,
708
+ "description": "A browser MCP tool call failed and was not superseded by a success."
709
+ },
710
+ "unused": {
711
+ "type": "boolean",
712
+ "default": false,
713
+ "description": "The browser was armed but never called while generic web evidence satisfied the run (disclosure only; not a failure)."
714
+ }
715
+ },
716
+ "additionalProperties": false,
717
+ "description": "Runtime browser-MCP evidence for one attempt (QA-040)."
718
+ },
503
719
  "usage": {
504
720
  "type": "object",
505
721
  "properties": {
@@ -685,6 +901,165 @@
685
901
  "default": null,
686
902
  "description": "Auth route receipt: requested preference, disclosed effective route/source, deterministic reason, and the disclosing attempt; surfaces project it verbatim."
687
903
  },
904
+ "routing_rationale": {
905
+ "anyOf": [
906
+ {
907
+ "type": "object",
908
+ "properties": {
909
+ "goal": {
910
+ "type": "string",
911
+ "enum": [
912
+ "auto",
913
+ "quality",
914
+ "economy"
915
+ ],
916
+ "description": "Routing objective: pace expiring quota, choose the highest declared quality tier, or minimize incremental paid spend."
917
+ },
918
+ "paid_fallback": {
919
+ "type": "string",
920
+ "enum": [
921
+ "never",
922
+ "when_unavailable",
923
+ "allowed_within_cap"
924
+ ],
925
+ "description": "When a route with incremental paid spend may be used."
926
+ },
927
+ "order": {
928
+ "type": "array",
929
+ "items": {
930
+ "$ref": "#/definitions/RunTelemetry/properties/final_attempt_id/anyOf/0"
931
+ },
932
+ "default": [],
933
+ "description": "Final ranked order, harness ids."
934
+ },
935
+ "dropped": {
936
+ "type": "array",
937
+ "items": {
938
+ "$ref": "#/definitions/RunTelemetry/properties/final_attempt_id/anyOf/0"
939
+ },
940
+ "default": [],
941
+ "description": "Ids removed by paid_fallback or cooldown before ranking."
942
+ },
943
+ "reason": {
944
+ "type": "string",
945
+ "enum": [
946
+ "subscription_entitlement_first",
947
+ "lowest_incremental_cash",
948
+ "quality_tier",
949
+ "expiring_quota_slack",
950
+ "all_incremental_cash_unknown",
951
+ "declared_order"
952
+ ],
953
+ "description": "Typed decisive reason the pool ranked the way it did (QA-034)."
954
+ },
955
+ "entries": {
956
+ "type": "array",
957
+ "items": {
958
+ "type": "object",
959
+ "properties": {
960
+ "harness_id": {
961
+ "type": "string",
962
+ "minLength": 1,
963
+ "description": "Candidate harness id."
964
+ },
965
+ "billing_knowledge": {
966
+ "type": "string",
967
+ "enum": [
968
+ "proven_zero",
969
+ "subscription_entitlement",
970
+ "metered",
971
+ "unknown"
972
+ ],
973
+ "description": "Effective billing knowledge used to rank it."
974
+ },
975
+ "incremental_cost_usd": {
976
+ "anyOf": [
977
+ {
978
+ "type": "number",
979
+ "minimum": 0
980
+ },
981
+ {
982
+ "type": "null"
983
+ }
984
+ ],
985
+ "default": null,
986
+ "description": "Known incremental cash cost, when any; null when unknown."
987
+ },
988
+ "eligible": {
989
+ "type": "boolean",
990
+ "description": "Whether the candidate survived paid_fallback/cooldown filtering."
991
+ }
992
+ },
993
+ "required": [
994
+ "harness_id",
995
+ "billing_knowledge",
996
+ "eligible"
997
+ ],
998
+ "additionalProperties": false,
999
+ "description": "Per-candidate billing/cost tuple in the routing rationale (QA-034)."
1000
+ },
1001
+ "default": []
1002
+ }
1003
+ },
1004
+ "required": [
1005
+ "goal",
1006
+ "paid_fallback",
1007
+ "reason"
1008
+ ],
1009
+ "additionalProperties": false,
1010
+ "description": "Typed routing rationale recorded once at pool ordering (QA-034)."
1011
+ },
1012
+ {
1013
+ "type": "null"
1014
+ }
1015
+ ],
1016
+ "description": "Typed routing rationale recorded once at pool ordering (QA-034); null on legacy artifacts or when no ranking was computed.",
1017
+ "default": null
1018
+ },
1019
+ "deep_scan_synthesis": {
1020
+ "anyOf": [
1021
+ {
1022
+ "type": "object",
1023
+ "properties": {
1024
+ "status": {
1025
+ "type": "string",
1026
+ "enum": [
1027
+ "succeeded",
1028
+ "failed",
1029
+ "skipped"
1030
+ ],
1031
+ "description": "succeeded = reducer merged the scouts; failed = honest raw bundle; skipped = single report, no merge."
1032
+ },
1033
+ "reducer_attempt_id": {
1034
+ "type": [
1035
+ "string",
1036
+ "null"
1037
+ ],
1038
+ "default": null,
1039
+ "description": "The reducer attempt id (roster/cost visible); null when no reducer attempt ran."
1040
+ },
1041
+ "reason": {
1042
+ "type": [
1043
+ "string",
1044
+ "null"
1045
+ ],
1046
+ "default": null,
1047
+ "description": "Why the reducer failed or was skipped; null on a clean merge."
1048
+ }
1049
+ },
1050
+ "required": [
1051
+ "status"
1052
+ ],
1053
+ "additionalProperties": false,
1054
+ "description": "Deep-scan reducer outcome: whether the scout reports were merged into a real synthesis, degraded to an honest raw bundle, or skipped as a single report."
1055
+ },
1056
+ {
1057
+ "type": "null"
1058
+ }
1059
+ ],
1060
+ "description": "Deep-scan reducer outcome (#27); null on non-deep-scan runs and legacy artifacts.",
1061
+ "default": null
1062
+ },
688
1063
  "generated_at": {
689
1064
  "type": "string",
690
1065
  "minLength": 1,
@@ -0,0 +1,83 @@
1
+ {
2
+ "$ref": "#/definitions/StructuredOutputConformance",
3
+ "definitions": {
4
+ "StructuredOutputConformance": {
5
+ "type": "object",
6
+ "properties": {
7
+ "schema_version": {
8
+ "type": "number",
9
+ "const": 2,
10
+ "description": "Schema version of the artifact; bumped on breaking ABI changes."
11
+ },
12
+ "schema_dialect": {
13
+ "anyOf": [
14
+ {
15
+ "type": "string",
16
+ "enum": [
17
+ "draft-07",
18
+ "draft-2020-12"
19
+ ],
20
+ "description": "JSON Schema dialect selected for structured-output validation."
21
+ },
22
+ {
23
+ "type": "null"
24
+ }
25
+ ],
26
+ "description": "Dialect used to compile and validate the caller schema; null only for legacy receipts.",
27
+ "default": null
28
+ },
29
+ "schema_hash": {
30
+ "anyOf": [
31
+ {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "description": "Content hash in algo:hex form, e.g. \"sha256:abcd...\"."
35
+ },
36
+ {
37
+ "type": "null"
38
+ }
39
+ ],
40
+ "description": "Stable hash of the original caller schema; null only for legacy receipts written before schema identity was recorded.",
41
+ "default": null
42
+ },
43
+ "status": {
44
+ "type": "string",
45
+ "enum": [
46
+ "passed",
47
+ "failed"
48
+ ],
49
+ "description": "Whether the final answer conformed to the run's output schema."
50
+ },
51
+ "reason": {
52
+ "type": [
53
+ "string",
54
+ "null"
55
+ ],
56
+ "default": null,
57
+ "description": "Why conformance failed (missing/unparsable answer, validator errors); null on pass."
58
+ },
59
+ "output_path": {
60
+ "type": [
61
+ "string",
62
+ "null"
63
+ ],
64
+ "default": null,
65
+ "description": "Artifact path of the materialized structured output: final/output.json when conformant, final/output.invalid.json when parsed but non-conformant; null when the answer never parsed."
66
+ },
67
+ "generated_at": {
68
+ "type": "string",
69
+ "minLength": 1,
70
+ "description": "When the receipt was generated."
71
+ }
72
+ },
73
+ "required": [
74
+ "schema_version",
75
+ "status",
76
+ "generated_at"
77
+ ],
78
+ "additionalProperties": false,
79
+ "description": "Structured-output conformance receipt (final/structured_output.yaml): the single engine validator's verdict on the final answer."
80
+ }
81
+ },
82
+ "$schema": "http://json-schema.org/draft-07/schema#"
83
+ }