agentlang 0.9.4 → 0.9.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 +8 -2
- package/out/api/http.js.map +1 -1
- package/out/extension/main.cjs +253 -253
- package/out/extension/main.cjs.map +2 -2
- package/out/language/generated/ast.d.ts +1997 -151
- package/out/language/generated/ast.d.ts.map +1 -1
- package/out/language/generated/ast.js +2113 -1263
- package/out/language/generated/ast.js.map +1 -1
- package/out/language/generated/grammar.d.ts +1 -1
- package/out/language/generated/grammar.d.ts.map +1 -1
- package/out/language/generated/grammar.js +649 -762
- package/out/language/generated/grammar.js.map +1 -1
- package/out/language/generated/module.d.ts +1 -1
- package/out/language/generated/module.js +1 -1
- package/out/language/main.cjs +6401 -4072
- package/out/language/main.cjs.map +4 -4
- package/out/language/parser.js +8 -8
- package/out/language/parser.js.map +1 -1
- package/out/runtime/agents/common.d.ts +7 -1
- package/out/runtime/agents/common.d.ts.map +1 -1
- package/out/runtime/agents/common.js +101 -0
- package/out/runtime/agents/common.js.map +1 -1
- package/out/runtime/agents/impl/anthropic.js +4 -4
- package/out/runtime/agents/impl/anthropic.js.map +1 -1
- package/out/runtime/agents/impl/openai.js +4 -4
- package/out/runtime/agents/impl/openai.js.map +1 -1
- package/out/runtime/auth/defs.d.ts +1 -1
- package/out/runtime/auth/defs.js +1 -1
- package/out/runtime/defs.d.ts +1 -1
- package/out/runtime/defs.js +1 -1
- package/out/runtime/exec-graph.d.ts.map +1 -1
- package/out/runtime/exec-graph.js +5 -0
- package/out/runtime/exec-graph.js.map +1 -1
- package/out/runtime/interpreter.d.ts +4 -0
- package/out/runtime/interpreter.d.ts.map +1 -1
- package/out/runtime/interpreter.js +20 -4
- package/out/runtime/interpreter.js.map +1 -1
- package/out/runtime/loader.d.ts.map +1 -1
- package/out/runtime/loader.js +43 -6
- package/out/runtime/loader.js.map +1 -1
- package/out/runtime/module.d.ts +18 -3
- package/out/runtime/module.d.ts.map +1 -1
- package/out/runtime/module.js +62 -4
- package/out/runtime/module.js.map +1 -1
- package/out/runtime/modules/ai.d.ts +18 -2
- package/out/runtime/modules/ai.d.ts.map +1 -1
- package/out/runtime/modules/ai.js +271 -21
- 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 +11 -5
- package/out/runtime/modules/auth.js.map +1 -1
- package/out/runtime/resolvers/interface.d.ts +1 -1
- package/out/runtime/resolvers/interface.d.ts.map +1 -1
- package/out/runtime/resolvers/interface.js.map +1 -1
- package/out/runtime/resolvers/sqldb/database.d.ts +1 -0
- package/out/runtime/resolvers/sqldb/database.d.ts.map +1 -1
- package/out/runtime/resolvers/sqldb/database.js +19 -10
- package/out/runtime/resolvers/sqldb/database.js.map +1 -1
- package/out/runtime/resolvers/sqldb/impl.d.ts +1 -1
- package/out/runtime/resolvers/sqldb/impl.d.ts.map +1 -1
- package/out/runtime/resolvers/sqldb/impl.js +2 -2
- package/out/runtime/resolvers/sqldb/impl.js.map +1 -1
- package/out/runtime/state.d.ts +37 -367
- package/out/runtime/state.d.ts.map +1 -1
- package/out/runtime/state.js +3 -0
- package/out/runtime/state.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/out/syntaxes/agentlang.monarch.js +4 -4
- package/out/syntaxes/agentlang.monarch.js.map +1 -1
- package/out/utils/runtime.d.ts +7 -6
- package/out/utils/runtime.d.ts.map +1 -1
- package/package.json +185 -187
- package/src/api/http.ts +8 -2
- package/src/language/agentlang.langium +8 -2
- package/src/language/generated/ast.ts +2204 -1322
- package/src/language/generated/grammar.ts +649 -762
- package/src/language/generated/module.ts +1 -1
- package/src/language/parser.ts +8 -8
- package/src/runtime/agents/common.ts +107 -0
- package/src/runtime/agents/impl/anthropic.ts +4 -4
- package/src/runtime/agents/impl/openai.ts +4 -4
- package/src/runtime/auth/defs.ts +1 -1
- package/src/runtime/defs.ts +1 -1
- package/src/runtime/exec-graph.ts +4 -0
- package/src/runtime/interpreter.ts +23 -4
- package/src/runtime/loader.ts +43 -4
- package/src/runtime/module.ts +80 -3
- package/src/runtime/modules/ai.ts +391 -19
- package/src/runtime/modules/auth.ts +11 -5
- package/src/runtime/resolvers/interface.ts +1 -1
- package/src/runtime/resolvers/sqldb/database.ts +20 -11
- package/src/runtime/resolvers/sqldb/impl.ts +3 -3
- package/src/runtime/state.ts +4 -0
- package/src/syntaxes/agentlang.monarch.ts +4 -4
package/src/api/http.ts
CHANGED
|
@@ -1051,7 +1051,10 @@ async function handleFileDownload(
|
|
|
1051
1051
|
return;
|
|
1052
1052
|
}
|
|
1053
1053
|
|
|
1054
|
-
|
|
1054
|
+
let filename = req.params.filename;
|
|
1055
|
+
if (Array.isArray(filename)) {
|
|
1056
|
+
filename = filename[0];
|
|
1057
|
+
}
|
|
1055
1058
|
|
|
1056
1059
|
if (!filename) {
|
|
1057
1060
|
res.status(400).send({ error: 'Filename is required' });
|
|
@@ -1154,7 +1157,10 @@ async function handleFileDelete(
|
|
|
1154
1157
|
return;
|
|
1155
1158
|
}
|
|
1156
1159
|
|
|
1157
|
-
|
|
1160
|
+
let filename = req.params.filename;
|
|
1161
|
+
if (Array.isArray(filename)) {
|
|
1162
|
+
filename = filename[0];
|
|
1163
|
+
}
|
|
1158
1164
|
|
|
1159
1165
|
if (!filename) {
|
|
1160
1166
|
res.status(400).send({ error: 'Filename is required' });
|
|
@@ -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 | RetryDefinition;
|
|
9
|
+
| DirectiveDefinition | GlossaryEntryDefinition | RetryDefinition | AgentEvaluatorDefinition;
|
|
10
10
|
|
|
11
11
|
StandaloneStatement: stmt=Statement;
|
|
12
12
|
|
|
@@ -94,7 +94,7 @@ Literal: (id=ID | num=Decimal | str=STRING | ref=Ref | bool=Boolean | fnCall=FnC
|
|
|
94
94
|
|
|
95
95
|
fragment Body: '{' '}' | '{' (statements+=Statement (';' statements+=Statement)*)+ '}' | '{' statements+=Statement ';'+ '}' | statements+=Statement;
|
|
96
96
|
|
|
97
|
-
WorkflowDefinition: 'workflow' (name=ID | header=WorkflowHeader) Body;
|
|
97
|
+
WorkflowDefinition: 'workflow' (name=ID | header=WorkflowHeader) (directives=WorkflowDirectives)? Body;
|
|
98
98
|
|
|
99
99
|
WorkflowHeader: tag=WorkflowHeaderTag prefix=WorkflowHeaderPrefix ':' name=QualifiedName;
|
|
100
100
|
|
|
@@ -102,6 +102,10 @@ WorkflowHeaderTag returns string: '@after' | '@before';
|
|
|
102
102
|
|
|
103
103
|
WorkflowHeaderPrefix returns string: 'create' | 'update' | 'delete';
|
|
104
104
|
|
|
105
|
+
WorkflowDirectives: (entries+=WorkflowDirectiveEntry (',' entries+=WorkflowDirectiveEntry)*)+;
|
|
106
|
+
|
|
107
|
+
WorkflowDirectiveEntry: tag='@withRole' '(' value=(ID | STRING) ')';
|
|
108
|
+
|
|
105
109
|
PublicWorkflowDefinition: '@public' def=WorkflowDefinition;
|
|
106
110
|
|
|
107
111
|
Pattern: expr=Expr | crudMap=CrudMap | if=If | forEach=ForEach | delete=Delete | purge=Purge
|
|
@@ -190,6 +194,8 @@ RetryDefinition: 'agentlang/retry' name=ID '{' ('attempts' attempts=Decimal)? ('
|
|
|
190
194
|
|
|
191
195
|
BackoffSpec: 'backoff' '{' (attributes+=SetAttribute (',' attributes+=SetAttribute)*)+ '}';
|
|
192
196
|
|
|
197
|
+
AgentEvaluatorDefinition: 'eval' name=ID '{' '}' | '{' (attributes+=SetAttribute (',' attributes+=SetAttribute)*)+ '}';
|
|
198
|
+
|
|
193
199
|
ResolverDefinition: 'resolver' name=QualifiedName '[' (paths+=ResolverPathEntry (',' paths+=ResolverPathEntry)*)+ ']'
|
|
194
200
|
'{' (methods+=ResolverMethodSpec (',' methods+=ResolverMethodSpec)*)+ '}';
|
|
195
201
|
|