@bolloon/bolloon-agent 0.1.36 → 0.1.37

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 (530) hide show
  1. package/dist/web/client.js +2861 -3746
  2. package/dist/web/components/p2p/index.js +226 -264
  3. package/dist/web/ui/message-renderer.js +323 -434
  4. package/dist/web/ui/step-timeline.js +255 -351
  5. package/package.json +2 -2
  6. package/.auto-evolve-calls +0 -1
  7. package/.last-auto-evolve-baseline +0 -1
  8. package/.playwright-mcp/page-2026-06-16T07-51-45-706Z.yml +0 -130
  9. package/.playwright-mcp/page-2026-06-16T07-56-44-116Z.yml +0 -131
  10. package/Bolloon.md +0 -144
  11. package/Dive-into/CITATION.cff +0 -17
  12. package/Dive-into/LICENSE +0 -25
  13. package/Dive-into/README.md +0 -598
  14. package/Dive-into/README_zh.md +0 -599
  15. package/Dive-into/assets/context.png +0 -0
  16. package/Dive-into/assets/extensibility.png +0 -0
  17. package/Dive-into/assets/iteration.png +0 -0
  18. package/Dive-into/assets/layered_architecture.png +0 -0
  19. package/Dive-into/assets/main_structure.png +0 -0
  20. package/Dive-into/assets/permission.png +0 -0
  21. package/Dive-into/assets/session_compact.png +0 -0
  22. package/Dive-into/assets/subagent.png +0 -0
  23. package/Dive-into/paper/Dive_into_Claude_Code.pdf +0 -0
  24. package/dist/agents/constraint-layer.js.map +0 -1
  25. package/dist/agents/pi-sdk.js.map +0 -1
  26. package/dist/agents/workflow-engine.js.map +0 -1
  27. package/dist/bollharness/src/index.js +0 -5
  28. package/dist/bollharness/src/scripts/checks/check_adr_plan_numbering.js +0 -6
  29. package/dist/bollharness/src/scripts/checks/check_api_types.js +0 -45
  30. package/dist/bollharness/src/scripts/checks/check_artifact_link.js +0 -146
  31. package/dist/bollharness/src/scripts/checks/check_bridge_deps.js +0 -6
  32. package/dist/bollharness/src/scripts/checks/check_bugfix_binding.js +0 -6
  33. package/dist/bollharness/src/scripts/checks/check_bugfix_binding_ci.js +0 -6
  34. package/dist/bollharness/src/scripts/checks/check_doc_file_references.js +0 -6
  35. package/dist/bollharness/src/scripts/checks/check_doc_freshness.js +0 -135
  36. package/dist/bollharness/src/scripts/checks/check_doc_links.js +0 -31
  37. package/dist/bollharness/src/scripts/checks/check_file_existence_claims.js +0 -6
  38. package/dist/bollharness/src/scripts/checks/check_fragment_integrity.js +0 -34
  39. package/dist/bollharness/src/scripts/checks/check_hook_installed.js +0 -63
  40. package/dist/bollharness/src/scripts/checks/check_issue_closure.js +0 -41
  41. package/dist/bollharness/src/scripts/checks/check_mcp_parity.js +0 -6
  42. package/dist/bollharness/src/scripts/checks/check_security.js +0 -48
  43. package/dist/bollharness/src/scripts/checks/check_skill_parity.js +0 -6
  44. package/dist/bollharness/src/scripts/checks/check_versions.js +0 -6
  45. package/dist/bollharness/src/scripts/checks/finding.js +0 -13
  46. package/dist/bollharness/src/scripts/checks/next_decision_number.js +0 -20
  47. package/dist/bollharness/src/scripts/checks/regenerate_magic_docs.js +0 -6
  48. package/dist/bollharness/src/scripts/ci/detect_rebaseline_triggers.js +0 -8
  49. package/dist/bollharness/src/scripts/ci/scan_subprocess_cfg.js +0 -8
  50. package/dist/bollharness/src/scripts/ci/scan_verify_artifacts.js +0 -8
  51. package/dist/bollharness/src/scripts/ci/scan_yaml_schema.js +0 -8
  52. package/dist/bollharness/src/scripts/context_router.js +0 -67
  53. package/dist/bollharness/src/scripts/deploy-guard.js +0 -157
  54. package/dist/bollharness/src/scripts/guard-feedback.js +0 -192
  55. package/dist/bollharness/src/scripts/guard_router.js +0 -158
  56. package/dist/bollharness/src/scripts/hooks/_hook_output.js +0 -6
  57. package/dist/bollharness/src/scripts/hooks/auto-python3.js +0 -6
  58. package/dist/bollharness/src/scripts/hooks/deploy-progress-on-session-end.js +0 -6
  59. package/dist/bollharness/src/scripts/hooks/failure-analyzer.js +0 -6
  60. package/dist/bollharness/src/scripts/hooks/gate-judgment-inject.js +0 -92
  61. package/dist/bollharness/src/scripts/hooks/gate-transition-judgment.js +0 -63
  62. package/dist/bollharness/src/scripts/hooks/inbox-ack.js +0 -6
  63. package/dist/bollharness/src/scripts/hooks/inbox-inject-on-start.js +0 -6
  64. package/dist/bollharness/src/scripts/hooks/inbox-validate.js +0 -6
  65. package/dist/bollharness/src/scripts/hooks/inbox-write-ledger.js +0 -6
  66. package/dist/bollharness/src/scripts/hooks/initializer-agent.js +0 -6
  67. package/dist/bollharness/src/scripts/hooks/loop-detection.js +0 -73
  68. package/dist/bollharness/src/scripts/hooks/owner-guard.js +0 -6
  69. package/dist/bollharness/src/scripts/hooks/precompact.js +0 -6
  70. package/dist/bollharness/src/scripts/hooks/review-agent-gatekeeper.js +0 -6
  71. package/dist/bollharness/src/scripts/hooks/risk-tracker.js +0 -108
  72. package/dist/bollharness/src/scripts/hooks/sanitize-on-read.js +0 -6
  73. package/dist/bollharness/src/scripts/hooks/session-reflection.js +0 -7
  74. package/dist/bollharness/src/scripts/hooks/session-start-magic-docs.js +0 -7
  75. package/dist/bollharness/src/scripts/hooks/session-start-reset-risk.js +0 -7
  76. package/dist/bollharness/src/scripts/hooks/session-start-toolkit-reminder.js +0 -7
  77. package/dist/bollharness/src/scripts/hooks/stop-evaluator.js +0 -157
  78. package/dist/bollharness/src/scripts/hooks/tool-call-counter.js +0 -6
  79. package/dist/bollharness/src/scripts/hooks/trace-analyzer.js +0 -10
  80. package/dist/bollharness/src/scripts/install/install-trust-token.js +0 -7
  81. package/dist/bollharness/src/scripts/install/multi_project_registry.js +0 -9
  82. package/dist/bollharness/src/scripts/install/phase2_auto.js +0 -21
  83. package/dist/bollharness/src/scripts/install/pre_commit_installer.js +0 -6
  84. package/dist/bollharness/src/scripts/install/tier_selector.js +0 -7
  85. package/dist/bollharness/src/scripts/install/transcript_miner.js +0 -7
  86. package/dist/bollharness/src/scripts/lib/claim_patterns.js +0 -10
  87. package/dist/bollharness/src/scripts/lib/sanitize_patterns.js +0 -12
  88. package/dist/bollharness/src/scripts/sanitize.js +0 -6
  89. package/dist/bollharness-integration/context-router-judgment.js.map +0 -1
  90. package/dist/bollharness-integration/context-router.js.map +0 -1
  91. package/dist/bollharness-integration/gate-state-machine.js.map +0 -1
  92. package/dist/bollharness-integration/gate-transition-hooks.js.map +0 -1
  93. package/dist/bollharness-integration/guard-checker.js.map +0 -1
  94. package/dist/bollharness-integration/index.js.map +0 -1
  95. package/dist/bollharness-integration/integration.js.map +0 -1
  96. package/dist/bollharness-integration/llm/pi-ai.d.ts +0 -60
  97. package/dist/bollharness-integration/pi-ecosystem-colony/index.d.ts +0 -153
  98. package/dist/bollharness-integration/pi-ecosystem-goals/index.d.ts +0 -136
  99. package/dist/bollharness-integration/pi-ecosystem-judgment/decision.d.ts +0 -117
  100. package/dist/bollharness-integration/pi-ecosystem-judgment/distillation.d.ts +0 -78
  101. package/dist/bollharness-integration/pi-ecosystem-judgment/index.d.ts +0 -139
  102. package/dist/bollharness-integration/pi-ecosystem-mcp/index.d.ts +0 -127
  103. package/dist/bollharness-integration/pi-ecosystem-subagents/index.d.ts +0 -95
  104. package/dist/bollharness-integration/skill-adapter.js.map +0 -1
  105. package/dist/constraint-runtime/src/_archive_helper.js +0 -9
  106. package/dist/constraint-runtime/src/agent/coordinator.js +0 -48
  107. package/dist/constraint-runtime/src/agent/index.js +0 -1
  108. package/dist/constraint-runtime/src/assistant/index.js +0 -12
  109. package/dist/constraint-runtime/src/bootstrap/index.js +0 -12
  110. package/dist/constraint-runtime/src/bootstrap_graph.js +0 -13
  111. package/dist/constraint-runtime/src/bridge/index.js +0 -12
  112. package/dist/constraint-runtime/src/buddy/index.js +0 -12
  113. package/dist/constraint-runtime/src/cli/index.js +0 -12
  114. package/dist/constraint-runtime/src/command_graph.js +0 -10
  115. package/dist/constraint-runtime/src/commands.js +0 -60
  116. package/dist/constraint-runtime/src/components/index.js +0 -12
  117. package/dist/constraint-runtime/src/constants/index.js +0 -12
  118. package/dist/constraint-runtime/src/constraint/budget.js +0 -22
  119. package/dist/constraint-runtime/src/constraint/budget.js.map +0 -1
  120. package/dist/constraint-runtime/src/constraint/index.js +0 -2
  121. package/dist/constraint-runtime/src/constraint/permission.js +0 -20
  122. package/dist/constraint-runtime/src/constraint/permission.js.map +0 -1
  123. package/dist/constraint-runtime/src/context.js +0 -30
  124. package/dist/constraint-runtime/src/coordinator/index.js +0 -12
  125. package/dist/constraint-runtime/src/cost_hook.js +0 -4
  126. package/dist/constraint-runtime/src/cost_tracker.js +0 -8
  127. package/dist/constraint-runtime/src/deferred_init.js +0 -10
  128. package/dist/constraint-runtime/src/direct_modes.js +0 -6
  129. package/dist/constraint-runtime/src/dynamic-tool-loader.js +0 -85
  130. package/dist/constraint-runtime/src/entrypoints/index.js +0 -12
  131. package/dist/constraint-runtime/src/execution_registry.js +0 -44
  132. package/dist/constraint-runtime/src/history.js +0 -9
  133. package/dist/constraint-runtime/src/hooks/index.js +0 -12
  134. package/dist/constraint-runtime/src/index.js +0 -26
  135. package/dist/constraint-runtime/src/ink.js +0 -4
  136. package/dist/constraint-runtime/src/keybindings/index.js +0 -12
  137. package/dist/constraint-runtime/src/memdir/index.js +0 -12
  138. package/dist/constraint-runtime/src/migrations/index.js +0 -12
  139. package/dist/constraint-runtime/src/models.js +0 -1
  140. package/dist/constraint-runtime/src/models.js.map +0 -1
  141. package/dist/constraint-runtime/src/moreright/index.js +0 -12
  142. package/dist/constraint-runtime/src/native_ts/index.js +0 -12
  143. package/dist/constraint-runtime/src/output_styles/index.js +0 -12
  144. package/dist/constraint-runtime/src/parity_audit.js +0 -12
  145. package/dist/constraint-runtime/src/plugins/index.js +0 -12
  146. package/dist/constraint-runtime/src/port_manifest.js +0 -11
  147. package/dist/constraint-runtime/src/prefetch.js +0 -9
  148. package/dist/constraint-runtime/src/query.js +0 -1
  149. package/dist/constraint-runtime/src/remote/index.js +0 -12
  150. package/dist/constraint-runtime/src/remote_runtime.js +0 -9
  151. package/dist/constraint-runtime/src/runtime/index.js +0 -1
  152. package/dist/constraint-runtime/src/runtime/session.js +0 -35
  153. package/dist/constraint-runtime/src/schemas/index.js +0 -12
  154. package/dist/constraint-runtime/src/screens/index.js +0 -12
  155. package/dist/constraint-runtime/src/server/index.js +0 -12
  156. package/dist/constraint-runtime/src/services/index.js +0 -12
  157. package/dist/constraint-runtime/src/session_store.js +0 -22
  158. package/dist/constraint-runtime/src/setup.js +0 -30
  159. package/dist/constraint-runtime/src/skills/index.js +0 -1
  160. package/dist/constraint-runtime/src/skills/skill-registry.js +0 -28
  161. package/dist/constraint-runtime/src/state/index.js +0 -12
  162. package/dist/constraint-runtime/src/system_init.js +0 -20
  163. package/dist/constraint-runtime/src/thinking/engine.js +0 -42
  164. package/dist/constraint-runtime/src/thinking/index.js +0 -1
  165. package/dist/constraint-runtime/src/tool_pool.js +0 -8
  166. package/dist/constraint-runtime/src/tools/OpenCLI/execAdapter.js +0 -7
  167. package/dist/constraint-runtime/src/tools/OpenCLI/listAdapters.js +0 -7
  168. package/dist/constraint-runtime/src/tools/OpenCLI/runCommand.js +0 -7
  169. package/dist/constraint-runtime/src/tools/PolymarketSDK/cancelOrder.js +0 -6
  170. package/dist/constraint-runtime/src/tools/PolymarketSDK/createOrder.js +0 -6
  171. package/dist/constraint-runtime/src/tools/PolymarketSDK/getMarket.js +0 -5
  172. package/dist/constraint-runtime/src/tools/PolymarketSDK/getOrders.js +0 -6
  173. package/dist/constraint-runtime/src/tools/PolymarketSDK/listMarkets.js +0 -4
  174. package/dist/constraint-runtime/src/tools/SafeSDK/confirmTransaction.js +0 -6
  175. package/dist/constraint-runtime/src/tools/SafeSDK/createTransaction.js +0 -8
  176. package/dist/constraint-runtime/src/tools/SafeSDK/deploySafe.js +0 -6
  177. package/dist/constraint-runtime/src/tools/SafeSDK/executeTransaction.js +0 -6
  178. package/dist/constraint-runtime/src/tools/SafeSDK/getBalance.js +0 -6
  179. package/dist/constraint-runtime/src/tools/SafeSDK/getPendingTransactions.js +0 -6
  180. package/dist/constraint-runtime/src/tools/SafeSDK/proposeTransaction.js +0 -6
  181. package/dist/constraint-runtime/src/tools/WalletTools/autoPay.js +0 -29
  182. package/dist/constraint-runtime/src/tools/WalletTools/createWallet.js +0 -10
  183. package/dist/constraint-runtime/src/tools/WalletTools/getBalance.js +0 -13
  184. package/dist/constraint-runtime/src/tools/WalletTools/importWallet.js +0 -22
  185. package/dist/constraint-runtime/src/tools/WalletTools/sendTransaction.js +0 -25
  186. package/dist/constraint-runtime/src/tools/WalletTools/signMessage.js +0 -10
  187. package/dist/constraint-runtime/src/tools/WalletTools/transferToken.js +0 -25
  188. package/dist/constraint-runtime/src/tools.js +0 -80
  189. package/dist/constraint-runtime/src/transcript.js +0 -19
  190. package/dist/constraint-runtime/src/types/index.js +0 -12
  191. package/dist/constraint-runtime/src/upstream_proxy/index.js +0 -12
  192. package/dist/constraint-runtime/src/utils/index.js +0 -12
  193. package/dist/constraint-runtime/src/vim/index.js +0 -12
  194. package/dist/constraint-runtime/src/voice/index.js +0 -12
  195. package/dist/constraints/index.js.map +0 -1
  196. package/dist/documents/reader.js.map +0 -1
  197. package/dist/llm/config-store.js.map +0 -1
  198. package/dist/llm/pi-ai.js.map +0 -1
  199. package/dist/network/agent-network.js.map +0 -1
  200. package/dist/network/iroh-integration.js.map +0 -1
  201. package/dist/network/iroh-transport.js.map +0 -1
  202. package/dist/network/p2p.js.map +0 -1
  203. package/dist/network/storage/adapters/json-adapter.js.map +0 -1
  204. package/dist/pi-ecosystem-colony/index.js.map +0 -1
  205. package/dist/pi-ecosystem-goals/index.js.map +0 -1
  206. package/dist/pi-ecosystem-judgment/decision.js.map +0 -1
  207. package/dist/pi-ecosystem-judgment/distillation.js.map +0 -1
  208. package/dist/pi-ecosystem-judgment/human-value-store.js.map +0 -1
  209. package/dist/pi-ecosystem-judgment/index.js.map +0 -1
  210. package/dist/pi-ecosystem-judgment/value-injection.js.map +0 -1
  211. package/dist/pi-ecosystem-mcp/index.js.map +0 -1
  212. package/dist/pi-ecosystem-subagents/index.js.map +0 -1
  213. package/dist/social/ant-colony/AdaptiveHeartbeat.js.map +0 -1
  214. package/dist/social/ant-colony/PheromoneEngine.js.map +0 -1
  215. package/dist/social/ant-colony/types.js.map +0 -1
  216. package/dist/social/channels/ChannelManager.js.map +0 -1
  217. package/dist/social/channels/DiapChannelBridge.js.map +0 -1
  218. package/dist/social/channels/InterestMatcher.js.map +0 -1
  219. package/dist/social/channels/types.js.map +0 -1
  220. package/dist/social/global-shared-context.js.map +0 -1
  221. package/dist/social/heartbeat.js.map +0 -1
  222. package/dist/web/components/p2p/P2PModal.js +0 -188
  223. package/dist/web/components/p2p/p2p-modal.js +0 -657
  224. package/dist/web/components/p2p/p2p-tools.js +0 -248
  225. package/lefthook.yml +0 -33
  226. package/scripts/auto-evolve-loop.ts +0 -481
  227. package/scripts/auto-evolve-oneshot.sh +0 -155
  228. package/scripts/auto-evolve-snapshot.sh +0 -136
  229. package/scripts/build-cli.js +0 -216
  230. package/scripts/build-web.ts +0 -116
  231. package/scripts/detect-schema-changes.sh +0 -48
  232. package/scripts/diff-reviewer.ts +0 -159
  233. package/scripts/postinstall.js +0 -153
  234. package/scripts/validate-system-prompt.ts +0 -142
  235. package/scripts/weekly-report.ts +0 -364
  236. package/src/agents/agent-manifest-protocol.ts +0 -117
  237. package/src/agents/constraint-layer.ts +0 -309
  238. package/src/agents/iroh-secret.ts +0 -32
  239. package/src/agents/p2p-chat-tools.ts +0 -383
  240. package/src/agents/p2p-document-tools.ts +0 -347
  241. package/src/agents/permission-mode.ts +0 -127
  242. package/src/agents/pi-sdk.ts +0 -2895
  243. package/src/agents/pre-tool-validator.ts +0 -213
  244. package/src/agents/protocol.ts +0 -398
  245. package/src/agents/shell-guard.ts +0 -417
  246. package/src/agents/shell-tool.ts +0 -103
  247. package/src/agents/skill-loader.ts +0 -202
  248. package/src/agents/subagent-manager.ts +0 -553
  249. package/src/agents/workflow-engine.ts +0 -332
  250. package/src/agents/workflow-pivot-loop.ts +0 -766
  251. package/src/bollharness/.sanitize-report.json +0 -13
  252. package/src/bollharness/CLAUDE.md +0 -73
  253. package/src/bollharness/LICENSE +0 -21
  254. package/src/bollharness/README.md +0 -143
  255. package/src/bollharness/README.zh-CN.md +0 -131
  256. package/src/bollharness/package.json +0 -20
  257. package/src/bollharness/reference/SOURCE-COMMIT.txt +0 -3
  258. package/src/bollharness/reference/boll-reference/scripts/hooks/.sanitize-report.json +0 -12
  259. package/src/bollharness/reference/boll-reference/scripts/hooks/find-boll-root.sh +0 -27
  260. package/src/bollharness/reference/boll-reference/scripts/hooks/precompact.sh +0 -57
  261. package/src/bollharness/reference/boll-reference/scripts/hooks/stop-evaluator.md +0 -57
  262. package/src/bollharness/schemas/metrics-jsonl-allowlist.json +0 -67
  263. package/src/bollharness/scripts/checks/next_decision_number.sh +0 -48
  264. package/src/bollharness/scripts/ci/count-components.sh +0 -65
  265. package/src/bollharness/scripts/context-fragments/artifact-linkage.md +0 -14
  266. package/src/bollharness/scripts/context-fragments/auth-consumers.md +0 -17
  267. package/src/bollharness/scripts/context-fragments/bridge-constitution.md +0 -13
  268. package/src/bollharness/scripts/context-fragments/catalyst-distributed.md +0 -18
  269. package/src/bollharness/scripts/context-fragments/closure-checklist.md +0 -13
  270. package/src/bollharness/scripts/context-fragments/contract-consumers.md +0 -15
  271. package/src/bollharness/scripts/context-fragments/db-shared-structures.md +0 -15
  272. package/src/bollharness/scripts/context-fragments/fixed-three-layers.md +0 -19
  273. package/src/bollharness/scripts/context-fragments/general-dev-principles.md +0 -11
  274. package/src/bollharness/scripts/context-fragments/issue-first.md +0 -8
  275. package/src/bollharness/scripts/context-fragments/mcp-parity.md +0 -16
  276. package/src/bollharness/scripts/context-fragments/pi-agent-operations.md +0 -108
  277. package/src/bollharness/scripts/context-fragments/protocol-consumers.md +0 -15
  278. package/src/bollharness/scripts/context-fragments/run-events-consumers.md +0 -15
  279. package/src/bollharness/scripts/context-fragments/scene-fidelity.md +0 -13
  280. package/src/bollharness/scripts/context-fragments/truth-source-hierarchy.md +0 -15
  281. package/src/bollharness/scripts/context-fragments/two-language.md +0 -15
  282. package/src/bollharness/scripts/context-fragments/version-sources.md +0 -14
  283. package/src/bollharness/scripts/hooks/find-project-root.sh +0 -47
  284. package/src/bollharness/scripts/hooks/inbox-poll.sh +0 -78
  285. package/src/bollharness/scripts/hooks/precompact.sh +0 -56
  286. package/src/bollharness/scripts/hooks/stop-evaluator.md +0 -83
  287. package/src/bollharness/scripts/sync-from-upstream.sh +0 -281
  288. package/src/bollharness/src/index.ts +0 -5
  289. package/src/bollharness/src/scripts/checks/check_adr_plan_numbering.ts +0 -11
  290. package/src/bollharness/src/scripts/checks/check_api_types.ts +0 -52
  291. package/src/bollharness/src/scripts/checks/check_artifact_link.ts +0 -156
  292. package/src/bollharness/src/scripts/checks/check_bridge_deps.ts +0 -11
  293. package/src/bollharness/src/scripts/checks/check_bugfix_binding.ts +0 -11
  294. package/src/bollharness/src/scripts/checks/check_bugfix_binding_ci.ts +0 -11
  295. package/src/bollharness/src/scripts/checks/check_doc_file_references.ts +0 -11
  296. package/src/bollharness/src/scripts/checks/check_doc_freshness.ts +0 -141
  297. package/src/bollharness/src/scripts/checks/check_doc_links.ts +0 -36
  298. package/src/bollharness/src/scripts/checks/check_file_existence_claims.ts +0 -11
  299. package/src/bollharness/src/scripts/checks/check_fragment_integrity.ts +0 -40
  300. package/src/bollharness/src/scripts/checks/check_hook_installed.ts +0 -70
  301. package/src/bollharness/src/scripts/checks/check_issue_closure.ts +0 -51
  302. package/src/bollharness/src/scripts/checks/check_mcp_parity.ts +0 -11
  303. package/src/bollharness/src/scripts/checks/check_security.ts +0 -54
  304. package/src/bollharness/src/scripts/checks/check_skill_parity.ts +0 -11
  305. package/src/bollharness/src/scripts/checks/check_versions.ts +0 -11
  306. package/src/bollharness/src/scripts/checks/finding.ts +0 -35
  307. package/src/bollharness/src/scripts/checks/next_decision_number.ts +0 -24
  308. package/src/bollharness/src/scripts/checks/regenerate_magic_docs.ts +0 -11
  309. package/src/bollharness/src/scripts/ci/detect_rebaseline_triggers.ts +0 -14
  310. package/src/bollharness/src/scripts/ci/scan_subprocess_cfg.ts +0 -14
  311. package/src/bollharness/src/scripts/ci/scan_verify_artifacts.ts +0 -14
  312. package/src/bollharness/src/scripts/ci/scan_yaml_schema.ts +0 -14
  313. package/src/bollharness/src/scripts/context_router.ts +0 -76
  314. package/src/bollharness/src/scripts/deploy-guard.ts +0 -182
  315. package/src/bollharness/src/scripts/guard-feedback.ts +0 -215
  316. package/src/bollharness/src/scripts/guard_router.ts +0 -194
  317. package/src/bollharness/src/scripts/hooks/_hook_output.js +0 -3
  318. package/src/bollharness/src/scripts/hooks/_hook_output.ts +0 -11
  319. package/src/bollharness/src/scripts/hooks/auto-python3.ts +0 -10
  320. package/src/bollharness/src/scripts/hooks/deploy-progress-on-session-end.ts +0 -10
  321. package/src/bollharness/src/scripts/hooks/failure-analyzer.ts +0 -10
  322. package/src/bollharness/src/scripts/hooks/gate-judgment-inject.ts +0 -111
  323. package/src/bollharness/src/scripts/hooks/gate-transition-judgment.ts +0 -74
  324. package/src/bollharness/src/scripts/hooks/inbox-ack.ts +0 -10
  325. package/src/bollharness/src/scripts/hooks/inbox-inject-on-start.ts +0 -10
  326. package/src/bollharness/src/scripts/hooks/inbox-validate.ts +0 -10
  327. package/src/bollharness/src/scripts/hooks/inbox-write-ledger.ts +0 -10
  328. package/src/bollharness/src/scripts/hooks/initializer-agent.ts +0 -10
  329. package/src/bollharness/src/scripts/hooks/loop-detection.ts +0 -83
  330. package/src/bollharness/src/scripts/hooks/owner-guard.ts +0 -10
  331. package/src/bollharness/src/scripts/hooks/precompact.ts +0 -10
  332. package/src/bollharness/src/scripts/hooks/review-agent-gatekeeper.ts +0 -10
  333. package/src/bollharness/src/scripts/hooks/risk-tracker.ts +0 -121
  334. package/src/bollharness/src/scripts/hooks/sanitize-on-read.ts +0 -10
  335. package/src/bollharness/src/scripts/hooks/session-reflection.ts +0 -12
  336. package/src/bollharness/src/scripts/hooks/session-start-magic-docs.ts +0 -12
  337. package/src/bollharness/src/scripts/hooks/session-start-reset-risk.ts +0 -12
  338. package/src/bollharness/src/scripts/hooks/session-start-toolkit-reminder.ts +0 -12
  339. package/src/bollharness/src/scripts/hooks/stop-evaluator.ts +0 -164
  340. package/src/bollharness/src/scripts/hooks/tool-call-counter.ts +0 -10
  341. package/src/bollharness/src/scripts/hooks/trace-analyzer.ts +0 -14
  342. package/src/bollharness/src/scripts/install/install-trust-token.ts +0 -13
  343. package/src/bollharness/src/scripts/install/multi_project_registry.ts +0 -13
  344. package/src/bollharness/src/scripts/install/phase2_auto.ts +0 -28
  345. package/src/bollharness/src/scripts/install/pre_commit_installer.ts +0 -10
  346. package/src/bollharness/src/scripts/install/tier_selector.ts +0 -10
  347. package/src/bollharness/src/scripts/install/transcript_miner.ts +0 -13
  348. package/src/bollharness/src/scripts/lib/claim_patterns.ts +0 -11
  349. package/src/bollharness/src/scripts/lib/sanitize_patterns.ts +0 -13
  350. package/src/bollharness/src/scripts/sanitize.ts +0 -9
  351. package/src/bollharness/templates/persona/default.json +0 -19
  352. package/src/bollharness/templates/scaffold/.gitignore.append +0 -16
  353. package/src/bollharness/templates/scaffold/CLAUDE.md +0 -89
  354. package/src/bollharness-integration/channel-judgment-engine.ts +0 -634
  355. package/src/bollharness-integration/context-chain-router.ts +0 -474
  356. package/src/bollharness-integration/context-router-judgment.ts +0 -339
  357. package/src/bollharness-integration/context-router.ts +0 -583
  358. package/src/bollharness-integration/gate-state-machine.ts +0 -444
  359. package/src/bollharness-integration/gate-transition-hooks.ts +0 -137
  360. package/src/bollharness-integration/guard-checker.ts +0 -451
  361. package/src/bollharness-integration/index.ts +0 -195
  362. package/src/bollharness-integration/integration.ts +0 -538
  363. package/src/bollharness-integration/judgment-prompts.yaml +0 -535
  364. package/src/bollharness-integration/llm-judgment-engine.ts +0 -712
  365. package/src/bollharness-integration/skill-adapter.ts +0 -646
  366. package/src/bootstrap/bootstrap.ts +0 -135
  367. package/src/bootstrap/context-collector.ts +0 -371
  368. package/src/bootstrap/context-hierarchy.ts +0 -283
  369. package/src/bootstrap/lifecycle-hooks.ts +0 -289
  370. package/src/bootstrap/project-context.ts +0 -171
  371. package/src/cli/interface.ts +0 -211
  372. package/src/cli-entry.ts +0 -304
  373. package/src/constraints/index.ts +0 -6
  374. package/src/context-compaction/auto-compact.ts +0 -153
  375. package/src/context-compaction/budget-gate.ts +0 -32
  376. package/src/context-compaction/budget-reduce.ts +0 -37
  377. package/src/context-compaction/context-collapse.ts +0 -72
  378. package/src/context-compaction/index.ts +0 -24
  379. package/src/context-compaction/microcompact.ts +0 -54
  380. package/src/context-compaction/pipeline.ts +0 -133
  381. package/src/context-compaction/snip.ts +0 -51
  382. package/src/context-compaction/token-estimator.ts +0 -36
  383. package/src/context-compaction/types.ts +0 -99
  384. package/src/documents/reader.ts +0 -85
  385. package/src/documents/store.ts +0 -252
  386. package/src/electron-preload.ts +0 -25
  387. package/src/electron.ts +0 -200
  388. package/src/heartbeat/DaemonManager.ts +0 -283
  389. package/src/heartbeat/HealthMonitor.ts +0 -317
  390. package/src/heartbeat/StartupVerifier.ts +0 -223
  391. package/src/heartbeat/Watchdog.ts +0 -208
  392. package/src/heartbeat/index.ts +0 -109
  393. package/src/heartbeat/self-improve-bus.ts +0 -110
  394. package/src/heartbeat/types.ts +0 -82
  395. package/src/index.ts +0 -1724
  396. package/src/llm/audio-config-store.ts +0 -246
  397. package/src/llm/config-store.ts +0 -400
  398. package/src/llm/llm-judgment-client.ts +0 -471
  399. package/src/llm/pi-ai.ts +0 -653
  400. package/src/llm/system-prompt/health.ts +0 -159
  401. package/src/llm/system-prompt/layers/channel/local.md +0 -14
  402. package/src/llm/system-prompt/layers/channel/p2p-agent.md +0 -18
  403. package/src/llm/system-prompt/layers/channel/p2p-visitor.md +0 -19
  404. package/src/llm/system-prompt/layers/core/artifacts_storage.md +0 -89
  405. package/src/llm/system-prompt/layers/core/evenhandedness.md +0 -21
  406. package/src/llm/system-prompt/layers/core/hibs_reminders.md +0 -15
  407. package/src/llm/system-prompt/layers/core/identity.md +0 -37
  408. package/src/llm/system-prompt/layers/core/knowledge.md +0 -17
  409. package/src/llm/system-prompt/layers/core/memory_system.md +0 -12
  410. package/src/llm/system-prompt/layers/core/network_filesystem.md +0 -28
  411. package/src/llm/system-prompt/layers/core/refusal.md +0 -37
  412. package/src/llm/system-prompt/layers/core/tone.md +0 -31
  413. package/src/llm/system-prompt/layers/core/tools.thin.md +0 -13
  414. package/src/llm/system-prompt/layers/core/wellbeing.md +0 -41
  415. package/src/llm/system-prompt/layers/role/architect.md +0 -20
  416. package/src/llm/system-prompt/layers/role/expert.md +0 -19
  417. package/src/llm/system-prompt/layers/role/implementer.md +0 -15
  418. package/src/llm/system-prompt/layers/role/security.md +0 -15
  419. package/src/llm/system-prompt/layers/tool/artifacts.md +0 -72
  420. package/src/llm/system-prompt/layers/tool/bash.md +0 -25
  421. package/src/llm/system-prompt/layers/tool/hibs_api.md +0 -171
  422. package/src/llm/system-prompt/layers/tool/image_search.md +0 -70
  423. package/src/llm/system-prompt/layers/tool/manifest.md +0 -89
  424. package/src/llm/system-prompt/layers/tool/mcp_apps.md +0 -53
  425. package/src/llm/system-prompt/layers/tool/web_search.md +0 -83
  426. package/src/llm/system-prompt/registry.ts +0 -325
  427. package/src/llm/system-prompt/strip-hibsml.ts +0 -52
  428. package/src/llm/tool-manifest/ask_user_input.ts +0 -37
  429. package/src/llm/tool-manifest/bash.ts +0 -25
  430. package/src/llm/tool-manifest/create_file.ts +0 -26
  431. package/src/llm/tool-manifest/fetch_sports_data.ts +0 -28
  432. package/src/llm/tool-manifest/image_search.ts +0 -26
  433. package/src/llm/tool-manifest/index.ts +0 -88
  434. package/src/llm/tool-manifest/mcp.ts +0 -46
  435. package/src/llm/tool-manifest/message_compose.ts +0 -33
  436. package/src/llm/tool-manifest/places.ts +0 -86
  437. package/src/llm/tool-manifest/present_files.ts +0 -23
  438. package/src/llm/tool-manifest/recipe.ts +0 -42
  439. package/src/llm/tool-manifest/recommend_apps.ts +0 -25
  440. package/src/llm/tool-manifest/str_replace.ts +0 -29
  441. package/src/llm/tool-manifest/types.ts +0 -52
  442. package/src/llm/tool-manifest/view.ts +0 -26
  443. package/src/llm/tool-manifest/weather.ts +0 -29
  444. package/src/llm/tool-manifest/web.ts +0 -54
  445. package/src/llm/video-config-store.ts +0 -257
  446. package/src/network/agent-network.ts +0 -800
  447. package/src/network/hybrid-messenger.ts +0 -199
  448. package/src/network/iroh-bootstrap.ts +0 -57
  449. package/src/network/iroh-discovery.ts +0 -208
  450. package/src/network/iroh-integration.ts +0 -158
  451. package/src/network/iroh-transport.ts +0 -637
  452. package/src/network/known-peers.ts +0 -102
  453. package/src/network/p2p-direct.ts +0 -262
  454. package/src/network/p2p-secret.ts +0 -153
  455. package/src/network/p2p.ts +0 -964
  456. package/src/network/source-intent-broadcaster.ts +0 -242
  457. package/src/network/source-intent.ts +0 -167
  458. package/src/network/storage/adapters/json-adapter.ts +0 -454
  459. package/src/network/storage/index.ts +0 -203
  460. package/src/network/storage/types.ts +0 -166
  461. package/src/security/builtin-guards.ts +0 -162
  462. package/src/security/context-router-tool.ts +0 -122
  463. package/src/security/input-scanner.ts +0 -287
  464. package/src/security/react-harness.ts +0 -177
  465. package/src/security/tool-gate.ts +0 -294
  466. package/src/social/ant-colony/index.js +0 -19
  467. package/src/social/channels/ChannelManager.ts +0 -485
  468. package/src/social/channels/DiapChannelBridge.ts +0 -501
  469. package/src/social/channels/InterestMatcher.ts +0 -189
  470. package/src/social/channels/agent-workflow-config.json +0 -214
  471. package/src/social/channels/agent-workflow-config.yaml +0 -334
  472. package/src/social/channels/channel-agent-session.ts +0 -407
  473. package/src/social/channels/channel-heartbeat-agent.ts +0 -622
  474. package/src/social/channels/diap-doc-parser.ts +0 -282
  475. package/src/social/channels/harness-workflow-integrator.ts +0 -594
  476. package/src/social/channels/index.ts +0 -22
  477. package/src/social/channels/types.ts +0 -115
  478. package/src/social/global-shared-context.ts +0 -506
  479. package/src/social/heartbeat.ts +0 -1057
  480. package/src/social/persona/enhanced-persona.ts +0 -359
  481. package/src/types.d.ts +0 -12
  482. package/src/utils/auto-evolve-policy.ts +0 -138
  483. package/src/utils/auto-update.ts +0 -482
  484. package/src/utils/clamp.ts +0 -5
  485. package/src/web/agent-delegate-server.ts +0 -148
  486. package/src/web/api-config.html +0 -520
  487. package/src/web/client.js +0 -2352
  488. package/src/web/client.ts +0 -4326
  489. package/src/web/components/p2p/P2PModal.tsx +0 -416
  490. package/src/web/components/p2p/index.ts +0 -566
  491. package/src/web/components/p2p/index.tsx +0 -297
  492. package/src/web/components/p2p/p2p-connection.ts +0 -338
  493. package/src/web/components/p2p/p2p-identity.ts +0 -92
  494. package/src/web/components/p2p/p2p-manager.ts +0 -147
  495. package/src/web/components/p2p/p2p-messages.ts +0 -219
  496. package/src/web/components/p2p/p2p-modal.ts +0 -685
  497. package/src/web/components/p2p/p2p-store-memory.ts +0 -162
  498. package/src/web/components/p2p/p2p-tools.ts +0 -315
  499. package/src/web/components/p2p/types.ts +0 -170
  500. package/src/web/components/wallet-viem.mjs +0 -118
  501. package/src/web/design.md +0 -99
  502. package/src/web/icons/apple-touch-icon.png +0 -0
  503. package/src/web/icons/favicon-16x16.png +0 -0
  504. package/src/web/icons/favicon-192x192.png +0 -0
  505. package/src/web/icons/favicon-32x32.png +0 -0
  506. package/src/web/icons/favicon-48x48.png +0 -0
  507. package/src/web/icons/favicon-512x512.png +0 -0
  508. package/src/web/icons/favicon.icns +0 -0
  509. package/src/web/icons/favicon.ico +0 -0
  510. package/src/web/icons/icon.png +0 -0
  511. package/src/web/icons/image.png +0 -0
  512. package/src/web/index.html +0 -373
  513. package/src/web/iroh-delegate-transport.ts +0 -139
  514. package/src/web/manifest.json +0 -21
  515. package/src/web/server.ts +0 -5731
  516. package/src/web/style.css +0 -4737
  517. package/src/web/ui/message-renderer.ts +0 -540
  518. package/src/web/ui/step-timeline.ts +0 -394
  519. package/staging/auto-evolve/clean-001/.review-verdict +0 -9
  520. package/staging/auto-evolve/clean-001/clean-001.patch +0 -14
  521. package/staging/auto-evolve/e2e-001/.patch-id +0 -1
  522. package/staging/auto-evolve/e2e-001/.review-verdict +0 -12
  523. package/staging/auto-evolve/e2e-001/e2e-001.patch +0 -11
  524. package/staging/auto-evolve/test-bad/.review-verdict +0 -12
  525. package/staging/auto-evolve/test-bad/test-bad.patch +0 -11
  526. package/test-results/.last-run.json +0 -6
  527. package/test-results/src-test-web-loop-status-b-5734c-atus-bar-/346/230/276/347/244/272-spinner-/344/270/215/346/230/276/347/244/272/345/276/252/347/216/257/350/256/241/346/225/260/error-context.md +0 -285
  528. package/tsconfig.cli.json +0 -16
  529. package/tsconfig.electron.json +0 -20
  530. package/tsconfig.json +0 -18
