@bolloon/bolloon-agent 0.4.9 → 0.4.11
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/dist/agents/pi-sdk-tools.js +135 -4
- package/dist/agents/python-exec.js +115 -0
- package/dist/pi-ecosystem-a2ui/index.js +81 -0
- package/dist/pi-ecosystem-mcp/ui-tools.js +108 -0
- package/dist/web/a2ui-client.js +32697 -0
- package/dist/web/index.html +13 -0
- package/dist/web/mobile.css +173 -0
- package/dist/web/mobile.html +76 -0
- package/dist/web/mobile.js +346 -0
- package/dist/web/server.js +33 -0
- package/package.json +3 -1
- package/scripts/build-web.ts +20 -1
package/scripts/build-web.ts
CHANGED
|
@@ -14,7 +14,7 @@ async function main() {
|
|
|
14
14
|
|
|
15
15
|
// 重要: 不能 rm -rf 整个 dist/web/, 否则会删掉 build:main 编译出来的
|
|
16
16
|
// dist/web/server.js. 只清理 web 静态资源, 保留 server.js.
|
|
17
|
-
for (const f of ['index.html', 'api-config.html', 'style.css', 'client.js', 'components']) {
|
|
17
|
+
for (const f of ['index.html', 'api-config.html', 'style.css', 'client.js', 'mobile.html', 'mobile.css', 'mobile.js', 'components']) {
|
|
18
18
|
await fs.rm(path.join(DIST_WEB, f), { recursive: true, force: true });
|
|
19
19
|
}
|
|
20
20
|
await fs.mkdir(DIST_WEB, { recursive: true });
|
|
@@ -91,11 +91,30 @@ async function main() {
|
|
|
91
91
|
bundle: true,
|
|
92
92
|
});
|
|
93
93
|
|
|
94
|
+
// 2026-08-12: 编译 A2UI 前端渲染器 (a2ui-client.tsx → a2ui-client.js)
|
|
95
|
+
// react + @a2ui/react + @a2ui/web_core 全部打包进 bundle (手机端 webview 无 CDN)
|
|
96
|
+
console.log('[build-web] 编译 a2ui-client.tsx...');
|
|
97
|
+
await esbuild.build({
|
|
98
|
+
entryPoints: [path.join(ROOT, 'src/web/a2ui-client.tsx')],
|
|
99
|
+
outfile: path.join(DIST_WEB, 'a2ui-client.js'),
|
|
100
|
+
format: 'iife',
|
|
101
|
+
target: 'es2022',
|
|
102
|
+
platform: 'browser',
|
|
103
|
+
minify: false,
|
|
104
|
+
bundle: true,
|
|
105
|
+
jsx: 'automatic',
|
|
106
|
+
loader: { '.tsx': 'tsx' },
|
|
107
|
+
});
|
|
108
|
+
|
|
94
109
|
// 复制静态文件
|
|
95
110
|
console.log('[build-web] 复制静态文件...');
|
|
96
111
|
await fs.copyFile(path.join(ROOT, 'src/web/index.html'), path.join(DIST_WEB, 'index.html'));
|
|
97
112
|
await fs.copyFile(path.join(ROOT, 'src/web/api-config.html'), path.join(DIST_WEB, 'api-config.html'));
|
|
98
113
|
await fs.copyFile(path.join(ROOT, 'src/web/style.css'), path.join(DIST_WEB, 'style.css'));
|
|
114
|
+
// 2026-08-12: 手机端 UI (微信风格, Capacitor webview 加载) — 纯静态复制
|
|
115
|
+
await fs.copyFile(path.join(ROOT, 'src/web/mobile.html'), path.join(DIST_WEB, 'mobile.html'));
|
|
116
|
+
await fs.copyFile(path.join(ROOT, 'src/web/mobile.css'), path.join(DIST_WEB, 'mobile.css'));
|
|
117
|
+
await fs.copyFile(path.join(ROOT, 'src/web/mobile.js'), path.join(DIST_WEB, 'mobile.js'));
|
|
99
118
|
// 复制 PWA manifest (index.html 里有 <link rel="manifest">, 否则浏览器会 404)
|
|
100
119
|
await fs.copyFile(path.join(ROOT, 'src/web/manifest.json'), path.join(DIST_WEB, 'manifest.json'));
|
|
101
120
|
// 复制 icons 目录 (manifest.json 里引用了 favicon 等)
|