@foresthubai/workflow-core 0.3.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/LICENSE +202 -0
- package/NOTICE +14 -0
- package/README.md +63 -0
- package/dist/api/index.d.ts +7 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/workflow.d.ts +607 -0
- package/dist/api/workflow.d.ts.map +1 -0
- package/dist/api/workflow.js +6 -0
- package/dist/api/workflow.js.map +1 -0
- package/dist/channel/Channel.d.ts +10 -0
- package/dist/channel/Channel.d.ts.map +1 -0
- package/dist/channel/Channel.js +2 -0
- package/dist/channel/Channel.js.map +1 -0
- package/dist/channel/ChannelDefinition.d.ts +27 -0
- package/dist/channel/ChannelDefinition.d.ts.map +1 -0
- package/dist/channel/ChannelDefinition.js +50 -0
- package/dist/channel/ChannelDefinition.js.map +1 -0
- package/dist/channel/index.d.ts +7 -0
- package/dist/channel/index.d.ts.map +1 -0
- package/dist/channel/index.js +4 -0
- package/dist/channel/index.js.map +1 -0
- package/dist/channel/serialization.d.ts +17 -0
- package/dist/channel/serialization.d.ts.map +1 -0
- package/dist/channel/serialization.js +63 -0
- package/dist/channel/serialization.js.map +1 -0
- package/dist/deploy/index.d.ts +2 -0
- package/dist/deploy/index.d.ts.map +1 -0
- package/dist/deploy/index.js +2 -0
- package/dist/deploy/index.js.map +1 -0
- package/dist/deploy/requirements.d.ts +17 -0
- package/dist/deploy/requirements.d.ts.map +1 -0
- package/dist/deploy/requirements.js +41 -0
- package/dist/deploy/requirements.js.map +1 -0
- package/dist/diagnostics/__fixtures__/diagnosticFixtures.d.ts +28 -0
- package/dist/diagnostics/__fixtures__/diagnosticFixtures.d.ts.map +1 -0
- package/dist/diagnostics/__fixtures__/diagnosticFixtures.js +125 -0
- package/dist/diagnostics/__fixtures__/diagnosticFixtures.js.map +1 -0
- package/dist/diagnostics/diagnostics.d.ts +128 -0
- package/dist/diagnostics/diagnostics.d.ts.map +1 -0
- package/dist/diagnostics/diagnostics.js +783 -0
- package/dist/diagnostics/diagnostics.js.map +1 -0
- package/dist/diagnostics/index.d.ts +3 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/diagnostics/index.js +2 -0
- package/dist/diagnostics/index.js.map +1 -0
- package/dist/edge/Edge.d.ts +22 -0
- package/dist/edge/Edge.d.ts.map +1 -0
- package/dist/edge/Edge.js +2 -0
- package/dist/edge/Edge.js.map +1 -0
- package/dist/edge/EdgeDefinition.d.ts +10 -0
- package/dist/edge/EdgeDefinition.d.ts.map +1 -0
- package/dist/edge/EdgeDefinition.js +36 -0
- package/dist/edge/EdgeDefinition.js.map +1 -0
- package/dist/edge/EdgeType.d.ts +6 -0
- package/dist/edge/EdgeType.d.ts.map +1 -0
- package/dist/edge/EdgeType.js +7 -0
- package/dist/edge/EdgeType.js.map +1 -0
- package/dist/edge/index.d.ts +6 -0
- package/dist/edge/index.d.ts.map +1 -0
- package/dist/edge/index.js +6 -0
- package/dist/edge/index.js.map +1 -0
- package/dist/edge/serialization.d.ts +18 -0
- package/dist/edge/serialization.d.ts.map +1 -0
- package/dist/edge/serialization.js +76 -0
- package/dist/edge/serialization.js.map +1 -0
- package/dist/expression/index.d.ts +5 -0
- package/dist/expression/index.d.ts.map +1 -0
- package/dist/expression/index.js +3 -0
- package/dist/expression/index.js.map +1 -0
- package/dist/expression/parser.d.ts +14 -0
- package/dist/expression/parser.d.ts.map +1 -0
- package/dist/expression/parser.js +309 -0
- package/dist/expression/parser.js.map +1 -0
- package/dist/expression/types.d.ts +11 -0
- package/dist/expression/types.d.ts.map +1 -0
- package/dist/expression/types.js +20 -0
- package/dist/expression/types.js.map +1 -0
- package/dist/function/FunctionDeclaration.d.ts +43 -0
- package/dist/function/FunctionDeclaration.d.ts.map +1 -0
- package/dist/function/FunctionDeclaration.js +17 -0
- package/dist/function/FunctionDeclaration.js.map +1 -0
- package/dist/function/index.d.ts +4 -0
- package/dist/function/index.d.ts.map +1 -0
- package/dist/function/index.js +3 -0
- package/dist/function/index.js.map +1 -0
- package/dist/function/serialization.d.ts +20 -0
- package/dist/function/serialization.d.ts.map +1 -0
- package/dist/function/serialization.js +26 -0
- package/dist/function/serialization.js.map +1 -0
- package/dist/id/index.d.ts +7 -0
- package/dist/id/index.d.ts.map +1 -0
- package/dist/id/index.js +9 -0
- package/dist/id/index.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/memory/Memory.d.ts +12 -0
- package/dist/memory/Memory.d.ts.map +1 -0
- package/dist/memory/Memory.js +2 -0
- package/dist/memory/Memory.js.map +1 -0
- package/dist/memory/MemoryDefinition.d.ts +16 -0
- package/dist/memory/MemoryDefinition.d.ts.map +1 -0
- package/dist/memory/MemoryDefinition.js +2 -0
- package/dist/memory/MemoryDefinition.js.map +1 -0
- package/dist/memory/MemoryFileDefinition.d.ts +8 -0
- package/dist/memory/MemoryFileDefinition.d.ts.map +1 -0
- package/dist/memory/MemoryFileDefinition.js +36 -0
- package/dist/memory/MemoryFileDefinition.js.map +1 -0
- package/dist/memory/MemoryRegistry.d.ts +17 -0
- package/dist/memory/MemoryRegistry.d.ts.map +1 -0
- package/dist/memory/MemoryRegistry.js +29 -0
- package/dist/memory/MemoryRegistry.js.map +1 -0
- package/dist/memory/VectorDatabaseDefinition.d.ts +7 -0
- package/dist/memory/VectorDatabaseDefinition.d.ts.map +1 -0
- package/dist/memory/VectorDatabaseDefinition.js +20 -0
- package/dist/memory/VectorDatabaseDefinition.js.map +1 -0
- package/dist/memory/index.d.ts +9 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +6 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/serialization.d.ts +11 -0
- package/dist/memory/serialization.d.ts.map +1 -0
- package/dist/memory/serialization.js +44 -0
- package/dist/memory/serialization.js.map +1 -0
- package/dist/migration/index.d.ts +5 -0
- package/dist/migration/index.d.ts.map +1 -0
- package/dist/migration/index.js +4 -0
- package/dist/migration/index.js.map +1 -0
- package/dist/migration/migrate.d.ts +11 -0
- package/dist/migration/migrate.d.ts.map +1 -0
- package/dist/migration/migrate.js +52 -0
- package/dist/migration/migrate.js.map +1 -0
- package/dist/migration/migrations.d.ts +22 -0
- package/dist/migration/migrations.d.ts.map +1 -0
- package/dist/migration/migrations.js +10 -0
- package/dist/migration/migrations.js.map +1 -0
- package/dist/migration/version.d.ts +9 -0
- package/dist/migration/version.d.ts.map +1 -0
- package/dist/migration/version.js +9 -0
- package/dist/migration/version.js.map +1 -0
- package/dist/model/LLMModelDefinition.d.ts +7 -0
- package/dist/model/LLMModelDefinition.d.ts.map +1 -0
- package/dist/model/LLMModelDefinition.js +11 -0
- package/dist/model/LLMModelDefinition.js.map +1 -0
- package/dist/model/Model.d.ts +21 -0
- package/dist/model/Model.d.ts.map +1 -0
- package/dist/model/Model.js +15 -0
- package/dist/model/Model.js.map +1 -0
- package/dist/model/ModelDefinition.d.ts +15 -0
- package/dist/model/ModelDefinition.d.ts.map +1 -0
- package/dist/model/ModelDefinition.js +2 -0
- package/dist/model/ModelDefinition.js.map +1 -0
- package/dist/model/ModelRegistry.d.ts +17 -0
- package/dist/model/ModelRegistry.d.ts.map +1 -0
- package/dist/model/ModelRegistry.js +27 -0
- package/dist/model/ModelRegistry.js.map +1 -0
- package/dist/model/index.d.ts +8 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/index.js +5 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/serialization.d.ts +8 -0
- package/dist/model/serialization.d.ts.map +1 -0
- package/dist/model/serialization.js +25 -0
- package/dist/model/serialization.js.map +1 -0
- package/dist/node/AgentNode.d.ts +21 -0
- package/dist/node/AgentNode.d.ts.map +1 -0
- package/dist/node/AgentNode.js +60 -0
- package/dist/node/AgentNode.js.map +1 -0
- package/dist/node/DataNode.d.ts +14 -0
- package/dist/node/DataNode.d.ts.map +1 -0
- package/dist/node/DataNode.js +26 -0
- package/dist/node/DataNode.js.map +1 -0
- package/dist/node/FunctionNode.d.ts +24 -0
- package/dist/node/FunctionNode.d.ts.map +1 -0
- package/dist/node/FunctionNode.js +44 -0
- package/dist/node/FunctionNode.js.map +1 -0
- package/dist/node/InputNode.d.ts +46 -0
- package/dist/node/InputNode.d.ts.map +1 -0
- package/dist/node/InputNode.js +133 -0
- package/dist/node/InputNode.js.map +1 -0
- package/dist/node/LogicNode.d.ts +13 -0
- package/dist/node/LogicNode.d.ts.map +1 -0
- package/dist/node/LogicNode.js +19 -0
- package/dist/node/LogicNode.js.map +1 -0
- package/dist/node/MqttNode.d.ts +27 -0
- package/dist/node/MqttNode.d.ts.map +1 -0
- package/dist/node/MqttNode.js +96 -0
- package/dist/node/MqttNode.js.map +1 -0
- package/dist/node/Node.d.ts +49 -0
- package/dist/node/Node.d.ts.map +1 -0
- package/dist/node/Node.js +9 -0
- package/dist/node/Node.js.map +1 -0
- package/dist/node/NodeDefinition.d.ts +30 -0
- package/dist/node/NodeDefinition.d.ts.map +1 -0
- package/dist/node/NodeDefinition.js +2 -0
- package/dist/node/NodeDefinition.js.map +1 -0
- package/dist/node/NodeRegistry.d.ts +19 -0
- package/dist/node/NodeRegistry.d.ts.map +1 -0
- package/dist/node/NodeRegistry.js +65 -0
- package/dist/node/NodeRegistry.js.map +1 -0
- package/dist/node/OutputNode.d.ts +23 -0
- package/dist/node/OutputNode.d.ts.map +1 -0
- package/dist/node/OutputNode.js +62 -0
- package/dist/node/OutputNode.js.map +1 -0
- package/dist/node/ToolNode.d.ts +12 -0
- package/dist/node/ToolNode.d.ts.map +1 -0
- package/dist/node/ToolNode.js +18 -0
- package/dist/node/ToolNode.js.map +1 -0
- package/dist/node/TriggerNode.d.ts +67 -0
- package/dist/node/TriggerNode.d.ts.map +1 -0
- package/dist/node/TriggerNode.js +172 -0
- package/dist/node/TriggerNode.js.map +1 -0
- package/dist/node/constants.d.ts +16 -0
- package/dist/node/constants.d.ts.map +1 -0
- package/dist/node/constants.js +18 -0
- package/dist/node/constants.js.map +1 -0
- package/dist/node/index.d.ts +12 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +9 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/methods.d.ts +73 -0
- package/dist/node/methods.d.ts.map +1 -0
- package/dist/node/methods.js +261 -0
- package/dist/node/methods.js.map +1 -0
- package/dist/node/serialization.d.ts +25 -0
- package/dist/node/serialization.d.ts.map +1 -0
- package/dist/node/serialization.js +525 -0
- package/dist/node/serialization.js.map +1 -0
- package/dist/parameter/OutputParameter.d.ts +69 -0
- package/dist/parameter/OutputParameter.d.ts.map +1 -0
- package/dist/parameter/OutputParameter.js +6 -0
- package/dist/parameter/OutputParameter.js.map +1 -0
- package/dist/parameter/Parameter.d.ts +152 -0
- package/dist/parameter/Parameter.d.ts.map +1 -0
- package/dist/parameter/Parameter.js +86 -0
- package/dist/parameter/Parameter.js.map +1 -0
- package/dist/parameter/index.d.ts +5 -0
- package/dist/parameter/index.d.ts.map +1 -0
- package/dist/parameter/index.js +3 -0
- package/dist/parameter/index.js.map +1 -0
- package/dist/variable/Variable.d.ts +25 -0
- package/dist/variable/Variable.d.ts.map +1 -0
- package/dist/variable/Variable.js +2 -0
- package/dist/variable/Variable.js.map +1 -0
- package/dist/variable/index.d.ts +3 -0
- package/dist/variable/index.d.ts.map +1 -0
- package/dist/variable/index.js +5 -0
- package/dist/variable/index.js.map +1 -0
- package/dist/variable/operations.d.ts +37 -0
- package/dist/variable/operations.d.ts.map +1 -0
- package/dist/variable/operations.js +88 -0
- package/dist/variable/operations.js.map +1 -0
- package/dist/workflow/Workflow.d.ts +38 -0
- package/dist/workflow/Workflow.d.ts.map +1 -0
- package/dist/workflow/Workflow.js +8 -0
- package/dist/workflow/Workflow.js.map +1 -0
- package/dist/workflow/index.d.ts +4 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +3 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/serialization.d.ts +43 -0
- package/dist/workflow/serialization.d.ts.map +1 -0
- package/dist/workflow/serialization.js +215 -0
- package/dist/workflow/serialization.js.map +1 -0
- package/package.json +105 -0
- package/src/api/index.ts +11 -0
- package/src/api/workflow.ts +607 -0
- package/src/channel/Channel.ts +11 -0
- package/src/channel/ChannelDefinition.ts +76 -0
- package/src/channel/index.ts +6 -0
- package/src/channel/serialization.ts +68 -0
- package/src/deploy/index.ts +1 -0
- package/src/deploy/requirements.test.ts +61 -0
- package/src/deploy/requirements.ts +41 -0
- package/src/diagnostics/__fixtures__/diagnosticFixtures.ts +158 -0
- package/src/diagnostics/diagnostics.test.ts +878 -0
- package/src/diagnostics/diagnostics.ts +936 -0
- package/src/diagnostics/index.ts +11 -0
- package/src/edge/Edge.ts +23 -0
- package/src/edge/EdgeDefinition.ts +45 -0
- package/src/edge/EdgeType.ts +19 -0
- package/src/edge/index.ts +8 -0
- package/src/edge/serialization.ts +83 -0
- package/src/expression/index.ts +4 -0
- package/src/expression/parser.ts +362 -0
- package/src/expression/types.ts +30 -0
- package/src/function/FunctionDeclaration.ts +54 -0
- package/src/function/index.ts +3 -0
- package/src/function/serialization.ts +40 -0
- package/src/globals.d.ts +9 -0
- package/src/id/index.ts +8 -0
- package/src/index.ts +22 -0
- package/src/memory/Memory.ts +15 -0
- package/src/memory/MemoryDefinition.ts +16 -0
- package/src/memory/MemoryFileDefinition.ts +37 -0
- package/src/memory/MemoryRegistry.ts +35 -0
- package/src/memory/VectorDatabaseDefinition.ts +21 -0
- package/src/memory/index.ts +8 -0
- package/src/memory/serialization.ts +47 -0
- package/src/migration/index.ts +4 -0
- package/src/migration/migrate.test.ts +44 -0
- package/src/migration/migrate.ts +58 -0
- package/src/migration/migrations.ts +24 -0
- package/src/migration/version.ts +9 -0
- package/src/model/LLMModelDefinition.ts +12 -0
- package/src/model/Model.ts +39 -0
- package/src/model/ModelDefinition.ts +15 -0
- package/src/model/ModelRegistry.ts +33 -0
- package/src/model/index.ts +7 -0
- package/src/model/serialization.ts +30 -0
- package/src/node/AgentNode.ts +82 -0
- package/src/node/DataNode.ts +41 -0
- package/src/node/FunctionNode.ts +76 -0
- package/src/node/InputNode.ts +185 -0
- package/src/node/LogicNode.ts +33 -0
- package/src/node/MqttNode.ts +127 -0
- package/src/node/Node.ts +61 -0
- package/src/node/NodeDefinition.ts +37 -0
- package/src/node/NodeRegistry.ts +85 -0
- package/src/node/OutputNode.ts +87 -0
- package/src/node/ToolNode.ts +32 -0
- package/src/node/TriggerNode.ts +272 -0
- package/src/node/constants.ts +16 -0
- package/src/node/index.ts +26 -0
- package/src/node/methods.ts +278 -0
- package/src/node/serialization.ts +544 -0
- package/src/parameter/OutputParameter.ts +68 -0
- package/src/parameter/Parameter.ts +243 -0
- package/src/parameter/index.ts +33 -0
- package/src/variable/Variable.ts +10 -0
- package/src/variable/index.ts +16 -0
- package/src/variable/operations.ts +106 -0
- package/src/workflow/Workflow.ts +41 -0
- package/src/workflow/index.ts +3 -0
- package/src/workflow/serialization.test.ts +240 -0
- package/src/workflow/serialization.ts +242 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MemoryDefinition } from "./MemoryDefinition";
|
|
2
|
+
/**
|
|
3
|
+
* Agent-scoped durable text storage. The instance `label` (edited like a channel
|
|
4
|
+
* label) is the identifier the LLM sees in tool calls, so it is not a parameter.
|
|
5
|
+
* The config panel renders these parameters via ParameterEditor, same as channels.
|
|
6
|
+
*/
|
|
7
|
+
export declare const MemoryFileDefinition: MemoryDefinition;
|
|
8
|
+
//# sourceMappingURL=MemoryFileDefinition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemoryFileDefinition.d.ts","sourceRoot":"","sources":["../../src/memory/MemoryFileDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,gBA6BlC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent-scoped durable text storage. The instance `label` (edited like a channel
|
|
3
|
+
* label) is the identifier the LLM sees in tool calls, so it is not a parameter.
|
|
4
|
+
* The config panel renders these parameters via ParameterEditor, same as channels.
|
|
5
|
+
*/
|
|
6
|
+
export const MemoryFileDefinition = {
|
|
7
|
+
type: "MemoryFile",
|
|
8
|
+
label: "Memory File",
|
|
9
|
+
description: "Durable text storage an agent can read and write",
|
|
10
|
+
parameters: [
|
|
11
|
+
{
|
|
12
|
+
id: "description",
|
|
13
|
+
label: "Description",
|
|
14
|
+
description: "What this memory file is for (shown to the LLM as tool description)",
|
|
15
|
+
type: "string",
|
|
16
|
+
multiline: true,
|
|
17
|
+
optional: true,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "content",
|
|
21
|
+
label: "Initial Content",
|
|
22
|
+
description: "Seed content written on fresh deploy; existing rows keep their content on redeploy",
|
|
23
|
+
type: "string",
|
|
24
|
+
multiline: true,
|
|
25
|
+
optional: true,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: "maxSizeBytes",
|
|
29
|
+
label: "Max Size (bytes)",
|
|
30
|
+
description: "Byte cap on writes; leave empty for unlimited",
|
|
31
|
+
type: "int",
|
|
32
|
+
optional: true,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=MemoryFileDefinition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemoryFileDefinition.js","sourceRoot":"","sources":["../../src/memory/MemoryFileDefinition.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAqB;IACpD,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,kDAAkD;IAC/D,UAAU,EAAE;QACV;YACE,EAAE,EAAE,aAAa;YACjB,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,qEAAqE;YAClF,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,IAAI;SACf;QACD;YACE,EAAE,EAAE,SAAS;YACb,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,oFAAoF;YACjG,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,IAAI;SACf;QACD;YACE,EAAE,EAAE,cAAc;YAClB,KAAK,EAAE,kBAAkB;YACzB,WAAW,EAAE,+CAA+C;YAC5D,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MemoryType } from "./Memory";
|
|
2
|
+
import type { MemoryDefinition } from "./MemoryDefinition";
|
|
3
|
+
/**
|
|
4
|
+
* Central registry for memory variant definitions (one per MemoryType).
|
|
5
|
+
* Mirrors NodeRegistry.
|
|
6
|
+
*/
|
|
7
|
+
declare class MemoryDefinitionRegistry {
|
|
8
|
+
private memories;
|
|
9
|
+
private initialized;
|
|
10
|
+
initialize(): void;
|
|
11
|
+
private register;
|
|
12
|
+
getAll(): MemoryDefinition[];
|
|
13
|
+
getByType(type: MemoryType): MemoryDefinition | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare const MemoryRegistry: MemoryDefinitionRegistry;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=MemoryRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemoryRegistry.d.ts","sourceRoot":"","sources":["../../src/memory/MemoryRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D;;;GAGG;AACH,cAAM,wBAAwB;IAC5B,OAAO,CAAC,QAAQ,CAAgD;IAChE,OAAO,CAAC,WAAW,CAAS;IAE5B,UAAU;IAOV,OAAO,CAAC,QAAQ;IAIhB,MAAM,IAAI,gBAAgB,EAAE;IAI5B,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,gBAAgB,GAAG,SAAS;CAG1D;AAED,eAAO,MAAM,cAAc,0BAAiC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MemoryFileDefinition } from "./MemoryFileDefinition";
|
|
2
|
+
import { VectorDatabaseDefinition } from "./VectorDatabaseDefinition";
|
|
3
|
+
/**
|
|
4
|
+
* Central registry for memory variant definitions (one per MemoryType).
|
|
5
|
+
* Mirrors NodeRegistry.
|
|
6
|
+
*/
|
|
7
|
+
class MemoryDefinitionRegistry {
|
|
8
|
+
memories = new Map();
|
|
9
|
+
initialized = false;
|
|
10
|
+
initialize() {
|
|
11
|
+
if (this.initialized)
|
|
12
|
+
return;
|
|
13
|
+
this.register(MemoryFileDefinition);
|
|
14
|
+
this.register(VectorDatabaseDefinition);
|
|
15
|
+
this.initialized = true;
|
|
16
|
+
}
|
|
17
|
+
register(definition) {
|
|
18
|
+
this.memories.set(definition.type, definition);
|
|
19
|
+
}
|
|
20
|
+
getAll() {
|
|
21
|
+
return Array.from(this.memories.values());
|
|
22
|
+
}
|
|
23
|
+
getByType(type) {
|
|
24
|
+
return this.memories.get(type);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export const MemoryRegistry = new MemoryDefinitionRegistry();
|
|
28
|
+
MemoryRegistry.initialize();
|
|
29
|
+
//# sourceMappingURL=MemoryRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MemoryRegistry.js","sourceRoot":"","sources":["../../src/memory/MemoryRegistry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;;GAGG;AACH,MAAM,wBAAwB;IACpB,QAAQ,GAAsC,IAAI,GAAG,EAAE,CAAC;IACxD,WAAW,GAAG,KAAK,CAAC;IAE5B,UAAU;QACR,IAAI,IAAI,CAAC,WAAW;YAAE,OAAO;QAC7B,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;QACpC,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;QACxC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;IAEO,QAAQ,CAAC,UAA4B;QAC3C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACjD,CAAC;IAED,MAAM;QACJ,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,SAAS,CAAC,IAAgB;QACxB,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,wBAAwB,EAAE,CAAC;AAC7D,cAAc,CAAC,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MemoryDefinition } from "./MemoryDefinition";
|
|
2
|
+
/**
|
|
3
|
+
* RAG knowledge base referenced from Retriever nodes. Only descriptive config
|
|
4
|
+
* lives here; the backend collection it binds to is supplied at deploy time.
|
|
5
|
+
*/
|
|
6
|
+
export declare const VectorDatabaseDefinition: MemoryDefinition;
|
|
7
|
+
//# sourceMappingURL=VectorDatabaseDefinition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorDatabaseDefinition.d.ts","sourceRoot":"","sources":["../../src/memory/VectorDatabaseDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,gBActC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RAG knowledge base referenced from Retriever nodes. Only descriptive config
|
|
3
|
+
* lives here; the backend collection it binds to is supplied at deploy time.
|
|
4
|
+
*/
|
|
5
|
+
export const VectorDatabaseDefinition = {
|
|
6
|
+
type: "VectorDatabase",
|
|
7
|
+
label: "Vector Database",
|
|
8
|
+
description: "RAG knowledge base that Retriever nodes can query",
|
|
9
|
+
parameters: [
|
|
10
|
+
{
|
|
11
|
+
id: "description",
|
|
12
|
+
label: "Description",
|
|
13
|
+
description: "What this knowledge base contains",
|
|
14
|
+
type: "string",
|
|
15
|
+
multiline: true,
|
|
16
|
+
optional: true,
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=VectorDatabaseDefinition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VectorDatabaseDefinition.js","sourceRoot":"","sources":["../../src/memory/VectorDatabaseDefinition.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAqB;IACxD,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,iBAAiB;IACxB,WAAW,EAAE,mDAAmD;IAChE,UAAU,EAAE;QACV;YACE,EAAE,EAAE,aAAa;YACjB,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,mCAAmC;YAChD,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,IAAI;YACf,QAAQ,EAAE,IAAI;SACf;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { MemoryType, Memory, MemoryRef } from "./Memory";
|
|
2
|
+
export { ALL_MEMORY_TYPES } from "./Memory";
|
|
3
|
+
export type { MemoryDefinition } from "./MemoryDefinition";
|
|
4
|
+
export { MemoryFileDefinition } from "./MemoryFileDefinition";
|
|
5
|
+
export { VectorDatabaseDefinition } from "./VectorDatabaseDefinition";
|
|
6
|
+
export { MemoryRegistry } from "./MemoryRegistry";
|
|
7
|
+
export { serialize, deserialize } from "./serialization";
|
|
8
|
+
export type { ApiMemory } from "./serialization";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/memory/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ALL_MEMORY_TYPES } from "./Memory";
|
|
2
|
+
export { MemoryFileDefinition } from "./MemoryFileDefinition";
|
|
3
|
+
export { VectorDatabaseDefinition } from "./VectorDatabaseDefinition";
|
|
4
|
+
export { MemoryRegistry } from "./MemoryRegistry";
|
|
5
|
+
export { serialize, deserialize } from "./serialization";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/memory/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Schemas } from "../api";
|
|
2
|
+
import type { Memory } from "./Memory";
|
|
3
|
+
export type ApiMemory = Schemas["Memory"];
|
|
4
|
+
/**
|
|
5
|
+
* Serialize a domain Memory to the API discriminated-union shape.
|
|
6
|
+
* MemoryFile drops `maxSizeBytes` when unset (absent and null both mean "unlimited").
|
|
7
|
+
*/
|
|
8
|
+
export declare function serialize(mem: Memory): ApiMemory;
|
|
9
|
+
/** Convert an API Memory into a domain Memory. */
|
|
10
|
+
export declare function deserialize(api: ApiMemory): Memory;
|
|
11
|
+
//# sourceMappingURL=serialization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../../src/memory/serialization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAoBhD;AAED,kDAAkD;AAClD,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAclD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serialize a domain Memory to the API discriminated-union shape.
|
|
3
|
+
* MemoryFile drops `maxSizeBytes` when unset (absent and null both mean "unlimited").
|
|
4
|
+
*/
|
|
5
|
+
export function serialize(mem) {
|
|
6
|
+
const { id, label, type, arguments: args } = mem;
|
|
7
|
+
switch (type) {
|
|
8
|
+
case "MemoryFile":
|
|
9
|
+
return {
|
|
10
|
+
type,
|
|
11
|
+
id,
|
|
12
|
+
label,
|
|
13
|
+
description: args.description ?? "",
|
|
14
|
+
content: args.content ?? "",
|
|
15
|
+
...(args.maxSizeBytes != null ? { maxSizeBytes: args.maxSizeBytes } : {}),
|
|
16
|
+
};
|
|
17
|
+
case "VectorDatabase":
|
|
18
|
+
return {
|
|
19
|
+
type,
|
|
20
|
+
id,
|
|
21
|
+
label,
|
|
22
|
+
...(args.description != null ? { description: args.description } : {}),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/** Convert an API Memory into a domain Memory. */
|
|
27
|
+
export function deserialize(api) {
|
|
28
|
+
const { id, label, type } = api;
|
|
29
|
+
const args = {};
|
|
30
|
+
switch (type) {
|
|
31
|
+
case "MemoryFile":
|
|
32
|
+
args.description = api.description ?? "";
|
|
33
|
+
args.content = api.content ?? "";
|
|
34
|
+
if (api.maxSizeBytes != null)
|
|
35
|
+
args.maxSizeBytes = api.maxSizeBytes;
|
|
36
|
+
break;
|
|
37
|
+
case "VectorDatabase":
|
|
38
|
+
if (api.description != null)
|
|
39
|
+
args.description = api.description;
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
return { id, label, type, arguments: args };
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=serialization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialization.js","sourceRoot":"","sources":["../../src/memory/serialization.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC;IACjD,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,YAAY;YACf,OAAO;gBACL,IAAI;gBACJ,EAAE;gBACF,KAAK;gBACL,WAAW,EAAG,IAAI,CAAC,WAAsB,IAAI,EAAE;gBAC/C,OAAO,EAAG,IAAI,CAAC,OAAkB,IAAI,EAAE;gBACvC,GAAG,CAAC,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,IAAI,CAAC,YAAsB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACpF,CAAC;QACJ,KAAK,gBAAgB;YACnB,OAAO;gBACL,IAAI;gBACJ,EAAE;gBACF,KAAK;gBACL,GAAG,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAqB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACjF,CAAC;IACN,CAAC;AACH,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,WAAW,CAAC,GAAc;IACxC,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC;IAChC,MAAM,IAAI,GAA4B,EAAE,CAAC;IACzC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,YAAY;YACf,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC;YACzC,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;YACjC,IAAI,GAAG,CAAC,YAAY,IAAI,IAAI;gBAAE,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;YACnE,MAAM;QACR,KAAK,gBAAgB;YACnB,IAAI,GAAG,CAAC,WAAW,IAAI,IAAI;gBAAE,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;YAChE,MAAM;IACV,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ApiWorkflow } from "../workflow/Workflow";
|
|
2
|
+
/** Read the schema version, defaulting absent/invalid to the baseline. */
|
|
3
|
+
export declare function readSchemaVersion(doc: Record<string, unknown>): number;
|
|
4
|
+
/**
|
|
5
|
+
* Upgrade a raw, parsed workflow document to CURRENT_SCHEMA_VERSION and return
|
|
6
|
+
* it as the current {@link ApiWorkflow}, ready for `deserialize`. Runs on
|
|
7
|
+
* untyped JSON so each migration stays pinned to the shape it was written for.
|
|
8
|
+
* Throws on a non-object, or a version newer than this build supports.
|
|
9
|
+
*/
|
|
10
|
+
export declare function migrate(raw: unknown): ApiWorkflow;
|
|
11
|
+
//# sourceMappingURL=migrate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.d.ts","sourceRoot":"","sources":["../../src/migration/migrate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AA4BxD,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAGtE;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,WAAW,CAiBjD"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { MIGRATIONS } from "./migrations";
|
|
2
|
+
import { BASELINE_SCHEMA_VERSION, CURRENT_SCHEMA_VERSION } from "./version";
|
|
3
|
+
/**
|
|
4
|
+
* Index the registry by `from` and assert it forms a contiguous chain over
|
|
5
|
+
* [BASELINE_SCHEMA_VERSION, CURRENT_SCHEMA_VERSION). A gap or duplicate is a
|
|
6
|
+
* programming error, so it throws at module load rather than on first use.
|
|
7
|
+
*/
|
|
8
|
+
function buildChain(migrations) {
|
|
9
|
+
const byFrom = new Map();
|
|
10
|
+
for (const m of migrations) {
|
|
11
|
+
if (!Number.isInteger(m.from) || m.from < BASELINE_SCHEMA_VERSION || m.from >= CURRENT_SCHEMA_VERSION) {
|
|
12
|
+
throw new Error(`[migration] from must be an integer in [${BASELINE_SCHEMA_VERSION}, ${CURRENT_SCHEMA_VERSION}), got ${m.from}`);
|
|
13
|
+
}
|
|
14
|
+
if (byFrom.has(m.from)) {
|
|
15
|
+
throw new Error(`[migration] duplicate migration from ${m.from}`);
|
|
16
|
+
}
|
|
17
|
+
byFrom.set(m.from, m);
|
|
18
|
+
}
|
|
19
|
+
for (let v = BASELINE_SCHEMA_VERSION; v < CURRENT_SCHEMA_VERSION; v++) {
|
|
20
|
+
if (!byFrom.has(v))
|
|
21
|
+
throw new Error(`[migration] missing migration from ${v} -> ${v + 1}`);
|
|
22
|
+
}
|
|
23
|
+
return byFrom;
|
|
24
|
+
}
|
|
25
|
+
const CHAIN = buildChain(MIGRATIONS);
|
|
26
|
+
/** Read the schema version, defaulting absent/invalid to the baseline. */
|
|
27
|
+
export function readSchemaVersion(doc) {
|
|
28
|
+
const v = doc.schemaVersion;
|
|
29
|
+
return typeof v === "number" && Number.isInteger(v) && v >= BASELINE_SCHEMA_VERSION ? v : BASELINE_SCHEMA_VERSION;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Upgrade a raw, parsed workflow document to CURRENT_SCHEMA_VERSION and return
|
|
33
|
+
* it as the current {@link ApiWorkflow}, ready for `deserialize`. Runs on
|
|
34
|
+
* untyped JSON so each migration stays pinned to the shape it was written for.
|
|
35
|
+
* Throws on a non-object, or a version newer than this build supports.
|
|
36
|
+
*/
|
|
37
|
+
export function migrate(raw) {
|
|
38
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) {
|
|
39
|
+
throw new Error("[migration] workflow document must be a JSON object");
|
|
40
|
+
}
|
|
41
|
+
let doc = { ...raw };
|
|
42
|
+
const version = readSchemaVersion(doc);
|
|
43
|
+
if (version > CURRENT_SCHEMA_VERSION) {
|
|
44
|
+
throw new Error(`[migration] schemaVersion ${version} is newer than this build supports (${CURRENT_SCHEMA_VERSION})`);
|
|
45
|
+
}
|
|
46
|
+
for (let v = version; v < CURRENT_SCHEMA_VERSION; v++) {
|
|
47
|
+
doc = CHAIN.get(v).migrate(doc); // non-null: buildChain covers every v in range
|
|
48
|
+
}
|
|
49
|
+
doc.schemaVersion = CURRENT_SCHEMA_VERSION;
|
|
50
|
+
return doc;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=migrate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/migration/migrate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAkB,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAE5E;;;;GAIG;AACH,SAAS,UAAU,CAAC,UAAgC;IAClD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAqB,CAAC;IAC5C,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,uBAAuB,IAAI,CAAC,CAAC,IAAI,IAAI,sBAAsB,EAAE,CAAC;YACtG,MAAM,IAAI,KAAK,CAAC,2CAA2C,uBAAuB,KAAK,sBAAsB,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QACnI,CAAC;QACD,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QACpE,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IACxB,CAAC;IACD,KAAK,IAAI,CAAC,GAAG,uBAAuB,EAAE,CAAC,GAAG,sBAAsB,EAAE,CAAC,EAAE,EAAE,CAAC;QACtE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,KAAK,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AAErC,0EAA0E;AAC1E,MAAM,UAAU,iBAAiB,CAAC,GAA4B;IAC5D,MAAM,CAAC,GAAG,GAAG,CAAC,aAAa,CAAC;IAC5B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC;AACpH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CAAC,GAAY;IAClC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAClE,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IACD,IAAI,GAAG,GAA4B,EAAE,GAAI,GAA+B,EAAE,CAAC;IAE3E,MAAM,OAAO,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,OAAO,GAAG,sBAAsB,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CAAC,6BAA6B,OAAO,uCAAuC,sBAAsB,GAAG,CAAC,CAAC;IACxH,CAAC;IAED,KAAK,IAAI,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,sBAAsB,EAAE,CAAC,EAAE,EAAE,CAAC;QACtD,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,+CAA+C;IACnF,CAAC;IAED,GAAG,CAAC,aAAa,GAAG,sBAAsB,CAAC;IAC3C,OAAO,GAAkB,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single-step upgrade of the persisted workflow format, from `from` to
|
|
3
|
+
* `from + 1`. Operates on the raw parsed document, never the domain types.
|
|
4
|
+
* Forward-only: there is no down-path.
|
|
5
|
+
*
|
|
6
|
+
* A shipped migration is immutable — saved files depend on its exact behaviour.
|
|
7
|
+
* Express the next change as a new migration, never an edit to an old one.
|
|
8
|
+
*/
|
|
9
|
+
export interface Migration {
|
|
10
|
+
/** Schema version this migration expects as input. Produces `from + 1`. */
|
|
11
|
+
readonly from: number;
|
|
12
|
+
/** Pure transform on the raw document; must not mutate its input. */
|
|
13
|
+
migrate(doc: Record<string, unknown>): Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Ordered registry of single-step format migrations. To change the format:
|
|
17
|
+
* bump CURRENT_SCHEMA_VERSION, append one migration with `from` set to the
|
|
18
|
+
* previous value, and reconcile serialize/deserialize. {@link migrate} asserts
|
|
19
|
+
* at load that the chain is contiguous over [BASELINE, CURRENT).
|
|
20
|
+
*/
|
|
21
|
+
export declare const MIGRATIONS: readonly Migration[];
|
|
22
|
+
//# sourceMappingURL=migrations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/migration/migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,WAAW,SAAS;IACxB,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qEAAqE;IACrE,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChE;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,SAAS,EAE1C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ordered registry of single-step format migrations. To change the format:
|
|
3
|
+
* bump CURRENT_SCHEMA_VERSION, append one migration with `from` set to the
|
|
4
|
+
* previous value, and reconcile serialize/deserialize. {@link migrate} asserts
|
|
5
|
+
* at load that the chain is contiguous over [BASELINE, CURRENT).
|
|
6
|
+
*/
|
|
7
|
+
export const MIGRATIONS = [
|
|
8
|
+
// First entry will be `{ from: 1, migrate: (doc) => ... }`.
|
|
9
|
+
];
|
|
10
|
+
//# sourceMappingURL=migrations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrations.js","sourceRoot":"","sources":["../../src/migration/migrations.ts"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAyB;AAC9C,4DAA4D;CAC7D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persisted-format version this build reads and writes. A plain monotonic
|
|
3
|
+
* integer, decoupled from the contract/package semver. Bump only when the
|
|
4
|
+
* serialized {@link ApiWorkflow} shape changes, adding a matching migration.
|
|
5
|
+
*/
|
|
6
|
+
export declare const CURRENT_SCHEMA_VERSION = 1;
|
|
7
|
+
/** Version assumed for documents that carry no `schemaVersion`. */
|
|
8
|
+
export declare const BASELINE_SCHEMA_VERSION = 1;
|
|
9
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/migration/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAExC,mEAAmE;AACnE,eAAO,MAAM,uBAAuB,IAAI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persisted-format version this build reads and writes. A plain monotonic
|
|
3
|
+
* integer, decoupled from the contract/package semver. Bump only when the
|
|
4
|
+
* serialized {@link ApiWorkflow} shape changes, adding a matching migration.
|
|
5
|
+
*/
|
|
6
|
+
export const CURRENT_SCHEMA_VERSION = 1;
|
|
7
|
+
/** Version assumed for documents that carry no `schemaVersion`. */
|
|
8
|
+
export const BASELINE_SCHEMA_VERSION = 1;
|
|
9
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/migration/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAExC,mEAAmE;AACnE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ModelDefinition } from "./ModelDefinition";
|
|
2
|
+
/**
|
|
3
|
+
* A declared custom/self-hosted LLM model.
|
|
4
|
+
* Capabilities default to ["chat"] on serialize; a capability editor can be added later.
|
|
5
|
+
*/
|
|
6
|
+
export declare const LLMModelDefinition: ModelDefinition;
|
|
7
|
+
//# sourceMappingURL=LLMModelDefinition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LLMModelDefinition.d.ts","sourceRoot":"","sources":["../../src/model/LLMModelDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,eAKhC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A declared custom/self-hosted LLM model.
|
|
3
|
+
* Capabilities default to ["chat"] on serialize; a capability editor can be added later.
|
|
4
|
+
*/
|
|
5
|
+
export const LLMModelDefinition = {
|
|
6
|
+
type: "LLMModel",
|
|
7
|
+
label: "Custom LLM Model",
|
|
8
|
+
description: "A self-hosted or custom LLM the llmproxy doesn't ship by default",
|
|
9
|
+
parameters: [],
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=LLMModelDefinition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LLMModelDefinition.js","sourceRoot":"","sources":["../../src/model/LLMModelDefinition.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAoB;IACjD,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,kEAAkE;IAC/E,UAAU,EAAE,EAAE;CACf,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Schemas } from "../api";
|
|
2
|
+
/** A capability a model supports (chat, embedding, vision, ...). From the api. */
|
|
3
|
+
export type ModelCapability = Schemas["ModelCapability"];
|
|
4
|
+
export type ModelType = "LLMModel";
|
|
5
|
+
export declare const ALL_MODEL_TYPES: ModelType[];
|
|
6
|
+
export interface Model {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
type: ModelType;
|
|
10
|
+
arguments: Record<string, unknown>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* One entry in the static model catalog handed to the builder via props. The
|
|
14
|
+
* embedder maps the llmproxy's richer ModelInfo down to this minimal shape.
|
|
15
|
+
*/
|
|
16
|
+
export interface ModelInfo {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
capabilities: ModelCapability[];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=Model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Model.d.ts","sourceRoot":"","sources":["../../src/model/Model.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC,kFAAkF;AAClF,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEzD,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC;AAEnC,eAAO,MAAM,eAAe,EAAE,SAAS,EAAiB,CAAC;AAEzD,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,eAAe,EAAE,CAAC;CACjC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Domain Model — covers two distinct things that share a picker:
|
|
2
|
+
// 1. The STATIC catalog (ModelInfo[]): the set of models the llmproxy already
|
|
3
|
+
// supports. Supplied to the editor as data (props), not declared per-workflow.
|
|
4
|
+
// A node simply stores the chosen catalog ModelID directly.
|
|
5
|
+
// 2. DECLARED custom models (Model): self-hosted / custom models the
|
|
6
|
+
// llmproxy doesn't ship. These are channel-like — declared in the workflow,
|
|
7
|
+
// referenced by id from nodes, and mapped to an llmproxy provider at deploy.
|
|
8
|
+
//
|
|
9
|
+
// A node's `model` field is always just a ModelID string either way; static ids
|
|
10
|
+
// resolve via the catalog (no mapping), custom ids via a declared Model.
|
|
11
|
+
//
|
|
12
|
+
// `type` is the api discriminator; new model families (e.g. future YOLO/ONNX
|
|
13
|
+
// variants) register their own definition in ModelRegistry, mirroring nodes.
|
|
14
|
+
export const ALL_MODEL_TYPES = ["LLMModel"];
|
|
15
|
+
//# sourceMappingURL=Model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Model.js","sourceRoot":"","sources":["../../src/model/Model.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,gFAAgF;AAChF,oFAAoF;AACpF,iEAAiE;AACjE,uEAAuE;AACvE,iFAAiF;AACjF,kFAAkF;AAClF,EAAE;AACF,gFAAgF;AAChF,yEAAyE;AACzE,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAS7E,MAAM,CAAC,MAAM,eAAe,GAAgB,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Parameter } from "../parameter";
|
|
2
|
+
import type { ModelType } from "./Model";
|
|
3
|
+
/**
|
|
4
|
+
* Static, per-type metadata for a declared (custom) model variant. Mirrors
|
|
5
|
+
* MemoryDefinition / NodeDefinition: one definition object per ModelType,
|
|
6
|
+
* registered in ModelRegistry. `label` is a top-level instance field (edited
|
|
7
|
+
* like a channel label), so it is never a parameter here.
|
|
8
|
+
*/
|
|
9
|
+
export interface ModelDefinition {
|
|
10
|
+
type: ModelType;
|
|
11
|
+
label: string;
|
|
12
|
+
description: string;
|
|
13
|
+
parameters: Parameter[];
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=ModelDefinition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelDefinition.d.ts","sourceRoot":"","sources":["../../src/model/ModelDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelDefinition.js","sourceRoot":"","sources":["../../src/model/ModelDefinition.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ModelType } from "./Model";
|
|
2
|
+
import type { ModelDefinition } from "./ModelDefinition";
|
|
3
|
+
/**
|
|
4
|
+
* Central registry for declared (custom) model variant definitions (one per
|
|
5
|
+
* ModelType). Mirrors MemoryRegistry / NodeRegistry.
|
|
6
|
+
*/
|
|
7
|
+
declare class ModelDefinitionRegistry {
|
|
8
|
+
private models;
|
|
9
|
+
private initialized;
|
|
10
|
+
initialize(): void;
|
|
11
|
+
private register;
|
|
12
|
+
getAll(): ModelDefinition[];
|
|
13
|
+
getByType(type: ModelType): ModelDefinition | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare const ModelRegistry: ModelDefinitionRegistry;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=ModelRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelRegistry.d.ts","sourceRoot":"","sources":["../../src/model/ModelRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD;;;GAGG;AACH,cAAM,uBAAuB;IAC3B,OAAO,CAAC,MAAM,CAA8C;IAC5D,OAAO,CAAC,WAAW,CAAS;IAE5B,UAAU;IAMV,OAAO,CAAC,QAAQ;IAIhB,MAAM,IAAI,eAAe,EAAE;IAI3B,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,eAAe,GAAG,SAAS;CAGxD;AAED,eAAO,MAAM,aAAa,yBAAgC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { LLMModelDefinition } from "./LLMModelDefinition";
|
|
2
|
+
/**
|
|
3
|
+
* Central registry for declared (custom) model variant definitions (one per
|
|
4
|
+
* ModelType). Mirrors MemoryRegistry / NodeRegistry.
|
|
5
|
+
*/
|
|
6
|
+
class ModelDefinitionRegistry {
|
|
7
|
+
models = new Map();
|
|
8
|
+
initialized = false;
|
|
9
|
+
initialize() {
|
|
10
|
+
if (this.initialized)
|
|
11
|
+
return;
|
|
12
|
+
this.register(LLMModelDefinition);
|
|
13
|
+
this.initialized = true;
|
|
14
|
+
}
|
|
15
|
+
register(definition) {
|
|
16
|
+
this.models.set(definition.type, definition);
|
|
17
|
+
}
|
|
18
|
+
getAll() {
|
|
19
|
+
return Array.from(this.models.values());
|
|
20
|
+
}
|
|
21
|
+
getByType(type) {
|
|
22
|
+
return this.models.get(type);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export const ModelRegistry = new ModelDefinitionRegistry();
|
|
26
|
+
ModelRegistry.initialize();
|
|
27
|
+
//# sourceMappingURL=ModelRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelRegistry.js","sourceRoot":"","sources":["../../src/model/ModelRegistry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;GAGG;AACH,MAAM,uBAAuB;IACnB,MAAM,GAAoC,IAAI,GAAG,EAAE,CAAC;IACpD,WAAW,GAAG,KAAK,CAAC;IAE5B,UAAU;QACR,IAAI,IAAI,CAAC,WAAW;YAAE,OAAO;QAC7B,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;QAClC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;IAC1B,CAAC;IAEO,QAAQ,CAAC,UAA2B;QAC1C,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IAC/C,CAAC;IAED,MAAM;QACJ,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,SAAS,CAAC,IAAe;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;CACF;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,uBAAuB,EAAE,CAAC;AAC3D,aAAa,CAAC,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { ModelType, Model, ModelCapability, ModelInfo } from "./Model";
|
|
2
|
+
export { ALL_MODEL_TYPES } from "./Model";
|
|
3
|
+
export type { ModelDefinition } from "./ModelDefinition";
|
|
4
|
+
export { LLMModelDefinition } from "./LLMModelDefinition";
|
|
5
|
+
export { ModelRegistry } from "./ModelRegistry";
|
|
6
|
+
export { serialize, deserialize } from "./serialization";
|
|
7
|
+
export type { ApiModel } from "./serialization";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Schemas } from "../api";
|
|
2
|
+
import type { Model } from "./Model";
|
|
3
|
+
export type ApiModel = Schemas["Model"];
|
|
4
|
+
/** Serialize a domain Model to the API discriminated-union shape. */
|
|
5
|
+
export declare function serialize(model: Model): ApiModel;
|
|
6
|
+
/** Convert an API Model into a domain Model. */
|
|
7
|
+
export declare function deserialize(api: ApiModel): Model;
|
|
8
|
+
//# sourceMappingURL=serialization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialization.d.ts","sourceRoot":"","sources":["../../src/model/serialization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,KAAK,EAAmB,MAAM,SAAS,CAAC;AAEtD,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAExC,qEAAqE;AACrE,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,QAAQ,CAWhD;AAED,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,GAAG,KAAK,CAShD"}
|