eny-ai 1.0.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.
@@ -0,0 +1,19 @@
1
+ Σ SYSTEM "Studio Neural"
2
+ Σ TARGET web desktop
3
+ Σ UI adaptive
4
+ Σ IA creative
5
+ Σ EVOLVE true
6
+
7
+ Ω User { nome email }
8
+
9
+ Φ UI { layout: canvas }
10
+
11
+ Ψ IA "Criador" {
12
+ gerar imagens
13
+ gerar 3D
14
+ gerar animações
15
+ }
16
+
17
+ Θ animation "intro"
18
+
19
+ → iniciar sistema
@@ -0,0 +1,96 @@
1
+ # Starter Example
2
+
3
+ Este é um projeto exemplo para começar a usar a biblioteca AI-ENY (enyosx-ai).
4
+
5
+ ## Estrutura
6
+
7
+ ```
8
+ starter/
9
+ ├── main.eny # Sistema principal AI-ENY
10
+ ├── run.js # Script de execução Node.js
11
+ └── README.md # Este arquivo
12
+ ```
13
+
14
+ ## Instalação
15
+
16
+ ```bash
17
+ # Instale a biblioteca
18
+ npm install enyosx-ai
19
+
20
+ # Ou globalmente para usar a CLI
21
+ npm install -g enyosx-ai
22
+ ```
23
+
24
+ ## Uso
25
+
26
+ ### Via CLI
27
+
28
+ ```bash
29
+ # Parsear e mostrar AST
30
+ npx enyosx-ai main.eny
31
+
32
+ # Transpilar para JavaScript
33
+ npx enyosx-ai main.eny --emit js --out output.js
34
+
35
+ # Gerar tipos TypeScript
36
+ npx enyosx-ai main.eny --emit dts --out output.d.ts
37
+
38
+ # Gerar stub WASM
39
+ npx enyosx-ai main.eny --emit wasm --out output.wat
40
+ ```
41
+
42
+ ### Via JavaScript/TypeScript
43
+
44
+ ```bash
45
+ node run.js
46
+ ```
47
+
48
+ ## Arquivo main.eny
49
+
50
+ ```eny
51
+ Σ SYSTEM "Starter App"
52
+ Σ MODE development
53
+ Σ UI auto
54
+
55
+ Δ inicializar()
56
+ → configurar
57
+ → iniciar
58
+
59
+ Δ configurar()
60
+ → carregarConfigs
61
+
62
+ Δ carregarConfigs()
63
+ → validar
64
+
65
+ Δ validar()
66
+ → done
67
+
68
+ Δ iniciar()
69
+ → executarApp
70
+
71
+ Δ executarApp()
72
+ → done
73
+
74
+ Δ done()
75
+
76
+ Ψ IA assistente {
77
+ aprender contexto
78
+ sugerir acoes
79
+ }
80
+
81
+ Ω Config {
82
+ ambiente: dev
83
+ debug: true
84
+ }
85
+
86
+ Σ BUILD {
87
+ target: js
88
+ target: wasm
89
+ }
90
+ ```
91
+
92
+ ## Próximos Passos
93
+
94
+ 1. Modifique `main.eny` para seu caso de uso
95
+ 2. Use a CLI para transpilar para JS ou WASM
96
+ 3. Integre com seu projeto Node.js ou React
@@ -0,0 +1,39 @@
1
+ Σ SYSTEM "Starter App"
2
+ Σ MODE development
3
+ Σ UI auto
4
+
5
+ Δ inicializar()
6
+ → configurar
7
+ → iniciar
8
+
9
+ Δ configurar()
10
+ → carregarConfigs
11
+
12
+ Δ carregarConfigs()
13
+ → validar
14
+
15
+ Δ validar()
16
+ → done
17
+
18
+ Δ iniciar()
19
+ → executarApp
20
+
21
+ Δ executarApp()
22
+ → done
23
+
24
+ Δ done()
25
+
26
+ Ψ IA assistente {
27
+ aprender contexto
28
+ sugerir acoes
29
+ }
30
+
31
+ Ω Config {
32
+ ambiente: dev
33
+ debug: true
34
+ }
35
+
36
+ Σ BUILD {
37
+ target: js
38
+ target: wasm
39
+ }
@@ -0,0 +1,68 @@
1
+ // Starter example - Node.js script
2
+ const fs = require('fs');
3
+ const path = require('path');
4
+
5
+ // Import enyosx-ai (use require for commonjs compatibility)
6
+ let runENY, transpileToJS, transpileToDTS, transpileToWAT, LocalIA;
7
+
8
+ try {
9
+ const lib = require('enyosx-ai');
10
+ runENY = lib.runENY;
11
+ transpileToJS = lib.transpileToJS;
12
+ transpileToDTS = lib.transpileToDTS;
13
+ transpileToWAT = lib.transpileToWAT;
14
+ LocalIA = lib.LocalIA;
15
+ } catch (e) {
16
+ // Fallback for local development
17
+ const lib = require('../../dist/index.cjs');
18
+ runENY = lib.runENY;
19
+ transpileToJS = lib.transpileToJS;
20
+ transpileToDTS = lib.transpileToDTS;
21
+ transpileToWAT = lib.transpileToWAT;
22
+ LocalIA = lib.LocalIA;
23
+ }
24
+
25
+ // Read the main.eny file
26
+ const enyPath = path.join(__dirname, 'main.eny');
27
+ const code = fs.readFileSync(enyPath, 'utf-8');
28
+
29
+ console.log('=== AI-ENY Starter Example ===\n');
30
+
31
+ // Parse the code
32
+ const ast = runENY(code, {
33
+ verbose: true,
34
+ onLog: (entry) => {
35
+ console.log(`[${entry.level.toUpperCase()}] ${entry.event}`);
36
+ }
37
+ });
38
+
39
+ console.log('\n=== Parsed AST ===');
40
+ console.log(`System: ${ast.system}`);
41
+ console.log(`Mode: ${ast.mode}`);
42
+ console.log(`Functions: ${ast.functions?.map(f => f.name).join(', ')}`);
43
+ console.log(`IAs: ${ast.ias?.map(ia => ia.name).join(', ')}`);
44
+ console.log(`Objects: ${ast.objects?.map(o => o.name).join(', ')}`);
45
+ console.log(`Build targets: ${ast.build?.targets?.join(', ')}`);
46
+
47
+ // Transpile to JS
48
+ console.log('\n=== Transpiled JS (preview) ===');
49
+ const js = transpileToJS(ast);
50
+ console.log(js.substring(0, 500) + '...');
51
+
52
+ // Process IA blocks
53
+ if (ast.ias && ast.ias.length > 0) {
54
+ console.log('\n=== Processing IA blocks ===');
55
+ const ia = new LocalIA();
56
+
57
+ for (const iaNode of ast.ias) {
58
+ console.log(`\nProcessing IA: ${iaNode.name}`);
59
+ ia.process(iaNode, {
60
+ onLog: (e) => console.log(` [IA] ${e.event}`)
61
+ }).then(result => {
62
+ console.log(` Result: ${result.success ? 'SUCCESS' : 'FAILED'}`);
63
+ console.log(` Capabilities processed: ${result.capabilities?.join(', ')}`);
64
+ });
65
+ }
66
+ }
67
+
68
+ console.log('\n=== Done ===');
@@ -0,0 +1,16 @@
1
+ Σ SYSTEM "Starter App"
2
+ Σ MODULE "Starter"
3
+ Δ hello(name)
4
+ → greet
5
+ → done
6
+ Ψ IA "assistant"
7
+ say: "Olá"
8
+ Φ UI { layout: simple }
9
+ Ω Item { title }
10
+ ⊗ {
11
+ task A
12
+ task B
13
+ }
14
+ Σ BUILD {
15
+ target: node
16
+ }
@@ -0,0 +1,34 @@
1
+ Σ SYSTEM "WASM Demo"
2
+ Σ MODE production
3
+ Σ TARGET wasm
4
+
5
+ Δ inicializar()
6
+ → configurar
7
+ → ativar
8
+
9
+ Δ configurar()
10
+ → carregarRecursos
11
+
12
+ Δ carregarRecursos()
13
+ → done
14
+
15
+ Δ ativar()
16
+ → iniciarLoop
17
+
18
+ Δ iniciarLoop()
19
+ → processar
20
+
21
+ Δ processar()
22
+ → done
23
+
24
+ Δ done()
25
+
26
+ Ψ IA runtime {
27
+ gerenciarMemoria
28
+ otimizarExecucao
29
+ }
30
+
31
+ Σ BUILD {
32
+ target: wasm
33
+ target: js
34
+ }