@requence/service 0.8.2-edge.1154 → 0.8.2-edge.1156

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 (46) hide show
  1. package/README.md +258 -0
  2. package/build/{chunk-974rc2jy.js → chunk-gpyt51xn.js} +164 -3
  3. package/build/{chunk-974rc2jy.js.map → chunk-gpyt51xn.js.map} +7 -4
  4. package/build/cli.js +17 -30
  5. package/build/cli.js.map +3 -3
  6. package/build/index.js +537 -93
  7. package/build/index.js.map +17 -9
  8. package/build/types/helpers/src/index.d.ts +4 -0
  9. package/build/types/helpers/src/index.d.ts.map +1 -1
  10. package/build/types/helpers/src/protocol/NodeTree.d.ts +20 -0
  11. package/build/types/helpers/src/protocol/NodeTree.d.ts.map +1 -1
  12. package/build/types/helpers/src/protocol/command.d.ts +74 -13
  13. package/build/types/helpers/src/protocol/command.d.ts.map +1 -1
  14. package/build/types/helpers/src/protocol/update.d.ts +128 -10
  15. package/build/types/helpers/src/protocol/update.d.ts.map +1 -1
  16. package/build/types/helpers/src/utils/matchSchema.d.ts +14 -0
  17. package/build/types/helpers/src/utils/matchSchema.d.ts.map +1 -1
  18. package/build/types/helpers/src/utils/serviceRender.d.ts +73 -0
  19. package/build/types/helpers/src/utils/serviceRender.d.ts.map +1 -0
  20. package/build/types/helpers/src/utils/surfaceComponent.d.ts +116 -0
  21. package/build/types/helpers/src/utils/surfaceComponent.d.ts.map +1 -0
  22. package/build/types/helpers/src/utils/surfaceHandler.d.ts +171 -0
  23. package/build/types/helpers/src/utils/surfaceHandler.d.ts.map +1 -0
  24. package/build/types/helpers/src/utils/uiRebuild.d.ts +48 -0
  25. package/build/types/helpers/src/utils/uiRebuild.d.ts.map +1 -0
  26. package/build/types/service/src/boundary.d.ts +14 -1
  27. package/build/types/service/src/boundary.d.ts.map +1 -1
  28. package/build/types/service/src/createAmqpConnection.d.ts +55 -0
  29. package/build/types/service/src/createAmqpConnection.d.ts.map +1 -1
  30. package/build/types/service/src/errors.d.ts +11 -0
  31. package/build/types/service/src/errors.d.ts.map +1 -1
  32. package/build/types/service/src/helpers.d.ts +68 -0
  33. package/build/types/service/src/helpers.d.ts.map +1 -1
  34. package/build/types/service/src/index.d.ts +2 -0
  35. package/build/types/service/src/index.d.ts.map +1 -1
  36. package/build/types/service/src/surfaceHandler.d.ts +36 -0
  37. package/build/types/service/src/surfaceHandler.d.ts.map +1 -0
  38. package/build/types/service/src/surfaceUi.d.ts +141 -0
  39. package/build/types/service/src/surfaceUi.d.ts.map +1 -0
  40. package/build/types/service/src/transformer.d.ts +14 -0
  41. package/build/types/service/src/transformer.d.ts.map +1 -1
  42. package/build/types/service/src/ui.d.ts +247 -0
  43. package/build/types/service/src/ui.d.ts.map +1 -0
  44. package/build/types/service/src/uiWatch.d.ts +68 -0
  45. package/build/types/service/src/uiWatch.d.ts.map +1 -0
  46. package/package.json +10 -4
@@ -11,6 +11,10 @@ export * from './utils/variableRef.ts';
11
11
  export * from './utils/variableScriptPatterns.ts';
12
12
  export * from './utils/isValidMimeType.ts';
13
13
  export * from './utils/requenceCallback.ts';
14
+ export * from './utils/serviceRender.ts';
15
+ export * from './utils/surfaceComponent.ts';
16
+ export * from './utils/surfaceHandler.ts';
17
+ export * from './utils/uiRebuild.ts';
14
18
  export * from './utils/types.ts';
15
19
  export * from './utils/debounce.ts';
16
20
  export * from './utils/obj.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../helpers/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oCAAoC,CAAA;AAClD,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,wBAAwB,CAAA;AACtC,cAAc,mCAAmC,CAAA;AACjD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../helpers/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oCAAoC,CAAA;AAClD,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,uBAAuB,CAAA;AACrC,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,wBAAwB,CAAA;AACtC,cAAc,mCAAmC,CAAA;AACjD,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,sBAAsB,CAAA;AACpC,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA"}
