@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,706 @@
1
+ {
2
+ "comment": "Machine rule pack (R-M) — declarative form of the retired in-code Machine risk rules (43 rules across 5 dimensions). Facts are produced by the kernel extractor (machine-risk.ts, bound to MAX_NODE_COUNT and USER_DEFINED_PERM_INDEX_START); rules only reference fact names. Graph walks (entry/terminal/orphan scan, per-node pair counting, per-pair forward counting, duplicate names, unachievable-threshold classification, per-forward permission scans, published-object cross-checks) are sunk into the extractor as first-offender facts. Rules whose retired check had no runtime detection (design guidance only) are catalog stubs: they carry the full wording but a never-true condition, so the finding set matches the retired code exactly. 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
+ "has_entry": "At least one Pair has prev_node='' (the workflow entry point).",
5
+ "has_terminal": "At least one node has no outgoing Pair (a terminal exists).",
6
+ "first_orphaned_node_name": "First-offender — name of the first node with neither an entry/prev reference nor any incoming Pair (absent when none).",
7
+ "node_count": "Number of nodes in the Machine JSON.",
8
+ "node_count_over_limit": "node_count exceeds MAX_NODE_COUNT (chain-limit comparison sunk into the extractor).",
9
+ "max_node_count": "KERNEL CONSTANT — nodes per Machine cap (MAX_NODE_COUNT).",
10
+ "first_overpair_node_name": "First-offender — next_node of the first node owning more than 40 incoming Pairs (absent when none).",
11
+ "first_overpair_count": "That node's Pair count.",
12
+ "first_overforward_prev": "First-offender — prev_node of the first Pair with more than 20 Forwards (absent when none).",
13
+ "first_overforward_next": "That Pair's next_node.",
14
+ "first_overforward_count": "That Pair's Forward count.",
15
+ "duplicate_names_display": "Duplicated node names (deduped, first-occurrence order), ', '-joined — empty when names are unique.",
16
+ "unachievable_present": "At least one Pair's threshold exceeds the sum of its distinct forward weights (machine-topology analysis sunk into the extractor).",
17
+ "first_unachievable_is_multi": "The first unachievable Pair is the multi-operator variant (threshold > 1 with fewer distinct forwards than the threshold).",
18
+ "first_unachievable_detail": "Rendered first-offender detail for the unachievable Pair, including the topology reason.",
19
+ "first_missing_guard_forward_name": "First-offender — name of the first Forward referencing a Guard outside the published set (absent when none).",
20
+ "first_missing_guard_guard": "That Forward's Guard address.",
21
+ "first_retained_no_guard_forward_name": "First-offender — name of the first Forward carrying retained_submission without any Guard (absent when none).",
22
+ "first_noperm_forward_name": "First-offender — name of the first Forward with neither namedOperator nor permissionIndex (absent when none).",
23
+ "first_noperm_prev": "That Forward's Pair prev_node.",
24
+ "first_noperm_next": "That Forward's Pair next_node.",
25
+ "first_both_forward_name": "First-offender — name of the first Forward with BOTH namedOperator and permissionIndex set (absent when none).",
26
+ "first_both_prev": "That Forward's Pair prev_node.",
27
+ "first_both_next": "That Forward's Pair next_node.",
28
+ "first_lowperm_forward_name": "First-offender — name of the first Forward whose permissionIndex is below USER_DEFINED_PERM_INDEX_START (absent when none).",
29
+ "first_lowperm_prev": "That Forward's Pair prev_node.",
30
+ "first_lowperm_next": "That Forward's Pair next_node.",
31
+ "first_lowperm_index": "That Forward's permissionIndex value.",
32
+ "min_perm_index": "KERNEL CONSTANT — first user-defined permission index (USER_DEFINED_PERM_INDEX_START).",
33
+ "mainnet_without_testnet": "Network is mainnet and the testnet test has not passed.",
34
+ "missing_guards_display": "Referenced Guard addresses missing from the published set, ', '-joined — empty when all are published.",
35
+ "always_true": "Extractor sentinel — unconditionally true; marks catalog stubs (via eq false) and documentation."
36
+ },
37
+ "rules": [
38
+ {
39
+ "rule_id": "R-M1-01",
40
+ "dimension": "structural",
41
+ "trigger": "Check if any pair has prev_node === ''",
42
+ "cases": [
43
+ {
44
+ "when": { "field": "has_entry", "op": "eq", "value": false },
45
+ "level": "critical",
46
+ "title": "No entry point",
47
+ "description": "Machine has no Pair with prev_node='' (no entry point). Workflow cannot start.",
48
+ "mitigation": "Add at least one Pair with prev_node='' to serve as entry point.",
49
+ "evidence": "No Pair with prev_node='' found. Workflow cannot start.",
50
+ "exposure": {
51
+ "loss_parties": [
52
+ { "role": "buyer", "basis": "With no entry Pair the workflow can never start: escrowed order funds sit in the Allocation and can be neither distributed nor refunded." },
53
+ { "role": "merchant", "basis": "The merchant revenue share of the same unstartable orders freezes with them." }
54
+ ],
55
+ "gain_paths": []
56
+ }
57
+ }
58
+ ]
59
+ },
60
+ {
61
+ "rule_id": "R-M1-02",
62
+ "dimension": "structural",
63
+ "trigger": "Check if any node has no outgoing Pair",
64
+ "cases": [
65
+ {
66
+ "when": { "field": "has_terminal", "op": "eq", "value": false },
67
+ "level": "critical",
68
+ "title": "No terminal node",
69
+ "description": "Machine has no terminal node (all nodes have outgoing Pairs). Workflow never completes.",
70
+ "mitigation": "Designate at least one node as terminal (no outgoing Pair) and bind Allocator to it.",
71
+ "evidence": "No terminal node found. Workflow never completes.",
72
+ "exposure": {
73
+ "loss_parties": [
74
+ { "role": "buyer", "basis": "With no terminal node the workflow never completes, so the terminal allocation never executes — escrowed order funds are frozen indefinitely." },
75
+ { "role": "merchant", "basis": "The merchant revenue share of the same never-completing orders freezes with them." }
76
+ ],
77
+ "gain_paths": []
78
+ }
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "rule_id": "R-M1-03",
84
+ "dimension": "structural",
85
+ "trigger": "Find nodes with no outgoing Pair that are not intended terminals — catalog stub: the retired check was not implemented",
86
+ "cases": [
87
+ {
88
+ "when": { "field": "always_true", "op": "eq", "value": false },
89
+ "level": "medium",
90
+ "title": "Dead-end node (non-terminal)",
91
+ "description": "Non-terminal node has no outgoing Pair. Workflow stalls at this node.",
92
+ "mitigation": "Add outgoing Pair or designate as terminal with Allocator."
93
+ }
94
+ ]
95
+ },
96
+ {
97
+ "rule_id": "R-M1-04",
98
+ "dimension": "structural",
99
+ "trigger": "Find non-entry nodes with no incoming Pair",
100
+ "cases": [
101
+ {
102
+ "when": { "field": "first_orphaned_node_name", "op": "present" },
103
+ "level": "high",
104
+ "title": "Orphaned node",
105
+ "description": "Node has no incoming Pair (except entry). Unreachable.",
106
+ "mitigation": "Add Pair from existing node to this orphaned node, or remove it.",
107
+ "evidence": "Node \"${first_orphaned_node_name}\" is orphaned (no incoming Pair)."
108
+ }
109
+ ]
110
+ },
111
+ {
112
+ "rule_id": "R-M1-05",
113
+ "dimension": "structural",
114
+ "trigger": "Analyze threshold achievability across competing Pairs — catalog stub: the retired check was not implemented",
115
+ "cases": [
116
+ {
117
+ "when": { "field": "always_true", "op": "eq", "value": false },
118
+ "level": "high",
119
+ "title": "Dead branch (competing Pair always loses)",
120
+ "description": "A competing Pair's threshold can never be met because users always prefer another path.",
121
+ "mitigation": "Make thresholds balanced, or remove the dead branch."
122
+ }
123
+ ]
124
+ },
125
+ {
126
+ "rule_id": "R-M1-06",
127
+ "dimension": "structural",
128
+ "trigger": "DFS cycle detection — catalog stub: the retired check was not implemented",
129
+ "cases": [
130
+ {
131
+ "when": { "field": "always_true", "op": "eq", "value": false },
132
+ "level": "critical",
133
+ "title": "Cycle in DAG",
134
+ "description": "Workflow has a cycle. Nodes reference each other circularly.",
135
+ "mitigation": "Break the cycle by removing one Pair."
136
+ }
137
+ ]
138
+ },
139
+ {
140
+ "rule_id": "R-M1-07",
141
+ "dimension": "structural",
142
+ "trigger": "nodes.length > ${max_node_count}",
143
+ "cases": [
144
+ {
145
+ "when": { "field": "node_count_over_limit", "op": "eq", "value": true },
146
+ "level": "critical",
147
+ "title": "Exceeds MAX_NODE_COUNT (100)",
148
+ "description": "Node count exceeds on-chain limit. Publish will fail.",
149
+ "mitigation": "Reduce node count or split into multiple Machines.",
150
+ "evidence": "Node count ${node_count} exceeds MAX_NODE_COUNT (${max_node_count})."
151
+ }
152
+ ]
153
+ },
154
+ {
155
+ "rule_id": "R-M1-08",
156
+ "dimension": "structural",
157
+ "trigger": "Find node where pairs.length > 40",
158
+ "cases": [
159
+ {
160
+ "when": { "field": "first_overpair_node_name", "op": "present" },
161
+ "level": "high",
162
+ "title": "Exceeds MAX_NODE_PAIR_COUNT (40)",
163
+ "description": "A single node's Pairs exceed on-chain limit. Publish will fail.",
164
+ "mitigation": "Split node or simplify branches to reduce Pair count per node.",
165
+ "evidence": "Node \"${first_overpair_node_name}\" has ${first_overpair_count} Pairs, exceeds MAX_NODE_PAIR_COUNT (40)."
166
+ }
167
+ ]
168
+ },
169
+ {
170
+ "rule_id": "R-M1-09",
171
+ "dimension": "structural",
172
+ "trigger": "Find Pair where forwards.length > 20",
173
+ "cases": [
174
+ {
175
+ "when": { "field": "first_overforward_count", "op": "present" },
176
+ "level": "high",
177
+ "title": "Exceeds MAX_FORWARD_COUNT (20)",
178
+ "description": "A single Pair's Forwards exceed on-chain limit. Publish will fail.",
179
+ "mitigation": "Split Pair or merge Forwards to reduce Forward count per Pair.",
180
+ "evidence": "Pair (${first_overforward_prev} -> ${first_overforward_next}) has ${first_overforward_count} Forwards, exceeds MAX_FORWARD_COUNT (20)."
181
+ }
182
+ ]
183
+ },
184
+ {
185
+ "rule_id": "R-M1-10",
186
+ "dimension": "structural",
187
+ "trigger": "Find duplicate names in nodes array",
188
+ "cases": [
189
+ {
190
+ "when": { "field": "duplicate_names_display", "op": "truthy" },
191
+ "level": "critical",
192
+ "title": "Duplicate node name",
193
+ "description": "Two nodes have the same name. On-chain will reject.",
194
+ "mitigation": "Rename one of the duplicates.",
195
+ "evidence": "Duplicate node names: ${duplicate_names_display}"
196
+ }
197
+ ]
198
+ },
199
+ {
200
+ "rule_id": "R-M1-11",
201
+ "dimension": "structural",
202
+ "trigger": "Match node names against regex /(^|_)(disputed?|refund(?:ed)?|arbitration|arb)(_|$)/i (catches both exact names like 'refunded' and compound fund-flow terminals like 'deposit_refunded'/'deposit_deducted'; business states like 'return_approved'/'damage_confirmed'/'cancelled'/'returned' do NOT match) — catalog stub: the retired check was not implemented",
203
+ "cases": [
204
+ {
205
+ "when": { "field": "always_true", "op": "eq", "value": false },
206
+ "level": "critical",
207
+ "title": "Dispute anti-pattern — machine illegally models dispute flow",
208
+ "description": "Machine contains nodes named 'disputed', 'refunded', 'arb', 'arbitration', 'dispute', or 'refund'. This is a CRITICAL design anti-pattern because dispute is INDEPENDENT of the machine workflow. Dispute flows through: Order → dispute filed on the Arbitration → Arb case → arbiter ruling → fee withdrawal by order holder. Arbitrators are configured in the Arbitration's voting_guard list, NOT in Permission. Merchants who model dispute in the machine (e.g., 'disputed → refunded' forward guarded by Permission index 1500) create dead-end paths because no one has Permission 1500 — arbitrators are NOT Permission holders.",
209
+ "mitigation": "Remove all dispute/refund nodes from the machine. Instead: (1) bind an Arbitration object to the Service via Service.arbitrations, (2) configure arbitrators via Arbitration.voting_guard_add, (3) deposit compensation_fund to the Service. Disputes are then filed against the order within the Arbitration object — completely independent of the machine workflow."
210
+ }
211
+ ]
212
+ },
213
+ {
214
+ "rule_id": "R-M1-12",
215
+ "dimension": "structural",
216
+ "trigger": "For each Pair compute sum(forward.weight) and compare with threshold; flag Pairs where sum < threshold (use machine-topology findUnachievableThresholds).",
217
+ "cases": [
218
+ {
219
+ "when": { "all": [
220
+ { "field": "unachievable_present", "op": "eq", "value": true },
221
+ { "field": "first_unachievable_is_multi", "op": "eq", "value": false }
222
+ ] },
223
+ "level": "critical",
224
+ "title": "Unreachable threshold — Pair can never migrate",
225
+ "description": "A Pair's threshold exceeds the sum of its forward weights. Each forward contributes its weight AT MOST ONCE: it is locked by the first operator that accomplishes it (the session accomplishment), and a second operator re-executing the same forward aborts E_NOT_THE_HOLDER. The maximum achievable weight of a Pair is therefore the sum of its DISTINCT forward weights. When that sum < threshold, the transition can never migrate and the workflow is permanently stuck at this node.",
226
+ "mitigation": "Raise forward weights so sum(weights) >= threshold, or lower the threshold. For multi-operator cooperation add one DISTINCT forward per contributing operator (threshold N needs N distinct forwards, each weight ≥ 1).",
227
+ "evidence": "${first_unachievable_detail}",
228
+ "exposure": {
229
+ "loss_parties": [
230
+ { "role": "buyer", "basis": "The unachievable threshold means the transition can never migrate — orders stall at this node forever and their escrowed funds can be neither distributed nor refunded." },
231
+ { "role": "merchant", "basis": "The merchant revenue share of the same permanently stalled orders freezes with them." }
232
+ ],
233
+ "gain_paths": []
234
+ }
235
+ }
236
+ ]
237
+ },
238
+ {
239
+ "rule_id": "R-M1-13",
240
+ "dimension": "structural",
241
+ "trigger": "Flag Pairs where threshold > 1 and the count of distinct forwards < threshold (i.e. threshold cannot be met by that many different operators).",
242
+ "cases": [
243
+ {
244
+ "when": { "all": [
245
+ { "field": "unachievable_present", "op": "eq", "value": true },
246
+ { "field": "first_unachievable_is_multi", "op": "eq", "value": true }
247
+ ] },
248
+ "level": "high",
249
+ "title": "Single-forward multi-operator misuse — threshold > 1 with too few forwards",
250
+ "description": "A Pair with threshold > 1 has fewer distinct forwards than the threshold (with weight-1 forwards, or a single forward that can only ever be accomplished by ONE operator). Because a forward is single-operator-locked, N different people cannot all 'execute the same forward' — each contributor needs their OWN forward in the Pair. This either makes the transition unreachable or forces a single operator to control multiple forwards (defeating the cooperation design).",
251
+ "mitigation": "Model cooperation with parallel forwards: Pair { threshold: N, forwards: [begin_a (weight 1, operator A), begin_b (weight 1, operator B), ...] } — one distinct forward per contributing operator.",
252
+ "evidence": "${first_unachievable_detail}",
253
+ "exposure": {
254
+ "loss_parties": [
255
+ { "role": "buyer", "basis": "The transition is either unreachable or monopolized by one operator — orders that need this cooperative step stall here and their escrowed funds can be neither distributed nor refunded." },
256
+ { "role": "merchant", "basis": "The merchant revenue share of the same stalled cooperative orders freezes with them." }
257
+ ],
258
+ "gain_paths": []
259
+ }
260
+ }
261
+ ]
262
+ },
263
+ {
264
+ "rule_id": "R-M2-01",
265
+ "dimension": "guard_integration",
266
+ "trigger": "Check forward.guard against published_guards set",
267
+ "cases": [
268
+ {
269
+ "when": { "field": "first_missing_guard_forward_name", "op": "present" },
270
+ "level": "critical",
271
+ "title": "Guard not created",
272
+ "description": "Forward references a Guard that is not yet created on-chain. Forward execution will fail Guard verification.",
273
+ "mitigation": "Create the Guard object before publishing this Machine.",
274
+ "evidence": "Forward \"${first_missing_guard_forward_name}\" references Guard \"${first_missing_guard_guard}\" not in published_guards.",
275
+ "exposure": {
276
+ "loss_parties": [
277
+ { "role": "buyer", "basis": "The affected forward fails Guard verification every time it is attempted — orders that route through this Pair stall here and their escrowed funds freeze." },
278
+ { "role": "merchant", "basis": "The merchant revenue share of the same stalled orders freezes with them." }
279
+ ],
280
+ "gain_paths": []
281
+ }
282
+ }
283
+ ]
284
+ },
285
+ {
286
+ "rule_id": "R-M2-02",
287
+ "dimension": "guard_integration",
288
+ "trigger": "Check testnet test records for this Guard — catalog stub: the retired check was not implemented",
289
+ "cases": [
290
+ {
291
+ "when": { "field": "always_true", "op": "eq", "value": false },
292
+ "level": "high",
293
+ "title": "Guard not tested via gen_passport",
294
+ "description": "Guard has not been tested via gen_passport. Guard may have bugs, cannot be fixed after publish.",
295
+ "mitigation": "Run gen_passport on testnet before binding to Machine."
296
+ }
297
+ ]
298
+ },
299
+ {
300
+ "rule_id": "R-M2-03",
301
+ "dimension": "guard_integration",
302
+ "trigger": "Verify all Guards tested before Machine publish — catalog stub: the retired check was not implemented",
303
+ "cases": [
304
+ {
305
+ "when": { "field": "always_true", "op": "eq", "value": false },
306
+ "level": "critical",
307
+ "title": "Guard + Machine immutability deadlock",
308
+ "description": "After Machine publish, a Guard bug is discovered. Guard is immutable (cannot be fixed), Machine is immutable (cannot be rebound).",
309
+ "mitigation": "Keep Machine unpublished until all Guards are verified."
310
+ }
311
+ ]
312
+ },
313
+ {
314
+ "rule_id": "R-M2-04",
315
+ "dimension": "guard_integration",
316
+ "trigger": "Cross-check forward.retained_submission against Guard table entries",
317
+ "cases": [
318
+ {
319
+ "when": { "field": "first_retained_no_guard_forward_name", "op": "present" },
320
+ "level": "high",
321
+ "title": "retained_submission index mismatch",
322
+ "description": "Forward's retained_submission key does not correspond to Guard table b_submission=true entry. Retained data fails or is incorrect.",
323
+ "mitigation": "Align retained_submission key with Guard table b_submission=true identifier.",
324
+ "evidence": "Forward \"${first_retained_no_guard_forward_name}\" has retained_submission but no Guard. retained_submission requires a Guard."
325
+ }
326
+ ]
327
+ },
328
+ {
329
+ "rule_id": "R-M2-05",
330
+ "dimension": "guard_integration",
331
+ "trigger": "For each Guard scene, verify anti-reentry Guard is configured (see Guard semantic layer R-X1-14) — catalog stub: the retired check was not implemented",
332
+ "cases": [
333
+ {
334
+ "when": { "field": "always_true", "op": "eq", "value": false },
335
+ "level": "high",
336
+ "title": "Guard reentry risk",
337
+ "description": "Guard lacks anti-reentry mechanism (see Guard R-X1-14). Risk of duplicate execution or vote manipulation.",
338
+ "mitigation": "Add anti-reentry Guard for each scenario (see Guard semantic layer R-X1-14)."
339
+ }
340
+ ]
341
+ },
342
+ {
343
+ "rule_id": "R-M2-06",
344
+ "dimension": "guard_integration",
345
+ "trigger": "Cross-check Guard scene against Forward business purpose — catalog stub: the retired check was not implemented",
346
+ "cases": [
347
+ {
348
+ "when": { "field": "always_true", "op": "eq", "value": false },
349
+ "level": "medium",
350
+ "title": "Guard scene mismatch",
351
+ "description": "Forward's bound Guard scene does not match Forward's business (e.g., Forward uses a reward-claim guard instead of machine_forward_guard).",
352
+ "mitigation": "Use the correct Guard scene (machine_forward_guard)."
353
+ }
354
+ ]
355
+ },
356
+ {
357
+ "rule_id": "R-M2-07",
358
+ "dimension": "guard_integration",
359
+ "trigger": "Identify cross-Machine Guard references and detect cycles — catalog stub: the retired check was not implemented",
360
+ "cases": [
361
+ {
362
+ "when": { "field": "always_true", "op": "eq", "value": false },
363
+ "level": "critical",
364
+ "title": "Cross-Machine Guard dependency cycle",
365
+ "description": "Machine A depends on Machine B (via Guard), B depends on A. Circular dependency.",
366
+ "mitigation": "Ensure cross-Machine dependencies are unidirectional."
367
+ }
368
+ ]
369
+ },
370
+ {
371
+ "rule_id": "R-M2-08",
372
+ "dimension": "guard_integration",
373
+ "trigger": "Cross-check Guard table object references against published objects set — catalog stub: the retired check was not implemented",
374
+ "cases": [
375
+ {
376
+ "when": { "field": "always_true", "op": "eq", "value": false },
377
+ "level": "high",
378
+ "title": "Guard references unpublished object",
379
+ "description": "Guard table references an object (e.g., Service) that is not yet published.",
380
+ "mitigation": "Use P16 circular reference pattern (name instead of address), or publish referenced objects first."
381
+ }
382
+ ]
383
+ },
384
+ {
385
+ "rule_id": "R-M3-01",
386
+ "dimension": "permission",
387
+ "trigger": "Check each forward has at least one of namedOperator or permissionIndex",
388
+ "cases": [
389
+ {
390
+ "when": { "field": "first_noperm_forward_name", "op": "present" },
391
+ "level": "critical",
392
+ "title": "Forward without permission",
393
+ "description": "Forward has neither namedOperator nor permissionIndex. Cannot be executed.",
394
+ "mitigation": "Set namedOperator='' for OrderHolder, or set permissionIndex.",
395
+ "evidence": "Forward \"${first_noperm_forward_name}\" in Pair (${first_noperm_prev} -> ${first_noperm_next}) has no permission.",
396
+ "exposure": {
397
+ "loss_parties": [
398
+ { "role": "buyer", "basis": "The affected forward has no executor — orders that route through this Pair can never advance past it and their escrowed funds freeze." },
399
+ { "role": "merchant", "basis": "The merchant revenue share of the same unadvanceable orders freezes with them." }
400
+ ],
401
+ "gain_paths": []
402
+ }
403
+ }
404
+ ]
405
+ },
406
+ {
407
+ "rule_id": "R-M3-02",
408
+ "dimension": "permission",
409
+ "trigger": "Check permission_index < Permission.indices.length — catalog stub: the retired check was not implemented",
410
+ "cases": [
411
+ {
412
+ "when": { "field": "always_true", "op": "eq", "value": false },
413
+ "level": "critical",
414
+ "title": "permissionIndex out of bounds",
415
+ "description": "Forward's permissionIndex >= Permission.indices.length. Execution will fail.",
416
+ "mitigation": "Use a valid permission index or extend Permission.indices."
417
+ }
418
+ ]
419
+ },
420
+ {
421
+ "rule_id": "R-M3-03",
422
+ "dimension": "permission",
423
+ "trigger": "Detect Permission object update that reorders indices — catalog stub: the retired check was not implemented",
424
+ "cases": [
425
+ {
426
+ "when": { "field": "always_true", "op": "eq", "value": false },
427
+ "level": "high",
428
+ "title": "Permission rotation failure",
429
+ "description": "Permission object updated, indices order changed. Original permissionIndex now points to wrong permission.",
430
+ "mitigation": "Use custom Permission; document index meanings; avoid frequent Permission updates."
431
+ }
432
+ ]
433
+ },
434
+ {
435
+ "rule_id": "R-M3-04",
436
+ "dimension": "permission",
437
+ "trigger": "Find Forwards with namedOperator='' on non-customer-operation nodes — catalog stub: the retired check was not implemented",
438
+ "cases": [
439
+ {
440
+ "when": { "field": "always_true", "op": "eq", "value": false },
441
+ "level": "medium",
442
+ "title": "OrderHolder misuse",
443
+ "description": "namedOperator='' used in non-customer-operation scenarios. Non-intended personnel gain operation permission.",
444
+ "mitigation": "Clarify ''=OrderHolder (customer), not 'anyone'. Use namedOperator for specific roles."
445
+ }
446
+ ]
447
+ },
448
+ {
449
+ "rule_id": "R-M3-05",
450
+ "dimension": "permission",
451
+ "trigger": "Verify progress_namedOperator is provided in Progress creation — catalog stub: the retired check was not implemented",
452
+ "cases": [
453
+ {
454
+ "when": { "field": "always_true", "op": "eq", "value": false },
455
+ "level": "high",
456
+ "title": "NamedOperator not assigned at Progress creation",
457
+ "description": "Forward expects namedOperator role but Progress doesn't have it assigned. Note: MCP API layer supports progress_new.progress_namedOperator (SDK translates to namedOperator_add), but the Move layer's Progress creation does NOT accept it (see 06 §14.5).",
458
+ "mitigation": "Pass progress_namedOperator in progress_new, or call namedOperator_add separately."
459
+ }
460
+ ]
461
+ },
462
+ {
463
+ "rule_id": "R-M3-06",
464
+ "dimension": "permission",
465
+ "trigger": "Analyze permission distribution across parties — catalog stub: the retired check was not implemented",
466
+ "cases": [
467
+ {
468
+ "when": { "field": "always_true", "op": "eq", "value": false },
469
+ "level": "medium",
470
+ "title": "Permission game imbalance",
471
+ "description": "One party has excessive permission, can unilaterally advance workflow. Game theory imbalance.",
472
+ "mitigation": "Use dual-signature (threshold=2) or multi-signature mechanism to balance power."
473
+ }
474
+ ]
475
+ },
476
+ {
477
+ "rule_id": "R-M3-07",
478
+ "dimension": "permission",
479
+ "trigger": "Find Forwards with both namedOperator and permissionIndex set",
480
+ "cases": [
481
+ {
482
+ "when": { "field": "first_both_forward_name", "op": "present" },
483
+ "level": "medium",
484
+ "title": "Permission combination OR semantic misuse",
485
+ "description": "Both namedOperator and permissionIndex set, but OR semantic not understood. More people than expected can execute Forward.",
486
+ "mitigation": "Clarify that when both permissions are non-null, it is OR relation (either can execute).",
487
+ "evidence": "Forward \"${first_both_forward_name}\" in Pair (${first_both_prev} -> ${first_both_next}) has both namedOperator and permissionIndex (OR semantic)."
488
+ }
489
+ ]
490
+ },
491
+ {
492
+ "rule_id": "R-M3-08",
493
+ "dimension": "permission",
494
+ "trigger": "Check each forward with permission_index < 1000",
495
+ "cases": [
496
+ {
497
+ "when": { "field": "first_lowperm_forward_name", "op": "present" },
498
+ "level": "critical",
499
+ "title": "permissionIndex below USER_DEFINED_PERM_INDEX_START (1000)",
500
+ "description": "Forward's permissionIndex < 1000. On-chain constant USER_DEFINED_PERM_INDEX_START = 1000 reserves indexes 0-999 for built-in permissions. Using index < 1000 causes confusion with built-in permissions and is a hard on-chain constraint (see doc 06 §4.4).",
501
+ "mitigation": "Use permission_index >= 1000 (e.g., 1000, 1001, 1002, ...). Reserve 0-999 for built-in permissions.",
502
+ "evidence": "Forward \"${first_lowperm_forward_name}\" in Pair (${first_lowperm_prev} -> ${first_lowperm_next}) has permission_index=${first_lowperm_index} < ${min_perm_index}. Indexes 0-999 are reserved for built-in permissions."
503
+ }
504
+ ]
505
+ },
506
+ {
507
+ "rule_id": "R-M4-01",
508
+ "dimension": "immutability",
509
+ "trigger": "Check backup_created flag — catalog stub: the retired check was not implemented",
510
+ "cases": [
511
+ {
512
+ "when": { "field": "always_true", "op": "eq", "value": false },
513
+ "level": "high",
514
+ "title": "No backup before publish",
515
+ "description": "machineNode2file export not created before publish. Cannot restore if publish fails.",
516
+ "mitigation": "Run machineNode2file before publish to create backup."
517
+ }
518
+ ]
519
+ },
520
+ {
521
+ "rule_id": "R-M4-02",
522
+ "dimension": "immutability",
523
+ "trigger": "Check network === 'mainnet' && !testnet_test_passed",
524
+ "cases": [
525
+ {
526
+ "when": { "field": "mainnet_without_testnet", "op": "eq", "value": true },
527
+ "level": "medium",
528
+ "title": "No testnet verification before mainnet",
529
+ "description": "Directly publishing to mainnet without testnet verification. Potential bugs may cause fund loss.",
530
+ "mitigation": "Test on testnet first. Verify Progress runs end-to-end.",
531
+ "evidence": "Mainnet publish attempted without testnet test passing."
532
+ }
533
+ ]
534
+ },
535
+ {
536
+ "rule_id": "R-M4-03",
537
+ "dimension": "immutability",
538
+ "trigger": "Check if all required Guards are created and bound",
539
+ "cases": [
540
+ {
541
+ "when": { "field": "missing_guards_display", "op": "truthy" },
542
+ "level": "critical",
543
+ "title": "Guards not all created before publish",
544
+ "description": "Some Forward.guard is still null, but design requires Guard. Cannot add Guard after publish (immutability deadlock).",
545
+ "mitigation": "Create and bind all Guards before publishing Machine.",
546
+ "evidence": "Guards not all created before publish. Missing: ${missing_guards_display}"
547
+ }
548
+ ]
549
+ },
550
+ {
551
+ "rule_id": "R-M4-04",
552
+ "dimension": "immutability",
553
+ "trigger": "Verify dependency order: Permission → Machine(unpublished) → Guard → bind → publish — catalog stub: the retired check was not implemented",
554
+ "cases": [
555
+ {
556
+ "when": { "field": "always_true", "op": "eq", "value": false },
557
+ "level": "critical",
558
+ "title": "Publish order incorrect",
559
+ "description": "Attempting to publish Machine before creating Guards. Guards cannot bind to already-published Machine.",
560
+ "mitigation": "Follow dependency order: Permission → Machine(unpublished) → Guard → bind → publish."
561
+ }
562
+ ]
563
+ },
564
+ {
565
+ "rule_id": "R-M4-05",
566
+ "dimension": "immutability",
567
+ "trigger": "Check if terminal nodes have Allocator mapping — catalog stub: the retired check was not implemented",
568
+ "cases": [
569
+ {
570
+ "when": { "field": "always_true", "op": "eq", "value": false },
571
+ "level": "medium",
572
+ "title": "Allocation not configured",
573
+ "description": "Terminal node not mapped to Allocator. Funds cannot be distributed after workflow completes.",
574
+ "mitigation": "Configure Allocator for each terminal node."
575
+ }
576
+ ]
577
+ },
578
+ {
579
+ "rule_id": "R-M4-06",
580
+ "dimension": "immutability",
581
+ "trigger": "Check if machineNode2file backup created before clear operation — catalog stub: the retired check was not implemented",
582
+ "cases": [
583
+ {
584
+ "when": { "field": "always_true", "op": "eq", "value": false },
585
+ "level": "high",
586
+ "title": "clear operation without backup",
587
+ "description": "Executing node clear before exporting backup. All node data lost, cannot recover.",
588
+ "mitigation": "Run machineNode2file backup before any clear operation."
589
+ }
590
+ ]
591
+ },
592
+ {
593
+ "rule_id": "R-M5-01",
594
+ "dimension": "environment",
595
+ "trigger": "Check if Service object is in published_services set — catalog stub: the retired check was not implemented",
596
+ "cases": [
597
+ {
598
+ "when": { "field": "always_true", "op": "eq", "value": false },
599
+ "level": "high",
600
+ "title": "Service not created",
601
+ "description": "Machine design complete but Service not created. Machine cannot bind to Service.",
602
+ "mitigation": "Create Service first, then design/publish Machine."
603
+ }
604
+ ]
605
+ },
606
+ {
607
+ "rule_id": "R-M5-02",
608
+ "dimension": "environment",
609
+ "trigger": "Cross-check Machine's Permission against Service's Permission — catalog stub: the retired check was not implemented",
610
+ "cases": [
611
+ {
612
+ "when": { "field": "always_true", "op": "eq", "value": false },
613
+ "level": "high",
614
+ "title": "Permission object mismatch",
615
+ "description": "Machine's Permission differs from Service's Permission. Permission organization inconsistent, may cause operation failure.",
616
+ "mitigation": "Use the same Permission for Machine and Service (or explicitly document different organizations)."
617
+ }
618
+ ]
619
+ },
620
+ {
621
+ "rule_id": "R-M5-03",
622
+ "dimension": "environment",
623
+ "trigger": "Check if Service.order_allocators is configured for each terminal node — catalog stub: the retired check was not implemented",
624
+ "cases": [
625
+ {
626
+ "when": { "field": "always_true", "op": "eq", "value": false },
627
+ "level": "high",
628
+ "title": "Allocation configuration incomplete",
629
+ "description": "Service's order_allocators not configured or misconfigured. Terminal node funds cannot be distributed.",
630
+ "mitigation": "Configure Service.order_allocators, one Allocator per terminal node."
631
+ }
632
+ ]
633
+ },
634
+ {
635
+ "rule_id": "R-M5-04",
636
+ "dimension": "environment",
637
+ "trigger": "Check if Reward object is in published_rewards set — catalog stub: the retired check was not implemented",
638
+ "cases": [
639
+ {
640
+ "when": { "field": "always_true", "op": "eq", "value": false },
641
+ "level": "medium",
642
+ "title": "Reward object not created",
643
+ "description": "Reward incentive scenario referenced but Reward object not created.",
644
+ "mitigation": "Create Reward object first, then design Guard."
645
+ }
646
+ ]
647
+ },
648
+ {
649
+ "rule_id": "R-M5-05",
650
+ "dimension": "environment",
651
+ "trigger": "Check if Arbitration object is in published_arbitrations set — catalog stub: the retired check was not implemented",
652
+ "cases": [
653
+ {
654
+ "when": { "field": "always_true", "op": "eq", "value": false },
655
+ "level": "medium",
656
+ "title": "Arbitration object not created",
657
+ "description": "Arbitration scenario referenced but Arbitration object not created.",
658
+ "mitigation": "Create Arbitration object first."
659
+ }
660
+ ]
661
+ },
662
+ {
663
+ "rule_id": "R-M5-06",
664
+ "dimension": "environment",
665
+ "trigger": "Check machine_ref against published_machines set — catalog stub: the retired check was not implemented",
666
+ "cases": [
667
+ {
668
+ "when": { "field": "always_true", "op": "eq", "value": false },
669
+ "level": "critical",
670
+ "title": "Cross-Machine dependency not published",
671
+ "description": "Machine A depends on Machine B, but B is not published. Guard query for Machine B's Progress will fail. Dependency verification: indirect — Progress creation asserts the referenced Machine is published (see 06 §14.6).",
672
+ "mitigation": "Ensure upstream Machine is published first."
673
+ }
674
+ ]
675
+ },
676
+ {
677
+ "rule_id": "R-M5-07",
678
+ "dimension": "environment",
679
+ "trigger": "Check repository_ref against published repositories set — catalog stub: the retired check was not implemented",
680
+ "cases": [
681
+ {
682
+ "when": { "field": "always_true", "op": "eq", "value": false },
683
+ "level": "medium",
684
+ "title": "Repository not created",
685
+ "description": "Guard references Repository but not created. Guard query will fail.",
686
+ "mitigation": "Create and publish Repository first. Note: consensus_repositories is declarative-only (see 06 §14.4)."
687
+ }
688
+ ]
689
+ },
690
+ {
691
+ "rule_id": "R-M5-08",
692
+ "dimension": "environment",
693
+ "trigger": "Scan project environment for missing object references",
694
+ "cases": [
695
+ {
696
+ "when": { "field": "missing_guards_display", "op": "truthy" },
697
+ "level": "low",
698
+ "title": "Object dependency table incomplete",
699
+ "description": "Project object dependency table missing some objects. Design decisions based on incomplete information.",
700
+ "mitigation": "Use workflow-guidance.ts to scan complete project environment.",
701
+ "evidence": "Object dependency table incomplete. Missing Guards: ${missing_guards_display}"
702
+ }
703
+ ]
704
+ }
705
+ ]
706
+ }