@flutchai/flutch-sdk 0.1.0 → 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/README.md +70 -44
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @flutchai/flutch-sdk
|
|
2
2
|
|
|
3
|
-
Base infrastructure package for building graph microservices
|
|
3
|
+
Base infrastructure package for building graph microservices with LangGraph and NestJS.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`@flutchai/flutch-sdk` is a self-contained foundation package that provides all the essential components needed to build, run, and manage LangGraph-based microservices using NestJS framework.
|
|
8
8
|
|
|
9
9
|
## What's Included
|
|
10
10
|
|
|
@@ -53,10 +53,14 @@ Complete callback infrastructure for interactive user flows:
|
|
|
53
53
|
|
|
54
54
|
## Installation
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
```bash
|
|
57
|
+
npm install @flutchai/flutch-sdk
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
or
|
|
57
61
|
|
|
58
62
|
```bash
|
|
59
|
-
yarn
|
|
63
|
+
yarn add @flutchai/flutch-sdk
|
|
60
64
|
```
|
|
61
65
|
|
|
62
66
|
## Usage
|
|
@@ -181,40 +185,52 @@ src/
|
|
|
181
185
|
|
|
182
186
|
### Dependencies
|
|
183
187
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
- `@amelie/shared-types` - Base type definitions
|
|
187
|
-
- `@amelie/graph-service-registry` - Service discovery (runtime only)
|
|
188
|
+
The package has no internal dependencies and relies only on well-established external libraries:
|
|
188
189
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
-
|
|
192
|
-
-
|
|
193
|
-
- `
|
|
194
|
-
- `helmet`, `compression` - HTTP middleware
|
|
190
|
+
- `@nestjs/*` - NestJS framework for building scalable server-side applications
|
|
191
|
+
- `@langchain/*` - LangChain ecosystem for LLM integrations and graph orchestration
|
|
192
|
+
- `ioredis` - Redis client for callback system and caching
|
|
193
|
+
- `axios` - HTTP client for external API calls
|
|
194
|
+
- `zod` - TypeScript-first schema validation
|
|
195
|
+
- `helmet`, `compression` - HTTP security and performance middleware
|
|
195
196
|
|
|
196
197
|
### Design Principles
|
|
197
198
|
|
|
198
|
-
1. **Self-contained** -
|
|
199
|
-
2. **Type-safe** - Comprehensive TypeScript definitions
|
|
200
|
-
3. **Modular** - Use only what you need
|
|
201
|
-
4. **
|
|
202
|
-
5. **Framework
|
|
203
|
-
|
|
204
|
-
## Migration Guide
|
|
199
|
+
1. **Self-contained** - No internal dependencies, everything you need in one package
|
|
200
|
+
2. **Type-safe** - Comprehensive TypeScript definitions for all components
|
|
201
|
+
3. **Modular** - Use only what you need, import specific modules
|
|
202
|
+
4. **Production-ready** - Built-in monitoring, health checks, and error handling
|
|
203
|
+
5. **Framework integration** - Seamless NestJS integration with LangGraph
|
|
205
204
|
|
|
206
|
-
|
|
205
|
+
## Quick Start
|
|
207
206
|
|
|
208
207
|
```typescript
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
208
|
+
import {
|
|
209
|
+
UniversalGraphModule,
|
|
210
|
+
AbstractGraphBuilder,
|
|
211
|
+
} from "@flutchai/flutch-sdk";
|
|
212
|
+
import { Module } from "@nestjs/common";
|
|
213
|
+
|
|
214
|
+
@Injectable()
|
|
215
|
+
export class MyGraphBuilder extends AbstractGraphBuilder<"myGraph"> {
|
|
216
|
+
async buildGraph(config?: any) {
|
|
217
|
+
// Your LangGraph implementation
|
|
218
|
+
return compiledGraph;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
212
221
|
|
|
213
|
-
|
|
214
|
-
|
|
222
|
+
@Module({
|
|
223
|
+
imports: [
|
|
224
|
+
UniversalGraphModule.register({
|
|
225
|
+
graphType: "myGraph",
|
|
226
|
+
builder: MyGraphBuilder,
|
|
227
|
+
}),
|
|
228
|
+
],
|
|
229
|
+
})
|
|
230
|
+
export class MyGraphModule {}
|
|
215
231
|
```
|
|
216
232
|
|
|
217
|
-
|
|
233
|
+
Your graph service is now ready with built-in REST API, health checks, and monitoring!
|
|
218
234
|
|
|
219
235
|
## API
|
|
220
236
|
|
|
@@ -250,38 +266,48 @@ See `src/index.ts` for complete export list.
|
|
|
250
266
|
### Building
|
|
251
267
|
|
|
252
268
|
```bash
|
|
253
|
-
|
|
269
|
+
npm run build
|
|
254
270
|
```
|
|
255
271
|
|
|
256
272
|
### Testing
|
|
257
273
|
|
|
258
274
|
```bash
|
|
259
|
-
|
|
275
|
+
npm test
|
|
260
276
|
```
|
|
261
277
|
|
|
262
278
|
### Linting
|
|
263
279
|
|
|
264
280
|
```bash
|
|
265
|
-
|
|
281
|
+
npm run lint
|
|
266
282
|
```
|
|
267
283
|
|
|
268
|
-
##
|
|
284
|
+
## Features
|
|
285
|
+
|
|
286
|
+
- **Ready-to-use NestJS module** for graph services
|
|
287
|
+
- **Type-safe graph definitions** with TypeScript
|
|
288
|
+
- **Built-in REST API** with OpenAPI documentation
|
|
289
|
+
- **Callback system** for interactive user flows
|
|
290
|
+
- **Stream processing** with real-time events
|
|
291
|
+
- **Health checks** and Prometheus metrics
|
|
292
|
+
- **Redis integration** for callbacks and caching
|
|
293
|
+
- **Multi-LLM support** (OpenAI, Anthropic, Azure, Google, Mistral, Cohere)
|
|
294
|
+
- **Graph versioning** utilities
|
|
295
|
+
- **Manifest validation** for graph configurations
|
|
269
296
|
|
|
270
|
-
|
|
297
|
+
## Use Cases
|
|
271
298
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
299
|
+
- Building AI agent microservices with LangGraph
|
|
300
|
+
- Creating conversational AI applications
|
|
301
|
+
- Implementing RAG (Retrieval-Augmented Generation) systems
|
|
302
|
+
- Developing multi-step AI workflows
|
|
303
|
+
- Building interactive AI assistants with callbacks
|
|
277
304
|
|
|
278
|
-
##
|
|
305
|
+
## Links
|
|
279
306
|
|
|
280
|
-
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
- Removed external graph-services dependencies
|
|
307
|
+
- [GitHub Repository](https://github.com/flutchai/flutch3)
|
|
308
|
+
- [NPM Package](https://www.npmjs.com/package/@flutchai/flutch-sdk)
|
|
309
|
+
- [Issues](https://github.com/flutchai/flutch3/issues)
|
|
284
310
|
|
|
285
311
|
## License
|
|
286
312
|
|
|
287
|
-
|
|
313
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flutchai/flutch-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Base infrastructure package for building graph microservices - core interfaces, types, utilities, and execution engine",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/flutchai/
|
|
17
|
+
"url": "https://github.com/flutchai/flutch.git",
|
|
18
18
|
"directory": "packages/sdk"
|
|
19
19
|
},
|
|
20
20
|
"keywords": [
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"build": "npx tsc",
|
|
35
35
|
"test": "jest",
|
|
36
36
|
"lint": "eslint .",
|
|
37
|
-
"prepublishOnly": "
|
|
37
|
+
"prepublishOnly": "npm run build"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@langchain/anthropic": "^0.3.0",
|