@@ -875,6 +875,26 @@ export declare class NodeTree {
875
875
  }[];
876
876
  getTriggers(nodeId: string): string[];
877
877
  getTraceIds(nodeId: string): string[];
878
+ /**
879
+ * The emission a dispatch to this node was born of — the last id on the ONE
880
+ * traversed incoming edge (#144).
881
+ *
882
+ * The thing that identifies one message, where {@link getTraceIds} identifies
883
+ * its whole lineage. A lineage is cumulative — `[...incoming, emissionId]` at
884
+ * every yield and every data emission — so its length reports how deep the
885
+ * node sits and nothing about how many traces the message carries. And its
886
+ * last element cannot be read for this either: `getTraceIds` flattens every
887
+ * traversed incoming edge and dedupes, so which id ends up last is a fact
888
+ * about edge order. Only the edges themselves hold the answer, which is why it
889
+ * lives here rather than being derived downstream.
890
+ *
891
+ * `null` when no single edge can claim the dispatch: nothing has fed the node
892
+ * yet, or several edges have. A genuine fan-in is the latter by construction —
893
+ * it merges the ids it was given and mints none of its own — and so is a node
894
+ * whose second incoming edge was traversed on an earlier turn of a cycle,
895
+ * where the tree can no longer say which edge carried this activation.
896
+ */
897
+ getOwnTraceId(nodeId: string): string | null;
878
898
  /**
879
899
  * The mirror of `getTraceIds`, reading the edges this node FEEDS rather than
880
900
  * the ones that fed it.
@@ -1 +1 @@
1
- {"version":3,"file":"NodeTree.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/NodeTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAE/C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,CAAA;AAEtC,KAAK,YAAY,GAAG,IAAI,GAAG;IACzB,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB,CAAA;AAMD,KAAK,KAAK,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,EAAE,CAAA;AAqG/C,KAAK,aAAa,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,EAAE,CAAA;AAyC3D,MAAM,MAAM,OAAO,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEzE,UAAU,eAAe;IACvB,KAAK,EAAE,IAAI,EAAE,CAAA;IACb,KAAK,EAAE,IAAI,EAAE,GAAG,Y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M,YAMzB;IAED,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAKpC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK3C;IAED;;;;;;;OAOG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAK5C;IAED,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,GAAE,MAAM,EAAO,QASvE;IACD,gBAAgB,CACd,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,OAAO,EACb,SAAS,UAAQ,EACjB,QAAQ,GAAE,MAAM,EAAO,QAoBxB;IAED,UAAU,CACR,YAAY,EAAE,MAAM,EACpB,oBAAoB,EAAE,UAAU,EAChC,YAAY,EAAE,MAAM,QAWrB;IAED,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,WAO7C;IAED,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAOnD;IAED,UAAU,0CAeT;IAED,OAAO,CAAC,2BAA2B;IAgCnC,uBAAuB,CAAC,YAAY,EAAE,MAAM,2BAmB3C;IAED,iBAAiB,CAAC,YAAY,EAAE,MAAM,2BAsBrC;IAED,qBAAqB,CAAC,MAAM,EAAE,MAAM,2BA6CnC;IAED,KAAK,SAQJ;IAED;;;;;;;;;;;;OAYG;IACH,EAAE,SAaD;IAED,0BAA0B,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAEvE;CACF"}
@@ -58,7 +58,7 @@ export declare function createCommandSchemaWith(parseTreeList: (treeList: InputT
58
58
  references: z.ZodOptional<z.ZodArray<z.ZodAny>>;
59
59
  schemas: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
60
60
  }, z.core.$strip>;
61
- input: z.ZodAny;
61
+ input: z.ZodOptional<z.ZodAny>;
62
62
  options: z.ZodObject<{
63
63
  maxExecutions: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
64
64
  mode: z.ZodDefault<z.ZodEnum<{
@@ -83,7 +83,7 @@ export declare function createCommandSchemaWith(parseTreeList: (treeList: InputT
83
83
  }, z.core.$strip>;
84
84
  }, z.core.$strip>, z.ZodTransform<{
85
85
  type: "CREATE";
86
- input: any;
86
+ input?: any;
87
87
  options: {
88
88
  maxExecutions: number;
89
89
  mode: "CONTINUOUS" | "LINEAR";
@@ -393,7 +393,7 @@ export declare function createCommandSchemaWith(parseTreeList: (treeList: InputT
393
393
  references?: any[] | undefined;
394
394
  schemas?: Record<string, any> | undefined;
395
395
  };
396
- input: any;
396
+ input?: any;
397
397
  options: {
398
398
  maxExecutions: number;
399
399
  mode: "CONTINUOUS" | "LINEAR";
@@ -437,7 +437,7 @@ export declare function createCommandSchemaWithAsync(parseTreeList: (treeList: I
437
437
  references: z.ZodOptional<z.ZodArray<z.ZodAny>>;
438
438
  schemas: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
439
439
  }, z.core.$strip>;
440
- input: z.ZodAny;
440
+ input: z.ZodOptional<z.ZodAny>;
441
441
  options: z.ZodObject<{
442
442
  maxExecutions: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
443
443
  mode: z.ZodDefault<z.ZodEnum<{
@@ -462,7 +462,7 @@ export declare function createCommandSchemaWithAsync(parseTreeList: (treeList: I
462
462
  }, z.core.$strip>;
463
463
  }, z.core.$strip>, z.ZodTransform<{
464
464
  type: "CREATE";
465
- input: any;
465
+ input?: any;
466
466
  options: {
467
467
  maxExecutions: number;
468
468
  mode: "CONTINUOUS" | "LINEAR";
@@ -772,7 +772,7 @@ export declare function createCommandSchemaWithAsync(parseTreeList: (treeList: I
772
772
  references?: any[] | undefined;
773
773
  schemas?: Record<string, any> | undefined;
774
774
  };
775
- input: any;
775
+ input?: any;
776
776
  options: {
777
777
  maxExecutions: number;
778
778
  mode: "CONTINUOUS" | "LINEAR";
@@ -803,7 +803,7 @@ export declare const createCommandSchema: z.ZodPipe<z.ZodObject<{
803
803
  references: z.ZodOptional<z.ZodArray<z.ZodAny>>;
804
804
  schemas: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
805
805
  }, z.core.$strip>;
806
- input: z.ZodAny;
806
+ input: z.ZodOptional<z.ZodAny>;
807
807
  options: z.ZodObject<{
808
808
  maxExecutions: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
809
809
  mode: z.ZodDefault<z.ZodEnum<{
@@ -828,7 +828,7 @@ export declare const createCommandSchema: z.ZodPipe<z.ZodObject<{
828
828
  }, z.core.$strip>;
829
829
  }, z.core.$strip>, z.ZodTransform<{
830
830
  type: "CREATE";
831
- input: any;
831
+ input?: any;
832
832
  options: {
833
833
  maxExecutions: number;
834
834
  mode: "CONTINUOUS" | "LINEAR";
@@ -1138,7 +1138,7 @@ export declare const createCommandSchema: z.ZodPipe<z.ZodObject<{
1138
1138
  references?: any[] | undefined;
1139
1139
  schemas?: Record<string, any> | undefined;
1140
1140
  };
1141
- input: any;
1141
+ input?: any;
1142
1142
  options: {
1143
1143
  maxExecutions: number;
1144
1144
  mode: "CONTINUOUS" | "LINEAR";
@@ -1160,6 +1160,49 @@ export declare const createCommandSchema: z.ZodPipe<z.ZodObject<{
1160
1160
  };
1161
1161
  }>>;
1162
1162
  export type CreateCommand = z.infer<typeof createCommandSchema>;
1163
+ /**
1164
+ * A viewer drove a service-provided surface (#104).
1165
+ *
1166
+ * A command rather than a result, because there is no service process behind a
1167
+ * click: ui/backend holds no capability of the service's, opens no connection on
1168
+ * its behalf and composes no service-protocol message — it forwards *which
1169
+ * handler, with what*, and the operator publishes the invocation. It travels the
1170
+ * one channel ui/backend already has to the operator, so it hashes onto the
1171
+ * task's own shard and cannot overtake or be overtaken by that task's other
1172
+ * commands (knowledge/task-sharding.md).
1173
+ *
1174
+ * `nodeId` — not a message id — is what names the service the handler belongs
1175
+ * to. The pair `(name, version)` is read off the node, and the node is the only
1176
+ * one of the two that a **durable** handler can still be resolved through: it
1177
+ * outlives the message that published the render, which is the whole point of
1178
+ * being durable.
1179
+ *
1180
+ * The handler reference travels verbatim, exactly as the render carried it out
1181
+ * (#103): its `lifetime` is what decides whether the operator publishes to the
1182
+ * version's handler queue or to one connection's backchannel, and the browser
1183
+ * never sees either — it names a props path, and ui/backend resolves it against
1184
+ * what it stored.
1185
+ */
1186
+ export declare const invokeSurfaceHandlerCommandSchema: z.ZodObject<{
1187
+ type: z.ZodLiteral<"INVOKE_SURFACE_HANDLER">;
1188
+ nodeId: z.ZodUUID;
1189
+ surface: z.ZodUUID;
1190
+ handler: z.ZodDiscriminatedUnion<[z.ZodObject<{
1191
+ __REQUENCE_type: z.ZodLiteral<"RequenceHandler">;
1192
+ lifetime: z.ZodLiteral<"durable">;
1193
+ uiId: z.ZodString;
1194
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
1195
+ }, z.core.$strip>, z.ZodObject<{
1196
+ __REQUENCE_type: z.ZodLiteral<"RequenceHandler">;
1197
+ lifetime: z.ZodLiteral<"connection">;
1198
+ uiId: z.ZodString;
1199
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
1200
+ connectionId: z.ZodString;
1201
+ handlerId: z.ZodUUID;
1202
+ }, z.core.$strip>], "lifetime">;
1203
+ arg: z.ZodOptional<z.ZodUnknown>;
1204
+ }, z.core.$strip>;
1205
+ export type InvokeSurfaceHandlerCommand = z.infer<typeof invokeSurfaceHandlerCommandSchema>;
1163
1206
  export declare const commandSchema: z.ZodUnion<readonly [z.ZodObject<{
1164
1207
  type: z.ZodLiteral<"ABORT">;
1165
1208
  reason: z.ZodOptional<z.ZodString>;
@@ -1175,7 +1218,7 @@ export declare const commandSchema: z.ZodUnion<readonly [z.ZodObject<{
1175
1218
  references: z.ZodOptional<z.ZodArray<z.ZodAny>>;
1176
1219
  schemas: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1177
1220
  }, z.core.$strip>;
1178
- input: z.ZodAny;
1221
+ input: z.ZodOptional<z.ZodAny>;
1179
1222
  options: z.ZodObject<{
1180
1223
  maxExecutions: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1181
1224
  mode: z.ZodDefault<z.ZodEnum<{
@@ -1200,7 +1243,7 @@ export declare const commandSchema: z.ZodUnion<readonly [z.ZodObject<{
1200
1243
  }, z.core.$strip>;
1201
1244
  }, z.core.$strip>, z.ZodTransform<{
1202
1245
  type: "CREATE";
1203
- input: any;
1246
+ input?: any;
1204
1247
  options: {
1205
1248
  maxExecutions: number;
1206
1249
  mode: "CONTINUOUS" | "LINEAR";
@@ -1510,7 +1553,7 @@ export declare const commandSchema: z.ZodUnion<readonly [z.ZodObject<{
1510
1553
  references?: any[] | undefined;
1511
1554
  schemas?: Record<string, any> | undefined;
1512
1555
  };
1513
- input: any;
1556
+ input?: any;
1514
1557
  options: {
1515
1558
  maxExecutions: number;
1516
1559
  mode: "CONTINUOUS" | "LINEAR";
@@ -1530,7 +1573,25 @@ export declare const commandSchema: z.ZodUnion<readonly [z.ZodObject<{
1530
1573
  epoch?: string | undefined;
1531
1574
  } | undefined;
1532
1575
  };
1533
- }>>]>;
1576
+ }>>, z.ZodObject<{
1577
+ type: z.ZodLiteral<"INVOKE_SURFACE_HANDLER">;
1578
+ nodeId: z.ZodUUID;
1579
+ surface: z.ZodUUID;
1580
+ handler: z.ZodDiscriminatedUnion<[z.ZodObject<{
1581
+ __REQUENCE_type: z.ZodLiteral<"RequenceHandler">;
1582
+ lifetime: z.ZodLiteral<"durable">;
1583
+ uiId: z.ZodString;
1584
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
1585
+ }, z.core.$strip>, z.ZodObject<{
1586
+ __REQUENCE_type: z.ZodLiteral<"RequenceHandler">;
1587
+ lifetime: z.ZodLiteral<"connection">;
1588
+ uiId: z.ZodString;
1589
+ path: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodInt]>>;
1590
+ connectionId: z.ZodString;
1591
+ handlerId: z.ZodUUID;
1592
+ }, z.core.$strip>], "lifetime">;
1593
+ arg: z.ZodOptional<z.ZodUnknown>;
1594
+ }, z.core.$strip>]>;
1534
1595
  export type Command = z.infer<typeof commandSchema>;
1535
1596
  export type CommandInput = z.input<typeof commandSchema>;
1536
1597
  //# sourceMappingURL=command.d.ts.map
@@ -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;AAG1B,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,QAAQ,EAEd,MAAM,gBAAgB,CAAA;AAEvB,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sBAAsB;;iBAEjC,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AA0BrE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC,CAAA"}
@@ -90,7 +90,7 @@ declare const nodeUpdateSchema: z.ZodObject<{
90
90
  }, z.core.$strip>;
91
91
  type: z.ZodLiteral<"NODE_UPDATE">;
92
92
  output: z.ZodNullable<z.ZodString>;
93
- data: z.ZodUnknown;
93
+ data: z.ZodOptional<z.ZodUnknown>;
94
94
  overwrite: z.ZodBoolean;
95
95
  }, z.core.$strip>;
96
96
  export type NodeUpdate = z.infer<typeof nodeUpdateSchema>;
@@ -122,7 +122,7 @@ declare const nodeCallbackSchema: z.ZodObject<{
122
122
  }, z.core.$strip>;
123
123
  propertyPath: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
124
124
  output: z.ZodNullable<z.ZodString>;
125
- data: z.ZodUnknown;
125
+ data: z.ZodOptional<z.ZodUnknown>;
126
126
  }, z.core.$strip>;
127
127
  export type NodeCallback = z.infer<typeof nodeCallbackSchema>;
128
128
  declare const nodeEndUpdateSchema: z.ZodObject<{
@@ -166,9 +166,72 @@ declare const nodeDebugUpdateSchema: z.ZodObject<{
166
166
  system: "system";
167
167
  warn: "warn";
168
168
  }>;
169
- data: z.ZodUnknown;
169
+ data: z.ZodOptional<z.ZodUnknown>;
170
170
  }, z.core.$strip>;
171
171
  export type NodeDebugUpdate = z.infer<typeof nodeDebugUpdateSchema>;
172
+ declare const nodeRenderUpdateSchema: z.ZodObject<{
173
+ component: z.ZodObject<{
174
+ id: z.ZodString;
175
+ hash: z.ZodString;
176
+ source: z.ZodDefault<z.ZodNullable<z.ZodString>>;
177
+ }, z.core.$strip>;
178
+ props: z.ZodUnknown;
179
+ defaults: z.ZodOptional<z.ZodUnknown>;
180
+ surfaceId: z.ZodString;
181
+ devSession: z.ZodDefault<z.ZodNullable<z.ZodString>>;
182
+ timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
183
+ id: z.ZodUUID;
184
+ rootTaskId: z.ZodOptional<z.ZodUUID>;
185
+ traceIds: z.ZodArray<z.ZodString>;
186
+ node: z.ZodObject<{
187
+ id: z.ZodUUID;
188
+ type: z.ZodEnum<{
189
+ logic: "logic";
190
+ or: "or";
191
+ reference: "reference";
192
+ service: "service";
193
+ }>;
194
+ alias: z.ZodOptional<z.ZodString>;
195
+ }, z.core.$strip>;
196
+ type: z.ZodLiteral<"NODE_RENDER">;
197
+ messageId: z.ZodUUID;
198
+ connectionId: z.ZodUUID;
199
+ ownTraceId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
200
+ handlerQueue: z.ZodDefault<z.ZodNullable<z.ZodString>>;
201
+ }, z.core.$strip>;
202
+ export type NodeRenderUpdate = z.infer<typeof nodeRenderUpdateSchema>;
203
+ declare const surfaceDeadUpdateSchema: z.ZodObject<{
204
+ timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
205
+ id: z.ZodUUID;
206
+ rootTaskId: z.ZodOptional<z.ZodUUID>;
207
+ traceIds: z.ZodArray<z.ZodString>;
208
+ type: z.ZodLiteral<"SURFACE_DEAD">;
209
+ messageId: z.ZodUUID;
210
+ connectionId: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
211
+ }, z.core.$strip>;
212
+ export type SurfaceDeadUpdate = z.infer<typeof surfaceDeadUpdateSchema>;
213
+ declare const surfaceInteractionErrorUpdateSchema: z.ZodObject<{
214
+ timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
215
+ id: z.ZodUUID;
216
+ rootTaskId: z.ZodOptional<z.ZodUUID>;
217
+ traceIds: z.ZodArray<z.ZodString>;
218
+ type: z.ZodLiteral<"SURFACE_INTERACTION_ERROR">;
219
+ surface: z.ZodUUID;
220
+ message: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
221
+ }, z.core.$strip>;
222
+ export type SurfaceInteractionErrorUpdate = z.infer<typeof surfaceInteractionErrorUpdateSchema>;
223
+ declare const uiRebuiltUpdateSchema: z.ZodObject<{
224
+ devSession: z.ZodString;
225
+ uiId: z.ZodString;
226
+ hash: z.ZodString;
227
+ source: z.ZodString;
228
+ timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
229
+ id: z.ZodUUID;
230
+ rootTaskId: z.ZodOptional<z.ZodUUID>;
231
+ traceIds: z.ZodArray<z.ZodString>;
232
+ type: z.ZodLiteral<"UI_REBUILT">;
233
+ }, z.core.$strip>;
234
+ export type UiRebuiltUpdate = z.infer<typeof uiRebuiltUpdateSchema>;
172
235
  declare const nodeDeferUpdateSchema: z.ZodObject<{
173
236
  timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
174
237
  id: z.ZodUUID;
@@ -185,7 +248,7 @@ declare const nodeDeferUpdateSchema: z.ZodObject<{
185
248
  alias: z.ZodOptional<z.ZodString>;
186
249
  }, z.core.$strip>;
187
250
  type: z.ZodLiteral<"NODE_DEFER">;
188
- reason: z.ZodUnknown;
251
+ reason: z.ZodOptional<z.ZodUnknown>;
189
252
  }, z.core.$strip>;
190
253
  export type NodeDeferUpdate = z.infer<typeof nodeDeferUpdateSchema>;
191
254
  declare const taskStartUpdateSchema: z.ZodObject<{
@@ -200,7 +263,7 @@ declare const taskStartUpdateSchema: z.ZodObject<{
200
263
  nodeId: z.ZodUUID;
201
264
  messageId: z.ZodUUID;
202
265
  }, z.core.$strip>>>;
203
- input: z.ZodUnknown;
266
+ input: z.ZodOptional<z.ZodUnknown>;
204
267
  }, z.core.$strip>;
205
268
  export type TaskStartUpdate = z.infer<typeof taskStartUpdateSchema>;
206
269
  declare const taskErrorUpdateSchema: z.ZodObject<{
@@ -307,7 +370,7 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
307
370
  }, z.core.$strip>;
308
371
  type: z.ZodLiteral<"NODE_UPDATE">;
309
372
  output: z.ZodNullable<z.ZodString>;
310
- data: z.ZodUnknown;
373
+ data: z.ZodOptional<z.ZodUnknown>;
311
374
  overwrite: z.ZodBoolean;
312
375
  }, z.core.$strip>, z.ZodObject<{
313
376
  timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
@@ -337,7 +400,7 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
337
400
  }, z.core.$strip>;
338
401
  propertyPath: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
339
402
  output: z.ZodNullable<z.ZodString>;
340
- data: z.ZodUnknown;
403
+ data: z.ZodOptional<z.ZodUnknown>;
341
404
  }, z.core.$strip>, z.ZodObject<{
342
405
  timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
343
406
  id: z.ZodUUID;
@@ -377,7 +440,62 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
377
440
  system: "system";
378
441
  warn: "warn";
379
442
  }>;
