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
@@ -4,122 +4,48 @@ export declare const ConfigSchema: z.ZodObject<{
4
4
  port: z.ZodNumber;
5
5
  host: z.ZodOptional<z.ZodString>;
6
6
  httpFileHandling: z.ZodDefault<z.ZodBoolean>;
7
- }, "strip", z.ZodTypeAny, {
8
- port: number;
9
- httpFileHandling: boolean;
10
- host?: string | undefined;
11
- }, {
12
- port: number;
13
- host?: string | undefined;
14
- httpFileHandling?: boolean | undefined;
15
- }>>;
16
- store: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
7
+ }, z.core.$strip>>;
8
+ store: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
17
9
  type: z.ZodLiteral<"postgres">;
18
10
  host: z.ZodDefault<z.ZodString>;
19
11
  username: z.ZodDefault<z.ZodString>;
20
12
  password: z.ZodDefault<z.ZodString>;
21
13
  dbname: z.ZodDefault<z.ZodString>;
22
14
  port: z.ZodDefault<z.ZodNumber>;
23
- }, "strip", z.ZodTypeAny, {
24
- type: "postgres";
25
- port: number;
26
- host: string;
27
- username: string;
28
- password: string;
29
- dbname: string;
30
- }, {
31
- type: "postgres";
32
- port?: number | undefined;
33
- host?: string | undefined;
34
- username?: string | undefined;
35
- password?: string | undefined;
36
- dbname?: string | undefined;
37
- }>, z.ZodObject<{
15
+ }, z.core.$strip>, z.ZodObject<{
38
16
  type: z.ZodLiteral<"mysql">;
39
17
  host: z.ZodDefault<z.ZodString>;
40
18
  username: z.ZodDefault<z.ZodString>;
41
19
  password: z.ZodDefault<z.ZodString>;
42
20
  dbname: z.ZodDefault<z.ZodString>;
43
21
  port: z.ZodDefault<z.ZodNumber>;
44
- }, "strip", z.ZodTypeAny, {
45
- type: "mysql";
46
- port: number;
47
- host: string;
48
- username: string;
49
- password: string;
50
- dbname: string;
51
- }, {
52
- type: "mysql";
53
- port?: number | undefined;
54
- host?: string | undefined;
55
- username?: string | undefined;
56
- password?: string | undefined;
57
- dbname?: string | undefined;
58
- }>, z.ZodObject<{
22
+ }, z.core.$strip>, z.ZodObject<{
59
23
  type: z.ZodLiteral<"sqlite">;
60
24
  dbname: z.ZodOptional<z.ZodString>;
61
- }, "strip", z.ZodTypeAny, {
62
- type: "sqlite";
63
- dbname?: string | undefined;
64
- }, {
65
- type: "sqlite";
66
- dbname?: string | undefined;
67
- }>]>>;
25
+ }, z.core.$strip>], "type">>;
68
26
  integrations: z.ZodOptional<z.ZodObject<{
69
27
  host: z.ZodString;
70
28
  username: z.ZodOptional<z.ZodString>;
71
29
  password: z.ZodOptional<z.ZodString>;
72
30
  connections: z.ZodRecord<z.ZodString, z.ZodString>;
73
- }, "strip", z.ZodTypeAny, {
74
- host: string;
75
- connections: Record<string, string>;
76
- username?: string | undefined;
77
- password?: string | undefined;
78
- }, {
79
- host: string;
80
- connections: Record<string, string>;
81
- username?: string | undefined;
82
- password?: string | undefined;
83
- }>>;
31
+ }, z.core.$strip>>;
84
32
  graphql: z.ZodOptional<z.ZodObject<{
85
33
  enabled: z.ZodDefault<z.ZodBoolean>;
86
- }, "strip", z.ZodTypeAny, {
87
- enabled: boolean;
88
- }, {
89
- enabled?: boolean | undefined;
90
- }>>;
34
+ }, z.core.$strip>>;
91
35
  rbac: z.ZodOptional<z.ZodObject<{
92
36
  enabled: z.ZodDefault<z.ZodBoolean>;
93
- roles: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
94
- }, "strip", z.ZodTypeAny, {
95
- enabled: boolean;
96
- roles?: string[] | undefined;
97
- }, {
98
- roles?: string[] | undefined;
99
- enabled?: boolean | undefined;
100
- }>>;
37
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
+ }, z.core.$strip>>;
101
39
  auth: z.ZodOptional<z.ZodObject<{
102
40
  enabled: z.ZodDefault<z.ZodBoolean>;
103
- }, "strip", z.ZodTypeAny, {
104
- enabled: boolean;
105
- }, {
106
- enabled?: boolean | undefined;
107
- }>>;
41
+ }, z.core.$strip>>;
108
42
  auditTrail: z.ZodOptional<z.ZodObject<{
109
43
  enabled: z.ZodDefault<z.ZodBoolean>;
110
- }, "strip", z.ZodTypeAny, {
111
- enabled: boolean;
112
- }, {
113
- enabled?: boolean | undefined;
114
- }>>;
44
+ }, z.core.$strip>>;
115
45
  monitoring: z.ZodOptional<z.ZodObject<{
116
46
  enabled: z.ZodDefault<z.ZodBoolean>;
117
- }, "strip", z.ZodTypeAny, {
118
- enabled: boolean;
119
- }, {
120
- enabled?: boolean | undefined;
121
- }>>;
122
- authentication: z.ZodOptional<z.ZodDiscriminatedUnion<"service", [z.ZodObject<{
47
+ }, z.core.$strip>>;
48
+ authentication: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
123
49
  service: z.ZodLiteral<"okta">;
124
50
  superuserEmail: z.ZodString;
125
51
  domain: z.ZodString;
@@ -135,39 +61,7 @@ export declare const ConfigSchema: z.ZodObject<{
135
61
  roleClaim: z.ZodDefault<z.ZodString>;
136
62
  defaultRole: z.ZodDefault<z.ZodString>;
137
63
  clientId: z.ZodString;
138
- }, "strip", z.ZodTypeAny, {
139
- service: "okta";
140
- superuserEmail: string;
141
- domain: string;
142
- authServer: string;
143
- clientSecret: string;
144
- apiToken: string;
145
- scope: string;
146
- cookieTtlMs: number;
147
- introspect: boolean;
148
- authorizeRedirectUrl: string;
149
- clientUrl: string;
150
- roleClaim: string;
151
- defaultRole: string;
152
- clientId: string;
153
- cookieDomain?: string | undefined;
154
- }, {
155
- service: "okta";
156
- superuserEmail: string;
157
- domain: string;
158
- clientSecret: string;
159
- apiToken: string;
160
- authorizeRedirectUrl: string;
161
- clientUrl: string;
162
- clientId: string;
163
- cookieDomain?: string | undefined;
164
- authServer?: string | undefined;
165
- scope?: string | undefined;
166
- cookieTtlMs?: number | undefined;
167
- introspect?: boolean | undefined;
168
- roleClaim?: string | undefined;
169
- defaultRole?: string | undefined;
170
- }>, z.ZodObject<{
64
+ }, z.core.$strip>, z.ZodObject<{
171
65
  service: z.ZodLiteral<"cognito">;
172
66
  superuserEmail: z.ZodString;
173
67
  superuserPassword: z.ZodOptional<z.ZodString>;
@@ -176,264 +70,39 @@ export declare const ConfigSchema: z.ZodObject<{
176
70
  clientId: z.ZodString;
177
71
  whitelistEnabled: z.ZodDefault<z.ZodBoolean>;
178
72
  disableUserSessions: z.ZodDefault<z.ZodBoolean>;
179
- }, "strip", z.ZodTypeAny, {
180
- service: "cognito";
181
- superuserEmail: string;
182
- clientId: string;
183
- isIdentityStore: boolean;
184
- userPoolId: string;
185
- whitelistEnabled: boolean;
186
- disableUserSessions: boolean;
187
- superuserPassword?: string | undefined;
188
- }, {
189
- service: "cognito";
190
- superuserEmail: string;
191
- clientId: string;
192
- userPoolId: string;
193
- superuserPassword?: string | undefined;
194
- isIdentityStore?: boolean | undefined;
195
- whitelistEnabled?: boolean | undefined;
196
- disableUserSessions?: boolean | undefined;
197
- }>]>>;
73
+ }, z.core.$strip>], "service">>;
198
74
  openapi: z.ZodOptional<z.ZodArray<z.ZodObject<{
199
75
  specUrl: z.ZodString;
200
76
  baseUrl: z.ZodOptional<z.ZodString>;
201
77
  name: z.ZodString;
202
- }, "strip", z.ZodTypeAny, {
203
- name: string;
204
- specUrl: string;
205
- baseUrl?: string | undefined;
206
- }, {
207
- name: string;
208
- specUrl: string;
209
- baseUrl?: string | undefined;
210
- }>, "many">>;
78
+ }, z.core.$strip>>>;
211
79
  logging: z.ZodOptional<z.ZodObject<{
212
- level: z.ZodDefault<z.ZodEnum<["error", "warn", "info", "debug"]>>;
213
- }, "strip", z.ZodTypeAny, {
214
- level: "error" | "info" | "warn" | "debug";
215
- }, {
216
- level?: "error" | "info" | "warn" | "debug" | undefined;
217
- }>>;
80
+ level: z.ZodDefault<z.ZodEnum<{
81
+ error: "error";
82
+ info: "info";
83
+ warn: "warn";
84
+ debug: "debug";
85
+ }>>;
86
+ }, z.core.$strip>>;
218
87
  retry: z.ZodOptional<z.ZodArray<z.ZodObject<{
219
88
  name: z.ZodString;
220
89
  attempts: z.ZodNumber;
221
90
  backoff: z.ZodObject<{
222
- strategy: z.ZodEnum<["linear", "exponential", "constant"]>;
91
+ strategy: z.ZodEnum<{
92
+ linear: "linear";
93
+ exponential: "exponential";
94
+ constant: "constant";
95
+ }>;
223
96
  delay: z.ZodNumber;
224
- magnitude: z.ZodEnum<["seconds", "milliSeconds", "minutes"]>;
97
+ magnitude: z.ZodEnum<{
98
+ seconds: "seconds";
99
+ milliSeconds: "milliSeconds";
100
+ minutes: "minutes";
101
+ }>;
225
102
  factor: z.ZodNumber;
226
- }, "strip", z.ZodTypeAny, {
227
- strategy: "linear" | "exponential" | "constant";
228
- delay: number;
229
- magnitude: "seconds" | "milliSeconds" | "minutes";
230
- factor: number;
231
- }, {
232
- strategy: "linear" | "exponential" | "constant";
233
- delay: number;
234
- magnitude: "seconds" | "milliSeconds" | "minutes";
235
- factor: number;
236
- }>;
237
- }, "strip", z.ZodTypeAny, {
238
- attempts: number;
239
- backoff: {
240
- strategy: "linear" | "exponential" | "constant";
241
- delay: number;
242
- magnitude: "seconds" | "milliSeconds" | "minutes";
243
- factor: number;
244
- };
245
- name: string;
246
- }, {
247
- attempts: number;
248
- backoff: {
249
- strategy: "linear" | "exponential" | "constant";
250
- delay: number;
251
- magnitude: "seconds" | "milliSeconds" | "minutes";
252
- factor: number;
253
- };
254
- name: string;
255
- }>, "many">>;
256
- }, "strip", z.ZodTypeAny, {
257
- service: {
258
- port: number;
259
- httpFileHandling: boolean;
260
- host?: string | undefined;
261
- };
262
- store?: {
263
- type: "postgres";
264
- port: number;
265
- host: string;
266
- username: string;
267
- password: string;
268
- dbname: string;
269
- } | {
270
- type: "mysql";
271
- port: number;
272
- host: string;
273
- username: string;
274
- password: string;
275
- dbname: string;
276
- } | {
277
- type: "sqlite";
278
- dbname?: string | undefined;
279
- } | undefined;
280
- integrations?: {
281
- host: string;
282
- connections: Record<string, string>;
283
- username?: string | undefined;
284
- password?: string | undefined;
285
- } | undefined;
286
- graphql?: {
287
- enabled: boolean;
288
- } | undefined;
289
- rbac?: {
290
- enabled: boolean;
291
- roles?: string[] | undefined;
292
- } | undefined;
293
- auth?: {
294
- enabled: boolean;
295
- } | undefined;
296
- auditTrail?: {
297
- enabled: boolean;
298
- } | undefined;
299
- monitoring?: {
300
- enabled: boolean;
301
- } | undefined;
302
- authentication?: {
303
- service: "okta";
304
- superuserEmail: string;
305
- domain: string;
306
- authServer: string;
307
- clientSecret: string;
308
- apiToken: string;
309
- scope: string;
310
- cookieTtlMs: number;
311
- introspect: boolean;
312
- authorizeRedirectUrl: string;
313
- clientUrl: string;
314
- roleClaim: string;
315
- defaultRole: string;
316
- clientId: string;
317
- cookieDomain?: string | undefined;
318
- } | {
319
- service: "cognito";
320
- superuserEmail: string;
321
- clientId: string;
322
- isIdentityStore: boolean;
323
- userPoolId: string;
324
- whitelistEnabled: boolean;
325
- disableUserSessions: boolean;
326
- superuserPassword?: string | undefined;
327
- } | undefined;
328
- openapi?: {
329
- name: string;
330
- specUrl: string;
331
- baseUrl?: string | undefined;
332
- }[] | undefined;
333
- logging?: {
334
- level: "error" | "info" | "warn" | "debug";
335
- } | undefined;
336
- retry?: {
337
- attempts: number;
338
- backoff: {
339
- strategy: "linear" | "exponential" | "constant";
340
- delay: number;
341
- magnitude: "seconds" | "milliSeconds" | "minutes";
342
- factor: number;
343
- };
344
- name: string;
345
- }[] | undefined;
346
- }, {
347
- service?: {
348
- port: number;
349
- host?: string | undefined;
350
- httpFileHandling?: boolean | undefined;
351
- } | undefined;
352
- store?: {
353
- type: "postgres";
354
- port?: number | undefined;
355
- host?: string | undefined;
356
- username?: string | undefined;
357
- password?: string | undefined;
358
- dbname?: string | undefined;
359
- } | {
360
- type: "mysql";
361
- port?: number | undefined;
362
- host?: string | undefined;
363
- username?: string | undefined;
364
- password?: string | undefined;
365
- dbname?: string | undefined;
366
- } | {
367
- type: "sqlite";
368
- dbname?: string | undefined;
369
- } | undefined;
370
- integrations?: {
371
- host: string;
372
- connections: Record<string, string>;
373
- username?: string | undefined;
374
- password?: string | undefined;
375
- } | undefined;
376
- graphql?: {
377
- enabled?: boolean | undefined;
378
- } | undefined;
379
- rbac?: {
380
- roles?: string[] | undefined;
381
- enabled?: boolean | undefined;
382
- } | undefined;
383
- auth?: {
384
- enabled?: boolean | undefined;
385
- } | undefined;
386
- auditTrail?: {
387
- enabled?: boolean | undefined;
388
- } | undefined;
389
- monitoring?: {
390
- enabled?: boolean | undefined;
391
- } | undefined;
392
- authentication?: {
393
- service: "okta";
394
- superuserEmail: string;
395
- domain: string;
396
- clientSecret: string;
397
- apiToken: string;
398
- authorizeRedirectUrl: string;
399
- clientUrl: string;
400
- clientId: string;
401
- cookieDomain?: string | undefined;
402
- authServer?: string | undefined;
403
- scope?: string | undefined;
404
- cookieTtlMs?: number | undefined;
405
- introspect?: boolean | undefined;
406
- roleClaim?: string | undefined;
407
- defaultRole?: string | undefined;
408
- } | {
409
- service: "cognito";
410
- superuserEmail: string;
411
- clientId: string;
412
- userPoolId: string;
413
- superuserPassword?: string | undefined;
414
- isIdentityStore?: boolean | undefined;
415
- whitelistEnabled?: boolean | undefined;
416
- disableUserSessions?: boolean | undefined;
417
- } | undefined;
418
- openapi?: {
419
- name: string;
420
- specUrl: string;
421
- baseUrl?: string | undefined;
422
- }[] | undefined;
423
- logging?: {
424
- level?: "error" | "info" | "warn" | "debug" | undefined;
425
- } | undefined;
426
- retry?: {
427
- attempts: number;
428
- backoff: {
429
- strategy: "linear" | "exponential" | "constant";
430
- delay: number;
431
- magnitude: "seconds" | "milliSeconds" | "minutes";
432
- factor: number;
433
- };
434
- name: string;
435
- }[] | undefined;
436
- }>;
103
+ }, z.core.$strip>;
104
+ }, z.core.$strip>>>;
105
+ }, z.core.$strip>;
437
106
  export type Config = z.infer<typeof ConfigSchema>;
