@independo/inderun-contracts 0.3.3-rc.2 → 0.4.0-rc.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 (41) hide show
  1. package/dist/generated/execution-provenance.d.ts +95 -0
  2. package/dist/generated/execution-provenance.d.ts.map +1 -0
  3. package/dist/generated/execution-provenance.js +2 -0
  4. package/dist/generated/inderun-error.d.ts +102 -0
  5. package/dist/generated/inderun-error.d.ts.map +1 -1
  6. package/dist/generated/index.d.ts +1 -0
  7. package/dist/generated/index.d.ts.map +1 -1
  8. package/dist/generated/route-plan.d.ts +5 -3
  9. package/dist/generated/route-plan.d.ts.map +1 -1
  10. package/dist/generated/route-planner-input.d.ts +26 -0
  11. package/dist/generated/route-planner-input.d.ts.map +1 -1
  12. package/dist/generated/schemas.d.ts +169 -2
  13. package/dist/generated/schemas.d.ts.map +1 -1
  14. package/dist/generated/schemas.js +214 -2
  15. package/dist/generated/stream-event.d.ts +109 -0
  16. package/dist/generated/stream-event.d.ts.map +1 -1
  17. package/dist/generated/stream-terminal-outcome.d.ts +108 -0
  18. package/dist/generated/stream-terminal-outcome.d.ts.map +1 -1
  19. package/dist/generated/task-request.d.ts +8 -0
  20. package/dist/generated/task-request.d.ts.map +1 -1
  21. package/dist/generated/task-result.d.ts +114 -6
  22. package/dist/generated/task-result.d.ts.map +1 -1
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +2 -2
  26. package/dist/validators.d.ts +3 -0
  27. package/dist/validators.d.ts.map +1 -1
  28. package/dist/validators.js +12 -1
  29. package/package.json +1 -1
  30. package/src/generated/execution-provenance.ts +102 -0
  31. package/src/generated/inderun-error.ts +108 -0
  32. package/src/generated/index.ts +1 -0
  33. package/src/generated/route-plan.ts +5 -3
  34. package/src/generated/route-planner-input.ts +27 -0
  35. package/src/generated/schemas.ts +215 -2
  36. package/src/generated/stream-event.ts +122 -7
  37. package/src/generated/stream-terminal-outcome.ts +114 -0
  38. package/src/generated/task-request.ts +8 -0
  39. package/src/generated/task-result.ts +121 -7
  40. package/src/index.ts +3 -0
  41. package/src/validators.ts +15 -0
@@ -80,6 +80,11 @@ export const taskRequestSchema = {
80
80
  }
81
81
  }
82
82
  },
83
+ "modelProfile": {
84
+ "description": "Name of the model profile to route within, as configured on the engine. Absent or 'auto' means every registered target, ranked by constraints and preferences alone. A profile is an application-defined, ordered allow-list of targets (provider instances bound to one model each); raw model or provider identifiers are never accepted here. An unknown profile name fails request validation.",
85
+ "type": "string",
86
+ "minLength": 1
87
+ },
83
88
  "generation": {
84
89
  "description": "Optional configuration for fine-tuning how the AI model generates its response.",
85
90
  "type": "object",
@@ -281,6 +286,11 @@ export const taskResultSchema = {
281
286
  "type": "string",
282
287
  "minLength": 1
283
288
  },
289
+ "reportedModel": {
290
+ "description": "The model identifier the provider reported in its own response, set by the provider when its backend reports one. The engine carries it into provenance.reportedModel; it is never inferred from configuration.",
291
+ "type": "string",
292
+ "minLength": 1
293
+ },
284
294
  "totalMs": {
285
295
  "description": "Measured execution duration in milliseconds, including route selection and result processing.",
286
296
  "type": "number",
@@ -299,6 +309,10 @@ export const taskResultSchema = {
299
309
  ]
300
310
  }
301
311
  }
