agentlang 0.0.66 → 0.0.68
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/README.md +9 -9
- package/out/api/http.d.ts.map +1 -1
- package/out/api/http.js +2 -1
- package/out/api/http.js.map +1 -1
- package/out/cli/main.d.ts.map +1 -1
- package/out/cli/main.js +7 -1
- package/out/cli/main.js.map +1 -1
- package/out/language/generated/ast.d.ts +1 -1
- package/out/language/generated/ast.d.ts.map +1 -1
- package/out/language/generated/ast.js +2 -1
- package/out/language/generated/ast.js.map +1 -1
- package/out/language/generated/grammar.js +1 -1
- package/out/language/main.cjs +2 -2
- package/out/language/main.cjs.map +2 -2
- package/out/runtime/defs.d.ts +58 -0
- package/out/runtime/defs.d.ts.map +1 -1
- package/out/runtime/defs.js +172 -0
- package/out/runtime/defs.js.map +1 -1
- package/out/runtime/exec-graph.d.ts +17 -0
- package/out/runtime/exec-graph.d.ts.map +1 -0
- package/out/runtime/exec-graph.js +434 -0
- package/out/runtime/exec-graph.js.map +1 -0
- package/out/runtime/interpreter.d.ts +38 -3
- package/out/runtime/interpreter.d.ts.map +1 -1
- package/out/runtime/interpreter.js +165 -73
- package/out/runtime/interpreter.js.map +1 -1
- package/out/runtime/module.d.ts +1 -0
- package/out/runtime/module.d.ts.map +1 -1
- package/out/runtime/module.js +14 -6
- package/out/runtime/module.js.map +1 -1
- package/out/runtime/modules/ai.d.ts +0 -1
- package/out/runtime/modules/ai.d.ts.map +1 -1
- package/out/runtime/modules/ai.js +0 -1
- package/out/runtime/modules/ai.js.map +1 -1
- package/out/runtime/modules/auth.d.ts.map +1 -1
- package/out/runtime/modules/auth.js +13 -13
- package/out/runtime/modules/auth.js.map +1 -1
- package/out/runtime/resolvers/interface.d.ts +1 -0
- package/out/runtime/resolvers/interface.d.ts.map +1 -1
- package/out/runtime/resolvers/interface.js +5 -0
- package/out/runtime/resolvers/interface.js.map +1 -1
- package/out/utils/runtime.d.ts +1 -0
- package/out/utils/runtime.d.ts.map +1 -1
- package/out/utils/runtime.js +4 -0
- package/out/utils/runtime.js.map +1 -1
- package/package.json +180 -156
- package/src/api/http.ts +2 -1
- package/src/cli/main.ts +8 -1
- package/src/language/agentlang.langium +3 -2
- package/src/language/generated/ast.ts +3 -3
- package/src/language/generated/grammar.ts +1 -1
- package/src/runtime/defs.ts +210 -0
- package/src/runtime/exec-graph.ts +518 -0
- package/src/runtime/interpreter.ts +202 -81
- package/src/runtime/module.ts +15 -6
- package/src/runtime/modules/ai.ts +0 -2
- package/src/runtime/modules/auth.ts +25 -18
- package/src/runtime/resolvers/interface.ts +5 -0
- package/src/utils/runtime.ts +6 -0
package/package.json
CHANGED
|
@@ -1,158 +1,182 @@
|
|
|
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
|
-
|
|
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.0.68",
|
|
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": ["bin", "out", "src", "LICENSE"],
|
|
26
|
+
"type": "module",
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public",
|
|
29
|
+
"registry": "https://registry.npmjs.org/"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"install:pnpm": "pnpm install --prefer-offline",
|
|
33
|
+
"build": "tsc -b tsconfig.src.json && tsc -b tsconfig.declarations.json && node esbuild.mjs",
|
|
34
|
+
"build:ts": "tsc -b tsconfig.src.json",
|
|
35
|
+
"build:vite": "vite build --emptyOutDir",
|
|
36
|
+
"watch": "concurrently -n tsc,esbuild -c blue,yellow \"tsc -b tsconfig.src.json --watch\" \"node esbuild.mjs --watch\"",
|
|
37
|
+
"lint": "eslint . --ext .ts",
|
|
38
|
+
"lint:fix": "eslint . --ext .ts --fix",
|
|
39
|
+
"format": "prettier --write \"src/**/*.{js,ts,tsx,json,md}\"",
|
|
40
|
+
"format:check": "prettier --check \"src/**/*.{js,ts,tsx,json,md}\"",
|
|
41
|
+
"langium:generate": "langium generate",
|
|
42
|
+
"langium:generate:production": "langium generate --mode=production",
|
|
43
|
+
"langium:watch": "langium generate --watch",
|
|
44
|
+
"vscode:prepublish": "npm run build && npm run lint",
|
|
45
|
+
"build:web": "npm run build",
|
|
46
|
+
"bundle": "vite build",
|
|
47
|
+
"bundle:serve": "http-server ./dist --port 5175",
|
|
48
|
+
"dev": "vite",
|
|
49
|
+
"dev:debug": "vite --debug --force",
|
|
50
|
+
"serve": "npm run dev",
|
|
51
|
+
"test": "vitest run",
|
|
52
|
+
"test:verbose": "VITEST_VERBOSE=true vitest run",
|
|
53
|
+
"test:debug": "DEBUG=true vitest run"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@aws-sdk/client-cognito-identity": "^3.828.0",
|
|
57
|
+
"@aws-sdk/client-cognito-identity-provider": "^3.828.0",
|
|
58
|
+
"@aws-sdk/credential-providers": "^3.828.0",
|
|
59
|
+
"@codingame/monaco-vscode-editor-service-override": "^17.1.0",
|
|
60
|
+
"@codingame/monaco-vscode-keybindings-service-override": "^17.1.0",
|
|
61
|
+
"@isomorphic-git/lightning-fs": "^4.6.1",
|
|
62
|
+
"@langchain/anthropic": "^0.3.25",
|
|
63
|
+
"@langchain/core": "^0.3.59",
|
|
64
|
+
"@langchain/openai": "^0.5.18",
|
|
65
|
+
"@types/express": "^5.0.1",
|
|
66
|
+
"amazon-cognito-identity-js": "^6.3.15",
|
|
67
|
+
"aws-jwt-verify": "^5.1.0",
|
|
68
|
+
"bcryptjs": "^3.0.2",
|
|
69
|
+
"buffer": "^6.0.3",
|
|
70
|
+
"chalk": "~5.3.0",
|
|
71
|
+
"commander": "~11.0.0",
|
|
72
|
+
"dotenv": "^16.5.0",
|
|
73
|
+
"express": "^5.1.0",
|
|
74
|
+
"fs-extra": "^11.3.0",
|
|
75
|
+
"generator-langium": "^3.0.0",
|
|
76
|
+
"jsonwebtoken": "^9.0.2",
|
|
77
|
+
"jwk-to-pem": "^2.0.7",
|
|
78
|
+
"langchain": "^0.3.28",
|
|
79
|
+
"langium": "^3.5.0",
|
|
80
|
+
"monaco-editor": "~0.52.0",
|
|
81
|
+
"monaco-editor-wrapper": "^6.7.0",
|
|
82
|
+
"node-fetch": "^2.7.0",
|
|
83
|
+
"openapi-client-axios": "^7.6.0",
|
|
84
|
+
"pg": "^8.16.1",
|
|
85
|
+
"pgvector": "^0.2.1",
|
|
86
|
+
"sqlite3": "^5.1.7",
|
|
87
|
+
"typeorm": "^0.3.25",
|
|
88
|
+
"vscode-languageclient": "^9.0.1",
|
|
89
|
+
"vscode-languageserver": "^9.0.1",
|
|
90
|
+
"winston": "^3.17.0",
|
|
91
|
+
"winston-daily-rotate-file": "^5.0.0",
|
|
92
|
+
"zod": "^3.25.55",
|
|
93
|
+
"sql.js": "^1.13.0"
|
|
94
|
+
},
|
|
95
|
+
"overrides": {
|
|
96
|
+
"semver": "^7.5.3",
|
|
97
|
+
"trim-newlines": ">=3.0.1"
|
|
98
|
+
},
|
|
99
|
+
"devDependencies": {
|
|
100
|
+
"@codingame/esbuild-import-meta-url-plugin": "~1.0.2",
|
|
101
|
+
"@eslint/js": "^9.26.0",
|
|
102
|
+
"@types/cookie-parser": "^1.4.9",
|
|
103
|
+
"@types/node": "^18.19.110",
|
|
104
|
+
"@types/vscode": "^1.100.0",
|
|
105
|
+
"@typescript-eslint/eslint-plugin": "~8.32.1",
|
|
106
|
+
"@typescript-eslint/parser": "~8.32.1",
|
|
107
|
+
"brace-expansion": ">=2.0.2",
|
|
108
|
+
"concurrently": "~8.2.1",
|
|
109
|
+
"esbuild": "^0.25.4",
|
|
110
|
+
"eslint": "~9.26.0",
|
|
111
|
+
"http-server": "~14.1.1",
|
|
112
|
+
"langium-cli": "^3.5.0",
|
|
113
|
+
"monaco-languageclient": "^9.7.0",
|
|
114
|
+
"nodemon": "^3.1.10",
|
|
115
|
+
"prettier": "^3.5.3",
|
|
116
|
+
"typescript": "^5.8.3",
|
|
117
|
+
"typescript-eslint": "^8.32.1",
|
|
118
|
+
"vite": "^6.3.5",
|
|
119
|
+
"vite-plugin-node-polyfills": "^0.23.0",
|
|
120
|
+
"vitest": "^3.1.3",
|
|
121
|
+
"vscode-languageclient": "^9.0.1",
|
|
122
|
+
"vscode-uri": "^3.1.0",
|
|
123
|
+
"@types/sql.js": "^1.4.9"
|
|
124
|
+
},
|
|
125
|
+
"volta": {
|
|
126
|
+
"node": ">=20.0.0",
|
|
127
|
+
"npm": ">=10.8.2"
|
|
128
|
+
},
|
|
129
|
+
"displayName": "agentlang",
|
|
130
|
+
"engines": {
|
|
131
|
+
"vscode": "^1.67.0",
|
|
132
|
+
"node": ">=20.0.0"
|
|
133
|
+
},
|
|
134
|
+
"categories": ["Programming Languages"],
|
|
135
|
+
"contributes": {
|
|
136
|
+
"languages": [
|
|
137
|
+
{
|
|
138
|
+
"id": "agentlang",
|
|
139
|
+
"aliases": ["Agentlang", "agentlang"],
|
|
140
|
+
"extensions": [".al"],
|
|
141
|
+
"configuration": "./language-configuration.json"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
144
|
+
"grammars": [
|
|
145
|
+
{
|
|
146
|
+
"language": "agentlang",
|
|
147
|
+
"scopeName": "source.agentlang",
|
|
148
|
+
"path": "syntaxes/agentlang.tmLanguage.json"
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"activationEvents": ["onLanguage:agentlang"],
|
|
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}": ["eslint --fix --cache", "prettier --write"],
|
|
179
|
+
"*.{json,md,yml,yaml}": ["prettier --write"]
|
|
180
|
+
},
|
|
181
|
+
"packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad"
|
|
158
182
|
}
|
package/src/api/http.ts
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
getModuleNames,
|
|
15
15
|
Record,
|
|
16
16
|
} from '../runtime/module.js';
|
|
17
|
-
import {
|
|
17
|
+
import { parseAndEvaluateStatement, Result } from '../runtime/interpreter.js';
|
|
18
18
|
import { ApplicationSpec } from '../runtime/loader.js';
|
|
19
19
|
import { logger } from '../runtime/logger.js';
|
|
20
20
|
import { requireAuth, verifySession } from '../runtime/modules/auth.js';
|
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
walkDownInstancePath,
|
|
31
31
|
} from '../runtime/util.js';
|
|
32
32
|
import { BadRequestError, PathAttributeNameQuery, UnauthorisedError } from '../runtime/defs.js';
|
|
33
|
+
import { evaluate } from '../runtime/interpreter.js';
|
|
33
34
|
|
|
34
35
|
export function startServer(appSpec: ApplicationSpec, port: number, host?: string) {
|
|
35
36
|
const app = express();
|
package/src/cli/main.ts
CHANGED
|
@@ -20,12 +20,13 @@ import { Module } from '../runtime/module.js';
|
|
|
20
20
|
import { ModuleDefinition } from '../language/generated/ast.js';
|
|
21
21
|
import { Config } from '../runtime/state.js';
|
|
22
22
|
import { prepareIntegrations } from '../runtime/integrations.js';
|
|
23
|
-
import { isNodeEnv } from '../utils/runtime.js';
|
|
23
|
+
import { isExecGraphEnabled, isNodeEnv } from '../utils/runtime.js';
|
|
24
24
|
import { OpenAPIClientAxios } from 'openapi-client-axios';
|
|
25
25
|
import { registerOpenApiModule } from '../runtime/openapi.js';
|
|
26
26
|
import { initDatabase } from '../runtime/resolvers/sqldb/database.js';
|
|
27
27
|
import { runInitFunctions } from '../runtime/util.js';
|
|
28
28
|
import { startServer } from '../api/http.js';
|
|
29
|
+
import { enableExecutionGraph } from '../runtime/exec-graph.js';
|
|
29
30
|
|
|
30
31
|
const __dirname = url.fileURLToPath(new URL('.', import.meta.url));
|
|
31
32
|
|
|
@@ -89,7 +90,13 @@ export async function runPostInitTasks(appSpec?: ApplicationSpec, config?: Confi
|
|
|
89
90
|
if (appSpec) startServer(appSpec, config?.service?.port || 8080, config?.service?.host);
|
|
90
91
|
}
|
|
91
92
|
|
|
93
|
+
let execGraphEnabled = false;
|
|
94
|
+
|
|
92
95
|
export async function runPreInitTasks(): Promise<boolean> {
|
|
96
|
+
if (!execGraphEnabled && isExecGraphEnabled()) {
|
|
97
|
+
enableExecutionGraph();
|
|
98
|
+
execGraphEnabled = true;
|
|
99
|
+
}
|
|
93
100
|
let result: boolean = true;
|
|
94
101
|
await loadCoreModules().catch((reason: any) => {
|
|
95
102
|
const msg = `Failed to load core modules - ${reason.toString()}`;
|
|
@@ -100,7 +100,8 @@ WorkflowHeaderTag returns string: '@after' | '@before';
|
|
|
100
100
|
|
|
101
101
|
WorkflowHeaderPrefix returns string: 'create' | 'update' | 'delete';
|
|
102
102
|
|
|
103
|
-
Pattern: expr=Expr | crudMap=CrudMap | if=If | forEach=ForEach | delete=Delete | purge=Purge
|
|
103
|
+
Pattern: expr=Expr | crudMap=CrudMap | if=If | forEach=ForEach | delete=Delete | purge=Purge
|
|
104
|
+
| fullTextSearch=FullTextSearch | return=Return;
|
|
104
105
|
|
|
105
106
|
Statement: pattern=Pattern hints+=RuntimeHint*;
|
|
106
107
|
|
|
@@ -127,7 +128,7 @@ SelectIntoEntry: alias=ID attribute=Ref;
|
|
|
127
128
|
|
|
128
129
|
FullTextSearch: '{' name=QueryId query=Literal options=MapLiteral? '}';
|
|
129
130
|
|
|
130
|
-
Return: 'return'
|
|
131
|
+
Return: 'return' pattern=Pattern;
|
|
131
132
|
|
|
132
133
|
AgentDefinition: 'agent' name=GenericName (body=GenericDefBody? | '{''}');
|
|
133
134
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* DO NOT EDIT MANUALLY!
|
|
4
4
|
******************************************************************************/
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/* eslint-disable */
|
|
7
7
|
import * as langium from 'langium';
|
|
8
8
|
|
|
9
9
|
export const AgentlangTerminals = {
|
|
@@ -1082,7 +1082,7 @@ export function isResolverMethodSpec(item: unknown): item is ResolverMethodSpec
|
|
|
1082
1082
|
export interface Return extends langium.AstNode {
|
|
1083
1083
|
readonly $container: Pattern;
|
|
1084
1084
|
readonly $type: 'Return';
|
|
1085
|
-
|
|
1085
|
+
pattern: Pattern;
|
|
1086
1086
|
}
|
|
1087
1087
|
|
|
1088
1088
|
export const Return = 'Return';
|
|
@@ -1994,7 +1994,7 @@ export class AgentlangAstReflection extends langium.AbstractAstReflection {
|
|
|
1994
1994
|
return {
|
|
1995
1995
|
name: Return,
|
|
1996
1996
|
properties: [
|
|
1997
|
-
{ name: '
|
|
1997
|
+
{ name: 'pattern' }
|
|
1998
1998
|
]
|
|
1999
1999
|
};
|
|
2000
2000
|
}
|