380
- data: z.ZodUnknown;
443
+ data: z.ZodOptional<z.ZodUnknown>;
444
+ }, z.core.$strip>, z.ZodObject<{
445
+ component: z.ZodObject<{
446
+ id: z.ZodString;
447
+ hash: z.ZodString;
448
+ source: z.ZodDefault<z.ZodNullable<z.ZodString>>;
449
+ }, z.core.$strip>;
450
+ props: z.ZodUnknown;
451
+ defaults: z.ZodOptional<z.ZodUnknown>;
452
+ surfaceId: z.ZodString;
453
+ devSession: z.ZodDefault<z.ZodNullable<z.ZodString>>;
454
+ timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
455
+ id: z.ZodUUID;
456
+ rootTaskId: z.ZodOptional<z.ZodUUID>;
457
+ traceIds: z.ZodArray<z.ZodString>;
458
+ node: z.ZodObject<{
459
+ id: z.ZodUUID;
460
+ type: z.ZodEnum<{
461
+ logic: "logic";
462
+ or: "or";
463
+ reference: "reference";
464
+ service: "service";
465
+ }>;
466
+ alias: z.ZodOptional<z.ZodString>;
467
+ }, z.core.$strip>;
468
+ type: z.ZodLiteral<"NODE_RENDER">;
469
+ messageId: z.ZodUUID;
470
+ connectionId: z.ZodUUID;
471
+ ownTraceId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
472
+ handlerQueue: z.ZodDefault<z.ZodNullable<z.ZodString>>;
473
+ }, z.core.$strip>, z.ZodObject<{
474
+ timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
475
+ id: z.ZodUUID;
476
+ rootTaskId: z.ZodOptional<z.ZodUUID>;
477
+ traceIds: z.ZodArray<z.ZodString>;
478
+ type: z.ZodLiteral<"SURFACE_DEAD">;
479
+ messageId: z.ZodUUID;
480
+ connectionId: z.ZodDefault<z.ZodNullable<z.ZodUUID>>;
481
+ }, z.core.$strip>, z.ZodObject<{
482
+ timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
483
+ id: z.ZodUUID;
484
+ rootTaskId: z.ZodOptional<z.ZodUUID>;
485
+ traceIds: z.ZodArray<z.ZodString>;
486
+ type: z.ZodLiteral<"SURFACE_INTERACTION_ERROR">;
487
+ surface: z.ZodUUID;
488
+ message: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
489
+ }, z.core.$strip>, z.ZodObject<{
490
+ devSession: z.ZodString;
491
+ uiId: z.ZodString;
492
+ hash: z.ZodString;
493
+ source: z.ZodString;
494
+ timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
495
+ id: z.ZodUUID;
496
+ rootTaskId: z.ZodOptional<z.ZodUUID>;
497
+ traceIds: z.ZodArray<z.ZodString>;
498
+ type: z.ZodLiteral<"UI_REBUILT">;
381
499
  }, z.core.$strip>, z.ZodObject<{
382
500
  timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
383
501
  id: z.ZodUUID;
@@ -394,7 +512,7 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
394
512
  alias: z.ZodOptional<z.ZodString>;
395
513
  }, z.core.$strip>;
