@bolloon/bolloon-agent 0.3.51 → 0.4.0

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.
Files changed (218) hide show
  1. package/README.md +135 -135
  2. package/bin/bolloon-cli.cjs +183 -183
  3. package/bin/bolloon.cjs +0 -0
  4. package/bin/bolloon.js +157 -0
  5. package/dist/agents/constraint-layer.js +19 -19
  6. package/dist/agents/judgment-protocol.js +14 -14
  7. package/dist/agents/loop-review.js +21 -0
  8. package/dist/agents/pi-sdk-tools.js +86 -2
  9. package/dist/agents/pi-sdk-types.js +12 -12
  10. package/dist/agents/pi-sdk.js +90 -90
  11. package/dist/agents/shell-guard.js +22 -1
  12. package/dist/agents/skill-organizer.js +19 -19
  13. package/dist/agents/verify-recipe.js +84 -0
  14. package/dist/agents/workflow-pivot-loop.js +101 -13
  15. package/dist/bollharness/src/scripts/deploy-guard.js +8 -8
  16. package/dist/bollharness-integration/context-router-judgment.js +4 -4
  17. package/dist/bollharness-integration/context-router.js +292 -292
  18. package/dist/bollharness-integration/gate-state-machine.js +13 -13
  19. package/dist/bollharness-integration/llm-judgment-engine.js +134 -134
  20. package/dist/bollharness-integration/skill-adapter.js +21 -21
  21. package/dist/bootstrap/chat-archiver.js +14 -14
  22. package/dist/bootstrap/context-os.js +50 -40
  23. package/dist/bootstrap/memory-compressor.js +13 -13
  24. package/dist/cli-entry.js +36 -36
  25. package/dist/context-compaction/auto-compact.js +7 -7
  26. package/dist/electron/first-run.js +54 -54
  27. package/dist/electron-build/electron/first-run.js +54 -54
  28. package/dist/electron-preload.js.map +1 -1
  29. package/dist/electron.js.map +1 -1
  30. package/dist/external-engines/delegate-handle.js +70 -0
  31. package/dist/external-engines/delegate.js +24 -3
  32. package/dist/index.js +112 -112
  33. package/dist/llm/error-lessons.js +53 -0
  34. package/dist/llm/llm-judgment-client.js +102 -102
  35. package/dist/llm/pi-ai.js +61 -48
  36. package/dist/llm/system-prompt/layers/channel/human-async.md +41 -41
  37. package/dist/llm/system-prompt/layers/channel/local.md +14 -14
  38. package/dist/llm/system-prompt/layers/channel/p2p-agent.md +18 -18
  39. package/dist/llm/system-prompt/layers/channel/p2p-peer-sync.md +51 -51
  40. package/dist/llm/system-prompt/layers/channel/p2p-proactive.md +43 -43
  41. package/dist/llm/system-prompt/layers/channel/p2p-visitor.md +19 -19
  42. package/dist/llm/system-prompt/layers/channel/session-handoff.md +61 -61
  43. package/dist/llm/system-prompt/layers/core/artifacts_storage.md +89 -89
  44. package/dist/llm/system-prompt/layers/core/evenhandedness.md +21 -21
  45. package/dist/llm/system-prompt/layers/core/external-engagement.md +73 -73
  46. package/dist/llm/system-prompt/layers/core/hibs_reminders.md +15 -15
  47. package/dist/llm/system-prompt/layers/core/identity.md +48 -48
  48. package/dist/llm/system-prompt/layers/core/knowledge.md +17 -17
  49. package/dist/llm/system-prompt/layers/core/memory_system.md +12 -12
  50. package/dist/llm/system-prompt/layers/core/network_filesystem.md +28 -28
  51. package/dist/llm/system-prompt/layers/core/refusal.md +37 -37
  52. package/dist/llm/system-prompt/layers/core/tone.md +31 -31
  53. package/dist/llm/system-prompt/layers/core/tools.thin.md +13 -13
  54. package/dist/llm/system-prompt/layers/core/wellbeing.md +41 -41
  55. package/dist/llm/system-prompt/layers/role/architect.md +20 -20
  56. package/dist/llm/system-prompt/layers/role/expert.md +19 -19
  57. package/dist/llm/system-prompt/layers/role/implementer.md +15 -15
  58. package/dist/llm/system-prompt/layers/role/security.md +15 -15
  59. package/dist/llm/system-prompt/layers/tool/artifacts.md +72 -72
  60. package/dist/llm/system-prompt/layers/tool/bash.md +25 -25
  61. package/dist/llm/system-prompt/layers/tool/goal_handoff.md +77 -77
  62. package/dist/llm/system-prompt/layers/tool/hibs_api.md +171 -171
  63. package/dist/llm/system-prompt/layers/tool/image_search.md +70 -70
  64. package/dist/llm/system-prompt/layers/tool/manifest.md +89 -89
  65. package/dist/llm/system-prompt/layers/tool/mcp_apps.md +53 -53
  66. package/dist/llm/system-prompt/layers/tool/p2p_request.md +61 -61
  67. package/dist/llm/system-prompt/layers/tool/web_search.md +83 -83
  68. package/dist/llm/system-prompt/registry.js +9 -1
  69. package/dist/llm/tool-manifest/ask_user_input.js +1 -1
  70. package/dist/llm/tool-manifest/bash.js +3 -3
  71. package/dist/llm/tool-manifest/create_file.js +4 -4
  72. package/dist/llm/tool-manifest/fetch_sports_data.js +3 -3
  73. package/dist/llm/tool-manifest/image_search.js +2 -2
  74. package/dist/llm/tool-manifest/index.js +0 -59
  75. package/dist/llm/tool-manifest/mcp.js +2 -2
  76. package/dist/llm/tool-manifest/message_compose.js +3 -3
  77. package/dist/llm/tool-manifest/places.js +2 -2
  78. package/dist/llm/tool-manifest/present_files.js +1 -1
  79. package/dist/llm/tool-manifest/recipe.js +2 -2
  80. package/dist/llm/tool-manifest/str_replace.js +5 -5
  81. package/dist/llm/tool-manifest/view.js +3 -3
  82. package/dist/llm/tool-manifest/weather.js +4 -4
  83. package/dist/llm/tool-manifest/web.js +4 -4
  84. package/dist/locales/en.js +28 -0
  85. package/dist/locales/zh.js +26 -0
  86. package/dist/pi-ecosystem-colony/index.js +365 -0
  87. package/dist/pi-ecosystem-judgment/causal-judge.js +51 -51
  88. package/dist/pi-ecosystem-judgment/distill-prompt.js +42 -42
  89. package/dist/pi-ecosystem-judgment/distillation.js +14 -14
  90. package/dist/pi-ecosystem-judgment/monitor-gate.js +28 -28
  91. package/dist/pi-ecosystem-judgment/value-injection.js +102 -102
  92. package/dist/security/context-router-tool.js +15 -15
  93. package/dist/social/ant-colony/AdaptiveHeartbeat.js +101 -0
  94. package/dist/social/ant-colony/PheromoneEngine.js +227 -0
  95. package/dist/social/ant-colony/index.js +6 -0
  96. package/dist/social/ant-colony/types.js +24 -0
  97. package/dist/storage/trajectory.js +101 -0
  98. package/dist/test/ai-judgment-test.js +80 -0
  99. package/dist/test/bollharness-integration.test.js +318 -0
  100. package/dist/test/channel-agent-multi-dialogue.js +205 -0
  101. package/dist/test/channel-heartbeat-agent-test.js +201 -0
  102. package/dist/test/constraint-layer.test.js +164 -0
  103. package/dist/test/diap-identity-test.js +172 -0
  104. package/dist/test/diap-quick-test.js +62 -0
  105. package/dist/test/global-shared-context.test.js +315 -0
  106. package/dist/test/harness-judgment-injection.test.js +246 -0
  107. package/dist/test/harness-workflow-integrator-test.js +228 -0
  108. package/dist/test/human-value-store.test.js +243 -0
  109. package/dist/test/hybrid-integration-test.js +118 -0
  110. package/dist/test/hybrid-messenger-verify.js +55 -0
  111. package/dist/test/iroh-bistream-debug.js +38 -0
  112. package/dist/test/iroh-communication.test.js +66 -0
  113. package/dist/test/iroh-debug-test.js +57 -0
  114. package/dist/test/iroh-diap-test.js +71 -0
  115. package/dist/test/iroh-direct-connect.js +55 -0
  116. package/dist/test/iroh-e2e-fixed.js +89 -0
  117. package/dist/test/iroh-e2e-same-process.js +63 -0
  118. package/dist/test/iroh-e2e.js +66 -0
  119. package/dist/test/iroh-final-e2e.js +72 -0
  120. package/dist/test/iroh-relay-test.js +37 -0
  121. package/dist/test/iroh-simple-test.js +41 -0
  122. package/dist/test/iroh-transport-verify.js +54 -0
  123. package/dist/test/iroh-transport.test.js +37 -0
  124. package/dist/test/iroh-two-nodes.js +70 -0
  125. package/dist/test/iroh-verify.js +44 -0
  126. package/dist/test/judgment-decision.test.js +219 -0
  127. package/dist/test/llm-judgment-integration.test.js +220 -0
  128. package/dist/test/p2p-agent-complex-dialogue.js +385 -0
  129. package/dist/test/p2p-agent-dialogue.js +341 -0
  130. package/dist/test/p2p-agent-full-bidirectional.js +510 -0
  131. package/dist/test/p2p-agent-harness-flow.js +437 -0
  132. package/dist/test/p2p-agent-harness-single.js +143 -0
  133. package/dist/test/p2p-ai-dialogue-test.js +318 -0
  134. package/dist/test/p2p-cid-connect-test.js +195 -0
  135. package/dist/test/p2p-connect-receiver.js +69 -0
  136. package/dist/test/p2p-doc-transfer.js +110 -0
  137. package/dist/test/p2p-identity-page-test.js +77 -0
  138. package/dist/test/p2p-iroh-test.js +171 -0
  139. package/dist/test/p2p-minimal-test.js +241 -0
  140. package/dist/test/p2p-node-1.js +148 -0
  141. package/dist/test/p2p-node-2.js +148 -0
  142. package/dist/test/p2p-server.js +281 -0
  143. package/dist/test/p2p-two-nodes-test.js +438 -0
  144. package/dist/test/pi-sdk.test.js +44 -0
  145. package/dist/test/set-persona.js +40 -0
  146. package/dist/test/simple.test.js +9 -0
  147. package/dist/test/storage-integration.test.js +150 -0
  148. package/dist/test/subagent-manager.test.js +276 -0
  149. package/dist/test/test-gate-flow.test.js +81 -0
  150. package/dist/test/workflow-engine.test.js +87 -0
  151. package/dist/test/workflow-pivot-loop.test.js +246 -0
  152. package/dist/web/api-config.html +779 -779
  153. package/dist/web/client-hearth.js +10 -10
  154. package/dist/web/client.js +54 -0
  155. package/dist/web/components/wallet-viem.mjs +118 -118
  156. package/dist/web/delivery-ledger.js +103 -0
  157. package/dist/web/i18n.js +104 -0
  158. package/dist/web/index.html +472 -472
  159. package/dist/web/manifest.json +20 -20
  160. package/dist/web/routes-tasks.js +242 -24
  161. package/dist/web/server-storage.js +111 -0
  162. package/dist/web/server.js +55 -26
  163. package/dist/web/style.css +4946 -4946
  164. package/dist/web/task-breaker.js +18 -0
  165. package/dist/web/task-cancel.js +35 -0
  166. package/dist/web/task-deps.js +36 -0
  167. package/dist/web/task-review.js +27 -0
  168. package/dist/web/task-verify.js +60 -0
  169. package/package.json +196 -193
  170. package/scripts/build-cli.js +215 -215
  171. package/scripts/build-web.ts +130 -130
  172. package/scripts/postinstall.js +152 -152
  173. package/bin/bolloon-daemon.sh +0 -207
  174. package/dist/constraint-runtime/reference_data/archive_surface_snapshot.json +0 -63
  175. package/dist/constraint-runtime/reference_data/commands_snapshot.json +0 -1037
  176. package/dist/constraint-runtime/reference_data/subsystems/assistant.json +0 -8
  177. package/dist/constraint-runtime/reference_data/subsystems/bootstrap.json +0 -8
  178. package/dist/constraint-runtime/reference_data/subsystems/bridge.json +0 -32
  179. package/dist/constraint-runtime/reference_data/subsystems/buddy.json +0 -13
  180. package/dist/constraint-runtime/reference_data/subsystems/cli.json +0 -26
  181. package/dist/constraint-runtime/reference_data/subsystems/components.json +0 -32
  182. package/dist/constraint-runtime/reference_data/subsystems/constants.json +0 -28
  183. package/dist/constraint-runtime/reference_data/subsystems/coordinator.json +0 -8
  184. package/dist/constraint-runtime/reference_data/subsystems/entrypoints.json +0 -15
  185. package/dist/constraint-runtime/reference_data/subsystems/hooks.json +0 -32
  186. package/dist/constraint-runtime/reference_data/subsystems/keybindings.json +0 -21
  187. package/dist/constraint-runtime/reference_data/subsystems/memdir.json +0 -15
  188. package/dist/constraint-runtime/reference_data/subsystems/migrations.json +0 -18
  189. package/dist/constraint-runtime/reference_data/subsystems/moreright.json +0 -8
  190. package/dist/constraint-runtime/reference_data/subsystems/native_ts.json +0 -11
  191. package/dist/constraint-runtime/reference_data/subsystems/outputStyles.json +0 -8
  192. package/dist/constraint-runtime/reference_data/subsystems/plugins.json +0 -9
  193. package/dist/constraint-runtime/reference_data/subsystems/remote.json +0 -11
  194. package/dist/constraint-runtime/reference_data/subsystems/schemas.json +0 -8
  195. package/dist/constraint-runtime/reference_data/subsystems/screens.json +0 -10
  196. package/dist/constraint-runtime/reference_data/subsystems/server.json +0 -10
  197. package/dist/constraint-runtime/reference_data/subsystems/services.json +0 -32
  198. package/dist/constraint-runtime/reference_data/subsystems/skills.json +0 -27
  199. package/dist/constraint-runtime/reference_data/subsystems/state.json +0 -13
  200. package/dist/constraint-runtime/reference_data/subsystems/types.json +0 -18
  201. package/dist/constraint-runtime/reference_data/subsystems/upstreamproxy.json +0 -9
  202. package/dist/constraint-runtime/reference_data/subsystems/utils.json +0 -32
  203. package/dist/constraint-runtime/reference_data/subsystems/vim.json +0 -12
  204. package/dist/constraint-runtime/reference_data/subsystems/voice.json +0 -8
  205. package/dist/constraint-runtime/reference_data/tools_snapshot.json +0 -922
  206. package/dist/electron/config.js.map +0 -1
  207. package/dist/electron/dialogs.js.map +0 -1
  208. package/dist/electron/first-run.js.map +0 -1
  209. package/dist/electron/ipc.js.map +0 -1
  210. package/dist/electron/logger.js.map +0 -1
  211. package/dist/electron/main.js.map +0 -1
  212. package/dist/electron/menu.js.map +0 -1
  213. package/dist/electron/paths.js.map +0 -1
  214. package/dist/electron/server.js.map +0 -1
  215. package/dist/electron/tray.js.map +0 -1
  216. package/dist/electron/window.js.map +0 -1
  217. package/dist/utils/auto-update.js.map +0 -1
  218. package/dist/web/client.js.map +0 -7