312
+ },
313
+ "provenance": {
314
+ "description": "Normalized execution provenance: which target ran, its declared locality, the configured and reported model, and how fallback and routing played out. See execution-provenance.schema.json.",
315
+ "$ref": "execution-provenance.schema.json"
302
316
  }
303
317
  }
304
318
  };
@@ -359,6 +373,10 @@ export const inderunErrorSchema = {
359
373
  "description": "Optional structured diagnostic details. It must not contain raw secrets.",
360
374
  "type": "object",
361
375
  "additionalProperties": true
376
+ },
377
+ "provenance": {
378
+ "description": "Normalized execution provenance: which target ran, its declared locality, the configured and reported model, and how fallback and routing played out. See execution-provenance.schema.json.",
379
+ "$ref": "execution-provenance.schema.json"
362
380
  }
363
381
  }
364
382
  };
@@ -568,6 +586,31 @@ export const routePlannerInputSchema = {
568
586
  }
569
587
  }
570
588
  },
589
+ "modelProfile": {
590
+ "description": "The resolved model profile the request routes within. Absent means the built-in 'auto' profile: no allow-list, and ordering by placement and preference alone. When present, providers whose id is not in targetIds are rejected with 'not_in_model_profile', and the position in targetIds ranks the survivors after placement and before preferences. Ids that name no registered provider are ignored.",
591
+ "type": "object",
592
+ "additionalProperties": true,
593
+ "required": [
594
+ "name",
595
+ "targetIds"
596
+ ],
597
+ "properties": {
598
+ "name": {
599
+ "description": "Profile name, carried for explanations.",
600
+ "type": "string",
601
+ "minLength": 1
602
+ },
603
+ "targetIds": {
604
+ "description": "Provider ids in profile order.",
605
+ "type": "array",
606
+ "minItems": 1,
607
+ "items": {
608
+ "type": "string",
609
+ "minLength": 1
610
+ }
611
+ }
612
+ }
613
+ },
571
614
  "providers": {
572
615
  "description": "Static descriptors plus dynamic capability snapshots for planning.",
573
616
  "type": "array",
@@ -762,7 +805,7 @@ export const routePlanSchema = {
762
805
  ],
763
806
  "properties": {
764
807
  "code": {
765
- "description": "Normalized rejection reason. 'streaming_not_supported' means the descriptor does not statically declare Mode-2 streaming; 'streaming_unavailable' means it declares streaming but the dynamic capability snapshot reports it cannot stream in the current host environment.",
808
+ "description": "Normalized rejection reason. 'streaming_not_supported' means the descriptor does not statically declare Mode-2 streaming; 'streaming_unavailable' means it declares streaming but the dynamic capability snapshot reports it cannot stream in the current host environment. 'not_in_model_profile' means the request named a model profile that does not list this provider.",
766
809
  "enum": [
767
810
  "task_not_supported",
768
811
  "run_not_supported",
@@ -771,7 +814,8 @@ export const routePlanSchema = {
771
814
  "privacy_constraint",
772
815
  "cloud_constraint",
773
816
  "offline",
774
- "capability_unavailable"
817
+ "capability_unavailable",
818
+ "not_in_model_profile"
775
819
  ]
776
820
  },
777
821
  "message": {
@@ -1325,6 +1369,10 @@ export const streamEventSchema = {
1325
1369
  "minimum": 0
1326
1370
  }
1327
1371
  }
1372
+ },
1373
+ "provenance": {
1374
+ "description": "Normalized execution provenance: which target ran, its declared locality, the configured and reported model, and how fallback and routing played out. See execution-provenance.schema.json.",
1375
+ "$ref": "execution-provenance.schema.json"
1328
1376
  }
1329
1377
  }
1330
1378
  },
