forbocai 0.2.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 +88 -41
- package/dist/chunk-4FGRXBH3.mjs +1026 -0
- package/dist/cli.js +87 -22
- package/dist/cli.mjs +87 -22
- package/dist/index.d.mts +131 -193
- package/dist/index.d.ts +131 -193
- package/dist/index.js +634 -563
- package/dist/index.mjs +617 -552
- package/package.json +18 -7
- package/postinstall.js +27 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forbocai",
|
|
3
|
-
"version": "0.2
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "The Infrastructure Layer for Autonomous AI Characters",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -16,15 +16,26 @@
|
|
|
16
16
|
"postinstall": "node postinstall.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@
|
|
20
|
-
"
|
|
21
|
-
"
|
|
19
|
+
"@helia/json": "^5.0.6",
|
|
20
|
+
"@lancedb/lancedb": "^0.23.0",
|
|
21
|
+
"@lancedb/lancedb-darwin-x64": "^0.22.3",
|
|
22
|
+
"@mlc-ai/web-llm": "^0.2.80",
|
|
23
|
+
"@xenova/transformers": "^2.17.2",
|
|
24
|
+
"apache-arrow": "^18.1.0",
|
|
25
|
+
"axios": "^1.6.2",
|
|
26
|
+
"blockstore-core": "^6.1.2",
|
|
27
|
+
"datastore-core": "^11.0.2",
|
|
28
|
+
"helia": "^6.0.18",
|
|
29
|
+
"idb": "^8.0.3",
|
|
30
|
+
"node-llama-cpp": "^3.15.1",
|
|
31
|
+
"onnxruntime-node": "^1.23.2",
|
|
32
|
+
"zod": "^3.22.4"
|
|
22
33
|
},
|
|
23
34
|
"devDependencies": {
|
|
35
|
+
"@types/node": "^20.0.0",
|
|
24
36
|
"tsup": "^8.5.1",
|
|
25
37
|
"typescript": "^5.9.3",
|
|
26
|
-
"vitest": "^1.0.0"
|
|
27
|
-
"@types/node": "^20.0.0"
|
|
38
|
+
"vitest": "^1.0.0"
|
|
28
39
|
},
|
|
29
40
|
"files": [
|
|
30
41
|
"dist",
|
|
@@ -32,4 +43,4 @@
|
|
|
32
43
|
"package.json",
|
|
33
44
|
"postinstall.js"
|
|
34
45
|
]
|
|
35
|
-
}
|
|
46
|
+
}
|
package/postinstall.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// ForbocAI SDK Postinstall - Windows and Unix compatible
|
|
3
|
+
|
|
1
4
|
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
2
6
|
|
|
7
|
+
// Get version from package.json
|
|
8
|
+
let version = '0.3.2';
|
|
3
9
|
try {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
10
|
+
const pkg = require('./package.json');
|
|
11
|
+
version = pkg.version || version;
|
|
12
|
+
} catch (e) { /* ignore */ }
|
|
13
|
+
|
|
14
|
+
const msg = `
|
|
8
15
|
----------------------------------------
|
|
9
16
|
FORBOC AI SDK v${version}
|
|
10
17
|
ᚠ ᛫ ᛟ ᛫ ᚱ ᛫ ᛒ ᛫ ᛟ ᛫ ᚲ
|
|
@@ -17,11 +24,22 @@ Run 'npx forbocai api status' to verify connection.
|
|
|
17
24
|
|
|
18
25
|
Welcome to the Future of NPC Intelligence.
|
|
19
26
|
`;
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
|
|
28
|
+
// Try multiple output methods for cross-platform compatibility
|
|
29
|
+
try {
|
|
30
|
+
// Method 1: Direct TTY write (Unix)
|
|
31
|
+
if (process.platform !== 'win32') {
|
|
32
|
+
const tty = fs.openSync('/dev/tty', 'w');
|
|
33
|
+
fs.writeSync(tty, msg);
|
|
34
|
+
fs.closeSync(tty);
|
|
35
|
+
} else {
|
|
36
|
+
// Method 2: Windows - use stderr to bypass npm suppression
|
|
37
|
+
process.stderr.write(msg);
|
|
38
|
+
}
|
|
22
39
|
} catch (e) {
|
|
23
|
-
// Fallback
|
|
24
|
-
console.
|
|
25
|
-
require('./dist/index.js').init();
|
|
40
|
+
// Method 3: Fallback - simple console.log (may be suppressed by npm)
|
|
41
|
+
console.log(msg);
|
|
26
42
|
}
|
|
27
43
|
|
|
44
|
+
// DO NOT require the SDK here - it causes ESM/CJS compatibility issues
|
|
45
|
+
// The SDK is loaded when the user imports it in their code
|