@requence/service 0.7.1 → 0.8.1

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 (87) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +15 -0
  3. package/build/{chunk-6w7td62p.js → chunk-8r349zge.js} +46 -3
  4. package/build/chunk-8r349zge.js.map +11 -0
  5. package/build/cli.js +17 -7
  6. package/build/cli.js.map +3 -3
  7. package/build/index.js +1261 -446
  8. package/build/index.js.map +28 -14
  9. package/build/types/helpers/src/index.d.ts +8 -2
  10. package/build/types/helpers/src/index.d.ts.map +1 -1
  11. package/build/types/helpers/src/jsonschema/validate.d.ts +1 -5
  12. package/build/types/helpers/src/jsonschema/validate.d.ts.map +1 -1
  13. package/build/types/helpers/src/jsonschema/zod.d.ts +11 -1
  14. package/build/types/helpers/src/jsonschema/zod.d.ts.map +1 -1
  15. package/build/types/helpers/src/protocol/NodeTree.d.ts +450 -144
  16. package/build/types/helpers/src/protocol/NodeTree.d.ts.map +1 -1
  17. package/build/types/helpers/src/protocol/command.d.ts +364 -142
  18. package/build/types/helpers/src/protocol/command.d.ts.map +1 -1
  19. package/build/types/helpers/src/protocol/configurationScript.d.ts +10 -0
  20. package/build/types/helpers/src/protocol/configurationScript.d.ts.map +1 -0
  21. package/build/types/helpers/src/protocol/helpers.d.ts.map +1 -1
  22. package/build/types/helpers/src/protocol/index.d.ts +4 -0
  23. package/build/types/helpers/src/protocol/index.d.ts.map +1 -1
  24. package/build/types/helpers/src/protocol/logicLanguages.d.ts +19 -0
  25. package/build/types/helpers/src/protocol/logicLanguages.d.ts.map +1 -0
  26. package/build/types/helpers/src/protocol/loopDetection.d.ts +23 -0
  27. package/build/types/helpers/src/protocol/loopDetection.d.ts.map +1 -0
  28. package/build/types/helpers/src/protocol/nodeType.d.ts +73 -27
  29. package/build/types/helpers/src/protocol/nodeType.d.ts.map +1 -1
  30. package/build/types/helpers/src/protocol/taskOptions.d.ts +4 -1
  31. package/build/types/helpers/src/protocol/taskOptions.d.ts.map +1 -1
  32. package/build/types/helpers/src/protocol/templateNodeTypes.d.ts +36 -20
  33. package/build/types/helpers/src/protocol/templateNodeTypes.d.ts.map +1 -1
  34. package/build/types/helpers/src/protocol/treeNodes.d.ts +476 -164
  35. package/build/types/helpers/src/protocol/treeNodes.d.ts.map +1 -1
  36. package/build/types/helpers/src/protocol/update.d.ts +22 -22
  37. package/build/types/helpers/src/protocol/validateTreeStructure.d.ts +22 -0
  38. package/build/types/helpers/src/protocol/validateTreeStructure.d.ts.map +1 -0
  39. package/build/types/helpers/src/utils/amqpHeartbeat.d.ts +3 -0
  40. package/build/types/helpers/src/utils/amqpHeartbeat.d.ts.map +1 -0
  41. package/build/types/helpers/src/utils/amqpPublishRetry.d.ts +5 -0
  42. package/build/types/helpers/src/utils/amqpPublishRetry.d.ts.map +1 -0
  43. package/build/types/helpers/src/utils/claimCheckObject.d.ts +40 -0
  44. package/build/types/helpers/src/utils/claimCheckObject.d.ts.map +1 -0
  45. package/build/types/helpers/src/utils/debounce.d.ts.map +1 -1
  46. package/build/types/helpers/src/{files → utils}/fileObject.d.ts.map +1 -1
  47. package/build/types/helpers/src/{files → utils}/isValidMimeType.d.ts.map +1 -1
  48. package/build/types/helpers/src/utils/mapData.d.ts +1 -1
  49. package/build/types/helpers/src/utils/mapData.d.ts.map +1 -1
  50. package/build/types/helpers/src/{files → utils}/streamObject.d.ts.map +1 -1
  51. package/build/types/helpers/src/utils/variableRef.d.ts +19 -0
  52. package/build/types/helpers/src/utils/variableRef.d.ts.map +1 -0
  53. package/build/types/helpers/src/utils/variableScriptPatterns.d.ts +125 -0
  54. package/build/types/helpers/src/utils/variableScriptPatterns.d.ts.map +1 -0
  55. package/build/types/service/src/boundary.d.ts +75 -0
  56. package/build/types/service/src/boundary.d.ts.map +1 -0
  57. package/build/types/service/src/createAmqpConnection.d.ts +21 -4
  58. package/build/types/service/src/createAmqpConnection.d.ts.map +1 -1
  59. package/build/types/service/src/errors.d.ts +31 -0
  60. package/build/types/service/src/errors.d.ts.map +1 -1
  61. package/build/types/service/src/helpers.d.ts +59 -56
  62. package/build/types/service/src/helpers.d.ts.map +1 -1
  63. package/build/types/service/src/index.d.ts +7 -1
  64. package/build/types/service/src/index.d.ts.map +1 -1
  65. package/build/types/service/src/transformer.d.ts +16 -0
  66. package/build/types/service/src/transformer.d.ts.map +1 -0
  67. package/package.json +6 -3
  68. package/build/chunk-6w7td62p.js.map +0 -10
  69. package/build/types/helpers/src/files/RequenceFile.d.ts +0 -40
  70. package/build/types/helpers/src/files/RequenceFile.d.ts.map +0 -1
  71. package/build/types/helpers/src/files/RequenceStream.d.ts +0 -32
  72. package/build/types/helpers/src/files/RequenceStream.d.ts.map +0 -1
  73. package/build/types/helpers/src/files/index.d.ts +0 -7
  74. package/build/types/helpers/src/files/index.d.ts.map +0 -1
  75. package/build/types/helpers/src/files/mapOutput.d.ts +0 -10
  76. package/build/types/helpers/src/files/mapOutput.d.ts.map +0 -1
  77. package/build/types/helpers/src/files/types.d.ts +0 -4
  78. package/build/types/helpers/src/files/types.d.ts.map +0 -1
  79. package/build/types/helpers/src/utils/createObjectProxy.d.ts +0 -2
  80. package/build/types/helpers/src/utils/createObjectProxy.d.ts.map +0 -1
  81. package/build/types/helpers/src/utils/resolveRequenceTypes.d.ts +0 -8
  82. package/build/types/helpers/src/utils/resolveRequenceTypes.d.ts.map +0 -1
  83. package/build/types/service/src/mapInput.d.ts +0 -2
  84. package/build/types/service/src/mapInput.d.ts.map +0 -1
  85. /package/build/types/helpers/src/{files → utils}/fileObject.d.ts +0 -0
  86. /package/build/types/helpers/src/{files → utils}/isValidMimeType.d.ts +0 -0
  87. /package/build/types/helpers/src/{files → utils}/streamObject.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"treeNodes.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/treeNodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QA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O,cAAc,CAAC,CAAA;AACtD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -7,10 +7,10 @@ declare const nodeInitUpdateSchema: z.ZodObject<{