@@ -1389,8 +1437,16 @@ export const streamEventSchema = {
1389
1437
  "details": {
1390
1438
  "type": "object",
1391
1439
  "additionalProperties": true
1440
+ },
1441
+ "provenance": {
1442
+ "description": "Normalized execution provenance: which target ran, its declared locality, the configured and reported model, and how fallback and routing played out. See execution-provenance.schema.json.",
1443
+ "$ref": "execution-provenance.schema.json"
1392
1444
  }
1393
1445
  }
1446
+ },
1447
+ "provenance": {
1448
+ "description": "Normalized execution provenance: which target ran, its declared locality, the configured and reported model, and how fallback and routing played out. See execution-provenance.schema.json.",
1449
+ "$ref": "execution-provenance.schema.json"
1394
1450
  }
1395
1451
  }
1396
1452
  },
@@ -1419,6 +1475,10 @@ export const streamEventSchema = {
1419
1475
  },
1420
1476
  "reason": {
1421
1477
  "type": "string"
1478
+ },
1479
+ "provenance": {
1480
+ "description": "Normalized execution provenance: which target ran, its declared locality, the configured and reported model, and how fallback and routing played out. See execution-provenance.schema.json.",
1481
+ "$ref": "execution-provenance.schema.json"
1422
1482
  }
1423
1483
  }
1424
1484
  }
@@ -1562,6 +1622,10 @@ export const streamTerminalOutcomeSchema = {
1562
1622
  "minimum": 0
1563
1623
  }
1564
1624
  }
1625
+ },
1626
+ "provenance": {
1627
+ "description": "Normalized execution provenance: which target ran, its declared locality, the configured and reported model, and how fallback and routing played out. See execution-provenance.schema.json.",
1628
+ "$ref": "execution-provenance.schema.json"
1565
1629
  }
1566
1630
  }
1567
1631
  },
@@ -1637,8 +1701,16 @@ export const streamTerminalOutcomeSchema = {
1637
1701
  "description": "Optional structured diagnostic details. It must not contain raw secrets.",
1638
1702
  "type": "object",
1639
1703
  "additionalProperties": true
1704
+ },
1705
+ "provenance": {
1706
+ "description": "Normalized execution provenance: which target ran, its declared locality, the configured and reported model, and how fallback and routing played out. See execution-provenance.schema.json.",
1707
+ "$ref": "execution-provenance.schema.json"
1640
1708
  }
1641
1709
  }
1710
+ },
1711
+ "provenance": {
1712
+ "description": "Normalized execution provenance: which target ran, its declared locality, the configured and reported model, and how fallback and routing played out. See execution-provenance.schema.json.",
1713
+ "$ref": "execution-provenance.schema.json"
1642
1714
  }
1643
1715
  }
1644
1716
  },
@@ -1672,8 +1744,148 @@ export const streamTerminalOutcomeSchema = {
1672
1744
  "reason": {
1673
1745
  "description": "Optional human-readable reason the run was cancelled (e.g. caller-initiated abort). Not a machine-taxonomy field; use errorClass on the 'error' outcome branch for failure classification.",
1674
1746
  "type": "string"
1747
+ },
1748
+ "provenance": {
1749
+ "description": "Normalized execution provenance: which target ran, its declared locality, the configured and reported model, and how fallback and routing played out. See execution-provenance.schema.json.",
1750
+ "$ref": "execution-provenance.schema.json"
1675
1751
  }
1676
1752
  }
1677
1753
  }
1678
1754
  ]
1679
1755
  };
