@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.
Files changed (67) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +53 -0
  3. package/dist/adapter.d.ts +526 -0
  4. package/dist/adapter.d.ts.map +1 -0
  5. package/dist/adapter.js +278 -0
  6. package/dist/adapter.js.map +1 -0
  7. package/dist/capabilities.d.ts +132 -0
  8. package/dist/capabilities.d.ts.map +1 -0
  9. package/dist/capabilities.js +86 -0
  10. package/dist/capabilities.js.map +1 -0
  11. package/dist/compatibility.d.ts +182 -0
  12. package/dist/compatibility.d.ts.map +1 -0
  13. package/dist/compatibility.js +243 -0
  14. package/dist/compatibility.js.map +1 -0
  15. package/dist/conformance.d.ts +14 -0
  16. package/dist/conformance.d.ts.map +1 -0
  17. package/dist/conformance.js +73 -0
  18. package/dist/conformance.js.map +1 -0
  19. package/dist/discovery.d.ts +26 -0
  20. package/dist/discovery.d.ts.map +1 -0
  21. package/dist/discovery.js +253 -0
  22. package/dist/discovery.js.map +1 -0
  23. package/dist/eligibility.d.ts +334 -0
  24. package/dist/eligibility.d.ts.map +1 -0
  25. package/dist/eligibility.js +310 -0
  26. package/dist/eligibility.js.map +1 -0
  27. package/dist/fixtures.d.ts +90 -0
  28. package/dist/fixtures.d.ts.map +1 -0
  29. package/dist/fixtures.js +48 -0
  30. package/dist/fixtures.js.map +1 -0
  31. package/dist/health.d.ts +182 -0
  32. package/dist/health.d.ts.map +1 -0
  33. package/dist/health.js +441 -0
  34. package/dist/health.js.map +1 -0
  35. package/dist/index.d.ts +17 -0
  36. package/dist/index.d.ts.map +1 -0
  37. package/dist/index.js +17 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/inventory.d.ts +21 -0
  40. package/dist/inventory.d.ts.map +1 -0
  41. package/dist/inventory.js +33 -0
  42. package/dist/inventory.js.map +1 -0
  43. package/dist/mock.d.ts +24 -0
  44. package/dist/mock.d.ts.map +1 -0
  45. package/dist/mock.js +261 -0
  46. package/dist/mock.js.map +1 -0
  47. package/dist/models.d.ts +285 -0
  48. package/dist/models.d.ts.map +1 -0
  49. package/dist/models.js +241 -0
  50. package/dist/models.js.map +1 -0
  51. package/dist/registry.d.ts +195 -0
  52. package/dist/registry.d.ts.map +1 -0
  53. package/dist/registry.js +298 -0
  54. package/dist/registry.js.map +1 -0
  55. package/dist/routing.d.ts +408 -0
  56. package/dist/routing.d.ts.map +1 -0
  57. package/dist/routing.js +314 -0
  58. package/dist/routing.js.map +1 -0
  59. package/dist/sessions.d.ts +251 -0
  60. package/dist/sessions.d.ts.map +1 -0
  61. package/dist/sessions.js +411 -0
  62. package/dist/sessions.js.map +1 -0
  63. package/dist/transport.d.ts +55 -0
  64. package/dist/transport.d.ts.map +1 -0
  65. package/dist/transport.js +73 -0
  66. package/dist/transport.js.map +1 -0
  67. package/package.json +53 -0
