@bolloon/bolloon-agent 0.1.33 → 0.1.35
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/.auto-evolve-calls +1 -0
- package/.last-auto-evolve-baseline +1 -0
- package/Bolloon.md +103 -0
- package/README.md +7 -2
- package/dist/agents/pi-sdk.js +264 -12
- package/dist/bollharness-integration/index.js +8 -1
- package/dist/bootstrap/bootstrap.js +114 -0
- package/dist/bootstrap/context-collector.js +296 -0
- package/dist/bootstrap/lifecycle-hooks.js +109 -0
- package/dist/bootstrap/project-context.js +151 -0
- package/dist/heartbeat/Watchdog.js +9 -1
- package/dist/index.js +11 -0
- package/dist/llm/pi-ai.js +31 -21
- package/dist/network/p2p-direct.js +59 -2
- package/dist/pi-ecosystem/index.js +9 -6
- package/dist/pi-ecosystem-judgment/adaptive-scan.js +231 -0
- package/dist/pi-ecosystem-judgment/causal-judge.js +449 -0
- package/dist/pi-ecosystem-judgment/decision.js +5 -2
- package/dist/pi-ecosystem-judgment/detect-hook.js +168 -0
- package/dist/pi-ecosystem-judgment/distill-prompt.js +226 -0
- package/dist/pi-ecosystem-judgment/evolve-judgment.js +170 -0
- package/dist/pi-ecosystem-judgment/human-value-pipeline.js +21 -0
- package/dist/pi-ecosystem-judgment/human-value-store.js +283 -22
- package/dist/pi-ecosystem-judgment/injection-gate.js +166 -0
- package/dist/pi-ecosystem-judgment/monitor-gate.js +188 -0
- package/dist/security/builtin-guards.js +124 -0
- package/dist/security/context-router-tool.js +106 -0
- package/dist/security/react-harness.js +143 -0
- package/dist/security/tool-gate.js +235 -0
- package/dist/social/heartbeat.js +19 -2
- package/dist/utils/auto-evolve-policy.js +117 -0
- package/dist/utils/clamp.js +7 -0
- package/dist/utils/double.js +6 -0
- package/dist/web/api-config.html +3 -3
- package/dist/web/client.js +1328 -351
- package/dist/web/index.html +34 -31
- package/dist/web/server.js +1128 -58
- package/dist/web/style.css +370 -0
- package/lefthook.yml +29 -0
- package/package.json +4 -2
- package/scripts/auto-evolve-loop.ts +376 -0
- package/scripts/auto-evolve-oneshot.sh +155 -0
- package/scripts/auto-evolve-snapshot.sh +136 -0
- package/scripts/detect-schema-changes.sh +48 -0
- package/scripts/diff-reviewer.ts +159 -0
- package/scripts/weekly-report.ts +364 -0
- package/src/agents/pi-sdk.ts +293 -15
- package/src/bollharness-integration/index.ts +8 -32
- package/src/bootstrap/bootstrap.ts +132 -0
- package/src/bootstrap/context-collector.ts +342 -0
- package/src/bootstrap/lifecycle-hooks.ts +176 -0
- package/src/bootstrap/project-context.ts +163 -0
- package/src/heartbeat/Watchdog.ts +9 -1
- package/src/index.ts +11 -0
- package/src/llm/pi-ai.ts +33 -22
- package/src/network/p2p-direct.ts +59 -3
- package/src/security/builtin-guards.ts +162 -0
- package/src/security/context-router-tool.ts +122 -0
- package/src/security/react-harness.ts +177 -0
- package/src/security/tool-gate.ts +294 -0
- package/src/social/ant-colony/index.js +19 -0
- package/src/social/heartbeat.ts +18 -2
- package/src/utils/auto-evolve-policy.ts +138 -0
- package/src/utils/clamp.ts +5 -0
- package/src/web/api-config.html +3 -3
- package/src/web/client.js +1328 -351
- package/src/web/index.html +34 -31
- package/src/web/server.ts +1179 -53
- package/src/web/style.css +370 -0
- package/staging/auto-evolve/clean-001/.review-verdict +9 -0
- package/staging/auto-evolve/clean-001/clean-001.patch +14 -0
- package/staging/auto-evolve/e2e-001/.patch-id +1 -0
- package/staging/auto-evolve/e2e-001/.review-verdict +12 -0
- package/staging/auto-evolve/e2e-001/e2e-001.patch +11 -0
- package/staging/auto-evolve/test-bad/.review-verdict +12 -0
- package/staging/auto-evolve/test-bad/test-bad.patch +11 -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
package/dist/web/index.html
CHANGED
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
<!-- PWA Manifest -->
|
|
17
17
|
<link rel="manifest" href="/manifest.json">
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
<!-- 2026-06-11: 移除 Google Fonts + jsdelivr 外部 CDN 阻塞 — 在大陆/跨公网 timeout 拖慢首屏/返回主页
|
|
20
|
+
字体: style.css 只用字面量 'JetBrains Mono', 系统有就用, 没有自动 fall back monospace
|
|
21
|
+
marked/qrcode: 改 async 不阻塞 (下载失败时本地降级到 escape 文本, 不影响主聊天) -->
|
|
22
22
|
<link rel="stylesheet" href="/style.css">
|
|
23
|
-
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
24
|
-
<script src="https://cdn.jsdelivr.net/npm/qrcode@1.5.3/build/qrcode.min.js"></script>
|
|
23
|
+
<script async src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
24
|
+
<script async src="https://cdn.jsdelivr.net/npm/qrcode@1.5.3/build/qrcode.min.js"></script>
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
|
27
27
|
<div class="app-container">
|
|
@@ -36,23 +36,15 @@
|
|
|
36
36
|
<span class="brand-icon">◈</span>
|
|
37
37
|
<span class="brand-text">Bolloon</span>
|
|
38
38
|
</span>
|
|
39
|
-
|
|
40
|
-
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
41
|
-
<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>
|
|
42
|
-
</svg>
|
|
43
|
-
</button>
|
|
39
|
+
<!-- 2026-06-11: 加载 Session 文件夹按钮删除 -->
|
|
44
40
|
</div>
|
|
45
|
-
|
|
41
|
+
<!-- 2026-06-11: session-file-input 已无用, 同步删除 -->
|
|
42
|
+
<!-- <input type="file" id="session-file-input" accept=".json" style="display:none"> -->
|
|
46
43
|
|
|
47
44
|
<div class="sidebar-section">
|
|
48
45
|
<div class="section-header">
|
|
49
46
|
<span class="section-title">智能体</span>
|
|
50
|
-
|
|
51
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
52
|
-
<line x1="12" y1="5" x2="12" y2="19"></line>
|
|
53
|
-
<line x1="5" y1="12" x2="19" y2="12"></line>
|
|
54
|
-
</svg>
|
|
55
|
-
</button>
|
|
47
|
+
<!-- 2026-06-11: catalog-add-btn (添加智能体) 删除 -->
|
|
56
48
|
</div>
|
|
57
49
|
<button id="new-channel-btn" class="section-action" title="新建智能体">
|
|
58
50
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
@@ -77,8 +69,8 @@
|
|
|
77
69
|
<span class="section-title" style="font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.5px;color:var(--text-muted);">P2P 好友</span>
|
|
78
70
|
</span>
|
|
79
71
|
<span style="display:flex;gap:4px;">
|
|
72
|
+
<button id="p2p-toggle-all-btn" title="切换全部展开/折叠" style="background:none;border:1px solid var(--border);color:var(--text-secondary);cursor:pointer;padding:2px 6px;border-radius:4px;font-size:11px;line-height:1;">⊞ 展开</button>
|
|
80
73
|
<button id="show-my-p2p-id-btn" title="查看并复制我的 P2P publicKey" style="background:none;border:1px solid var(--border);color:var(--text-secondary);cursor:pointer;padding:2px 6px;border-radius:4px;font-size:11px;line-height:1;">我的 ID</button>
|
|
81
|
-
<button id="refresh-shared-btn" title="向所有好友拉取最新分享列表 (双向: A 拉 B 的, B 拉 A 的)" style="background:none;border:1px solid var(--border);color:var(--text-secondary);cursor:pointer;padding:2px 6px;border-radius:4px;font-size:11px;line-height:1;">↻ 刷新</button>
|
|
82
74
|
<button id="add-p2p-peer-btn" title="添加 P2P 好友 (输入对方的 publicKey)" style="background:none;border:1px solid var(--border);color:var(--text-secondary);cursor:pointer;padding:2px 6px;border-radius:4px;font-size:11px;line-height:1;">+ 好友</button>
|
|
83
75
|
</span>
|
|
84
76
|
</div>
|
|
@@ -133,15 +125,6 @@
|
|
|
133
125
|
</svg>
|
|
134
126
|
<span id="wallet-badge" class="task-badge" style="display:none;">0</span>
|
|
135
127
|
</button>
|
|
136
|
-
<button id="task-queue-btn" class="header-action" title="任务队列">
|
|
137
|
-
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
138
|
-
<path d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2"></path>
|
|
139
|
-
<rect x="9" y="3" width="6" height="4" rx="1"></rect>
|
|
140
|
-
<line x1="9" y1="12" x2="15" y2="12"></line>
|
|
141
|
-
<line x1="9" y1="16" x2="13" y2="16"></line>
|
|
142
|
-
</svg>
|
|
143
|
-
<span id="task-badge" class="task-badge" style="display:none;">0</span>
|
|
144
|
-
</button>
|
|
145
128
|
<button id="judgments-btn" class="header-action" title="我的判断">
|
|
146
129
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
147
130
|
<path d="M12 2L4 6v6c0 5 3.5 9.5 8 10 4.5-.5 8-5 8-10V6l-8-4z"></path>
|
|
@@ -262,6 +245,22 @@
|
|
|
262
245
|
全局
|
|
263
246
|
</button>
|
|
264
247
|
</div>
|
|
248
|
+
<!-- AI 演化 status 过滤: active / superseded / all / violations / 自适应 -->
|
|
249
|
+
<div id="judgments-status-filter" style="display:flex;gap:6px;margin-top:10px;font-size:12px;align-items:center;">
|
|
250
|
+
<span style="color:#6b7280;">演化过滤:</span>
|
|
251
|
+
<button class="judgment-status-tab active" data-status="all"
|
|
252
|
+
style="background:#2563eb;color:#fff;border:none;padding:3px 10px;border-radius:3px;cursor:pointer;font-size:11px;">全部</button>
|
|
253
|
+
<button class="judgment-status-tab" data-status="active"
|
|
254
|
+
style="background:#e5e7eb;color:#374151;border:none;padding:3px 10px;border-radius:3px;cursor:pointer;font-size:11px;">活跃</button>
|
|
255
|
+
<button class="judgment-status-tab" data-status="superseded"
|
|
256
|
+
style="background:#e5e7eb;color:#374151;border:none;padding:3px 10px;border-radius:3px;cursor:pointer;font-size:11px;">已过时</button>
|
|
257
|
+
<button class="judgment-status-tab" data-status="violations"
|
|
258
|
+
style="background:#e5e7eb;color:#374151;border:none;padding:3px 10px;border-radius:3px;cursor:pointer;font-size:11px;">违规记录</button>
|
|
259
|
+
<button class="judgment-status-tab" data-status="adaptive"
|
|
260
|
+
style="background:#e5e7eb;color:#374151;border:none;padding:3px 10px;border-radius:3px;cursor:pointer;font-size:11px;">📊 自适应</button>
|
|
261
|
+
<button class="judgment-status-tab" data-status="causal"
|
|
262
|
+
style="background:#e5e7eb;color:#374151;border:none;padding:3px 10px;border-radius:3px;cursor:pointer;font-size:11px;">🔍 因果分析</button>
|
|
263
|
+
</div>
|
|
265
264
|
<h3 style="margin-top:16px;font-size:14px;font-weight:600;display:flex;align-items:center;gap:12px;flex-wrap:wrap;">
|
|
266
265
|
<span id="judgments-list-title">本 channel 的判断力</span>
|
|
267
266
|
<span style="display:flex;align-items:center;gap:6px;margin-left:auto;font-size:12px;font-weight:normal;">
|
|
@@ -352,10 +351,14 @@
|
|
|
352
351
|
|
|
353
352
|
<div class="messages" id="messages"></div>
|
|
354
353
|
|
|
355
|
-
<div
|
|
356
|
-
|
|
357
|
-
<
|
|
358
|
-
|
|
354
|
+
<div id="loop-timeline-panel" hidden
|
|
355
|
+
style="border-top:1px solid #d1d5db;background:#fafafa;font-family:ui-monospace,monospace;font-size:12px;color:#1f2937;max-height:50vh;overflow-y:auto;padding:8px 12px;">
|
|
356
|
+
<div id="loop-timeline-header" style="display:flex;align-items:center;gap:8px;padding-bottom:6px;border-bottom:1px solid #e5e7eb;margin-bottom:6px;">
|
|
357
|
+
<span id="loop-timeline-title" style="font-weight:600;color:#374151;">▸ 运行中</span>
|
|
358
|
+
<span style="flex:1;"></span>
|
|
359
|
+
<button id="loop-abort-btn" style="background:none;border:1px solid #dc2626;color:#dc2626;padding:2px 10px;border-radius:3px;cursor:pointer;font-size:11px;">⏹ 终止</button>
|
|
360
|
+
</div>
|
|
361
|
+
<div id="loop-timeline-rows"></div>
|
|
359
362
|
</div>
|
|
360
363
|
|
|
361
364
|
<div class="input-area">
|