@open-agent-toolkit/cli 0.2.51 → 0.2.53

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 (218) hide show
  1. package/assets/bundle-metadata.json +1 -1
  2. package/assets/docs/cli-utilities/bootstrap.md +6 -2
  3. package/assets/docs/cli-utilities/tool-packs.md +87 -33
  4. package/assets/docs/provider-sync/commands.md +30 -2
  5. package/assets/docs/provider-sync/config.md +19 -0
  6. package/assets/docs/provider-sync/manifest-and-drift.md +37 -0
  7. package/assets/docs/provider-sync/providers.md +69 -2
  8. package/assets/docs/provider-sync/scope-and-surface.md +44 -0
  9. package/assets/docs/reference/cli-reference.md +1 -0
  10. package/assets/docs/reference/oat-directory-structure.md +11 -4
  11. package/assets/docs/workflows/projects/evidence-layers.md +110 -1
  12. package/assets/docs/workflows/projects/implementation-execution.md +13 -0
  13. package/assets/docs/workflows/projects/orchestration-model.md +18 -0
  14. package/assets/public-package-versions.json +4 -4
  15. package/assets/skills/oat-dispatch-subagents/SKILL.md +57 -1
  16. package/assets/skills/oat-dispatch-subagents/references/record-schema.md +77 -1
  17. package/assets/skills/oat-project-autonomous/references/gate-inventory.md +1 -1
  18. package/assets/skills/oat-project-dispatch-subagents/SKILL.md +24 -1
  19. package/assets/skills/oat-project-document/references/docs/autonomy-contract.md +1 -1
  20. package/assets/skills/oat-project-implement/references/dispatch-and-dry-run.md +11 -0
  21. package/assets/skills/oat-project-implement/references/docs/autonomy-contract.md +1 -1
  22. package/assets/skills/oat-project-plan-writing/SKILL.md +12 -1
  23. package/assets/skills/oat-project-pr-final/references/docs/autonomy-contract.md +1 -1
  24. package/assets/skills/oat-project-quick-start/references/docs/autonomy-contract.md +1 -1
  25. package/assets/skills/oat-project-review-provide/SKILL.md +12 -1
  26. package/assets/skills/oat-project-review-provide-remote/SKILL.md +12 -1
  27. package/dist/agents/canonical/index.d.ts +2 -0
  28. package/dist/agents/canonical/index.d.ts.map +1 -1
  29. package/dist/agents/canonical/index.js +1 -0
  30. package/dist/agents/canonical/resolve.d.ts +45 -0
  31. package/dist/agents/canonical/resolve.d.ts.map +1 -0
  32. package/dist/agents/canonical/resolve.js +175 -0
  33. package/dist/commands/decision/agents-guidance.d.ts +2 -2
  34. package/dist/commands/decision/agents-guidance.d.ts.map +1 -1
  35. package/dist/commands/decision/agents-guidance.js +1 -4
  36. package/dist/commands/decision/index.d.ts.map +1 -1
  37. package/dist/commands/decision/index.js +25 -6
  38. package/dist/commands/docs/init/index.d.ts +7 -1
  39. package/dist/commands/docs/init/index.d.ts.map +1 -1
  40. package/dist/commands/docs/init/index.js +53 -20
  41. package/dist/commands/doctor/index.d.ts +8 -2
  42. package/dist/commands/doctor/index.d.ts.map +1 -1
  43. package/dist/commands/doctor/index.js +157 -46
  44. package/dist/commands/init/index.d.ts +8 -3
  45. package/dist/commands/init/index.d.ts.map +1 -1
  46. package/dist/commands/init/index.js +66 -28
  47. package/dist/commands/init/tools/index.d.ts +12 -12
  48. package/dist/commands/init/tools/index.d.ts.map +1 -1
  49. package/dist/commands/init/tools/index.js +430 -99
  50. package/dist/commands/init/tools/install-state.d.ts +2 -0
  51. package/dist/commands/init/tools/install-state.d.ts.map +1 -1
  52. package/dist/commands/init/tools/install-state.js +11 -0
  53. package/dist/commands/init/tools/project-guidance.d.ts +49 -0
  54. package/dist/commands/init/tools/project-guidance.d.ts.map +1 -0
  55. package/dist/commands/init/tools/project-guidance.js +144 -0
  56. package/dist/commands/init/tools/workflows/index.d.ts +7 -0
  57. package/dist/commands/init/tools/workflows/index.d.ts.map +1 -1
  58. package/dist/commands/init/tools/workflows/index.js +160 -7
  59. package/dist/commands/pjm/index.d.ts.map +1 -1
  60. package/dist/commands/pjm/index.js +28 -3
  61. package/dist/commands/pjm/init.d.ts +5 -0
  62. package/dist/commands/pjm/init.d.ts.map +1 -1
  63. package/dist/commands/pjm/init.js +19 -3
  64. package/dist/commands/project/dispatch/index.d.ts +10 -0
  65. package/dist/commands/project/dispatch/index.d.ts.map +1 -0
  66. package/dist/commands/project/dispatch/index.js +137 -0
  67. package/dist/commands/project/dispatch/record.d.ts +91 -0
  68. package/dist/commands/project/dispatch/record.d.ts.map +1 -0
  69. package/dist/commands/project/dispatch/record.js +402 -0
  70. package/dist/commands/project/index.d.ts.map +1 -1
  71. package/dist/commands/project/index.js +2 -0
  72. package/dist/commands/providers/inspect/inspect.d.ts +8 -1
  73. package/dist/commands/providers/inspect/inspect.d.ts.map +1 -1
  74. package/dist/commands/providers/inspect/inspect.js +146 -26
  75. package/dist/commands/providers/list/list.d.ts +8 -1
  76. package/dist/commands/providers/list/list.d.ts.map +1 -1
  77. package/dist/commands/providers/list/list.js +139 -23
  78. package/dist/commands/providers/providers.types.d.ts +25 -1
  79. package/dist/commands/providers/providers.types.d.ts.map +1 -1
  80. package/dist/commands/providers/set/index.d.ts +9 -1
  81. package/dist/commands/providers/set/index.d.ts.map +1 -1
  82. package/dist/commands/providers/set/index.js +43 -33
  83. package/dist/commands/remove/skill/remove-skill.d.ts.map +1 -1
  84. package/dist/commands/remove/skill/remove-skill.js +11 -0
  85. package/dist/commands/shared/agents-md.d.ts +42 -14
  86. package/dist/commands/shared/agents-md.d.ts.map +1 -1
  87. package/dist/commands/shared/agents-md.js +364 -70
  88. package/dist/commands/status/index.d.ts +8 -3
  89. package/dist/commands/status/index.d.ts.map +1 -1
  90. package/dist/commands/status/index.js +149 -37
  91. package/dist/commands/sync/apply.d.ts.map +1 -1
  92. package/dist/commands/sync/apply.js +220 -29
  93. package/dist/commands/sync/dry-run.d.ts.map +1 -1
  94. package/dist/commands/sync/dry-run.js +30 -6
  95. package/dist/commands/sync/index.d.ts +17 -2
  96. package/dist/commands/sync/index.d.ts.map +1 -1
  97. package/dist/commands/sync/index.js +108 -43
  98. package/dist/commands/sync/sync.types.d.ts +39 -2
  99. package/dist/commands/sync/sync.types.d.ts.map +1 -1
  100. package/dist/commands/sync/sync.utils.d.ts +5 -1
  101. package/dist/commands/sync/sync.utils.d.ts.map +1 -1
  102. package/dist/commands/sync/sync.utils.js +73 -0
  103. package/dist/commands/tools/info/info-tool.d.ts +2 -0
  104. package/dist/commands/tools/info/info-tool.d.ts.map +1 -1
  105. package/dist/commands/tools/info/info-tool.js +34 -12
  106. package/dist/commands/tools/install/index.d.ts.map +1 -1
  107. package/dist/commands/tools/install/index.js +19 -3
  108. package/dist/commands/tools/list/list-tools.d.ts +2 -0
  109. package/dist/commands/tools/list/list-tools.d.ts.map +1 -1
  110. package/dist/commands/tools/list/list-tools.js +36 -7
  111. package/dist/commands/tools/remove/index.d.ts.map +1 -1
  112. package/dist/commands/tools/remove/index.js +150 -21
  113. package/dist/commands/tools/remove/remove-tools.d.ts +20 -0
  114. package/dist/commands/tools/remove/remove-tools.d.ts.map +1 -1
  115. package/dist/commands/tools/remove/remove-tools.js +122 -1
  116. package/dist/commands/tools/shared/format-pack-inventory.d.ts +19 -0
  117. package/dist/commands/tools/shared/format-pack-inventory.d.ts.map +1 -1
  118. package/dist/commands/tools/shared/format-pack-inventory.js +109 -0
  119. package/dist/commands/tools/shared/pack-evidence.d.ts +66 -0
  120. package/dist/commands/tools/shared/pack-evidence.d.ts.map +1 -0
  121. package/dist/commands/tools/shared/pack-evidence.js +132 -0
  122. package/dist/commands/tools/shared/pack-inventory.d.ts +1 -0
  123. package/dist/commands/tools/shared/pack-inventory.d.ts.map +1 -1
  124. package/dist/commands/tools/shared/pack-lifecycle-outcome.d.ts +44 -0
  125. package/dist/commands/tools/shared/pack-lifecycle-outcome.d.ts.map +1 -0
  126. package/dist/commands/tools/shared/pack-lifecycle-outcome.js +91 -0
  127. package/dist/commands/tools/update/index.d.ts.map +1 -1
  128. package/dist/commands/tools/update/index.js +74 -4
  129. package/dist/commands/tools/update/update-tools.d.ts +5 -0
  130. package/dist/commands/tools/update/update-tools.d.ts.map +1 -1
  131. package/dist/commands/tools/update/update-tools.js +64 -2
  132. package/dist/config/oat-config.d.ts +5 -0
  133. package/dist/config/oat-config.d.ts.map +1 -1
  134. package/dist/config/oat-config.js +17 -5
  135. package/dist/config/user-sync-config.d.ts +1 -0
  136. package/dist/config/user-sync-config.d.ts.map +1 -1
  137. package/dist/config/user-sync-config.js +8 -0
  138. package/dist/drift/detector.d.ts +2 -2
  139. package/dist/drift/detector.d.ts.map +1 -1
  140. package/dist/drift/detector.js +18 -0
  141. package/dist/drift/strays.d.ts.map +1 -1
  142. package/dist/drift/strays.js +5 -0
  143. package/dist/engine/collection-sync.d.ts +14 -0
  144. package/dist/engine/collection-sync.d.ts.map +1 -0
  145. package/dist/engine/collection-sync.js +282 -0
  146. package/dist/engine/compute-plan.d.ts +8 -1
  147. package/dist/engine/compute-plan.d.ts.map +1 -1
  148. package/dist/engine/compute-plan.js +303 -12
  149. package/dist/engine/engine.types.d.ts +61 -0
  150. package/dist/engine/engine.types.d.ts.map +1 -1
  151. package/dist/engine/execute-plan.d.ts +22 -2
  152. package/dist/engine/execute-plan.d.ts.map +1 -1
  153. package/dist/engine/execute-plan.js +459 -27
  154. package/dist/engine/index.d.ts +1 -1
  155. package/dist/engine/index.d.ts.map +1 -1
  156. package/dist/engine/index.js +1 -1
  157. package/dist/engine/provider-path-safety.d.ts +1 -0
  158. package/dist/engine/provider-path-safety.d.ts.map +1 -1
  159. package/dist/engine/provider-path-safety.js +15 -0
  160. package/dist/engine/scanner.d.ts +9 -2
  161. package/dist/engine/scanner.d.ts.map +1 -1
  162. package/dist/engine/scanner.js +58 -4
  163. package/dist/fs/io.d.ts +67 -0
  164. package/dist/fs/io.d.ts.map +1 -1
  165. package/dist/fs/io.js +536 -3
  166. package/dist/manifest/index.d.ts +2 -2
  167. package/dist/manifest/index.d.ts.map +1 -1
  168. package/dist/manifest/index.js +1 -1
  169. package/dist/manifest/manager.d.ts +2 -2
  170. package/dist/manifest/manager.d.ts.map +1 -1
  171. package/dist/manifest/manager.js +20 -3
  172. package/dist/manifest/manifest.types.d.ts +704 -13
  173. package/dist/manifest/manifest.types.d.ts.map +1 -1
  174. package/dist/manifest/manifest.types.js +131 -15
  175. package/dist/providers/codex/codec/sync-extension.d.ts +1 -1
  176. package/dist/providers/codex/codec/sync-extension.d.ts.map +1 -1
  177. package/dist/providers/codex/codec/sync-extension.js +48 -17
  178. package/dist/providers/cursor/codec/sync-extension.d.ts +1 -1
  179. package/dist/providers/cursor/codec/sync-extension.d.ts.map +1 -1
  180. package/dist/providers/cursor/codec/sync-extension.js +52 -23
  181. package/dist/providers/identity/absolute-paths.d.ts +68 -0
  182. package/dist/providers/identity/absolute-paths.d.ts.map +1 -0
  183. package/dist/providers/identity/absolute-paths.js +144 -0
  184. package/dist/providers/identity/claude-runtime-observation.d.ts +105 -0
  185. package/dist/providers/identity/claude-runtime-observation.d.ts.map +1 -0
  186. package/dist/providers/identity/claude-runtime-observation.fixtures.d.ts +40 -0
  187. package/dist/providers/identity/claude-runtime-observation.fixtures.d.ts.map +1 -0
  188. package/dist/providers/identity/claude-runtime-observation.fixtures.js +146 -0
  189. package/dist/providers/identity/claude-runtime-observation.js +229 -0
  190. package/dist/providers/identity/codex-runtime-observation.d.ts +75 -0
  191. package/dist/providers/identity/codex-runtime-observation.d.ts.map +1 -0
  192. package/dist/providers/identity/codex-runtime-observation.fixtures.d.ts +37 -0
  193. package/dist/providers/identity/codex-runtime-observation.fixtures.d.ts.map +1 -0
  194. package/dist/providers/identity/codex-runtime-observation.fixtures.js +539 -0
  195. package/dist/providers/identity/codex-runtime-observation.js +255 -0
  196. package/dist/providers/identity/generic-dispatch-record.d.ts +313 -0
  197. package/dist/providers/identity/generic-dispatch-record.d.ts.map +1 -0
  198. package/dist/providers/identity/generic-dispatch-record.js +539 -0
  199. package/dist/providers/identity/oat-dispatch-record.d.ts +1964 -0
  200. package/dist/providers/identity/oat-dispatch-record.d.ts.map +1 -0
  201. package/dist/providers/identity/oat-dispatch-record.js +691 -0
  202. package/dist/providers/identity/runtime-observation.d.ts +100 -0
  203. package/dist/providers/identity/runtime-observation.d.ts.map +1 -0
  204. package/dist/providers/identity/runtime-observation.js +169 -0
  205. package/dist/providers/shared/index.d.ts +2 -0
  206. package/dist/providers/shared/index.d.ts.map +1 -1
  207. package/dist/providers/shared/index.js +1 -0
  208. package/dist/providers/shared/materialization-extension.d.ts +12 -0
  209. package/dist/providers/shared/materialization-extension.d.ts.map +1 -1
  210. package/dist/providers/shared/registry.d.ts +69 -0
  211. package/dist/providers/shared/registry.d.ts.map +1 -0
  212. package/dist/providers/shared/registry.js +252 -0
  213. package/dist/providers/shared/restart-adviser.d.ts +26 -0
  214. package/dist/providers/shared/restart-adviser.d.ts.map +1 -0
  215. package/dist/providers/shared/restart-adviser.js +96 -0
  216. package/dist/shared/types.d.ts +4 -0
  217. package/dist/shared/types.d.ts.map +1 -1
  218. package/package.json +2 -2