package/dist/models.js ADDED
@@ -0,0 +1,241 @@
1
+ import { z } from 'zod';
2
+ import { ContractVersionSchema, IdentifierSchemas } from '@control-plane/contracts';
3
+ import { RuntimeCapabilitySchema, evaluateCapabilities, } from './capabilities.js';
4
+ export const RuntimeTimestampSchema = z.iso.datetime();
5
+ export const RuntimeSemanticVersionSchema = z
6
+ .string()
7
+ .regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/);
8
+ const RuntimeFamilySchema = z
9
+ .string()
10
+ .min(1)
11
+ .max(64)
12
+ .regex(/^[a-z][a-z0-9-]*$/);
13
+ const uniqueCapabilities = (capabilities) => new Set(capabilities.map((capability) => capability.name)).size === capabilities.length;
14
+ export const RuntimeLocationSchema = z.enum(['local_device', 'remote_host', 'agent_hq_cloud']);
15
+ export const RuntimeHealthSchema = z.enum(['healthy', 'degraded', 'unavailable']);
16
+ export const RuntimeLifecycleSchema = z.enum(['active', 'deprecated', 'revoked']);
17
+ export const RuntimeCompatibilityMetadataSchema = z.object({
18
+ status: z.enum(['tested', 'untested', 'incompatible']),
19
+ testedVersions: z.object({
20
+ contractVersion: ContractVersionSchema,
21
+ adapterVersion: RuntimeSemanticVersionSchema,
22
+ driverVersion: RuntimeSemanticVersionSchema,
23
+ harnessVersion: RuntimeSemanticVersionSchema,
24
+ }),
25
+ limitations: z.array(z.string().min(1).max(512)).max(64),
26
+ reason: z.string().min(1).max(512).optional(),
27
+ });
28
+ export const RuntimeDefinitionSchema = z.object({
29
+ runtimeDefinitionId: IdentifierSchemas.runtimeDefinitionId,
30
+ family: RuntimeFamilySchema,
31
+ adapterVersion: RuntimeSemanticVersionSchema,
32
+ driverVersion: RuntimeSemanticVersionSchema,
33
+ harnessVersion: RuntimeSemanticVersionSchema,
34
+ location: RuntimeLocationSchema,
35
+ health: RuntimeHealthSchema,
36
+ lifecycle: RuntimeLifecycleSchema,
37
+ capabilities: z.array(RuntimeCapabilitySchema).max(64).refine(uniqueCapabilities),
38
+ compatibility: RuntimeCompatibilityMetadataSchema,
39
+ });
40
+ export const RuntimeNodeRefSchema = z.object({
41
+ runtimeNodeRefId: IdentifierSchemas.runtimeNodeRefId,
42
+ authority: z.literal('agent_hq'),
43
+ displayName: z.string().min(1).max(128),
44
+ location: RuntimeLocationSchema,
45
+ status: z.enum(['online', 'offline', 'revoked']),
46
+ observedAt: RuntimeTimestampSchema,
47
+ });
48
+ export const RuntimeConnectionLocationSchema = z.enum(['local_device', 'agent_hq_cloud']);
49
+ export const RuntimeConnectionTypeSchema = z.enum([
50
+ 'managed_cloud',
51
+ 'managed_local',
52
+ 'external_local',
53
+ ]);
54
+ export const RuntimeConnectionStatusSchema = z.enum([
55
+ 'connected',
56
+ 'degraded',
57
+ 'unavailable',
58
+ 'disconnected',
59
+ 'expired',
60
+ 'revoked',
61
+ ]);
62
+ export const RuntimeAvailabilityStateSchema = z.enum([
63
+ 'healthy',
64
+ 'degraded',
65
+ 'reconnecting',
66
+ 'offline',
67
+ 'incompatible',
68
+ 'revoked',
69
+ 'stale',
70
+ 'unknown',
71
+ ]);
72
+ export const RuntimeCapabilityVerificationSchema = z.enum(['verified', 'unverified']);
73
+ export const RuntimeDiagnosticCodeSchema = z
74
+ .string()
75
+ .min(1)
76
+ .max(128)
77
+ .regex(/^[A-Z][A-Z0-9_]*$/);
78
+ export const RuntimeCompatibilityStateSchema = z.enum([
79
+ 'compatible',
80
+ 'degraded',
81
+ 'untested',
82
+ 'incompatible',
83
+ 'deprecated',
84
+ 'revoked',
85
+ 'unavailable',
86
+ 'capability_missing',
87
+ ]);
88
+ export const RuntimeConnectionIdentityDigestSchema = z.string().regex(/^sha256:[a-f0-9]{64}$/);
89
+ export const RuntimeOpaqueNativeRefSchema = z
90
+ .string()
91
+ .length(31)
92
+ .regex(/^nref_[0-9A-HJKMNP-TV-Z]{26}$/);
93
+ export const RuntimeConnectionSchema = z
94
+ .object({
95
+ runtimeConnectionId: IdentifierSchemas.runtimeConnectionId,
96
+ identityDigest: RuntimeConnectionIdentityDigestSchema,
97
+ connectionType: RuntimeConnectionTypeSchema,
98
+ runtimeNodeRefId: IdentifierSchemas.runtimeNodeRefId.optional(),
99
+ runtimeDefinitionId: IdentifierSchemas.runtimeDefinitionId,
100
+ location: RuntimeConnectionLocationSchema,
101
+ opaqueNativeRef: RuntimeOpaqueNativeRefSchema.optional(),
102
+ adapterVersion: RuntimeSemanticVersionSchema,
103
+ driverVersion: RuntimeSemanticVersionSchema,
104
+ harnessVersion: RuntimeSemanticVersionSchema,
105
+ status: RuntimeConnectionStatusSchema,
106
+ health: RuntimeHealthSchema,
107
+ capabilities: z.array(RuntimeCapabilitySchema).max(64).refine(uniqueCapabilities),
108
+ compatibilityState: RuntimeCompatibilityStateSchema,
109
+ availabilityState: RuntimeAvailabilityStateSchema.optional(),
110
+ protocolVersion: RuntimeSemanticVersionSchema.optional(),
111
+ capabilitySnapshotVersion: z.number().int().positive().optional(),
112
+ capabilitySnapshotObservedAt: RuntimeTimestampSchema.optional(),
113
+ capabilitySnapshotExpiresAt: RuntimeTimestampSchema.optional(),
114
+ capabilityVerification: RuntimeCapabilityVerificationSchema.optional(),
115
+ lastHealthReportSequence: z.number().int().positive().optional(),
116
+ lastHealthReportDigest: RuntimeConnectionIdentityDigestSchema.optional(),
117
+ limitations: z.array(z.string().min(1).max(512)).max(64),
118
+ diagnostics: z.array(RuntimeDiagnosticCodeSchema).max(64).optional(),
119
+ lastDiscoveredAt: RuntimeTimestampSchema,
120
+ lastHeartbeatAt: RuntimeTimestampSchema,
121
+ lastHealthCheckAt: RuntimeTimestampSchema,
122
+ expiresAt: RuntimeTimestampSchema.optional(),
123
+ version: z.number().int().positive(),
124
+ createdAt: RuntimeTimestampSchema,
125
+ updatedAt: RuntimeTimestampSchema,
126
+ })
127
+ .strict()
128
+ .superRefine((connection, context) => {
129
+ const local = connection.connectionType !== 'managed_cloud';
130
+ if (local !== (connection.runtimeNodeRefId !== undefined)) {
131
+ context.addIssue({ code: 'custom', message: 'Only local connections require a RuntimeNode' });
132
+ }
133
+ const expectedLocation = local ? 'local_device' : 'agent_hq_cloud';
134
+ if (connection.location !== expectedLocation) {
135
+ context.addIssue({ code: 'custom', message: 'Connection type and location must agree' });
136
+ }
137
+ const unavailable = ['unavailable', 'disconnected', 'expired', 'revoked'].includes(connection.status);
138
+ if (unavailable !== (connection.health === 'unavailable')) {
139
+ context.addIssue({ code: 'custom', message: 'Connection status and health must agree' });
140
+ }
141
+ if (connection.status === 'revoked' && connection.compatibilityState !== 'revoked') {
142
+ context.addIssue({
143
+ code: 'custom',
144
+ message: 'Revoked connections require revoked compatibility',
145
+ });
146
+ }
147
+ if (connection.status === 'revoked' &&
148
+ connection.availabilityState !== undefined &&
149
+ connection.availabilityState !== 'revoked') {
150
+ context.addIssue({
151
+ code: 'custom',
152
+ message: 'Revoked connections require revoked availability when health has been ingested',
153
+ });
154
+ }
155
+ if (connection.status !== 'revoked' && connection.availabilityState === 'revoked') {
156
+ context.addIssue({
157
+ code: 'custom',
158
+ message: 'Revoked availability requires revoked connection status',
159
+ });
160
+ }
161
+ const snapshotMetadata = [
162
+ connection.capabilitySnapshotVersion,
163
+ connection.capabilitySnapshotObservedAt,
164
+ connection.capabilitySnapshotExpiresAt,
165
+ connection.capabilityVerification,
166
+ ];
167
+ const snapshotFields = snapshotMetadata.filter((value) => value !== undefined).length;
168
+ if (snapshotFields !== 0 && snapshotFields !== snapshotMetadata.length) {
169
+ context.addIssue({ code: 'custom', message: 'Capability snapshot metadata must be complete' });
170
+ }
171
+ if ((connection.lastHealthReportSequence === undefined) !==
172
+ (connection.lastHealthReportDigest === undefined)) {
173
+ context.addIssue({ code: 'custom', message: 'Health report identity must be complete' });
174
+ }
175
+ if (Date.parse(connection.updatedAt) < Date.parse(connection.createdAt)) {
176
+ context.addIssue({ code: 'custom', message: 'Connection timestamps cannot regress' });
177
+ }
178
+ });
179
+ export function assessRuntimeCompatibility(definitionInput, expected) {
180
+ const definition = RuntimeDefinitionSchema.parse(definitionInput);
181
+ if (definition.lifecycle === 'revoked')
182
+ return { state: 'revoked', reasons: ['RUNTIME_REVOKED'] };
183
+ if (definition.lifecycle === 'deprecated') {
184
+ return { state: 'deprecated', reasons: ['RUNTIME_DEPRECATED'] };
185
+ }
186
+ if (definition.health === 'unavailable') {
187
+ return { state: 'unavailable', reasons: ['RUNTIME_UNAVAILABLE'] };
188
+ }
189
+ if (definition.compatibility.status === 'incompatible') {
190
+ return { state: 'incompatible', reasons: ['RUNTIME_DECLARED_INCOMPATIBLE'] };
191
+ }
192
+ const versionReasons = [
193
+ ...(definition.compatibility.testedVersions.contractVersion.major === expected.contractMajor
194
+ ? []
195
+ : ['CONTRACT_MAJOR_MISMATCH']),
196
+ ...(major(definition.adapterVersion) === expected.adapterMajor
197
+ ? []
198
+ : ['ADAPTER_MAJOR_MISMATCH']),
199
+ ...(major(definition.driverVersion) === expected.driverMajor ? [] : ['DRIVER_MAJOR_MISMATCH']),
200
+ ].sort();
201
+ if (versionReasons.length > 0)
202
+ return { state: 'incompatible', reasons: versionReasons };
203
+ const capability = evaluateCapabilities(definition.capabilities, expected.capabilities);
204
+ if (!capability.eligible) {
205
+ return {
206
+ state: 'capability_missing',
207
+ reasons: [
208
+ ...capability.missingRequired.map((name) => `MISSING_REQUIRED:${name}`),
209
+ ...capability.insufficientRequired.map((name) => `INSUFFICIENT_REQUIRED:${name}`),
210
+ ].sort(),
211
+ };
212
+ }
213
+ if (definition.compatibility.status === 'untested') {
214
+ return { state: 'untested', reasons: ['VERSION_COMBINATION_UNTESTED'] };
215
+ }
216
+ if (definition.health === 'degraded' || capability.mode === 'degraded') {
217
+ return {
218
+ state: 'degraded',
219
+ reasons: [
220
+ ...(definition.health === 'degraded' ? ['RUNTIME_HEALTH_DEGRADED'] : []),
221
+ ...capability.missingOptional.map((name) => `MISSING_OPTIONAL:${name}`),
222
+ ...capability.degradedOptional.map((name) => `DEGRADED_OPTIONAL:${name}`),
223
+ ].sort(),
224
+ };
225
+ }
226
+ return { state: 'compatible', reasons: [] };
227
+ }
228
+ export function runtimeDefinitionsEqual(left, right) {
229
+ return JSON.stringify(normalizeDefinition(left)) === JSON.stringify(normalizeDefinition(right));
230
+ }
231
+ function normalizeDefinition(input) {
232
+ const definition = RuntimeDefinitionSchema.parse(input);
233
+ return {
234
+ ...definition,
235
+ capabilities: [...definition.capabilities].sort((left, right) => left.name.localeCompare(right.name)),
236
+ };
237
+ }
238
+ function major(version) {
239
+ return Number.parseInt(version.split('.')[0] ?? '', 10);
240
+ }
241
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AACnF,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GAGrB,MAAM,mBAAmB,CAAA;AAE1B,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,GAAG,CAA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ema: z.ZodObject<{
4
+ runtimeConnectionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"runtime-connection ID">, string>>;
5
+ identityDigest: z.ZodString;
6
+ connectionType: z.ZodEnum<{
7
+ managed_cloud: "managed_cloud";
8
+ managed_local: "managed_local";
9
+ external_local: "external_local";
10
+ }>;
11
+ runtimeNodeRefId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"runtime-node reference ID">, string>>>;
12
+ runtimeDefinitionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"runtime-definition ID">, string>>;
13
+ location: z.ZodEnum<{
14
+ local_device: "local_device";
15
+ agent_hq_cloud: "agent_hq_cloud";
16
+ }>;
17
+ opaqueNativeRef: z.ZodOptional<z.ZodString>;
18
+ adapterVersion: z.ZodString;
19
+ driverVersion: z.ZodString;
20
+ harnessVersion: z.ZodString;
21
+ status: z.ZodEnum<{
22
+ degraded: "degraded";
23
+ unavailable: "unavailable";
24
+ connected: "connected";
25
+ }>;
26
+ health: z.ZodEnum<{
27
+ degraded: "degraded";
28
+ healthy: "healthy";
29
+ unavailable: "unavailable";
30
+ }>;
31
+ capabilities: z.ZodArray<z.ZodObject<{
32
+ name: z.ZodEnum<{
33
+ "stream.output": "stream.output";
34
+ "stream.events": "stream.events";
35
+ "tool.call": "tool.call";
36
+ "tool.parallel": "tool.parallel";
37
+ "output.structured": "output.structured";
38
+ "filesystem.read": "filesystem.read";
39
+ "filesystem.write": "filesystem.write";
40
+ "project.read": "project.read";
41
+ "project.write": "project.write";
42
+ "execution.cancel": "execution.cancel";
43
+ "interaction.user-input": "interaction.user-input";
44
+ "interaction.approval": "interaction.approval";
45
+ "session.create": "session.create";
46
+ "session.list": "session.list";
47
+ "session.resume": "session.resume";
48
+ "session.close": "session.close";
49
+ "session.history": "session.history";
50
+ "session.load": "session.load";
51
+ "model.select": "model.select";
52
+ "execution.child": "execution.child";
53
+ }>;
54
+ support: z.ZodEnum<{
55
+ supported: "supported";
56
+ degraded: "degraded";
57
+ unsupported: "unsupported";
58
+ }>;
59
+ limitations: z.ZodOptional<z.ZodArray<z.ZodString>>;
60
+ }, z.core.$strip>>;
61
+ compatibilityState: z.ZodEnum<{
62
+ degraded: "degraded";
63
+ unavailable: "unavailable";
64
+ deprecated: "deprecated";
65
+ untested: "untested";
66
+ incompatible: "incompatible";
67
+ compatible: "compatible";
68
+ capability_missing: "capability_missing";
69
+ }>;
70
+ limitations: z.ZodArray<z.ZodString>;
71
+ lastDiscoveredAt: z.ZodISODateTime;
72
+ lastHeartbeatAt: z.ZodISODateTime;
73
+ lastHealthCheckAt: z.ZodISODateTime;
74
+ expiresAt: z.ZodOptional<z.ZodISODateTime>;
75
+ }, z.core.$strict>;
76
+ export declare const RuntimeConnectionUpdateSchema: z.ZodObject<{
77
+ runtimeConnectionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("@control-plane/contracts").OpaqueIdentifier<"runtime-connection ID">, string>>;
78
+ expectedVersion: z.ZodNumber;
79
+ observedAt: z.ZodISODateTime;
80
+ adapterVersion: z.ZodOptional<z.ZodString>;
81
+ driverVersion: z.ZodOptional<z.ZodString>;
82
+ harnessVersion: z.ZodOptional<z.ZodString>;
83
+ status: z.ZodOptional<z.ZodEnum<{
84
+ degraded: "degraded";
85
+ unavailable: "unavailable";
86
+ connected: "connected";
87
+ disconnected: "disconnected";
88
+ expired: "expired";
89
+ }>>;
90
+ health: z.ZodOptional<z.ZodEnum<{
91
+ degraded: "degraded";
92
+ healthy: "healthy";
93
+ unavailable: "unavailable";
94
+ }>>;
95
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodObject<{
96
+ name: z.ZodEnum<{
97
+ "stream.output": "stream.output";
98
+ "stream.events": "stream.events";
99
+ "tool.call": "tool.call";
100
+ "tool.parallel": "tool.parallel";
101
+ "output.structured": "output.structured";
102
+ "filesystem.read": "filesystem.read";
103
+ "filesystem.write": "filesystem.write";
104
+ "project.read": "project.read";
105
+ "project.write": "project.write";
106
+ "execution.cancel": "execution.cancel";
107
+ "interaction.user-input": "interaction.user-input";
108
+ "interaction.approval": "interaction.approval";
109
+ "session.create": "session.create";
110
+ "session.list": "session.list";
111
+ "session.resume": "session.resume";
112
+ "session.close": "session.close";
113
+ "session.history": "session.history";
114
+ "session.load": "session.load";
115
+ "model.select": "model.select";
116
+ "execution.child": "execution.child";
117
+ }>;
118
+ support: z.ZodEnum<{
119
+ supported: "supported";
120
+ degraded: "degraded";
121
+ unsupported: "unsupported";
122
+ }>;
123
+ limitations: z.ZodOptional<z.ZodArray<z.ZodString>>;
124
+ }, z.core.$strip>>>;
125
+ compatibilityState: z.ZodOptional<z.ZodEnum<{
126
+ degraded: "degraded";
127
+ unavailable: "unavailable";
128
+ deprecated: "deprecated";
129
+ untested: "untested";
130
+ incompatible: "incompatible";
131
+ compatible: "compatible";
132
+ capability_missing: "capability_missing";
133
+ }>>;
134
+ availabilityState: z.ZodOptional<z.ZodEnum<{
135
+ degraded: "degraded";
136
+ unknown: "unknown";
137
+ healthy: "healthy";
138
+ incompatible: "incompatible";
139
+ offline: "offline";
140
+ reconnecting: "reconnecting";
141
+ stale: "stale";
142
+ }>>;
143
+ protocolVersion: z.ZodOptional<z.ZodString>;
144
+ capabilitySnapshotVersion: z.ZodOptional<z.ZodNumber>;
145
+ capabilitySnapshotObservedAt: z.ZodOptional<z.ZodISODateTime>;
146
+ capabilitySnapshotExpiresAt: z.ZodOptional<z.ZodISODateTime>;
147
+ capabilityVerification: z.ZodOptional<z.ZodEnum<{
148
+ verified: "verified";
149
+ unverified: "unverified";
150
+ }>>;
151
+ lastHealthReportSequence: z.ZodOptional<z.ZodNumber>;
152
+ lastHealthReportDigest: z.ZodOptional<z.ZodString>;
153
+ limitations: z.ZodOptional<z.ZodArray<z.ZodString>>;
154
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodString>>;
155
+ lastDiscoveredAt: z.ZodOptional<z.ZodISODateTime>;
156
+ lastHeartbeatAt: z.ZodOptional<z.ZodISODateTime>;
157
+ lastHealthCheckAt: z.ZodOptional<z.ZodISODateTime>;
158
+ expiresAt: z.ZodOptional<z.ZodISODateTime>;
159
+ }, z.core.$strict>;
160
+ export type RuntimeConnectionRegistration = z.input<typeof RuntimeConnectionRegistrationSchema>;
161
+ export type RuntimeConnectionUpdate = z.input<typeof RuntimeConnectionUpdateSchema>;
162
+ export interface RuntimeConnectionRepository {
163
+ insert(connection: RuntimeConnection): Promise<boolean>;
164
+ get(runtimeConnectionId: string): Promise<RuntimeConnection | undefined>;
165
+ getByIdentityDigest(identityDigest: string): Promise<RuntimeConnection | undefined>;
166
+ compareAndSet(expectedVersion: number, connection: RuntimeConnection): Promise<boolean>;
167
+ listByRuntimeNode(runtimeNodeRefId: string): Promise<readonly RuntimeConnection[]>;
168
+ }
169
+ export type RuntimeConnectionRegistryErrorCode = 'CONNECTION_MISSING' | 'CONNECTION_REVOKED' | 'CONNECTION_NOT_EXPIRED' | 'STABLE_IDENTITY_CONFLICT' | 'STALE_CONNECTION_VERSION' | 'STALE_OBSERVATION' | 'OBSERVATION_CONFLICT';
170
+ export declare class RuntimeConnectionRegistryError extends Error {
171
+ readonly code: RuntimeConnectionRegistryErrorCode;
172
+ constructor(code: RuntimeConnectionRegistryErrorCode);
173
+ }
174
+ export declare class RuntimeConnectionRegistry {
175
+ #private;
176
+ readonly repository: RuntimeConnectionRepository;
177
+ constructor(repository: RuntimeConnectionRepository);
178
+ register(input: RuntimeConnectionRegistration): Promise<RuntimeConnection>;
179
+ get(runtimeConnectionId: string): Promise<RuntimeConnection | undefined>;
180
+ listByRuntimeNode(runtimeNodeRefId: string): Promise<readonly RuntimeConnection[]>;
181
+ update(input: RuntimeConnectionUpdate): Promise<RuntimeConnection>;
182
+ disconnect(input: unknown): Promise<RuntimeConnection>;
183
+ expire(input: unknown): Promise<RuntimeConnection>;
184
+ revoke(input: unknown): Promise<RuntimeConnection>;
185
+ }
186
+ export declare class InMemoryRuntimeConnectionRepository implements RuntimeConnectionRepository {
187
+ #private;
188
+ insert(connectionInput: RuntimeConnection): Promise<boolean>;
189
+ get(runtimeConnectionId: string): Promise<RuntimeConnection | undefined>;
190
+ getByIdentityDigest(identityDigest: string): Promise<RuntimeConnection | undefined>;
191
+ compareAndSet(expectedVersion: number, connectionInput: RuntimeConnection): Promise<boolean>;
192
+ listByRuntimeNode(runtimeNodeRefId: string): Promise<readonly RuntimeConnection[]>;
193
+ }
194
+ export declare function runtimeConnectionsShareStableIdentity(left: RuntimeConnection, right: Pick<RuntimeConnection, 'runtimeConnectionId' | 'identityDigest' | 'connectionType' | 'runtimeNodeRefId' | 'runtimeDefinitionId' | 'location' | 'opaqueNativeRef'>): boolean;
195
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,EAcL,KAAK,iBAAiB,EACvB,MAAM,aAAa,CAAA;AAKpB,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsBrC,CAAA;AAEX,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA2B/B,CAAA;AAUX,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAA;AAC/F,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEnF,MAAM,WAAW,2BAA2B;IAC1C,MAAM,CAAC,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,C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