@adea-ai/runtime-sdk 1.24.0 → 3.0.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/dist/compatibility.d.ts +0 -4
- package/dist/discovery.d.ts +1 -1
- package/dist/discovery.js +3 -6
- package/dist/eligibility.d.ts +4 -7
- package/dist/eligibility.js +2 -15
- package/dist/fixtures.d.ts +3 -3
- package/dist/models.d.ts +0 -10
- package/dist/models.js +5 -14
- package/dist/pi-durable-lead.d.ts +0 -11
- package/dist/pi-durable-lead.js +1 -28
- package/dist/registry.d.ts +0 -2
- package/dist/sessions.js +1 -4
- package/package.json +3 -3
package/dist/compatibility.d.ts
CHANGED
|
@@ -13,7 +13,6 @@ export declare const RuntimeCertificationSchema: z.ZodObject<{
|
|
|
13
13
|
runtimeFamily: z.ZodString;
|
|
14
14
|
connectionType: z.ZodEnum<{
|
|
15
15
|
external_local: "external_local";
|
|
16
|
-
managed_cloud: "managed_cloud";
|
|
17
16
|
managed_local: "managed_local";
|
|
18
17
|
}>;
|
|
19
18
|
classification: z.ZodEnum<{
|
|
@@ -67,7 +66,6 @@ export declare const RuntimeCertificationSchema: z.ZodObject<{
|
|
|
67
66
|
x64: "x64";
|
|
68
67
|
}>;
|
|
69
68
|
location: z.ZodEnum<{
|
|
70
|
-
agent_hq_cloud: "agent_hq_cloud";
|
|
71
69
|
local_device: "local_device";
|
|
72
70
|
}>;
|
|
73
71
|
environment: z.ZodString;
|
|
@@ -100,7 +98,6 @@ export declare const RuntimeCompatibilityMatrixSchema: z.ZodObject<{
|
|
|
100
98
|
runtimeFamily: z.ZodString;
|
|
101
99
|
connectionType: z.ZodEnum<{
|
|
102
100
|
external_local: "external_local";
|
|
103
|
-
managed_cloud: "managed_cloud";
|
|
104
101
|
managed_local: "managed_local";
|
|
105
102
|
}>;
|
|
106
103
|
classification: z.ZodEnum<{
|
|
@@ -154,7 +151,6 @@ export declare const RuntimeCompatibilityMatrixSchema: z.ZodObject<{
|
|
|
154
151
|
x64: "x64";
|
|
155
152
|
}>;
|
|
156
153
|
location: z.ZodEnum<{
|
|
157
|
-
agent_hq_cloud: "agent_hq_cloud";
|
|
158
154
|
local_device: "local_device";
|
|
159
155
|
}>;
|
|
160
156
|
environment: z.ZodString;
|
package/dist/discovery.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface RuntimeConnectionDiscoveryProjectionInput {
|
|
|
6
6
|
readonly connection: RuntimeConnection;
|
|
7
7
|
readonly family: string;
|
|
8
8
|
readonly node?: unknown;
|
|
9
|
-
readonly nodeHealth: 'online' | 'offline' | 'unknown' | 'revoked'
|
|
9
|
+
readonly nodeHealth: 'online' | 'offline' | 'unknown' | 'revoked';
|
|
10
10
|
readonly evaluatedAt: string;
|
|
11
11
|
readonly localProjectGrant: {
|
|
12
12
|
readonly required: boolean;
|
package/dist/discovery.js
CHANGED
|
@@ -7,15 +7,12 @@ import { ExternalSessionAssessmentSchema, ExternalSessionSchema, } from './sessi
|
|
|
7
7
|
export function projectRuntimeConnectionDiscovery(inputValue) {
|
|
8
8
|
const connection = RuntimeConnectionSchema.parse(inputValue.connection);
|
|
9
9
|
const evaluatedAt = RuntimeTimestampSchema.parse(inputValue.evaluatedAt);
|
|
10
|
-
const nodeHealth = inputValue.nodeHealth
|
|
11
|
-
? 'not_applicable'
|
|
12
|
-
: RuntimeNodeHealthStatusSchema.parse(inputValue.nodeHealth);
|
|
10
|
+
const nodeHealth = RuntimeNodeHealthStatusSchema.parse(inputValue.nodeHealth);
|
|
13
11
|
const node = inputValue.node === undefined ? undefined : RuntimeNodeRefSchema.parse(inputValue.node);
|
|
14
|
-
|
|
15
|
-
if (local !== (node !== undefined) || local !== (nodeHealth !== 'not_applicable')) {
|
|
12
|
+
if (node === undefined) {
|
|
16
13
|
throw new Error('RUNTIME_DISCOVERY_NODE_SCOPE_MISMATCH');
|
|
17
14
|
}
|
|
18
|
-
if (node
|
|
15
|
+
if (node.runtimeNodeRefId !== connection.runtimeNodeRefId) {
|
|
19
16
|
throw new Error('RUNTIME_DISCOVERY_NODE_ID_MISMATCH');
|
|
20
17
|
}
|
|
21
18
|
const requiredCapabilities = (inputValue.requiredCapabilities ?? []).map((capability) => RuntimeCapabilityNameSchema.parse(capability));
|
package/dist/eligibility.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const RuntimeEligibilityNodeStatusSchema: z.
|
|
2
|
+
export declare const RuntimeEligibilityNodeStatusSchema: z.ZodEnum<{
|
|
3
3
|
offline: "offline";
|
|
4
4
|
online: "online";
|
|
5
5
|
revoked: "revoked";
|
|
6
6
|
unknown: "unknown";
|
|
7
|
-
}
|
|
7
|
+
}>;
|
|
8
8
|
export declare const RuntimeEligibilityInputSchema: z.ZodObject<{
|
|
9
9
|
eligibilityVersion: z.ZodLiteral<1>;
|
|
10
10
|
evaluatedAt: z.ZodISODateTime;
|
|
@@ -47,24 +47,22 @@ export declare const RuntimeEligibilityInputSchema: z.ZodObject<{
|
|
|
47
47
|
}, z.core.$strict>;
|
|
48
48
|
candidate: z.ZodObject<{
|
|
49
49
|
family: z.ZodString;
|
|
50
|
-
nodeStatus: z.
|
|
50
|
+
nodeStatus: z.ZodEnum<{
|
|
51
51
|
offline: "offline";
|
|
52
52
|
online: "online";
|
|
53
53
|
revoked: "revoked";
|
|
54
54
|
unknown: "unknown";
|
|
55
|
-
}
|
|
55
|
+
}>;
|
|
56
56
|
connection: z.ZodObject<{
|
|
57
57
|
runtimeConnectionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"runtime-connection ID">, string>>;
|
|
58
58
|
identityDigest: z.ZodString;
|
|
59
59
|
connectionType: z.ZodEnum<{
|
|
60
60
|
external_local: "external_local";
|
|
61
|
-
managed_cloud: "managed_cloud";
|
|
62
61
|
managed_local: "managed_local";
|
|
63
62
|
}>;
|
|
64
63
|
runtimeNodeRefId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"runtime-node reference ID">, string>>>;
|
|
65
64
|
runtimeDefinitionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"runtime-definition ID">, string>>;
|
|
66
65
|
location: z.ZodEnum<{
|
|
67
|
-
agent_hq_cloud: "agent_hq_cloud";
|
|
68
66
|
local_device: "local_device";
|
|
69
67
|
}>;
|
|
70
68
|
opaqueNativeRef: z.ZodOptional<z.ZodString>;
|
|
@@ -164,7 +162,6 @@ export declare const RuntimeEligibilityInputSchema: z.ZodObject<{
|
|
|
164
162
|
}, z.core.$strict>;
|
|
165
163
|
allowedFamilies: z.ZodArray<z.ZodString>;
|
|
166
164
|
allowedLocations: z.ZodArray<z.ZodEnum<{
|
|
167
|
-
agent_hq_cloud: "agent_hq_cloud";
|
|
168
165
|
local_device: "local_device";
|
|
169
166
|
}>>;
|
|
170
167
|
deniedRuntimeConnectionIds: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"runtime-connection ID">, string>>>;
|
package/dist/eligibility.js
CHANGED
|
@@ -16,10 +16,7 @@ const PolicyReasonCodeSchema = z
|
|
|
16
16
|
.min(1)
|
|
17
17
|
.max(128)
|
|
18
18
|
.regex(/^[A-Z][A-Z0-9_]*$/);
|
|
19
|
-
export const RuntimeEligibilityNodeStatusSchema =
|
|
20
|
-
RuntimeNodeHealthStatusSchema,
|
|
21
|
-
z.literal('not_applicable'),
|
|
22
|
-
]);
|
|
19
|
+
export const RuntimeEligibilityNodeStatusSchema = RuntimeNodeHealthStatusSchema;
|
|
23
20
|
export const RuntimeEligibilityInputSchema = z
|
|
24
21
|
.object({
|
|
25
22
|
eligibilityVersion: z.literal(1),
|
|
@@ -85,17 +82,7 @@ export const RuntimeEligibilityInputSchema = z
|
|
|
85
82
|
.strict()
|
|
86
83
|
.optional(),
|
|
87
84
|
})
|
|
88
|
-
.strict()
|
|
89
|
-
.superRefine((input, context) => {
|
|
90
|
-
const managedCloud = input.candidate.connection.connectionType === 'managed_cloud';
|
|
91
|
-
if (managedCloud !== (input.candidate.nodeStatus === 'not_applicable')) {
|
|
92
|
-
context.addIssue({
|
|
93
|
-
code: 'custom',
|
|
94
|
-
path: ['candidate', 'nodeStatus'],
|
|
95
|
-
message: 'Managed-cloud candidates must not invent RuntimeNode health',
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
});
|
|
85
|
+
.strict();
|
|
99
86
|
export const RuntimeEligibilityReasonCodeSchema = z.enum([
|
|
100
87
|
'CAPABILITY_SNAPSHOT_MISSING',
|
|
101
88
|
'CAPABILITY_SNAPSHOT_STALE',
|
package/dist/fixtures.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const RuntimeFixtures: Readonly<{
|
|
|
5
5
|
adapterVersion: string;
|
|
6
6
|
driverVersion: string;
|
|
7
7
|
harnessVersion: string;
|
|
8
|
-
location: "
|
|
8
|
+
location: "local_device";
|
|
9
9
|
health: "degraded" | "healthy" | "unavailable";
|
|
10
10
|
lifecycle: "active" | "deprecated" | "revoked";
|
|
11
11
|
capabilities: {
|
|
@@ -34,7 +34,7 @@ export declare const RuntimeFixtures: Readonly<{
|
|
|
34
34
|
adapterVersion: string;
|
|
35
35
|
driverVersion: string;
|
|
36
36
|
harnessVersion: string;
|
|
37
|
-
location: "
|
|
37
|
+
location: "local_device";
|
|
38
38
|
health: "degraded" | "healthy" | "unavailable";
|
|
39
39
|
lifecycle: "active" | "deprecated" | "revoked";
|
|
40
40
|
capabilities: {
|
|
@@ -63,7 +63,7 @@ export declare const RuntimeFixtures: Readonly<{
|
|
|
63
63
|
adapterVersion: string;
|
|
64
64
|
driverVersion: string;
|
|
65
65
|
harnessVersion: string;
|
|
66
|
-
location: "
|
|
66
|
+
location: "local_device";
|
|
67
67
|
health: "degraded" | "healthy" | "unavailable";
|
|
68
68
|
lifecycle: "active" | "deprecated" | "revoked";
|
|
69
69
|
capabilities: {
|
package/dist/models.d.ts
CHANGED
|
@@ -3,9 +3,7 @@ import { type CapabilityRequirement } from './capabilities.js';
|
|
|
3
3
|
export declare const RuntimeTimestampSchema: z.ZodISODateTime;
|
|
4
4
|
export declare const RuntimeSemanticVersionSchema: z.ZodString;
|
|
5
5
|
export declare const RuntimeLocationSchema: z.ZodEnum<{
|
|
6
|
-
agent_hq_cloud: "agent_hq_cloud";
|
|
7
6
|
local_device: "local_device";
|
|
8
|
-
remote_host: "remote_host";
|
|
9
7
|
}>;
|
|
10
8
|
export declare const RuntimeHealthSchema: z.ZodEnum<{
|
|
11
9
|
degraded: "degraded";
|
|
@@ -42,9 +40,7 @@ export declare const RuntimeDefinitionSchema: z.ZodObject<{
|
|
|
42
40
|
driverVersion: z.ZodString;
|
|
43
41
|
harnessVersion: z.ZodString;
|
|
44
42
|
location: z.ZodEnum<{
|
|
45
|
-
agent_hq_cloud: "agent_hq_cloud";
|
|
46
43
|
local_device: "local_device";
|
|
47
|
-
remote_host: "remote_host";
|
|
48
44
|
}>;
|
|
49
45
|
health: z.ZodEnum<{
|
|
50
46
|
degraded: "degraded";
|
|
@@ -112,9 +108,7 @@ export declare const RuntimeNodeRefSchema: z.ZodObject<{
|
|
|
112
108
|
authority: z.ZodLiteral<"agent_hq">;
|
|
113
109
|
displayName: z.ZodString;
|
|
114
110
|
location: z.ZodEnum<{
|
|
115
|
-
agent_hq_cloud: "agent_hq_cloud";
|
|
116
111
|
local_device: "local_device";
|
|
117
|
-
remote_host: "remote_host";
|
|
118
112
|
}>;
|
|
119
113
|
status: z.ZodEnum<{
|
|
120
114
|
offline: "offline";
|
|
@@ -124,12 +118,10 @@ export declare const RuntimeNodeRefSchema: z.ZodObject<{
|
|
|
124
118
|
observedAt: z.ZodISODateTime;
|
|
125
119
|
}, z.core.$strip>;
|
|
126
120
|
export declare const RuntimeConnectionLocationSchema: z.ZodEnum<{
|
|
127
|
-
agent_hq_cloud: "agent_hq_cloud";
|
|
128
121
|
local_device: "local_device";
|
|
129
122
|
}>;
|
|
130
123
|
export declare const RuntimeConnectionTypeSchema: z.ZodEnum<{
|
|
131
124
|
external_local: "external_local";
|
|
132
|
-
managed_cloud: "managed_cloud";
|
|
133
125
|
managed_local: "managed_local";
|
|
134
126
|
}>;
|
|
135
127
|
export declare const RuntimeConnectionStatusSchema: z.ZodEnum<{
|
|
@@ -172,13 +164,11 @@ export declare const RuntimeConnectionSchema: z.ZodObject<{
|
|
|
172
164
|
identityDigest: z.ZodString;
|
|
173
165
|
connectionType: z.ZodEnum<{
|
|
174
166
|
external_local: "external_local";
|
|
175
|
-
managed_cloud: "managed_cloud";
|
|
176
167
|
managed_local: "managed_local";
|
|
177
168
|
}>;
|
|
178
169
|
runtimeNodeRefId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"runtime-node reference ID">, string>>>;
|
|
179
170
|
runtimeDefinitionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"runtime-definition ID">, string>>;
|
|
180
171
|
location: z.ZodEnum<{
|
|
181
|
-
agent_hq_cloud: "agent_hq_cloud";
|
|
182
172
|
local_device: "local_device";
|
|
183
173
|
}>;
|
|
184
174
|
opaqueNativeRef: z.ZodOptional<z.ZodString>;
|
package/dist/models.js
CHANGED
|
@@ -12,7 +12,7 @@ const RuntimeFamilySchema = z
|
|
|
12
12
|
.max(64)
|
|
13
13
|
.regex(/^[a-z][a-z0-9-]*$/);
|
|
14
14
|
const uniqueCapabilities = (capabilities) => new Set(capabilities.map((capability) => capability.name)).size === capabilities.length;
|
|
15
|
-
export const RuntimeLocationSchema = z.enum(['local_device'
|
|
15
|
+
export const RuntimeLocationSchema = z.enum(['local_device']);
|
|
16
16
|
export const RuntimeHealthSchema = z.enum(['healthy', 'degraded', 'unavailable']);
|
|
17
17
|
export const RuntimeLifecycleSchema = z.enum(['active', 'deprecated', 'revoked']);
|
|
18
18
|
export const RuntimeCompatibilityMetadataSchema = z.object({
|
|
@@ -46,12 +46,8 @@ export const RuntimeNodeRefSchema = z.object({
|
|
|
46
46
|
status: z.enum(['online', 'offline', 'revoked']),
|
|
47
47
|
observedAt: RuntimeTimestampSchema,
|
|
48
48
|
});
|
|
49
|
-
export const RuntimeConnectionLocationSchema = z.enum(['local_device'
|
|
50
|
-
export const RuntimeConnectionTypeSchema = z.enum([
|
|
51
|
-
'managed_cloud',
|
|
52
|
-
'managed_local',
|
|
53
|
-
'external_local',
|
|
54
|
-
]);
|
|
49
|
+
export const RuntimeConnectionLocationSchema = z.enum(['local_device']);
|
|
50
|
+
export const RuntimeConnectionTypeSchema = z.enum(['managed_local', 'external_local']);
|
|
55
51
|
export const RuntimeConnectionStatusSchema = z.enum([
|
|
56
52
|
'connected',
|
|
57
53
|
'degraded',
|
|
@@ -127,13 +123,8 @@ export const RuntimeConnectionSchema = z
|
|
|
127
123
|
})
|
|
128
124
|
.strict()
|
|
129
125
|
.superRefine((connection, context) => {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
context.addIssue({ code: 'custom', message: 'Only local connections require a RuntimeNode' });
|
|
133
|
-
}
|
|
134
|
-
const expectedLocation = local ? 'local_device' : 'agent_hq_cloud';
|
|
135
|
-
if (connection.location !== expectedLocation) {
|
|
136
|
-
context.addIssue({ code: 'custom', message: 'Connection type and location must agree' });
|
|
126
|
+
if (connection.runtimeNodeRefId === undefined) {
|
|
127
|
+
context.addIssue({ code: 'custom', message: 'A connection requires a RuntimeNode' });
|
|
137
128
|
}
|
|
138
129
|
const unavailable = ['unavailable', 'disconnected', 'expired', 'revoked'].includes(connection.status);
|
|
139
130
|
if (unavailable !== (connection.health === 'unavailable')) {
|
|
@@ -57,17 +57,6 @@ export declare const PiDurableLeadObservedTargetSchema: z.ZodReadonly<z.ZodObjec
|
|
|
57
57
|
generation: z.ZodOptional<typeof RuntimeObservedGenerationSchema>;
|
|
58
58
|
}, z.core.$strict>>;
|
|
59
59
|
export type PiDurableLeadObservedTarget = z.output<typeof PiDurableLeadObservedTargetSchema>;
|
|
60
|
-
export declare const PI_DURABLE_OBSERVED_GENERATION_CONTRACT_VERSION: {
|
|
61
|
-
readonly major: 3;
|
|
62
|
-
readonly minor: 1;
|
|
63
|
-
};
|
|
64
|
-
export declare function supportsPiDurableObservedGeneration(consumerVersion: unknown): boolean;
|
|
65
|
-
export declare const PI_DURABLE_REMOTE_SESSION_REFERENCE_CONTRACT_VERSION: {
|
|
66
|
-
readonly major: 3;
|
|
67
|
-
readonly minor: 2;
|
|
68
|
-
};
|
|
69
|
-
export declare function supportsPiDurableRemoteSessionReference(consumerVersion: unknown): boolean;
|
|
70
|
-
export declare function supportsPiDurableRemoteOwnerObservation(consumerVersion: unknown): boolean;
|
|
71
60
|
export declare const PiDurableLeadPrepareRequestSchema: z.ZodObject<{
|
|
72
61
|
contractVersion: z.ZodObject<{
|
|
73
62
|
major: z.ZodNumber;
|
package/dist/pi-durable-lead.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { PiDurableQuestionAnswersSchema, PiDurableQuestionRequestIdSchema, } from './pi-durable-questions.js';
|
|
3
3
|
import { PiDurableApprovalAnswerSchema, PiDurableApprovalAttestationSchema, PiDurableApprovalDecisionIdSchema, } from './pi-durable-approvals.js';
|
|
4
|
-
import {
|
|
4
|
+
import { IdentifierSchemas, ModelSelectionFundingViewSchema, ModelSelectionRefSchema, ReadRequestEnvelopeSchema, StateChangingCommandEnvelopeSchema, SuccessResponseEnvelopeSchema, } from '@adea-ai/contracts';
|
|
5
5
|
import { RuntimeExecutionHandleSchema, RuntimeExecutionProgressSchema, RuntimeExecutionStatusSchema, RuntimeExecutionStateSchema, RuntimeObservedGenerationSchema, } from './adapter.js';
|
|
6
6
|
const IntentId = z.uuid();
|
|
7
7
|
const DispatchId = z.string().regex(/^dispatch_[a-f0-9]{32}$/);
|
|
@@ -30,33 +30,6 @@ export const PiDurableLeadObservedTargetSchema = z
|
|
|
30
30
|
generation: RuntimeObservedGenerationSchema.optional(),
|
|
31
31
|
})
|
|
32
32
|
.readonly();
|
|
33
|
-
export const PI_DURABLE_OBSERVED_GENERATION_CONTRACT_VERSION = { major: 3, minor: 1 };
|
|
34
|
-
export function supportsPiDurableObservedGeneration(consumerVersion) {
|
|
35
|
-
const consumer = ContractVersionSchema.safeParse(consumerVersion);
|
|
36
|
-
if (!consumer.success)
|
|
37
|
-
return false;
|
|
38
|
-
const negotiated = negotiateContractVersion([PublicContractManifest.current], [consumer.data]);
|
|
39
|
-
if (negotiated === undefined)
|
|
40
|
-
return false;
|
|
41
|
-
return (negotiated.major === PI_DURABLE_OBSERVED_GENERATION_CONTRACT_VERSION.major &&
|
|
42
|
-
negotiated.minor >= PI_DURABLE_OBSERVED_GENERATION_CONTRACT_VERSION.minor);
|
|
43
|
-
}
|
|
44
|
-
export const PI_DURABLE_REMOTE_SESSION_REFERENCE_CONTRACT_VERSION = { major: 3, minor: 2 };
|
|
45
|
-
export function supportsPiDurableRemoteSessionReference(consumerVersion) {
|
|
46
|
-
const consumer = ContractVersionSchema.safeParse(consumerVersion);
|
|
47
|
-
if (!consumer.success)
|
|
48
|
-
return false;
|
|
49
|
-
const negotiated = negotiateContractVersion([PublicContractManifest.current], [consumer.data]);
|
|
50
|
-
return (negotiated?.major === PI_DURABLE_REMOTE_SESSION_REFERENCE_CONTRACT_VERSION.major &&
|
|
51
|
-
negotiated.minor >= PI_DURABLE_REMOTE_SESSION_REFERENCE_CONTRACT_VERSION.minor);
|
|
52
|
-
}
|
|
53
|
-
export function supportsPiDurableRemoteOwnerObservation(consumerVersion) {
|
|
54
|
-
const consumer = ContractVersionSchema.safeParse(consumerVersion);
|
|
55
|
-
if (!consumer.success)
|
|
56
|
-
return false;
|
|
57
|
-
const negotiated = negotiateContractVersion([PublicContractManifest.current], [consumer.data]);
|
|
58
|
-
return negotiated?.major === 3 && negotiated.minor >= 3;
|
|
59
|
-
}
|
|
60
33
|
function fenceForeignGeneration(receipt, context) {
|
|
61
34
|
const foreign = (generation) => generation !== undefined && generation.attemptId !== receipt.attemptId;
|
|
62
35
|
if (foreign(receipt.observedTarget?.generation))
|
package/dist/registry.d.ts
CHANGED
|
@@ -5,13 +5,11 @@ export declare const RuntimeConnectionRegistrationSchema: z.ZodObject<{
|
|
|
5
5
|
identityDigest: z.ZodString;
|
|
6
6
|
connectionType: z.ZodEnum<{
|
|
7
7
|
external_local: "external_local";
|
|
8
|
-
managed_cloud: "managed_cloud";
|
|
9
8
|
managed_local: "managed_local";
|
|
10
9
|
}>;
|
|
11
10
|
runtimeNodeRefId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"runtime-node reference ID">, string>>>;
|
|
12
11
|
runtimeDefinitionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@adea-ai/contracts").OpaqueIdentifier<"runtime-definition ID">, string>>;
|
|
13
12
|
location: z.ZodEnum<{
|
|
14
|
-
agent_hq_cloud: "agent_hq_cloud";
|
|
15
13
|
local_device: "local_device";
|
|
16
14
|
}>;
|
|
17
15
|
opaqueNativeRef: z.ZodOptional<z.ZodString>;
|
package/dist/sessions.js
CHANGED
|
@@ -292,10 +292,7 @@ const ExternalSessionAssessmentContextSchema = z
|
|
|
292
292
|
nodeStatus: RuntimeEligibilityNodeStatusSchema,
|
|
293
293
|
evaluatedAt: RuntimeTimestampSchema,
|
|
294
294
|
})
|
|
295
|
-
.strict()
|
|
296
|
-
.refine((context) => context.connection === undefined ||
|
|
297
|
-
(context.connection.connectionType === 'managed_cloud') ===
|
|
298
|
-
(context.nodeStatus === 'not_applicable'), 'Managed-cloud sessions must not invent RuntimeNode health');
|
|
295
|
+
.strict();
|
|
299
296
|
export function assessExternalSession(sessionValue, contextValue) {
|
|
300
297
|
const session = ExternalSessionSchema.parse(sessionValue);
|
|
301
298
|
const context = ExternalSessionAssessmentContextSchema.parse(contextValue);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adea-ai/runtime-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "SDK for building Control Plane runtimes: adapters, capabilities, conformance, discovery, eligibility, health, sessions, transport, and routing.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adapter",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "tsc -p tsconfig.json",
|
|
38
|
-
"typecheck": "bun check -p tsconfig.json && bun check -p tsconfig.scripts.json",
|
|
38
|
+
"typecheck": "bun check -p tsconfig.json && bun check -p tsconfig.test.json && bun check -p tsconfig.scripts.json",
|
|
39
39
|
"compatibility:check": "bun scripts/compatibility.ts --check",
|
|
40
40
|
"compatibility:generate": "bun scripts/compatibility.ts",
|
|
41
41
|
"lint": "oxlint src",
|
|
42
42
|
"test": "bun test src"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@adea-ai/contracts": "^
|
|
45
|
+
"@adea-ai/contracts": "^5.0.0",
|
|
46
46
|
"zod": "4.6.6"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|