agentlang 0.5.4 → 0.5.5

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 (71) hide show
  1. package/README.md +29 -5
  2. package/out/language/parser.d.ts +2 -1
  3. package/out/language/parser.d.ts.map +1 -1
  4. package/out/language/parser.js +64 -18
  5. package/out/language/parser.js.map +1 -1
  6. package/out/runtime/defs.d.ts +3 -0
  7. package/out/runtime/defs.d.ts.map +1 -1
  8. package/out/runtime/defs.js +9 -0
  9. package/out/runtime/defs.js.map +1 -1
  10. package/out/runtime/exec-graph.d.ts.map +1 -1
  11. package/out/runtime/exec-graph.js +87 -37
  12. package/out/runtime/exec-graph.js.map +1 -1
  13. package/out/runtime/interpreter.d.ts +16 -0
  14. package/out/runtime/interpreter.d.ts.map +1 -1
  15. package/out/runtime/interpreter.js +163 -37
  16. package/out/runtime/interpreter.js.map +1 -1
  17. package/out/runtime/loader.d.ts.map +1 -1
  18. package/out/runtime/loader.js +11 -9
  19. package/out/runtime/loader.js.map +1 -1
  20. package/out/runtime/module.d.ts +3 -0
  21. package/out/runtime/module.d.ts.map +1 -1
  22. package/out/runtime/module.js +9 -0
  23. package/out/runtime/module.js.map +1 -1
  24. package/out/runtime/modules/ai.d.ts.map +1 -1
  25. package/out/runtime/modules/ai.js +28 -4
  26. package/out/runtime/modules/ai.js.map +1 -1
  27. package/out/runtime/modules/core.d.ts +5 -0
  28. package/out/runtime/modules/core.d.ts.map +1 -1
  29. package/out/runtime/modules/core.js +97 -0
  30. package/out/runtime/modules/core.js.map +1 -1
  31. package/out/runtime/monitor.d.ts +70 -0
  32. package/out/runtime/monitor.d.ts.map +1 -0
  33. package/out/runtime/monitor.js +330 -0
  34. package/out/runtime/monitor.js.map +1 -0
  35. package/out/runtime/state.d.ts +16 -0
  36. package/out/runtime/state.d.ts.map +1 -1
  37. package/out/runtime/state.js +16 -0
  38. package/out/runtime/state.js.map +1 -1
  39. package/out/runtime/util.d.ts +2 -0
  40. package/out/runtime/util.d.ts.map +1 -1
  41. package/out/runtime/util.js +10 -0
  42. package/out/runtime/util.js.map +1 -1
  43. package/out/utils/fs-utils.d.ts +1 -0
  44. package/out/utils/fs-utils.d.ts.map +1 -1
  45. package/out/utils/fs-utils.js +11 -1
  46. package/out/utils/fs-utils.js.map +1 -1
  47. package/package.json +185 -186
  48. package/src/language/parser.ts +68 -25
  49. package/src/runtime/defs.ts +12 -0
  50. package/src/runtime/exec-graph.ts +97 -36
  51. package/src/runtime/interpreter.ts +175 -40
  52. package/src/runtime/loader.ts +11 -8
  53. package/src/runtime/module.ts +12 -0
  54. package/src/runtime/modules/ai.ts +29 -6
  55. package/src/runtime/modules/core.ts +108 -0
  56. package/src/runtime/monitor.ts +369 -0
  57. package/src/runtime/state.ts +19 -0
  58. package/src/runtime/util.ts +12 -0
  59. package/src/utils/fs-utils.ts +11 -1
  60. package/out/setupClassic.d.ts +0 -98
  61. package/out/setupClassic.d.ts.map +0 -1
  62. package/out/setupClassic.js +0 -38
  63. package/out/setupClassic.js.map +0 -1
  64. package/out/setupCommon.d.ts +0 -2
  65. package/out/setupCommon.d.ts.map +0 -1
  66. package/out/setupCommon.js +0 -33
  67. package/out/setupCommon.js.map +0 -1
  68. package/out/setupExtended.d.ts +0 -40
  69. package/out/setupExtended.d.ts.map +0 -1
  70. package/out/setupExtended.js +0 -67
  71. package/out/setupExtended.js.map +0 -1
