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.
- package/LICENSE +18 -0
- package/README.md +740 -0
- package/dist/chunk-2WFUL4XJ.js +2476 -0
- package/dist/chunk-E4KJZEXX.js +274 -0
- package/dist/chunk-PNKVD2UK.js +26 -0
- package/dist/cli.cjs +2453 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +100 -0
- package/dist/index.cjs +3235 -0
- package/dist/index.d.cts +704 -0
- package/dist/index.d.ts +704 -0
- package/dist/index.js +495 -0
- package/dist/react/index.cjs +342 -0
- package/dist/react/index.d.cts +751 -0
- package/dist/react/index.d.ts +751 -0
- package/dist/react/index.js +284 -0
- package/dist/symbols.cjs +324 -0
- package/dist/symbols.d.cts +584 -0
- package/dist/symbols.d.ts +584 -0
- package/dist/symbols.js +61 -0
- package/examples/README.md +13 -0
- package/examples/ia-demo.eny +37 -0
- package/examples/sample.eny +15 -0
- package/examples/simple/system.eny +7 -0
- package/examples/spec/sample.eny +19 -0
- package/examples/starter/README.md +96 -0
- package/examples/starter/main.eny +39 -0
- package/examples/starter/run.js +68 -0
- package/examples/starter.eny +16 -0
- package/examples/wasm-demo.eny +34 -0
- package/master.mid.ai +540 -0
- package/package.json +71 -0
|
@@ -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,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
|
+
}
|