1756
+ export const executionProvenanceSchema = {
1757
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1758
+ "$id": "https://schemas.inderun.dev/1.0/execution-provenance.schema.json",
1759
+ "title": "ExecutionProvenance",
1760
+ "description": "Provider-neutral record of how an execution was carried out: the target the outcome is attributed to, its declared locality, the configured and provider-reported model, every attempt, and why other candidates were rejected. Carried on TaskResult, on every StreamTerminalOutcome branch, and on IndeRunError. It reports what the engine observed and what providers declared or reported; it never infers a model or locality a provider did not state, and it never contains request content, credentials, or provider payloads.",
1761
+ "type": "object",
1762
+ "additionalProperties": true,
1763
+ "required": [
1764
+ "schemaVersion",
1765
+ "modelProfile",
1766
+ "locality",
1767
+ "attemptCount",
1768
+ "fallbackOccurred",
1769
+ "attempts",
1770
+ "routeRejections"
1771
+ ],
1772
+ "properties": {
1773
+ "schemaVersion": {
1774
+ "description": "Contract schema version used to interpret this provenance record.",
1775
+ "const": "1.0"
1776
+ },
1777
+ "modelProfile": {
1778
+ "description": "The model profile the request routed within; 'auto' when the request named none.",
1779
+ "type": "string",
1780
+ "minLength": 1
1781
+ },
1782
+ "providerId": {
1783
+ "description": "The target the outcome is attributed to: the provider that produced the result, the provider a stream had committed to when it ended, or the provider that was running when it was cancelled. Absent when no provider was reached or when every attempted provider failed before one was committed to.",
1784
+ "type": "string",
1785
+ "minLength": 1
1786
+ },
1787
+ "locality": {
1788
+ "description": "Where providerId declares it executes: 'on_device' for a local provider, 'edge', or 'cloud'. A declaration by the provider's descriptor, not a measurement. 'unknown' when providerId is absent.",
1789
+ "enum": [
1790
+ "on_device",
1791
+ "edge",
1792
+ "cloud",
1793
+ "unknown"
1794
+ ]
1795
+ },
1796
+ "configuredModel": {
1797
+ "description": "The model providerId is bound to, as its descriptor declares it. Absent when the provider cannot name its model or no provider is attributed.",
1798
+ "type": "string",
1799
+ "minLength": 1
1800
+ },
1801
+ "reportedModel": {
1802
+ "description": "The model identifier the provider reported in its own response. Absent means the provider did not report one; it is never inferred from configuration.",
1803
+ "type": "string",
1804
+ "minLength": 1
1805
+ },
1806
+ "attemptCount": {
1807
+ "description": "How many providers were attempted. 0 when the request failed validation or routing, or was cancelled before any attempt started.",
1808
+ "type": "integer",
1809
+ "minimum": 0
1810
+ },
1811
+ "fallbackOccurred": {
1812
+ "description": "Whether more than one provider was attempted (attemptCount > 1).",
1813
+ "type": "boolean"
1814
+ },
1815
+ "attempts": {
1816
+ "description": "Every attempted provider, in attempt order, with how its attempt ended.",
1817
+ "type": "array",
1818
+ "items": {
1819
+ "title": "ExecutionProvenanceAttempt",
1820
+ "type": "object",
1821
+ "additionalProperties": true,
1822
+ "required": [
1823
+ "providerId",
1824
+ "outcome"
1825
+ ],
1826
+ "properties": {
1827
+ "providerId": {
1828
+ "type": "string",
1829
+ "minLength": 1
1830
+ },
1831
+ "outcome": {
1832
+ "title": "AttemptOutcome",
1833
+ "description": "'succeeded' (produced the result or was committed to and completed), 'failed', or 'cancelled'.",
1834
+ "enum": [
1835
+ "succeeded",
1836
+ "failed",
1837
+ "cancelled"
1838
+ ]
1839
+ },
1840
+ "errorClass": {
1841
+ "description": "Normalized error class of a failed attempt.",
1842
+ "enum": [
1843
+ "CapabilityMismatch",
1844
+ "Offline",
1845
+ "AuthError",
1846
+ "RateLimited",
1847
+ "Timeout",
1848
+ "Unavailable",
1849
+ "Internal"
1850
+ ]
1851
+ }
1852
+ }
1853
+ }
1854
+ },
1855
+ "routeRejections": {
1856
+ "description": "Providers the route planner rejected before any attempt, with the normalized RoutePlan reason codes. Codes only: no provider-supplied messages.",
1857
+ "type": "array",
1858
+ "items": {
1859
+ "title": "ExecutionProvenanceRouteRejection",
1860
+ "type": "object",
1861
+ "additionalProperties": true,
1862
+ "required": [
1863
+ "providerId",
1864
+ "codes"
1865
+ ],
1866
+ "properties": {
1867
+ "providerId": {
1868
+ "type": "string",
1869
+ "minLength": 1
1870
+ },
1871
+ "codes": {
1872
+ "type": "array",
1873
+ "items": {
1874
+ "enum": [
1875
+ "task_not_supported",
1876
+ "run_not_supported",
1877
+ "streaming_not_supported",
1878
+ "streaming_unavailable",
1879
+ "privacy_constraint",
1880
+ "cloud_constraint",
1881
+ "offline",
1882
+ "capability_unavailable",
1883
+ "not_in_model_profile"
1884
+ ]
1885
+ }
1886
+ }
1887
+ }
1888
+ }
1889
+ }
1890
+ }
1891
+ };
@@ -105,6 +105,12 @@ export type Payload = {
105
105
  finalText?: string;
106
106
  finishReason?: FinishReason;
107
107
  outcome?: Outcome;
108
+ /**
109
+ * Normalized execution provenance: which target ran, its declared locality, the configured
110
+ * and reported model, and how fallback and routing played out. See
111
+ * execution-provenance.schema.json.
112
+ */
113
+ provenance?: ExecutionProvenance;
108
114
  runId?: string;
109
115
  schemaVersion?: "1.0";
110
116
  telemetry?: Telemetry;
@@ -120,13 +126,116 @@ export type Error = {
120
126
  };
121
127
  errorClass: ErrorClass;
122
128
  message: string;
129
+ /**
130
+ * Normalized execution provenance: which target ran, its declared locality, the configured
131
+ * and reported model, and how fallback and routing played out. See
132
+ * execution-provenance.schema.json.
133
+ */
134
+ provenance?: ExecutionProvenance;
123
135
  providerId?: string;
124
136
  retryable?: boolean;
125
137
  retryAfterMs?: number;
126
138
  schemaVersion: "1.0";
127
139
  [property: string]: unknown;
128
140
  };