package/package.json CHANGED
@@ -1,187 +1,186 @@
1
1
  {
2
- "name": "agentlang",
3
- "description": "The easiest way to build the most reliable AI agents - enterprise-grade teams of AI agents that collaborate with each other and humans",
4
- "version": "0.5.4",
5
- "license": "Sustainable Use License",
6
- "author": "agentlang-ai",
7
- "homepage": "https://github.com/agentlang-ai/agentlang#readme",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/agentlang-ai/agentlang.git"
11
- },
12
- "bugs": {
13
- "url": "https://github.com/agentlang-ai/agentlang/issues"
14
- },
15
- "keywords": [
16
- "agentlang",
17
- "agents-generation",
18
- "ai-agents",
19
- "enterprise",
20
- "multi-agent",
21
- "no-code",
22
- "agent-teams",
23
- "production-ready"
24
- ],
25
- "files": [
26
- "bin",
27
- "out",
28
- "src",
29
- "LICENSE"
30
- ],
31
- "type": "module",
32
- "publishConfig": {
33
- "access": "public",
34
- "registry": "https://registry.npmjs.org/"
35
- },
36
- "scripts": {
37
- "build": "tsc -b tsconfig.src.json && tsc -b tsconfig.declarations.json && node esbuild.mjs",
38
- "build:ts": "tsc -b tsconfig.src.json",
39
- "watch": "concurrently -n tsc,esbuild -c blue,yellow \"tsc -b tsconfig.src.json --watch\" \"node esbuild.mjs --watch\"",
40
- "lint": "eslint . --ext .ts",
41
- "lint:fix": "eslint . --ext .ts --fix",
42
- "format": "prettier --write \"src/**/*.{js,ts,tsx,json,md}\"",
43
- "format:check": "prettier --check \"src/**/*.{js,ts,tsx,json,md}\"",
44
- "langium:generate": "langium generate",
45
- "langium:generate:production": "langium generate --mode=production",
46
- "langium:watch": "langium generate --watch",
47
- "vscode:prepublish": "npm run build && npm run lint",
48
- "dev": "vite",
49
- "test": "vitest run",
50
- "test:verbose": "VITEST_VERBOSE=true vitest run"
51
- },
52
- "dependencies": {
53
- "@aws-sdk/client-cognito-identity": "^3.828.0",
54
- "@aws-sdk/client-cognito-identity-provider": "^3.828.0",
55
- "@aws-sdk/credential-providers": "^3.828.0",
56
- "@isomorphic-git/lightning-fs": "^4.6.1",
57
- "@langchain/anthropic": "^0.3.32",
58
- "@langchain/core": "^0.3.78",
59
- "@langchain/openai": "^0.6.16",
60
- "@types/jsonwebtoken": "^9.0.10",
61
- "@types/multer": "^1.4.5-lts.1",
62
- "amazon-cognito-identity-js": "^6.3.15",
63
- "aws-jwt-verify": "^5.1.0",
64
- "bcryptjs": "^3.0.2",
65
- "buffer": "^6.0.3",
66
- "chalk": "~5.3.0",
67
- "commander": "~11.0.0",
68
- "express": "^5.1.0",
69
- "handlebars": "^4.7.8",
70
- "jsonwebtoken": "^9.0.2",
71
- "langchain": "^0.3.36",
72
- "langium": "^3.5.0",
73
- "multer": "^1.4.5-lts.1",
74
- "openapi-client-axios": "^7.6.0",
75
- "pg": "^8.16.1",
76
- "pgvector": "^0.2.1",
77
- "sql.js": "^1.13.0",
78
- "sqlite3": "^5.1.7",
79
- "typeorm": "^0.3.25",
80
- "vscode-languageserver": "^9.0.1",
81
- "winston": "^3.17.0",
82
- "winston-daily-rotate-file": "^5.0.0",
83
- "zod": "^3.25.55"
84
- },
85
- "overrides": {
86
- "semver": "^7.5.3",
87
- "trim-newlines": ">=3.0.1"
88
- },
89
- "devDependencies": {
90
- "@codingame/esbuild-import-meta-url-plugin": "~1.0.2",
91
- "@eslint/js": "^9.26.0",
92
- "@types/cookie-parser": "^1.4.9",
93
- "@types/express": "^5.0.1",
94
- "@types/node": "^18.19.110",
95
- "@types/sql.js": "^1.4.9",
96
- "@types/vscode": "^1.100.0",
97
- "@typescript-eslint/eslint-plugin": "~8.32.1",
98
- "@typescript-eslint/parser": "~8.32.1",
99
- "brace-expansion": ">=2.0.2",
100
- "concurrently": "~8.2.1",
101
- "esbuild": "^0.25.4",
102
- "eslint": "~9.26.0",
103
- "generator-langium": "^3.0.0",
104
- "http-server": "~14.1.1",
105
- "langium-cli": "^3.5.0",
106
- "nodemon": "^3.1.10",
107
- "prettier": "^3.5.3",
108
- "typescript": "^5.8.3",
109
- "typescript-eslint": "^8.32.1",
110
- "vite": "^6.3.5",
111
- "vite-plugin-node-polyfills": "^0.24.0",
112
- "vitest": "^3.1.3",
113
- "vscode-languageclient": "^9.0.1",
114
- "vscode-uri": "^3.1.0"
115
- },
116
- "volta": {
117
- "node": ">=20.0.0",
118
- "npm": ">=10.8.2"
119
- },
120
- "displayName": "agentlang",
121
- "engines": {
122
- "vscode": "^1.67.0",
123
- "node": ">=20.0.0"
124
- },
125
- "categories": [
126
- "Programming Languages"
127
- ],
128
- "contributes": {
129
- "languages": [
130
- {
131
- "id": "agentlang",
132
- "aliases": [
133
- "Agentlang",
134
- "agentlang"
135
- ],
136
- "extensions": [
137
- ".al"
138
- ],
139
- "configuration": "./language-configuration.json"
140
- }
141
- ],
142
- "grammars": [
143
- {
144
- "language": "agentlang",
145
- "scopeName": "source.agentlang",
146
- "path": "syntaxes/agentlang.tmLanguage.json"
147
- }
148
- ]
149
- },
150
- "activationEvents": [
151
- "onLanguage:agentlang"
152
- ],
153
- "main": "./out/extension/main.cjs",
154
- "types": "./out/index.d.ts",
155
- "exports": {
156
- ".": {
157
- "types": "./out/index.d.ts",
158
- "import": "./out/extension/main.cjs",
159
- "require": "./out/extension/main.cjs"
160
- },
161
- "./browser": {
162
- "types": "./out/browser.d.ts",
163
- "import": "./out/browser.js",
164
- "default": "./out/browser.js"
165
- },
166
- "./src/*": {
167
- "types": "./out/*.d.ts",
168
- "import": "./out/*.js",
169
- "require": "./out/*.js",
170
- "default": "./out/*.js"
171
- },
172
- "./out/*": "./out/*"
173
- },
174
- "bin": {
175
- "agentlang-cli": "./bin/cli.js"
176
- },
177
- "lint-staged": {
178
- "*.{js,ts,tsx}": [
179
- "eslint --fix --cache",
180
- "prettier --write"
181
- ],
182
- "*.{json,md,yml,yaml}": [
183
- "prettier --write"
184
- ]
185
- },
186
- "packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad"
187
- }
2
+ "name": "agentlang",
3
+ "description": "The easiest way to build the most reliable AI agents - enterprise-grade teams of AI agents that collaborate with each other and humans",
4
+ "version": "0.5.5",
5
+ "license": "Sustainable Use License",
6
+ "author": "agentlang-ai",
7
+ "homepage": "https://github.com/agentlang-ai/agentlang#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/agentlang-ai/agentlang.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/agentlang-ai/agentlang/issues"
14
+ },
15
+ "keywords": [
16
+ "agentlang",
17
+ "agents-generation",
18
+ "ai-agents",
19
+ "enterprise",
20
+ "multi-agent",
21
+ "no-code",
22
+ "agent-teams",
23
+ "production-ready"
24
+ ],
25
+ "files": [
26
+ "bin",
27
+ "out",
28
+ "src",
29
+ "LICENSE"
30
+ ],
31
+ "type": "module",
32
+ "publishConfig": {
33
+ "access": "public",
34
+ "registry": "https://registry.npmjs.org/"
35
+ },
36
+ "dependencies": {
37
+ "@aws-sdk/client-cognito-identity": "^3.828.0",
38
+ "@aws-sdk/client-cognito-identity-provider": "^3.828.0",
39
+ "@aws-sdk/credential-providers": "^3.828.0",
40
+ "@isomorphic-git/lightning-fs": "^4.6.1",
41
+ "@langchain/anthropic": "^0.3.32",
42
+ "@langchain/core": "^0.3.78",
43
+ "@langchain/openai": "^0.6.16",
44
+ "@types/jsonwebtoken": "^9.0.10",
45
+ "@types/multer": "^1.4.5-lts.1",
46
+ "amazon-cognito-identity-js": "^6.3.15",
47
+ "aws-jwt-verify": "^5.1.0",
48
+ "bcryptjs": "^3.0.2",
49
+ "buffer": "^6.0.3",
50
+ "chalk": "~5.3.0",
51
+ "commander": "~11.0.0",
52
+ "express": "^5.1.0",
53
+ "handlebars": "^4.7.8",
54
+ "jsonwebtoken": "^9.0.2",
55
+ "langchain": "^0.3.36",
56
+ "langium": "^3.5.0",
57
+ "multer": "^1.4.5-lts.1",
58
+ "openapi-client-axios": "^7.6.0",
59
+ "pg": "^8.16.1",
60
+ "pgvector": "^0.2.1",
61
+ "sql.js": "^1.13.0",
62
+ "sqlite3": "^5.1.7",
63
+ "typeorm": "^0.3.25",
64
+ "vscode-languageserver": "^9.0.1",
65
+ "winston": "^3.17.0",
66
+ "winston-daily-rotate-file": "^5.0.0",
67
+ "zod": "^3.25.55"
68
+ },
69
+ "overrides": {
70
+ "semver": "^7.5.3",
71
+ "trim-newlines": ">=3.0.1"
72
+ },
73
+ "devDependencies": {
74
+ "@codingame/esbuild-import-meta-url-plugin": "~1.0.2",
75
+ "@eslint/js": "^9.26.0",
76
+ "@types/cookie-parser": "^1.4.9",
77
+ "@types/express": "^5.0.1",
78
+ "@types/node": "^18.19.110",
79
+ "@types/sql.js": "^1.4.9",
80
+ "@types/vscode": "^1.100.0",
81
+ "@typescript-eslint/eslint-plugin": "~8.32.1",
82
+ "@typescript-eslint/parser": "~8.32.1",
83
+ "brace-expansion": ">=2.0.2",
84
+ "concurrently": "~8.2.1",
85
+ "esbuild": "^0.25.4",
86
+ "eslint": "~9.26.0",
87
+ "generator-langium": "^3.0.0",
88
+ "http-server": "~14.1.1",
89
+ "langium-cli": "^3.5.0",
90
+ "nodemon": "^3.1.10",
91
+ "prettier": "^3.5.3",
92
+ "typescript": "^5.8.3",
93
+ "typescript-eslint": "^8.32.1",
94
+ "vite": "^6.3.5",
95
+ "vite-plugin-node-polyfills": "^0.24.0",
96
+ "vitest": "^3.1.3",
97
+ "vscode-languageclient": "^9.0.1",
98
+ "vscode-uri": "^3.1.0"
99
+ },
100
+ "volta": {
101
+ "node": ">=20.0.0",
102
+ "npm": ">=10.8.2"
103
+ },
104
+ "displayName": "agentlang",
105
+ "engines": {
106
+ "vscode": "^1.67.0",
107
+ "node": ">=20.0.0"
108
+ },
109
+ "categories": [
110
+ "Programming Languages"
111
+ ],
112
+ "contributes": {
113
+ "languages": [
114
+ {
115
+ "id": "agentlang",
116
+ "aliases": [
117
+ "Agentlang",
118
+ "agentlang"
119
+ ],
120
+ "extensions": [
121
+ ".al"
122
+ ],
123
+ "configuration": "./language-configuration.json"
124
+ }
125
+ ],
126
+ "grammars": [
127
+ {
128
+ "language": "agentlang",
129
+ "scopeName": "source.agentlang",
130
+ "path": "syntaxes/agentlang.tmLanguage.json"
131
+ }
132
+ ]
133
+ },
134
+ "activationEvents": [
135
+ "onLanguage:agentlang"
136
+ ],
137
+ "main": "./out/extension/main.cjs",
138
+ "types": "./out/index.d.ts",
139
+ "exports": {
140
+ ".": {
141
+ "types": "./out/index.d.ts",
142
+ "import": "./out/extension/main.cjs",
143
+ "require": "./out/extension/main.cjs"
144
+ },
145
+ "./browser": {
146
+ "types": "./out/browser.d.ts",
147
+ "import": "./out/browser.js",
148
+ "default": "./out/browser.js"
149
+ },
150
+ "./src/*": {
151
+ "types": "./out/*.d.ts",
152
+ "import": "./out/*.js",
153
+ "require": "./out/*.js",
154
+ "default": "./out/*.js"
155
+ },
156
+ "./out/*": "./out/*"
157
+ },
158
+ "bin": {
159
+ "agentlang-cli": "./bin/cli.js"
160
+ },
161
+ "lint-staged": {
162
+ "*.{js,ts,tsx}": [
163
+ "eslint --fix --cache",
164
+ "prettier --write"
165
+ ],
166
+ "*.{json,md,yml,yaml}": [
167
+ "prettier --write"
168
+ ]
169
+ },
170
+ "scripts": {
171
+ "build": "tsc -b tsconfig.src.json && tsc -b tsconfig.declarations.json && node esbuild.mjs",
172
+ "build:ts": "tsc -b tsconfig.src.json",
173
+ "watch": "concurrently -n tsc,esbuild -c blue,yellow \"tsc -b tsconfig.src.json --watch\" \"node esbuild.mjs --watch\"",
174
+ "lint": "eslint . --ext .ts",
175
+ "lint:fix": "eslint . --ext .ts --fix",
176
+ "format": "prettier --write \"src/**/*.{js,ts,tsx,json,md}\"",
177
+ "format:check": "prettier --check \"src/**/*.{js,ts,tsx,json,md}\"",
178
+ "langium:generate": "langium generate",
179
+ "langium:generate:production": "langium generate --mode=production",
180
+ "langium:watch": "langium generate --watch",
181
+ "vscode:prepublish": "npm run build && npm run lint",
182
+ "dev": "vite",
183
+ "test": "vitest run",
184
+ "test:verbose": "VITEST_VERBOSE=true vitest run"
185
+ }
186
+ }
@@ -110,55 +110,89 @@ export async function parseWorkflow(workflowDef: string): Promise<WorkflowDefini
110
110
  }
