@dudousxd/nestjs-catalog 0.16.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@
9
9
  * systems each believing they decide when a load runs.
10
10
  */
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.REDACTED_SECRET = exports.CATALOG_PIPELINE_STORE = exports.WORKFLOW_ISSUE_CODES = exports.WORKFLOW_CALL_CONTRACT = exports.WORKFLOW_EXECUTION_MODES = exports.WORKFLOW_STATUSES = exports.WORKFLOW_BRANCH_LABELS = exports.WORKFLOW_FILTER_MAX_VALUES = exports.WORKFLOW_FILTER_MAX_DEPTH = exports.WORKFLOW_FILTER_COLUMN_PATTERN = exports.WORKFLOW_FILTER_OPERATORS = exports.WORKFLOW_FILTER_PREDICATE_KINDS = exports.WORKFLOW_PREDICATE_KINDS = exports.WORKFLOW_ROW_GAP = exports.WORKFLOW_COLUMN_GAP = exports.WORKFLOW_NODE_HEIGHT = exports.WORKFLOW_NODE_WIDTH = exports.WORKFLOW_NODE_ID_PATTERN = exports.WORKFLOW_NODE_KINDS = exports.WORKFLOW_SKIP_REASONS = exports.CODE_CONTEXT_CONTRACT = exports.TRANSFORM_RUNNER = exports.TRANSFORM_LANGUAGES = exports.CONNECTOR_KINDS = void 0;
12
+ exports.REDACTED_SECRET = exports.CATALOG_PIPELINE_STORE = exports.WORKFLOW_ISSUE_CODES = exports.WORKFLOW_CALL_CONTRACT = exports.WORKFLOW_EXECUTION_MODES = exports.WORKFLOW_STATUSES = exports.WORKFLOW_BRANCH_LABELS = exports.NODE_KIND_IS_REUSABLE = exports.REUSABLE_NODE_KINDS = exports.WORKFLOW_FILTER_MAX_VALUES = exports.WORKFLOW_FILTER_MAX_DEPTH = exports.WORKFLOW_FILTER_COLUMN_PATTERN = exports.WORKFLOW_FILTER_OPERATORS = exports.WORKFLOW_FILTER_PREDICATE_KINDS = exports.WORKFLOW_PREDICATE_KINDS = exports.WORKFLOW_ROW_GAP = exports.WORKFLOW_COLUMN_GAP = exports.WORKFLOW_NODE_HEIGHT = exports.WORKFLOW_NODE_WIDTH = exports.WORKFLOW_NODE_ID_PATTERN = exports.WORKFLOW_NODE_KINDS = exports.WORKFLOW_SKIP_REASONS = exports.CODE_CONTEXT_CONTRACT = exports.TRANSFORM_RUNNER = exports.TRANSFORM_LANGUAGES = exports.CONNECTOR_KINDS = void 0;
13
13
  exports.isConnectorKind = isConnectorKind;
14
14
  exports.isTransformLanguage = isTransformLanguage;
15
15
  exports.isWorkflowSkipReason = isWorkflowSkipReason;
@@ -27,6 +27,13 @@ exports.unreachableFilterOperator = unreachableFilterOperator;
27
27
  exports.isWorkflowFilterValue = isWorkflowFilterValue;
28
28
  exports.isWorkflowFilterPredicate = isWorkflowFilterPredicate;
29
29
  exports.workflowFilterMatches = workflowFilterMatches;
30
+ exports.isReusableNodeKind = isReusableNodeKind;
31
+ exports.nodeKindIsReusable = nodeKindIsReusable;
32
+ exports.unreachableReusableNodeKind = unreachableReusableNodeKind;
33
+ exports.applyReusableNode = applyReusableNode;
34
+ exports.isReusableNodeBody = isReusableNodeBody;
35
+ exports.reusableNodeBodyOf = reusableNodeBodyOf;
36
+ exports.describeVersionPin = describeVersionPin;
30
37
  exports.isWorkflowBranchLabel = isWorkflowBranchLabel;
31
38
  exports.isWorkflowStatus = isWorkflowStatus;
32
39
  exports.isWorkflowExecutionMode = isWorkflowExecutionMode;
@@ -41,9 +48,17 @@ exports.isWorkflowNode = isWorkflowNode;
41
48
  exports.isWorkflowEdge = isWorkflowEdge;
42
49
  exports.supportsWorkflows = supportsWorkflows;
43
50
  exports.supportsTransformRevisions = supportsTransformRevisions;
51
+ exports.supportsTransformPins = supportsTransformPins;
52
+ exports.supportsReusableNodes = supportsReusableNodes;
44
53
  exports.supportsWorkflowStages = supportsWorkflowStages;
45
54
  exports.supportsLoadExpectations = supportsLoadExpectations;
46
55
  exports.isPipelineStore = isPipelineStore;
