forbocai 0.4.4 → 0.6.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/README.md +15 -468
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/package.json +13 -39
- package/LICENSE +0 -7
- package/dist/chunk-4FGRXBH3.mjs +0 -1026
- package/dist/chunk-BLLIIPDV.mjs +0 -77
- package/dist/chunk-GEDAPA4V.mjs +0 -188
- package/dist/chunk-PIQGEUPM.mjs +0 -941
- package/dist/chunk-TDZZMNPW.mjs +0 -1225
- package/dist/cli.d.mts +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -932
- package/dist/cli.mjs +0 -909
- package/dist/index.d.mts +0 -693
- package/dist/index.d.ts +0 -693
- package/dist/index.js +0 -1289
- package/dist/index.mjs +0 -1225
- package/dist/src-B232OSYV.mjs +0 -14
- package/dist/src-QN75SOHO.mjs +0 -44
- package/dist/src-ZO6QLWZS.mjs +0 -194028
- package/postinstall.js +0 -56
- package/scripts/check-cmake.js +0 -73
- package/scripts/download_slm.ts +0 -37
- package/scripts/init_infra.ts +0 -20
package/README.md
CHANGED
|
@@ -4,490 +4,37 @@
|
|
|
4
4
|
|
|
5
5
|
<br/>
|
|
6
6
|
|
|
7
|
-
# ForbocAI
|
|
7
|
+
# ForbocAI
|
|
8
|
+
### `Légacy_Déporecation // Prótocol_Update`
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
**ᚠ ᛫ ᛟ ᛫ ᚲ**
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Autonomous AI for game NPCs.
|
|
14
|
-
|
|
15
|
-
[](https://docs.forboc.ai)
|
|
16
|
-
[](https://www.npmjs.com/package/forbocai)
|
|
17
|
-
[](https://discord.gg/6hr2jHqnsG)
|
|
18
|
-
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
> *W̶e̴ ̶b̶u̷i̸l̶d̶ ̵t̵h̶e̴ ̷v̴e̴s̶s̷e̵l̴s̴.̷ ̷T̷h̵e̷y̸ ̴b̵r̴e̴a̷t̸h̸e̷ ̸t̴h̸e̶i̶r̶ ̴o̵w̷n̴ ̸l̸i̷f̷e̸.̸*
|
|
12
|
+
The `forbocai` package has been ascended into a modularized monorepo. This package is now a **transparent proxy** for `@forbocai/core`.
|
|
22
13
|
|
|
23
14
|
---
|
|
24
15
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
`Públish_Séquence // NPM_Deploý`
|
|
28
|
-
|
|
29
|
-
To publish a new version to NPM:
|
|
16
|
+
### `Instáll_Séquence // Pácкage`
|
|
30
17
|
|
|
18
|
+
For universal protocol logic, state management, and soul portability:
|
|
31
19
|
```bash
|
|
32
|
-
|
|
33
|
-
npm version <major|minor|patch> --no-git-tag-version
|
|
34
|
-
|
|
35
|
-
# 2. Build
|
|
36
|
-
npm run build
|
|
37
|
-
|
|
38
|
-
# 3. Publish (use token from classified/AUTH.md)
|
|
39
|
-
echo "//registry.npmjs.org/:_authToken=<TOKEN_FROM_CLASSIFIED_AUTH_MD>" > .npmrc
|
|
40
|
-
npm publish --access public
|
|
41
|
-
|
|
42
|
-
# 4. Clean up (IMPORTANT: don't commit .npmrc)
|
|
43
|
-
rm .npmrc
|
|
44
|
-
|
|
45
|
-
# 5. Commit and push
|
|
46
|
-
git add . && git commit -m "chore: release vX.X.X" && git push
|
|
20
|
+
npm install @forbocai/core
|
|
47
21
|
```
|
|
48
22
|
|
|
49
|
-
|
|
50
|
-
> **Current Version**: Check `package.json` for the current version
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## Overview
|
|
55
|
-
|
|
56
|
-
`Córe_Módules // SDK_Init`
|
|
57
|
-
|
|
58
|
-
The **ForbocAI SDK** is an **Engine-Agnostic** toolkit for creating autonomous AI-powered NPCs in any game or application. **Node.js only** - browser support has been removed.
|
|
59
|
-
|
|
60
|
-
- **Local SLM Cortex** — Run quantized Small Language Models (SLMs) natively via **node-llama-cpp**.
|
|
61
|
-
- **Autonomous NPCs** — Create agents with persona, memory, and validated actions.
|
|
62
|
-
- **Persistent Memory** — Local vector storage (LanceDB) for semantic recall.
|
|
63
|
-
- **Portable Souls** — Permanent storage (Arweave) + Solana NFTs for tradeable agent identities.
|
|
64
|
-
- **Automated QA** — Ghost Agents for headless testing at scale.
|
|
65
|
-
- **API-Only Operation** — SDK requires API connectivity; no offline fallback strategies.
|
|
66
|
-
|
|
67
|
-
**Requirements**:
|
|
68
|
-
- **Node.js 18+** (Desktop/Server environments only)
|
|
69
|
-
- **API Connectivity** — SDK requires connection to ForbocAI API for all operations
|
|
70
|
-
- **CMake + C++ Build Tools** — Required for native Cortex module (`node-llama-cpp`)
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Architectural Philosophy (Strict)
|
|
75
|
-
|
|
76
|
-
`Code_Dóctrine // Pure_Fúnction`
|
|
77
|
-
|
|
78
|
-
The ForbocAI SDK strictly adheres to **Functional Programming (FP)** principles to ensure predictable, testable, and robust AI behavior.
|
|
79
|
-
|
|
80
|
-
### 🚫 The No-Class Manifesto
|
|
81
|
-
We **reject** Object-Oriented Programming (OOP) classes (`class`) in favor of **Functional Composition**.
|
|
82
|
-
- **State is Immutable**: Objects are never mutated in place. New versions are returned.
|
|
83
|
-
- **Pure Functions**: Logic is separated from data. Functions receive input and return output with no side effects.
|
|
84
|
-
- **Factory Pattern**: We use factory functions with **closures** to encapsulate private state (`createAgent`, `createMemory`) instead of classes (`new Agent`).
|
|
85
|
-
|
|
86
|
-
### Why?
|
|
87
|
-
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.
|
|
88
|
-
|
|
89
|
-
> *Logic must be pure. Order must be absolute.*
|
|
90
|
-
|
|
91
|
-
**᛭ ᛫ ᛬ ᛫ ᛭**
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Installation
|
|
96
|
-
|
|
97
|
-
`Instáll_Séquence // Pácкage`
|
|
98
|
-
|
|
23
|
+
For Node.js environments (SLM + Local Memory):
|
|
99
24
|
```bash
|
|
100
|
-
|
|
101
|
-
npm install forbocai
|
|
25
|
+
npm install @forbocai/node
|
|
102
26
|
```
|
|
103
27
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
## CLI Reference
|
|
109
|
-
|
|
110
|
-
`CLI_Tóols // Cómmand_Líne`
|
|
111
|
-
|
|
112
|
-
The SDK includes a comprehensive CLI for managing your AI infrastructure.
|
|
113
|
-
|
|
28
|
+
For browser environments (WebLLM + In-browser Memory):
|
|
114
29
|
```bash
|
|
115
|
-
|
|
116
|
-
npx forbocai agent create "A wise wizard"
|
|
117
|
-
npx forbocai agent list
|
|
118
|
-
npx forbocai agent chat <agentId>
|
|
119
|
-
|
|
120
|
-
# Memory & Bridge
|
|
121
|
-
npx forbocai memory recall <agentId> "battle"
|
|
122
|
-
npx forbocai bridge validate action.json
|
|
123
|
-
|
|
124
|
-
# System
|
|
125
|
-
npx forbocai status
|
|
126
|
-
npx forbocai doctor
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
See [full CLI documentation](https://docs.forboc.ai/docs/pages/cli).
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## Quick Start
|
|
134
|
-
|
|
135
|
-
`Quíck_Stárt // Éxample`
|
|
136
|
-
|
|
137
|
-
```typescript
|
|
138
|
-
import { createCortex, createAgent } from 'forbocai';
|
|
139
|
-
|
|
140
|
-
// Córtex_Init // Loćal_Inférence
|
|
141
|
-
const cortex = await createCortex({ model: 'smollm2-135m' });
|
|
142
|
-
|
|
143
|
-
// Agént_Créate // NPC_Entíty
|
|
144
|
-
const npc = await createAgent({
|
|
145
|
-
cortex,
|
|
146
|
-
persona: 'A suspicious merchant who was once cheated by adventurers.',
|
|
147
|
-
state: { inventory: ['rusty_key', 'healing_potion'], mood: 'suspicious' }
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
// Prócéss_Ínput // Dïalógue
|
|
151
|
-
const response = await npc.process({
|
|
152
|
-
input: 'I want to buy a healing potion.',
|
|
153
|
-
context: { playerGold: 50 }
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
console.log(response.dialogue);
|
|
157
|
-
// "Hmm, you have the coin... but how do I know you won't just take it and run?"
|
|
30
|
+
npm install @forbocai/browser
|
|
158
31
|
```
|
|
159
|
-
<!-- 0̶x̷E̷R̴R̵:̴ ̴I̴N̴F̵E̸C̶T̷I̵O̷N̷_̸D̶E̴T̷E̶C̸T̸E̶D̴ -->
|
|
160
32
|
|
|
161
33
|
---
|
|
162
34
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
`Módulátion_Máp // Sýstem_Óverview`
|
|
166
|
-
|
|
167
|
-
| Module | Description | Status |
|
|
168
|
-
|--------|-------------|--------|
|
|
169
|
-
| **Cortex** | Local SLM inference engine (Self-Contained) | ✅ Node (Native) / 🚧 C++ (UE) |
|
|
170
|
-
| **Agent** | Autonomous entities with persona, state, memory | ✅ Complete |
|
|
171
|
-
| **Memory** | Local Vector DB (IndexedDB / FS) | ✅ Complete |
|
|
172
|
-
| **Bridge** | Neuro-symbolic action validation | ✅ Complete |
|
|
173
|
-
| **Soul** | Portable agent state on Arweave/Solana | ✅ Complete |
|
|
174
|
-
| **Ghost** | Headless QA testing at scale | ✅ Complete |
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
## Architecture Overview
|
|
179
|
-
|
|
180
|
-
`Systém_Architécture // Round_Tríp`
|
|
181
|
-
|
|
182
|
-
The **ForbocAI SDK** orchestrates a **7-Step Round-Trip** between the Game, the Local Infrastructure, and the Cloud Mind.
|
|
183
|
-
|
|
184
|
-
```
|
|
185
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
186
|
-
│ YOUR APPLICATION │
|
|
187
|
-
├─────────────────────────────────────────────────────────────┤
|
|
188
|
-
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
|
|
189
|
-
│ │ Agent │ │ Memory │ │ Bridge │ │
|
|
190
|
-
│ └──────┬───────┘ └──────────────┘ └──────────────┘ │
|
|
191
|
-
│ │ (1) Request │
|
|
192
|
-
│ ▼ │
|
|
193
|
-
│ ┌──────────────┐ │
|
|
194
|
-
│ │ SDK Core │ <────── (7) Execute ─────────────────┐ │
|
|
195
|
-
│ └──────┬───────┘ │ │
|
|
196
|
-
│ │ (2) Bundle (6) Verdict │ │
|
|
197
|
-
│ ▼ (Signed) │ │
|
|
198
|
-
│ ┌──────────────┐ (3) Directive ┌──────────────┐ │ │
|
|
199
|
-
│ │ Cloud API │ ──────────────────► │ Cloud API │ │ │
|
|
200
|
-
│ │ (The Law) │ │ (Validation) │ │ │
|
|
201
|
-
│ └──────────────┘ └──────▲───────┘ │ │
|
|
202
|
-
│ │ │ │
|
|
203
|
-
│ (4) Input │ (5) │ │
|
|
204
|
-
│ ▼ │ Submit │ │
|
|
205
|
-
│ ┌──────────────┐ │ │ │
|
|
206
|
-
│ │ Cortex │ ───────────────────────────┘ │ │
|
|
207
|
-
│ │ (SLM/LLM) │ Generation │ │
|
|
208
|
-
│ └──────────────┘ │ │
|
|
209
|
-
└─────────────────────────────────────────────────────────────┘
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
**The Loop:**
|
|
213
|
-
1. **Game -> SDK**: Request Action.
|
|
214
|
-
2. **SDK -> API**: Send State/Memory.
|
|
215
|
-
3. **API -> SDK**: Return **Directive** (The Law).
|
|
216
|
-
4. **SDK -> Cortex**: Generate creative content based on Directive.
|
|
217
|
-
5. **SDK -> API**: Submit content for validation.
|
|
218
|
-
6. **API -> SDK**: Return **Verdict** (Signed Action).
|
|
219
|
-
7. **SDK -> Game**: Execute final action.
|
|
220
|
-
|
|
221
|
-
*Note: For Enterprise usage, Step 4 can be replaced by a Cloud LLM provider, unifying the architecture for low-end (SLM) and high-end (LLM) devices.*
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
`Mémory_Módule // Sémantic_Récall`
|
|
225
|
-
|
|
226
|
-
The Memory module provides **privacy-first** local vector storage with semantic search.
|
|
227
|
-
|
|
228
|
-
```typescript
|
|
229
|
-
import { createMemory } from 'forbocai';
|
|
230
|
-
|
|
231
|
-
// Initialize memory with temporal decay
|
|
232
|
-
const memory = createMemory({
|
|
233
|
-
decay: 'temporal', // Old memories fade over time
|
|
234
|
-
maxContextWindow: 10, // Max memories per recall
|
|
235
|
-
storageKey: 'npc_memory' // localStorage key
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
// Store observations with importance
|
|
239
|
-
await memory.store('Player saved my life in battle', 'experience', 0.95);
|
|
240
|
-
await memory.store('Found gold hidden in ruins', 'observation', 0.6);
|
|
241
|
-
|
|
242
|
-
// Semantic recall (ranked by relevance × importance)
|
|
243
|
-
const related = await memory.recall('Do I trust the player?', 5);
|
|
244
|
-
// Returns memories about player saving life (high relevance)
|
|
245
|
-
|
|
246
|
-
// Export for Soul portability
|
|
247
|
-
const allMemories = memory.export();
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
**Features:**
|
|
251
|
-
- **Local Storage**: All data stays in `localStorage` (browser) or memory (Node)
|
|
252
|
-
- **Semantic Search**: Word overlap similarity (upgradeable to embeddings)
|
|
253
|
-
- **Temporal Decay**: Older memories become less important over time
|
|
254
|
-
- **API Sync**: Optional cloud backup via ForbocAI API
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
## Module: Bridge (Action Validation)
|
|
259
|
-
|
|
260
|
-
`Brídge_Módule // Néuro_Symbólic`
|
|
261
|
-
|
|
262
|
-
The Bridge ensures AI-generated actions are **always valid** within game rules.
|
|
263
|
-
|
|
264
|
-
```typescript
|
|
265
|
-
import { createBridge, ValidationRule } from 'forbocai';
|
|
266
|
-
|
|
267
|
-
const bridge = createBridge({
|
|
268
|
-
strictMode: true // Reject unknown action types
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
// Validate an AI action
|
|
272
|
-
const result = await bridge.validate(
|
|
273
|
-
{ type: 'ATTACK', target: 'orc_1' },
|
|
274
|
-
{
|
|
275
|
-
agentState: { hp: 85, mana: 50 },
|
|
276
|
-
worldState: { entities: ['orc_1', 'player_1'] }
|
|
277
|
-
}
|
|
278
|
-
);
|
|
279
|
-
|
|
280
|
-
if (result.valid) {
|
|
281
|
-
executeAction(result.correctedAction || action);
|
|
282
|
-
} else {
|
|
283
|
-
console.log('Invalid action:', result.reason);
|
|
284
|
-
// Falls back to IDLE
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
// Register custom rules
|
|
288
|
-
bridge.registerRule({
|
|
289
|
-
id: 'game.fly',
|
|
290
|
-
name: 'Flying Validation',
|
|
291
|
-
actionTypes: ['FLY'],
|
|
292
|
-
validate: (action, ctx) => {
|
|
293
|
-
const hasWings = ctx.agentState?.hasWings;
|
|
294
|
-
return hasWings
|
|
295
|
-
? { valid: true }
|
|
296
|
-
: { valid: false, reason: 'Agent cannot fly without wings' };
|
|
297
|
-
}
|
|
298
|
-
});
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
**Built-in Rules:**
|
|
302
|
-
- `core.movement` — Validates MOVE coordinates and world bounds
|
|
303
|
-
- `core.attack` — Validates ATTACK target exists
|
|
304
|
-
- `core.interact` — Validates INTERACT object specified
|
|
305
|
-
- `core.speak` — Validates SPEAK text not empty
|
|
306
|
-
- `core.resources` — Validates HP/mana sufficient for action
|
|
307
|
-
|
|
308
|
-
---
|
|
309
|
-
|
|
310
|
-
## Module: Soul (Portable Agent Identity)
|
|
311
|
-
|
|
312
|
-
`Sóul_Módule // Pórtal_Idéntity`
|
|
313
|
-
|
|
314
|
-
The Soul module enables **cross-game agent portability** via permanent storage (Arweave) and Solana NFTs.
|
|
315
|
-
|
|
316
|
-
```typescript
|
|
317
|
-
import { createSoulInstance, importSoulFromUri } from 'forbocai';
|
|
318
|
-
|
|
319
|
-
// Create a Soul from agent data
|
|
320
|
-
const soul = createSoulInstance(
|
|
321
|
-
'agent_123',
|
|
322
|
-
'Kira the Merchant',
|
|
323
|
-
'A suspicious merchant who distrusts adventurers',
|
|
324
|
-
{ mood: 'suspicious', inventory: ['rusty_key'] },
|
|
325
|
-
memories // From Memory module
|
|
326
|
-
);
|
|
327
|
-
|
|
328
|
-
// Export to Arweave (permanent, pay-once storage)
|
|
329
|
-
const { cid, uri, signature } = await soul.export();
|
|
330
|
-
console.log(`Soul stored: ${uri}`);
|
|
331
|
-
|
|
332
|
-
// Import Soul in another game
|
|
333
|
-
const importedSoul = await importSoulFromUri(cid);
|
|
334
|
-
console.log(importedSoul.persona);
|
|
335
|
-
// "A suspicious merchant who distrusts adventurers"
|
|
336
|
-
|
|
337
|
-
// Create new agent from Soul
|
|
338
|
-
import { createAgentFromSoul } from 'forbocai';
|
|
339
|
-
const { agentId, persona } = await createAgentFromSoul(cid, cortexId);
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
**Features:**
|
|
343
|
-
- **Arweave Storage**: Permanent, pay-once (no pinning fees)
|
|
344
|
-
- **Encryption**: Soul content encrypted; key transfers with NFT ownership
|
|
345
|
-
- **NFT-Ready**: Metaplex Core on Solana for tradeable agent identities
|
|
346
|
-
|
|
347
|
-
---
|
|
348
|
-
|
|
349
|
-
## Module: Ghost (Automated QA)
|
|
350
|
-
|
|
351
|
-
`Ghóst_Módule // Autómated_QA`
|
|
352
|
-
|
|
353
|
-
The Ghost module runs **headless AI agents** for automated game testing.
|
|
354
|
-
|
|
355
|
-
```typescript
|
|
356
|
-
import { createGhost } from 'forbocai';
|
|
357
|
-
|
|
358
|
-
// Configure Ghost session
|
|
359
|
-
const ghost = createGhost({
|
|
360
|
-
testSuite: 'exploration', // or 'combat', 'dialogue', 'pathfinding', 'full'
|
|
361
|
-
duration: 300, // seconds
|
|
362
|
-
captureScreenshots: true
|
|
363
|
-
});
|
|
364
|
-
|
|
365
|
-
// Start session
|
|
366
|
-
const sessionId = await ghost.run();
|
|
367
|
-
console.log(`Ghost session started: ${sessionId}`);
|
|
368
|
-
|
|
369
|
-
// Poll status
|
|
370
|
-
const status = await ghost.status();
|
|
371
|
-
console.log(`Progress: ${status.progress}%`);
|
|
372
|
-
|
|
373
|
-
// Wait for completion with progress callback
|
|
374
|
-
const results = await ghost.waitForCompletion(
|
|
375
|
-
5000, // Poll every 5 seconds
|
|
376
|
-
300000, // Timeout after 5 minutes
|
|
377
|
-
(status) => console.log(`${status.progress}% complete`)
|
|
378
|
-
);
|
|
379
|
-
|
|
380
|
-
// Analyze results
|
|
381
|
-
console.log(`Tests: ${results.passed}/${results.totalTests} passed`);
|
|
382
|
-
console.log(`Coverage: ${(results.coverage * 100).toFixed(1)}%`);
|
|
383
|
-
console.log(`Avg FPS: ${results.metrics.avgFrameRate}`);
|
|
384
|
-
|
|
385
|
-
// View failed tests
|
|
386
|
-
results.tests
|
|
387
|
-
.filter(t => !t.passed)
|
|
388
|
-
.forEach(t => console.log(`FAIL: ${t.name} - ${t.error}`));
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
**Test Suites:**
|
|
392
|
-
- `exploration` — Pathfinding, map coverage, navigation
|
|
393
|
-
- `combat` — Battle mechanics, AI decisions, balance
|
|
394
|
-
- `dialogue` — NPC conversations, branching logic
|
|
395
|
-
- `pathfinding` — Navigation mesh, obstacle avoidance
|
|
396
|
-
- `full` — All tests combined
|
|
397
|
-
|
|
398
|
-
**Metrics Collected:**
|
|
399
|
-
- `avgFrameRate` — Average FPS during test
|
|
400
|
-
- `memoryUsageMB` — Peak memory usage
|
|
401
|
-
- `aiDecisionsPerSec` — Agent decision throughput
|
|
402
|
-
- `explorationCoverage` — Map area discovered
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
## Digital Souls (Solana/Metaplex)
|
|
407
|
-
|
|
408
|
-
`Assét_Cláss // The_Sóul`
|
|
409
|
-
|
|
410
|
-
In the ForbocAI ecosystem, an NFT is not just a receipt—it is an **Encapsulated Soul**.
|
|
411
|
-
|
|
412
|
-
* **The Container**: A standardized bundle containing the Agent's Personality, Memories, and State.
|
|
413
|
-
* **The Chain**: The NFT is the *Deed of Ownership* pointing to this digital life.
|
|
414
|
-
* **Portability**: Take your trained NPC from *Forboc* to a sequel or entirely different world. Uses Arweave for permanent, pay-once storage.
|
|
415
|
-
* **Economy**: Train a specialist NPC and sell it on the open market. The value is in the *Experience*, not just the skin.
|
|
416
|
-
|
|
417
|
-
<!-- T̵h̷e̶ ̷s̸o̷u̷l̴ ̶i̶s̵ ̶n̵o̸t̵ ̵f̸o̵r̶ ̵s̷a̸l̶e̷.̶ ̴I̸t̸ ̴i̵s̷ ̶l̶e̷a̵s̵e̶d̴.̷ -->
|
|
418
|
-
|
|
419
|
-
---
|
|
420
|
-
|
|
421
|
-
## Documentation
|
|
422
|
-
|
|
423
|
-
`Dócs_Máp // Référence`
|
|
424
|
-
|
|
425
|
-
- **[Introduction](https://docs.forboc.ai)** — SDK overview and quick start
|
|
426
|
-
- **[User Stories](https://docs.forboc.ai/user-stories)** — BDD specifications for all features
|
|
427
|
-
- **[Concepts](https://docs.forboc.ai/concepts)** — Architecture and core abstractions
|
|
428
|
-
- **[API Reference](https://docs.forboc.ai/api-reference)** — Complete endpoint documentation
|
|
429
|
-
|
|
430
|
-
---
|
|
431
|
-
|
|
432
|
-
## Links
|
|
433
|
-
|
|
434
|
-
`Éxternal_Líns // Cónnect`
|
|
435
|
-
|
|
436
|
-
- **Website:** [forboc.ai](https://forboc.ai)
|
|
437
|
-
- **Documentation:** [docs.forboc.ai](https://docs.forboc.ai)
|
|
438
|
-
- **Discord:** [discord.gg/6hr2jHqnsG](https://discord.gg/6hr2jHqnsG)
|
|
439
|
-
- **Telegram:** [t.me/forbocai](https://t.me/forbocai)
|
|
440
|
-
|
|
441
|
-
---
|
|
442
|
-
|
|
443
|
-
**ᚠ ᛫ ᛟ ᛫ ᚱ ᛫ ᛒ ᛫ ᛟ ᛫ ᚲ**
|
|
444
|
-
|
|
445
|
-
## Developers
|
|
446
|
-
|
|
447
|
-
`Dev_Ops // Releáse_Cycles`
|
|
448
|
-
|
|
449
|
-
To redeploy the SDK to NPM:
|
|
450
|
-
|
|
451
|
-
1. **Bump Version**: Update `version` in `package.json`.
|
|
452
|
-
2. **Build**: `npm run build` (Generates `dist/`).
|
|
453
|
-
3. **Auth**: Ensure `sdk/.npmrc` contains the valid token from `../api/NPM_TOKEN.md`.
|
|
454
|
-
```bash
|
|
455
|
-
# Command to configure local .npmrc
|
|
456
|
-
echo "//registry.npmjs.org/:_authToken=YOUR_TOKEN_HERE" > .npmrc
|
|
457
|
-
```
|
|
458
|
-
4. **Publish**: `npm publish --access public`.
|
|
459
|
-
|
|
460
|
-
> **Note**: The `.npmrc` file is gitignored (`.gitignore`) to prevent leaking secrets. Always verify the token in `api/NPM_TOKEN.md` matches the active Granular Access Token.
|
|
461
|
-
|
|
462
|
-
## 🧪 Testing Flow
|
|
463
|
-
|
|
464
|
-
`Tést_Séquence // Válidátion`
|
|
465
|
-
|
|
466
|
-
To verify the full end-to-end loop (SDK <-> NPM <-> Render API):
|
|
467
|
-
|
|
468
|
-
1. **Local Updates**: Make changes to `sdk/` or `api/` code.
|
|
469
|
-
2. **Deploy**:
|
|
470
|
-
* **SDK**: Push to NPM (see [Developers](#developers) section above).
|
|
471
|
-
* **API**: Commit and push changes to GitHub (triggers Render auto-deploy).
|
|
472
|
-
3. **Consume**:
|
|
473
|
-
```bash
|
|
474
|
-
# In your client app (e.g. Forboc/client)
|
|
475
|
-
npm install forbocai@latest
|
|
476
|
-
```
|
|
477
|
-
4. **Verify**:
|
|
478
|
-
Use the CLI to check connection to the production API:
|
|
479
|
-
```bash
|
|
480
|
-
npx forbocai api status
|
|
481
|
-
# > Checking API Status (https://api.forboc.ai)...
|
|
482
|
-
# > Status: ONLINE
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
## License
|
|
35
|
+
> *Logic must be pure. Order must be absolute.*
|
|
487
36
|
|
|
488
|
-
|
|
37
|
+
**᛭ ᛫ ᛬ ᛫ ᛭**
|
|
489
38
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
See [style-guide.md](./style-guide.md) for mandatory grimdark cyberpunk noir aesthetic standards (Runes, Zalgo, ASCII).
|
|
493
|
-
<!-- T̸h̴e̶ ̶v̶o̶i̶d̴ ̷c̸o̶n̷s̶u̶m̸e̸s̶ ̸a̶l̷l̵. -->
|
|
39
|
+
Documentation: [docs.forboc.ai](https://docs.forboc.ai)
|
|
40
|
+
Website: [forboc.ai](https://forboc.ai)
|
package/index.d.ts
ADDED
package/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,48 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forbocai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "The Infrastructure Layer for Digital Souls (Legacy Redirect)",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
4
7
|
"license": "UNLICENSED",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
8
|
+
"author": "seandinwiddie <sean@forboc.ai>",
|
|
9
|
+
"homepage": "https://forboc.ai",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/ForbocAI/sdk.git",
|
|
13
|
+
"directory": "packages/legacy"
|
|
11
14
|
},
|
|
12
15
|
"scripts": {
|
|
13
|
-
"build": "
|
|
14
|
-
"dev": "tsup src/index.ts --watch",
|
|
15
|
-
"test": "vitest",
|
|
16
|
-
"test:watch": "vitest --watch",
|
|
17
|
-
"preinstall": "node scripts/check-cmake.js",
|
|
18
|
-
"postinstall": "node postinstall.js",
|
|
19
|
-
"sync-version": "node -e \"const v=require('./package.json').version; const f=require('fs'); const p='src/index.ts'; let s=f.readFileSync(p,'utf8'); s=s.replace(/SDK_VERSION = '[^']+'/,'SDK_VERSION = \\''+v+'\\''); f.writeFileSync(p,s);\""
|
|
16
|
+
"build": "echo 'Nothing to build for legacy'"
|
|
20
17
|
},
|
|
21
18
|
"dependencies": {
|
|
22
|
-
"@
|
|
23
|
-
"@lancedb/lancedb": "^0.23.0",
|
|
24
|
-
"@xenova/transformers": "^2.17.2",
|
|
25
|
-
"apache-arrow": "^18.1.0",
|
|
26
|
-
"axios": "^1.6.2",
|
|
27
|
-
"node-llama-cpp": "^3.15.1",
|
|
28
|
-
"onnxruntime-node": "^1.23.2",
|
|
29
|
-
"zod": "^3.22.4"
|
|
19
|
+
"@forbocai/core": "^0.6.0"
|
|
30
20
|
},
|
|
31
|
-
"
|
|
32
|
-
"@types/node": "^20.0.0",
|
|
33
|
-
"tsup": "^8.5.1",
|
|
34
|
-
"typescript": "^5.9.3",
|
|
35
|
-
"vitest": "^1.0.0"
|
|
36
|
-
},
|
|
37
|
-
"files": [
|
|
38
|
-
"dist",
|
|
39
|
-
"README.md",
|
|
40
|
-
"package.json",
|
|
41
|
-
"postinstall.js",
|
|
42
|
-
"scripts"
|
|
43
|
-
],
|
|
44
|
-
"overrides": {
|
|
45
|
-
"glob": "^11.0.0",
|
|
46
|
-
"rimraf": "^5.0.0"
|
|
47
|
-
}
|
|
21
|
+
"deprecated": "This package is now a transparent proxy for @forbocai/core. Please migrate to the core package directly."
|
|
48
22
|
}
|
package/LICENSE
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2026 ForbocAI, Inc. All Rights Reserved.
|
|
2
|
-
|
|
3
|
-
Proprietary and Confidential.
|
|
4
|
-
|
|
5
|
-
This software and all related documentation are the sole property of ForbocAI, Inc.
|
|
6
|
-
Unauthorized copying, modification, distribution, or any other use of this
|
|
7
|
-
software, via any medium, is strictly prohibited.
|