@independo/inderun-contracts 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +16 -0
- package/dist/generated/http-request.d.ts +34 -0
- package/dist/generated/http-request.d.ts.map +1 -0
- package/dist/generated/http-request.js +2 -0
- package/dist/generated/http-response.d.ts +25 -0
- package/dist/generated/http-response.d.ts.map +1 -0
- package/dist/generated/http-response.js +2 -0
- package/dist/generated/inderun-error.d.ts +45 -0
- package/dist/generated/inderun-error.d.ts.map +1 -0
- package/dist/generated/inderun-error.js +2 -0
- package/dist/generated/index.d.ts +10 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +2 -0
- package/dist/generated/route-plan.d.ts +59 -0
- package/dist/generated/route-plan.d.ts.map +1 -0
- package/dist/generated/route-plan.js +2 -0
- package/dist/generated/route-planner-input.d.ts +104 -0
- package/dist/generated/route-planner-input.d.ts.map +1 -0
- package/dist/generated/route-planner-input.js +2 -0
- package/dist/generated/schemas.d.ts +610 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/schemas.js +773 -0
- package/dist/generated/task-request.d.ts +171 -0
- package/dist/generated/task-request.d.ts.map +1 -0
- package/dist/generated/task-request.js +2 -0
- package/dist/generated/task-result.d.ts +96 -0
- package/dist/generated/task-result.d.ts.map +1 -0
- package/dist/generated/task-result.js +2 -0
- package/dist/generated/telemetry-event.d.ts +29 -0
- package/dist/generated/telemetry-event.d.ts.map +1 -0
- package/dist/generated/telemetry-event.js +2 -0
- package/dist/host.d.ts +111 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/types.d.ts +18 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +1 -0
- package/dist/validators.d.ts +30 -0
- package/dist/validators.d.ts.map +1 -0
- package/dist/validators.js +158 -0
- package/package.json +33 -0
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
export declare const taskRequestSchema: {
|
|
2
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
3
|
+
readonly $id: "https://schemas.inderun.dev/1.0/task-request.schema.json";
|
|
4
|
+
readonly title: "TaskRequest";
|
|
5
|
+
readonly description: "The standard request payload for initiating a text-to-text execution task within the IndeRun framework.";
|
|
6
|
+
readonly type: "object";
|
|
7
|
+
readonly additionalProperties: true;
|
|
8
|
+
readonly required: readonly ["schemaVersion", "task"];
|
|
9
|
+
readonly anyOf: readonly [{
|
|
10
|
+
readonly required: readonly ["prompt"];
|
|
11
|
+
}, {
|
|
12
|
+
readonly required: readonly ["messages"];
|
|
13
|
+
}];
|
|
14
|
+
readonly properties: {
|
|
15
|
+
readonly schemaVersion: {
|
|
16
|
+
readonly description: "Contract schema version used to interpret the request payload.";
|
|
17
|
+
readonly const: "1.0";
|
|
18
|
+
};
|
|
19
|
+
readonly requestId: {
|
|
20
|
+
readonly description: "Optional identifier for tracking or correlating this specific execution attempt.";
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
readonly minLength: 1;
|
|
23
|
+
};
|
|
24
|
+
readonly task: {
|
|
25
|
+
readonly description: "A descriptor specifying the type of work to be performed. For text-to-text, the kind must be 'text_to_text'.";
|
|
26
|
+
readonly type: "object";
|
|
27
|
+
readonly additionalProperties: true;
|
|
28
|
+
readonly required: readonly ["kind"];
|
|
29
|
+
readonly properties: {
|
|
30
|
+
readonly kind: {
|
|
31
|
+
readonly description: "The standard task category. Currently supports 'text_to_text' for prompt-based interactions.";
|
|
32
|
+
readonly const: "text_to_text";
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
readonly prompt: {
|
|
37
|
+
readonly description: "A simple, single-turn text prompt used to trigger a response from the AI model.";
|
|
38
|
+
readonly type: "string";
|
|
39
|
+
readonly minLength: 1;
|
|
40
|
+
};
|
|
41
|
+
readonly messages: {
|
|
42
|
+
readonly description: "A list of interaction messages for multi-turn conversation or chat-style execution.";
|
|
43
|
+
readonly type: "array";
|
|
44
|
+
readonly minItems: 1;
|
|
45
|
+
readonly items: {
|
|
46
|
+
readonly description: "An individual message in a conversation.";
|
|
47
|
+
readonly type: "object";
|
|
48
|
+
readonly additionalProperties: true;
|
|
49
|
+
readonly required: readonly ["role", "content"];
|
|
50
|
+
readonly properties: {
|
|
51
|
+
readonly role: {
|
|
52
|
+
readonly description: "The role of the author (e.g., 'user', 'assistant').";
|
|
53
|
+
readonly enum: readonly ["system", "user", "assistant"];
|
|
54
|
+
};
|
|
55
|
+
readonly content: {
|
|
56
|
+
readonly description: "The actual text content of the message.";
|
|
57
|
+
readonly type: "string";
|
|
58
|
+
readonly minLength: 1;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
readonly generation: {
|
|
64
|
+
readonly description: "Optional configuration for fine-tuning how the AI model generates its response.";
|
|
65
|
+
readonly type: "object";
|
|
66
|
+
readonly additionalProperties: true;
|
|
67
|
+
readonly properties: {
|
|
68
|
+
readonly maxOutputTokens: {
|
|
69
|
+
readonly description: "The maximum number of tokens to generate in a single response.";
|
|
70
|
+
readonly type: "integer";
|
|
71
|
+
readonly minimum: 1;
|
|
72
|
+
};
|
|
73
|
+
readonly temperature: {
|
|
74
|
+
readonly description: "Controls the randomness of the output. Range: 0 (most deterministic) to 2 (highest variance).";
|
|
75
|
+
readonly type: "number";
|
|
76
|
+
readonly minimum: 0;
|
|
77
|
+
readonly maximum: 2;
|
|
78
|
+
};
|
|
79
|
+
readonly topP: {
|
|
80
|
+
readonly description: "Nucleus sampling parameter for controlling diversity vs focus in the output.";
|
|
81
|
+
readonly type: "number";
|
|
82
|
+
readonly minimum: 0;
|
|
83
|
+
readonly maximum: 1;
|
|
84
|
+
};
|
|
85
|
+
readonly seed: {
|
|
86
|
+
readonly description: "A fixed seed for deterministic generation (where supported by the underlying provider).";
|
|
87
|
+
readonly type: "integer";
|
|
88
|
+
};
|
|
89
|
+
readonly stop: {
|
|
90
|
+
readonly description: "Sequence tokens that should terminate the generation process.";
|
|
91
|
+
readonly type: "array";
|
|
92
|
+
readonly items: {
|
|
93
|
+
readonly type: "string";
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
readonly constraints: {
|
|
99
|
+
readonly description: "Request-level routing constraints used by the planner.";
|
|
100
|
+
readonly type: "object";
|
|
101
|
+
readonly additionalProperties: true;
|
|
102
|
+
readonly properties: {
|
|
103
|
+
readonly privacy: {
|
|
104
|
+
readonly description: "Privacy requirement or preference for execution placement.";
|
|
105
|
+
readonly enum: readonly ["local_required", "local_preferred", "cloud_allowed", "cloud_required"];
|
|
106
|
+
};
|
|
107
|
+
readonly cloud: {
|
|
108
|
+
readonly description: "Cloud execution constraint.";
|
|
109
|
+
readonly enum: readonly ["forbidden", "allowed", "required"];
|
|
110
|
+
};
|
|
111
|
+
readonly timeoutMs: {
|
|
112
|
+
readonly description: "Optional routing timeout budget in milliseconds.";
|
|
113
|
+
readonly type: "integer";
|
|
114
|
+
readonly minimum: 1;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
readonly preferences: {
|
|
119
|
+
readonly description: "Soft routing preferences used for deterministic provider ordering.";
|
|
120
|
+
readonly type: "object";
|
|
121
|
+
readonly additionalProperties: true;
|
|
122
|
+
readonly properties: {
|
|
123
|
+
readonly optimizeFor: {
|
|
124
|
+
readonly description: "Primary optimization goal when multiple providers remain eligible.";
|
|
125
|
+
readonly enum: readonly ["privacy", "latency", "cost", "balanced"];
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
readonly telemetry: {
|
|
130
|
+
readonly description: "Execution preferences for tracking usage and performance metrics.";
|
|
131
|
+
readonly type: "object";
|
|
132
|
+
readonly additionalProperties: true;
|
|
133
|
+
readonly properties: {
|
|
134
|
+
readonly consent: {
|
|
135
|
+
readonly description: "Whether the user consents to telemetry collection for this specific request.";
|
|
136
|
+
readonly type: "boolean";
|
|
137
|
+
};
|
|
138
|
+
readonly level: {
|
|
139
|
+
readonly description: "The granularity of the collected metrics (off, minimal, or debug).";
|
|
140
|
+
readonly enum: readonly ["off", "minimal", "debug"];
|
|
141
|
+
};
|
|
142
|
+
readonly tags: {
|
|
143
|
+
readonly description: "Optional key-value pairs for correlating telemetry data with specific features or users.";
|
|
144
|
+
readonly type: "object";
|
|
145
|
+
readonly additionalProperties: {
|
|
146
|
+
readonly type: "string";
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
readonly authContextRef: {
|
|
152
|
+
readonly description: "A unique identifier used to retrieve credentials from a secure local storage. Raw sensitive keys (API keys, etc.) should NEVER be placed directly in the request payload.";
|
|
153
|
+
readonly type: "string";
|
|
154
|
+
readonly minLength: 1;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
export declare const taskResultSchema: {
|
|
159
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
160
|
+
readonly $id: "https://schemas.inderun.dev/1.0/task-result.schema.json";
|
|
161
|
+
readonly title: "TaskResult";
|
|
162
|
+
readonly description: "The standard response payload for completed text-to-text execution within the IndeRun framework.";
|
|
163
|
+
readonly type: "object";
|
|
164
|
+
readonly additionalProperties: true;
|
|
165
|
+
readonly required: readonly ["schemaVersion", "runId", "output", "finishReason", "telemetry"];
|
|
166
|
+
readonly properties: {
|
|
167
|
+
readonly schemaVersion: {
|
|
168
|
+
readonly description: "Contract schema version used to interpret the result payload.";
|
|
169
|
+
readonly const: "1.0";
|
|
170
|
+
};
|
|
171
|
+
readonly runId: {
|
|
172
|
+
readonly description: "A unique, opaque identifier assigned by the engine for this specific execution attempt.";
|
|
173
|
+
readonly type: "string";
|
|
174
|
+
readonly minLength: 1;
|
|
175
|
+
};
|
|
176
|
+
readonly output: {
|
|
177
|
+
readonly description: "The normalized content returned from the selected provider.";
|
|
178
|
+
readonly type: "object";
|
|
179
|
+
readonly additionalProperties: true;
|
|
180
|
+
readonly required: readonly ["type", "text"];
|
|
181
|
+
readonly properties: {
|
|
182
|
+
readonly type: {
|
|
183
|
+
readonly description: "Output payload category (e.g., 'text' for Mode 1 text-to-text).";
|
|
184
|
+
readonly const: "text";
|
|
185
|
+
};
|
|
186
|
+
readonly text: {
|
|
187
|
+
readonly description: "The actual text generated by the execution.";
|
|
188
|
+
readonly type: "string";
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
readonly finishReason: {
|
|
193
|
+
readonly description: "Standardized reason describing how generation concluded (e.g., 'stop', 'length', 'cancelled', or 'error').";
|
|
194
|
+
readonly enum: readonly ["stop", "length", "cancelled", "error"];
|
|
195
|
+
};
|
|
196
|
+
readonly usage: {
|
|
197
|
+
readonly description: "Optional metadata regarding the quantity of tokens processed by the provider.";
|
|
198
|
+
readonly type: "object";
|
|
199
|
+
readonly additionalProperties: true;
|
|
200
|
+
readonly properties: {
|
|
201
|
+
readonly inputTokens: {
|
|
202
|
+
readonly description: "Number of input tokens consumed, as reported by the provider.";
|
|
203
|
+
readonly type: "integer";
|
|
204
|
+
readonly minimum: 0;
|
|
205
|
+
};
|
|
206
|
+
readonly outputTokens: {
|
|
207
|
+
readonly description: "Number of output tokens generated, as reported by the provider.";
|
|
208
|
+
readonly type: "integer";
|
|
209
|
+
readonly minimum: 0;
|
|
210
|
+
};
|
|
211
|
+
readonly totalTokens: {
|
|
212
|
+
readonly description: "Aggregated token count for this request, as reported by the provider.";
|
|
213
|
+
readonly type: "integer";
|
|
214
|
+
readonly minimum: 0;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
readonly telemetry: {
|
|
219
|
+
readonly description: "Required metadata providing an overview of the execution result and performance metrics.";
|
|
220
|
+
readonly type: "object";
|
|
221
|
+
readonly additionalProperties: true;
|
|
222
|
+
readonly required: readonly ["providerUsed", "totalMs"];
|
|
223
|
+
readonly properties: {
|
|
224
|
+
readonly providerUsed: {
|
|
225
|
+
readonly description: "The identifier for the specific provider that handled the request (e.g., 'openai_compatible_cloud').";
|
|
226
|
+
readonly type: "string";
|
|
227
|
+
readonly minLength: 1;
|
|
228
|
+
};
|
|
229
|
+
readonly totalMs: {
|
|
230
|
+
readonly description: "Measured execution duration in milliseconds, including route selection and result processing.";
|
|
231
|
+
readonly type: "number";
|
|
232
|
+
readonly minimum: 0;
|
|
233
|
+
};
|
|
234
|
+
readonly errorClass: {
|
|
235
|
+
readonly description: "Included if the request resulted in a provider-level error (e.g., 'CapabilityMismatch' or 'Unavailable').";
|
|
236
|
+
readonly enum: readonly ["CapabilityMismatch", "Offline", "AuthError", "RateLimited", "Timeout", "Unavailable", "Internal"];
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
export declare const inderunErrorSchema: {
|
|
243
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
244
|
+
readonly $id: "https://schemas.inderun.dev/1.0/inderun-error.schema.json";
|
|
245
|
+
readonly title: "IndeRunError";
|
|
246
|
+
readonly description: "Normalized Milestone-1 error contract.";
|
|
247
|
+
readonly type: "object";
|
|
248
|
+
readonly additionalProperties: true;
|
|
249
|
+
readonly required: readonly ["schemaVersion", "errorClass", "message"];
|
|
250
|
+
readonly properties: {
|
|
251
|
+
readonly schemaVersion: {
|
|
252
|
+
readonly description: "Contract schema version used to interpret the error payload.";
|
|
253
|
+
readonly const: "1.0";
|
|
254
|
+
};
|
|
255
|
+
readonly errorClass: {
|
|
256
|
+
readonly description: "Normalized error taxonomy class.";
|
|
257
|
+
readonly enum: readonly ["CapabilityMismatch", "Offline", "AuthError", "RateLimited", "Timeout", "Unavailable", "Internal"];
|
|
258
|
+
};
|
|
259
|
+
readonly message: {
|
|
260
|
+
readonly description: "Human-readable error message suitable for logs and developer diagnostics.";
|
|
261
|
+
readonly type: "string";
|
|
262
|
+
readonly minLength: 1;
|
|
263
|
+
};
|
|
264
|
+
readonly runId: {
|
|
265
|
+
readonly description: "Opaque run identifier associated with the failed execution, if available.";
|
|
266
|
+
readonly type: "string";
|
|
267
|
+
readonly minLength: 1;
|
|
268
|
+
};
|
|
269
|
+
readonly providerId: {
|
|
270
|
+
readonly description: "Identifier of the provider associated with the failure, if execution reached a provider.";
|
|
271
|
+
readonly type: "string";
|
|
272
|
+
readonly minLength: 1;
|
|
273
|
+
};
|
|
274
|
+
readonly retryable: {
|
|
275
|
+
readonly description: "Whether retrying the same request may succeed.";
|
|
276
|
+
readonly type: "boolean";
|
|
277
|
+
};
|
|
278
|
+
readonly retryAfterMs: {
|
|
279
|
+
readonly description: "Optional suggested delay before retrying, in milliseconds.";
|
|
280
|
+
readonly type: "integer";
|
|
281
|
+
readonly minimum: 0;
|
|
282
|
+
};
|
|
283
|
+
readonly details: {
|
|
284
|
+
readonly description: "Optional structured diagnostic details. It must not contain raw secrets.";
|
|
285
|
+
readonly type: "object";
|
|
286
|
+
readonly additionalProperties: true;
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
export declare const httpRequestSchema: {
|
|
291
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
292
|
+
readonly $id: "https://schemas.inderun.dev/1.0/http-request.schema.json";
|
|
293
|
+
readonly title: "HttpRequest";
|
|
294
|
+
readonly description: "Normalized HTTP request payload for host-provided cloud transport.";
|
|
295
|
+
readonly type: "object";
|
|
296
|
+
readonly additionalProperties: true;
|
|
297
|
+
readonly required: readonly ["method", "url"];
|
|
298
|
+
readonly properties: {
|
|
299
|
+
readonly method: {
|
|
300
|
+
readonly description: "HTTP method to use for the request.";
|
|
301
|
+
readonly enum: readonly ["GET", "POST", "PUT", "DELETE", "PATCH"];
|
|
302
|
+
};
|
|
303
|
+
readonly url: {
|
|
304
|
+
readonly description: "Absolute target URL for the provider transport request.";
|
|
305
|
+
readonly type: "string";
|
|
306
|
+
readonly minLength: 1;
|
|
307
|
+
};
|
|
308
|
+
readonly headers: {
|
|
309
|
+
readonly description: "HTTP headers to send after the provider adapter has applied any required transport-level credentials.";
|
|
310
|
+
readonly type: "object";
|
|
311
|
+
readonly additionalProperties: {
|
|
312
|
+
readonly type: "string";
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
readonly body: {
|
|
316
|
+
readonly description: "Optional serialized request body. For JSON APIs this should be a JSON string.";
|
|
317
|
+
readonly type: "string";
|
|
318
|
+
};
|
|
319
|
+
readonly timeoutMs: {
|
|
320
|
+
readonly description: "Optional maximum duration for the host transport attempt in milliseconds.";
|
|
321
|
+
readonly type: "integer";
|
|
322
|
+
readonly minimum: 1;
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
export declare const httpResponseSchema: {
|
|
327
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
328
|
+
readonly $id: "https://schemas.inderun.dev/1.0/http-response.schema.json";
|
|
329
|
+
readonly title: "HttpResponse";
|
|
330
|
+
readonly description: "Normalized HTTP response payload returned by host-provided cloud transport.";
|
|
331
|
+
readonly type: "object";
|
|
332
|
+
readonly additionalProperties: true;
|
|
333
|
+
readonly required: readonly ["status", "statusText", "headers", "body"];
|
|
334
|
+
readonly properties: {
|
|
335
|
+
readonly status: {
|
|
336
|
+
readonly description: "HTTP status code returned by the provider transport.";
|
|
337
|
+
readonly type: "integer";
|
|
338
|
+
readonly minimum: 100;
|
|
339
|
+
readonly maximum: 599;
|
|
340
|
+
};
|
|
341
|
+
readonly statusText: {
|
|
342
|
+
readonly description: "HTTP status text returned by the provider transport.";
|
|
343
|
+
readonly type: "string";
|
|
344
|
+
};
|
|
345
|
+
readonly headers: {
|
|
346
|
+
readonly description: "HTTP response headers normalized to string key-value pairs.";
|
|
347
|
+
readonly type: "object";
|
|
348
|
+
readonly additionalProperties: {
|
|
349
|
+
readonly type: "string";
|
|
350
|
+
};
|
|
351
|
+
};
|
|
352
|
+
readonly body: {
|
|
353
|
+
readonly description: "Serialized response body returned by the provider transport.";
|
|
354
|
+
readonly type: "string";
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
export declare const telemetryEventSchema: {
|
|
359
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
360
|
+
readonly $id: "https://schemas.inderun.dev/1.0/telemetry-event.schema.json";
|
|
361
|
+
readonly title: "TelemetryEvent";
|
|
362
|
+
readonly description: "Normalized telemetry event emitted by the orchestrator and providers.";
|
|
363
|
+
readonly type: "object";
|
|
364
|
+
readonly additionalProperties: true;
|
|
365
|
+
readonly required: readonly ["type", "runId", "timestamp", "payload"];
|
|
366
|
+
readonly properties: {
|
|
367
|
+
readonly type: {
|
|
368
|
+
readonly description: "Telemetry event kind emitted by the orchestrator or provider integration.";
|
|
369
|
+
readonly enum: readonly ["route_decided", "attempt_succeeded", "attempt_failed"];
|
|
370
|
+
};
|
|
371
|
+
readonly runId: {
|
|
372
|
+
readonly description: "Opaque run identifier associated with this execution event.";
|
|
373
|
+
readonly type: "string";
|
|
374
|
+
readonly minLength: 1;
|
|
375
|
+
};
|
|
376
|
+
readonly timestamp: {
|
|
377
|
+
readonly description: "Wall-clock event timestamp in Unix epoch milliseconds.";
|
|
378
|
+
readonly type: "number";
|
|
379
|
+
readonly minimum: 0;
|
|
380
|
+
};
|
|
381
|
+
readonly payload: {
|
|
382
|
+
readonly description: "Event-specific metadata. It must not contain prompt payloads or raw secrets.";
|
|
383
|
+
readonly type: "object";
|
|
384
|
+
readonly additionalProperties: true;
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
export declare const routePlannerInputSchema: {
|
|
389
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
390
|
+
readonly $id: "https://schemas.inderun.dev/1.0/route-planner-input.schema.json";
|
|
391
|
+
readonly title: "RoutePlannerInput";
|
|
392
|
+
readonly description: "Pure data input contract for deterministic shared-core Mode-1 route planning.";
|
|
393
|
+
readonly type: "object";
|
|
394
|
+
readonly additionalProperties: true;
|
|
395
|
+
readonly required: readonly ["task", "constraints", "preferences", "providers"];
|
|
396
|
+
readonly properties: {
|
|
397
|
+
readonly task: {
|
|
398
|
+
readonly description: "Minimal task descriptor for provider task matching.";
|
|
399
|
+
readonly type: "object";
|
|
400
|
+
readonly additionalProperties: true;
|
|
401
|
+
readonly required: readonly ["kind"];
|
|
402
|
+
readonly properties: {
|
|
403
|
+
readonly kind: {
|
|
404
|
+
readonly type: "string";
|
|
405
|
+
readonly minLength: 1;
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
readonly constraints: {
|
|
410
|
+
readonly description: "Hard routing constraints evaluated before provider selection.";
|
|
411
|
+
readonly type: "object";
|
|
412
|
+
readonly additionalProperties: true;
|
|
413
|
+
readonly properties: {
|
|
414
|
+
readonly privacy: {
|
|
415
|
+
readonly description: "Privacy requirement or preference for execution placement.";
|
|
416
|
+
readonly enum: readonly ["local_required", "local_preferred", "cloud_allowed", "cloud_required"];
|
|
417
|
+
};
|
|
418
|
+
readonly cloud: {
|
|
419
|
+
readonly description: "Cloud execution constraint.";
|
|
420
|
+
readonly enum: readonly ["forbidden", "allowed", "required"];
|
|
421
|
+
};
|
|
422
|
+
readonly networkOnline: {
|
|
423
|
+
readonly description: "Current connectivity snapshot used for cloud route planning.";
|
|
424
|
+
readonly type: "boolean";
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
};
|
|
428
|
+
readonly preferences: {
|
|
429
|
+
readonly description: "Soft route ordering preferences applied after hard filtering.";
|
|
430
|
+
readonly type: "object";
|
|
431
|
+
readonly additionalProperties: true;
|
|
432
|
+
readonly properties: {
|
|
433
|
+
readonly optimizeFor: {
|
|
434
|
+
readonly description: "Primary optimization goal when multiple providers remain eligible.";
|
|
435
|
+
readonly enum: readonly ["privacy", "latency", "cost", "balanced"];
|
|
436
|
+
};
|
|
437
|
+
};
|
|
438
|
+
};
|
|
439
|
+
readonly providers: {
|
|
440
|
+
readonly description: "Static descriptors plus dynamic capability snapshots for planning.";
|
|
441
|
+
readonly type: "array";
|
|
442
|
+
readonly items: {
|
|
443
|
+
readonly type: "object";
|
|
444
|
+
readonly additionalProperties: true;
|
|
445
|
+
readonly required: readonly ["descriptor", "capabilities"];
|
|
446
|
+
readonly properties: {
|
|
447
|
+
readonly descriptor: {
|
|
448
|
+
readonly type: "object";
|
|
449
|
+
readonly additionalProperties: true;
|
|
450
|
+
readonly required: readonly ["id", "type", "supports", "tasks"];
|
|
451
|
+
readonly properties: {
|
|
452
|
+
readonly id: {
|
|
453
|
+
readonly type: "string";
|
|
454
|
+
readonly minLength: 1;
|
|
455
|
+
};
|
|
456
|
+
readonly type: {
|
|
457
|
+
readonly enum: readonly ["local", "edge", "cloud"];
|
|
458
|
+
};
|
|
459
|
+
readonly supports: {
|
|
460
|
+
readonly type: "object";
|
|
461
|
+
readonly additionalProperties: true;
|
|
462
|
+
readonly required: readonly ["run"];
|
|
463
|
+
readonly properties: {
|
|
464
|
+
readonly run: {
|
|
465
|
+
readonly type: "boolean";
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
readonly tasks: {
|
|
470
|
+
readonly type: "array";
|
|
471
|
+
readonly items: {
|
|
472
|
+
readonly type: "string";
|
|
473
|
+
readonly minLength: 1;
|
|
474
|
+
};
|
|
475
|
+
};
|
|
476
|
+
readonly privacy: {
|
|
477
|
+
readonly description: "Descriptor privacy metadata used to enforce local/cloud routing rules.";
|
|
478
|
+
readonly type: "object";
|
|
479
|
+
readonly additionalProperties: true;
|
|
480
|
+
readonly required: readonly ["dataLeavesDevice"];
|
|
481
|
+
readonly properties: {
|
|
482
|
+
readonly dataLeavesDevice: {
|
|
483
|
+
readonly type: "boolean";
|
|
484
|
+
};
|
|
485
|
+
readonly regions: {
|
|
486
|
+
readonly type: "array";
|
|
487
|
+
readonly items: {
|
|
488
|
+
readonly type: "string";
|
|
489
|
+
readonly minLength: 1;
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
};
|
|
496
|
+
readonly capabilities: {
|
|
497
|
+
readonly type: "object";
|
|
498
|
+
readonly additionalProperties: true;
|
|
499
|
+
readonly required: readonly ["available"];
|
|
500
|
+
readonly properties: {
|
|
501
|
+
readonly available: {
|
|
502
|
+
readonly type: "boolean";
|
|
503
|
+
};
|
|
504
|
+
readonly reason: {
|
|
505
|
+
readonly type: "string";
|
|
506
|
+
readonly minLength: 1;
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
export declare const routePlanSchema: {
|
|
516
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
517
|
+
readonly $id: "https://schemas.inderun.dev/1.0/route-plan.schema.json";
|
|
518
|
+
readonly title: "RoutePlan";
|
|
519
|
+
readonly description: "Deterministic shared-core Mode-1 route planning result.";
|
|
520
|
+
readonly type: "object";
|
|
521
|
+
readonly additionalProperties: true;
|
|
522
|
+
readonly required: readonly ["fallbackProviderIds", "candidates", "rejectedProviders", "explanation"];
|
|
523
|
+
readonly properties: {
|
|
524
|
+
readonly selectedProviderId: {
|
|
525
|
+
readonly description: "Chosen primary provider ID, if any.";
|
|
526
|
+
readonly type: "string";
|
|
527
|
+
readonly minLength: 1;
|
|
528
|
+
};
|
|
529
|
+
readonly fallbackProviderIds: {
|
|
530
|
+
readonly description: "Fallback provider IDs ordered after the primary selection.";
|
|
531
|
+
readonly type: "array";
|
|
532
|
+
readonly items: {
|
|
533
|
+
readonly type: "string";
|
|
534
|
+
readonly minLength: 1;
|
|
535
|
+
};
|
|
536
|
+
};
|
|
537
|
+
readonly candidates: {
|
|
538
|
+
readonly description: "Eligible candidates in deterministic order.";
|
|
539
|
+
readonly type: "array";
|
|
540
|
+
readonly items: {
|
|
541
|
+
readonly type: "object";
|
|
542
|
+
readonly additionalProperties: true;
|
|
543
|
+
readonly required: readonly ["providerId", "order"];
|
|
544
|
+
readonly properties: {
|
|
545
|
+
readonly providerId: {
|
|
546
|
+
readonly type: "string";
|
|
547
|
+
readonly minLength: 1;
|
|
548
|
+
};
|
|
549
|
+
readonly order: {
|
|
550
|
+
readonly type: "integer";
|
|
551
|
+
readonly minimum: 0;
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
};
|
|
555
|
+
};
|
|
556
|
+
readonly rejectedProviders: {
|
|
557
|
+
readonly description: "Providers filtered out during planning together with machine-readable reasons.";
|
|
558
|
+
readonly type: "array";
|
|
559
|
+
readonly items: {
|
|
560
|
+
readonly type: "object";
|
|
561
|
+
readonly additionalProperties: true;
|
|
562
|
+
readonly required: readonly ["providerId", "reasons"];
|
|
563
|
+
readonly properties: {
|
|
564
|
+
readonly providerId: {
|
|
565
|
+
readonly type: "string";
|
|
566
|
+
readonly minLength: 1;
|
|
567
|
+
};
|
|
568
|
+
readonly reasons: {
|
|
569
|
+
readonly type: "array";
|
|
570
|
+
readonly items: {
|
|
571
|
+
readonly type: "object";
|
|
572
|
+
readonly additionalProperties: true;
|
|
573
|
+
readonly required: readonly ["code", "message"];
|
|
574
|
+
readonly properties: {
|
|
575
|
+
readonly code: {
|
|
576
|
+
readonly enum: readonly ["task_not_supported", "run_not_supported", "privacy_constraint", "cloud_constraint", "offline", "capability_unavailable"];
|
|
577
|
+
};
|
|
578
|
+
readonly message: {
|
|
579
|
+
readonly type: "string";
|
|
580
|
+
readonly minLength: 1;
|
|
581
|
+
};
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
};
|
|
588
|
+
readonly failureCode: {
|
|
589
|
+
readonly description: "Normalized routing failure class when no provider is selected.";
|
|
590
|
+
readonly enum: readonly ["capability_mismatch", "offline", "unavailable"];
|
|
591
|
+
};
|
|
592
|
+
readonly explanation: {
|
|
593
|
+
readonly description: "Human-readable selection or failure explanation suitable for telemetry/debugging.";
|
|
594
|
+
readonly type: "object";
|
|
595
|
+
readonly additionalProperties: true;
|
|
596
|
+
readonly required: readonly ["summary"];
|
|
597
|
+
readonly properties: {
|
|
598
|
+
readonly summary: {
|
|
599
|
+
readonly type: "string";
|
|
600
|
+
readonly minLength: 1;
|
|
601
|
+
};
|
|
602
|
+
readonly selectedProviderId: {
|
|
603
|
+
readonly type: "string";
|
|
604
|
+
readonly minLength: 1;
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
};
|
|
608
|
+
};
|
|
609
|
+
};
|
|
610
|
+
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/generated/schemas.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiMpB,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4GnB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DrB,CAAC;AAEX,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CpB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCrB,CAAC;AAEX,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCvB,CAAC;AAEX,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqK1B,CAAC;AAEX,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyHlB,CAAC"}
|