438
107
  export declare let AppConfig: Config | undefined;
439
108
  export declare function setAppConfig(config: Config): Config;
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/runtime/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiIvB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,IAAI,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;AAEzC,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGnD;AAID,wBAAgB,wBAAwB,SAEvC;AAED,wBAAgB,yBAAyB,SAExC;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAOD,qBAAa,QAAQ,CAAC,CAAC;IACrB,OAAO,CAAC,KAAK,CAAgC;IAC7C,OAAO,CAAC,KAAK,CAAS;gBAEV,KAAK,EAAE,MAAM;IAKzB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,CAAC;IAiBvD,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAW/B,MAAM,CAAC,GAAG,EAAE,MAAM;CAGnB"}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/runtime/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiIvB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,eAAO,IAAI,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;AAEzC,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAGnD;AAID,wBAAgB,wBAAwB,SAEvC;AAED,wBAAgB,yBAAyB,SAExC;AAED,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAOD,qBAAa,QAAQ,CAAC,CAAC;IACrB,OAAO,CAAC,KAAK,CAAgC;IAC7C,OAAO,CAAC,KAAK,CAAS;gBAEV,KAAK,EAAE,MAAM;IAKzB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,CAAC;IAiBvD,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAW/B,MAAM,CAAC,GAAG,EAAE,MAAM;CAGnB"}
@@ -0,0 +1,98 @@
1
+ export declare const setupConfigClassic: () => {
2
+ $type: string;
3
+ editorAppConfig: {
4
+ codeResources: {
5
+ modified: {
6
+ uri: string;
7
+ text: string;
8
+ };
9
+ };
10
+ useDiffEditor: boolean;
11
+ languageDef: {
12
+ languageExtensionConfig: {
13
+ id: string;
14
+ };
15
+ monarchLanguage: {
16
+ keywords: string[];
17
+ operators: string[];
18
+ symbols: RegExp;
19
+ tokenizer: {
20
+ initial: ({
21
+ regex: RegExp;
22
+ action: {
23
+ cases: {
24
+ '@keywords': {
25
+ token: string;
26
+ };
27
+ '@default': {
28
+ token: string;
29
+ };
30
+ '@operators'?: undefined;
31
+ };
32
+ token?: undefined;
33
+ };
34
+ include?: undefined;
35
+ } | {
36
+ regex: RegExp;
37
+ action: {
38
+ token: string;
39
+ cases?: undefined;
40
+ };
41
+ include?: undefined;
42
+ } | {
43
+ include: string;
44
+ regex?: undefined;
45
+ action?: undefined;
46
+ } | {
47
+ regex: RegExp;
48
+ action: {
49
+ cases: {
50
+ '@operators': {
51
+ token: string;
52
+ };
53
+ '@default': {
54
+ token: string;
55
+ };
56
+ '@keywords'?: undefined;
57
+ };
58
+ token?: undefined;
59
+ };
60
+ include?: undefined;
61
+ })[];
62
+ whitespace: ({
63
+ regex: RegExp;
64
+ action: {
65
+ token: string;
66
+ next?: undefined;
67
+ };
68
+ } | {
69
+ regex: RegExp;
70
+ action: {
71
+ token: string;
72
+ next: string;
73
+ };
74
+ })[];
75
+ comment: ({
76
+ regex: RegExp;
77
+ action: {
78
+ token: string;
79
+ next?: undefined;
80
+ };
81
+ } | {
82
+ regex: RegExp;
83
+ action: {
84
+ token: string;
85
+ next: string;
86
+ };
87
+ })[];
88
+ };
89
+ };
90
+ };
91
+ editorOptions: {
92
+ 'semanticHighlighting.enabled': boolean;
93
+ theme: string;
94
+ };
95
+ };
96
+ };
97
+ export declare const executeClassic: (htmlElement: HTMLElement) => Promise<void>;
98
+ //# sourceMappingURL=setupClassic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupClassic.d.ts","sourceRoot":"","sources":["../src/setupClassic.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqB9B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAU,aAAa,WAAW,kBAgB5D,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { MonacoEditorLanguageClientWrapper } from 'monaco-editor-wrapper';
2
+ import monarchSyntax from './syntaxes/agentlang.monarch.js';
3
+ export const setupConfigClassic = () => {
4
+ return {
5
+ $type: 'classic',
6
+ editorAppConfig: {
7
+ codeResources: {
8
+ modified: {
9
+ uri: '/workspace/example.al',
10
+ text: `// Agentlang is running in the web!`,
11
+ },
12
+ },
13
+ useDiffEditor: false,
14
+ languageDef: {
15
+ languageExtensionConfig: { id: 'agentlang' },
16
+ monarchLanguage: monarchSyntax,
17
+ },
18
+ editorOptions: {
19
+ 'semanticHighlighting.enabled': true,
20
+ theme: 'vs-dark',
21
+ },
22
+ },
23
+ };
24
+ };
25
+ export const executeClassic = async (htmlElement) => {
26
+ try {
27
+ const config = setupConfigClassic();
28
+ const wrapper = new MonacoEditorLanguageClientWrapper();
29
+ // Add the HTML container to the config
30
+ const wrapperConfig = Object.assign(Object.assign({}, config), { htmlContainer: htmlElement });
31
+ // Initialize and start the wrapper
32
+ await wrapper.initAndStart(wrapperConfig);
33
+ }
34
+ catch (error) {
35
+ console.error('Error initializing monaco editor:', error);
36
+ }
37
+ };
38
+ //# sourceMappingURL=setupClassic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupClassic.js","sourceRoot":"","sources":["../src/setupClassic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAsB,MAAM,uBAAuB,CAAC;AAC9F,OAAO,aAAa,MAAM,iCAAiC,CAAC;AAE5D,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,OAAO;QACL,KAAK,EAAE,SAAS;QAChB,eAAe,EAAE;YACf,aAAa,EAAE;gBACb,QAAQ,EAAE;oBACR,GAAG,EAAE,uBAAuB;oBAC5B,IAAI,EAAE,qCAAqC;iBAC5C;aACF;YACD,aAAa,EAAE,KAAK;YACpB,WAAW,EAAE;gBACX,uBAAuB,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE;gBAC5C,eAAe,EAAE,aAAa;aAC/B;YACD,aAAa,EAAE;gBACb,8BAA8B,EAAE,IAAI;gBACpC,KAAK,EAAE,SAAS;aACjB;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,WAAwB,EAAE,EAAE;IAC/D,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,kBAAkB,EAAE,CAAC;QACpC,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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=setupCommon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupCommon.d.ts","sourceRoot":"","sources":["../src/setupCommon.ts"],"names":[],"mappings":""}
@@ -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"}