hormigasais-edge-starter 0.1.0 → 0.1.2

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/README.md CHANGED
@@ -21,7 +21,7 @@ bash bootstrap.sh
21
21
  python3 generator.py
22
22
  \`\`\`
23
23
 
24
- ### Opción 2: Cuando esté publicado en npm (próximamente)
24
+ ### Opción 2:
25
25
 
26
26
  \`\`\`bash
27
27
  npx create-hormigas-node
@@ -34,7 +34,6 @@ npx create-hormigas-node
34
34
  - **Agentes autónomos**: \`hormiga_centinela\` y \`hormiga_relevo\`
35
35
  - **Generadores modulares** (config, protocols, scripts, agents, contracts)
36
36
  - **Verificación POST** del SDK (\`verify_sdk.py\`)
37
- - Soporte para secretos en \`~/.hormigas_secrets\`
38
37
 
39
38
  ## Comandos útiles
40
39
 
@@ -62,5 +61,7 @@ hormigasais-edge-starter/
62
61
  ---
63
62
 
64
63
  **Made with ❤️ for digital sovereignty**
64
+ Author: Cristhiam Leonardo Hernández Quiñonez (CLHQ)
65
+ © HormigasAIS • Lenguaje Binario HormigasAIS (LBH)
65
66
 
66
67
  [hormigasais.com](https://hormigasais.com) | [@Thrumanshow](https://github.com/Thrumanshow)
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "hormigasais-edge-starter",
3
- "version": "0.1.0",
4
- "description": "Starter template para desplegar un nodo soberano HormigasAIS con agentes LBH. Incluye SDK de protocolos LBH, generadores automáticos y agentes edge.",
5
- "main": "generator.js",
3
+ "version": "0.1.2",
4
+ "description": "Starter template para desplegar un nodo soberano HormigasAIS con agentes LBH. Incluye SDK de protocolos LBH, generadores autom\u00e1ticos y agentes edge.",
5
+ "main": "./generator.js",
6
6
  "bin": {
7
- "create-hormigas-node": "./generator.js"
7
+ "create-hormigas-node": "generator.js"
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/Thrumanshow/hormigasais-edge-starter.git"
11
+ "url": "git+https://github.com/Thrumanshow/hormigasais-edge-starter.git"
12
12
  },
13
13
  "keywords": [
14
14
  "hormigasais",
@@ -19,7 +19,7 @@
19
19
  "termux",
20
20
  "offline-first"
21
21
  ],
22
- "author": "Cristhiam Leonardo Hernández Quiñonez",
22
+ "author": "Cristhiam Leonardo Hern\u00e1ndez Qui\u00f1onez",
23
23
  "license": "MIT",
24
24
  "bugs": {
25
25
  "url": "https://github.com/Thrumanshow/hormigasais-edge-starter/issues"
@@ -37,5 +37,20 @@
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=14.0.0"
40
- }
41
- }
40
+ },
41
+ "type": "module",
42
+ "files": [
43
+ "generator.js",
44
+ "generator.py",
45
+ "bootstrap.sh",
46
+ "protocols",
47
+ "agents",
48
+ "scripts",
49
+ "utils",
50
+ "generators",
51
+ ".hormigasais",
52
+ "README.md",
53
+ "package.json"
54
+ ],
55
+ "packageManager": "npm@11.15.0"
56
+ }
package/.env.example DELETED
@@ -1,4 +0,0 @@
1
- LBH_SECRET=
2
- NODE_NAME=
3
- OWNER_NAME=
4
- OWNER_EMAIL=
@@ -1,123 +0,0 @@
1
- #!/usr/bin/env bash
2
- cd ~/hormigasais-edge-starter
3
-
4
- echo "🐜 Actualizando agents_generator.py y contracts_generator.py..."
5
-
6
- # agents_generator.py
7
- cat << 'AGENT' > generators/agents_generator.py
8
- """
9
- agents_generator.py
10
- HormigasAIS Edge Starter
11
- """
12
-
13
- from pathlib import Path
14
-
15
- def write_if_missing(path: Path, content: str):
16
- if path.exists():
17
- print(f" └── {path.name} ya existe")
18
- return
19
- path.parent.mkdir(parents=True, exist_ok=True)
20
- path.write_text(content, encoding="utf-8")
21
- print(f" └── {path.name} creado")
22
-
23
- def generate(root: Path):
24
- print("[LOAD] agents_generator")
25
- agents_dir = root / "agents"
26
- agents_dir.mkdir(exist_ok=True)
27
-
28
- centinela_code = '''#!/usr/bin/env python3
29
- """
30
- hormiga_centinela.py
31
- """
32
- import time
33
- import json
34
- import sys
35
- from pathlib import Path
36
-
37
- ROOT = Path(__file__).resolve().parent.parent
38
- sys.path.insert(0, str(ROOT))
39
-
40
- from utils.env_loader import load_termux_secrets
41
- load_termux_secrets()
42
-
43
- from protocols.encoder import make_header, encode_packet
44
- from protocols.constants import TYPE_CODES
45
- from protocols.signer import seal_action
46
-
47
- NODE_ID = "A16"
48
- OWNER = "Cristhiam Leonardo Hernández Quiñonez"
49
- INTERVAL = 30
50
-
51
- def emit_pulse():
52
- payload = json.dumps({
53
- "agent": "hormiga_centinela",
54
- "status": "ACTIVE",
55
- "node": NODE_ID,
56
- "ts": int(time.time())
57
- })
58
- header = make_header(NODE_ID[:3], "00")
59
- frame = encode_packet(header, TYPE_CODES["FUEL"], payload)
60
- seal = seal_action(payload, OWNER)
61
- print("[CENTINELA] FUEL pulse emitido")
62
- return frame
63
-
64
- if __name__ == "__main__":
65
- print(f"[CENTINELA] Iniciando en nodo {NODE_ID}")
66
- while True:
67
- emit_pulse()
68
- time.sleep(INTERVAL)
69
- '''
70
-
71
- c_path = agents_dir / "hormiga_centinela.py"
72
- write_if_missing(c_path, centinela_code)
73
- c_path.chmod(0o755)
74
-
75
- print("[ OK ] agents_generator")
76
- AGENT
77
-
78
- # contracts_generator.py
79
- cat << 'CONTRACT' > generators/contracts_generator.py
80
- """
81
- contracts_generator.py
82
- HormigasAIS Edge Starter
83
- """
84
-
85
- from pathlib import Path
86
- import datetime
87
-
88
- def write_if_missing(path: Path, content: str):
89
- if path.exists():
90
- print(f" └── {path.name} ya existe")
91
- return
92
- path.parent.mkdir(parents=True, exist_ok=True)
93
- path.write_text(content, encoding="utf-8")
94
- print(f" └── {path.name} creado")
95
-
96
- def generate(root: Path):
97
- print("[LOAD] contracts_generator")
98
- protocols_dir = root / "protocols"
99
- protocols_dir.mkdir(exist_ok=True)
100
-
101
- fecha = datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
102
-
103
- contract_content = f"""\
104
- ==============================================================================
105
- .human GOVERNANCE CONTRACT — HormigasAIS Edge Starter
106
- ==============================================================================
107
- NODE: A16
108
- OWNER: Cristhiam Leonardo Hernández Quiñonez
109
- CREATED: {fecha}
110
- SOVEREIGNTY DECLARATION:
111
- This node operates under full digital sovereignty.
112
- CERT::LBH-HUMAN-STARTER-V1-CLHQ
113
- ==============================================================================
114
- """
115
- contract_path = protocols_dir / "human_contract.lbh"
116
- write_if_missing(contract_path, contract_content)
117
- print("[ OK ] contracts_generator")
118
- CONTRACT
119
-
120
- echo "✅ Generadores actualizados"
121
-
122
- python3 generator.py
123
- echo "✅ agents y contracts actualizados correctamente."