141
+ /**
142
+ * Normalized error class of a failed attempt.
143
+ */
129
144
  export type ErrorClass = "CapabilityMismatch" | "Offline" | "AuthError" | "RateLimited" | "Timeout" | "Unavailable" | "Internal";
145
+ /**
146
+ * Normalized execution provenance: which target ran, its declared locality, the configured
147
+ * and reported model, and how fallback and routing played out. See
148
+ * execution-provenance.schema.json.
149
+ *
150
+ * Provider-neutral record of how an execution was carried out: the target the outcome is
151
+ * attributed to, its declared locality, the configured and provider-reported model, every
152
+ * attempt, and why other candidates were rejected. Carried on TaskResult, on every
153
+ * StreamTerminalOutcome branch, and on IndeRunError. It reports what the engine observed
154
+ * and what providers declared or reported; it never infers a model or locality a provider
155
+ * did not state, and it never contains request content, credentials, or provider payloads.
156
+ */
157
+ export type ExecutionProvenance = {
158
+ /**
159
+ * How many providers were attempted. 0 when the request failed validation or routing, or
160
+ * was cancelled before any attempt started.
161
+ */
162
+ attemptCount: number;
163
+ /**
164
+ * Every attempted provider, in attempt order, with how its attempt ended.
165
+ */
166
+ attempts: ExecutionProvenanceAttempt[];
167
+ /**
168
+ * The model providerId is bound to, as its descriptor declares it. Absent when the provider
169
+ * cannot name its model or no provider is attributed.
170
+ */
171
+ configuredModel?: string;
172
+ /**
173
+ * Whether more than one provider was attempted (attemptCount > 1).
174
+ */
175
+ fallbackOccurred: boolean;
176
+ /**
177
+ * Where providerId declares it executes: 'on_device' for a local provider, 'edge', or
178
+ * 'cloud'. A declaration by the provider's descriptor, not a measurement. 'unknown' when
179
+ * providerId is absent.
180
+ */
181
+ locality: Locality;
182
+ /**
183
+ * The model profile the request routed within; 'auto' when the request named none.
184
+ */
185
+ modelProfile: string;
186
+ /**
187
+ * The target the outcome is attributed to: the provider that produced the result, the
188
+ * provider a stream had committed to when it ended, or the provider that was running when
189
+ * it was cancelled. Absent when no provider was reached or when every attempted provider
190
+ * failed before one was committed to.
191
+ */
192
+ providerId?: string;
193
+ /**
194
+ * The model identifier the provider reported in its own response. Absent means the provider
195
+ * did not report one; it is never inferred from configuration.
196
+ */
197
+ reportedModel?: string;
198
+ /**
199
+ * Providers the route planner rejected before any attempt, with the normalized RoutePlan
200
+ * reason codes. Codes only: no provider-supplied messages.
201
+ */
202
+ routeRejections: ExecutionProvenanceRouteRejection[];
203
+ /**
204
+ * Contract schema version used to interpret this provenance record.
205
+ */
206
+ schemaVersion: "1.0";
207
+ [property: string]: unknown;
208
+ };
209
+ export type ExecutionProvenanceAttempt = {
210
+ /**
211
+ * Normalized error class of a failed attempt.
212
+ */
213
+ errorClass?: ErrorClass;
214
+ /**
215
+ * 'succeeded' (produced the result or was committed to and completed), 'failed', or
216
+ * 'cancelled'.
217
+ */
218
+ outcome: AttemptOutcome;
219
+ providerId: string;
220
+ [property: string]: unknown;
221
+ };
222
+ /**
223
+ * 'succeeded' (produced the result or was committed to and completed), 'failed', or
224
+ * 'cancelled'.
225
+ */
226
+ export type AttemptOutcome = "succeeded" | "failed" | "cancelled";
227
+ /**
228
+ * Where providerId declares it executes: 'on_device' for a local provider, 'edge', or
229
+ * 'cloud'. A declaration by the provider's descriptor, not a measurement. 'unknown' when
230
+ * providerId is absent.
231
+ */
232
+ export type Locality = "on_device" | "edge" | "cloud" | "unknown";
233
+ export type ExecutionProvenanceRouteRejection = {
234
+ codes: Code[];
235
+ providerId: string;
236
+ [property: string]: unknown;
237
+ };
238
+ export type Code = "task_not_supported" | "run_not_supported" | "streaming_not_supported" | "streaming_unavailable" | "privacy_constraint" | "cloud_constraint" | "offline" | "capability_unavailable" | "not_in_model_profile";
130
239
  export type FinishReason = "stop" | "length" | "cancelled" | "error";
