@wowok/agent-mcp 3.1.2 → 3.1.4

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 (544) hide show
  1. package/dist/config/config-audit.spec.d.ts +1 -0
  2. package/dist/config/config-audit.spec.js +1 -0
  3. package/dist/config/exposure.d.ts +108 -0
  4. package/dist/config/exposure.js +1 -0
  5. package/dist/config/index.d.ts +2 -0
  6. package/dist/config/index.js +1 -1
  7. package/dist/config/judgment.d.ts +1228 -0
  8. package/dist/config/judgment.js +1 -0
  9. package/dist/config/judgment.spec.d.ts +1 -0
  10. package/dist/config/judgment.spec.js +1 -0
  11. package/dist/config/rule-engine.d.ts +299 -0
  12. package/dist/config/rule-engine.js +1 -0
  13. package/dist/config/rule-engine.spec.d.ts +1 -0
  14. package/dist/config/rule-engine.spec.js +1 -0
  15. package/dist/config/runtime.js +1 -1
  16. package/dist/config/severity.d.ts +7 -0
  17. package/dist/config/severity.js +1 -0
  18. package/dist/customer/index.d.ts +3 -9
  19. package/dist/customer/index.js +1 -1
  20. package/dist/customer/industry-risks.d.ts +3 -17
  21. package/dist/customer/industry-risks.js +1 -1
  22. package/dist/customer/order-monitor.d.ts +3 -1
  23. package/dist/customer/order-monitor.js +1 -1
  24. package/dist/customer/types.d.ts +1 -165
  25. package/dist/customer/types.js +1 -1
  26. package/dist/customer/user-preferences.d.ts +0 -49
  27. package/dist/customer/user-preferences.js +1 -1
  28. package/dist/evaluation/acceptance.d.ts +1 -0
  29. package/dist/evaluation/acceptance.js +1 -1
  30. package/dist/evaluation/arbitration-game.js +1 -1
  31. package/dist/evaluation/architecture.spec.d.ts +1 -0
  32. package/dist/evaluation/architecture.spec.js +1 -0
  33. package/dist/evaluation/builtins/demand-match.js +1 -1
  34. package/dist/evaluation/builtins/graph-service.d.ts +16 -0
  35. package/dist/evaluation/builtins/graph-service.js +1 -0
  36. package/dist/evaluation/builtins/graph-service.spec.d.ts +1 -0
  37. package/dist/evaluation/builtins/graph-service.spec.js +1 -0
  38. package/dist/evaluation/builtins/index.d.ts +1 -1
  39. package/dist/evaluation/builtins/index.js +1 -1
  40. package/dist/evaluation/builtins/purity.spec.d.ts +1 -0
  41. package/dist/evaluation/builtins/purity.spec.js +1 -0
  42. package/dist/evaluation/engine.js +1 -1
  43. package/dist/evaluation/facets/catalog.d.ts +19 -0
  44. package/dist/evaluation/facets/catalog.js +1 -0
  45. package/dist/evaluation/game-strategy.d.ts +2 -2
  46. package/dist/evaluation/game-strategy.js +1 -1
  47. package/dist/evaluation/guard-scan.d.ts +10 -0
  48. package/dist/evaluation/guard-scan.js +1 -0
  49. package/dist/evaluation/match-operation.d.ts +2 -2
  50. package/dist/evaluation/match-operation.js +1 -1
  51. package/dist/evaluation/standards.d.ts +9 -0
  52. package/dist/evaluation/standards.js +1 -0
  53. package/dist/evaluation/standards.spec.d.ts +1 -0
  54. package/dist/evaluation/standards.spec.js +1 -0
  55. package/dist/evaluation/types.d.ts +11 -1
  56. package/dist/experience/realtime-feedback.js +1 -1
  57. package/dist/extensions/business-modules.js +1 -1
  58. package/dist/extensions/custom-registry-file.js +1 -1
  59. package/dist/extensions/index.d.ts +1 -1
  60. package/dist/extensions/index.js +1 -1
  61. package/dist/extensions/industry-audit.spec.d.ts +1 -0
  62. package/dist/extensions/industry-audit.spec.js +1 -0
  63. package/dist/extensions/industry-layers.d.ts +14 -5
  64. package/dist/extensions/industry-layers.js +1 -1
  65. package/dist/extensions/industry-pack.d.ts +2 -0
  66. package/dist/extensions/industry-pack.js +1 -1
  67. package/dist/extensions/mode-evaluator.js +1 -1
  68. package/dist/extensions/modes.js +1 -1
  69. package/dist/graph/onchain/analyze.d.ts +16 -1
  70. package/dist/graph/onchain/analyze.js +1 -1
  71. package/dist/graph/onchain/analyze.spec.js +1 -1
  72. package/dist/graph/onchain/dataplane.d.ts +1 -1
  73. package/dist/graph/onchain/dataplane.js +1 -1
  74. package/dist/graph/onchain/edge-batch.spec.d.ts +1 -0
  75. package/dist/graph/onchain/edge-batch.spec.js +1 -0
  76. package/dist/graph/onchain/edge-schema.d.ts +11 -2
  77. package/dist/graph/onchain/edge-schema.js +1 -1
  78. package/dist/graph/onchain/entity-profile.spec.d.ts +1 -0
  79. package/dist/graph/onchain/entity-profile.spec.js +1 -0
  80. package/dist/graph/onchain/event-history.spec.d.ts +1 -0
  81. package/dist/graph/onchain/event-history.spec.js +1 -0
  82. package/dist/graph/onchain/expand.js +1 -1
  83. package/dist/graph/onchain/exploration.d.ts +28 -0
  84. package/dist/graph/onchain/exploration.js +1 -0
  85. package/dist/graph/onchain/exploration.spec.d.ts +1 -0
  86. package/dist/graph/onchain/exploration.spec.js +1 -0
  87. package/dist/graph/onchain/exposure.d.ts +18 -0
  88. package/dist/graph/onchain/exposure.js +1 -0
  89. package/dist/graph/onchain/exposure.spec.d.ts +1 -0
  90. package/dist/graph/onchain/exposure.spec.js +1 -0
  91. package/dist/graph/onchain/extract-deep.spec.d.ts +1 -0
  92. package/dist/graph/onchain/extract-deep.spec.js +1 -0
  93. package/dist/graph/onchain/extract.d.ts +11 -3
  94. package/dist/graph/onchain/extract.js +1 -1
  95. package/dist/graph/onchain/facet-projection.d.ts +99 -0
  96. package/dist/graph/onchain/facet-projection.js +1 -0
  97. package/dist/graph/onchain/facet-projection.spec.d.ts +1 -0
  98. package/dist/graph/onchain/facet-projection.spec.js +1 -0
  99. package/dist/graph/onchain/facts.d.ts +103 -0
  100. package/dist/graph/onchain/facts.js +1 -0
  101. package/dist/graph/onchain/facts.spec.d.ts +1 -0
  102. package/dist/graph/onchain/facts.spec.js +1 -0
  103. package/dist/graph/onchain/field-manifest.d.ts +29 -0
  104. package/dist/graph/onchain/field-manifest.js +1 -0
  105. package/dist/graph/onchain/field-manifest.spec.d.ts +1 -0
  106. package/dist/graph/onchain/field-manifest.spec.js +1 -0
  107. package/dist/graph/onchain/fixtures.d.ts +80 -0
  108. package/dist/graph/onchain/fixtures.js +1 -0
  109. package/dist/graph/onchain/fixtures.spec.d.ts +1 -0
  110. package/dist/graph/onchain/fixtures.spec.js +1 -0
  111. package/dist/graph/onchain/graph-policy.spec.d.ts +1 -0
  112. package/dist/graph/onchain/graph-policy.spec.js +1 -0
  113. package/dist/graph/onchain/index.d.ts +14 -2
  114. package/dist/graph/onchain/index.js +1 -1
  115. package/dist/graph/onchain/interest.js +1 -1
  116. package/dist/graph/onchain/interest.spec.js +1 -1
  117. package/dist/graph/onchain/label-lint.spec.d.ts +1 -0
  118. package/dist/graph/onchain/label-lint.spec.js +1 -0
  119. package/dist/graph/onchain/names.d.ts +23 -0
  120. package/dist/graph/onchain/names.js +1 -0
  121. package/dist/graph/onchain/names.spec.d.ts +1 -0
  122. package/dist/graph/onchain/names.spec.js +1 -0
  123. package/dist/graph/onchain/onchain.spec.js +1 -1
  124. package/dist/graph/onchain/policy.d.ts +8 -0
  125. package/dist/graph/onchain/policy.js +1 -0
  126. package/dist/graph/onchain/proposal-graph.d.ts +11 -0
  127. package/dist/graph/onchain/proposal-graph.js +1 -0
  128. package/dist/graph/onchain/proposal-graph.spec.d.ts +1 -0
  129. package/dist/graph/onchain/proposal-graph.spec.js +1 -0
  130. package/dist/graph/onchain/sdk-batch.d.ts +5 -1
  131. package/dist/graph/onchain/sdk-batch.js +1 -1
  132. package/dist/graph/onchain/strategy.d.ts +16 -0
  133. package/dist/graph/onchain/strategy.js +1 -1
  134. package/dist/graph/onchain/strategy.spec.js +1 -1
  135. package/dist/graph/onchain/synthesis.d.ts +20 -0
  136. package/dist/graph/onchain/synthesis.js +1 -0
  137. package/dist/graph/onchain/synthesis.spec.d.ts +1 -0
  138. package/dist/graph/onchain/synthesis.spec.js +1 -0
  139. package/dist/graph/onchain/table-ledger.spec.d.ts +1 -0
  140. package/dist/graph/onchain/table-ledger.spec.js +1 -0
  141. package/dist/graph/onchain/types.d.ts +57 -7
  142. package/dist/graph/onchain/viewport.d.ts +1 -0
  143. package/dist/graph/onchain/viewport.js +1 -1
  144. package/dist/harness/index.d.ts +1 -5
  145. package/dist/harness/index.js +1 -1
  146. package/dist/harness/verify.d.ts +6 -1
  147. package/dist/harness/verify.js +1 -1
  148. package/dist/index.js +1 -1
  149. package/dist/keeper/keeper.spec.js +1 -1
  150. package/dist/knowledge/alloc-audit-policy.spec.d.ts +1 -0
  151. package/dist/knowledge/alloc-audit-policy.spec.js +1 -0
  152. package/dist/knowledge/allocation-ledger.js +1 -1
  153. package/dist/knowledge/allocation-puzzle.d.ts +1 -1
  154. package/dist/knowledge/allocation-puzzle.js +1 -1
  155. package/dist/knowledge/allocation-risk.d.ts +4 -3
  156. package/dist/knowledge/allocation-risk.js +1 -1
  157. package/dist/knowledge/allocation-templates.js +1 -1
  158. package/dist/knowledge/arb-risk.d.ts +6 -6
  159. package/dist/knowledge/arb-risk.js +1 -1
  160. package/dist/knowledge/arbitration-ledger.d.ts +4 -4
  161. package/dist/knowledge/arbitration-ledger.js +1 -1
  162. package/dist/knowledge/arbitration-puzzle.d.ts +1 -1
  163. package/dist/knowledge/arbitration-puzzle.js +1 -1
  164. package/dist/knowledge/arbitration-risk.d.ts +4 -3
  165. package/dist/knowledge/arbitration-risk.js +1 -1
  166. package/dist/knowledge/arbitration-templates.js +1 -1
  167. package/dist/knowledge/baselines/guard-lint-baseline.spec.d.ts +1 -0
  168. package/dist/knowledge/baselines/guard-lint-baseline.spec.js +1 -0
  169. package/dist/knowledge/baselines/judgment-baselines.json +289 -0
  170. package/dist/knowledge/baselines/risk-baselines.spec.d.ts +1 -0
  171. package/dist/knowledge/baselines/risk-baselines.spec.js +1 -0
  172. package/dist/knowledge/baselines/risk-cases.d.ts +8 -0
  173. package/dist/knowledge/baselines/risk-cases.js +1 -0
  174. package/dist/knowledge/baselines/rules/alloc_audit.json +290 -0
  175. package/dist/knowledge/baselines/rules/allocation.json +492 -0
  176. package/dist/knowledge/baselines/rules/arb.json +155 -0
  177. package/dist/knowledge/baselines/rules/arbitration.json +366 -0
  178. package/dist/knowledge/baselines/rules/bridge.json +197 -0
  179. package/dist/knowledge/baselines/rules/contact.json +152 -0
  180. package/dist/knowledge/baselines/rules/demand.json +158 -0
  181. package/dist/knowledge/baselines/rules/graph.json +453 -0
  182. package/dist/knowledge/baselines/rules/guard.json +981 -0
  183. package/dist/knowledge/baselines/rules/machine.json +706 -0
  184. package/dist/knowledge/baselines/rules/order.json +549 -0
  185. package/dist/knowledge/baselines/rules/payment.json +205 -0
  186. package/dist/knowledge/baselines/rules/permission.json +330 -0
  187. package/dist/knowledge/baselines/rules/personal.json +139 -0
  188. package/dist/knowledge/baselines/rules/progress.json +346 -0
  189. package/dist/knowledge/baselines/rules/proof.json +158 -0
  190. package/dist/knowledge/baselines/rules/registrar.json +159 -0
  191. package/dist/knowledge/baselines/rules/repository.json +244 -0
  192. package/dist/knowledge/baselines/rules/resource.json +117 -0
  193. package/dist/knowledge/baselines/rules/reward.json +471 -0
  194. package/dist/knowledge/baselines/rules/service.json +595 -0
  195. package/dist/knowledge/baselines/rules/treasury.json +440 -0
  196. package/dist/knowledge/baselines/rules/util.json +101 -0
  197. package/dist/knowledge/bridge-risk.d.ts +6 -6
  198. package/dist/knowledge/bridge-risk.js +1 -1
  199. package/dist/knowledge/builtin-templates.d.ts +26 -0
  200. package/dist/knowledge/builtin-templates.js +1 -0
  201. package/dist/knowledge/contact-risk.d.ts +6 -6
  202. package/dist/knowledge/contact-risk.js +1 -1
  203. package/dist/knowledge/contract-invariants.d.ts +1 -0
  204. package/dist/knowledge/contract-invariants.js +1 -1
  205. package/dist/knowledge/demand-risk.d.ts +6 -6
  206. package/dist/knowledge/demand-risk.js +1 -1
  207. package/dist/knowledge/event-semantics.js +1 -1
  208. package/dist/knowledge/facts-sync.spec.d.ts +1 -0
  209. package/dist/knowledge/facts-sync.spec.js +1 -0
  210. package/dist/knowledge/getting-started.js +1 -1
  211. package/dist/knowledge/guard-design-patterns.js +1 -1
  212. package/dist/knowledge/guard-eval.d.ts +15 -0
  213. package/dist/knowledge/guard-eval.js +1 -0
  214. package/dist/knowledge/guard-eval.spec.d.ts +1 -0
  215. package/dist/knowledge/guard-eval.spec.js +1 -0
  216. package/dist/knowledge/guard-field-cognition.d.ts +1 -1
  217. package/dist/knowledge/guard-field-cognition.js +1 -1
  218. package/dist/knowledge/guard-ledger.js +1 -1
  219. package/dist/knowledge/guard-lint.d.ts +1 -1
  220. package/dist/knowledge/guard-lint.js +1 -1
  221. package/dist/knowledge/guard-risk.d.ts +7 -19
  222. package/dist/knowledge/guard-risk.js +1 -1
  223. package/dist/knowledge/guard-templates.js +1 -1
  224. package/dist/knowledge/guard-translation.js +1 -1
  225. package/dist/knowledge/index.d.ts +51 -45
  226. package/dist/knowledge/index.js +1 -1
  227. package/dist/knowledge/industry-registry.js +1 -1
  228. package/dist/knowledge/industry-rule-node.d.ts +7 -0
  229. package/dist/knowledge/industry-rule-node.js +1 -0
  230. package/dist/knowledge/industry-strategy.js +1 -1
  231. package/dist/knowledge/jsonrpc-enum.js +1 -1
  232. package/dist/knowledge/machine-ledger.js +1 -1
  233. package/dist/knowledge/machine-risk.d.ts +4 -7
  234. package/dist/knowledge/machine-risk.js +1 -1
  235. package/dist/knowledge/machine-templates.js +1 -1
  236. package/dist/knowledge/machine-translation.js +1 -1
  237. package/dist/knowledge/migration-preflight.js +1 -1
  238. package/dist/knowledge/operation-dictionary.js +1 -1
  239. package/dist/knowledge/order-ledger.js +1 -1
  240. package/dist/knowledge/order-puzzle.d.ts +3 -3
  241. package/dist/knowledge/order-puzzle.js +1 -1
  242. package/dist/knowledge/order-risk.d.ts +7 -12
  243. package/dist/knowledge/order-risk.js +1 -1
  244. package/dist/knowledge/order-templates.js +1 -1
  245. package/dist/knowledge/passport-ledger.js +1 -1
  246. package/dist/knowledge/passport-templates.js +1 -1
  247. package/dist/knowledge/payment-risk.d.ts +8 -7
  248. package/dist/knowledge/payment-risk.js +1 -1
  249. package/dist/knowledge/payment-tracker.js +1 -1
  250. package/dist/knowledge/permission-ledger.js +1 -1
  251. package/dist/knowledge/permission-puzzle.d.ts +12 -12
  252. package/dist/knowledge/permission-puzzle.js +1 -1
  253. package/dist/knowledge/permission-risk.d.ts +4 -10
  254. package/dist/knowledge/permission-risk.js +1 -1
  255. package/dist/knowledge/permission-templates.js +1 -1
  256. package/dist/knowledge/personal-risk.d.ts +6 -6
  257. package/dist/knowledge/personal-risk.js +1 -1
  258. package/dist/knowledge/progress-ledger.js +1 -1
  259. package/dist/knowledge/progress-puzzle.d.ts +2 -2
  260. package/dist/knowledge/progress-puzzle.js +1 -1
  261. package/dist/knowledge/progress-risk.d.ts +4 -3
  262. package/dist/knowledge/progress-risk.js +1 -1
  263. package/dist/knowledge/progress-templates.js +1 -1
  264. package/dist/knowledge/proof-risk.d.ts +6 -6
  265. package/dist/knowledge/proof-risk.js +1 -1
  266. package/dist/knowledge/puzzle-projections.d.ts +11 -0
  267. package/dist/knowledge/puzzle-projections.js +1 -0
  268. package/dist/knowledge/recipient-constraint.d.ts +20 -1
  269. package/dist/knowledge/recipient-constraint.js +1 -1
  270. package/dist/knowledge/registrar-risk.d.ts +6 -6
  271. package/dist/knowledge/registrar-risk.js +1 -1
  272. package/dist/knowledge/repository-risk.d.ts +7 -7
  273. package/dist/knowledge/repository-risk.js +1 -1
  274. package/dist/knowledge/resource-risk.d.ts +6 -6
  275. package/dist/knowledge/resource-risk.js +1 -1
  276. package/dist/knowledge/reward-ledger.d.ts +1 -1
  277. package/dist/knowledge/reward-ledger.js +1 -1
  278. package/dist/knowledge/reward-puzzle.d.ts +2 -2
  279. package/dist/knowledge/reward-puzzle.js +1 -1
  280. package/dist/knowledge/reward-risk.d.ts +5 -6
  281. package/dist/knowledge/reward-risk.js +1 -1
  282. package/dist/knowledge/rule-node-analyzers.d.ts +43 -0
  283. package/dist/knowledge/rule-node-analyzers.js +1 -0
  284. package/dist/knowledge/rule-node-analyzers.spec.d.ts +1 -0
  285. package/dist/knowledge/rule-node-analyzers.spec.js +1 -0
  286. package/dist/knowledge/rule-outcome.d.ts +5 -0
  287. package/dist/knowledge/rule-outcome.js +1 -0
  288. package/dist/knowledge/safety-rules.js +1 -1
  289. package/dist/knowledge/scenario-modes.d.ts +2 -2
  290. package/dist/knowledge/scenario-modes.js +1 -1
  291. package/dist/knowledge/scenario-topology.js +1 -1
  292. package/dist/knowledge/service-allocator-audit-node.js +1 -1
  293. package/dist/knowledge/service-ledger.js +1 -1
  294. package/dist/knowledge/service-puzzle.d.ts +2 -2
  295. package/dist/knowledge/service-puzzle.js +1 -1
  296. package/dist/knowledge/service-risk-node.js +1 -1
  297. package/dist/knowledge/service-risk.d.ts +4 -4
  298. package/dist/knowledge/service-risk.js +1 -1
  299. package/dist/knowledge/service-templates.js +1 -1
  300. package/dist/knowledge/strategy-manuals.d.ts +1 -1
  301. package/dist/knowledge/strategy-manuals.js +1 -1
  302. package/dist/knowledge/template-loader.d.ts +84 -0
  303. package/dist/knowledge/template-loader.js +1 -0
  304. package/dist/knowledge/template-loader.spec.d.ts +1 -0
  305. package/dist/knowledge/template-loader.spec.js +1 -0
  306. package/dist/knowledge/template-registry.js +1 -1
  307. package/dist/knowledge/template-scanner.d.ts +17 -0
  308. package/dist/knowledge/template-scanner.js +1 -0
  309. package/dist/knowledge/template-scanner.spec.d.ts +1 -0
  310. package/dist/knowledge/template-scanner.spec.js +1 -0
  311. package/dist/knowledge/tools-reference.js +1 -1
  312. package/dist/knowledge/treasury-ledger.d.ts +1 -1
  313. package/dist/knowledge/treasury-ledger.js +1 -1
  314. package/dist/knowledge/treasury-puzzle.d.ts +3 -3
  315. package/dist/knowledge/treasury-puzzle.js +1 -1
  316. package/dist/knowledge/treasury-risk.d.ts +6 -4
  317. package/dist/knowledge/treasury-risk.js +1 -1
  318. package/dist/knowledge/treasury-templates.js +1 -1
  319. package/dist/knowledge/util-risk.d.ts +6 -6
  320. package/dist/knowledge/util-risk.js +1 -1
  321. package/dist/knowledge/workflow-guidance.d.ts +4 -0
  322. package/dist/knowledge/workflow-guidance.js +1 -1
  323. package/dist/knowledge/workspace-lists.js +1 -1
  324. package/dist/monitor/MonitorLoop.js +1 -1
  325. package/dist/participation/arbitrator-interest.js +1 -1
  326. package/dist/participation/radar-core.js +1 -1
  327. package/dist/persona/analyzer.js +1 -1
  328. package/dist/persona/bridge.js +1 -1
  329. package/dist/persona/facet-profile.d.ts +33 -0
  330. package/dist/persona/facet-profile.js +1 -0
  331. package/dist/persona/index.js +1 -1
  332. package/dist/persona/model.d.ts +2 -1
  333. package/dist/persona/model.js +1 -1
  334. package/dist/persona/persona-audit.spec.d.ts +1 -0
  335. package/dist/persona/persona-audit.spec.js +1 -0
  336. package/dist/persona/topology-focus.d.ts +2 -2
  337. package/dist/persona/topology-focus.js +1 -1
  338. package/dist/persona/types.d.ts +14 -0
  339. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  340. package/dist/playbooks/service-build/facet-money.d.ts +33 -0
  341. package/dist/playbooks/service-build/facet-money.js +1 -0
  342. package/dist/playbooks/service-build/facet-money.spec.d.ts +1 -0
  343. package/dist/playbooks/service-build/facet-money.spec.js +1 -0
  344. package/dist/playbooks/service-build/machine-panorama.d.ts +20 -0
  345. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  346. package/dist/playbooks/service-build/merchant-guide.d.ts +2 -2
  347. package/dist/playbooks/service-build/migration-planner.d.ts +43 -0
  348. package/dist/playbooks/service-build/migration-planner.js +1 -0
  349. package/dist/playbooks/service-build/object-panorama.d.ts +65 -24
  350. package/dist/playbooks/service-build/object-panorama.js +1 -1
  351. package/dist/playbooks/service-build/participation-radar.js +1 -1
  352. package/dist/playbooks/service-build/pipeline-actions.d.ts +3 -3
  353. package/dist/playbooks/service-build/pipeline-actions.js +1 -1
  354. package/dist/playbooks/service-build/reverse-mapping.d.ts +1 -0
  355. package/dist/playbooks/service-build/reverse-mapping.js +1 -1
  356. package/dist/playbooks/service-build/risk-aggregator.d.ts +4 -2
  357. package/dist/playbooks/service-build/risk-aggregator.js +1 -1
  358. package/dist/playbooks/service-build/semantic-graph.js +1 -1
  359. package/dist/playbooks/service-build/service-panorama.d.ts +56 -9
  360. package/dist/playbooks/service-build/service-panorama.js +1 -1
  361. package/dist/playbooks/service-build/topology-evaluation.spec.d.ts +1 -0
  362. package/dist/playbooks/service-build/topology-evaluation.spec.js +1 -0
  363. package/dist/playbooks/service-build/topology-query.d.ts +13 -2
  364. package/dist/playbooks/service-build/topology-query.js +1 -1
  365. package/dist/playbooks/service-build/workflow-design-assessment.d.ts +2 -2
  366. package/dist/playbooks/service-build/workflow-design-assessment.js +1 -1
  367. package/dist/relationship/registry.js +1 -1
  368. package/dist/review/arb.d.ts +0 -2
  369. package/dist/review/arb.js +1 -1
  370. package/dist/review/machine.js +1 -1
  371. package/dist/review/order.d.ts +0 -1
  372. package/dist/review/order.js +1 -1
  373. package/dist/review/service.js +1 -1
  374. package/dist/review/types.d.ts +7 -0
  375. package/dist/role/profiles.js +1 -1
  376. package/dist/rules.d.ts +1 -2
  377. package/dist/rules.js +1 -1
  378. package/dist/safety/confirm-gate.js +1 -1
  379. package/dist/schema/benchmark-migration/index.d.ts +207 -0
  380. package/dist/schema/benchmark-migration/index.js +1 -0
  381. package/dist/schema/call/allocation.d.ts +1 -1
  382. package/dist/schema/call/allocation.js +1 -1
  383. package/dist/schema/call/arbitration.d.ts +1 -1
  384. package/dist/schema/call/arbitration.js +1 -1
  385. package/dist/schema/call/base.d.ts +3374 -670
  386. package/dist/schema/call/base.js +1 -1
  387. package/dist/schema/call/contact.d.ts +1 -1
  388. package/dist/schema/call/demand.d.ts +1 -1
  389. package/dist/schema/call/guard.d.ts +3 -3
  390. package/dist/schema/call/handler.js +1 -1
  391. package/dist/schema/call/machine.d.ts +5 -5
  392. package/dist/schema/call/order.d.ts +3 -3
  393. package/dist/schema/call/payment.js +1 -1
  394. package/dist/schema/call/permission-handler.d.ts +1 -1
  395. package/dist/schema/call/permission-handler.js +1 -1
  396. package/dist/schema/call/permission.d.ts +16 -16
  397. package/dist/schema/call/permission.js +1 -1
  398. package/dist/schema/call/personal.d.ts +8 -8
  399. package/dist/schema/call/personal.js +1 -1
  400. package/dist/schema/call/progress.d.ts +3 -3
  401. package/dist/schema/call/receipt.d.ts +28 -0
  402. package/dist/schema/call/receipt.js +1 -0
  403. package/dist/schema/call/repository.d.ts +11 -11
  404. package/dist/schema/call/repository.js +1 -1
  405. package/dist/schema/call/reward.d.ts +1 -1
  406. package/dist/schema/call/semantic-customer-advice.spec.d.ts +1 -0
  407. package/dist/schema/call/semantic-customer-advice.spec.js +1 -0
  408. package/dist/schema/call/semantic.d.ts +5 -2
  409. package/dist/schema/call/semantic.js +1 -1
  410. package/dist/schema/call/service.d.ts +7 -7
  411. package/dist/schema/call/service.js +1 -1
  412. package/dist/schema/call/treasury.d.ts +1 -1
  413. package/dist/schema/call/treasury.js +1 -1
  414. package/dist/schema/common/index.d.ts +6 -6
  415. package/dist/schema/common/index.js +1 -1
  416. package/dist/schema/config/index.d.ts +50 -1
  417. package/dist/schema/config/index.js +1 -1
  418. package/dist/schema/evaluation/index.d.ts +307 -213
  419. package/dist/schema/evaluation/index.js +1 -1
  420. package/dist/schema/goal/index.d.ts +6 -6
  421. package/dist/schema/goal/planning.d.ts +17 -17
  422. package/dist/schema/goal/planning.js +1 -1
  423. package/dist/schema/index.d.ts +1 -1
  424. package/dist/schema/index.js +1 -1
  425. package/dist/schema/industry-pack/index.d.ts +1 -1
  426. package/dist/schema/interaction/index.d.ts +1 -1
  427. package/dist/schema/keeper/index.d.ts +1 -1
  428. package/dist/schema/local/index.js +1 -1
  429. package/dist/schema/messenger/index.d.ts +26 -26
  430. package/dist/schema/operations.d.ts +59 -43
  431. package/dist/schema/operations.js +1 -1
  432. package/dist/schema/persona/index.d.ts +4732 -24
  433. package/dist/schema/persona/index.js +1 -1
  434. package/dist/schema/query/bi.d.ts +830 -10
  435. package/dist/schema/query/bi.js +1 -1
  436. package/dist/schema/query/index.d.ts +44 -44
  437. package/dist/schema/query/index.js +1 -1
  438. package/dist/schema/schema-version.js +1 -1
  439. package/dist/schema/workflow/index.d.ts +1 -1
  440. package/dist/schema/workspace/index.d.ts +2 -2
  441. package/dist/schema-query-impl/index.d.ts +9 -0
  442. package/dist/schema-query-impl/index.js +1 -1
  443. package/dist/schemas/account_operation.output.json +1 -1
  444. package/dist/schemas/benchmark_migration_operation.output.json +793 -0
  445. package/dist/schemas/benchmark_migration_operation.schema.json +83 -0
  446. package/dist/schemas/bridge_operation.output.json +1 -1
  447. package/dist/schemas/bridge_operation.schema.json +5 -5
  448. package/dist/schemas/config_operation.output.json +252 -0
  449. package/dist/schemas/config_operation.schema.json +21 -1
  450. package/dist/schemas/evaluation_operation.output.json +702 -162
  451. package/dist/schemas/evaluation_operation.schema.json +0 -429
  452. package/dist/schemas/goal_operation.schema.json +8 -8
  453. package/dist/schemas/guard2file.schema.json +1 -1
  454. package/dist/schemas/index.json +7 -7
  455. package/dist/schemas/keeper_operation.output.json +1 -1
  456. package/dist/schemas/local_history_operation.output.json +1 -1
  457. package/dist/schemas/local_info_operation.output.json +1 -1
  458. package/dist/schemas/local_mark_operation.output.json +1 -1
  459. package/dist/schemas/machineNode2file.schema.json +1 -1
  460. package/dist/schemas/messenger_operation.output.json +1 -1
  461. package/dist/schemas/messenger_operation.schema.json +24 -12
  462. package/dist/schemas/monitor_events.output.json +1 -1
  463. package/dist/schemas/monitor_subscription.output.json +1 -1
  464. package/dist/schemas/onchain_events.output.json +2 -2
  465. package/dist/schemas/onchain_operations.output.json +6359 -3724
  466. package/dist/schemas/onchain_operations.schema.json +191 -141
  467. package/dist/schemas/onchain_operations_allocation.schema.json +13 -11
  468. package/dist/schemas/onchain_operations_arbitration.schema.json +10 -8
  469. package/dist/schemas/onchain_operations_contact.schema.json +7 -5
  470. package/dist/schemas/onchain_operations_demand.schema.json +7 -5
  471. package/dist/schemas/onchain_operations_gen_passport.schema.json +5 -3
  472. package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
  473. package/dist/schemas/onchain_operations_guard.schema.json +5 -3
  474. package/dist/schemas/onchain_operations_machine.schema.json +22 -18
  475. package/dist/schemas/onchain_operations_order.schema.json +11 -7
  476. package/dist/schemas/onchain_operations_payment.schema.json +3 -3
  477. package/dist/schemas/onchain_operations_permission.schema.json +19 -11
  478. package/dist/schemas/onchain_operations_personal.schema.json +16 -10
  479. package/dist/schemas/onchain_operations_progress.schema.json +11 -7
  480. package/dist/schemas/onchain_operations_proof.schema.json +5 -3
  481. package/dist/schemas/onchain_operations_repository.schema.json +12 -8
  482. package/dist/schemas/onchain_operations_reward.schema.json +11 -9
  483. package/dist/schemas/onchain_operations_service.schema.json +28 -22
  484. package/dist/schemas/onchain_operations_treasury.schema.json +13 -11
  485. package/dist/schemas/onchain_table_data.output.json +88 -88
  486. package/dist/schemas/persona_operation.output.json +15875 -1
  487. package/dist/schemas/persona_operation.schema.json +3056 -478
  488. package/dist/schemas/query_toolkit.output.json +1325 -212
  489. package/dist/schemas/query_toolkit.schema.json +60 -2
  490. package/dist/schemas/workflow_operation.schema.json +4 -2
  491. package/dist/strategy/metrics.js +1 -1
  492. package/dist/strategy/scorecard.js +1 -1
  493. package/dist/tools/handlers/benchmark-migration.d.ts +2 -0
  494. package/dist/tools/handlers/benchmark-migration.js +1 -0
  495. package/dist/tools/handlers/bridge.js +1 -1
  496. package/dist/tools/handlers/config.js +1 -1
  497. package/dist/tools/handlers/dispatch-expectations.d.ts +3 -0
  498. package/dist/tools/handlers/dispatch-expectations.js +1 -0
  499. package/dist/tools/handlers/evaluation.js +1 -1
  500. package/dist/tools/handlers/industry-pack.js +1 -1
  501. package/dist/tools/handlers/onchain.js +1 -1
  502. package/dist/tools/handlers/query.js +1 -1
  503. package/dist/tools/handlers/schema-query.js +1 -1
  504. package/dist/tools/index.js +1 -1
  505. package/dist/tools/move-fn-index.gen.d.ts +3 -0
  506. package/dist/tools/move-fn-index.gen.js +1 -0
  507. package/dist/tools/registry/business.js +1 -1
  508. package/dist/tools/registry/config.js +1 -1
  509. package/dist/tools/registry/evaluation.d.ts +2 -0
  510. package/dist/tools/registry/evaluation.js +1 -0
  511. package/dist/tools/registry/onchain.js +1 -1
  512. package/dist/tools/registry/query.js +1 -1
  513. package/dist/tools/sanitize-output.d.ts +3 -0
  514. package/dist/tools/sanitize-output.js +1 -0
  515. package/dist/tools/sanitize-output.spec.d.ts +1 -0
  516. package/dist/tools/sanitize-output.spec.js +1 -0
  517. package/dist/tools/shared.d.ts +0 -1
  518. package/dist/tools/shared.js +1 -1
  519. package/dist/tools/wrap.js +1 -1
  520. package/package.json +9 -3
  521. package/dist/customer/customer-advice.d.ts +0 -32
  522. package/dist/customer/customer-advice.js +0 -1
  523. package/dist/customer/info-puzzle.d.ts +0 -146
  524. package/dist/customer/info-puzzle.js +0 -1
  525. package/dist/customer/order-strategy.d.ts +0 -17
  526. package/dist/customer/order-strategy.js +0 -1
  527. package/dist/customer/preorder-compare.d.ts +0 -24
  528. package/dist/customer/preorder-compare.js +0 -1
  529. package/dist/customer/reminder-system.d.ts +0 -42
  530. package/dist/customer/reminder-system.js +0 -1
  531. package/dist/customer/risk-assessment.d.ts +0 -13
  532. package/dist/customer/risk-assessment.js +0 -1
  533. package/dist/evaluation/builtins/service-risk.d.ts +0 -7
  534. package/dist/evaluation/builtins/service-risk.js +0 -1
  535. package/dist/knowledge/trust-metrics.d.ts +0 -66
  536. package/dist/knowledge/trust-metrics.js +0 -1
  537. package/dist/schema/trust/index.d.ts +0 -334
  538. package/dist/schema/trust/index.js +0 -1
  539. package/dist/schemas/trust_score.output.json +0 -847
  540. package/dist/schemas/trust_score.schema.json +0 -364
  541. package/dist/tools/handlers/trust.d.ts +0 -16
  542. package/dist/tools/handlers/trust.js +0 -1
  543. package/dist/tools/registry/trust.d.ts +0 -2
  544. package/dist/tools/registry/trust.js +0 -1
