aggroot 1.5.2 → 1.5.4
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/.env.example +10 -93
- package/README.md +27 -1
- package/dist/cli.cjs +4 -0
- package/dist/index.cjs +2050 -1495
- package/dist/web-tree-sitter.wasm +0 -0
- package/package.json +9 -6
- package/scripts/build-all.mjs +42 -0
- package/scripts/obfuscate.mjs +10 -2
- package/dist/native/better_sqlite3.node +0 -0
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aggroot",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"description": "AggRoot - AI Assistant (Node.js/TypeScript Version)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -44,7 +44,8 @@
|
|
|
44
44
|
"dev": "node --no-warnings --import=tsx --watch src/index.ts",
|
|
45
45
|
"dev:no-watch": "node --no-warnings --import=tsx src/index.ts",
|
|
46
46
|
"dev:silent": "node --no-warnings --import=tsx --watch src/index.ts",
|
|
47
|
-
"build": "
|
|
47
|
+
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && node scripts/obfuscate.mjs && node scripts/verify-no-source.mjs",
|
|
48
|
+
"build:all": "node scripts/build-all.mjs",
|
|
48
49
|
"build:dev": "tsc",
|
|
49
50
|
"prepack": "npm run build",
|
|
50
51
|
"start": "node --no-warnings --max-old-space-size=4096 dist/index.cjs",
|
|
@@ -57,8 +58,8 @@
|
|
|
57
58
|
"test:run": "vitest run",
|
|
58
59
|
"test:coverage": "vitest run --coverage",
|
|
59
60
|
"test:cross-platform": "node test-cross-platform.js",
|
|
60
|
-
"clean": "
|
|
61
|
-
"prepare": "
|
|
61
|
+
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true});require('fs').rmSync('logs',{recursive:true,force:true})\"",
|
|
62
|
+
"prepare": "echo skip",
|
|
62
63
|
"pre-commit": "lint-staged",
|
|
63
64
|
"rebuild-native": "npm rebuild better-sqlite3 sharp",
|
|
64
65
|
"rebuild:windows": "npm rebuild --build-from-source better-sqlite3 sharp",
|
|
@@ -80,6 +81,7 @@
|
|
|
80
81
|
"dotenv": "^17.3.1",
|
|
81
82
|
"exceljs": "^4.4.0",
|
|
82
83
|
"glob": "^13.0.6",
|
|
84
|
+
"iconv-lite": "^0.7.2",
|
|
83
85
|
"ink": "^6.8.0",
|
|
84
86
|
"inquirer": "^12.0.0",
|
|
85
87
|
"lru-cache": "^11.2.7",
|
|
@@ -102,7 +104,9 @@
|
|
|
102
104
|
"ts-morph": "^27.0.2",
|
|
103
105
|
"uuid": "^13.0.0",
|
|
104
106
|
"web-tree-sitter": "^0.26.8",
|
|
105
|
-
"zod": "^3.25.76"
|
|
107
|
+
"zod": "^3.25.76",
|
|
108
|
+
"@aggroot/server": "workspace:*",
|
|
109
|
+
"@aggroot/protocol": "workspace:*"
|
|
106
110
|
},
|
|
107
111
|
"optionalDependencies": {
|
|
108
112
|
"@honcho-ai/sdk": "^2.1.1",
|
|
@@ -125,7 +129,6 @@
|
|
|
125
129
|
"javascript-obfuscator": "^4.2.2",
|
|
126
130
|
"lint-staged": "^15.2.10",
|
|
127
131
|
"prettier": "^3.3.3",
|
|
128
|
-
"rimraf": "^6.0.0",
|
|
129
132
|
"tsx": "^4.19.0",
|
|
130
133
|
"typescript": "^5.6.0",
|
|
131
134
|
"typescript-eslint": "^8.10.0",
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AggRoot 一键构建脚本
|
|
5
|
+
* 按依赖顺序编译所有 workspace 包
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { execSync } from "node:child_process";
|
|
9
|
+
|
|
10
|
+
const packages = [
|
|
11
|
+
{ name: "@aggroot/protocol", label: "Protocol (共享类型)" },
|
|
12
|
+
{ name: "@aggroot/server", label: "Server (网关服务)" },
|
|
13
|
+
{ name: "@aggroot/web", label: "Web (前端)" },
|
|
14
|
+
{ name: "aggroot", label: "AggRoot (主包)" },
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
function run(cmd) {
|
|
18
|
+
execSync(cmd, { stdio: "inherit", shell: true });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function build(pkg) {
|
|
22
|
+
const cmd = pkg.name === "aggroot"
|
|
23
|
+
? "npm run build"
|
|
24
|
+
: `npm run build -w ${pkg.name}`;
|
|
25
|
+
run(cmd);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// --- main ---
|
|
29
|
+
console.log("=== AggRoot 全量构建 ===\n");
|
|
30
|
+
|
|
31
|
+
for (const pkg of packages) {
|
|
32
|
+
console.log(`>> 构建 ${pkg.label} ...`);
|
|
33
|
+
try {
|
|
34
|
+
build(pkg);
|
|
35
|
+
} catch {
|
|
36
|
+
console.error(`\n!! 构建 ${pkg.label} 失败,已中止`);
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
console.log(`>> ${pkg.label} 完成\n`);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
console.log("=== 全部构建完成 ===");
|
package/scripts/obfuscate.mjs
CHANGED
|
@@ -110,8 +110,12 @@ for (const { src, dest } of NATIVE_MODULES) {
|
|
|
110
110
|
const srcPath = join(process.cwd(), 'node_modules', src);
|
|
111
111
|
const destPath = join(NATIVE_DIR, dest);
|
|
112
112
|
if (existsSync(srcPath)) {
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
try {
|
|
114
|
+
copyFileSync(srcPath, destPath);
|
|
115
|
+
console.log(`[bundle] Copied native: ${dest}`);
|
|
116
|
+
} catch (err) {
|
|
117
|
+
console.warn(`[bundle] Failed to copy native module ${dest}: ${err.code} — using existing file if present`);
|
|
118
|
+
}
|
|
115
119
|
} else {
|
|
116
120
|
console.warn(`[bundle] Native module not found: ${src} — users will need build tools`);
|
|
117
121
|
}
|
|
@@ -176,6 +180,10 @@ if (heapLimitMB < 3500 && !process.env.AGGROOT_SPAWNED) {
|
|
|
176
180
|
stdio: 'inherit',
|
|
177
181
|
env: { ...process.env, AGGROOT_SPAWNED: '1' },
|
|
178
182
|
});
|
|
183
|
+
child.on('error', (err) => {
|
|
184
|
+
console.error('Failed to re-spawn with larger heap:', err.message);
|
|
185
|
+
process.exit(1);
|
|
186
|
+
});
|
|
179
187
|
child.on('exit', (code) => process.exit(code ?? 0));
|
|
180
188
|
} else {
|
|
181
189
|
require('./index.cjs');
|
|
Binary file
|