enyosx-ai 0.1.0

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 (41) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +740 -0
  3. package/dist/chunk-2WM5L76D.js +320 -0
  4. package/dist/chunk-3BNDFBX3.js +324 -0
  5. package/dist/chunk-4LJILSCT.js +30 -0
  6. package/dist/chunk-4ZV5JV6W.js +298 -0
  7. package/dist/chunk-76PHNPTY.js +631 -0
  8. package/dist/chunk-BSSA33NY.js +677 -0
  9. package/dist/chunk-EK6IDRY7.js +105 -0
  10. package/dist/chunk-FI2EBH2N.js +2232 -0
  11. package/dist/chunk-GAKKLY4M.js +276 -0
  12. package/dist/chunk-HR4G5XQI.js +319 -0
  13. package/dist/chunk-HROGCEE5.js +30 -0
  14. package/dist/chunk-MMH7M7MG.js +30 -0
  15. package/dist/chunk-NGLRXS6G.js +2079 -0
  16. package/dist/chunk-NSE6LQJC.js +681 -0
  17. package/dist/chunk-O5XZOSBW.js +2484 -0
  18. package/dist/chunk-OVCMUPMP.js +677 -0
  19. package/dist/chunk-P2YBRE3X.js +2484 -0
  20. package/dist/chunk-VVIL5NIM.js +318 -0
  21. package/dist/chunk-ZNGEBY33.js +273 -0
  22. package/dist/cli.cjs +2509 -0
  23. package/dist/cli.d.ts +1 -0
  24. package/dist/cli.js +99 -0
  25. package/dist/index.cjs +2912 -0
  26. package/dist/index.d.ts +672 -0
  27. package/dist/index.js +379 -0
  28. package/dist/parser-4JXKOWKY.js +8 -0
  29. package/dist/parser-UUB6D2CZ.js +8 -0
  30. package/dist/parser-V44AIVNI.js +8 -0
  31. package/examples/README.md +13 -0
  32. package/examples/ia-demo.eny +37 -0
  33. package/examples/sample.eny +15 -0
  34. package/examples/simple/system.eny +7 -0
  35. package/examples/spec/sample.eny +19 -0
  36. package/examples/starter/README.md +96 -0
  37. package/examples/starter/main.eny +39 -0
  38. package/examples/starter/run.js +68 -0
  39. package/examples/starter.eny +16 -0
  40. package/examples/wasm-demo.eny +34 -0
  41. package/package.json +49 -0