56
+ // The revision shape is declared beside the audit trail rather than here,
57
+ // because it is one shape over two subjects — a transform's code and a saved
58
+ // query's SQL — and neither of them owns it. This is a type-only import, and the
59
+ // edge only ever points this way: `catalog.workspace.ts` knows nothing about
60
+ // pipelines.
61
+ const catalog_workspace_1 = require("./catalog.workspace");
47
62
  /**
48
63
  * Where a connector pulls from.
49
64
  *
@@ -767,6 +782,201 @@ function orderedHolds(operator, held, wanted) {
767
782
  return held < wanted;
768
783
  return held <= wanted;
769
784
  }
785
+ /* --- reusable nodes ------------------------------------------------------ */
786
+ /**
787
+ * The node kinds that can be saved once and used in several graphs.
788
+ *
789
+ * Source and sink, and the reason is that those two are the only kinds whose
790
+ * *composition* is worth a name. A connection is already a shared object, and it
791
+ * answers "which database" — but nobody reaches for "the warehouse" when they
792
+ * draw a graph, they reach for "the nightly MVR pull from the warehouse", which
793
+ * is the connection **plus** the query, plus whether it reads everything or only
794
+ * what changed, plus what the thing is called. That composition had nowhere to
795
+ * live, so it was retyped per graph and the fourteenth copy was the one with the
796
+ * typo in the `WHERE` clause.
797
+ *
798
+ * A transform is deliberately **not** here, and that is not an omission: a
799
+ * transform is already a stored object referenced by id
800
+ * ({@link WorkflowTransformNode.transformId}), so a reusable transform node
801
+ * would be a second way to say the same thing. What it was missing is a version
802
+ * pin, which is {@link WorkflowTransformNode.transformVersion}, not this.
803
+ *
804
+ * `call`, `if` and `filter` are not here either, and the record below is where
805
+ * each of them says so — see {@link NODE_KIND_IS_REUSABLE}.
806
+ */
807
+ exports.REUSABLE_NODE_KINDS = ['source', 'sink'];
808
+ /** Same reason as {@link isConnectorKind}: one list, no second copy to drift. */
809
+ function isReusableNodeKind(value) {
810
+ return exports.REUSABLE_NODE_KINDS.some((kind) => kind === value);
811
+ }
812
+ /**
813
+ * Whether each node kind may be saved as a reusable node.
814
+ *
815
+ * A record over every kind rather than a shorter list of the two that can,
816
+ * because this codebase keeps being bitten by hand-maintained lists going quiet
817
+ * — most recently the add-node row that shipped the `filter` node with no way to
818
+ * create it. A kind added to {@link WORKFLOW_NODE_KINDS} without an entry here
819
+ * is a type error in this file naming the decision it has not made.
820
+ *
821
+ * The second `satisfies` is the other half of the same guard, in the other
822
+ * direction: anything named in {@link REUSABLE_NODE_KINDS} has to be `true`
823
+ * here, so the list and this table cannot come apart. Adding `'filter'` to that
824
+ * list without a `ReusableFilterBody` therefore fails to compile twice — once
825
+ * here, and once at every narrowing over {@link ReusableNodeBody}.
826
+ *
827
+ * Why each `false`:
828
+ *
829
+ * - `transform` — already a reference to a stored object. See
830
+ * {@link REUSABLE_NODE_KINDS}.
831
+ * - `call` — already a reference to somebody else's registered workflow, pinned
832
+ * by name and version. There is nothing left to name.
833
+ * - `if` and `filter` — a predicate is *about* the rows in front of it. A gate
834
+ * saved under a name and dropped into another graph tests a column that graph
835
+ * may not have, and a filter is worse: {@link WorkflowFilterNode.narrows} is
836
+ * an acknowledgement about *this* graph's sinks, so a shared one would carry
837
+ * somebody else's acknowledgement into a graph they never saw.
838
+ */
839
+ exports.NODE_KIND_IS_REUSABLE = {
840
+ source: true,
841
+ transform: false,
842
+ sink: true,
843
+ call: false,
844
+ if: false,
845
+ filter: false,
846
+ };
847
+ /** Whether this kind can be saved as a reusable node. Reads {@link NODE_KIND_IS_REUSABLE}. */
848
+ function nodeKindIsReusable(kind) {
849
+ return exports.NODE_KIND_IS_REUSABLE[kind];
850
+ }
851
+ /**
852
+ * {@link unreachableNodeKind}, for reusable bodies, and for the identical
853
+ * reason: every branch over {@link ReusableNodeBody} ends here, so a body added
854
+ * to the union without a rule for folding it onto a node is a type error naming
855
+ * the file rather than a graph that saves and then runs a node nobody
856
+ * configured. It throws as well, because these arrive as JSON out of a column.
857
+ */
858
+ function unreachableReusableNodeKind(body, where) {
859
+ const kind = typeof body === 'string' ? body : Reflect.get(Object(body), 'kind');
860
+ throw new Error(`${where} does not handle a reusable node body of kind ${JSON.stringify(kind)}. The reusable kinds and every decision made per kind are meant to move together.`);
861
+ }
862
+ /**
863
+ * Fold a reusable body onto the node that references it.
864
+ *
865
+ * The one implementation, called by the store when a graph is saved and by the
866
+ * runner when one is executed, so the node a canvas draws and the node that runs
867
+ * cannot describe different reads. Pure, and it takes the body rather than
868
+ * fetching one, for the reason `validateWorkflow` is pure: this file is imported
869
+ * by the browser entry point.
870
+ *
871
+ * ## What it refuses
872
+ *
873
+ * A sink body whose `targetType` differs from the one already on the node. That
874
+ * is not a tidiness check — it is the same shape as `WorkflowRunSteps.checkCall`
875
+ * and it is load-bearing for the same reason. A graph's sinks are checked
876
+ * against the author's write grants (`assertMayWriteTypes`) using the type on
877
+ * the node, at save time. If a reusable body could repoint that afterwards, then
878
+ * editing a shared sink would write into a type that nobody with access to this
879
+ * graph was ever granted — and it would do it on a schedule, with the graph's
880
+ * own diff showing nothing. So the disagreement fails, naming both types, and
881
+ * the repair is that the referencing graph is re-saved and re-checked.
882
+ *
883
+ * A mismatched *kind* is refused for the plainer reason that there is nothing
884
+ * sensible to do with it: a sink body on a source node is a reference somebody
885
+ * repointed at the wrong object, and folding half of it in would produce a node
886
+ * that is neither.
887
+ */
888
+ function applyReusableNode(node, body) {
889
+ if (body.kind === 'source') {
890
+ if (node.kind !== 'source') {
891
+ throw new Error(reusableKindMismatch(node, body.kind));
892
+ }
893
+ return {
894
+ ...node,
895
+ sourceKind: body.sourceKind,
896
+ connectionId: body.connectionId,
897
+ config: body.config,
898
+ secretEnvVar: body.secretEnvVar,
899
+ mode: body.mode,
900
+ };
901
+ }
902
+ if (body.kind === 'sink') {
903
+ if (node.kind !== 'sink') {
904
+ throw new Error(reusableKindMismatch(node, body.kind));
905
+ }
906
+ if (node.targetType.length > 0 && node.targetType !== body.targetType) {
907
+ throw new Error(`Sink "${node.name}" (${node.id}) commits ${node.targetType}, and the reusable node it uses now commits ${body.targetType}. A graph is checked against the types its sinks write at the moment it is saved, so a shared sink is not allowed to repoint one afterwards — that would write into a type nobody here was granted. Re-save this graph to adopt ${body.targetType}, which checks the grants again, or pin this node to the version that still commits ${node.targetType}.`);
908
+ }
909
+ return { ...node, targetType: body.targetType, mode: body.mode };
910
+ }
911
+ return unreachableReusableNodeKind(body, 'applyReusableNode');
912
+ }
913
+ function reusableKindMismatch(node, bodyKind) {
914
+ return `Node "${node.name}" (${node.id}) is a ${node.kind} node and the reusable node it names is a ${bodyKind}. A reference that changed kind under a graph would leave a node that is neither, so this is refused rather than half-applied.`;
915
+ }
916
+ /** Whether a stored value is a reusable body this build can execute. */
917
+ function isReusableNodeBody(value) {
918
+ if (typeof value !== 'object' || value === null)
919
+ return false;
920
+ const kind = Reflect.get(value, 'kind');
921
+ if (kind === 'source') {
922
+ const config = Reflect.get(value, 'config');
923
+ return (isConnectorKind(Reflect.get(value, 'sourceKind')) &&
924
+ typeof config === 'object' &&
925
+ config !== null &&
926
+ !Array.isArray(config));
927
+ }
928
+ if (kind === 'sink') {
929
+ const targetType = Reflect.get(value, 'targetType');
930
+ return typeof targetType === 'string' && targetType.length > 0;
931
+ }
932
+ // Refused rather than defaulted, exactly as `isWorkflowNode` refuses a kind it
933
+ // does not know: a body read back as something this build has no rule for
934
+ // would be folded onto a node as nothing at all, and the node would then run
935
+ // whatever was cached on it while claiming to be an instance of the library's.
936
+ return false;
937
+ }
938
+ /**
939
+ * The body a node is currently carrying, ready to be saved under a name.
940
+ *
941
+ * The other direction of {@link applyReusableNode}, and the reason
942
+ * save-as-reusable cannot silently deep-copy: this is what gets stored, the node
943
+ * keeps a `useId` pointing at it, and nothing anywhere duplicates a graph.
944
+ *
945
+ * Answers `undefined` for a kind that cannot be reusable rather than throwing,
946
+ * because the caller is a route answering a person who pressed a button on a
947
+ * node — {@link nodeKindIsReusable} is what a screen asks before offering it,
948
+ * and the route repeats the question rather than trusting the screen asked.
949
+ */
950
+ function reusableNodeBodyOf(node) {
951
+ if (node.kind === 'source') {
952
+ return {
953
+ kind: 'source',
954
+ sourceKind: node.sourceKind,
955
+ connectionId: node.connectionId,
956
+ config: node.config,
957
+ secretEnvVar: node.secretEnvVar,
958
+ mode: node.mode,
959
+ };
960
+ }
961
+ if (node.kind === 'sink') {
962
+ return { kind: 'sink', targetType: node.targetType, mode: node.mode };
963
+ }
964
+ return undefined;
965
+ }
966
+ function describeVersionPin(version, subject) {
967
+ if (version === undefined) {
968
+ return {
969
+ pinned: false,
970
+ label: 'follows the latest',
971
+ detail: `This node runs whatever ${subject} says today. An edit to it reaches this graph on the next run, with no new version of this graph and nothing in its diff — which is what you want when the point is that everybody moves together, and is worth pinning against when it is not.`,
972
+ };
973
+ }
974
+ return {
975
+ pinned: true,
976
+ label: `pinned to v${version}`,
977
+ detail: `This node runs v${version} of ${subject} and stays there while it is edited elsewhere. Moving to a newer version is an edit to this graph, so it has a diff and a version of its own. A pin to a version that has been superseded more than ${catalog_workspace_1.CATALOG_REVISION_LIMIT} times can no longer be produced, and the run fails saying so rather than quietly using the latest.`,
978
+ };
979
+ }
770
980
  /**
771
981
  * Which side of an {@link WorkflowIfNode} a wire leaves by.
772
982
  *
@@ -980,6 +1190,15 @@ exports.WORKFLOW_ISSUE_CODES = [
980
1190
  'filter-predicate-invalid',
981
1191
  'filter-narrows-unacknowledged',
982
1192
  'filter-narrows-nothing',
1193
+ /**
1194
+ * A version pin that is not a version — `0`, `2.5`, `"3"`, `-1`.
1195
+ *
1196
+ * One code for both pins, because they are one mistake: a threshold that
1197
+ * cannot name a version can only ever fail to resolve, and it fails inside a
1198
+ * durable step halfway through a load rather than on the canvas. The same
1199
+ * argument `if-threshold-invalid` makes one field along.
1200
+ */
1201
+ 'version-pin-invalid',
983
1202
  ];
