@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.
Files changed (2) hide show
  1. package/README.md +70 -44
  2. 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 in the Amelie AI platform.
3
+ Base infrastructure package for building graph microservices with LangGraph and NestJS.
4
4
 
5
5
  ## Overview
6
6
 
7
- `sdk` is the foundation package that provides all the essential components needed to build, run, and manage graph-based microservices. It's designed to be self-contained with minimal external dependencies.
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
- This is a workspace package - install via workspace root:
56
+ ```bash
57
+ npm install @flutchai/flutch-sdk
58
+ ```
59
+
60
+ or
57
61
 
58
62
  ```bash
59
- yarn install
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
- **Internal:**
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
- **External:**
190
-
191
- - `@nestjs/*` - NestJS framework
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** - Minimal internal dependencies
199
- 2. **Type-safe** - Comprehensive TypeScript definitions
200
- 3. **Modular** - Use only what you need
201
- 4. **Backward compatible** - Graceful migration paths
202
- 5. **Framework agnostic** - Core types work anywhere
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
- If you were using types from `@amelie/graph-service-core` or `@amelie/graph-utils`:
205
+ ## Quick Start
207
206
 
208
207
  ```typescript
209
- // ❌ Old imports
210
- import { IGraphService } from "@amelie/graph-service-core";
211
- import { EventProcessor } from "@amelie/graph-utils";
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
- // ✅ New imports
214
- import { IGraphService, EventProcessor } from "@flutchai/flutch-sdk";
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
- All old imports are marked `@deprecated` but still work for backward compatibility.
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
- yarn workspace @flutchai/flutch-sdk build
269
+ npm run build
254
270
  ```
255
271
 
256
272
  ### Testing
257
273
 
258
274
  ```bash
259
- yarn workspace @flutchai/flutch-sdk test
275
+ npm test
260
276
  ```
261
277
 
262
278
  ### Linting
263
279
 
264
280
  ```bash
265
- yarn workspace @flutchai/flutch-sdk lint
281
+ npm run lint
266
282
  ```
267
283
 
268
- ## Contributing
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
- When adding new features to sdk:
297
+ ## Use Cases
271
298
 
272
- 1. **Keep it generic** - This is base infrastructure
273
- 2. **Type everything** - Export proper TypeScript interfaces
274
- 3. **Document well** - Add JSDoc comments
275
- 4. **Test thoroughly** - Add unit tests for new utilities
276
- 5. **Export properly** - Add to appropriate section in `index.ts`
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
- ## Version History
305
+ ## Links
279
306
 
280
- - **0.1.0** - Initial self-contained release
281
- - Migrated core interfaces from graph-service-core
282
- - Migrated utilities from graph-utils
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
- Proprietary - Amelie AI Platform
313
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flutchai/flutch-sdk",
3
- "version": "0.1.0",
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/flutch3.git",
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": "yarn build"
37
+ "prepublishOnly": "npm run build"
38
38
  },
39
39
  "dependencies": {
40
40
  "@langchain/anthropic": "^0.3.0",