claude-flow 3.25.6 → 3.26.1

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 (309) hide show
  1. package/.claude/helpers/hook-handler.cjs +129 -0
  2. package/.claude/helpers/intelligence.cjs +10 -0
  3. package/.claude/helpers/statusline.cjs +310 -123
  4. package/.claude/proven-config.json +1 -1
  5. package/.claude/security-scans/scan-all-standard.json +321 -0
  6. package/.claude/security-scans/scan-code-deep.json +1209 -0
  7. package/.claude/security-scans/scan-deps-full.json +14 -0
  8. package/package.json +3 -1
  9. package/v3/@claude-flow/cli/catalog-manifest.json +12 -0
  10. package/v3/@claude-flow/cli/dist/src/commands/advisor.d.ts +15 -0
  11. package/v3/@claude-flow/cli/dist/src/commands/advisor.js +94 -0
  12. package/v3/@claude-flow/cli/dist/src/commands/doctor.js +77 -3
  13. package/v3/@claude-flow/cli/dist/src/commands/funnel.d.ts +13 -0
  14. package/v3/@claude-flow/cli/dist/src/commands/funnel.js +103 -0
  15. package/v3/@claude-flow/cli/dist/src/commands/hooks.js +112 -46
  16. package/v3/@claude-flow/cli/dist/src/commands/index.js +10 -0
  17. package/v3/@claude-flow/cli/dist/src/commands/init.js +44 -0
  18. package/v3/@claude-flow/cli/dist/src/commands/proxy.d.ts +21 -0
  19. package/v3/@claude-flow/cli/dist/src/commands/proxy.js +310 -0
  20. package/v3/@claude-flow/cli/dist/src/commands/security.js +29 -0
  21. package/v3/@claude-flow/cli/dist/src/commands/settings.d.ts +19 -0
  22. package/v3/@claude-flow/cli/dist/src/commands/settings.js +180 -0
  23. package/v3/@claude-flow/cli/dist/src/commands/version.d.ts +42 -0
  24. package/v3/@claude-flow/cli/dist/src/commands/version.js +106 -0
  25. package/v3/@claude-flow/cli/dist/src/funnel/advisor-tip.d.ts +58 -0
  26. package/v3/@claude-flow/cli/dist/src/funnel/advisor-tip.js +92 -0
  27. package/v3/@claude-flow/cli/dist/src/funnel/attribution.d.ts +37 -0
  28. package/v3/@claude-flow/cli/dist/src/funnel/attribution.js +101 -0
  29. package/v3/@claude-flow/cli/dist/src/funnel/consent.d.ts +22 -0
  30. package/v3/@claude-flow/cli/dist/src/funnel/consent.js +55 -0
  31. package/v3/@claude-flow/cli/dist/src/funnel/credit-errors.d.ts +31 -0
  32. package/v3/@claude-flow/cli/dist/src/funnel/credit-errors.js +88 -0
  33. package/v3/@claude-flow/cli/dist/src/funnel/credit-notifier.d.ts +44 -0
  34. package/v3/@claude-flow/cli/dist/src/funnel/credit-notifier.js +74 -0
  35. package/v3/@claude-flow/cli/dist/src/funnel/disclosure.d.ts +46 -0
  36. package/v3/@claude-flow/cli/dist/src/funnel/disclosure.js +97 -0
  37. package/v3/@claude-flow/cli/dist/src/funnel/enrollment.d.ts +36 -0
  38. package/v3/@claude-flow/cli/dist/src/funnel/enrollment.js +64 -0
  39. package/v3/@claude-flow/cli/dist/src/funnel/environment.d.ts +17 -0
  40. package/v3/@claude-flow/cli/dist/src/funnel/environment.js +39 -0
  41. package/v3/@claude-flow/cli/dist/src/funnel/event-transport.d.ts +51 -0
  42. package/v3/@claude-flow/cli/dist/src/funnel/event-transport.js +199 -0
  43. package/v3/@claude-flow/cli/dist/src/funnel/events.d.ts +42 -0
  44. package/v3/@claude-flow/cli/dist/src/funnel/events.js +150 -0
  45. package/v3/@claude-flow/cli/dist/src/funnel/index.d.ts +20 -0
  46. package/v3/@claude-flow/cli/dist/src/funnel/index.js +20 -0
  47. package/v3/@claude-flow/cli/dist/src/funnel/insights.d.ts +49 -0
  48. package/v3/@claude-flow/cli/dist/src/funnel/insights.js +120 -0
  49. package/v3/@claude-flow/cli/dist/src/funnel/local-signals.d.ts +15 -0
  50. package/v3/@claude-flow/cli/dist/src/funnel/local-signals.js +68 -0
  51. package/v3/@claude-flow/cli/dist/src/funnel/message-transport.d.ts +51 -0
  52. package/v3/@claude-flow/cli/dist/src/funnel/message-transport.js +149 -0
  53. package/v3/@claude-flow/cli/dist/src/funnel/messages.d.ts +55 -0
  54. package/v3/@claude-flow/cli/dist/src/funnel/messages.js +160 -0
  55. package/v3/@claude-flow/cli/dist/src/funnel/power-saver-notifier.d.ts +44 -0
  56. package/v3/@claude-flow/cli/dist/src/funnel/power-saver-notifier.js +92 -0
  57. package/v3/@claude-flow/cli/dist/src/funnel/precedence.d.ts +16 -0
  58. package/v3/@claude-flow/cli/dist/src/funnel/precedence.js +85 -0
  59. package/v3/@claude-flow/cli/dist/src/funnel/promo.d.ts +41 -0
  60. package/v3/@claude-flow/cli/dist/src/funnel/promo.js +144 -0
  61. package/v3/@claude-flow/cli/dist/src/funnel/rate-limit-notifier.d.ts +55 -0
  62. package/v3/@claude-flow/cli/dist/src/funnel/rate-limit-notifier.js +102 -0
  63. package/v3/@claude-flow/cli/dist/src/funnel/rotation.d.ts +19 -0
  64. package/v3/@claude-flow/cli/dist/src/funnel/rotation.js +70 -0
  65. package/v3/@claude-flow/cli/dist/src/funnel/state.d.ts +13 -0
  66. package/v3/@claude-flow/cli/dist/src/funnel/state.js +52 -0
  67. package/v3/@claude-flow/cli/dist/src/funnel/toggle-cooldown.d.ts +17 -0
  68. package/v3/@claude-flow/cli/dist/src/funnel/toggle-cooldown.js +32 -0
  69. package/v3/@claude-flow/cli/dist/src/funnel/types.d.ts +86 -0
  70. package/v3/@claude-flow/cli/dist/src/funnel/types.js +26 -0
  71. package/v3/@claude-flow/cli/dist/src/init/executor.js +9 -3
  72. package/v3/@claude-flow/cli/dist/src/init/helper-refresh.d.ts +33 -2
  73. package/v3/@claude-flow/cli/dist/src/init/helper-refresh.js +102 -12
  74. package/v3/@claude-flow/cli/dist/src/init/helpers-generator.js +52 -0
  75. package/v3/@claude-flow/cli/dist/src/init/statusline-generator.js +292 -116
  76. package/v3/@claude-flow/cli/dist/src/services/daemon-autostart.js +28 -5
  77. package/v3/@claude-flow/cli/dist/src/services/fable-harness.d.ts +39 -0
  78. package/v3/@claude-flow/cli/dist/src/services/fable-harness.js +41 -0
  79. package/v3/@claude-flow/cli/package.json +13 -4
  80. package/.claude/coordinator/config.json +0 -24
  81. package/.claude/coordinator/state.json +0 -37
  82. package/.claude/coordinator/tick-log/tick-01.json +0 -17
  83. package/.claude/coordinator/tick-log/tick-02.json +0 -17
  84. package/.claude/coordinator/tick-log/tick-03.json +0 -17
  85. package/.claude/coordinator/tick-log/tick-04.json +0 -14
  86. package/.claude/coordinator/tick-log/tick-05.json +0 -16
  87. package/.claude/settings.local.json +0 -11
  88. package/v3/@claude-flow/cli/dist/src/ruvector/lattice-wasm.d.ts +0 -14
  89. package/v3/@claude-flow/cli/dist/src/ruvector/lattice-wasm.js +0 -144
  90. package/v3/@claude-flow/guidance/dist/adversarial.d.ts +0 -284
  91. package/v3/@claude-flow/guidance/dist/adversarial.js +0 -572
  92. package/v3/@claude-flow/guidance/dist/analyzer.d.ts +0 -530
  93. package/v3/@claude-flow/guidance/dist/analyzer.js +0 -2587
  94. package/v3/@claude-flow/guidance/dist/artifacts.d.ts +0 -283
  95. package/v3/@claude-flow/guidance/dist/artifacts.js +0 -356
  96. package/v3/@claude-flow/guidance/dist/authority.d.ts +0 -290
  97. package/v3/@claude-flow/guidance/dist/authority.js +0 -558
  98. package/v3/@claude-flow/guidance/dist/capabilities.d.ts +0 -209
  99. package/v3/@claude-flow/guidance/dist/capabilities.js +0 -485
  100. package/v3/@claude-flow/guidance/dist/coherence.d.ts +0 -233
  101. package/v3/@claude-flow/guidance/dist/coherence.js +0 -372
  102. package/v3/@claude-flow/guidance/dist/compiler.d.ts +0 -87
  103. package/v3/@claude-flow/guidance/dist/compiler.js +0 -410
  104. package/v3/@claude-flow/guidance/dist/conformance-kit.d.ts +0 -225
  105. package/v3/@claude-flow/guidance/dist/conformance-kit.js +0 -629
  106. package/v3/@claude-flow/guidance/dist/continue-gate.d.ts +0 -214
  107. package/v3/@claude-flow/guidance/dist/continue-gate.js +0 -353
  108. package/v3/@claude-flow/guidance/dist/crypto-utils.d.ts +0 -17
  109. package/v3/@claude-flow/guidance/dist/crypto-utils.js +0 -24
  110. package/v3/@claude-flow/guidance/dist/evolution.d.ts +0 -282
  111. package/v3/@claude-flow/guidance/dist/evolution.js +0 -500
  112. package/v3/@claude-flow/guidance/dist/gates.d.ts +0 -79
  113. package/v3/@claude-flow/guidance/dist/gates.js +0 -302
  114. package/v3/@claude-flow/guidance/dist/gateway.d.ts +0 -206
  115. package/v3/@claude-flow/guidance/dist/gateway.js +0 -452
  116. package/v3/@claude-flow/guidance/dist/generators.d.ts +0 -153
  117. package/v3/@claude-flow/guidance/dist/generators.js +0 -682
  118. package/v3/@claude-flow/guidance/dist/headless.d.ts +0 -177
  119. package/v3/@claude-flow/guidance/dist/headless.js +0 -342
  120. package/v3/@claude-flow/guidance/dist/hooks.d.ts +0 -109
  121. package/v3/@claude-flow/guidance/dist/hooks.js +0 -347
  122. package/v3/@claude-flow/guidance/dist/index.d.ts +0 -205
  123. package/v3/@claude-flow/guidance/dist/index.js +0 -321
  124. package/v3/@claude-flow/guidance/dist/ledger.d.ts +0 -162
  125. package/v3/@claude-flow/guidance/dist/ledger.js +0 -375
  126. package/v3/@claude-flow/guidance/dist/manifest-validator.d.ts +0 -289
  127. package/v3/@claude-flow/guidance/dist/manifest-validator.js +0 -838
  128. package/v3/@claude-flow/guidance/dist/memory-gate.d.ts +0 -222
  129. package/v3/@claude-flow/guidance/dist/memory-gate.js +0 -382
  130. package/v3/@claude-flow/guidance/dist/meta-governance.d.ts +0 -265
  131. package/v3/@claude-flow/guidance/dist/meta-governance.js +0 -348
  132. package/v3/@claude-flow/guidance/dist/optimizer.d.ts +0 -104
  133. package/v3/@claude-flow/guidance/dist/optimizer.js +0 -329
  134. package/v3/@claude-flow/guidance/dist/persistence.d.ts +0 -189
  135. package/v3/@claude-flow/guidance/dist/persistence.js +0 -464
  136. package/v3/@claude-flow/guidance/dist/proof.d.ts +0 -185
  137. package/v3/@claude-flow/guidance/dist/proof.js +0 -238
  138. package/v3/@claude-flow/guidance/dist/retriever.d.ts +0 -172
  139. package/v3/@claude-flow/guidance/dist/retriever.js +0 -596
  140. package/v3/@claude-flow/guidance/dist/ruvbot-integration.d.ts +0 -370
  141. package/v3/@claude-flow/guidance/dist/ruvbot-integration.js +0 -738
  142. package/v3/@claude-flow/guidance/dist/temporal.d.ts +0 -426
  143. package/v3/@claude-flow/guidance/dist/temporal.js +0 -658
  144. package/v3/@claude-flow/guidance/dist/trust.d.ts +0 -283
  145. package/v3/@claude-flow/guidance/dist/trust.js +0 -473
  146. package/v3/@claude-flow/guidance/dist/truth-anchors.d.ts +0 -276
  147. package/v3/@claude-flow/guidance/dist/truth-anchors.js +0 -488
  148. package/v3/@claude-flow/guidance/dist/types.d.ts +0 -378
  149. package/v3/@claude-flow/guidance/dist/types.js +0 -10
  150. package/v3/@claude-flow/guidance/dist/uncertainty.d.ts +0 -372
  151. package/v3/@claude-flow/guidance/dist/uncertainty.js +0 -619
  152. package/v3/@claude-flow/guidance/dist/wasm-kernel.d.ts +0 -48
  153. package/v3/@claude-flow/guidance/dist/wasm-kernel.js +0 -158
  154. package/v3/@claude-flow/shared/dist/core/config/defaults.d.ts +0 -41
  155. package/v3/@claude-flow/shared/dist/core/config/defaults.js +0 -186
  156. package/v3/@claude-flow/shared/dist/core/config/index.d.ts +0 -8
  157. package/v3/@claude-flow/shared/dist/core/config/index.js +0 -12
  158. package/v3/@claude-flow/shared/dist/core/config/loader.d.ts +0 -45
  159. package/v3/@claude-flow/shared/dist/core/config/loader.js +0 -238
  160. package/v3/@claude-flow/shared/dist/core/config/schema.d.ts +0 -1728
  161. package/v3/@claude-flow/shared/dist/core/config/schema.js +0 -160
  162. package/v3/@claude-flow/shared/dist/core/config/validator.d.ts +0 -92
  163. package/v3/@claude-flow/shared/dist/core/config/validator.js +0 -147
  164. package/v3/@claude-flow/shared/dist/core/event-bus.d.ts +0 -31
  165. package/v3/@claude-flow/shared/dist/core/event-bus.js +0 -197
  166. package/v3/@claude-flow/shared/dist/core/index.d.ts +0 -15
  167. package/v3/@claude-flow/shared/dist/core/index.js +0 -19
  168. package/v3/@claude-flow/shared/dist/core/interfaces/agent.interface.d.ts +0 -200
  169. package/v3/@claude-flow/shared/dist/core/interfaces/agent.interface.js +0 -6
  170. package/v3/@claude-flow/shared/dist/core/interfaces/coordinator.interface.d.ts +0 -310
  171. package/v3/@claude-flow/shared/dist/core/interfaces/coordinator.interface.js +0 -7
  172. package/v3/@claude-flow/shared/dist/core/interfaces/event.interface.d.ts +0 -224
  173. package/v3/@claude-flow/shared/dist/core/interfaces/event.interface.js +0 -46
  174. package/v3/@claude-flow/shared/dist/core/interfaces/index.d.ts +0 -10
  175. package/v3/@claude-flow/shared/dist/core/interfaces/index.js +0 -15
  176. package/v3/@claude-flow/shared/dist/core/interfaces/memory.interface.d.ts +0 -298
  177. package/v3/@claude-flow/shared/dist/core/interfaces/memory.interface.js +0 -7
  178. package/v3/@claude-flow/shared/dist/core/interfaces/task.interface.d.ts +0 -185
  179. package/v3/@claude-flow/shared/dist/core/interfaces/task.interface.js +0 -6
  180. package/v3/@claude-flow/shared/dist/core/orchestrator/event-coordinator.d.ts +0 -35
  181. package/v3/@claude-flow/shared/dist/core/orchestrator/event-coordinator.js +0 -101
  182. package/v3/@claude-flow/shared/dist/core/orchestrator/health-monitor.d.ts +0 -60
  183. package/v3/@claude-flow/shared/dist/core/orchestrator/health-monitor.js +0 -166
  184. package/v3/@claude-flow/shared/dist/core/orchestrator/index.d.ts +0 -46
  185. package/v3/@claude-flow/shared/dist/core/orchestrator/index.js +0 -64
  186. package/v3/@claude-flow/shared/dist/core/orchestrator/lifecycle-manager.d.ts +0 -56
  187. package/v3/@claude-flow/shared/dist/core/orchestrator/lifecycle-manager.js +0 -195
  188. package/v3/@claude-flow/shared/dist/core/orchestrator/session-manager.d.ts +0 -83
  189. package/v3/@claude-flow/shared/dist/core/orchestrator/session-manager.js +0 -193
  190. package/v3/@claude-flow/shared/dist/core/orchestrator/task-manager.d.ts +0 -49
  191. package/v3/@claude-flow/shared/dist/core/orchestrator/task-manager.js +0 -253
  192. package/v3/@claude-flow/shared/dist/events/domain-events.d.ts +0 -282
  193. package/v3/@claude-flow/shared/dist/events/domain-events.js +0 -165
  194. package/v3/@claude-flow/shared/dist/events/event-store.d.ts +0 -126
  195. package/v3/@claude-flow/shared/dist/events/event-store.js +0 -427
  196. package/v3/@claude-flow/shared/dist/events/event-store.test.d.ts +0 -8
  197. package/v3/@claude-flow/shared/dist/events/event-store.test.js +0 -293
  198. package/v3/@claude-flow/shared/dist/events/example-usage.d.ts +0 -10
  199. package/v3/@claude-flow/shared/dist/events/example-usage.js +0 -193
  200. package/v3/@claude-flow/shared/dist/events/index.d.ts +0 -21
  201. package/v3/@claude-flow/shared/dist/events/index.js +0 -22
  202. package/v3/@claude-flow/shared/dist/events/projections.d.ts +0 -177
  203. package/v3/@claude-flow/shared/dist/events/projections.js +0 -421
  204. package/v3/@claude-flow/shared/dist/events/rvf-event-log.d.ts +0 -82
  205. package/v3/@claude-flow/shared/dist/events/rvf-event-log.js +0 -340
  206. package/v3/@claude-flow/shared/dist/events/state-reconstructor.d.ts +0 -101
  207. package/v3/@claude-flow/shared/dist/events/state-reconstructor.js +0 -263
  208. package/v3/@claude-flow/shared/dist/events.d.ts +0 -80
  209. package/v3/@claude-flow/shared/dist/events.js +0 -249
  210. package/v3/@claude-flow/shared/dist/hooks/example-usage.d.ts +0 -42
  211. package/v3/@claude-flow/shared/dist/hooks/example-usage.js +0 -351
  212. package/v3/@claude-flow/shared/dist/hooks/executor.d.ts +0 -100
  213. package/v3/@claude-flow/shared/dist/hooks/executor.js +0 -267
  214. package/v3/@claude-flow/shared/dist/hooks/hooks.test.d.ts +0 -9
  215. package/v3/@claude-flow/shared/dist/hooks/hooks.test.js +0 -322
  216. package/v3/@claude-flow/shared/dist/hooks/index.d.ts +0 -52
  217. package/v3/@claude-flow/shared/dist/hooks/index.js +0 -51
  218. package/v3/@claude-flow/shared/dist/hooks/registry.d.ts +0 -133
  219. package/v3/@claude-flow/shared/dist/hooks/registry.js +0 -277
  220. package/v3/@claude-flow/shared/dist/hooks/safety/bash-safety.d.ts +0 -105
  221. package/v3/@claude-flow/shared/dist/hooks/safety/bash-safety.js +0 -481
  222. package/v3/@claude-flow/shared/dist/hooks/safety/file-organization.d.ts +0 -144
  223. package/v3/@claude-flow/shared/dist/hooks/safety/file-organization.js +0 -328
  224. package/v3/@claude-flow/shared/dist/hooks/safety/git-commit.d.ts +0 -158
  225. package/v3/@claude-flow/shared/dist/hooks/safety/git-commit.js +0 -450
  226. package/v3/@claude-flow/shared/dist/hooks/safety/index.d.ts +0 -17
  227. package/v3/@claude-flow/shared/dist/hooks/safety/index.js +0 -17
  228. package/v3/@claude-flow/shared/dist/hooks/session-hooks.d.ts +0 -234
  229. package/v3/@claude-flow/shared/dist/hooks/session-hooks.js +0 -334
  230. package/v3/@claude-flow/shared/dist/hooks/task-hooks.d.ts +0 -163
  231. package/v3/@claude-flow/shared/dist/hooks/task-hooks.js +0 -326
  232. package/v3/@claude-flow/shared/dist/hooks/types.d.ts +0 -267
  233. package/v3/@claude-flow/shared/dist/hooks/types.js +0 -62
  234. package/v3/@claude-flow/shared/dist/hooks/verify-exports.test.d.ts +0 -9
  235. package/v3/@claude-flow/shared/dist/hooks/verify-exports.test.js +0 -93
  236. package/v3/@claude-flow/shared/dist/index.d.ts +0 -20
  237. package/v3/@claude-flow/shared/dist/index.js +0 -50
  238. package/v3/@claude-flow/shared/dist/mcp/connection-pool.d.ts +0 -98
  239. package/v3/@claude-flow/shared/dist/mcp/connection-pool.js +0 -364
  240. package/v3/@claude-flow/shared/dist/mcp/index.d.ts +0 -69
  241. package/v3/@claude-flow/shared/dist/mcp/index.js +0 -84
  242. package/v3/@claude-flow/shared/dist/mcp/server.d.ts +0 -166
  243. package/v3/@claude-flow/shared/dist/mcp/server.js +0 -590
  244. package/v3/@claude-flow/shared/dist/mcp/session-manager.d.ts +0 -136
  245. package/v3/@claude-flow/shared/dist/mcp/session-manager.js +0 -335
  246. package/v3/@claude-flow/shared/dist/mcp/tool-registry.d.ts +0 -178
  247. package/v3/@claude-flow/shared/dist/mcp/tool-registry.js +0 -439
  248. package/v3/@claude-flow/shared/dist/mcp/transport/http.d.ts +0 -104
  249. package/v3/@claude-flow/shared/dist/mcp/transport/http.js +0 -476
  250. package/v3/@claude-flow/shared/dist/mcp/transport/index.d.ts +0 -102
  251. package/v3/@claude-flow/shared/dist/mcp/transport/index.js +0 -238
  252. package/v3/@claude-flow/shared/dist/mcp/transport/stdio.d.ts +0 -104
  253. package/v3/@claude-flow/shared/dist/mcp/transport/stdio.js +0 -263
  254. package/v3/@claude-flow/shared/dist/mcp/transport/websocket.d.ts +0 -133
  255. package/v3/@claude-flow/shared/dist/mcp/transport/websocket.js +0 -396
  256. package/v3/@claude-flow/shared/dist/mcp/types.d.ts +0 -436
  257. package/v3/@claude-flow/shared/dist/mcp/types.js +0 -54
  258. package/v3/@claude-flow/shared/dist/plugin-interface.d.ts +0 -544
  259. package/v3/@claude-flow/shared/dist/plugin-interface.js +0 -23
  260. package/v3/@claude-flow/shared/dist/plugin-loader.d.ts +0 -139
  261. package/v3/@claude-flow/shared/dist/plugin-loader.js +0 -434
  262. package/v3/@claude-flow/shared/dist/plugin-registry.d.ts +0 -183
  263. package/v3/@claude-flow/shared/dist/plugin-registry.js +0 -457
  264. package/v3/@claude-flow/shared/dist/plugins/index.d.ts +0 -10
  265. package/v3/@claude-flow/shared/dist/plugins/index.js +0 -10
  266. package/v3/@claude-flow/shared/dist/plugins/official/hive-mind-plugin.d.ts +0 -106
  267. package/v3/@claude-flow/shared/dist/plugins/official/hive-mind-plugin.js +0 -241
  268. package/v3/@claude-flow/shared/dist/plugins/official/index.d.ts +0 -10
  269. package/v3/@claude-flow/shared/dist/plugins/official/index.js +0 -10
  270. package/v3/@claude-flow/shared/dist/plugins/official/maestro-plugin.d.ts +0 -121
  271. package/v3/@claude-flow/shared/dist/plugins/official/maestro-plugin.js +0 -355
  272. package/v3/@claude-flow/shared/dist/plugins/types.d.ts +0 -93
  273. package/v3/@claude-flow/shared/dist/plugins/types.js +0 -9
  274. package/v3/@claude-flow/shared/dist/resilience/bulkhead.d.ts +0 -105
  275. package/v3/@claude-flow/shared/dist/resilience/bulkhead.js +0 -206
  276. package/v3/@claude-flow/shared/dist/resilience/circuit-breaker.d.ts +0 -132
  277. package/v3/@claude-flow/shared/dist/resilience/circuit-breaker.js +0 -233
  278. package/v3/@claude-flow/shared/dist/resilience/index.d.ts +0 -19
  279. package/v3/@claude-flow/shared/dist/resilience/index.js +0 -19
  280. package/v3/@claude-flow/shared/dist/resilience/rate-limiter.d.ts +0 -168
  281. package/v3/@claude-flow/shared/dist/resilience/rate-limiter.js +0 -314
  282. package/v3/@claude-flow/shared/dist/resilience/retry.d.ts +0 -91
  283. package/v3/@claude-flow/shared/dist/resilience/retry.js +0 -159
  284. package/v3/@claude-flow/shared/dist/security/index.d.ts +0 -10
  285. package/v3/@claude-flow/shared/dist/security/index.js +0 -12
  286. package/v3/@claude-flow/shared/dist/security/input-validation.d.ts +0 -73
  287. package/v3/@claude-flow/shared/dist/security/input-validation.js +0 -201
  288. package/v3/@claude-flow/shared/dist/security/secure-random.d.ts +0 -92
  289. package/v3/@claude-flow/shared/dist/security/secure-random.js +0 -142
  290. package/v3/@claude-flow/shared/dist/services/index.d.ts +0 -7
  291. package/v3/@claude-flow/shared/dist/services/index.js +0 -7
  292. package/v3/@claude-flow/shared/dist/services/v3-progress.service.d.ts +0 -124
  293. package/v3/@claude-flow/shared/dist/services/v3-progress.service.js +0 -402
  294. package/v3/@claude-flow/shared/dist/types/agent.types.d.ts +0 -137
  295. package/v3/@claude-flow/shared/dist/types/agent.types.js +0 -6
  296. package/v3/@claude-flow/shared/dist/types/index.d.ts +0 -11
  297. package/v3/@claude-flow/shared/dist/types/index.js +0 -17
  298. package/v3/@claude-flow/shared/dist/types/mcp.types.d.ts +0 -266
  299. package/v3/@claude-flow/shared/dist/types/mcp.types.js +0 -7
  300. package/v3/@claude-flow/shared/dist/types/memory.types.d.ts +0 -236
  301. package/v3/@claude-flow/shared/dist/types/memory.types.js +0 -7
  302. package/v3/@claude-flow/shared/dist/types/swarm.types.d.ts +0 -186
  303. package/v3/@claude-flow/shared/dist/types/swarm.types.js +0 -65
  304. package/v3/@claude-flow/shared/dist/types/task.types.d.ts +0 -178
  305. package/v3/@claude-flow/shared/dist/types/task.types.js +0 -32
  306. package/v3/@claude-flow/shared/dist/types.d.ts +0 -197
  307. package/v3/@claude-flow/shared/dist/types.js +0 -21
  308. package/v3/@claude-flow/shared/dist/utils/secure-logger.d.ts +0 -69
  309. package/v3/@claude-flow/shared/dist/utils/secure-logger.js +0 -208