984
1203
  /**
985
1204
  * Everything that makes a graph unrunnable, in one pure function.
@@ -1165,8 +1384,74 @@ function checkNodeWiring(nodes, incoming, outgoing, issues) {
1165
1384
  const unconfigured = nodeIsUnconfigured(node);
1166
1385
  if (unconfigured)
1167
1386
  issues.push(unconfigured);
1387
+ checkVersionPins(node, issues);
1388
+ }
1389
+ }
1390
+ /**
1391
+ * Every version pin on this node names a version that could exist.
1392
+ *
1393
+ * Both pins in one place, because they are one rule and splitting it is how one
1394
+ * of the two ends up accepting `0`. Checked here rather than only at the HTTP
1395
+ * boundary because `validateWorkflow` is what the canvas runs, so this is the
1396
+ * difference between a refusal on the screen where the number was typed and a
1397
+ * 400 after pressing Save.
1398
+ *
1399
+ * A pin has to be a whole number of at least one, matching what a version
1400
+ * actually is: {@link CatalogTransform.version} and
1401
+ * {@link CatalogReusableNode.version} both start at 1 and count up in ones.
1402
+ * `"3"` — which is what an unparsed form field sends — is refused rather than
1403
+ * coerced, for the reason `if-threshold-invalid` refuses it: a pin that no
1404
+ * stored version can equal resolves to nothing, and it does so inside a durable
1405
+ * step in the middle of a load.
1406
+ *
1407
+ * A `useVersion` with no `useId` is caught here too, as an invalid pin rather
1408
+ * than as its own code: it pins a reference that does not exist, so the number
1409
+ * can never be looked up.
1410
+ */
1411
+ function checkVersionPins(node, issues) {
1412
+ if (node.kind === 'transform') {
1413
+ const invalid = badPin(node.transformVersion);
1414
+ if (invalid) {
1415
+ issues.push({
1416
+ code: 'version-pin-invalid',
1417
+ nodeIds: [node.id],
1418
+ message: `Transform node "${node.name}" (${node.id}) is pinned to version ${invalid} of its code, and a version is a whole number of at least 1. Leave it unset for the node to follow the latest.`,
1419
+ });
1420
+ }
1421
+ return;
1422
+ }
1423
+ if (!nodeKindIsReusable(node.kind))
1424
+ return;
1425
+ // Narrowed off the union rather than read off `node` with a property check,
1426
+ // so a kind that becomes reusable without gaining the fields is a type error
1427
+ // here and not a check that silently passes.
1428
+ if (node.kind !== 'source' && node.kind !== 'sink')
1429
+ return;
1430
+ const invalid = badPin(node.useVersion);
1431
+ if (invalid) {
1432
+ issues.push({
1433
+ code: 'version-pin-invalid',
1434
+ nodeIds: [node.id],
1435
+ message: `Node "${node.name}" (${node.id}) is pinned to version ${invalid} of the reusable node it uses, and a version is a whole number of at least 1. Leave it unset for the node to follow the latest.`,
1436
+ });
1437
+ return;
1438
+ }
1439
+ if (node.useVersion !== undefined && node.useId === undefined) {
1440
+ issues.push({
1441
+ code: 'version-pin-invalid',
1442
+ nodeIds: [node.id],
1443
+ message: `Node "${node.name}" (${node.id}) is pinned to version ${node.useVersion} but names no reusable node, so there is nothing for that version to be a version of.`,
1444
+ });
1168
1445
  }
1169
1446
  }