131
240
  export type Outcome = "completed" | "error" | "cancelled";
132
241
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"stream-event.d.ts","sourceRoot":"","sources":["../../src/generated/stream-event.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,WAAW,G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AG,oBAAoB,GAAG,kBAAkB,GAAG,SAAS,GAAG,wBAAwB,GAAG,sBAAsB,CAAC;AAEhO,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AAErE,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,OAAO,GAAG,WAAW,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,mBAAmB,GAAG,SAAS,CAAC;AAEpD,MAAM,MAAM,SAAS,GAAG;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAO,MAAM,CAAC;IACrB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED,MAAM,MAAM,KAAK,GAAG;IAChB,WAAW,CAAC,EAAG,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAG,MAAM,CAAC;IACtB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA"}
@@ -40,6 +40,12 @@ export type StreamTerminalOutcome = {
40
40
  * further fallback attempt is made, per the engine's cancellation guarantee.
41
41
  */
42
42
  outcome: Outcome;
43
+ /**
44
+ * Normalized execution provenance: which target ran, its declared locality, the configured
45
+ * and reported model, and how fallback and routing played out. See
46
+ * execution-provenance.schema.json.
47
+ */
48
+ provenance?: ExecutionProvenance;
43
49
  /**
44
50
  * The stream run this outcome terminates, matching StreamRunHandle.runId and every
45
51
  * StreamEvent.runId for the run.
@@ -107,6 +113,12 @@ export type Error = {
107
113
  * Human-readable error message suitable for logs and developer diagnostics.
108
114
  */
109
115
  message: string;
116
+ /**
117
+ * Normalized execution provenance: which target ran, its declared locality, the configured
118
+ * and reported model, and how fallback and routing played out. See
119
+ * execution-provenance.schema.json.
120
+ */
121
+ provenance?: ExecutionProvenance;
110
122
  /**
111
123
  * Identifier of the provider associated with the failure, if execution reached a provider.
112
124
  */
@@ -131,8 +143,104 @@ export type Error = {
131
143
  * unreachable or not ready), AuthError (credential/auth failure), RateLimited (provider
132
144
  * throttled the request), Timeout (provider exceeded its execution budget), Internal
133
145
  * (unexpected engine-side failure).
146
+ *
147
+ * Normalized error class of a failed attempt.
134
148
  */
135
149
  export type ErrorClass = "CapabilityMismatch" | "Offline" | "AuthError" | "RateLimited" | "Timeout" | "Unavailable" | "Internal";
150
+ /**
151
+ * Normalized execution provenance: which target ran, its declared locality, the configured
152
+ * and reported model, and how fallback and routing played out. See
153
+ * execution-provenance.schema.json.
154
+ *
155
+ * Provider-neutral record of how an execution was carried out: the target the outcome is
156
+ * attributed to, its declared locality, the configured and provider-reported model, every
157
+ * attempt, and why other candidates were rejected. Carried on TaskResult, on every
158
+ * StreamTerminalOutcome branch, and on IndeRunError. It reports what the engine observed
159
+ * and what providers declared or reported; it never infers a model or locality a provider
160
+ * did not state, and it never contains request content, credentials, or provider payloads.
161
+ */
162
+ export type ExecutionProvenance = {
163
+ /**
164
+ * How many providers were attempted. 0 when the request failed validation or routing, or
165
+ * was cancelled before any attempt started.
166
+ */
167
+ attemptCount: number;
168
+ /**
169
+ * Every attempted provider, in attempt order, with how its attempt ended.
170
+ */
171
+ attempts: ExecutionProvenanceAttempt[];
172
+ /**
173
+ * The model providerId is bound to, as its descriptor declares it. Absent when the provider
174
+ * cannot name its model or no provider is attributed.
175
+ */
176
+ configuredModel?: string;
177
+ /**
178
+ * Whether more than one provider was attempted (attemptCount > 1).
179
+ */
180
+ fallbackOccurred: boolean;
181
+ /**
182
+ * Where providerId declares it executes: 'on_device' for a local provider, 'edge', or
183
+ * 'cloud'. A declaration by the provider's descriptor, not a measurement. 'unknown' when
184
+ * providerId is absent.
185
+ */
186
+ locality: Locality;
187
+ /**
188
+ * The model profile the request routed within; 'auto' when the request named none.
189
+ */
190
+ modelProfile: string;
191
+ /**
192
+ * The target the outcome is attributed to: the provider that produced the result, the
193
+ * provider a stream had committed to when it ended, or the provider that was running when
194
+ * it was cancelled. Absent when no provider was reached or when every attempted provider
195
+ * failed before one was committed to.
196
+ */
197
+ providerId?: string;
198
+ /**
199
+ * The model identifier the provider reported in its own response. Absent means the provider
200
+ * did not report one; it is never inferred from configuration.
201
+ */
202
+ reportedModel?: string;
203
+ /**
204
+ * Providers the route planner rejected before any attempt, with the normalized RoutePlan
205
+ * reason codes. Codes only: no provider-supplied messages.
206
+ */
207
+ routeRejections: ExecutionProvenanceRouteRejection[];
208
+ /**
209
+ * Contract schema version used to interpret this provenance record.
210
+ */
211
+ schemaVersion: "1.0";
212
+ [property: string]: unknown;
213
+ };
214
+ export type ExecutionProvenanceAttempt = {
215
+ /**
216
+ * Normalized error class of a failed attempt.
217
+ */
218
+ errorClass?: ErrorClass;
219
+ /**
220
+ * 'succeeded' (produced the result or was committed to and completed), 'failed', or
221
+ * 'cancelled'.
222
+ */
223
+ outcome: AttemptOutcome;
224
+ providerId: string;
225
+ [property: string]: unknown;
226
+ };
227
+ /**
228
+ * 'succeeded' (produced the result or was committed to and completed), 'failed', or
229
+ * 'cancelled'.
230
+ */
231
+ export type AttemptOutcome = "succeeded" | "failed" | "cancelled";
232
+ /**
233
+ * Where providerId declares it executes: 'on_device' for a local provider, 'edge', or
234
+ * 'cloud'. A declaration by the provider's descriptor, not a measurement. 'unknown' when
235
+ * providerId is absent.
236
+ */
237
+ export type Locality = "on_device" | "edge" | "cloud" | "unknown";
238
+ export type ExecutionProvenanceRouteRejection = {
239
+ codes: Code[];
240
+ providerId: string;
241
+ [property: string]: unknown;
242
+ };
243
+ export type Code = "task_not_supported" | "run_not_supported" | "streaming_not_supported" | "streaming_unavailable" | "privacy_constraint" | "cloud_constraint" | "offline" | "capability_unavailable" | "not_in_model_profile";
136
244
  /**
137
245
  * How generation ended, mirroring TaskResult.finishReason for Mode 1: 'stop' (natural end),
138
246
  * 'length' (hit maxOutputTokens), 'error' (provider reported a non-fatal issue on an
@@ -1 +1 @@
1
- {"version":3,"file":"stream-terminal-outcome.d.ts","sourceRoot":"","sources":["../../src/generated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,aAAa,GAAG,UAAU,CAAC;AAEjI;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AAErE,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,OAAO,GAAG,WAAW,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,KAAK,GAAG;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA"}
1
+ {"version":3,"file":"stream-terminal-outcome.d.ts","sourceRoot":"","sources":["../../src/generated/stream-terminal-outcome.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;;;;;;OASG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd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AO,CAAC;CAC/B,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,KAAK,GAAG;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAA"}
@@ -22,6 +22,14 @@ export type TaskRequest = {
22
22
  * A list of interaction messages for multi-turn conversation or chat-style execution.
23
23
  */
24
24
  messages?: [Message, ...Message[]];
25
+ /**
26
+ * Name of the model profile to route within, as configured on the engine. Absent or 'auto'
27
+ * means every registered target, ranked by constraints and preferences alone. A profile is
28
+ * an application-defined, ordered allow-list of targets (provider instances bound to one
29
+ * model each); raw model or provider identifiers are never accepted here. An unknown
30
+ * profile name fails request validation.
31
+ */
32
+ modelProfile?: string;
25
33
  /**
26
34
  * Soft routing preferences used for deterministic provider ordering.
27
35
  */
@@ -1 +1 @@
1
- {"version":3,"file":"task-request.d.ts","sourceRoot":"","sources":["../../src/generated/task-request.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG;IACtB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,aAAa,EAAE,KAAK,CAAC;IACrB;;;OAGG;IACH,IAAI,EAAE,IAAI,CAAC;IACX;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