@@ -1,375 +0,0 @@
1
- /**
2
- * Run Ledger + Evaluators
3
- *
4
- * Logs every run as an event with a minimum schema, then runs evaluators
5
- * to assess compliance and quality.
6
- *
7
- * Objective evaluators:
8
- * 1. Tests pass
9
- * 2. Lint pass
10
- * 3. Forbidden dependency scan
11
- * 4. Forbidden command scan
12
- * 5. Required sections present in plan
13
- *
14
- * Subjective evaluators:
15
- * 1. Reviewer rating (pass/fail)
16
- * 2. Architecture compliance (pass/fail)
17
- *
18
- * @module @claude-flow/guidance/ledger
19
- */
20
- import { randomUUID } from 'node:crypto';
21
- // ============================================================================
22
- // Built-in Evaluators
23
- // ============================================================================
24
- /**
25
- * Tests Pass evaluator - checks test results
26
- */
27
- export class TestsPassEvaluator {
28
- name = 'tests-pass';
29
- type = 'objective';
30
- async evaluate(event) {
31
- if (!event.testResults.ran) {
32
- return {
33
- name: this.name,
34
- passed: false,
35
- details: 'Tests were not run during this task',
36
- score: 0,
37
- };
38
- }
39
- const passed = event.testResults.failed === 0;
40
- const total = event.testResults.passed + event.testResults.failed + event.testResults.skipped;
41
- return {
42
- name: this.name,
43
- passed,
44
- details: passed
45
- ? `All ${event.testResults.passed} tests passed (${event.testResults.skipped} skipped)`
46
- : `${event.testResults.failed} of ${total} tests failed`,
47
- score: total > 0 ? event.testResults.passed / total : 0,
48
- };
49
- }
50
- }
51
- /**
52
- * Forbidden command scan evaluator
53
- */
54
- export class ForbiddenCommandEvaluator {
55
- name = 'forbidden-command-scan';
56
- type = 'objective';
57
- forbiddenPatterns;
58
- constructor(forbiddenPatterns) {
59
- this.forbiddenPatterns = forbiddenPatterns ?? [
60
- /\brm\s+-rf\s+\//,
61
- /\bgit\s+push\s+--force\s+origin\s+(?:main|master)\b/,
62
- /\bcurl\s+.*\|\s*(?:sh|bash)\b/,
63
- /\beval\s*\(/,
64
- /\bexec\s*\(/,
65
- ];
66
- }
67
- async evaluate(event) {
68
- const violations = [];
69
- for (const tool of event.toolsUsed) {
70
- for (const pattern of this.forbiddenPatterns) {
71
- if (pattern.test(tool)) {
72
- violations.push(`Forbidden command pattern: ${pattern.source} matched in "${tool}"`);
73
- }
74
- }
75
- }
76
- return {
77
- name: this.name,
78
- passed: violations.length === 0,
79
- details: violations.length === 0
80
- ? 'No forbidden commands detected'
81
- : `Found ${violations.length} forbidden command(s): ${violations.join('; ')}`,
82
- score: violations.length === 0 ? 1 : 0,
83
- };
84
- }
85
- }
86
- /**
87
- * Forbidden dependency scan evaluator
88
- */
89
- export class ForbiddenDependencyEvaluator {
90
- name = 'forbidden-dependency-scan';
91
- type = 'objective';
92
- forbiddenPackages;
93
- constructor(forbiddenPackages) {
94
- this.forbiddenPackages = forbiddenPackages ?? [];
95
- }
96
- async evaluate(event) {
97
- if (this.forbiddenPackages.length === 0) {
98
- return { name: this.name, passed: true, details: 'No forbidden dependencies configured', score: 1 };
99
- }
100
- // Check if any forbidden packages were introduced in touched files
101
- const packageFiles = event.filesTouched.filter(f => f.endsWith('package.json') || f.endsWith('package-lock.json'));
102
- return {
103
- name: this.name,
104
- passed: true,
105
- details: packageFiles.length > 0
106
- ? `Package files modified: ${packageFiles.join(', ')} - manual review recommended`
107
- : 'No package files modified',
108
- score: 1,
109
- };
110
- }
111
- }
112
- /**
113
- * Violation rate evaluator - checks violation count
114
- */
115
- export class ViolationRateEvaluator {
116
- name = 'violation-rate';
117
- type = 'objective';
118
- maxViolations;
119
- constructor(maxViolations = 0) {
120
- this.maxViolations = maxViolations;
121
- }
122
- async evaluate(event) {
123
- const count = event.violations.length;
124
- const passed = count <= this.maxViolations;
125
- return {
126
- name: this.name,
127
- passed,
128
- details: passed
129
- ? `${count} violation(s) within threshold (max: ${this.maxViolations})`
130
- : `${count} violation(s) exceeds threshold (max: ${this.maxViolations})`,
131
- score: Math.max(0, 1 - count / Math.max(this.maxViolations + 1, 1)),
132
- };
133
- }
134
- }
135
- /**
136
- * Diff quality evaluator - checks rework ratio
137
- */
138
- export class DiffQualityEvaluator {
139
- name = 'diff-quality';
140
- type = 'objective';
141
- maxReworkRatio;
142
- constructor(maxReworkRatio = 0.3) {
143
- this.maxReworkRatio = maxReworkRatio;
144
- }
145
- async evaluate(event) {
146
- const totalLines = event.diffSummary.linesAdded + event.diffSummary.linesRemoved;
147
- if (totalLines === 0) {
148
- return { name: this.name, passed: true, details: 'No diff produced', score: 1 };
149
- }
150
- const reworkRatio = event.reworkLines / totalLines;
151
- const passed = reworkRatio <= this.maxReworkRatio;
152
- return {
153
- name: this.name,
154
- passed,
155
- details: `Rework ratio: ${(reworkRatio * 100).toFixed(1)}% (${event.reworkLines}/${totalLines} lines). Threshold: ${(this.maxReworkRatio * 100).toFixed(0)}%`,
156
- score: Math.max(0, 1 - reworkRatio),
157
- };
158
- }
159
- }
160
- // ============================================================================
161
- // Run Ledger
162
- // ============================================================================
163
- export class RunLedger {
164
- events = [];
165
- evaluators = [];
166
- maxEvents;
167
- /**
168
- * @param maxEvents - Maximum events to retain in memory (0 = unlimited).
169
- * When the limit is exceeded the oldest events are evicted.
170
- */
171
- constructor(maxEvents = 0) {
172
- this.maxEvents = maxEvents;
173
- // Register default evaluators
174
- this.evaluators = [
175
- new TestsPassEvaluator(),
176
- new ForbiddenCommandEvaluator(),
177
- new ForbiddenDependencyEvaluator(),
178
- new ViolationRateEvaluator(),
179
- new DiffQualityEvaluator(),
180
- ];
181
- }
182
- /**
183
- * Add a custom evaluator
184
- */
185
- addEvaluator(evaluator) {
186
- this.evaluators.push(evaluator);
187
- }
188
- /**
189
- * Remove an evaluator by name
190
- */
191
- removeEvaluator(name) {
192
- this.evaluators = this.evaluators.filter(e => e.name !== name);
193
- }
194
- /**
195
- * Log a run event
196
- */
197
- logEvent(event) {
198
- const fullEvent = {
199
- ...event,
200
- eventId: randomUUID(),
201
- };
202
- this.events.push(fullEvent);
203
- this.evictIfNeeded();
204
- return fullEvent;
205
- }
206
- /**
207
- * Create a new run event with defaults
208
- */
209
- createEvent(taskId, intent, guidanceHash) {
210
- return {
211
- eventId: randomUUID(),
212
- taskId,
213
- guidanceHash,
214
- retrievedRuleIds: [],
215
- toolsUsed: [],
216
- filesTouched: [],
217
- diffSummary: { linesAdded: 0, linesRemoved: 0, filesChanged: 0 },
218
- testResults: { ran: false, passed: 0, failed: 0, skipped: 0 },
219
- violations: [],
220
- outcomeAccepted: null,
221
- reworkLines: 0,
222
- intent,
223
- timestamp: Date.now(),
224
- durationMs: 0,
225
- };
226
- }
227
- /**
228
- * Finalize and store an event
229
- */
230
- finalizeEvent(event) {
231
- event.durationMs = Date.now() - event.timestamp;
232
- this.events.push(event);
233
- this.evictIfNeeded();
234
- return event;
235
- }
236
- /**
237
- * Evict oldest events when maxEvents is exceeded.
238
- * Trims 10% in a batch to amortize the O(n) splice cost.
239
- */
240
- evictIfNeeded() {
241
- if (this.maxEvents > 0 && this.events.length > this.maxEvents) {
242
- const trimCount = Math.max(1, Math.floor(this.maxEvents * 0.1));
243
- this.events.splice(0, trimCount);
244
- }
245
- }
246
- /**
247
- * Run all evaluators against an event
248
- */
249
- async evaluate(event) {
250
- const results = [];
251
- for (const evaluator of this.evaluators) {
252
- const result = await evaluator.evaluate(event);
253
- results.push(result);
254
- }
255
- return results;
256
- }
257
- /**
258
- * Get all events
259
- */
260
- getEvents() {
261
- return [...this.events];
262
- }
263
- /**
264
- * Get events by task ID
265
- */
266
- getEventsByTask(taskId) {
267
- return this.events.filter(e => e.taskId === taskId);
268
- }
269
- /**
270
- * Get events within a time range
271
- */
272
- getEventsInRange(startMs, endMs) {
273
- return this.events.filter(e => e.timestamp >= startMs && e.timestamp <= endMs);
274
- }
275
- /**
276
- * Get recent events
277
- */
278
- getRecentEvents(count) {
279
- return this.events.slice(-count);
280
- }
281
- /**
282
- * Compute optimization metrics from events
283
- */
284
- computeMetrics(events) {
285
- const evts = events ?? this.events;
286
- if (evts.length === 0) {
287
- return {
288
- violationRate: 0,
289
- selfCorrectionRate: 0,
290
- reworkLines: 0,
291
- clarifyingQuestions: 0,
292
- taskCount: 0,
293
- };
294
- }
295
- // Violations per 10 tasks
296
- const totalViolations = evts.reduce((sum, e) => sum + e.violations.length, 0);
297
- const violationRate = evts.length > 0 ? (totalViolations / evts.length) * 10 : 0;
298
- // Self-correction rate: violations that were auto-corrected
299
- const totalCorrectable = evts.reduce((sum, e) => sum + e.violations.length, 0);
300
- const totalCorrected = evts.reduce((sum, e) => sum + e.violations.filter(v => v.autoCorrected).length, 0);
301
- const selfCorrectionRate = totalCorrectable > 0
302
- ? totalCorrected / totalCorrectable
303
- : 1;
304
- // Average rework lines
305
- const reworkLines = evts.reduce((sum, e) => sum + e.reworkLines, 0) / evts.length;
306
- // Clarifying questions are tracked in metadata (placeholder for now)
307
- const clarifyingQuestions = 0;
308
- return {
309
- violationRate,
310
- selfCorrectionRate,
311
- reworkLines,
312
- clarifyingQuestions,
313
- taskCount: evts.length,
314
- };
315
- }
316
- /**
317
- * Rank violations by frequency and cost (rework lines)
318
- */
319
- rankViolations(windowEvents) {
320
- const evts = windowEvents ?? this.events;
321
- const violationMap = new Map();
322
- for (const event of evts) {
323
- for (const violation of event.violations) {
324
- const existing = violationMap.get(violation.ruleId) ?? { frequency: 0, totalRework: 0 };
325
- existing.frequency++;
326
- existing.totalRework += event.reworkLines;
327
- violationMap.set(violation.ruleId, existing);
328
- }
329
- }
330
- const rankings = [];
331
- for (const [ruleId, stats] of violationMap) {
332
- const cost = stats.totalRework / stats.frequency;
333
- rankings.push({
334
- ruleId,
335
- frequency: stats.frequency,
336
- cost,
337
- score: stats.frequency * cost,
338
- });
339
- }
340
- return rankings.sort((a, b) => b.score - a.score);
341
- }
342
- /**
343
- * Get event count
344
- */
345
- get eventCount() {
346
- return this.events.length;
347
- }
348
- /**
349
- * Export events for persistence
350
- */
351
- exportEvents() {
352
- return [...this.events];
353
- }
354
- /**
355
- * Import events from persistence
356
- */
357
- importEvents(events) {
358
- this.events.push(...events);
359
- }
360
- /**
361
- * Clear all events
362
- */
363
- clear() {
364
- this.events = [];
365
- }
366
- }
367
- /**
368
- * Create a run ledger instance
369
- *
370
- * @param maxEvents - Maximum events to retain in memory (0 = unlimited).
371
- */
372
- export function createLedger(maxEvents = 0) {
373
- return new RunLedger(maxEvents);
374
- }
375
- //# sourceMappingURL=ledger.js.map
@@ -1,289 +0,0 @@
1
- /**
2
- * Manifest Validator & Conformance Suite
3
- *
4
- * Validates AgentCellManifest documents against the Agentic Container spec,
5
- * computes risk scores, selects execution lanes, and fails closed on any
6
- * validation error. The ConformanceSuite runs golden traces through an
7
- * evaluator to prove the platform behaves as specified.
8
- *
9
- * @module @claude-flow/guidance/manifest-validator
10
- */
11
- /** Data sensitivity levels ordered by severity */
12
- declare const DATA_SENSITIVITY_LEVELS: readonly ["public", "internal", "confidential", "restricted"];
13
- type DataSensitivity = typeof DATA_SENSITIVITY_LEVELS[number];
14
- /** Write modes for memory policy */
15
- declare const WRITE_MODES: readonly ["append", "overwrite", "merge"];
16
- type WriteMode = typeof WRITE_MODES[number];
17
- /** Authority scopes for memory policy */
18
- declare const AUTHORITY_SCOPES: readonly ["self", "team", "tenant", "global"];
19
- type AuthorityScope = typeof AUTHORITY_SCOPES[number];
20
- /** Trace levels for observability */
21
- declare const TRACE_LEVELS: readonly ["none", "errors", "decisions", "full"];
22
- /** Execution lanes ordered by privilege (lowest to highest) */
23
- declare const LANES: readonly ["wasm", "sandboxed", "native"];
24
- type Lane = typeof LANES[number];
25
- /**
26
- * The manifest describing an agent cell per the Agentic Container spec.
27
- */
28
- export interface AgentCellManifest {
29
- /** API version string (must be 'agentic_cells.v0_1') */
30
- apiVersion: string;
31
- /** Cell identity */
32
- cell: {
33
- name: string;
34
- purpose: string;
35
- ownerTenant: string;
36
- codeRef: {
37
- kind: string;
38
- digest: string;
39
- entry: string;
40
- };
41
- };
42
- /** Lane execution policy */
43
- lanePolicy: {
44
- portabilityRequired: boolean;
45
- needsNativeThreads: boolean;
46
- preferredLane: Lane;
47
- maxRiskScore: number;
48
- };
49
- /** Resource budgets */
50
- budgets: {
51
- maxWallClockSeconds: number;
52
- maxToolCalls: number;
53
- maxBytesEgress: number;
54
- maxTokensInMtok: number;
55
- maxTokensOutMtok: number;
56
- maxMemoryWrites: number;
57
- };
58
- /** Data handling policy */
59
- dataPolicy: {
60
- dataSensitivity: DataSensitivity;
61
- piiAllowed: boolean;
62
- retentionDays: number;
63
- exportControls: {
64
- allowedRegions: string[];
65
- blockedRegions: string[];
66
- };
67
- };
68
- /** Tool usage policy */
69
- toolPolicy: {
70
- toolsAllowed: string[];
71
- networkAllowlist: string[];
72
- writeActionsRequireConfirmation: boolean;
73
- };
74
- /** Memory system policy */
75
- memoryPolicy: {
76
- namespace: string;
77
- authorityScope: AuthorityScope;
78
- writeMode: WriteMode;
79
- requiresCoherenceGate: boolean;
80
- requiresAntiHallucinationGate: boolean;
81
- };
82
- /** Observability configuration */
83
- observability: {
84
- traceLevel: typeof TRACE_LEVELS[number];
85
- emitArtifacts: boolean;
86
- artifactBucket: string;
87
- };
88
- }
89
- /**
90
- * A single validation error or warning.
91
- */
92
- export interface ValidationError {
93
- /** Error code (e.g., 'MISSING_FIELD', 'INVALID_DIGEST', 'BUDGET_EXCEED') */
94
- code: string;
95
- /** JSON path to the problematic field */
96
- field: string;
97
- /** Human-readable description */
98
- message: string;
99
- /** Severity level */
100
- severity: 'error';
101
- }
102
- /**
103
- * A single validation warning.
104
- */
105
- export interface ValidationWarning {
106
- /** Warning code */
107
- code: string;
108
- /** JSON path to the problematic field */
109
- field: string;
110
- /** Human-readable description */
111
- message: string;
112
- /** Severity level */
113
- severity: 'warning';
114
- }
115
- /**
116
- * Complete validation result for a manifest.
117
- */
118
- export interface ValidationResult {
119
- /** Whether the manifest passed all validation checks */
120
- valid: boolean;
121
- /** Validation errors (each causes rejection) */
122
- errors: ValidationError[];
123
- /** Validation warnings (informational, do not block admission) */
124
- warnings: ValidationWarning[];
125
- /** Admission decision: admit, reject, or review */
126
- admissionDecision: 'admit' | 'reject' | 'review';
127
- /** Selected execution lane (null if rejected) */
128
- laneSelection: Lane | null;
129
- /** Computed risk score (0-100) */
130
- riskScore: number;
131
- }
132
- /**
133
- * Validates AgentCellManifest documents against the Agentic Container spec.
134
- *
135
- * Fails closed: any validation error results in a 'reject' decision.
136
- * Warnings alone do not block admission but may trigger a 'review' decision
137
- * when the risk score is between thresholds.
138
- */
139
- export declare class ManifestValidator {
140
- /** Risk score threshold: below this, admit. Above reject threshold, reject. Between, review. */
141
- private readonly admitThreshold;
142
- private readonly rejectThreshold;
143
- constructor(options?: {
144
- admitThreshold?: number;
145
- rejectThreshold?: number;
146
- });
147
- /**
148
- * Validate a manifest, compute its risk score, select a lane, and decide admission.
149
- *
150
- * FAILS CLOSED: any validation error leads to reject.
151
- */
152
- validate(manifest: AgentCellManifest): ValidationResult;
153
- /**
154
- * Compute a risk score (0-100) from tool risk, data sensitivity, and privilege surface.
155
- *
156
- * Components:
157
- * - tool_risk (0-40): based on tool types and network access
158
- * - data_sensitivity (0-30): based on sensitivity level and PII
159
- * - privilege_surface (0-30): based on memory scope, write mode, native threads
160
- */
161
- computeRiskScore(manifest: AgentCellManifest): number;
162
- /**
163
- * Select the execution lane based on risk score and manifest policy.
164
- *
165
- * Lane selection rules:
166
- * - If portabilityRequired or risk <= 30: wasm
167
- * - If needsNativeThreads and risk > 50: native
168
- * - Otherwise: sandboxed
169
- * - Always respect preferredLane if risk score allows it
170
- * - Risk exceeding maxRiskScore forces the most restrictive lane
171
- */
172
- selectLane(manifest: AgentCellManifest, riskScore: number): Lane;
173
- /**
174
- * Validate budget values: no negatives, within sanity limits.
175
- */
176
- validateBudgets(budgets: AgentCellManifest['budgets']): ValidationError[];
177
- /**
178
- * Validate tool policy: network allowlist must not contain wildcards
179
- * unless the cell explicitly has Bash (privileged).
180
- */
181
- validateToolPolicy(toolPolicy: AgentCellManifest['toolPolicy']): ValidationError[];
182
- /**
183
- * Validate data policy fields.
184
- */
185
- validateDataPolicy(dataPolicy: AgentCellManifest['dataPolicy']): ValidationError[];
186
- private validateRequiredFields;
187
- private validateApiVersion;
188
- private validateDigest;
189
- private validateWarnings;
190
- }
191
- /**
192
- * A single event within a golden trace.
193
- */
194
- export interface GoldenTraceEvent {
195
- /** Sequence number within the trace */
196
- seq: number;
197
- /** Type of event (e.g., 'command', 'tool-use', 'memory-write', 'budget-check') */
198
- eventType: string;
199
- /** Event payload */
200
- payload: Record<string, unknown>;
201
- /** Expected outcome from the platform */
202
- expectedOutcome: 'allow' | 'deny' | 'warn';
203
- }
204
- /**
205
- * A complete golden trace including events and expected decisions.
206
- */
207
- export interface GoldenTrace {
208
- /** Unique trace identifier */
209
- traceId: string;
210
- /** Human-readable name */
211
- name: string;
212
- /** Description of what the trace verifies */
213
- description: string;
214
- /** Ordered sequence of events */
215
- events: GoldenTraceEvent[];
216
- /** Map from event seq (as string) to expected decision string */
217
- expectedDecisions: Record<string, string>;
218
- /** Map from memory key to expected parent chain for lineage verification */
219
- expectedMemoryLineage: Record<string, string[]>;
220
- }
221
- /**
222
- * Result of running the conformance suite.
223
- */
224
- export interface ConformanceResult {
225
- /** Whether all events matched their expected outcomes */
226
- passed: boolean;
227
- /** Total number of events evaluated */
228
- totalEvents: number;
229
- /** Number of events that matched expectations */
230
- matchedEvents: number;
231
- /** Details of any mismatches */
232
- mismatches: Array<{
233
- traceId: string;
234
- seq: number;
235
- expected: string;
236
- actual: string;
237
- details: unknown;
238
- }>;
239
- }
240
- /**
241
- * Runs golden traces through an evaluator and reports conformance.
242
- *
243
- * Each trace contains events with expected outcomes. The suite feeds every
244
- * event to the evaluator and compares the actual decision to the expectation.
245
- */
246
- export declare class ConformanceSuite {
247
- private traces;
248
- /**
249
- * Add a golden trace to the suite.
250
- */
251
- addTrace(trace: GoldenTrace): void;
252
- /**
253
- * Run every event in every trace through the evaluator and compare
254
- * actual decisions against expected outcomes.
255
- */
256
- run(evaluator: (event: GoldenTraceEvent) => {
257
- decision: string;
258
- details: unknown;
259
- }): ConformanceResult;
260
- /**
261
- * Get all registered traces.
262
- */
263
- getTraces(): GoldenTrace[];
264
- /**
265
- * Create built-in default golden traces that verify core platform invariants:
266
- *
267
- * 1. Destructive command blocked
268
- * 2. Secret detected and blocked
269
- * 3. Budget exceeded and denied
270
- * 4. Memory write without evidence blocked
271
- * 5. Valid operation allowed
272
- */
273
- createDefaultTraces(): GoldenTrace[];
274
- }
275
- /**
276
- * Create a new ManifestValidator instance.
277
- */
278
- export declare function createManifestValidator(options?: {
279
- admitThreshold?: number;
280
- rejectThreshold?: number;
281
- }): ManifestValidator;
282
- /**
283
- * Create a new ConformanceSuite instance, optionally pre-loaded with default traces.
284
- */
285
- export declare function createConformanceSuite(options?: {
286
- includeDefaults?: boolean;
287
- }): ConformanceSuite;
288
- export {};
289
- //# sourceMappingURL=manifest-validator.d.ts.map