1447
+ /** The offending value, rendered, or `undefined` when the pin is fine or absent. */
1448
+ function badPin(version) {
1449
+ if (version === undefined)
1450
+ return undefined;
1451
+ if (typeof version === 'number' && Number.isInteger(version) && version >= 1)
1452
+ return undefined;
1453
+ return JSON.stringify(version);
1454
+ }
1170
1455
  /**
1171
1456
  * Every wire out of an `if` names a branch, and no other wire does.
1172
1457
  *
@@ -1735,14 +2020,30 @@ function canonicalNode(node) {
1735
2020
  // Sorted keys, so a canvas that rewrites the object in a different order
1736
2021
  // does not look like an edit.
1737
2022
  sortedEntries(node.config),
2023
+ // Appended only when there is a reference, exactly as `edge.branch` above
2024
+ // is appended only when there is a label, and for the same reason: adding
2025
+ // reusable nodes to this file must not renumber the version of a single
2026
+ // graph that did not change. Every source drawn before they existed
2027
+ // hashes to the string it always did.
2028
+ ...canonicalReuse(node),
1738
2029
  ]);
1739
2030
  }
1740
2031
  if (node.kind === 'transform') {
1741
- // The transform's *version* is deliberately not in here. Editing a
1742
- // transform is already recorded as a new transform version, and folding it
1743
- // in would bump every graph that references it — which would say the wiring
1744
- // changed when it did not.
1745
- return JSON.stringify([node.id, node.kind, node.transformId]);
2032
+ // The transform's *version as stored* is deliberately not in here, and that
2033
+ // has not changed: editing a transform is recorded as a new transform
2034
+ // version, and folding it in would bump every graph that references it,
2035
+ // which would claim the wiring changed when it did not.
2036
+ //
2037
+ // What IS in here is the *pin* — which is the opposite choice for the
2038
+ // opposite reason, and the same one `call` makes one branch down. Moving a
2039
+ // node from v3 to v5, or off a pin onto the latest, changes what the load
2040
+ // runs as surely as rewiring it does, and is a decision somebody made in
2041
+ // this graph. Appended rather than always present, so an unpinned node —
2042
+ // which is every transform node in every deployment today — hashes to
2043
+ // exactly the string it always did.
2044
+ return node.transformVersion === undefined
2045
+ ? JSON.stringify([node.id, node.kind, node.transformId])
2046
+ : JSON.stringify([node.id, node.kind, node.transformId, node.transformVersion]);
1746
2047
  }
1747
2048
  if (node.kind === 'call') {
1748
2049
  // The called version IS in here, and that is the opposite choice from a
@@ -1778,10 +2079,35 @@ function canonicalNode(node) {
1778
2079
  ]);
1779
2080
  }
1780
2081
  if (node.kind === 'sink') {
1781
- return JSON.stringify([node.id, node.kind, node.targetType, node.mode ?? 'full']);
2082
+ return JSON.stringify([
2083
+ node.id,
2084
+ node.kind,
2085
+ node.targetType,
2086
+ node.mode ?? 'full',
2087
+ ...canonicalReuse(node),
2088
+ ]);
1782
2089
  }
1783
2090
  return unreachableNodeKind(node, 'workflowGraphHash');
1784
2091
  }
2092
+ /**
2093
+ * The reusable reference, as zero, one or two trailing hash components.
2094
+ *
2095
+ * Zero when there is no reference, which is what makes this additive: every
2096
+ * graph stored before reusable nodes existed produces the same canonical string
2097
+ * it always did, so no version is renumbered by a deployment picking up this
2098
+ * release. One when the reference follows the latest. Two when it is pinned.
2099
+ *
2100
+ * "Follows the latest" and "pinned to v1" hash differently, and they must:
2101
+ * moving a node off a pin is a real change to what it will run next month, and a
2102
+ * fingerprint that could not see it would let somebody unpin a shared sink with
2103
+ * no version bump and no diff — which is precisely the silence this feature was
2104
+ * built to end.
2105
+ */
2106
+ function canonicalReuse(node) {
2107
+ if (node.useId === undefined)
2108
+ return [];
2109
+ return node.useVersion === undefined ? [node.useId] : [node.useId, node.useVersion];
2110
+ }
1785
2111
  /**
1786
2112
  * The parts of a predicate that decide which branch runs.
1787
2113
  *
@@ -1872,13 +2198,13 @@ function fnv1a(input, offset) {
1872
2198
  function isWorkflowNode(value) {
1873
2199
  if (typeof value !== 'object' || value === null)
1874
2200
  return false;
1875
- const id = Reflect.get(value, 'id');
1876
- const name = Reflect.get(value, 'name');
1877
2201
  const kind = Reflect.get(value, 'kind');
1878
- if (typeof id !== 'string' || typeof name !== 'string')
1879
- return false;
1880
2202
  if (!isWorkflowNodeKind(kind))
1881
2203
  return false;
2204
+ // Everything every kind carries, checked once before the narrowing below
2205
+ // rather than inside the branches that could carry it. See {@link hasNodeBase}.
2206
+ if (!hasNodeBase(value))
2207
+ return false;
1882
2208
  if (kind === 'transform') {
1883
2209
  return typeof Reflect.get(value, 'transformId') === 'string';
1884
2210
  }
@@ -1934,6 +2260,49 @@ function isNarrowsList(value) {
1934
2260
  return true;
1935
2261
  return Array.isArray(value) && value.every((type) => typeof type === 'string');
1936
2262
  }
2263
+ /**
2264
+ * A version pin as it comes back out of a JSON column: absent, or a whole number
2265
+ * of at least one.
2266
+ *
2267
+ * The same rule {@link checkVersionPins} states, applied at the read boundary,
2268
+ * because the two answer different questions about the same field. The validator
2269
+ * tells an author their graph will not run; this decides whether a graph stored
2270
+ * by some other build can be read at all. Absent is accepted and always will be
2271
+ * — it is what every node written before pins existed carries, and it means
2272
+ * "follows the latest", which is exactly what those nodes have always done.
2273
+ */
2274
+ function isOptionalVersion(value) {
2275
+ if (value === undefined)
2276
+ return true;
2277
+ return typeof value === 'number' && Number.isInteger(value) && value >= 1;
2278
+ }
2279
+ /**
2280
+ * Everything every node kind carries, whatever kind it is: its identity, and
2281
+ * the things it points at outside itself.
2282
+ *
2283
+ * Checked once, before {@link isWorkflowNode} narrows per kind, rather than in
2284
+ * the branches that could carry each field. The references are declared on two
2285
+ * members of the union and a node arriving as JSON does not respect that, so a
2286
+ * single check is both cheaper and stricter than two — and a kind that becomes
2287
+ * reusable later inherits it rather than having to remember it.
2288
+ *
2289
+ * A pin read back as `"3"` or as `0` names no stored version, and the resolution
2290
+ * happens inside a durable step in the middle of a load. So it is refused where
2291
+ * a graph is read out of a column rather than surviving as far as the run that
2292
+ * cannot honour it.
2293
+ */
2294
+ function hasNodeBase(value) {
2295
+ if (typeof Reflect.get(value, 'id') !== 'string')
2296
+ return false;
2297
+ if (typeof Reflect.get(value, 'name') !== 'string')
2298
+ return false;
2299
+ if (!isOptionalVersion(Reflect.get(value, 'transformVersion')))
2300
+ return false;
2301
+ if (!isOptionalVersion(Reflect.get(value, 'useVersion')))
2302
+ return false;
2303
+ const useId = Reflect.get(value, 'useId');
2304
+ return useId === undefined || typeof useId === 'string';
2305
+ }
1937
2306
  /**
1938
2307
  * The narrowing counterpart of {@link unreachableNodeKind}.
1939
2308
  *
@@ -1992,6 +2361,35 @@ function supportsWorkflows(store) {
1992
2361
  function supportsTransformRevisions(store) {
1993
2362
  return typeof store.listTransformRevisions === 'function';
1994
2363
  }
2364
+ /**
2365
+ * Whether this store can produce one particular version of a transform's code.
2366
+ *
2367
+ * Separate from {@link supportsTransformRevisions}, and not implied by it: one
2368
+ * answers "can a screen show the history", the other "can a run honour a pin".
2369
+ * A store could reasonably have the first and not the second, and folding them
2370
+ * together would let a graph be saved with a pin this deployment cannot resolve
2371
+ * — discovered mid-load rather than at the moment the pin was set.
2372
+ */
2373
+ function supportsTransformPins(store) {
2374
+ return typeof store.getTransformAt === 'function';
2375
+ }
2376
+ /**
2377
+ * Whether this store can hold reusable nodes.
2378
+ *
2379
+ * All six, and never a subset. A store with `getReusableNode` but no
2380
+ * `reusableNodeUses` could serve a picker and could not answer the question the
2381
+ * feature exists for — and the shape of that failure is a console offering to
2382
+ * share a node while being unable to say who already depends on it, which is
2383
+ * worse than not offering at all.
2384
+ */
2385
+ function supportsReusableNodes(store) {
2386
+ return (typeof store.listReusableNodes === 'function' &&
2387
+ typeof store.getReusableNode === 'function' &&
2388
+ typeof store.getReusableNodeAt === 'function' &&
2389
+ typeof store.saveReusableNode === 'function' &&
2390
+ typeof store.deleteReusableNode === 'function' &&
2391
+ typeof store.reusableNodeUses === 'function');
2392
+ }
1995
2393
  function supportsWorkflowStages(store) {
1996
2394
  return typeof store.writeStage === 'function' && typeof store.readStage === 'function';
1997
2395
  }