@@ -0,0 +1,492 @@
1
+ {
2
+ "comment": "Allocation rule pack (R-A) — declarative form of the retired in-code Allocation risk rules. Facts are produced by the kernel extractor (allocation-risk.ts, bound to the allocation-ledger constants and the canonical recipient-constraint doctrine); rules only reference fact names. First-offender walks (empty sharing, rate/amount violations, weak guards) are sunk into the extractor. Levels/wording can be retuned per rule and rules can be disabled (enabled=false, trace left) via the judgment document — factory rules can never be deleted or invented here.",
3
+ "facts": {
4
+ "allocators_config_present": "An allocators_config block is present in the context.",
5
+ "allocators_count": "Number of allocators in allocators_config (undefined when the block is absent).",
6
+ "allocators_empty": "The allocators.allocators array is empty — funds would be permanently locked.",
7
+ "empty_sharing_allocator_index": "First allocator whose sharing array is empty (first-offender walk; undefined when none).",
8
+ "empty_sharing_allocator_guard": "Guard address of the first allocator with an empty sharing array.",
9
+ "rate_rule_index": "First allocator violating a Rate-sum rule (undefined when none).",
10
+ "rate_rule_guard": "Guard address of the Rate-sum offender.",
11
+ "rate_rule_sum": "Sum of Rate-mode sharing values (Number()) for the offender.",
12
+ "rate_rule_pure": "Pure Rate mode (no Surplus) with sum > 0 and sum != RATE_TOTAL_FULL.",
13
+ "rate_rule_exceed": "Rate + Surplus mode with rate sum > RATE_TOTAL_FULL.",
14
+ "rate_total_full": "KERNEL CONSTANT — full rate denominator (RATE_TOTAL_FULL = 10000).",
15
+ "amount_rule_branch": "First amount-rule violation branch for the first offending allocator: 'multiple_surplus' | 'below_threshold' | 'exceeds_max' (undefined when none).",
16
+ "amount_rule_index": "Allocator index of the amount-rule offender.",
17
+ "amount_rule_guard": "Guard address of the amount-rule offender.",
18
+ "amount_rule_surplus_count": "Number of Surplus sharing entries on the amount-rule offender.",
19
+ "amount_rule_amount_sum": "Sum of Amount-mode sharing values (Number()) for the offender.",
20
+ "amount_rule_threshold": "Number(allocators_config.threshold) for the offender (NaN when absent — comparisons stay false).",
21
+ "amount_rule_max": "Number(allocator.max) for the offender (only set on the exceeds_max branch).",
22
+ "signer_theft_detected": "Canonical RC-FIND-01 judgment (recipient-constraint.ts): a sharing.who=Signer recipient whose Guard does not bind the caller identity.",
23
+ "signer_theft_index": "Allocator index of the unbound-Signer theft offender.",
24
+ "signer_theft_guard": "Guard address of the theft offender.",
25
+ "signer_theft_guard_bound": "Whether the offender's Guard binds context(Signer)==authorized (always false when the rule fires).",
26
+ "guard_id_bad_identifier": "First GuardIdentifier recipient whose Passport table entry is known and not address-typed (undefined when none).",
27
+ "guard_id_bad_type": "Declared Passport table type of the offending identifier.",
28
+ "guard_id_bad_index": "Allocator index carrying the offending GuardIdentifier recipient.",
29
+ "duplicate_guards_present": "Two or more allocators reference the same Guard object address.",
30
+ "allocators_total": "Total allocator count (duplicate scan).",
31
+ "allocators_unique": "Unique Guard address count (duplicate scan).",
32
+ "duplicate_guards_csv_sp": "Duplicated Guard addresses joined with ', ' (description display form; repeats preserved like the old filter).",
33
+ "duplicate_guards_csv": "Duplicated Guard addresses joined with ',' (evidence display form).",
34
+ "for_object_anchor_known": "payment_info_for_object is declared in the context (Some or None — not unknown).",
35
+ "guard_identifier_recipient_present": "At least one allocator carries a sharing.who=GuardIdentifier recipient.",
36
+ "for_object_anchor_set": "payment_info.for_object is set (truthy anchor) — enforced on-chain at alloc().",
37
+ "for_object_anchor": "The declared for_object anchor address (only when known and set).",
38
+ "host_service_published": "The host Service is already published — order_allocators is immutable.",
39
+ "treasury_perm_mismatch": "An Entity recipient points to a Treasury whose Permission differs from the host Service Permission.",
40
+ "treasury_perm_entity": "Entity address of the permission-mismatch offender.",
41
+ "treasury_perm_treasury": "Treasury Permission address of the offender.",
42
+ "host_service_permission": "Host Service Permission address (undefined when the context carries none).",
43
+ "allocation_create_op": "The operation type is 'create' (the passive-object advisory only fires on create).",
44
+ "allocation_standalone": "trigger_source is 'standalone' (no Service/Arbitration access-control layer).",
45
+ "trigger_source_display": "Rendered trigger_source — 'unknown' when the context carries none.",
46
+ "standalone_weak_guards_count": "Standalone-mode allocator Guards lacking BOTH Signer binding and time-lock (0 when all are bound; undefined outside standalone mode).",
47
+ "standalone_weak_guards_csv_sp": "Weak Guard addresses joined with ', ' (description display form).",
48
+ "standalone_weak_guards_csv": "Weak Guard addresses joined with ',' (evidence display form).",
49
+ "has_fallback_allocator": "Whether an alternative Allocator exists (caller may retry with a different Guard if the first verification fails); undefined when the caller did not specify.",
50
+ "guard_conditions_mutually_exclusive": "Whether Guard conditions are mutually exclusive (multi-Allocator scenarios); undefined when the caller did not specify.",
51
+ "has_fallback_allocator_display": "Rendered has_fallback_allocator flag ('true'/'false') for evidence display.",
52
+ "mutually_exclusive_display": "Rendered guard_conditions_mutually_exclusive flag ('true'/'false') for evidence display.",
53
+ "pure_amount_index": "First allocator whose sharing is non-empty and pure Amount mode (undefined when none).",
54
+ "order_already_has_allocation": "The bound Order already carries an Allocation (1:1 constraint).",
55
+ "bound_order_display": "Rendered bound_order — 'unknown' when the context carries none (evidence form).",
56
+ "bound_order_paren_display": "Rendered bound_order — '(unknown)' when the context carries none (description form).",
57
+ "has_payment_info": "Whether payment_info is present for the alloc() call.",
58
+ "operation_type": "Raw operation type ('create' | 'receive' | 'alloc_by_guard' | 'query').",
59
+ "max_allocator_count": "KERNEL CONSTANT — allocators per Allocation cap (MAX_ALLOCATOR_COUNT).",
60
+ "always_true": "Extractor sentinel — unconditionally true; marks the always-on constant-sync reminder (R-A-5-03)."
61
+ },
62
+ "rules": [
63
+ {
64
+ "rule_id": "R-A-1-01",
65
+ "dimension": "structural",
66
+ "trigger": "allocators is empty or sharing arrays are empty",
67
+ "cases": [
68
+ {
69
+ "when": { "field": "allocators_empty", "op": "eq", "value": true },
70
+ "level": "critical",
71
+ "title": "Empty allocators — funds will be permanently locked",
72
+ "description": "Allocation has empty allocators.allocators. Service publish with empty order_allocators causes order funds to be permanently locked in the Allocation object.",
73
+ "scenario": "Service published without configuring any Allocator",
74
+ "mitigation": "Configure at least 1 Allocator. If no distribution is needed yet, use a single Allocator with Rate=10000 to the merchant address.",
75
+ "evidence": "allocators.length=0",
76
+ "stakeholders": ["owner", "service_provider", "system"],
77
+ "exposure": {
78
+ "loss_parties": [
79
+ { "role": "buyer", "basis": "Order funds escrowed into this Allocation can never be distributed or refunded — the buyer's payment is frozen indefinitely." },
80
+ { "role": "merchant", "basis": "Revenue shares can never be routed out of the Allocation — the merchant leg of every order is frozen too." }
81
+ ],
82
+ "gain_paths": []
83
+ }
84
+ },
85
+ {
86
+ "when": { "field": "empty_sharing_allocator_index", "op": "present" },
87
+ "level": "critical",
88
+ "title": "Allocator ${empty_sharing_allocator_index} has empty sharing — will never distribute",
89
+ "description": "Allocator at index ${empty_sharing_allocator_index} (guard=${empty_sharing_allocator_guard}) has empty sharing array. Even if its Guard passes verification, no funds will be distributed.",
90
+ "scenario": "Allocator with empty sharing vector",
91
+ "mitigation": "Add at least 1 sharing entry to Allocator ${empty_sharing_allocator_index}",
92
+ "evidence": "allocator[${empty_sharing_allocator_index}].sharing.length=0",
93
+ "stakeholders": ["owner", "recipient"],
94
+ "exposure": {
95
+ "loss_parties": [
96
+ { "role": "buyer", "basis": "The share routed to this Allocator can never be paid out or refunded — that portion of the order funds is frozen." },
97
+ { "role": "merchant", "basis": "Any merchant-side share assigned to this Allocator is frozen with it." }
98
+ ],
99
+ "gain_paths": []
100
+ }
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ "rule_id": "R-A-1-02",
106
+ "dimension": "structural",
107
+ "trigger": "Pure Rate mode sum != 10000 or Rate+Surplus sum > 10000",
108
+ "cases": [
109
+ {
110
+ "when": { "field": "rate_rule_pure", "op": "eq", "value": true },
111
+ "level": "high",
112
+ "title": "Pure Rate mode sum ${rate_rule_sum} != ${rate_total_full}",
113
+ "description": "Allocator ${rate_rule_index} (guard=${rate_rule_guard}) uses pure Rate mode (no Surplus), but sum(rates)=${rate_rule_sum} ≠ ${rate_total_full}. Funds will be permanently locked (if sum<10000) or Move will abort with ERATE_NOT_10000 (if sum != 10000 exactly).",
114
+ "scenario": "Misconfigured rate proportions",
115
+ "mitigation": "Adjust sharing.sharing values so sum(rates)=${rate_total_full}, OR add 1 Surplus sharing to absorb the remainder.",
116
+ "evidence": "rateSum=${rate_rule_sum}, expected=${rate_total_full}",
117
+ "stakeholders": ["owner", "recipient"],
118
+ "exposure": {
119
+ "loss_parties": [
120
+ { "role": "buyer", "basis": "When the sum falls short of full, the unmatched remainder can never be distributed — that portion of the escrowed order funds is frozen." },
121
+ { "role": "merchant", "basis": "Any merchant-side share inside the unmatched remainder is frozen with it." }
122
+ ],
123
+ "gain_paths": []
124
+ }
125
+ },
126
+ {
127
+ "when": { "field": "rate_rule_exceed", "op": "eq", "value": true },
128
+ "level": "high",
129
+ "title": "Rate + Surplus sum ${rate_rule_sum} > ${rate_total_full}",
130
+ "description": "Allocator ${rate_rule_index} (guard=${rate_rule_guard}) uses Rate+Surplus mode, but sum(rates)=${rate_rule_sum} > ${rate_total_full}. Move will abort with ERATE_EXCEEDS_10000.",
131
+ "scenario": "Rate percentages exceed 100% before Surplus",
132
+ "mitigation": "Reduce sum(rates) to ≤ ${rate_total_full}.",
133
+ "evidence": "rateSum=${rate_rule_sum}, max=${rate_total_full}",
134
+ "stakeholders": ["owner"]
135
+ }
136
+ ]
137
+ },
138
+ {
139
+ "rule_id": "R-A-1-03",
140
+ "dimension": "structural",
141
+ "trigger": "Multiple Surplus sharing in one Allocator, or Amount sum violates threshold/max",
142
+ "cases": [
143
+ {
144
+ "when": { "field": "amount_rule_branch", "op": "eq", "value": "multiple_surplus" },
145
+ "level": "medium",
146
+ "title": "Allocator ${amount_rule_index} has ${amount_rule_surplus_count} Surplus sharing — at most 1 allowed",
147
+ "description": "Allocator ${amount_rule_index} (guard=${amount_rule_guard}) has ${amount_rule_surplus_count} Surplus sharing entries. Move will abort with EMULTIPLE_SURPLUS at alloc() time.",
148
+ "scenario": "Multiple Surplus entries in one Allocator",
149
+ "mitigation": "Keep at most 1 Surplus per Allocator. Use Rate mode for multi-party remainder distribution.",
150
+ "evidence": "surplusCount=${amount_rule_surplus_count}",
151
+ "stakeholders": ["owner"]
152
+ },
153
+ {
154
+ "when": { "field": "amount_rule_branch", "op": "eq", "value": "below_threshold" },
155
+ "level": "high",
156
+ "title": "Amount sum ${amount_rule_amount_sum} < threshold ${amount_rule_threshold}",
157
+ "description": "Allocator ${amount_rule_index} pure Amount mode fix=${amount_rule_amount_sum} < threshold=${amount_rule_threshold}. Move will abort with EAMOUNT_BELOW_THRESHOLD when the allocator is added.",
158
+ "scenario": "Amount sum insufficient to trigger alloc",
159
+ "mitigation": "Either lower threshold to <= fix, or increase Amount sharing values.",
160
+ "evidence": "fix=${amount_rule_amount_sum}, threshold=${amount_rule_threshold}",
161
+ "stakeholders": ["owner"]
162
+ },
163
+ {
164
+ "when": { "field": "amount_rule_branch", "op": "eq", "value": "exceeds_max" },
165
+ "level": "medium",
166
+ "title": "Amount sum ${amount_rule_amount_sum} > max ${amount_rule_max}",
167
+ "description": "Allocator ${amount_rule_index} Amount sum exceeds max. Move will abort with EAMOUNT_EXCEEDS_MAX.",
168
+ "scenario": "Amount sum exceeds max cap",
169
+ "mitigation": "Increase max or reduce Amount sharing values.",
170
+ "evidence": "fix=${amount_rule_amount_sum}, max=${amount_rule_max}",
171
+ "stakeholders": ["owner"]
172
+ }
173
+ ]
174
+ },
175
+ {
176
+ "rule_id": "R-A-2-01",
177
+ "dimension": "semantic",
178
+ "trigger": "sharing.who=Signer without Guard Signer binding — fund theft risk",
179
+ "cases": [
180
+ {
181
+ "when": { "field": "signer_theft_detected", "op": "eq", "value": true },
182
+ "level": "critical",
183
+ "title": "Signer recipient without caller constraint — fund theft",
184
+ "description": "Allocator ${signer_theft_index} (guard=${signer_theft_guard}) has sharing.who=Signer, but the Guard does not bind context(Signer)==authorized. Anyone who passes the Guard can steal 100% of funds. (Canonical finding RC-FIND-01, linked to guard-risk.ts R-C3-06.)",
185
+ "scenario": "Signer recipient without Guard Signer authentication",
186
+ "mitigation": "Bind the Signer (signer==order.owner or signer==fixed address), or change the recipient to an Entity / submitted object slot.",
187
+ "evidence": "guard=${signer_theft_guard}, guardSignerBound=${signer_theft_guard_bound}",
188
+ "stakeholders": ["owner", "recipient", "service_provider"],
189
+ "exposure": {
190
+ "loss_parties": [
191
+ { "role": "merchant", "basis": "The allocation pool pays whoever triggers it; the funder (merchant pool or buyer escrow routed through it) loses the delivered share permanently." },
192
+ { "role": "buyer", "basis": "When the pool carries the buyer's escrowed order funds, the theft drains the escrow leg." }
193
+ ],
194
+ "gain_paths": [
195
+ { "role": "neutral", "path": "Any caller satisfying the remaining guard conditions takes the pool share directly into their own wallet (Recipient::Signer, destination = caller).", "viability": "viable", "gate": "Direct-pay + no identity binding is the theft path itself; nothing else gates it." }
196
+ ]
197
+ }
198
+ }
199
+ ]
200
+ },
201
+ {
202
+ "rule_id": "R-A-2-02",
203
+ "dimension": "semantic",
204
+ "trigger": "sharing.who=GuardIdentifier but Passport table entry is not address type",
205
+ "cases": [
206
+ {
207
+ "when": { "field": "guard_id_bad_identifier", "op": "present" },
208
+ "level": "medium",
209
+ "title": "GuardIdentifier ${guard_id_bad_identifier} resolves to non-address type (${guard_id_bad_type})",
210
+ "description": "Allocator ${guard_id_bad_index} uses sharing.who=GuardIdentifier(${guard_id_bad_identifier}), but Passport table[${guard_id_bad_identifier}] is of type ${guard_id_bad_type}, not address. Move will abort with ERECIPIENT_IDENTIFIER_NOT_ADDRESS at alloc() time.",
211
+ "scenario": "Passport table entry type mismatch",
212
+ "mitigation": "Ensure Passport table[${guard_id_bad_identifier}] is address-typed, OR use sharing.who=Entity with a static address.",
213
+ "evidence": "identifier=${guard_id_bad_identifier}, type=${guard_id_bad_type}",
214
+ "stakeholders": ["recipient"]
215
+ }
216
+ ]
217
+ },
218
+ {
219
+ "rule_id": "R-A-2-03",
220
+ "dimension": "semantic",
221
+ "trigger": "Duplicate Guard addresses in allocators (alloc_by_guard address match only hits the first one)",
222
+ "cases": [
223
+ {
224
+ "when": { "field": "duplicate_guards_present", "op": "eq", "value": true },
225
+ "level": "medium",
226
+ "title": "Duplicate Guard addresses in allocators",
227
+ "description": "Multiple Allocators reference the same Guard object: ${duplicate_guards_csv_sp}. alloc_by_guard locates the Allocator by iterating guard addresses; duplicate addresses only match the first one, so subsequent duplicate Allocators are unreachable (dead code).",
228
+ "scenario": "Reusing same Guard object across multiple Allocators",
229
+ "mitigation": "Create independent Guard objects for each Allocator (they may share root/table but must differ in description).",
230
+ "evidence": "total=${allocators_total}, unique=${allocators_unique}, dupes=${duplicate_guards_csv}",
231
+ "stakeholders": ["owner", "allocator"]
232
+ }
233
+ ]
234
+ },
235
+ {
236
+ "rule_id": "R-A-2-04",
237
+ "dimension": "semantic",
238
+ "trigger": "GuardIdentifier recipients combined with payment_info.for_object anchor state (Some = enforced, None = absent)",
239
+ "cases": [
240
+ {
241
+ "when": { "all": [
242
+ { "field": "for_object_anchor_known", "op": "eq", "value": true },
243
+ { "field": "guard_identifier_recipient_present", "op": "eq", "value": true },
244
+ { "field": "for_object_anchor_set", "op": "eq", "value": true }
245
+ ] },
246
+ "level": "medium",
247
+ "title": "payment_info.for_object anchor is ENFORCED at allocation execution",
248
+ "description": "payment_info.for_object is set to ${for_object_anchor}. At allocation execution, every Recipient::GuardIdentifier submission must equal this address or the whole tx aborts with ERECIPIENT_NOT_FOR_OBJECT (15) — a wrong anchor or a guard whose passport submits a different address makes the allocation permanently fail (payment_info is immutable after create). Verify the anchor matches the intended recipient flow.",
249
+ "scenario": "Allocation created with a declared for_object binding and GuardIdentifier recipients",
250
+ "mitigation": "Before create: confirm for_object is the object the GuardIdentifier submissions will resolve to (the guard's passport must submit exactly this address for the recipient identifier). Entity/Signer sharing lines are unaffected by the anchor.",
251
+ "evidence": "for_object=${for_object_anchor}",
252
+ "stakeholders": ["owner", "recipient"]
253
+ },
254
+ {
255
+ "when": { "all": [
256
+ { "field": "for_object_anchor_known", "op": "eq", "value": true },
257
+ { "field": "guard_identifier_recipient_present", "op": "eq", "value": true },
258
+ { "field": "for_object_anchor_set", "op": "eq", "value": false }
259
+ ] },
260
+ "level": "medium",
261
+ "title": "payment_info.for_object = None — GuardIdentifier destination has no on-chain anchor",
262
+ "description": "payment_info.for_object is not set: alloc() enforces NO recipient binding for Recipient::GuardIdentifier lines. Whoever builds the passport chooses the payout address; nothing on-chain constrains it. This is legal by design (Allocation is a generic component, the anchor is opt-in), but it means recipient routing is trust-on-creator.",
263
+ "scenario": "Allocation created without a for_object anchor while using GuardIdentifier recipients",
264
+ "mitigation": "If enforced routing is desired, set payment_info.for_object to the intended recipient anchor at create (it becomes mechanism-enforced: mismatch aborts with code 15). If no anchor is intended, document that the recipient is the passport builder's choice and constrain it in the guard expression instead.",
265
+ "evidence": "for_object=None",
266
+ "stakeholders": ["owner", "recipient"],
267
+ "exposure": {
268
+ "loss_parties": [
269
+ { "role": "merchant", "basis": "With no anchor, the payout address of a GuardIdentifier line is whatever the passport submits — service revenue routed through this allocator can be redirected away from the intended recipient with nothing on-chain objecting." }
270
+ ],
271
+ "gain_paths": [
272
+ { "role": "collaborator", "path": "The passport builder names any address as the submitted recipient; alloc() pays it verbatim (no for_object check runs when the anchor is None).", "viability": "viable", "gate": "The anchor is opt-in and absent — the routing decision sits entirely with whoever builds the passport; treat the builder identity as the control point." }
273
+ ]
274
+ }
275
+ }
276
+ ]
277
+ },
278
+ {
279
+ "rule_id": "R-A-3-01",
280
+ "dimension": "authority",
281
+ "trigger": "Service already published — order_allocators is immutable",
282
+ "cases": [
283
+ {
284
+ "when": { "field": "host_service_published", "op": "truthy" },
285
+ "level": "high",
286
+ "title": "order_allocators immutable after Service publish",
287
+ "description": "Service is already published. order_allocators field is now immutable (safety-rules.ts:170-174). Any configuration error (wrong Guard, wrong sharing proportion, wrong Entity address) will affect ALL subsequent orders and cannot be fixed without creating a new Service.",
288
+ "scenario": "Attempting to modify order_allocators after Service publish",
289
+ "mitigation": "1) Verify the configuration is correct before publish. 2) Use deploy-scanner pre-publish validation. 3) If already published with errors, create a new Service to replace.",
290
+ "evidence": "host_service_published=${host_service_published}",
291
+ "stakeholders": ["owner", "service_provider"]
292
+ }
293
+ ]
294
+ },
295
+ {
296
+ "rule_id": "R-A-3-02",
297
+ "dimension": "authority",
298
+ "trigger": "Treasury Permission inconsistent with Service Permission",
299
+ "cases": [
300
+ {
301
+ "when": { "field": "treasury_perm_mismatch", "op": "eq", "value": true },
302
+ "level": "medium",
303
+ "title": "Treasury Permission inconsistent with Service Permission",
304
+ "description": "sharing.who=Entity points to Treasury ${treasury_perm_entity} whose Permission (${treasury_perm_treasury}) differs from Service Permission (${host_service_permission}). Two different permission organizations control fund flow, creating potential authority conflicts.",
305
+ "scenario": "Treasury owned by different party than Service",
306
+ "mitigation": "Create Treasury with the same Permission object as the Service, OR ensure both are owned by the same address.",
307
+ "evidence": "treasury=${treasury_perm_entity}, treasuryPerm=${treasury_perm_treasury}, servicePerm=${host_service_permission}",
308
+ "stakeholders": ["owner", "service_provider"]
309
+ }
310
+ ]
311
+ },
312
+ {
313
+ "rule_id": "R-A-3-03",
314
+ "dimension": "authority",
315
+ "trigger": "No ALLOCATION_* builtin permission index — Allocation has no independent access control",
316
+ "cases": [
317
+ {
318
+ "when": { "all": [
319
+ { "field": "allocation_create_op", "op": "eq", "value": true },
320
+ { "field": "allocation_standalone", "op": "eq", "value": true }
321
+ ] },
322
+ "level": "low",
323
+ "title": "Allocation has no builtin permission index (passive-object design)",
324
+ "description": "BuiltinPermissionIndex has no ALLOCATION_* entries. Allocation's access control is fully delegated to Guard + Passport. In standalone mode (trigger_source=standalone), there is no Service/Arbitration layer to enforce caller authorization — Guard MUST provide sufficient access control (see R-A-3-04). This is the 'passive object' design philosophy, not a defect, but standalone mode shifts full responsibility to the Guard configuration.",
325
+ "scenario": "Standalone Allocation creation (user-initiated, no Service context)",
326
+ "mitigation": "For standalone Allocation, ensure Guard binds Signer or enforces time-lock (see R-A-3-04). Document this design choice explicitly.",
327
+ "evidence": "BuiltinPermissionIndex has no ALLOCATION_* entries; trigger_source=${trigger_source_display}",
328
+ "stakeholders": ["system"]
329
+ },
330
+ {
331
+ "when": { "all": [
332
+ { "field": "allocation_create_op", "op": "eq", "value": true },
333
+ { "field": "allocation_standalone", "op": "eq", "value": false }
334
+ ] },
335
+ "level": "low",
336
+ "title": "Allocation has no builtin permission index (passive-object design)",
337
+ "description": "BuiltinPermissionIndex has no ALLOCATION_* entries. Allocation's access control is fully delegated to Service (SERVICE_ORDER_ALLOCATOR=313) or Arbitration (ARBITRATION_FEES_ALLOC=365). This is the 'passive object' design philosophy, not a defect. In embedded mode, the host Service/Arbitration provides an additional access-control layer on top of Guard + Passport.",
338
+ "scenario": "Embedded Allocation creation (via Service order_allocators or Arbitration fee allocation)",
339
+ "mitigation": "For embedded Allocation, ensure Service/Arbitration permission configuration is correct. Document this design choice explicitly.",
340
+ "evidence": "BuiltinPermissionIndex has no ALLOCATION_* entries; trigger_source=${trigger_source_display}",
341
+ "stakeholders": ["system"]
342
+ }
343
+ ]
344
+ },
345
+ {
346
+ "rule_id": "R-A-3-04",
347
+ "dimension": "authority",
348
+ "trigger": "Standalone Allocation (trigger_source=standalone) with Guard lacking both Signer binding and time-lock",
349
+ "cases": [
350
+ {
351
+ "when": { "field": "standalone_weak_guards_count", "op": "gte", "value": 1 },
352
+ "level": "high",
353
+ "title": "Standalone Allocation: ${standalone_weak_guards_count} Guard(s) lack Signer binding AND time-lock",
354
+ "description": "Standalone Allocation (trigger_source=standalone) has no Service-layer access control. The following Guard(s) lack both Signer binding (context(Signer)==authorized) and time-lock (context(Clock).timestamp>=unlock): ${standalone_weak_guards_csv_sp}. Anyone who passes these Guards can trigger alloc() and receive funds, with no additional authorization layer. This is the most severe standalone-mode risk.",
355
+ "scenario": "Standalone Allocation created with weak Guard (no Signer binding, no time-lock)",
356
+ "mitigation": "Option A (preferred): configure Guard to bind context(Signer)==authorized_address, so only the owner can trigger alloc(). Option B: configure Guard with time-lock (context(Clock).timestamp>=unlock_time) for vesting-style releases. Option C: switch to embedded mode (via Service) to leverage Service-layer access control. Until fixed, this Allocation should not receive funds.",
357
+ "evidence": "trigger_source=standalone, weakGuards=${standalone_weak_guards_csv}",
358
+ "stakeholders": ["owner", "recipient", "system"],
359
+ "exposure": {
360
+ "loss_parties": [
361
+ { "role": "merchant", "basis": "Standalone mode has no Service/Arbitration layer above the Guard — whoever passes the weak Guard triggers alloc() and routes the pool away from the intended recipients." },
362
+ { "role": "buyer", "basis": "If the pool was funded with escrowed buyer funds, a hijacked alloc() drains that escrow leg." }
363
+ ],
364
+ "gain_paths": [
365
+ { "role": "neutral", "path": "Any caller whose passport satisfies the weak Guard (no Signer binding, no time-lock) triggers alloc() and takes the distribution defined by the sharing lines.", "viability": "viable", "gate": "Neither caller identity nor time constrains the trigger — the Guard pass itself is the only gate." }
366
+ ]
367
+ }
368
+ }
369
+ ]
370
+ },
371
+ {
372
+ "rule_id": "R-A-4-01",
373
+ "dimension": "lifecycle",
374
+ "trigger": "caller-specified guard with no matching Allocator — silent return causes funds to be stuck",
375
+ "cases": [
376
+ {
377
+ "when": { "all": [
378
+ { "field": "allocators_config_present", "op": "eq", "value": true },
379
+ { "field": "allocators_count", "op": "gt", "value": 1 },
380
+ { "field": "has_fallback_allocator", "op": "falsy" }
381
+ ] },
382
+ "level": "critical",
383
+ "title": "caller-specified guard with no matching Allocator — silent return causes funds to be stuck",
384
+ "description": "Multi-Allocation configuration (${allocators_count} Allocators) without alternative Allocator. alloc() is driven by the caller explicitly specifying an Allocator via alloc_by_guard: if the guard address does not match any allocators[].guard, alloc() silently returns (no error, no distribution), funds remain stuck in Allocation.balance, and the caller gets no immediate signal. Linked to guard-risk.ts R-X1-05.",
385
+ "scenario": "Caller passes a guard address not present in allocators[] (e.g. wrong Guard object, or order state not matching any terminal node)",
386
+ "mitigation": "1) The caller should verify alloc_by_guard ∈ allocators[].guard address set before calling alloc(). 2) Provide an alternative Allocator and document the caller's retry strategy. 3) Caller should check balance==0 after alloc() to detect no-match.",
387
+ "evidence": "allocators=${allocators_count}, hasFallback=${has_fallback_allocator_display}",
388
+ "stakeholders": ["owner", "service_provider", "system"],
389
+ "exposure": {
390
+ "loss_parties": [
391
+ { "role": "buyer", "basis": "A no-match alloc_by_guard call silently distributes nothing — the escrowed order funds sit frozen in Allocation.balance with no error to surface the miss." },
392
+ { "role": "merchant", "basis": "The merchant share stays frozen with the pool until a caller retries with a matching guard address." }
393
+ ],
394
+ "gain_paths": []
395
+ }
396
+ }
397
+ ]
398
+ },
399
+ {
400
+ "rule_id": "R-A-4-02",
401
+ "dimension": "lifecycle",
402
+ "trigger": "Multi-Allocation without mutually exclusive Guard conditions (design clarity issue, not a correctness requirement)",
403
+ "cases": [
404
+ {
405
+ "when": { "all": [
406
+ { "field": "allocators_config_present", "op": "eq", "value": true },
407
+ { "field": "allocators_count", "op": "gt", "value": 1 },
408
+ { "field": "guard_conditions_mutually_exclusive", "op": "falsy" }
409
+ ] },
410
+ "level": "medium",
411
+ "title": "Multi-Allocation without mutually exclusive Guard conditions",
412
+ "description": "Multi-Allocation (${allocators_count} Allocators) without verified mutual exclusion. Under caller-specified guard semantics, the caller explicitly selects an Allocator via alloc_by_guard, so there is no correctness problem of \"the latter is unreachable\"; however, if two Guard conditions can both pass simultaneously and the caller has no explicit selection strategy, the caller may be confused or bind to an unexpected path.",
413
+ "scenario": "Two Guard conditions overlap (e.g. amount<1000 and amount<500), caller Passport satisfies both",
414
+ "mitigation": "It is recommended that Guard conditions be strictly mutually exclusive (e.g. amount<1000 vs amount>=1000) to avoid caller confusion; alternatively, document explicitly which path the caller should prefer.",
415
+ "evidence": "allocators=${allocators_count}, mutuallyExclusive=${mutually_exclusive_display}",
416
+ "stakeholders": ["owner"]
417
+ }
418
+ ]
419
+ },
420
+ {
421
+ "rule_id": "R-A-4-03",
422
+ "dimension": "lifecycle",
423
+ "trigger": "Pure Amount mode without Surplus — residual balance reentrancy",
424
+ "cases": [
425
+ {
426
+ "when": { "field": "pure_amount_index", "op": "present" },
427
+ "level": "low",
428
+ "title": "Pure Amount mode without Surplus — residual balance reentrancy",
429
+ "description": "Allocator ${pure_amount_index} uses pure Amount mode (no Rate, no Surplus). After alloc(), if fix < balance, residual funds remain in Allocation.balance and can be claimed by re-triggering alloc(). Linked to guard-risk.ts reentrancy low.",
430
+ "scenario": "Pure Amount mode leaves residual balance",
431
+ "mitigation": "1) Preferred: add a Surplus sharing to absorb remainder. 2) Or use Rate mode. 3) Or add anti-reentrancy Guard check: logic_not(query('order.allocation some', object=order)).",
432
+ "evidence": "allocator[${pure_amount_index}].mode=pure-amount",
433
+ "stakeholders": ["owner", "system"]
434
+ }
435
+ ]
436
+ },
437
+ {
438
+ "rule_id": "R-A-5-01",
439
+ "dimension": "cross_object",
440
+ "trigger": "Order already has an Allocation bound (1:1 constraint)",
441
+ "cases": [
442
+ {
443
+ "when": { "field": "order_already_has_allocation", "op": "truthy" },
444
+ "level": "high",
445
+ "title": "Order already has an Allocation — 1:1 constraint violation",
446
+ "description": "Order ${bound_order_paren_display} already has an Allocation bound. Move layer will abort with E_ALLOCATION_ALREADY_SPECIFIED when attempting to bind a second Allocation.",
447
+ "scenario": "Attempting to bind a second Allocation to the same Order",
448
+ "mitigation": "Use the existing Allocation, or unbind it first (if supported), or create a new Order.",
449
+ "evidence": "bound_order=${bound_order_display}, alreadyHasAllocation=${order_already_has_allocation}",
450
+ "stakeholders": ["owner", "service_provider"]
451
+ }
452
+ ]
453
+ },
454
+ {
455
+ "rule_id": "R-A-5-02",
456
+ "dimension": "cross_object",
457
+ "trigger": "payment_info missing for alloc() — ENO_PAYMENT_INFO",
458
+ "cases": [
459
+ {
460
+ "when": { "all": [
461
+ { "field": "has_payment_info", "op": "falsy" },
462
+ { "field": "operation_type", "op": "eq", "value": "alloc_by_guard" }
463
+ ] },
464
+ "level": "high",
465
+ "title": "payment_info missing — alloc() will abort with ENO_PAYMENT_INFO",
466
+ "description": "Allocation has no payment_info set. Move alloc() requires payment_info.is_some() at step 1 (pre_check). The entire alloc() transaction will revert, funds remain in Allocation.",
467
+ "scenario": "Triggering alloc() before setting payment_info",
468
+ "mitigation": "Ensure payment_info is set during Allocation creation (CallAllocation_Create requires payment_info field).",
469
+ "evidence": "has_payment_info=false",
470
+ "stakeholders": ["owner"]
471
+ }
472
+ ]
473
+ },
474
+ {
475
+ "rule_id": "R-A-5-03",
476
+ "dimension": "cross_object",
477
+ "trigger": "MAX_ALLOCATOR_COUNT not synced to onchain-constants.ts",
478
+ "cases": [
479
+ {
480
+ "when": { "field": "always_true", "op": "eq", "value": true },
481
+ "level": "low",
482
+ "title": "MAX_ALLOCATOR_COUNT not synced to onchain-constants.ts",
483
+ "description": "The Move layer defines MAX_ALLOCATOR_COUNT=${max_allocator_count}, but onchain-constants.ts does NOT export this constant. SDK allocation.ts:318 defines it locally, creating a double-definition risk. MCP knowledge imports the local definition.",
484
+ "scenario": "Constant sync drift between Move / SDK / MCP",
485
+ "mitigation": "1) Add MAX_ALLOCATOR_COUNT=100 to onchain-constants.ts. 2) Update SDK allocation.ts to import from onchain-constants.js. 3) Delete local definition.",
486
+ "evidence": "MAX_ALLOCATOR_COUNT=${max_allocator_count} (local), not in onchain-constants.ts",
487
+ "stakeholders": ["system"]
488
+ }
489
+ ]
490
+ }
491
+ ]
492
+ }