@adea-ai/contracts 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 (47) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +39 -0
  3. package/dist/authentication.d.ts +44 -0
  4. package/dist/authentication.d.ts.map +1 -0
  5. package/dist/authentication.js +49 -0
  6. package/dist/authentication.js.map +1 -0
  7. package/dist/context-providers.d.ts +170 -0
  8. package/dist/context-providers.d.ts.map +1 -0
  9. package/dist/context-providers.js +87 -0
  10. package/dist/context-providers.js.map +1 -0
  11. package/dist/control-api.d.ts +591 -0
  12. package/dist/control-api.d.ts.map +1 -0
  13. package/dist/control-api.js +445 -0
  14. package/dist/control-api.js.map +1 -0
  15. package/dist/envelopes.d.ts +296 -0
  16. package/dist/envelopes.d.ts.map +1 -0
  17. package/dist/envelopes.js +164 -0
  18. package/dist/envelopes.js.map +1 -0
  19. package/dist/fixtures.d.ts +142 -0
  20. package/dist/fixtures.d.ts.map +1 -0
  21. package/dist/fixtures.js +95 -0
  22. package/dist/fixtures.js.map +1 -0
  23. package/dist/identifiers.d.ts +77 -0
  24. package/dist/identifiers.d.ts.map +1 -0
  25. package/dist/identifiers.js +43 -0
  26. package/dist/identifiers.js.map +1 -0
  27. package/dist/index.d.ts +12 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +12 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/memory-writeback.d.ts +85 -0
  32. package/dist/memory-writeback.d.ts.map +1 -0
  33. package/dist/memory-writeback.js +74 -0
  34. package/dist/memory-writeback.js.map +1 -0
  35. package/dist/pagination.d.ts +13 -0
  36. package/dist/pagination.d.ts.map +1 -0
  37. package/dist/pagination.js +28 -0
  38. package/dist/pagination.js.map +1 -0
  39. package/dist/runtime-discovery.d.ts +822 -0
  40. package/dist/runtime-discovery.d.ts.map +1 -0
  41. package/dist/runtime-discovery.js +235 -0
  42. package/dist/runtime-discovery.js.map +1 -0
  43. package/dist/versioning.d.ts +38 -0
  44. package/dist/versioning.d.ts.map +1 -0
  45. package/dist/versioning.js +67 -0
  46. package/dist/versioning.js.map +1 -0
  47. package/package.json +50 -0
