forbocai 0.3.0 → 0.3.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
@@ -1,6 +1,6 @@
1
1
  <br/>
2
2
  <div align="center">
3
- <img alt="ForbocAI logo" src="https://forbocai.github.io/logo.png" height="50" align="center">
3
+ <img alt="ForbocAI logo" src="https://forboc.ai/logo.png" height="50" align="center">
4
4
 
5
5
  <br/>
6
6
 
@@ -57,11 +57,34 @@ git add . && git commit -m "chore: release vX.X.X" && git push
57
57
 
58
58
  The **ForbocAI SDK** is an **Engine-Agnostic** toolkit for creating autonomous AI-powered NPCs in any game or application. It runs anywhere (Node, Browser, Python, Rust).
59
59
 
60
- - **Local SLM Cortex** — Run quantized Small Language Models in your environment
61
- - **Autonomous NPCs** — Create agents with persona, memory, and validated actions
62
- - **Persistent Memory** — RAG pipeline for semantic recall across sessions
63
- - **Portable Souls** — Export agent state to IPFS for cross-application use
64
- - **Automated QA** — Ghost Agents for headless testing at scale
60
+ - **Local SLM Cortex** — Run **WebLLM** (SmolLM2, Llama3) directly in-browser via WebGPU.
61
+ - **Autonomous NPCs** — Create agents with persona, memory, and validated actions.
62
+ - **Persistent Memory** — **IndexedDB** vector storage for 10k+ memories.
63
+ - **Portable Souls** — P2P **IPFS** pinning via integrated Helia node.
64
+ - **Automated QA** — Ghost Agents for headless testing at scale.
65
+
66
+ **Requirements**:
67
+ - Browser with **WebGPU** support (Chrome 113+, Edge 113+) for Cortex.
68
+ - Node.js 18+ for CLI/Build.
69
+
70
+ ---
71
+
72
+ ## Architectural Philosophy (Strict)
73
+
74
+ `Code_Dóctrine // Pure_Fúnction`
75
+
76
+ The ForbocAI SDK strictly adheres to **Functional Programming (FP)** principles to ensure predictable, testable, and robust AI behavior.
77
+
78
+ ### 🚫 The No-Class Manifesto
79
+ We **reject** Object-Oriented Programming (OOP) classes (`class`) in favor of **Functional Composition**.
80
+ - **State is Immutable**: Objects are never mutated in place. New versions are returned.
81
+ - **Pure Functions**: Logic is separated from data. Functions receive input and return output with no side effects.
82
+ - **Factory Pattern**: We use factory functions with **closures** to encapsulate private state (`createAgent`, `createMemory`) instead of classes (`new Agent`).
83
+
84
+ ### Why?
85
+ AI state (memories, personality, mood) is complex and sensitive. Classes encourage hidden mutations that lead to "Ghost in the Machine" bugs. Pure functions ensure that every thought process is traceable and reproducible.
86
+
87
+ > *Logic must be pure. Order must be absolute.*
65
88
 
66
89
  **᛭ ᛫ ᛬ ᛫ ᛭**
67
90
 
@@ -139,16 +162,46 @@ console.log(response.dialogue);
139
162
 
140
163
  | Module | Description | Status |
141
164
  |--------|-------------|--------|
142
- | **Cortex** | Local SLM inference engine (Engine Agnostic) | ✅ Complete |
165
+ | **Cortex** | Local SLM inference engine (Self-Contained) | ✅ Browser / 🚧 Node |
143
166
  | **Agent** | Autonomous entities with persona, state, memory | ✅ Complete |
144
- | **Memory** | RAG pipeline for persistent semantic recall | ✅ Complete |
167
+ | **Memory** | Local Vector DB (IndexedDB / FS) | ✅ Complete |
145
168
  | **Bridge** | Neuro-symbolic action validation | ✅ Complete |
146
169
  | **Soul** | Portable agent state on IPFS/Solana | ✅ Complete |
147
170
  | **Ghost** | Headless QA testing at scale | ✅ Complete |
148
171
 
149
172
  ---
150
173
 
