@bolloon/bolloon-agent 0.3.8 → 0.3.10
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 +90 -9
- package/dist/agents/pi-sdk.js +26 -5
- package/dist/bootstrap/exhaust-scrubber.js +233 -0
- package/dist/bootstrap/memory-compressor.js +11 -0
- package/dist/constraint-runtime/src/tools/PolymarketSDK/cancelOrder.js +19 -4
- package/dist/constraint-runtime/src/tools/PolymarketSDK/clobShared.js +104 -0
- package/dist/constraint-runtime/src/tools/PolymarketSDK/createOrder.js +34 -4
- package/dist/constraint-runtime/src/tools/PolymarketSDK/getOrders.js +17 -4
- package/dist/external-engines/delegate.js +148 -0
- package/dist/external-engines/discovery.js +394 -0
- package/dist/external-engines/index.js +9 -0
- package/dist/external-engines/types.js +11 -0
- package/dist/pi-ecosystem-judgment/injection-gate.js +85 -1
- package/dist/web/api-config.html +250 -1
- package/dist/web/client.js +32 -10
- package/dist/web/index.html +47 -23
- package/dist/web/routes-external-engines.js +111 -0
- package/dist/web/routes-judgments.js +8 -2
- package/dist/web/server.js +15 -0
- package/dist/web/style.css +61 -0
- package/package.json +1 -1
package/dist/web/server.js
CHANGED
|
@@ -12,6 +12,7 @@ import { segmentChatReply } from '../agents/chat-segmenter.js';
|
|
|
12
12
|
import { listTools } from '../llm/tool-manifest/index.js';
|
|
13
13
|
import { registerJudgmentsRoutes } from './routes-judgments.js';
|
|
14
14
|
import { registerLlmConfigRoutes } from './routes-llm-config.js';
|
|
15
|
+
import { registerExternalEngineRoutes } from './routes-external-engines.js';
|
|
15
16
|
import { registerTaskRoutes } from './routes-tasks.js';
|
|
16
17
|
import { registerHearthRoutes } from './routes-hearth.js';
|
|
17
18
|
// 2026-07-06: 类型抽到 ./server-types.ts (channel / session / task / sse client / iroh info / paths)
|
|
@@ -3929,6 +3930,9 @@ ${goalDesc}
|
|
|
3929
3930
|
registerTaskRoutes(app, { broadcast, getAgentForChannel });
|
|
3930
3931
|
// 2026-07-06: LLM/Video/Audio 配置路由抽到 ./routes-llm-config.ts
|
|
3931
3932
|
registerLlmConfigRoutes(app);
|
|
3933
|
+
// 2026-07-22: 外部编码智能体 (codex/claude-code/opencode/openclaw/hermes/实验 API)
|
|
3934
|
+
// 发现 + 配置为供应商 + 委派
|
|
3935
|
+
registerExternalEngineRoutes(app);
|
|
3932
3936
|
// ==================== P2P Network API ====================
|
|
3933
3937
|
// 获取当前身份
|
|
3934
3938
|
app.get('/api/identity', async (_req, res) => {
|
|
@@ -4480,6 +4484,17 @@ ${goalDesc}
|
|
|
4480
4484
|
}
|
|
4481
4485
|
});
|
|
4482
4486
|
// 获取 iroh 节点信息
|
|
4487
|
+
// 2026-07-22 设计 C: 引擎背压 API (涡轮增压表, 隐式可观测 — 废气内容不暴露, 只展示压力等级)
|
|
4488
|
+
app.get('/api/engine/backpressure', async (_req, res) => {
|
|
4489
|
+
try {
|
|
4490
|
+
const { getBackpressure } = await import('../bootstrap/exhaust-scrubber.js');
|
|
4491
|
+
const snap = getBackpressure();
|
|
4492
|
+
res.json({ ok: true, ...snap });
|
|
4493
|
+
}
|
|
4494
|
+
catch (err) {
|
|
4495
|
+
res.status(500).json({ error: err.message });
|
|
4496
|
+
}
|
|
4497
|
+
});
|
|
4483
4498
|
app.get('/api/iroh/info', async (_req, res) => {
|
|
4484
4499
|
if (!irohInitialized || !irohNodeInfo) {
|
|
4485
4500
|
res.json({ initialized: false });
|
package/dist/web/style.css
CHANGED
|
@@ -1795,6 +1795,36 @@ body {
|
|
|
1795
1795
|
background: var(--accent);
|
|
1796
1796
|
color: var(--bg);
|
|
1797
1797
|
}
|
|
1798
|
+
|
|
1799
|
+
/* 2026-07-22 设计 A: 正向/负向主分类 tab + 表单 toggle */
|
|
1800
|
+
.judgment-polarity-tab {
|
|
1801
|
+
background: var(--bg-hover);
|
|
1802
|
+
color: var(--text-secondary);
|
|
1803
|
+
border: none;
|
|
1804
|
+
padding: 4px 14px;
|
|
1805
|
+
border-radius: 4px;
|
|
1806
|
+
cursor: pointer;
|
|
1807
|
+
font-size: 12px;
|
|
1808
|
+
font-weight: 600;
|
|
1809
|
+
transition: var(--transition);
|
|
1810
|
+
}
|
|
1811
|
+
.judgment-polarity-tab:hover { background: var(--bg-active); color: var(--text-primary); }
|
|
1812
|
+
.judgment-polarity-tab[data-polarity="positive"].active { background: #059669; color: #fff; }
|
|
1813
|
+
.judgment-polarity-tab[data-polarity="negative"].active { background: #dc2626; color: #fff; }
|
|
1814
|
+
.judgment-advanced-fold > summary::-webkit-details-marker { display: none; }
|
|
1815
|
+
|
|
1816
|
+
.judgment-polarity-toggle { display: flex; gap: 4px; }
|
|
1817
|
+
.polarity-opt {
|
|
1818
|
+
display: flex; align-items: center; gap: 4px;
|
|
1819
|
+
padding: 3px 10px; border-radius: 4px; cursor: pointer;
|
|
1820
|
+
font-size: 12px; background: var(--bg-hover); color: var(--text-secondary);
|
|
1821
|
+
border: 1px solid transparent; transition: var(--transition);
|
|
1822
|
+
}
|
|
1823
|
+
.polarity-opt input { display: none; }
|
|
1824
|
+
.polarity-opt small { color: var(--text-muted); font-weight: 400; }
|
|
1825
|
+
.polarity-opt.active[data-polarity="positive"] { background: #ecfdf5; color: #047857; border-color: #6ee7b7; }
|
|
1826
|
+
.polarity-opt.active[data-polarity="negative"] { background: #fef2f2; color: #b91c1c; border-color: #fca5a5; }
|
|
1827
|
+
|
|
1798
1828
|
.judgment-form-row {
|
|
1799
1829
|
display: flex;
|
|
1800
1830
|
gap: 8px;
|
|
@@ -2820,6 +2850,37 @@ body {
|
|
|
2820
2850
|
margin-top: 6px;
|
|
2821
2851
|
}
|
|
2822
2852
|
|
|
2853
|
+
/* 模型筛选下拉 (外部智能体配置弹窗) */
|
|
2854
|
+
.combobox {
|
|
2855
|
+
position: relative;
|
|
2856
|
+
}
|
|
2857
|
+
.combobox-list {
|
|
2858
|
+
position: absolute;
|
|
2859
|
+
top: calc(100% + 4px);
|
|
2860
|
+
left: 0;
|
|
2861
|
+
right: 0;
|
|
2862
|
+
max-height: 240px;
|
|
2863
|
+
overflow-y: auto;
|
|
2864
|
+
background: var(--bg-elevated, var(--bg));
|
|
2865
|
+
border: 1px solid var(--border);
|
|
2866
|
+
border-radius: var(--radius-sm);
|
|
2867
|
+
z-index: 50;
|
|
2868
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
|
|
2869
|
+
}
|
|
2870
|
+
.combobox-option {
|
|
2871
|
+
padding: 9px 14px;
|
|
2872
|
+
font-size: 13px;
|
|
2873
|
+
color: var(--text);
|
|
2874
|
+
cursor: pointer;
|
|
2875
|
+
white-space: nowrap;
|
|
2876
|
+
overflow: hidden;
|
|
2877
|
+
text-overflow: ellipsis;
|
|
2878
|
+
}
|
|
2879
|
+
.combobox-option:hover {
|
|
2880
|
+
background: var(--accent);
|
|
2881
|
+
color: #fff;
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2823
2884
|
.form-row {
|
|
2824
2885
|
display: flex;
|
|
2825
2886
|
gap: 12px;
|