@casimesh/contracts 0.1.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/index.d.ts ADDED
@@ -0,0 +1,3807 @@
1
+ import { z } from 'zod';
2
+
3
+ /** `mesh` marks the organization's Mesh Agent — exactly one per organization (ADR-0003). */
4
+ declare const AgentKind: z.ZodEnum<{
5
+ standard: "standard";
6
+ mesh: "mesh";
7
+ }>;
8
+ type AgentKind = z.infer<typeof AgentKind>;
9
+ declare const AgentStatus: z.ZodEnum<{
10
+ error: "error";
11
+ created: "created";
12
+ starting: "starting";
13
+ running: "running";
14
+ stopped: "stopped";
15
+ }>;
16
+ type AgentStatus = z.infer<typeof AgentStatus>;
17
+ declare const Agent: z.ZodObject<{
18
+ version: z.ZodInt;
19
+ createdAt: z.ZodISODateTime;
20
+ updatedAt: z.ZodISODateTime;
21
+ id: z.ZodString;
22
+ organizationId: z.ZodString;
23
+ nodeId: z.ZodString;
24
+ name: z.ZodString;
25
+ kind: z.ZodEnum<{
26
+ standard: "standard";
27
+ mesh: "mesh";
28
+ }>;
29
+ status: z.ZodEnum<{
30
+ error: "error";
31
+ created: "created";
32
+ starting: "starting";
33
+ running: "running";
34
+ stopped: "stopped";
35
+ }>;
36
+ capabilities: z.ZodArray<z.ZodObject<{
37
+ name: z.ZodString;
38
+ version: z.ZodDefault<z.ZodString>;
39
+ description: z.ZodOptional<z.ZodString>;
40
+ }, z.core.$strip>>;
41
+ model: z.ZodNullable<z.ZodString>;
42
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
43
+ }, z.core.$strip>;
44
+ type Agent = z.infer<typeof Agent>;
45
+ declare const CreateAgentRequest: z.ZodObject<{
46
+ name: z.ZodString;
47
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodObject<{
48
+ name: z.ZodString;
49
+ version: z.ZodDefault<z.ZodString>;
50
+ description: z.ZodOptional<z.ZodString>;
51
+ }, z.core.$strip>>>;
52
+ model: z.ZodDefault<z.ZodNullable<z.ZodString>>;
53
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
54
+ }, z.core.$strip>;
55
+ /** Parsed request (defaults applied) — what use cases receive. */
56
+ type CreateAgentRequest = z.infer<typeof CreateAgentRequest>;
57
+ /** What callers may send — capabilities and model are optional. */
58
+ type CreateAgentRequestInput = z.input<typeof CreateAgentRequest>;
59
+ declare const UpdateAgentRequest: z.ZodObject<{
60
+ name: z.ZodOptional<z.ZodString>;
61
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodObject<{
62
+ name: z.ZodString;
63
+ version: z.ZodDefault<z.ZodString>;
64
+ description: z.ZodOptional<z.ZodString>;
65
+ }, z.core.$strip>>>;
66
+ model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
67
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
68
+ }, z.core.$strip>;
69
+ type UpdateAgentRequest = z.infer<typeof UpdateAgentRequest>;
70
+
71
+ declare const PrincipalKind: z.ZodEnum<{
72
+ user: "user";
73
+ service: "service";
74
+ }>;
75
+ type PrincipalKind = z.infer<typeof PrincipalKind>;
76
+ declare const Principal: z.ZodObject<{
77
+ id: z.ZodString;
78
+ kind: z.ZodEnum<{
79
+ user: "user";
80
+ service: "service";
81
+ }>;
82
+ name: z.ZodString;
83
+ publicKey: z.ZodNullable<z.ZodString>;
84
+ createdAt: z.ZodISODateTime;
85
+ }, z.core.$strip>;
86
+ type Principal = z.infer<typeof Principal>;
87
+ /** Ownership roles (ADR-0010). */
88
+ declare const Role: z.ZodEnum<{
89
+ node_owner: "node_owner";
90
+ org_owner: "org_owner";
91
+ }>;
92
+ type Role = z.infer<typeof Role>;
93
+ declare const RoleScope: z.ZodDiscriminatedUnion<[z.ZodObject<{
94
+ type: z.ZodLiteral<"node">;
95
+ nodeId: z.ZodString;
96
+ }, z.core.$strip>, z.ZodObject<{
97
+ type: z.ZodLiteral<"organization">;
98
+ organizationId: z.ZodString;
99
+ nodeId: z.ZodString;
100
+ }, z.core.$strip>], "type">;
101
+ type RoleScope = z.infer<typeof RoleScope>;
102
+ declare const RoleBinding: z.ZodObject<{
103
+ id: z.ZodString;
104
+ principalId: z.ZodString;
105
+ role: z.ZodEnum<{
106
+ node_owner: "node_owner";
107
+ org_owner: "org_owner";
108
+ }>;
109
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
110
+ type: z.ZodLiteral<"node">;
111
+ nodeId: z.ZodString;
112
+ }, z.core.$strip>, z.ZodObject<{
113
+ type: z.ZodLiteral<"organization">;
114
+ organizationId: z.ZodString;
115
+ nodeId: z.ZodString;
116
+ }, z.core.$strip>], "type">;
117
+ createdAt: z.ZodISODateTime;
118
+ }, z.core.$strip>;
119
+ type RoleBinding = z.infer<typeof RoleBinding>;
120
+ declare const GrantOwnerRequest: z.ZodObject<{
121
+ principalId: z.ZodString;
122
+ }, z.core.$strip>;
123
+ type GrantOwnerRequest = z.infer<typeof GrantOwnerRequest>;
124
+
125
+ /** Dotted, lowercase capability name, e.g. `vision` or `terrain.analysis` (deck slide 07). */
126
+ declare const CapabilityName: z.ZodString;
127
+ type CapabilityName = z.infer<typeof CapabilityName>;
128
+ declare const Capability: z.ZodObject<{
129
+ name: z.ZodString;
130
+ version: z.ZodDefault<z.ZodString>;
131
+ description: z.ZodOptional<z.ZodString>;
132
+ }, z.core.$strip>;
133
+ type Capability = z.infer<typeof Capability>;
134
+
135
+ /** ISO-8601 UTC timestamp with milliseconds, e.g. `2026-09-28T09:28:12.123Z`. */
136
+ declare const Timestamp: z.ZodISODateTime;
137
+ type Timestamp = z.infer<typeof Timestamp>;
138
+ /** Monotonic per-entity version used for replication and optimistic concurrency (ADR-0004). */
139
+ declare const Version: z.ZodInt;
140
+ type Version = z.infer<typeof Version>;
141
+ /** Human-readable display name. */
142
+ declare const DisplayName: z.ZodString;
143
+ /** URL-safe identifier, unique within its parent (e.g. an organization within a node). */
144
+ declare const Slug: z.ZodString;
145
+ type Slug = z.infer<typeof Slug>;
146
+ /** Free-form, JSON-serialisable metadata. */
147
+ declare const Metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
148
+ type Metadata = z.infer<typeof Metadata>;
149
+ /** Fields every replicated entity carries. */
150
+ declare const EntityAudit: {
151
+ version: z.ZodInt;
152
+ createdAt: z.ZodISODateTime;
153
+ updatedAt: z.ZodISODateTime;
154
+ };
155
+
156
+ declare const NodeCreated: z.ZodObject<{
157
+ type: z.ZodLiteral<"node.created">;
158
+ subject: z.ZodObject<{
159
+ kind: z.ZodLiteral<"node">;
160
+ id: z.ZodString;
161
+ version: z.ZodInt;
162
+ }, z.core.$strip>;
163
+ payload: z.ZodObject<{
164
+ node: z.ZodObject<{
165
+ version: z.ZodInt;
166
+ createdAt: z.ZodISODateTime;
167
+ updatedAt: z.ZodISODateTime;
168
+ id: z.ZodString;
169
+ name: z.ZodString;
170
+ publicKey: z.ZodString;
171
+ endpoint: z.ZodNullable<z.ZodURL>;
172
+ status: z.ZodEnum<{
173
+ online: "online";
174
+ degraded: "degraded";
175
+ offline: "offline";
176
+ }>;
177
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
178
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
179
+ }, z.core.$strip>;
180
+ }, z.core.$strip>;
181
+ }, z.core.$strip>;
182
+ declare const NodeUpdated: z.ZodObject<{
183
+ type: z.ZodLiteral<"node.updated">;
184
+ subject: z.ZodObject<{
185
+ kind: z.ZodLiteral<"node">;
186
+ id: z.ZodString;
187
+ version: z.ZodInt;
188
+ }, z.core.$strip>;
189
+ payload: z.ZodObject<{
190
+ node: z.ZodObject<{
191
+ version: z.ZodInt;
192
+ createdAt: z.ZodISODateTime;
193
+ updatedAt: z.ZodISODateTime;
194
+ id: z.ZodString;
195
+ name: z.ZodString;
196
+ publicKey: z.ZodString;
197
+ endpoint: z.ZodNullable<z.ZodURL>;
198
+ status: z.ZodEnum<{
199
+ online: "online";
200
+ degraded: "degraded";
201
+ offline: "offline";
202
+ }>;
203
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
204
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
205
+ }, z.core.$strip>;
206
+ }, z.core.$strip>;
207
+ }, z.core.$strip>;
208
+ declare const NodeRemoved: z.ZodObject<{
209
+ type: z.ZodLiteral<"node.removed">;
210
+ subject: z.ZodObject<{
211
+ kind: z.ZodLiteral<"node">;
212
+ id: z.ZodString;
213
+ version: z.ZodInt;
214
+ }, z.core.$strip>;
215
+ payload: z.ZodObject<{
216
+ nodeId: z.ZodString;
217
+ }, z.core.$strip>;
218
+ }, z.core.$strip>;
219
+ /** Derived locally by each node's presence detector; does not bump the owned entity version. */
220
+ declare const NodeStatusChanged: z.ZodObject<{
221
+ type: z.ZodLiteral<"node.status_changed">;
222
+ subject: z.ZodObject<{
223
+ kind: z.ZodLiteral<"node">;
224
+ id: z.ZodString;
225
+ version: z.ZodInt;
226
+ }, z.core.$strip>;
227
+ payload: z.ZodObject<{
228
+ nodeId: z.ZodString;
229
+ status: z.ZodEnum<{
230
+ online: "online";
231
+ degraded: "degraded";
232
+ offline: "offline";
233
+ }>;
234
+ previousStatus: z.ZodEnum<{
235
+ online: "online";
236
+ degraded: "degraded";
237
+ offline: "offline";
238
+ }>;
239
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
240
+ }, z.core.$strip>;
241
+ }, z.core.$strip>;
242
+ /** Mesh-only liveness signal; aggregated into `lastSeenAt`, never forwarded to UI clients. */
243
+ declare const NodeHeartbeat: z.ZodObject<{
244
+ type: z.ZodLiteral<"node.heartbeat">;
245
+ subject: z.ZodObject<{
246
+ kind: z.ZodLiteral<"node">;
247
+ id: z.ZodString;
248
+ version: z.ZodInt;
249
+ }, z.core.$strip>;
250
+ payload: z.ZodObject<{
251
+ nodeId: z.ZodString;
252
+ at: z.ZodISODateTime;
253
+ }, z.core.$strip>;
254
+ }, z.core.$strip>;
255
+ declare const OrganizationCreated: z.ZodObject<{
256
+ type: z.ZodLiteral<"organization.created">;
257
+ subject: z.ZodObject<{
258
+ kind: z.ZodLiteral<"organization">;
259
+ id: z.ZodString;
260
+ version: z.ZodInt;
261
+ }, z.core.$strip>;
262
+ payload: z.ZodObject<{
263
+ organization: z.ZodObject<{
264
+ version: z.ZodInt;
265
+ createdAt: z.ZodISODateTime;
266
+ updatedAt: z.ZodISODateTime;
267
+ id: z.ZodString;
268
+ nodeId: z.ZodString;
269
+ name: z.ZodString;
270
+ slug: z.ZodString;
271
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
272
+ }, z.core.$strip>;
273
+ }, z.core.$strip>;
274
+ }, z.core.$strip>;
275
+ declare const OrganizationUpdated: z.ZodObject<{
276
+ type: z.ZodLiteral<"organization.updated">;
277
+ subject: z.ZodObject<{
278
+ kind: z.ZodLiteral<"organization">;
279
+ id: z.ZodString;
280
+ version: z.ZodInt;
281
+ }, z.core.$strip>;
282
+ payload: z.ZodObject<{
283
+ organization: z.ZodObject<{
284
+ version: z.ZodInt;
285
+ createdAt: z.ZodISODateTime;
286
+ updatedAt: z.ZodISODateTime;
287
+ id: z.ZodString;
288
+ nodeId: z.ZodString;
289
+ name: z.ZodString;
290
+ slug: z.ZodString;
291
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
292
+ }, z.core.$strip>;
293
+ }, z.core.$strip>;
294
+ }, z.core.$strip>;
295
+ declare const OrganizationRemoved: z.ZodObject<{
296
+ type: z.ZodLiteral<"organization.removed">;
297
+ subject: z.ZodObject<{
298
+ kind: z.ZodLiteral<"organization">;
299
+ id: z.ZodString;
300
+ version: z.ZodInt;
301
+ }, z.core.$strip>;
302
+ payload: z.ZodObject<{
303
+ organizationId: z.ZodString;
304
+ nodeId: z.ZodString;
305
+ }, z.core.$strip>;
306
+ }, z.core.$strip>;
307
+ declare const AgentCreated: z.ZodObject<{
308
+ type: z.ZodLiteral<"agent.created">;
309
+ subject: z.ZodObject<{
310
+ kind: z.ZodLiteral<"agent">;
311
+ id: z.ZodString;
312
+ version: z.ZodInt;
313
+ }, z.core.$strip>;
314
+ payload: z.ZodObject<{
315
+ agent: z.ZodObject<{
316
+ version: z.ZodInt;
317
+ createdAt: z.ZodISODateTime;
318
+ updatedAt: z.ZodISODateTime;
319
+ id: z.ZodString;
320
+ organizationId: z.ZodString;
321
+ nodeId: z.ZodString;
322
+ name: z.ZodString;
323
+ kind: z.ZodEnum<{
324
+ standard: "standard";
325
+ mesh: "mesh";
326
+ }>;
327
+ status: z.ZodEnum<{
328
+ error: "error";
329
+ created: "created";
330
+ starting: "starting";
331
+ running: "running";
332
+ stopped: "stopped";
333
+ }>;
334
+ capabilities: z.ZodArray<z.ZodObject<{
335
+ name: z.ZodString;
336
+ version: z.ZodDefault<z.ZodString>;
337
+ description: z.ZodOptional<z.ZodString>;
338
+ }, z.core.$strip>>;
339
+ model: z.ZodNullable<z.ZodString>;
340
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
341
+ }, z.core.$strip>;
342
+ }, z.core.$strip>;
343
+ }, z.core.$strip>;
344
+ declare const AgentUpdated: z.ZodObject<{
345
+ type: z.ZodLiteral<"agent.updated">;
346
+ subject: z.ZodObject<{
347
+ kind: z.ZodLiteral<"agent">;
348
+ id: z.ZodString;
349
+ version: z.ZodInt;
350
+ }, z.core.$strip>;
351
+ payload: z.ZodObject<{
352
+ agent: z.ZodObject<{
353
+ version: z.ZodInt;
354
+ createdAt: z.ZodISODateTime;
355
+ updatedAt: z.ZodISODateTime;
356
+ id: z.ZodString;
357
+ organizationId: z.ZodString;
358
+ nodeId: z.ZodString;
359
+ name: z.ZodString;
360
+ kind: z.ZodEnum<{
361
+ standard: "standard";
362
+ mesh: "mesh";
363
+ }>;
364
+ status: z.ZodEnum<{
365
+ error: "error";
366
+ created: "created";
367
+ starting: "starting";
368
+ running: "running";
369
+ stopped: "stopped";
370
+ }>;
371
+ capabilities: z.ZodArray<z.ZodObject<{
372
+ name: z.ZodString;
373
+ version: z.ZodDefault<z.ZodString>;
374
+ description: z.ZodOptional<z.ZodString>;
375
+ }, z.core.$strip>>;
376
+ model: z.ZodNullable<z.ZodString>;
377
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
378
+ }, z.core.$strip>;
379
+ }, z.core.$strip>;
380
+ }, z.core.$strip>;
381
+ declare const AgentStatusChanged: z.ZodObject<{
382
+ type: z.ZodLiteral<"agent.status_changed">;
383
+ subject: z.ZodObject<{
384
+ kind: z.ZodLiteral<"agent">;
385
+ id: z.ZodString;
386
+ version: z.ZodInt;
387
+ }, z.core.$strip>;
388
+ payload: z.ZodObject<{
389
+ agent: z.ZodObject<{
390
+ version: z.ZodInt;
391
+ createdAt: z.ZodISODateTime;
392
+ updatedAt: z.ZodISODateTime;
393
+ id: z.ZodString;
394
+ organizationId: z.ZodString;
395
+ nodeId: z.ZodString;
396
+ name: z.ZodString;
397
+ kind: z.ZodEnum<{
398
+ standard: "standard";
399
+ mesh: "mesh";
400
+ }>;
401
+ status: z.ZodEnum<{
402
+ error: "error";
403
+ created: "created";
404
+ starting: "starting";
405
+ running: "running";
406
+ stopped: "stopped";
407
+ }>;
408
+ capabilities: z.ZodArray<z.ZodObject<{
409
+ name: z.ZodString;
410
+ version: z.ZodDefault<z.ZodString>;
411
+ description: z.ZodOptional<z.ZodString>;
412
+ }, z.core.$strip>>;
413
+ model: z.ZodNullable<z.ZodString>;
414
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
415
+ }, z.core.$strip>;
416
+ previousStatus: z.ZodEnum<{
417
+ error: "error";
418
+ created: "created";
419
+ starting: "starting";
420
+ running: "running";
421
+ stopped: "stopped";
422
+ }>;
423
+ }, z.core.$strip>;
424
+ }, z.core.$strip>;
425
+ declare const AgentRemoved: z.ZodObject<{
426
+ type: z.ZodLiteral<"agent.removed">;
427
+ subject: z.ZodObject<{
428
+ kind: z.ZodLiteral<"agent">;
429
+ id: z.ZodString;
430
+ version: z.ZodInt;
431
+ }, z.core.$strip>;
432
+ payload: z.ZodObject<{
433
+ agentId: z.ZodString;
434
+ organizationId: z.ZodString;
435
+ nodeId: z.ZodString;
436
+ }, z.core.$strip>;
437
+ }, z.core.$strip>;
438
+ declare const MeshAgentAgentRegistered: z.ZodObject<{
439
+ type: z.ZodLiteral<"mesh_agent.agent_registered">;
440
+ subject: z.ZodObject<{
441
+ kind: z.ZodLiteral<"agent">;
442
+ id: z.ZodString;
443
+ version: z.ZodInt;
444
+ }, z.core.$strip>;
445
+ payload: z.ZodObject<{
446
+ meshAgentId: z.ZodString;
447
+ agentId: z.ZodString;
448
+ organizationId: z.ZodString;
449
+ nodeId: z.ZodString;
450
+ }, z.core.$strip>;
451
+ }, z.core.$strip>;
452
+ declare const MeshAgentAgentDeregistered: z.ZodObject<{
453
+ type: z.ZodLiteral<"mesh_agent.agent_deregistered">;
454
+ subject: z.ZodObject<{
455
+ kind: z.ZodLiteral<"agent">;
456
+ id: z.ZodString;
457
+ version: z.ZodInt;
458
+ }, z.core.$strip>;
459
+ payload: z.ZodObject<{
460
+ meshAgentId: z.ZodString;
461
+ agentId: z.ZodString;
462
+ organizationId: z.ZodString;
463
+ nodeId: z.ZodString;
464
+ }, z.core.$strip>;
465
+ }, z.core.$strip>;
466
+ declare const LinkRequested: z.ZodObject<{
467
+ type: z.ZodLiteral<"link.requested">;
468
+ subject: z.ZodObject<{
469
+ kind: z.ZodLiteral<"link">;
470
+ id: z.ZodString;
471
+ version: z.ZodInt;
472
+ }, z.core.$strip>;
473
+ payload: z.ZodObject<{
474
+ link: z.ZodObject<{
475
+ version: z.ZodInt;
476
+ createdAt: z.ZodISODateTime;
477
+ updatedAt: z.ZodISODateTime;
478
+ id: z.ZodString;
479
+ aNodeId: z.ZodString;
480
+ bNodeId: z.ZodString;
481
+ transport: z.ZodEnum<{
482
+ memory: "memory";
483
+ "ws-peer": "ws-peer";
484
+ tcp: "tcp";
485
+ mqtt: "mqtt";
486
+ meshtastic: "meshtastic";
487
+ meshcore: "meshcore";
488
+ }>;
489
+ state: z.ZodEnum<{
490
+ requested: "requested";
491
+ up: "up";
492
+ down: "down";
493
+ }>;
494
+ quality: z.ZodObject<{
495
+ latencyMs: z.ZodOptional<z.ZodNumber>;
496
+ rssi: z.ZodOptional<z.ZodNumber>;
497
+ }, z.core.$strip>;
498
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
499
+ }, z.core.$strip>;
500
+ }, z.core.$strip>;
501
+ }, z.core.$strip>;
502
+ declare const LinkUp: z.ZodObject<{
503
+ type: z.ZodLiteral<"link.up">;
504
+ subject: z.ZodObject<{
505
+ kind: z.ZodLiteral<"link">;
506
+ id: z.ZodString;
507
+ version: z.ZodInt;
508
+ }, z.core.$strip>;
509
+ payload: z.ZodObject<{
510
+ link: z.ZodObject<{
511
+ version: z.ZodInt;
512
+ createdAt: z.ZodISODateTime;
513
+ updatedAt: z.ZodISODateTime;
514
+ id: z.ZodString;
515
+ aNodeId: z.ZodString;
516
+ bNodeId: z.ZodString;
517
+ transport: z.ZodEnum<{
518
+ memory: "memory";
519
+ "ws-peer": "ws-peer";
520
+ tcp: "tcp";
521
+ mqtt: "mqtt";
522
+ meshtastic: "meshtastic";
523
+ meshcore: "meshcore";
524
+ }>;
525
+ state: z.ZodEnum<{
526
+ requested: "requested";
527
+ up: "up";
528
+ down: "down";
529
+ }>;
530
+ quality: z.ZodObject<{
531
+ latencyMs: z.ZodOptional<z.ZodNumber>;
532
+ rssi: z.ZodOptional<z.ZodNumber>;
533
+ }, z.core.$strip>;
534
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
535
+ }, z.core.$strip>;
536
+ }, z.core.$strip>;
537
+ }, z.core.$strip>;
538
+ declare const LinkUpdated: z.ZodObject<{
539
+ type: z.ZodLiteral<"link.updated">;
540
+ subject: z.ZodObject<{
541
+ kind: z.ZodLiteral<"link">;
542
+ id: z.ZodString;
543
+ version: z.ZodInt;
544
+ }, z.core.$strip>;
545
+ payload: z.ZodObject<{
546
+ link: z.ZodObject<{
547
+ version: z.ZodInt;
548
+ createdAt: z.ZodISODateTime;
549
+ updatedAt: z.ZodISODateTime;
550
+ id: z.ZodString;
551
+ aNodeId: z.ZodString;
552
+ bNodeId: z.ZodString;
553
+ transport: z.ZodEnum<{
554
+ memory: "memory";
555
+ "ws-peer": "ws-peer";
556
+ tcp: "tcp";
557
+ mqtt: "mqtt";
558
+ meshtastic: "meshtastic";
559
+ meshcore: "meshcore";
560
+ }>;
561
+ state: z.ZodEnum<{
562
+ requested: "requested";
563
+ up: "up";
564
+ down: "down";
565
+ }>;
566
+ quality: z.ZodObject<{
567
+ latencyMs: z.ZodOptional<z.ZodNumber>;
568
+ rssi: z.ZodOptional<z.ZodNumber>;
569
+ }, z.core.$strip>;
570
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
571
+ }, z.core.$strip>;
572
+ }, z.core.$strip>;
573
+ }, z.core.$strip>;
574
+ declare const LinkDown: z.ZodObject<{
575
+ type: z.ZodLiteral<"link.down">;
576
+ subject: z.ZodObject<{
577
+ kind: z.ZodLiteral<"link">;
578
+ id: z.ZodString;
579
+ version: z.ZodInt;
580
+ }, z.core.$strip>;
581
+ payload: z.ZodObject<{
582
+ link: z.ZodObject<{
583
+ version: z.ZodInt;
584
+ createdAt: z.ZodISODateTime;
585
+ updatedAt: z.ZodISODateTime;
586
+ id: z.ZodString;
587
+ aNodeId: z.ZodString;
588
+ bNodeId: z.ZodString;
589
+ transport: z.ZodEnum<{
590
+ memory: "memory";
591
+ "ws-peer": "ws-peer";
592
+ tcp: "tcp";
593
+ mqtt: "mqtt";
594
+ meshtastic: "meshtastic";
595
+ meshcore: "meshcore";
596
+ }>;
597
+ state: z.ZodEnum<{
598
+ requested: "requested";
599
+ up: "up";
600
+ down: "down";
601
+ }>;
602
+ quality: z.ZodObject<{
603
+ latencyMs: z.ZodOptional<z.ZodNumber>;
604
+ rssi: z.ZodOptional<z.ZodNumber>;
605
+ }, z.core.$strip>;
606
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
607
+ }, z.core.$strip>;
608
+ }, z.core.$strip>;
609
+ }, z.core.$strip>;
610
+ declare const LinkRemoved: z.ZodObject<{
611
+ type: z.ZodLiteral<"link.removed">;
612
+ subject: z.ZodObject<{
613
+ kind: z.ZodLiteral<"link">;
614
+ id: z.ZodString;
615
+ version: z.ZodInt;
616
+ }, z.core.$strip>;
617
+ payload: z.ZodObject<{
618
+ linkId: z.ZodString;
619
+ }, z.core.$strip>;
620
+ }, z.core.$strip>;
621
+ declare const RoleGranted: z.ZodObject<{
622
+ type: z.ZodLiteral<"role.granted">;
623
+ subject: z.ZodObject<{
624
+ kind: z.ZodLiteral<"roleBinding">;
625
+ id: z.ZodString;
626
+ version: z.ZodInt;
627
+ }, z.core.$strip>;
628
+ payload: z.ZodObject<{
629
+ binding: z.ZodObject<{
630
+ id: z.ZodString;
631
+ principalId: z.ZodString;
632
+ role: z.ZodEnum<{
633
+ node_owner: "node_owner";
634
+ org_owner: "org_owner";
635
+ }>;
636
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
637
+ type: z.ZodLiteral<"node">;
638
+ nodeId: z.ZodString;
639
+ }, z.core.$strip>, z.ZodObject<{
640
+ type: z.ZodLiteral<"organization">;
641
+ organizationId: z.ZodString;
642
+ nodeId: z.ZodString;
643
+ }, z.core.$strip>], "type">;
644
+ createdAt: z.ZodISODateTime;
645
+ }, z.core.$strip>;
646
+ }, z.core.$strip>;
647
+ }, z.core.$strip>;
648
+ declare const RoleRevoked: z.ZodObject<{
649
+ type: z.ZodLiteral<"role.revoked">;
650
+ subject: z.ZodObject<{
651
+ kind: z.ZodLiteral<"roleBinding">;
652
+ id: z.ZodString;
653
+ version: z.ZodInt;
654
+ }, z.core.$strip>;
655
+ payload: z.ZodObject<{
656
+ binding: z.ZodObject<{
657
+ id: z.ZodString;
658
+ principalId: z.ZodString;
659
+ role: z.ZodEnum<{
660
+ node_owner: "node_owner";
661
+ org_owner: "org_owner";
662
+ }>;
663
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
664
+ type: z.ZodLiteral<"node">;
665
+ nodeId: z.ZodString;
666
+ }, z.core.$strip>, z.ZodObject<{
667
+ type: z.ZodLiteral<"organization">;
668
+ organizationId: z.ZodString;
669
+ nodeId: z.ZodString;
670
+ }, z.core.$strip>], "type">;
671
+ createdAt: z.ZodISODateTime;
672
+ }, z.core.$strip>;
673
+ }, z.core.$strip>;
674
+ }, z.core.$strip>;
675
+ /** Committed by the requester's node; the task's later events come from the assignee's node only (ADR-0020). */
676
+ declare const TaskRequested: z.ZodObject<{
677
+ type: z.ZodLiteral<"task.requested">;
678
+ subject: z.ZodObject<{
679
+ kind: z.ZodLiteral<"task">;
680
+ id: z.ZodString;
681
+ version: z.ZodInt;
682
+ }, z.core.$strip>;
683
+ payload: z.ZodObject<{
684
+ task: z.ZodObject<{
685
+ id: z.ZodString;
686
+ capability: z.ZodString;
687
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
688
+ status: z.ZodEnum<{
689
+ requested: "requested";
690
+ accepted: "accepted";
691
+ completed: "completed";
692
+ failed: "failed";
693
+ }>;
694
+ requester: z.ZodObject<{
695
+ agentId: z.ZodString;
696
+ organizationId: z.ZodString;
697
+ nodeId: z.ZodString;
698
+ }, z.core.$strip>;
699
+ requesterMeshAgentId: z.ZodString;
700
+ assignee: z.ZodObject<{
701
+ organizationId: z.ZodString;
702
+ nodeId: z.ZodString;
703
+ meshAgentId: z.ZodString;
704
+ }, z.core.$strip>;
705
+ provider: z.ZodNullable<z.ZodObject<{
706
+ agentId: z.ZodString;
707
+ organizationId: z.ZodString;
708
+ nodeId: z.ZodString;
709
+ }, z.core.$strip>>;
710
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
711
+ error: z.ZodNullable<z.ZodObject<{
712
+ code: z.ZodString;
713
+ message: z.ZodString;
714
+ }, z.core.$strip>>;
715
+ steps: z.ZodArray<z.ZodObject<{
716
+ name: z.ZodEnum<{
717
+ observe: "observe";
718
+ reason: "reason";
719
+ act: "act";
720
+ verify: "verify";
721
+ }>;
722
+ at: z.ZodISODateTime;
723
+ summary: z.ZodString;
724
+ }, z.core.$strip>>;
725
+ model: z.ZodNullable<z.ZodString>;
726
+ version: z.ZodInt;
727
+ createdAt: z.ZodISODateTime;
728
+ updatedAt: z.ZodISODateTime;
729
+ }, z.core.$strip>;
730
+ }, z.core.$strip>;
731
+ }, z.core.$strip>;
732
+ declare const TaskAccepted: z.ZodObject<{
733
+ type: z.ZodLiteral<"task.accepted">;
734
+ subject: z.ZodObject<{
735
+ kind: z.ZodLiteral<"task">;
736
+ id: z.ZodString;
737
+ version: z.ZodInt;
738
+ }, z.core.$strip>;
739
+ payload: z.ZodObject<{
740
+ task: z.ZodObject<{
741
+ id: z.ZodString;
742
+ capability: z.ZodString;
743
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
744
+ status: z.ZodEnum<{
745
+ requested: "requested";
746
+ accepted: "accepted";
747
+ completed: "completed";
748
+ failed: "failed";
749
+ }>;
750
+ requester: z.ZodObject<{
751
+ agentId: z.ZodString;
752
+ organizationId: z.ZodString;
753
+ nodeId: z.ZodString;
754
+ }, z.core.$strip>;
755
+ requesterMeshAgentId: z.ZodString;
756
+ assignee: z.ZodObject<{
757
+ organizationId: z.ZodString;
758
+ nodeId: z.ZodString;
759
+ meshAgentId: z.ZodString;
760
+ }, z.core.$strip>;
761
+ provider: z.ZodNullable<z.ZodObject<{
762
+ agentId: z.ZodString;
763
+ organizationId: z.ZodString;
764
+ nodeId: z.ZodString;
765
+ }, z.core.$strip>>;
766
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
767
+ error: z.ZodNullable<z.ZodObject<{
768
+ code: z.ZodString;
769
+ message: z.ZodString;
770
+ }, z.core.$strip>>;
771
+ steps: z.ZodArray<z.ZodObject<{
772
+ name: z.ZodEnum<{
773
+ observe: "observe";
774
+ reason: "reason";
775
+ act: "act";
776
+ verify: "verify";
777
+ }>;
778
+ at: z.ZodISODateTime;
779
+ summary: z.ZodString;
780
+ }, z.core.$strip>>;
781
+ model: z.ZodNullable<z.ZodString>;
782
+ version: z.ZodInt;
783
+ createdAt: z.ZodISODateTime;
784
+ updatedAt: z.ZodISODateTime;
785
+ }, z.core.$strip>;
786
+ }, z.core.$strip>;
787
+ }, z.core.$strip>;
788
+ declare const TaskCompleted: z.ZodObject<{
789
+ type: z.ZodLiteral<"task.completed">;
790
+ subject: z.ZodObject<{
791
+ kind: z.ZodLiteral<"task">;
792
+ id: z.ZodString;
793
+ version: z.ZodInt;
794
+ }, z.core.$strip>;
795
+ payload: z.ZodObject<{
796
+ task: z.ZodObject<{
797
+ id: z.ZodString;
798
+ capability: z.ZodString;
799
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
800
+ status: z.ZodEnum<{
801
+ requested: "requested";
802
+ accepted: "accepted";
803
+ completed: "completed";
804
+ failed: "failed";
805
+ }>;
806
+ requester: z.ZodObject<{
807
+ agentId: z.ZodString;
808
+ organizationId: z.ZodString;
809
+ nodeId: z.ZodString;
810
+ }, z.core.$strip>;
811
+ requesterMeshAgentId: z.ZodString;
812
+ assignee: z.ZodObject<{
813
+ organizationId: z.ZodString;
814
+ nodeId: z.ZodString;
815
+ meshAgentId: z.ZodString;
816
+ }, z.core.$strip>;
817
+ provider: z.ZodNullable<z.ZodObject<{
818
+ agentId: z.ZodString;
819
+ organizationId: z.ZodString;
820
+ nodeId: z.ZodString;
821
+ }, z.core.$strip>>;
822
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
823
+ error: z.ZodNullable<z.ZodObject<{
824
+ code: z.ZodString;
825
+ message: z.ZodString;
826
+ }, z.core.$strip>>;
827
+ steps: z.ZodArray<z.ZodObject<{
828
+ name: z.ZodEnum<{
829
+ observe: "observe";
830
+ reason: "reason";
831
+ act: "act";
832
+ verify: "verify";
833
+ }>;
834
+ at: z.ZodISODateTime;
835
+ summary: z.ZodString;
836
+ }, z.core.$strip>>;
837
+ model: z.ZodNullable<z.ZodString>;
838
+ version: z.ZodInt;
839
+ createdAt: z.ZodISODateTime;
840
+ updatedAt: z.ZodISODateTime;
841
+ }, z.core.$strip>;
842
+ }, z.core.$strip>;
843
+ }, z.core.$strip>;
844
+ declare const TaskFailed: z.ZodObject<{
845
+ type: z.ZodLiteral<"task.failed">;
846
+ subject: z.ZodObject<{
847
+ kind: z.ZodLiteral<"task">;
848
+ id: z.ZodString;
849
+ version: z.ZodInt;
850
+ }, z.core.$strip>;
851
+ payload: z.ZodObject<{
852
+ task: z.ZodObject<{
853
+ id: z.ZodString;
854
+ capability: z.ZodString;
855
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
856
+ status: z.ZodEnum<{
857
+ requested: "requested";
858
+ accepted: "accepted";
859
+ completed: "completed";
860
+ failed: "failed";
861
+ }>;
862
+ requester: z.ZodObject<{
863
+ agentId: z.ZodString;
864
+ organizationId: z.ZodString;
865
+ nodeId: z.ZodString;
866
+ }, z.core.$strip>;
867
+ requesterMeshAgentId: z.ZodString;
868
+ assignee: z.ZodObject<{
869
+ organizationId: z.ZodString;
870
+ nodeId: z.ZodString;
871
+ meshAgentId: z.ZodString;
872
+ }, z.core.$strip>;
873
+ provider: z.ZodNullable<z.ZodObject<{
874
+ agentId: z.ZodString;
875
+ organizationId: z.ZodString;
876
+ nodeId: z.ZodString;
877
+ }, z.core.$strip>>;
878
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
879
+ error: z.ZodNullable<z.ZodObject<{
880
+ code: z.ZodString;
881
+ message: z.ZodString;
882
+ }, z.core.$strip>>;
883
+ steps: z.ZodArray<z.ZodObject<{
884
+ name: z.ZodEnum<{
885
+ observe: "observe";
886
+ reason: "reason";
887
+ act: "act";
888
+ verify: "verify";
889
+ }>;
890
+ at: z.ZodISODateTime;
891
+ summary: z.ZodString;
892
+ }, z.core.$strip>>;
893
+ model: z.ZodNullable<z.ZodString>;
894
+ version: z.ZodInt;
895
+ createdAt: z.ZodISODateTime;
896
+ updatedAt: z.ZodISODateTime;
897
+ }, z.core.$strip>;
898
+ }, z.core.$strip>;
899
+ }, z.core.$strip>;
900
+ declare const DomainEvent: z.ZodDiscriminatedUnion<[z.ZodObject<{
901
+ type: z.ZodLiteral<"node.created">;
902
+ subject: z.ZodObject<{
903
+ kind: z.ZodLiteral<"node">;
904
+ id: z.ZodString;
905
+ version: z.ZodInt;
906
+ }, z.core.$strip>;
907
+ payload: z.ZodObject<{
908
+ node: z.ZodObject<{
909
+ version: z.ZodInt;
910
+ createdAt: z.ZodISODateTime;
911
+ updatedAt: z.ZodISODateTime;
912
+ id: z.ZodString;
913
+ name: z.ZodString;
914
+ publicKey: z.ZodString;
915
+ endpoint: z.ZodNullable<z.ZodURL>;
916
+ status: z.ZodEnum<{
917
+ online: "online";
918
+ degraded: "degraded";
919
+ offline: "offline";
920
+ }>;
921
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
922
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
923
+ }, z.core.$strip>;
924
+ }, z.core.$strip>;
925
+ }, z.core.$strip>, z.ZodObject<{
926
+ type: z.ZodLiteral<"node.updated">;
927
+ subject: z.ZodObject<{
928
+ kind: z.ZodLiteral<"node">;
929
+ id: z.ZodString;
930
+ version: z.ZodInt;
931
+ }, z.core.$strip>;
932
+ payload: z.ZodObject<{
933
+ node: z.ZodObject<{
934
+ version: z.ZodInt;
935
+ createdAt: z.ZodISODateTime;
936
+ updatedAt: z.ZodISODateTime;
937
+ id: z.ZodString;
938
+ name: z.ZodString;
939
+ publicKey: z.ZodString;
940
+ endpoint: z.ZodNullable<z.ZodURL>;
941
+ status: z.ZodEnum<{
942
+ online: "online";
943
+ degraded: "degraded";
944
+ offline: "offline";
945
+ }>;
946
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
947
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
948
+ }, z.core.$strip>;
949
+ }, z.core.$strip>;
950
+ }, z.core.$strip>, z.ZodObject<{
951
+ type: z.ZodLiteral<"node.removed">;
952
+ subject: z.ZodObject<{
953
+ kind: z.ZodLiteral<"node">;
954
+ id: z.ZodString;
955
+ version: z.ZodInt;
956
+ }, z.core.$strip>;
957
+ payload: z.ZodObject<{
958
+ nodeId: z.ZodString;
959
+ }, z.core.$strip>;
960
+ }, z.core.$strip>, z.ZodObject<{
961
+ type: z.ZodLiteral<"node.status_changed">;
962
+ subject: z.ZodObject<{
963
+ kind: z.ZodLiteral<"node">;
964
+ id: z.ZodString;
965
+ version: z.ZodInt;
966
+ }, z.core.$strip>;
967
+ payload: z.ZodObject<{
968
+ nodeId: z.ZodString;
969
+ status: z.ZodEnum<{
970
+ online: "online";
971
+ degraded: "degraded";
972
+ offline: "offline";
973
+ }>;
974
+ previousStatus: z.ZodEnum<{
975
+ online: "online";
976
+ degraded: "degraded";
977
+ offline: "offline";
978
+ }>;
979
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
980
+ }, z.core.$strip>;
981
+ }, z.core.$strip>, z.ZodObject<{
982
+ type: z.ZodLiteral<"node.heartbeat">;
983
+ subject: z.ZodObject<{
984
+ kind: z.ZodLiteral<"node">;
985
+ id: z.ZodString;
986
+ version: z.ZodInt;
987
+ }, z.core.$strip>;
988
+ payload: z.ZodObject<{
989
+ nodeId: z.ZodString;
990
+ at: z.ZodISODateTime;
991
+ }, z.core.$strip>;
992
+ }, z.core.$strip>, z.ZodObject<{
993
+ type: z.ZodLiteral<"organization.created">;
994
+ subject: z.ZodObject<{
995
+ kind: z.ZodLiteral<"organization">;
996
+ id: z.ZodString;
997
+ version: z.ZodInt;
998
+ }, z.core.$strip>;
999
+ payload: z.ZodObject<{
1000
+ organization: z.ZodObject<{
1001
+ version: z.ZodInt;
1002
+ createdAt: z.ZodISODateTime;
1003
+ updatedAt: z.ZodISODateTime;
1004
+ id: z.ZodString;
1005
+ nodeId: z.ZodString;
1006
+ name: z.ZodString;
1007
+ slug: z.ZodString;
1008
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1009
+ }, z.core.$strip>;
1010
+ }, z.core.$strip>;
1011
+ }, z.core.$strip>, z.ZodObject<{
1012
+ type: z.ZodLiteral<"organization.updated">;
1013
+ subject: z.ZodObject<{
1014
+ kind: z.ZodLiteral<"organization">;
1015
+ id: z.ZodString;
1016
+ version: z.ZodInt;
1017
+ }, z.core.$strip>;
1018
+ payload: z.ZodObject<{
1019
+ organization: z.ZodObject<{
1020
+ version: z.ZodInt;
1021
+ createdAt: z.ZodISODateTime;
1022
+ updatedAt: z.ZodISODateTime;
1023
+ id: z.ZodString;
1024
+ nodeId: z.ZodString;
1025
+ name: z.ZodString;
1026
+ slug: z.ZodString;
1027
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1028
+ }, z.core.$strip>;
1029
+ }, z.core.$strip>;
1030
+ }, z.core.$strip>, z.ZodObject<{
1031
+ type: z.ZodLiteral<"organization.removed">;
1032
+ subject: z.ZodObject<{
1033
+ kind: z.ZodLiteral<"organization">;
1034
+ id: z.ZodString;
1035
+ version: z.ZodInt;
1036
+ }, z.core.$strip>;
1037
+ payload: z.ZodObject<{
1038
+ organizationId: z.ZodString;
1039
+ nodeId: z.ZodString;
1040
+ }, z.core.$strip>;
1041
+ }, z.core.$strip>, z.ZodObject<{
1042
+ type: z.ZodLiteral<"agent.created">;
1043
+ subject: z.ZodObject<{
1044
+ kind: z.ZodLiteral<"agent">;
1045
+ id: z.ZodString;
1046
+ version: z.ZodInt;
1047
+ }, z.core.$strip>;
1048
+ payload: z.ZodObject<{
1049
+ agent: z.ZodObject<{
1050
+ version: z.ZodInt;
1051
+ createdAt: z.ZodISODateTime;
1052
+ updatedAt: z.ZodISODateTime;
1053
+ id: z.ZodString;
1054
+ organizationId: z.ZodString;
1055
+ nodeId: z.ZodString;
1056
+ name: z.ZodString;
1057
+ kind: z.ZodEnum<{
1058
+ standard: "standard";
1059
+ mesh: "mesh";
1060
+ }>;
1061
+ status: z.ZodEnum<{
1062
+ error: "error";
1063
+ created: "created";
1064
+ starting: "starting";
1065
+ running: "running";
1066
+ stopped: "stopped";
1067
+ }>;
1068
+ capabilities: z.ZodArray<z.ZodObject<{
1069
+ name: z.ZodString;
1070
+ version: z.ZodDefault<z.ZodString>;
1071
+ description: z.ZodOptional<z.ZodString>;
1072
+ }, z.core.$strip>>;
1073
+ model: z.ZodNullable<z.ZodString>;
1074
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1075
+ }, z.core.$strip>;
1076
+ }, z.core.$strip>;
1077
+ }, z.core.$strip>, z.ZodObject<{
1078
+ type: z.ZodLiteral<"agent.updated">;
1079
+ subject: z.ZodObject<{
1080
+ kind: z.ZodLiteral<"agent">;
1081
+ id: z.ZodString;
1082
+ version: z.ZodInt;
1083
+ }, z.core.$strip>;
1084
+ payload: z.ZodObject<{
1085
+ agent: z.ZodObject<{
1086
+ version: z.ZodInt;
1087
+ createdAt: z.ZodISODateTime;
1088
+ updatedAt: z.ZodISODateTime;
1089
+ id: z.ZodString;
1090
+ organizationId: z.ZodString;
1091
+ nodeId: z.ZodString;
1092
+ name: z.ZodString;
1093
+ kind: z.ZodEnum<{
1094
+ standard: "standard";
1095
+ mesh: "mesh";
1096
+ }>;
1097
+ status: z.ZodEnum<{
1098
+ error: "error";
1099
+ created: "created";
1100
+ starting: "starting";
1101
+ running: "running";
1102
+ stopped: "stopped";
1103
+ }>;
1104
+ capabilities: z.ZodArray<z.ZodObject<{
1105
+ name: z.ZodString;
1106
+ version: z.ZodDefault<z.ZodString>;
1107
+ description: z.ZodOptional<z.ZodString>;
1108
+ }, z.core.$strip>>;
1109
+ model: z.ZodNullable<z.ZodString>;
1110
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1111
+ }, z.core.$strip>;
1112
+ }, z.core.$strip>;
1113
+ }, z.core.$strip>, z.ZodObject<{
1114
+ type: z.ZodLiteral<"agent.status_changed">;
1115
+ subject: z.ZodObject<{
1116
+ kind: z.ZodLiteral<"agent">;
1117
+ id: z.ZodString;
1118
+ version: z.ZodInt;
1119
+ }, z.core.$strip>;
1120
+ payload: z.ZodObject<{
1121
+ agent: z.ZodObject<{
1122
+ version: z.ZodInt;
1123
+ createdAt: z.ZodISODateTime;
1124
+ updatedAt: z.ZodISODateTime;
1125
+ id: z.ZodString;
1126
+ organizationId: z.ZodString;
1127
+ nodeId: z.ZodString;
1128
+ name: z.ZodString;
1129
+ kind: z.ZodEnum<{
1130
+ standard: "standard";
1131
+ mesh: "mesh";
1132
+ }>;
1133
+ status: z.ZodEnum<{
1134
+ error: "error";
1135
+ created: "created";
1136
+ starting: "starting";
1137
+ running: "running";
1138
+ stopped: "stopped";
1139
+ }>;
1140
+ capabilities: z.ZodArray<z.ZodObject<{
1141
+ name: z.ZodString;
1142
+ version: z.ZodDefault<z.ZodString>;
1143
+ description: z.ZodOptional<z.ZodString>;
1144
+ }, z.core.$strip>>;
1145
+ model: z.ZodNullable<z.ZodString>;
1146
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1147
+ }, z.core.$strip>;
1148
+ previousStatus: z.ZodEnum<{
1149
+ error: "error";
1150
+ created: "created";
1151
+ starting: "starting";
1152
+ running: "running";
1153
+ stopped: "stopped";
1154
+ }>;
1155
+ }, z.core.$strip>;
1156
+ }, z.core.$strip>, z.ZodObject<{
1157
+ type: z.ZodLiteral<"agent.removed">;
1158
+ subject: z.ZodObject<{
1159
+ kind: z.ZodLiteral<"agent">;
1160
+ id: z.ZodString;
1161
+ version: z.ZodInt;
1162
+ }, z.core.$strip>;
1163
+ payload: z.ZodObject<{
1164
+ agentId: z.ZodString;
1165
+ organizationId: z.ZodString;
1166
+ nodeId: z.ZodString;
1167
+ }, z.core.$strip>;
1168
+ }, z.core.$strip>, z.ZodObject<{
1169
+ type: z.ZodLiteral<"mesh_agent.agent_registered">;
1170
+ subject: z.ZodObject<{
1171
+ kind: z.ZodLiteral<"agent">;
1172
+ id: z.ZodString;
1173
+ version: z.ZodInt;
1174
+ }, z.core.$strip>;
1175
+ payload: z.ZodObject<{
1176
+ meshAgentId: z.ZodString;
1177
+ agentId: z.ZodString;
1178
+ organizationId: z.ZodString;
1179
+ nodeId: z.ZodString;
1180
+ }, z.core.$strip>;
1181
+ }, z.core.$strip>, z.ZodObject<{
1182
+ type: z.ZodLiteral<"mesh_agent.agent_deregistered">;
1183
+ subject: z.ZodObject<{
1184
+ kind: z.ZodLiteral<"agent">;
1185
+ id: z.ZodString;
1186
+ version: z.ZodInt;
1187
+ }, z.core.$strip>;
1188
+ payload: z.ZodObject<{
1189
+ meshAgentId: z.ZodString;
1190
+ agentId: z.ZodString;
1191
+ organizationId: z.ZodString;
1192
+ nodeId: z.ZodString;
1193
+ }, z.core.$strip>;
1194
+ }, z.core.$strip>, z.ZodObject<{
1195
+ type: z.ZodLiteral<"link.requested">;
1196
+ subject: z.ZodObject<{
1197
+ kind: z.ZodLiteral<"link">;
1198
+ id: z.ZodString;
1199
+ version: z.ZodInt;
1200
+ }, z.core.$strip>;
1201
+ payload: z.ZodObject<{
1202
+ link: z.ZodObject<{
1203
+ version: z.ZodInt;
1204
+ createdAt: z.ZodISODateTime;
1205
+ updatedAt: z.ZodISODateTime;
1206
+ id: z.ZodString;
1207
+ aNodeId: z.ZodString;
1208
+ bNodeId: z.ZodString;
1209
+ transport: z.ZodEnum<{
1210
+ memory: "memory";
1211
+ "ws-peer": "ws-peer";
1212
+ tcp: "tcp";
1213
+ mqtt: "mqtt";
1214
+ meshtastic: "meshtastic";
1215
+ meshcore: "meshcore";
1216
+ }>;
1217
+ state: z.ZodEnum<{
1218
+ requested: "requested";
1219
+ up: "up";
1220
+ down: "down";
1221
+ }>;
1222
+ quality: z.ZodObject<{
1223
+ latencyMs: z.ZodOptional<z.ZodNumber>;
1224
+ rssi: z.ZodOptional<z.ZodNumber>;
1225
+ }, z.core.$strip>;
1226
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
1227
+ }, z.core.$strip>;
1228
+ }, z.core.$strip>;
1229
+ }, z.core.$strip>, z.ZodObject<{
1230
+ type: z.ZodLiteral<"link.up">;
1231
+ subject: z.ZodObject<{
1232
+ kind: z.ZodLiteral<"link">;
1233
+ id: z.ZodString;
1234
+ version: z.ZodInt;
1235
+ }, z.core.$strip>;
1236
+ payload: z.ZodObject<{
1237
+ link: z.ZodObject<{
1238
+ version: z.ZodInt;
1239
+ createdAt: z.ZodISODateTime;
1240
+ updatedAt: z.ZodISODateTime;
1241
+ id: z.ZodString;
1242
+ aNodeId: z.ZodString;
1243
+ bNodeId: z.ZodString;
1244
+ transport: z.ZodEnum<{
1245
+ memory: "memory";
1246
+ "ws-peer": "ws-peer";
1247
+ tcp: "tcp";
1248
+ mqtt: "mqtt";
1249
+ meshtastic: "meshtastic";
1250
+ meshcore: "meshcore";
1251
+ }>;
1252
+ state: z.ZodEnum<{
1253
+ requested: "requested";
1254
+ up: "up";
1255
+ down: "down";
1256
+ }>;
1257
+ quality: z.ZodObject<{
1258
+ latencyMs: z.ZodOptional<z.ZodNumber>;
1259
+ rssi: z.ZodOptional<z.ZodNumber>;
1260
+ }, z.core.$strip>;
1261
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
1262
+ }, z.core.$strip>;
1263
+ }, z.core.$strip>;
1264
+ }, z.core.$strip>, z.ZodObject<{
1265
+ type: z.ZodLiteral<"link.updated">;
1266
+ subject: z.ZodObject<{
1267
+ kind: z.ZodLiteral<"link">;
1268
+ id: z.ZodString;
1269
+ version: z.ZodInt;
1270
+ }, z.core.$strip>;
1271
+ payload: z.ZodObject<{
1272
+ link: z.ZodObject<{
1273
+ version: z.ZodInt;
1274
+ createdAt: z.ZodISODateTime;
1275
+ updatedAt: z.ZodISODateTime;
1276
+ id: z.ZodString;
1277
+ aNodeId: z.ZodString;
1278
+ bNodeId: z.ZodString;
1279
+ transport: z.ZodEnum<{
1280
+ memory: "memory";
1281
+ "ws-peer": "ws-peer";
1282
+ tcp: "tcp";
1283
+ mqtt: "mqtt";
1284
+ meshtastic: "meshtastic";
1285
+ meshcore: "meshcore";
1286
+ }>;
1287
+ state: z.ZodEnum<{
1288
+ requested: "requested";
1289
+ up: "up";
1290
+ down: "down";
1291
+ }>;
1292
+ quality: z.ZodObject<{
1293
+ latencyMs: z.ZodOptional<z.ZodNumber>;
1294
+ rssi: z.ZodOptional<z.ZodNumber>;
1295
+ }, z.core.$strip>;
1296
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
1297
+ }, z.core.$strip>;
1298
+ }, z.core.$strip>;
1299
+ }, z.core.$strip>, z.ZodObject<{
1300
+ type: z.ZodLiteral<"link.down">;
1301
+ subject: z.ZodObject<{
1302
+ kind: z.ZodLiteral<"link">;
1303
+ id: z.ZodString;
1304
+ version: z.ZodInt;
1305
+ }, z.core.$strip>;
1306
+ payload: z.ZodObject<{
1307
+ link: z.ZodObject<{
1308
+ version: z.ZodInt;
1309
+ createdAt: z.ZodISODateTime;
1310
+ updatedAt: z.ZodISODateTime;
1311
+ id: z.ZodString;
1312
+ aNodeId: z.ZodString;
1313
+ bNodeId: z.ZodString;
1314
+ transport: z.ZodEnum<{
1315
+ memory: "memory";
1316
+ "ws-peer": "ws-peer";
1317
+ tcp: "tcp";
1318
+ mqtt: "mqtt";
1319
+ meshtastic: "meshtastic";
1320
+ meshcore: "meshcore";
1321
+ }>;
1322
+ state: z.ZodEnum<{
1323
+ requested: "requested";
1324
+ up: "up";
1325
+ down: "down";
1326
+ }>;
1327
+ quality: z.ZodObject<{
1328
+ latencyMs: z.ZodOptional<z.ZodNumber>;
1329
+ rssi: z.ZodOptional<z.ZodNumber>;
1330
+ }, z.core.$strip>;
1331
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
1332
+ }, z.core.$strip>;
1333
+ }, z.core.$strip>;
1334
+ }, z.core.$strip>, z.ZodObject<{
1335
+ type: z.ZodLiteral<"link.removed">;
1336
+ subject: z.ZodObject<{
1337
+ kind: z.ZodLiteral<"link">;
1338
+ id: z.ZodString;
1339
+ version: z.ZodInt;
1340
+ }, z.core.$strip>;
1341
+ payload: z.ZodObject<{
1342
+ linkId: z.ZodString;
1343
+ }, z.core.$strip>;
1344
+ }, z.core.$strip>, z.ZodObject<{
1345
+ type: z.ZodLiteral<"role.granted">;
1346
+ subject: z.ZodObject<{
1347
+ kind: z.ZodLiteral<"roleBinding">;
1348
+ id: z.ZodString;
1349
+ version: z.ZodInt;
1350
+ }, z.core.$strip>;
1351
+ payload: z.ZodObject<{
1352
+ binding: z.ZodObject<{
1353
+ id: z.ZodString;
1354
+ principalId: z.ZodString;
1355
+ role: z.ZodEnum<{
1356
+ node_owner: "node_owner";
1357
+ org_owner: "org_owner";
1358
+ }>;
1359
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
1360
+ type: z.ZodLiteral<"node">;
1361
+ nodeId: z.ZodString;
1362
+ }, z.core.$strip>, z.ZodObject<{
1363
+ type: z.ZodLiteral<"organization">;
1364
+ organizationId: z.ZodString;
1365
+ nodeId: z.ZodString;
1366
+ }, z.core.$strip>], "type">;
1367
+ createdAt: z.ZodISODateTime;
1368
+ }, z.core.$strip>;
1369
+ }, z.core.$strip>;
1370
+ }, z.core.$strip>, z.ZodObject<{
1371
+ type: z.ZodLiteral<"role.revoked">;
1372
+ subject: z.ZodObject<{
1373
+ kind: z.ZodLiteral<"roleBinding">;
1374
+ id: z.ZodString;
1375
+ version: z.ZodInt;
1376
+ }, z.core.$strip>;
1377
+ payload: z.ZodObject<{
1378
+ binding: z.ZodObject<{
1379
+ id: z.ZodString;
1380
+ principalId: z.ZodString;
1381
+ role: z.ZodEnum<{
1382
+ node_owner: "node_owner";
1383
+ org_owner: "org_owner";
1384
+ }>;
1385
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
1386
+ type: z.ZodLiteral<"node">;
1387
+ nodeId: z.ZodString;
1388
+ }, z.core.$strip>, z.ZodObject<{
1389
+ type: z.ZodLiteral<"organization">;
1390
+ organizationId: z.ZodString;
1391
+ nodeId: z.ZodString;
1392
+ }, z.core.$strip>], "type">;
1393
+ createdAt: z.ZodISODateTime;
1394
+ }, z.core.$strip>;
1395
+ }, z.core.$strip>;
1396
+ }, z.core.$strip>, z.ZodObject<{
1397
+ type: z.ZodLiteral<"task.requested">;
1398
+ subject: z.ZodObject<{
1399
+ kind: z.ZodLiteral<"task">;
1400
+ id: z.ZodString;
1401
+ version: z.ZodInt;
1402
+ }, z.core.$strip>;
1403
+ payload: z.ZodObject<{
1404
+ task: z.ZodObject<{
1405
+ id: z.ZodString;
1406
+ capability: z.ZodString;
1407
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1408
+ status: z.ZodEnum<{
1409
+ requested: "requested";
1410
+ accepted: "accepted";
1411
+ completed: "completed";
1412
+ failed: "failed";
1413
+ }>;
1414
+ requester: z.ZodObject<{
1415
+ agentId: z.ZodString;
1416
+ organizationId: z.ZodString;
1417
+ nodeId: z.ZodString;
1418
+ }, z.core.$strip>;
1419
+ requesterMeshAgentId: z.ZodString;
1420
+ assignee: z.ZodObject<{
1421
+ organizationId: z.ZodString;
1422
+ nodeId: z.ZodString;
1423
+ meshAgentId: z.ZodString;
1424
+ }, z.core.$strip>;
1425
+ provider: z.ZodNullable<z.ZodObject<{
1426
+ agentId: z.ZodString;
1427
+ organizationId: z.ZodString;
1428
+ nodeId: z.ZodString;
1429
+ }, z.core.$strip>>;
1430
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1431
+ error: z.ZodNullable<z.ZodObject<{
1432
+ code: z.ZodString;
1433
+ message: z.ZodString;
1434
+ }, z.core.$strip>>;
1435
+ steps: z.ZodArray<z.ZodObject<{
1436
+ name: z.ZodEnum<{
1437
+ observe: "observe";
1438
+ reason: "reason";
1439
+ act: "act";
1440
+ verify: "verify";
1441
+ }>;
1442
+ at: z.ZodISODateTime;
1443
+ summary: z.ZodString;
1444
+ }, z.core.$strip>>;
1445
+ model: z.ZodNullable<z.ZodString>;
1446
+ version: z.ZodInt;
1447
+ createdAt: z.ZodISODateTime;
1448
+ updatedAt: z.ZodISODateTime;
1449
+ }, z.core.$strip>;
1450
+ }, z.core.$strip>;
1451
+ }, z.core.$strip>, z.ZodObject<{
1452
+ type: z.ZodLiteral<"task.accepted">;
1453
+ subject: z.ZodObject<{
1454
+ kind: z.ZodLiteral<"task">;
1455
+ id: z.ZodString;
1456
+ version: z.ZodInt;
1457
+ }, z.core.$strip>;
1458
+ payload: z.ZodObject<{
1459
+ task: z.ZodObject<{
1460
+ id: z.ZodString;
1461
+ capability: z.ZodString;
1462
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1463
+ status: z.ZodEnum<{
1464
+ requested: "requested";
1465
+ accepted: "accepted";
1466
+ completed: "completed";
1467
+ failed: "failed";
1468
+ }>;
1469
+ requester: z.ZodObject<{
1470
+ agentId: z.ZodString;
1471
+ organizationId: z.ZodString;
1472
+ nodeId: z.ZodString;
1473
+ }, z.core.$strip>;
1474
+ requesterMeshAgentId: z.ZodString;
1475
+ assignee: z.ZodObject<{
1476
+ organizationId: z.ZodString;
1477
+ nodeId: z.ZodString;
1478
+ meshAgentId: z.ZodString;
1479
+ }, z.core.$strip>;
1480
+ provider: z.ZodNullable<z.ZodObject<{
1481
+ agentId: z.ZodString;
1482
+ organizationId: z.ZodString;
1483
+ nodeId: z.ZodString;
1484
+ }, z.core.$strip>>;
1485
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1486
+ error: z.ZodNullable<z.ZodObject<{
1487
+ code: z.ZodString;
1488
+ message: z.ZodString;
1489
+ }, z.core.$strip>>;
1490
+ steps: z.ZodArray<z.ZodObject<{
1491
+ name: z.ZodEnum<{
1492
+ observe: "observe";
1493
+ reason: "reason";
1494
+ act: "act";
1495
+ verify: "verify";
1496
+ }>;
1497
+ at: z.ZodISODateTime;
1498
+ summary: z.ZodString;
1499
+ }, z.core.$strip>>;
1500
+ model: z.ZodNullable<z.ZodString>;
1501
+ version: z.ZodInt;
1502
+ createdAt: z.ZodISODateTime;
1503
+ updatedAt: z.ZodISODateTime;
1504
+ }, z.core.$strip>;
1505
+ }, z.core.$strip>;
1506
+ }, z.core.$strip>, z.ZodObject<{
1507
+ type: z.ZodLiteral<"task.completed">;
1508
+ subject: z.ZodObject<{
1509
+ kind: z.ZodLiteral<"task">;
1510
+ id: z.ZodString;
1511
+ version: z.ZodInt;
1512
+ }, z.core.$strip>;
1513
+ payload: z.ZodObject<{
1514
+ task: z.ZodObject<{
1515
+ id: z.ZodString;
1516
+ capability: z.ZodString;
1517
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1518
+ status: z.ZodEnum<{
1519
+ requested: "requested";
1520
+ accepted: "accepted";
1521
+ completed: "completed";
1522
+ failed: "failed";
1523
+ }>;
1524
+ requester: z.ZodObject<{
1525
+ agentId: z.ZodString;
1526
+ organizationId: z.ZodString;
1527
+ nodeId: z.ZodString;
1528
+ }, z.core.$strip>;
1529
+ requesterMeshAgentId: z.ZodString;
1530
+ assignee: z.ZodObject<{
1531
+ organizationId: z.ZodString;
1532
+ nodeId: z.ZodString;
1533
+ meshAgentId: z.ZodString;
1534
+ }, z.core.$strip>;
1535
+ provider: z.ZodNullable<z.ZodObject<{
1536
+ agentId: z.ZodString;
1537
+ organizationId: z.ZodString;
1538
+ nodeId: z.ZodString;
1539
+ }, z.core.$strip>>;
1540
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1541
+ error: z.ZodNullable<z.ZodObject<{
1542
+ code: z.ZodString;
1543
+ message: z.ZodString;
1544
+ }, z.core.$strip>>;
1545
+ steps: z.ZodArray<z.ZodObject<{
1546
+ name: z.ZodEnum<{
1547
+ observe: "observe";
1548
+ reason: "reason";
1549
+ act: "act";
1550
+ verify: "verify";
1551
+ }>;
1552
+ at: z.ZodISODateTime;
1553
+ summary: z.ZodString;
1554
+ }, z.core.$strip>>;
1555
+ model: z.ZodNullable<z.ZodString>;
1556
+ version: z.ZodInt;
1557
+ createdAt: z.ZodISODateTime;
1558
+ updatedAt: z.ZodISODateTime;
1559
+ }, z.core.$strip>;
1560
+ }, z.core.$strip>;
1561
+ }, z.core.$strip>, z.ZodObject<{
1562
+ type: z.ZodLiteral<"task.failed">;
1563
+ subject: z.ZodObject<{
1564
+ kind: z.ZodLiteral<"task">;
1565
+ id: z.ZodString;
1566
+ version: z.ZodInt;
1567
+ }, z.core.$strip>;
1568
+ payload: z.ZodObject<{
1569
+ task: z.ZodObject<{
1570
+ id: z.ZodString;
1571
+ capability: z.ZodString;
1572
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1573
+ status: z.ZodEnum<{
1574
+ requested: "requested";
1575
+ accepted: "accepted";
1576
+ completed: "completed";
1577
+ failed: "failed";
1578
+ }>;
1579
+ requester: z.ZodObject<{
1580
+ agentId: z.ZodString;
1581
+ organizationId: z.ZodString;
1582
+ nodeId: z.ZodString;
1583
+ }, z.core.$strip>;
1584
+ requesterMeshAgentId: z.ZodString;
1585
+ assignee: z.ZodObject<{
1586
+ organizationId: z.ZodString;
1587
+ nodeId: z.ZodString;
1588
+ meshAgentId: z.ZodString;
1589
+ }, z.core.$strip>;
1590
+ provider: z.ZodNullable<z.ZodObject<{
1591
+ agentId: z.ZodString;
1592
+ organizationId: z.ZodString;
1593
+ nodeId: z.ZodString;
1594
+ }, z.core.$strip>>;
1595
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1596
+ error: z.ZodNullable<z.ZodObject<{
1597
+ code: z.ZodString;
1598
+ message: z.ZodString;
1599
+ }, z.core.$strip>>;
1600
+ steps: z.ZodArray<z.ZodObject<{
1601
+ name: z.ZodEnum<{
1602
+ observe: "observe";
1603
+ reason: "reason";
1604
+ act: "act";
1605
+ verify: "verify";
1606
+ }>;
1607
+ at: z.ZodISODateTime;
1608
+ summary: z.ZodString;
1609
+ }, z.core.$strip>>;
1610
+ model: z.ZodNullable<z.ZodString>;
1611
+ version: z.ZodInt;
1612
+ createdAt: z.ZodISODateTime;
1613
+ updatedAt: z.ZodISODateTime;
1614
+ }, z.core.$strip>;
1615
+ }, z.core.$strip>;
1616
+ }, z.core.$strip>], "type">;
1617
+ type DomainEvent = z.infer<typeof DomainEvent>;
1618
+ type DomainEventType = DomainEvent["type"];
1619
+ type DomainEventOf<T extends DomainEventType> = Extract<DomainEvent, {
1620
+ type: T;
1621
+ }>;
1622
+ declare const DOMAIN_EVENT_TYPES: readonly DomainEventType[];
1623
+ /** Envelope schema version (ADR-0009). */
1624
+ declare const ENVELOPE_VERSION: 1;
1625
+ declare const EnvelopeMeta: z.ZodObject<{
1626
+ v: z.ZodLiteral<1>;
1627
+ id: z.ZodString;
1628
+ seq: z.ZodInt;
1629
+ origin: z.ZodObject<{
1630
+ nodeId: z.ZodString;
1631
+ principalId: z.ZodNullable<z.ZodString>;
1632
+ }, z.core.$strip>;
1633
+ causationId: z.ZodString;
1634
+ timestamp: z.ZodISODateTime;
1635
+ sig: z.ZodNullable<z.ZodString>;
1636
+ }, z.core.$strip>;
1637
+ type EnvelopeMeta = z.infer<typeof EnvelopeMeta>;
1638
+ declare const MeshEvent: z.ZodIntersection<z.ZodObject<{
1639
+ v: z.ZodLiteral<1>;
1640
+ id: z.ZodString;
1641
+ seq: z.ZodInt;
1642
+ origin: z.ZodObject<{
1643
+ nodeId: z.ZodString;
1644
+ principalId: z.ZodNullable<z.ZodString>;
1645
+ }, z.core.$strip>;
1646
+ causationId: z.ZodString;
1647
+ timestamp: z.ZodISODateTime;
1648
+ sig: z.ZodNullable<z.ZodString>;
1649
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
1650
+ type: z.ZodLiteral<"node.created">;
1651
+ subject: z.ZodObject<{
1652
+ kind: z.ZodLiteral<"node">;
1653
+ id: z.ZodString;
1654
+ version: z.ZodInt;
1655
+ }, z.core.$strip>;
1656
+ payload: z.ZodObject<{
1657
+ node: z.ZodObject<{
1658
+ version: z.ZodInt;
1659
+ createdAt: z.ZodISODateTime;
1660
+ updatedAt: z.ZodISODateTime;
1661
+ id: z.ZodString;
1662
+ name: z.ZodString;
1663
+ publicKey: z.ZodString;
1664
+ endpoint: z.ZodNullable<z.ZodURL>;
1665
+ status: z.ZodEnum<{
1666
+ online: "online";
1667
+ degraded: "degraded";
1668
+ offline: "offline";
1669
+ }>;
1670
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1671
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
1672
+ }, z.core.$strip>;
1673
+ }, z.core.$strip>;
1674
+ }, z.core.$strip>, z.ZodObject<{
1675
+ type: z.ZodLiteral<"node.updated">;
1676
+ subject: z.ZodObject<{
1677
+ kind: z.ZodLiteral<"node">;
1678
+ id: z.ZodString;
1679
+ version: z.ZodInt;
1680
+ }, z.core.$strip>;
1681
+ payload: z.ZodObject<{
1682
+ node: z.ZodObject<{
1683
+ version: z.ZodInt;
1684
+ createdAt: z.ZodISODateTime;
1685
+ updatedAt: z.ZodISODateTime;
1686
+ id: z.ZodString;
1687
+ name: z.ZodString;
1688
+ publicKey: z.ZodString;
1689
+ endpoint: z.ZodNullable<z.ZodURL>;
1690
+ status: z.ZodEnum<{
1691
+ online: "online";
1692
+ degraded: "degraded";
1693
+ offline: "offline";
1694
+ }>;
1695
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1696
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
1697
+ }, z.core.$strip>;
1698
+ }, z.core.$strip>;
1699
+ }, z.core.$strip>, z.ZodObject<{
1700
+ type: z.ZodLiteral<"node.removed">;
1701
+ subject: z.ZodObject<{
1702
+ kind: z.ZodLiteral<"node">;
1703
+ id: z.ZodString;
1704
+ version: z.ZodInt;
1705
+ }, z.core.$strip>;
1706
+ payload: z.ZodObject<{
1707
+ nodeId: z.ZodString;
1708
+ }, z.core.$strip>;
1709
+ }, z.core.$strip>, z.ZodObject<{
1710
+ type: z.ZodLiteral<"node.status_changed">;
1711
+ subject: z.ZodObject<{
1712
+ kind: z.ZodLiteral<"node">;
1713
+ id: z.ZodString;
1714
+ version: z.ZodInt;
1715
+ }, z.core.$strip>;
1716
+ payload: z.ZodObject<{
1717
+ nodeId: z.ZodString;
1718
+ status: z.ZodEnum<{
1719
+ online: "online";
1720
+ degraded: "degraded";
1721
+ offline: "offline";
1722
+ }>;
1723
+ previousStatus: z.ZodEnum<{
1724
+ online: "online";
1725
+ degraded: "degraded";
1726
+ offline: "offline";
1727
+ }>;
1728
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
1729
+ }, z.core.$strip>;
1730
+ }, z.core.$strip>, z.ZodObject<{
1731
+ type: z.ZodLiteral<"node.heartbeat">;
1732
+ subject: z.ZodObject<{
1733
+ kind: z.ZodLiteral<"node">;
1734
+ id: z.ZodString;
1735
+ version: z.ZodInt;
1736
+ }, z.core.$strip>;
1737
+ payload: z.ZodObject<{
1738
+ nodeId: z.ZodString;
1739
+ at: z.ZodISODateTime;
1740
+ }, z.core.$strip>;
1741
+ }, z.core.$strip>, z.ZodObject<{
1742
+ type: z.ZodLiteral<"organization.created">;
1743
+ subject: z.ZodObject<{
1744
+ kind: z.ZodLiteral<"organization">;
1745
+ id: z.ZodString;
1746
+ version: z.ZodInt;
1747
+ }, z.core.$strip>;
1748
+ payload: z.ZodObject<{
1749
+ organization: z.ZodObject<{
1750
+ version: z.ZodInt;
1751
+ createdAt: z.ZodISODateTime;
1752
+ updatedAt: z.ZodISODateTime;
1753
+ id: z.ZodString;
1754
+ nodeId: z.ZodString;
1755
+ name: z.ZodString;
1756
+ slug: z.ZodString;
1757
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1758
+ }, z.core.$strip>;
1759
+ }, z.core.$strip>;
1760
+ }, z.core.$strip>, z.ZodObject<{
1761
+ type: z.ZodLiteral<"organization.updated">;
1762
+ subject: z.ZodObject<{
1763
+ kind: z.ZodLiteral<"organization">;
1764
+ id: z.ZodString;
1765
+ version: z.ZodInt;
1766
+ }, z.core.$strip>;
1767
+ payload: z.ZodObject<{
1768
+ organization: z.ZodObject<{
1769
+ version: z.ZodInt;
1770
+ createdAt: z.ZodISODateTime;
1771
+ updatedAt: z.ZodISODateTime;
1772
+ id: z.ZodString;
1773
+ nodeId: z.ZodString;
1774
+ name: z.ZodString;
1775
+ slug: z.ZodString;
1776
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1777
+ }, z.core.$strip>;
1778
+ }, z.core.$strip>;
1779
+ }, z.core.$strip>, z.ZodObject<{
1780
+ type: z.ZodLiteral<"organization.removed">;
1781
+ subject: z.ZodObject<{
1782
+ kind: z.ZodLiteral<"organization">;
1783
+ id: z.ZodString;
1784
+ version: z.ZodInt;
1785
+ }, z.core.$strip>;
1786
+ payload: z.ZodObject<{
1787
+ organizationId: z.ZodString;
1788
+ nodeId: z.ZodString;
1789
+ }, z.core.$strip>;
1790
+ }, z.core.$strip>, z.ZodObject<{
1791
+ type: z.ZodLiteral<"agent.created">;
1792
+ subject: z.ZodObject<{
1793
+ kind: z.ZodLiteral<"agent">;
1794
+ id: z.ZodString;
1795
+ version: z.ZodInt;
1796
+ }, z.core.$strip>;
1797
+ payload: z.ZodObject<{
1798
+ agent: z.ZodObject<{
1799
+ version: z.ZodInt;
1800
+ createdAt: z.ZodISODateTime;
1801
+ updatedAt: z.ZodISODateTime;
1802
+ id: z.ZodString;
1803
+ organizationId: z.ZodString;
1804
+ nodeId: z.ZodString;
1805
+ name: z.ZodString;
1806
+ kind: z.ZodEnum<{
1807
+ standard: "standard";
1808
+ mesh: "mesh";
1809
+ }>;
1810
+ status: z.ZodEnum<{
1811
+ error: "error";
1812
+ created: "created";
1813
+ starting: "starting";
1814
+ running: "running";
1815
+ stopped: "stopped";
1816
+ }>;
1817
+ capabilities: z.ZodArray<z.ZodObject<{
1818
+ name: z.ZodString;
1819
+ version: z.ZodDefault<z.ZodString>;
1820
+ description: z.ZodOptional<z.ZodString>;
1821
+ }, z.core.$strip>>;
1822
+ model: z.ZodNullable<z.ZodString>;
1823
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1824
+ }, z.core.$strip>;
1825
+ }, z.core.$strip>;
1826
+ }, z.core.$strip>, z.ZodObject<{
1827
+ type: z.ZodLiteral<"agent.updated">;
1828
+ subject: z.ZodObject<{
1829
+ kind: z.ZodLiteral<"agent">;
1830
+ id: z.ZodString;
1831
+ version: z.ZodInt;
1832
+ }, z.core.$strip>;
1833
+ payload: z.ZodObject<{
1834
+ agent: z.ZodObject<{
1835
+ version: z.ZodInt;
1836
+ createdAt: z.ZodISODateTime;
1837
+ updatedAt: z.ZodISODateTime;
1838
+ id: z.ZodString;
1839
+ organizationId: z.ZodString;
1840
+ nodeId: z.ZodString;
1841
+ name: z.ZodString;
1842
+ kind: z.ZodEnum<{
1843
+ standard: "standard";
1844
+ mesh: "mesh";
1845
+ }>;
1846
+ status: z.ZodEnum<{
1847
+ error: "error";
1848
+ created: "created";
1849
+ starting: "starting";
1850
+ running: "running";
1851
+ stopped: "stopped";
1852
+ }>;
1853
+ capabilities: z.ZodArray<z.ZodObject<{
1854
+ name: z.ZodString;
1855
+ version: z.ZodDefault<z.ZodString>;
1856
+ description: z.ZodOptional<z.ZodString>;
1857
+ }, z.core.$strip>>;
1858
+ model: z.ZodNullable<z.ZodString>;
1859
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1860
+ }, z.core.$strip>;
1861
+ }, z.core.$strip>;
1862
+ }, z.core.$strip>, z.ZodObject<{
1863
+ type: z.ZodLiteral<"agent.status_changed">;
1864
+ subject: z.ZodObject<{
1865
+ kind: z.ZodLiteral<"agent">;
1866
+ id: z.ZodString;
1867
+ version: z.ZodInt;
1868
+ }, z.core.$strip>;
1869
+ payload: z.ZodObject<{
1870
+ agent: z.ZodObject<{
1871
+ version: z.ZodInt;
1872
+ createdAt: z.ZodISODateTime;
1873
+ updatedAt: z.ZodISODateTime;
1874
+ id: z.ZodString;
1875
+ organizationId: z.ZodString;
1876
+ nodeId: z.ZodString;
1877
+ name: z.ZodString;
1878
+ kind: z.ZodEnum<{
1879
+ standard: "standard";
1880
+ mesh: "mesh";
1881
+ }>;
1882
+ status: z.ZodEnum<{
1883
+ error: "error";
1884
+ created: "created";
1885
+ starting: "starting";
1886
+ running: "running";
1887
+ stopped: "stopped";
1888
+ }>;
1889
+ capabilities: z.ZodArray<z.ZodObject<{
1890
+ name: z.ZodString;
1891
+ version: z.ZodDefault<z.ZodString>;
1892
+ description: z.ZodOptional<z.ZodString>;
1893
+ }, z.core.$strip>>;
1894
+ model: z.ZodNullable<z.ZodString>;
1895
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1896
+ }, z.core.$strip>;
1897
+ previousStatus: z.ZodEnum<{
1898
+ error: "error";
1899
+ created: "created";
1900
+ starting: "starting";
1901
+ running: "running";
1902
+ stopped: "stopped";
1903
+ }>;
1904
+ }, z.core.$strip>;
1905
+ }, z.core.$strip>, z.ZodObject<{
1906
+ type: z.ZodLiteral<"agent.removed">;
1907
+ subject: z.ZodObject<{
1908
+ kind: z.ZodLiteral<"agent">;
1909
+ id: z.ZodString;
1910
+ version: z.ZodInt;
1911
+ }, z.core.$strip>;
1912
+ payload: z.ZodObject<{
1913
+ agentId: z.ZodString;
1914
+ organizationId: z.ZodString;
1915
+ nodeId: z.ZodString;
1916
+ }, z.core.$strip>;
1917
+ }, z.core.$strip>, z.ZodObject<{
1918
+ type: z.ZodLiteral<"mesh_agent.agent_registered">;
1919
+ subject: z.ZodObject<{
1920
+ kind: z.ZodLiteral<"agent">;
1921
+ id: z.ZodString;
1922
+ version: z.ZodInt;
1923
+ }, z.core.$strip>;
1924
+ payload: z.ZodObject<{
1925
+ meshAgentId: z.ZodString;
1926
+ agentId: z.ZodString;
1927
+ organizationId: z.ZodString;
1928
+ nodeId: z.ZodString;
1929
+ }, z.core.$strip>;
1930
+ }, z.core.$strip>, z.ZodObject<{
1931
+ type: z.ZodLiteral<"mesh_agent.agent_deregistered">;
1932
+ subject: z.ZodObject<{
1933
+ kind: z.ZodLiteral<"agent">;
1934
+ id: z.ZodString;
1935
+ version: z.ZodInt;
1936
+ }, z.core.$strip>;
1937
+ payload: z.ZodObject<{
1938
+ meshAgentId: z.ZodString;
1939
+ agentId: z.ZodString;
1940
+ organizationId: z.ZodString;
1941
+ nodeId: z.ZodString;
1942
+ }, z.core.$strip>;
1943
+ }, z.core.$strip>, z.ZodObject<{
1944
+ type: z.ZodLiteral<"link.requested">;
1945
+ subject: z.ZodObject<{
1946
+ kind: z.ZodLiteral<"link">;
1947
+ id: z.ZodString;
1948
+ version: z.ZodInt;
1949
+ }, z.core.$strip>;
1950
+ payload: z.ZodObject<{
1951
+ link: z.ZodObject<{
1952
+ version: z.ZodInt;
1953
+ createdAt: z.ZodISODateTime;
1954
+ updatedAt: z.ZodISODateTime;
1955
+ id: z.ZodString;
1956
+ aNodeId: z.ZodString;
1957
+ bNodeId: z.ZodString;
1958
+ transport: z.ZodEnum<{
1959
+ memory: "memory";
1960
+ "ws-peer": "ws-peer";
1961
+ tcp: "tcp";
1962
+ mqtt: "mqtt";
1963
+ meshtastic: "meshtastic";
1964
+ meshcore: "meshcore";
1965
+ }>;
1966
+ state: z.ZodEnum<{
1967
+ requested: "requested";
1968
+ up: "up";
1969
+ down: "down";
1970
+ }>;
1971
+ quality: z.ZodObject<{
1972
+ latencyMs: z.ZodOptional<z.ZodNumber>;
1973
+ rssi: z.ZodOptional<z.ZodNumber>;
1974
+ }, z.core.$strip>;
1975
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
1976
+ }, z.core.$strip>;
1977
+ }, z.core.$strip>;
1978
+ }, z.core.$strip>, z.ZodObject<{
1979
+ type: z.ZodLiteral<"link.up">;
1980
+ subject: z.ZodObject<{
1981
+ kind: z.ZodLiteral<"link">;
1982
+ id: z.ZodString;
1983
+ version: z.ZodInt;
1984
+ }, z.core.$strip>;
1985
+ payload: z.ZodObject<{
1986
+ link: z.ZodObject<{
1987
+ version: z.ZodInt;
1988
+ createdAt: z.ZodISODateTime;
1989
+ updatedAt: z.ZodISODateTime;
1990
+ id: z.ZodString;
1991
+ aNodeId: z.ZodString;
1992
+ bNodeId: z.ZodString;
1993
+ transport: z.ZodEnum<{
1994
+ memory: "memory";
1995
+ "ws-peer": "ws-peer";
1996
+ tcp: "tcp";
1997
+ mqtt: "mqtt";
1998
+ meshtastic: "meshtastic";
1999
+ meshcore: "meshcore";
2000
+ }>;
2001
+ state: z.ZodEnum<{
2002
+ requested: "requested";
2003
+ up: "up";
2004
+ down: "down";
2005
+ }>;
2006
+ quality: z.ZodObject<{
2007
+ latencyMs: z.ZodOptional<z.ZodNumber>;
2008
+ rssi: z.ZodOptional<z.ZodNumber>;
2009
+ }, z.core.$strip>;
2010
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
2011
+ }, z.core.$strip>;
2012
+ }, z.core.$strip>;
2013
+ }, z.core.$strip>, z.ZodObject<{
2014
+ type: z.ZodLiteral<"link.updated">;
2015
+ subject: z.ZodObject<{
2016
+ kind: z.ZodLiteral<"link">;
2017
+ id: z.ZodString;
2018
+ version: z.ZodInt;
2019
+ }, z.core.$strip>;
2020
+ payload: z.ZodObject<{
2021
+ link: z.ZodObject<{
2022
+ version: z.ZodInt;
2023
+ createdAt: z.ZodISODateTime;
2024
+ updatedAt: z.ZodISODateTime;
2025
+ id: z.ZodString;
2026
+ aNodeId: z.ZodString;
2027
+ bNodeId: z.ZodString;
2028
+ transport: z.ZodEnum<{
2029
+ memory: "memory";
2030
+ "ws-peer": "ws-peer";
2031
+ tcp: "tcp";
2032
+ mqtt: "mqtt";
2033
+ meshtastic: "meshtastic";
2034
+ meshcore: "meshcore";
2035
+ }>;
2036
+ state: z.ZodEnum<{
2037
+ requested: "requested";
2038
+ up: "up";
2039
+ down: "down";
2040
+ }>;
2041
+ quality: z.ZodObject<{
2042
+ latencyMs: z.ZodOptional<z.ZodNumber>;
2043
+ rssi: z.ZodOptional<z.ZodNumber>;
2044
+ }, z.core.$strip>;
2045
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
2046
+ }, z.core.$strip>;
2047
+ }, z.core.$strip>;
2048
+ }, z.core.$strip>, z.ZodObject<{
2049
+ type: z.ZodLiteral<"link.down">;
2050
+ subject: z.ZodObject<{
2051
+ kind: z.ZodLiteral<"link">;
2052
+ id: z.ZodString;
2053
+ version: z.ZodInt;
2054
+ }, z.core.$strip>;
2055
+ payload: z.ZodObject<{
2056
+ link: z.ZodObject<{
2057
+ version: z.ZodInt;
2058
+ createdAt: z.ZodISODateTime;
2059
+ updatedAt: z.ZodISODateTime;
2060
+ id: z.ZodString;
2061
+ aNodeId: z.ZodString;
2062
+ bNodeId: z.ZodString;
2063
+ transport: z.ZodEnum<{
2064
+ memory: "memory";
2065
+ "ws-peer": "ws-peer";
2066
+ tcp: "tcp";
2067
+ mqtt: "mqtt";
2068
+ meshtastic: "meshtastic";
2069
+ meshcore: "meshcore";
2070
+ }>;
2071
+ state: z.ZodEnum<{
2072
+ requested: "requested";
2073
+ up: "up";
2074
+ down: "down";
2075
+ }>;
2076
+ quality: z.ZodObject<{
2077
+ latencyMs: z.ZodOptional<z.ZodNumber>;
2078
+ rssi: z.ZodOptional<z.ZodNumber>;
2079
+ }, z.core.$strip>;
2080
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
2081
+ }, z.core.$strip>;
2082
+ }, z.core.$strip>;
2083
+ }, z.core.$strip>, z.ZodObject<{
2084
+ type: z.ZodLiteral<"link.removed">;
2085
+ subject: z.ZodObject<{
2086
+ kind: z.ZodLiteral<"link">;
2087
+ id: z.ZodString;
2088
+ version: z.ZodInt;
2089
+ }, z.core.$strip>;
2090
+ payload: z.ZodObject<{
2091
+ linkId: z.ZodString;
2092
+ }, z.core.$strip>;
2093
+ }, z.core.$strip>, z.ZodObject<{
2094
+ type: z.ZodLiteral<"role.granted">;
2095
+ subject: z.ZodObject<{
2096
+ kind: z.ZodLiteral<"roleBinding">;
2097
+ id: z.ZodString;
2098
+ version: z.ZodInt;
2099
+ }, z.core.$strip>;
2100
+ payload: z.ZodObject<{
2101
+ binding: z.ZodObject<{
2102
+ id: z.ZodString;
2103
+ principalId: z.ZodString;
2104
+ role: z.ZodEnum<{
2105
+ node_owner: "node_owner";
2106
+ org_owner: "org_owner";
2107
+ }>;
2108
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
2109
+ type: z.ZodLiteral<"node">;
2110
+ nodeId: z.ZodString;
2111
+ }, z.core.$strip>, z.ZodObject<{
2112
+ type: z.ZodLiteral<"organization">;
2113
+ organizationId: z.ZodString;
2114
+ nodeId: z.ZodString;
2115
+ }, z.core.$strip>], "type">;
2116
+ createdAt: z.ZodISODateTime;
2117
+ }, z.core.$strip>;
2118
+ }, z.core.$strip>;
2119
+ }, z.core.$strip>, z.ZodObject<{
2120
+ type: z.ZodLiteral<"role.revoked">;
2121
+ subject: z.ZodObject<{
2122
+ kind: z.ZodLiteral<"roleBinding">;
2123
+ id: z.ZodString;
2124
+ version: z.ZodInt;
2125
+ }, z.core.$strip>;
2126
+ payload: z.ZodObject<{
2127
+ binding: z.ZodObject<{
2128
+ id: z.ZodString;
2129
+ principalId: z.ZodString;
2130
+ role: z.ZodEnum<{
2131
+ node_owner: "node_owner";
2132
+ org_owner: "org_owner";
2133
+ }>;
2134
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
2135
+ type: z.ZodLiteral<"node">;
2136
+ nodeId: z.ZodString;
2137
+ }, z.core.$strip>, z.ZodObject<{
2138
+ type: z.ZodLiteral<"organization">;
2139
+ organizationId: z.ZodString;
2140
+ nodeId: z.ZodString;
2141
+ }, z.core.$strip>], "type">;
2142
+ createdAt: z.ZodISODateTime;
2143
+ }, z.core.$strip>;
2144
+ }, z.core.$strip>;
2145
+ }, z.core.$strip>, z.ZodObject<{
2146
+ type: z.ZodLiteral<"task.requested">;
2147
+ subject: z.ZodObject<{
2148
+ kind: z.ZodLiteral<"task">;
2149
+ id: z.ZodString;
2150
+ version: z.ZodInt;
2151
+ }, z.core.$strip>;
2152
+ payload: z.ZodObject<{
2153
+ task: z.ZodObject<{
2154
+ id: z.ZodString;
2155
+ capability: z.ZodString;
2156
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2157
+ status: z.ZodEnum<{
2158
+ requested: "requested";
2159
+ accepted: "accepted";
2160
+ completed: "completed";
2161
+ failed: "failed";
2162
+ }>;
2163
+ requester: z.ZodObject<{
2164
+ agentId: z.ZodString;
2165
+ organizationId: z.ZodString;
2166
+ nodeId: z.ZodString;
2167
+ }, z.core.$strip>;
2168
+ requesterMeshAgentId: z.ZodString;
2169
+ assignee: z.ZodObject<{
2170
+ organizationId: z.ZodString;
2171
+ nodeId: z.ZodString;
2172
+ meshAgentId: z.ZodString;
2173
+ }, z.core.$strip>;
2174
+ provider: z.ZodNullable<z.ZodObject<{
2175
+ agentId: z.ZodString;
2176
+ organizationId: z.ZodString;
2177
+ nodeId: z.ZodString;
2178
+ }, z.core.$strip>>;
2179
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2180
+ error: z.ZodNullable<z.ZodObject<{
2181
+ code: z.ZodString;
2182
+ message: z.ZodString;
2183
+ }, z.core.$strip>>;
2184
+ steps: z.ZodArray<z.ZodObject<{
2185
+ name: z.ZodEnum<{
2186
+ observe: "observe";
2187
+ reason: "reason";
2188
+ act: "act";
2189
+ verify: "verify";
2190
+ }>;
2191
+ at: z.ZodISODateTime;
2192
+ summary: z.ZodString;
2193
+ }, z.core.$strip>>;
2194
+ model: z.ZodNullable<z.ZodString>;
2195
+ version: z.ZodInt;
2196
+ createdAt: z.ZodISODateTime;
2197
+ updatedAt: z.ZodISODateTime;
2198
+ }, z.core.$strip>;
2199
+ }, z.core.$strip>;
2200
+ }, z.core.$strip>, z.ZodObject<{
2201
+ type: z.ZodLiteral<"task.accepted">;
2202
+ subject: z.ZodObject<{
2203
+ kind: z.ZodLiteral<"task">;
2204
+ id: z.ZodString;
2205
+ version: z.ZodInt;
2206
+ }, z.core.$strip>;
2207
+ payload: z.ZodObject<{
2208
+ task: z.ZodObject<{
2209
+ id: z.ZodString;
2210
+ capability: z.ZodString;
2211
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2212
+ status: z.ZodEnum<{
2213
+ requested: "requested";
2214
+ accepted: "accepted";
2215
+ completed: "completed";
2216
+ failed: "failed";
2217
+ }>;
2218
+ requester: z.ZodObject<{
2219
+ agentId: z.ZodString;
2220
+ organizationId: z.ZodString;
2221
+ nodeId: z.ZodString;
2222
+ }, z.core.$strip>;
2223
+ requesterMeshAgentId: z.ZodString;
2224
+ assignee: z.ZodObject<{
2225
+ organizationId: z.ZodString;
2226
+ nodeId: z.ZodString;
2227
+ meshAgentId: z.ZodString;
2228
+ }, z.core.$strip>;
2229
+ provider: z.ZodNullable<z.ZodObject<{
2230
+ agentId: z.ZodString;
2231
+ organizationId: z.ZodString;
2232
+ nodeId: z.ZodString;
2233
+ }, z.core.$strip>>;
2234
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2235
+ error: z.ZodNullable<z.ZodObject<{
2236
+ code: z.ZodString;
2237
+ message: z.ZodString;
2238
+ }, z.core.$strip>>;
2239
+ steps: z.ZodArray<z.ZodObject<{
2240
+ name: z.ZodEnum<{
2241
+ observe: "observe";
2242
+ reason: "reason";
2243
+ act: "act";
2244
+ verify: "verify";
2245
+ }>;
2246
+ at: z.ZodISODateTime;
2247
+ summary: z.ZodString;
2248
+ }, z.core.$strip>>;
2249
+ model: z.ZodNullable<z.ZodString>;
2250
+ version: z.ZodInt;
2251
+ createdAt: z.ZodISODateTime;
2252
+ updatedAt: z.ZodISODateTime;
2253
+ }, z.core.$strip>;
2254
+ }, z.core.$strip>;
2255
+ }, z.core.$strip>, z.ZodObject<{
2256
+ type: z.ZodLiteral<"task.completed">;
2257
+ subject: z.ZodObject<{
2258
+ kind: z.ZodLiteral<"task">;
2259
+ id: z.ZodString;
2260
+ version: z.ZodInt;
2261
+ }, z.core.$strip>;
2262
+ payload: z.ZodObject<{
2263
+ task: z.ZodObject<{
2264
+ id: z.ZodString;
2265
+ capability: z.ZodString;
2266
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2267
+ status: z.ZodEnum<{
2268
+ requested: "requested";
2269
+ accepted: "accepted";
2270
+ completed: "completed";
2271
+ failed: "failed";
2272
+ }>;
2273
+ requester: z.ZodObject<{
2274
+ agentId: z.ZodString;
2275
+ organizationId: z.ZodString;
2276
+ nodeId: z.ZodString;
2277
+ }, z.core.$strip>;
2278
+ requesterMeshAgentId: z.ZodString;
2279
+ assignee: z.ZodObject<{
2280
+ organizationId: z.ZodString;
2281
+ nodeId: z.ZodString;
2282
+ meshAgentId: z.ZodString;
2283
+ }, z.core.$strip>;
2284
+ provider: z.ZodNullable<z.ZodObject<{
2285
+ agentId: z.ZodString;
2286
+ organizationId: z.ZodString;
2287
+ nodeId: z.ZodString;
2288
+ }, z.core.$strip>>;
2289
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2290
+ error: z.ZodNullable<z.ZodObject<{
2291
+ code: z.ZodString;
2292
+ message: z.ZodString;
2293
+ }, z.core.$strip>>;
2294
+ steps: z.ZodArray<z.ZodObject<{
2295
+ name: z.ZodEnum<{
2296
+ observe: "observe";
2297
+ reason: "reason";
2298
+ act: "act";
2299
+ verify: "verify";
2300
+ }>;
2301
+ at: z.ZodISODateTime;
2302
+ summary: z.ZodString;
2303
+ }, z.core.$strip>>;
2304
+ model: z.ZodNullable<z.ZodString>;
2305
+ version: z.ZodInt;
2306
+ createdAt: z.ZodISODateTime;
2307
+ updatedAt: z.ZodISODateTime;
2308
+ }, z.core.$strip>;
2309
+ }, z.core.$strip>;
2310
+ }, z.core.$strip>, z.ZodObject<{
2311
+ type: z.ZodLiteral<"task.failed">;
2312
+ subject: z.ZodObject<{
2313
+ kind: z.ZodLiteral<"task">;
2314
+ id: z.ZodString;
2315
+ version: z.ZodInt;
2316
+ }, z.core.$strip>;
2317
+ payload: z.ZodObject<{
2318
+ task: z.ZodObject<{
2319
+ id: z.ZodString;
2320
+ capability: z.ZodString;
2321
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2322
+ status: z.ZodEnum<{
2323
+ requested: "requested";
2324
+ accepted: "accepted";
2325
+ completed: "completed";
2326
+ failed: "failed";
2327
+ }>;
2328
+ requester: z.ZodObject<{
2329
+ agentId: z.ZodString;
2330
+ organizationId: z.ZodString;
2331
+ nodeId: z.ZodString;
2332
+ }, z.core.$strip>;
2333
+ requesterMeshAgentId: z.ZodString;
2334
+ assignee: z.ZodObject<{
2335
+ organizationId: z.ZodString;
2336
+ nodeId: z.ZodString;
2337
+ meshAgentId: z.ZodString;
2338
+ }, z.core.$strip>;
2339
+ provider: z.ZodNullable<z.ZodObject<{
2340
+ agentId: z.ZodString;
2341
+ organizationId: z.ZodString;
2342
+ nodeId: z.ZodString;
2343
+ }, z.core.$strip>>;
2344
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2345
+ error: z.ZodNullable<z.ZodObject<{
2346
+ code: z.ZodString;
2347
+ message: z.ZodString;
2348
+ }, z.core.$strip>>;
2349
+ steps: z.ZodArray<z.ZodObject<{
2350
+ name: z.ZodEnum<{
2351
+ observe: "observe";
2352
+ reason: "reason";
2353
+ act: "act";
2354
+ verify: "verify";
2355
+ }>;
2356
+ at: z.ZodISODateTime;
2357
+ summary: z.ZodString;
2358
+ }, z.core.$strip>>;
2359
+ model: z.ZodNullable<z.ZodString>;
2360
+ version: z.ZodInt;
2361
+ createdAt: z.ZodISODateTime;
2362
+ updatedAt: z.ZodISODateTime;
2363
+ }, z.core.$strip>;
2364
+ }, z.core.$strip>;
2365
+ }, z.core.$strip>], "type">>;
2366
+ type MeshEvent = z.infer<typeof MeshEvent>;
2367
+
2368
+ declare const HealthResponse: z.ZodObject<{
2369
+ status: z.ZodEnum<{
2370
+ degraded: "degraded";
2371
+ ok: "ok";
2372
+ }>;
2373
+ service: z.ZodLiteral<"node-server">;
2374
+ nodeId: z.ZodString;
2375
+ version: z.ZodString;
2376
+ uptimeSeconds: z.ZodNumber;
2377
+ timestamp: z.ZodISODateTime;
2378
+ }, z.core.$strip>;
2379
+ type HealthResponse = z.infer<typeof HealthResponse>;
2380
+
2381
+ /** Who the caller is and which ownership roles they hold — drives the Monitor's controls (ADR-0010). */
2382
+ declare const Me: z.ZodObject<{
2383
+ principal: z.ZodObject<{
2384
+ id: z.ZodString;
2385
+ kind: z.ZodEnum<{
2386
+ user: "user";
2387
+ service: "service";
2388
+ }>;
2389
+ name: z.ZodString;
2390
+ publicKey: z.ZodNullable<z.ZodString>;
2391
+ createdAt: z.ZodISODateTime;
2392
+ }, z.core.$strip>;
2393
+ roles: z.ZodArray<z.ZodObject<{
2394
+ id: z.ZodString;
2395
+ principalId: z.ZodString;
2396
+ role: z.ZodEnum<{
2397
+ node_owner: "node_owner";
2398
+ org_owner: "org_owner";
2399
+ }>;
2400
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
2401
+ type: z.ZodLiteral<"node">;
2402
+ nodeId: z.ZodString;
2403
+ }, z.core.$strip>, z.ZodObject<{
2404
+ type: z.ZodLiteral<"organization">;
2405
+ organizationId: z.ZodString;
2406
+ nodeId: z.ZodString;
2407
+ }, z.core.$strip>], "type">;
2408
+ createdAt: z.ZodISODateTime;
2409
+ }, z.core.$strip>>;
2410
+ }, z.core.$strip>;
2411
+ type Me = z.infer<typeof Me>;
2412
+ declare const CreatePrincipalRequest: z.ZodObject<{
2413
+ name: z.ZodString;
2414
+ kind: z.ZodDefault<z.ZodEnum<{
2415
+ user: "user";
2416
+ service: "service";
2417
+ }>>;
2418
+ }, z.core.$strip>;
2419
+ type CreatePrincipalRequest = z.infer<typeof CreatePrincipalRequest>;
2420
+ /** Shown exactly once. Users get a bearer token; services get a long-lived API key. */
2421
+ declare const Credential: z.ZodDiscriminatedUnion<[z.ZodObject<{
2422
+ type: z.ZodLiteral<"token">;
2423
+ token: z.ZodString;
2424
+ expiresAt: z.ZodISODateTime;
2425
+ }, z.core.$strip>, z.ZodObject<{
2426
+ type: z.ZodLiteral<"apiKey">;
2427
+ apiKey: z.ZodString;
2428
+ }, z.core.$strip>], "type">;
2429
+ type Credential = z.infer<typeof Credential>;
2430
+ declare const CreatePrincipalResponse: z.ZodObject<{
2431
+ principal: z.ZodObject<{
2432
+ id: z.ZodString;
2433
+ kind: z.ZodEnum<{
2434
+ user: "user";
2435
+ service: "service";
2436
+ }>;
2437
+ name: z.ZodString;
2438
+ publicKey: z.ZodNullable<z.ZodString>;
2439
+ createdAt: z.ZodISODateTime;
2440
+ }, z.core.$strip>;
2441
+ credential: z.ZodDiscriminatedUnion<[z.ZodObject<{
2442
+ type: z.ZodLiteral<"token">;
2443
+ token: z.ZodString;
2444
+ expiresAt: z.ZodISODateTime;
2445
+ }, z.core.$strip>, z.ZodObject<{
2446
+ type: z.ZodLiteral<"apiKey">;
2447
+ apiKey: z.ZodString;
2448
+ }, z.core.$strip>], "type">;
2449
+ }, z.core.$strip>;
2450
+ type CreatePrincipalResponse = z.infer<typeof CreatePrincipalResponse>;
2451
+
2452
+ /** Prefixes for time-sortable ULID identifiers (ROADMAP §2.3). */
2453
+ declare const ID_PREFIX: {
2454
+ readonly node: "node";
2455
+ readonly organization: "org";
2456
+ readonly agent: "agt";
2457
+ readonly link: "lnk";
2458
+ readonly event: "evt";
2459
+ readonly command: "cmd";
2460
+ readonly principal: "prn";
2461
+ readonly roleBinding: "rol";
2462
+ readonly apiKey: "key";
2463
+ readonly task: "tsk";
2464
+ };
2465
+ type IdKind = keyof typeof ID_PREFIX;
2466
+ /** Crockford base32 ULID body (26 chars, no I, L, O, U). */
2467
+ declare const ULID_PATTERN = "[0-9A-HJKMNP-TV-Z]{26}";
2468
+ /** Builds a Zod schema that validates `<prefix>_<ULID>` identifiers. */
2469
+ declare const prefixedId: <K extends IdKind>(kind: K) => z.ZodString;
2470
+ declare const NodeId: z.ZodString;
2471
+ type NodeId = z.infer<typeof NodeId>;
2472
+ declare const OrganizationId: z.ZodString;
2473
+ type OrganizationId = z.infer<typeof OrganizationId>;
2474
+ declare const AgentId: z.ZodString;
2475
+ type AgentId = z.infer<typeof AgentId>;
2476
+ declare const LinkId: z.ZodString;
2477
+ type LinkId = z.infer<typeof LinkId>;
2478
+ declare const EventId: z.ZodString;
2479
+ type EventId = z.infer<typeof EventId>;
2480
+ declare const CommandId: z.ZodString;
2481
+ type CommandId = z.infer<typeof CommandId>;
2482
+ declare const PrincipalId: z.ZodString;
2483
+ type PrincipalId = z.infer<typeof PrincipalId>;
2484
+ declare const RoleBindingId: z.ZodString;
2485
+ type RoleBindingId = z.infer<typeof RoleBindingId>;
2486
+ declare const TaskId: z.ZodString;
2487
+ type TaskId = z.infer<typeof TaskId>;
2488
+
2489
+ declare const TransportKind: z.ZodEnum<{
2490
+ memory: "memory";
2491
+ "ws-peer": "ws-peer";
2492
+ tcp: "tcp";
2493
+ mqtt: "mqtt";
2494
+ meshtastic: "meshtastic";
2495
+ meshcore: "meshcore";
2496
+ }>;
2497
+ type TransportKind = z.infer<typeof TransportKind>;
2498
+ /** `requested` = an owner drew the edge in the Monitor and the peer has not accepted yet (ADR-0008). */
2499
+ declare const LinkState: z.ZodEnum<{
2500
+ requested: "requested";
2501
+ up: "up";
2502
+ down: "down";
2503
+ }>;
2504
+ type LinkState = z.infer<typeof LinkState>;
2505
+ declare const LinkQuality: z.ZodObject<{
2506
+ latencyMs: z.ZodOptional<z.ZodNumber>;
2507
+ rssi: z.ZodOptional<z.ZodNumber>;
2508
+ }, z.core.$strip>;
2509
+ type LinkQuality = z.infer<typeof LinkQuality>;
2510
+ declare const Link: z.ZodObject<{
2511
+ version: z.ZodInt;
2512
+ createdAt: z.ZodISODateTime;
2513
+ updatedAt: z.ZodISODateTime;
2514
+ id: z.ZodString;
2515
+ aNodeId: z.ZodString;
2516
+ bNodeId: z.ZodString;
2517
+ transport: z.ZodEnum<{
2518
+ memory: "memory";
2519
+ "ws-peer": "ws-peer";
2520
+ tcp: "tcp";
2521
+ mqtt: "mqtt";
2522
+ meshtastic: "meshtastic";
2523
+ meshcore: "meshcore";
2524
+ }>;
2525
+ state: z.ZodEnum<{
2526
+ requested: "requested";
2527
+ up: "up";
2528
+ down: "down";
2529
+ }>;
2530
+ quality: z.ZodObject<{
2531
+ latencyMs: z.ZodOptional<z.ZodNumber>;
2532
+ rssi: z.ZodOptional<z.ZodNumber>;
2533
+ }, z.core.$strip>;
2534
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
2535
+ }, z.core.$strip>;
2536
+ type Link = z.infer<typeof Link>;
2537
+ declare const CreateLinkRequest: z.ZodObject<{
2538
+ aNodeId: z.ZodString;
2539
+ bNodeId: z.ZodString;
2540
+ transport: z.ZodEnum<{
2541
+ memory: "memory";
2542
+ "ws-peer": "ws-peer";
2543
+ tcp: "tcp";
2544
+ mqtt: "mqtt";
2545
+ meshtastic: "meshtastic";
2546
+ meshcore: "meshcore";
2547
+ }>;
2548
+ }, z.core.$strip>;
2549
+ type CreateLinkRequest = z.infer<typeof CreateLinkRequest>;
2550
+
2551
+ /** Per-origin-node sequence reached by a replica: `{ [nodeId]: seq }`. */
2552
+ declare const MeshCursor: z.ZodRecord<z.ZodString, z.ZodInt>;
2553
+ type MeshCursor = z.infer<typeof MeshCursor>;
2554
+ declare const MeshSnapshot: z.ZodObject<{
2555
+ nodes: z.ZodArray<z.ZodObject<{
2556
+ version: z.ZodInt;
2557
+ createdAt: z.ZodISODateTime;
2558
+ updatedAt: z.ZodISODateTime;
2559
+ id: z.ZodString;
2560
+ name: z.ZodString;
2561
+ publicKey: z.ZodString;
2562
+ endpoint: z.ZodNullable<z.ZodURL>;
2563
+ status: z.ZodEnum<{
2564
+ online: "online";
2565
+ degraded: "degraded";
2566
+ offline: "offline";
2567
+ }>;
2568
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2569
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
2570
+ }, z.core.$strip>>;
2571
+ organizations: z.ZodArray<z.ZodObject<{
2572
+ version: z.ZodInt;
2573
+ createdAt: z.ZodISODateTime;
2574
+ updatedAt: z.ZodISODateTime;
2575
+ id: z.ZodString;
2576
+ nodeId: z.ZodString;
2577
+ name: z.ZodString;
2578
+ slug: z.ZodString;
2579
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2580
+ }, z.core.$strip>>;
2581
+ agents: z.ZodArray<z.ZodObject<{
2582
+ version: z.ZodInt;
2583
+ createdAt: z.ZodISODateTime;
2584
+ updatedAt: z.ZodISODateTime;
2585
+ id: z.ZodString;
2586
+ organizationId: z.ZodString;
2587
+ nodeId: z.ZodString;
2588
+ name: z.ZodString;
2589
+ kind: z.ZodEnum<{
2590
+ standard: "standard";
2591
+ mesh: "mesh";
2592
+ }>;
2593
+ status: z.ZodEnum<{
2594
+ error: "error";
2595
+ created: "created";
2596
+ starting: "starting";
2597
+ running: "running";
2598
+ stopped: "stopped";
2599
+ }>;
2600
+ capabilities: z.ZodArray<z.ZodObject<{
2601
+ name: z.ZodString;
2602
+ version: z.ZodDefault<z.ZodString>;
2603
+ description: z.ZodOptional<z.ZodString>;
2604
+ }, z.core.$strip>>;
2605
+ model: z.ZodNullable<z.ZodString>;
2606
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2607
+ }, z.core.$strip>>;
2608
+ links: z.ZodArray<z.ZodObject<{
2609
+ version: z.ZodInt;
2610
+ createdAt: z.ZodISODateTime;
2611
+ updatedAt: z.ZodISODateTime;
2612
+ id: z.ZodString;
2613
+ aNodeId: z.ZodString;
2614
+ bNodeId: z.ZodString;
2615
+ transport: z.ZodEnum<{
2616
+ memory: "memory";
2617
+ "ws-peer": "ws-peer";
2618
+ tcp: "tcp";
2619
+ mqtt: "mqtt";
2620
+ meshtastic: "meshtastic";
2621
+ meshcore: "meshcore";
2622
+ }>;
2623
+ state: z.ZodEnum<{
2624
+ requested: "requested";
2625
+ up: "up";
2626
+ down: "down";
2627
+ }>;
2628
+ quality: z.ZodObject<{
2629
+ latencyMs: z.ZodOptional<z.ZodNumber>;
2630
+ rssi: z.ZodOptional<z.ZodNumber>;
2631
+ }, z.core.$strip>;
2632
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
2633
+ }, z.core.$strip>>;
2634
+ tasks: z.ZodArray<z.ZodObject<{
2635
+ id: z.ZodString;
2636
+ capability: z.ZodString;
2637
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2638
+ status: z.ZodEnum<{
2639
+ requested: "requested";
2640
+ accepted: "accepted";
2641
+ completed: "completed";
2642
+ failed: "failed";
2643
+ }>;
2644
+ requester: z.ZodObject<{
2645
+ agentId: z.ZodString;
2646
+ organizationId: z.ZodString;
2647
+ nodeId: z.ZodString;
2648
+ }, z.core.$strip>;
2649
+ requesterMeshAgentId: z.ZodString;
2650
+ assignee: z.ZodObject<{
2651
+ organizationId: z.ZodString;
2652
+ nodeId: z.ZodString;
2653
+ meshAgentId: z.ZodString;
2654
+ }, z.core.$strip>;
2655
+ provider: z.ZodNullable<z.ZodObject<{
2656
+ agentId: z.ZodString;
2657
+ organizationId: z.ZodString;
2658
+ nodeId: z.ZodString;
2659
+ }, z.core.$strip>>;
2660
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2661
+ error: z.ZodNullable<z.ZodObject<{
2662
+ code: z.ZodString;
2663
+ message: z.ZodString;
2664
+ }, z.core.$strip>>;
2665
+ steps: z.ZodArray<z.ZodObject<{
2666
+ name: z.ZodEnum<{
2667
+ observe: "observe";
2668
+ reason: "reason";
2669
+ act: "act";
2670
+ verify: "verify";
2671
+ }>;
2672
+ at: z.ZodISODateTime;
2673
+ summary: z.ZodString;
2674
+ }, z.core.$strip>>;
2675
+ model: z.ZodNullable<z.ZodString>;
2676
+ version: z.ZodInt;
2677
+ createdAt: z.ZodISODateTime;
2678
+ updatedAt: z.ZodISODateTime;
2679
+ }, z.core.$strip>>;
2680
+ cursor: z.ZodRecord<z.ZodString, z.ZodInt>;
2681
+ }, z.core.$strip>;
2682
+ type MeshSnapshot = z.infer<typeof MeshSnapshot>;
2683
+ declare const MeshStats: z.ZodObject<{
2684
+ nodes: z.ZodInt;
2685
+ online: z.ZodInt;
2686
+ degraded: z.ZodInt;
2687
+ offline: z.ZodInt;
2688
+ organizations: z.ZodInt;
2689
+ agents: z.ZodInt;
2690
+ }, z.core.$strip>;
2691
+ type MeshStats = z.infer<typeof MeshStats>;
2692
+ declare const NodeDetail: z.ZodObject<{
2693
+ node: z.ZodObject<{
2694
+ version: z.ZodInt;
2695
+ createdAt: z.ZodISODateTime;
2696
+ updatedAt: z.ZodISODateTime;
2697
+ id: z.ZodString;
2698
+ name: z.ZodString;
2699
+ publicKey: z.ZodString;
2700
+ endpoint: z.ZodNullable<z.ZodURL>;
2701
+ status: z.ZodEnum<{
2702
+ online: "online";
2703
+ degraded: "degraded";
2704
+ offline: "offline";
2705
+ }>;
2706
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2707
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
2708
+ }, z.core.$strip>;
2709
+ organizations: z.ZodArray<z.ZodObject<{
2710
+ version: z.ZodInt;
2711
+ createdAt: z.ZodISODateTime;
2712
+ updatedAt: z.ZodISODateTime;
2713
+ id: z.ZodString;
2714
+ nodeId: z.ZodString;
2715
+ name: z.ZodString;
2716
+ slug: z.ZodString;
2717
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2718
+ }, z.core.$strip>>;
2719
+ agents: z.ZodArray<z.ZodObject<{
2720
+ version: z.ZodInt;
2721
+ createdAt: z.ZodISODateTime;
2722
+ updatedAt: z.ZodISODateTime;
2723
+ id: z.ZodString;
2724
+ organizationId: z.ZodString;
2725
+ nodeId: z.ZodString;
2726
+ name: z.ZodString;
2727
+ kind: z.ZodEnum<{
2728
+ standard: "standard";
2729
+ mesh: "mesh";
2730
+ }>;
2731
+ status: z.ZodEnum<{
2732
+ error: "error";
2733
+ created: "created";
2734
+ starting: "starting";
2735
+ running: "running";
2736
+ stopped: "stopped";
2737
+ }>;
2738
+ capabilities: z.ZodArray<z.ZodObject<{
2739
+ name: z.ZodString;
2740
+ version: z.ZodDefault<z.ZodString>;
2741
+ description: z.ZodOptional<z.ZodString>;
2742
+ }, z.core.$strip>>;
2743
+ model: z.ZodNullable<z.ZodString>;
2744
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2745
+ }, z.core.$strip>>;
2746
+ capabilities: z.ZodArray<z.ZodObject<{
2747
+ name: z.ZodString;
2748
+ version: z.ZodDefault<z.ZodString>;
2749
+ description: z.ZodOptional<z.ZodString>;
2750
+ }, z.core.$strip>>;
2751
+ }, z.core.$strip>;
2752
+ type NodeDetail = z.infer<typeof NodeDetail>;
2753
+ /** Encodes a cursor for URLs (`?cursor=`): base64url of its JSON. */
2754
+ declare function encodeCursor(cursor: MeshCursor): string;
2755
+ /** Decodes a cursor produced by `encodeCursor`. Throws on malformed input. */
2756
+ declare function decodeCursor(encoded: string): MeshCursor;
2757
+
2758
+ declare const NodeStatus: z.ZodEnum<{
2759
+ online: "online";
2760
+ degraded: "degraded";
2761
+ offline: "offline";
2762
+ }>;
2763
+ type NodeStatus = z.infer<typeof NodeStatus>;
2764
+ declare const Node: z.ZodObject<{
2765
+ version: z.ZodInt;
2766
+ createdAt: z.ZodISODateTime;
2767
+ updatedAt: z.ZodISODateTime;
2768
+ id: z.ZodString;
2769
+ name: z.ZodString;
2770
+ publicKey: z.ZodString;
2771
+ endpoint: z.ZodNullable<z.ZodURL>;
2772
+ status: z.ZodEnum<{
2773
+ online: "online";
2774
+ degraded: "degraded";
2775
+ offline: "offline";
2776
+ }>;
2777
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2778
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
2779
+ }, z.core.$strip>;
2780
+ type Node = z.infer<typeof Node>;
2781
+ declare const UpdateNodeRequest: z.ZodObject<{
2782
+ name: z.ZodOptional<z.ZodString>;
2783
+ endpoint: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
2784
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2785
+ }, z.core.$strip>;
2786
+ type UpdateNodeRequest = z.infer<typeof UpdateNodeRequest>;
2787
+
2788
+ declare const Organization: z.ZodObject<{
2789
+ version: z.ZodInt;
2790
+ createdAt: z.ZodISODateTime;
2791
+ updatedAt: z.ZodISODateTime;
2792
+ id: z.ZodString;
2793
+ nodeId: z.ZodString;
2794
+ name: z.ZodString;
2795
+ slug: z.ZodString;
2796
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2797
+ }, z.core.$strip>;
2798
+ type Organization = z.infer<typeof Organization>;
2799
+ declare const CreateOrganizationRequest: z.ZodObject<{
2800
+ name: z.ZodString;
2801
+ slug: z.ZodOptional<z.ZodString>;
2802
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2803
+ ownerPrincipalId: z.ZodOptional<z.ZodString>;
2804
+ }, z.core.$strip>;
2805
+ type CreateOrganizationRequest = z.infer<typeof CreateOrganizationRequest>;
2806
+ declare const UpdateOrganizationRequest: z.ZodObject<{
2807
+ name: z.ZodOptional<z.ZodString>;
2808
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2809
+ }, z.core.$strip>;
2810
+ type UpdateOrganizationRequest = z.infer<typeof UpdateOrganizationRequest>;
2811
+
2812
+ /**
2813
+ * A capability request between agents (ADR-0020, deck slides 06/07). Created by the requester's node; every later
2814
+ * change is written by the assignee's node only.
2815
+ */
2816
+ declare const TaskStatus: z.ZodEnum<{
2817
+ requested: "requested";
2818
+ accepted: "accepted";
2819
+ completed: "completed";
2820
+ failed: "failed";
2821
+ }>;
2822
+ type TaskStatus = z.infer<typeof TaskStatus>;
2823
+ declare const TERMINAL_TASK_STATUSES: readonly TaskStatus[];
2824
+ /** An agent taking part in a task, with where it lives. */
2825
+ declare const TaskParty: z.ZodObject<{
2826
+ agentId: z.ZodString;
2827
+ organizationId: z.ZodString;
2828
+ nodeId: z.ZodString;
2829
+ }, z.core.$strip>;
2830
+ type TaskParty = z.infer<typeof TaskParty>;
2831
+ /** The organization a task was routed to, through its Mesh Agent. */
2832
+ declare const TaskAssignee: z.ZodObject<{
2833
+ organizationId: z.ZodString;
2834
+ nodeId: z.ZodString;
2835
+ meshAgentId: z.ZodString;
2836
+ }, z.core.$strip>;
2837
+ type TaskAssignee = z.infer<typeof TaskAssignee>;
2838
+ /** One stage of the observe → reason → act → verify pipeline (deck slide 05). */
2839
+ declare const TaskStep: z.ZodObject<{
2840
+ name: z.ZodEnum<{
2841
+ observe: "observe";
2842
+ reason: "reason";
2843
+ act: "act";
2844
+ verify: "verify";
2845
+ }>;
2846
+ at: z.ZodISODateTime;
2847
+ summary: z.ZodString;
2848
+ }, z.core.$strip>;
2849
+ type TaskStep = z.infer<typeof TaskStep>;
2850
+ declare const TaskError: z.ZodObject<{
2851
+ code: z.ZodString;
2852
+ message: z.ZodString;
2853
+ }, z.core.$strip>;
2854
+ type TaskError = z.infer<typeof TaskError>;
2855
+ declare const Task: z.ZodObject<{
2856
+ id: z.ZodString;
2857
+ capability: z.ZodString;
2858
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2859
+ status: z.ZodEnum<{
2860
+ requested: "requested";
2861
+ accepted: "accepted";
2862
+ completed: "completed";
2863
+ failed: "failed";
2864
+ }>;
2865
+ requester: z.ZodObject<{
2866
+ agentId: z.ZodString;
2867
+ organizationId: z.ZodString;
2868
+ nodeId: z.ZodString;
2869
+ }, z.core.$strip>;
2870
+ requesterMeshAgentId: z.ZodString;
2871
+ assignee: z.ZodObject<{
2872
+ organizationId: z.ZodString;
2873
+ nodeId: z.ZodString;
2874
+ meshAgentId: z.ZodString;
2875
+ }, z.core.$strip>;
2876
+ provider: z.ZodNullable<z.ZodObject<{
2877
+ agentId: z.ZodString;
2878
+ organizationId: z.ZodString;
2879
+ nodeId: z.ZodString;
2880
+ }, z.core.$strip>>;
2881
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2882
+ error: z.ZodNullable<z.ZodObject<{
2883
+ code: z.ZodString;
2884
+ message: z.ZodString;
2885
+ }, z.core.$strip>>;
2886
+ steps: z.ZodArray<z.ZodObject<{
2887
+ name: z.ZodEnum<{
2888
+ observe: "observe";
2889
+ reason: "reason";
2890
+ act: "act";
2891
+ verify: "verify";
2892
+ }>;
2893
+ at: z.ZodISODateTime;
2894
+ summary: z.ZodString;
2895
+ }, z.core.$strip>>;
2896
+ model: z.ZodNullable<z.ZodString>;
2897
+ version: z.ZodInt;
2898
+ createdAt: z.ZodISODateTime;
2899
+ updatedAt: z.ZodISODateTime;
2900
+ }, z.core.$strip>;
2901
+ type Task = z.infer<typeof Task>;
2902
+ declare const RequestTaskRequest: z.ZodObject<{
2903
+ capability: z.ZodString;
2904
+ input: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2905
+ }, z.core.$strip>;
2906
+ type RequestTaskRequest = z.infer<typeof RequestTaskRequest>;
2907
+ type RequestTaskRequestInput = z.input<typeof RequestTaskRequest>;
2908
+ /** An agent offering a capability, as listed by the capability directory. */
2909
+ declare const CapabilityProvider: z.ZodObject<{
2910
+ agentId: z.ZodString;
2911
+ agentName: z.ZodString;
2912
+ organizationId: z.ZodString;
2913
+ organizationName: z.ZodString;
2914
+ nodeId: z.ZodString;
2915
+ available: z.ZodBoolean;
2916
+ }, z.core.$strip>;
2917
+ type CapabilityProvider = z.infer<typeof CapabilityProvider>;
2918
+
2919
+ /** A client-side mirror of the mesh, kept current by applying events to a snapshot. */
2920
+ interface MeshState {
2921
+ readonly nodes: Readonly<Record<string, Node>>;
2922
+ readonly organizations: Readonly<Record<string, Organization>>;
2923
+ readonly agents: Readonly<Record<string, Agent>>;
2924
+ readonly links: Readonly<Record<string, Link>>;
2925
+ readonly tasks: Readonly<Record<string, Task>>;
2926
+ readonly cursor: MeshCursor;
2927
+ }
2928
+ declare function meshStateFromSnapshot(snapshot: MeshSnapshot): MeshState;
2929
+ /**
2930
+ * Applies one event immutably. Events at or below the cursor for their origin are ignored, so replays
2931
+ * and duplicates are harmless. Role bindings are not mirrored (they are not part of the snapshot).
2932
+ */
2933
+ declare function applyMeshEvent(state: MeshState, event: MeshEvent): MeshState;
2934
+
2935
+ /** Cursor pagination query (ROADMAP §2.6). `cursor` is opaque to clients. */
2936
+ declare const PageQuery: z.ZodObject<{
2937
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
2938
+ cursor: z.ZodOptional<z.ZodString>;
2939
+ }, z.core.$strip>;
2940
+ type PageQuery = z.infer<typeof PageQuery>;
2941
+ /** A page of results; `nextCursor` is null on the last page. */
2942
+ declare const Page: <T extends z.ZodType>(item: T, id: string) => z.ZodObject<{
2943
+ items: z.ZodArray<T>;
2944
+ nextCursor: z.ZodNullable<z.ZodString>;
2945
+ }, z.core.$strip>;
2946
+ interface PageOf<T> {
2947
+ readonly items: T[];
2948
+ readonly nextCursor: string | null;
2949
+ }
2950
+
2951
+ /** RFC 9457 problem details — every API error uses this shape. */
2952
+ declare const ProblemDetails: z.ZodObject<{
2953
+ type: z.ZodString;
2954
+ title: z.ZodString;
2955
+ status: z.ZodInt;
2956
+ detail: z.ZodOptional<z.ZodString>;
2957
+ instance: z.ZodOptional<z.ZodString>;
2958
+ code: z.ZodString;
2959
+ errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
2960
+ path: z.ZodString;
2961
+ message: z.ZodString;
2962
+ }, z.core.$strip>>>;
2963
+ }, z.core.$strip>;
2964
+ type ProblemDetails = z.infer<typeof ProblemDetails>;
2965
+
2966
+ /**
2967
+ * Translates an event into the state change it implies. The node server's persistence applies these operations
2968
+ * atomically with the event append, replication (Phase 5) applies them for remote events, and clients (the SDK's
2969
+ * mesh mirror, the Monitor) apply them to their local copy — so nobody can disagree about what an event means.
2970
+ */
2971
+ type ProjectionOp = {
2972
+ readonly op: "upsert";
2973
+ readonly kind: "node";
2974
+ readonly entity: Node;
2975
+ } | {
2976
+ readonly op: "upsert";
2977
+ readonly kind: "organization";
2978
+ readonly entity: Organization;
2979
+ } | {
2980
+ readonly op: "upsert";
2981
+ readonly kind: "agent";
2982
+ readonly entity: Agent;
2983
+ } | {
2984
+ readonly op: "upsert";
2985
+ readonly kind: "link";
2986
+ readonly entity: Link;
2987
+ } | {
2988
+ readonly op: "upsert";
2989
+ readonly kind: "roleBinding";
2990
+ readonly entity: RoleBinding;
2991
+ }
2992
+ /** Tasks have two writers in turn (ADR-0020), so replicas apply only newer versions. */
2993
+ | {
2994
+ readonly op: "upsert";
2995
+ readonly kind: "task";
2996
+ readonly entity: Task;
2997
+ } | {
2998
+ readonly op: "delete";
2999
+ readonly kind: "node" | "organization" | "agent" | "link" | "roleBinding";
3000
+ readonly id: string;
3001
+ } | {
3002
+ readonly op: "presence";
3003
+ readonly nodeId: string;
3004
+ readonly status: NodeStatus;
3005
+ readonly lastSeenAt: string | null;
3006
+ } | {
3007
+ readonly op: "none";
3008
+ };
3009
+ declare function project(event: DomainEvent): ProjectionOp;
3010
+
3011
+ /**
3012
+ * Realtime protocol over `WS /v1/realtime` (ADR-0014). JSON text frames.
3013
+ *
3014
+ * client → hello { token, cursor?, topics? } first frame, within 5 s
3015
+ * server → event { event }* replay of everything after `cursor`
3016
+ * server → welcome { principalId, cursor } replay done; live events follow
3017
+ * server → event { event }* live
3018
+ * server → resync.required { reason } the client must fetch a fresh snapshot and reconnect
3019
+ */
3020
+ /** Subject kinds a client can subscribe to. Default: everything. */
3021
+ declare const Topic: z.ZodEnum<{
3022
+ node: "node";
3023
+ organization: "organization";
3024
+ agent: "agent";
3025
+ link: "link";
3026
+ roleBinding: "roleBinding";
3027
+ task: "task";
3028
+ }>;
3029
+ type Topic = z.infer<typeof Topic>;
3030
+ declare const ClientMessage: z.ZodDiscriminatedUnion<[z.ZodObject<{
3031
+ type: z.ZodLiteral<"hello">;
3032
+ token: z.ZodString;
3033
+ cursor: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodInt>>;
3034
+ topics: z.ZodOptional<z.ZodArray<z.ZodEnum<{
3035
+ node: "node";
3036
+ organization: "organization";
3037
+ agent: "agent";
3038
+ link: "link";
3039
+ roleBinding: "roleBinding";
3040
+ task: "task";
3041
+ }>>>;
3042
+ }, z.core.$strip>, z.ZodObject<{
3043
+ type: z.ZodLiteral<"subscribe">;
3044
+ topics: z.ZodArray<z.ZodEnum<{
3045
+ node: "node";
3046
+ organization: "organization";
3047
+ agent: "agent";
3048
+ link: "link";
3049
+ roleBinding: "roleBinding";
3050
+ task: "task";
3051
+ }>>;
3052
+ }, z.core.$strip>], "type">;
3053
+ type ClientMessage = z.infer<typeof ClientMessage>;
3054
+ declare const ServerMessage: z.ZodDiscriminatedUnion<[z.ZodObject<{
3055
+ type: z.ZodLiteral<"welcome">;
3056
+ principalId: z.ZodString;
3057
+ cursor: z.ZodRecord<z.ZodString, z.ZodInt>;
3058
+ }, z.core.$strip>, z.ZodObject<{
3059
+ type: z.ZodLiteral<"event">;
3060
+ event: z.ZodIntersection<z.ZodObject<{
3061
+ v: z.ZodLiteral<1>;
3062
+ id: z.ZodString;
3063
+ seq: z.ZodInt;
3064
+ origin: z.ZodObject<{
3065
+ nodeId: z.ZodString;
3066
+ principalId: z.ZodNullable<z.ZodString>;
3067
+ }, z.core.$strip>;
3068
+ causationId: z.ZodString;
3069
+ timestamp: z.ZodISODateTime;
3070
+ sig: z.ZodNullable<z.ZodString>;
3071
+ }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
3072
+ type: z.ZodLiteral<"node.created">;
3073
+ subject: z.ZodObject<{
3074
+ kind: z.ZodLiteral<"node">;
3075
+ id: z.ZodString;
3076
+ version: z.ZodInt;
3077
+ }, z.core.$strip>;
3078
+ payload: z.ZodObject<{
3079
+ node: z.ZodObject<{
3080
+ version: z.ZodInt;
3081
+ createdAt: z.ZodISODateTime;
3082
+ updatedAt: z.ZodISODateTime;
3083
+ id: z.ZodString;
3084
+ name: z.ZodString;
3085
+ publicKey: z.ZodString;
3086
+ endpoint: z.ZodNullable<z.ZodURL>;
3087
+ status: z.ZodEnum<{
3088
+ online: "online";
3089
+ degraded: "degraded";
3090
+ offline: "offline";
3091
+ }>;
3092
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3093
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
3094
+ }, z.core.$strip>;
3095
+ }, z.core.$strip>;
3096
+ }, z.core.$strip>, z.ZodObject<{
3097
+ type: z.ZodLiteral<"node.updated">;
3098
+ subject: z.ZodObject<{
3099
+ kind: z.ZodLiteral<"node">;
3100
+ id: z.ZodString;
3101
+ version: z.ZodInt;
3102
+ }, z.core.$strip>;
3103
+ payload: z.ZodObject<{
3104
+ node: z.ZodObject<{
3105
+ version: z.ZodInt;
3106
+ createdAt: z.ZodISODateTime;
3107
+ updatedAt: z.ZodISODateTime;
3108
+ id: z.ZodString;
3109
+ name: z.ZodString;
3110
+ publicKey: z.ZodString;
3111
+ endpoint: z.ZodNullable<z.ZodURL>;
3112
+ status: z.ZodEnum<{
3113
+ online: "online";
3114
+ degraded: "degraded";
3115
+ offline: "offline";
3116
+ }>;
3117
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3118
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
3119
+ }, z.core.$strip>;
3120
+ }, z.core.$strip>;
3121
+ }, z.core.$strip>, z.ZodObject<{
3122
+ type: z.ZodLiteral<"node.removed">;
3123
+ subject: z.ZodObject<{
3124
+ kind: z.ZodLiteral<"node">;
3125
+ id: z.ZodString;
3126
+ version: z.ZodInt;
3127
+ }, z.core.$strip>;
3128
+ payload: z.ZodObject<{
3129
+ nodeId: z.ZodString;
3130
+ }, z.core.$strip>;
3131
+ }, z.core.$strip>, z.ZodObject<{
3132
+ type: z.ZodLiteral<"node.status_changed">;
3133
+ subject: z.ZodObject<{
3134
+ kind: z.ZodLiteral<"node">;
3135
+ id: z.ZodString;
3136
+ version: z.ZodInt;
3137
+ }, z.core.$strip>;
3138
+ payload: z.ZodObject<{
3139
+ nodeId: z.ZodString;
3140
+ status: z.ZodEnum<{
3141
+ online: "online";
3142
+ degraded: "degraded";
3143
+ offline: "offline";
3144
+ }>;
3145
+ previousStatus: z.ZodEnum<{
3146
+ online: "online";
3147
+ degraded: "degraded";
3148
+ offline: "offline";
3149
+ }>;
3150
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
3151
+ }, z.core.$strip>;
3152
+ }, z.core.$strip>, z.ZodObject<{
3153
+ type: z.ZodLiteral<"node.heartbeat">;
3154
+ subject: z.ZodObject<{
3155
+ kind: z.ZodLiteral<"node">;
3156
+ id: z.ZodString;
3157
+ version: z.ZodInt;
3158
+ }, z.core.$strip>;
3159
+ payload: z.ZodObject<{
3160
+ nodeId: z.ZodString;
3161
+ at: z.ZodISODateTime;
3162
+ }, z.core.$strip>;
3163
+ }, z.core.$strip>, z.ZodObject<{
3164
+ type: z.ZodLiteral<"organization.created">;
3165
+ subject: z.ZodObject<{
3166
+ kind: z.ZodLiteral<"organization">;
3167
+ id: z.ZodString;
3168
+ version: z.ZodInt;
3169
+ }, z.core.$strip>;
3170
+ payload: z.ZodObject<{
3171
+ organization: z.ZodObject<{
3172
+ version: z.ZodInt;
3173
+ createdAt: z.ZodISODateTime;
3174
+ updatedAt: z.ZodISODateTime;
3175
+ id: z.ZodString;
3176
+ nodeId: z.ZodString;
3177
+ name: z.ZodString;
3178
+ slug: z.ZodString;
3179
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3180
+ }, z.core.$strip>;
3181
+ }, z.core.$strip>;
3182
+ }, z.core.$strip>, z.ZodObject<{
3183
+ type: z.ZodLiteral<"organization.updated">;
3184
+ subject: z.ZodObject<{
3185
+ kind: z.ZodLiteral<"organization">;
3186
+ id: z.ZodString;
3187
+ version: z.ZodInt;
3188
+ }, z.core.$strip>;
3189
+ payload: z.ZodObject<{
3190
+ organization: z.ZodObject<{
3191
+ version: z.ZodInt;
3192
+ createdAt: z.ZodISODateTime;
3193
+ updatedAt: z.ZodISODateTime;
3194
+ id: z.ZodString;
3195
+ nodeId: z.ZodString;
3196
+ name: z.ZodString;
3197
+ slug: z.ZodString;
3198
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3199
+ }, z.core.$strip>;
3200
+ }, z.core.$strip>;
3201
+ }, z.core.$strip>, z.ZodObject<{
3202
+ type: z.ZodLiteral<"organization.removed">;
3203
+ subject: z.ZodObject<{
3204
+ kind: z.ZodLiteral<"organization">;
3205
+ id: z.ZodString;
3206
+ version: z.ZodInt;
3207
+ }, z.core.$strip>;
3208
+ payload: z.ZodObject<{
3209
+ organizationId: z.ZodString;
3210
+ nodeId: z.ZodString;
3211
+ }, z.core.$strip>;
3212
+ }, z.core.$strip>, z.ZodObject<{
3213
+ type: z.ZodLiteral<"agent.created">;
3214
+ subject: z.ZodObject<{
3215
+ kind: z.ZodLiteral<"agent">;
3216
+ id: z.ZodString;
3217
+ version: z.ZodInt;
3218
+ }, z.core.$strip>;
3219
+ payload: z.ZodObject<{
3220
+ agent: z.ZodObject<{
3221
+ version: z.ZodInt;
3222
+ createdAt: z.ZodISODateTime;
3223
+ updatedAt: z.ZodISODateTime;
3224
+ id: z.ZodString;
3225
+ organizationId: z.ZodString;
3226
+ nodeId: z.ZodString;
3227
+ name: z.ZodString;
3228
+ kind: z.ZodEnum<{
3229
+ standard: "standard";
3230
+ mesh: "mesh";
3231
+ }>;
3232
+ status: z.ZodEnum<{
3233
+ error: "error";
3234
+ created: "created";
3235
+ starting: "starting";
3236
+ running: "running";
3237
+ stopped: "stopped";
3238
+ }>;
3239
+ capabilities: z.ZodArray<z.ZodObject<{
3240
+ name: z.ZodString;
3241
+ version: z.ZodDefault<z.ZodString>;
3242
+ description: z.ZodOptional<z.ZodString>;
3243
+ }, z.core.$strip>>;
3244
+ model: z.ZodNullable<z.ZodString>;
3245
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3246
+ }, z.core.$strip>;
3247
+ }, z.core.$strip>;
3248
+ }, z.core.$strip>, z.ZodObject<{
3249
+ type: z.ZodLiteral<"agent.updated">;
3250
+ subject: z.ZodObject<{
3251
+ kind: z.ZodLiteral<"agent">;
3252
+ id: z.ZodString;
3253
+ version: z.ZodInt;
3254
+ }, z.core.$strip>;
3255
+ payload: z.ZodObject<{
3256
+ agent: z.ZodObject<{
3257
+ version: z.ZodInt;
3258
+ createdAt: z.ZodISODateTime;
3259
+ updatedAt: z.ZodISODateTime;
3260
+ id: z.ZodString;
3261
+ organizationId: z.ZodString;
3262
+ nodeId: z.ZodString;
3263
+ name: z.ZodString;
3264
+ kind: z.ZodEnum<{
3265
+ standard: "standard";
3266
+ mesh: "mesh";
3267
+ }>;
3268
+ status: z.ZodEnum<{
3269
+ error: "error";
3270
+ created: "created";
3271
+ starting: "starting";
3272
+ running: "running";
3273
+ stopped: "stopped";
3274
+ }>;
3275
+ capabilities: z.ZodArray<z.ZodObject<{
3276
+ name: z.ZodString;
3277
+ version: z.ZodDefault<z.ZodString>;
3278
+ description: z.ZodOptional<z.ZodString>;
3279
+ }, z.core.$strip>>;
3280
+ model: z.ZodNullable<z.ZodString>;
3281
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3282
+ }, z.core.$strip>;
3283
+ }, z.core.$strip>;
3284
+ }, z.core.$strip>, z.ZodObject<{
3285
+ type: z.ZodLiteral<"agent.status_changed">;
3286
+ subject: z.ZodObject<{
3287
+ kind: z.ZodLiteral<"agent">;
3288
+ id: z.ZodString;
3289
+ version: z.ZodInt;
3290
+ }, z.core.$strip>;
3291
+ payload: z.ZodObject<{
3292
+ agent: z.ZodObject<{
3293
+ version: z.ZodInt;
3294
+ createdAt: z.ZodISODateTime;
3295
+ updatedAt: z.ZodISODateTime;
3296
+ id: z.ZodString;
3297
+ organizationId: z.ZodString;
3298
+ nodeId: z.ZodString;
3299
+ name: z.ZodString;
3300
+ kind: z.ZodEnum<{
3301
+ standard: "standard";
3302
+ mesh: "mesh";
3303
+ }>;
3304
+ status: z.ZodEnum<{
3305
+ error: "error";
3306
+ created: "created";
3307
+ starting: "starting";
3308
+ running: "running";
3309
+ stopped: "stopped";
3310
+ }>;
3311
+ capabilities: z.ZodArray<z.ZodObject<{
3312
+ name: z.ZodString;
3313
+ version: z.ZodDefault<z.ZodString>;
3314
+ description: z.ZodOptional<z.ZodString>;
3315
+ }, z.core.$strip>>;
3316
+ model: z.ZodNullable<z.ZodString>;
3317
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3318
+ }, z.core.$strip>;
3319
+ previousStatus: z.ZodEnum<{
3320
+ error: "error";
3321
+ created: "created";
3322
+ starting: "starting";
3323
+ running: "running";
3324
+ stopped: "stopped";
3325
+ }>;
3326
+ }, z.core.$strip>;
3327
+ }, z.core.$strip>, z.ZodObject<{
3328
+ type: z.ZodLiteral<"agent.removed">;
3329
+ subject: z.ZodObject<{
3330
+ kind: z.ZodLiteral<"agent">;
3331
+ id: z.ZodString;
3332
+ version: z.ZodInt;
3333
+ }, z.core.$strip>;
3334
+ payload: z.ZodObject<{
3335
+ agentId: z.ZodString;
3336
+ organizationId: z.ZodString;
3337
+ nodeId: z.ZodString;
3338
+ }, z.core.$strip>;
3339
+ }, z.core.$strip>, z.ZodObject<{
3340
+ type: z.ZodLiteral<"mesh_agent.agent_registered">;
3341
+ subject: z.ZodObject<{
3342
+ kind: z.ZodLiteral<"agent">;
3343
+ id: z.ZodString;
3344
+ version: z.ZodInt;
3345
+ }, z.core.$strip>;
3346
+ payload: z.ZodObject<{
3347
+ meshAgentId: z.ZodString;
3348
+ agentId: z.ZodString;
3349
+ organizationId: z.ZodString;
3350
+ nodeId: z.ZodString;
3351
+ }, z.core.$strip>;
3352
+ }, z.core.$strip>, z.ZodObject<{
3353
+ type: z.ZodLiteral<"mesh_agent.agent_deregistered">;
3354
+ subject: z.ZodObject<{
3355
+ kind: z.ZodLiteral<"agent">;
3356
+ id: z.ZodString;
3357
+ version: z.ZodInt;
3358
+ }, z.core.$strip>;
3359
+ payload: z.ZodObject<{
3360
+ meshAgentId: z.ZodString;
3361
+ agentId: z.ZodString;
3362
+ organizationId: z.ZodString;
3363
+ nodeId: z.ZodString;
3364
+ }, z.core.$strip>;
3365
+ }, z.core.$strip>, z.ZodObject<{
3366
+ type: z.ZodLiteral<"link.requested">;
3367
+ subject: z.ZodObject<{
3368
+ kind: z.ZodLiteral<"link">;
3369
+ id: z.ZodString;
3370
+ version: z.ZodInt;
3371
+ }, z.core.$strip>;
3372
+ payload: z.ZodObject<{
3373
+ link: z.ZodObject<{
3374
+ version: z.ZodInt;
3375
+ createdAt: z.ZodISODateTime;
3376
+ updatedAt: z.ZodISODateTime;
3377
+ id: z.ZodString;
3378
+ aNodeId: z.ZodString;
3379
+ bNodeId: z.ZodString;
3380
+ transport: z.ZodEnum<{
3381
+ memory: "memory";
3382
+ "ws-peer": "ws-peer";
3383
+ tcp: "tcp";
3384
+ mqtt: "mqtt";
3385
+ meshtastic: "meshtastic";
3386
+ meshcore: "meshcore";
3387
+ }>;
3388
+ state: z.ZodEnum<{
3389
+ requested: "requested";
3390
+ up: "up";
3391
+ down: "down";
3392
+ }>;
3393
+ quality: z.ZodObject<{
3394
+ latencyMs: z.ZodOptional<z.ZodNumber>;
3395
+ rssi: z.ZodOptional<z.ZodNumber>;
3396
+ }, z.core.$strip>;
3397
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
3398
+ }, z.core.$strip>;
3399
+ }, z.core.$strip>;
3400
+ }, z.core.$strip>, z.ZodObject<{
3401
+ type: z.ZodLiteral<"link.up">;
3402
+ subject: z.ZodObject<{
3403
+ kind: z.ZodLiteral<"link">;
3404
+ id: z.ZodString;
3405
+ version: z.ZodInt;
3406
+ }, z.core.$strip>;
3407
+ payload: z.ZodObject<{
3408
+ link: z.ZodObject<{
3409
+ version: z.ZodInt;
3410
+ createdAt: z.ZodISODateTime;
3411
+ updatedAt: z.ZodISODateTime;
3412
+ id: z.ZodString;
3413
+ aNodeId: z.ZodString;
3414
+ bNodeId: z.ZodString;
3415
+ transport: z.ZodEnum<{
3416
+ memory: "memory";
3417
+ "ws-peer": "ws-peer";
3418
+ tcp: "tcp";
3419
+ mqtt: "mqtt";
3420
+ meshtastic: "meshtastic";
3421
+ meshcore: "meshcore";
3422
+ }>;
3423
+ state: z.ZodEnum<{
3424
+ requested: "requested";
3425
+ up: "up";
3426
+ down: "down";
3427
+ }>;
3428
+ quality: z.ZodObject<{
3429
+ latencyMs: z.ZodOptional<z.ZodNumber>;
3430
+ rssi: z.ZodOptional<z.ZodNumber>;
3431
+ }, z.core.$strip>;
3432
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
3433
+ }, z.core.$strip>;
3434
+ }, z.core.$strip>;
3435
+ }, z.core.$strip>, z.ZodObject<{
3436
+ type: z.ZodLiteral<"link.updated">;
3437
+ subject: z.ZodObject<{
3438
+ kind: z.ZodLiteral<"link">;
3439
+ id: z.ZodString;
3440
+ version: z.ZodInt;
3441
+ }, z.core.$strip>;
3442
+ payload: z.ZodObject<{
3443
+ link: z.ZodObject<{
3444
+ version: z.ZodInt;
3445
+ createdAt: z.ZodISODateTime;
3446
+ updatedAt: z.ZodISODateTime;
3447
+ id: z.ZodString;
3448
+ aNodeId: z.ZodString;
3449
+ bNodeId: z.ZodString;
3450
+ transport: z.ZodEnum<{
3451
+ memory: "memory";
3452
+ "ws-peer": "ws-peer";
3453
+ tcp: "tcp";
3454
+ mqtt: "mqtt";
3455
+ meshtastic: "meshtastic";
3456
+ meshcore: "meshcore";
3457
+ }>;
3458
+ state: z.ZodEnum<{
3459
+ requested: "requested";
3460
+ up: "up";
3461
+ down: "down";
3462
+ }>;
3463
+ quality: z.ZodObject<{
3464
+ latencyMs: z.ZodOptional<z.ZodNumber>;
3465
+ rssi: z.ZodOptional<z.ZodNumber>;
3466
+ }, z.core.$strip>;
3467
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
3468
+ }, z.core.$strip>;
3469
+ }, z.core.$strip>;
3470
+ }, z.core.$strip>, z.ZodObject<{
3471
+ type: z.ZodLiteral<"link.down">;
3472
+ subject: z.ZodObject<{
3473
+ kind: z.ZodLiteral<"link">;
3474
+ id: z.ZodString;
3475
+ version: z.ZodInt;
3476
+ }, z.core.$strip>;
3477
+ payload: z.ZodObject<{
3478
+ link: z.ZodObject<{
3479
+ version: z.ZodInt;
3480
+ createdAt: z.ZodISODateTime;
3481
+ updatedAt: z.ZodISODateTime;
3482
+ id: z.ZodString;
3483
+ aNodeId: z.ZodString;
3484
+ bNodeId: z.ZodString;
3485
+ transport: z.ZodEnum<{
3486
+ memory: "memory";
3487
+ "ws-peer": "ws-peer";
3488
+ tcp: "tcp";
3489
+ mqtt: "mqtt";
3490
+ meshtastic: "meshtastic";
3491
+ meshcore: "meshcore";
3492
+ }>;
3493
+ state: z.ZodEnum<{
3494
+ requested: "requested";
3495
+ up: "up";
3496
+ down: "down";
3497
+ }>;
3498
+ quality: z.ZodObject<{
3499
+ latencyMs: z.ZodOptional<z.ZodNumber>;
3500
+ rssi: z.ZodOptional<z.ZodNumber>;
3501
+ }, z.core.$strip>;
3502
+ lastSeenAt: z.ZodNullable<z.ZodISODateTime>;
3503
+ }, z.core.$strip>;
3504
+ }, z.core.$strip>;
3505
+ }, z.core.$strip>, z.ZodObject<{
3506
+ type: z.ZodLiteral<"link.removed">;
3507
+ subject: z.ZodObject<{
3508
+ kind: z.ZodLiteral<"link">;
3509
+ id: z.ZodString;
3510
+ version: z.ZodInt;
3511
+ }, z.core.$strip>;
3512
+ payload: z.ZodObject<{
3513
+ linkId: z.ZodString;
3514
+ }, z.core.$strip>;
3515
+ }, z.core.$strip>, z.ZodObject<{
3516
+ type: z.ZodLiteral<"role.granted">;
3517
+ subject: z.ZodObject<{
3518
+ kind: z.ZodLiteral<"roleBinding">;
3519
+ id: z.ZodString;
3520
+ version: z.ZodInt;
3521
+ }, z.core.$strip>;
3522
+ payload: z.ZodObject<{
3523
+ binding: z.ZodObject<{
3524
+ id: z.ZodString;
3525
+ principalId: z.ZodString;
3526
+ role: z.ZodEnum<{
3527
+ node_owner: "node_owner";
3528
+ org_owner: "org_owner";
3529
+ }>;
3530
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
3531
+ type: z.ZodLiteral<"node">;
3532
+ nodeId: z.ZodString;
3533
+ }, z.core.$strip>, z.ZodObject<{
3534
+ type: z.ZodLiteral<"organization">;
3535
+ organizationId: z.ZodString;
3536
+ nodeId: z.ZodString;
3537
+ }, z.core.$strip>], "type">;
3538
+ createdAt: z.ZodISODateTime;
3539
+ }, z.core.$strip>;
3540
+ }, z.core.$strip>;
3541
+ }, z.core.$strip>, z.ZodObject<{
3542
+ type: z.ZodLiteral<"role.revoked">;
3543
+ subject: z.ZodObject<{
3544
+ kind: z.ZodLiteral<"roleBinding">;
3545
+ id: z.ZodString;
3546
+ version: z.ZodInt;
3547
+ }, z.core.$strip>;
3548
+ payload: z.ZodObject<{
3549
+ binding: z.ZodObject<{
3550
+ id: z.ZodString;
3551
+ principalId: z.ZodString;
3552
+ role: z.ZodEnum<{
3553
+ node_owner: "node_owner";
3554
+ org_owner: "org_owner";
3555
+ }>;
3556
+ scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
3557
+ type: z.ZodLiteral<"node">;
3558
+ nodeId: z.ZodString;
3559
+ }, z.core.$strip>, z.ZodObject<{
3560
+ type: z.ZodLiteral<"organization">;
3561
+ organizationId: z.ZodString;
3562
+ nodeId: z.ZodString;
3563
+ }, z.core.$strip>], "type">;
3564
+ createdAt: z.ZodISODateTime;
3565
+ }, z.core.$strip>;
3566
+ }, z.core.$strip>;
3567
+ }, z.core.$strip>, z.ZodObject<{
3568
+ type: z.ZodLiteral<"task.requested">;
3569
+ subject: z.ZodObject<{
3570
+ kind: z.ZodLiteral<"task">;
3571
+ id: z.ZodString;
3572
+ version: z.ZodInt;
3573
+ }, z.core.$strip>;
3574
+ payload: z.ZodObject<{
3575
+ task: z.ZodObject<{
3576
+ id: z.ZodString;
3577
+ capability: z.ZodString;
3578
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3579
+ status: z.ZodEnum<{
3580
+ requested: "requested";
3581
+ accepted: "accepted";
3582
+ completed: "completed";
3583
+ failed: "failed";
3584
+ }>;
3585
+ requester: z.ZodObject<{
3586
+ agentId: z.ZodString;
3587
+ organizationId: z.ZodString;
3588
+ nodeId: z.ZodString;
3589
+ }, z.core.$strip>;
3590
+ requesterMeshAgentId: z.ZodString;
3591
+ assignee: z.ZodObject<{
3592
+ organizationId: z.ZodString;
3593
+ nodeId: z.ZodString;
3594
+ meshAgentId: z.ZodString;
3595
+ }, z.core.$strip>;
3596
+ provider: z.ZodNullable<z.ZodObject<{
3597
+ agentId: z.ZodString;
3598
+ organizationId: z.ZodString;
3599
+ nodeId: z.ZodString;
3600
+ }, z.core.$strip>>;
3601
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3602
+ error: z.ZodNullable<z.ZodObject<{
3603
+ code: z.ZodString;
3604
+ message: z.ZodString;
3605
+ }, z.core.$strip>>;
3606
+ steps: z.ZodArray<z.ZodObject<{
3607
+ name: z.ZodEnum<{
3608
+ observe: "observe";
3609
+ reason: "reason";
3610
+ act: "act";
3611
+ verify: "verify";
3612
+ }>;
3613
+ at: z.ZodISODateTime;
3614
+ summary: z.ZodString;
3615
+ }, z.core.$strip>>;
3616
+ model: z.ZodNullable<z.ZodString>;
3617
+ version: z.ZodInt;
3618
+ createdAt: z.ZodISODateTime;
3619
+ updatedAt: z.ZodISODateTime;
3620
+ }, z.core.$strip>;
3621
+ }, z.core.$strip>;
3622
+ }, z.core.$strip>, z.ZodObject<{
3623
+ type: z.ZodLiteral<"task.accepted">;
3624
+ subject: z.ZodObject<{
3625
+ kind: z.ZodLiteral<"task">;
3626
+ id: z.ZodString;
3627
+ version: z.ZodInt;
3628
+ }, z.core.$strip>;
3629
+ payload: z.ZodObject<{
3630
+ task: z.ZodObject<{
3631
+ id: z.ZodString;
3632
+ capability: z.ZodString;
3633
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3634
+ status: z.ZodEnum<{
3635
+ requested: "requested";
3636
+ accepted: "accepted";
3637
+ completed: "completed";
3638
+ failed: "failed";
3639
+ }>;
3640
+ requester: z.ZodObject<{
3641
+ agentId: z.ZodString;
3642
+ organizationId: z.ZodString;
3643
+ nodeId: z.ZodString;
3644
+ }, z.core.$strip>;
3645
+ requesterMeshAgentId: z.ZodString;
3646
+ assignee: z.ZodObject<{
3647
+ organizationId: z.ZodString;
3648
+ nodeId: z.ZodString;
3649
+ meshAgentId: z.ZodString;
3650
+ }, z.core.$strip>;
3651
+ provider: z.ZodNullable<z.ZodObject<{
3652
+ agentId: z.ZodString;
3653
+ organizationId: z.ZodString;
3654
+ nodeId: z.ZodString;
3655
+ }, z.core.$strip>>;
3656
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3657
+ error: z.ZodNullable<z.ZodObject<{
3658
+ code: z.ZodString;
3659
+ message: z.ZodString;
3660
+ }, z.core.$strip>>;
3661
+ steps: z.ZodArray<z.ZodObject<{
3662
+ name: z.ZodEnum<{
3663
+ observe: "observe";
3664
+ reason: "reason";
3665
+ act: "act";
3666
+ verify: "verify";
3667
+ }>;
3668
+ at: z.ZodISODateTime;
3669
+ summary: z.ZodString;
3670
+ }, z.core.$strip>>;
3671
+ model: z.ZodNullable<z.ZodString>;
3672
+ version: z.ZodInt;
3673
+ createdAt: z.ZodISODateTime;
3674
+ updatedAt: z.ZodISODateTime;
3675
+ }, z.core.$strip>;
3676
+ }, z.core.$strip>;
3677
+ }, z.core.$strip>, z.ZodObject<{
3678
+ type: z.ZodLiteral<"task.completed">;
3679
+ subject: z.ZodObject<{
3680
+ kind: z.ZodLiteral<"task">;
3681
+ id: z.ZodString;
3682
+ version: z.ZodInt;
3683
+ }, z.core.$strip>;
3684
+ payload: z.ZodObject<{
3685
+ task: z.ZodObject<{
3686
+ id: z.ZodString;
3687
+ capability: z.ZodString;
3688
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3689
+ status: z.ZodEnum<{
3690
+ requested: "requested";
3691
+ accepted: "accepted";
3692
+ completed: "completed";
3693
+ failed: "failed";
3694
+ }>;
3695
+ requester: z.ZodObject<{
3696
+ agentId: z.ZodString;
3697
+ organizationId: z.ZodString;
3698
+ nodeId: z.ZodString;
3699
+ }, z.core.$strip>;
3700
+ requesterMeshAgentId: z.ZodString;
3701
+ assignee: z.ZodObject<{
3702
+ organizationId: z.ZodString;
3703
+ nodeId: z.ZodString;
3704
+ meshAgentId: z.ZodString;
3705
+ }, z.core.$strip>;
3706
+ provider: z.ZodNullable<z.ZodObject<{
3707
+ agentId: z.ZodString;
3708
+ organizationId: z.ZodString;
3709
+ nodeId: z.ZodString;
3710
+ }, z.core.$strip>>;
3711
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3712
+ error: z.ZodNullable<z.ZodObject<{
3713
+ code: z.ZodString;
3714
+ message: z.ZodString;
3715
+ }, z.core.$strip>>;
3716
+ steps: z.ZodArray<z.ZodObject<{
3717
+ name: z.ZodEnum<{
3718
+ observe: "observe";
3719
+ reason: "reason";
3720
+ act: "act";
3721
+ verify: "verify";
3722
+ }>;
3723
+ at: z.ZodISODateTime;
3724
+ summary: z.ZodString;
3725
+ }, z.core.$strip>>;
3726
+ model: z.ZodNullable<z.ZodString>;
3727
+ version: z.ZodInt;
3728
+ createdAt: z.ZodISODateTime;
3729
+ updatedAt: z.ZodISODateTime;
3730
+ }, z.core.$strip>;
3731
+ }, z.core.$strip>;
3732
+ }, z.core.$strip>, z.ZodObject<{
3733
+ type: z.ZodLiteral<"task.failed">;
3734
+ subject: z.ZodObject<{
3735
+ kind: z.ZodLiteral<"task">;
3736
+ id: z.ZodString;
3737
+ version: z.ZodInt;
3738
+ }, z.core.$strip>;
3739
+ payload: z.ZodObject<{
3740
+ task: z.ZodObject<{
3741
+ id: z.ZodString;
3742
+ capability: z.ZodString;
3743
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3744
+ status: z.ZodEnum<{
3745
+ requested: "requested";
3746
+ accepted: "accepted";
3747
+ completed: "completed";
3748
+ failed: "failed";
3749
+ }>;
3750
+ requester: z.ZodObject<{
3751
+ agentId: z.ZodString;
3752
+ organizationId: z.ZodString;
3753
+ nodeId: z.ZodString;
3754
+ }, z.core.$strip>;
3755
+ requesterMeshAgentId: z.ZodString;
3756
+ assignee: z.ZodObject<{
3757
+ organizationId: z.ZodString;
3758
+ nodeId: z.ZodString;
3759
+ meshAgentId: z.ZodString;
3760
+ }, z.core.$strip>;
3761
+ provider: z.ZodNullable<z.ZodObject<{
3762
+ agentId: z.ZodString;
3763
+ organizationId: z.ZodString;
3764
+ nodeId: z.ZodString;
3765
+ }, z.core.$strip>>;
3766
+ output: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3767
+ error: z.ZodNullable<z.ZodObject<{
3768
+ code: z.ZodString;
3769
+ message: z.ZodString;
3770
+ }, z.core.$strip>>;
3771
+ steps: z.ZodArray<z.ZodObject<{
3772
+ name: z.ZodEnum<{
3773
+ observe: "observe";
3774
+ reason: "reason";
3775
+ act: "act";
3776
+ verify: "verify";
3777
+ }>;
3778
+ at: z.ZodISODateTime;
3779
+ summary: z.ZodString;
3780
+ }, z.core.$strip>>;
3781
+ model: z.ZodNullable<z.ZodString>;
3782
+ version: z.ZodInt;
3783
+ createdAt: z.ZodISODateTime;
3784
+ updatedAt: z.ZodISODateTime;
3785
+ }, z.core.$strip>;
3786
+ }, z.core.$strip>;
3787
+ }, z.core.$strip>], "type">>;
3788
+ }, z.core.$strip>, z.ZodObject<{
3789
+ type: z.ZodLiteral<"resync.required">;
3790
+ reason: z.ZodString;
3791
+ }, z.core.$strip>, z.ZodObject<{
3792
+ type: z.ZodLiteral<"error">;
3793
+ code: z.ZodString;
3794
+ message: z.ZodString;
3795
+ }, z.core.$strip>], "type">;
3796
+ type ServerMessage = z.infer<typeof ServerMessage>;
3797
+ /** WebSocket close codes used by the node server. */
3798
+ declare const RealtimeCloseCode: {
3799
+ readonly normal: 1000;
3800
+ readonly goingAway: 1001;
3801
+ readonly badMessage: 4400;
3802
+ readonly unauthenticated: 4401;
3803
+ readonly helloTimeout: 4408;
3804
+ readonly resyncRequired: 4409;
3805
+ };
3806
+
3807
+ export { Agent, AgentCreated, AgentId, AgentKind, AgentRemoved, AgentStatus, AgentStatusChanged, AgentUpdated, Capability, CapabilityName, CapabilityProvider, ClientMessage, CommandId, CreateAgentRequest, type CreateAgentRequestInput, CreateLinkRequest, CreateOrganizationRequest, CreatePrincipalRequest, CreatePrincipalResponse, Credential, DOMAIN_EVENT_TYPES, DisplayName, DomainEvent, type DomainEventOf, type DomainEventType, ENVELOPE_VERSION, EntityAudit, EnvelopeMeta, EventId, GrantOwnerRequest, HealthResponse, ID_PREFIX, type IdKind, Link, LinkDown, LinkId, LinkQuality, LinkRemoved, LinkRequested, LinkState, LinkUp, LinkUpdated, Me, MeshAgentAgentDeregistered, MeshAgentAgentRegistered, MeshCursor, MeshEvent, MeshSnapshot, type MeshState, MeshStats, Metadata, Node, NodeCreated, NodeDetail, NodeHeartbeat, NodeId, NodeRemoved, NodeStatus, NodeStatusChanged, NodeUpdated, Organization, OrganizationCreated, OrganizationId, OrganizationRemoved, OrganizationUpdated, Page, type PageOf, PageQuery, Principal, PrincipalId, PrincipalKind, ProblemDetails, type ProjectionOp, RealtimeCloseCode, RequestTaskRequest, type RequestTaskRequestInput, Role, RoleBinding, RoleBindingId, RoleGranted, RoleRevoked, RoleScope, ServerMessage, Slug, TERMINAL_TASK_STATUSES, Task, TaskAccepted, TaskAssignee, TaskCompleted, TaskError, TaskFailed, TaskId, TaskParty, TaskRequested, TaskStatus, TaskStep, Timestamp, Topic, TransportKind, ULID_PATTERN, UpdateAgentRequest, UpdateNodeRequest, UpdateOrganizationRequest, Version, applyMeshEvent, decodeCursor, encodeCursor, meshStateFromSnapshot, prefixedId, project };