@@ -0,0 +1,18 @@
1
+ /**
2
+ * task-breaker.ts — 任务连续失败熔断器 (借鉴 Hermes kanban `consecutive_failures`:
3
+ * 失败递增, 成功清零, 超过 failure_limit 熔断 — 防无限重试循环)
4
+ *
5
+ * 纯函数, 可单测。
6
+ */
7
+ /** 默认熔断阈值: 连续 3 次失败 (BOLLOON_FAILURE_LIMIT 可调) */
8
+ export const DEFAULT_FAILURE_LIMIT = 3;
9
+ /** 记录一次失败: 计数 +1, 判断是否熔断. 优先级: per-task failureLimit → env → DEFAULT. */
10
+ export function recordTaskFailure(task, envLimit) {
11
+ const limit = task.failureLimit ?? (envLimit && envLimit > 0 ? envLimit : DEFAULT_FAILURE_LIMIT);
12
+ const next = (task.consecutiveFailures ?? 0) + 1;
13
+ return { consecutiveFailures: next, tripped: next >= limit };
14
+ }
15
+ /** 成功完成: 计数清零 */
16
+ export function resetTaskFailures() {
17
+ return { consecutiveFailures: 0 };
18
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * task-cancel.ts — 任务取消两段式状态机 (借鉴 Hermes `SubagentState`:
3
+ * CANCEL_REQUESTED → CANCELLED, 区分"请求已受理"与"实际已停止")
4
+ *
5
+ * 纯函数, 无 express/io 依赖 — 路由和 executor 共用, 可单测。
6
+ */
7
+ /**
8
+ * 应用一次取消请求 (第一段)。
9
+ * - pending: 从未开始 → 直接 cancelled (请求即完成, 不会卡在中间态)
10
+ * - running: → cancel-requested (请求受理, 等 executor 观测后落 cancelled)
11
+ * - cancel-requested: 幂等返回 already-requested
12
+ * - 其余终态: terminal, 不可取消
13
+ */
14
+ export function applyCancelRequest(status) {
15
+ switch (status) {
16
+ case 'pending':
17
+ return { status: 'cancelled', phase: 'direct' };
18
+ case 'running':
19
+ return { status: 'cancel-requested', phase: 'requested' };
20
+ case 'cancel-requested':
21
+ return { status: 'cancel-requested', phase: 'already-requested' };
22
+ default:
23
+ return { status: 'cancelled', phase: 'terminal' };
24
+ }
25
+ }
26
+ /**
27
+ * executor 完成/异常时调用 (第二段): 若任务处于 cancel-requested, 应落 cancelled 而非正常终态。
28
+ */
29
+ export function shouldFinalizeAsCancelled(status) {
30
+ return status === 'cancel-requested';
31
+ }
32
+ /** 取消请求是否已受理 (running 任务的第一段) */
33
+ export function isCancelPending(status) {
34
+ return status === 'cancel-requested';
35
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * task-deps.ts — 任务父依赖校验 (借鉴 Hermes kanban 认领点父依赖不变式:
3
+ * claim 时强制检查所有父任务 done/archived, 否则 demote 回 todo)
4
+ *
5
+ * 纯函数。bolloon 终态语义: completed/cancelled 视为父已结束 (依赖解除);
6
+ * failed 视为父未成功 (子任务不满足前提, 阻塞等人工决策)。
7
+ */
8
+ const PARENT_DONE_STATUSES = new Set(['completed', 'cancelled']);
9
+ /** 父依赖是否满足: 无父 / 父全部 completed|cancelled → true; 父 missing/failed/running/pending → false */
10
+ export function parentsSatisfied(task, allTasks) {
11
+ const parentIds = task?.parentIds;
12
+ if (!parentIds || parentIds.length === 0)
13
+ return true;
14
+ for (const pid of parentIds) {
15
+ const parent = allTasks.find((t) => t.id === pid);
16
+ // 父不存在 → 保守阻塞 (依赖悬空, 等人工修复)
17
+ if (!parent)
18
+ return false;
19
+ if (!PARENT_DONE_STATUSES.has(parent.status))
20
+ return false;
21
+ }
22
+ return true;
23
+ }
24
+ /** 列出未满足的父任务 id (诊断用) */
25
+ export function unsatisfiedParents(task, allTasks) {
26
+ const parentIds = task?.parentIds;
27
+ if (!parentIds || parentIds.length === 0)
28
+ return [];
29
+ const out = [];
30
+ for (const pid of parentIds) {
31
+ const parent = allTasks.find((t) => t.id === pid);
32
+ if (!parent || !PARENT_DONE_STATUSES.has(parent.status))
33
+ out.push(pid);
34
+ }
35
+ return out;
36
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * task-review.ts — 任务 review 审批通道状态机 (借鉴 Hermes kanban 9 态:
3
+ * request_review 把任务挂进 review 通道, complete_task 接受 review→done)
4
+ *
5
+ * 纯函数, 无 express/io 依赖 — 路由共用, 可单测。
6
+ */
7
+ /** 请求审批: running/pending → review (挂起等人工/审查者放行) */
8
+ export function applyReviewRequest(status) {
9
+ if (status === 'running' || status === 'pending') {
10
+ return { status: 'review', phase: 'requested' };
11
+ }
12
+ return { status, phase: 'not-reviewable' };
13
+ }
14
+ /** 审批通过: review → completed (放行) */
15
+ export function applyReviewApprove(status) {
16
+ if (status === 'review') {
17
+ return { status: 'completed', phase: 'approved' };
18
+ }
19
+ return { status, phase: 'not-reviewable' };
20
+ }
21
+ /** 审批驳回: review → pending (退回队列, 可重新认领执行) */
22
+ export function applyReviewReject(status) {
23
+ if (status === 'review') {
24
+ return { status: 'pending', phase: 'rejected' };
25
+ }
26
+ return { status, phase: 'not-reviewable' };
27
+ }
@@ -0,0 +1,60 @@
1
+ /**
2
+ * task-verify.ts — 任务完成防幻觉校验 (借鉴 Hermes complete_task:
3
+ * created_cards 逐 id 验证 → 幽灵卡阻止完成; 散文引用不解析 → suspected_hallucinated_references 事件)
4
+ *
5
+ * Bolloon 版 (advisory 不阻塞): 完成时校验 result 里引用的任务 id 和本地文件路径,
6
+ * 不存在的 → warning 列表 (存 task.warnings + broadcast), 不阻止完成 (单次同步执行无法返工).
7
+ */
8
+ import * as path from 'path';
9
+ /** 提取 result 里的任务 id 引用 (task_xxx 模式) — 校验是否幽灵引用 */
10
+ export function extractTaskReferences(text) {
11
+ const re = /\btask_[a-z0-9]+/gi;
12
+ const out = new Set();
13
+ for (const m of text.matchAll(re))
14
+ out.add(m[0].toLowerCase());
15
+ return [...out];
16
+ }
17
+ /** 提取 result 里的本地文件路径引用 (markdown 链接 + 反引号路径 + path:line), 不含 URL; cap 20 条 */
18
+ export function extractFileReferences(text) {
19
+ const out = new Set();
20
+ for (const m of text.matchAll(/\[[^\]]*\]\(([^)\s]+)\)/g)) {
21
+ const p = m[1];
22
+ if (!/^[a-z]+:\/\//i.test(p))
23
+ out.add(p);
24
+ }
25
+ for (const m of text.matchAll(/`([^`]+)`/g)) {
26
+ const p = m[1].trim();
27
+ if (p.includes('/') || p.includes('\\') || /\.(md|ts|tsx|js|jsx|json|py|txt)$/i.test(p))
28
+ out.add(p);
29
+ }
30
+ return [...out].slice(0, 20);
31
+ }
32
+ /**
33
+ * 校验任务完成结果: 任务 id 引用必须在队列中存在; 文件路径引用必须存在 (相对 cwd 解析).
34
+ * 纯 IO 校验, 不修改任务状态 — 返回 warning 列表 (幽灵引用, advisory 不阻塞).
35
+ */
36
+ export async function verifyTaskResult(result, opts) {
37
+ const warnings = [];
38
+ const known = new Set(opts.knownTaskIds);
39
+ const taskRefs = extractTaskReferences(result);
40
+ for (const ref of taskRefs) {
41
+ if (!known.has(ref)) {
42
+ warnings.push(`result 引用不存在的任务 ${ref} (疑似幻觉引用)`);
43
+ }
44
+ }
45
+ let checkedCount = taskRefs.length;
46
+ const fileRefs = extractFileReferences(result);
47
+ const fsMod = opts.fs ?? (await import('fs/promises'));
48
+ const base = opts.cwd ?? process.cwd();
49
+ for (const ref of fileRefs) {
50
+ checkedCount++;
51
+ const abs = ref.startsWith('/') || /^[a-zA-Z]:[\\/]/.test(ref) ? ref : path.resolve(base, ref);
52
+ try {
53
+ await fsMod.access(abs);
54
+ }
55
+ catch {
56
+ warnings.push(`result 引用不存在的文件 ${ref} (疑似幻觉引用)`);
57
+ }
58
+ }
59
+ return { warnings, checkedCount };
60
+ }
package/package.json CHANGED
@@ -1,193 +1,196 @@
1
- {
2
- "name": "@bolloon/bolloon-agent",
3
- "version": "0.3.51",
4
- "type": "module",
5
- "description": "P2P AI Document Agent - 全局安装后执行 `bolloon` 启动产品",
6
- "main": "dist/cli-entry.js",
7
- "author": "yuanjie liu",
8
- "repository": {
9
- "type": "git",
10
- "url": "https://github.com/logos-42/bolloon.git"
11
- },
12
- "license": "MIT",
13
- "files": [
14
- "dist",
15
- "bin/bolloon.cjs",
16
- "bin/bolloon.js",
17
- "bin/bolloon.cmd",
18
- "bin/bolloon-cli.cjs",
19
- "bin/bolloon-daemon.sh",
20
- "scripts/postinstall.js",
21
- "scripts/build-cli.js",
22
- "scripts/build-web.ts"
23
- ],
24
- "bin": {
25
- "bolloon": "./dist/cli-entry.js"
26
- },
27
- "scripts": {
28
- "build": "npm run build --workspaces --if-present",
29
- "build:main": "tsc && node scripts/copy-constraint-runtime.mjs",
30
- "build:cli": "node scripts/build-cli.js",
31
- "build:web": "npx tsx scripts/build-web.ts",
32
- "build:electron": "tsc -p tsconfig.electron.json",
33
- "build:all": "npm run build:main && npm run build:web && npm run build:electron && npm run build:cli",
34
- "start": "node dist/index.js",
35
- "dev": "tsx -r dotenv/config src/index.ts",
36
- "dev:web": "npm run build:web && tsx -r dotenv/config src/index.ts --web",
37
- "dev:electron": "npm run build:electron && npm run electron:start",
38
- "electron:start": "NODE_ENV=development electron dist/electron-build/electron.js",
39
- "electron:dev": "concurrently \"npm run dev:web\" \"npm run electron:start\"",
40
- "electron:build": "npm run build:electron && electron-builder",
41
- "electron:pack": "electron-builder --dir",
42
- "app:bundle": "node scripts/build-app-bundle.cjs",
43
- "app:bundle:open": "node scripts/build-app-bundle.cjs && open \"release/mac-arm64/Bolloon Agent.app\"",
44
- "smoke:esm": "node scripts/smoke-esm.mjs",
45
- "prepublishOnly": "npm run build:all && npm run smoke:esm",
46
- "test": "vitest run",
47
- "test:watch": "vitest",
48
- "test:pi-sdk": "tsx src/test/pi-sdk.test.ts",
49
- "postinstall": "node scripts/postinstall.js",
50
- "verify:ipns": "tsx scripts/verify-ipns-pipeline.ts"
51
- },
52
- "workspaces": [
53
- "src/constraint-runtime"
54
- ],
55
- "dependencies": {
56
- "@bolloon/bolloon-agent": "^0.3.22",
57
- "@bolloon/constraint-runtime": "0.1.0",
58
- "@capacitor/core": "^8.4.1",
59
- "@capacitor/ios": "^8.4.2",
60
- "@chainsafe/libp2p-noise": "^17.0.0",
61
- "@chainsafe/libp2p-yamux": "^8.0.1",
62
- "@diap/sdk": "^0.2.4",
63
- "@libp2p/autonat": "^3.0.25",
64
- "@libp2p/circuit-relay-v2": "^4.2.9",
65
- "@libp2p/dcutr": "^3.0.20",
66
- "@libp2p/gossipsub": "^16.1.1",
67
- "@libp2p/identify": "^4.1.6",
68
- "@libp2p/kad-dht": "^16.2.6",
69
- "@libp2p/tcp": "^11.0.20",
70
- "@libp2p/upnp-nat": "^4.0.20",
71
- "@multiformats/multiaddr": "^13.0.3",
72
- "@noble/hashes": "^1.3.0",
73
- "@orbitdb/core": "^4.0.0",
74
- "@polymarket/client": "^0.2.0",
75
- "@rayhanadev/iroh": "^0.1.1",
76
- "@x402/aptos": "^2.20.0",
77
- "@x402/avm": "^2.20.0",
78
- "@x402/axios": "^2.20.0",
79
- "@x402/core": "^2.20.0",
80
- "@x402/evm": "^2.20.0",
81
- "@x402/express": "^2.20.0",
82
- "@x402/extensions": "^2.20.0",
83
- "@x402/fastify": "^2.20.0",
84
- "@x402/fetch": "^2.20.0",
85
- "@x402/hedera": "^2.20.0",
86
- "@x402/hono": "^2.20.0",
87
- "@x402/keeta": "^2.20.0",
88
- "@x402/mcp": "^2.20.0",
89
- "@x402/next": "^2.20.0",
90
- "@x402/paywall": "^2.20.0",
91
- "@x402/stellar": "^2.20.0",
92
- "@x402/svm": "^2.20.0",
93
- "@x402/tvm": "^2.20.0",
94
- "b4a": "^1.8.1",
95
- "dotenv": "^17.4.2",
96
- "esbuild": "^0.24.0",
97
- "express": "^5.2.1",
98
- "helia": "^7.1.3",
99
- "ink": "^7.1.1",
100
- "ink-text-input": "^6.0.0",
101
- "libp2p": "^3.3.0",
102
- "mammoth": "^1.6.0",
103
- "pdf-parse": "^1.1.4",
104
- "platform": "^1.3.6",
105
- "react": "^19.2.8",
106
- "react-dom": "^19.2.8",
107
- "viem": "^2.52.0"
108
- },
109
- "devDependencies": {
110
- "@capacitor/cli": "^8.4.1",
111
- "@playwright/test": "^1.60.0",
112
- "@types/express": "^5.0.6",
113
- "@types/node": "^25.9.1",
114
- "@types/pdf-parse": "^1.1.5",
115
- "@types/react": "^19.2.18",
116
- "@types/react-dom": "^19.2.4",
117
- "concurrently": "^9.2.1",
118
- "electron": "^42.3.0",
119
- "electron-builder": "^26.15.5",
120
- "lefthook": "^2.1.9",
121
- "playwright": "^1.60.0",
122
- "tsx": "^4.0.0",
123
- "typescript": "^5.0.0",
124
- "vitest": "^4.1.6"
125
- },
126
- "build": {
127
- "appId": "com.bolloon.agent",
128
- "productName": "Bolloon Agent",
129
- "directories": {
130
- "output": "release",
131
- "buildResources": "build"
132
- },
133
- "files": [
134
- "dist/**/*",
135
- "bin/**/*",
136
- "package.json",
137
- "dist/electron-build/**/*"
138
- ],
139
- "npmRebuild": false,
140
- "buildDependenciesFromSource": false,
141
- "extraResources": [
142
- {
143
- "from": "build",
144
- "to": "build",
145
- "filter": [
146
- "**/*"
147
- ]
148
- }
149
- ],
150
- "extraMetadata": {
151
- "main": "dist/electron-build/electron.js",
152
- "type": "commonjs"
153
- },
154
- "win": {
155
- "target": [
156
- {
157
- "target": "nsis",
158
- "arch": [
159
- "x64"
160
- ]
161
- }
162
- ],
163
- "icon": "build/icon.ico"
164
- },
165
- "mac": {
166
- "target": [
167
- "dmg"
168
- ],
169
- "icon": "build/icon.icns"
170
- },
171
- "linux": {
172
- "target": [
173
- "AppImage"
174
- ],
175
- "icon": "build/icon.png"
176
- },
177
- "nsis": {
178
- "oneClick": false,
179
- "perMachine": false,
180
- "allowToChangeInstallationDirectory": true,
181
- "createDesktopShortcut": true,
182
- "createStartMenuShortcut": true
183
- },
184
- "asar": true,
185
- "asarUnpack": [
186
- "node_modules/@diap/**/*",
187
- "node_modules/@rayhanadev/**/*",
188
- "node_modules/@x402/**/*",
189
- "node_modules/libp2p/**/*",
190
- "node_modules/@libp2p/**/*"
191
- ]
192
- }
193
- }
1
+ {
2
+ "name": "@bolloon/bolloon-agent",
3
+ "version": "0.4.0",
4
+ "type": "module",
5
+ "description": "P2P AI Document Agent - 全局安装后执行 `bolloon` 启动产品",
6
+ "main": "dist/cli-entry.js",
7
+ "author": "yuanjie liu",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/logos-42/bolloon.git"
11
+ },
12
+ "license": "MIT",
13
+ "files": [
14
+ "dist",
15
+ "bin/bolloon.cjs",
16
+ "bin/bolloon.js",
17
+ "bin/bolloon.cmd",
18
+ "bin/bolloon-cli.cjs",
19
+ "bin/bolloon-daemon.sh",
20
+ "scripts/postinstall.js",
21
+ "scripts/build-cli.js",
22
+ "scripts/build-web.ts"
23
+ ],
24
+ "bin": {
25
+ "bolloon": "./dist/cli-entry.js"
26
+ },
27
+ "scripts": {
28
+ "build": "npm run build --workspaces --if-present",
29
+ "build:main": "tsc && node scripts/copy-constraint-runtime.mjs",
30
+ "build:cli": "node scripts/build-cli.js",
31
+ "build:web": "npx tsx scripts/build-web.ts",
32
+ "build:rokid-sdk": "npm --prefix ../rokid run build",
33
+ "test:rokid-sdk": "npm --prefix ../rokid test",
34
+ "build:electron": "tsc -p tsconfig.electron.json",
35
+ "build:all": "npm run build:main && npm run build:web && npm run build:electron && npm run build:cli",
36
+ "start": "node dist/index.js",
37
+ "dev": "tsx -r dotenv/config src/index.ts",
38
+ "dev:web": "npm run build:web && tsx -r dotenv/config src/index.ts --web",
39
+ "dev:electron": "npm run build:electron && npm run electron:start",
40
+ "electron:start": "NODE_ENV=development electron dist/electron-build/electron.js",
41
+ "electron:dev": "concurrently \"npm run dev:web\" \"npm run electron:start\"",
42
+ "electron:build": "npm run build:electron && electron-builder",
43
+ "electron:pack": "electron-builder --dir",
44
+ "app:bundle": "node scripts/build-app-bundle.cjs",
45
+ "app:bundle:open": "node scripts/build-app-bundle.cjs && open \"release/mac-arm64/Bolloon Agent.app\"",
46
+ "smoke:esm": "node scripts/smoke-esm.mjs",
47
+ "prepublishOnly": "npm run build:all && npm run smoke:esm",
48
+ "test": "vitest run",
49
+ "test:watch": "vitest",
50
+ "test:pi-sdk": "tsx src/test/pi-sdk.test.ts",
51
+ "postinstall": "node scripts/postinstall.js",
52
+ "verify:ipns": "tsx scripts/verify-ipns-pipeline.ts"
53
+ },
54
+ "workspaces": [
55
+ "src/constraint-runtime"
56
+ ],
57
+ "dependencies": {
58
+ "@bolloon/bolloon-agent": "^0.3.22",
59
+ "@bolloon/constraint-runtime": "0.1.0",
60
+ "@capacitor/android": "^8.4.1",
61
+ "@capacitor/core": "^8.4.1",
62
+ "@capacitor/ios": "^8.4.2",
63
+ "@chainsafe/libp2p-noise": "^17.0.0",
64
+ "@chainsafe/libp2p-yamux": "^8.0.1",
65
+ "@diap/sdk": "^0.2.4",
66
+ "@libp2p/autonat": "^3.0.25",
67
+ "@libp2p/circuit-relay-v2": "^4.2.9",
68
+ "@libp2p/dcutr": "^3.0.20",
69
+ "@libp2p/gossipsub": "^16.1.1",
70
+ "@libp2p/identify": "^4.1.6",
71
+ "@libp2p/kad-dht": "^16.2.6",
72
+ "@libp2p/tcp": "^11.0.20",
73
+ "@libp2p/upnp-nat": "^4.0.20",
74
+ "@multiformats/multiaddr": "^13.0.3",
75
+ "@noble/hashes": "^1.3.0",
76
+ "@orbitdb/core": "^4.0.0",
77
+ "@polymarket/client": "^0.2.0",
78
+ "@rayhanadev/iroh": "^0.1.1",
79
+ "@x402/aptos": "^2.20.0",
80
+ "@x402/avm": "^2.20.0",
81
+ "@x402/axios": "^2.20.0",
82
+ "@x402/core": "^2.20.0",
83
+ "@x402/evm": "^2.20.0",
84
+ "@x402/express": "^2.20.0",
85
+ "@x402/extensions": "^2.20.0",
86
+ "@x402/fastify": "^2.20.0",
87
+ "@x402/fetch": "^2.20.0",
88
+ "@x402/hedera": "^2.20.0",
89
+ "@x402/hono": "^2.20.0",
90
+ "@x402/keeta": "^2.20.0",
91
+ "@x402/mcp": "^2.20.0",
92
+ "@x402/next": "^2.20.0",
93
+ "@x402/paywall": "^2.20.0",
94
+ "@x402/stellar": "^2.20.0",
95
+ "@x402/svm": "^2.20.0",
96
+ "@x402/tvm": "^2.20.0",
97
+ "b4a": "^1.8.1",
98
+ "dotenv": "^17.4.2",
99
+ "esbuild": "^0.24.0",
100
+ "express": "^5.2.1",
101
+ "helia": "^7.1.3",
102
+ "ink": "^7.1.1",
103
+ "ink-text-input": "^6.0.0",
104
+ "libp2p": "^3.3.0",
105
+ "mammoth": "^1.6.0",
106
+ "pdf-parse": "^1.1.4",
107
+ "platform": "^1.3.6",
108
+ "react": "^19.2.8",
109
+ "react-dom": "^19.2.8",
110
+ "viem": "^2.52.0"
111
+ },
112
+ "devDependencies": {
113
+ "@capacitor/cli": "^8.4.1",
114
+ "@playwright/test": "^1.60.0",
115
+ "@types/express": "^5.0.6",
116
+ "@types/node": "^25.9.1",
117
+ "@types/pdf-parse": "^1.1.5",
118
+ "@types/react": "^19.2.18",
119
+ "@types/react-dom": "^19.2.4",
120
+ "concurrently": "^9.2.1",
121
+ "electron": "^42.3.0",
122
+ "electron-builder": "^26.15.5",
123
+ "lefthook": "^2.1.9",
124
+ "playwright": "^1.60.0",
125
+ "tsx": "^4.0.0",
126
+ "typescript": "^5.0.0",
127
+ "vitest": "^4.1.6"
128
+ },
129
+ "build": {
130
+ "appId": "com.bolloon.agent",
131
+ "productName": "Bolloon Agent",
132
+ "directories": {
133
+ "output": "release",
134
+ "buildResources": "build"
135
+ },
136
+ "files": [
137
+ "dist/**/*",
138
+ "bin/**/*",
139
+ "package.json",
140
+ "dist/electron-build/**/*"
141
+ ],
142
+ "npmRebuild": false,
143
+ "buildDependenciesFromSource": false,
144
+ "extraResources": [
145
+ {
146
+ "from": "build",
147
+ "to": "build",
148
+ "filter": [
149
+ "**/*"
150
+ ]
151
+ }
152
+ ],
153
+ "extraMetadata": {
154
+ "main": "dist/electron-build/electron.js",
155
+ "type": "commonjs"
156
+ },
157
+ "win": {
158
+ "target": [
159
+ {
160
+ "target": "nsis",
161
+ "arch": [
162
+ "x64"
163
+ ]
164
+ }
165
+ ],
166
+ "icon": "build/icon.ico"
167
+ },
168
+ "mac": {
169
+ "target": [
170
+ "dmg"
171
+ ],
172
+ "icon": "build/icon.icns"
173
+ },
174
+ "linux": {
175
+ "target": [
176
+ "AppImage"
177
+ ],
178
+ "icon": "build/icon.png"
179
+ },
180
+ "nsis": {
181
+ "oneClick": false,
182
+ "perMachine": false,
183
+ "allowToChangeInstallationDirectory": true,
184
+ "createDesktopShortcut": true,
185
+ "createStartMenuShortcut": true
186
+ },
187
+ "asar": true,
188
+ "asarUnpack": [
189
+ "node_modules/@diap/**/*",
190
+ "node_modules/@rayhanadev/**/*",
191
+ "node_modules/@x402/**/*",
192
+ "node_modules/libp2p/**/*",
193
+ "node_modules/@libp2p/**/*"
194
+ ]
195
+ }
196
+ }