@doclo/flows 0.1.2

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Doclo AI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # @doclo/flows
2
+
3
+ Flow orchestration and execution engine for document processing pipelines in the Doclo SDK.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @doclo/flows
9
+ # or
10
+ pnpm add @doclo/flows
11
+ ```
12
+
13
+ ## Features
14
+
15
+ - **FlowBuilder** - Declarative API for building document processing flows
16
+ - **FlowExecutor** - Execute flows with automatic dependency resolution
17
+ - **Composite Nodes** - Combine multiple nodes (sequence, parallel, forEach, conditional)
18
+ - **Metrics Aggregation** - Automatic cost and token tracking across flow execution
19
+
20
+ ## Usage
21
+
22
+ ```typescript
23
+ import { FlowBuilder, FlowExecutor } from '@doclo/flows';
24
+
25
+ // Build a flow
26
+ const flow = new FlowBuilder()
27
+ .addStep('categorize', categorizeNode)
28
+ .addStep('extract', extractNode, { dependsOn: ['categorize'] })
29
+ .build();
30
+
31
+ // Execute the flow
32
+ const executor = new FlowExecutor(flow);
33
+ const result = await executor.execute({
34
+ text: "Document content...",
35
+ images: [{ base64: "...", mimeType: "image/jpeg" }]
36
+ });
37
+ ```
38
+
39
+ ## License
40
+
41
+ MIT
@@ -0,0 +1,16 @@
1
+ // src/schemas.ts
2
+ var simpleSchema = {
3
+ type: "object",
4
+ properties: {
5
+ vessel: { type: "string", nullable: true },
6
+ port: { type: "string", nullable: true },
7
+ quantity_mt: { type: "number", nullable: true }
8
+ },
9
+ required: [],
10
+ additionalProperties: false
11
+ };
12
+
13
+ export {
14
+ simpleSchema
15
+ };
16
+ //# sourceMappingURL=chunk-USCWPTGU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/schemas.ts"],"sourcesContent":["/**\n * Example JSON Schema for documentation purposes\n *\n * Note: Converted from AJV's JSONSchemaType to plain JSON Schema format\n * for Edge Runtime compatibility.\n */\n\nexport type SimpleOut = { vessel?: string; port?: string; quantity_mt?: number };\n\nexport const simpleSchema = {\n type: \"object\",\n properties: {\n vessel: { type: \"string\", nullable: true },\n port: { type: \"string\", nullable: true },\n quantity_mt: { type: \"number\", nullable: true }\n },\n required: [],\n additionalProperties: false\n} as const;\n"],"mappings":";AASO,IAAM,eAAe;AAAA,EAC1B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,QAAQ,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IACzC,MAAM,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,IACvC,aAAa,EAAE,MAAM,UAAU,UAAU,KAAK;AAAA,EAChD;AAAA,EACA,UAAU,CAAC;AAAA,EACX,sBAAsB;AACxB;","names":[]}