7
7
  node: z.ZodObject<{
8
8
  id: z.ZodUUID;
9
9
  type: z.ZodEnum<{
10
- service: "service";
11
10
  logic: "logic";
12
11
  or: "or";
13
12
  reference: "reference";
13
+ service: "service";
14
14
  }>;
15
15
  alias: z.ZodOptional<z.ZodString>;
16
16
  }, z.core.$strip>;
@@ -27,10 +27,10 @@ declare const nodeStartUpdateSchema: z.ZodObject<{
27
27
  node: z.ZodObject<{
28
28
  id: z.ZodUUID;
29
29
  type: z.ZodEnum<{
30
- service: "service";
31
30
  logic: "logic";
32
31
  or: "or";
33
32
  reference: "reference";
33
+ service: "service";
34
34
  }>;
35
35
  alias: z.ZodOptional<z.ZodString>;
36
36
  }, z.core.$strip>;
@@ -47,10 +47,10 @@ declare const nodeErrorUpdateSchema: z.ZodObject<{
47
47
  node: z.ZodObject<{
48
48
  id: z.ZodUUID;
49
49
  type: z.ZodEnum<{
50
- service: "service";
51
50
  logic: "logic";
52
51
  or: "or";
53
52
  reference: "reference";
53
+ service: "service";
54
54
  }>;
55
55
  alias: z.ZodOptional<z.ZodString>;
56
56
  }, z.core.$strip>;
@@ -66,10 +66,10 @@ declare const nodeUpdateSchema: z.ZodObject<{
66
66
  node: z.ZodObject<{
67
67
  id: z.ZodUUID;
68
68
  type: z.ZodEnum<{
69
- service: "service";
70
69
  logic: "logic";
71
70
  or: "or";
72
71
  reference: "reference";
72
+ service: "service";
73
73
  }>;
74
74
  alias: z.ZodOptional<z.ZodString>;
75
75
  }, z.core.$strip>;
@@ -87,10 +87,10 @@ declare const nodeCallbackSchema: z.ZodObject<{
87
87
  node: z.ZodObject<{
88
88
  id: z.ZodUUID;
89
89
  type: z.ZodEnum<{
90
- service: "service";
91
90
  logic: "logic";
92
91
  or: "or";
93
92
  reference: "reference";
93
+ service: "service";
94
94
  }>;
95
95
  alias: z.ZodOptional<z.ZodString>;
96
96
  }, z.core.$strip>;
@@ -98,10 +98,10 @@ declare const nodeCallbackSchema: z.ZodObject<{
98
98
  targetNode: z.ZodObject<{
99
99
  id: z.ZodUUID;
100
100
  type: z.ZodEnum<{
101
- service: "service";
102
101
  logic: "logic";
103
102
  or: "or";
104
103
  reference: "reference";
104
+ service: "service";
105
105
  }>;
106
106
  alias: z.ZodOptional<z.ZodString>;
107
107
  }, z.core.$strip>;
@@ -118,10 +118,10 @@ declare const nodeEndUpdateSchema: z.ZodObject<{
118
118
  node: z.ZodObject<{
119
119
  id: z.ZodUUID;
120
120
  type: z.ZodEnum<{
121
- service: "service";
122
121
  logic: "logic";
123
122
  or: "or";
124
123
  reference: "reference";
124
+ service: "service";
125
125
  }>;
126
126
  alias: z.ZodOptional<z.ZodString>;
127
127
  }, z.core.$strip>;
@@ -136,20 +136,20 @@ declare const nodeDebugUpdateSchema: z.ZodObject<{
136
136
  node: z.ZodObject<{
137
137
  id: z.ZodUUID;
138
138
  type: z.ZodEnum<{
139
- service: "service";
140
139
  logic: "logic";
141
140
  or: "or";
142
141
  reference: "reference";
142
+ service: "service";
143
143
  }>;
144
144
  alias: z.ZodOptional<z.ZodString>;
145
145
  }, z.core.$strip>;
146
146
  type: z.ZodLiteral<"NODE_DEBUG">;
147
147
  severity: z.ZodEnum<{
148
148
  error: "error";
149
- log: "log";
150
- warn: "warn";
151
149
  info: "info";
150
+ log: "log";
152
151
  system: "system";
152
+ warn: "warn";
153
153
  }>;
154
154
  data: z.ZodUnknown;
155
155
  }, z.core.$strip>;
@@ -162,10 +162,10 @@ declare const nodeDeferUpdateSchema: z.ZodObject<{
162
162
  node: z.ZodObject<{
163
163
  id: z.ZodUUID;
164
164
  type: z.ZodEnum<{
165
- service: "service";
166
165
  logic: "logic";
167
166
  or: "or";
168
167
  reference: "reference";
168
+ service: "service";
169
169
  }>;
170
170
  alias: z.ZodOptional<z.ZodString>;
171
171
  }, z.core.$strip>;
@@ -215,10 +215,10 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
215
215
  node: z.ZodObject<{
216
216
  id: z.ZodUUID;
217
217
  type: z.ZodEnum<{
218
- service: "service";
219
218
  logic: "logic";
220
219
  or: "or";
221
220
  reference: "reference";
221
+ service: "service";
222
222
  }>;
223
223
  alias: z.ZodOptional<z.ZodString>;
224
224
  }, z.core.$strip>;
@@ -233,10 +233,10 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
233
233
  node: z.ZodObject<{
234
234
  id: z.ZodUUID;
235
235
  type: z.ZodEnum<{
236
- service: "service";
237
236
  logic: "logic";
238
237
  or: "or";
239
238
  reference: "reference";
239
+ service: "service";
240
240
  }>;
241
241
  alias: z.ZodOptional<z.ZodString>;
242
242
  }, z.core.$strip>;
@@ -251,10 +251,10 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
251
251
  node: z.ZodObject<{
252
252
  id: z.ZodUUID;
253
253
  type: z.ZodEnum<{
254
- service: "service";
255
254
  logic: "logic";
256
255
  or: "or";
257
256
  reference: "reference";
257
+ service: "service";
258
258
  }>;
259
259
  alias: z.ZodOptional<z.ZodString>;
260
260
  }, z.core.$strip>;
@@ -268,10 +268,10 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
268
268
  node: z.ZodObject<{
269
269
  id: z.ZodUUID;
270
270
  type: z.ZodEnum<{
271
- service: "service";
272
271
  logic: "logic";
273
272
  or: "or";
274
273
  reference: "reference";
274
+ service: "service";
275
275
  }>;
276
276
  alias: z.ZodOptional<z.ZodString>;
277
277
  }, z.core.$strip>;
@@ -287,10 +287,10 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
287
287
  node: z.ZodObject<{
288
288
  id: z.ZodUUID;
289
289
  type: z.ZodEnum<{
290
- service: "service";
291
290
  logic: "logic";
292
291
  or: "or";
293
292
  reference: "reference";
293
+ service: "service";
294
294
  }>;
295
295
  alias: z.ZodOptional<z.ZodString>;
296
296
  }, z.core.$strip>;
@@ -298,10 +298,10 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
298
298
  targetNode: z.ZodObject<{
299
299
  id: z.ZodUUID;
300
300
  type: z.ZodEnum<{
301
- service: "service";
302
301
  logic: "logic";
303
302
  or: "or";
304
303
  reference: "reference";
304
+ service: "service";
305
305
  }>;
306
306
  alias: z.ZodOptional<z.ZodString>;
307
307
  }, z.core.$strip>;
@@ -316,10 +316,10 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
316
316
  node: z.ZodObject<{
317
317
  id: z.ZodUUID;
318
318
  type: z.ZodEnum<{
319
- service: "service";
320
319
  logic: "logic";
321
320
  or: "or";
322
321
  reference: "reference";
322
+ service: "service";
323
323
  }>;
324
324
  alias: z.ZodOptional<z.ZodString>;
325
325
  }, z.core.$strip>;
@@ -332,20 +332,20 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
332
332
  node: z.ZodObject<{
333
333
  id: z.ZodUUID;
334
334
  type: z.ZodEnum<{
335
- service: "service";
336
335
  logic: "logic";
337
336
  or: "or";
338
337
  reference: "reference";
338
+ service: "service";
339
339
  }>;
340
340
  alias: z.ZodOptional<z.ZodString>;
341
341
  }, z.core.$strip>;
342
342
  type: z.ZodLiteral<"NODE_DEBUG">;
343
343
  severity: z.ZodEnum<{
344
344
  error: "error";
345
- log: "log";
346
- warn: "warn";
347
345
  info: "info";
346
+ log: "log";
348
347
  system: "system";
348
+ warn: "warn";
349
349
  }>;
350
350
  data: z.ZodUnknown;
351
351
  }, z.core.$strip>, z.ZodObject<{
@@ -356,10 +356,10 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
356
356
  node: z.ZodObject<{
357
357
  id: z.ZodUUID;
358
358
  type: z.ZodEnum<{
359
- service: "service";
360
359
  logic: "logic";
361
360
  or: "or";
362
361
  reference: "reference";
362
+ service: "service";
363
363
  }>;
364
364
  alias: z.ZodOptional<z.ZodString>;
365
365
  }, z.core.$strip>;
@@ -0,0 +1,22 @@
1
+ import type { TemplateTree } from './templateNodeTypes.ts';
2
+ export interface TreeStructureError {
3
+ detail: string;
4
+ nodeId?: string;
5
+ structural: boolean;
6
+ }
7
+ /**
8
+ * Structural (tree-shape) validation shared by the backend save-time check
9
+ * (`validateTemplateTree`) and the frontend's live structural monitor. Coerces
10
+ * the authoring `TemplateTree` into the strict resolved tree shape — the same
11
+ * coercion the backend applies — then runs `validatedTreeSchema`, returning one
12
+ * issue per structural violation.
13
+ *
14
+ * This is exactly the set the backend persists as `code: 'TREE'` errors from the
15
+ * schema. It deliberately excludes the env-dependent logic execution-time limit
16
+ * and the computed-configuration placement checks, which the backend appends
17
+ * separately (they are not pure functions of the graph shape).
18
+ */
19
+ export declare function validateTreeStructure(templateTree: TemplateTree, options: {
20
+ allowMultipleOutputs: boolean;
21
+ }): TreeStructureError[];
22
+ //# sourceMappingURL=validateTreeStructure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateTreeStructure.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/validateTreeStructure.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAG1D,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IAMf,UAAU,EAAE,OAAO,CAAA;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE;IAAE,oBAAoB,EAAE,OAAO,CAAA;CAAE,GACzC,kBAAkB,EAAE,CAqDtB"}
@@ -0,0 +1,3 @@
1
+ export declare const DEFAULT_AMQP_HEARTBEAT_SECONDS = 30;
2
+ export declare function withAmqpHeartbeat(url: URL): URL;
3
+ //# sourceMappingURL=amqpHeartbeat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"amqpHeartbeat.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/amqpHeartbeat.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,8BAA8B,KAAK,CAAA;AAShD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAM/C"}
@@ -0,0 +1,5 @@
1
+ export declare const DEFAULT_AMQP_PUBLISH_TIMEOUT_MS = 10000;
2
+ export declare const DEFAULT_AMQP_PUBLISH_RETRY_ATTEMPTS = 3;
3
+ export declare function isRetryablePublishError(error: unknown): boolean;
4
+ export declare function computeAmqpPublishRetryDelay(attempt: number): number;
5
+ //# sourceMappingURL=amqpPublishRetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"amqpPublishRetry.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/amqpPublishRetry.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,+BAA+B,QAAS,CAAA;AACrD,eAAO,MAAM,mCAAmC,IAAI,CAAA;AAKpD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,WAQrD;AAID,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,UAM3D"}
@@ -0,0 +1,40 @@
1
+ import { z } from 'zod/v4';
2
+ declare const claimCheckObjectSchema: z.ZodObject<{
3
+ url: z.ZodURL;
4
+ size: z.ZodInt;
5
+ __REQUENCE_type: z.ZodLiteral<"ClaimCheck">;
6
+ }, z.core.$strip>;
7
+ /**
8
+ * Reference left behind by the oversized-message claim-check: the value was
9
+ * offloaded to the files service and is fetched back (and re-walked) on
10
+ * ingress by the `ClaimCheck` value handler.
11
+ */
12
+ export type ClaimCheckObject = z.infer<typeof claimCheckObjectSchema>;
13
+ export declare function toClaimCheckObject(info: {
14
+ url: string;
15
+ size: number;
16
+ }): ClaimCheckObject;
17
+ export declare function isClaimCheckObject(data: unknown): data is ClaimCheckObject;
18
+ /**
19
+ * JSON-schema equivalent of the reference shape, for claim-check-aware
20
+ * validation: a subschema position holding a `ClaimCheck` reference is
21
+ * validated against this instead of the declared subschema (shape validation
22
+ * of the offloaded value is deferred to the consumer after rehydration).
23
+ */
24
+ export declare const claimCheckJsonSchema: {
25
+ readonly type: 'object';
26
+ readonly properties: {
27
+ readonly url: {
28
+ readonly type: 'string';
29
+ };
30
+ readonly size: {
31
+ readonly type: 'integer';
32
+ };
33
+ readonly __REQUENCE_type: {
34
+ readonly const: 'ClaimCheck';
35
+ };
36
+ };
37
+ readonly required: readonly ['url', 'size', '__REQUENCE_type'];
38
+ };
39
+ export {};
40
+ //# sourceMappingURL=claimCheckObject.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claimCheckObject.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/claimCheckObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,QAAA,MAAM,sBAAsB;;;;iBAI1B,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAErE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb,GAAG,gBAAgB,CAKnB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,gBAAgB,CAE1E;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;aAC/B,IAAI,EAAE,QAAQ;aACd,UAAU;iBACR,GAAG;qBAAI,IAAI,EAAE,QAAQ;;iBACrB,IAAI;qBAAI,IAAI,EAAE,SAAS;;iBACvB,eAAe;qBAAI,KAAK,EAAE,YAAY;;;aAExC,QAAQ,YAAG,KAAK,EAAE,MAAM,EAAE,iBAAiB;CACnC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/debounce.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EACzD,EAAE,EAAE,CAAC,EACL,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,IAIpB,GAAG,MAAM,UAAU,CAAC,CAAC,CAAC,UAc/B"}
1
+ {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/debounce.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EACzD,EAAE,EAAE,CAAC,EACL,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,aAIX,UAAU,CAAC,CAAC,CAAC,UAc/B"}
@@ -1 +1 @@
1
- {"version":3,"file":"fileObject.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/files/fileObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,QAAA,MAAM,gBAAgB;;;;;iBAKpB,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,wBAAgB,YAAY,CAAC,QAAQ,EAAE;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,UAAU,CAKb;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,UAAU,CAE9D"}
1
+ {"version":3,"file":"fileObject.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/fileObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,QAAA,MAAM,gBAAgB;;;;;iBAKpB,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,wBAAgB,YAAY,CAAC,QAAQ,EAAE;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,UAAU,CAKb;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,UAAU,CAE9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"isValidMimeType.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/files/isValidMimeType.ts"],"names":[],"mappings":"AAuCA,wBAAgB,eAAe,CAC7B,QAAQ,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACxC,MAAM,EAAE,MAAM,WA6Bf"}
1
+ {"version":3,"file":"isValidMimeType.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/isValidMimeType.ts"],"names":[],"mappings":"AAuCA,wBAAgB,eAAe,CAC7B,QAAQ,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EACxC,MAAM,EAAE,MAAM,WA6Bf"}
@@ -5,7 +5,7 @@ interface DataVistors {
5
5
  Number?: DataVistor<number>;
6
6
  Object?: DataVistor<object>;
7
7
  Array?: DataVistor<Array<any>>;
8
- Buffer?: DataVistor<Buffer>;
8
+ Buffer?: DataVistor<Uint8Array>;
9
9
  Function?: DataVistor<(...args: any[]) => any>;
10
10
  Symbol?: DataVistor<symbol>;
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mapData.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/mapData.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,CAAC,CAAC,I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jB,CAAC,EACD,OAAO,CAAC,OAAO,SAAS,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC,EAChD,OAAO,SAAS,MAAM,GAAG,KAAK,GAAG,MAAM,CACxC,CAiFA;yBA5Fe,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"streamObject.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/files/streamObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,QAAA,MAAM,kBAAkB;;;;iBAItB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,YAAY,CAElE;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,YAAY,CAKf"}
1
+ {"version":3,"file":"streamObject.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/streamObject.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,QAAA,MAAM,kBAAkB;;;;iBAItB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,YAAY,CAElE;AAED,wBAAgB,cAAc,CAAC,UAAU,EAAE;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,YAAY,CAKf"}
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod/v4';
2
+ export declare const VARIABLE_KEY_PATTERN: RegExp;
3
+ declare const variableRefSchema: z.ZodObject<{
4
+ __REQUENCE_type: z.ZodLiteral<"VariableRef">;
5
+ key: z.ZodString;
6
+ id: z.ZodOptional<z.ZodUUID>;
7
+ }, z.core.$strip>;
8
+ /**
9
+ * Reference to a scope variable in a service configuration field. One form,
10
+ * `{ key }`, and it lives ONLY in templates: task creation replaces it with the
11
+ * variable's literal value — plain and secret identically, since secrets are
12
+ * decrypted in ui/backend before they are baked (D-V1). Grep-able invariant: a
13
+ * `VariableRef` never appears in a serialized treeList.
14
+ */
15
+ export type VariableRefObject = z.infer<typeof variableRefSchema>;
16
+ export declare function toVariableRefObject(key: string): VariableRefObject;
17
+ export declare function isVariableRefObject(data: unknown): data is VariableRefObject;
18
+ export {};
19
+ //# sourceMappingURL=variableRef.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variableRef.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/variableRef.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B,eAAO,MAAM,oBAAoB,QAAsB,CAAA;AAOvD,QAAA,MAAM,iBAAiB;;;;iBAIrB,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEjE,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAKlE;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,iBAAiB,CAE5E"}
@@ -0,0 +1,125 @@
1
+ /**
2
+ * The call forms the logic-node guests document and this module recognizes — the
3
+ * shared fixture that keeps the two in lockstep: what users can write is exactly
4
+ * what a rename rewrites AND what task creation inlines. `%KEY%` is the key
5
+ * placeholder; render with {@link renderVariableAccess}.
6
+ *
7
+ * Identical in TypeScript, JavaScript and Python — the call shape does not
8
+ * differ by language, and it carries NO `await` in any of them (unit 08): the
9
+ * call becomes the value, and both languages' typed surfaces return that value
10
+ * directly. Deliberately short: every extra sugar is another form the patterns
11
+ * must chase (README D-P6). Since unit 07 a computed key
12
+ * (`variables.get(someVariable)`) is not merely outside rename safety, it cannot
13
+ * work at all: there is no value to inline, and no run-time lookup left to fall
14
+ * back on (see {@link findUnrecognizedVariableAccess}).
15
+ */
16
+ export declare const VARIABLE_ACCESS_FORMS: readonly [`context.variables.get('%KEY%')`, `context.variables.get("%KEY%")`, `context.variables.get( '%KEY%' )`, `variables.get('%KEY%')`];
17
+ export declare function renderVariableAccess(form: string, key: string): string;
18
+ export type VariableKeyMatch = {
19
+ /** Offset of the first character of the key (inside the quotes). */
20
+ start: number;
21
+ /** Offset one past the last character of the key. */
22
+ end: number;
23
+ };
24
+ export type VariableAccessMatch = {
25
+ /** Offset of the first character of the replaced expression. */
26
+ start: number;
27
+ /** Offset one past the last character of the replaced expression. */
28
+ end: number;
29
+ key: string;
30
+ };
31
+ /**
32
+ * Every recognized access as the exact span an inliner replaces — the whole
33
+ * CALL, not just its key (that is {@link findVariableKeyMatches}), so
34
+ * surrounding code is untouched.
35
+ *
36
+ * `includeAwait` extends the span over a preceding `await`. It is pure
37
+ * ROBUSTNESS, not a documented form: since unit 08 the typed surface returns the
38
+ * value in every language, so no author has a reason to write `await` — but a
39
+ * pre-08 script (or a habit) might, and in Python `await <literal>` raises a
40
+ * TypeError, so the `await` must GO along with the call. JS/TS deliberately keep
41
+ * theirs: `await` of a non-promise is legal there, so a stray `await` survives
42
+ * the replacement untouched.
43
+ *
44
+ * A match inside a comment or a string literal is replaced like any other (no
45
+ * parser, by design). That is safe rather than merely tolerated: every
46
+ * serializer escapes newlines, so a replacement can never break out of the line
47
+ * — or the string — it was found on.
48
+ */
49
+ export declare function findVariableAccessMatches(script: string, options?: {
50
+ includeAwait?: boolean;
51
+ }): VariableAccessMatch[];
52
+ /**
53
+ * Every distinct key a script names through a recognized `variables.get(…)`
54
+ * call — the inverse of {@link findVariableKeyMatches}, which asks about one
55
+ * known key. Used by authoring validation to flag a script that reads a variable
56
+ * that no longer exists: since unit 07 the value is inlined at task creation, so
57
+ * an unknown key must fail authoring — otherwise it fails task creation, later.
58
+ *
59
+ * Built on {@link findVariableAccessMatches}, so a key this returns is exactly a
60
+ * key task creation inlines. Computed keys stay invisible here and are reported
61
+ * by {@link findUnrecognizedVariableAccess} instead.
62
+ */
63
+ export declare function findVariableKeys(script: string): string[];
64
+ export type VariableAccessIssue = {
65
+ start: number;
66
+ end: number;
67
+ /**
68
+ * `dynamic-key` — a `get(…)` call whose argument is not a literal key
69
+ * (`get('smtp.' + region)`, `get(someKey)`): nothing to inline.
70
+ * `method-reference` — the method taken without calling it
71
+ * (`const get = context.variables.get`): the call site is invisible.
72
+ */
73
+ kind: 'dynamic-key' | 'method-reference';
74
+ };
75
+ /**
76
+ * `context.variables.get` uses this module cannot inline. Since unit 07 these
77
+ * are authoring errors, not runtime lookups: a call the replacement pass does
78
+ * not see is not a lookup at all — it reaches the guests' teaching stub.
79
+ *
80
+ * Scoped to the `context.` receiver ON PURPOSE, and it is the narrower of two
81
+ * bad options. The destructured `variables.get(…)` form is indistinguishable
82
+ * from any user-authored object named `variables` that happens to have a `get`
83
+ * (a `Map`, most obviously — this repo's own code does it), so scanning it would
84
+ * fail authoring on scripts that never touched a variable. The cost is symmetric
85
+ * and accepted: a dynamic key written through the destructured form, an aliased
86
+ * receiver (`const v = context.variables; v.get(x)`), or a `variables` member of
87
+ * another object is neither inlined nor reported, and hits the stub at run time.
88
+ * That is what the stub is for.
89
+ */
90
+ export declare function findUnrecognizedVariableAccess(script: string): VariableAccessIssue[];
91
+ /**
92
+ * Exact offsets of every quoted `key` inside a recognized
93
+ * `variables.get(…)` call, ascending. Only the key segment is addressed, so
94
+ * a rewrite replaces nothing but the key itself. Keys match
95
+ * `VARIABLE_KEY_PATTERN` (no quotes or backslashes possible), and the match
96
+ * is anchored on the closing quote — `a.b` never matches inside `a.bc`.
97
+ */
98
+ export declare function findVariableKeyMatches(script: string, key: string): VariableKeyMatch[];
99
+ /**
100
+ * Rewrites every recognized access of `oldKey` to `newKey` — built on the
101
+ * same matches as the scan, so the two never disagree about what a usage is.
102
+ */
103
+ export declare function rewriteVariableKey(script: string, oldKey: string, newKey: string): string;
104
+ /**
105
+ * The value as the language's own literal, always parenthesized.
106
+ *
107
+ * The parens are not cosmetic in either language: an unparenthesized object
108
+ * literal cannot start a JS statement, and an unparenthesized negative number
109
+ * changes the meaning of a surrounding Python `**` (`x ** -5` vs `x ** (-5)`).
110
+ *
111
+ * Both languages inline the value's JSON projection, so what a script sees is
112
+ * exactly what a service node's configuration field would have been baked with.
113
+ */
114
+ export declare function serializeVariableLiteral(language: string, value: unknown): string;
115
+ /**
116
+ * Replaces every recognized access in `script` with its value as a literal —
117
+ * the bake's script half, the exact analogue of replacing a config-ref tag with
118
+ * its value. Returns the input unchanged when there is nothing to replace, so a
119
+ * re-bake of an already-inlined snapshot is a no-op.
120
+ *
121
+ * `resolve` owns lookup, decryption and failure: it is called once per distinct
122
+ * key, in source order, and whatever it throws fails task creation.
123
+ */
124
+ export declare function inlineVariableAccess(script: string, language: string, resolve: (key: string) => Promise<unknown>): Promise<string>;
125
+ //# sourceMappingURL=variableScriptPatterns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variableScriptPatterns.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/variableScriptPatterns.ts"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,YAChC,gCAAgC,EAChC,gCAAgC,EAChC,kCAAkC,EAClC,wBAAwB,CAChB,CAAA;AAEV,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAA;IACb,qDAAqD;IACrD,GAAG,EAAE,MAAM,CAAA;CACZ,CAAA;AAsBD,MAAM,MAAM,mBAAmB,GAAG;IAChC,gEAAgE;IAChE,KA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/callbacks';
2
+ import { transformer } from './transformer.ts';
3
+ type InboundCtx = Parameters<typeof transformer.inbound>[1];
4
+ export interface OutboundBoundaryOptions {
5
+ uploadUrl?: string;
6
+ streamUrl?: string;
7
+ /** Claim-check offload threshold in bytes, transmitted via task options. */
8
+ maxPayloadSize?: number;
9
+ /** Upload/stream cap in bytes, transmitted via task options. */
10
+ maxFileSize?: number;
11
+ signal?: AbortSignal;
12
+ fetch?: typeof globalThis.fetch;
13
+ /** Sink for best-effort degradation notices. Defaults to `console.warn`. */
14
+ warn?(message: string, error?: unknown): void;
15
+ }
16
+ export interface OutboundSendOptions {
17
+ /** The emission this value belongs to (embedded in callback references). */
18
+ outputName?: string | null;
19
+ /** Callback registrar for this emission; absent ⇒ functions fail loud. */
20
+ onCallback?: CallbackEgressContext['onCallback'];
21
+ /**
22
+ * Log policy: sanitize the payload first (functions/opaque instances become
23
+ * labels), degrade offload failures to warnings, and never reject — a log
24
+ * line must not fail the task. On a transform error resolves to `undefined`
25
+ * (callers skip publishing).
26
+ */
27
+ bestEffort?: boolean;
28
+ }
29
+ export interface OutboundBoundary {
30
+ /**
31
+ * Serialize a value through the composed transformer inside a
32
+ * `withRequenceStreams` scope. The returned promise resolves with the
33
+ * serialized value as soon as references exist (stream bodies may still be
34
+ * uploading); background completion is tracked in the boundary's ledger and
35
+ * surfaced by `settle()`.
36
+ */
37
+ send(data: unknown, opts?: OutboundSendOptions): Promise<unknown>;
38
+ /** Enroll an external promise (e.g. a publish) in the done-gate. */
39
+ track(promise: Promise<unknown>): void;
40
+ /**
41
+ * The done-gate: wait until the ledger stops growing (sends may enqueue
42
+ * more sends), then throw an `AggregateError` if any fail-hard work failed.
43
+ * Ledger entries are pre-caught at registration time, so nothing ever
44
+ * rejects unhandled while the gate is not yet attached.
45
+ */
46
+ settle(): Promise<void>;
47
+ }
48
+ export declare function createOutboundBoundary(base: OutboundBoundaryOptions): OutboundBoundary;
49
+ export interface InboundBoundaryOptions {
50
+ fetch?: typeof globalThis.fetch;
51
+ /** Cancellation for lazy remote reads of reconstructed values. */
52
+ signal?: AbortSignal;
53
+ /** Per-boundary rehydration timeout; composed with `signal` per call. */
54
+ timeoutMs?: number;
55
+ /** Default invocation dispatch for reconstructed callbacks. */
56
+ onCallbackInvoke?: CallbackIngressContext['onCallbackInvoke'];
57
+ /**
58
+ * Transformer override for this boundary; defaults to the full composed
59
+ * chain. Passthrough consumers substitute the claim-check-only instance
60
+ * (`transformer.ts`) so byte references stay raw wire objects.
61
+ */
62
+ transformer?: {
63
+ inbound(data: unknown, ctx: InboundCtx): Promise<unknown>;
64
+ };
65
+ }
66
+ export interface InboundReceiveOptions {
67
+ onCallbackInvoke?: CallbackIngressContext['onCallbackInvoke'];
68
+ }
69
+ /**
70
+ * The single place the service's ingress cancellation/timeout policy lives:
71
+ * every inbound transform of the runtime goes through one of these.
72
+ */
73
+ export declare function createInboundBoundary(base?: InboundBoundaryOptions): (data: unknown, opts?: InboundReceiveOptions) => Promise<unknown>;
74
+ export {};
75
+ //# sourceMappingURL=boundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boundary.d.ts","sourceRoot":"","sources":["../../../../src/boundary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,qBAAqB,CAAA;AAG5B,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAc9C,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;AAE3D,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,UAAU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