111
111
  }
112
112
 
113
- export function maybeGetValidationErrors(document: LangiumDocument): string[] | undefined {
113
+ const ErrorIndicator = '<-- ERROR';
114
+
115
+ export function maybeGetValidationErrors(
116
+ document: LangiumDocument,
117
+ lines?: string[]
118
+ ): string[] | undefined {
119
+ if (lines === undefined) {
120
+ lines = document.textDocument.getText().split('\n');
121
+ }
114
122
  const validationErrors = (document.diagnostics ?? []).filter(e => e.severity === 1);
115
123
 
116
124
  const sls = new Set<number>();
117
125
  const scs = new Set<number>();
118
126
  if (validationErrors.length > 0) {
119
- const lineErrs = new Array<string>();
120
127
  for (const validationError of validationErrors) {
121
128
  if (
122
129
  !sls.has(validationError.range.start.line) &&
123
130
  !scs.has(validationError.range.start.character)
124
131
  ) {
125
- const s = document.textDocument.getText(validationError.range);
126
- lineErrs.push(
127
- `Error on line ${validationError.range.start.line + 1}, column ${validationError.range.start.character + 1}, unexpected token(s) '${s}'`
128
- );
132
+ const t = document.textDocument.getText(validationError.range);
133
+ const s = `(${validationError.range.start.line + 1}:${validationError.range.start.character + 1}) unexpected token(s) '${t}'`;
134
+ const ln = lines[validationError.range.start.line];
135
+ if (ln.indexOf(ErrorIndicator) > 0) {
136
+ lines[validationError.range.start.line] = `${ln}, ${s}`;
137
+ } else {
138
+ lines[validationError.range.start.line] = `${ln} ${ErrorIndicator} ${s}`;
139
+ }
129
140
  sls.add(validationError.range.start.line);
130
141
  scs.add(validationError.range.start.character);
131
142
  }
132
143
  }
133
-
134
- return lineErrs;
144
+ return lines;
135
145
  } else {
136
146
  return undefined;
137
147
  }
138
148
  }
139
149
 
150
+ function trimErrorMessage(s: string): string {
151
+ const start = s.indexOf('Expecting:');
152
+ if (start >= 0) {
153
+ const end = s.indexOf('but found:');
154
+ if (end > 0) {
155
+ return `Expecting a valid token sequence, ${s.substring(end)}`;
156
+ }
157
+ }
158
+ return s;
159
+ }
160
+
140
161
  export function maybeRaiseParserErrors(document: LangiumDocument) {
162
+ const code = document.textDocument.getText();
163
+ const lines = code.split('\n');
164
+ let hasErrors = false;
165
+ const errLines = new Set<number>();
141
166
  if (document.parseResult.lexerErrors.length > 0) {
142
- throw new Error(
143
- `Lexer errors: ${document.parseResult.lexerErrors
144
- .map((err: any) => {
145
- return err.message;
146
- })
147
- .join('\n')}`
148
- );
167
+ document.parseResult.lexerErrors.forEach((err: any) => {
168
+ if (!errLines.has(err.line)) {
169
+ const errMsg = trimErrorMessage(err.message);
170
+ const s = `${ErrorIndicator} (${err.line}:${err.column}) ${errMsg}`;
171
+ lines[err.line - 1] = `${lines[err.line - 1]} ${s}`;
172
+ errLines.add(err.line);
173
+ }
174
+ });
175
+ hasErrors = true;
149
176
  }
150
177
  if (document.parseResult.parserErrors.length > 0) {
151
- throw new Error(
152
- `Parser errors: ${document.parseResult.parserErrors
153
- .map((err: any) => {
154
- return err.message;
155
- })
156
- .join('\n')}`
157
- );
178
+ document.parseResult.parserErrors.forEach((err: any) => {
179
+ const errMsg = trimErrorMessage(err.message);
180
+ if (err.token.startLine && err.token.endLine) {
181
+ if (!errLines.has(err.token.startLine)) {
182
+ const s = `${ErrorIndicator} (${err.token.startLine}:${err.token.startColumn}) ${errMsg}`;
183
+ lines[err.token.endLine - 1] = `${lines[err.token.endLine - 1]} ${s}`;
184
+ lines.join('\n');
185
+ errLines.add(err.token.startLine);
186
+ }
187
+ } else {
188
+ lines.push(`ERROR: ${errMsg}`);
189
+ }
190
+ });
191
+ hasErrors = true;
158
192
  }
159
- const errs = maybeGetValidationErrors(document);
160
- if (errs) {
161
- throw new Error(errs.join('\n'));
193
+ const errs = maybeGetValidationErrors(document, lines);
194
+ if (hasErrors || errs !== undefined) {
195
+ throw new Error(lines.join('\n'));
162
196
  }
163
197
  }
164
198
 
@@ -440,3 +474,12 @@ export async function introspectCase(caseStr: string): Promise<CasePattern> {
440
474
  const ifPat = pat[0] as IfPattern;
441
475
  return { condition: ifPat.condition, body: ifPat.body[0] };
442
476
  }
477
+
478
+ export function canParse(s: string): boolean {
479
+ const ts = s.trim();
480
+ if (ts) {
481
+ const contents = ts.substring(1, ts.length - 1).trim();
482
+ return contents.length > 0;
483
+ }
484
+ return false;
485
+ }
@@ -134,6 +134,7 @@ export class ExecGraph {
134
134
  private rootNodes: ExecGraphNode[];
135
135
  private subGraphs: ExecGraph[];
136
136
  private parentGraph: ExecGraph | undefined = undefined;
137
+ private eventName: string | undefined;
137
138
  private activeModuleName: string | undefined;
138
139
  private hasAgentsFlag: boolean = false;
139
140
  private loopBody: boolean = false;
@@ -212,6 +213,17 @@ export class ExecGraph {
212
213
  return this.parentGraph;
213
214
  }
214
215
 
216
+ setEventName(eventName: string | undefined): ExecGraph {
217
+ if (eventName !== undefined) {
218
+ this.eventName = eventName;
219
+ }
220
+ return this;
221
+ }
222
+
223
+ getEventName(): string | undefined {
224
+ return this.eventName;
225
+ }
226
+
215
227
  setHasAgents(flag: boolean): ExecGraph {
216
228
  this.hasAgentsFlag = flag;
217
229
  if (this.parentGraph) {