@independo/inderun-contracts 0.4.0 → 0.5.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 (52) hide show
  1. package/dist/generated/execution-provenance.d.ts +1 -1
  2. package/dist/generated/execution-provenance.d.ts.map +1 -1
  3. package/dist/generated/inderun-error.d.ts +1 -1
  4. package/dist/generated/inderun-error.d.ts.map +1 -1
  5. package/dist/generated/index.d.ts +3 -0
  6. package/dist/generated/index.d.ts.map +1 -1
  7. package/dist/generated/provider-capability-snapshot.d.ts +370 -0
  8. package/dist/generated/provider-capability-snapshot.d.ts.map +1 -0
  9. package/dist/generated/provider-capability-snapshot.js +2 -0
  10. package/dist/generated/provider-descriptor.d.ts +264 -0
  11. package/dist/generated/provider-descriptor.d.ts.map +1 -0
  12. package/dist/generated/provider-descriptor.js +2 -0
  13. package/dist/generated/provider-dynamic-capabilities.d.ts +99 -0
  14. package/dist/generated/provider-dynamic-capabilities.d.ts.map +1 -0
  15. package/dist/generated/provider-dynamic-capabilities.js +2 -0
  16. package/dist/generated/route-plan.d.ts +47 -3
  17. package/dist/generated/route-plan.d.ts.map +1 -1
  18. package/dist/generated/route-planner-input.d.ts +417 -32
  19. package/dist/generated/route-planner-input.d.ts.map +1 -1
  20. package/dist/generated/schemas.d.ts +458 -85
  21. package/dist/generated/schemas.d.ts.map +1 -1
  22. package/dist/generated/schemas.js +549 -104
  23. package/dist/generated/stream-event.d.ts +1 -1
  24. package/dist/generated/stream-event.d.ts.map +1 -1
  25. package/dist/generated/stream-terminal-outcome.d.ts +1 -1
  26. package/dist/generated/stream-terminal-outcome.d.ts.map +1 -1
  27. package/dist/generated/task-result.d.ts +1 -1
  28. package/dist/generated/task-result.d.ts.map +1 -1
  29. package/dist/index.d.ts +4 -4
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +2 -2
  32. package/dist/types.d.ts +7 -1
  33. package/dist/types.d.ts.map +1 -1
  34. package/dist/validators.d.ts +9 -0
  35. package/dist/validators.d.ts.map +1 -1
  36. package/dist/validators.js +24 -1
  37. package/package.json +1 -1
  38. package/src/generated/execution-provenance.ts +1 -1
  39. package/src/generated/inderun-error.ts +1 -1
  40. package/src/generated/index.ts +3 -0
  41. package/src/generated/provider-capability-snapshot.ts +388 -0
  42. package/src/generated/provider-descriptor.ts +278 -0
  43. package/src/generated/provider-dynamic-capabilities.ts +103 -0
  44. package/src/generated/route-plan.ts +49 -3
  45. package/src/generated/route-planner-input.ts +437 -36
  46. package/src/generated/schemas.ts +552 -104
  47. package/src/generated/stream-event.ts +1 -1
  48. package/src/generated/stream-terminal-outcome.ts +1 -1
  49. package/src/generated/task-result.ts +1 -1
  50. package/src/index.ts +13 -1
  51. package/src/types.ts +7 -0
  52. package/src/validators.ts +39 -0
