@decaf-ts/as-graph 0.5.0 → 0.6.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.
- package/README.md +59 -13
- package/dist/as-graph.cjs +1 -1
- package/dist/as-graph.cjs.map +1 -1
- package/dist/as-graph.js +1 -1
- package/dist/as-graph.js.map +1 -1
- package/lib/cjs/dagster/DagsterGraphExecutionBackend.cjs +102 -11
- package/lib/cjs/dagster/DagsterGraphExecutionBackend.cjs.map +1 -1
- package/lib/cjs/engine/execution/GraphExecutionEngine.cjs +7 -0
- package/lib/cjs/engine/execution/GraphExecutionEngine.cjs.map +1 -1
- package/lib/cjs/engine/execution/LocalGraphExecutionBackend.cjs +39 -0
- package/lib/cjs/engine/execution/LocalGraphExecutionBackend.cjs.map +1 -1
- package/lib/cjs/engine/index.cjs +1 -0
- package/lib/cjs/engine/index.cjs.map +1 -1
- package/lib/cjs/engine/services/GraphNodeModelService.cjs +129 -0
- package/lib/cjs/engine/services/GraphNodeModelService.cjs.map +1 -0
- package/lib/cjs/engine/services/GraphWorkflowService.cjs +33 -0
- package/lib/cjs/engine/services/GraphWorkflowService.cjs.map +1 -1
- package/lib/cjs/mastra/MastraDefaultStepHandlers.cjs +217 -0
- package/lib/cjs/mastra/MastraDefaultStepHandlers.cjs.map +1 -0
- package/lib/cjs/mastra/MastraEventBridge.cjs +10 -3
- package/lib/cjs/mastra/MastraEventBridge.cjs.map +1 -1
- package/lib/cjs/mastra/MastraGraphExecutionBackend.cjs +111 -13
- package/lib/cjs/mastra/MastraGraphExecutionBackend.cjs.map +1 -1
- package/lib/cjs/mastra/MastraWorkflowCompiler.cjs +3 -3
- package/lib/cjs/mastra/MastraWorkflowCompiler.cjs.map +1 -1
- package/lib/cjs/mastra/index.cjs +1 -0
- package/lib/cjs/mastra/index.cjs.map +1 -1
- package/lib/cjs/mastra/types.cjs +5 -1
- package/lib/cjs/mastra/types.cjs.map +1 -1
- package/lib/cjs/nest/graph/GraphBackendHost.cjs +105 -19
- package/lib/cjs/nest/graph/GraphBackendHost.cjs.map +1 -1
- package/lib/cjs/nest/graph/GraphExecutionModule.cjs +37 -1
- package/lib/cjs/nest/graph/GraphExecutionModule.cjs.map +1 -1
- package/lib/cjs/nest/graph/main.cjs +16 -1
- package/lib/cjs/nest/graph/main.cjs.map +1 -1
- package/lib/cjs/ram/GraphNodeRepository.cjs +40 -0
- package/lib/cjs/ram/GraphNodeRepository.cjs.map +1 -0
- package/lib/cjs/ram/index.cjs +1 -0
- package/lib/cjs/ram/index.cjs.map +1 -1
- package/lib/cjs/shared/graph/GraphNodeConverters.cjs +43 -0
- package/lib/cjs/shared/graph/GraphNodeConverters.cjs.map +1 -0
- package/lib/cjs/shared/graph/GraphNodeModel.cjs +74 -0
- package/lib/cjs/shared/graph/GraphNodeModel.cjs.map +1 -0
- package/lib/cjs/shared/graph/index.cjs +2 -0
- package/lib/cjs/shared/graph/index.cjs.map +1 -1
- package/lib/esm/dagster/DagsterGraphExecutionBackend.js +102 -11
- package/lib/esm/dagster/DagsterGraphExecutionBackend.js.map +1 -1
- package/lib/esm/engine/execution/GraphExecutionBackend.js.map +1 -1
- package/lib/esm/engine/execution/GraphExecutionEngine.js +7 -0
- package/lib/esm/engine/execution/GraphExecutionEngine.js.map +1 -1
- package/lib/esm/engine/execution/LocalGraphExecutionBackend.js +39 -0
- package/lib/esm/engine/execution/LocalGraphExecutionBackend.js.map +1 -1
- package/lib/esm/engine/index.js +1 -0
- package/lib/esm/engine/index.js.map +1 -1
- package/lib/esm/engine/services/GraphNodeModelService.js +120 -0
- package/lib/esm/engine/services/GraphNodeModelService.js.map +1 -0
- package/lib/esm/engine/services/GraphWorkflowService.js +34 -1
- package/lib/esm/engine/services/GraphWorkflowService.js.map +1 -1
- package/lib/esm/mastra/MastraDefaultStepHandlers.js +212 -0
- package/lib/esm/mastra/MastraDefaultStepHandlers.js.map +1 -0
- package/lib/esm/mastra/MastraEventBridge.js +10 -3
- package/lib/esm/mastra/MastraEventBridge.js.map +1 -1
- package/lib/esm/mastra/MastraGraphExecutionBackend.js +112 -14
- package/lib/esm/mastra/MastraGraphExecutionBackend.js.map +1 -1
- package/lib/esm/mastra/MastraWorkflowCompiler.js +3 -3
- package/lib/esm/mastra/MastraWorkflowCompiler.js.map +1 -1
- package/lib/esm/mastra/index.js +1 -0
- package/lib/esm/mastra/index.js.map +1 -1
- package/lib/esm/mastra/types.js +4 -0
- package/lib/esm/mastra/types.js.map +1 -1
- package/lib/esm/nest/graph/GraphBackendHost.js +69 -18
- package/lib/esm/nest/graph/GraphBackendHost.js.map +1 -1
- package/lib/esm/nest/graph/GraphExecutionModule.js +38 -2
- package/lib/esm/nest/graph/GraphExecutionModule.js.map +1 -1
- package/lib/esm/nest/graph/main.js +17 -2
- package/lib/esm/nest/graph/main.js.map +1 -1
- package/lib/esm/ram/GraphNodeRepository.js +31 -0
- package/lib/esm/ram/GraphNodeRepository.js.map +1 -0
- package/lib/esm/ram/index.js +1 -0
- package/lib/esm/ram/index.js.map +1 -1
- package/lib/esm/shared/graph/GraphNodeConverters.js +38 -0
- package/lib/esm/shared/graph/GraphNodeConverters.js.map +1 -0
- package/lib/esm/shared/graph/GraphNodeModel.js +65 -0
- package/lib/esm/shared/graph/GraphNodeModel.js.map +1 -0
- package/lib/esm/shared/graph/index.js +2 -0
- package/lib/esm/shared/graph/index.js.map +1 -1
- package/lib/types/dagster/DagsterGraphExecutionBackend.d.cts +40 -4
- package/lib/types/dagster/DagsterGraphExecutionBackend.d.mts +40 -4
- package/lib/types/engine/execution/GraphExecutionBackend.d.cts +27 -0
- package/lib/types/engine/execution/GraphExecutionBackend.d.mts +27 -0
- package/lib/types/engine/execution/GraphExecutionEngine.d.cts +9 -0
- package/lib/types/engine/execution/GraphExecutionEngine.d.mts +9 -0
- package/lib/types/engine/execution/LocalGraphExecutionBackend.d.cts +14 -0
- package/lib/types/engine/execution/LocalGraphExecutionBackend.d.mts +14 -0
- package/lib/types/engine/index.d.cts +1 -0
- package/lib/types/engine/index.d.mts +1 -0
- package/lib/types/engine/services/GraphNodeModelService.d.cts +54 -0
- package/lib/types/engine/services/GraphNodeModelService.d.mts +54 -0
- package/lib/types/engine/services/GraphWorkflowService.d.cts +21 -0
- package/lib/types/engine/services/GraphWorkflowService.d.mts +21 -0
- package/lib/types/mastra/MastraDefaultStepHandlers.d.cts +74 -0
- package/lib/types/mastra/MastraDefaultStepHandlers.d.mts +74 -0
- package/lib/types/mastra/MastraGraphExecutionBackend.d.cts +29 -0
- package/lib/types/mastra/MastraGraphExecutionBackend.d.mts +29 -0
- package/lib/types/mastra/MastraWorkflowCompiler.d.cts +3 -3
- package/lib/types/mastra/MastraWorkflowCompiler.d.mts +3 -3
- package/lib/types/mastra/index.d.cts +1 -0
- package/lib/types/mastra/index.d.mts +1 -0
- package/lib/types/mastra/types.d.cts +12 -0
- package/lib/types/mastra/types.d.mts +12 -0
- package/lib/types/nest/graph/GraphBackendHost.d.cts +52 -0
- package/lib/types/nest/graph/GraphBackendHost.d.mts +52 -0
- package/lib/types/nest/graph/GraphExecutionModule.d.cts +11 -0
- package/lib/types/nest/graph/GraphExecutionModule.d.mts +11 -0
- package/lib/types/ram/GraphNodeRepository.d.cts +13 -0
- package/lib/types/ram/GraphNodeRepository.d.mts +13 -0
- package/lib/types/ram/index.d.cts +1 -0
- package/lib/types/ram/index.d.mts +1 -0
- package/lib/types/shared/graph/GraphNodeConverters.d.cts +15 -0
- package/lib/types/shared/graph/GraphNodeConverters.d.mts +15 -0
- package/lib/types/shared/graph/GraphNodeModel.d.cts +24 -0
- package/lib/types/shared/graph/GraphNodeModel.d.mts +24 -0
- package/lib/types/shared/graph/index.d.cts +2 -0
- package/lib/types/shared/graph/index.d.mts +2 -0
- package/package.json +9 -3
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module as-graph/nest/graph/GraphBackendHost
|
|
3
|
+
* @summary Boot-time engine-variant selection for the graph backend host (SAA-706).
|
|
4
|
+
* @description Resolves which of the three pluggable graph engines — the built-in
|
|
5
|
+
* local reference interpreter, the `@mastra/core` translated backend, or the
|
|
6
|
+
* read-only Dagster backend — a host boots, constructs and registers that
|
|
7
|
+
* backend, and assembles the {@link GraphExecutionModule} options that make the
|
|
8
|
+
* Nest host serve the matching C20 capability manifest (`graph/engines`) and the
|
|
9
|
+
* per-engine workflow catalogue (`graph/engines/{engineId}/workflows`).
|
|
10
|
+
*
|
|
11
|
+
* The host never stubs an engine: each variant constructs the real backend. A
|
|
12
|
+
* translated/remote backend whose host wiring is absent (no Mastra runtime, no
|
|
13
|
+
* Dagster client) still boots and serves the manifest; its catalogue then reports
|
|
14
|
+
* the engine's honest `NOT_SUPPORTED` verdict through the engine facade, exactly
|
|
15
|
+
* as `GraphEngineController` maps it to `501`. The variant is chosen at boot by
|
|
16
|
+
* the `GRAPH_BACKEND_ENGINE` environment variable, so switching engines is a
|
|
17
|
+
* configuration change, never a code change.
|
|
18
|
+
*/
|
|
19
|
+
import type { GraphWorkflowDocument } from "../../shared/graph/index.d.mts";
|
|
1
20
|
import type { GraphExecutionBackend } from "../../engine/execution/GraphExecutionBackend.d.mts";
|
|
2
21
|
import { type MastraBackendConfig } from "../../mastra/types.d.mts";
|
|
3
22
|
import type { DagsterClient } from "../../dagster/DagsterTypes.d.mts";
|
|
@@ -32,6 +51,20 @@ export declare function parseGraphEngineVariant(value: string | undefined, fallb
|
|
|
32
51
|
* @returns The resolved engine variant.
|
|
33
52
|
*/
|
|
34
53
|
export declare function graphEngineVariantFromEnv(env?: NodeJS.ProcessEnv): GraphEngineVariant;
|
|
54
|
+
/** Environment variable gating boot-time demo-workflow seeding (F5 hardening). */
|
|
55
|
+
export declare const GRAPH_SEED_DEMO_ENV = "GRAPH_SEED_DEMO";
|
|
56
|
+
/**
|
|
57
|
+
* Resolves whether the standalone host seeds the demo workflow fixture registry
|
|
58
|
+
* at boot (F5 hardening). Seeding is enabled by default so a source checkout
|
|
59
|
+
* keeps its fixtures; a production host sets `GRAPH_SEED_DEMO=off` (also accepts
|
|
60
|
+
* `false` / `0` / `no` / `disabled`, case-insensitive) to suppress owner-less
|
|
61
|
+
* demo seeding without a code change. An unset or empty value keeps the default
|
|
62
|
+
* (enabled), so existing hosts are unaffected.
|
|
63
|
+
*
|
|
64
|
+
* @param env - The environment to read from (defaults to `process.env`).
|
|
65
|
+
* @returns `true` when boot-time demo seeding is enabled.
|
|
66
|
+
*/
|
|
67
|
+
export declare function graphDemoSeedEnabledFromEnv(env?: NodeJS.ProcessEnv): boolean;
|
|
35
68
|
/** Host wiring for the Dagster variant: the client port plus its gate options. */
|
|
36
69
|
export interface GraphDagsterHostOptions {
|
|
37
70
|
/**
|
|
@@ -59,6 +92,13 @@ export interface GraphBackendHostOptions {
|
|
|
59
92
|
mastra?: MastraBackendConfig;
|
|
60
93
|
/** Host wiring for the Dagster variant. */
|
|
61
94
|
dagster?: GraphDagsterHostOptions;
|
|
95
|
+
/**
|
|
96
|
+
* Canonical workflow documents seeded into the selected engine's catalogue at
|
|
97
|
+
* boot (the host's fixture registry). Forwarded to the module options so the
|
|
98
|
+
* per-engine workflow catalogue serves the fixture set for whichever variant
|
|
99
|
+
* the host booted. The seed stays engine-dependent and read-only for Dagster.
|
|
100
|
+
*/
|
|
101
|
+
seedWorkflows?: readonly GraphWorkflowDocument[];
|
|
62
102
|
/**
|
|
63
103
|
* Existing module options to extend. The host overrides only `backend` and
|
|
64
104
|
* `engines.defaultEngineId`, so a caller keeps its auth, limits, adapter, and
|
|
@@ -96,5 +136,17 @@ export interface GraphBackendHost {
|
|
|
96
136
|
* @returns The resolved host, including the module options to boot.
|
|
97
137
|
*/
|
|
98
138
|
export declare function createGraphBackendHost(options: GraphBackendHostOptions): Promise<GraphBackendHost>;
|
|
139
|
+
/**
|
|
140
|
+
* Loads the host's demo workflow fixture registry for boot-time seeding. This is
|
|
141
|
+
* the engine driver's seeding path (R4): the fixture registry is imported only
|
|
142
|
+
* by tests and by this loader. Because the registry is excluded from release
|
|
143
|
+
* packaging, the loader is best-effort — it returns the fixture documents when
|
|
144
|
+
* the registry is present (a source checkout or development install) and an
|
|
145
|
+
* empty set when it is absent (a published package), never failing the boot.
|
|
146
|
+
*
|
|
147
|
+
* @returns The canonical documents to seed, or an empty array when the registry
|
|
148
|
+
* is unavailable.
|
|
149
|
+
*/
|
|
150
|
+
export declare function loadGraphDemoWorkflows(): Promise<readonly GraphWorkflowDocument[]>;
|
|
99
151
|
/** The allowlisted engine id for a variant (the backend flavour). */
|
|
100
152
|
export declare function graphEngineIdOf(variant: GraphEngineVariant): string;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import { DynamicModule, Type } from "@nestjs/common";
|
|
12
12
|
import type { AuthHandler } from "@decaf-ts/for-http/server";
|
|
13
13
|
import { Adapter } from "@decaf-ts/core";
|
|
14
|
+
import type { GraphWorkflowDocument } from "../../shared/graph/index.d.cts";
|
|
14
15
|
import type { GraphExecutionBackend } from "../../engine/execution/GraphExecutionBackend.d.cts";
|
|
15
16
|
import { type GraphCredentialAuthorizer, type GraphNamespaceMatchOptions } from "../..//index.d.cts";
|
|
16
17
|
import { type GraphCatalogueControllerOptions } from "./GraphNodeCatalogueController.d.cts";
|
|
@@ -78,6 +79,16 @@ export interface GraphExecutionModuleOptions {
|
|
|
78
79
|
* wrapper does this) so the manifest and the per-engine catalogue agree.
|
|
79
80
|
*/
|
|
80
81
|
backend?: GraphExecutionBackend<any>;
|
|
82
|
+
/**
|
|
83
|
+
* Canonical workflow documents to seed into the active backend's catalogue at
|
|
84
|
+
* boot, so the per-engine workflow catalogue
|
|
85
|
+
* (`graph/engines/{engineId}/workflows`) and the ownership-filtered serving
|
|
86
|
+
* list (`graph/workflows`) serve the host's fixture set for whichever engine
|
|
87
|
+
* the host booted. The seed is engine-dependent (persistence for local,
|
|
88
|
+
* translated catalogue for Mastra, read-only catalogue for Dagster) and fails
|
|
89
|
+
* closed when the active backend exposes no seed surface.
|
|
90
|
+
*/
|
|
91
|
+
seedWorkflows?: readonly GraphWorkflowDocument[];
|
|
81
92
|
/**
|
|
82
93
|
* Production hosts MUST wire a {@link GraphCredentialAuthorizer} backed by
|
|
83
94
|
* their credential store (DECAF-50 §4.8 stage 8). Without it, stage-8
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import { DynamicModule, Type } from "@nestjs/common";
|
|
12
12
|
import type { AuthHandler } from "@decaf-ts/for-http/server";
|
|
13
13
|
import { Adapter } from "@decaf-ts/core";
|
|
14
|
+
import type { GraphWorkflowDocument } from "../../shared/graph/index.d.mts";
|
|
14
15
|
import type { GraphExecutionBackend } from "../../engine/execution/GraphExecutionBackend.d.mts";
|
|
15
16
|
import { type GraphCredentialAuthorizer, type GraphNamespaceMatchOptions } from "../..//index.d.mts";
|
|
16
17
|
import { type GraphCatalogueControllerOptions } from "./GraphNodeCatalogueController.d.mts";
|
|
@@ -78,6 +79,16 @@ export interface GraphExecutionModuleOptions {
|
|
|
78
79
|
* wrapper does this) so the manifest and the per-engine catalogue agree.
|
|
79
80
|
*/
|
|
80
81
|
backend?: GraphExecutionBackend<any>;
|
|
82
|
+
/**
|
|
83
|
+
* Canonical workflow documents to seed into the active backend's catalogue at
|
|
84
|
+
* boot, so the per-engine workflow catalogue
|
|
85
|
+
* (`graph/engines/{engineId}/workflows`) and the ownership-filtered serving
|
|
86
|
+
* list (`graph/workflows`) serve the host's fixture set for whichever engine
|
|
87
|
+
* the host booted. The seed is engine-dependent (persistence for local,
|
|
88
|
+
* translated catalogue for Mastra, read-only catalogue for Dagster) and fails
|
|
89
|
+
* closed when the active backend exposes no seed surface.
|
|
90
|
+
*/
|
|
91
|
+
seedWorkflows?: readonly GraphWorkflowDocument[];
|
|
81
92
|
/**
|
|
82
93
|
* Production hosts MUST wire a {@link GraphCredentialAuthorizer} backed by
|
|
83
94
|
* their credential store (DECAF-50 §4.8 stage 8). Without it, stage-8
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module as-graph/ram/GraphNodeRepository
|
|
3
|
+
* @summary Adapter-backed repository for graph node-kind rows (SAA-774 R3).
|
|
4
|
+
* @description Repository for {@link GraphNodeModel} rows. Callers provide the
|
|
5
|
+
* adapter (a `RamAdapter` via {@link createRamGraphAdapter} in tests, a durable
|
|
6
|
+
* adapter in production); it is never created implicitly.
|
|
7
|
+
*/
|
|
8
|
+
import { Repository, type Adapter } from "@decaf-ts/core";
|
|
9
|
+
import { GraphNodeModel } from "../shared/graph/index.d.cts";
|
|
10
|
+
/** Repository for {@link GraphNodeModel} rows. */
|
|
11
|
+
export declare class GraphNodeRepository extends Repository<GraphNodeModel, Adapter<any, any, any, any>> {
|
|
12
|
+
constructor(adapter?: Adapter<any, any, any, any>);
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module as-graph/ram/GraphNodeRepository
|
|
3
|
+
* @summary Adapter-backed repository for graph node-kind rows (SAA-774 R3).
|
|
4
|
+
* @description Repository for {@link GraphNodeModel} rows. Callers provide the
|
|
5
|
+
* adapter (a `RamAdapter` via {@link createRamGraphAdapter} in tests, a durable
|
|
6
|
+
* adapter in production); it is never created implicitly.
|
|
7
|
+
*/
|
|
8
|
+
import { Repository, type Adapter } from "@decaf-ts/core";
|
|
9
|
+
import { GraphNodeModel } from "../shared/graph/index.d.mts";
|
|
10
|
+
/** Repository for {@link GraphNodeModel} rows. */
|
|
11
|
+
export declare class GraphNodeRepository extends Repository<GraphNodeModel, Adapter<any, any, any, any>> {
|
|
12
|
+
constructor(adapter?: Adapter<any, any, any, any>);
|
|
13
|
+
}
|
|
@@ -24,6 +24,7 @@ export * from "../engine/runs/GraphRunConverters.d.cts";
|
|
|
24
24
|
export * from "./GraphRunEventModel.d.cts";
|
|
25
25
|
export * from "./GraphRunStore.d.cts";
|
|
26
26
|
export * from "./GraphRunEventStore.d.cts";
|
|
27
|
+
export * from "./GraphNodeRepository.d.cts";
|
|
27
28
|
/**
|
|
28
29
|
* Creates and initializes a {@link RamAdapter} for use with the ram-backed
|
|
29
30
|
* stores. Tests use this; production passes a durable adapter instead.
|
|
@@ -24,6 +24,7 @@ export * from "../engine/runs/GraphRunConverters.d.mts";
|
|
|
24
24
|
export * from "./GraphRunEventModel.d.mts";
|
|
25
25
|
export * from "./GraphRunStore.d.mts";
|
|
26
26
|
export * from "./GraphRunEventStore.d.mts";
|
|
27
|
+
export * from "./GraphNodeRepository.d.mts";
|
|
27
28
|
/**
|
|
28
29
|
* Creates and initializes a {@link RamAdapter} for use with the ram-backed
|
|
29
30
|
* stores. Tests use this; production passes a durable adapter instead.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GraphNodeManifest } from "./catalog/index.d.cts";
|
|
2
|
+
import { GraphNodeModel } from "./GraphNodeModel.d.cts";
|
|
3
|
+
/**
|
|
4
|
+
* Builds a {@link GraphNodeModel} row from a node-kind manifest, mirroring the
|
|
5
|
+
* display summary into dedicated columns while keeping the full JSON-safe
|
|
6
|
+
* manifest on the row.
|
|
7
|
+
*/
|
|
8
|
+
export declare function manifestToNodeModel(manifest: GraphNodeManifest): GraphNodeModel;
|
|
9
|
+
/**
|
|
10
|
+
* Restores the JSON-safe {@link GraphNodeManifest} from a persisted
|
|
11
|
+
* {@link GraphNodeModel} row.
|
|
12
|
+
*
|
|
13
|
+
* @throws {ValidationError} When the row carries no manifest.
|
|
14
|
+
*/
|
|
15
|
+
export declare function nodeModelToManifest(model: GraphNodeModel): GraphNodeManifest;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { GraphNodeManifest } from "./catalog/index.d.mts";
|
|
2
|
+
import { GraphNodeModel } from "./GraphNodeModel.d.mts";
|
|
3
|
+
/**
|
|
4
|
+
* Builds a {@link GraphNodeModel} row from a node-kind manifest, mirroring the
|
|
5
|
+
* display summary into dedicated columns while keeping the full JSON-safe
|
|
6
|
+
* manifest on the row.
|
|
7
|
+
*/
|
|
8
|
+
export declare function manifestToNodeModel(manifest: GraphNodeManifest): GraphNodeModel;
|
|
9
|
+
/**
|
|
10
|
+
* Restores the JSON-safe {@link GraphNodeManifest} from a persisted
|
|
11
|
+
* {@link GraphNodeModel} row.
|
|
12
|
+
*
|
|
13
|
+
* @throws {ValidationError} When the row carries no manifest.
|
|
14
|
+
*/
|
|
15
|
+
export declare function nodeModelToManifest(model: GraphNodeModel): GraphNodeManifest;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseModel } from "@decaf-ts/core";
|
|
2
|
+
import type { GraphNodeManifest } from "./catalog/index.d.cts";
|
|
3
|
+
/**
|
|
4
|
+
* Persistent row for a node kind exposed through repository/adapter CRUD.
|
|
5
|
+
*
|
|
6
|
+
* `kind` is the catalogue key and the primary key. The `name`, `category`,
|
|
7
|
+
* `group` and `description` columns mirror `manifest.display` so listings can be
|
|
8
|
+
* filtered and sorted without deserialising the full manifest.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphNodeModel extends BaseModel {
|
|
11
|
+
/** Registered node kind; the catalogue key and primary key, never generated. */
|
|
12
|
+
kind: string;
|
|
13
|
+
/** Display name mirrored from `manifest.display.name`. */
|
|
14
|
+
name?: string;
|
|
15
|
+
/** Display category mirrored from `manifest.display.category`. */
|
|
16
|
+
category?: string;
|
|
17
|
+
/** Display group mirrored from `manifest.display.group`. */
|
|
18
|
+
group?: string;
|
|
19
|
+
/** Display description mirrored from `manifest.display.description`. */
|
|
20
|
+
description?: string;
|
|
21
|
+
/** Full JSON-safe manifest for the kind. */
|
|
22
|
+
manifest?: GraphNodeManifest;
|
|
23
|
+
constructor(arg?: Partial<GraphNodeModel>);
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseModel } from "@decaf-ts/core";
|
|
2
|
+
import type { GraphNodeManifest } from "./catalog/index.d.mts";
|
|
3
|
+
/**
|
|
4
|
+
* Persistent row for a node kind exposed through repository/adapter CRUD.
|
|
5
|
+
*
|
|
6
|
+
* `kind` is the catalogue key and the primary key. The `name`, `category`,
|
|
7
|
+
* `group` and `description` columns mirror `manifest.display` so listings can be
|
|
8
|
+
* filtered and sorted without deserialising the full manifest.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphNodeModel extends BaseModel {
|
|
11
|
+
/** Registered node kind; the catalogue key and primary key, never generated. */
|
|
12
|
+
kind: string;
|
|
13
|
+
/** Display name mirrored from `manifest.display.name`. */
|
|
14
|
+
name?: string;
|
|
15
|
+
/** Display category mirrored from `manifest.display.category`. */
|
|
16
|
+
category?: string;
|
|
17
|
+
/** Display group mirrored from `manifest.display.group`. */
|
|
18
|
+
group?: string;
|
|
19
|
+
/** Display description mirrored from `manifest.display.description`. */
|
|
20
|
+
description?: string;
|
|
21
|
+
/** Full JSON-safe manifest for the kind. */
|
|
22
|
+
manifest?: GraphNodeManifest;
|
|
23
|
+
constructor(arg?: Partial<GraphNodeModel>);
|
|
24
|
+
}
|
|
@@ -16,6 +16,8 @@ export * from "./layout/index.d.cts";
|
|
|
16
16
|
export * from "./types.d.cts";
|
|
17
17
|
export * from "./GraphRunModel.d.cts";
|
|
18
18
|
export * from "./GraphWorkflowModel.d.cts";
|
|
19
|
+
export * from "./GraphNodeModel.d.cts";
|
|
20
|
+
export * from "./GraphNodeConverters.d.cts";
|
|
19
21
|
export * from "./GraphResolution.d.cts";
|
|
20
22
|
export * from "./GraphExecutionStateMapper.d.cts";
|
|
21
23
|
export * from "./category-styles.d.cts";
|
|
@@ -16,6 +16,8 @@ export * from "./layout/index.d.mts";
|
|
|
16
16
|
export * from "./types.d.mts";
|
|
17
17
|
export * from "./GraphRunModel.d.mts";
|
|
18
18
|
export * from "./GraphWorkflowModel.d.mts";
|
|
19
|
+
export * from "./GraphNodeModel.d.mts";
|
|
20
|
+
export * from "./GraphNodeConverters.d.mts";
|
|
19
21
|
export * from "./GraphResolution.d.mts";
|
|
20
22
|
export * from "./GraphExecutionStateMapper.d.mts";
|
|
21
23
|
export * from "./category-styles.d.mts";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decaf-ts/as-graph",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Workflow document model, node catalogue and reference execution engine for Decaf graph workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -91,6 +91,9 @@
|
|
|
91
91
|
"reset": "rm -rf * && git checkout . && git pull && npm run do-install",
|
|
92
92
|
"build": "build-scripts --dev",
|
|
93
93
|
"build:prod": "build-scripts --prod",
|
|
94
|
+
"check:emitted-specifiers": "node ./scripts/check-emitted-relative-specifiers.mjs",
|
|
95
|
+
"postbuild": "npm run check:emitted-specifiers",
|
|
96
|
+
"postbuild:prod": "npm run check:emitted-specifiers",
|
|
94
97
|
"start:backend": "node ./lib/cjs/nest/graph/main.cjs",
|
|
95
98
|
"start:backend:local": "GRAPH_BACKEND_ENGINE=local node ./lib/cjs/nest/graph/main.cjs",
|
|
96
99
|
"start:backend:mastra": "GRAPH_BACKEND_ENGINE=mastra node ./lib/cjs/nest/graph/main.cjs",
|
|
@@ -140,7 +143,10 @@
|
|
|
140
143
|
"files": [
|
|
141
144
|
"lib",
|
|
142
145
|
"dist",
|
|
143
|
-
"assets"
|
|
146
|
+
"assets",
|
|
147
|
+
"!lib/cjs/workflows",
|
|
148
|
+
"!lib/esm/workflows",
|
|
149
|
+
"!lib/types/workflows"
|
|
144
150
|
],
|
|
145
151
|
"keywords": [
|
|
146
152
|
"graph",
|
|
@@ -189,7 +195,7 @@
|
|
|
189
195
|
"rxjs": "^7.8.2"
|
|
190
196
|
},
|
|
191
197
|
"devDependencies": {
|
|
192
|
-
"@decaf-ts/utils": "
|
|
198
|
+
"@decaf-ts/utils": "^1.14.0",
|
|
193
199
|
"@nestjs/testing": "^11.2.6",
|
|
194
200
|
"@types/jest": "^30.0.0",
|
|
195
201
|
"@types/node": "^24.0.0",
|