agentlang 0.9.4 → 0.9.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 (53) hide show
  1. package/out/api/http.js +8 -2
  2. package/out/api/http.js.map +1 -1
  3. package/out/extension/main.cjs +3 -3
  4. package/out/extension/main.cjs.map +1 -1
  5. package/out/language/generated/ast.d.ts +1918 -149
  6. package/out/language/generated/ast.d.ts.map +1 -1
  7. package/out/language/generated/ast.js +2050 -1261
  8. package/out/language/generated/ast.js.map +1 -1
  9. package/out/language/generated/grammar.d.ts +1 -1
  10. package/out/language/generated/grammar.d.ts.map +1 -1
  11. package/out/language/generated/grammar.js +217 -544
  12. package/out/language/generated/grammar.js.map +1 -1
  13. package/out/language/generated/module.d.ts +1 -1
  14. package/out/language/generated/module.js +1 -1
  15. package/out/language/main.cjs +7271 -3565
  16. package/out/language/main.cjs.map +4 -4
  17. package/out/runtime/auth/defs.d.ts +1 -1
  18. package/out/runtime/auth/defs.js +1 -1
  19. package/out/runtime/defs.d.ts +1 -1
  20. package/out/runtime/defs.js +1 -1
  21. package/out/runtime/loader.js +1 -1
  22. package/out/runtime/resolvers/sqldb/database.d.ts +1 -0
  23. package/out/runtime/resolvers/sqldb/database.d.ts.map +1 -1
  24. package/out/runtime/resolvers/sqldb/database.js +2 -1
  25. package/out/runtime/resolvers/sqldb/database.js.map +1 -1
  26. package/out/runtime/state.d.ts +36 -367
  27. package/out/runtime/state.d.ts.map +1 -1
  28. package/out/setupClassic.d.ts +98 -0
  29. package/out/setupClassic.d.ts.map +1 -0
  30. package/out/setupClassic.js +38 -0
  31. package/out/setupClassic.js.map +1 -0
  32. package/out/setupCommon.d.ts +2 -0
  33. package/out/setupCommon.d.ts.map +1 -0
  34. package/out/setupCommon.js +33 -0
  35. package/out/setupCommon.js.map +1 -0
  36. package/out/setupExtended.d.ts +40 -0
  37. package/out/setupExtended.d.ts.map +1 -0
  38. package/out/setupExtended.js +67 -0
  39. package/out/setupExtended.js.map +1 -0
  40. package/out/syntaxes/agentlang.monarch.js +3 -3
  41. package/out/syntaxes/agentlang.monarch.js.map +1 -1
  42. package/out/utils/runtime.d.ts +7 -6
  43. package/out/utils/runtime.d.ts.map +1 -1
  44. package/package.json +185 -187
  45. package/src/api/http.ts +8 -2
  46. package/src/language/generated/ast.ts +2108 -1320
  47. package/src/language/generated/grammar.ts +217 -544
  48. package/src/language/generated/module.ts +1 -1
  49. package/src/runtime/auth/defs.ts +1 -1
  50. package/src/runtime/defs.ts +1 -1
  51. package/src/runtime/loader.ts +1 -1
  52. package/src/runtime/resolvers/sqldb/database.ts +2 -1
  53. package/src/syntaxes/agentlang.monarch.ts +3 -3
@@ -1,5 +1,5 @@
1
1
  /******************************************************************************
2
- * This file was generated by langium-cli 3.5.2.
2
+ * This file was generated by langium-cli 4.1.0.
3
3
  * DO NOT EDIT MANUALLY!
4
4
  ******************************************************************************/
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { AppConfig } from '../state.js';
2
2
 
3
3
  // TODO: AdminUserId must be dynamically set based on auth-service-config and a valid admin-login
4
- export const AdminUserId = '00000000-0000-0000-0000-000000000000';
4
+ export const AdminUserId = '12345678-1234-1234-1234-123456789abc';
5
5
 
6
6
  export function isAuthEnabled(): boolean {
7
7
  if (AppConfig?.auth?.enabled == true) {
@@ -457,7 +457,7 @@ export function setInternDynamicModuleFn(f: Function) {
457
457
  InternDynamicModule = f;
458
458
  }
459
459
 
460
- export const DefaultTenantId = '00000000-0000-0000-0000-000000000000';
460
+ export const DefaultTenantId = '12345678-1234-1234-1234-123456789abc';
461
461
 
462
462
  export let getUserTenantId = async function (_: string, env: any): Promise<string> {
463
463
  env;
@@ -418,7 +418,7 @@ export async function loadAppConfig(configDirOrContent: string): Promise<Config>
418
418
  } catch (err: any) {
419
419
  if (err instanceof z.ZodError) {
420
420
  console.log(chalk.red('Config validation failed:'));
421
- err.errors.forEach((error: any, index: number) => {
421
+ err.issues.forEach((error: any, index: number) => {
422
422
  console.log(chalk.red(` ${index + 1}. ${error.path.join('.')}: ${error.message}`));
423
423
  });
424
424
  } else {
@@ -1,3 +1,4 @@
1
+ import 'reflect-metadata';
1
2
  import {
2
3
  DataSource,
3
4
  EntityManager,
@@ -227,7 +228,7 @@ function makeSqliteDataSource(
227
228
  const synchronize = needSync();
228
229
  //const runMigrations = isRuntimeMode_migration() || isRuntimeMode_undo_migration() || !synchronize;
229
230
  return new DataSource({
230
- type: 'sqlite',
231
+ type: 'better-sqlite3',
231
232
  database: config?.dbname || mkDbName(),
232
233
  synchronize: synchronize,
233
234
  entities: entities,
@@ -10,10 +10,10 @@ export default {
10
10
 
11
11
  tokenizer: {
12
12
  initial: [
13
- { regex: /(([_a-zA-Z][\w_]*)(\/([_a-zA-Z][\w_]*))?)/, action: { cases: { '@keywords': {"token":"keyword"}, '@default': {"token":"string"} }} },
13
+ { regex: /(?:[_a-zA-Z][\w_]*)(\/(?:[_a-zA-Z][\w_]*))?/, action: { cases: { '@keywords': {"token":"keyword"}, '@default': {"token":"string"} }} },
14
14
  { regex: /[_a-zA-Z][\w_]*/, action: { cases: { '@keywords': {"token":"keyword"}, '@default': {"token":"string"} }} },
15
- { regex: /("(((\\([\s\S]))|((?!(((\\|")|\r)|\n))[\s\S]*?))|(\r?\n))*")/, action: {"token":"string"} },
16
- { regex: /(`(((\\([\s\S]))|((?!(((\\|`)|\r)|\n))[\s\S]*?))|(\r?\n))*`)/, action: {"token":"string"} },
15
+ { regex: /"(\\(?:[\s\S])|(?:(?!(\\|"|\r|\n))[\s\S]*?)|\r?\n)*"/, action: {"token":"string"} },
16
+ { regex: /`(\\(?:[\s\S])|(?:(?!(\\|`|\r|\n))[\s\S]*?)|\r?\n)*`/, action: {"token":"string"} },
17
17
  { regex: /-?[0-9]+/, action: {"token":"number"} },
18
18
  { include: '@whitespace' },
19
19
  { regex: /@symbols/, action: { cases: { '@operators': {"token":"operator"}, '@default': {"token":""} }} },