@bolloon/bolloon-agent 0.4.21 → 0.4.23
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/gateway-join.js +271 -0
- package/dist/agents/pi-sdk-tools.js +75 -2
- package/dist/agents/pi-sdk.js +6 -3
- package/dist/llm/pi-ai.js +35 -2
- package/dist/network/agent-network.js +78 -6
- package/dist/web/mobile-core.js +17 -0
- package/dist/web/mobile.css +24 -0
- package/dist/web/mobile.html +23 -13
- package/dist/web/mobile.js +480 -46
- package/dist/web/server.js +67 -9
- package/dist/web/sw.js +26 -2
- package/package.json +1 -1
package/dist/web/mobile-core.js
CHANGED
|
@@ -162740,8 +162740,10 @@ ${error.stack}` : head;
|
|
|
162740
162740
|
resolve(path) {
|
|
162741
162741
|
const p = path || "";
|
|
162742
162742
|
if (p === "/channels") return () => core.channels.get();
|
|
162743
|
+
if (p === "/api/data/snapshot") return () => core.data.snapshot();
|
|
162743
162744
|
if (p === "/api/peers") return () => core.peers.list();
|
|
162744
162745
|
if (p === "/api/mcp/tools") return () => core.mcp.tools();
|
|
162746
|
+
if (p === "/api/skills") return () => core.skills.list();
|
|
162745
162747
|
if (p === "/api/auth/status") return () => core.identity.status();
|
|
162746
162748
|
if (p === "/api/payments/pending") return () => core.payments.pending();
|
|
162747
162749
|
if (p === "/api/llm-config") return () => core.data.getLlmConfig();
|
|
@@ -162787,6 +162789,10 @@ ${error.stack}` : head;
|
|
|
162787
162789
|
/** POST 路径 → 内核函数 */
|
|
162788
162790
|
resolvePost(path, body) {
|
|
162789
162791
|
const p = path || "";
|
|
162792
|
+
if (p === "/api/mcp/call") {
|
|
162793
|
+
const b = body || {};
|
|
162794
|
+
return () => core.mcp.call(String(b.name || ""), b.args || {});
|
|
162795
|
+
}
|
|
162790
162796
|
if (p === "/message") {
|
|
162791
162797
|
const b = body || {};
|
|
162792
162798
|
return () => core.message.send({ text: b.text, channelId: b.channelId });
|
|
@@ -163485,6 +163491,17 @@ ${error.stack}` : head;
|
|
|
163485
163491
|
{ name: "gateway_call", description: "\u901A\u8FC7 Agent Gateway \u8C03\u7528\u670D\u52A1 (\u81EA\u52A8\u95ED\u73AF)" },
|
|
163486
163492
|
{ name: "gateway_join", description: "\u901A\u8FC7\u94FE\u63A5\u52A0\u5165\u5171\u4EAB Agent \u7F51\u7EDC" }
|
|
163487
163493
|
];
|
|
163494
|
+
},
|
|
163495
|
+
async call(name10, args) {
|
|
163496
|
+
const { mobileGatewayTool: mobileGatewayTool2 } = await Promise.resolve().then(() => (init_mobile_gateway(), mobile_gateway_exports));
|
|
163497
|
+
return mobileGatewayTool2(String(name10 || ""), args || {});
|
|
163498
|
+
}
|
|
163499
|
+
},
|
|
163500
|
+
skills: {
|
|
163501
|
+
async list() {
|
|
163502
|
+
const s2 = await Promise.resolve().then(() => (init_mobile_sync(), mobile_sync_exports));
|
|
163503
|
+
const snap = s2.getLastSnapshot();
|
|
163504
|
+
return snap && Array.isArray(snap.skills) ? snap.skills : [];
|
|
163488
163505
|
}
|
|
163489
163506
|
},
|
|
163490
163507
|
message: {
|
package/dist/web/mobile.css
CHANGED
|
@@ -664,3 +664,27 @@ body {
|
|
|
664
664
|
.list-icon .ico { width: 21px; height: 21px; }
|
|
665
665
|
|
|
666
666
|
.icon-btn .ico { width: 20px; height: 20px; }
|
|
667
|
+
|
|
668
|
+
/* 供应商选择: 芯片式 (API 配置页, 2026-09-14) */
|
|
669
|
+
.provider-chips {
|
|
670
|
+
display: flex;
|
|
671
|
+
flex-wrap: wrap;
|
|
672
|
+
gap: 8px;
|
|
673
|
+
}
|
|
674
|
+
.provider-chip {
|
|
675
|
+
padding: 8px 14px;
|
|
676
|
+
border: 1px solid var(--border);
|
|
677
|
+
border-radius: 999px;
|
|
678
|
+
background: var(--bg-hover);
|
|
679
|
+
color: var(--text-secondary);
|
|
680
|
+
font-size: 13px;
|
|
681
|
+
line-height: 1.2;
|
|
682
|
+
-webkit-tap-highlight-color: transparent;
|
|
683
|
+
}
|
|
684
|
+
.provider-chip:active { transform: scale(.96); }
|
|
685
|
+
.provider-chip.active {
|
|
686
|
+
border-color: var(--accent);
|
|
687
|
+
background: var(--accent);
|
|
688
|
+
color: var(--bg);
|
|
689
|
+
font-weight: 600;
|
|
690
|
+
}
|
package/dist/web/mobile.html
CHANGED
|
@@ -34,9 +34,10 @@
|
|
|
34
34
|
<div id="app" class="app">
|
|
35
35
|
<!-- 顶部导航 -->
|
|
36
36
|
<header class="topbar">
|
|
37
|
+
<button class="icon-btn" id="btn-index" title="索引"><svg class="ico" viewBox="0 0 24 24"><path d="M4 6h16M4 12h16M4 18h16"/></svg></button>
|
|
37
38
|
<div class="topbar-title" id="topbar-title">首页</div>
|
|
38
39
|
<div class="topbar-actions" id="topbar-actions">
|
|
39
|
-
<button class="icon-btn" id="btn-
|
|
40
|
+
<button class="icon-btn" id="btn-search" title="搜索"><svg class="ico" viewBox="0 0 24 24"><circle cx="11" cy="11" r="6.5"/><path d="M16 16l4.5 4.5"/></svg></button>
|
|
40
41
|
<button class="icon-btn" id="btn-add" title="添加会话"><svg class="ico" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></svg></button>
|
|
41
42
|
</div>
|
|
42
43
|
</header>
|
|
@@ -60,24 +61,34 @@
|
|
|
60
61
|
<div class="detail-body" id="detail-body"></div>
|
|
61
62
|
</div>
|
|
62
63
|
</main>
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
<section class="page" id="page-network" data-tab="network" hidden>
|
|
64
|
+
<!-- 好友 tab: 好友与 P2P (原来散在网络页, 现已归拢; 网络页不再重复这些) -->
|
|
65
|
+
<section class="page" id="page-friends" data-tab="friends" hidden>
|
|
66
66
|
<div class="list">
|
|
67
|
-
<div class="list-item" id="item-join-net"><span class="list-icon"><svg class="ico" viewBox="0 0 24 24"><path d="M3.5 9.5a13 13 0 0 1 17 0M6.5 13a8.5 8.5 0 0 1 11 0M9.6 16.3a4 4 0 0 1 4.8 0"/><circle cx="12" cy="19.5" r="1.1" fill="currentColor" stroke="none"/></svg></span><span>加入网络</span><span class="list-arrow">›</span></div>
|
|
68
67
|
<div class="list-item" id="item-add-friend"><span class="list-icon"><svg class="ico" viewBox="0 0 24 24"><circle cx="9" cy="8" r="3.2"/><path d="M3.5 19c.8-3 3-4.6 5.5-4.6S13.7 16 14.5 19"/><path d="M17 8v6M14 11h6"/></svg></span><span>连接好友</span><span class="list-arrow">›</span></div>
|
|
69
68
|
<div class="list-item" id="item-nearby"><span class="list-icon"><svg class="ico" viewBox="0 0 24 24"><path d="M4 12a8 8 0 0 1 16 0"/><path d="M7.5 12a4.5 4.5 0 0 1 9 0"/><circle cx="12" cy="12" r="1.4"/><path d="M12 13.6V19"/></svg></span><span>附近设备</span><span class="list-arrow">›</span></div>
|
|
70
69
|
<div class="list-item" id="item-scan-net"><span class="list-icon"><svg class="ico" viewBox="0 0 24 24"><path d="M4 8V6a2 2 0 0 1 2-2h2M16 4h2a2 2 0 0 1 2 2v2M20 16v2a2 2 0 0 1-2 2h-2M8 20H6a2 2 0 0 1-2-2v-2"/><path d="M4 12h16"/></svg></span><span>扫码入网 / 加好友</span></div>
|
|
71
70
|
</div>
|
|
72
71
|
<input type="file" id="qr-scan-input" accept="image/*" capture="environment" style="display:none">
|
|
73
|
-
<div class="section-label">P2P 连接</div>
|
|
74
|
-
<div class="list" id="p2p-status"></div>
|
|
75
|
-
<div class="section-label">Agent 网络</div>
|
|
76
|
-
<div class="list" id="net-members"></div>
|
|
77
72
|
<div class="list">
|
|
78
73
|
<div class="list-item" id="item-p2p"><span class="list-icon"><svg class="ico" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8.5"/><path d="M3.5 12h17"/><path d="M12 3.5c2.3 2.3 3.5 5.3 3.5 8.5s-1.2 6.2-3.5 8.5c-2.3-2.3-3.5-5.3-3.5-8.5S9.7 5.8 12 3.5z"/></svg></span><span>P2P 好友</span></div>
|
|
79
74
|
<div class="list-item" id="item-p2p-id"><span class="list-icon"><svg class="ico" viewBox="0 0 24 24"><rect x="3" y="5.5" width="18" height="13" rx="2.5"/><circle cx="8.5" cy="11" r="2"/><path d="M5.6 15.8a3.2 3.2 0 0 1 5.8 0M13.5 10h5M13.5 13.5h5"/></svg></span><span>我的 P2P ID</span></div>
|
|
80
75
|
</div>
|
|
76
|
+
<div class="section-label">P2P 连接</div>
|
|
77
|
+
<div class="list" id="p2p-status"></div>
|
|
78
|
+
<div class="section-label">好友列表</div>
|
|
79
|
+
<div class="list" id="contacts-list"></div>
|
|
80
|
+
</section>
|
|
81
|
+
|
|
82
|
+
</main>
|
|
83
|
+
|
|
84
|
+
<!-- 网络 tab -->
|
|
85
|
+
<section class="page" id="page-network" data-tab="network" hidden>
|
|
86
|
+
<div class="list">
|
|
87
|
+
<div class="list-item" id="item-join-global"><span class="list-icon"><svg class="ico" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8.5"/><path d="M3.5 12h17"/><path d="M12 3.5c2.7 2.6 2.7 14.4 0 17M12 3.5c-2.7 2.6-2.7 14.4 0 17"/><circle cx="12" cy="12" r="1.2" fill="currentColor" stroke="none"/></svg></span><span>一键入网 · 全球智能体网络</span><span class="list-arrow">›</span></div>
|
|
88
|
+
<div class="list-item" id="item-join-net"><span class="list-icon"><svg class="ico" viewBox="0 0 24 24"><path d="M3.5 9.5a13 13 0 0 1 17 0M6.5 13a8.5 8.5 0 0 1 11 0M9.6 16.3a4 4 0 0 1 4.8 0"/><circle cx="12" cy="19.5" r="1.1" fill="currentColor" stroke="none"/></svg></span><span>加入网络</span><span class="list-arrow">›</span></div>
|
|
89
|
+
</div>
|
|
90
|
+
<div class="section-label">Agent 网络</div>
|
|
91
|
+
<div class="list" id="net-members"></div>
|
|
81
92
|
<div class="section-label">Agent 服务 (协议自动发现)</div>
|
|
82
93
|
<div class="list" id="agent-services"></div>
|
|
83
94
|
<div class="list">
|
|
@@ -85,10 +96,8 @@
|
|
|
85
96
|
</div>
|
|
86
97
|
<div class="section-label">微信息 (微支付)</div>
|
|
87
98
|
<div class="list" id="x402-info-list"></div>
|
|
88
|
-
<div class="section-label"
|
|
89
|
-
<div class="list" id="
|
|
90
|
-
<div class="section-label">MCP 工具 (触控调用)</div>
|
|
91
|
-
<div class="list" id="mcp-tools"></div>
|
|
99
|
+
<div class="section-label">智能体控制 (MCP / Skills)</div>
|
|
100
|
+
<div class="list" id="agent-control"></div>
|
|
92
101
|
<div class="section-label">待人工审批支付</div>
|
|
93
102
|
<div class="list" id="approval-list"></div>
|
|
94
103
|
<div class="section-label">A2UI 动态面板 (智能体生成)</div>
|
|
@@ -121,6 +130,7 @@
|
|
|
121
130
|
<!-- 底部 tab -->
|
|
122
131
|
<nav class="tabbar" id="tabbar">
|
|
123
132
|
<button class="tab active" data-tab="main"><span class="tab-icon"><svg class="ico" viewBox="0 0 24 24"><rect x="3.5" y="3.5" width="7" height="7" rx="1.6"/><rect x="13.5" y="3.5" width="7" height="7" rx="1.6"/><rect x="3.5" y="13.5" width="7" height="7" rx="1.6"/><rect x="13.5" y="13.5" width="7" height="7" rx="1.6"/></svg></span><span>首页</span></button>
|
|
133
|
+
<button class="tab" data-tab="friends"><span class="tab-icon"><svg class="ico" viewBox="0 0 24 24"><circle cx="9" cy="8" r="3.2"/><path d="M3.5 19c.8-3 3-4.6 5.5-4.6S13.7 16 14.5 19"/><path d="M17 8v6M14 11h6"/></svg></span><span>好友</span></button>
|
|
124
134
|
<button class="tab" data-tab="network"><span class="tab-icon"><svg class="ico" viewBox="0 0 24 24"><circle cx="12" cy="12" r="8.5"/><path d="M3.5 12h17"/><path d="M12 3.5c2.3 2.3 3.5 5.3 3.5 8.5s-1.2 6.2-3.5 8.5c-2.3-2.3-3.5-5.3-3.5-8.5S9.7 5.8 12 3.5z"/></svg></span><span>网络</span></button>
|
|
125
135
|
<button class="tab" data-tab="me"><span class="tab-icon"><svg class="ico" viewBox="0 0 24 24"><circle cx="12" cy="8.5" r="4"/><path d="M4.5 20.5a7.5 7.5 0 0 1 15 0"/></svg></span><span>我</span></button>
|
|
126
136
|
</nav>
|