@@ -0,0 +1,1964 @@
1
+ import { z } from 'zod';
2
+ import { type GenericDispatchRecord } from './generic-dispatch-record.js';
3
+ /**
4
+ * A pre-start native-selection rejection is a closed event set. It is proof
5
+ * that the native launch surface refused the exact target before any child
6
+ * started, and it is the only category that can authorize one canonical
7
+ * fallback. It is deliberately disjoint from terminal child-outcome codes.
8
+ */
9
+ export declare const QUALIFYING_PRE_START_REJECTION_CODES: readonly ['native-role-unavailable', 'native-target-unavailable', 'native-selector-unsupported', 'native-catalog-unsatisfying', 'capability-unresolved-or-unsupported', 'wrapper-payload-rejected', 'wrapper-launch-refused'];
10
+ export type QualifyingPreStartRejectionCode = (typeof QUALIFYING_PRE_START_REJECTION_CODES)[number];
11
+ /**
12
+ * Immutable configured controls across a fallback link.
13
+ *
14
+ * The rule, so a newly added generic field has a default: a field is immutable
15
+ * when it describes the configured selection, the authorization for that
16
+ * selection, or the evidence that justified it. A field is mutable when it
17
+ * describes this record's own identity, how the work is briefed to its own
18
+ * child, its own launch lifecycle, or its own child's observed behaviour. When
19
+ * a new field is ambiguous, treat it as immutable — a false "controls
20
+ * preserved" claim is worse than a false mismatch.
21
+ *
22
+ * All 46 generic fields are accounted for. The 31 immutable ones are listed
23
+ * below. The 15 mutable ones, each with its reason:
24
+ * - `request_id`: the fallback is a distinct request and must have its own ID.
25
+ * - `caller`: the adapter layer that launches the fallback may differ.
26
+ * - `objective`: a canonical-instruction fallback necessarily rebriefs the work
27
+ * for a generic child rather than a resolved role.
28
+ * - `role_name`, `role_selector`: the fallback deliberately targets a generic
29
+ * worker; substituting the role is the whole point of the approximation, and
30
+ * the resolved role identity is bound separately through `roleInstructions`.
31
+ * - `candidates_considered`: the fallback evaluated a different candidate set.
32
+ * - `selection_reason`: constrained separately — a fallback must declare
33
+ * `pre-start-rejection`, which by definition differs from the trigger's.
34
+ * - `launch_status`, `child_outcome`: each record's own lifecycle state.
35
+ * - `runtime_confirmation`: observation of that record's own child. The
36
+ * fallback is a different child, so equality would be a false assertion.
37
+ * - `diagnostics`: per-record narration. A fallback legitimately explains why
38
+ * it exists.
39
+ * - `continuation_events`: continuation linkage belongs to the record that
40
+ * owns the handle.
41
+ * - `expected_output`, `verification_evidence`, `escalate_when`: the brief
42
+ * given to this record's own child, in the same class as `objective`.
43
+ *
44
+ * Included even though they are evidence rather than controls, because they
45
+ * record why the preserved selection was allowed:
46
+ * - `configured_invocation_evidence`: names the configuration that authorized
47
+ * the preserved route.
48
+ * - `catalog_snapshot`: names the catalog the selection was made against.
49
+ * - `guidance_reference`, `guidance_version`, `guidance_verified_at`,
50
+ * `guidance_status`: name the dated model guidance behind the selection and
51
+ * how fresh it was; a fallback restating `stale` as `fresh` would misstate
52
+ * provenance for a preserved target.
53
+ * - `classification_reason`: the rationale for `task_class`, which is itself a
54
+ * compared authorization control.
55
+ */
56
+ export declare const IMMUTABLE_FALLBACK_CONTROL_FIELDS: readonly ["provider", "selection_source", "model_selector", "model_selector_granularity", "effort_selector", "reasoning_mode_selector", "service_tier_selector", "selected_route", "authority", "authorization_scope", "deadline_seconds", "retry_limit", "payload", "fallback", "catalog_snapshot", "configured_invocation_evidence", "guidance_reference", "guidance_version", "guidance_verified_at", "guidance_status", "dispatch_context", "dispatch_policy", "dispatch_ceiling", "scope", "action", "role_class", "task_class", "model_class_floor", "classification_source", "classification_reason", "floor_satisfaction"];
57
+ /**
58
+ * The mutable complement, kept executable rather than only described above so a
59
+ * newly added generic field fails `covers every generic dispatch field` until
60
+ * somebody records a decision for it.
61
+ */
62
+ export declare const MUTABLE_FALLBACK_CONTROL_FIELDS: readonly ["request_id", "caller", "objective", "role_name", "role_selector", "candidates_considered", "selection_reason", "launch_status", "child_outcome", "runtime_confirmation", "diagnostics", "continuation_events", "expected_output", "verification_evidence", "escalate_when"];
63
+ export declare function canonicalEvidenceJson(value: unknown): string;
64
+ export declare function configuredControlDigest(record: GenericDispatchRecord): string;
65
+ declare const exactTargetSchema: z.ZodObject<{
66
+ provider: z.ZodString;
67
+ modelSelector: z.ZodNullable<z.ZodString>;
68
+ effortSelector: z.ZodNullable<z.ZodString>;
69
+ reasoningModeSelector: z.ZodNullable<z.ZodString>;
70
+ serviceTierSelector: z.ZodNullable<z.ZodString>;
71
+ selectedRoute: z.ZodString;
72
+ }, "strict", z.ZodTypeAny, {
73
+ provider: string;
74
+ modelSelector: string | null;
75
+ effortSelector: string | null;
76
+ reasoningModeSelector: string | null;
77
+ serviceTierSelector: string | null;
78
+ selectedRoute: string;
79
+ }, {
80
+ provider: string;
81
+ modelSelector: string | null;
82
+ effortSelector: string | null;
83
+ reasoningModeSelector: string | null;
84
+ serviceTierSelector: string | null;
85
+ selectedRoute: string;
86
+ }>;
87
+ export type ExactTargetRef = z.infer<typeof exactTargetSchema>;
88
+ declare const fallbackSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
89
+ status: z.ZodLiteral<"not-applicable">;
90
+ reason: z.ZodString;
91
+ }, "strict", z.ZodTypeAny, {
92
+ status: "not-applicable";
93
+ reason: string;
94
+ }, {
95
+ status: "not-applicable";
96
+ reason: string;
97
+ }>, z.ZodObject<{
98
+ status: z.ZodLiteral<"fallback-dispatch">;
99
+ triggerRequestId: z.ZodString;
100
+ fallbackRequestId: z.ZodString;
101
+ trigger: z.ZodLiteral<"pre-start-rejection">;
102
+ fallbackReason: z.ZodString;
103
+ kind: z.ZodLiteral<"canonical-instruction-fresh-child">;
104
+ approximation: z.ZodLiteral<true>;
105
+ preservedTarget: z.ZodObject<{
106
+ provider: z.ZodString;
107
+ modelSelector: z.ZodNullable<z.ZodString>;
108
+ effortSelector: z.ZodNullable<z.ZodString>;
109
+ reasoningModeSelector: z.ZodNullable<z.ZodString>;
110
+ serviceTierSelector: z.ZodNullable<z.ZodString>;
111
+ selectedRoute: z.ZodString;
112
+ }, "strict", z.ZodTypeAny, {
113
+ provider: string;
114
+ modelSelector: string | null;
115
+ effortSelector: string | null;
116
+ reasoningModeSelector: string | null;
117
+ serviceTierSelector: string | null;
118
+ selectedRoute: string;
119
+ }, {
120
+ provider: string;
121
+ modelSelector: string | null;
122
+ effortSelector: string | null;
123
+ reasoningModeSelector: string | null;
124
+ serviceTierSelector: string | null;
125
+ selectedRoute: string;
126
+ }>;
127
+ rejection: z.ZodObject<{
128
+ code: z.ZodEffects<z.ZodString, string, string>;
129
+ rejectedAt: z.ZodString;
130
+ provesNoChildStarted: z.ZodLiteral<true>;
131
+ } & {
132
+ source: z.ZodLiteral<"provider-wrapper">;
133
+ }, "strict", z.ZodTypeAny, {
134
+ code: string;
135
+ rejectedAt: string;
136
+ provesNoChildStarted: true;
137
+ source: "provider-wrapper";
138
+ }, {
139
+ code: string;
140
+ rejectedAt: string;
141
+ provesNoChildStarted: true;
142
+ source: "provider-wrapper";
143
+ }>;
144
+ roleInstructions: z.ZodObject<{
145
+ status: z.ZodLiteral<"resolved">;
146
+ dependency: z.ZodString;
147
+ canonicalRole: z.ZodString;
148
+ tier: z.ZodEnum<["loaded", "user", "project"]>;
149
+ validation: z.ZodEnum<["direct-canonical", "exact-canonical-symlink"]>;
150
+ canonicalPath: z.ZodString;
151
+ selectedPath: z.ZodString;
152
+ roleVersion: z.ZodString;
153
+ contentDigest: z.ZodString;
154
+ candidateMisses: z.ZodArray<z.ZodObject<{
155
+ tier: z.ZodEnum<["loaded", "user", "project"]>;
156
+ candidate: z.ZodString;
157
+ outcome: z.ZodEnum<["missing", "broken-symlink", "escaping-symlink", "noncanonical-copy", "wrong-target", "invalid-role"]>;
158
+ }, "strict", z.ZodTypeAny, {
159
+ tier: "loaded" | "project" | "user";
160
+ candidate: string;
161
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
162
+ }, {
163
+ tier: "loaded" | "project" | "user";
164
+ candidate: string;
165
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
166
+ }>, "many">;
167
+ }, "strict", z.ZodTypeAny, {
168
+ status: "resolved";
169
+ dependency: string;
170
+ canonicalRole: string;
171
+ tier: "loaded" | "project" | "user";
172
+ validation: "direct-canonical" | "exact-canonical-symlink";
173
+ canonicalPath: string;
174
+ selectedPath: string;
175
+ roleVersion: string;
176
+ contentDigest: string;
177
+ candidateMisses: {
178
+ tier: "loaded" | "project" | "user";
179
+ candidate: string;
180
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
181
+ }[];
182
+ }, {
183
+ status: "resolved";
184
+ dependency: string;
185
+ canonicalRole: string;
186
+ tier: "loaded" | "project" | "user";
187
+ validation: "direct-canonical" | "exact-canonical-symlink";
188
+ canonicalPath: string;
189
+ selectedPath: string;
190
+ roleVersion: string;
191
+ contentDigest: string;
192
+ candidateMisses: {
193
+ tier: "loaded" | "project" | "user";
194
+ candidate: string;
195
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
196
+ }[];
197
+ }>;
198
+ }, "strict", z.ZodTypeAny, {
199
+ status: "fallback-dispatch";
200
+ triggerRequestId: string;
201
+ fallbackRequestId: string;
202
+ trigger: "pre-start-rejection";
203
+ fallbackReason: string;
204
+ kind: "canonical-instruction-fresh-child";
205
+ approximation: true;
206
+ preservedTarget: {
207
+ provider: string;
208
+ modelSelector: string | null;
209
+ effortSelector: string | null;
210
+ reasoningModeSelector: string | null;
211
+ serviceTierSelector: string | null;
212
+ selectedRoute: string;
213
+ };
214
+ rejection: {
215
+ code: string;
216
+ rejectedAt: string;
217
+ provesNoChildStarted: true;
218
+ source: "provider-wrapper";
219
+ };
220
+ roleInstructions: {
221
+ status: "resolved";
222
+ dependency: string;
223
+ canonicalRole: string;
224
+ tier: "loaded" | "project" | "user";
225
+ validation: "direct-canonical" | "exact-canonical-symlink";
226
+ canonicalPath: string;
227
+ selectedPath: string;
228
+ roleVersion: string;
229
+ contentDigest: string;
230
+ candidateMisses: {
231
+ tier: "loaded" | "project" | "user";
232
+ candidate: string;
233
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
234
+ }[];
235
+ };
236
+ }, {
237
+ status: "fallback-dispatch";
238
+ triggerRequestId: string;
239
+ fallbackRequestId: string;
240
+ trigger: "pre-start-rejection";
241
+ fallbackReason: string;
242
+ kind: "canonical-instruction-fresh-child";
243
+ approximation: true;
244
+ preservedTarget: {
245
+ provider: string;
246
+ modelSelector: string | null;
247
+ effortSelector: string | null;
248
+ reasoningModeSelector: string | null;
249
+ serviceTierSelector: string | null;
250
+ selectedRoute: string;
251
+ };
252
+ rejection: {
253
+ code: string;
254
+ rejectedAt: string;
255
+ provesNoChildStarted: true;
256
+ source: "provider-wrapper";
257
+ };
258
+ roleInstructions: {
259
+ status: "resolved";
260
+ dependency: string;
261
+ canonicalRole: string;
262
+ tier: "loaded" | "project" | "user";
263
+ validation: "direct-canonical" | "exact-canonical-symlink";
264
+ canonicalPath: string;
265
+ selectedPath: string;
266
+ roleVersion: string;
267
+ contentDigest: string;
268
+ candidateMisses: {
269
+ tier: "loaded" | "project" | "user";
270
+ candidate: string;
271
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
272
+ }[];
273
+ };
274
+ }>]>;
275
+ /**
276
+ * The single canonical observation-value validator. Both the metadata path and
277
+ * a caller-supplied observation resolve through it, so a value can never be
278
+ * stored on one path that would be refused on the other.
279
+ */
280
+ export declare function observationIdentifier(value: unknown): string | null;
281
+ declare const runtimeObservationSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
282
+ status: z.ZodLiteral<"not-reported">;
283
+ }, "strict", z.ZodTypeAny, {
284
+ status: "not-reported";
285
+ }, {
286
+ status: "not-reported";
287
+ }>, z.ZodObject<{
288
+ status: z.ZodLiteral<"reported">;
289
+ provider: z.ZodString;
290
+ childLineage: z.ZodOptional<z.ZodString>;
291
+ role: z.ZodOptional<z.ZodString>;
292
+ model: z.ZodOptional<z.ZodString>;
293
+ effort: z.ZodOptional<z.ZodString>;
294
+ serviceTier: z.ZodOptional<z.ZodString>;
295
+ source: z.ZodString;
296
+ observedAt: z.ZodString;
297
+ match: z.ZodEnum<["matching", "mismatching", "not-comparable"]>;
298
+ /**
299
+ * The axes the verdict actually rests on. Optional so a record written
300
+ * before this field existed still parses, but always written now: a
301
+ * `matching` that rests on one incidental axis is a materially weaker
302
+ * claim than one resting on model and role, and a consumer reading only
303
+ * the scalar `match` cannot tell them apart.
304
+ */
305
+ comparedAxes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
306
+ }, "strict", z.ZodTypeAny, {
307
+ status: "reported";
308
+ provider: string;
309
+ childLineage?: string | undefined;
310
+ role?: string | undefined;
311
+ model?: string | undefined;
312
+ effort?: string | undefined;
313
+ serviceTier?: string | undefined;
314
+ source: string;
315
+ observedAt: string;
316
+ match: "matching" | "mismatching" | "not-comparable";
317
+ comparedAxes?: string[] | undefined;
318
+ }, {
319
+ status: "reported";
320
+ provider: string;
321
+ childLineage?: string | undefined;
322
+ role?: string | undefined;
323
+ model?: string | undefined;
324
+ effort?: string | undefined;
325
+ serviceTier?: string | undefined;
326
+ source: string;
327
+ observedAt: string;
328
+ match: "matching" | "mismatching" | "not-comparable";
329
+ comparedAxes?: string[] | undefined;
330
+ }>]>;
331
+ /**
332
+ * The comparable axes a provider may report about its own child. Every field is
333
+ * optional: a provider that does not expose an axis reports nothing for it, and
334
+ * an axis a provider genuinely does not have reports the literal `not-exposed`.
335
+ * That value is reserved for a truly absent axis: an axis that simply went
336
+ * unreported on a given run is left absent instead, so the two cases stay
337
+ * distinguishable.
338
+ * Nothing here is ever populated from the configured invocation.
339
+ */
340
+ export interface ObservedRuntimeMetadata {
341
+ childLineage?: string | null;
342
+ role?: string | null;
343
+ model?: string | null;
344
+ effort?: string | null;
345
+ serviceTier?: string | null;
346
+ }
347
+ /**
348
+ * The immutable configured invocation an observation is compared against. It is
349
+ * read-only input to the comparison and is never written into an observation.
350
+ *
351
+ * An axis may carry several equally authoritative configured spellings — a
352
+ * canonical role name and the materialized native selector that expresses it,
353
+ * for example. Observing any one of them is agreement; treating the alternate
354
+ * spelling as disagreement would manufacture a false mismatch.
355
+ */
356
+ export type ConfiguredObservationAxis = string | readonly string[] | null | undefined;
357
+ export interface ConfiguredInvocationForObservation {
358
+ role?: ConfiguredObservationAxis;
359
+ model?: ConfiguredObservationAxis;
360
+ effort?: ConfiguredObservationAxis;
361
+ serviceTier?: ConfiguredObservationAxis;
362
+ }
363
+ /** The literal an axis carries when the provider exposes no selectable value. */
364
+ export declare const NOT_EXPOSED_OBSERVATION_VALUE = "not-exposed";
365
+ /**
366
+ * Project the record's immutable configured selection axes for comparison.
367
+ *
368
+ * This is a read-only projection: it never mutates the record, and its output
369
+ * is only ever compared against, never copied into, an observation.
370
+ */
371
+ export declare function configuredInvocationForObservation(record: GenericDispatchRecord): ConfiguredInvocationForObservation;
372
+ export type RuntimeObservationMatch = 'matching' | 'mismatching' | 'not-comparable';
373
+ /**
374
+ * Compare observed metadata with the configured invocation.
375
+ *
376
+ * Only axes both sides report are compared. With no comparable axis the result
377
+ * is `not-comparable` rather than `matching`: silence is never agreement. A
378
+ * mismatch is evidence only — it never authorizes replacement, retry, or
379
+ * fallback.
380
+ */
381
+ export declare function comparedObservationAxes(metadata: ObservedRuntimeMetadata, configured: ConfiguredInvocationForObservation | null | undefined): string[];
382
+ export declare function compareObservedRuntimeMetadata(metadata: ObservedRuntimeMetadata, configured: ConfiguredInvocationForObservation | null | undefined): RuntimeObservationMatch;
383
+ /**
384
+ * Build one source-qualified runtime observation.
385
+ *
386
+ * Absent, empty, or schema-invalid metadata yields `not-reported`. The
387
+ * configured invocation is only ever read for the comparison, so a parse
388
+ * failure cannot copy a requested value into observed state.
389
+ */
390
+ export declare function buildRuntimeObservation(input: {
391
+ provider: string;
392
+ source: string;
393
+ observedAt: string;
394
+ metadata: ObservedRuntimeMetadata | null;
395
+ configured?: ConfiguredInvocationForObservation | null;
396
+ }): RuntimeObservation;
397
+ /**
398
+ * The rejected trigger owns the single-fallback right. Publishing a fallback
399
+ * record requires this durable claim on the trigger first, so two concurrent
400
+ * callers cannot each observe "no fallback yet" and then create their own.
401
+ */
402
+ declare const fallbackClaimSchema: z.ZodObject<{
403
+ fallbackRequestId: z.ZodString;
404
+ claimedAt: z.ZodString;
405
+ }, "strict", z.ZodTypeAny, {
406
+ fallbackRequestId: string;
407
+ claimedAt: string;
408
+ }, {
409
+ fallbackRequestId: string;
410
+ claimedAt: string;
411
+ }>;
412
+ export type FallbackClaim = z.infer<typeof fallbackClaimSchema>;
413
+ export declare const persistedOatDispatchRecordSchema: z.ZodObject<{
414
+ request_id: z.ZodString;
415
+ caller: z.ZodString;
416
+ scope: z.ZodString;
417
+ objective: z.ZodString;
418
+ action: z.ZodString;
419
+ role_name: z.ZodString;
420
+ role_class: z.ZodString;
421
+ provider: z.ZodString;
422
+ dispatch_context: z.ZodString;
423
+ dispatch_policy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
424
+ dispatch_ceiling: z.ZodOptional<z.ZodNullable<z.ZodString>>;
425
+ catalog_snapshot: z.ZodObject<{
426
+ id: z.ZodString;
427
+ source: z.ZodString;
428
+ observed_at: z.ZodString;
429
+ }, "strict", z.ZodTypeAny, {
430
+ id: string;
431
+ source: string;
432
+ observed_at: string;
433
+ }, {
434
+ id: string;
435
+ source: string;
436
+ observed_at: string;
437
+ }>;
438
+ authority: z.ZodString;
439
+ role_selector: z.ZodNullable<z.ZodString>;
440
+ model_selector: z.ZodNullable<z.ZodString>;
441
+ model_selector_granularity: z.ZodNullable<z.ZodString>;
442
+ effort_selector: z.ZodNullable<z.ZodString>;
443
+ reasoning_mode_selector: z.ZodOptional<z.ZodNullable<z.ZodString>>;
444
+ service_tier_selector: z.ZodOptional<z.ZodNullable<z.ZodString>>;
445
+ guidance_reference: z.ZodOptional<z.ZodString>;
446
+ guidance_version: z.ZodOptional<z.ZodString>;
447
+ guidance_verified_at: z.ZodOptional<z.ZodString>;
448
+ guidance_status: z.ZodOptional<z.ZodEnum<["fresh", "review-required", "stale"]>>;
449
+ selection_source: z.ZodEnum<["native-default", "policy-resolved", "explicit-user"]>;
450
+ candidates_considered: z.ZodArray<z.ZodString, "many">;
451
+ selection_reason: z.ZodEnum<["native-catalog", "native-catalog-unsatisfying", "pre-start-rejection", "inherit", "gate-target"]>;
452
+ selected_route: z.ZodString;
453
+ deadline_seconds: z.ZodNumber;
454
+ retry_limit: z.ZodNumber;
455
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
456
+ launch_status: z.ZodEnum<["planned", "accepted", "blocked-before-start"]>;
457
+ child_outcome: z.ZodNullable<z.ZodString>;
458
+ configured_invocation_evidence: z.ZodArray<z.ZodUnknown, "many">;
459
+ runtime_confirmation: z.ZodString;
460
+ diagnostics: z.ZodArray<z.ZodString, "many">;
461
+ continuation_events: z.ZodArray<z.ZodUnknown, "many">;
462
+ fallback: z.ZodOptional<z.ZodObject<{
463
+ mode: z.ZodString;
464
+ target: z.ZodOptional<z.ZodString>;
465
+ allow_below_task_class_floor: z.ZodOptional<z.ZodBoolean>;
466
+ }, "strict", z.ZodTypeAny, {
467
+ mode: string;
468
+ target?: string | undefined;
469
+ allow_below_task_class_floor?: boolean | undefined;
470
+ }, {
471
+ mode: string;
472
+ target?: string | undefined;
473
+ allow_below_task_class_floor?: boolean | undefined;
474
+ }>>;
475
+ task_class: z.ZodOptional<z.ZodEnum<["mechanical-recon", "intelligent-recon", "default-implementation", "hard-reasoning", "consequential"]>>;
476
+ model_class_floor: z.ZodOptional<z.ZodString>;
477
+ classification_source: z.ZodOptional<z.ZodLiteral<"caller">>;
478
+ classification_reason: z.ZodOptional<z.ZodString>;
479
+ floor_satisfaction: z.ZodOptional<z.ZodEnum<["satisfied", "unsatisfied"]>>;
480
+ authorization_scope: z.ZodOptional<z.ZodString>;
481
+ expected_output: z.ZodOptional<z.ZodString>;
482
+ verification_evidence: z.ZodOptional<z.ZodString>;
483
+ escalate_when: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
484
+ } & {
485
+ oat: z.ZodObject<{
486
+ schemaVersion: z.ZodLiteral<1>;
487
+ canonicalRole: z.ZodNullable<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
488
+ status: z.ZodLiteral<"resolved">;
489
+ dependency: z.ZodString;
490
+ canonicalRole: z.ZodString;
491
+ tier: z.ZodEnum<["loaded", "user", "project"]>;
492
+ validation: z.ZodEnum<["direct-canonical", "exact-canonical-symlink"]>;
493
+ canonicalPath: z.ZodString;
494
+ selectedPath: z.ZodString;
495
+ roleVersion: z.ZodString;
496
+ contentDigest: z.ZodString;
497
+ candidateMisses: z.ZodArray<z.ZodObject<{
498
+ tier: z.ZodEnum<["loaded", "user", "project"]>;
499
+ candidate: z.ZodString;
500
+ outcome: z.ZodEnum<["missing", "broken-symlink", "escaping-symlink", "noncanonical-copy", "wrong-target", "invalid-role"]>;
501
+ }, "strict", z.ZodTypeAny, {
502
+ tier: "loaded" | "project" | "user";
503
+ candidate: string;
504
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
505
+ }, {
506
+ tier: "loaded" | "project" | "user";
507
+ candidate: string;
508
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
509
+ }>, "many">;
510
+ }, "strict", z.ZodTypeAny, {
511
+ status: "resolved";
512
+ dependency: string;
513
+ canonicalRole: string;
514
+ tier: "loaded" | "project" | "user";
515
+ validation: "direct-canonical" | "exact-canonical-symlink";
516
+ canonicalPath: string;
517
+ selectedPath: string;
518
+ roleVersion: string;
519
+ contentDigest: string;
520
+ candidateMisses: {
521
+ tier: "loaded" | "project" | "user";
522
+ candidate: string;
523
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
524
+ }[];
525
+ }, {
526
+ status: "resolved";
527
+ dependency: string;
528
+ canonicalRole: string;
529
+ tier: "loaded" | "project" | "user";
530
+ validation: "direct-canonical" | "exact-canonical-symlink";
531
+ canonicalPath: string;
532
+ selectedPath: string;
533
+ roleVersion: string;
534
+ contentDigest: string;
535
+ candidateMisses: {
536
+ tier: "loaded" | "project" | "user";
537
+ candidate: string;
538
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
539
+ }[];
540
+ }>, z.ZodObject<{
541
+ status: z.ZodLiteral<"missing">;
542
+ dependency: z.ZodString;
543
+ canonicalRole: z.ZodString;
544
+ candidateMisses: z.ZodArray<z.ZodObject<{
545
+ tier: z.ZodEnum<["loaded", "user", "project"]>;
546
+ candidate: z.ZodString;
547
+ outcome: z.ZodEnum<["missing", "broken-symlink", "escaping-symlink", "noncanonical-copy", "wrong-target", "invalid-role"]>;
548
+ }, "strict", z.ZodTypeAny, {
549
+ tier: "loaded" | "project" | "user";
550
+ candidate: string;
551
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
552
+ }, {
553
+ tier: "loaded" | "project" | "user";
554
+ candidate: string;
555
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
556
+ }>, "many">;
557
+ recovery: z.ZodArray<z.ZodObject<{
558
+ command: z.ZodString;
559
+ }, "strict", z.ZodTypeAny, {
560
+ command: string;
561
+ }, {
562
+ command: string;
563
+ }>, "many">;
564
+ }, "strict", z.ZodTypeAny, {
565
+ status: "missing";
566
+ dependency: string;
567
+ canonicalRole: string;
568
+ candidateMisses: {
569
+ tier: "loaded" | "project" | "user";
570
+ candidate: string;
571
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
572
+ }[];
573
+ recovery: {
574
+ command: string;
575
+ }[];
576
+ }, {
577
+ status: "missing";
578
+ dependency: string;
579
+ canonicalRole: string;
580
+ candidateMisses: {
581
+ tier: "loaded" | "project" | "user";
582
+ candidate: string;
583
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
584
+ }[];
585
+ recovery: {
586
+ command: string;
587
+ }[];
588
+ }>]>>;
589
+ preStartRejection: z.ZodNullable<z.ZodObject<{
590
+ code: z.ZodEffects<z.ZodString, string, string>;
591
+ rejectedAt: z.ZodString;
592
+ provesNoChildStarted: z.ZodLiteral<true>;
593
+ }, "strict", z.ZodTypeAny, {
594
+ code: string;
595
+ rejectedAt: string;
596
+ provesNoChildStarted: true;
597
+ }, {
598
+ code: string;
599
+ rejectedAt: string;
600
+ provesNoChildStarted: true;
601
+ }>>;
602
+ fallbackClaim: z.ZodDefault<z.ZodNullable<z.ZodObject<{
603
+ fallbackRequestId: z.ZodString;
604
+ claimedAt: z.ZodString;
605
+ }, "strict", z.ZodTypeAny, {
606
+ fallbackRequestId: string;
607
+ claimedAt: string;
608
+ }, {
609
+ fallbackRequestId: string;
610
+ claimedAt: string;
611
+ }>>>;
612
+ fallback: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
613
+ status: z.ZodLiteral<"not-applicable">;
614
+ reason: z.ZodString;
615
+ }, "strict", z.ZodTypeAny, {
616
+ status: "not-applicable";
617
+ reason: string;
618
+ }, {
619
+ status: "not-applicable";
620
+ reason: string;
621
+ }>, z.ZodObject<{
622
+ status: z.ZodLiteral<"fallback-dispatch">;
623
+ triggerRequestId: z.ZodString;
624
+ fallbackRequestId: z.ZodString;
625
+ trigger: z.ZodLiteral<"pre-start-rejection">;
626
+ fallbackReason: z.ZodString;
627
+ kind: z.ZodLiteral<"canonical-instruction-fresh-child">;
628
+ approximation: z.ZodLiteral<true>;
629
+ preservedTarget: z.ZodObject<{
630
+ provider: z.ZodString;
631
+ modelSelector: z.ZodNullable<z.ZodString>;
632
+ effortSelector: z.ZodNullable<z.ZodString>;
633
+ reasoningModeSelector: z.ZodNullable<z.ZodString>;
634
+ serviceTierSelector: z.ZodNullable<z.ZodString>;
635
+ selectedRoute: z.ZodString;
636
+ }, "strict", z.ZodTypeAny, {
637
+ provider: string;
638
+ modelSelector: string | null;
639
+ effortSelector: string | null;
640
+ reasoningModeSelector: string | null;
641
+ serviceTierSelector: string | null;
642
+ selectedRoute: string;
643
+ }, {
644
+ provider: string;
645
+ modelSelector: string | null;
646
+ effortSelector: string | null;
647
+ reasoningModeSelector: string | null;
648
+ serviceTierSelector: string | null;
649
+ selectedRoute: string;
650
+ }>;
651
+ rejection: z.ZodObject<{
652
+ code: z.ZodEffects<z.ZodString, string, string>;
653
+ rejectedAt: z.ZodString;
654
+ provesNoChildStarted: z.ZodLiteral<true>;
655
+ } & {
656
+ source: z.ZodLiteral<"provider-wrapper">;
657
+ }, "strict", z.ZodTypeAny, {
658
+ code: string;
659
+ rejectedAt: string;
660
+ provesNoChildStarted: true;
661
+ source: "provider-wrapper";
662
+ }, {
663
+ code: string;
664
+ rejectedAt: string;
665
+ provesNoChildStarted: true;
666
+ source: "provider-wrapper";
667
+ }>;
668
+ roleInstructions: z.ZodObject<{
669
+ status: z.ZodLiteral<"resolved">;
670
+ dependency: z.ZodString;
671
+ canonicalRole: z.ZodString;
672
+ tier: z.ZodEnum<["loaded", "user", "project"]>;
673
+ validation: z.ZodEnum<["direct-canonical", "exact-canonical-symlink"]>;
674
+ canonicalPath: z.ZodString;
675
+ selectedPath: z.ZodString;
676
+ roleVersion: z.ZodString;
677
+ contentDigest: z.ZodString;
678
+ candidateMisses: z.ZodArray<z.ZodObject<{
679
+ tier: z.ZodEnum<["loaded", "user", "project"]>;
680
+ candidate: z.ZodString;
681
+ outcome: z.ZodEnum<["missing", "broken-symlink", "escaping-symlink", "noncanonical-copy", "wrong-target", "invalid-role"]>;
682
+ }, "strict", z.ZodTypeAny, {
683
+ tier: "loaded" | "project" | "user";
684
+ candidate: string;
685
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
686
+ }, {
687
+ tier: "loaded" | "project" | "user";
688
+ candidate: string;
689
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
690
+ }>, "many">;
691
+ }, "strict", z.ZodTypeAny, {
692
+ status: "resolved";
693
+ dependency: string;
694
+ canonicalRole: string;
695
+ tier: "loaded" | "project" | "user";
696
+ validation: "direct-canonical" | "exact-canonical-symlink";
697
+ canonicalPath: string;
698
+ selectedPath: string;
699
+ roleVersion: string;
700
+ contentDigest: string;
701
+ candidateMisses: {
702
+ tier: "loaded" | "project" | "user";
703
+ candidate: string;
704
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
705
+ }[];
706
+ }, {
707
+ status: "resolved";
708
+ dependency: string;
709
+ canonicalRole: string;
710
+ tier: "loaded" | "project" | "user";
711
+ validation: "direct-canonical" | "exact-canonical-symlink";
712
+ canonicalPath: string;
713
+ selectedPath: string;
714
+ roleVersion: string;
715
+ contentDigest: string;
716
+ candidateMisses: {
717
+ tier: "loaded" | "project" | "user";
718
+ candidate: string;
719
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
720
+ }[];
721
+ }>;
722
+ }, "strict", z.ZodTypeAny, {
723
+ status: "fallback-dispatch";
724
+ triggerRequestId: string;
725
+ fallbackRequestId: string;
726
+ trigger: "pre-start-rejection";
727
+ fallbackReason: string;
728
+ kind: "canonical-instruction-fresh-child";
729
+ approximation: true;
730
+ preservedTarget: {
731
+ provider: string;
732
+ modelSelector: string | null;
733
+ effortSelector: string | null;
734
+ reasoningModeSelector: string | null;
735
+ serviceTierSelector: string | null;
736
+ selectedRoute: string;
737
+ };
738
+ rejection: {
739
+ code: string;
740
+ rejectedAt: string;
741
+ provesNoChildStarted: true;
742
+ source: "provider-wrapper";
743
+ };
744
+ roleInstructions: {
745
+ status: "resolved";
746
+ dependency: string;
747
+ canonicalRole: string;
748
+ tier: "loaded" | "project" | "user";
749
+ validation: "direct-canonical" | "exact-canonical-symlink";
750
+ canonicalPath: string;
751
+ selectedPath: string;
752
+ roleVersion: string;
753
+ contentDigest: string;
754
+ candidateMisses: {
755
+ tier: "loaded" | "project" | "user";
756
+ candidate: string;
757
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
758
+ }[];
759
+ };
760
+ }, {
761
+ status: "fallback-dispatch";
762
+ triggerRequestId: string;
763
+ fallbackRequestId: string;
764
+ trigger: "pre-start-rejection";
765
+ fallbackReason: string;
766
+ kind: "canonical-instruction-fresh-child";
767
+ approximation: true;
768
+ preservedTarget: {
769
+ provider: string;
770
+ modelSelector: string | null;
771
+ effortSelector: string | null;
772
+ reasoningModeSelector: string | null;
773
+ serviceTierSelector: string | null;
774
+ selectedRoute: string;
775
+ };
776
+ rejection: {
777
+ code: string;
778
+ rejectedAt: string;
779
+ provesNoChildStarted: true;
780
+ source: "provider-wrapper";
781
+ };
782
+ roleInstructions: {
783
+ status: "resolved";
784
+ dependency: string;
785
+ canonicalRole: string;
786
+ tier: "loaded" | "project" | "user";
787
+ validation: "direct-canonical" | "exact-canonical-symlink";
788
+ canonicalPath: string;
789
+ selectedPath: string;
790
+ roleVersion: string;
791
+ contentDigest: string;
792
+ candidateMisses: {
793
+ tier: "loaded" | "project" | "user";
794
+ candidate: string;
795
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
796
+ }[];
797
+ };
798
+ }>]>;
799
+ runtimeObservation: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
800
+ status: z.ZodLiteral<"not-reported">;
801
+ }, "strict", z.ZodTypeAny, {
802
+ status: "not-reported";
803
+ }, {
804
+ status: "not-reported";
805
+ }>, z.ZodObject<{
806
+ status: z.ZodLiteral<"reported">;
807
+ provider: z.ZodString;
808
+ childLineage: z.ZodOptional<z.ZodString>;
809
+ role: z.ZodOptional<z.ZodString>;
810
+ model: z.ZodOptional<z.ZodString>;
811
+ effort: z.ZodOptional<z.ZodString>;
812
+ serviceTier: z.ZodOptional<z.ZodString>;
813
+ source: z.ZodString;
814
+ observedAt: z.ZodString;
815
+ match: z.ZodEnum<["matching", "mismatching", "not-comparable"]>;
816
+ /**
817
+ * The axes the verdict actually rests on. Optional so a record written
818
+ * before this field existed still parses, but always written now: a
819
+ * `matching` that rests on one incidental axis is a materially weaker
820
+ * claim than one resting on model and role, and a consumer reading only
821
+ * the scalar `match` cannot tell them apart.
822
+ */
823
+ comparedAxes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
824
+ }, "strict", z.ZodTypeAny, {
825
+ status: "reported";
826
+ provider: string;
827
+ childLineage?: string | undefined;
828
+ role?: string | undefined;
829
+ model?: string | undefined;
830
+ effort?: string | undefined;
831
+ serviceTier?: string | undefined;
832
+ source: string;
833
+ observedAt: string;
834
+ match: "matching" | "mismatching" | "not-comparable";
835
+ comparedAxes?: string[] | undefined;
836
+ }, {
837
+ status: "reported";
838
+ provider: string;
839
+ childLineage?: string | undefined;
840
+ role?: string | undefined;
841
+ model?: string | undefined;
842
+ effort?: string | undefined;
843
+ serviceTier?: string | undefined;
844
+ source: string;
845
+ observedAt: string;
846
+ match: "matching" | "mismatching" | "not-comparable";
847
+ comparedAxes?: string[] | undefined;
848
+ }>]>;
849
+ }, "strict", z.ZodTypeAny, {
850
+ schemaVersion: 1;
851
+ canonicalRole: {
852
+ status: "resolved";
853
+ dependency: string;
854
+ canonicalRole: string;
855
+ tier: "loaded" | "project" | "user";
856
+ validation: "direct-canonical" | "exact-canonical-symlink";
857
+ canonicalPath: string;
858
+ selectedPath: string;
859
+ roleVersion: string;
860
+ contentDigest: string;
861
+ candidateMisses: {
862
+ tier: "loaded" | "project" | "user";
863
+ candidate: string;
864
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
865
+ }[];
866
+ } | {
867
+ status: "missing";
868
+ dependency: string;
869
+ canonicalRole: string;
870
+ candidateMisses: {
871
+ tier: "loaded" | "project" | "user";
872
+ candidate: string;
873
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
874
+ }[];
875
+ recovery: {
876
+ command: string;
877
+ }[];
878
+ } | null;
879
+ preStartRejection: {
880
+ code: string;
881
+ rejectedAt: string;
882
+ provesNoChildStarted: true;
883
+ } | null;
884
+ fallbackClaim: {
885
+ fallbackRequestId: string;
886
+ claimedAt: string;
887
+ } | null;
888
+ fallback: {
889
+ status: "fallback-dispatch";
890
+ triggerRequestId: string;
891
+ fallbackRequestId: string;
892
+ trigger: "pre-start-rejection";
893
+ fallbackReason: string;
894
+ kind: "canonical-instruction-fresh-child";
895
+ approximation: true;
896
+ preservedTarget: {
897
+ provider: string;
898
+ modelSelector: string | null;
899
+ effortSelector: string | null;
900
+ reasoningModeSelector: string | null;
901
+ serviceTierSelector: string | null;
902
+ selectedRoute: string;
903
+ };
904
+ rejection: {
905
+ code: string;
906
+ rejectedAt: string;
907
+ provesNoChildStarted: true;
908
+ source: "provider-wrapper";
909
+ };
910
+ roleInstructions: {
911
+ status: "resolved";
912
+ dependency: string;
913
+ canonicalRole: string;
914
+ tier: "loaded" | "project" | "user";
915
+ validation: "direct-canonical" | "exact-canonical-symlink";
916
+ canonicalPath: string;
917
+ selectedPath: string;
918
+ roleVersion: string;
919
+ contentDigest: string;
920
+ candidateMisses: {
921
+ tier: "loaded" | "project" | "user";
922
+ candidate: string;
923
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
924
+ }[];
925
+ };
926
+ } | {
927
+ status: "not-applicable";
928
+ reason: string;
929
+ };
930
+ runtimeObservation: {
931
+ status: "not-reported";
932
+ } | {
933
+ status: "reported";
934
+ provider: string;
935
+ childLineage?: string | undefined;
936
+ role?: string | undefined;
937
+ model?: string | undefined;
938
+ effort?: string | undefined;
939
+ serviceTier?: string | undefined;
940
+ source: string;
941
+ observedAt: string;
942
+ match: "matching" | "mismatching" | "not-comparable";
943
+ comparedAxes?: string[] | undefined;
944
+ };
945
+ }, {
946
+ schemaVersion: 1;
947
+ canonicalRole: {
948
+ status: "resolved";
949
+ dependency: string;
950
+ canonicalRole: string;
951
+ tier: "loaded" | "project" | "user";
952
+ validation: "direct-canonical" | "exact-canonical-symlink";
953
+ canonicalPath: string;
954
+ selectedPath: string;
955
+ roleVersion: string;
956
+ contentDigest: string;
957
+ candidateMisses: {
958
+ tier: "loaded" | "project" | "user";
959
+ candidate: string;
960
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
961
+ }[];
962
+ } | {
963
+ status: "missing";
964
+ dependency: string;
965
+ canonicalRole: string;
966
+ candidateMisses: {
967
+ tier: "loaded" | "project" | "user";
968
+ candidate: string;
969
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
970
+ }[];
971
+ recovery: {
972
+ command: string;
973
+ }[];
974
+ } | null;
975
+ preStartRejection: {
976
+ code: string;
977
+ rejectedAt: string;
978
+ provesNoChildStarted: true;
979
+ } | null;
980
+ fallbackClaim?: {
981
+ fallbackRequestId: string;
982
+ claimedAt: string;
983
+ } | null | undefined;
984
+ fallback: {
985
+ status: "fallback-dispatch";
986
+ triggerRequestId: string;
987
+ fallbackRequestId: string;
988
+ trigger: "pre-start-rejection";
989
+ fallbackReason: string;
990
+ kind: "canonical-instruction-fresh-child";
991
+ approximation: true;
992
+ preservedTarget: {
993
+ provider: string;
994
+ modelSelector: string | null;
995
+ effortSelector: string | null;
996
+ reasoningModeSelector: string | null;
997
+ serviceTierSelector: string | null;
998
+ selectedRoute: string;
999
+ };
1000
+ rejection: {
1001
+ code: string;
1002
+ rejectedAt: string;
1003
+ provesNoChildStarted: true;
1004
+ source: "provider-wrapper";
1005
+ };
1006
+ roleInstructions: {
1007
+ status: "resolved";
1008
+ dependency: string;
1009
+ canonicalRole: string;
1010
+ tier: "loaded" | "project" | "user";
1011
+ validation: "direct-canonical" | "exact-canonical-symlink";
1012
+ canonicalPath: string;
1013
+ selectedPath: string;
1014
+ roleVersion: string;
1015
+ contentDigest: string;
1016
+ candidateMisses: {
1017
+ tier: "loaded" | "project" | "user";
1018
+ candidate: string;
1019
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1020
+ }[];
1021
+ };
1022
+ } | {
1023
+ status: "not-applicable";
1024
+ reason: string;
1025
+ };
1026
+ runtimeObservation: {
1027
+ status: "not-reported";
1028
+ } | {
1029
+ status: "reported";
1030
+ provider: string;
1031
+ childLineage?: string | undefined;
1032
+ role?: string | undefined;
1033
+ model?: string | undefined;
1034
+ effort?: string | undefined;
1035
+ serviceTier?: string | undefined;
1036
+ source: string;
1037
+ observedAt: string;
1038
+ match: "matching" | "mismatching" | "not-comparable";
1039
+ comparedAxes?: string[] | undefined;
1040
+ };
1041
+ }>;
1042
+ }, "strict", z.ZodTypeAny, {
1043
+ request_id: string;
1044
+ caller: string;
1045
+ scope: string;
1046
+ objective: string;
1047
+ action: string;
1048
+ role_name: string;
1049
+ role_class: string;
1050
+ provider: string;
1051
+ dispatch_context: string;
1052
+ dispatch_policy?: string | null | undefined;
1053
+ dispatch_ceiling?: string | null | undefined;
1054
+ catalog_snapshot: {
1055
+ id: string;
1056
+ source: string;
1057
+ observed_at: string;
1058
+ };
1059
+ authority: string;
1060
+ role_selector: string | null;
1061
+ model_selector: string | null;
1062
+ model_selector_granularity: string | null;
1063
+ effort_selector: string | null;
1064
+ reasoning_mode_selector?: string | null | undefined;
1065
+ service_tier_selector?: string | null | undefined;
1066
+ guidance_reference?: string | undefined;
1067
+ guidance_version?: string | undefined;
1068
+ guidance_verified_at?: string | undefined;
1069
+ guidance_status?: "fresh" | "review-required" | "stale" | undefined;
1070
+ selection_source: "explicit-user" | "native-default" | "policy-resolved";
1071
+ candidates_considered: string[];
1072
+ selection_reason: "gate-target" | "inherit" | "native-catalog" | "native-catalog-unsatisfying" | "pre-start-rejection";
1073
+ selected_route: string;
1074
+ deadline_seconds: number;
1075
+ retry_limit: number;
1076
+ payload: Record<string, unknown>;
1077
+ launch_status: "accepted" | "blocked-before-start" | "planned";
1078
+ child_outcome: string | null;
1079
+ configured_invocation_evidence: unknown[];
1080
+ runtime_confirmation: string;
1081
+ diagnostics: string[];
1082
+ continuation_events: unknown[];
1083
+ fallback?: {
1084
+ mode: string;
1085
+ target?: string | undefined;
1086
+ allow_below_task_class_floor?: boolean | undefined;
1087
+ } | undefined;
1088
+ task_class?: "consequential" | "default-implementation" | "hard-reasoning" | "intelligent-recon" | "mechanical-recon" | undefined;
1089
+ model_class_floor?: string | undefined;
1090
+ classification_source?: "caller" | undefined;
1091
+ classification_reason?: string | undefined;
1092
+ floor_satisfaction?: "satisfied" | "unsatisfied" | undefined;
1093
+ authorization_scope?: string | undefined;
1094
+ expected_output?: string | undefined;
1095
+ verification_evidence?: string | undefined;
1096
+ escalate_when?: string[] | undefined;
1097
+ oat: {
1098
+ schemaVersion: 1;
1099
+ canonicalRole: {
1100
+ status: "resolved";
1101
+ dependency: string;
1102
+ canonicalRole: string;
1103
+ tier: "loaded" | "project" | "user";
1104
+ validation: "direct-canonical" | "exact-canonical-symlink";
1105
+ canonicalPath: string;
1106
+ selectedPath: string;
1107
+ roleVersion: string;
1108
+ contentDigest: string;
1109
+ candidateMisses: {
1110
+ tier: "loaded" | "project" | "user";
1111
+ candidate: string;
1112
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1113
+ }[];
1114
+ } | {
1115
+ status: "missing";
1116
+ dependency: string;
1117
+ canonicalRole: string;
1118
+ candidateMisses: {
1119
+ tier: "loaded" | "project" | "user";
1120
+ candidate: string;
1121
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1122
+ }[];
1123
+ recovery: {
1124
+ command: string;
1125
+ }[];
1126
+ } | null;
1127
+ preStartRejection: {
1128
+ code: string;
1129
+ rejectedAt: string;
1130
+ provesNoChildStarted: true;
1131
+ } | null;
1132
+ fallbackClaim: {
1133
+ fallbackRequestId: string;
1134
+ claimedAt: string;
1135
+ } | null;
1136
+ fallback: {
1137
+ status: "fallback-dispatch";
1138
+ triggerRequestId: string;
1139
+ fallbackRequestId: string;
1140
+ trigger: "pre-start-rejection";
1141
+ fallbackReason: string;
1142
+ kind: "canonical-instruction-fresh-child";
1143
+ approximation: true;
1144
+ preservedTarget: {
1145
+ provider: string;
1146
+ modelSelector: string | null;
1147
+ effortSelector: string | null;
1148
+ reasoningModeSelector: string | null;
1149
+ serviceTierSelector: string | null;
1150
+ selectedRoute: string;
1151
+ };
1152
+ rejection: {
1153
+ code: string;
1154
+ rejectedAt: string;
1155
+ provesNoChildStarted: true;
1156
+ source: "provider-wrapper";
1157
+ };
1158
+ roleInstructions: {
1159
+ status: "resolved";
1160
+ dependency: string;
1161
+ canonicalRole: string;
1162
+ tier: "loaded" | "project" | "user";
1163
+ validation: "direct-canonical" | "exact-canonical-symlink";
1164
+ canonicalPath: string;
1165
+ selectedPath: string;
1166
+ roleVersion: string;
1167
+ contentDigest: string;
1168
+ candidateMisses: {
1169
+ tier: "loaded" | "project" | "user";
1170
+ candidate: string;
1171
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1172
+ }[];
1173
+ };
1174
+ } | {
1175
+ status: "not-applicable";
1176
+ reason: string;
1177
+ };
1178
+ runtimeObservation: {
1179
+ status: "not-reported";
1180
+ } | {
1181
+ status: "reported";
1182
+ provider: string;
1183
+ childLineage?: string | undefined;
1184
+ role?: string | undefined;
1185
+ model?: string | undefined;
1186
+ effort?: string | undefined;
1187
+ serviceTier?: string | undefined;
1188
+ source: string;
1189
+ observedAt: string;
1190
+ match: "matching" | "mismatching" | "not-comparable";
1191
+ comparedAxes?: string[] | undefined;
1192
+ };
1193
+ };
1194
+ }, {
1195
+ request_id: string;
1196
+ caller: string;
1197
+ scope: string;
1198
+ objective: string;
1199
+ action: string;
1200
+ role_name: string;
1201
+ role_class: string;
1202
+ provider: string;
1203
+ dispatch_context: string;
1204
+ dispatch_policy?: string | null | undefined;
1205
+ dispatch_ceiling?: string | null | undefined;
1206
+ catalog_snapshot: {
1207
+ id: string;
1208
+ source: string;
1209
+ observed_at: string;
1210
+ };
1211
+ authority: string;
1212
+ role_selector: string | null;
1213
+ model_selector: string | null;
1214
+ model_selector_granularity: string | null;
1215
+ effort_selector: string | null;
1216
+ reasoning_mode_selector?: string | null | undefined;
1217
+ service_tier_selector?: string | null | undefined;
1218
+ guidance_reference?: string | undefined;
1219
+ guidance_version?: string | undefined;
1220
+ guidance_verified_at?: string | undefined;
1221
+ guidance_status?: "fresh" | "review-required" | "stale" | undefined;
1222
+ selection_source: "explicit-user" | "native-default" | "policy-resolved";
1223
+ candidates_considered: string[];
1224
+ selection_reason: "gate-target" | "inherit" | "native-catalog" | "native-catalog-unsatisfying" | "pre-start-rejection";
1225
+ selected_route: string;
1226
+ deadline_seconds: number;
1227
+ retry_limit: number;
1228
+ payload: Record<string, unknown>;
1229
+ launch_status: "accepted" | "blocked-before-start" | "planned";
1230
+ child_outcome: string | null;
1231
+ configured_invocation_evidence: unknown[];
1232
+ runtime_confirmation: string;
1233
+ diagnostics: string[];
1234
+ continuation_events: unknown[];
1235
+ fallback?: {
1236
+ mode: string;
1237
+ target?: string | undefined;
1238
+ allow_below_task_class_floor?: boolean | undefined;
1239
+ } | undefined;
1240
+ task_class?: "consequential" | "default-implementation" | "hard-reasoning" | "intelligent-recon" | "mechanical-recon" | undefined;
1241
+ model_class_floor?: string | undefined;
1242
+ classification_source?: "caller" | undefined;
1243
+ classification_reason?: string | undefined;
1244
+ floor_satisfaction?: "satisfied" | "unsatisfied" | undefined;
1245
+ authorization_scope?: string | undefined;
1246
+ expected_output?: string | undefined;
1247
+ verification_evidence?: string | undefined;
1248
+ escalate_when?: string[] | undefined;
1249
+ oat: {
1250
+ schemaVersion: 1;
1251
+ canonicalRole: {
1252
+ status: "resolved";
1253
+ dependency: string;
1254
+ canonicalRole: string;
1255
+ tier: "loaded" | "project" | "user";
1256
+ validation: "direct-canonical" | "exact-canonical-symlink";
1257
+ canonicalPath: string;
1258
+ selectedPath: string;
1259
+ roleVersion: string;
1260
+ contentDigest: string;
1261
+ candidateMisses: {
1262
+ tier: "loaded" | "project" | "user";
1263
+ candidate: string;
1264
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1265
+ }[];
1266
+ } | {
1267
+ status: "missing";
1268
+ dependency: string;
1269
+ canonicalRole: string;
1270
+ candidateMisses: {
1271
+ tier: "loaded" | "project" | "user";
1272
+ candidate: string;
1273
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1274
+ }[];
1275
+ recovery: {
1276
+ command: string;
1277
+ }[];
1278
+ } | null;
1279
+ preStartRejection: {
1280
+ code: string;
1281
+ rejectedAt: string;
1282
+ provesNoChildStarted: true;
1283
+ } | null;
1284
+ fallbackClaim?: {
1285
+ fallbackRequestId: string;
1286
+ claimedAt: string;
1287
+ } | null | undefined;
1288
+ fallback: {
1289
+ status: "fallback-dispatch";
1290
+ triggerRequestId: string;
1291
+ fallbackRequestId: string;
1292
+ trigger: "pre-start-rejection";
1293
+ fallbackReason: string;
1294
+ kind: "canonical-instruction-fresh-child";
1295
+ approximation: true;
1296
+ preservedTarget: {
1297
+ provider: string;
1298
+ modelSelector: string | null;
1299
+ effortSelector: string | null;
1300
+ reasoningModeSelector: string | null;
1301
+ serviceTierSelector: string | null;
1302
+ selectedRoute: string;
1303
+ };
1304
+ rejection: {
1305
+ code: string;
1306
+ rejectedAt: string;
1307
+ provesNoChildStarted: true;
1308
+ source: "provider-wrapper";
1309
+ };
1310
+ roleInstructions: {
1311
+ status: "resolved";
1312
+ dependency: string;
1313
+ canonicalRole: string;
1314
+ tier: "loaded" | "project" | "user";
1315
+ validation: "direct-canonical" | "exact-canonical-symlink";
1316
+ canonicalPath: string;
1317
+ selectedPath: string;
1318
+ roleVersion: string;
1319
+ contentDigest: string;
1320
+ candidateMisses: {
1321
+ tier: "loaded" | "project" | "user";
1322
+ candidate: string;
1323
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1324
+ }[];
1325
+ };
1326
+ } | {
1327
+ status: "not-applicable";
1328
+ reason: string;
1329
+ };
1330
+ runtimeObservation: {
1331
+ status: "not-reported";
1332
+ } | {
1333
+ status: "reported";
1334
+ provider: string;
1335
+ childLineage?: string | undefined;
1336
+ role?: string | undefined;
1337
+ model?: string | undefined;
1338
+ effort?: string | undefined;
1339
+ serviceTier?: string | undefined;
1340
+ source: string;
1341
+ observedAt: string;
1342
+ match: "matching" | "mismatching" | "not-comparable";
1343
+ comparedAxes?: string[] | undefined;
1344
+ };
1345
+ };
1346
+ }>;
1347
+ /**
1348
+ * Strict observation parse. Used where a caller supplied the observation
1349
+ * directly, so a malformed value is refused rather than quietly degraded to
1350
+ * `not-reported` — absent evidence and a bad claim are different facts.
1351
+ */
1352
+ export declare function parseRuntimeObservation(value: unknown): RuntimeObservation;
1353
+ export type CanonicalFallbackEvidence = z.infer<typeof fallbackSchema>;
1354
+ export type RuntimeObservation = z.infer<typeof runtimeObservationSchema>;
1355
+ export type PersistedOatDispatchRecordV1 = z.infer<typeof persistedOatDispatchRecordSchema>;
1356
+ declare const oatDispatchEvidenceEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1357
+ kind: z.ZodLiteral<"canonical-role-resolution">;
1358
+ requestId: z.ZodString;
1359
+ source: z.ZodLiteral<"canonical-role-resolver">;
1360
+ evidence: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
1361
+ status: z.ZodLiteral<"resolved">;
1362
+ dependency: z.ZodString;
1363
+ canonicalRole: z.ZodString;
1364
+ tier: z.ZodEnum<["loaded", "user", "project"]>;
1365
+ validation: z.ZodEnum<["direct-canonical", "exact-canonical-symlink"]>;
1366
+ canonicalPath: z.ZodString;
1367
+ selectedPath: z.ZodString;
1368
+ roleVersion: z.ZodString;
1369
+ contentDigest: z.ZodString;
1370
+ candidateMisses: z.ZodArray<z.ZodObject<{
1371
+ tier: z.ZodEnum<["loaded", "user", "project"]>;
1372
+ candidate: z.ZodString;
1373
+ outcome: z.ZodEnum<["missing", "broken-symlink", "escaping-symlink", "noncanonical-copy", "wrong-target", "invalid-role"]>;
1374
+ }, "strict", z.ZodTypeAny, {
1375
+ tier: "loaded" | "project" | "user";
1376
+ candidate: string;
1377
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1378
+ }, {
1379
+ tier: "loaded" | "project" | "user";
1380
+ candidate: string;
1381
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1382
+ }>, "many">;
1383
+ }, "strict", z.ZodTypeAny, {
1384
+ status: "resolved";
1385
+ dependency: string;
1386
+ canonicalRole: string;
1387
+ tier: "loaded" | "project" | "user";
1388
+ validation: "direct-canonical" | "exact-canonical-symlink";
1389
+ canonicalPath: string;
1390
+ selectedPath: string;
1391
+ roleVersion: string;
1392
+ contentDigest: string;
1393
+ candidateMisses: {
1394
+ tier: "loaded" | "project" | "user";
1395
+ candidate: string;
1396
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1397
+ }[];
1398
+ }, {
1399
+ status: "resolved";
1400
+ dependency: string;
1401
+ canonicalRole: string;
1402
+ tier: "loaded" | "project" | "user";
1403
+ validation: "direct-canonical" | "exact-canonical-symlink";
1404
+ canonicalPath: string;
1405
+ selectedPath: string;
1406
+ roleVersion: string;
1407
+ contentDigest: string;
1408
+ candidateMisses: {
1409
+ tier: "loaded" | "project" | "user";
1410
+ candidate: string;
1411
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1412
+ }[];
1413
+ }>, z.ZodObject<{
1414
+ status: z.ZodLiteral<"missing">;
1415
+ dependency: z.ZodString;
1416
+ canonicalRole: z.ZodString;
1417
+ candidateMisses: z.ZodArray<z.ZodObject<{
1418
+ tier: z.ZodEnum<["loaded", "user", "project"]>;
1419
+ candidate: z.ZodString;
1420
+ outcome: z.ZodEnum<["missing", "broken-symlink", "escaping-symlink", "noncanonical-copy", "wrong-target", "invalid-role"]>;
1421
+ }, "strict", z.ZodTypeAny, {
1422
+ tier: "loaded" | "project" | "user";
1423
+ candidate: string;
1424
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1425
+ }, {
1426
+ tier: "loaded" | "project" | "user";
1427
+ candidate: string;
1428
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1429
+ }>, "many">;
1430
+ recovery: z.ZodArray<z.ZodObject<{
1431
+ command: z.ZodString;
1432
+ }, "strict", z.ZodTypeAny, {
1433
+ command: string;
1434
+ }, {
1435
+ command: string;
1436
+ }>, "many">;
1437
+ }, "strict", z.ZodTypeAny, {
1438
+ status: "missing";
1439
+ dependency: string;
1440
+ canonicalRole: string;
1441
+ candidateMisses: {
1442
+ tier: "loaded" | "project" | "user";
1443
+ candidate: string;
1444
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1445
+ }[];
1446
+ recovery: {
1447
+ command: string;
1448
+ }[];
1449
+ }, {
1450
+ status: "missing";
1451
+ dependency: string;
1452
+ canonicalRole: string;
1453
+ candidateMisses: {
1454
+ tier: "loaded" | "project" | "user";
1455
+ candidate: string;
1456
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1457
+ }[];
1458
+ recovery: {
1459
+ command: string;
1460
+ }[];
1461
+ }>]>;
1462
+ }, "strict", z.ZodTypeAny, {
1463
+ kind: "canonical-role-resolution";
1464
+ requestId: string;
1465
+ source: "canonical-role-resolver";
1466
+ evidence: {
1467
+ status: "resolved";
1468
+ dependency: string;
1469
+ canonicalRole: string;
1470
+ tier: "loaded" | "project" | "user";
1471
+ validation: "direct-canonical" | "exact-canonical-symlink";
1472
+ canonicalPath: string;
1473
+ selectedPath: string;
1474
+ roleVersion: string;
1475
+ contentDigest: string;
1476
+ candidateMisses: {
1477
+ tier: "loaded" | "project" | "user";
1478
+ candidate: string;
1479
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1480
+ }[];
1481
+ } | {
1482
+ status: "missing";
1483
+ dependency: string;
1484
+ canonicalRole: string;
1485
+ candidateMisses: {
1486
+ tier: "loaded" | "project" | "user";
1487
+ candidate: string;
1488
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1489
+ }[];
1490
+ recovery: {
1491
+ command: string;
1492
+ }[];
1493
+ };
1494
+ }, {
1495
+ kind: "canonical-role-resolution";
1496
+ requestId: string;
1497
+ source: "canonical-role-resolver";
1498
+ evidence: {
1499
+ status: "resolved";
1500
+ dependency: string;
1501
+ canonicalRole: string;
1502
+ tier: "loaded" | "project" | "user";
1503
+ validation: "direct-canonical" | "exact-canonical-symlink";
1504
+ canonicalPath: string;
1505
+ selectedPath: string;
1506
+ roleVersion: string;
1507
+ contentDigest: string;
1508
+ candidateMisses: {
1509
+ tier: "loaded" | "project" | "user";
1510
+ candidate: string;
1511
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1512
+ }[];
1513
+ } | {
1514
+ status: "missing";
1515
+ dependency: string;
1516
+ canonicalRole: string;
1517
+ candidateMisses: {
1518
+ tier: "loaded" | "project" | "user";
1519
+ candidate: string;
1520
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1521
+ }[];
1522
+ recovery: {
1523
+ command: string;
1524
+ }[];
1525
+ };
1526
+ }>, z.ZodObject<{
1527
+ kind: z.ZodLiteral<"pre-start-rejection-attestation">;
1528
+ requestId: z.ZodString;
1529
+ source: z.ZodLiteral<"provider-wrapper">;
1530
+ expectedLaunchStatus: z.ZodLiteral<"blocked-before-start">;
1531
+ rejection: z.ZodObject<{
1532
+ code: z.ZodEffects<z.ZodString, string, string>;
1533
+ rejectedAt: z.ZodString;
1534
+ provesNoChildStarted: z.ZodLiteral<true>;
1535
+ }, "strict", z.ZodTypeAny, {
1536
+ code: string;
1537
+ rejectedAt: string;
1538
+ provesNoChildStarted: true;
1539
+ }, {
1540
+ code: string;
1541
+ rejectedAt: string;
1542
+ provesNoChildStarted: true;
1543
+ }>;
1544
+ }, "strict", z.ZodTypeAny, {
1545
+ kind: "pre-start-rejection-attestation";
1546
+ requestId: string;
1547
+ source: "provider-wrapper";
1548
+ expectedLaunchStatus: "blocked-before-start";
1549
+ rejection: {
1550
+ code: string;
1551
+ rejectedAt: string;
1552
+ provesNoChildStarted: true;
1553
+ };
1554
+ }, {
1555
+ kind: "pre-start-rejection-attestation";
1556
+ requestId: string;
1557
+ source: "provider-wrapper";
1558
+ expectedLaunchStatus: "blocked-before-start";
1559
+ rejection: {
1560
+ code: string;
1561
+ rejectedAt: string;
1562
+ provesNoChildStarted: true;
1563
+ };
1564
+ }>, z.ZodObject<{
1565
+ kind: z.ZodLiteral<"fallback-claim">;
1566
+ requestId: z.ZodString;
1567
+ source: z.ZodLiteral<"provider-wrapper">;
1568
+ claim: z.ZodObject<{
1569
+ fallbackRequestId: z.ZodString;
1570
+ claimedAt: z.ZodString;
1571
+ }, "strict", z.ZodTypeAny, {
1572
+ fallbackRequestId: string;
1573
+ claimedAt: string;
1574
+ }, {
1575
+ fallbackRequestId: string;
1576
+ claimedAt: string;
1577
+ }>;
1578
+ }, "strict", z.ZodTypeAny, {
1579
+ kind: "fallback-claim";
1580
+ requestId: string;
1581
+ source: "provider-wrapper";
1582
+ claim: {
1583
+ fallbackRequestId: string;
1584
+ claimedAt: string;
1585
+ };
1586
+ }, {
1587
+ kind: "fallback-claim";
1588
+ requestId: string;
1589
+ source: "provider-wrapper";
1590
+ claim: {
1591
+ fallbackRequestId: string;
1592
+ claimedAt: string;
1593
+ };
1594
+ }>, z.ZodObject<{
1595
+ kind: z.ZodLiteral<"fallback-link">;
1596
+ requestId: z.ZodString;
1597
+ source: z.ZodLiteral<"provider-wrapper">;
1598
+ evidence: z.ZodObject<{
1599
+ status: z.ZodLiteral<"fallback-dispatch">;
1600
+ triggerRequestId: z.ZodString;
1601
+ fallbackRequestId: z.ZodString;
1602
+ trigger: z.ZodLiteral<"pre-start-rejection">;
1603
+ fallbackReason: z.ZodString;
1604
+ kind: z.ZodLiteral<"canonical-instruction-fresh-child">;
1605
+ approximation: z.ZodLiteral<true>;
1606
+ preservedTarget: z.ZodObject<{
1607
+ provider: z.ZodString;
1608
+ modelSelector: z.ZodNullable<z.ZodString>;
1609
+ effortSelector: z.ZodNullable<z.ZodString>;
1610
+ reasoningModeSelector: z.ZodNullable<z.ZodString>;
1611
+ serviceTierSelector: z.ZodNullable<z.ZodString>;
1612
+ selectedRoute: z.ZodString;
1613
+ }, "strict", z.ZodTypeAny, {
1614
+ provider: string;
1615
+ modelSelector: string | null;
1616
+ effortSelector: string | null;
1617
+ reasoningModeSelector: string | null;
1618
+ serviceTierSelector: string | null;
1619
+ selectedRoute: string;
1620
+ }, {
1621
+ provider: string;
1622
+ modelSelector: string | null;
1623
+ effortSelector: string | null;
1624
+ reasoningModeSelector: string | null;
1625
+ serviceTierSelector: string | null;
1626
+ selectedRoute: string;
1627
+ }>;
1628
+ rejection: z.ZodObject<{
1629
+ code: z.ZodEffects<z.ZodString, string, string>;
1630
+ rejectedAt: z.ZodString;
1631
+ provesNoChildStarted: z.ZodLiteral<true>;
1632
+ } & {
1633
+ source: z.ZodLiteral<"provider-wrapper">;
1634
+ }, "strict", z.ZodTypeAny, {
1635
+ code: string;
1636
+ rejectedAt: string;
1637
+ provesNoChildStarted: true;
1638
+ source: "provider-wrapper";
1639
+ }, {
1640
+ code: string;
1641
+ rejectedAt: string;
1642
+ provesNoChildStarted: true;
1643
+ source: "provider-wrapper";
1644
+ }>;
1645
+ roleInstructions: z.ZodObject<{
1646
+ status: z.ZodLiteral<"resolved">;
1647
+ dependency: z.ZodString;
1648
+ canonicalRole: z.ZodString;
1649
+ tier: z.ZodEnum<["loaded", "user", "project"]>;
1650
+ validation: z.ZodEnum<["direct-canonical", "exact-canonical-symlink"]>;
1651
+ canonicalPath: z.ZodString;
1652
+ selectedPath: z.ZodString;
1653
+ roleVersion: z.ZodString;
1654
+ contentDigest: z.ZodString;
1655
+ candidateMisses: z.ZodArray<z.ZodObject<{
1656
+ tier: z.ZodEnum<["loaded", "user", "project"]>;
1657
+ candidate: z.ZodString;
1658
+ outcome: z.ZodEnum<["missing", "broken-symlink", "escaping-symlink", "noncanonical-copy", "wrong-target", "invalid-role"]>;
1659
+ }, "strict", z.ZodTypeAny, {
1660
+ tier: "loaded" | "project" | "user";
1661
+ candidate: string;
1662
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1663
+ }, {
1664
+ tier: "loaded" | "project" | "user";
1665
+ candidate: string;
1666
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1667
+ }>, "many">;
1668
+ }, "strict", z.ZodTypeAny, {
1669
+ status: "resolved";
1670
+ dependency: string;
1671
+ canonicalRole: string;
1672
+ tier: "loaded" | "project" | "user";
1673
+ validation: "direct-canonical" | "exact-canonical-symlink";
1674
+ canonicalPath: string;
1675
+ selectedPath: string;
1676
+ roleVersion: string;
1677
+ contentDigest: string;
1678
+ candidateMisses: {
1679
+ tier: "loaded" | "project" | "user";
1680
+ candidate: string;
1681
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1682
+ }[];
1683
+ }, {
1684
+ status: "resolved";
1685
+ dependency: string;
1686
+ canonicalRole: string;
1687
+ tier: "loaded" | "project" | "user";
1688
+ validation: "direct-canonical" | "exact-canonical-symlink";
1689
+ canonicalPath: string;
1690
+ selectedPath: string;
1691
+ roleVersion: string;
1692
+ contentDigest: string;
1693
+ candidateMisses: {
1694
+ tier: "loaded" | "project" | "user";
1695
+ candidate: string;
1696
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1697
+ }[];
1698
+ }>;
1699
+ }, "strict", z.ZodTypeAny, {
1700
+ status: "fallback-dispatch";
1701
+ triggerRequestId: string;
1702
+ fallbackRequestId: string;
1703
+ trigger: "pre-start-rejection";
1704
+ fallbackReason: string;
1705
+ kind: "canonical-instruction-fresh-child";
1706
+ approximation: true;
1707
+ preservedTarget: {
1708
+ provider: string;
1709
+ modelSelector: string | null;
1710
+ effortSelector: string | null;
1711
+ reasoningModeSelector: string | null;
1712
+ serviceTierSelector: string | null;
1713
+ selectedRoute: string;
1714
+ };
1715
+ rejection: {
1716
+ code: string;
1717
+ rejectedAt: string;
1718
+ provesNoChildStarted: true;
1719
+ source: "provider-wrapper";
1720
+ };
1721
+ roleInstructions: {
1722
+ status: "resolved";
1723
+ dependency: string;
1724
+ canonicalRole: string;
1725
+ tier: "loaded" | "project" | "user";
1726
+ validation: "direct-canonical" | "exact-canonical-symlink";
1727
+ canonicalPath: string;
1728
+ selectedPath: string;
1729
+ roleVersion: string;
1730
+ contentDigest: string;
1731
+ candidateMisses: {
1732
+ tier: "loaded" | "project" | "user";
1733
+ candidate: string;
1734
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1735
+ }[];
1736
+ };
1737
+ }, {
1738
+ status: "fallback-dispatch";
1739
+ triggerRequestId: string;
1740
+ fallbackRequestId: string;
1741
+ trigger: "pre-start-rejection";
1742
+ fallbackReason: string;
1743
+ kind: "canonical-instruction-fresh-child";
1744
+ approximation: true;
1745
+ preservedTarget: {
1746
+ provider: string;
1747
+ modelSelector: string | null;
1748
+ effortSelector: string | null;
1749
+ reasoningModeSelector: string | null;
1750
+ serviceTierSelector: string | null;
1751
+ selectedRoute: string;
1752
+ };
1753
+ rejection: {
1754
+ code: string;
1755
+ rejectedAt: string;
1756
+ provesNoChildStarted: true;
1757
+ source: "provider-wrapper";
1758
+ };
1759
+ roleInstructions: {
1760
+ status: "resolved";
1761
+ dependency: string;
1762
+ canonicalRole: string;
1763
+ tier: "loaded" | "project" | "user";
1764
+ validation: "direct-canonical" | "exact-canonical-symlink";
1765
+ canonicalPath: string;
1766
+ selectedPath: string;
1767
+ roleVersion: string;
1768
+ contentDigest: string;
1769
+ candidateMisses: {
1770
+ tier: "loaded" | "project" | "user";
1771
+ candidate: string;
1772
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1773
+ }[];
1774
+ };
1775
+ }>;
1776
+ }, "strict", z.ZodTypeAny, {
1777
+ kind: "fallback-link";
1778
+ requestId: string;
1779
+ source: "provider-wrapper";
1780
+ evidence: {
1781
+ status: "fallback-dispatch";
1782
+ triggerRequestId: string;
1783
+ fallbackRequestId: string;
1784
+ trigger: "pre-start-rejection";
1785
+ fallbackReason: string;
1786
+ kind: "canonical-instruction-fresh-child";
1787
+ approximation: true;
1788
+ preservedTarget: {
1789
+ provider: string;
1790
+ modelSelector: string | null;
1791
+ effortSelector: string | null;
1792
+ reasoningModeSelector: string | null;
1793
+ serviceTierSelector: string | null;
1794
+ selectedRoute: string;
1795
+ };
1796
+ rejection: {
1797
+ code: string;
1798
+ rejectedAt: string;
1799
+ provesNoChildStarted: true;
1800
+ source: "provider-wrapper";
1801
+ };
1802
+ roleInstructions: {
1803
+ status: "resolved";
1804
+ dependency: string;
1805
+ canonicalRole: string;
1806
+ tier: "loaded" | "project" | "user";
1807
+ validation: "direct-canonical" | "exact-canonical-symlink";
1808
+ canonicalPath: string;
1809
+ selectedPath: string;
1810
+ roleVersion: string;
1811
+ contentDigest: string;
1812
+ candidateMisses: {
1813
+ tier: "loaded" | "project" | "user";
1814
+ candidate: string;
1815
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1816
+ }[];
1817
+ };
1818
+ };
1819
+ }, {
1820
+ kind: "fallback-link";
1821
+ requestId: string;
1822
+ source: "provider-wrapper";
1823
+ evidence: {
1824
+ status: "fallback-dispatch";
1825
+ triggerRequestId: string;
1826
+ fallbackRequestId: string;
1827
+ trigger: "pre-start-rejection";
1828
+ fallbackReason: string;
1829
+ kind: "canonical-instruction-fresh-child";
1830
+ approximation: true;
1831
+ preservedTarget: {
1832
+ provider: string;
1833
+ modelSelector: string | null;
1834
+ effortSelector: string | null;
1835
+ reasoningModeSelector: string | null;
1836
+ serviceTierSelector: string | null;
1837
+ selectedRoute: string;
1838
+ };
1839
+ rejection: {
1840
+ code: string;
1841
+ rejectedAt: string;
1842
+ provesNoChildStarted: true;
1843
+ source: "provider-wrapper";
1844
+ };
1845
+ roleInstructions: {
1846
+ status: "resolved";
1847
+ dependency: string;
1848
+ canonicalRole: string;
1849
+ tier: "loaded" | "project" | "user";
1850
+ validation: "direct-canonical" | "exact-canonical-symlink";
1851
+ canonicalPath: string;
1852
+ selectedPath: string;
1853
+ roleVersion: string;
1854
+ contentDigest: string;
1855
+ candidateMisses: {
1856
+ tier: "loaded" | "project" | "user";
1857
+ candidate: string;
1858
+ outcome: "broken-symlink" | "escaping-symlink" | "invalid-role" | "missing" | "noncanonical-copy" | "wrong-target";
1859
+ }[];
1860
+ };
1861
+ };
1862
+ }>, z.ZodObject<{
1863
+ kind: z.ZodLiteral<"runtime-observation">;
1864
+ requestId: z.ZodString;
1865
+ source: z.ZodLiteral<"runtime-observer">;
1866
+ observation: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
1867
+ status: z.ZodLiteral<"not-reported">;
1868
+ }, "strict", z.ZodTypeAny, {
1869
+ status: "not-reported";
1870
+ }, {
1871
+ status: "not-reported";
1872
+ }>, z.ZodObject<{
1873
+ status: z.ZodLiteral<"reported">;
1874
+ provider: z.ZodString;
1875
+ childLineage: z.ZodOptional<z.ZodString>;
1876
+ role: z.ZodOptional<z.ZodString>;
1877
+ model: z.ZodOptional<z.ZodString>;
1878
+ effort: z.ZodOptional<z.ZodString>;
1879
+ serviceTier: z.ZodOptional<z.ZodString>;
1880
+ source: z.ZodString;
1881
+ observedAt: z.ZodString;
1882
+ match: z.ZodEnum<["matching", "mismatching", "not-comparable"]>;
1883
+ /**
1884
+ * The axes the verdict actually rests on. Optional so a record written
1885
+ * before this field existed still parses, but always written now: a
1886
+ * `matching` that rests on one incidental axis is a materially weaker
1887
+ * claim than one resting on model and role, and a consumer reading only
1888
+ * the scalar `match` cannot tell them apart.
1889
+ */
1890
+ comparedAxes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1891
+ }, "strict", z.ZodTypeAny, {
1892
+ status: "reported";
1893
+ provider: string;
1894
+ childLineage?: string | undefined;
1895
+ role?: string | undefined;
1896
+ model?: string | undefined;
1897
+ effort?: string | undefined;
1898
+ serviceTier?: string | undefined;
1899
+ source: string;
1900
+ observedAt: string;
1901
+ match: "matching" | "mismatching" | "not-comparable";
1902
+ comparedAxes?: string[] | undefined;
1903
+ }, {
1904
+ status: "reported";
1905
+ provider: string;
1906
+ childLineage?: string | undefined;
1907
+ role?: string | undefined;
1908
+ model?: string | undefined;
1909
+ effort?: string | undefined;
1910
+ serviceTier?: string | undefined;
1911
+ source: string;
1912
+ observedAt: string;
1913
+ match: "matching" | "mismatching" | "not-comparable";
1914
+ comparedAxes?: string[] | undefined;
1915
+ }>]>;
1916
+ }, "strict", z.ZodTypeAny, {
1917
+ kind: "runtime-observation";
1918
+ requestId: string;
1919
+ source: "runtime-observer";
1920
+ observation: {
1921
+ status: "not-reported";
1922
+ } | {
1923
+ status: "reported";
1924
+ provider: string;
1925
+ childLineage?: string | undefined;
1926
+ role?: string | undefined;
1927
+ model?: string | undefined;
1928
+ effort?: string | undefined;
1929
+ serviceTier?: string | undefined;
1930
+ source: string;
1931
+ observedAt: string;
1932
+ match: "matching" | "mismatching" | "not-comparable";
1933
+ comparedAxes?: string[] | undefined;
1934
+ };
1935
+ }, {
1936
+ kind: "runtime-observation";
1937
+ requestId: string;
1938
+ source: "runtime-observer";
1939
+ observation: {
1940
+ status: "not-reported";
1941
+ } | {
1942
+ status: "reported";
1943
+ provider: string;
1944
+ childLineage?: string | undefined;
1945
+ role?: string | undefined;
1946
+ model?: string | undefined;
1947
+ effort?: string | undefined;
1948
+ serviceTier?: string | undefined;
1949
+ source: string;
1950
+ observedAt: string;
1951
+ match: "matching" | "mismatching" | "not-comparable";
1952
+ comparedAxes?: string[] | undefined;
1953
+ };
1954
+ }>]>;
1955
+ export type OatDispatchEvidenceEvent = z.infer<typeof oatDispatchEvidenceEventSchema>;
1956
+ export declare function parsePersistedOatDispatchRecord(value: unknown): PersistedOatDispatchRecordV1;
1957
+ export declare function augmentDispatchRecord(input: {
1958
+ record: GenericDispatchRecord | PersistedOatDispatchRecordV1;
1959
+ event: OatDispatchEvidenceEvent;
1960
+ triggerRecord?: PersistedOatDispatchRecordV1;
1961
+ relatedRecords?: readonly PersistedOatDispatchRecordV1[];
1962
+ }): PersistedOatDispatchRecordV1;
1963
+ export {};
1964
+ //# sourceMappingURL=oat-dispatch-record.d.ts.map