@@ -0,0 +1,672 @@
1
+ type Step = {
2
+ raw: string;
3
+ };
4
+ type FunctionNode = {
5
+ type: 'function';
6
+ name: string;
7
+ args?: string[];
8
+ steps: Step[];
9
+ optimized?: boolean;
10
+ };
11
+ type IANode = {
12
+ type: 'ia';
13
+ name: string;
14
+ body: string[];
15
+ };
16
+ type ModuleNode = {
17
+ type: 'module';
18
+ name: string;
19
+ };
20
+ type ObjectNode = {
21
+ type: 'object';
22
+ name: string;
23
+ props: Record<string, string | null>;
24
+ };
25
+ type FormNode = {
26
+ type: 'form';
27
+ name: string;
28
+ props: Record<string, any>;
29
+ };
30
+ type AnimationNode = {
31
+ type: 'animation';
32
+ name: string;
33
+ props: Record<string, any>;
34
+ };
35
+ type LogicNode = {
36
+ type: 'logic';
37
+ rule: string;
38
+ trueFlow?: string[];
39
+ falseFlow?: string[];
40
+ };
41
+ type ParallelNode = {
42
+ type: 'parallel';
43
+ items: string[];
44
+ };
45
+ type BuildNode = {
46
+ type: 'build';
47
+ targets: string[];
48
+ };
49
+ type EvolveNode = {
50
+ type: 'evolve';
51
+ steps: string[];
52
+ };
53
+ /** σ SUBSTATE - Estado local/contexto específico */
54
+ type SubstateNode = {
55
+ type: 'substate';
56
+ name: string;
57
+ parent?: string;
58
+ props: Record<string, any>;
59
+ };
60
+ /** ○ CLASS - Classe/molde estrutural */
61
+ type ClassNode = {
62
+ type: 'class';
63
+ name: string;
64
+ extends?: string;
65
+ props: Record<string, any>;
66
+ methods?: string[];
67
+ };
68
+ /** ↻ LOOP - Repetição/continuidade */
69
+ type LoopNode = {
70
+ type: 'loop';
71
+ name?: string;
72
+ condition?: string;
73
+ count?: number;
74
+ body: string[];
75
+ };
76
+ /** ◌ EVENT - Evento/acontecimento */
77
+ type EventNode = {
78
+ type: 'event';
79
+ name: string;
80
+ trigger?: string;
81
+ handler?: string[];
82
+ };
83
+ /** ⇄ SYNC - Sincronização/comunicação */
84
+ type SyncNode = {
85
+ type: 'sync';
86
+ sources: string[];
87
+ target?: string;
88
+ };
89
+ /** ⌛ TIMEOUT - Limite temporal */
90
+ type TimeoutNode = {
91
+ type: 'timeout';
92
+ duration: number;
93
+ unit?: 'ms' | 's' | 'm';
94
+ action?: string;
95
+ };
96
+ /** ⏳ DELAY - Espera/atraso temporal */
97
+ type DelayNode = {
98
+ type: 'delay';
99
+ duration: number;
100
+ unit?: 'ms' | 's' | 'm';
101
+ };
102
+ /** 🛡 SECURITY - Segurança/proteção */
103
+ type SecurityNode = {
104
+ type: 'security';
105
+ level?: 'low' | 'medium' | 'high' | 'critical';
106
+ rules: string[];
107
+ };
108
+ /** 🔑 KEY - Chave/autorização */
109
+ type KeyNode = {
110
+ type: 'key';
111
+ name: string;
112
+ scope?: string;
113
+ permissions?: string[];
114
+ };
115
+ /** 🧪 SANDBOX - Isolamento/execução segura */
116
+ type SandboxNode = {
117
+ type: 'sandbox';
118
+ name: string;
119
+ restrictions?: string[];
120
+ body: string[];
121
+ };
122
+ /** ⚡ CAUSE - Causa/origem de evento */
123
+ type CauseNode = {
124
+ type: 'cause';
125
+ trigger: string;
126
+ effects: string[];
127
+ };
128
+ /** ✦ CONSEQUENCE - Consequência/resultado */
129
+ type ConsequenceNode = {
130
+ type: 'consequence';
131
+ source: string;
132
+ result: string;
133
+ };
134
+ /** 𝓜 MEMORY - Memória/retenção de informação */
135
+ type MemoryNode = {
136
+ type: 'memory';
137
+ name: string;
138
+ size?: number;
139
+ persist?: boolean;
140
+ };
141
+ /** ♾ PERSIST - Persistência */
142
+ type PersistNode = {
143
+ type: 'persist';
144
+ target: string;
145
+ storage?: 'local' | 'session' | 'db' | 'file';
146
+ };
147
+ /** ⌂ ROOT - Raiz do sistema */
148
+ type RootNode = {
149
+ type: 'root';
150
+ name: string;
151
+ children?: string[];
152
+ };
153
+ /** ☐ INTERFACE - Interface/contato humano */
154
+ type InterfaceNode = {
155
+ type: 'interface';
156
+ name: string;
157
+ methods: string[];
158
+ };
159
+ /** 👁 VISUAL - Visual/percepção */
160
+ type VisualNode = {
161
+ type: 'visual';
162
+ name: string;
163
+ props: Record<string, any>;
164
+ };
165
+ /** ⌨ INPUT - Entrada/intenção do usuário */
166
+ type InputNode = {
167
+ type: 'input';
168
+ name: string;
169
+ inputType?: 'text' | 'number' | 'file' | 'event';
170
+ handler?: string;
171
+ };
172
+ /** ⏬ THROTTLE - Limitar/controle de uso */
173
+ type ThrottleNode = {
174
+ type: 'throttle';
175
+ target: string;
176
+ limit: number;
177
+ window?: number;
178
+ };
179
+ /** ⏫ BOOST - Acelerar/aumento de performance */
180
+ type BoostNode = {
181
+ type: 'boost';
182
+ target: string;
183
+ factor?: number;
184
+ };
185
+ /** ₵ COST - Custo/gasto de recurso */
186
+ type CostNode = {
187
+ type: 'cost';
188
+ operation: string;
189
+ value: number;
190
+ unit?: string;
191
+ };
192
+ /** 🔒 LOCK - Imutável/estado protegido */
193
+ type LockNode = {
194
+ type: 'lock';
195
+ target: string;
196
+ reason?: string;
197
+ };
198
+ /** 🔓 UNLOCK - Mutável/estado liberado */
199
+ type UnlockNode = {
200
+ type: 'unlock';
201
+ target: string;
202
+ };
203
+ /** Ø VOID - Não-existência/null absoluto */
204
+ type VoidNode = {
205
+ type: 'void';
206
+ target?: string;
207
+ };
208
+ /** ⬒ INHERIT - Herança/extensão */
209
+ type InheritNode = {
210
+ type: 'inherit';
211
+ child: string;
212
+ parent: string;
213
+ };
214
+ /** ⊃ CONTAINS - Contém/composição */
215
+ type ContainsNode = {
216
+ type: 'contains';
217
+ container: string;
218
+ items: string[];
219
+ };
220
+ /** ✔ VERIFY - Verificar/validação */
221
+ type VerifyNode = {
222
+ type: 'verify';
223
+ target: string;
224
+ rules?: string[];
225
+ };
226
+ /** 📜 LOG - Registro/memória histórica */
227
+ type LogNode = {
228
+ type: 'log';
229
+ message: string;
230
+ level?: 'debug' | 'info' | 'warn' | 'error';
231
+ };
232
+ /** Σ KERNEL - Conexão com kernel/sistema */
233
+ type KernelNode = {
234
+ type: 'kernel';
235
+ hooks: string[];
236
+ };
237
+ /** Σ DATABASE - Banco de dados auto-gerenciado */
238
+ type DatabaseNode = {
239
+ type: 'database';
240
+ mode: 'auto' | 'manual' | 'hybrid';
241
+ provider?: string;
242
+ };
243
+ /** Σ TRAINING - Modo treino/gamificado */
244
+ type TrainingNode = {
245
+ type: 'training';
246
+ topic: string;
247
+ level?: number;
248
+ };
249
+ type LogEntry = {
250
+ timestamp: string;
251
+ level: 'info' | 'debug' | 'warn' | 'error';
252
+ event: string;
253
+ i?: number;
254
+ line?: string;
255
+ detail?: any;
256
+ };
257
+ type ParseOptions = {
258
+ verbose?: boolean;
259
+ onLog?: (entry: LogEntry) => void;
260
+ logFile?: string;
261
+ logRetryAttempts?: number;
262
+ logRetryDelayMs?: number;
263
+ };
264
+ type EnyAST = {
265
+ system?: string | null;
266
+ version?: string | null;
267
+ mode?: string | null;
268
+ targets?: string[];
269
+ ui?: string | null;
270
+ database?: DatabaseNode | null;
271
+ kernel?: KernelNode | null;
272
+ training?: TrainingNode | null;
273
+ modules?: ModuleNode[];
274
+ functions?: FunctionNode[];
275
+ ias?: IANode[];
276
+ objects?: ObjectNode[];
277
+ forms?: FormNode[];
278
+ animations?: AnimationNode[];
279
+ logic?: LogicNode[];
280
+ parallels?: ParallelNode[];
281
+ build?: BuildNode | null;
282
+ evolve?: EvolveNode | null;
283
+ substates?: SubstateNode[];
284
+ classes?: ClassNode[];
285
+ loops?: LoopNode[];
286
+ events?: EventNode[];
287
+ syncs?: SyncNode[];
288
+ timeouts?: TimeoutNode[];
289
+ delays?: DelayNode[];
290
+ securities?: SecurityNode[];
291
+ keys?: KeyNode[];
292
+ sandboxes?: SandboxNode[];
293
+ causes?: CauseNode[];
294
+ consequences?: ConsequenceNode[];
295
+ memories?: MemoryNode[];
296
+ persists?: PersistNode[];
297
+ roots?: RootNode[];
298
+ interfaces?: InterfaceNode[];
299
+ visuals?: VisualNode[];
300
+ inputs?: InputNode[];
301
+ throttles?: ThrottleNode[];
302
+ boosts?: BoostNode[];
303
+ costs?: CostNode[];
304
+ locks?: LockNode[];
305
+ unlocks?: UnlockNode[];
306
+ voids?: VoidNode[];
307
+ inherits?: InheritNode[];
308
+ contains?: ContainsNode[];
309
+ verifies?: VerifyNode[];
310
+ logNodes?: LogNode[];
311
+ raw?: string;
312
+ isEny?: boolean;
313
+ logs?: LogEntry[];
314
+ errors?: string[];
315
+ nodes?: Array<FunctionNode | IANode | ModuleNode | ObjectNode | FormNode | AnimationNode | LogicNode | ParallelNode | BuildNode | EvolveNode | SubstateNode | ClassNode | LoopNode | EventNode | SyncNode | TimeoutNode | DelayNode | SecurityNode | KeyNode | SandboxNode | CauseNode | ConsequenceNode | MemoryNode | PersistNode | RootNode | InterfaceNode | VisualNode | InputNode | ThrottleNode | BoostNode | CostNode | LockNode | UnlockNode | VoidNode | InheritNode | ContainsNode | VerifyNode | LogNode | KernelNode | DatabaseNode | TrainingNode | {
316
+ type: string;
317
+ [k: string]: any;
318
+ }>;
319
+ };
320
+
321
+ /**
322
+ * runENY: wrapper that returns a parsed AST. Fast-fails if no `Σ SYSTEM` is found
323
+ */
324
+ declare function runENY(code: string, options?: ParseOptions): EnyAST;
325
+
326
+ declare function parse(code: string, options?: ParseOptions): EnyAST;
327
+
328
+ declare enum TokenType {
329
+ SYMBOL = "SYMBOL",
330
+ IDENTIFIER = "IDENTIFIER",
331
+ STRING = "STRING",
332
+ NUMBER = "NUMBER",
333
+ ARROW = "ARROW",
334
+ LBRACE = "LBRACE",
335
+ RBRACE = "RBRACE",
336
+ COLON = "COLON",
337
+ COMMA = "COMMA",
338
+ LPAREN = "LPAREN",
339
+ RPAREN = "RPAREN",
340
+ LBRACKET = "LBRACKET",
341
+ RBRACKET = "RBRACKET",
342
+ NEWLINE = "NEWLINE",
343
+ COMPARATOR = "COMPARATOR",
344
+ OPERATOR = "OPERATOR",
345
+ EOF = "EOF"
346
+ }
347
+ interface Token {
348
+ type: TokenType;
349
+ value: string;
350
+ pos: number;
351
+ }
352
+ declare const SYMBOL_NAMES: Record<string, string>;
353
+ declare function tokenize(input: string): Token[];
354
+
355
+ interface TranspileOptions {
356
+ emitTypes?: boolean;
357
+ moduleFormat?: 'esm' | 'cjs';
358
+ }
359
+ declare function transpileToJS(ast: EnyAST, options?: TranspileOptions): string;
360
+ /**
361
+ * Generate TypeScript declaration (.d.ts) content for the AST
362
+ */
363
+ declare function transpileToDTS(ast: EnyAST): string;
364
+ /**
365
+ * Generate WebAssembly Text Format (.wat) stub for the AST
366
+ * This is a placeholder for future WASM compilation
367
+ */
368
+ declare function transpileToWAT(ast: EnyAST): string;
369
+ /**
370
+ * Check if WASM target is requested in build configuration
371
+ */
372
+ declare function hasWASMTarget(ast: EnyAST): boolean;
373
+
374
+ /**
375
+ * IAProvider interface - base for all IA implementations
376
+ */
377
+ interface IAProvider {
378
+ name: string;
379
+ /**
380
+ * Process an IA block and return a response
381
+ */
382
+ process(ia: IANode, context?: IAContext): Promise<IAResponse>;
383
+ /**
384
+ * Check if the provider is available/ready
385
+ */
386
+ isAvailable(): Promise<boolean>;
387
+ }
388
+ interface IAContext {
389
+ systemName?: string;
390
+ mode?: string;
391
+ onLog?: (entry: LogEntry) => void;
392
+ }
393
+ interface IAResponse {
394
+ success: boolean;
395
+ result?: any;
396
+ error?: string;
397
+ capabilities?: string[];
398
+ }
399
+ /**
400
+ * LocalIA - Mock implementation for testing and development
401
+ * Simulates IA behavior without external dependencies
402
+ */
403
+ declare class LocalIA implements IAProvider {
404
+ name: string;
405
+ private capabilities;
406
+ constructor();
407
+ isAvailable(): Promise<boolean>;
408
+ process(ia: IANode, context?: IAContext): Promise<IAResponse>;
409
+ /**
410
+ * Register a custom capability handler
411
+ */
412
+ registerCapability(name: string, handler: () => any): void;
413
+ }
414
+ /**
415
+ * RemoteIA - Stub for future remote IA service integration
416
+ */
417
+ declare class RemoteIA implements IAProvider {
418
+ name: string;
419
+ private endpoint;
420
+ private apiKey?;
421
+ constructor(endpoint: string, apiKey?: string);
422
+ isAvailable(): Promise<boolean>;
423
+ process(ia: IANode, context?: IAContext): Promise<IAResponse>;
424
+ }
425
+ /**
426
+ * IAManager - Manages IA providers and routes requests
427
+ */
428
+ declare class IAManager {
429
+ private providers;
430
+ private defaultProvider;
431
+ constructor(defaultProvider?: IAProvider);
432
+ registerProvider(provider: IAProvider): void;
433
+ getProvider(name?: string): IAProvider;
434
+ processIA(ia: IANode, context?: IAContext, providerName?: string): Promise<IAResponse>;
435
+ }
436
+ declare const defaultIAManager: IAManager;
437
+ /**
438
+ * Convenience function to process IA blocks
439
+ */
440
+ declare function processIA(ia: IANode, context?: IAContext, provider?: IAProvider): Promise<IAResponse>;
441
+
442
+ /**
443
+ * 🧬 SISTEMA DE EVOLUÇÃO AI-ENY
444
+ *
445
+ * O sistema de evolução permite transformações automáticas no AST.
446
+ * Comandos suportados:
447
+ *
448
+ * - rename <old> <new> : Renomeia função
449
+ * - optimize <fn> : Marca função para otimização
450
+ * - inline <fn> : Marca função para inlining
451
+ * - memoize <fn> : Adiciona memoização
452
+ * - parallelize <fn> : Marca para execução paralela
453
+ * - deprecate <fn> : Marca como deprecated
454
+ * - secure <fn> : Adiciona validações de segurança
455
+ * - cache <object> : Ativa cache para objeto
456
+ * - throttle <fn> <limit> : Adiciona throttling
457
+ * - observe <target> : Adiciona observabilidade
458
+ */
459
+ interface EvolveResult {
460
+ changed: boolean;
461
+ appliedSteps: string[];
462
+ skippedSteps: string[];
463
+ }
464
+ declare function applyEvolve(ast: EnyAST, options?: {
465
+ onLog?: (e: LogEntry) => void;
466
+ }): EvolveResult;
467
+
468
+ /**
469
+ * 🧬 VALIDAÇÃO SEMÂNTICA DOS 9 PILARES AI-ENY
470
+ *
471
+ * Σ ESTADO - Valida consistência de estados
472
+ * ƒ AÇÃO - Valida funções e referências
473
+ * ■ FORMA - Valida objetos e estruturas
474
+ * ⚡ TEMPO - Valida eventos e causalidade
475
+ * Ψ ENERGIA - Valida recursos e limites
476
+ * 𝓜 MEMÓRIA - Valida persistência e cache
477
+ * ☐ INTERFACE - Valida UI e inputs
478
+ * 🛡 SEGURANÇA - Valida regras de proteção
479
+ * ⟳ EVOLUÇÃO - Valida passos de evolução
480
+ */
481
+ interface ValidationResult {
482
+ errors: string[];
483
+ warnings: string[];
484
+ pillars: {
485
+ state: boolean;
486
+ action: boolean;
487
+ form: boolean;
488
+ time: boolean;
489
+ energy: boolean;
490
+ memory: boolean;
491
+ interface: boolean;
492
+ security: boolean;
493
+ evolve: boolean;
494
+ };
495
+ score: number;
496
+ }
497
+ declare function validateSemantic(ast: EnyAST, options?: ParseOptions): string[];
498
+ declare function validateSemanticFull(ast: EnyAST, options?: ParseOptions): ValidationResult;
499
+
500
+ /**
501
+ * Cria um sistema AI-ENY básico
502
+ */
503
+ declare function createSystem(config: {
504
+ name: string;
505
+ mode?: 'development' | 'production' | 'autonomous';
506
+ ui?: 'auto' | 'minimal' | 'adaptive' | 'none';
507
+ evolve?: boolean;
508
+ targets?: string[];
509
+ }): string;
510
+ /**
511
+ * Obtém o estado atual de um AST
512
+ */
513
+ declare function getState(ast: EnyAST): {
514
+ system: string | null | undefined;
515
+ mode: string | null | undefined;
516
+ ui: string | null | undefined;
517
+ version: string | null | undefined;
518
+ isEny: boolean | undefined;
519
+ substates: SubstateNode[];
520
+ };
521
+ /**
522
+ * Cria uma função AI-ENY
523
+ */
524
+ declare function createFunction(name: string, args: string[], steps: string[]): string;
525
+ /**
526
+ * Obtém todas as funções do AST
527
+ */
528
+ declare function getFunctions(ast: EnyAST): FunctionNode[];
529
+ /**
530
+ * Cria um objeto AI-ENY
531
+ */
532
+ declare function createObject(name: string, props: Record<string, any>): string;
533
+ /**
534
+ * Cria uma classe AI-ENY
535
+ */
536
+ declare function createClass(name: string, props: Record<string, any>, methods?: string[], extendsClass?: string): string;
537
+ /**
538
+ * Obtém todas as estruturas (objetos, classes) do AST
539
+ */
540
+ declare function getStructures(ast: EnyAST): {
541
+ objects: ObjectNode[];
542
+ classes: ClassNode[];
543
+ modules: ModuleNode[];
544
+ };
545
+ /**
546
+ * Cria um evento AI-ENY
547
+ */
548
+ declare function createEvent(name: string, handlers: string[]): string;
549
+ /**
550
+ * Cria um loop AI-ENY
551
+ */
552
+ declare function createLoop(count: number, body: string[]): string;
553
+ /**
554
+ * Obtém todos os elementos temporais
555
+ */
556
+ declare function getTemporals(ast: EnyAST): {
557
+ events: EventNode[];
558
+ loops: LoopNode[];
559
+ causes: CauseNode[];
560
+ timeouts: TimeoutNode[];
561
+ delays: DelayNode[];
562
+ syncs: SyncNode[];
563
+ };
564
+ /**
565
+ * Cria um throttle AI-ENY
566
+ */
567
+ declare function createThrottle(target: string, limit: number): string;
568
+ /**
569
+ * Cria um boost AI-ENY
570
+ */
571
+ declare function createBoost(target: string, factor: number): string;
572
+ /**
573
+ * Obtém informações de energia/recursos
574
+ */
575
+ declare function getEnergy(ast: EnyAST): {
576
+ throttles: ThrottleNode[];
577
+ boosts: BoostNode[];
578
+ costs: CostNode[];
579
+ };
580
+ /**
581
+ * Cria uma memória AI-ENY
582
+ */
583
+ declare function createMemory(name: string, size: number, persist?: boolean): string;
584
+ /**
585
+ * Cria persistência AI-ENY
586
+ */
587
+ declare function createPersist(target: string, storage?: 'db' | 'file' | 'cache'): string;
588
+ /**
589
+ * Obtém informações de memória
590
+ */
591
+ declare function getMemory(ast: EnyAST): {
592
+ database: DatabaseNode | null | undefined;
593
+ memories: MemoryNode[];
594
+ persists: PersistNode[];
595
+ };
596
+ /**
597
+ * Cria um input AI-ENY
598
+ */
599
+ declare function createInput(name: string, type?: 'text' | 'number' | 'email' | 'password'): string;
600
+ /**
601
+ * Cria um visual AI-ENY
602
+ */
603
+ declare function createVisual(name: string, props: Record<string, any>): string;
604
+ /**
605
+ * Obtém informações de interface
606
+ */
607
+ declare function getInterface(ast: EnyAST): {
608
+ forms: FormNode[];
609
+ inputs: InputNode[];
610
+ visuals: VisualNode[];
611
+ interfaces: InterfaceNode[];
612
+ };
613
+ /**
614
+ * Cria uma regra de segurança AI-ENY
615
+ */
616
+ declare function createSecurity(level: 'low' | 'medium' | 'high' | 'critical', rules: string[]): string;
617
+ /**
618
+ * Cria uma chave AI-ENY
619
+ */
620
+ declare function createKey(name: string, permissions: string[]): string;
621
+ /**
622
+ * Obtém informações de segurança
623
+ */
624
+ declare function getSecurity(ast: EnyAST): {
625
+ securities: SecurityNode[];
626
+ keys: KeyNode[];
627
+ sandboxes: SandboxNode[];
628
+ locks: LockNode[];
629
+ unlocks: UnlockNode[];
630
+ };
631
+ /**
632
+ * Cria um bloco de evolução AI-ENY
633
+ */
634
+ declare function createEvolve(steps: string[]): string;
635
+ /**
636
+ * Obtém informações de evolução
637
+ */
638
+ declare function getEvolve(ast: EnyAST): {
639
+ evolve: EvolveNode | null | undefined;
640
+ verifies: VerifyNode[];
641
+ logNodes: LogNode[];
642
+ };
643
+ /**
644
+ * Gera código AI-ENY completo a partir de configuração
645
+ */
646
+ declare function generateENY(config: {
647
+ system: {
648
+ name: string;
649
+ mode?: string;
650
+ ui?: string;
651
+ };
652
+ functions?: Array<{
653
+ name: string;
654
+ args?: string[];
655
+ steps: string[];
656
+ }>;
657
+ objects?: Array<{
658
+ name: string;
659
+ props: Record<string, any>;
660
+ }>;
661
+ events?: Array<{
662
+ name: string;
663
+ handlers: string[];
664
+ }>;
665
+ security?: {
666
+ level: string;
667
+ rules: string[];
668
+ };
669
+ evolve?: string[];
670
+ }): string;
671
+
672
+ export { AnimationNode, BoostNode, BuildNode, CauseNode, ClassNode, ConsequenceNode, ContainsNode, CostNode, DatabaseNode, DelayNode, EnyAST, EventNode, EvolveNode, EvolveResult, FormNode, FunctionNode, IAContext, IAManager, IANode, IAProvider, IAResponse, InheritNode, InputNode, InterfaceNode, KernelNode, KeyNode, LocalIA, LockNode, LogEntry, LogNode, LogicNode, LoopNode, MemoryNode, ModuleNode, ObjectNode, ParallelNode, ParseOptions, PersistNode, RemoteIA, RootNode, SYMBOL_NAMES, SandboxNode, SecurityNode, Step, SubstateNode, SyncNode, ThrottleNode, TimeoutNode, Token, TokenType, TrainingNode, TranspileOptions, UnlockNode, ValidationResult, VerifyNode, VisualNode, VoidNode, applyEvolve, createBoost, createClass, createEvent, createEvolve, createFunction, createInput, createKey, createLoop, createMemory, createObject, createPersist, createSecurity, createSystem, createThrottle, createVisual, defaultIAManager, generateENY, getEnergy, getEvolve, getFunctions, getInterface, getMemory, getSecurity, getState, getStructures, getTemporals, hasWASMTarget, parse, processIA, runENY, tokenize, transpileToDTS, transpileToJS, transpileToWAT, validateSemantic, validateSemanticFull };