@bian-womp/spark-graph 0.3.16 → 0.3.17
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/lib/cjs/index.cjs +265 -77
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/cjs/src/index.d.ts +1 -0
- package/lib/cjs/src/index.d.ts.map +1 -1
- package/lib/cjs/src/runtime/components/NodeExecutor.d.ts.map +1 -1
- package/lib/cjs/src/runtime/components/RunContextManager.d.ts +7 -1
- package/lib/cjs/src/runtime/components/RunContextManager.d.ts.map +1 -1
- package/lib/cjs/src/runtime/utils.d.ts +51 -0
- package/lib/cjs/src/runtime/utils.d.ts.map +1 -1
- package/lib/esm/index.js +265 -78
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/src/index.d.ts +1 -0
- package/lib/esm/src/index.d.ts.map +1 -1
- package/lib/esm/src/runtime/components/NodeExecutor.d.ts.map +1 -1
- package/lib/esm/src/runtime/components/RunContextManager.d.ts +7 -1
- package/lib/esm/src/runtime/components/RunContextManager.d.ts.map +1 -1
- package/lib/esm/src/runtime/utils.d.ts +51 -0
- package/lib/esm/src/runtime/utils.d.ts.map +1 -1
- package/package.json +2 -2
package/lib/cjs/src/index.d.ts
CHANGED
|
@@ -20,4 +20,5 @@ export { installLogging } from "./examples/shared";
|
|
|
20
20
|
export { registerDelayNode, registerProgressNodes, generateId, BaseMathOperation, BaseCompareOperation, BaseLogicOperation, } from "./misc/base";
|
|
21
21
|
export { mergeGraphDefinitions, computeGraphCenter, offsetImportedPositions, mergeInputsOutputs, mergeSnapshotData, mergeRuntimeState, buildValueConverter, type ConverterConfig, type ValueMappingConfig, type ValueConverter, type ValueConverterConfig, } from "./misc/utils/merge";
|
|
22
22
|
export { parseJsonPath, getValueAtPath, setValueAtPath, setValueAtPathWithCreation, findMatchingPaths, type JsonPath, type PathSegment, } from "./misc/utils/json";
|
|
23
|
+
export { LevelLogger } from "./runtime/utils";
|
|
23
24
|
//# sourceMapping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AAC;AAC1B,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,aAAa,EACb,cAAc,EACd,cAAc,EACd,0BAA0B,EAC1B,iBAAiB,EACjB,KAAK,QAAQ,EACb,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,EACL,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,eAAe,EACf,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,YAAY,EAAE,eAAe,EAAE,gBA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AiB,EACjB,KAAK,QAAQ,EACb,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeExecutor.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/components/NodeExecutor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NodeExecutor.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/components/NodeExecutor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAe,MAAM,SAAS,CAAC;AACtE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EACL,eAAe,EACf,aAAa,EACb,QAAQ,EACR,eAAe,EAChB,MAAM,cAAc,CAAC;AAgBtB;;GAEG;AACH,qBAAa,YAAa,YAAW,aAAa;IAI9C,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAR1B,OAAO,CAAC,WAAW,CAA+B;gBAG/B,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,iBAAiB,EAAE,iBAAiB,EACpC,cAAc,EAAE,eAAe,EAC/B,cAAc,EAAE,eAAe,EAC/B,OAAO,EAAE,QAAQ,EAClC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,O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AEG;IACH,OAAO,CAAC,6BAA6B;IAyCrC;;OAEG;IACH,OAAO,CAAC,WAAW;IAuEnB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA6ExB;;OAEG;IACH,oBAAoB,CAClB,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,UAAU,GAAG,cAAc,GAAG,gBAAgB,GACrD,IAAI;IAiCP;;;OAGG;IACH,cAAc,CACZ,OAAO,EAAE,MAAM,EAAE,EACjB,MAAM,GAAE,UAAU,GAAG,gBAAmC,GACvD,IAAI;CA8CR"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Graph } from "./Graph";
|
|
2
|
+
import type { LogLevel } from "@bian-womp/spark-protocol";
|
|
2
3
|
export type RunContextId = string;
|
|
3
4
|
export interface RunContext {
|
|
4
5
|
id: RunContextId;
|
|
@@ -18,7 +19,12 @@ export declare class RunContextManager {
|
|
|
18
19
|
private readonly graph;
|
|
19
20
|
private runContexts;
|
|
20
21
|
private runContextCounter;
|
|
21
|
-
|
|
22
|
+
private readonly logger;
|
|
23
|
+
constructor(graph: Graph, logLevel?: LogLevel);
|
|
24
|
+
/**
|
|
25
|
+
* Set the log level for this manager
|
|
26
|
+
*/
|
|
27
|
+
setLogLevel(logLevel: LogLevel): void;
|
|
22
28
|
/**
|
|
23
29
|
* Create a new run-context for runFromHere
|
|
24
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RunContextManager.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/components/RunContextManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"RunContextManager.d.ts","sourceRoot":"","sources":["../../../../../src/runtime/components/RunContextManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AA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IAkBrD,mBAAmB,CAAC,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAiB3D,oBAAoB,CAAC,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAkB5D,qBAAqB,CAAC,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAiB7D,sBAAsB,CAAC,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAkB9D;;OAEG;IACH,OAAO,CAAC,0BAA0B;IA+BlC;;;;;;OAMG;IACH,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,GAAG,IAAI;IA0CzE;;OAEG;IACH,UAAU,IAAI,IAAI;IAWlB;;OAEG;IACH,KAAK,IAAI,IAAI;CAKd"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { LogLevel } from "@bian-womp/spark-protocol";
|
|
1
2
|
/**
|
|
2
3
|
* Shared utility functions for runtime components
|
|
3
4
|
*/
|
|
@@ -13,4 +14,54 @@ export declare function unwrapMaybePromise<T>(value: T | Promise<T>): Promise<T>
|
|
|
13
14
|
* Shallow/deep-ish equality check to avoid unnecessary runs on identical values
|
|
14
15
|
*/
|
|
15
16
|
export declare function valuesEqual(a: unknown, b: unknown): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* A reusable logger class that supports configurable log levels and prefixes.
|
|
19
|
+
* Can be instantiated with a default log level and optionally override per call.
|
|
20
|
+
*/
|
|
21
|
+
export declare class LevelLogger {
|
|
22
|
+
private defaultLevel;
|
|
23
|
+
private prefix;
|
|
24
|
+
/**
|
|
25
|
+
* Maps log levels to numeric values for comparison
|
|
26
|
+
*/
|
|
27
|
+
static readonly levelValues: Record<LogLevel, number>;
|
|
28
|
+
constructor(defaultLevel?: LogLevel, prefix?: string);
|
|
29
|
+
/**
|
|
30
|
+
* Sets the prefix for log messages
|
|
31
|
+
*/
|
|
32
|
+
setPrefix(prefix: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Gets the current prefix
|
|
35
|
+
*/
|
|
36
|
+
getPrefix(): string;
|
|
37
|
+
/**
|
|
38
|
+
* Sets the default log level for this logger instance
|
|
39
|
+
*/
|
|
40
|
+
setLevel(level: LogLevel): void;
|
|
41
|
+
/**
|
|
42
|
+
* Gets the current default log level
|
|
43
|
+
*/
|
|
44
|
+
getLevel(): LogLevel;
|
|
45
|
+
getLevelValue(): number;
|
|
46
|
+
/**
|
|
47
|
+
* Logs a debug message
|
|
48
|
+
*/
|
|
49
|
+
debug(message: string, context?: Record<string, unknown>, overrideLevel?: LogLevel): void;
|
|
50
|
+
/**
|
|
51
|
+
* Logs an info message
|
|
52
|
+
*/
|
|
53
|
+
info(message: string, context?: Record<string, unknown>, overrideLevel?: LogLevel): void;
|
|
54
|
+
/**
|
|
55
|
+
* Logs a warning message
|
|
56
|
+
*/
|
|
57
|
+
warn(message: string, context?: Record<string, unknown>, overrideLevel?: LogLevel): void;
|
|
58
|
+
/**
|
|
59
|
+
* Logs an error message
|
|
60
|
+
*/
|
|
61
|
+
error(message: string, context?: Record<string, unknown>, overrideLevel?: LogLevel): void;
|
|
62
|
+
/**
|
|
63
|
+
* Core logging method that respects the log level and applies prefix
|
|
64
|
+
*/
|
|
65
|
+
private log;
|
|
66
|
+
}
|
|
16
67
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/runtime/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC,CAE1E;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO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QAAQ,GACvB,IAAI;IAIP;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,aAAa,CAAC,EAAE,QAAQ,GACvB,IAAI;IAIP;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,aAAa,CAAC,EAAE,QAAQ,GACvB,IAAI;IAIP;;OAEG;IACH,KAAK,CACH,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,aAAa,CAAC,EAAE,QAAQ,GACvB,IAAI;IAIP;;OAEG;IACH,OAAO,CAAC,GAAG;CA0CZ"}
|
package/lib/esm/index.js
CHANGED
|
@@ -930,15 +930,166 @@ class EventEmitter {
|
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
|
|
933
|
+
const LOG_LEVEL_VALUES = {
|
|
934
|
+
debug: 0,
|
|
935
|
+
info: 1,
|
|
936
|
+
warn: 2,
|
|
937
|
+
error: 3,
|
|
938
|
+
silent: 4,
|
|
939
|
+
};
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Shared utility functions for runtime components
|
|
943
|
+
*/
|
|
944
|
+
/**
|
|
945
|
+
* Type guard to check if a value is a Promise
|
|
946
|
+
*/
|
|
947
|
+
function isPromise(value) {
|
|
948
|
+
return !!value && typeof value.then === "function";
|
|
949
|
+
}
|
|
950
|
+
/**
|
|
951
|
+
* Unwrap a value that might be a Promise
|
|
952
|
+
*/
|
|
953
|
+
async function unwrapMaybePromise(value) {
|
|
954
|
+
return isPromise(value) ? await value : value;
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* Shallow/deep-ish equality check to avoid unnecessary runs on identical values
|
|
958
|
+
*/
|
|
959
|
+
function valuesEqual(a, b) {
|
|
960
|
+
if (a === b)
|
|
961
|
+
return true;
|
|
962
|
+
if (typeof a !== typeof b)
|
|
963
|
+
return false;
|
|
964
|
+
if (a && b && typeof a === "object") {
|
|
965
|
+
try {
|
|
966
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
967
|
+
}
|
|
968
|
+
catch {
|
|
969
|
+
return false;
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
return false;
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* A reusable logger class that supports configurable log levels and prefixes.
|
|
976
|
+
* Can be instantiated with a default log level and optionally override per call.
|
|
977
|
+
*/
|
|
978
|
+
class LevelLogger {
|
|
979
|
+
constructor(defaultLevel = "info", prefix = "") {
|
|
980
|
+
this.defaultLevel = defaultLevel;
|
|
981
|
+
this.prefix = prefix;
|
|
982
|
+
}
|
|
983
|
+
/**
|
|
984
|
+
* Sets the prefix for log messages
|
|
985
|
+
*/
|
|
986
|
+
setPrefix(prefix) {
|
|
987
|
+
this.prefix = prefix;
|
|
988
|
+
}
|
|
989
|
+
/**
|
|
990
|
+
* Gets the current prefix
|
|
991
|
+
*/
|
|
992
|
+
getPrefix() {
|
|
993
|
+
return this.prefix;
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* Sets the default log level for this logger instance
|
|
997
|
+
*/
|
|
998
|
+
setLevel(level) {
|
|
999
|
+
this.defaultLevel = level;
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* Gets the current default log level
|
|
1003
|
+
*/
|
|
1004
|
+
getLevel() {
|
|
1005
|
+
return this.defaultLevel;
|
|
1006
|
+
}
|
|
1007
|
+
getLevelValue() {
|
|
1008
|
+
return LevelLogger.levelValues[this.defaultLevel];
|
|
1009
|
+
}
|
|
1010
|
+
/**
|
|
1011
|
+
* Logs a debug message
|
|
1012
|
+
*/
|
|
1013
|
+
debug(message, context, overrideLevel) {
|
|
1014
|
+
this.log("debug", message, context, overrideLevel);
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* Logs an info message
|
|
1018
|
+
*/
|
|
1019
|
+
info(message, context, overrideLevel) {
|
|
1020
|
+
this.log("info", message, context, overrideLevel);
|
|
1021
|
+
}
|
|
1022
|
+
/**
|
|
1023
|
+
* Logs a warning message
|
|
1024
|
+
*/
|
|
1025
|
+
warn(message, context, overrideLevel) {
|
|
1026
|
+
this.log("warn", message, context, overrideLevel);
|
|
1027
|
+
}
|
|
1028
|
+
/**
|
|
1029
|
+
* Logs an error message
|
|
1030
|
+
*/
|
|
1031
|
+
error(message, context, overrideLevel) {
|
|
1032
|
+
this.log("error", message, context, overrideLevel);
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Core logging method that respects the log level and applies prefix
|
|
1036
|
+
*/
|
|
1037
|
+
log(requestedLevel, message, context, overrideLevel) {
|
|
1038
|
+
const effectiveLevel = overrideLevel ?? this.defaultLevel;
|
|
1039
|
+
// Silent level suppresses all logs
|
|
1040
|
+
if (effectiveLevel === "silent") {
|
|
1041
|
+
return;
|
|
1042
|
+
}
|
|
1043
|
+
const requestedValue = LevelLogger.levelValues[requestedLevel] ?? 1;
|
|
1044
|
+
const effectiveValue = LevelLogger.levelValues[effectiveLevel] ?? 1;
|
|
1045
|
+
// Only log if the requested level is >= effective level
|
|
1046
|
+
if (requestedValue >= effectiveValue) {
|
|
1047
|
+
const contextStr = context
|
|
1048
|
+
? ` ${Object.entries(context)
|
|
1049
|
+
.map(([k, v]) => `${k}=${JSON.stringify(v)}`)
|
|
1050
|
+
.join(" ")}`
|
|
1051
|
+
: "";
|
|
1052
|
+
const prefixedMessage = this.prefix
|
|
1053
|
+
? `${this.prefix} ${message}${contextStr}`
|
|
1054
|
+
: `${message}${contextStr}`;
|
|
1055
|
+
switch (requestedLevel) {
|
|
1056
|
+
case "debug":
|
|
1057
|
+
console.info(prefixedMessage);
|
|
1058
|
+
break;
|
|
1059
|
+
case "info":
|
|
1060
|
+
console.info(prefixedMessage);
|
|
1061
|
+
break;
|
|
1062
|
+
case "warn":
|
|
1063
|
+
console.warn(prefixedMessage);
|
|
1064
|
+
break;
|
|
1065
|
+
case "error":
|
|
1066
|
+
console.error(prefixedMessage);
|
|
1067
|
+
break;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* Maps log levels to numeric values for comparison
|
|
1074
|
+
*/
|
|
1075
|
+
LevelLogger.levelValues = LOG_LEVEL_VALUES;
|
|
1076
|
+
|
|
933
1077
|
/**
|
|
934
1078
|
* RunContextManager component - manages run-context lifecycle
|
|
935
1079
|
*/
|
|
936
1080
|
class RunContextManager {
|
|
937
|
-
constructor(graph) {
|
|
1081
|
+
constructor(graph, logLevel) {
|
|
938
1082
|
this.graph = graph;
|
|
939
1083
|
this.runContexts = new Map();
|
|
940
1084
|
this.runContextCounter = 0;
|
|
941
1085
|
this.graph = graph;
|
|
1086
|
+
this.logger = new LevelLogger(logLevel ?? "info", "[RunContextManager]");
|
|
1087
|
+
}
|
|
1088
|
+
/**
|
|
1089
|
+
* Set the log level for this manager
|
|
1090
|
+
*/
|
|
1091
|
+
setLogLevel(logLevel) {
|
|
1092
|
+
this.logger.setLevel(logLevel);
|
|
942
1093
|
}
|
|
943
1094
|
/**
|
|
944
1095
|
* Create a new run-context for runFromHere
|
|
@@ -957,6 +1108,12 @@ class RunContextManager {
|
|
|
957
1108
|
resolve,
|
|
958
1109
|
};
|
|
959
1110
|
this.runContexts.set(id, ctx);
|
|
1111
|
+
this.logger.info("create-run-context", {
|
|
1112
|
+
id,
|
|
1113
|
+
startNodeId,
|
|
1114
|
+
skipPropagateValues: ctx.skipPropagateValues,
|
|
1115
|
+
propagate: ctx.propagate,
|
|
1116
|
+
});
|
|
960
1117
|
return id;
|
|
961
1118
|
}
|
|
962
1119
|
/**
|
|
@@ -979,41 +1136,101 @@ class RunContextManager {
|
|
|
979
1136
|
}
|
|
980
1137
|
startNodeRun(id, nodeId) {
|
|
981
1138
|
const ctx = this.runContexts.get(id);
|
|
982
|
-
if (!ctx)
|
|
1139
|
+
if (!ctx) {
|
|
1140
|
+
this.logger.debug("start-node-run-context-not-found", {
|
|
1141
|
+
runContextId: id,
|
|
1142
|
+
nodeId,
|
|
1143
|
+
});
|
|
983
1144
|
return;
|
|
1145
|
+
}
|
|
984
1146
|
ctx.pendingNodes++;
|
|
1147
|
+
this.logger.debug("start-node-run", {
|
|
1148
|
+
runContextId: id,
|
|
1149
|
+
nodeId,
|
|
1150
|
+
pendingNodes: ctx.pendingNodes,
|
|
1151
|
+
});
|
|
985
1152
|
}
|
|
986
1153
|
finishNodeRun(id, nodeId) {
|
|
987
1154
|
const ctx = this.runContexts.get(id);
|
|
988
|
-
if (!ctx)
|
|
1155
|
+
if (!ctx) {
|
|
1156
|
+
this.logger.debug("finish-node-run-context-not-found", {
|
|
1157
|
+
runContextId: id,
|
|
1158
|
+
nodeId,
|
|
1159
|
+
});
|
|
989
1160
|
return;
|
|
1161
|
+
}
|
|
990
1162
|
ctx.pendingNodes--;
|
|
1163
|
+
this.logger.debug("finish-node-run", {
|
|
1164
|
+
runContextId: id,
|
|
1165
|
+
nodeId,
|
|
1166
|
+
pendingNodes: ctx.pendingNodes,
|
|
1167
|
+
});
|
|
991
1168
|
this.finishRunContextIfPossible(id);
|
|
992
1169
|
}
|
|
993
1170
|
startEdgeConversion(id, edgeId) {
|
|
994
1171
|
const ctx = this.runContexts.get(id);
|
|
995
|
-
if (!ctx)
|
|
1172
|
+
if (!ctx) {
|
|
1173
|
+
this.logger.debug("start-edge-conversion-context-not-found", {
|
|
1174
|
+
runContextId: id,
|
|
1175
|
+
edgeId,
|
|
1176
|
+
});
|
|
996
1177
|
return;
|
|
1178
|
+
}
|
|
997
1179
|
ctx.pendingEdges++;
|
|
1180
|
+
this.logger.debug("start-edge-conversion", {
|
|
1181
|
+
runContextId: id,
|
|
1182
|
+
edgeId,
|
|
1183
|
+
pendingEdges: ctx.pendingEdges,
|
|
1184
|
+
});
|
|
998
1185
|
}
|
|
999
1186
|
finishEdgeConversion(id, edgeId) {
|
|
1000
1187
|
const ctx = this.runContexts.get(id);
|
|
1001
|
-
if (!ctx)
|
|
1188
|
+
if (!ctx) {
|
|
1189
|
+
this.logger.debug("finish-edge-conversion-context-not-found", {
|
|
1190
|
+
runContextId: id,
|
|
1191
|
+
edgeId,
|
|
1192
|
+
});
|
|
1002
1193
|
return;
|
|
1194
|
+
}
|
|
1003
1195
|
ctx.pendingEdges--;
|
|
1196
|
+
this.logger.debug("finish-edge-conversion", {
|
|
1197
|
+
runContextId: id,
|
|
1198
|
+
edgeId,
|
|
1199
|
+
pendingEdges: ctx.pendingEdges,
|
|
1200
|
+
});
|
|
1004
1201
|
this.finishRunContextIfPossible(id);
|
|
1005
1202
|
}
|
|
1006
1203
|
startHandleResolution(id, nodeId) {
|
|
1007
1204
|
const ctx = this.runContexts.get(id);
|
|
1008
|
-
if (!ctx)
|
|
1205
|
+
if (!ctx) {
|
|
1206
|
+
this.logger.debug("start-handle-resolution-context-not-found", {
|
|
1207
|
+
runContextId: id,
|
|
1208
|
+
nodeId,
|
|
1209
|
+
});
|
|
1009
1210
|
return;
|
|
1211
|
+
}
|
|
1010
1212
|
ctx.pendingResolvers++;
|
|
1213
|
+
this.logger.debug("start-handle-resolution", {
|
|
1214
|
+
runContextId: id,
|
|
1215
|
+
nodeId,
|
|
1216
|
+
pendingResolvers: ctx.pendingResolvers,
|
|
1217
|
+
});
|
|
1011
1218
|
}
|
|
1012
1219
|
finishHandleResolution(id, nodeId) {
|
|
1013
1220
|
const ctx = this.runContexts.get(id);
|
|
1014
|
-
if (!ctx)
|
|
1221
|
+
if (!ctx) {
|
|
1222
|
+
this.logger.debug("finish-handle-resolution-context-not-found", {
|
|
1223
|
+
runContextId: id,
|
|
1224
|
+
nodeId,
|
|
1225
|
+
});
|
|
1015
1226
|
return;
|
|
1227
|
+
}
|
|
1016
1228
|
ctx.pendingResolvers--;
|
|
1229
|
+
this.logger.debug("finish-handle-resolution", {
|
|
1230
|
+
runContextId: id,
|
|
1231
|
+
nodeId,
|
|
1232
|
+
pendingResolvers: ctx.pendingResolvers,
|
|
1233
|
+
});
|
|
1017
1234
|
this.finishRunContextIfPossible(id);
|
|
1018
1235
|
}
|
|
1019
1236
|
/**
|
|
@@ -1021,13 +1238,22 @@ class RunContextManager {
|
|
|
1021
1238
|
*/
|
|
1022
1239
|
finishRunContextIfPossible(id) {
|
|
1023
1240
|
const ctx = this.runContexts.get(id);
|
|
1024
|
-
if (!ctx)
|
|
1241
|
+
if (!ctx) {
|
|
1242
|
+
this.logger.debug("finish-run-context-not-found", {
|
|
1243
|
+
runContextId: id,
|
|
1244
|
+
});
|
|
1025
1245
|
return;
|
|
1246
|
+
}
|
|
1026
1247
|
if (ctx.pendingNodes > 0 ||
|
|
1027
1248
|
ctx.pendingEdges > 0 ||
|
|
1028
1249
|
ctx.pendingResolvers > 0) {
|
|
1029
1250
|
return; // Still has pending work
|
|
1030
1251
|
}
|
|
1252
|
+
this.logger.info("finish-run-context", {
|
|
1253
|
+
runContextId: id,
|
|
1254
|
+
startNodes: Array.from(ctx.startNodes),
|
|
1255
|
+
cancelledNodes: Array.from(ctx.cancelledNodes),
|
|
1256
|
+
});
|
|
1031
1257
|
// Clean up activeRunContexts from all nodes
|
|
1032
1258
|
this.graph.forEachNode((node) => {
|
|
1033
1259
|
this.graph.removeNodeRunContextId(node.nodeId, id);
|
|
@@ -1065,6 +1291,12 @@ class RunContextManager {
|
|
|
1065
1291
|
});
|
|
1066
1292
|
}
|
|
1067
1293
|
}
|
|
1294
|
+
this.logger.debug("cancel-node-in-run-contexts", {
|
|
1295
|
+
nodeId,
|
|
1296
|
+
includeDownstream,
|
|
1297
|
+
cancelledNodes: Array.from(toCancel),
|
|
1298
|
+
affectedRunContexts: Array.from(this.runContexts.keys()),
|
|
1299
|
+
});
|
|
1068
1300
|
// Mark nodes as cancelled in all run-contexts
|
|
1069
1301
|
for (const ctx of this.runContexts.values()) {
|
|
1070
1302
|
for (const id of toCancel) {
|
|
@@ -1080,6 +1312,11 @@ class RunContextManager {
|
|
|
1080
1312
|
* Resolve all pending run-context promises (for cleanup)
|
|
1081
1313
|
*/
|
|
1082
1314
|
resolveAll() {
|
|
1315
|
+
const count = this.runContexts.size;
|
|
1316
|
+
this.logger.info("resolve-all-run-contexts", {
|
|
1317
|
+
count,
|
|
1318
|
+
runContextIds: Array.from(this.runContexts.keys()),
|
|
1319
|
+
});
|
|
1083
1320
|
for (const ctx of this.runContexts.values()) {
|
|
1084
1321
|
if (ctx.resolve)
|
|
1085
1322
|
ctx.resolve();
|
|
@@ -1089,52 +1326,12 @@ class RunContextManager {
|
|
|
1089
1326
|
* Clear all run-contexts
|
|
1090
1327
|
*/
|
|
1091
1328
|
clear() {
|
|
1329
|
+
const count = this.runContexts.size;
|
|
1330
|
+
this.logger.info("clear-all-run-contexts", { count });
|
|
1092
1331
|
this.runContexts.clear();
|
|
1093
1332
|
}
|
|
1094
1333
|
}
|
|
1095
1334
|
|
|
1096
|
-
const LOG_LEVEL_VALUES = {
|
|
1097
|
-
debug: 0,
|
|
1098
|
-
info: 1,
|
|
1099
|
-
warn: 2,
|
|
1100
|
-
error: 3,
|
|
1101
|
-
silent: 4,
|
|
1102
|
-
};
|
|
1103
|
-
|
|
1104
|
-
/**
|
|
1105
|
-
* Shared utility functions for runtime components
|
|
1106
|
-
*/
|
|
1107
|
-
/**
|
|
1108
|
-
* Type guard to check if a value is a Promise
|
|
1109
|
-
*/
|
|
1110
|
-
function isPromise(value) {
|
|
1111
|
-
return !!value && typeof value.then === "function";
|
|
1112
|
-
}
|
|
1113
|
-
/**
|
|
1114
|
-
* Unwrap a value that might be a Promise
|
|
1115
|
-
*/
|
|
1116
|
-
async function unwrapMaybePromise(value) {
|
|
1117
|
-
return isPromise(value) ? await value : value;
|
|
1118
|
-
}
|
|
1119
|
-
/**
|
|
1120
|
-
* Shallow/deep-ish equality check to avoid unnecessary runs on identical values
|
|
1121
|
-
*/
|
|
1122
|
-
function valuesEqual(a, b) {
|
|
1123
|
-
if (a === b)
|
|
1124
|
-
return true;
|
|
1125
|
-
if (typeof a !== typeof b)
|
|
1126
|
-
return false;
|
|
1127
|
-
if (a && b && typeof a === "object") {
|
|
1128
|
-
try {
|
|
1129
|
-
return JSON.stringify(a) === JSON.stringify(b);
|
|
1130
|
-
}
|
|
1131
|
-
catch {
|
|
1132
|
-
return false;
|
|
1133
|
-
}
|
|
1134
|
-
}
|
|
1135
|
-
return false;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
1335
|
function tryHandleResolving(def, registry, environment) {
|
|
1139
1336
|
const out = new Map();
|
|
1140
1337
|
const pending = new Set();
|
|
@@ -2017,33 +2214,23 @@ class NodeExecutor {
|
|
|
2017
2214
|
progress: Math.max(0, Math.min(1, Number(p) || 0)),
|
|
2018
2215
|
});
|
|
2019
2216
|
});
|
|
2020
|
-
// Create log function that respects node's logLevel
|
|
2217
|
+
// Create log function that respects node's logLevel using LevelLogger
|
|
2218
|
+
const nodeLogLevel = node.logLevel ?? "info";
|
|
2219
|
+
const logger = new LevelLogger(nodeLogLevel, `[node:${runId || nodeId}:${node.typeId}]`);
|
|
2021
2220
|
const log = (level, message, context) => {
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
console.info(fullMessage);
|
|
2036
|
-
break;
|
|
2037
|
-
case "info":
|
|
2038
|
-
console.info(fullMessage);
|
|
2039
|
-
break;
|
|
2040
|
-
case "warn":
|
|
2041
|
-
console.warn(fullMessage);
|
|
2042
|
-
break;
|
|
2043
|
-
case "error":
|
|
2044
|
-
console.error(fullMessage);
|
|
2045
|
-
break;
|
|
2046
|
-
}
|
|
2221
|
+
switch (level) {
|
|
2222
|
+
case "debug":
|
|
2223
|
+
logger.debug(message, context);
|
|
2224
|
+
break;
|
|
2225
|
+
case "info":
|
|
2226
|
+
logger.info(message, context);
|
|
2227
|
+
break;
|
|
2228
|
+
case "warn":
|
|
2229
|
+
logger.warn(message, context);
|
|
2230
|
+
break;
|
|
2231
|
+
case "error":
|
|
2232
|
+
logger.error(message, context);
|
|
2233
|
+
break;
|
|
2047
2234
|
}
|
|
2048
2235
|
};
|
|
2049
2236
|
return {
|
|
@@ -2572,7 +2759,7 @@ class GraphRuntime {
|
|
|
2572
2759
|
// Initialize components
|
|
2573
2760
|
this.graph = new Graph();
|
|
2574
2761
|
this.eventEmitter = new EventEmitter();
|
|
2575
|
-
this.runContextManager = new RunContextManager(this.graph);
|
|
2762
|
+
this.runContextManager = new RunContextManager(this.graph, "debug");
|
|
2576
2763
|
this.handleResolver = new HandleResolver(this.graph, this.eventEmitter, this.runContextManager, this);
|
|
2577
2764
|
this.edgePropagator = new EdgePropagator(this.graph, this.eventEmitter, this.runContextManager, this.handleResolver, this);
|
|
2578
2765
|
// Create NodeExecutor with EdgePropagator and HandleResolver
|
|
@@ -5700,5 +5887,5 @@ function buildValueConverter(config) {
|
|
|
5700
5887
|
};
|
|
5701
5888
|
}
|
|
5702
5889
|
|
|
5703
|
-
export { BaseCompareOperation, BaseLogicOperation, BaseMathOperation, CompositeCategory, ComputeCategory, GraphBuilder, GraphRuntime, LocalEngine, Registry, buildValueConverter, computeGraphCenter, createAsyncGraphDef, createAsyncGraphRegistry, createProgressGraphDef, createProgressGraphRegistry, createSimpleGraphDef, createSimpleGraphRegistry, createValidationGraphDef, createValidationGraphRegistry, findMatchingPaths, generateId, getInputHandleMetadata, getInputTypeId, getTypedOutputTypeId, getTypedOutputValue, getValueAtPath, installLogging, isInputPrivate, isTypedOutput, mergeGraphDefinitions, mergeInputHandleDescriptors, mergeInputsOutputs, mergeRuntimeState, mergeSnapshotData, offsetImportedPositions, parseJsonPath, registerDelayNode, registerProgressNodes, setValueAtPath, setValueAtPathWithCreation, typed };
|
|
5890
|
+
export { BaseCompareOperation, BaseLogicOperation, BaseMathOperation, CompositeCategory, ComputeCategory, GraphBuilder, GraphRuntime, LevelLogger, LocalEngine, Registry, buildValueConverter, computeGraphCenter, createAsyncGraphDef, createAsyncGraphRegistry, createProgressGraphDef, createProgressGraphRegistry, createSimpleGraphDef, createSimpleGraphRegistry, createValidationGraphDef, createValidationGraphRegistry, findMatchingPaths, generateId, getInputHandleMetadata, getInputTypeId, getTypedOutputTypeId, getTypedOutputValue, getValueAtPath, installLogging, isInputPrivate, isTypedOutput, mergeGraphDefinitions, mergeInputHandleDescriptors, mergeInputsOutputs, mergeRuntimeState, mergeSnapshotData, offsetImportedPositions, parseJsonPath, registerDelayNode, registerProgressNodes, setValueAtPath, setValueAtPathWithCreation, typed };
|
|
5704
5891
|
//# sourceMappingURL=index.js.map
|