@flutchai/flutch-sdk 0.1.7 → 0.1.8
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/dist/index.cjs +28 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +29 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3076,9 +3076,6 @@ var _AbstractGraphBuilder = class _AbstractGraphBuilder {
|
|
|
3076
3076
|
if (this.manifest?.companySlug && this.manifest?.name) {
|
|
3077
3077
|
return `${this.manifest.companySlug}.${this.manifest.name}::${this.version}`;
|
|
3078
3078
|
}
|
|
3079
|
-
console.log(
|
|
3080
|
-
`DEBUG graphType: manifest=${!!this.manifest}, companySlug=${this.manifest?.companySlug}, name=${this.manifest?.name}, version=${this.version}`
|
|
3081
|
-
);
|
|
3082
3079
|
return `unknown::${this.version}`;
|
|
3083
3080
|
}
|
|
3084
3081
|
/**
|
|
@@ -3410,6 +3407,9 @@ exports.UniversalGraphService = class UniversalGraphService {
|
|
|
3410
3407
|
this.engine = engine;
|
|
3411
3408
|
this.endpointRegistry = endpointRegistry;
|
|
3412
3409
|
this.logger.log("UniversalGraphService initialized");
|
|
3410
|
+
if (!this.engine) {
|
|
3411
|
+
this.logger.error("GRAPH_ENGINE is not properly injected!");
|
|
3412
|
+
}
|
|
3413
3413
|
}
|
|
3414
3414
|
logger = new common.Logger(exports.UniversalGraphService.name);
|
|
3415
3415
|
/**
|
|
@@ -4405,11 +4405,11 @@ function sanitizeTraceError(error, options) {
|
|
|
4405
4405
|
raw: sanitizeTraceData(error, 0, /* @__PURE__ */ new WeakSet(), options)
|
|
4406
4406
|
};
|
|
4407
4407
|
}
|
|
4408
|
-
var GraphEngineType = /* @__PURE__ */ ((
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
return
|
|
4408
|
+
var GraphEngineType = /* @__PURE__ */ ((GraphEngineType3) => {
|
|
4409
|
+
GraphEngineType3["LANGGRAPH"] = "langgraph";
|
|
4410
|
+
GraphEngineType3["LANGFLOW"] = "langflow";
|
|
4411
|
+
GraphEngineType3["FLOWISE"] = "flowise";
|
|
4412
|
+
return GraphEngineType3;
|
|
4413
4413
|
})(GraphEngineType || {});
|
|
4414
4414
|
exports.GraphEngineFactory = class GraphEngineFactory {
|
|
4415
4415
|
constructor(langgraph) {
|
|
@@ -4855,6 +4855,9 @@ exports.LangGraphEngine = class LangGraphEngine {
|
|
|
4855
4855
|
constructor(eventProcessor, configService) {
|
|
4856
4856
|
this.eventProcessor = eventProcessor;
|
|
4857
4857
|
this.configService = configService;
|
|
4858
|
+
if (!eventProcessor) {
|
|
4859
|
+
this.logger.error("EventProcessor is undefined/null!");
|
|
4860
|
+
}
|
|
4858
4861
|
}
|
|
4859
4862
|
logger = new common.Logger(exports.LangGraphEngine.name);
|
|
4860
4863
|
/**
|
|
@@ -4957,8 +4960,8 @@ exports.LangGraphEngine = class LangGraphEngine {
|
|
|
4957
4960
|
*/
|
|
4958
4961
|
async sendMetricsWebhook(payload) {
|
|
4959
4962
|
try {
|
|
4960
|
-
const backendUrl = this.configService
|
|
4961
|
-
const internalToken = this.configService
|
|
4963
|
+
const backendUrl = this.configService?.get("API_URL") || "http://amelie-service";
|
|
4964
|
+
const internalToken = this.configService?.get("INTERNAL_API_TOKEN");
|
|
4962
4965
|
if (!internalToken) {
|
|
4963
4966
|
this.logger.warn(
|
|
4964
4967
|
"[METRICS-WEBHOOK] INTERNAL_API_TOKEN not configured, skipping webhook"
|
|
@@ -4997,8 +5000,8 @@ exports.LangGraphEngine = class LangGraphEngine {
|
|
|
4997
5000
|
}
|
|
4998
5001
|
async sendTraceEventsBatch(payload) {
|
|
4999
5002
|
try {
|
|
5000
|
-
const backendUrl = this.configService
|
|
5001
|
-
const internalToken = this.configService
|
|
5003
|
+
const backendUrl = this.configService?.get("API_URL") || "http://amelie-service";
|
|
5004
|
+
const internalToken = this.configService?.get("INTERNAL_API_TOKEN");
|
|
5002
5005
|
if (!internalToken) {
|
|
5003
5006
|
this.logger.warn(
|
|
5004
5007
|
"[TRACE-EVENTS-BATCH] INTERNAL_API_TOKEN not configured, skipping batch webhook"
|
|
@@ -5080,7 +5083,8 @@ exports.LangGraphEngine = class LangGraphEngine {
|
|
|
5080
5083
|
}
|
|
5081
5084
|
};
|
|
5082
5085
|
exports.LangGraphEngine = __decorateClass([
|
|
5083
|
-
common.Injectable()
|
|
5086
|
+
common.Injectable(),
|
|
5087
|
+
__decorateParam(1, common.Optional())
|
|
5084
5088
|
], exports.LangGraphEngine);
|
|
5085
5089
|
|
|
5086
5090
|
// src/core/universal-graph.module.ts
|
|
@@ -5156,9 +5160,16 @@ exports.UniversalGraphModule = class UniversalGraphModule {
|
|
|
5156
5160
|
// Discovery services from @nestjs/core
|
|
5157
5161
|
core.MetadataScanner,
|
|
5158
5162
|
// Event processor for stream handling
|
|
5159
|
-
|
|
5163
|
+
{
|
|
5164
|
+
provide: exports.EventProcessor,
|
|
5165
|
+
useFactory: () => new exports.EventProcessor()
|
|
5166
|
+
},
|
|
5160
5167
|
// Graph engines
|
|
5161
|
-
|
|
5168
|
+
{
|
|
5169
|
+
provide: exports.LangGraphEngine,
|
|
5170
|
+
useFactory: (eventProcessor) => new exports.LangGraphEngine(eventProcessor, void 0),
|
|
5171
|
+
inject: [exports.EventProcessor]
|
|
5172
|
+
},
|
|
5162
5173
|
exports.BuilderRegistryService,
|
|
5163
5174
|
exports.GraphEngineFactory,
|
|
5164
5175
|
exports.VersionedGraphService,
|
|
@@ -5264,12 +5275,8 @@ exports.UniversalGraphModule = class UniversalGraphModule {
|
|
|
5264
5275
|
},
|
|
5265
5276
|
{
|
|
5266
5277
|
provide: "GRAPH_ENGINE",
|
|
5267
|
-
useFactory: (
|
|
5268
|
-
|
|
5269
|
-
options.engineType || "langgraph" /* LANGGRAPH */
|
|
5270
|
-
);
|
|
5271
|
-
},
|
|
5272
|
-
inject: [exports.GraphEngineFactory]
|
|
5278
|
+
useFactory: (langGraphEngine) => langGraphEngine,
|
|
5279
|
+
inject: [exports.LangGraphEngine]
|
|
5273
5280
|
},
|
|
5274
5281
|
{
|
|
5275
5282
|
provide: "GRAPH_BUILDERS",
|