@@ -0,0 +1,296 @@
1
+ import { z } from 'zod';
2
+ export declare const CorrelationMetadataSchema: z.ZodObject<{
3
+ traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"trace ID">, string>>;
4
+ causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"command ID">, string>>>;
5
+ parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"event ID">, string>>>;
6
+ }, z.core.$strip>;
7
+ export type CorrelationMetadata = z.infer<typeof CorrelationMetadataSchema>;
8
+ export declare const ReadRequestEnvelopeSchema: z.ZodObject<{
9
+ caller: z.ZodOptional<z.ZodObject<{
10
+ servicePrincipalId: z.ZodString;
11
+ }, z.core.$strip>>;
12
+ contractVersion: z.ZodObject<{
13
+ major: z.ZodNumber;
14
+ minor: z.ZodNumber;
15
+ }, z.core.$strict>;
16
+ requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"request ID">, string>>;
17
+ workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"workspace ID">, string>>;
18
+ projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"project ID">, string>>>;
19
+ correlation: z.ZodObject<{
20
+ traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"trace ID">, string>>;
21
+ causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"command ID">, string>>>;
22
+ parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"event ID">, string>>>;
23
+ }, z.core.$strip>;
24
+ operation: z.ZodString;
25
+ requestedAt: z.ZodISODateTime;
26
+ parameters: z.ZodUnknown;
27
+ }, z.core.$strip>;
28
+ export type ReadRequestEnvelope = z.infer<typeof ReadRequestEnvelopeSchema>;
29
+ export declare const StateChangingCommandEnvelopeSchema: z.ZodObject<{
30
+ caller: z.ZodOptional<z.ZodObject<{
31
+ servicePrincipalId: z.ZodString;
32
+ }, z.core.$strip>>;
33
+ contractVersion: z.ZodObject<{
34
+ major: z.ZodNumber;
35
+ minor: z.ZodNumber;
36
+ }, z.core.$strict>;
37
+ requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"request ID">, string>>;
38
+ workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"workspace ID">, string>>;
39
+ projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"project ID">, string>>>;
40
+ correlation: z.ZodObject<{
41
+ traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"trace ID">, string>>;
42
+ causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"command ID">, string>>>;
43
+ parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"event ID">, string>>>;
44
+ }, z.core.$strip>;
45
+ commandId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"command ID">, string>>;
46
+ idempotencyKey: z.ZodString;
47
+ payloadHash: z.ZodString;
48
+ operation: z.ZodString;
49
+ issuedAt: z.ZodISODateTime;
50
+ payload: z.ZodUnknown;
51
+ }, z.core.$strip>;
52
+ export type StateChangingCommandEnvelope = z.infer<typeof StateChangingCommandEnvelopeSchema>;
53
+ export declare const SuccessResponseEnvelopeSchema: z.ZodObject<{
54
+ contractVersion: z.ZodObject<{
55
+ major: z.ZodNumber;
56
+ minor: z.ZodNumber;
57
+ }, z.core.$strict>;
58
+ requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"request ID">, string>>;
59
+ correlation: z.ZodObject<{
60
+ traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"trace ID">, string>>;
61
+ causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"command ID">, string>>>;
62
+ parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"event ID">, string>>>;
63
+ }, z.core.$strip>;
64
+ data: z.ZodUnknown;
65
+ }, z.core.$strip>;
66
+ export declare const ErrorClassSchema: z.ZodEnum<{
67
+ validation: "validation";
68
+ authentication: "authentication";
69
+ authorization: "authorization";
70
+ conflict: "conflict";
71
+ stale_reference: "stale_reference";
72
+ capability_mismatch: "capability_mismatch";
73
+ runtime_unavailable: "runtime_unavailable";
74
+ internal: "internal";
75
+ }>;
76
+ export type ErrorClass = z.infer<typeof ErrorClassSchema>;
77
+ export declare const NormalizedErrorSchema: z.ZodObject<{
78
+ class: z.ZodEnum<{
79
+ validation: "validation";
80
+ authentication: "authentication";
81
+ authorization: "authorization";
82
+ conflict: "conflict";
83
+ stale_reference: "stale_reference";
84
+ capability_mismatch: "capability_mismatch";
85
+ runtime_unavailable: "runtime_unavailable";
86
+ internal: "internal";
87
+ }>;
88
+ code: z.ZodString;
89
+ message: z.ZodString;
90
+ retryable: z.ZodBoolean;
91
+ source: z.ZodEnum<{
92
+ provider: "provider";
93
+ client: "client";
94
+ auth: "auth";
95
+ policy: "policy";
96
+ runtime: "runtime";
97
+ persistence: "persistence";
98
+ workflow: "workflow";
99
+ system: "system";
100
+ }>;
101
+ remediation: z.ZodOptional<z.ZodString>;
102
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
103
+ }, z.core.$strip>;
104
+ export type NormalizedError = z.infer<typeof NormalizedErrorSchema>;
105
+ export declare const ErrorResponseEnvelopeSchema: z.ZodObject<{
106
+ contractVersion: z.ZodObject<{
107
+ major: z.ZodNumber;
108
+ minor: z.ZodNumber;
109
+ }, z.core.$strict>;
110
+ requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"request ID">, string>>;
111
+ correlation: z.ZodObject<{
112
+ traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"trace ID">, string>>;
113
+ causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"command ID">, string>>>;
114
+ parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"event ID">, string>>>;
115
+ }, z.core.$strip>;
116
+ error: z.ZodObject<{
117
+ class: z.ZodEnum<{
118
+ validation: "validation";
119
+ authentication: "authentication";
120
+ authorization: "authorization";
121
+ conflict: "conflict";
122
+ stale_reference: "stale_reference";
123
+ capability_mismatch: "capability_mismatch";
124
+ runtime_unavailable: "runtime_unavailable";
125
+ internal: "internal";
126
+ }>;
127
+ code: z.ZodString;
128
+ message: z.ZodString;
129
+ retryable: z.ZodBoolean;
130
+ source: z.ZodEnum<{
131
+ provider: "provider";
132
+ client: "client";
133
+ auth: "auth";
134
+ policy: "policy";
135
+ runtime: "runtime";
136
+ persistence: "persistence";
137
+ workflow: "workflow";
138
+ system: "system";
139
+ }>;
140
+ remediation: z.ZodOptional<z.ZodString>;
141
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
142
+ }, z.core.$strip>;
143
+ }, z.core.$strip>;
144
+ export declare const ResponseEnvelopeSchema: z.ZodUnion<readonly [z.ZodObject<{
145
+ contractVersion: z.ZodObject<{
146
+ major: z.ZodNumber;
147
+ minor: z.ZodNumber;
148
+ }, z.core.$strict>;
149
+ requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"request ID">, string>>;
150
+ correlation: z.ZodObject<{
151
+ traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"trace ID">, string>>;
152
+ causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"command ID">, string>>>;
153
+ parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"event ID">, string>>>;
154
+ }, z.core.$strip>;
155
+ data: z.ZodUnknown;
156
+ }, z.core.$strip>, z.ZodObject<{
157
+ contractVersion: z.ZodObject<{
158
+ major: z.ZodNumber;
159
+ minor: z.ZodNumber;
160
+ }, z.core.$strict>;
161
+ requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"request ID">, string>>;
162
+ correlation: z.ZodObject<{
163
+ traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"trace ID">, string>>;
164
+ causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"command ID">, string>>>;
165
+ parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"event ID">, string>>>;
166
+ }, z.core.$strip>;
167
+ error: z.ZodObject<{
168
+ class: z.ZodEnum<{
169
+ validation: "validation";
170
+ authentication: "authentication";
171
+ authorization: "authorization";
172
+ conflict: "conflict";
173
+ stale_reference: "stale_reference";
174
+ capability_mismatch: "capability_mismatch";
175
+ runtime_unavailable: "runtime_unavailable";
176
+ internal: "internal";
177
+ }>;
178
+ code: z.ZodString;
179
+ message: z.ZodString;
180
+ retryable: z.ZodBoolean;
181
+ source: z.ZodEnum<{
182
+ provider: "provider";
183
+ client: "client";
184
+ auth: "auth";
185
+ policy: "policy";
186
+ runtime: "runtime";
187
+ persistence: "persistence";
188
+ workflow: "workflow";
189
+ system: "system";
190
+ }>;
191
+ remediation: z.ZodOptional<z.ZodString>;
192
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
193
+ }, z.core.$strip>;
194
+ }, z.core.$strip>]>;
195
+ export type ResponseEnvelope = z.infer<typeof ResponseEnvelopeSchema>;
196
+ export declare const EventEnvelopeSchema: z.ZodObject<{
197
+ contractVersion: z.ZodObject<{
198
+ major: z.ZodNumber;
199
+ minor: z.ZodNumber;
200
+ }, z.core.$strict>;
201
+ eventId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"event ID">, string>>;
202
+ eventType: z.ZodString;
203
+ occurredAt: z.ZodISODateTime;
204
+ workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"workspace ID">, string>>;
205
+ projectId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"project ID">, string>>>;
206
+ correlation: z.ZodObject<{
207
+ traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"trace ID">, string>>;
208
+ causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"command ID">, string>>>;
209
+ parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"event ID">, string>>>;
210
+ }, z.core.$strip>;
211
+ data: z.ZodUnknown;
212
+ }, z.core.$strip>;
213
+ export type EventEnvelope = z.infer<typeof EventEnvelopeSchema>;
214
+ export declare const AgentHqExecutionEventEnvelopeSchema: z.ZodObject<{
215
+ contractVersion: z.ZodObject<{
216
+ major: z.ZodNumber;
217
+ minor: z.ZodNumber;
218
+ }, z.core.$strict>;
219
+ eventId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"event ID">, string>>;
220
+ eventType: z.ZodString;
221
+ executionId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"execution ID">, string>>;
222
+ attemptId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"attempt ID">, string>>>;
223
+ workflowId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"workflow ID">, string>>>;
224
+ workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"workspace ID">, string>>;
225
+ projectId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"project ID">, string>>;
226
+ taskId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"task ID">, string>>;
227
+ agentId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"Agent ID">, string>>;
228
+ sequence: z.ZodNumber;
229
+ schemaVersion: z.ZodNumber;
230
+ payloadHash: z.ZodString;
231
+ occurredAt: z.ZodISODateTime;
232
+ recordedAt: z.ZodISODateTime;
233
+ correlation: z.ZodObject<{
234
+ requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"request ID">, string>>;
235
+ commandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"command ID">, string>>>;
236
+ traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"trace ID">, string>>;
237
+ }, z.core.$strip>;
238
+ data: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
239
+ }, z.core.$strip>;
240
+ export type AgentHqExecutionEventEnvelope = z.infer<typeof AgentHqExecutionEventEnvelopeSchema>;
241
+ export declare const UsageEnvelopeSchema: z.ZodObject<{
242
+ contractVersion: z.ZodObject<{
243
+ major: z.ZodNumber;
244
+ minor: z.ZodNumber;
245
+ }, z.core.$strict>;
246
+ requestId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"request ID">, string>>;
247
+ workspaceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"workspace ID">, string>>;
248
+ executionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"execution ID">, string>>>;
249
+ recordedAt: z.ZodISODateTime;
250
+ correlation: z.ZodObject<{
251
+ traceId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"trace ID">, string>>;
252
+ causationCommandId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"command ID">, string>>>;
253
+ parentEventId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"event ID">, string>>>;
254
+ }, z.core.$strip>;
255
+ usage: z.ZodObject<{
256
+ inputTokens: z.ZodNumber;
257
+ outputTokens: z.ZodNumber;
258
+ durationMs: z.ZodNumber;
259
+ cost: z.ZodOptional<z.ZodObject<{
260
+ amount: z.ZodString;
261
+ currency: z.ZodString;
262
+ }, z.core.$strip>>;
263
+ }, z.core.$strip>;
264
+ }, z.core.$strip>;
265
+ export type UsageEnvelope = z.infer<typeof UsageEnvelopeSchema>;
266
+ export declare const ArtifactReferenceSchema: z.ZodObject<{
267
+ contractVersion: z.ZodObject<{
268
+ major: z.ZodNumber;
269
+ minor: z.ZodNumber;
270
+ }, z.core.$strict>;
271
+ artifactId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"Artifact reference ID">, string>>;
272
+ version: z.ZodNumber;
273
+ mediaType: z.ZodString;
274
+ digest: z.ZodString;
275
+ sizeBytes: z.ZodNumber;
276
+ locator: z.ZodString;
277
+ }, z.core.$strip>;
278
+ export type ArtifactReference = z.infer<typeof ArtifactReferenceSchema>;
279
+ export declare const RuntimeReadModelEnvelopeSchema: z.ZodObject<{
280
+ contractVersion: z.ZodObject<{
281
+ major: z.ZodNumber;
282
+ minor: z.ZodNumber;
283
+ }, z.core.$strict>;
284
+ runtimeNodeRefId: z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"runtime-node reference ID">, string>>;
285
+ runtimeConnectionId: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./identifiers.js").OpaqueIdentifier<"runtime-connection ID">, string>>>;
286
+ status: z.ZodEnum<{
287
+ revoked: "revoked";
288
+ degraded: "degraded";
289
+ unavailable: "unavailable";
290
+ available: "available";
291
+ }>;
292
+ observedAt: z.ZodISODateTime;
293
+ readModel: z.ZodRecord<z.ZodString, z.ZodUnknown>;
294
+ }, z.core.$strip>;
295
+ export type RuntimeReadModelEnvelope = z.infer<typeof RuntimeReadModelEnvelopeSchema>;
296
+ //# sourceMappingURL=envelopes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envelopes.d.ts","sourceRoot":"","sources":["../src/envelopes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAkBvB,eAAO,MAAM,yBAAyB;;;;iBAIpC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAW3E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;iBAIpC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE3E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;iBAO7C,CAAA;AAEF,MAAM,MAAM,4BAA4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AAuB,CAAC,CAAA;AAEvE,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;iBAOzC,CAAA;AAEF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA"}
@@ -0,0 +1,164 @@
1
+ import { z } from 'zod';
2
+ import { ServiceCallerAssertionSchema } from './authentication.js';
3
+ import { IdentifierSchemas } from './identifiers.js';
4
+ import { ContractVersionSchema } from './versioning.js';
5
+ const TimestampSchema = z.iso.datetime();
6
+ const OperationSchema = z
7
+ .string()
8
+ .min(1)
9
+ .max(128)
10
+ .regex(/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:\.[a-z][a-z0-9]*(?:-[a-z0-9]+)*)+$/);
11
+ const IdempotencyKeySchema = z
12
+ .string()
13
+ .min(16)
14
+ .max(128)
15
+ .regex(/^[A-Za-z0-9._:-]+$/);
16
+ const Sha256Schema = z.string().regex(/^[a-f0-9]{64}$/);
17
+ export const CorrelationMetadataSchema = z.object({
18
+ traceId: IdentifierSchemas.traceId,
19
+ causationCommandId: IdentifierSchemas.commandId.optional(),
20
+ parentEventId: IdentifierSchemas.eventId.optional(),
21
+ });
22
+ const RequestIdentitySchema = z.object({
23
+ caller: ServiceCallerAssertionSchema.optional(),
24
+ contractVersion: ContractVersionSchema,
25
+ requestId: IdentifierSchemas.requestId,
26
+ workspaceId: IdentifierSchemas.workspaceId,
27
+ projectId: IdentifierSchemas.projectId.optional(),
28
+ correlation: CorrelationMetadataSchema,
29
+ });
30
+ export const ReadRequestEnvelopeSchema = RequestIdentitySchema.extend({
31
+ operation: OperationSchema,
32
+ requestedAt: TimestampSchema,
33
+ parameters: z.unknown(),
34
+ });
35
+ export const StateChangingCommandEnvelopeSchema = RequestIdentitySchema.extend({
36
+ commandId: IdentifierSchemas.commandId,
37
+ idempotencyKey: IdempotencyKeySchema,
38
+ payloadHash: Sha256Schema,
39
+ operation: OperationSchema,
40
+ issuedAt: TimestampSchema,
41
+ payload: z.unknown(),
42
+ });
43
+ const ResponseIdentitySchema = z.object({
44
+ contractVersion: ContractVersionSchema,
45
+ requestId: IdentifierSchemas.requestId,
46
+ correlation: CorrelationMetadataSchema,
47
+ });
48
+ export const SuccessResponseEnvelopeSchema = ResponseIdentitySchema.extend({
49
+ data: z.unknown(),
50
+ });
51
+ export const ErrorClassSchema = z.enum([
52
+ 'validation',
53
+ 'authentication',
54
+ 'authorization',
55
+ 'conflict',
56
+ 'stale_reference',
57
+ 'capability_mismatch',
58
+ 'runtime_unavailable',
59
+ 'internal',
60
+ ]);
61
+ export const NormalizedErrorSchema = z.object({
62
+ class: ErrorClassSchema,
63
+ code: z
64
+ .string()
65
+ .min(1)
66
+ .max(96)
67
+ .regex(/^[A-Z][A-Z0-9_]*$/),
68
+ message: z.string().min(1).max(512),
69
+ retryable: z.boolean(),
70
+ source: z.enum([
71
+ 'client',
72
+ 'auth',
73
+ 'policy',
74
+ 'runtime',
75
+ 'provider',
76
+ 'persistence',
77
+ 'workflow',
78
+ 'system',
79
+ ]),
80
+ remediation: z.string().min(1).max(256).optional(),
81
+ details: z
82
+ .record(z.string().max(64), z.unknown())
83
+ .refine((details) => Object.keys(details).length <= 32)
84
+ .optional(),
85
+ });
86
+ export const ErrorResponseEnvelopeSchema = ResponseIdentitySchema.extend({
87
+ error: NormalizedErrorSchema,
88
+ });
89
+ export const ResponseEnvelopeSchema = z.union([
90
+ SuccessResponseEnvelopeSchema,
91
+ ErrorResponseEnvelopeSchema,
92
+ ]);
93
+ export const EventEnvelopeSchema = z.object({
94
+ contractVersion: ContractVersionSchema,
95
+ eventId: IdentifierSchemas.eventId,
96
+ eventType: OperationSchema,
97
+ occurredAt: TimestampSchema,
98
+ workspaceId: IdentifierSchemas.workspaceId,
99
+ projectId: IdentifierSchemas.projectId.optional(),
100
+ correlation: CorrelationMetadataSchema,
101
+ data: z.unknown(),
102
+ });
103
+ export const AgentHqExecutionEventEnvelopeSchema = z.object({
104
+ contractVersion: ContractVersionSchema,
105
+ eventId: IdentifierSchemas.eventId,
106
+ eventType: z
107
+ .string()
108
+ .regex(/^(?:execution|attempt|interaction|usage|artifact|reconciliation)\.[a-z][a-z0-9_-]*$/),
109
+ executionId: IdentifierSchemas.executionId,
110
+ attemptId: IdentifierSchemas.attemptId.optional(),
111
+ workflowId: IdentifierSchemas.workflowId.optional(),
112
+ workspaceId: IdentifierSchemas.workspaceId,
113
+ projectId: IdentifierSchemas.projectId,
114
+ taskId: IdentifierSchemas.taskId,
115
+ agentId: IdentifierSchemas.agentId,
116
+ sequence: z.number().int().positive(),
117
+ schemaVersion: z.number().int().positive(),
118
+ payloadHash: Sha256Schema,
119
+ occurredAt: TimestampSchema,
120
+ recordedAt: TimestampSchema,
121
+ correlation: z.object({
122
+ requestId: IdentifierSchemas.requestId,
123
+ commandId: IdentifierSchemas.commandId.optional(),
124
+ traceId: IdentifierSchemas.traceId,
125
+ }),
126
+ data: z.record(z.string(), z.json()),
127
+ });
128
+ export const UsageEnvelopeSchema = z.object({
129
+ contractVersion: ContractVersionSchema,
130
+ requestId: IdentifierSchemas.requestId,
131
+ workspaceId: IdentifierSchemas.workspaceId,
132
+ executionId: IdentifierSchemas.executionId.optional(),
133
+ recordedAt: TimestampSchema,
134
+ correlation: CorrelationMetadataSchema,
135
+ usage: z.object({
136
+ inputTokens: z.number().int().nonnegative(),
137
+ outputTokens: z.number().int().nonnegative(),
138
+ durationMs: z.number().int().nonnegative(),
139
+ cost: z
140
+ .object({
141
+ amount: z.string().regex(/^\d+(?:\.\d+)?$/),
142
+ currency: z.string().regex(/^[A-Z]{3}$/),
143
+ })
144
+ .optional(),
145
+ }),
146
+ });
147
+ export const ArtifactReferenceSchema = z.object({
148
+ contractVersion: ContractVersionSchema,
149
+ artifactId: IdentifierSchemas.artifactId,
150
+ version: z.number().int().positive(),
151
+ mediaType: z.string().min(1).max(128),
152
+ digest: z.string().regex(/^sha256:[a-f0-9]{64}$/),
153
+ sizeBytes: z.number().int().nonnegative(),
154
+ locator: z.string().min(1).max(512),
155
+ });
156
+ export const RuntimeReadModelEnvelopeSchema = z.object({
157
+ contractVersion: ContractVersionSchema,
158
+ runtimeNodeRefId: IdentifierSchemas.runtimeNodeRefId,
159
+ runtimeConnectionId: IdentifierSchemas.runtimeConnectionId.optional(),
160
+ status: z.enum(['available', 'degraded', 'unavailable', 'revoked']),
161
+ observedAt: TimestampSchema,
162
+ readModel: z.record(z.string(), z.unknown()),
163
+ });
164
+ //# sourceMappingURL=envelopes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envelopes.js","sourceRoot":"","sources":["../src/envelopes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAEvD,MAAM,eAAe,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAA;AACxC,MAAM,eAAe,GAAG,CAAC;KACtB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,GAAG,CAAC;KACR,KAAK,CAAC,qEAAqE,CAAC,CAAA;AAC/E,MAAM,oBAAoB,GAAG,CAAC;KAC3B,MAAM,EAAE;KACR,GAAG,CAAC,EAAE,CAAC;KACP,GAAG,CAAC,GAAG,CAAC;KACR,KAAK,CAAC,oBAAoB,CAAC,CAAA;AAC9B,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAA;AAEvD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,OAAO,EAAE,iBAAiB,CAAC,OAAO;IAClC,kBAAkB,EAAE,iBAAiB,CAAC,SAAS,CAAC,QAAQ,EAAE;IAC1D,aAAa,EAAE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AC,GAAG,CAAC;IACrC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC;IACjD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;IACzC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CACpC,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,eAAe,EAAE,qBAAqB;IACtC,gBAAgB,EAAE,iBAAiB,CAAC,gBAAgB;IACpD,mBAAmB,EAAE,iBAAiB,CAAC,mBAAmB,CAAC,QAAQ,EAAE;IACrE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;IACnE,UAAU,EAAE,eAAe;IAC3B,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;CAC7C,CAAC,CAAA"}
@@ -0,0 +1,142 @@
1
+ export declare const PublicContractFixtures: Readonly<{
2
+ command: {
3
+ caller: {
4
+ servicePrincipalId: string;
5
+ };
6
+ contractVersion: {
7
+ readonly major: 3;
8
+ readonly minor: 0;
9
+ };
10
+ requestId: string;
11
+ commandId: string;
12
+ idempotencyKey: string;
13
+ workspaceId: string;
14
+ projectId: string;
15
+ payloadHash: string;
16
+ correlation: {
17
+ traceId: string;
18
+ };
19
+ operation: string;
20
+ issuedAt: string;
21
+ payload: {
22
+ objective: string;
23
+ };
24
+ };
25
+ request: {
26
+ caller: {
27
+ servicePrincipalId: string;
28
+ };
29
+ contractVersion: {
30
+ readonly major: 3;
31
+ readonly minor: 0;
32
+ };
33
+ requestId: string;
34
+ workspaceId: string;
35
+ projectId: string;
36
+ correlation: {
37
+ traceId: string;
38
+ };
39
+ operation: string;
40
+ requestedAt: string;
41
+ parameters: {
42
+ status: string;
43
+ };
44
+ };
45
+ response: {
46
+ contractVersion: {
47
+ readonly major: 3;
48
+ readonly minor: 0;
49
+ };
50
+ requestId: string;
51
+ correlation: {
52
+ traceId: string;
53
+ };
54
+ data: {
55
+ accepted: boolean;
56
+ };
57
+ };
58
+ errorResponse: {
59
+ contractVersion: {
60
+ readonly major: 3;
61
+ readonly minor: 0;
62
+ };
63
+ requestId: string;
64
+ correlation: {
65
+ traceId: string;
66
+ };
67
+ error: {
68
+ class: string;
69
+ code: string;
70
+ message: string;
71
+ retryable: boolean;
72
+ source: string;
73
+ };
74
+ };
75
+ event: {
76
+ contractVersion: {
77
+ readonly major: 3;
78
+ readonly minor: 0;
79
+ };
80
+ eventId: string;
81
+ eventType: string;
82
+ occurredAt: string;
83
+ workspaceId: string;
84
+ projectId: string;
85
+ correlation: {
86
+ causationCommandId: string;
87
+ traceId: string;
88
+ };
89
+ data: {
90
+ executionId: string;
91
+ };
92
+ };
93
+ usage: {
94
+ contractVersion: {
95
+ readonly major: 3;
96
+ readonly minor: 0;
97
+ };
98
+ requestId: string;
99
+ workspaceId: string;
100
+ executionId: string;
101
+ recordedAt: string;
102
+ correlation: {
103
+ traceId: string;
104
+ };
105
+ usage: {
106
+ inputTokens: number;
107
+ outputTokens: number;
108
+ durationMs: number;
109
+ cost: {
110
+ amount: string;
111
+ currency: string;
112
+ };
113
+ };
114
+ };
115
+ artifact: {
116
+ contractVersion: {
117
+ readonly major: 3;
118
+ readonly minor: 0;
119
+ };
120
+ artifactId: string;
121
+ version: number;
122
+ mediaType: string;
123
+ digest: string;
124
+ sizeBytes: number;
125
+ locator: string;
126
+ };
127
+ runtime: {
128
+ contractVersion: {
129
+ readonly major: 3;
130
+ readonly minor: 0;
131
+ };
132
+ runtimeNodeRefId: string;
133
+ runtimeConnectionId: string;
134
+ status: string;
135
+ observedAt: string;
136
+ readModel: {
137
+ location: string;
138
+ healthy: boolean;
139
+ };
140
+ };
141
+ }>;
142
+ //# sourceMappingURL=fixtures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqFjC,CAAA"}