agentlang 0.6.4 → 0.6.6
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.js +2 -2
- package/out/api/http.js.map +1 -1
- package/out/runtime/auth/cognito.d.ts +1 -0
- package/out/runtime/auth/cognito.d.ts.map +1 -1
- package/out/runtime/auth/cognito.js +23 -0
- package/out/runtime/auth/cognito.js.map +1 -1
- package/out/runtime/auth/interface.d.ts +1 -0
- package/out/runtime/auth/interface.d.ts.map +1 -1
- package/out/runtime/interpreter.d.ts.map +1 -1
- package/out/runtime/interpreter.js +4 -2
- package/out/runtime/interpreter.js.map +1 -1
- package/out/runtime/module.d.ts +10 -2
- package/out/runtime/module.d.ts.map +1 -1
- package/out/runtime/module.js +102 -46
- package/out/runtime/module.js.map +1 -1
- package/out/runtime/modules/ai.d.ts.map +1 -1
- package/out/runtime/modules/ai.js +5 -4
- package/out/runtime/modules/ai.js.map +1 -1
- package/out/runtime/modules/auth.d.ts +1 -0
- package/out/runtime/modules/auth.d.ts.map +1 -1
- package/out/runtime/modules/auth.js +38 -0
- package/out/runtime/modules/auth.js.map +1 -1
- package/out/runtime/monitor.d.ts.map +1 -1
- package/out/runtime/monitor.js +4 -4
- package/out/runtime/monitor.js.map +1 -1
- package/out/setupClassic.d.ts +98 -0
- package/out/setupClassic.d.ts.map +1 -0
- package/out/setupClassic.js +38 -0
- package/out/setupClassic.js.map +1 -0
- package/out/setupCommon.d.ts +2 -0
- package/out/setupCommon.d.ts.map +1 -0
- package/out/setupCommon.js +33 -0
- package/out/setupCommon.js.map +1 -0
- package/out/setupExtended.d.ts +40 -0
- package/out/setupExtended.d.ts.map +1 -0
- package/out/setupExtended.js +67 -0
- package/out/setupExtended.js.map +1 -0
- package/package.json +186 -185
- package/src/api/http.ts +2 -2
- package/src/runtime/auth/cognito.ts +25 -0
- package/src/runtime/auth/interface.ts +1 -0
- package/src/runtime/interpreter.ts +4 -1
- package/src/runtime/module.ts +124 -48
- package/src/runtime/modules/ai.ts +5 -4
- package/src/runtime/modules/auth.ts +36 -0
- package/src/runtime/monitor.ts +4 -4
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// This file is kept for reference but is not used directly anymore
|
|
2
|
+
// The monaco-editor-wrapper API has changed significantly in v6+
|
|
3
|
+
export {};
|
|
4
|
+
// These functions are kept for reference but not used directly anymore
|
|
5
|
+
/*
|
|
6
|
+
export const defineUserServices = () => {
|
|
7
|
+
return {
|
|
8
|
+
userServices: {
|
|
9
|
+
// This API has changed in the latest version
|
|
10
|
+
},
|
|
11
|
+
debugLogging: true,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const configureMonacoWorkers = () => {
|
|
16
|
+
// This function is kept for compatibility, but implementation has changed
|
|
17
|
+
// Use configureDefaultWorkerFactory from monaco-editor-wrapper/workers/workerLoaders in newer code
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const configureWorker = () => {
|
|
21
|
+
// vite does not extract the worker properly if it is URL is a variable
|
|
22
|
+
const lsWorker = new Worker(new URL('./language/main-browser', import.meta.url), {
|
|
23
|
+
type: 'module',
|
|
24
|
+
name: 'Agentlang Language Server',
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
type: 'WorkerDirect',
|
|
29
|
+
worker: lsWorker,
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
*/
|
|
33
|
+
//# sourceMappingURL=setupCommon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupCommon.js","sourceRoot":"","sources":["../src/setupCommon.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,iEAAiE;;AAEjE,uEAAuE;AAEvE;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const setupConfigExtended: () => {
|
|
2
|
+
$type: string;
|
|
3
|
+
editorAppConfig: {
|
|
4
|
+
codeResources: {
|
|
5
|
+
modified: {
|
|
6
|
+
uri: string;
|
|
7
|
+
text: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
useDiffEditor: boolean;
|
|
11
|
+
extensions: {
|
|
12
|
+
config: {
|
|
13
|
+
name: string;
|
|
14
|
+
publisher: string;
|
|
15
|
+
version: string;
|
|
16
|
+
engines: {
|
|
17
|
+
vscode: string;
|
|
18
|
+
};
|
|
19
|
+
contributes: {
|
|
20
|
+
languages: {
|
|
21
|
+
id: string;
|
|
22
|
+
extensions: string[];
|
|
23
|
+
configuration: string;
|
|
24
|
+
}[];
|
|
25
|
+
grammars: {
|
|
26
|
+
language: string;
|
|
27
|
+
scopeName: string;
|
|
28
|
+
path: string;
|
|
29
|
+
}[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
filesOrContents: Map<any, any>;
|
|
33
|
+
}[];
|
|
34
|
+
userConfiguration: {
|
|
35
|
+
json: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export declare const executeExtended: (htmlElement: HTMLElement) => Promise<void>;
|
|
40
|
+
//# sourceMappingURL=setupExtended.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupExtended.d.ts","sourceRoot":"","sources":["../src/setupExtended.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D/B,CAAC;AAEF,eAAO,MAAM,eAAe,GAAU,aAAa,WAAW,kBAgB7D,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { MonacoEditorLanguageClientWrapper } from 'monaco-editor-wrapper';
|
|
2
|
+
export const setupConfigExtended = () => {
|
|
3
|
+
const extensionFilesOrContents = new Map();
|
|
4
|
+
extensionFilesOrContents.set('/language-configuration.json', new URL('../language-configuration.json', import.meta.url));
|
|
5
|
+
extensionFilesOrContents.set('/agentlang-grammar.json', new URL('../syntaxes/agentlang.tmLanguage.json', import.meta.url));
|
|
6
|
+
return {
|
|
7
|
+
$type: 'extended',
|
|
8
|
+
editorAppConfig: {
|
|
9
|
+
codeResources: {
|
|
10
|
+
modified: {
|
|
11
|
+
uri: '/workspace/example.al',
|
|
12
|
+
text: `// Agentlang is running in the web!`,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
useDiffEditor: false,
|
|
16
|
+
extensions: [
|
|
17
|
+
{
|
|
18
|
+
config: {
|
|
19
|
+
name: 'agentlang-web',
|
|
20
|
+
publisher: 'generator-langium',
|
|
21
|
+
version: '1.0.0',
|
|
22
|
+
engines: {
|
|
23
|
+
vscode: '*',
|
|
24
|
+
},
|
|
25
|
+
contributes: {
|
|
26
|
+
languages: [
|
|
27
|
+
{
|
|
28
|
+
id: 'agentlang',
|
|
29
|
+
extensions: ['.agentlang'],
|
|
30
|
+
configuration: './language-configuration.json',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
grammars: [
|
|
34
|
+
{
|
|
35
|
+
language: 'agentlang',
|
|
36
|
+
scopeName: 'source.agentlang',
|
|
37
|
+
path: './agentlang-grammar.json',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
filesOrContents: extensionFilesOrContents,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
userConfiguration: {
|
|
46
|
+
json: JSON.stringify({
|
|
47
|
+
'workbench.colorTheme': 'Default Dark Modern',
|
|
48
|
+
'editor.semanticHighlighting.enabled': true,
|
|
49
|
+
}),
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export const executeExtended = async (htmlElement) => {
|
|
55
|
+
try {
|
|
56
|
+
const config = setupConfigExtended();
|
|
57
|
+
const wrapper = new MonacoEditorLanguageClientWrapper();
|
|
58
|
+
// Add the HTML container to the config
|
|
59
|
+
const wrapperConfig = Object.assign(Object.assign({}, config), { htmlContainer: htmlElement });
|
|
60
|
+
// Initialize and start the wrapper
|
|
61
|
+
await wrapper.initAndStart(wrapperConfig);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
console.error('Error initializing monaco editor:', error);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=setupExtended.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupExtended.js","sourceRoot":"","sources":["../src/setupExtended.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAsB,MAAM,uBAAuB,CAAC;AAE9F,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,MAAM,wBAAwB,GAAG,IAAI,GAAG,EAAE,CAAC;IAC3C,wBAAwB,CAAC,GAAG,CAC1B,8BAA8B,EAC9B,IAAI,GAAG,CAAC,gCAAgC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAC3D,CAAC;IACF,wBAAwB,CAAC,GAAG,CAC1B,yBAAyB,EACzB,IAAI,GAAG,CAAC,uCAAuC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAClE,CAAC;IAEF,OAAO;QACL,KAAK,EAAE,UAAU;QACjB,eAAe,EAAE;YACf,aAAa,EAAE;gBACb,QAAQ,EAAE;oBACR,GAAG,EAAE,uBAAuB;oBAC5B,IAAI,EAAE,qCAAqC;iBAC5C;aACF;YACD,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE;gBACV;oBACE,MAAM,EAAE;wBACN,IAAI,EAAE,eAAe;wBACrB,SAAS,EAAE,mBAAmB;wBAC9B,OAAO,EAAE,OAAO;wBAChB,OAAO,EAAE;4BACP,MAAM,EAAE,GAAG;yBACZ;wBACD,WAAW,EAAE;4BACX,SAAS,EAAE;gCACT;oCACE,EAAE,EAAE,WAAW;oCACf,UAAU,EAAE,CAAC,YAAY,CAAC;oCAC1B,aAAa,EAAE,+BAA+B;iCAC/C;6BACF;4BACD,QAAQ,EAAE;gCACR;oCACE,QAAQ,EAAE,WAAW;oCACrB,SAAS,EAAE,kBAAkB;oCAC7B,IAAI,EAAE,0BAA0B;iCACjC;6BACF;yBACF;qBACF;oBACD,eAAe,EAAE,wBAAwB;iBAC1C;aACF;YACD,iBAAiB,EAAE;gBACjB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,sBAAsB,EAAE,qBAAqB;oBAC7C,qCAAqC,EAAE,IAAI;iBAC5C,CAAC;aACH;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAAE,WAAwB,EAAE,EAAE;IAChE,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;QACrC,MAAM,OAAO,GAAG,IAAI,iCAAiC,EAAE,CAAC;QAExD,uCAAuC;QACvC,MAAM,aAAa,GAAG,gCACjB,MAAM,KACT,aAAa,EAAE,WAAW,GACV,CAAC;QAEnB,mCAAmC;QACnC,MAAM,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,186 +1,187 @@
|
|
|
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
|
-
|
|
186
|
-
|
|
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.6.6",
|
|
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.39.1",
|
|
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.22.0"
|
|
187
|
+
}
|
package/src/api/http.ts
CHANGED
|
@@ -543,11 +543,11 @@ function normalizedResult(r: Result): Result {
|
|
|
543
543
|
return r.map((x: Result) => {
|
|
544
544
|
return normalizedResult(x);
|
|
545
545
|
});
|
|
546
|
-
} else if (r
|
|
546
|
+
} else if (Instance.IsInstance(r)) {
|
|
547
547
|
r.mergeRelatedInstances();
|
|
548
548
|
Array.from(r.attributes.keys()).forEach(k => {
|
|
549
549
|
const v: Result = r.attributes.get(k);
|
|
550
|
-
if (v instanceof Array || v
|
|
550
|
+
if (v instanceof Array || Instance.IsInstance(v)) {
|
|
551
551
|
r.attributes.set(k, normalizedResult(v));
|
|
552
552
|
}
|
|
553
553
|
});
|
|
@@ -45,6 +45,7 @@ let InitiateAuthCommand: any = undefined;
|
|
|
45
45
|
let AdminCreateUserCommand: any = undefined;
|
|
46
46
|
let AdminDisableUserCommand: any = undefined;
|
|
47
47
|
let AdminEnableUserCommand: any = undefined;
|
|
48
|
+
let AdminDeleteUserCommand: any = undefined;
|
|
48
49
|
let RespondToAuthChallengeCommand: any = undefined;
|
|
49
50
|
let AuthenticationDetails: any = undefined;
|
|
50
51
|
let CognitoUser: any = undefined;
|
|
@@ -70,6 +71,7 @@ if (isNodeEnv) {
|
|
|
70
71
|
AdminCreateUserCommand = cip.AdminCreateUserCommand;
|
|
71
72
|
AdminDisableUserCommand = cip.AdminDisableUserCommand;
|
|
72
73
|
AdminEnableUserCommand = cip.AdminEnableUserCommand;
|
|
74
|
+
AdminDeleteUserCommand = cip.AdminDeleteUserCommand;
|
|
73
75
|
RespondToAuthChallengeCommand = cip.RespondToAuthChallengeCommand;
|
|
74
76
|
|
|
75
77
|
const ci = await import('amazon-cognito-identity-js');
|
|
@@ -1334,6 +1336,29 @@ export class CognitoAuth implements AgentlangAuth {
|
|
|
1334
1336
|
}
|
|
1335
1337
|
}
|
|
1336
1338
|
|
|
1339
|
+
async deleteUser(email: string, _env: Environment): Promise<void> {
|
|
1340
|
+
try {
|
|
1341
|
+
const client = new CognitoIdentityProviderClient({
|
|
1342
|
+
region: process.env.AWS_REGION || 'us-west-2',
|
|
1343
|
+
});
|
|
1344
|
+
|
|
1345
|
+
const command = new AdminDeleteUserCommand({
|
|
1346
|
+
UserPoolId: this.fetchUserPoolId(),
|
|
1347
|
+
Username: email,
|
|
1348
|
+
});
|
|
1349
|
+
|
|
1350
|
+
logger.debug(`Attempting to delete user: ${email}`);
|
|
1351
|
+
await client.send(command);
|
|
1352
|
+
logger.info(`User deleted successfully: ${email}`);
|
|
1353
|
+
} catch (err: any) {
|
|
1354
|
+
logger.error(`Failed to delete user ${email}:`, {
|
|
1355
|
+
errorName: err.name,
|
|
1356
|
+
errorMessage: sanitizeErrorMessage(err.message),
|
|
1357
|
+
});
|
|
1358
|
+
handleCognitoError(err, 'deleteUser');
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1337
1362
|
async disableUser(email: string, _env: Environment): Promise<void> {
|
|
1338
1363
|
try {
|
|
1339
1364
|
const client = new CognitoIdentityProviderClient({
|
|
@@ -82,4 +82,5 @@ export interface AgentlangAuth {
|
|
|
82
82
|
callback(code: string, env: Environment, cb: LoginCallback): Promise<void>;
|
|
83
83
|
disableUser(email: string, env: Environment): Promise<void>;
|
|
84
84
|
enableUser(email: string, env: Environment): Promise<void>;
|
|
85
|
+
deleteUser(email: string, env: Environment): Promise<void>;
|
|
85
86
|
}
|
|
@@ -49,6 +49,7 @@ import {
|
|
|
49
49
|
PlaceholderRecordEntry,
|
|
50
50
|
Relationship,
|
|
51
51
|
Workflow,
|
|
52
|
+
maybeSetMetaAttributes,
|
|
52
53
|
} from './module.js';
|
|
53
54
|
import { JoinInfo, Resolver } from './resolvers/interface.js';
|
|
54
55
|
import { ResolverAuthInfo } from './resolvers/authinfo.js';
|
|
@@ -1460,6 +1461,7 @@ async function evaluateCrudMap(crud: CrudMap, env: Environment): Promise<void> {
|
|
|
1460
1461
|
const res: Resolver = await getResolverForPath(entryName, moduleName, env);
|
|
1461
1462
|
let r: Instance | undefined;
|
|
1462
1463
|
await computeExprAttributes(inst, undefined, undefined, env);
|
|
1464
|
+
maybeSetMetaAttributes(inst.attributes, env);
|
|
1463
1465
|
if (env.isInUpsertMode()) {
|
|
1464
1466
|
await runPreUpdateEvents(inst, env);
|
|
1465
1467
|
r = await res.upsertInstance(inst);
|
|
@@ -1578,6 +1580,7 @@ async function evaluateCrudMap(crud: CrudMap, env: Environment): Promise<void> {
|
|
|
1578
1580
|
for (let i = 0; i < lastRes.length; ++i) {
|
|
1579
1581
|
await computeExprAttributes(lastRes[i], crud.body?.attributes, attrs, env);
|
|
1580
1582
|
await runPreUpdateEvents(lastRes[i], env);
|
|
1583
|
+
maybeSetMetaAttributes(attrs, env, true);
|
|
1581
1584
|
const finalInst: Instance = await resolver.updateInstance(lastRes[i], attrs);
|
|
1582
1585
|
await runPostUpdateEvents(finalInst, lastRes[i], env);
|
|
1583
1586
|
res.push(finalInst);
|
|
@@ -2283,7 +2286,7 @@ export async function evaluateExpression(expr: Expr, env: Environment): Promise<
|
|
|
2283
2286
|
}
|
|
2284
2287
|
|
|
2285
2288
|
async function getRef(r: string, src: any, env: Environment): Promise<Result> {
|
|
2286
|
-
if (src
|
|
2289
|
+
if (Instance.IsInstance(src)) return src.lookup(r);
|
|
2287
2290
|
else if (src instanceof Map) return src.get(r);
|
|
2288
2291
|
else if (src instanceof Object) return src[r];
|
|
2289
2292
|
else if (isPath(src)) return await getRef(r, await dereferencePath(src, env), env);
|