@@ -0,0 +1,103 @@
1
+ /* This file was generated from JSON Schema using quicktype. Do not edit by hand. */
2
+
3
+ /**
4
+ * A provider's live capability check, evaluated on the current host when routing or when
5
+ * checkCapabilities() is called. Unlike the descriptor it can change between calls.
6
+ */
7
+ export type ProviderDynamicCapabilities = {
8
+ /**
9
+ * Whether the provider is available and functional on this host right now.
10
+ */
11
+ available: boolean;
12
+ /**
13
+ * Whether cancellation is honored on this host right now. Absent inherits the static
14
+ * descriptor.cancel value: any value other than 'none' means available. Never null.
15
+ */
16
+ cancellationAvailable?: boolean;
17
+ /**
18
+ * Why the provider is unavailable, when available is false.
19
+ */
20
+ reason?: string;
21
+ /**
22
+ * Whether the provider can stream (Mode 2) on this host right now. Absent inherits the
23
+ * static descriptor.supports.streaming value; only set it when the host takes streaming
24
+ * away from a provider that otherwise declares it. Never null.
25
+ */
26
+ streamingAvailable?: boolean;
27
+ /**
28
+ * Why streaming is unavailable, when streamingAvailable is false. Absent lets the route
29
+ * planner synthesize a default message.
30
+ */
31
+ streamingUnavailableReason?: string;
32
+ /**
33
+ * Per-task overrides of the provider-level check, for tasks whose availability differs on
34
+ * this host, e.g. a voice that is not installed. Every field of an entry is optional and
35
+ * absent inherits the provider-level value; a false at either level wins.
36
+ */
37
+ taskCapabilities?: ProviderTaskAvailability[];
38
+ [property: string]: unknown;
39
+ }
40
+
41
+ /**
42
+ * The live check for one task kind.
43
+ */
44
+ export type ProviderTaskAvailability = {
45
+ /**
46
+ * Whether the task can run on this host right now. Absent inherits the provider-level
47
+ * available. Never null.
48
+ */
49
+ available?: boolean;
50
+ /**
51
+ * Whether cancellation is honored for this task right now. Absent inherits. Never null.
52
+ */
53
+ cancellationAvailable?: boolean;
54
+ /**
55
+ * The task kind this entry describes.
56
+ */
57
+ kind: string;
58
+ /**
59
+ * BCP 47 locales available for this task right now. Absent means the provider cannot
60
+ * enumerate them.
61
+ */
62
+ locales?: string[];
63
+ /**
64
+ * Why the task is unavailable, when available is false.
65
+ */
66
+ reason?: string;
67
+ /**
68
+ * Whether the task can stream on this host right now. Absent inherits. Never null.
69
+ */
70
+ streamingAvailable?: boolean;
71
+ /**
72
+ * Why streaming is unavailable for this task, when streamingAvailable is false.
73
+ */
74
+ streamingUnavailableReason?: string;
75
+ /**
76
+ * Voices available for this task right now. Absent means the provider cannot enumerate
77
+ * them; a request that requires a voice then never routes to it.
78
+ */
79
+ voices?: ProviderVoice[];
80
+ [property: string]: unknown;
81
+ }
82
+
83
+ /**
84
+ * Provider-neutral traits of one available voice. Carries no provider voice identifier.
85
+ */
86
+ export type ProviderVoice = {
87
+ gender?: VoiceGender;
88
+ /**
89
+ * BCP 47 locale the voice speaks.
90
+ */
91
+ locale: string;
92
+ /**
93
+ * Whether using the voice sends data off the device. Absent inherits the task's privacy
94
+ * posture.
95
+ */
96
+ networkRequired?: boolean;
97
+ [property: string]: unknown;
98
+ }
99
+
100
+ /**
101
+ * Perceived gender of a voice, as the platform reports it.
102
+ */
103
+ export type VoiceGender = "female" | "male" | "neutral";
@@ -34,9 +34,49 @@ export type RoutePlan = {
34
34
  export type Candidate = {
35
35
  order: number;
36
36
  providerId: string;
37
+ /**
38
+ * The voice this candidate must use if it is attempted, chosen by the planner from the
39
+ * provider's dynamic voice inventory. It is the best voice that satisfies the request's
40
+ * locale, required voice traits and privacy — under local-required privacy always one that
41
+ * keeps data on the device — ranked by preferred gender, then exact locale region, then
42
+ * on-device before network. The adapter must use a voice with exactly these traits. Absent
43
+ * when the request names no locale or voice, or the provider does not list its voices; the
44
+ * adapter then chooses itself under the same rules.
45
+ */
46
+ voice?: ProviderVoice;
47
+ [property: string]: unknown;
48
+ }
49
+
50
+ /**
51
+ * The voice this candidate must use if it is attempted, chosen by the planner from the
52
+ * provider's dynamic voice inventory. It is the best voice that satisfies the request's
53
+ * locale, required voice traits and privacy — under local-required privacy always one that
54
+ * keeps data on the device — ranked by preferred gender, then exact locale region, then
55
+ * on-device before network. The adapter must use a voice with exactly these traits. Absent
56
+ * when the request names no locale or voice, or the provider does not list its voices; the
57
+ * adapter then chooses itself under the same rules.
58
+ *
59
+ * Provider-neutral traits of one available voice. Carries no provider voice identifier.
60
+ */
61
+ export type ProviderVoice = {
62
+ gender?: VoiceGender;
63
+ /**
64
+ * BCP 47 locale the voice speaks.
65
+ */
66
+ locale: string;
67
+ /**
68
+ * Whether using the voice sends data off the device. Absent inherits the task's privacy
69
+ * posture.
70
+ */
71
+ networkRequired?: boolean;
37
72
  [property: string]: unknown;
38
73
  }
39
74
 
75
+ /**
76
+ * Perceived gender of a voice, as the platform reports it.
77
+ */
78
+ export type VoiceGender = "female" | "male" | "neutral";
79
+
40
80
  /**
41
81
  * Human-readable selection or failure explanation suitable for telemetry/debugging.
42
82
  */
@@ -63,7 +103,10 @@ export type Reason = {
63
103
  * statically declare Mode-2 streaming; 'streaming_unavailable' means it declares streaming
64
104
  * but the dynamic capability snapshot reports it cannot stream in the current host
65
105
  * environment. 'not_in_model_profile' means the request named a model profile that does not
66
- * list this provider.
106
+ * list this provider. 'input_not_supported', 'output_delivery_not_supported',
107
+ * 'output_format_not_supported', 'locale_not_supported' and 'voice_not_available' mean the
108
+ * provider's task capability lacks an input kind, output delivery, media type, locale or
109
+ * voice the request requires.
67
110
  */
68
111
  code: Code;
69
112
  message: string;
@@ -75,6 +118,9 @@ export type Reason = {
75
118
  * statically declare Mode-2 streaming; 'streaming_unavailable' means it declares streaming
76
119
  * but the dynamic capability snapshot reports it cannot stream in the current host
77
120
  * environment. 'not_in_model_profile' means the request named a model profile that does not
78
- * list this provider.
121
+ * list this provider. 'input_not_supported', 'output_delivery_not_supported',
122
+ * 'output_format_not_supported', 'locale_not_supported' and 'voice_not_available' mean the
123
+ * provider's task capability lacks an input kind, output delivery, media type, locale or
124
+ * voice the request requires.
79
125
  */
80
- 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";
126
+ 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" | "input_not_supported" | "output_delivery_not_supported" | "output_format_not_supported" | "locale_not_supported" | "voice_not_available";