@adea-ai/runtime-sdk 1.17.0 → 1.17.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/dist/adapter.d.ts +29 -1
- package/dist/adapter.js +32 -1
- package/dist/agent-plugins.d.ts +0 -1
- package/dist/agent-plugins.js +0 -1
- package/dist/capabilities.d.ts +0 -1
- package/dist/capabilities.js +0 -1
- package/dist/channel-ownership.d.ts +0 -1
- package/dist/channel-ownership.js +0 -1
- package/dist/compatibility.d.ts +0 -1
- package/dist/compatibility.js +0 -1
- package/dist/conformance.d.ts +0 -1
- package/dist/conformance.js +0 -1
- package/dist/discovery.d.ts +0 -1
- package/dist/discovery.js +0 -1
- package/dist/eligibility.d.ts +0 -1
- package/dist/eligibility.js +0 -1
- package/dist/fixtures.d.ts +0 -1
- package/dist/fixtures.js +0 -1
- package/dist/health.d.ts +0 -1
- package/dist/health.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/inventory.d.ts +0 -1
- package/dist/inventory.js +0 -1
- package/dist/mock.d.ts +0 -1
- package/dist/mock.js +0 -1
- package/dist/models.d.ts +0 -1
- package/dist/models.js +0 -1
- package/dist/pi-durable-lead.d.ts +150 -1305
- package/dist/pi-durable-lead.js +68 -10
- package/dist/registry.d.ts +0 -1
- package/dist/registry.js +0 -1
- package/dist/routing.d.ts +0 -1
- package/dist/routing.js +0 -1
- package/dist/sessions.d.ts +0 -1
- package/dist/sessions.js +0 -1
- package/dist/transport.d.ts +0 -1
- package/dist/transport.js +0 -1
- package/package.json +3 -3
- package/dist/adapter.d.ts.map +0 -1
- package/dist/adapter.js.map +0 -1
- package/dist/agent-plugins.d.ts.map +0 -1
- package/dist/agent-plugins.js.map +0 -1
- package/dist/capabilities.d.ts.map +0 -1
- package/dist/capabilities.js.map +0 -1
- package/dist/channel-ownership.d.ts.map +0 -1
- package/dist/channel-ownership.js.map +0 -1
- package/dist/compatibility.d.ts.map +0 -1
- package/dist/compatibility.js.map +0 -1
- package/dist/conformance.d.ts.map +0 -1
- package/dist/conformance.js.map +0 -1
- package/dist/discovery.d.ts.map +0 -1
- package/dist/discovery.js.map +0 -1
- package/dist/eligibility.d.ts.map +0 -1
- package/dist/eligibility.js.map +0 -1
- package/dist/fixtures.d.ts.map +0 -1
- package/dist/fixtures.js.map +0 -1
- package/dist/health.d.ts.map +0 -1
- package/dist/health.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/inventory.d.ts.map +0 -1
- package/dist/inventory.js.map +0 -1
- package/dist/mock.d.ts.map +0 -1
- package/dist/mock.js.map +0 -1
- package/dist/models.d.ts.map +0 -1
- package/dist/models.js.map +0 -1
- package/dist/pi-durable-lead.d.ts.map +0 -1
- package/dist/pi-durable-lead.js.map +0 -1
- package/dist/registry.d.ts.map +0 -1
- package/dist/registry.js.map +0 -1
- package/dist/routing.d.ts.map +0 -1
- package/dist/routing.js.map +0 -1
- package/dist/sessions.d.ts.map +0 -1
- package/dist/sessions.js.map +0 -1
- package/dist/transport.d.ts.map +0 -1
- package/dist/transport.js.map +0 -1
package/dist/adapter.d.ts
CHANGED
|
@@ -293,6 +293,28 @@ export declare const RuntimeExecutionStateSchema: z.ZodEnum<{
|
|
|
293
293
|
timed_out: "timed_out";
|
|
294
294
|
unknown: "unknown";
|
|
295
295
|
}>;
|
|
296
|
+
/**
|
|
297
|
+
* The runtime's own observed generation identity for the execution's current
|
|
298
|
+
* turn.
|
|
299
|
+
*
|
|
300
|
+
* Observed by construction: the runtime reports the generation it authorized
|
|
301
|
+
* for this attempt, never a generation a caller claimed. A control that names
|
|
302
|
+
* a generation the runtime did not observe is not bound to it, so this shape
|
|
303
|
+
* is an identity, not a counter the caller can advance.
|
|
304
|
+
*
|
|
305
|
+
* The identity is self-verifying: the inference key is the turn's key extended
|
|
306
|
+
* by the inference id, exactly as the runtime retained it. A key that names a
|
|
307
|
+
* different turn or inference is refused here rather than accepted as an
|
|
308
|
+
* observation of something else.
|
|
309
|
+
*/
|
|
310
|
+
export declare const RuntimeObservedGenerationSchema: z.ZodObject<{
|
|
311
|
+
schemaVersion: z.ZodLiteral<"runtime-observed-generation/v1">;
|
|
312
|
+
attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
|
|
313
|
+
turnKey: z.ZodString;
|
|
314
|
+
inferenceId: z.ZodString;
|
|
315
|
+
inferenceKey: z.ZodString;
|
|
316
|
+
}, z.core.$strict>;
|
|
317
|
+
export type RuntimeObservedGeneration = z.output<typeof RuntimeObservedGenerationSchema>;
|
|
296
318
|
export declare const RuntimeExecutionStatusSchema: z.ZodObject<{
|
|
297
319
|
handle: z.ZodObject<{
|
|
298
320
|
handleId: z.ZodString;
|
|
@@ -312,6 +334,13 @@ export declare const RuntimeExecutionStatusSchema: z.ZodObject<{
|
|
|
312
334
|
unknown: "unknown";
|
|
313
335
|
}>;
|
|
314
336
|
observedAt: z.ZodISODateTime;
|
|
337
|
+
observedGeneration: z.ZodOptional<z.ZodObject<{
|
|
338
|
+
schemaVersion: z.ZodLiteral<"runtime-observed-generation/v1">;
|
|
339
|
+
attemptId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"attempt ID">, string>>;
|
|
340
|
+
turnKey: z.ZodString;
|
|
341
|
+
inferenceId: z.ZodString;
|
|
342
|
+
inferenceKey: z.ZodString;
|
|
343
|
+
}, z.core.$strict>>;
|
|
315
344
|
result: z.ZodOptional<z.ZodObject<{
|
|
316
345
|
outcome: z.ZodLiteral<"completed">;
|
|
317
346
|
output: z.ZodOptional<z.ZodJSONSchema>;
|
|
@@ -641,4 +670,3 @@ export declare class RuntimeAdapterError extends Error {
|
|
|
641
670
|
toJSON(): RuntimeError;
|
|
642
671
|
}
|
|
643
672
|
export declare function inspectRuntimeCapabilities(capabilities: RuntimeAdapterInspection['capabilities'], requirements: readonly CapabilityRequirement[]): CapabilityEvaluation;
|
|
644
|
-
//# sourceMappingURL=adapter.d.ts.map
|
package/dist/adapter.js
CHANGED
|
@@ -183,11 +183,43 @@ export const RuntimeExecutionStateSchema = z.enum([
|
|
|
183
183
|
'timed_out',
|
|
184
184
|
'unknown',
|
|
185
185
|
]);
|
|
186
|
+
/**
|
|
187
|
+
* The runtime's own observed generation identity for the execution's current
|
|
188
|
+
* turn.
|
|
189
|
+
*
|
|
190
|
+
* Observed by construction: the runtime reports the generation it authorized
|
|
191
|
+
* for this attempt, never a generation a caller claimed. A control that names
|
|
192
|
+
* a generation the runtime did not observe is not bound to it, so this shape
|
|
193
|
+
* is an identity, not a counter the caller can advance.
|
|
194
|
+
*
|
|
195
|
+
* The identity is self-verifying: the inference key is the turn's key extended
|
|
196
|
+
* by the inference id, exactly as the runtime retained it. A key that names a
|
|
197
|
+
* different turn or inference is refused here rather than accepted as an
|
|
198
|
+
* observation of something else.
|
|
199
|
+
*/
|
|
200
|
+
export const RuntimeObservedGenerationSchema = z
|
|
201
|
+
.object({
|
|
202
|
+
schemaVersion: z.literal('runtime-observed-generation/v1'),
|
|
203
|
+
attemptId: IdentifierSchemas.attemptId,
|
|
204
|
+
turnKey: z.string().min(1).max(4096),
|
|
205
|
+
inferenceId: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$/),
|
|
206
|
+
inferenceKey: z.string().min(1).max(8192),
|
|
207
|
+
})
|
|
208
|
+
.strict()
|
|
209
|
+
.superRefine((generation, context) => {
|
|
210
|
+
if (generation.inferenceKey !== `${generation.turnKey}:${generation.inferenceId}`)
|
|
211
|
+
context.addIssue({ code: 'custom', path: ['inferenceKey'], message: 'invalid inference key' });
|
|
212
|
+
});
|
|
186
213
|
export const RuntimeExecutionStatusSchema = z
|
|
187
214
|
.object({
|
|
188
215
|
handle: RuntimeExecutionHandleSchema,
|
|
189
216
|
state: RuntimeExecutionStateSchema,
|
|
190
217
|
observedAt: TimestampSchema,
|
|
218
|
+
// The generation the runtime observed for this attempt, when it has one.
|
|
219
|
+
// Additive in contract 3.1: a consumer that advertised an earlier version
|
|
220
|
+
// parses with the pre-3.1 strict status shape, so a producer publishes it
|
|
221
|
+
// only to a consumer whose negotiated version includes it.
|
|
222
|
+
observedGeneration: RuntimeObservedGenerationSchema.optional(),
|
|
191
223
|
result: RuntimeExecutionResultSchema.optional(),
|
|
192
224
|
// Observed usage survives unsuccessful termination without fabricating a result.
|
|
193
225
|
terminalUsage: RuntimeUsageSchema.optional(),
|
|
@@ -408,4 +440,3 @@ export class RuntimeAdapterError extends Error {
|
|
|
408
440
|
export function inspectRuntimeCapabilities(capabilities, requirements) {
|
|
409
441
|
return evaluateCapabilities(capabilities, CapabilityRequirementSetSchema.parse(requirements));
|
|
410
442
|
}
|
|
411
|
-
//# sourceMappingURL=adapter.js.map
|
package/dist/agent-plugins.d.ts
CHANGED
package/dist/agent-plugins.js
CHANGED
package/dist/capabilities.d.ts
CHANGED
|
@@ -133,4 +133,3 @@ export interface CapabilityEvaluation {
|
|
|
133
133
|
export declare function evaluateCapabilities(capabilitiesInput: readonly RuntimeCapability[], requirementsInput: readonly CapabilityRequirement[]): CapabilityEvaluation;
|
|
134
134
|
export declare function runtimeCapabilitiesEqual(left: readonly RuntimeCapability[], right: readonly RuntimeCapability[]): boolean;
|
|
135
135
|
export declare function capabilityFingerprint(capabilities: readonly RuntimeCapability[]): string;
|
|
136
|
-
//# sourceMappingURL=capabilities.d.ts.map
|
package/dist/capabilities.js
CHANGED
|
@@ -49,4 +49,3 @@ export interface RuntimeChannelOwnershipRepository {
|
|
|
49
49
|
heartbeat(record: RuntimeChannelOwnership, credentialFence?: RuntimeChannelOwnershipCredentialFence): Promise<boolean>;
|
|
50
50
|
release(record: RuntimeChannelOwnership): Promise<boolean>;
|
|
51
51
|
}
|
|
52
|
-
//# sourceMappingURL=channel-ownership.d.ts.map
|
package/dist/compatibility.d.ts
CHANGED
|
@@ -181,4 +181,3 @@ export interface RuntimeCompatibilityCertificationInput {
|
|
|
181
181
|
readonly connection: unknown;
|
|
182
182
|
}
|
|
183
183
|
export declare function applyRuntimeCompatibilityCertification(input: RuntimeCompatibilityCertificationInput): RuntimeConnection;
|
|
184
|
-
//# sourceMappingURL=compatibility.d.ts.map
|
package/dist/compatibility.js
CHANGED
package/dist/conformance.d.ts
CHANGED
|
@@ -11,4 +11,3 @@ export interface RuntimeAdapterConformanceReport {
|
|
|
11
11
|
readonly checks: typeof RuntimeAdapterConformanceChecks;
|
|
12
12
|
}
|
|
13
13
|
export declare function runRuntimeAdapterConformance(input: RuntimeAdapterConformanceInput): Promise<RuntimeAdapterConformanceReport>;
|
|
14
|
-
//# sourceMappingURL=conformance.d.ts.map
|
package/dist/conformance.js
CHANGED
package/dist/discovery.d.ts
CHANGED
package/dist/discovery.js
CHANGED
package/dist/eligibility.d.ts
CHANGED
|
@@ -335,4 +335,3 @@ export declare const RuntimeEligibilityDecisionSchema: z.ZodObject<{
|
|
|
335
335
|
export type RuntimeEligibilityInput = z.output<typeof RuntimeEligibilityInputSchema>;
|
|
336
336
|
export type RuntimeEligibilityDecision = z.output<typeof RuntimeEligibilityDecisionSchema>;
|
|
337
337
|
export declare function evaluateRuntimeEligibility(inputValue: unknown): RuntimeEligibilityDecision;
|
|
338
|
-
//# sourceMappingURL=eligibility.d.ts.map
|
package/dist/eligibility.js
CHANGED
package/dist/fixtures.d.ts
CHANGED
package/dist/fixtures.js
CHANGED
|
@@ -45,4 +45,3 @@ function runtime(runtimeDefinitionId, family, capabilities) {
|
|
|
45
45
|
function capability(name, support = 'supported', limitations) {
|
|
46
46
|
return { name, support, ...(limitations === undefined ? {} : { limitations: [...limitations] }) };
|
|
47
47
|
}
|
|
48
|
-
//# sourceMappingURL=fixtures.js.map
|
package/dist/health.d.ts
CHANGED
|
@@ -181,4 +181,3 @@ export declare class RuntimeHealthIngestionService {
|
|
|
181
181
|
refresh(input: unknown): Promise<RuntimeHealthIngestionResult>;
|
|
182
182
|
}
|
|
183
183
|
export declare function runtimeAvailabilityIsExecutable(state: RuntimeAvailabilityState): boolean;
|
|
184
|
-
//# sourceMappingURL=health.d.ts.map
|
package/dist/health.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/inventory.d.ts
CHANGED
|
@@ -28,4 +28,3 @@ export declare class InMemoryRuntimeInventoryCheckpointRepository implements Run
|
|
|
28
28
|
get(runtimeNodeRefId: string): Promise<RuntimeInventoryCheckpoint | undefined>;
|
|
29
29
|
compareAndSet(expectedRevision: number | undefined, checkpointInput: RuntimeInventoryCheckpoint): Promise<boolean>;
|
|
30
30
|
}
|
|
31
|
-
//# sourceMappingURL=inventory.d.ts.map
|
package/dist/inventory.js
CHANGED
package/dist/mock.d.ts
CHANGED
|
@@ -21,4 +21,3 @@ export declare class MockRuntimeAdapter implements RuntimeAdapter {
|
|
|
21
21
|
cleanup(handleInput: RuntimeExecutionHandle): Promise<void>;
|
|
22
22
|
complete(handleInput: RuntimeExecutionHandle, resultInput: Omit<RuntimeExecutionResult, 'outcome'>): RuntimeExecutionStatus;
|
|
23
23
|
}
|
|
24
|
-
//# sourceMappingURL=mock.d.ts.map
|
package/dist/mock.js
CHANGED
package/dist/models.d.ts
CHANGED
|
@@ -284,4 +284,3 @@ export declare function assessRuntimeCompatibility(definitionInput: unknown, exp
|
|
|
284
284
|
readonly capabilities: readonly CapabilityRequirement[];
|
|
285
285
|
}): RuntimeCompatibilityResult;
|
|
286
286
|
export declare function runtimeDefinitionsEqual(left: unknown, right: unknown): boolean;
|
|
287
|
-
//# sourceMappingURL=models.d.ts.map
|
package/dist/models.js
CHANGED