@flutchai/flutch-sdk 0.1.0 → 0.1.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/README.md +67 -44
- package/package.json +1 -1
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,49 @@ src/
|
|
|
181
185
|
|
|
182
186
|
### Dependencies
|
|
183
187
|
|
|
184
|
-
|
|
188
|
+
The package has no internal dependencies and relies only on well-established external libraries:
|
|
185
189
|
|
|
186
|
-
- `@
|
|
187
|
-
- `@
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
-
|
|
192
|
-
- `@langchain/langgraph` - Graph orchestration
|
|
193
|
-
- `ioredis` - Redis client for callbacks
|
|
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
|
-
import {
|
|
211
|
-
|
|
208
|
+
import { UniversalGraphModule, AbstractGraphBuilder } from "@flutchai/flutch-sdk";
|
|
209
|
+
import { Module } from "@nestjs/common";
|
|
210
|
+
|
|
211
|
+
@Injectable()
|
|
212
|
+
export class MyGraphBuilder extends AbstractGraphBuilder<"myGraph"> {
|
|
213
|
+
async buildGraph(config?: any) {
|
|
214
|
+
// Your LangGraph implementation
|
|
215
|
+
return compiledGraph;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
212
218
|
|
|
213
|
-
|
|
214
|
-
|
|
219
|
+
@Module({
|
|
220
|
+
imports: [
|
|
221
|
+
UniversalGraphModule.register({
|
|
222
|
+
graphType: "myGraph",
|
|
223
|
+
builder: MyGraphBuilder,
|
|
224
|
+
}),
|
|
225
|
+
],
|
|
226
|
+
})
|
|
227
|
+
export class MyGraphModule {}
|
|
215
228
|
```
|
|
216
229
|
|
|
217
|
-
|
|
230
|
+
Your graph service is now ready with built-in REST API, health checks, and monitoring!
|
|
218
231
|
|
|
219
232
|
## API
|
|
220
233
|
|
|
@@ -250,38 +263,48 @@ See `src/index.ts` for complete export list.
|
|
|
250
263
|
### Building
|
|
251
264
|
|
|
252
265
|
```bash
|
|
253
|
-
|
|
266
|
+
npm run build
|
|
254
267
|
```
|
|
255
268
|
|
|
256
269
|
### Testing
|
|
257
270
|
|
|
258
271
|
```bash
|
|
259
|
-
|
|
272
|
+
npm test
|
|
260
273
|
```
|
|
261
274
|
|
|
262
275
|
### Linting
|
|
263
276
|
|
|
264
277
|
```bash
|
|
265
|
-
|
|
278
|
+
npm run lint
|
|
266
279
|
```
|
|
267
280
|
|
|
268
|
-
##
|
|
281
|
+
## Features
|
|
282
|
+
|
|
283
|
+
- **Ready-to-use NestJS module** for graph services
|
|
284
|
+
- **Type-safe graph definitions** with TypeScript
|
|
285
|
+
- **Built-in REST API** with OpenAPI documentation
|
|
286
|
+
- **Callback system** for interactive user flows
|
|
287
|
+
- **Stream processing** with real-time events
|
|
288
|
+
- **Health checks** and Prometheus metrics
|
|
289
|
+
- **Redis integration** for callbacks and caching
|
|
290
|
+
- **Multi-LLM support** (OpenAI, Anthropic, Azure, Google, Mistral, Cohere)
|
|
291
|
+
- **Graph versioning** utilities
|
|
292
|
+
- **Manifest validation** for graph configurations
|
|
269
293
|
|
|
270
|
-
|
|
294
|
+
## Use Cases
|
|
271
295
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
296
|
+
- Building AI agent microservices with LangGraph
|
|
297
|
+
- Creating conversational AI applications
|
|
298
|
+
- Implementing RAG (Retrieval-Augmented Generation) systems
|
|
299
|
+
- Developing multi-step AI workflows
|
|
300
|
+
- Building interactive AI assistants with callbacks
|
|
277
301
|
|
|
278
|
-
##
|
|
302
|
+
## Links
|
|
279
303
|
|
|
280
|
-
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
- Removed external graph-services dependencies
|
|
304
|
+
- [GitHub Repository](https://github.com/flutchai/flutch3)
|
|
305
|
+
- [NPM Package](https://www.npmjs.com/package/@flutchai/flutch-sdk)
|
|
306
|
+
- [Issues](https://github.com/flutchai/flutch3/issues)
|
|
284
307
|
|
|
285
308
|
## License
|
|
286
309
|
|
|
287
|
-
|
|
310
|
+
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.1",
|
|
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",
|