@decaf-ts/ui-decorators 0.21.0 → 0.21.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.
- package/dist/ui-decorators.cjs +1 -1
- package/dist/ui-decorators.cjs.map +1 -1
- package/dist/ui-decorators.js +1 -1
- package/dist/ui-decorators.js.map +1 -1
- package/lib/cjs/index.cjs +3 -3
- package/lib/esm/index.js +3 -3
- package/lib/types/index.d.cts +3 -3
- package/lib/types/index.d.mts +3 -3
- package/package.json +2 -18
- package/lib/cjs/graph/GraphExecutionStateMapper.cjs +0 -97
- package/lib/cjs/graph/GraphExecutionStateMapper.cjs.map +0 -1
- package/lib/cjs/graph/GraphResolution.cjs +0 -17
- package/lib/cjs/graph/GraphResolution.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphConnectionPolicy.cjs +0 -20
- package/lib/cjs/graph/catalog/GraphConnectionPolicy.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphCredentialReference.cjs +0 -15
- package/lib/cjs/graph/catalog/GraphCredentialReference.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphCredentialRequirement.cjs +0 -16
- package/lib/cjs/graph/catalog/GraphCredentialRequirement.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphDynamicPortRule.cjs +0 -31
- package/lib/cjs/graph/catalog/GraphDynamicPortRule.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphIconReference.cjs +0 -22
- package/lib/cjs/graph/catalog/GraphIconReference.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphManifestCompiler.cjs +0 -326
- package/lib/cjs/graph/catalog/GraphManifestCompiler.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphNodeCapability.cjs +0 -23
- package/lib/cjs/graph/catalog/GraphNodeCapability.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphNodeDisplayManifest.cjs +0 -11
- package/lib/cjs/graph/catalog/GraphNodeDisplayManifest.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphNodeManifest.cjs +0 -23
- package/lib/cjs/graph/catalog/GraphNodeManifest.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphNodeManifestSerialization.cjs +0 -50
- package/lib/cjs/graph/catalog/GraphNodeManifestSerialization.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphNodeMethodManifest.cjs +0 -29
- package/lib/cjs/graph/catalog/GraphNodeMethodManifest.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphNodePolicyManifest.cjs +0 -18
- package/lib/cjs/graph/catalog/GraphNodePolicyManifest.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphParameterBase.cjs +0 -4
- package/lib/cjs/graph/catalog/GraphParameterBase.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphParameterDefinition.cjs +0 -29
- package/lib/cjs/graph/catalog/GraphParameterDefinition.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphParameterOption.cjs +0 -18
- package/lib/cjs/graph/catalog/GraphParameterOption.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphParameterValidation.cjs +0 -57
- package/lib/cjs/graph/catalog/GraphParameterValidation.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphPortManifest.cjs +0 -19
- package/lib/cjs/graph/catalog/GraphPortManifest.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphPortManifestElement.cjs +0 -15
- package/lib/cjs/graph/catalog/GraphPortManifestElement.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphResourceLocatorMode.cjs +0 -19
- package/lib/cjs/graph/catalog/GraphResourceLocatorMode.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphValueSchema.cjs +0 -25
- package/lib/cjs/graph/catalog/GraphValueSchema.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphValueSchemaDerivation.cjs +0 -164
- package/lib/cjs/graph/catalog/GraphValueSchemaDerivation.cjs.map +0 -1
- package/lib/cjs/graph/catalog/GraphVisibilityExpression.cjs +0 -63
- package/lib/cjs/graph/catalog/GraphVisibilityExpression.cjs.map +0 -1
- package/lib/cjs/graph/catalog/index.cjs +0 -40
- package/lib/cjs/graph/catalog/index.cjs.map +0 -1
- package/lib/cjs/graph/category-styles.cjs +0 -38
- package/lib/cjs/graph/category-styles.cjs.map +0 -1
- package/lib/cjs/graph/constants.cjs +0 -320
- package/lib/cjs/graph/constants.cjs.map +0 -1
- package/lib/cjs/graph/decorators.cjs +0 -151
- package/lib/cjs/graph/decorators.cjs.map +0 -1
- package/lib/cjs/graph/document/GraphDecoratedWorkflowCompiler.cjs +0 -353
- package/lib/cjs/graph/document/GraphDecoratedWorkflowCompiler.cjs.map +0 -1
- package/lib/cjs/graph/document/GraphEdgeInstance.cjs +0 -4
- package/lib/cjs/graph/document/GraphEdgeInstance.cjs.map +0 -1
- package/lib/cjs/graph/document/GraphEndpoint.cjs +0 -27
- package/lib/cjs/graph/document/GraphEndpoint.cjs.map +0 -1
- package/lib/cjs/graph/document/GraphJsonValue.cjs +0 -82
- package/lib/cjs/graph/document/GraphJsonValue.cjs.map +0 -1
- package/lib/cjs/graph/document/GraphLoopConfiguration.cjs +0 -4
- package/lib/cjs/graph/document/GraphLoopConfiguration.cjs.map +0 -1
- package/lib/cjs/graph/document/GraphNodeBinding.cjs +0 -27
- package/lib/cjs/graph/document/GraphNodeBinding.cjs.map +0 -1
- package/lib/cjs/graph/document/GraphNodeInstance.cjs +0 -4
- package/lib/cjs/graph/document/GraphNodeInstance.cjs.map +0 -1
- package/lib/cjs/graph/document/GraphWorkflowDocument.cjs +0 -16
- package/lib/cjs/graph/document/GraphWorkflowDocument.cjs.map +0 -1
- package/lib/cjs/graph/document/GraphWorkflowDocumentBuilder.cjs +0 -309
- package/lib/cjs/graph/document/GraphWorkflowDocumentBuilder.cjs.map +0 -1
- package/lib/cjs/graph/document/GraphWorkflowDocumentReader.cjs +0 -78
- package/lib/cjs/graph/document/GraphWorkflowDocumentReader.cjs.map +0 -1
- package/lib/cjs/graph/document/GraphWorkflowDocumentSerializer.cjs +0 -70
- package/lib/cjs/graph/document/GraphWorkflowDocumentSerializer.cjs.map +0 -1
- package/lib/cjs/graph/document/GraphWorkflowUiState.cjs +0 -4
- package/lib/cjs/graph/document/GraphWorkflowUiState.cjs.map +0 -1
- package/lib/cjs/graph/document/index.cjs +0 -30
- package/lib/cjs/graph/document/index.cjs.map +0 -1
- package/lib/cjs/graph/index.cjs +0 -33
- package/lib/cjs/graph/index.cjs.map +0 -1
- package/lib/cjs/graph/overrides/Metadata.cjs +0 -23
- package/lib/cjs/graph/overrides/Metadata.cjs.map +0 -1
- package/lib/cjs/graph/overrides/Rendering.cjs +0 -4
- package/lib/cjs/graph/overrides/Rendering.cjs.map +0 -1
- package/lib/cjs/graph/overrides/index.cjs +0 -21
- package/lib/cjs/graph/overrides/index.cjs.map +0 -1
- package/lib/cjs/graph/overrides/overrides.cjs +0 -20
- package/lib/cjs/graph/overrides/overrides.cjs.map +0 -1
- package/lib/cjs/graph/reader.cjs +0 -327
- package/lib/cjs/graph/reader.cjs.map +0 -1
- package/lib/cjs/graph/registry.cjs +0 -67
- package/lib/cjs/graph/registry.cjs.map +0 -1
- package/lib/cjs/graph/snapshot.cjs +0 -4
- package/lib/cjs/graph/snapshot.cjs.map +0 -1
- package/lib/cjs/graph/types.cjs +0 -7
- package/lib/cjs/graph/types.cjs.map +0 -1
- package/lib/esm/graph/GraphExecutionStateMapper.js +0 -91
- package/lib/esm/graph/GraphExecutionStateMapper.js.map +0 -1
- package/lib/esm/graph/GraphResolution.js +0 -13
- package/lib/esm/graph/GraphResolution.js.map +0 -1
- package/lib/esm/graph/catalog/GraphConnectionPolicy.js +0 -16
- package/lib/esm/graph/catalog/GraphConnectionPolicy.js.map +0 -1
- package/lib/esm/graph/catalog/GraphCredentialReference.js +0 -9
- package/lib/esm/graph/catalog/GraphCredentialReference.js.map +0 -1
- package/lib/esm/graph/catalog/GraphCredentialRequirement.js +0 -12
- package/lib/esm/graph/catalog/GraphCredentialRequirement.js.map +0 -1
- package/lib/esm/graph/catalog/GraphDynamicPortRule.js +0 -25
- package/lib/esm/graph/catalog/GraphDynamicPortRule.js.map +0 -1
- package/lib/esm/graph/catalog/GraphIconReference.js +0 -18
- package/lib/esm/graph/catalog/GraphIconReference.js.map +0 -1
- package/lib/esm/graph/catalog/GraphManifestCompiler.js +0 -322
- package/lib/esm/graph/catalog/GraphManifestCompiler.js.map +0 -1
- package/lib/esm/graph/catalog/GraphNodeCapability.js +0 -17
- package/lib/esm/graph/catalog/GraphNodeCapability.js.map +0 -1
- package/lib/esm/graph/catalog/GraphNodeDisplayManifest.js +0 -7
- package/lib/esm/graph/catalog/GraphNodeDisplayManifest.js.map +0 -1
- package/lib/esm/graph/catalog/GraphNodeManifest.js +0 -17
- package/lib/esm/graph/catalog/GraphNodeManifest.js.map +0 -1
- package/lib/esm/graph/catalog/GraphNodeManifestSerialization.js +0 -42
- package/lib/esm/graph/catalog/GraphNodeManifestSerialization.js.map +0 -1
- package/lib/esm/graph/catalog/GraphNodeMethodManifest.js +0 -23
- package/lib/esm/graph/catalog/GraphNodeMethodManifest.js.map +0 -1
- package/lib/esm/graph/catalog/GraphNodePolicyManifest.js +0 -14
- package/lib/esm/graph/catalog/GraphNodePolicyManifest.js.map +0 -1
- package/lib/esm/graph/catalog/GraphParameterBase.js +0 -2
- package/lib/esm/graph/catalog/GraphParameterBase.js.map +0 -1
- package/lib/esm/graph/catalog/GraphParameterDefinition.js +0 -23
- package/lib/esm/graph/catalog/GraphParameterDefinition.js.map +0 -1
- package/lib/esm/graph/catalog/GraphParameterOption.js +0 -13
- package/lib/esm/graph/catalog/GraphParameterOption.js.map +0 -1
- package/lib/esm/graph/catalog/GraphParameterValidation.js +0 -50
- package/lib/esm/graph/catalog/GraphParameterValidation.js.map +0 -1
- package/lib/esm/graph/catalog/GraphPortManifest.js +0 -13
- package/lib/esm/graph/catalog/GraphPortManifest.js.map +0 -1
- package/lib/esm/graph/catalog/GraphPortManifestElement.js +0 -11
- package/lib/esm/graph/catalog/GraphPortManifestElement.js.map +0 -1
- package/lib/esm/graph/catalog/GraphResourceLocatorMode.js +0 -13
- package/lib/esm/graph/catalog/GraphResourceLocatorMode.js.map +0 -1
- package/lib/esm/graph/catalog/GraphValueSchema.js +0 -19
- package/lib/esm/graph/catalog/GraphValueSchema.js.map +0 -1
- package/lib/esm/graph/catalog/GraphValueSchemaDerivation.js +0 -156
- package/lib/esm/graph/catalog/GraphValueSchemaDerivation.js.map +0 -1
- package/lib/esm/graph/catalog/GraphVisibilityExpression.js +0 -58
- package/lib/esm/graph/catalog/GraphVisibilityExpression.js.map +0 -1
- package/lib/esm/graph/catalog/index.js +0 -23
- package/lib/esm/graph/catalog/index.js.map +0 -1
- package/lib/esm/graph/category-styles.js +0 -34
- package/lib/esm/graph/category-styles.js.map +0 -1
- package/lib/esm/graph/constants.js +0 -335
- package/lib/esm/graph/constants.js.map +0 -1
- package/lib/esm/graph/decorators.js +0 -141
- package/lib/esm/graph/decorators.js.map +0 -1
- package/lib/esm/graph/document/GraphDecoratedWorkflowCompiler.js +0 -347
- package/lib/esm/graph/document/GraphDecoratedWorkflowCompiler.js.map +0 -1
- package/lib/esm/graph/document/GraphEdgeInstance.js +0 -2
- package/lib/esm/graph/document/GraphEdgeInstance.js.map +0 -1
- package/lib/esm/graph/document/GraphEndpoint.js +0 -21
- package/lib/esm/graph/document/GraphEndpoint.js.map +0 -1
- package/lib/esm/graph/document/GraphJsonValue.js +0 -73
- package/lib/esm/graph/document/GraphJsonValue.js.map +0 -1
- package/lib/esm/graph/document/GraphLoopConfiguration.js +0 -2
- package/lib/esm/graph/document/GraphLoopConfiguration.js.map +0 -1
- package/lib/esm/graph/document/GraphNodeBinding.js +0 -22
- package/lib/esm/graph/document/GraphNodeBinding.js.map +0 -1
- package/lib/esm/graph/document/GraphNodeInstance.js +0 -2
- package/lib/esm/graph/document/GraphNodeInstance.js.map +0 -1
- package/lib/esm/graph/document/GraphWorkflowDocument.js +0 -12
- package/lib/esm/graph/document/GraphWorkflowDocument.js.map +0 -1
- package/lib/esm/graph/document/GraphWorkflowDocumentBuilder.js +0 -303
- package/lib/esm/graph/document/GraphWorkflowDocumentBuilder.js.map +0 -1
- package/lib/esm/graph/document/GraphWorkflowDocumentReader.js +0 -62
- package/lib/esm/graph/document/GraphWorkflowDocumentReader.js.map +0 -1
- package/lib/esm/graph/document/GraphWorkflowDocumentSerializer.js +0 -63
- package/lib/esm/graph/document/GraphWorkflowDocumentSerializer.js.map +0 -1
- package/lib/esm/graph/document/GraphWorkflowUiState.js +0 -2
- package/lib/esm/graph/document/GraphWorkflowUiState.js.map +0 -1
- package/lib/esm/graph/document/index.js +0 -13
- package/lib/esm/graph/document/index.js.map +0 -1
- package/lib/esm/graph/index.js +0 -16
- package/lib/esm/graph/index.js.map +0 -1
- package/lib/esm/graph/overrides/Metadata.js +0 -20
- package/lib/esm/graph/overrides/Metadata.js.map +0 -1
- package/lib/esm/graph/overrides/Rendering.js +0 -2
- package/lib/esm/graph/overrides/Rendering.js.map +0 -1
- package/lib/esm/graph/overrides/index.js +0 -4
- package/lib/esm/graph/overrides/index.js.map +0 -1
- package/lib/esm/graph/overrides/overrides.js +0 -17
- package/lib/esm/graph/overrides/overrides.js.map +0 -1
- package/lib/esm/graph/reader.js +0 -313
- package/lib/esm/graph/reader.js.map +0 -1
- package/lib/esm/graph/registry.js +0 -59
- package/lib/esm/graph/registry.js.map +0 -1
- package/lib/esm/graph/snapshot.js +0 -2
- package/lib/esm/graph/snapshot.js.map +0 -1
- package/lib/esm/graph/types.js +0 -2
- package/lib/esm/graph/types.js.map +0 -1
- package/lib/types/graph/GraphExecutionStateMapper.d.cts +0 -66
- package/lib/types/graph/GraphExecutionStateMapper.d.mts +0 -66
- package/lib/types/graph/GraphResolution.d.cts +0 -53
- package/lib/types/graph/GraphResolution.d.mts +0 -53
- package/lib/types/graph/catalog/GraphConnectionPolicy.d.cts +0 -9
- package/lib/types/graph/catalog/GraphConnectionPolicy.d.mts +0 -9
- package/lib/types/graph/catalog/GraphCredentialReference.d.cts +0 -6
- package/lib/types/graph/catalog/GraphCredentialReference.d.mts +0 -6
- package/lib/types/graph/catalog/GraphCredentialRequirement.d.cts +0 -7
- package/lib/types/graph/catalog/GraphCredentialRequirement.d.mts +0 -7
- package/lib/types/graph/catalog/GraphDynamicPortRule.d.cts +0 -22
- package/lib/types/graph/catalog/GraphDynamicPortRule.d.mts +0 -22
- package/lib/types/graph/catalog/GraphIconReference.d.cts +0 -12
- package/lib/types/graph/catalog/GraphIconReference.d.mts +0 -12
- package/lib/types/graph/catalog/GraphManifestCompiler.d.cts +0 -14
- package/lib/types/graph/catalog/GraphManifestCompiler.d.mts +0 -14
- package/lib/types/graph/catalog/GraphNodeCapability.d.cts +0 -4
- package/lib/types/graph/catalog/GraphNodeCapability.d.mts +0 -4
- package/lib/types/graph/catalog/GraphNodeDisplayManifest.d.cts +0 -33
- package/lib/types/graph/catalog/GraphNodeDisplayManifest.d.mts +0 -33
- package/lib/types/graph/catalog/GraphNodeManifest.d.cts +0 -26
- package/lib/types/graph/catalog/GraphNodeManifest.d.mts +0 -26
- package/lib/types/graph/catalog/GraphNodeManifestSerialization.d.cts +0 -7
- package/lib/types/graph/catalog/GraphNodeManifestSerialization.d.mts +0 -7
- package/lib/types/graph/catalog/GraphNodeMethodManifest.d.cts +0 -10
- package/lib/types/graph/catalog/GraphNodeMethodManifest.d.mts +0 -10
- package/lib/types/graph/catalog/GraphNodePolicyManifest.d.cts +0 -46
- package/lib/types/graph/catalog/GraphNodePolicyManifest.d.mts +0 -46
- package/lib/types/graph/catalog/GraphParameterBase.d.cts +0 -14
- package/lib/types/graph/catalog/GraphParameterBase.d.mts +0 -14
- package/lib/types/graph/catalog/GraphParameterDefinition.d.cts +0 -66
- package/lib/types/graph/catalog/GraphParameterDefinition.d.mts +0 -66
- package/lib/types/graph/catalog/GraphParameterOption.d.cts +0 -8
- package/lib/types/graph/catalog/GraphParameterOption.d.mts +0 -8
- package/lib/types/graph/catalog/GraphParameterValidation.d.cts +0 -25
- package/lib/types/graph/catalog/GraphParameterValidation.d.mts +0 -25
- package/lib/types/graph/catalog/GraphPortManifest.d.cts +0 -23
- package/lib/types/graph/catalog/GraphPortManifest.d.mts +0 -23
- package/lib/types/graph/catalog/GraphPortManifestElement.d.cts +0 -7
- package/lib/types/graph/catalog/GraphPortManifestElement.d.mts +0 -7
- package/lib/types/graph/catalog/GraphResourceLocatorMode.d.cts +0 -10
- package/lib/types/graph/catalog/GraphResourceLocatorMode.d.mts +0 -10
- package/lib/types/graph/catalog/GraphValueSchema.d.cts +0 -44
- package/lib/types/graph/catalog/GraphValueSchema.d.mts +0 -44
- package/lib/types/graph/catalog/GraphValueSchemaDerivation.d.cts +0 -9
- package/lib/types/graph/catalog/GraphValueSchemaDerivation.d.mts +0 -9
- package/lib/types/graph/catalog/GraphVisibilityExpression.d.cts +0 -22
- package/lib/types/graph/catalog/GraphVisibilityExpression.d.mts +0 -22
- package/lib/types/graph/catalog/index.d.cts +0 -22
- package/lib/types/graph/catalog/index.d.mts +0 -22
- package/lib/types/graph/category-styles.d.cts +0 -8
- package/lib/types/graph/category-styles.d.mts +0 -8
- package/lib/types/graph/constants.d.cts +0 -544
- package/lib/types/graph/constants.d.mts +0 -544
- package/lib/types/graph/decorators.d.cts +0 -69
- package/lib/types/graph/decorators.d.mts +0 -69
- package/lib/types/graph/document/GraphDecoratedWorkflowCompiler.d.cts +0 -47
- package/lib/types/graph/document/GraphDecoratedWorkflowCompiler.d.mts +0 -47
- package/lib/types/graph/document/GraphEdgeInstance.d.cts +0 -12
- package/lib/types/graph/document/GraphEdgeInstance.d.mts +0 -12
- package/lib/types/graph/document/GraphEndpoint.d.cts +0 -13
- package/lib/types/graph/document/GraphEndpoint.d.mts +0 -13
- package/lib/types/graph/document/GraphJsonValue.d.cts +0 -11
- package/lib/types/graph/document/GraphJsonValue.d.mts +0 -11
- package/lib/types/graph/document/GraphLoopConfiguration.d.cts +0 -24
- package/lib/types/graph/document/GraphLoopConfiguration.d.mts +0 -24
- package/lib/types/graph/document/GraphNodeBinding.d.cts +0 -21
- package/lib/types/graph/document/GraphNodeBinding.d.mts +0 -21
- package/lib/types/graph/document/GraphNodeInstance.d.cts +0 -36
- package/lib/types/graph/document/GraphNodeInstance.d.mts +0 -36
- package/lib/types/graph/document/GraphWorkflowDocument.d.cts +0 -33
- package/lib/types/graph/document/GraphWorkflowDocument.d.mts +0 -33
- package/lib/types/graph/document/GraphWorkflowDocumentBuilder.d.cts +0 -72
- package/lib/types/graph/document/GraphWorkflowDocumentBuilder.d.mts +0 -72
- package/lib/types/graph/document/GraphWorkflowDocumentReader.d.cts +0 -21
- package/lib/types/graph/document/GraphWorkflowDocumentReader.d.mts +0 -21
- package/lib/types/graph/document/GraphWorkflowDocumentSerializer.d.cts +0 -5
- package/lib/types/graph/document/GraphWorkflowDocumentSerializer.d.mts +0 -5
- package/lib/types/graph/document/GraphWorkflowUiState.d.cts +0 -37
- package/lib/types/graph/document/GraphWorkflowUiState.d.mts +0 -37
- package/lib/types/graph/document/index.d.cts +0 -12
- package/lib/types/graph/document/index.d.mts +0 -12
- package/lib/types/graph/index.d.cts +0 -15
- package/lib/types/graph/index.d.mts +0 -15
- package/lib/types/graph/overrides/Metadata.d.cts +0 -43
- package/lib/types/graph/overrides/Metadata.d.mts +0 -43
- package/lib/types/graph/overrides/Rendering.d.cts +0 -5
- package/lib/types/graph/overrides/Rendering.d.mts +0 -5
- package/lib/types/graph/overrides/index.d.cts +0 -3
- package/lib/types/graph/overrides/index.d.mts +0 -3
- package/lib/types/graph/overrides/overrides.d.cts +0 -1
- package/lib/types/graph/overrides/overrides.d.mts +0 -1
- package/lib/types/graph/reader.d.cts +0 -28
- package/lib/types/graph/reader.d.mts +0 -28
- package/lib/types/graph/registry.d.cts +0 -40
- package/lib/types/graph/registry.d.mts +0 -40
- package/lib/types/graph/snapshot.d.cts +0 -36
- package/lib/types/graph/snapshot.d.mts +0 -36
- package/lib/types/graph/types.d.cts +0 -289
- package/lib/types/graph/types.d.mts +0 -289
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
import { ValidationError } from "@decaf-ts/db-decorators";
|
|
2
|
-
import { isGraphJsonSafeValue, isGraphUnsafeObjectKey, } from "./GraphJsonValue.js";
|
|
3
|
-
import { isGraphEndpoint, isGraphNodeEndpoint, isGraphWorkflowEndpoint } from "./GraphEndpoint.js";
|
|
4
|
-
import { isGraphInputBinding } from "./GraphNodeBinding.js";
|
|
5
|
-
import { isGraphValueSchema } from "./../catalog/GraphValueSchema.js";
|
|
6
|
-
/**
|
|
7
|
-
* Fluent builder for the canonical {@link GraphWorkflowDocument}
|
|
8
|
-
* (DECAF-50 §4.4.4). Collects boundary ports, node instances, edges, and
|
|
9
|
-
* optional settings/metadata/UI state, then validates and freezes a
|
|
10
|
-
* defensively-copied document on {@link GraphWorkflowDocumentBuilder.build}.
|
|
11
|
-
*/
|
|
12
|
-
export class GraphWorkflowDocumentBuilder {
|
|
13
|
-
/**
|
|
14
|
-
* @param id Document id.
|
|
15
|
-
* @param name Optional document name; defaults to an empty string.
|
|
16
|
-
*/
|
|
17
|
-
constructor(id, name) {
|
|
18
|
-
this.document = {
|
|
19
|
-
id,
|
|
20
|
-
name: name ?? "",
|
|
21
|
-
inputs: [],
|
|
22
|
-
outputs: [],
|
|
23
|
-
nodes: [],
|
|
24
|
-
edges: [],
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
/** Appends a workflow input port. */
|
|
28
|
-
addInput(port) {
|
|
29
|
-
this.document.inputs.push(port);
|
|
30
|
-
return this;
|
|
31
|
-
}
|
|
32
|
-
/** Appends a workflow output port. */
|
|
33
|
-
addOutput(port) {
|
|
34
|
-
this.document.outputs.push(port);
|
|
35
|
-
return this;
|
|
36
|
-
}
|
|
37
|
-
/** Appends a node instance, defaulting `parameters` to an empty object. */
|
|
38
|
-
addNode(node) {
|
|
39
|
-
this.document.nodes.push({
|
|
40
|
-
...node,
|
|
41
|
-
parameters: node.parameters ?? {},
|
|
42
|
-
});
|
|
43
|
-
return this;
|
|
44
|
-
}
|
|
45
|
-
/** Appends an edge instance. */
|
|
46
|
-
addEdge(edge) {
|
|
47
|
-
this.document.edges.push(edge);
|
|
48
|
-
return this;
|
|
49
|
-
}
|
|
50
|
-
/** Sets (or clears) the document's free-form settings bag. */
|
|
51
|
-
setSettings(settings) {
|
|
52
|
-
this.document.settings = settings;
|
|
53
|
-
return this;
|
|
54
|
-
}
|
|
55
|
-
/** Sets (or clears) the document's metadata bag. */
|
|
56
|
-
setMetadata(metadata) {
|
|
57
|
-
this.document.metadata = metadata;
|
|
58
|
-
return this;
|
|
59
|
-
}
|
|
60
|
-
/** Sets (or clears) the document's editor UI state. */
|
|
61
|
-
setUi(ui) {
|
|
62
|
-
this.document.ui = ui;
|
|
63
|
-
return this;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Validates the accumulated document with
|
|
67
|
-
* {@link assertGraphWorkflowDocumentValid} and returns a deep-ish copy:
|
|
68
|
-
* ports, nodes, and edges are cloned per entry, and the optional
|
|
69
|
-
* `settings`/`metadata`/`ui` bags are only present when explicitly set, so
|
|
70
|
-
* callers never observe builder-internal `undefined` fields.
|
|
71
|
-
*
|
|
72
|
-
* @throws ValidationError when the document fails validation.
|
|
73
|
-
*/
|
|
74
|
-
build() {
|
|
75
|
-
assertGraphWorkflowDocumentValid(this.document);
|
|
76
|
-
const document = {
|
|
77
|
-
id: this.document.id,
|
|
78
|
-
name: this.document.name,
|
|
79
|
-
inputs: this.document.inputs.map((port) => ({ ...port })),
|
|
80
|
-
outputs: this.document.outputs.map((port) => ({ ...port })),
|
|
81
|
-
nodes: this.document.nodes.map((node) => ({ ...node })),
|
|
82
|
-
edges: this.document.edges.map((edge) => ({ ...edge })),
|
|
83
|
-
};
|
|
84
|
-
if (this.document.settings !== undefined) {
|
|
85
|
-
document.settings = this.document.settings;
|
|
86
|
-
}
|
|
87
|
-
if (this.document.metadata !== undefined) {
|
|
88
|
-
document.metadata = this.document.metadata;
|
|
89
|
-
}
|
|
90
|
-
if (this.document.ui !== undefined) {
|
|
91
|
-
document.ui = this.document.ui;
|
|
92
|
-
}
|
|
93
|
-
return document;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Structural validation gate for a canonical {@link GraphWorkflowDocument}
|
|
98
|
-
* (shared by the frontend builder and the backend nine-stage validator,
|
|
99
|
-
* DECAF-50 §4.8 stage 1 shape rules). Checks unique port/node/edge ids,
|
|
100
|
-
* valid schemas, binding shapes, edge endpoints, and recursively validates
|
|
101
|
-
* nested loop-body documents.
|
|
102
|
-
*
|
|
103
|
-
* @throws ValidationError describing the first invalid aspect found.
|
|
104
|
-
*/
|
|
105
|
-
export function assertGraphWorkflowDocumentValid(document, context = { seen: [] }) {
|
|
106
|
-
if (context.seen.includes(document)) {
|
|
107
|
-
throw new ValidationError(`Document '${describeDocument(document)}' contains a loop body that references itself (cyclic document)`);
|
|
108
|
-
}
|
|
109
|
-
if (typeof document.id !== "string" || !document.id) {
|
|
110
|
-
throw new ValidationError("Document 'id' is required and must be a non-empty string");
|
|
111
|
-
}
|
|
112
|
-
if (typeof document.name !== "string" || !document.name) {
|
|
113
|
-
throw new ValidationError("Document 'name' is required and must be a non-empty string");
|
|
114
|
-
}
|
|
115
|
-
const workflowPorts = new Set();
|
|
116
|
-
for (const port of [...document.inputs, ...document.outputs]) {
|
|
117
|
-
if (typeof port.id !== "string" || !port.id) {
|
|
118
|
-
throw new ValidationError("Workflow port 'id' is required and must be a non-empty string");
|
|
119
|
-
}
|
|
120
|
-
if (workflowPorts.has(port.id)) {
|
|
121
|
-
throw new ValidationError(`Workflow port '${port.id}' is declared more than once; workflow port ids must be unique`);
|
|
122
|
-
}
|
|
123
|
-
if (port.schema !== undefined && !isGraphValueSchema(port.schema)) {
|
|
124
|
-
throw new ValidationError(`Workflow port '${port.id}' schema must be a valid GraphValueSchema`);
|
|
125
|
-
}
|
|
126
|
-
workflowPorts.add(port.id);
|
|
127
|
-
}
|
|
128
|
-
const nestedContext = {
|
|
129
|
-
seen: [...context.seen, document],
|
|
130
|
-
};
|
|
131
|
-
const nodeIds = new Set();
|
|
132
|
-
for (const node of document.nodes) {
|
|
133
|
-
assertGraphNodeValid(node, nodeIds);
|
|
134
|
-
}
|
|
135
|
-
for (const node of document.nodes) {
|
|
136
|
-
if (node.loop) {
|
|
137
|
-
assertGraphLoopConfigurationValid(node, node.loop, nestedContext);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
const edgeIds = new Set();
|
|
141
|
-
for (const edge of document.edges) {
|
|
142
|
-
assertGraphEdgeValid(edge, edgeIds);
|
|
143
|
-
}
|
|
144
|
-
for (const edge of document.edges) {
|
|
145
|
-
assertEdgeEndpoint(edge.source, document, workflowPorts, nodeIds, `Edge '${edge.id}' source`);
|
|
146
|
-
assertEdgeEndpoint(edge.target, document, workflowPorts, nodeIds, `Edge '${edge.id}' target`);
|
|
147
|
-
}
|
|
148
|
-
if (document.settings !== undefined && !isGraphJsonSafeValue(document.settings)) {
|
|
149
|
-
throw new ValidationError("Document settings must be JSON-safe (a map of JSON-safe values)");
|
|
150
|
-
}
|
|
151
|
-
if (document.metadata !== undefined && !isGraphJsonSafeValue(document.metadata)) {
|
|
152
|
-
throw new ValidationError("Document metadata must be JSON-safe: functions, class instances, undefined, NaN/Infinity, symbol keys, or unsafe prototype keys are not allowed");
|
|
153
|
-
}
|
|
154
|
-
if (document.ui !== undefined && !isGraphJsonSafeValue(document.ui)) {
|
|
155
|
-
throw new ValidationError("Document ui must be JSON-safe: functions, class instances, undefined, NaN/Infinity, symbol keys, or unsafe prototype keys are not allowed");
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
function describeDocument(document) {
|
|
159
|
-
const id = document?.["id"];
|
|
160
|
-
return typeof id === "string" ? id : "<unnamed document>";
|
|
161
|
-
}
|
|
162
|
-
function assertGraphNodeValid(node, nodeIds) {
|
|
163
|
-
if (typeof node.id !== "string" || !node.id) {
|
|
164
|
-
throw new ValidationError("Node 'id' is required and must be a non-empty string");
|
|
165
|
-
}
|
|
166
|
-
if (nodeIds.has(node.id)) {
|
|
167
|
-
throw new ValidationError(`Node id '${node.id}' is declared more than once; node ids must be unique`);
|
|
168
|
-
}
|
|
169
|
-
if (typeof node.kind !== "string" || !node.kind) {
|
|
170
|
-
throw new ValidationError(`Node '${node.id}' must declare a non-empty string 'kind'`);
|
|
171
|
-
}
|
|
172
|
-
if (node.parameters === undefined || node.parameters === null) {
|
|
173
|
-
throw new ValidationError(`Node '${node.id}' parameters must be present (an empty object when there are none)`);
|
|
174
|
-
}
|
|
175
|
-
nodeIds.add(node.id);
|
|
176
|
-
if (node.inputBindings) {
|
|
177
|
-
for (const [key, binding] of Object.entries(node.inputBindings)) {
|
|
178
|
-
if (isGraphUnsafeObjectKey(key)) {
|
|
179
|
-
throw new ValidationError(`Node '${node.id}' input binding key '${key}' is not allowed (unsafe prototype-pollutant key)`);
|
|
180
|
-
}
|
|
181
|
-
if (!isGraphInputBinding(binding)) {
|
|
182
|
-
throw new ValidationError(`Node '${node.id}' input binding for '${key}' must be a valid GraphInputBinding (edge, literal, or expression)`);
|
|
183
|
-
}
|
|
184
|
-
if (binding.mode === "literal" && !isGraphJsonSafeValue(binding.value)) {
|
|
185
|
-
throw new ValidationError(`Node '${node.id}' literal binding for '${key}' must contain JSON-safe values`);
|
|
186
|
-
}
|
|
187
|
-
if (binding.mode === "expression" && !binding.expression) {
|
|
188
|
-
throw new ValidationError(`Node '${node.id}' expression binding for '${key}' must contain a non-empty expression`);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
if (node.outputBindings) {
|
|
193
|
-
for (const [key, binding] of Object.entries(node.outputBindings)) {
|
|
194
|
-
if (isGraphUnsafeObjectKey(key)) {
|
|
195
|
-
throw new ValidationError(`Node '${node.id}' output binding key '${key}' is not allowed (unsafe prototype-pollutant key)`);
|
|
196
|
-
}
|
|
197
|
-
if (!binding || typeof binding !== "object" || Array.isArray(binding)) {
|
|
198
|
-
throw new ValidationError(`Node '${node.id}' output binding for '${key}' must be an object with enabled and alias settings`);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
if (!isGraphJsonSafeValue(node.parameters)) {
|
|
203
|
-
throw new ValidationError(`Node '${node.id}' parameters must be JSON-safe: functions, class instances, undefined, NaN/Infinity, symbol keys, or unsafe prototype keys are not allowed`);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
function assertGraphLoopConfigurationValid(node, config, context) {
|
|
207
|
-
if (!config.body || typeof config.body !== "object") {
|
|
208
|
-
throw new ValidationError(`Node '${node.id}' loop configuration requires a body document`);
|
|
209
|
-
}
|
|
210
|
-
assertGraphWorkflowDocumentValid(config.body, context);
|
|
211
|
-
if (config.maxIterations !== undefined &&
|
|
212
|
-
(!Number.isFinite(config.maxIterations) || config.maxIterations <= 0)) {
|
|
213
|
-
throw new ValidationError(`Node '${node.id}' loop maxIterations must be a positive number`);
|
|
214
|
-
}
|
|
215
|
-
if (config.timeoutMs !== undefined &&
|
|
216
|
-
(typeof config.timeoutMs !== "number" || config.timeoutMs <= 0)) {
|
|
217
|
-
throw new ValidationError(`Node '${node.id}' loop timeoutMs must be a positive number in milliseconds`);
|
|
218
|
-
}
|
|
219
|
-
if (config.concurrency !== undefined &&
|
|
220
|
-
(typeof config.concurrency !== "number" || config.concurrency <= 0)) {
|
|
221
|
-
throw new ValidationError(`Node '${node.id}' loop concurrency must be a positive number`);
|
|
222
|
-
}
|
|
223
|
-
for (const mappings of [config.inputMappings, config.outputMappings]) {
|
|
224
|
-
if (!mappings)
|
|
225
|
-
continue;
|
|
226
|
-
for (const [key, reference] of Object.entries(mappings)) {
|
|
227
|
-
if (isGraphUnsafeObjectKey(key)) {
|
|
228
|
-
throw new ValidationError(`Node '${node.id}' loop mapping key '${key}' is not allowed (unsafe prototype-pollutant key)`);
|
|
229
|
-
}
|
|
230
|
-
assertGraphValueReferenceShape(reference, node.id, key);
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
function assertGraphValueReferenceShape(reference, nodeId, mappingKey) {
|
|
235
|
-
if (!reference || typeof reference !== "object") {
|
|
236
|
-
throw new ValidationError(`Node '${nodeId}' loop mapping '${mappingKey}' must reference a workflow port, node port, literal, or expression`);
|
|
237
|
-
}
|
|
238
|
-
switch (reference.source) {
|
|
239
|
-
case "workflow":
|
|
240
|
-
if (typeof reference.port !== "string" || !reference.port) {
|
|
241
|
-
throw new ValidationError(`Node '${nodeId}' loop mapping '${mappingKey}' referencing a workflow must reference a port identifier`);
|
|
242
|
-
}
|
|
243
|
-
break;
|
|
244
|
-
case "node":
|
|
245
|
-
if (typeof reference.nodeId !== "string" ||
|
|
246
|
-
!reference.nodeId ||
|
|
247
|
-
typeof reference.port !== "string" ||
|
|
248
|
-
!reference.port) {
|
|
249
|
-
throw new ValidationError(`Node '${nodeId}' loop mapping '${mappingKey}' referencing a node must reference a node id and a port`);
|
|
250
|
-
}
|
|
251
|
-
break;
|
|
252
|
-
case "literal":
|
|
253
|
-
if (!isGraphJsonSafeValue(reference.value)) {
|
|
254
|
-
throw new ValidationError(`Node '${nodeId}' loop mapping '${mappingKey}' literal references must be JSON-safe values`);
|
|
255
|
-
}
|
|
256
|
-
break;
|
|
257
|
-
case "expression":
|
|
258
|
-
if (typeof reference.expression !== "string" || !reference.expression) {
|
|
259
|
-
throw new ValidationError(`Node '${nodeId}' loop mapping '${mappingKey}' expression references must be non-empty expressions`);
|
|
260
|
-
}
|
|
261
|
-
break;
|
|
262
|
-
default:
|
|
263
|
-
throw new ValidationError(`Node '${nodeId}' loop mapping '${mappingKey}' must use a workflow, node, literal, or expression reference source`);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
function assertGraphEdgeValid(edge, edgeIds) {
|
|
267
|
-
if (typeof edge.id !== "string" || !edge.id) {
|
|
268
|
-
throw new ValidationError("Edge 'id' is required and must be a non-empty string");
|
|
269
|
-
}
|
|
270
|
-
if (edgeIds.has(edge.id)) {
|
|
271
|
-
throw new ValidationError(`Edge id '${edge.id}' is declared more than once; edge ids must be unique`);
|
|
272
|
-
}
|
|
273
|
-
if (!isGraphEndpoint(edge.source)) {
|
|
274
|
-
throw new ValidationError(`Edge '${edge.id}' source endpoint is not a valid GraphEndpoint`);
|
|
275
|
-
}
|
|
276
|
-
if (!isGraphEndpoint(edge.target)) {
|
|
277
|
-
throw new ValidationError(`Edge '${edge.id}' target endpoint is not a valid GraphEndpoint`);
|
|
278
|
-
}
|
|
279
|
-
if (edge.type !== "data" && edge.type !== "connection") {
|
|
280
|
-
throw new ValidationError(`Edge '${edge.id}' type '${String(edge.type)}' is not a valid edge type (data or connection are allowed)`);
|
|
281
|
-
}
|
|
282
|
-
edgeIds.add(edge.id);
|
|
283
|
-
if (!isGraphJsonSafeValue(edge)) {
|
|
284
|
-
throw new ValidationError(`Edge '${edge.id}' contains values that are not JSON-safe: functions, class instances, undefined, NaN/Infinity, symbol keys, or unsafe prototype keys are not allowed`);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
function assertEdgeEndpoint(endpoint, document, workflowPorts, nodeIds, context) {
|
|
288
|
-
if (isGraphWorkflowEndpoint(endpoint)) {
|
|
289
|
-
if (!workflowPorts.has(endpoint.port)) {
|
|
290
|
-
throw new ValidationError(`${context} references workflow port '${endpoint.port}' which is not declared on the document`);
|
|
291
|
-
}
|
|
292
|
-
return;
|
|
293
|
-
}
|
|
294
|
-
if (isGraphNodeEndpoint(endpoint)) {
|
|
295
|
-
if (!nodeIds.has(endpoint.nodeId)) {
|
|
296
|
-
throw new ValidationError(`${context} references node '${endpoint.nodeId}' which is not part of the document`);
|
|
297
|
-
}
|
|
298
|
-
if (typeof endpoint.port !== "string" || !endpoint.port) {
|
|
299
|
-
throw new ValidationError(`${context} node endpoints must reference a non-empty port identifier`);
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
//# sourceMappingURL=GraphWorkflowDocumentBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GraphWorkflowDocumentBuilder.js","sourceRoot":"","sources":["../../../../src/graph/document/GraphWorkflowDocumentBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EACL,oBAAoB,EACpB,sBAAsB,GACvB,4BAAyB;AAE1B,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,2BAAwB;AAChG,OAAO,EAAE,mBAAmB,EAAE,8BAA2B;AAWzD,OAAO,EAAE,kBAAkB,EAAE,yCAAoC;AAajE;;;;;GAKG;AACH,MAAM,OAAO,4BAA4B;IAGvC;;;OAGG;IACH,YAAY,EAAU,EAAE,IAAa;QACnC,IAAI,CAAC,QAAQ,GAAG;YACd,EAAE;YACF,IAAI,EAAE,IAAI,IAAI,EAAE;YAChB,MAAM,EAAE,EAAE;YACV,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,EAAE;SACV,CAAC;IACJ,CAAC;IAED,qCAAqC;IACrC,QAAQ,CAAC,IAA4B;QACnC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,sCAAsC;IACtC,SAAS,CAAC,IAA4B;QACpC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,2EAA2E;IAC3E,OAAO,CAAC,IAAuB;QAC7B,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC;YACvB,GAAG,IAAI;YACP,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE;SAClC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CA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,EAC/B,aAA0B,EAC1B,OAAoB,EACpB,OAAe;IAEf,IAAI,uBAAuB,CAAC,QAAQ,CAAC,EAAE,CAAC;QACtC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YACtC,MAAM,IAAI,eAAe,CACvB,GAAG,OAAO,8BAA8B,QAAQ,CAAC,IAAI,yCAAyC,CAC/F,CAAC;QACJ,CAAC;QACD,OAAO;IACT,CAAC;IACD,IAAI,mBAAmB,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,eAAe,CACvB,GAAG,OAAO,qBAAqB,QAAQ,CAAC,MAAM,qCAAqC,CACpF,CAAC;QACJ,CAAC;QACD,IAAI,OAAO,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxD,MAAM,IAAI,eAAe,CACvB,GAAG,OAAO,4DAA4D,CACvE,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { isGraphUnsafeObjectKey } from "./GraphJsonValue.js";
|
|
2
|
-
import { isGraphWorkflowDocumentShape } from "./GraphWorkflowDocument.js";
|
|
3
|
-
export function graphWorkflowDocumentOf(value) {
|
|
4
|
-
if (!isGraphWorkflowDocumentShape(value))
|
|
5
|
-
return undefined;
|
|
6
|
-
return value;
|
|
7
|
-
}
|
|
8
|
-
export function graphWorkflowNodeOf(document, nodeId) {
|
|
9
|
-
return document?.nodes.find((node) => node.id === nodeId);
|
|
10
|
-
}
|
|
11
|
-
export function graphWorkflowEdgeOf(document, edgeId) {
|
|
12
|
-
return document?.edges.find((edge) => edge.id === edgeId);
|
|
13
|
-
}
|
|
14
|
-
export function graphWorkflowPortsOf(document) {
|
|
15
|
-
const inputs = document?.inputs ?? [];
|
|
16
|
-
const outputs = document?.outputs ?? [];
|
|
17
|
-
return { inputs, outputs };
|
|
18
|
-
}
|
|
19
|
-
export function graphWorkflowSettingsOf(document) {
|
|
20
|
-
return { ...(document?.settings ?? {}) };
|
|
21
|
-
}
|
|
22
|
-
export function graphWorkflowEdgesOf(document) {
|
|
23
|
-
return document?.edges ?? [];
|
|
24
|
-
}
|
|
25
|
-
export function graphWorkflowNodeEdgesOf(document, nodeId) {
|
|
26
|
-
return (document?.edges ?? []).filter((edge) => graphNodeEndpointId(edge.source) === nodeId || graphNodeEndpointId(edge.target) === nodeId);
|
|
27
|
-
}
|
|
28
|
-
export function graphNodeEndpointId(endpoint) {
|
|
29
|
-
if (endpoint && endpoint.scope === "node") {
|
|
30
|
-
return endpoint.nodeId;
|
|
31
|
-
}
|
|
32
|
-
return undefined;
|
|
33
|
-
}
|
|
34
|
-
export function graphWorkflowNodeUiOf(document, nodeId) {
|
|
35
|
-
return graphWorkflowNodeOf(document, nodeId)?.ui;
|
|
36
|
-
}
|
|
37
|
-
export function graphWorkflowUiOf(document) {
|
|
38
|
-
return document.ui ?? undefined;
|
|
39
|
-
}
|
|
40
|
-
export function graphWorkflowUiValueOf(document, key) {
|
|
41
|
-
const ui = graphWorkflowUiOf(document);
|
|
42
|
-
if (!ui || isGraphUnsafeObjectKey(key))
|
|
43
|
-
return undefined;
|
|
44
|
-
return ui[key];
|
|
45
|
-
}
|
|
46
|
-
export function graphWorkflowDocumentSettingOf(document, key) {
|
|
47
|
-
return hasSetting(document?.settings, key)
|
|
48
|
-
? document.settings[key]
|
|
49
|
-
: undefined;
|
|
50
|
-
}
|
|
51
|
-
export function graphWorkflowDocumentMetadataValueOf(document, key) {
|
|
52
|
-
if (!document?.metadata ||
|
|
53
|
-
isGraphUnsafeObjectKey(key) ||
|
|
54
|
-
!(key in document.metadata)) {
|
|
55
|
-
return undefined;
|
|
56
|
-
}
|
|
57
|
-
return document.metadata[key];
|
|
58
|
-
}
|
|
59
|
-
function hasSetting(settings, key) {
|
|
60
|
-
return Boolean(settings) && !isGraphUnsafeObjectKey(key) && key in settings;
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=GraphWorkflowDocumentReader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GraphWorkflowDocumentReader.js","sourceRoot":"","sources":["../../../../src/graph/document/GraphWorkflowDocumentReader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,4BAAyB;AAK1D,OAAO,EAAE,4BAA4B,EAAE,mCAAgC;AAQvE,MAAM,UAAU,uBAAuB,CACrC,KAAc;IAEd,IAAI,CAAC,4BAA4B,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC3D,OAAO,KAAyC,CAAC;AACnD,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,QAA2C,EAC3C,MAAc;IAEd,OAAO,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,QAA2C,EAC3C,MAAc;IAEd,OAAO,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,QAA2C;IAE3C,MAAM,MAAM,GAAG,QAAQ,EAAE,MAAM,IAAI,EAAE,CAAC;IACtC,MAAM,OAAO,GAAG,QAAQ,EAAE,OAAO,IAAI,EAAE,CAAC;IACxC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,QAA2C;IAE3C,OAAO,EAAE,GAAG,CAAC,QAAQ,EAAE,QAAQ,IAAI,EAAE,CAAC,EAAE,CAAC;AAC3C,CAAC;AAED,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D,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,oCAAoC,CAClD,QAA2C,EAC3C,GAAW;IAEX,IACE,CAAC,QAAQ,EAAE,QAAQ;QACnB,sBAAsB,CAAC,GAAG,CAAC;QAC3B,CAAC,CAAC,GAAG,IAAI,QAAQ,CAAC,QAAQ,CAAC,EAC3B,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,UAAU,CACjB,QAAuD,EACvD,GAAW;IAEX,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,IAAI,GAAG,IAAK,QAAmB,CAAC;AAC1F,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { ValidationError } from "@decaf-ts/db-decorators";
|
|
2
|
-
import { isGraphJsonSafeValue } from "./GraphJsonValue.js";
|
|
3
|
-
import { isGraphWorkflowDocumentShape } from "./GraphWorkflowDocument.js";
|
|
4
|
-
import { assertGraphWorkflowDocumentValid } from "./GraphWorkflowDocumentBuilder.js";
|
|
5
|
-
export function graphWorkflowDocumentSerializer(document) {
|
|
6
|
-
if (!isGraphWorkflowDocumentShape(document)) {
|
|
7
|
-
throw new ValidationError("Cannot serialize a graph workflow document: the value is not a canonical GraphWorkflowDocument shape");
|
|
8
|
-
}
|
|
9
|
-
try {
|
|
10
|
-
return JSON.stringify(document, null, 2);
|
|
11
|
-
}
|
|
12
|
-
catch (e) {
|
|
13
|
-
throw new ValidationError(`Cannot serialize graph workflow document '${document.id}': ${String(e)}`);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export function graphWorkflowDocumentDeserializer(serialised) {
|
|
17
|
-
let parsed;
|
|
18
|
-
try {
|
|
19
|
-
parsed = JSON.parse(serialised);
|
|
20
|
-
}
|
|
21
|
-
catch (e) {
|
|
22
|
-
throw new ValidationError(`Serialized graph workflow document is not valid JSON: ${String(e)}`);
|
|
23
|
-
}
|
|
24
|
-
if (!isGraphJsonSafeValue(parsed)) {
|
|
25
|
-
throw new ValidationError("Serialized graph workflow document contains JSON-unsafe values: functions, non-JSON objects, NaN/Infinity, symbol keys, unsafe prototype keys are rejected");
|
|
26
|
-
}
|
|
27
|
-
if (!isGraphWorkflowDocumentShape(parsed)) {
|
|
28
|
-
throw new ValidationError("Serialized graph workflow document is not shaped as a canonical GraphWorkflowDocument (id, name, inputs, outputs, nodes and edges are required)");
|
|
29
|
-
}
|
|
30
|
-
const document = parsed;
|
|
31
|
-
assertGraphWorkflowDocumentValid(document);
|
|
32
|
-
return document;
|
|
33
|
-
}
|
|
34
|
-
export function graphJsonSerializer(value, indentation) {
|
|
35
|
-
if (!isGraphJsonSafeValue(value)) {
|
|
36
|
-
throw new ValidationError("Cannot serialize a value: functions, class instances, undefined, NaN/Infinity, symbol keys, unsafe prototype keys, or cycles are not allowed");
|
|
37
|
-
}
|
|
38
|
-
try {
|
|
39
|
-
return JSON.stringify(value, null, indentation);
|
|
40
|
-
}
|
|
41
|
-
catch (e) {
|
|
42
|
-
throw new ValidationError(`Cannot serialize JSON-safe value: ${String(e)} (cycles and circular structures are not allowed inside graph JSON)`);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
export function graphJsonParser(serialised) {
|
|
46
|
-
if (typeof serialised !== "string") {
|
|
47
|
-
if (typeof serialised === "object" && serialised !== null)
|
|
48
|
-
return serialised;
|
|
49
|
-
throw new ValidationError("Graph JSON parser accepts serialized strings (pass an object only when restoring a known-safe value)");
|
|
50
|
-
}
|
|
51
|
-
let parsed;
|
|
52
|
-
try {
|
|
53
|
-
parsed = JSON.parse(serialised);
|
|
54
|
-
}
|
|
55
|
-
catch (e) {
|
|
56
|
-
throw new ValidationError(`Serialized graph JSON is not valid JSON: ${String(e)}`);
|
|
57
|
-
}
|
|
58
|
-
if (!isGraphJsonSafeValue(parsed)) {
|
|
59
|
-
throw new ValidationError("Serialized graph JSON contains JSON-unsafe values: functions, non-JSON objects, NaN/Infinity, symbol keys, unsafe prototype keys are rejected");
|
|
60
|
-
}
|
|
61
|
-
return parsed;
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=GraphWorkflowDocumentSerializer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GraphWorkflowDocumentSerializer.js","sourceRoot":"","sources":["../../../../src/graph/document/GraphWorkflowDocumentSerializer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,4BAAyB;AAExD,OAAO,EAAE,4BAA4B,EAAE,mCAAgC;AACvE,OAAO,EAAE,gCAAgC,EAAE,0CAAuC;AAElF,MAAM,UAAU,+BAA+B,CAC7C,QAA+B;IAE/B,IAAI,CAAC,4BAA4B,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,eAAe,CACvB,sGAAsG,CACvG,CAAC;IACJ,CAAC;IACD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,eAAe,CACvB,6CAA6C,QAAQ,CAAC,EAAE,MAAM,MAAM,CAAC,CAAC,CAAC,EAAE,CAC1E,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,UAAkB;IAElB,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,MAAM,IAAI,eAAe,CACvB,yDAAyD,MAAM,CAAC,CAAC,CAAC,EAAE,CACrE,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,oBAAoB,CAA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B,CAAC,MAAM,CAAC,EAAE,CAAC;QAClC,MAAM,IAAI,eAAe,CACvB,+IAA+I,CAChJ,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GraphWorkflowUiState.js","sourceRoot":"","sources":["../../../../src/graph/document/GraphWorkflowUiState.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from "./GraphDecoratedWorkflowCompiler.js";
|
|
2
|
-
export * from "./GraphEdgeInstance.js";
|
|
3
|
-
export * from "./GraphEndpoint.js";
|
|
4
|
-
export * from "./GraphJsonValue.js";
|
|
5
|
-
export * from "./GraphLoopConfiguration.js";
|
|
6
|
-
export * from "./GraphNodeBinding.js";
|
|
7
|
-
export * from "./GraphNodeInstance.js";
|
|
8
|
-
export * from "./GraphWorkflowDocument.js";
|
|
9
|
-
export * from "./GraphWorkflowDocumentBuilder.js";
|
|
10
|
-
export * from "./GraphWorkflowDocumentReader.js";
|
|
11
|
-
export * from "./GraphWorkflowDocumentSerializer.js";
|
|
12
|
-
export * from "./GraphWorkflowUiState.js";
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/graph/document/index.ts"],"names":[],"mappings":"AAAA,oDAAiD;AACjD,uCAAoC;AACpC,mCAAgC;AAChC,oCAAiC;AACjC,4CAAyC;AACzC,sCAAmC;AACnC,uCAAoC;AACpC,2CAAwC;AACxC,kDAA+C;AAC/C,iDAA8C;AAC9C,qDAAkD;AAClD,0CAAuC"}
|
package/lib/esm/graph/index.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import "./../overrides/index.js";
|
|
2
|
-
import "./overrides/index.js";
|
|
3
|
-
export * from "./constants.js";
|
|
4
|
-
export * from "./decorators.js";
|
|
5
|
-
export * from "./registry.js";
|
|
6
|
-
export * from "./overrides/index.js";
|
|
7
|
-
export * from "./snapshot.js";
|
|
8
|
-
export * from "./reader.js";
|
|
9
|
-
export * from "./document/index.js";
|
|
10
|
-
export * from "./catalog/index.js";
|
|
11
|
-
export * from "./types.js";
|
|
12
|
-
export * from "./GraphExecutionStateMapper.js";
|
|
13
|
-
export * from "./GraphResolution.js";
|
|
14
|
-
export * from "./category-styles.js";
|
|
15
|
-
export * from "./overrides/index.js";
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/graph/index.ts"],"names":[],"mappings":"AAAA,iCAAsB;AACtB,8BAAqB;AAErB,+BAA4B;AAC5B,gCAA6B;AAC7B,8BAA2B;AAC3B,qCAA4B;AAC5B,8BAA2B;AAC3B,4BAAyB;AACzB,oCAA2B;AAC3B,mCAA0B;AAC1B,2BAAwB;AACxB,+CAA4C;AAC5C,qCAAkC;AAClC,qCAAkC;AAClC,qCAA4B"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module ui-decorators/graph/overrides/Metadata
|
|
3
|
-
* @summary Metadata namespace augmentation for graph nodes and workflows.
|
|
4
|
-
* @description Extends the `Metadata` class from `@decaf-ts/decoration` with
|
|
5
|
-
* `Metadata.nodes()` and `Metadata.workflows()` accessors that return all
|
|
6
|
-
* `@node`-decorated and `@graph`-decorated constructors respectively.
|
|
7
|
-
*
|
|
8
|
-
* This follows the existing override pattern used by `core` (`core/src/overrides/`)
|
|
9
|
-
* and `decorator-validation` (`decorator-validation/src/overrides/`):
|
|
10
|
-
* 1. This file declares the new static methods on the `Metadata` namespace via
|
|
11
|
-
* `declare module` (TypeScript declaration merging).
|
|
12
|
-
* 2. The companion `overrides.ts` attaches the implementations to the
|
|
13
|
-
* `Metadata` class at runtime via `(Metadata as any).fn = ...`.
|
|
14
|
-
* 3. The `index.ts` of this folder side-effect-imports `overrides.ts` so the
|
|
15
|
-
* attachments run whenever the graph module is loaded.
|
|
16
|
-
* 4. The package's `sideEffects` array in `package.json` includes the compiled
|
|
17
|
-
* overrides entry points so bundlers preserve the side-effect imports.
|
|
18
|
-
*/
|
|
19
|
-
import "@decaf-ts/decoration";
|
|
20
|
-
//# sourceMappingURL=Metadata.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Metadata.js","sourceRoot":"","sources":["../../../../src/graph/overrides/Metadata.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,sBAAsB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Rendering.js","sourceRoot":"","sources":["../../../../src/graph/overrides/Rendering.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/graph/overrides/index.ts"],"names":[],"mappings":"AAAA,wBAAqB;AAErB,+BAA4B;AAC5B,8BAA2B"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import "./Rendering.js";
|
|
2
|
-
import { Metadata } from "@decaf-ts/decoration";
|
|
3
|
-
import { RenderingEngine } from "./../../ui/index.js";
|
|
4
|
-
import { graphDefinitionOf } from "./../reader.js";
|
|
5
|
-
import { graphNodes, graphWorkflows } from "./../registry.js";
|
|
6
|
-
RenderingEngine.prototype.renderAsNode = function renderAsNode(model, globalProps, ...args) {
|
|
7
|
-
void globalProps;
|
|
8
|
-
void args;
|
|
9
|
-
return graphDefinitionOf(model);
|
|
10
|
-
};
|
|
11
|
-
Metadata.nodes = function nodes() {
|
|
12
|
-
return graphNodes();
|
|
13
|
-
}.bind(Metadata);
|
|
14
|
-
Metadata.workflows = function workflows() {
|
|
15
|
-
return graphWorkflows();
|
|
16
|
-
}.bind(Metadata);
|
|
17
|
-
//# sourceMappingURL=overrides.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"overrides.js","sourceRoot":"","sources":["../../../../src/graph/overrides/overrides.ts"],"names":[],"mappings":"AAAA,wBAAqB;AACrB,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAwB,eAAe,EAAE,4BAAuB;AAEvE,OAAO,EAAE,iBAAiB,EAAE,uBAAkB;AAC9C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,yBAAoB;AAExD,eAAe,CAAC,SAAiB,CAAC,YAAY,GAAG,SAAS,YAAY,CAIrE,KAAQ,EAAE,WAAoC,EAAE,GAAG,IAAW;IAC9D,KAAK,WAAW,CAAC;IACjB,KAAK,IAAI,CAAC;IACV,OAAO,iBAAiB,CAAC,KAAK,CAAiB,CAAC;AAClD,CAAC,CAAC;AAED,QAAgB,CAAC,KAAK,GAAG,SAAS,KAAK;IACtC,OAAO,UAAU,EAAE,CAAC;AACtB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAEhB,QAAgB,CAAC,SAAS,GAAG,SAAS,SAAS;IAC9C,OAAO,cAAc,EAAE,CAAC;AAC1B,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC"}
|