396
514
  type: z.ZodLiteral<"NODE_DEFER">;
397
- reason: z.ZodUnknown;
515
+ reason: z.ZodOptional<z.ZodUnknown>;
398
516
  }, z.core.$strip>, z.ZodObject<{
399
517
  timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
400
518
  id: z.ZodUUID;
@@ -407,7 +525,7 @@ export declare const updateSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
407
525
  nodeId: z.ZodUUID;
408
526
  messageId: z.ZodUUID;
409
527
  }, z.core.$strip>>>;
410
- input: z.ZodUnknown;
528
+ input: z.ZodOptional<z.ZodUnknown>;
411
529
  }, z.core.$strip>, z.ZodObject<{
412
530
  timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<Date, number>>;
413
531
  id: z.ZodUUID;
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/protocol/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAsB1B,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;iBAIxB,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAYjE,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAezB,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;iBAGzB,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;iBAKpB,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMtB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAiBvB,CAAA;AAEF,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA"}
@@ -1,4 +1,18 @@
1
1
  import type { z } from 'zod/v4';
2
+ /**
3
+ * Curried on **arity**, never on the value — which is what the rest parameter
4
+ * buys over an optional one.
5
+ *
6
+ * It used to branch on `if (input)`, so a falsy second argument fell through to
7
+ * the curried arm and the caller was handed a predicate *function* instead of an
8
+ * answer. A function is truthy, so `if (!matchSchema(schema, value))` passed on
9
+ * exactly the input it was written to catch (a missing `correlationId`, an absent
10
+ * `taskId` header), and `if (matchSchema(schema, value))` fired on values that
11
+ * match nothing — `resolveAccept`'s unresolvable `#/definitions/…` hop reached
12
+ * `undefined.const` that way. The mirror image was just as wrong: `0`, `''` and
13
+ * `false` are legitimate values a guard must be able to say *yes* about, and
14
+ * `index: 0` is the first publish of every service message.
15
+ */
2
16
  export declare function matchSchema<Schema extends z.ZodSchema>(schema: Schema, input: unknown): input is z.infer<Schema>;
3
17
  export declare function matchSchema<Schema extends z.ZodSchema>(schema: Schema): (input: unknown) => input is z.infer<Schema>;
4
18
  //# sourceMappingURL=matchSchema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"matchSchema.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/matchSchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE/B,wBAAgB,WAAW,CAAC,MAAM,SAAS,CAAC,CAAC,SAAS,EACpD,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;AAC3B,wBAAgB,WAAW,CAAC,MAAM,SAAS,CAAC,CAAC,SAAS,EACpD,MAAM,EAAE,MAAM,GACb,CAAC,KAAK,EAAE,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA"}
1
+ {"version":3,"file":"matchSchema.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/matchSchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE/B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,MAAM,SAAS,CAAC,CAAC,SAAS,EACpD,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;AAC3B,wBAAgB,WAAW,CAAC,MAAM,SAAS,CAAC,CAAC,SAAS,EACpD,MAAM,EAAE,MAAM,GACb,CAAC,KAAK,EAAE,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA"}
@@ -0,0 +1,73 @@
1
+ import { z } from 'zod/v4';
2
+ /**
3
+ * The render payload a service publishes when a handler calls
4
+ * `context.render(ui, props)` — the wire shape shared by the service SDK
5
+ * (which composes it) and the operator (which parses it before emitting the
6
+ * render as a task update). See `knowledge/service-ui-surfaces.md`.
7
+ *
8
+ * `component.source` travels only on the **first** render of a given hash into a
9
+ * given task; later renders carry the hash alone, because ui/backend stores the
10
+ * bundle hash-addressed and that row outlives every render. A hash arriving
11
+ * without a source that ui/backend has never seen is an error state on the
12
+ * surface, not a silent fallback (D16).
13
+ *
14
+ * Per task rather than per connection because bundle retention is per task
15
+ * (D19): the last-referent sweep removes a bundle once no task references it, and
16
+ * a connection can outlive every task that referenced its component.
17
+ *
18
+ * Every field is deliberately a *top-level* key, because that is the granularity
19
+ * the size-triggered claim-check works at: it offloads a record body's largest
20
+ * top-level values first, and the publisher pins every one of these inline except
21
+ * `props`. So an oversized render always offloads `props` — the one value whose
22
+ * loss is a named error state rather than a broken surface. The source is capped
23
+ * at {@link MAX_UI_SOURCE_BYTES} anyway, well under the offload threshold, so the
24
+ * bundle always travels inline (D4).
25
+ */
26
+ export declare const serviceRenderSchema: z.ZodObject<{
27
+ component: z.ZodObject<{
28
+ id: z.ZodString;
29
+ hash: z.ZodString;
30
+ source: z.ZodDefault<z.ZodNullable<z.ZodString>>;
31
+ }, z.core.$strip>;
32
+ props: z.ZodUnknown;
33
+ defaults: z.ZodOptional<z.ZodUnknown>;
34
+ surfaceId: z.ZodString;
35
+ devSession: z.ZodDefault<z.ZodNullable<z.ZodString>>;
36
+ }, z.core.$strip>;
37
+ export type ServiceRender = z.infer<typeof serviceRenderSchema>;
38
+ /**
39
+ * Hard cap on a UI component bundle, enforced when the component is registered
40
+ * (D4). Fits a self-contained React component, stays storable inline in
41
+ * Postgres, and fails fast on an accidental whole-app bundle.
42
+ */
43
+ export declare const MAX_UI_SOURCE_BYTES: number;
44
+ /**
45
+ * The surface a render targets when it names none (D3). A node's surfaces are
46
+ * keyed by this id, so the default is a single surface per node/trace.
47
+ */
48
+ export declare const DEFAULT_SURFACE_ID = "default";
49
+ /**
50
+ * Hard cap on one value a browser sends into a surface — a callback
51
+ * invocation's argument, or a deferred form's submitted response — enforced in
52
+ * ui/backend before either is published (D7).
53
+ *
54
+ * One number for both because they are the same thing arriving by two routes:
55
+ * viewer-authored bytes that reach service code, bounded before they enter the
56
+ * fabric. A response additionally has to fit the node's own output, which the
57
+ * operator enforces on the way in as it does for any service result.
58
+ *
59
+ * An interaction is exactly that — a click, a form submit, an approval — not
60
+ * a data transfer, and unlike a service's own publishes it crosses no outbound
61
+ * boundary: nothing offloads it, so its bytes reach the broker as they are. The
62
+ * cap is what keeps that true, and it is deliberately far below any message
63
+ * limit rather than tuned to one, so a task's `maxPayloadSize` can never make
64
+ * the difference between a usable synchronous rejection and a dropped AMQP
65
+ * connection.
66
+ *
67
+ * Lives here, next to {@link MAX_UI_SOURCE_BYTES}, rather than inside ui/backend:
68
+ * the browser is the other party that has to respect it, and when the surface
69
+ * host starts refusing an oversized argument before the round trip it should
70
+ * read the number from where the server enforces it, not restate it.
71
+ */
72
+ export declare const MAX_SURFACE_INTERACTION_BYTES: number;
73
+ //# sourceMappingURL=serviceRender.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serviceRender.d.ts","sourceRoot":"","sources":["../../../../../../helpers/src/utils/serviceRender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAE1B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;iBAkD9B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAAc,CAAA;AAE9C;;;GAGG;AACH,eAAO,MAAM,kBAAkB,YAAY,CAAA;AAE3C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,6BAA6B,QAAY,CAAA"}