151
- ## Module: Memory (Local Vector DB)
174
+ ## The Neural Grid
175
+
176
+ `Systém_Architécture // Cónnection`
177
+
178
+ The **ForbocAI Protocol** strictly separates **State** (SDK) from **Logic** (API).
179
+
180
+ ```
181
+ ┌────────────────────────────────────────────────────────────────┐
182
+ │ THE NEURAL GRID │
183
+ ├────────────────────────────────────────────────────────────────┤
184
+ │ │
185
+ │ ┌──────────────┐ ┌──────────────┐ │
186
+ │ │ SDK │ │ API │ │
187
+ │ │ (Container) │◄────────►│ (Pure Logic) │ │
188
+ │ └──────────────┘ └──────────────┘ │
189
+ │ │ │ │
190
+ │ The VESSEL The TRUTH │
191
+ │ [SLM + VectorDB] [Stateless Rules] │
192
+ │ [Memory + Soul] [No Database] │
193
+ │ │
194
+ └────────────────────────────────────────────────────────────────┘
195
+ ```
196
+
197
+ 1. **SDK is the Body**: It contains the *entire* existence of the Agent.
198
+ * **SLM Cortex**: The brain (Local Inference).
199
+ * **Vector Memory**: The memory (Local Storage).
200
+ * **Self-Contained**: Runs locally (Browser/Node/Python/Rust) without external dependencies.
201
+ 2. **API is the Law**: It is a stateless oracle that validates reality.
202
+ * **No Database**: The API never stores agent state.
203
+ * **Pure Functions**: Input (Action) → Output (Validation).
204
+
152
205
 
153
206
  `Mémory_Módule // Sémantic_Récall`
154
207
 
@@ -331,38 +384,7 @@ results.tests
331
384
  - `aiDecisionsPerSec` — Agent decision throughput
332
385
  - `explorationCoverage` — Map area discovered
333
386
 
334
- ---
335
-
336
- ## The Neural Grid
337
-
338
- `Systém_Architécture // Cónnection`
339
-
340
- The **ForbocAI Protocol** enables agents to understand the world they inhabit.
341
387
 
342
- ```
343
- ┌────────────────────────────────────────────────────────────────┐
344
- │ THE NEURAL GRID │
345
- ├────────────────────────────────────────────────────────────────┤
346
- │ │
347
- │ ┌──────────────┐ ┌─────────────┐ ┌──────────────┐ │
348
- │ │ GAME │ │ SDK │ │ API │ │
349
- │ │ (Execution) │◄──►│ (Container) │◄──►│ (Logic) │ │
350
- │ └──────────────┘ └─────────────┘ └──────────────┘ │
351
- │ │ │ │ │
352
- │ World Brain The Body The Mind │
353
- │ (Physics) (SLM + VectorDB) (Pure Functions) │
354
- │ │
355
- └────────────────────────────────────────────────────────────────┘
356
- ```
357
-
358
- 1. **Synthetic Intuition**: Agents "feel" the state of the world through standardized Observations.
359
- 2. **Valid Action**: Agents express their intent through standardized Actions, ensuring they never break the rules of physics.
360
- 3. **Engine Agnostic**: Whether in a text adventure or a 3D simulation, the Agent's soul remains consistent.
361
-
362
- This ensures that NPCs are **smart** (thanks to LLMs) but **reliable** (thanks to the Grid).
363
- > ⚠️ **W̸A̴R̷N̷I̷N̵G̸**: S̴y̸n̷t̶h̵e̷t̸i̵c̸ ̶I̵n̴t̷u̸i̷t̸i̶o̶n̴ ̶m̶a̵y̴ ̶c̴a̷u̸s̷e̶ ̷u̷n̷i̸n̵t̸e̵n̴d̶e̵d̵ ̸s̴e̸n̶t̵i̷e̷n̶c̴e̴.
364
-
365
- ---
366
388
 
367
389
  ## Digital Souls (Solana/Metaplex)
368
390
 
@@ -394,7 +416,7 @@ In the ForbocAI ecosystem, an NFT is not just a receipt—it is an **Encapsulate
394
416
 
395
417
  `Éxternal_Líns // Cónnect`
396
418
 
397
- - **Website:** [forbocai.github.io](https://forbocai.github.io)
419
+ - **Website:** [forboc.ai](https://forboc.ai)
398
420
  - **Documentation:** [forbocai.docs.buildwithfern.com](https://forbocai.docs.buildwithfern.com)
399
421
  - **Discord:** [discord.gg/6hr2jHqnsG](https://discord.gg/6hr2jHqnsG)
400
422
  - **Telegram:** [t.me/forbocai](https://t.me/forbocai)