@bolloon/bolloon-agent 0.1.32 → 0.1.34
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 +7 -2
- package/dist/agents/pi-sdk.js +10 -1
- package/dist/bollharness-integration/index.js +8 -1
- package/dist/heartbeat/Watchdog.js +9 -1
- package/dist/llm/audio-config-store.js +199 -0
- package/dist/llm/config-store.js +20 -10
- package/dist/llm/pi-ai.js +2 -2
- package/dist/llm/video-config-store.js +31 -1
- package/dist/network/p2p-direct.js +59 -2
- package/dist/pi-ecosystem/index.js +10 -7
- package/dist/pi-ecosystem-judgment/decision.js +5 -2
- package/dist/social/heartbeat.js +19 -2
- package/dist/web/api-config.html +16 -4
- package/dist/web/client.js +1017 -137
- package/dist/web/index.html +10 -27
- package/dist/web/server.js +865 -52
- package/dist/web/style.css +370 -0
- package/package.json +2 -1
- package/src/agents/pi-sdk.ts +9 -1
- package/src/bollharness-integration/index.ts +8 -32
- package/src/heartbeat/Watchdog.ts +9 -1
- package/src/llm/audio-config-store.ts +6 -1
- package/src/llm/config-store.ts +21 -11
- package/src/llm/pi-ai.ts +2 -2
- package/src/llm/video-config-store.ts +7 -1
- package/src/network/p2p-direct.ts +59 -3
- package/src/social/ant-colony/index.js +19 -0
- package/src/social/heartbeat.ts +18 -2
- package/src/web/api-config.html +16 -4
- package/src/web/client.js +1017 -137
- package/src/web/index.html +10 -27
- package/src/web/server.ts +810 -47
- package/src/web/style.css +370 -0
- package/src/social/ant-colony/AdaptiveHeartbeat.ts +0 -131
- package/src/social/ant-colony/PheromoneEngine.ts +0 -302
- package/src/social/ant-colony/index.ts +0 -18
- package/src/social/ant-colony/types.ts +0 -94
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// 2026-06-11: 蚁群 stub
|
|
2
|
+
export class PheromoneEngine {
|
|
3
|
+
constructor() {}
|
|
4
|
+
emit() {}
|
|
5
|
+
subscribe() {}
|
|
6
|
+
decay() {}
|
|
7
|
+
getSignals() { return []; }
|
|
8
|
+
}
|
|
9
|
+
export const PheromoneType = {
|
|
10
|
+
SCOUT: 'scout',
|
|
11
|
+
RECRUIT: 'recruit',
|
|
12
|
+
ALARM: 'alarm',
|
|
13
|
+
};
|
|
14
|
+
export class AdaptiveHeartbeat {
|
|
15
|
+
constructor() {}
|
|
16
|
+
start() {}
|
|
17
|
+
stop() {}
|
|
18
|
+
tick() {}
|
|
19
|
+
}
|
package/src/social/heartbeat.ts
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
import * as fs from 'fs/promises';
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
import * as crypto from 'crypto';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
// 2026-06-11: 蚁群模块 (PheromoneEngine / AdaptiveHeartbeat) 已被用户删除, 仅保留最小 stub
|
|
5
|
+
// 让 heartbeat 内的 antColony 代码块继续类型合法, 但运行时所有方法都是 no-op
|
|
6
|
+
class PheromoneEngine {
|
|
7
|
+
async initialize() { /* stub */ }
|
|
8
|
+
shutdown() { /* stub */ }
|
|
9
|
+
getStats() { return { totalTrails: 0, avgStrength: 0, capabilityCount: 0, density: 0 }; }
|
|
10
|
+
async deposit(_type: any, _from: string, _to: string, _strength: number, _meta?: any) { /* stub */ }
|
|
11
|
+
}
|
|
12
|
+
class AdaptiveHeartbeat {
|
|
13
|
+
constructor(_opts: any) { /* stub */ }
|
|
14
|
+
shutdown() { /* stub */ }
|
|
15
|
+
decide() { return { interval: 0, priorityLevel: 'normal' }; }
|
|
16
|
+
setPheromoneDensity(_d: number) { /* stub */ }
|
|
17
|
+
recordActivity(_t: string) { /* stub */ }
|
|
18
|
+
}
|
|
19
|
+
enum PheromoneType {
|
|
20
|
+
DISCOVERY = 'discovery',
|
|
21
|
+
}
|
|
6
22
|
import { ChannelManager } from './channels/ChannelManager.js';
|
|
7
23
|
import { ChannelType } from './channels/types.js';
|
|
8
24
|
import { DiapChannelBridge } from './channels/DiapChannelBridge.js';
|
package/src/web/api-config.html
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>API 配置 - Bolloon</title>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
<!-- 2026-06-11: 移除 Google Fonts 外部 CSS — 在大陆/跨公网时经常 30s+ timeout 阻塞首屏
|
|
8
|
+
style.css 里只用字体名字符串 (JetBrains Mono / monospace), 浏览器看字面量自动落回系统字体
|
|
9
|
+
2026-06-11 提速: 不再等 Google CDN 即可渲染 -->
|
|
10
10
|
<link rel="stylesheet" href="/style.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
@@ -92,7 +92,8 @@
|
|
|
92
92
|
|
|
93
93
|
<div class="form-group">
|
|
94
94
|
<label>模型</label>
|
|
95
|
-
<input type="text" id="modelInput" placeholder="如 gpt-4">
|
|
95
|
+
<input type="text" id="modelInput" placeholder="如 gpt-4" list="modelSuggestList">
|
|
96
|
+
<datalist id="modelSuggestList"></datalist>
|
|
96
97
|
<p class="form-hint" id="modelHint"></p>
|
|
97
98
|
</div>
|
|
98
99
|
|
|
@@ -358,6 +359,17 @@
|
|
|
358
359
|
document.getElementById('baseUrlInput').value = p.baseUrl || '';
|
|
359
360
|
document.getElementById('modelInput').value = p.model || '';
|
|
360
361
|
|
|
362
|
+
// 填充模型下拉建议(仅 LLM 类型有 providerInfo.models)
|
|
363
|
+
const datalist = document.getElementById('modelSuggestList');
|
|
364
|
+
datalist.innerHTML = '';
|
|
365
|
+
if (type === 'llm' && i.models && Array.isArray(i.models)) {
|
|
366
|
+
for (const m of i.models) {
|
|
367
|
+
const opt = document.createElement('option');
|
|
368
|
+
opt.value = m;
|
|
369
|
+
datalist.appendChild(opt);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
361
373
|
// 视频/音频/LLM 专用字段显隐
|
|
362
374
|
const isVideo = type === 'video';
|
|
363
375
|
const isAudio = type === 'audio';
|