@requence/service 0.8.1 → 0.8.2-edge.1151

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/build/chunk-974rc2jy.js +200 -0
  2. package/build/chunk-974rc2jy.js.map +12 -0
  3. package/build/cli.js +1 -1
  4. package/build/index.js +207 -36
  5. package/build/index.js.map +8 -7
  6. package/build/types/helpers/src/protocol/NodeTree.d.ts +94 -4
  7. package/build/types/helpers/src/protocol/NodeTree.d.ts.map +1 -1
  8. package/build/types/helpers/src/protocol/clientProperties.d.ts +116 -0
  9. package/build/types/helpers/src/protocol/clientProperties.d.ts.map +1 -0
  10. package/build/types/helpers/src/protocol/command.d.ts +16 -0
  11. package/build/types/helpers/src/protocol/command.d.ts.map +1 -1
  12. package/build/types/helpers/src/protocol/index.d.ts +1 -0
  13. package/build/types/helpers/src/protocol/index.d.ts.map +1 -1
  14. package/build/types/helpers/src/protocol/nodeType.d.ts +22 -0
  15. package/build/types/helpers/src/protocol/nodeType.d.ts.map +1 -1
  16. package/build/types/helpers/src/protocol/templateNodeTypes.d.ts.map +1 -1
  17. package/build/types/helpers/src/protocol/treeNodes.d.ts +82 -0
  18. package/build/types/helpers/src/protocol/treeNodes.d.ts.map +1 -1
  19. package/build/types/helpers/src/protocol/update.d.ts +32 -2
  20. package/build/types/helpers/src/protocol/update.d.ts.map +1 -1
  21. package/build/types/helpers/src/utils/amqpPublishRetry.d.ts +40 -0
  22. package/build/types/helpers/src/utils/amqpPublishRetry.d.ts.map +1 -1
  23. package/build/types/service/src/boundary.d.ts +12 -0
  24. package/build/types/service/src/boundary.d.ts.map +1 -1
  25. package/build/types/service/src/createAmqpConnection.d.ts +9 -1
  26. package/build/types/service/src/createAmqpConnection.d.ts.map +1 -1
  27. package/build/types/service/src/errors.d.ts +14 -0
  28. package/build/types/service/src/errors.d.ts.map +1 -1
  29. package/build/types/service/src/index.d.ts +18 -2
  30. package/build/types/service/src/index.d.ts.map +1 -1
  31. package/package.json +2 -1
  32. package/build/chunk-8r349zge.js +0 -99
  33. package/build/chunk-8r349zge.js.map +0 -11
@@ -13,7 +13,7 @@ type CriticalGroup = {
13
13
  nodeId: string;
14
14
  name: OutputName;
15
15
  }[];