@@ -302,8 +302,30 @@ export interface CatalogTraceSpan {
302
302
  * second answer to a question that already has one.
303
303
  */
304
304
  principalId?: string;
305
- /** The event payload, verbatim — the same bytes the flat trail shows. */
306
- detail: Record<string, unknown>;
305
+ /**
306
+ * The event payload, verbatim — the same bytes the flat trail shows.
307
+ *
308
+ * Optional, and which call you made decides whether it is there:
309
+ * {@link CatalogTraceStore.getTrace} carries it, {@link
310
+ * CatalogTraceStore.listTraces} does not.
311
+ *
312
+ * The asymmetry is the whole point. A payload is arbitrary JSON of unbounded
313
+ * width, and a page of traces carries every span of every trace on it — a
314
+ * real 50-trace page measured 28,022 spans, of which the payloads alone were
315
+ * 4.3 MB of a 10.4 MB answer, read from the database, parsed, and serialised
316
+ * again on a screen that re-polls every ten seconds. None of it was drawn:
317
+ * the list renders a waterfall, which needs when each event happened and
318
+ * whether it failed, and the payload is read only when somebody expands a
319
+ * trace — at which point there is exactly one trace to fetch it for.
320
+ *
321
+ * So the list is not missing anything it showed before. `failed` and `error`
322
+ * are still derived from the payload, in the database rather than from these
323
+ * bytes, and a consumer that needs the payload asks `getTrace` for the one
324
+ * trace it needs it for. Guard it rather than assuming it: a `?? {}` on a
325
+ * list span is correct, and dereferencing it is the one thing this shape
326
+ * makes unsafe.
327
+ */
328
+ detail?: Record<string, unknown>;
307
329
  occurredAt: string;
308
330
  /** Milliseconds from the first event of the trace. Where the bar starts. */
309
331
  offsetMs: number;
package/dist/client.d.ts CHANGED
@@ -153,8 +153,8 @@ export declare const catalogRoutes: {
153
153
  readonly traces: () => string;
154
154
  readonly trace: (id: string) => string;
155
155
  };
156
- export type { CatalogConnection, CatalogConnector, ConnectionCheck, CatalogTransform, CatalogWorkflow, CatalogWorkflowCapabilities, ConnectorKind, ConnectorRun, TransformLanguage, TransformResult, CallableWorkflowRef, WorkflowBranchLabel, WorkflowCallEnvelope, WorkflowCallNode, WorkflowCallOutput, WorkflowEdge, WorkflowExecutionMode, WorkflowFilterAll, WorkflowFilterAny, WorkflowFilterComparison, WorkflowFilterGroup, WorkflowFilterNode, WorkflowFilterOneOf, WorkflowFilterOperator, WorkflowFilterPredicate, WorkflowFilterPredicateKind, WorkflowFilterPresence, WorkflowFilterValue, WorkflowGraph, WorkflowEnvPredicate, WorkflowIfNode, WorkflowIfPredicate, WorkflowIssueCode, WorkflowNode, WorkflowNodeKind, WorkflowNodeOutcome, WorkflowPredicateKind, WorkflowRowCountPredicate, WorkflowRunOrderEntry, WorkflowSinkNode, WorkflowSkipReason, WorkflowSourceNode, WorkflowStageRef, WorkflowTransformNode, WorkflowValidationIssue, } from './catalog.pipeline';
157
- export { CONNECTOR_KINDS, isConnectorKind, isTransformLanguage, isWorkflowEdge, isWorkflowNode, REDACTED_SECRET, TRANSFORM_LANGUAGES, readWorkflowCallOutput, WORKFLOW_CALL_CONTRACT, } from './catalog.pipeline';
156
+ export type { CatalogConnection, CatalogConnector, ConnectionCheck, CatalogTransform, CatalogWorkflow, CatalogWorkflowCapabilities, ConnectorKind, ConnectorRun, TransformLanguage, TransformResult, CallableWorkflowRef, WorkflowBranchLabel, WorkflowCallEnvelope, WorkflowCallNode, WorkflowCallOutput, WorkflowEdge, WorkflowExecutionMode, WorkflowFilterAll, WorkflowFilterAny, WorkflowFilterComparison, WorkflowFilterGroup, WorkflowFilterNode, WorkflowFilterOneOf, WorkflowFilterOperator, WorkflowFilterPredicate, WorkflowFilterPredicateKind, WorkflowFilterPresence, WorkflowFilterValue, WorkflowGraph, WorkflowEnvPredicate, WorkflowIfNode, WorkflowIfPredicate, WorkflowIssueCode, WorkflowNode, WorkflowNodeKind, WorkflowNodeOutcome, WorkflowPredicateKind, WorkflowRowCountPredicate, WorkflowRunOrderEntry, WorkflowSinkNode, WorkflowSkipReason, WorkflowSourceNode, WorkflowStageRef, WorkflowTransformNode, WorkflowValidationIssue, CatalogReusableNode, CatalogReusableNodeUse, ReusableNodeBody, ReusableNodeKind, ReusableNodeRef, ReusableSinkBody, ReusableSourceBody, VersionPinCopy, } from './catalog.pipeline';
157
+ export { CONNECTOR_KINDS, isConnectorKind, isTransformLanguage, isWorkflowEdge, isWorkflowNode, REDACTED_SECRET, TRANSFORM_LANGUAGES, readWorkflowCallOutput, WORKFLOW_CALL_CONTRACT, applyReusableNode, reusableNodeBodyOf, isReusableNodeBody, isReusableNodeKind, REUSABLE_NODE_KINDS, NODE_KIND_IS_REUSABLE, nodeKindIsReusable, unreachableReusableNodeKind, describeVersionPin, } from './catalog.pipeline';
158
158
  /**
159
159
  * The workflow validator, shipped to the browser deliberately.
160
160
  *
package/dist/client.js CHANGED
@@ -11,8 +11,8 @@
11
11
  * types are.
12
12
  */
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.isWorkflowFilterValue = exports.isWorkflowFilterPredicateKind = exports.isWorkflowFilterPredicate = exports.isWorkflowFilterOperator = exports.isWorkflowBranchLabel = exports.WORKFLOW_SKIP_REASONS = exports.WORKFLOW_FILTER_PREDICATE_KINDS = exports.WORKFLOW_FILTER_OPERATORS = exports.WORKFLOW_FILTER_MAX_VALUES = exports.WORKFLOW_FILTER_MAX_DEPTH = exports.WORKFLOW_FILTER_COLUMN_PATTERN = exports.WORKFLOW_PREDICATE_KINDS = exports.WORKFLOW_BRANCH_LABELS = exports.WORKFLOW_NODE_KINDS = exports.WORKFLOW_NODE_ID_PATTERN = exports.WORKFLOW_ISSUE_CODES = exports.WORKFLOW_EXECUTION_MODES = exports.validateWorkflow = exports.workflowRowY = exports.workflowColumnX = exports.WORKFLOW_ROW_GAP = exports.WORKFLOW_NODE_WIDTH = exports.WORKFLOW_NODE_HEIGHT = exports.WORKFLOW_COLUMN_GAP = exports.WORKFLOW_CALL_CONTRACT = exports.readWorkflowCallOutput = exports.TRANSFORM_LANGUAGES = exports.REDACTED_SECRET = exports.isWorkflowNode = exports.isWorkflowEdge = exports.isTransformLanguage = exports.isConnectorKind = exports.CONNECTOR_KINDS = exports.catalogRoutes = exports.UnsafeIdentifierError = exports.physicalColumn = exports.outputAlias = exports.isSafeIdentifier = exports.VALUELESS_FILTER_OPERATORS = exports.resolveObjectFilters = exports.parseObjectFilter = exports.offeredFilterOperators = exports.isCatalogFilterOperator = exports.filterOperatorsFor = exports.filterOperatorTakesValue = exports.encodeObjectFilter = exports.coerceFilterValue = exports.CATALOG_FILTER_OPERATORS = exports.CATALOG_FILTER_LIMIT = exports.CATALOG_REVISION_LIMIT = void 0;
15
- exports.DELETE_RECONCILIATION_STRATEGIES = exports.callableWorkflowBlock = exports.isWorkflowStatus = exports.isWorkflowNodeKind = exports.isWorkflowExecutionMode = exports.workflowRunOrder = exports.workflowGraphHash = exports.WORKFLOW_STATUSES = exports.unreachablePredicateKind = exports.unreachableNodeKind = exports.unreachableFilterPredicateKind = exports.unreachableFilterOperator = exports.workflowNodeRuns = exports.workflowNarrowedTypes = exports.workflowFilterMatches = exports.isWorkflowSkipReason = exports.isWorkflowPredicateKind = exports.isWorkflowIfPredicate = void 0;
14
+ exports.WORKFLOW_FILTER_MAX_DEPTH = exports.WORKFLOW_FILTER_COLUMN_PATTERN = exports.WORKFLOW_PREDICATE_KINDS = exports.WORKFLOW_BRANCH_LABELS = exports.WORKFLOW_NODE_KINDS = exports.WORKFLOW_NODE_ID_PATTERN = exports.WORKFLOW_ISSUE_CODES = exports.WORKFLOW_EXECUTION_MODES = exports.validateWorkflow = exports.workflowRowY = exports.workflowColumnX = exports.WORKFLOW_ROW_GAP = exports.WORKFLOW_NODE_WIDTH = exports.WORKFLOW_NODE_HEIGHT = exports.WORKFLOW_COLUMN_GAP = exports.describeVersionPin = exports.unreachableReusableNodeKind = exports.nodeKindIsReusable = exports.NODE_KIND_IS_REUSABLE = exports.REUSABLE_NODE_KINDS = exports.isReusableNodeKind = exports.isReusableNodeBody = exports.reusableNodeBodyOf = exports.applyReusableNode = exports.WORKFLOW_CALL_CONTRACT = exports.readWorkflowCallOutput = exports.TRANSFORM_LANGUAGES = exports.REDACTED_SECRET = exports.isWorkflowNode = exports.isWorkflowEdge = exports.isTransformLanguage = exports.isConnectorKind = exports.CONNECTOR_KINDS = exports.catalogRoutes = exports.UnsafeIdentifierError = exports.physicalColumn = exports.outputAlias = exports.isSafeIdentifier = exports.VALUELESS_FILTER_OPERATORS = exports.resolveObjectFilters = exports.parseObjectFilter = exports.offeredFilterOperators = exports.isCatalogFilterOperator = exports.filterOperatorsFor = exports.filterOperatorTakesValue = exports.encodeObjectFilter = exports.coerceFilterValue = exports.CATALOG_FILTER_OPERATORS = exports.CATALOG_FILTER_LIMIT = exports.CATALOG_REVISION_LIMIT = void 0;
15
+ exports.DELETE_RECONCILIATION_STRATEGIES = exports.callableWorkflowBlock = exports.isWorkflowStatus = exports.isWorkflowNodeKind = exports.isWorkflowExecutionMode = exports.workflowRunOrder = exports.workflowGraphHash = exports.WORKFLOW_STATUSES = exports.unreachablePredicateKind = exports.unreachableNodeKind = exports.unreachableFilterPredicateKind = exports.unreachableFilterOperator = exports.workflowNodeRuns = exports.workflowNarrowedTypes = exports.workflowFilterMatches = exports.isWorkflowSkipReason = exports.isWorkflowPredicateKind = exports.isWorkflowIfPredicate = exports.isWorkflowFilterValue = exports.isWorkflowFilterPredicateKind = exports.isWorkflowFilterPredicate = exports.isWorkflowFilterOperator = exports.isWorkflowBranchLabel = exports.WORKFLOW_SKIP_REASONS = exports.WORKFLOW_FILTER_PREDICATE_KINDS = exports.WORKFLOW_FILTER_OPERATORS = exports.WORKFLOW_FILTER_MAX_VALUES = void 0;
16
16
  exports.isDeleteReconciliationStrategy = isDeleteReconciliationStrategy;
17
17
  exports.pipelineExpectationRoutes = pipelineExpectationRoutes;
18
18
  // A value, not a type: a screen saying how far back the history goes should read
@@ -151,6 +151,28 @@ Object.defineProperty(exports, "TRANSFORM_LANGUAGES", { enumerable: true, get: f
151
151
  // runner does, so the two cannot disagree about what "no rows" looks like.
152
152
  Object.defineProperty(exports, "readWorkflowCallOutput", { enumerable: true, get: function () { return catalog_pipeline_1.readWorkflowCallOutput; } });
153
153
  Object.defineProperty(exports, "WORKFLOW_CALL_CONTRACT", { enumerable: true, get: function () { return catalog_pipeline_1.WORKFLOW_CALL_CONTRACT; } });
154
+ // Reusable nodes, and the two directions a screen needs them in: the fold onto
155
+ // a node, so a picker can show what choosing one will do without a round trip,
156
+ // and the lift off a node, so "save this as reusable" sends the same body the
157
+ // server would have derived. One implementation of each rather than a copy per
158
+ // screen, for the reason `validateWorkflow` is shipped here at all — the
159
+ // alternative is a console that shows one thing and a server that stores
160
+ // another.
161
+ Object.defineProperty(exports, "applyReusableNode", { enumerable: true, get: function () { return catalog_pipeline_1.applyReusableNode; } });
162
+ Object.defineProperty(exports, "reusableNodeBodyOf", { enumerable: true, get: function () { return catalog_pipeline_1.reusableNodeBodyOf; } });
163
+ Object.defineProperty(exports, "isReusableNodeBody", { enumerable: true, get: function () { return catalog_pipeline_1.isReusableNodeBody; } });
164
+ Object.defineProperty(exports, "isReusableNodeKind", { enumerable: true, get: function () { return catalog_pipeline_1.isReusableNodeKind; } });
165
+ Object.defineProperty(exports, "REUSABLE_NODE_KINDS", { enumerable: true, get: function () { return catalog_pipeline_1.REUSABLE_NODE_KINDS; } });
166
+ // Which kinds may be offered a "save as reusable" affordance at all. Read
167
+ // rather than restated, because a hand-written list on a screen is exactly how
168
+ // the `filter` node shipped with no way to create it.
169
+ Object.defineProperty(exports, "NODE_KIND_IS_REUSABLE", { enumerable: true, get: function () { return catalog_pipeline_1.NODE_KIND_IS_REUSABLE; } });
170
+ Object.defineProperty(exports, "nodeKindIsReusable", { enumerable: true, get: function () { return catalog_pipeline_1.nodeKindIsReusable; } });
171
+ Object.defineProperty(exports, "unreachableReusableNodeKind", { enumerable: true, get: function () { return catalog_pipeline_1.unreachableReusableNodeKind; } });
172
+ // One wording for "pinned" and "follows the latest", so an inspector cannot
173
+ // describe following as though it were pinning — which is the whole
174
+ // misunderstanding the pin exists to end.
175
+ Object.defineProperty(exports, "describeVersionPin", { enumerable: true, get: function () { return catalog_pipeline_1.describeVersionPin; } });
154
176
  /**
155
177
  * The workflow validator, shipped to the browser deliberately.
156
178
  *
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export { type CatalogOverlayStore, FileCatalogOverlayStore, InMemoryCatalogOverl
8
8
  export { CATALOG_OVERLAY_STORE } from './catalog.overlay-store.token';
9
9
  export { MikroOrmCatalogRegistry } from './catalog.registry';
10
10
  export { CatalogRegistry } from './catalog.registry.base';
11
- export { CATALOG_PIPELINE_STORE, CODE_CONTEXT_CONTRACT, type CatalogCodeContext, type CatalogConnection, type CatalogConnector, type ConnectionCheck, CONNECTOR_KINDS, type CatalogLoadExpectations, type CatalogLoadExpectationStore, type CatalogPipelineStore, type CatalogStageStore, type CatalogTransform, type CatalogWorkflow, type CatalogWorkflowCapabilities, type CatalogWorkflowStore, type CallableWorkflowBlock, type CallableWorkflowDisagreement, type CallableWorkflowRef, callableWorkflowBlock, type ConnectorKind, type ConnectorRun, type DeleteReconciliation, isConnectorKind, isPipelineStore, isTransformLanguage, type LoadExpectation, type RowCountBound, type StoredLoadExpectation, readWorkflowCallOutput, REDACTED_SECRET, supportsLoadExpectations, supportsTransformRevisions, isWorkflowBranchLabel, isWorkflowEdge, isWorkflowExecutionMode, isWorkflowFilterOperator, isWorkflowFilterPredicate, isWorkflowFilterPredicateKind, isWorkflowFilterValue, isWorkflowIfPredicate, isWorkflowNode, isWorkflowNodeKind, isWorkflowPredicateKind, isWorkflowSkipReason, isWorkflowStatus, supportsWorkflows, supportsWorkflowStages, TRANSFORM_RUNNER, TRANSFORM_LANGUAGES, type TransformLanguage, type TransformResult, type TransformRunner, unreachableFilterOperator, unreachableFilterPredicateKind, unreachableNodeKind, unreachablePredicateKind, validateWorkflow, WORKFLOW_BRANCH_LABELS, WORKFLOW_CALL_CONTRACT, WORKFLOW_COLUMN_GAP, WORKFLOW_EXECUTION_MODES, WORKFLOW_FILTER_COLUMN_PATTERN, WORKFLOW_FILTER_MAX_DEPTH, WORKFLOW_FILTER_MAX_VALUES, WORKFLOW_FILTER_OPERATORS, WORKFLOW_FILTER_PREDICATE_KINDS, WORKFLOW_ISSUE_CODES, WORKFLOW_NODE_HEIGHT, WORKFLOW_NODE_ID_PATTERN, WORKFLOW_NODE_KINDS, WORKFLOW_NODE_WIDTH, WORKFLOW_PREDICATE_KINDS, WORKFLOW_ROW_GAP, WORKFLOW_SKIP_REASONS, WORKFLOW_STATUSES, type WorkflowBranchLabel, workflowColumnX, workflowRowY, type WorkflowCallEnvelope, type WorkflowCallNode, type WorkflowCallOutput, type WorkflowEdge, type WorkflowExecutionMode, type WorkflowFilterAll, type WorkflowFilterAny, type WorkflowFilterComparison, type WorkflowFilterGroup, workflowFilterMatches, type WorkflowFilterNode, type WorkflowFilterOneOf, type WorkflowFilterOperator, type WorkflowFilterPredicate, type WorkflowFilterPredicateKind, type WorkflowFilterPresence, type WorkflowFilterValue, type WorkflowGraph, workflowGraphHash, type WorkflowEnvPredicate, type WorkflowIfNode, type WorkflowIfPredicate, type WorkflowIssueCode, type WorkflowNode, type WorkflowNodeKind, workflowNarrowedTypes, type WorkflowNodeOutcome, workflowNodeRuns, type WorkflowNodeStepInput, type WorkflowNodeStepOutput, workflowRunOrder, type WorkflowRunOrderEntry, type WorkflowPredicateKind, type WorkflowRowCountPredicate, type WorkflowSinkNode, type WorkflowSkipReason, type WorkflowSourceNode, type WorkflowStageRef, type WorkflowStatus, type WorkflowTransformNode, type WorkflowValidationIssue, } from './catalog.pipeline';
11
+ export { CATALOG_PIPELINE_STORE, CODE_CONTEXT_CONTRACT, type CatalogCodeContext, type CatalogConnection, type CatalogConnector, type ConnectionCheck, CONNECTOR_KINDS, type CatalogLoadExpectations, type CatalogLoadExpectationStore, type CatalogPipelineStore, type CatalogStageStore, type CatalogTransform, type CatalogWorkflow, type CatalogWorkflowCapabilities, type CatalogWorkflowStore, type CallableWorkflowBlock, type CallableWorkflowDisagreement, type CallableWorkflowRef, callableWorkflowBlock, type ConnectorKind, type ConnectorRun, type DeleteReconciliation, isConnectorKind, isPipelineStore, isTransformLanguage, type LoadExpectation, type RowCountBound, type StoredLoadExpectation, readWorkflowCallOutput, REDACTED_SECRET, supportsLoadExpectations, supportsReusableNodes, supportsTransformPins, supportsTransformRevisions, applyReusableNode, type CatalogReusableNode, type CatalogReusableNodeStore, type CatalogReusableNodeUse, describeVersionPin, isReusableNodeBody, isReusableNodeKind, NODE_KIND_IS_REUSABLE, nodeKindIsReusable, REUSABLE_NODE_KINDS, type ReusableNodeBody, type ReusableNodeKind, type ReusableNodeRef, type ReusableSinkBody, type ReusableSourceBody, reusableNodeBodyOf, unreachableReusableNodeKind, type VersionPinCopy, isWorkflowBranchLabel, isWorkflowEdge, isWorkflowExecutionMode, isWorkflowFilterOperator, isWorkflowFilterPredicate, isWorkflowFilterPredicateKind, isWorkflowFilterValue, isWorkflowIfPredicate, isWorkflowNode, isWorkflowNodeKind, isWorkflowPredicateKind, isWorkflowSkipReason, isWorkflowStatus, supportsWorkflows, supportsWorkflowStages, TRANSFORM_RUNNER, TRANSFORM_LANGUAGES, type TransformLanguage, type TransformResult, type TransformRunner, unreachableFilterOperator, unreachableFilterPredicateKind, unreachableNodeKind, unreachablePredicateKind, validateWorkflow, WORKFLOW_BRANCH_LABELS, WORKFLOW_CALL_CONTRACT, WORKFLOW_COLUMN_GAP, WORKFLOW_EXECUTION_MODES, WORKFLOW_FILTER_COLUMN_PATTERN, WORKFLOW_FILTER_MAX_DEPTH, WORKFLOW_FILTER_MAX_VALUES, WORKFLOW_FILTER_OPERATORS, WORKFLOW_FILTER_PREDICATE_KINDS, WORKFLOW_ISSUE_CODES, WORKFLOW_NODE_HEIGHT, WORKFLOW_NODE_ID_PATTERN, WORKFLOW_NODE_KINDS, WORKFLOW_NODE_WIDTH, WORKFLOW_PREDICATE_KINDS, WORKFLOW_ROW_GAP, WORKFLOW_SKIP_REASONS, WORKFLOW_STATUSES, type WorkflowBranchLabel, workflowColumnX, workflowRowY, type WorkflowCallEnvelope, type WorkflowCallNode, type WorkflowCallOutput, type WorkflowEdge, type WorkflowExecutionMode, type WorkflowFilterAll, type WorkflowFilterAny, type WorkflowFilterComparison, type WorkflowFilterGroup, workflowFilterMatches, type WorkflowFilterNode, type WorkflowFilterOneOf, type WorkflowFilterOperator, type WorkflowFilterPredicate, type WorkflowFilterPredicateKind, type WorkflowFilterPresence, type WorkflowFilterValue, type WorkflowGraph, workflowGraphHash, type WorkflowEnvPredicate, type WorkflowIfNode, type WorkflowIfPredicate, type WorkflowIssueCode, type WorkflowNode, type WorkflowNodeKind, workflowNarrowedTypes, type WorkflowNodeOutcome, workflowNodeRuns, type WorkflowNodeStepInput, type WorkflowNodeStepOutput, workflowRunOrder, type WorkflowRunOrderEntry, type WorkflowPredicateKind, type WorkflowRowCountPredicate, type WorkflowSinkNode, type WorkflowSkipReason, type WorkflowSourceNode, type WorkflowStageRef, type WorkflowStatus, type WorkflowTransformNode, type WorkflowValidationIssue, } from './catalog.pipeline';
12
12
  export { type ColumnarStageBatch, STAGE_ENCODING, STAGE_ENCODING_VERSION, type StagePayload, classifyStagePayload, decodeStageRows, encodeStageRows, isColumnarStageBatch, } from './catalog.stage-encoding';
13
13
  export * from './catalog.environment';
14
14
  export { QueryCache } from './catalog.query-cache';