agentlang 0.4.4 → 0.4.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.
- package/out/api/http.d.ts.map +1 -1
- package/out/api/http.js +3 -0
- package/out/api/http.js.map +1 -1
- package/out/language/generated/ast.d.ts +21 -3
- package/out/language/generated/ast.d.ts.map +1 -1
- package/out/language/generated/ast.js +28 -1
- package/out/language/generated/ast.js.map +1 -1
- package/out/language/generated/grammar.d.ts.map +1 -1
- package/out/language/generated/grammar.js +286 -129
- package/out/language/generated/grammar.js.map +1 -1
- package/out/language/main.cjs +308 -130
- package/out/language/main.cjs.map +2 -2
- package/out/runtime/loader.d.ts.map +1 -1
- package/out/runtime/loader.js +67 -2
- package/out/runtime/loader.js.map +1 -1
- package/out/runtime/module.d.ts +33 -0
- package/out/runtime/module.d.ts.map +1 -1
- package/out/runtime/module.js +161 -0
- package/out/runtime/module.js.map +1 -1
- package/out/runtime/modules/ai.d.ts +6 -0
- package/out/runtime/modules/ai.d.ts.map +1 -1
- package/out/runtime/modules/ai.js +71 -2
- package/out/runtime/modules/ai.js.map +1 -1
- package/out/runtime/modules/core.d.ts.map +1 -1
- package/out/runtime/modules/core.js +10 -1
- package/out/runtime/modules/core.js.map +1 -1
- package/out/runtime/util.d.ts.map +1 -1
- package/out/runtime/util.js +0 -1
- package/out/runtime/util.js.map +1 -1
- package/out/syntaxes/agentlang.monarch.js +1 -1
- package/out/syntaxes/agentlang.monarch.js.map +1 -1
- package/package.json +183 -184
- package/src/api/http.ts +3 -0
- package/src/language/agentlang.langium +5 -1
- package/src/language/generated/ast.ts +53 -3
- package/src/language/generated/grammar.ts +286 -129
- package/src/runtime/loader.ts +66 -0
- package/src/runtime/module.ts +187 -0
- package/src/runtime/modules/ai.ts +97 -2
- package/src/runtime/modules/core.ts +10 -1
- package/src/runtime/util.ts +0 -2
- package/src/syntaxes/agentlang.monarch.ts +1 -1
- package/out/runtime/modules/files.d.ts +0 -18
- package/out/runtime/modules/files.d.ts.map +0 -1
- package/out/runtime/modules/files.js +0 -116
- package/out/runtime/modules/files.js.map +0 -1
- package/out/setupClassic.d.ts +0 -98
- package/out/setupClassic.d.ts.map +0 -1
- package/out/setupClassic.js +0 -38
- package/out/setupClassic.js.map +0 -1
- package/out/setupCommon.d.ts +0 -2
- package/out/setupCommon.d.ts.map +0 -1
- package/out/setupCommon.js +0 -33
- package/out/setupCommon.js.map +0 -1
- package/out/setupExtended.d.ts +0 -40
- package/out/setupExtended.d.ts.map +0 -1
- package/out/setupExtended.js +0 -67
- package/out/setupExtended.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,185 +1,184 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
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.4.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
|
+
"amazon-cognito-identity-js": "^6.3.15",
|
|
46
|
+
"aws-jwt-verify": "^5.1.0",
|
|
47
|
+
"bcryptjs": "^3.0.2",
|
|
48
|
+
"buffer": "^6.0.3",
|
|
49
|
+
"chalk": "~5.3.0",
|
|
50
|
+
"commander": "~11.0.0",
|
|
51
|
+
"express": "^5.1.0",
|
|
52
|
+
"handlebars": "^4.7.8",
|
|
53
|
+
"jsonwebtoken": "^9.0.2",
|
|
54
|
+
"langchain": "^0.3.36",
|
|
55
|
+
"langium": "^3.5.0",
|
|
56
|
+
"openapi-client-axios": "^7.6.0",
|
|
57
|
+
"pg": "^8.16.1",
|
|
58
|
+
"pgvector": "^0.2.1",
|
|
59
|
+
"sql.js": "^1.13.0",
|
|
60
|
+
"sqlite3": "^5.1.7",
|
|
61
|
+
"typeorm": "^0.3.25",
|
|
62
|
+
"vscode-languageserver": "^9.0.1",
|
|
63
|
+
"winston": "^3.17.0",
|
|
64
|
+
"winston-daily-rotate-file": "^5.0.0",
|
|
65
|
+
"zod": "^3.25.55"
|
|
66
|
+
},
|
|
67
|
+
"overrides": {
|
|
68
|
+
"semver": "^7.5.3",
|
|
69
|
+
"trim-newlines": ">=3.0.1"
|
|
70
|
+
},
|
|
71
|
+
"devDependencies": {
|
|
72
|
+
"@codingame/esbuild-import-meta-url-plugin": "~1.0.2",
|
|
73
|
+
"@eslint/js": "^9.26.0",
|
|
74
|
+
"@types/cookie-parser": "^1.4.9",
|
|
75
|
+
"@types/express": "^5.0.1",
|
|
76
|
+
"@types/node": "^18.19.110",
|
|
77
|
+
"@types/sql.js": "^1.4.9",
|
|
78
|
+
"@types/vscode": "^1.100.0",
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "~8.32.1",
|
|
80
|
+
"@typescript-eslint/parser": "~8.32.1",
|
|
81
|
+
"brace-expansion": ">=2.0.2",
|
|
82
|
+
"concurrently": "~8.2.1",
|
|
83
|
+
"esbuild": "^0.25.4",
|
|
84
|
+
"eslint": "~9.26.0",
|
|
85
|
+
"generator-langium": "^3.0.0",
|
|
86
|
+
"http-server": "~14.1.1",
|
|
87
|
+
"langium-cli": "^3.5.0",
|
|
88
|
+
"nodemon": "^3.1.10",
|
|
89
|
+
"prettier": "^3.5.3",
|
|
90
|
+
"typescript": "^5.8.3",
|
|
91
|
+
"typescript-eslint": "^8.32.1",
|
|
92
|
+
"vite": "^6.3.5",
|
|
93
|
+
"vite-plugin-node-polyfills": "^0.24.0",
|
|
94
|
+
"vitest": "^3.1.3",
|
|
95
|
+
"vscode-languageclient": "^9.0.1",
|
|
96
|
+
"vscode-uri": "^3.1.0"
|
|
97
|
+
},
|
|
98
|
+
"volta": {
|
|
99
|
+
"node": ">=20.0.0",
|
|
100
|
+
"npm": ">=10.8.2"
|
|
101
|
+
},
|
|
102
|
+
"displayName": "agentlang",
|
|
103
|
+
"engines": {
|
|
104
|
+
"vscode": "^1.67.0",
|
|
105
|
+
"node": ">=20.0.0"
|
|
106
|
+
},
|
|
107
|
+
"categories": [
|
|
108
|
+
"Programming Languages"
|
|
109
|
+
],
|
|
110
|
+
"contributes": {
|
|
111
|
+
"languages": [
|
|
112
|
+
{
|
|
113
|
+
"id": "agentlang",
|
|
114
|
+
"aliases": [
|
|
115
|
+
"Agentlang",
|
|
116
|
+
"agentlang"
|
|
117
|
+
],
|
|
118
|
+
"extensions": [
|
|
119
|
+
".al"
|
|
120
|
+
],
|
|
121
|
+
"configuration": "./language-configuration.json"
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
"grammars": [
|
|
125
|
+
{
|
|
126
|
+
"language": "agentlang",
|
|
127
|
+
"scopeName": "source.agentlang",
|
|
128
|
+
"path": "syntaxes/agentlang.tmLanguage.json"
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
"activationEvents": [
|
|
133
|
+
"onLanguage:agentlang"
|
|
134
|
+
],
|
|
135
|
+
"main": "./out/extension/main.cjs",
|
|
136
|
+
"types": "./out/index.d.ts",
|
|
137
|
+
"exports": {
|
|
138
|
+
".": {
|
|
139
|
+
"types": "./out/index.d.ts",
|
|
140
|
+
"import": "./out/extension/main.cjs",
|
|
141
|
+
"require": "./out/extension/main.cjs"
|
|
142
|
+
},
|
|
143
|
+
"./browser": {
|
|
144
|
+
"types": "./out/browser.d.ts",
|
|
145
|
+
"import": "./out/browser.js",
|
|
146
|
+
"default": "./out/browser.js"
|
|
147
|
+
},
|
|
148
|
+
"./src/*": {
|
|
149
|
+
"types": "./out/*.d.ts",
|
|
150
|
+
"import": "./out/*.js",
|
|
151
|
+
"require": "./out/*.js",
|
|
152
|
+
"default": "./out/*.js"
|
|
153
|
+
},
|
|
154
|
+
"./out/*": "./out/*"
|
|
155
|
+
},
|
|
156
|
+
"bin": {
|
|
157
|
+
"agentlang-cli": "./bin/cli.js"
|
|
158
|
+
},
|
|
159
|
+
"lint-staged": {
|
|
160
|
+
"*.{js,ts,tsx}": [
|
|
161
|
+
"eslint --fix --cache",
|
|
162
|
+
"prettier --write"
|
|
163
|
+
],
|
|
164
|
+
"*.{json,md,yml,yaml}": [
|
|
165
|
+
"prettier --write"
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
"scripts": {
|
|
169
|
+
"build": "tsc -b tsconfig.src.json && tsc -b tsconfig.declarations.json && node esbuild.mjs",
|
|
170
|
+
"build:ts": "tsc -b tsconfig.src.json",
|
|
171
|
+
"watch": "concurrently -n tsc,esbuild -c blue,yellow \"tsc -b tsconfig.src.json --watch\" \"node esbuild.mjs --watch\"",
|
|
172
|
+
"lint": "eslint . --ext .ts",
|
|
173
|
+
"lint:fix": "eslint . --ext .ts --fix",
|
|
174
|
+
"format": "prettier --write \"src/**/*.{js,ts,tsx,json,md}\"",
|
|
175
|
+
"format:check": "prettier --check \"src/**/*.{js,ts,tsx,json,md}\"",
|
|
176
|
+
"langium:generate": "langium generate",
|
|
177
|
+
"langium:generate:production": "langium generate --mode=production",
|
|
178
|
+
"langium:watch": "langium generate --watch",
|
|
179
|
+
"vscode:prepublish": "npm run build && npm run lint",
|
|
180
|
+
"dev": "vite",
|
|
181
|
+
"test": "vitest run",
|
|
182
|
+
"test:verbose": "VITEST_VERBOSE=true vitest run"
|
|
183
|
+
}
|
|
184
|
+
}
|
package/src/api/http.ts
CHANGED
|
@@ -90,6 +90,9 @@ export function startServer(appSpec: ApplicationSpec, port: number, host?: strin
|
|
|
90
90
|
app.put(`/${moduleName}/${n}/*path`, (req: Request, res: Response) => {
|
|
91
91
|
handleEntityPut(moduleName, n, req, res);
|
|
92
92
|
});
|
|
93
|
+
app.patch(`/${moduleName}/${n}/*path`, (req: Request, res: Response) => {
|
|
94
|
+
handleEntityPut(moduleName, n, req, res);
|
|
95
|
+
});
|
|
93
96
|
app.delete(`/${moduleName}/${n}/*path`, (req: Request, res: Response) => {
|
|
94
97
|
handleEntityDelete(moduleName, n, req, res);
|
|
95
98
|
});
|
|
@@ -6,7 +6,7 @@ Import: 'import' path=STRING '@as' name=ID;
|
|
|
6
6
|
|
|
7
7
|
Definition: SchemaDefinition | RelationshipDefinition | WorkflowDefinition | PublicWorkflowDefinition | StandaloneStatement
|
|
8
8
|
| AgentDefinition | PublicAgentDefinition | ResolverDefinition | FlowDefinition | DecisionDefinition | ScenarioDefinition
|
|
9
|
-
| DirectiveDefinition | GlossaryEntryDefinition;
|
|
9
|
+
| DirectiveDefinition | GlossaryEntryDefinition | RetryDefinition;
|
|
10
10
|
|
|
11
11
|
StandaloneStatement: stmt=Statement;
|
|
12
12
|
|
|
@@ -166,6 +166,10 @@ DirectiveDefinition: 'directive' name=Ref (body=MapLiteral? | '{' dir=If? '}' |
|
|
|
166
166
|
|
|
167
167
|
GlossaryEntryDefinition: 'glossaryEntry' name=Ref (body=MapLiteral? | glos=AgentXtraSpec? | '{''}');
|
|
168
168
|
|
|
169
|
+
RetryDefinition: 'agentlang/retry' name=ID '{' ('attempts' attempts=Decimal)? (',' backoff=BackoffSpec)? '}';
|
|
170
|
+
|
|
171
|
+
BackoffSpec: 'backoff' '{' (attributes+=SetAttribute (',' attributes+=SetAttribute)*)+ '}';
|
|
172
|
+
|
|
169
173
|
ResolverDefinition: 'resolver' name=GenericName '[' (paths+=GenericName (',' paths+=GenericName)*)+ ']'
|
|
170
174
|
'{' (methods+=ResolverMethodSpec (',' methods+=ResolverMethodSpec)*)+ '}';
|
|
171
175
|
|
|
@@ -61,9 +61,12 @@ export type AgentlangKeywordNames =
|
|
|
61
61
|
| "["
|
|
62
62
|
| "]"
|
|
63
63
|
| "agent"
|
|
64
|
+
| "agentlang/retry"
|
|
64
65
|
| "allow"
|
|
65
66
|
| "and"
|
|
67
|
+
| "attempts"
|
|
66
68
|
| "await"
|
|
69
|
+
| "backoff"
|
|
67
70
|
| "between"
|
|
68
71
|
| "case"
|
|
69
72
|
| "commitTransaction"
|
|
@@ -132,7 +135,7 @@ export function isDecimal(item: unknown): item is Decimal {
|
|
|
132
135
|
return typeof item === 'number';
|
|
133
136
|
}
|
|
134
137
|
|
|
135
|
-
export type Definition = AgentDefinition | DecisionDefinition | DirectiveDefinition | FlowDefinition | GlossaryEntryDefinition | PublicAgentDefinition | PublicWorkflowDefinition | RelationshipDefinition | ResolverDefinition | ScenarioDefinition | SchemaDefinition | StandaloneStatement | WorkflowDefinition;
|
|
138
|
+
export type Definition = AgentDefinition | DecisionDefinition | DirectiveDefinition | FlowDefinition | GlossaryEntryDefinition | PublicAgentDefinition | PublicWorkflowDefinition | RelationshipDefinition | ResolverDefinition | RetryDefinition | ScenarioDefinition | SchemaDefinition | StandaloneStatement | WorkflowDefinition;
|
|
136
139
|
|
|
137
140
|
export const Definition = 'Definition';
|
|
138
141
|
|
|
@@ -325,6 +328,18 @@ export function isAttributeDefinition(item: unknown): item is AttributeDefinitio
|
|
|
325
328
|
return reflection.isInstance(item, AttributeDefinition);
|
|
326
329
|
}
|
|
327
330
|
|
|
331
|
+
export interface BackoffSpec extends langium.AstNode {
|
|
332
|
+
readonly $container: RetryDefinition;
|
|
333
|
+
readonly $type: 'BackoffSpec';
|
|
334
|
+
attributes: Array<SetAttribute>;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export const BackoffSpec = 'BackoffSpec';
|
|
338
|
+
|
|
339
|
+
export function isBackoffSpec(item: unknown): item is BackoffSpec {
|
|
340
|
+
return reflection.isInstance(item, BackoffSpec);
|
|
341
|
+
}
|
|
342
|
+
|
|
328
343
|
export interface BeforeTriggerDefinition extends langium.AstNode {
|
|
329
344
|
readonly $container: PrePostTriggerDefinition;
|
|
330
345
|
readonly $type: 'BeforeTriggerDefinition';
|
|
@@ -1216,6 +1231,20 @@ export function isResolverMethodSpec(item: unknown): item is ResolverMethodSpec
|
|
|
1216
1231
|
return reflection.isInstance(item, ResolverMethodSpec);
|
|
1217
1232
|
}
|
|
1218
1233
|
|
|
1234
|
+
export interface RetryDefinition extends langium.AstNode {
|
|
1235
|
+
readonly $container: ModuleDefinition;
|
|
1236
|
+
readonly $type: 'RetryDefinition';
|
|
1237
|
+
attempts?: Decimal;
|
|
1238
|
+
backoff?: BackoffSpec;
|
|
1239
|
+
name: string;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
export const RetryDefinition = 'RetryDefinition';
|
|
1243
|
+
|
|
1244
|
+
export function isRetryDefinition(item: unknown): item is RetryDefinition {
|
|
1245
|
+
return reflection.isInstance(item, RetryDefinition);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1219
1248
|
export interface Return extends langium.AstNode {
|
|
1220
1249
|
readonly $container: Pattern;
|
|
1221
1250
|
readonly $type: 'Return';
|
|
@@ -1282,7 +1311,7 @@ export function isSelectIntoSpec(item: unknown): item is SelectIntoSpec {
|
|
|
1282
1311
|
}
|
|
1283
1312
|
|
|
1284
1313
|
export interface SetAttribute extends langium.AstNode {
|
|
1285
|
-
readonly $container: CrudMapBody;
|
|
1314
|
+
readonly $container: BackoffSpec | CrudMapBody;
|
|
1286
1315
|
readonly $type: 'SetAttribute';
|
|
1287
1316
|
name: QueryId;
|
|
1288
1317
|
op?: '!=' | '<' | '<=' | '<>' | '=' | '>' | '>=' | 'between' | 'in' | 'like';
|
|
@@ -1397,6 +1426,7 @@ export type AgentlangAstType = {
|
|
|
1397
1426
|
AsyncFnCall: AsyncFnCall
|
|
1398
1427
|
AttributeDefinition: AttributeDefinition
|
|
1399
1428
|
AttributeValueExpression: AttributeValueExpression
|
|
1429
|
+
BackoffSpec: BackoffSpec
|
|
1400
1430
|
BeforeTriggerDefinition: BeforeTriggerDefinition
|
|
1401
1431
|
BinExpr: BinExpr
|
|
1402
1432
|
CaseEntry: CaseEntry
|
|
@@ -1468,6 +1498,7 @@ export type AgentlangAstType = {
|
|
|
1468
1498
|
ResolverFnName: ResolverFnName
|
|
1469
1499
|
ResolverMethodName: ResolverMethodName
|
|
1470
1500
|
ResolverMethodSpec: ResolverMethodSpec
|
|
1501
|
+
RetryDefinition: RetryDefinition
|
|
1471
1502
|
Return: Return
|
|
1472
1503
|
RuntimeHint: RuntimeHint
|
|
1473
1504
|
ScenarioDefinition: ScenarioDefinition
|
|
@@ -1487,7 +1518,7 @@ export type AgentlangAstType = {
|
|
|
1487
1518
|
export class AgentlangAstReflection extends langium.AbstractAstReflection {
|
|
1488
1519
|
|
|
1489
1520
|
getAllTypes(): string[] {
|
|
1490
|
-
return [ActionEntry, AfterTriggerDefinition, AgentDefinition, AgentXtraAttribute, AgentXtraSpec, AliasSpec, ArrayLiteral, AsyncFnCall, AttributeDefinition, AttributeValueExpression, BeforeTriggerDefinition, BinExpr, CaseEntry, CatchSpec, CompositeUniqueDefinition, ConditionalFlowStep, CrudMap, CrudMapBody, DecisionDefBody, DecisionDefinition, Definition, Delete, DirectiveDefinition, Else, EntityActionsDefinitions, EntityDefinition, EnumSpec, EventDefinition, Expr, ExtendsClause, FlowDefBody, FlowDefinition, FlowEntry, FnCall, ForEach, FullTextSearch, GenericDefBody, GenericPropertyDef, GlossaryEntryDefinition, Group, Handler, If, Import, KvPair, KvPairs, Literal, MapEntry, MapKey, MapLiteral, MetaDefinition, ModuleDefinition, NegExpr, NodeDefinition, NotExpr, OneOfSpec, Pattern, PrePostTriggerDefinition, PrimExpr, PropertyDefinition, PublicAgentDefinition, PublicEventDefinition, PublicWorkflowDefinition, Purge, RbacAllowSpec, RbacExpressionSpec, RbacOpr, RbacRolesSpec, RbacSpecDefinition, RbacSpecEntries, RbacSpecEntry, RecordDefinition, RecordExtraDefinition, RecordSchemaDefinition, RefSpec, RelNodes, RelationshipDefinition, RelationshipPattern, ResolverDefinition, ResolverFnName, ResolverMethodName, ResolverMethodSpec, Return, RuntimeHint, ScenarioDefinition, SchemaDefinition, SelectIntoEntry, SelectIntoSpec, SetAttribute, StandaloneStatement, Statement, ThenSpec, TriggerDefinition, TriggerEntry, WorkflowDefinition, WorkflowHeader];
|
|
1521
|
+
return [ActionEntry, AfterTriggerDefinition, AgentDefinition, AgentXtraAttribute, AgentXtraSpec, AliasSpec, ArrayLiteral, AsyncFnCall, AttributeDefinition, AttributeValueExpression, BackoffSpec, BeforeTriggerDefinition, BinExpr, CaseEntry, CatchSpec, CompositeUniqueDefinition, ConditionalFlowStep, CrudMap, CrudMapBody, DecisionDefBody, DecisionDefinition, Definition, Delete, DirectiveDefinition, Else, EntityActionsDefinitions, EntityDefinition, EnumSpec, EventDefinition, Expr, ExtendsClause, FlowDefBody, FlowDefinition, FlowEntry, FnCall, ForEach, FullTextSearch, GenericDefBody, GenericPropertyDef, GlossaryEntryDefinition, Group, Handler, If, Import, KvPair, KvPairs, Literal, MapEntry, MapKey, MapLiteral, MetaDefinition, ModuleDefinition, NegExpr, NodeDefinition, NotExpr, OneOfSpec, Pattern, PrePostTriggerDefinition, PrimExpr, PropertyDefinition, PublicAgentDefinition, PublicEventDefinition, PublicWorkflowDefinition, Purge, RbacAllowSpec, RbacExpressionSpec, RbacOpr, RbacRolesSpec, RbacSpecDefinition, RbacSpecEntries, RbacSpecEntry, RecordDefinition, RecordExtraDefinition, RecordSchemaDefinition, RefSpec, RelNodes, RelationshipDefinition, RelationshipPattern, ResolverDefinition, ResolverFnName, ResolverMethodName, ResolverMethodSpec, RetryDefinition, Return, RuntimeHint, ScenarioDefinition, SchemaDefinition, SelectIntoEntry, SelectIntoSpec, SetAttribute, StandaloneStatement, Statement, ThenSpec, TriggerDefinition, TriggerEntry, WorkflowDefinition, WorkflowHeader];
|
|
1491
1522
|
}
|
|
1492
1523
|
|
|
1493
1524
|
protected override computeIsSubtype(subtype: string, supertype: string): boolean {
|
|
@@ -1501,6 +1532,7 @@ export class AgentlangAstReflection extends langium.AbstractAstReflection {
|
|
|
1501
1532
|
case PublicWorkflowDefinition:
|
|
1502
1533
|
case RelationshipDefinition:
|
|
1503
1534
|
case ResolverDefinition:
|
|
1535
|
+
case RetryDefinition:
|
|
1504
1536
|
case ScenarioDefinition:
|
|
1505
1537
|
case SchemaDefinition:
|
|
1506
1538
|
case StandaloneStatement:
|
|
@@ -1626,6 +1658,14 @@ export class AgentlangAstReflection extends langium.AbstractAstReflection {
|
|
|
1626
1658
|
]
|
|
1627
1659
|
};
|
|
1628
1660
|
}
|
|
1661
|
+
case BackoffSpec: {
|
|
1662
|
+
return {
|
|
1663
|
+
name: BackoffSpec,
|
|
1664
|
+
properties: [
|
|
1665
|
+
{ name: 'attributes', defaultValue: [] }
|
|
1666
|
+
]
|
|
1667
|
+
};
|
|
1668
|
+
}
|
|
1629
1669
|
case BeforeTriggerDefinition: {
|
|
1630
1670
|
return {
|
|
1631
1671
|
name: BeforeTriggerDefinition,
|
|
@@ -2246,6 +2286,16 @@ export class AgentlangAstReflection extends langium.AbstractAstReflection {
|
|
|
2246
2286
|
]
|
|
2247
2287
|
};
|
|
2248
2288
|
}
|
|
2289
|
+
case RetryDefinition: {
|
|
2290
|
+
return {
|
|
2291
|
+
name: RetryDefinition,
|
|
2292
|
+
properties: [
|
|
2293
|
+
{ name: 'attempts' },
|
|
2294
|
+
{ name: 'backoff' },
|
|
2295
|
+
{ name: 'name' }
|
|
2296
|
+
]
|
|
2297
|
+
};
|
|
2298
|
+
}
|
|
2249
2299
|
case Return: {
|
|
2250
2300
|
return {
|
|
2251
2301
|
name: Return,
|