@@ -1,11 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { Finding } from "./finding";
4
-
5
- export function run(repoRoot: string, mode: string = "full"): Finding[] {
6
- const findings: Finding[] = [];
7
-
8
- if (mode !== "full" && mode !== "ci") return findings;
9
-
10
- return findings;
11
- }
@@ -1,141 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { execSync } from "child_process";
4
- import { Finding } from "./finding";
5
-
6
- function countRouteDecorators(repoRoot: string): number {
7
- const routesDir = path.join(repoRoot, "backend", "product", "routes");
8
- if (!fs.existsSync(routesDir)) return 0;
9
-
10
- let count = 0;
11
- try {
12
- const files = fs.readdirSync(routesDir).filter(f => f.endsWith(".py"));
13
- for (const file of files) {
14
- const content = fs.readFileSync(path.join(routesDir, file), "utf-8");
15
- const matches = content.match(/@router\.(get|post|put|patch|delete|websocket)\(/g);
16
- if (matches) count += matches.length;
17
- }
18
- } catch {}
19
- return count;
20
- }
21
-
22
- function countScenes(repoRoot: string): number {
23
- const scenesDir = path.join(repoRoot, "scenes");
24
- if (!fs.existsSync(scenesDir)) return 0;
25
- try {
26
- return fs.readdirSync(scenesDir).filter(f => {
27
- const fullPath = path.join(scenesDir, f);
28
- return fs.statSync(fullPath).isDirectory() && !f.startsWith(".");
29
- }).length;
30
- } catch {
31
- return 0;
32
- }
33
- }
34
-
35
- function countADRs(repoRoot: string): number {
36
- const decisions = path.join(repoRoot, "docs", "decisions");
37
- if (!fs.existsSync(decisions)) return 0;
38
- try {
39
- return fs.readdirSync(decisions).filter(f => f.startsWith("ADR-") && f.endsWith(".md")).length;
40
- } catch {
41
- return 0;
42
- }
43
- }
44
-
45
- function countPlans(repoRoot: string): number {
46
- const decisions = path.join(repoRoot, "docs", "decisions");
47
- if (!fs.existsSync(decisions)) return 0;
48
- try {
49
- return fs.readdirSync(decisions).filter(f => f.startsWith("PLAN-") && f.endsWith(".md")).length;
50
- } catch {
51
- return 0;
52
- }
53
- }
54
-
55
- function extractRoadmapNumbers(repoRoot: string): Record<string, string> {
56
- const roadmap = path.join(repoRoot, "docs", "ROADMAP.md");
57
- if (!fs.existsSync(roadmap)) return {};
58
-
59
- const content = fs.readFileSync(roadmap, "utf-8");
60
- const numbers: Record<string, string> = {};
61
- const regex = /\|\s*(\S[^|]+?)\s*\|\s*(\S[^|]+?)\s*\|/g;
62
- let match;
63
- while ((match = regex.exec(content)) !== null) {
64
- const key = match[1].trim();
65
- const val = match[2].trim();
66
- if (key !== "指标" && key !== "---") {
67
- numbers[key] = val;
68
- }
69
- }
70
- return numbers;
71
- }
72
-
73
- export function run(repoRoot: string, mode: string = "full"): Finding[] {
74
- const findings: Finding[] = [];
75
-
76
- const actualRoutes = countRouteDecorators(repoRoot);
77
- const routesDoc = path.join(repoRoot, ".boll", "rules", "backend-routes.md");
78
- const claudeMd = path.join(repoRoot, "Bolloon.md");
79
-
80
- if (fs.existsSync(routesDoc)) {
81
- const routesContent = fs.readFileSync(routesDoc, "utf-8");
82
- const routeClaims = routesContent.match(/-\s+`(?:GET|POST|PUT|PATCH|DELETE|WS)\s+/g) || [];
83
- const docRoutes = routeClaims.length;
84
- if (actualRoutes - docRoutes > 5) {
85
- findings.push({
86
- severity: "P1",
87
- message: `.boll/rules/backend-routes.md documents ${docRoutes} routes but code has ${actualRoutes} decorators (gap: ${actualRoutes - docRoutes})`,
88
- file: ".boll/rules/backend-routes.md",
89
- blocking: false,
90
- category: "doc_integrity",
91
- problem_class: "unknown",
92
- required_skills: [],
93
- required_reads: [],
94
- });
95
- }
96
- }
97
-
98
- const actualADRs = countADRs(repoRoot);
99
- const actualPlans = countPlans(repoRoot);
100
- const roadmapNums = extractRoadmapNumbers(repoRoot);
101
-
102
- if ("ADR" in roadmapNums) {
103
- const match = roadmapNums["ADR"].match(/\d+/);
104
- if (match) {
105
- const claimed = parseInt(match[0], 10);
106
- if (actualADRs - claimed > 2) {
107
- findings.push({
108
- severity: "P2",
109
- message: `ROADMAP claims ${claimed} ADRs but ${actualADRs} exist`,
110
- file: "docs/ROADMAP.md",
111
- blocking: false,
112
- category: "doc_integrity",
113
- problem_class: "unknown",
114
- required_skills: [],
115
- required_reads: [],
116
- });
117
- }
118
- }
119
- }
120
-
121
- if ("PLAN" in roadmapNums) {
122
- const match = roadmapNums["PLAN"].match(/\d+/);
123
- if (match) {
124
- const claimed = parseInt(match[0], 10);
125
- if (actualPlans - claimed > 3) {
126
- findings.push({
127
- severity: "P2",
128
- message: `ROADMAP claims ${claimed} PLANs but ${actualPlans} exist`,
129
- file: "docs/ROADMAP.md",
130
- blocking: false,
131
- category: "doc_integrity",
132
- problem_class: "unknown",
133
- required_skills: [],
134
- required_reads: [],
135
- });
136
- }
137
- }
138
- }
139
-
140
- return findings;
141
- }
@@ -1,36 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { Finding } from "./finding";
4
-
5
- export function run(repoRoot: string, mode: string = "full"): Finding[] {
6
- const findings: Finding[] = [];
7
-
8
- const docFiles = ["Bolloon.md", "docs/ROADMAP.md", "README.md"];
9
- const maxAgeDays = 7;
10
-
11
- for (const docFile of docFiles) {
12
- const fullPath = path.join(repoRoot, docFile);
13
- if (!fs.existsSync(fullPath)) continue;
14
-
15
- try {
16
- const stats = fs.statSync(fullPath);
17
- const ageMs = Date.now() - stats.mtimeMs;
18
- const ageDays = Math.floor(ageMs / (1000 * 60 * 60 * 24));
19
-
20
- if (ageDays > maxAgeDays) {
21
- findings.push({
22
- severity: "P2",
23
- message: `${docFile} has not been updated in ${ageDays} days (threshold: ${maxAgeDays})`,
24
- file: docFile,
25
- blocking: false,
26
- category: "doc_freshness",
27
- problem_class: "unknown",
28
- required_skills: [],
29
- required_reads: [],
30
- });
31
- }
32
- } catch {}
33
- }
34
-
35
- return findings;
36
- }
@@ -1,11 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { Finding } from "./finding";
4
-
5
- export function run(repoRoot: string, mode: string = "full"): Finding[] {
6
- const findings: Finding[] = [];
7
-
8
- if (mode !== "full" && mode !== "staged") return findings;
9
-
10
- return findings;
11
- }
@@ -1,40 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { Finding } from "./finding";
4
-
5
- export function run(repoRoot: string, mode: string = "full"): Finding[] {
6
- const findings: Finding[] = [];
7
-
8
- const fragmentDir = path.join(repoRoot, "scripts", "context-fragments");
9
- const routerFile = path.join(repoRoot, "src", "scripts", "context_router.ts");
10
-
11
- if (!fs.existsSync(routerFile)) {
12
- findings.push({
13
- severity: "P1",
14
- message: "context_router.ts not found",
15
- file: "src/scripts/context_router.ts",
16
- blocking: false,
17
- category: "governance_bootstrap",
18
- problem_class: "unknown",
19
- required_skills: [],
20
- required_reads: [],
21
- });
22
- return findings;
23
- }
24
-
25
- if (!fs.existsSync(fragmentDir)) {
26
- findings.push({
27
- severity: "P2",
28
- message: "context-fragments directory not found",
29
- file: "scripts/context-fragments/",
30
- blocking: false,
31
- category: "governance_bootstrap",
32
- problem_class: "unknown",
33
- required_skills: [],
34
- required_reads: [],
35
- });
36
- return findings;
37
- }
38
-
39
- return findings;
40
- }
@@ -1,70 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { Finding } from "./finding";
4
-
5
- export function run(repoRoot: string, mode: string = "full"): Finding[] {
6
- const findings: Finding[] = [];
7
-
8
- const hookFiles = [
9
- "src/scripts/hooks/loop-detection.ts",
10
- "src/scripts/hooks/risk-tracker.ts",
11
- "src/scripts/hooks/stop-evaluator.ts",
12
- "src/scripts/hooks/guard-feedback.ts",
13
- "src/scripts/hooks/deploy-guard.ts",
14
- ];
15
-
16
- const settingsFile = path.join(repoRoot, ".boll", "settings.json");
17
-
18
- if (!fs.existsSync(settingsFile)) {
19
- findings.push({
20
- severity: "P1",
21
- message: ".boll/settings.json does not exist",
22
- file: ".boll/settings.json",
23
- blocking: false,
24
- category: "general",
25
- problem_class: "unknown",
26
- required_skills: [],
27
- required_reads: [],
28
- });
29
- return findings;
30
- }
31
-
32
- try {
33
- const settings = JSON.parse(fs.readFileSync(settingsFile, "utf-8"));
34
- const registeredHooks = settings.hooks || {};
35
-
36
- for (const [stage, hooks] of Object.entries(registeredHooks)) {
37
- const hookList = hooks as Array<{ hooks?: Array<{ command?: string }> }>;
38
- for (const hookGroup of hookList) {
39
- for (const hook of hookGroup.hooks || []) {
40
- const cmd = hook.command || "";
41
- if (cmd.includes("python3") && cmd.includes(".py")) {
42
- findings.push({
43
- severity: "P1",
44
- message: `Hook in ${stage} still references Python script: ${cmd}`,
45
- file: ".boll/settings.json",
46
- blocking: false,
47
- category: "governance_bootstrap",
48
- problem_class: "unknown",
49
- required_skills: [],
50
- required_reads: [],
51
- });
52
- }
53
- }
54
- }
55
- }
56
- } catch (exc) {
57
- findings.push({
58
- severity: "P1",
59
- message: `Failed to parse settings.json: ${exc}`,
60
- file: ".boll/settings.json",
61
- blocking: false,
62
- category: "governance_bootstrap",
63
- problem_class: "unknown",
64
- required_skills: [],
65
- required_reads: [],
66
- });
67
- }
68
-
69
- return findings;
70
- }
@@ -1,51 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { Finding } from "./finding";
4
-
5
- export function run(repoRoot: string, mode: string = "full"): Finding[] {
6
- const findings: Finding[] = [];
7
-
8
- const docsIssuesDir = path.join(repoRoot, "docs", "issues");
9
-
10
- if (!fs.existsSync(docsIssuesDir)) {
11
- return findings;
12
- }
13
-
14
- const issueFiles = fs.readdirSync(docsIssuesDir).filter(f => f.endsWith(".md"));
15
-
16
- for (const issueFile of issueFiles) {
17
- const issuePath = path.join(docsIssuesDir, issueFile);
18
- const content = fs.readFileSync(issuePath, "utf-8");
19
-
20
- const hasStatus = /^(status|State):\s*/im.test(content);
21
- const hasResolution = /^(resolution|Closed):\s*/im.test(content);
22
-
23
- if (!hasStatus) {
24
- findings.push({
25
- severity: "P2",
26
- message: `Issue ${issueFile} missing status field`,
27
- file: `docs/issues/${issueFile}`,
28
- blocking: false,
29
- category: "doc_integrity",
30
- problem_class: "unknown",
31
- required_skills: [],
32
- required_reads: [],
33
- });
34
- }
35
-
36
- if (!hasResolution) {
37
- findings.push({
38
- severity: "P2",
39
- message: `Issue ${issueFile} missing resolution/closed field`,
40
- file: `docs/issues/${issueFile}`,
41
- blocking: false,
42
- category: "doc_integrity",
43
- problem_class: "unknown",
44
- required_skills: [],
45
- required_reads: [],
46
- });
47
- }
48
- }
49
-
50
- return findings;
51
- }
@@ -1,11 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { Finding } from "./finding";
4
-
5
- export function run(repoRoot: string, mode: string = "full"): Finding[] {
6
- const findings: Finding[] = [];
7
-
8
- if (mode !== "full" && mode !== "ci") return findings;
9
-
10
- return findings;
11
- }
@@ -1,54 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { Finding } from "./finding";
4
-
5
- const SENSITIVE_PATTERNS = [
6
- { pattern: /api[_-]?key["\s:=]+["'][a-zA-Z0-9]{20,}["']/gi, severity: "P0" as const },
7
- { pattern: /password["\s:=]+["'][^"']{8,}["']/gi, severity: "P0" as const },
8
- { pattern: /secret["\s:=]+["'][a-zA-Z0-9]{16,}["']/gi, severity: "P0" as const },
9
- { pattern: /token["\s:=]+["'][a-zA-Z0-9]{20,}["']/gi, severity: "P1" as const },
10
- { pattern: /bearer\s+[a-zA-Z0-9]{20,}/gi, severity: "P1" as const },
11
- ];
12
-
13
- export function run(repoRoot: string, mode: string = "full"): Finding[] {
14
- const findings: Finding[] = [];
15
-
16
- if (mode !== "full" && mode !== "ci") return findings;
17
-
18
- const extensions = [".ts", ".tsx", ".js", ".jsx", ".py", ".json", ".yaml", ".yml"];
19
-
20
- function scanDir(dir: string): void {
21
- if (!fs.existsSync(dir)) return;
22
-
23
- const entries = fs.readdirSync(dir, { withFileTypes: true });
24
- for (const entry of entries) {
25
- const fullPath = path.join(dir, entry.name);
26
- if (entry.isDirectory()) {
27
- if (!entry.name.startsWith(".") && entry.name !== "node_modules") {
28
- scanDir(fullPath);
29
- }
30
- } else if (extensions.includes(path.extname(entry.name))) {
31
- const content = fs.readFileSync(fullPath, "utf-8");
32
- for (const { pattern, severity } of SENSITIVE_PATTERNS) {
33
- const matches = content.match(pattern);
34
- if (matches) {
35
- findings.push({
36
- severity,
37
- message: `Potential secret detected: ${matches[0].slice(0, 30)}...`,
38
- file: path.relative(repoRoot, fullPath),
39
- blocking: severity === "P0",
40
- category: "security",
41
- problem_class: "secret_exposure",
42
- required_skills: [],
43
- required_reads: [],
44
- });
45
- }
46
- }
47
- }
48
- }
49
- }
50
-
51
- scanDir(repoRoot);
52
-
53
- return findings;
54
- }
@@ -1,11 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { Finding } from "./finding";
4
-
5
- export function run(repoRoot: string, mode: string = "full"): Finding[] {
6
- const findings: Finding[] = [];
7
-
8
- if (mode !== "full" && mode !== "ci") return findings;
9
-
10
- return findings;
11
- }
@@ -1,11 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { Finding } from "./finding";
4
-
5
- export function run(repoRoot: string, mode: string = "full"): Finding[] {
6
- const findings: Finding[] = [];
7
-
8
- if (mode !== "full" && mode !== "ci") return findings;
9
-
10
- return findings;
11
- }
@@ -1,35 +0,0 @@
1
- export interface Finding {
2
- severity: "P0" | "P1" | "P2";
3
- message: string;
4
- file: string;
5
- line?: number;
6
- blocking: boolean;
7
- category: string;
8
- problem_class: string;
9
- required_skills: string[];
10
- required_reads: string[];
11
- }
12
-
13
- export function createFinding(params: {
14
- severity: "P0" | "P1" | "P2";
15
- message: string;
16
- file: string;
17
- line?: number;
18
- blocking?: boolean;
19
- category?: string;
20
- problem_class?: string;
21
- required_skills?: string[];
22
- required_reads?: string[];
23
- }): Finding {
24
- return {
25
- severity: params.severity,
26
- message: params.message,
27
- file: params.file,
28
- line: params.line,
29
- blocking: params.blocking ?? false,
30
- category: params.category ?? "general",
31
- problem_class: params.problem_class ?? "unknown",
32
- required_skills: params.required_skills ?? [],
33
- required_reads: params.required_reads ?? [],
34
- };
35
- }
@@ -1,24 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { execSync } from "child_process";
4
-
5
- const REPO_ROOT = process.cwd();
6
-
7
- export function main(): void {
8
- const args = process.argv.slice(2);
9
- if (args[0] === "next") {
10
- try {
11
- const result = execSync("git log --oneline -1", { cwd: REPO_ROOT, encoding: "utf-8" });
12
- const match = result.match(/ADR-(\d+)/);
13
- if (match) {
14
- const nextNum = parseInt(match[1], 10) + 1;
15
- console.log(`ADR-${nextNum}`);
16
- }
17
- } catch {}
18
- }
19
- process.exit(0);
20
- }
21
-
22
- if (require.main === module) {
23
- main();
24
- }
@@ -1,11 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { Finding } from "./finding";
4
-
5
- export function run(repoRoot: string, mode: string = "full"): Finding[] {
6
- const findings: Finding[] = [];
7
-
8
- if (mode !== "full" && mode !== "ci") return findings;
9
-
10
- return findings;
11
- }
@@ -1,14 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { execSync } from "child_process";
4
-
5
- const REPO_ROOT = process.cwd();
6
-
7
- export function main(): void {
8
- console.log("Detecting rebase triggers...");
9
- process.exit(0);
10
- }
11
-
12
- if (require.main === module) {
13
- main();
14
- }
@@ -1,14 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { execSync } from "child_process";
4
-
5
- const REPO_ROOT = process.cwd();
6
-
7
- export function main(): void {
8
- console.log("Scanning subprocess configurations...");
9
- process.exit(0);
10
- }
11
-
12
- if (require.main === module) {
13
- main();
14
- }
@@ -1,14 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { execSync } from "child_process";
4
-
5
- const REPO_ROOT = process.cwd();
6
-
7
- export function main(): void {
8
- console.log("Scanning for artifact verification...");
9
- process.exit(0);
10
- }
11
-
12
- if (require.main === module) {
13
- main();
14
- }
@@ -1,14 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { execSync } from "child_process";
4
-
5
- const REPO_ROOT = process.cwd();
6
-
7
- export function main(): void {
8
- console.log("Scanning YAML schemas...");
9
- process.exit(0);
10
- }
11
-
12
- if (require.main === module) {
13
- main();
14
- }
@@ -1,76 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import * as os from "os";
4
-
5
- export const FRAGMENTS_DIR = path.join(__dirname, "..", "context-fragments");
6
-
7
- export const CONTEXT_MAP: Record<string, string[]> = {
8
- "bridge_agent/": ["bridge-constitution"],
9
- "backend/product/bridge/": ["bridge-constitution"],
10
- "mcp-server/": ["mcp-parity"],
11
- "mcp-server-node/": ["mcp-parity"],
12
- "backend/product/routes/protocol.py": ["protocol-consumers", "contract-consumers"],
13
- "backend/product/protocol/": ["protocol-consumers"],
14
- "backend/product/routes/": ["contract-consumers"],
15
- "backend/product/db/crud_events.py": ["run-events-consumers"],
16
- "backend/product/auth/": ["auth-consumers"],
17
- "backend/product/db/": ["db-shared-structures"],
18
- "backend/product/catalyst/": ["catalyst-distributed"],
19
- "docs/issues/": ["fixed-three-layers", "closure-checklist"],
20
- "scenes/": ["scene-fidelity", "two-language"],
21
- "website/app/[scene]/": ["scene-fidelity", "two-language"],
22
- "website/components/scene/": ["scene-fidelity", "two-language"],
23
- "Bolloon.md": ["truth-source-hierarchy"],
24
- "MEMORY.md": ["truth-source-hierarchy"],
25
- "docs/INDEX.md": ["truth-source-hierarchy"],
26
- "mcp-server/pyproject.toml": ["version-sources"],
27
- "mcp-server-node/package.json": ["version-sources"],
28
- "website/": ["two-language"],
29
- "docs/decisions/": ["artifact-linkage"],
30
- "backend/product/": ["issue-first"],
31
- "backend/server.py": ["issue-first"],
32
- "mcp-server/boll_mcp/": ["issue-first"],
33
- "mcp-server-node/src/": ["issue-first"],
34
- "website/app/": ["issue-first"],
35
- };
36
-
37
- export const FALLBACK_FRAGMENTS = ["general-dev-principles"];
38
-
39
- export function match(filePath: string): string[] {
40
- if (!filePath) return [];
41
- if (path.isAbsolute(filePath)) return [];
42
-
43
- const normalized = path.normalize(filePath).replace(/\\/g, "/");
44
- if (normalized.startsWith("../") || normalized === ".." || normalized.includes("/../")) {
45
- return [];
46
- }
47
-
48
- const matched: string[] = [];
49
- const sortedPatterns = Object.keys(CONTEXT_MAP).sort((a, b) => b.length - a.length);
50
-
51
- for (const pattern of sortedPatterns) {
52
- if (normalized.startsWith(pattern) || normalized.endsWith(pattern)) {
53
- matched.push(...CONTEXT_MAP[pattern]);
54
- }
55
- }
56
-
57
- return [...new Set(matched)];
58
- }
59
-
60
- export function loadFragment(name: string): string {
61
- if (!name) return "";
62
-
63
- const candidate = path.join(FRAGMENTS_DIR, `${name}.md`);
64
- try {
65
- const resolved = path.resolve(candidate);
66
- const fragmentsDirResolved = path.resolve(FRAGMENTS_DIR);
67
-
68
- if (!resolved.startsWith(fragmentsDirResolved)) return "";
69
-
70
- if (fs.existsSync(resolved) && fs.statSync(resolved).isFile()) {
71
- return fs.readFileSync(resolved, "utf-8").trim();
72
- }
73
- } catch {}
74
-
75
- return "";
76
- }