@adea-ai/runtime-sdk 1.5.2
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 +201 -0
- package/README.md +53 -0
- package/dist/adapter.d.ts +526 -0
- package/dist/adapter.d.ts.map +1 -0
- package/dist/adapter.js +278 -0
- package/dist/adapter.js.map +1 -0
- package/dist/capabilities.d.ts +132 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +86 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/compatibility.d.ts +182 -0
- package/dist/compatibility.d.ts.map +1 -0
- package/dist/compatibility.js +243 -0
- package/dist/compatibility.js.map +1 -0
- package/dist/conformance.d.ts +14 -0
- package/dist/conformance.d.ts.map +1 -0
- package/dist/conformance.js +73 -0
- package/dist/conformance.js.map +1 -0
- package/dist/discovery.d.ts +26 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +253 -0
- package/dist/discovery.js.map +1 -0
- package/dist/eligibility.d.ts +334 -0
- package/dist/eligibility.d.ts.map +1 -0
- package/dist/eligibility.js +310 -0
- package/dist/eligibility.js.map +1 -0
- package/dist/fixtures.d.ts +90 -0
- package/dist/fixtures.d.ts.map +1 -0
- package/dist/fixtures.js +48 -0
- package/dist/fixtures.js.map +1 -0
- package/dist/health.d.ts +182 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/health.js +441 -0
- package/dist/health.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/inventory.d.ts +21 -0
- package/dist/inventory.d.ts.map +1 -0
- package/dist/inventory.js +33 -0
- package/dist/inventory.js.map +1 -0
- package/dist/mock.d.ts +24 -0
- package/dist/mock.d.ts.map +1 -0
- package/dist/mock.js +261 -0
- package/dist/mock.js.map +1 -0
- package/dist/models.d.ts +285 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +241 -0
- package/dist/models.js.map +1 -0
- package/dist/registry.d.ts +195 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +298 -0
- package/dist/registry.js.map +1 -0
- package/dist/routing.d.ts +408 -0
- package/dist/routing.d.ts.map +1 -0
- package/dist/routing.js +314 -0
- package/dist/routing.js.map +1 -0
- package/dist/sessions.d.ts +251 -0
- package/dist/sessions.d.ts.map +1 -0
- package/dist/sessions.js +411 -0
- package/dist/sessions.js.map +1 -0
- package/dist/transport.d.ts +55 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +73 -0
- package/dist/transport.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const RuntimeRoutingPolicySchema: z.ZodObject<{
|
|
3
|
+
policyId: z.ZodString;
|
|
4
|
+
version: z.ZodNumber;
|
|
5
|
+
digest: z.ZodString;
|
|
6
|
+
weights: z.ZodObject<{
|
|
7
|
+
explicitConnection: z.ZodNumber;
|
|
8
|
+
preferredFamily: z.ZodNumber;
|
|
9
|
+
preferredDeployment: z.ZodNumber;
|
|
10
|
+
locality: z.ZodNumber;
|
|
11
|
+
health: z.ZodNumber;
|
|
12
|
+
load: z.ZodNumber;
|
|
13
|
+
queue: z.ZodNumber;
|
|
14
|
+
entitlement: z.ZodNumber;
|
|
15
|
+
cost: z.ZodNumber;
|
|
16
|
+
}, z.core.$strict>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export declare const RuntimeRoutingCandidateSchema: z.ZodObject<{
|
|
19
|
+
runtimeConnectionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"runtime-connection ID">, string>>;
|
|
20
|
+
family: z.ZodString;
|
|
21
|
+
deployment: z.ZodEnum<{
|
|
22
|
+
managed: "managed";
|
|
23
|
+
local: "local";
|
|
24
|
+
}>;
|
|
25
|
+
eligibility: z.ZodObject<{
|
|
26
|
+
eligible: z.ZodBoolean;
|
|
27
|
+
mode: z.ZodEnum<{
|
|
28
|
+
degraded: "degraded";
|
|
29
|
+
full: "full";
|
|
30
|
+
ineligible: "ineligible";
|
|
31
|
+
}>;
|
|
32
|
+
reasons: z.ZodArray<z.ZodObject<{
|
|
33
|
+
code: z.ZodEnum<{
|
|
34
|
+
RUNTIME_REVOKED: "RUNTIME_REVOKED";
|
|
35
|
+
RUNTIME_UNAVAILABLE: "RUNTIME_UNAVAILABLE";
|
|
36
|
+
CAPABILITY_SNAPSHOT_STALE: "CAPABILITY_SNAPSHOT_STALE";
|
|
37
|
+
CAPABILITY_SNAPSHOT_MISSING: "CAPABILITY_SNAPSHOT_MISSING";
|
|
38
|
+
CAPABILITY_SNAPSHOT_UNVERIFIED: "CAPABILITY_SNAPSHOT_UNVERIFIED";
|
|
39
|
+
ENTITLEMENT_DENIED: "ENTITLEMENT_DENIED";
|
|
40
|
+
ENTITLEMENT_UNKNOWN: "ENTITLEMENT_UNKNOWN";
|
|
41
|
+
LOCAL_PROJECT_GRANT_MISSING: "LOCAL_PROJECT_GRANT_MISSING";
|
|
42
|
+
LOCAL_PROJECT_GRANT_REVOKED: "LOCAL_PROJECT_GRANT_REVOKED";
|
|
43
|
+
REQUIRED_CAPABILITY_INSUFFICIENT: "REQUIRED_CAPABILITY_INSUFFICIENT";
|
|
44
|
+
REQUIRED_CAPABILITY_MISSING: "REQUIRED_CAPABILITY_MISSING";
|
|
45
|
+
RUNTIME_CONNECTION_POLICY_DENIED: "RUNTIME_CONNECTION_POLICY_DENIED";
|
|
46
|
+
RUNTIME_EXPIRED: "RUNTIME_EXPIRED";
|
|
47
|
+
RUNTIME_FAMILY_POLICY_DENIED: "RUNTIME_FAMILY_POLICY_DENIED";
|
|
48
|
+
RUNTIME_INCOMPATIBLE: "RUNTIME_INCOMPATIBLE";
|
|
49
|
+
RUNTIME_LOCATION_POLICY_DENIED: "RUNTIME_LOCATION_POLICY_DENIED";
|
|
50
|
+
RUNTIME_NODE_OFFLINE: "RUNTIME_NODE_OFFLINE";
|
|
51
|
+
RUNTIME_NODE_REVOKED: "RUNTIME_NODE_REVOKED";
|
|
52
|
+
RUNTIME_NODE_UNKNOWN: "RUNTIME_NODE_UNKNOWN";
|
|
53
|
+
RUNTIME_OFFLINE: "RUNTIME_OFFLINE";
|
|
54
|
+
RUNTIME_STALE: "RUNTIME_STALE";
|
|
55
|
+
SECURITY_POLICY_DENIED: "SECURITY_POLICY_DENIED";
|
|
56
|
+
}>;
|
|
57
|
+
capability: z.ZodOptional<z.ZodEnum<{
|
|
58
|
+
"stream.output": "stream.output";
|
|
59
|
+
"stream.events": "stream.events";
|
|
60
|
+
"tool.call": "tool.call";
|
|
61
|
+
"tool.parallel": "tool.parallel";
|
|
62
|
+
"output.structured": "output.structured";
|
|
63
|
+
"filesystem.read": "filesystem.read";
|
|
64
|
+
"filesystem.write": "filesystem.write";
|
|
65
|
+
"project.read": "project.read";
|
|
66
|
+
"project.write": "project.write";
|
|
67
|
+
"execution.cancel": "execution.cancel";
|
|
68
|
+
"interaction.user-input": "interaction.user-input";
|
|
69
|
+
"interaction.approval": "interaction.approval";
|
|
70
|
+
"session.create": "session.create";
|
|
71
|
+
"session.list": "session.list";
|
|
72
|
+
"session.resume": "session.resume";
|
|
73
|
+
"session.close": "session.close";
|
|
74
|
+
"session.history": "session.history";
|
|
75
|
+
"session.load": "session.load";
|
|
76
|
+
"model.select": "model.select";
|
|
77
|
+
"execution.child": "execution.child";
|
|
78
|
+
}>>;
|
|
79
|
+
}, z.core.$strict>>;
|
|
80
|
+
degradations: z.ZodArray<z.ZodObject<{
|
|
81
|
+
code: z.ZodEnum<{
|
|
82
|
+
RUNTIME_HEALTH_DEGRADED: "RUNTIME_HEALTH_DEGRADED";
|
|
83
|
+
COMPATIBILITY_UNTESTED: "COMPATIBILITY_UNTESTED";
|
|
84
|
+
COMPATIBILITY_DEGRADED: "COMPATIBILITY_DEGRADED";
|
|
85
|
+
OPTIONAL_CAPABILITY_DEGRADED: "OPTIONAL_CAPABILITY_DEGRADED";
|
|
86
|
+
OPTIONAL_CAPABILITY_MISSING: "OPTIONAL_CAPABILITY_MISSING";
|
|
87
|
+
}>;
|
|
88
|
+
capability: z.ZodOptional<z.ZodEnum<{
|
|
89
|
+
"stream.output": "stream.output";
|
|
90
|
+
"stream.events": "stream.events";
|
|
91
|
+
"tool.call": "tool.call";
|
|
92
|
+
"tool.parallel": "tool.parallel";
|
|
93
|
+
"output.structured": "output.structured";
|
|
94
|
+
"filesystem.read": "filesystem.read";
|
|
95
|
+
"filesystem.write": "filesystem.write";
|
|
96
|
+
"project.read": "project.read";
|
|
97
|
+
"project.write": "project.write";
|
|
98
|
+
"execution.cancel": "execution.cancel";
|
|
99
|
+
"interaction.user-input": "interaction.user-input";
|
|
100
|
+
"interaction.approval": "interaction.approval";
|
|
101
|
+
"session.create": "session.create";
|
|
102
|
+
"session.list": "session.list";
|
|
103
|
+
"session.resume": "session.resume";
|
|
104
|
+
"session.close": "session.close";
|
|
105
|
+
"session.history": "session.history";
|
|
106
|
+
"session.load": "session.load";
|
|
107
|
+
"model.select": "model.select";
|
|
108
|
+
"execution.child": "execution.child";
|
|
109
|
+
}>>;
|
|
110
|
+
}, z.core.$strict>>;
|
|
111
|
+
audit: z.ZodObject<{
|
|
112
|
+
eligibilityVersion: z.ZodLiteral<1>;
|
|
113
|
+
executionPlanId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"ExecutionPlan ID">, string>>;
|
|
114
|
+
runtimeConnectionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"runtime-connection ID">, string>>;
|
|
115
|
+
policySnapshot: z.ZodObject<{
|
|
116
|
+
policyId: z.ZodString;
|
|
117
|
+
version: z.ZodNumber;
|
|
118
|
+
digest: z.ZodString;
|
|
119
|
+
}, z.core.$strict>;
|
|
120
|
+
evaluatedAt: z.ZodISODateTime;
|
|
121
|
+
inputDigest: z.ZodString;
|
|
122
|
+
}, z.core.$strict>;
|
|
123
|
+
}, z.core.$strict>;
|
|
124
|
+
signals: z.ZodObject<{
|
|
125
|
+
locality: z.ZodNumber;
|
|
126
|
+
health: z.ZodNumber;
|
|
127
|
+
loadPermille: z.ZodNumber;
|
|
128
|
+
queueDepth: z.ZodNumber;
|
|
129
|
+
entitlementPriority: z.ZodNumber;
|
|
130
|
+
costClass: z.ZodEnum<{
|
|
131
|
+
unknown: "unknown";
|
|
132
|
+
low: "low";
|
|
133
|
+
medium: "medium";
|
|
134
|
+
high: "high";
|
|
135
|
+
}>;
|
|
136
|
+
}, z.core.$strict>;
|
|
137
|
+
}, z.core.$strict>;
|
|
138
|
+
export declare const RuntimeRoutingInputSchema: z.ZodObject<{
|
|
139
|
+
routingVersion: z.ZodLiteral<1>;
|
|
140
|
+
executionPlanId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"ExecutionPlan ID">, string>>;
|
|
141
|
+
evaluatedAt: z.ZodISODateTime;
|
|
142
|
+
policy: z.ZodObject<{
|
|
143
|
+
policyId: z.ZodString;
|
|
144
|
+
version: z.ZodNumber;
|
|
145
|
+
digest: z.ZodString;
|
|
146
|
+
weights: z.ZodObject<{
|
|
147
|
+
explicitConnection: z.ZodNumber;
|
|
148
|
+
preferredFamily: z.ZodNumber;
|
|
149
|
+
preferredDeployment: z.ZodNumber;
|
|
150
|
+
locality: z.ZodNumber;
|
|
151
|
+
health: z.ZodNumber;
|
|
152
|
+
load: z.ZodNumber;
|
|
153
|
+
queue: z.ZodNumber;
|
|
154
|
+
entitlement: z.ZodNumber;
|
|
155
|
+
cost: z.ZodNumber;
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
}, z.core.$strict>;
|
|
158
|
+
preference: z.ZodOptional<z.ZodObject<{
|
|
159
|
+
runtimeConnectionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"runtime-connection ID">, string>>>;
|
|
160
|
+
family: z.ZodOptional<z.ZodString>;
|
|
161
|
+
deployment: z.ZodOptional<z.ZodEnum<{
|
|
162
|
+
managed: "managed";
|
|
163
|
+
local: "local";
|
|
164
|
+
}>>;
|
|
165
|
+
}, z.core.$strict>>;
|
|
166
|
+
candidates: z.ZodArray<z.ZodObject<{
|
|
167
|
+
runtimeConnectionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"runtime-connection ID">, string>>;
|
|
168
|
+
family: z.ZodString;
|
|
169
|
+
deployment: z.ZodEnum<{
|
|
170
|
+
managed: "managed";
|
|
171
|
+
local: "local";
|
|
172
|
+
}>;
|
|
173
|
+
eligibility: z.ZodObject<{
|
|
174
|
+
eligible: z.ZodBoolean;
|
|
175
|
+
mode: z.ZodEnum<{
|
|
176
|
+
degraded: "degraded";
|
|
177
|
+
full: "full";
|
|
178
|
+
ineligible: "ineligible";
|
|
179
|
+
}>;
|
|
180
|
+
reasons: z.ZodArray<z.ZodObject<{
|
|
181
|
+
code: z.ZodEnum<{
|
|
182
|
+
RUNTIME_REVOKED: "RUNTIME_REVOKED";
|
|
183
|
+
RUNTIME_UNAVAILABLE: "RUNTIME_UNAVAILABLE";
|
|
184
|
+
CAPABILITY_SNAPSHOT_STALE: "CAPABILITY_SNAPSHOT_STALE";
|
|
185
|
+
CAPABILITY_SNAPSHOT_MISSING: "CAPABILITY_SNAPSHOT_MISSING";
|
|
186
|
+
CAPABILITY_SNAPSHOT_UNVERIFIED: "CAPABILITY_SNAPSHOT_UNVERIFIED";
|
|
187
|
+
ENTITLEMENT_DENIED: "ENTITLEMENT_DENIED";
|
|
188
|
+
ENTITLEMENT_UNKNOWN: "ENTITLEMENT_UNKNOWN";
|
|
189
|
+
LOCAL_PROJECT_GRANT_MISSING: "LOCAL_PROJECT_GRANT_MISSING";
|
|
190
|
+
LOCAL_PROJECT_GRANT_REVOKED: "LOCAL_PROJECT_GRANT_REVOKED";
|
|
191
|
+
REQUIRED_CAPABILITY_INSUFFICIENT: "REQUIRED_CAPABILITY_INSUFFICIENT";
|
|
192
|
+
REQUIRED_CAPABILITY_MISSING: "REQUIRED_CAPABILITY_MISSING";
|
|
193
|
+
RUNTIME_CONNECTION_POLICY_DENIED: "RUNTIME_CONNECTION_POLICY_DENIED";
|
|
194
|
+
RUNTIME_EXPIRED: "RUNTIME_EXPIRED";
|
|
195
|
+
RUNTIME_FAMILY_POLICY_DENIED: "RUNTIME_FAMILY_POLICY_DENIED";
|
|
196
|
+
RUNTIME_INCOMPATIBLE: "RUNTIME_INCOMPATIBLE";
|
|
197
|
+
RUNTIME_LOCATION_POLICY_DENIED: "RUNTIME_LOCATION_POLICY_DENIED";
|
|
198
|
+
RUNTIME_NODE_OFFLINE: "RUNTIME_NODE_OFFLINE";
|
|
199
|
+
RUNTIME_NODE_REVOKED: "RUNTIME_NODE_REVOKED";
|
|
200
|
+
RUNTIME_NODE_UNKNOWN: "RUNTIME_NODE_UNKNOWN";
|
|
201
|
+
RUNTIME_OFFLINE: "RUNTIME_OFFLINE";
|
|
202
|
+
RUNTIME_STALE: "RUNTIME_STALE";
|
|
203
|
+
SECURITY_POLICY_DENIED: "SECURITY_POLICY_DENIED";
|
|
204
|
+
}>;
|
|
205
|
+
capability: z.ZodOptional<z.ZodEnum<{
|
|
206
|
+
"stream.output": "stream.output";
|
|
207
|
+
"stream.events": "stream.events";
|
|
208
|
+
"tool.call": "tool.call";
|
|
209
|
+
"tool.parallel": "tool.parallel";
|
|
210
|
+
"output.structured": "output.structured";
|
|
211
|
+
"filesystem.read": "filesystem.read";
|
|
212
|
+
"filesystem.write": "filesystem.write";
|
|
213
|
+
"project.read": "project.read";
|
|
214
|
+
"project.write": "project.write";
|
|
215
|
+
"execution.cancel": "execution.cancel";
|
|
216
|
+
"interaction.user-input": "interaction.user-input";
|
|
217
|
+
"interaction.approval": "interaction.approval";
|
|
218
|
+
"session.create": "session.create";
|
|
219
|
+
"session.list": "session.list";
|
|
220
|
+
"session.resume": "session.resume";
|
|
221
|
+
"session.close": "session.close";
|
|
222
|
+
"session.history": "session.history";
|
|
223
|
+
"session.load": "session.load";
|
|
224
|
+
"model.select": "model.select";
|
|
225
|
+
"execution.child": "execution.child";
|
|
226
|
+
}>>;
|
|
227
|
+
}, z.core.$strict>>;
|
|
228
|
+
degradations: z.ZodArray<z.ZodObject<{
|
|
229
|
+
code: z.ZodEnum<{
|
|
230
|
+
RUNTIME_HEALTH_DEGRADED: "RUNTIME_HEALTH_DEGRADED";
|
|
231
|
+
COMPATIBILITY_UNTESTED: "COMPATIBILITY_UNTESTED";
|
|
232
|
+
COMPATIBILITY_DEGRADED: "COMPATIBILITY_DEGRADED";
|
|
233
|
+
OPTIONAL_CAPABILITY_DEGRADED: "OPTIONAL_CAPABILITY_DEGRADED";
|
|
234
|
+
OPTIONAL_CAPABILITY_MISSING: "OPTIONAL_CAPABILITY_MISSING";
|
|
235
|
+
}>;
|
|
236
|
+
capability: z.ZodOptional<z.ZodEnum<{
|
|
237
|
+
"stream.output": "stream.output";
|
|
238
|
+
"stream.events": "stream.events";
|
|
239
|
+
"tool.call": "tool.call";
|
|
240
|
+
"tool.parallel": "tool.parallel";
|
|
241
|
+
"output.structured": "output.structured";
|
|
242
|
+
"filesystem.read": "filesystem.read";
|
|
243
|
+
"filesystem.write": "filesystem.write";
|
|
244
|
+
"project.read": "project.read";
|
|
245
|
+
"project.write": "project.write";
|
|
246
|
+
"execution.cancel": "execution.cancel";
|
|
247
|
+
"interaction.user-input": "interaction.user-input";
|
|
248
|
+
"interaction.approval": "interaction.approval";
|
|
249
|
+
"session.create": "session.create";
|
|
250
|
+
"session.list": "session.list";
|
|
251
|
+
"session.resume": "session.resume";
|
|
252
|
+
"session.close": "session.close";
|
|
253
|
+
"session.history": "session.history";
|
|
254
|
+
"session.load": "session.load";
|
|
255
|
+
"model.select": "model.select";
|
|
256
|
+
"execution.child": "execution.child";
|
|
257
|
+
}>>;
|
|
258
|
+
}, z.core.$strict>>;
|
|
259
|
+
audit: z.ZodObject<{
|
|
260
|
+
eligibilityVersion: z.ZodLiteral<1>;
|
|
261
|
+
executionPlanId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"ExecutionPlan ID">, string>>;
|
|
262
|
+
runtimeConnectionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"runtime-connection ID">, string>>;
|
|
263
|
+
policySnapshot: z.ZodObject<{
|
|
264
|
+
policyId: z.ZodString;
|
|
265
|
+
version: z.ZodNumber;
|
|
266
|
+
digest: z.ZodString;
|
|
267
|
+
}, z.core.$strict>;
|
|
268
|
+
evaluatedAt: z.ZodISODateTime;
|
|
269
|
+
inputDigest: z.ZodString;
|
|
270
|
+
}, z.core.$strict>;
|
|
271
|
+
}, z.core.$strict>;
|
|
272
|
+
signals: z.ZodObject<{
|
|
273
|
+
locality: z.ZodNumber;
|
|
274
|
+
health: z.ZodNumber;
|
|
275
|
+
loadPermille: z.ZodNumber;
|
|
276
|
+
queueDepth: z.ZodNumber;
|
|
277
|
+
entitlementPriority: z.ZodNumber;
|
|
278
|
+
costClass: z.ZodEnum<{
|
|
279
|
+
unknown: "unknown";
|
|
280
|
+
low: "low";
|
|
281
|
+
medium: "medium";
|
|
282
|
+
high: "high";
|
|
283
|
+
}>;
|
|
284
|
+
}, z.core.$strict>;
|
|
285
|
+
}, z.core.$strict>>;
|
|
286
|
+
}, z.core.$strict>;
|
|
287
|
+
export declare const RuntimeRoutingReasonCodeSchema: z.ZodEnum<{
|
|
288
|
+
COST: "COST";
|
|
289
|
+
ENTITLEMENT: "ENTITLEMENT";
|
|
290
|
+
EXPLICIT_CONNECTION: "EXPLICIT_CONNECTION";
|
|
291
|
+
HEALTH: "HEALTH";
|
|
292
|
+
LOAD: "LOAD";
|
|
293
|
+
LOCALITY: "LOCALITY";
|
|
294
|
+
PREFERRED_DEPLOYMENT: "PREFERRED_DEPLOYMENT";
|
|
295
|
+
PREFERRED_FAMILY: "PREFERRED_FAMILY";
|
|
296
|
+
QUEUE: "QUEUE";
|
|
297
|
+
}>;
|
|
298
|
+
export declare const RuntimeRoutingDecisionSchema: z.ZodObject<{
|
|
299
|
+
outcome: z.ZodEnum<{
|
|
300
|
+
selected: "selected";
|
|
301
|
+
preference_unavailable: "preference_unavailable";
|
|
302
|
+
transient_unavailable: "transient_unavailable";
|
|
303
|
+
no_candidate: "no_candidate";
|
|
304
|
+
}>;
|
|
305
|
+
selected: z.ZodOptional<z.ZodObject<{
|
|
306
|
+
rank: z.ZodNumber;
|
|
307
|
+
runtimeConnectionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"runtime-connection ID">, string>>;
|
|
308
|
+
score: z.ZodNumber;
|
|
309
|
+
eligibilityMode: z.ZodEnum<{
|
|
310
|
+
degraded: "degraded";
|
|
311
|
+
full: "full";
|
|
312
|
+
}>;
|
|
313
|
+
reasons: z.ZodArray<z.ZodObject<{
|
|
314
|
+
code: z.ZodEnum<{
|
|
315
|
+
COST: "COST";
|
|
316
|
+
ENTITLEMENT: "ENTITLEMENT";
|
|
317
|
+
EXPLICIT_CONNECTION: "EXPLICIT_CONNECTION";
|
|
318
|
+
HEALTH: "HEALTH";
|
|
319
|
+
LOAD: "LOAD";
|
|
320
|
+
LOCALITY: "LOCALITY";
|
|
321
|
+
PREFERRED_DEPLOYMENT: "PREFERRED_DEPLOYMENT";
|
|
322
|
+
PREFERRED_FAMILY: "PREFERRED_FAMILY";
|
|
323
|
+
QUEUE: "QUEUE";
|
|
324
|
+
}>;
|
|
325
|
+
contribution: z.ZodNumber;
|
|
326
|
+
}, z.core.$strict>>;
|
|
327
|
+
}, z.core.$strict>>;
|
|
328
|
+
ranked: z.ZodArray<z.ZodObject<{
|
|
329
|
+
rank: z.ZodNumber;
|
|
330
|
+
runtimeConnectionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"runtime-connection ID">, string>>;
|
|
331
|
+
score: z.ZodNumber;
|
|
332
|
+
eligibilityMode: z.ZodEnum<{
|
|
333
|
+
degraded: "degraded";
|
|
334
|
+
full: "full";
|
|
335
|
+
}>;
|
|
336
|
+
reasons: z.ZodArray<z.ZodObject<{
|
|
337
|
+
code: z.ZodEnum<{
|
|
338
|
+
COST: "COST";
|
|
339
|
+
ENTITLEMENT: "ENTITLEMENT";
|
|
340
|
+
EXPLICIT_CONNECTION: "EXPLICIT_CONNECTION";
|
|
341
|
+
HEALTH: "HEALTH";
|
|
342
|
+
LOAD: "LOAD";
|
|
343
|
+
LOCALITY: "LOCALITY";
|
|
344
|
+
PREFERRED_DEPLOYMENT: "PREFERRED_DEPLOYMENT";
|
|
345
|
+
PREFERRED_FAMILY: "PREFERRED_FAMILY";
|
|
346
|
+
QUEUE: "QUEUE";
|
|
347
|
+
}>;
|
|
348
|
+
contribution: z.ZodNumber;
|
|
349
|
+
}, z.core.$strict>>;
|
|
350
|
+
}, z.core.$strict>>;
|
|
351
|
+
excluded: z.ZodArray<z.ZodObject<{
|
|
352
|
+
runtimeConnectionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"runtime-connection ID">, string>>;
|
|
353
|
+
eligibilityReasons: z.ZodArray<z.ZodEnum<{
|
|
354
|
+
RUNTIME_REVOKED: "RUNTIME_REVOKED";
|
|
355
|
+
RUNTIME_UNAVAILABLE: "RUNTIME_UNAVAILABLE";
|
|
356
|
+
CAPABILITY_SNAPSHOT_STALE: "CAPABILITY_SNAPSHOT_STALE";
|
|
357
|
+
CAPABILITY_SNAPSHOT_MISSING: "CAPABILITY_SNAPSHOT_MISSING";
|
|
358
|
+
CAPABILITY_SNAPSHOT_UNVERIFIED: "CAPABILITY_SNAPSHOT_UNVERIFIED";
|
|
359
|
+
ENTITLEMENT_DENIED: "ENTITLEMENT_DENIED";
|
|
360
|
+
ENTITLEMENT_UNKNOWN: "ENTITLEMENT_UNKNOWN";
|
|
361
|
+
LOCAL_PROJECT_GRANT_MISSING: "LOCAL_PROJECT_GRANT_MISSING";
|
|
362
|
+
LOCAL_PROJECT_GRANT_REVOKED: "LOCAL_PROJECT_GRANT_REVOKED";
|
|
363
|
+
REQUIRED_CAPABILITY_INSUFFICIENT: "REQUIRED_CAPABILITY_INSUFFICIENT";
|
|
364
|
+
REQUIRED_CAPABILITY_MISSING: "REQUIRED_CAPABILITY_MISSING";
|
|
365
|
+
RUNTIME_CONNECTION_POLICY_DENIED: "RUNTIME_CONNECTION_POLICY_DENIED";
|
|
366
|
+
RUNTIME_EXPIRED: "RUNTIME_EXPIRED";
|
|
367
|
+
RUNTIME_FAMILY_POLICY_DENIED: "RUNTIME_FAMILY_POLICY_DENIED";
|
|
368
|
+
RUNTIME_INCOMPATIBLE: "RUNTIME_INCOMPATIBLE";
|
|
369
|
+
RUNTIME_LOCATION_POLICY_DENIED: "RUNTIME_LOCATION_POLICY_DENIED";
|
|
370
|
+
RUNTIME_NODE_OFFLINE: "RUNTIME_NODE_OFFLINE";
|
|
371
|
+
RUNTIME_NODE_REVOKED: "RUNTIME_NODE_REVOKED";
|
|
372
|
+
RUNTIME_NODE_UNKNOWN: "RUNTIME_NODE_UNKNOWN";
|
|
373
|
+
RUNTIME_OFFLINE: "RUNTIME_OFFLINE";
|
|
374
|
+
RUNTIME_STALE: "RUNTIME_STALE";
|
|
375
|
+
SECURITY_POLICY_DENIED: "SECURITY_POLICY_DENIED";
|
|
376
|
+
}>>;
|
|
377
|
+
}, z.core.$strict>>;
|
|
378
|
+
audit: z.ZodObject<{
|
|
379
|
+
routingVersion: z.ZodLiteral<1>;
|
|
380
|
+
executionPlanId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"ExecutionPlan ID">, string>>;
|
|
381
|
+
policy: z.ZodObject<{
|
|
382
|
+
policyId: z.ZodString;
|
|
383
|
+
version: z.ZodNumber;
|
|
384
|
+
digest: z.ZodString;
|
|
385
|
+
}, z.core.$strict>;
|
|
386
|
+
evaluatedAt: z.ZodISODateTime;
|
|
387
|
+
inputDigest: z.ZodString;
|
|
388
|
+
decisionDigest: z.ZodString;
|
|
389
|
+
}, z.core.$strict>;
|
|
390
|
+
}, z.core.$strict>;
|
|
391
|
+
export type RuntimeRoutingInput = z.output<typeof RuntimeRoutingInputSchema>;
|
|
392
|
+
export type RuntimeRoutingDecision = z.output<typeof RuntimeRoutingDecisionSchema>;
|
|
393
|
+
export declare function routeRuntimeConnections(inputValue: unknown): RuntimeRoutingDecision;
|
|
394
|
+
export declare function toAttemptRoutingDecision(decisionValue: unknown): {
|
|
395
|
+
routingVersion: 1;
|
|
396
|
+
policy: {
|
|
397
|
+
policyId: string;
|
|
398
|
+
version: number;
|
|
399
|
+
digest: string;
|
|
400
|
+
};
|
|
401
|
+
evaluatedAt: string;
|
|
402
|
+
inputDigest: string;
|
|
403
|
+
decisionDigest: string;
|
|
404
|
+
selectedRank: number;
|
|
405
|
+
candidateCount: number;
|
|
406
|
+
reasonCodes: ("COST" | "ENTITLEMENT" | "EXPLICIT_CONNECTION" | "HEALTH" | "LOAD" | "LOCALITY" | "PREFERRED_DEPLOYMENT" | "PREFERRED_FAMILY" | "QUEUE")[];
|
|
407
|
+
};
|
|
408
|
+
//# sourceMappingURL=routing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../src/routing.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAevB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;kBAmB5B,CAAA;AAEX,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsBvC,CAAA;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgCnC,CAAA;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;EAUzC,CAAA;AAwBF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwCrC,CAAA;AAEJ,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAC5E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAElF,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,OAAO,GAAG,sBAAsB,CA2DnF;AAED,wBAAgB,wBAAwB,CAAC,aAAa,EAAE,OAAO;;;;;;;;;;;;;EA6B9D"}
|