16
- type DataSet = {
16
+ export type DataSet = {
17
17
  data: unknown;
18
18
  overwrite: boolean;
19
19
  time: number;
@@ -27,6 +27,20 @@ export declare class NodeTree {
27
27
  private edges;
28
28
  private data;
29
29
  private overriddenNodeData;
30
+ /**
31
+ * Payload ids whose own storage field is durable (issue #118). `this.data` is
32
+ * write-once — a fresh UUID per write, an explicit delete to drop one — so the
33
+ * difference against it is exactly what a write has to carry, and a
34
+ * steady-state write carries none of it.
35
+ */
36
+ private persistedDataIds;
37
+ /**
38
+ * Payloads whose field is still in storage although no edge references them
39
+ * any more. Their delete is issued only AFTER the snapshot that dropped them
40
+ * is durable, so they stay in the delta until it actually lands — an
41
+ * interrupted delete leaks a field, it never strands a reference.
42
+ */
43
+ private orphanedDataIds;
30
44
  readonly cycles: {
31
45
  node: Node;
32
46
  name: OutputName;
@@ -34,7 +48,16 @@ export declare class NodeTree {
34
48
  readonly entryNode: Extract<Node, {
35
49
  type: 'entry';
36
50
  }>;
37
- constructor({ nodes, edges }: NodeTreeOptions, _data?: Map<string, DataSet>, _cycles?: Cycle[] | null, _overriddenNodeData?: Map<string, Record<string, unknown>>);
51
+ constructor({ nodes, edges }: NodeTreeOptions, _cycles?: Cycle[] | null, _overriddenNodeData?: Map<string, Record<string, unknown>>);
52
+ /**
53
+ * The GRAPH, never the data that flowed through it (issue #118). `this.data`
54
+ * is deliberately absent: it is persisted per field, so a write is a function
55
+ * of graph size — bounded by the template — instead of a function of
56
+ * everything the task has ever emitted.
57
+ *
58
+ * `nodes` and `edges` mutate as the graph runs and `overriddenNodeData` is
59
+ * mutated by `overrideAggregatedNodeData`, so all three have to stay here.
60
+ */
38
61
  pack(): readonly [({
39
62
  id: string;
40
63
  type: "entry";
@@ -72,6 +95,8 @@ export declare class NodeTree {
72
95
  retryDelay?: number | undefined;
73
96
  mode: "CONTINUOUS" | "LINEAR";
74
97
  privileged: boolean;
98
+ wireCodec?: "json" | "msgpack" | undefined;
99
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
75
100
  configurationServices?: {
76
101
  outputs: {
77
102
  name: string | null;
@@ -104,6 +129,8 @@ export declare class NodeTree {
104
129
  retryDelay?: number | undefined;
105
130
  mode: "CONTINUOUS" | "LINEAR";
106
131
  privileged: boolean;
132
+ wireCodec?: "json" | "msgpack" | undefined;
133
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
107
134
  configurationServices?: /*elided*/ any[] | undefined;
108
135
  }[] | undefined;
109
136
  } | {
@@ -157,11 +184,41 @@ export declare class NodeTree {
157
184
  type: "comment";
158
185
  text: string;
159
186
  alias?: string | undefined;
160
- })[], ExtendedEdge[], Map<string, DataSet>, {
187
+ })[], ExtendedEdge[], {
161
188
  node: Node;
162
189
  name: OutputName;
163
190
  }[][], Map<string, Record<string, unknown>>];
164
- static unpack([nodes, edges, _data, _cycles, _overriddenNodeData]: ReturnType<typeof NodeTree.prototype.pack>): NodeTree;
191
+ static unpack([nodes, edges, _cycles, _overriddenNodeData]: ReturnType<typeof NodeTree.prototype.pack>): NodeTree;
192
+ /**
193
+ * Attaches the write-once payloads read back from their own storage fields
194
+ * (issue #118). They are durable by definition — a restore is reading them —
195
+ * so the delta bookkeeping starts from exactly this set.
196
+ */
197
+ restoreData(data: Map<string, DataSet>): void;
198
+ /**
199
+ * What storage is missing: the payloads written since the last confirmed
200
+ * write, and the durable ones no edge references any more.
201
+ *
202
+ * Call `gc()` first — an entry it would drop is otherwise still in
203
+ * `this.data` and therefore reported as a payload to write.
204
+ */
205
+ dataDelta(): {
206
+ writes: [string, DataSet][];
207
+ obsolete: string[];
208
+ };
209
+ /**
210
+ * The write that carried `writtenIds` and dropped `obsoleteIds` is durable:
211
+ * the first group becomes storage's current content, the second becomes
212
+ * orphans awaiting their delete.
213
+ *
214
+ * Takes both groups explicitly rather than re-deriving them from `this.data`:
215
+ * the machine may have produced further payloads while the write was in
216
+ * flight, and marking one of those durable would drop it from every later
217
+ * delta — it would never be written at all.
218
+ */
219
+ confirmDataWrite(writtenIds: Iterable<string>, obsoleteIds: Iterable<string>): void;
220
+ /** The delete of these fields landed — storage holds nothing for them. */
221
+ confirmDataDelete(deletedIds: Iterable<string>): void;
165
222
  static get ERROR(): string;
166
223
  getCriticalGroups(nodeId: string, allowMultipleOutputs?: boolean): CriticalGroup[];
167
224
  getNodes(condition?: (node: Node) => boolean): ({
@@ -201,6 +258,8 @@ export declare class NodeTree {
201
258
  retryDelay?: number | undefined;
202
259
  mode: "CONTINUOUS" | "LINEAR";
203
260
  privileged: boolean;
261
+ wireCodec?: "json" | "msgpack" | undefined;
262
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
204
263
  configurationServices?: {
205
264
  outputs: {
206
265
  name: string | null;
@@ -233,6 +292,8 @@ export declare class NodeTree {
233
292
  retryDelay?: number | undefined;
234
293
  mode: "CONTINUOUS" | "LINEAR";
235
294
  privileged: boolean;
295
+ wireCodec?: "json" | "msgpack" | undefined;
296
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
236
297
  configurationServices?: /*elided*/ any[] | undefined;
237
298
  }[] | undefined;
238
299
  } | {
@@ -325,6 +386,8 @@ export declare class NodeTree {
325
386
  retryDelay?: number | undefined;
326
387
  mode: "CONTINUOUS" | "LINEAR";
327
388
  privileged: boolean;
389
+ wireCodec?: "json" | "msgpack" | undefined;
390
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
328
391
  configurationServices?: {
329
392
  outputs: {
330
393
  name: string | null;
@@ -357,6 +420,8 @@ export declare class NodeTree {
357
420
  retryDelay?: number | undefined;
358
421
  mode: "CONTINUOUS" | "LINEAR";
359
422
  privileged: boolean;
423
+ wireCodec?: "json" | "msgpack" | undefined;
424
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
360
425
  configurationServices?: /*elided*/ any[] | undefined;
361
426
  }[] | undefined;
362
427
  } | {
@@ -449,6 +514,8 @@ export declare class NodeTree {
449
514
  retryDelay?: number | undefined;
450
515
  mode: "CONTINUOUS" | "LINEAR";
451
516
  privileged: boolean;
517
+ wireCodec?: "json" | "msgpack" | undefined;
518
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
452
519
  configurationServices?: {
453
520
  outputs: {
454
521
  name: string | null;
@@ -481,6 +548,8 @@ export declare class NodeTree {
481
548
  retryDelay?: number | undefined;
482
549
  mode: "CONTINUOUS" | "LINEAR";
483
550
  privileged: boolean;
551
+ wireCodec?: "json" | "msgpack" | undefined;
552
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
484
553
  configurationServices?: /*elided*/ any[] | undefined;
485
554
  }[] | undefined;
486
555
  } | {
@@ -572,6 +641,8 @@ export declare class NodeTree {
572
641
  retryDelay?: number | undefined;
573
642
  mode: "CONTINUOUS" | "LINEAR";
574
643
  privileged: boolean;
644
+ wireCodec?: "json" | "msgpack" | undefined;
645
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
575
646
  configurationServices?: {
576
647
  outputs: {
577
648
  name: string | null;
@@ -604,6 +675,8 @@ export declare class NodeTree {
604
675
  retryDelay?: number | undefined;
605
676
  mode: "CONTINUOUS" | "LINEAR";
606
677
  privileged: boolean;
678
+ wireCodec?: "json" | "msgpack" | undefined;
679
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
607
680
  configurationServices?: /*elided*/ any[] | undefined;
608
681
  }[] | undefined;
609
682
  } | {
@@ -708,6 +781,8 @@ export declare class NodeTree {
708
781
  retryDelay?: number | undefined;
709
782
  mode: "CONTINUOUS" | "LINEAR";
710
783
  privileged: boolean;
784
+ wireCodec?: "json" | "msgpack" | undefined;
785
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
711
786
  configurationServices?: {
712
787
  outputs: {
713
788
  name: string | null;
@@ -740,6 +815,8 @@ export declare class NodeTree {
740
815
  retryDelay?: number | undefined;
741
816
  mode: "CONTINUOUS" | "LINEAR";
742
817
  privileged: boolean;
818
+ wireCodec?: "json" | "msgpack" | undefined;
819
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
743
820
  configurationServices?: /*elided*/ any[] | undefined;
744
821
  }[] | undefined;
745
822
  } | {
@@ -809,6 +886,19 @@ export declare class NodeTree {
809
886
  getAggregatedData(targetNodeId: string): Record<string, unknown>;
810
887
  getAggregatedEdgeData(edgeId: string): Record<string, unknown>;
811
888
  reset(): void;
889
+ /**
890
+ * Drops every payload no edge references any more.
891
+ *
892
+ * A `Set`, not an array (issue #117): this runs first thing in
893
+ * `machinePacker.packMutable`, so once per inbound message under the
894
+ * persist-before-ack contract — 570 flushes/minute on edge during the
895
+ * 2026-08-06 load test. Testing each candidate against an array made the work
896
+ * edges × data on every one of those calls.
897
+ *
898
+ * Deleting straight out of the iteration is safe (a `Map` iterator tolerates
899
+ * removal of the entry it is on) and spares the intermediate array of keys.
900
+ * The deletion behaviour is unchanged; only the lookup moved.
901
+ */
812
902
  gc(): void;
813
903
  overrideAggregatedNodeData(nodeId: string, data: Record<string, unknown>): void;
814
904
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NodeTree.d.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requence_service_version';
4
+ readonly capabilities: 'requence_capabilities';
5
+ readonly name: 'requence_name';
6
+ readonly devOverlay: 'requence_dev_overlay';
7
+ };
8
+ export declare const MAX_SERVICE_NAME_LENGTH = 64;
9
+ export declare const MAX_CAPABILITIES_LENGTH = 512;
10
+ export declare const WIRE_JSON_1 = "wire:json1";
11
+ export declare const WIRE_MSGPACK_1 = "wire:msgpack1";
12
+ export declare const SERVICE_WIRE_CAPABILITIES: ReadonlyArray<string>;
13
+ export interface BuildServiceClientPropertiesParams {
14
+ /** `<language>@<version>`, e.g. `javascript@1.2.3`. */
15
+ libVersion: string;
16
+ /** The service version this connection consumes, e.g. `v1`. */
17
+ serviceVersion: string;
18
+ /** Optional author-chosen debugging label. */
19
+ name?: string;
20
+ devOverlay?: boolean;
21
+ capabilities?: ReadonlyArray<string>;
22
+ }
23
+ export declare function buildServiceClientProperties({ libVersion, serviceVersion, name, devOverlay, capabilities, }: BuildServiceClientPropertiesParams): Record<string, string>;
24
+ export interface ServiceReplica {
25
+ libVersion: string | null;
26
+ serviceVersion: string | null;
27
+ capabilities: string[];
28
+ name: string | null;
29
+ devOverlay: boolean;
30
+ }
31
+ export declare function readServiceClientProperties(raw: unknown): ServiceReplica;
32
+ export interface FleetVerdict {
33
+ libVersion: string | null;
34
+ capabilities: string[];
35
+ complete: boolean;
36
+ }
37
+ export declare function foldServiceFleet(replicas: ReadonlyArray<ServiceReplica>, attachedCount: number): FleetVerdict;
38
+ export declare function wireCodecForFleet(verdict: FleetVerdict): 'json' | 'msgpack';
39
+ export declare const CAPABILITY_HEADER_KEYS: {
40
+ readonly requires: 'requires';
41
+ readonly mismatch: 'capabilityMismatch';
42
+ readonly reroutes: 'capabilityReroutes';
43
+ };
44
+ export declare function requiredCapabilitiesForCodec(codec: 'json' | 'msgpack'): string[];
45
+ export declare function buildRequiresHeader(capabilities: ReadonlyArray<string>): Record<string, string>;
46
+ export declare function readRequiredCapabilities(headers: unknown): string[];
47
+ export declare function unsupportedCapabilities(required: ReadonlyArray<string>, supported?: ReadonlyArray<string>): string[];
48
+ export declare function unsupportedCapabilityMessage(unsupported: ReadonlyArray<string>): string;
49
+ export declare const IDENTITY_HEADER_KEYS: {
50
+ readonly libVersion: 'libVersion';
51
+ readonly name: 'serviceName';
52
+ readonly capabilities: 'capabilities';
53
+ };
54
+ export interface ServiceIdentity {
55
+ libVersion: string | null;
56
+ name: string | null;
57
+ capabilities: string[];
58
+ }
59
+ export interface BuildServiceIdentityHeadersParams {
60
+ libVersion: string;
61
+ name?: string;
62
+ capabilities?: ReadonlyArray<string>;
63
+ }
64
+ export declare function buildServiceIdentityHeaders({ libVersion, name, capabilities, }: BuildServiceIdentityHeadersParams): Record<string, string>;
65
+ export declare function readServiceIdentity(raw: unknown): ServiceIdentity | null;
66
+ /**
67
+ * WHY a service node got the codec it got.
68
+ *
69
+ * `wireCodecForFleet` answers `json` for several distinct situations that matter
70
+ * very differently in an incident: a service that is simply offline looks nothing
71
+ * like a management API that is down, which in turn looks nothing like a genuine
72
+ * mixed fleet. Recording only the codec makes "why is this json?" unanswerable
73
+ * without shell access to the box, so the reason travels beside it.
74
+ *
75
+ * A compact token rather than prose: it is baked into every service node of every
76
+ * task, and the wording belongs to the UI, which can then change without touching
77
+ * the tree or the operator.
78
+ */
79
+ export declare const WIRE_CODEC_REASON_VALUES: readonly [
80
+ /** msgpack: every attached replica claimed the capability. */
81
+ 'fleet-capable',
82
+ /** The broker's management API is unreachable, so no fleet can be judged. */
83
+ 'presence-unavailable',
84
+ /** Nothing is attached to this service version's queue at all. */
85
+ 'no-replicas',
86
+ /**
87
+ * Something IS consuming the queue that never announced itself. An SDK too old
88
+ * to announce is also too old to decode, so this folds to json — and it is the
89
+ * one reason that looks like a bug but is the design working.
90
+ */
91
+ 'replicas-unaccounted',
92
+ /** A complete fleet, but at least one replica cannot decode msgpack. */
93
+ 'missing-capability'];
94
+ export type WireCodecReason = (typeof WIRE_CODEC_REASON_VALUES)[number];
95
+ /** Named accessors, so call sites read as intent rather than as string literals. */
96
+ export declare const WIRE_CODEC_REASONS: {
97
+ readonly fleetCapable: 'fleet-capable';
98
+ readonly presenceUnavailable: 'presence-unavailable';
99
+ readonly noReplicas: 'no-replicas';
100
+ readonly replicasUnaccounted: 'replicas-unaccounted';
101
+ readonly missingCapability: 'missing-capability';
102
+ };
103
+ /**
104
+ * Explains a `json` verdict from the facts the fleet monitor holds.
105
+ *
106
+ * Split from `wireCodecForFleet` rather than folded into it because the codec
107
+ * decision needs only the verdict, while the explanation needs the counts behind
108
+ * it — and the codec must stay trivially checkable.
109
+ */
110
+ export declare function wireCodecReason({ codec, presenceAvailable, replicaCount, consumerCount, }: {
111
+ codec: 'json' | 'msgpack';
112
+ presenceAvailable: boolean;
113
+ replicaCount: number;
114
+ consumerCount: number;
115
+ }): WireCodecReason;
116
+ //# sourceMappingURL=clientProperties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientProperties.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/clientProperties.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,oBAAoB;aAC/B,UAAU,EAAE,sBAAsB;aAClC,cAAc,EAAE,0BAA0B;aAC1C,YAAY,EAAE,uBAAuB;aAGrC,IAAI,EAAE,eAAe;aAGrB,UAAU,EAAE,sBAAsB;CAC1B,CAAA;AAKV,eAAO,MAAM,uBAAuB,KAAK,CAAA;AACzC,eAAO,MAAM,uBAAuB,MAAM,CAAA;AAM1C,eAAO,MAAM,WAAW,eAAe,CAAA;AAUvC,eAAO,MAAM,cAAc,kBAAkB,CAAA;AAC7C,eAAO,MAAM,yBAAyB,EAAE,aAAa,CAAC,MAAM,CAG3D,CAAA;AASD,MAAM,WAAW,kCAAkC;IACjD,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAA;IAClB,+DAA+D;IAC/D,cAAc,EAAE,MAAM,CAAA;IACtB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,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AAa;kCACJ,sBAAsB;gCACxB,oBAAoB;CACW,CAAA;AAEpD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,iBAAiB,EACjB,YAAY,EACZ,aAAa,GACd,EAAE;IACD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;CACtB,GAAG,eAAe,CAgBlB"}
@@ -98,6 +98,8 @@ export declare const createCommandSchema: z.ZodPipe<z.ZodObject<{
98
98
  retryDelay?: number | undefined;
99
99
  mode: "CONTINUOUS" | "LINEAR";
100
100
  privileged: boolean;
101
+ wireCodec?: "json" | "msgpack" | undefined;
102
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
101
103
  configurationServices?: {
102
104
  outputs: {
103
105
  name: string | null;
@@ -130,6 +132,8 @@ export declare const createCommandSchema: z.ZodPipe<z.ZodObject<{
130
132
  retryDelay?: number | undefined;
131
133
  mode: "CONTINUOUS" | "LINEAR";
132
134
  privileged: boolean;
135
+ wireCodec?: "json" | "msgpack" | undefined;
136
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
133
137
  configurationServices?: /*elided*/ any[] | undefined;
134
138
  }[] | undefined;
135
139
  } | {
@@ -235,6 +239,8 @@ export declare const createCommandSchema: z.ZodPipe<z.ZodObject<{
235
239
  retryDelay?: number | undefined;
236
240
  mode: "CONTINUOUS" | "LINEAR";
237
241
  privileged: boolean;
242
+ wireCodec?: "json" | "msgpack" | undefined;
243
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
238
244
  configurationServices?: {
239
245
  outputs: {
240
246
  name: string | null;
@@ -267,6 +273,8 @@ export declare const createCommandSchema: z.ZodPipe<z.ZodObject<{
267
273
  retryDelay?: number | undefined;
268
274
  mode: "CONTINUOUS" | "LINEAR";
269
275
  privileged: boolean;
276
+ wireCodec?: "json" | "msgpack" | undefined;
277
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
270
278
  configurationServices?: any[] | undefined;
271
279
  }[] | undefined;
272
280
  } | {
@@ -460,6 +468,8 @@ export declare const commandSchema: z.ZodUnion<readonly [z.ZodObject<{
460
468
  retryDelay?: number | undefined;
461
469
  mode: "CONTINUOUS" | "LINEAR";
462
470
  privileged: boolean;
471
+ wireCodec?: "json" | "msgpack" | undefined;
472
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
463
473
  configurationServices?: {
464
474
  outputs: {
465
475
  name: string | null;
@@ -492,6 +502,8 @@ export declare const commandSchema: z.ZodUnion<readonly [z.ZodObject<{
492
502
  retryDelay?: number | undefined;
493
503
  mode: "CONTINUOUS" | "LINEAR";
494
504
  privileged: boolean;
505
+ wireCodec?: "json" | "msgpack" | undefined;
506
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
495
507
  configurationServices?: /*elided*/ any[] | undefined;
496
508
  }[] | undefined;
497
509
  } | {
@@ -597,6 +609,8 @@ export declare const commandSchema: z.ZodUnion<readonly [z.ZodObject<{
597
609
  retryDelay?: number | undefined;
598
610
  mode: "CONTINUOUS" | "LINEAR";
599
611
  privileged: boolean;
612
+ wireCodec?: "json" | "msgpack" | undefined;
613
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
600
614
  configurationServices?: {
601
615
  outputs: {
602
616
  name: string | null;
@@ -629,6 +643,8 @@ export declare const commandSchema: z.ZodUnion<readonly [z.ZodObject<{
629
643
  retryDelay?: number | undefined;
630
644
  mode: "CONTINUOUS" | "LINEAR";
631
645
  privileged: boolean;
646
+ wireCodec?: "json" | "msgpack" | undefined;
647
+ wireCodecReason?: "fleet-capable" | "missing-capability" | "no-replicas" | "presence-unavailable" | "replicas-unaccounted" | undefined;
632
648
  configurationServices?: any[] | undefined;
633
649
  }[] | undefined;
634
650
  } | {
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAK1B,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6B3B,CAAA;AAEL,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAAqD,CAAA;AAC/E,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AACnD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA"}
@@ -1,3 +1,4 @@
1
+ export * from './clientProperties.ts';
1
2
  export * from './command.ts';
2
3
  export * from './configurationScript.ts';
3
4
  export * from './logicLanguages.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA"}
@@ -51,6 +51,17 @@ export declare const serviceNodeSchema: z.ZodObject<{
51
51
  LINEAR: "LINEAR";
52
52
  }>>;
53
53
  privileged: z.ZodDefault<z.ZodBoolean>;
54
+ wireCodec: z.ZodOptional<z.ZodEnum<{
55
+ json: "json";
56
+ msgpack: "msgpack";
57
+ }>>;
58
+ wireCodecReason: z.ZodOptional<z.ZodEnum<{
59
+ "fleet-capable": "fleet-capable";
60
+ "missing-capability": "missing-capability";
61
+ "no-replicas": "no-replicas";
62
+ "presence-unavailable": "presence-unavailable";
63
+ "replicas-unaccounted": "replicas-unaccounted";
64
+ }>>;
54
65
  configurationServices: z.ZodOptional<z.ZodArray<z.ZodObject</*elided*/ any, z.core.$strict>>>;
55
66
  }, z.core.$strict>;
56
67
  export type ServiceNode = z.output<typeof serviceNodeSchema>;
@@ -165,6 +176,17 @@ export declare const nodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
165
176
  LINEAR: "LINEAR";
166
177
  }>>;
167
178
  privileged: z.ZodDefault<z.ZodBoolean>;
179
+ wireCodec: z.ZodOptional<z.ZodEnum<{
180
+ json: "json";
181
+ msgpack: "msgpack";
182
+ }>>;
183
+ wireCodecReason: z.ZodOptional<z.ZodEnum<{
184
+ "fleet-capable": "fleet-capable";
185
+ "missing-capability": "missing-capability";
186
+ "no-replicas": "no-replicas";
187
+ "presence-unavailable": "presence-unavailable";
188
+ "replicas-unaccounted": "replicas-unaccounted";
189
+ }>>;
168
190
  configurationServices: z.ZodOptional<z.ZodArray<z.ZodObject</*elided*/ any, z.core.$strict>>>;
169
191
  }, z.core.$strict>, z.ZodObject<{
170
192
  outputs: z.ZodArray<z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"nodeType.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/nodeType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAmC1B,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,MAAM,CAGvD,CAAA;AA4BD,eAAO,MAAM,eAAe;;;;;kBAS1B,CAAA;AAEF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAA;AAUxD,eAAO,MAAM,4BAA4B;;;;;;;mBAQxC,CAAA;AACD,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAC3C,OAAO,4BAA4B,CACpC,CAAA;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuCF,CAAA;AAC5B,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE5D,2DAA2D;AAC3D,eAAO,MAAM,gCAAgC;aAC3C,KAAK,EAAE,CAAC;aACR,UAAU,EAAE,KAAM;aAClB,GAAG;CACK,CAAA;AAEV,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;kBAUA,CAAA;AAC5B,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAA;AAExD,eAAO,MAAM,YAAY;;;;kBAIvB,CAAA;AACF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,YAAY,CAAC,CAAA;AAElD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;kBASJ,CAAA;AAC5B,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CA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