@wowok/agent-mcp 3.4.3 → 3.4.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 (853) hide show
  1. package/dist/.build-stamp.json +3 -3
  2. package/dist/build-stamp.js +1 -0
  3. package/dist/chain-semantics/composition-truth.js +1 -1
  4. package/dist/chain-semantics/eval-order.js +1 -1
  5. package/dist/chain-semantics/freeze-map.js +1 -1
  6. package/dist/chain-semantics/fund-flow.js +1 -1
  7. package/dist/chain-semantics/object-graph.js +1 -1
  8. package/dist/composition/audit.js +1 -1
  9. package/dist/composition/compile.js +1 -1
  10. package/dist/composition/emit-phases.js +1 -1
  11. package/dist/composition/generate.js +1 -1
  12. package/dist/composition/guard-fill.js +1 -1
  13. package/dist/composition/input-normalize.js +1 -1
  14. package/dist/composition/materialize.js +1 -1
  15. package/dist/composition/mode-gates.js +1 -1
  16. package/dist/composition/plan.js +1 -1
  17. package/dist/composition/product-card.js +1 -1
  18. package/dist/composition/shape-expand.js +1 -0
  19. package/dist/config/judgment.js +1 -1
  20. package/dist/config/template-params.js +1 -1
  21. package/dist/data/sync/cdc.js +1 -1
  22. package/dist/data/sync/graphql-source.js +1 -1
  23. package/dist/evaluation/engine.js +1 -1
  24. package/dist/experience/realtime-feedback.js +1 -1
  25. package/dist/graph/onchain/expand.js +1 -1
  26. package/dist/graph/onchain/exposure.js +1 -1
  27. package/dist/graph/onchain/sdk-batch.js +1 -1
  28. package/dist/harness/entry-ignite-selfheal.js +1 -0
  29. package/dist/harness/forward-leg-preflight.js +1 -0
  30. package/dist/harness/recover.js +1 -1
  31. package/dist/keeper/detectors.js +1 -1
  32. package/dist/knowledge/allocator-rail-verifier.js +1 -1
  33. package/dist/knowledge/arb-operation-face.js +1 -0
  34. package/dist/knowledge/arbitration-rail-verifier.js +1 -1
  35. package/dist/knowledge/arbitration-templates.js +1 -1
  36. package/dist/knowledge/audit-rules.d.ts +15 -0
  37. package/dist/knowledge/audit-rules.js +1 -1
  38. package/dist/knowledge/baselines/rules/alloc_audit.json.good +310 -0
  39. package/dist/knowledge/baselines/rules/allocation.json.good +568 -0
  40. package/dist/knowledge/baselines/rules/arb.json.good +174 -0
  41. package/dist/knowledge/baselines/rules/arbitration.json.good +393 -0
  42. package/dist/knowledge/baselines/rules/bridge.json.good +197 -0
  43. package/dist/knowledge/baselines/rules/contact.json.good +152 -0
  44. package/dist/knowledge/baselines/rules/demand.json.good +158 -0
  45. package/dist/knowledge/baselines/rules/graph.json.good +534 -0
  46. package/dist/knowledge/baselines/rules/guard.json +18 -5
  47. package/dist/knowledge/baselines/rules/guard.json.good +1192 -0
  48. package/dist/knowledge/baselines/rules/machine.json.good +734 -0
  49. package/dist/knowledge/baselines/rules/oracle.json +1 -1
  50. package/dist/knowledge/baselines/rules/oracle.json.good +120 -0
  51. package/dist/knowledge/baselines/rules/order.json.good +549 -0
  52. package/dist/knowledge/baselines/rules/payment.json.good +205 -0
  53. package/dist/knowledge/baselines/rules/permission.json.good +330 -0
  54. package/dist/knowledge/baselines/rules/personal.json.good +139 -0
  55. package/dist/knowledge/baselines/rules/plan.json +343 -1
  56. package/dist/knowledge/baselines/rules/plan.json.good +1187 -0
  57. package/dist/knowledge/baselines/rules/progress.json.good +364 -0
  58. package/dist/knowledge/baselines/rules/proof.json.good +158 -0
  59. package/dist/knowledge/baselines/rules/registrar.json.good +159 -0
  60. package/dist/knowledge/baselines/rules/repository.json.good +244 -0
  61. package/dist/knowledge/baselines/rules/resource.json.good +117 -0
  62. package/dist/knowledge/baselines/rules/reward.json +10 -10
  63. package/dist/knowledge/baselines/rules/reward.json.good +586 -0
  64. package/dist/knowledge/baselines/rules/service.json.good +595 -0
  65. package/dist/knowledge/baselines/rules/treasury.json.good +440 -0
  66. package/dist/knowledge/baselines/rules/util.json.good +101 -0
  67. package/dist/knowledge/builtin-templates.d.ts +13 -1
  68. package/dist/knowledge/builtin-templates.js +1 -1
  69. package/dist/knowledge/chain-query-registry.js +1 -1
  70. package/dist/knowledge/discount-threshold.js +1 -1
  71. package/dist/knowledge/fee-param-bindings.js +1 -1
  72. package/dist/knowledge/fund-layer.d.ts +2 -0
  73. package/dist/knowledge/fund-layer.js +1 -1
  74. package/dist/knowledge/getting-started.js +1 -1
  75. package/dist/knowledge/guard-binding-table.js +1 -1
  76. package/dist/knowledge/guard-binding-verifier.js +1 -1
  77. package/dist/knowledge/guard-create-preflight.js +1 -0
  78. package/dist/knowledge/guard-field-cognition.js +1 -1
  79. package/dist/knowledge/guard-host-context.js +1 -1
  80. package/dist/knowledge/guard-leg-eval.js +1 -0
  81. package/dist/knowledge/guard-node-gates.js +1 -1
  82. package/dist/knowledge/guard-puzzle.js +1 -1
  83. package/dist/knowledge/guard-quality.js +1 -0
  84. package/dist/knowledge/guard-render.js +1 -1
  85. package/dist/knowledge/guard-risk.js +1 -1
  86. package/dist/knowledge/guard-semantic-walk.js +1 -0
  87. package/dist/knowledge/guard-templates.d.ts +1 -0
  88. package/dist/knowledge/guard-templates.js +1 -1
  89. package/dist/knowledge/guard-translation.js +1 -1
  90. package/dist/knowledge/index.js +1 -1
  91. package/dist/knowledge/industry-registry.js +1 -1
  92. package/dist/knowledge/jsonrpc-enum.js +1 -1
  93. package/dist/knowledge/param-schema.js +1 -1
  94. package/dist/knowledge/param-tiers.js +1 -1
  95. package/dist/knowledge/path-oracle/coverage.js +1 -1
  96. package/dist/knowledge/path-oracle/index.js +1 -1
  97. package/dist/knowledge/path-oracle/products/airbnb.js +1 -0
  98. package/dist/knowledge/path-oracle/products/algora.js +1 -0
  99. package/dist/knowledge/path-oracle/products/alibaba-1688.js +1 -0
  100. package/dist/knowledge/path-oracle/products/amazon.js +1 -0
  101. package/dist/knowledge/path-oracle/products/beatstars.js +1 -0
  102. package/dist/knowledge/path-oracle/products/booking-com.js +1 -0
  103. package/dist/knowledge/path-oracle/products/contra.js +1 -0
  104. package/dist/knowledge/path-oracle/products/costco.js +1 -0
  105. package/dist/knowledge/path-oracle/products/coursera.js +1 -0
  106. package/dist/knowledge/path-oracle/products/duoduo-maicai.js +1 -0
  107. package/dist/knowledge/path-oracle/products/etsy.js +1 -0
  108. package/dist/knowledge/path-oracle/products/food-delivery.js +1 -1
  109. package/dist/knowledge/path-oracle/products/gamefound.js +1 -0
  110. package/dist/knowledge/path-oracle/products/gofundme.js +1 -0
  111. package/dist/knowledge/path-oracle/products/hackerone.js +1 -0
  112. package/dist/knowledge/path-oracle/products/kickstarter.js +1 -0
  113. package/dist/knowledge/path-oracle/products/klook.js +1 -0
  114. package/dist/knowledge/path-oracle/products/ninety-nine-designs.js +1 -0
  115. package/dist/knowledge/path-oracle/products/onlyfans.js +1 -0
  116. package/dist/knowledge/path-oracle/products/patreon.js +1 -0
  117. package/dist/knowledge/path-oracle/products/pinduoduo-kuaituantuan.js +1 -0
  118. package/dist/knowledge/path-oracle/products/royalty-exchange.js +1 -0
  119. package/dist/knowledge/path-oracle/products/shansong.js +1 -0
  120. package/dist/knowledge/path-oracle/products/taobao-presale.js +1 -0
  121. package/dist/knowledge/path-oracle/products/upwork-catalog.js +1 -0
  122. package/dist/knowledge/path-oracle/products/upwork.js +1 -0
  123. package/dist/knowledge/path-oracle/products/yuanfudao.js +1 -0
  124. package/dist/knowledge/path-oracle/products/ziroom.js +1 -0
  125. package/dist/knowledge/pattern-resolutions.js +1 -1
  126. package/dist/knowledge/product-detail-source.js +1 -1
  127. package/dist/knowledge/product-doc-b5.js +1 -1
  128. package/dist/knowledge/product-doc-facets.js +1 -0
  129. package/dist/knowledge/projection.js +1 -1
  130. package/dist/knowledge/publish-gate.js +1 -1
  131. package/dist/knowledge/publish-surface-contract.js +1 -1
  132. package/dist/knowledge/recipient-constraint.d.ts +20 -0
  133. package/dist/knowledge/recipient-constraint.js +1 -1
  134. package/dist/knowledge/rule-declaration-types.d.ts +13 -0
  135. package/dist/knowledge/rule-declaration-types.js +1 -0
  136. package/dist/knowledge/rule-declarations.js +1 -0
  137. package/dist/knowledge/scenario-modes.d.ts +6 -0
  138. package/dist/knowledge/scenario-topology.js +1 -1
  139. package/dist/knowledge/template-loader.js +1 -1
  140. package/dist/knowledge/template-prose.js +1 -1
  141. package/dist/knowledge/template-registry.js +1 -1
  142. package/dist/knowledge/template-scanner.js +1 -1
  143. package/dist/knowledge/tools-reference.js +1 -1
  144. package/dist/monitor/MonitorLoop.js +1 -1
  145. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  146. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  147. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  148. package/dist/playbooks/service-build/object-panorama.js +1 -1
  149. package/dist/playbooks/service-build/participation-radar.js +1 -1
  150. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  151. package/dist/playbooks/service-build/service-panorama.js +1 -1
  152. package/dist/playbooks/service-build/service-quote.js +1 -1
  153. package/dist/review/index.js +1 -1
  154. package/dist/review/service.js +1 -1
  155. package/dist/safety/confirm-gate.js +1 -1
  156. package/dist/schema/benchmark-migration/index.d.ts +9 -0
  157. package/dist/schema/benchmark-migration/index.js +1 -1
  158. package/dist/schema/call/arbitration.d.ts +8 -0
  159. package/dist/schema/call/arbitration.js +1 -1
  160. package/dist/schema/call/base.d.ts +8 -0
  161. package/dist/schema/call/base.js +1 -1
  162. package/dist/schema/call/bridge.d.ts +2 -0
  163. package/dist/schema/call/error-codes.d.ts +1 -1
  164. package/dist/schema/call/error-codes.js +1 -1
  165. package/dist/schema/call/handler.d.ts +2 -1
  166. package/dist/schema/call/handler.js +1 -1
  167. package/dist/schema/call/order.d.ts +10 -0
  168. package/dist/schema/call/permission-handler.js +1 -1
  169. package/dist/schema/call/permission.js +1 -1
  170. package/dist/schema/call/progress.d.ts +15 -0
  171. package/dist/schema/call/progress.js +1 -1
  172. package/dist/schema/call/receipt.d.ts +1 -0
  173. package/dist/schema/call/receipt.js +1 -1
  174. package/dist/schema/call/repository.d.ts +12 -0
  175. package/dist/schema/call/repository.js +1 -1
  176. package/dist/schema/call/reward.js +1 -1
  177. package/dist/schema/call/semantic.d.ts +1 -0
  178. package/dist/schema/call/semantic.js +1 -1
  179. package/dist/schema/call/service.d.ts +5 -3
  180. package/dist/schema/call/service.js +1 -1
  181. package/dist/schema/common/index.js +1 -1
  182. package/dist/schema/envelope-unify.js +1 -1
  183. package/dist/schema/goal/index.d.ts +23 -0
  184. package/dist/schema/goal/planning.js +1 -1
  185. package/dist/schema/industry-pack/index.d.ts +2 -2
  186. package/dist/schema/local/index.d.ts +20 -0
  187. package/dist/schema/local/index.js +1 -1
  188. package/dist/schema/local/wip.d.ts +4 -0
  189. package/dist/schema/local/wip.js +1 -1
  190. package/dist/schema/messenger/index.d.ts +5 -0
  191. package/dist/schema/messenger/index.js +1 -1
  192. package/dist/schema/operations.d.ts +944 -1
  193. package/dist/schema/operations.js +1 -1
  194. package/dist/schema/query/bi.js +1 -1
  195. package/dist/schema/query/index.d.ts +5 -5
  196. package/dist/schema/query/index.js +1 -1
  197. package/dist/schema/schema-version.js +1 -1
  198. package/dist/schema/workspace/index.d.ts +2 -2
  199. package/dist/schema-query-impl/index.js +1 -1
  200. package/dist/schemas/account_operation.schema.json +1 -257
  201. package/dist/schemas/ask_user.schema.json +1 -78
  202. package/dist/schemas/benchmark_migration_operation.schema.json +1 -626
  203. package/dist/schemas/bridge_operation.schema.json +1 -1069
  204. package/dist/schemas/config_operation.schema.json +1 -82
  205. package/dist/schemas/employee_operation.schema.json +1 -319
  206. package/dist/schemas/evaluation_operation.schema.json +1 -3932
  207. package/dist/schemas/goal_operation.schema.json +1 -1650
  208. package/dist/schemas/guard2file.schema.json +1 -137
  209. package/dist/schemas/index.json +1 -285
  210. package/dist/schemas/industry_pack_operation.schema.json +1 -582
  211. package/dist/schemas/intent_radar.schema.json +1 -155
  212. package/dist/schemas/keeper_operation.schema.json +1 -364
  213. package/dist/schemas/local_cache_operation.schema.json +1 -116
  214. package/dist/schemas/local_history_operation.schema.json +1 -105
  215. package/dist/schemas/local_info_operation.schema.json +1 -140
  216. package/dist/schemas/local_mark_operation.schema.json +1 -124
  217. package/dist/schemas/machineNode2file.schema.json +1 -137
  218. package/dist/schemas/messenger_operation.schema.json +1 -2068
  219. package/dist/schemas/monitor_events.schema.json +1 -87
  220. package/dist/schemas/monitor_subscription.schema.json +1 -327
  221. package/dist/schemas/onchain_events.schema.json +1 -207
  222. package/dist/schemas/onchain_operations.schema.json +1 -28699
  223. package/dist/schemas/onchain_operations_allocation.schema.json +1 -1376
  224. package/dist/schemas/onchain_operations_arbitration.schema.json +1 -1355
  225. package/dist/schemas/onchain_operations_contact.schema.json +1 -988
  226. package/dist/schemas/onchain_operations_demand.schema.json +1 -1146
  227. package/dist/schemas/onchain_operations_gen_passport.schema.json +1 -663
  228. package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -180
  229. package/dist/schemas/onchain_operations_guard.schema.json +1 -8518
  230. package/dist/schemas/onchain_operations_machine.schema.json +1 -1879
  231. package/dist/schemas/onchain_operations_order.schema.json +1 -1121
  232. package/dist/schemas/onchain_operations_payment.schema.json +1 -316
  233. package/dist/schemas/onchain_operations_permission.schema.json +1 -1036
  234. package/dist/schemas/onchain_operations_personal.schema.json +1 -1463
  235. package/dist/schemas/onchain_operations_progress.schema.json +1 -1041
  236. package/dist/schemas/onchain_operations_proof.schema.json +1 -750
  237. package/dist/schemas/onchain_operations_repository.schema.json +1 -2046
  238. package/dist/schemas/onchain_operations_reward.schema.json +1 -1286
  239. package/dist/schemas/onchain_operations_service.schema.json +1 -2602
  240. package/dist/schemas/onchain_operations_treasury.schema.json +1 -1527
  241. package/dist/schemas/onchain_table_data.schema.json +1 -1146
  242. package/dist/schemas/permission_operation.schema.json +1 -43
  243. package/dist/schemas/persona_operation.schema.json +1 -10424
  244. package/dist/schemas/query_toolkit.schema.json +1 -1867
  245. package/dist/schemas/schema_query.schema.json +1 -116
  246. package/dist/schemas/service_clone_operation.schema.json +1 -49
  247. package/dist/schemas/settle_sweep.schema.json +1 -0
  248. package/dist/schemas/strategy_review_operation.schema.json +1 -66
  249. package/dist/schemas/verify_guard_dry_run.schema.json +1 -0
  250. package/dist/schemas/watch_operation.schema.json +1 -145
  251. package/dist/schemas/wip_file.schema.json +1 -299
  252. package/dist/schemas/workflow_operation.schema.json +1 -722
  253. package/dist/schemas/workspace_operation.schema.json +1 -104
  254. package/dist/schemas/wowok_buildin_info.schema.json +1 -758
  255. package/dist/tools/handlers/benchmark-migration.js +1 -1
  256. package/dist/tools/handlers/config.js +1 -1
  257. package/dist/tools/handlers/entry-edge-recipe.js +1 -1
  258. package/dist/tools/handlers/file-export.js +1 -1
  259. package/dist/tools/handlers/local.js +1 -1
  260. package/dist/tools/handlers/messenger.js +1 -1
  261. package/dist/tools/handlers/onchain.js +1 -1
  262. package/dist/tools/handlers/pending-settlement-recipe.js +1 -0
  263. package/dist/tools/handlers/plan-recovery.js +1 -0
  264. package/dist/tools/handlers/query.js +1 -1
  265. package/dist/tools/handlers/repository-row-id.js +1 -0
  266. package/dist/tools/handlers/review-chain.js +1 -1
  267. package/dist/tools/handlers/settle-sweep.js +1 -0
  268. package/dist/tools/handlers/stale-build-check.js +1 -1
  269. package/dist/tools/handlers/submission-assembly.js +1 -1
  270. package/dist/tools/handlers/verify-guard-dry-run.js +1 -0
  271. package/dist/tools/handlers/wip-upload.js +1 -1
  272. package/dist/tools/index.d.ts +3 -1
  273. package/dist/tools/index.js +1 -1
  274. package/dist/tools/move-fn-index.gen.js +1 -1
  275. package/dist/tools/publish-gate-state.js +1 -1
  276. package/dist/tools/registry/business.js +1 -1
  277. package/dist/tools/registry/onchain.js +1 -1
  278. package/dist/tools/shared.js +1 -1
  279. package/dist/tools/types.d.ts +1 -1
  280. package/dist/tools/wrap.js +1 -1
  281. package/package.json +11 -4
  282. package/dist/chain-semantics/composition-truth.d.ts +0 -102
  283. package/dist/chain-semantics/eval-order.d.ts +0 -17
  284. package/dist/chain-semantics/field-capability.d.ts +0 -11
  285. package/dist/chain-semantics/freeze-map.d.ts +0 -11
  286. package/dist/chain-semantics/fund-flow.d.ts +0 -10
  287. package/dist/chain-semantics/guard-verbs.d.ts +0 -22
  288. package/dist/chain-semantics/index.d.ts +0 -12
  289. package/dist/chain-semantics/object-graph.d.ts +0 -18
  290. package/dist/communication/evidence.d.ts +0 -6
  291. package/dist/communication/message-cursors.d.ts +0 -35
  292. package/dist/communication/proof-reuse.d.ts +0 -9
  293. package/dist/communication/wts-attestation.d.ts +0 -39
  294. package/dist/composition/audit.d.ts +0 -15
  295. package/dist/composition/blueprint-view.d.ts +0 -63
  296. package/dist/composition/compile.d.ts +0 -83
  297. package/dist/composition/emit-phases.d.ts +0 -234
  298. package/dist/composition/generate.d.ts +0 -40
  299. package/dist/composition/guard-fill.d.ts +0 -52
  300. package/dist/composition/inflight.d.ts +0 -86
  301. package/dist/composition/input-normalize.d.ts +0 -15
  302. package/dist/composition/materialize.d.ts +0 -78
  303. package/dist/composition/mode-gates.d.ts +0 -35
  304. package/dist/composition/param-disclosure.d.ts +0 -61
  305. package/dist/composition/plan-retry-ledger.d.ts +0 -37
  306. package/dist/composition/plan.d.ts +0 -121
  307. package/dist/composition/product-card.d.ts +0 -94
  308. package/dist/composition/reflux.d.ts +0 -28
  309. package/dist/composition/supply-chain-emit.d.ts +0 -46
  310. package/dist/config/config-audit.spec.d.ts +0 -1
  311. package/dist/config/config-audit.spec.js +0 -1
  312. package/dist/config/config-warnings.d.ts +0 -2
  313. package/dist/config/index.d.ts +0 -4
  314. package/dist/config/judgment.spec.d.ts +0 -1
  315. package/dist/config/judgment.spec.js +0 -1
  316. package/dist/config/match-policy-file.d.ts +0 -34
  317. package/dist/config/match-policy-file.spec.d.ts +0 -1
  318. package/dist/config/match-policy-file.spec.js +0 -1
  319. package/dist/config/rule-engine.spec.d.ts +0 -1
  320. package/dist/config/rule-engine.spec.js +0 -1
  321. package/dist/config/runtime.d.ts +0 -29
  322. package/dist/config/store-policy.d.ts +0 -14
  323. package/dist/config/store-policy.spec.d.ts +0 -1
  324. package/dist/config/store-policy.spec.js +0 -1
  325. package/dist/config/template-params.d.ts +0 -42
  326. package/dist/config/template-params.spec.d.ts +0 -1
  327. package/dist/config/template-params.spec.js +0 -1
  328. package/dist/customer/account-events.d.ts +0 -32
  329. package/dist/data/api/api.spec.d.ts +0 -1
  330. package/dist/data/api/api.spec.js +0 -1
  331. package/dist/data/api/cli.d.ts +0 -1
  332. package/dist/data/api/head.d.ts +0 -16
  333. package/dist/data/api/head.spec.d.ts +0 -1
  334. package/dist/data/api/head.spec.js +0 -1
  335. package/dist/data/api/index.d.ts +0 -2
  336. package/dist/data/api/match.d.ts +0 -69
  337. package/dist/data/api/match.spec.d.ts +0 -1
  338. package/dist/data/api/match.spec.js +0 -1
  339. package/dist/data/api/server.d.ts +0 -13
  340. package/dist/data/projection/cli.d.ts +0 -1
  341. package/dist/data/projection/edges.d.ts +0 -8
  342. package/dist/data/projection/edges.spec.d.ts +0 -1
  343. package/dist/data/projection/edges.spec.js +0 -1
  344. package/dist/data/projection/facets.d.ts +0 -18
  345. package/dist/data/projection/facets.spec.d.ts +0 -1
  346. package/dist/data/projection/facets.spec.js +0 -1
  347. package/dist/data/projection/facts.d.ts +0 -40
  348. package/dist/data/projection/index.d.ts +0 -6
  349. package/dist/data/projection/project.d.ts +0 -10
  350. package/dist/data/projection/projection.spec.d.ts +0 -1
  351. package/dist/data/projection/projection.spec.js +0 -1
  352. package/dist/data/projection/schema.d.ts +0 -1
  353. package/dist/data/projection/store.d.ts +0 -51
  354. package/dist/data/projection/types.d.ts +0 -169
  355. package/dist/data/sync/cdc.d.ts +0 -33
  356. package/dist/data/sync/cdc.spec.d.ts +0 -1
  357. package/dist/data/sync/cdc.spec.js +0 -1
  358. package/dist/data/sync/graphql-source.d.ts +0 -16
  359. package/dist/data/sync/index.d.ts +0 -5
  360. package/dist/data/sync/reconciler.d.ts +0 -14
  361. package/dist/data/sync/reconciler.spec.d.ts +0 -1
  362. package/dist/data/sync/reconciler.spec.js +0 -1
  363. package/dist/data/sync/schema.d.ts +0 -1
  364. package/dist/data/sync/store.d.ts +0 -24
  365. package/dist/data/sync/sync.spec.d.ts +0 -1
  366. package/dist/data/sync/sync.spec.js +0 -1
  367. package/dist/data/sync/synchronizer.d.ts +0 -10
  368. package/dist/data/sync/types.d.ts +0 -164
  369. package/dist/evaluation/acceptance.d.ts +0 -33
  370. package/dist/evaluation/architecture.spec.d.ts +0 -1
  371. package/dist/evaluation/architecture.spec.js +0 -1
  372. package/dist/evaluation/builtins/arbitration-score.d.ts +0 -42
  373. package/dist/evaluation/builtins/demand-match.d.ts +0 -16
  374. package/dist/evaluation/builtins/graph-service.spec.d.ts +0 -1
  375. package/dist/evaluation/builtins/graph-service.spec.js +0 -1
  376. package/dist/evaluation/builtins/index.d.ts +0 -4
  377. package/dist/evaluation/builtins/purity.spec.d.ts +0 -1
  378. package/dist/evaluation/builtins/purity.spec.js +0 -1
  379. package/dist/evaluation/composer.d.ts +0 -38
  380. package/dist/evaluation/facets/catalog.d.ts +0 -19
  381. package/dist/evaluation/gap.d.ts +0 -2
  382. package/dist/evaluation/guard-scan.d.ts +0 -10
  383. package/dist/evaluation/index.d.ts +0 -14
  384. package/dist/evaluation/injection.d.ts +0 -6
  385. package/dist/evaluation/location-match.d.ts +0 -42
  386. package/dist/evaluation/match-operation.d.ts +0 -23
  387. package/dist/evaluation/match-policy-resolver.d.ts +0 -9
  388. package/dist/evaluation/match-policy.spec.d.ts +0 -1
  389. package/dist/evaluation/match-policy.spec.js +0 -1
  390. package/dist/evaluation/path-reasoning.d.ts +0 -37
  391. package/dist/evaluation/standards.d.ts +0 -11
  392. package/dist/evaluation/standards.spec.d.ts +0 -1
  393. package/dist/evaluation/standards.spec.js +0 -1
  394. package/dist/evaluation/structured-lines.d.ts +0 -8
  395. package/dist/evaluation/user-injection.d.ts +0 -6
  396. package/dist/experience/experience-reuse.d.ts +0 -10
  397. package/dist/experience/index.d.ts +0 -7
  398. package/dist/experience/persistence-config.d.ts +0 -6
  399. package/dist/experience/persistence.d.ts +0 -21
  400. package/dist/experience/realtime-feedback.d.ts +0 -5
  401. package/dist/experience/user-profile.d.ts +0 -25
  402. package/dist/extensions/capability.d.ts +0 -91
  403. package/dist/extensions/industry-audit.spec.d.ts +0 -1
  404. package/dist/extensions/industry-audit.spec.js +0 -1
  405. package/dist/goal/GoalClassifier.d.ts +0 -17
  406. package/dist/goal/GoalEngine.d.ts +0 -175
  407. package/dist/goal/GoalStore.d.ts +0 -27
  408. package/dist/goal/next-steps.d.ts +0 -12
  409. package/dist/goal/plan-approval.d.ts +0 -5
  410. package/dist/goal/pursue.d.ts +0 -18
  411. package/dist/graph/base.d.ts +0 -8
  412. package/dist/graph/onchain/analyze.d.ts +0 -59
  413. package/dist/graph/onchain/analyze.spec.d.ts +0 -1
  414. package/dist/graph/onchain/analyze.spec.js +0 -1
  415. package/dist/graph/onchain/anti-cheat.d.ts +0 -69
  416. package/dist/graph/onchain/anti-cheat.spec.d.ts +0 -1
  417. package/dist/graph/onchain/anti-cheat.spec.js +0 -1
  418. package/dist/graph/onchain/dataplane.d.ts +0 -44
  419. package/dist/graph/onchain/edge-batch.spec.d.ts +0 -1
  420. package/dist/graph/onchain/edge-batch.spec.js +0 -1
  421. package/dist/graph/onchain/edge-schema.d.ts +0 -69
  422. package/dist/graph/onchain/entity-profile.spec.d.ts +0 -1
  423. package/dist/graph/onchain/entity-profile.spec.js +0 -1
  424. package/dist/graph/onchain/event-history.spec.d.ts +0 -1
  425. package/dist/graph/onchain/event-history.spec.js +0 -1
  426. package/dist/graph/onchain/expand.d.ts +0 -4
  427. package/dist/graph/onchain/exploration.d.ts +0 -28
  428. package/dist/graph/onchain/exploration.spec.d.ts +0 -1
  429. package/dist/graph/onchain/exploration.spec.js +0 -1
  430. package/dist/graph/onchain/exposure.d.ts +0 -18
  431. package/dist/graph/onchain/exposure.spec.d.ts +0 -1
  432. package/dist/graph/onchain/exposure.spec.js +0 -1
  433. package/dist/graph/onchain/extract-deep.spec.d.ts +0 -1
  434. package/dist/graph/onchain/extract-deep.spec.js +0 -1
  435. package/dist/graph/onchain/extract.d.ts +0 -29
  436. package/dist/graph/onchain/facet-projection.d.ts +0 -99
  437. package/dist/graph/onchain/facet-projection.spec.d.ts +0 -1
  438. package/dist/graph/onchain/facet-projection.spec.js +0 -1
  439. package/dist/graph/onchain/facts.spec.d.ts +0 -1
  440. package/dist/graph/onchain/facts.spec.js +0 -1
  441. package/dist/graph/onchain/field-manifest.d.ts +0 -29
  442. package/dist/graph/onchain/field-manifest.spec.d.ts +0 -1
  443. package/dist/graph/onchain/field-manifest.spec.js +0 -1
  444. package/dist/graph/onchain/fixtures.d.ts +0 -80
  445. package/dist/graph/onchain/fixtures.spec.d.ts +0 -1
  446. package/dist/graph/onchain/fixtures.spec.js +0 -1
  447. package/dist/graph/onchain/graph-policy.spec.d.ts +0 -1
  448. package/dist/graph/onchain/graph-policy.spec.js +0 -1
  449. package/dist/graph/onchain/index.d.ts +0 -29
  450. package/dist/graph/onchain/interest.d.ts +0 -10
  451. package/dist/graph/onchain/interest.spec.d.ts +0 -1
  452. package/dist/graph/onchain/interest.spec.js +0 -1
  453. package/dist/graph/onchain/label-lint.spec.d.ts +0 -1
  454. package/dist/graph/onchain/label-lint.spec.js +0 -1
  455. package/dist/graph/onchain/names.d.ts +0 -23
  456. package/dist/graph/onchain/names.spec.d.ts +0 -1
  457. package/dist/graph/onchain/names.spec.js +0 -1
  458. package/dist/graph/onchain/object-held-receipts.d.ts +0 -20
  459. package/dist/graph/onchain/object-held-receipts.spec.d.ts +0 -1
  460. package/dist/graph/onchain/object-held-receipts.spec.js +0 -1
  461. package/dist/graph/onchain/onchain.spec.d.ts +0 -1
  462. package/dist/graph/onchain/onchain.spec.js +0 -1
  463. package/dist/graph/onchain/policy.d.ts +0 -8
  464. package/dist/graph/onchain/project-relationship.d.ts +0 -3
  465. package/dist/graph/onchain/proposal-graph.d.ts +0 -11
  466. package/dist/graph/onchain/proposal-graph.spec.d.ts +0 -1
  467. package/dist/graph/onchain/proposal-graph.spec.js +0 -1
  468. package/dist/graph/onchain/sdk-batch.d.ts +0 -129
  469. package/dist/graph/onchain/sdk-dataplane.d.ts +0 -44
  470. package/dist/graph/onchain/strategy.spec.d.ts +0 -1
  471. package/dist/graph/onchain/strategy.spec.js +0 -1
  472. package/dist/graph/onchain/synthesis.d.ts +0 -20
  473. package/dist/graph/onchain/synthesis.spec.d.ts +0 -1
  474. package/dist/graph/onchain/synthesis.spec.js +0 -1
  475. package/dist/graph/onchain/table-ledger.spec.d.ts +0 -1
  476. package/dist/graph/onchain/table-ledger.spec.js +0 -1
  477. package/dist/graph/onchain/viewport.d.ts +0 -6
  478. package/dist/harness/auto-escalation.d.ts +0 -15
  479. package/dist/intent/enrich.d.ts +0 -1
  480. package/dist/intent/index.d.ts +0 -23
  481. package/dist/intent/matcher.d.ts +0 -2
  482. package/dist/intent/store.d.ts +0 -19
  483. package/dist/intent/types.d.ts +0 -32
  484. package/dist/keeper/KeeperScan.d.ts +0 -41
  485. package/dist/keeper/KeeperStore.d.ts +0 -43
  486. package/dist/keeper/detectors.d.ts +0 -42
  487. package/dist/keeper/keeper.spec.d.ts +0 -1
  488. package/dist/keeper/keeper.spec.js +0 -1
  489. package/dist/keeper/types.d.ts +0 -67
  490. package/dist/knowledge/account-marks.d.ts +0 -36
  491. package/dist/knowledge/allocation-ledger.d.ts +0 -75
  492. package/dist/knowledge/allocation-puzzle.d.ts +0 -138
  493. package/dist/knowledge/allocation-risk.d.ts +0 -82
  494. package/dist/knowledge/allocation-templates.d.ts +0 -38
  495. package/dist/knowledge/allocator-rail-verifier.d.ts +0 -59
  496. package/dist/knowledge/anti-cheat.d.ts +0 -2
  497. package/dist/knowledge/arb-fund-facts.d.ts +0 -51
  498. package/dist/knowledge/arb-risk.d.ts +0 -39
  499. package/dist/knowledge/arbitration-puzzle.d.ts +0 -84
  500. package/dist/knowledge/arbitration-rail-verifier.d.ts +0 -35
  501. package/dist/knowledge/arbitration-risk.d.ts +0 -114
  502. package/dist/knowledge/arbitration-templates.d.ts +0 -39
  503. package/dist/knowledge/arbitration-venue-order.d.ts +0 -25
  504. package/dist/knowledge/baselines/guard-lint-baseline.spec.d.ts +0 -1
  505. package/dist/knowledge/baselines/guard-lint-baseline.spec.js +0 -1
  506. package/dist/knowledge/baselines/risk-baselines.spec.d.ts +0 -1
  507. package/dist/knowledge/baselines/risk-baselines.spec.js +0 -1
  508. package/dist/knowledge/baselines/risk-cases.d.ts +0 -8
  509. package/dist/knowledge/baselines/semantic-facts.d.ts +0 -12
  510. package/dist/knowledge/bridge-risk.d.ts +0 -36
  511. package/dist/knowledge/catalog-facts.d.ts +0 -4
  512. package/dist/knowledge/chain-query-registry.d.ts +0 -14
  513. package/dist/knowledge/commission-landing.d.ts +0 -26
  514. package/dist/knowledge/component-schema.d.ts +0 -64
  515. package/dist/knowledge/contact-risk.d.ts +0 -32
  516. package/dist/knowledge/contact-templates.d.ts +0 -26
  517. package/dist/knowledge/contract-invariants.d.ts +0 -54
  518. package/dist/knowledge/demand-risk.d.ts +0 -30
  519. package/dist/knowledge/discount-threshold.d.ts +0 -26
  520. package/dist/knowledge/dynamic-pricing.d.ts +0 -29
  521. package/dist/knowledge/entity-recipient-guard.d.ts +0 -21
  522. package/dist/knowledge/event-semantics.d.ts +0 -23
  523. package/dist/knowledge/evidence-review.d.ts +0 -35
  524. package/dist/knowledge/fee-param-bindings.d.ts +0 -28
  525. package/dist/knowledge/flywheel-loop.d.ts +0 -41
  526. package/dist/knowledge/game-scenarios.d.ts +0 -21
  527. package/dist/knowledge/getting-started.d.ts +0 -37
  528. package/dist/knowledge/goal-completion.d.ts +0 -31
  529. package/dist/knowledge/guard-anchor-reach.d.ts +0 -19
  530. package/dist/knowledge/guard-binding-table.d.ts +0 -52
  531. package/dist/knowledge/guard-binding-verifier.d.ts +0 -37
  532. package/dist/knowledge/guard-bindings.d.ts +0 -21
  533. package/dist/knowledge/guard-blueprint.d.ts +0 -68
  534. package/dist/knowledge/guard-design-patterns.d.ts +0 -38
  535. package/dist/knowledge/guard-eval.d.ts +0 -15
  536. package/dist/knowledge/guard-field-cognition.d.ts +0 -48
  537. package/dist/knowledge/guard-host-context.d.ts +0 -24
  538. package/dist/knowledge/guard-ledger.d.ts +0 -19
  539. package/dist/knowledge/guard-leg-map.d.ts +0 -5
  540. package/dist/knowledge/guard-lint.d.ts +0 -79
  541. package/dist/knowledge/guard-node-gates.d.ts +0 -9
  542. package/dist/knowledge/guard-puzzle.d.ts +0 -188
  543. package/dist/knowledge/guard-render.d.ts +0 -71
  544. package/dist/knowledge/guard-risk.d.ts +0 -71
  545. package/dist/knowledge/guard-submission-brief.d.ts +0 -94
  546. package/dist/knowledge/guard-submission-prompt.d.ts +0 -63
  547. package/dist/knowledge/guard-translation.d.ts +0 -58
  548. package/dist/knowledge/index.d.ts +0 -299
  549. package/dist/knowledge/industry-evolution.d.ts +0 -82
  550. package/dist/knowledge/industry-generalizer.d.ts +0 -63
  551. package/dist/knowledge/industry-rule-node.d.ts +0 -7
  552. package/dist/knowledge/industry-strategy.d.ts +0 -91
  553. package/dist/knowledge/intent-metrics.d.ts +0 -43
  554. package/dist/knowledge/jsonrpc-enum.d.ts +0 -102
  555. package/dist/knowledge/knob-docs.d.ts +0 -5
  556. package/dist/knowledge/machine-fork-watch.d.ts +0 -9
  557. package/dist/knowledge/machine-ledger.d.ts +0 -42
  558. package/dist/knowledge/machine-puzzle.d.ts +0 -206
  559. package/dist/knowledge/machine-risk.d.ts +0 -72
  560. package/dist/knowledge/machine-templates.d.ts +0 -92
  561. package/dist/knowledge/machine-topology.d.ts +0 -116
  562. package/dist/knowledge/machine-translation.d.ts +0 -96
  563. package/dist/knowledge/market-metrics.d.ts +0 -34
  564. package/dist/knowledge/market-operations.d.ts +0 -46
  565. package/dist/knowledge/migration-preflight.d.ts +0 -27
  566. package/dist/knowledge/object-dependency.d.ts +0 -31
  567. package/dist/knowledge/operation-dictionary.d.ts +0 -18
  568. package/dist/knowledge/order-ledger.d.ts +0 -69
  569. package/dist/knowledge/order-puzzle.d.ts +0 -162
  570. package/dist/knowledge/order-risk.d.ts +0 -62
  571. package/dist/knowledge/order-templates.d.ts +0 -50
  572. package/dist/knowledge/param-schema.d.ts +0 -93
  573. package/dist/knowledge/param-tiers.d.ts +0 -27
  574. package/dist/knowledge/passport-ledger.d.ts +0 -60
  575. package/dist/knowledge/passport-templates.d.ts +0 -40
  576. package/dist/knowledge/path-oracle/coverage.d.ts +0 -16
  577. package/dist/knowledge/path-oracle/index.d.ts +0 -5
  578. package/dist/knowledge/path-oracle/products/food-delivery.d.ts +0 -2
  579. package/dist/knowledge/path-oracle/schema.d.ts +0 -188
  580. package/dist/knowledge/pattern-resolutions.d.ts +0 -110
  581. package/dist/knowledge/payment-risk.d.ts +0 -38
  582. package/dist/knowledge/payment-tracker.d.ts +0 -63
  583. package/dist/knowledge/permission-ledger.d.ts +0 -49
  584. package/dist/knowledge/permission-puzzle.d.ts +0 -122
  585. package/dist/knowledge/permission-risk.d.ts +0 -70
  586. package/dist/knowledge/permission-templates.d.ts +0 -38
  587. package/dist/knowledge/personal-risk.d.ts +0 -36
  588. package/dist/knowledge/product-detail-source.d.ts +0 -37
  589. package/dist/knowledge/product-doc-b5.d.ts +0 -16
  590. package/dist/knowledge/progress-ledger.d.ts +0 -63
  591. package/dist/knowledge/progress-puzzle.d.ts +0 -82
  592. package/dist/knowledge/progress-risk.d.ts +0 -75
  593. package/dist/knowledge/progress-templates.d.ts +0 -38
  594. package/dist/knowledge/projection.d.ts +0 -54
  595. package/dist/knowledge/projection.spec.d.ts +0 -1
  596. package/dist/knowledge/projection.spec.js +0 -1
  597. package/dist/knowledge/proof-risk.d.ts +0 -33
  598. package/dist/knowledge/protocol-facts.d.ts +0 -17
  599. package/dist/knowledge/publish-gate.d.ts +0 -20
  600. package/dist/knowledge/publish-readiness.d.ts +0 -25
  601. package/dist/knowledge/publish-surface-contract.d.ts +0 -16
  602. package/dist/knowledge/puzzle-projections.d.ts +0 -11
  603. package/dist/knowledge/rail-exit-satisfiability.d.ts +0 -25
  604. package/dist/knowledge/registrar-risk.d.ts +0 -34
  605. package/dist/knowledge/release-sentinel.d.ts +0 -12
  606. package/dist/knowledge/repository-risk.d.ts +0 -46
  607. package/dist/knowledge/repository-write-semantics.d.ts +0 -27
  608. package/dist/knowledge/reputation-rules.d.ts +0 -36
  609. package/dist/knowledge/requirement-families.d.ts +0 -13
  610. package/dist/knowledge/resource-risk.d.ts +0 -32
  611. package/dist/knowledge/reward-ledger.d.ts +0 -97
  612. package/dist/knowledge/reward-puzzle.d.ts +0 -98
  613. package/dist/knowledge/reward-risk.d.ts +0 -86
  614. package/dist/knowledge/reward-templates.d.ts +0 -25
  615. package/dist/knowledge/rule-node-analyzers.d.ts +0 -49
  616. package/dist/knowledge/rule-outcome.d.ts +0 -5
  617. package/dist/knowledge/scenario-topology.d.ts +0 -48
  618. package/dist/knowledge/semantic-ir.d.ts +0 -136
  619. package/dist/knowledge/service-allocation-semantics.d.ts +0 -36
  620. package/dist/knowledge/service-allocator-audit-node.d.ts +0 -3
  621. package/dist/knowledge/service-ledger.d.ts +0 -87
  622. package/dist/knowledge/service-puzzle.d.ts +0 -158
  623. package/dist/knowledge/service-risk-node.d.ts +0 -3
  624. package/dist/knowledge/service-risk.d.ts +0 -110
  625. package/dist/knowledge/service-templates.d.ts +0 -41
  626. package/dist/knowledge/settlement-semantics.d.ts +0 -1
  627. package/dist/knowledge/strategy-manuals.d.ts +0 -15
  628. package/dist/knowledge/supply-chain.d.ts +0 -35
  629. package/dist/knowledge/template-index.d.ts +0 -19
  630. package/dist/knowledge/template-loader.d.ts +0 -425
  631. package/dist/knowledge/template-nav.d.ts +0 -9
  632. package/dist/knowledge/template-prose.d.ts +0 -50
  633. package/dist/knowledge/template-registry.d.ts +0 -48
  634. package/dist/knowledge/template-scanner.d.ts +0 -158
  635. package/dist/knowledge/template-test-profiles.d.ts +0 -17
  636. package/dist/knowledge/template-validation.d.ts +0 -3
  637. package/dist/knowledge/tools-reference.d.ts +0 -17
  638. package/dist/knowledge/treasury-ledger.d.ts +0 -42
  639. package/dist/knowledge/treasury-puzzle.d.ts +0 -163
  640. package/dist/knowledge/treasury-risk.d.ts +0 -88
  641. package/dist/knowledge/treasury-templates.d.ts +0 -38
  642. package/dist/knowledge/universal-template.d.ts +0 -22
  643. package/dist/knowledge/util-risk.d.ts +0 -30
  644. package/dist/knowledge/workflow-guidance.d.ts +0 -194
  645. package/dist/knowledge/workspace-lists.d.ts +0 -61
  646. package/dist/monitor/SuggestionBridge.spec.d.ts +0 -1
  647. package/dist/monitor/SuggestionBridge.spec.js +0 -1
  648. package/dist/participation/arbitrator-interest.d.ts +0 -22
  649. package/dist/participation/demander-interest.d.ts +0 -23
  650. package/dist/participation/employee-kpi.d.ts +0 -37
  651. package/dist/participation/employee-kpi.spec.d.ts +0 -1
  652. package/dist/participation/employee-kpi.spec.js +0 -1
  653. package/dist/participation/employee-store.d.ts +0 -16
  654. package/dist/participation/game-context.d.ts +0 -25
  655. package/dist/participation/index.d.ts +0 -2
  656. package/dist/participation/node-action-advisor.d.ts +0 -68
  657. package/dist/participation/time-window.d.ts +0 -48
  658. package/dist/persona/facet-profile.d.ts +0 -33
  659. package/dist/persona/persona-audit.spec.d.ts +0 -1
  660. package/dist/persona/persona-audit.spec.js +0 -1
  661. package/dist/playbooks/service-build/business-puzzle.d.ts +0 -48
  662. package/dist/playbooks/service-build/context-assembly.d.ts +0 -32
  663. package/dist/playbooks/service-build/facet-money.d.ts +0 -33
  664. package/dist/playbooks/service-build/facet-money.spec.d.ts +0 -1
  665. package/dist/playbooks/service-build/facet-money.spec.js +0 -1
  666. package/dist/playbooks/service-build/game-theory.d.ts +0 -47
  667. package/dist/playbooks/service-build/index.d.ts +0 -15
  668. package/dist/playbooks/service-build/intent-analyzer.d.ts +0 -72
  669. package/dist/playbooks/service-build/machine-nodes.d.ts +0 -27
  670. package/dist/playbooks/service-build/machine-panorama.d.ts +0 -71
  671. package/dist/playbooks/service-build/merchant-guide.d.ts +0 -382
  672. package/dist/playbooks/service-build/migration-planner.d.ts +0 -61
  673. package/dist/playbooks/service-build/mode-actions.d.ts +0 -260
  674. package/dist/playbooks/service-build/object-panorama.d.ts +0 -317
  675. package/dist/playbooks/service-build/object-type.d.ts +0 -1
  676. package/dist/playbooks/service-build/participation-radar.d.ts +0 -20
  677. package/dist/playbooks/service-build/pipeline-actions.d.ts +0 -108
  678. package/dist/playbooks/service-build/process.d.ts +0 -6
  679. package/dist/playbooks/service-build/relationship-profile.d.ts +0 -3
  680. package/dist/playbooks/service-build/reverse-mapping-nk4.spec.d.ts +0 -1
  681. package/dist/playbooks/service-build/reverse-mapping-nk4.spec.js +0 -1
  682. package/dist/playbooks/service-build/reverse-mapping-refund-p0-5.spec.d.ts +0 -1
  683. package/dist/playbooks/service-build/reverse-mapping-refund-p0-5.spec.js +0 -1
  684. package/dist/playbooks/service-build/reverse-mapping.d.ts +0 -66
  685. package/dist/playbooks/service-build/risk-aggregator.d.ts +0 -59
  686. package/dist/playbooks/service-build/service-panorama.d.ts +0 -229
  687. package/dist/playbooks/service-build/service-quote.d.ts +0 -2
  688. package/dist/playbooks/service-build/service-quote.spec.d.ts +0 -1
  689. package/dist/playbooks/service-build/service-quote.spec.js +0 -1
  690. package/dist/playbooks/service-build/topology-evaluation.spec.d.ts +0 -1
  691. package/dist/playbooks/service-build/topology-evaluation.spec.js +0 -1
  692. package/dist/playbooks/service-build/topology-query.d.ts +0 -25
  693. package/dist/playbooks/service-build/workflow-design-assessment.d.ts +0 -33
  694. package/dist/relationship/derivation.d.ts +0 -95
  695. package/dist/relationship/derivation.spec.d.ts +0 -1
  696. package/dist/relationship/derivation.spec.js +0 -1
  697. package/dist/relationship/incentive.d.ts +0 -38
  698. package/dist/relationship/index.d.ts +0 -4
  699. package/dist/relationship/registry.d.ts +0 -13
  700. package/dist/relationship/types.d.ts +0 -45
  701. package/dist/review/arb.d.ts +0 -4
  702. package/dist/review/demand.d.ts +0 -3
  703. package/dist/review/index.d.ts +0 -3
  704. package/dist/review/machine.d.ts +0 -3
  705. package/dist/review/order.d.ts +0 -8
  706. package/dist/review/progress.d.ts +0 -3
  707. package/dist/review/repository.d.ts +0 -3
  708. package/dist/review/service.d.ts +0 -5
  709. package/dist/review/types.d.ts +0 -163
  710. package/dist/role/derivation.d.ts +0 -35
  711. package/dist/role/index.d.ts +0 -6
  712. package/dist/role/intent.d.ts +0 -23
  713. package/dist/role/model.d.ts +0 -9
  714. package/dist/role/profiles.d.ts +0 -26
  715. package/dist/role/resolution.d.ts +0 -27
  716. package/dist/runtime/instance-registry.d.ts +0 -14
  717. package/dist/safety/index.d.ts +0 -3
  718. package/dist/schema/call/permission-handler.d.ts +0 -5
  719. package/dist/schema/call/semantic-customer-advice.spec.d.ts +0 -1
  720. package/dist/schema/call/semantic-customer-advice.spec.js +0 -1
  721. package/dist/schema/common/tokentype-short-probe.spec.d.ts +0 -1
  722. package/dist/schema/common/tokentype-short-probe.spec.js +0 -1
  723. package/dist/schema/envelope-unify.d.ts +0 -5
  724. package/dist/schema/goal/planning.d.ts +0 -742
  725. package/dist/schema/industry-pack/modes.d.ts +0 -447
  726. package/dist/schema/query/bi.d.ts +0 -3369
  727. package/dist/schema/utils/guard-query-utils.d.ts +0 -18
  728. package/dist/schema/utils/permission-index-utils.d.ts +0 -2
  729. package/dist/schema/utils/skills-recommendation.d.ts +0 -2
  730. package/dist/schema-query-impl/index.d.ts +0 -83
  731. package/dist/schemas/account_operation.output.json +0 -3869
  732. package/dist/schemas/ask_user.output.json +0 -54
  733. package/dist/schemas/benchmark_migration_operation.output.json +0 -1669
  734. package/dist/schemas/bridge_operation.output.json +0 -1548
  735. package/dist/schemas/config_operation.output.json +0 -896
  736. package/dist/schemas/employee_operation.output.json +0 -307
  737. package/dist/schemas/evaluation_operation.output.json +0 -4716
  738. package/dist/schemas/guard2file.output.json +0 -83
  739. package/dist/schemas/industry_pack_operation.output.json +0 -2985
  740. package/dist/schemas/intent_radar.output.json +0 -326
  741. package/dist/schemas/keeper_operation.output.json +0 -1441
  742. package/dist/schemas/local_cache_operation.output.json +0 -1718
  743. package/dist/schemas/local_history_operation.output.json +0 -1644
  744. package/dist/schemas/local_info_operation.output.json +0 -1530
  745. package/dist/schemas/local_mark_operation.output.json +0 -1622
  746. package/dist/schemas/machineNode2file.output.json +0 -88
  747. package/dist/schemas/messenger_operation.output.json +0 -4692
  748. package/dist/schemas/monitor_events.output.json +0 -1602
  749. package/dist/schemas/monitor_subscription.output.json +0 -1629
  750. package/dist/schemas/onchain_events.output.json +0 -4053
  751. package/dist/schemas/onchain_operations.output.json +0 -7788
  752. package/dist/schemas/onchain_table_data.output.json +0 -11868
  753. package/dist/schemas/permission_operation.output.json +0 -205
  754. package/dist/schemas/persona_operation.output.json +0 -64612
  755. package/dist/schemas/query_toolkit.output.json +0 -28302
  756. package/dist/schemas/schema_query.output.json +0 -81
  757. package/dist/schemas/service_clone_operation.output.json +0 -247
  758. package/dist/schemas/strategy_review_operation.output.json +0 -532
  759. package/dist/schemas/watch_operation.output.json +0 -930
  760. package/dist/schemas/wip_file.output.json +0 -360
  761. package/dist/schemas/workflow_operation.output.json +0 -422
  762. package/dist/schemas/workspace_operation.output.json +0 -477
  763. package/dist/schemas/wowok_buildin_info.output.json +0 -2477
  764. package/dist/strategy/collectors.d.ts +0 -66
  765. package/dist/strategy/collectors.spec.d.ts +0 -1
  766. package/dist/strategy/collectors.spec.js +0 -1
  767. package/dist/strategy/index.d.ts +0 -5
  768. package/dist/strategy/metrics.d.ts +0 -20
  769. package/dist/strategy/review.d.ts +0 -48
  770. package/dist/strategy/scorecard.d.ts +0 -32
  771. package/dist/strategy/store.d.ts +0 -26
  772. package/dist/task/ProcessStore.d.ts +0 -98
  773. package/dist/task/playbook.d.ts +0 -11
  774. package/dist/task/substep-trace.d.ts +0 -91
  775. package/dist/tools/build-fingerprint.d.ts +0 -28
  776. package/dist/tools/error-catalog.d.ts +0 -17
  777. package/dist/tools/handlers/ask-user.d.ts +0 -3
  778. package/dist/tools/handlers/benchmark-migration.d.ts +0 -121
  779. package/dist/tools/handlers/bridge.d.ts +0 -8
  780. package/dist/tools/handlers/config.d.ts +0 -2
  781. package/dist/tools/handlers/dispatch-expectations.d.ts +0 -2
  782. package/dist/tools/handlers/dispatch-expectations.spec.d.ts +0 -1
  783. package/dist/tools/handlers/dispatch-expectations.spec.js +0 -1
  784. package/dist/tools/handlers/employee.d.ts +0 -8
  785. package/dist/tools/handlers/employee.spec.d.ts +0 -1
  786. package/dist/tools/handlers/employee.spec.js +0 -1
  787. package/dist/tools/handlers/entry-edge-recipe.d.ts +0 -101
  788. package/dist/tools/handlers/escrow-deficit.d.ts +0 -10
  789. package/dist/tools/handlers/evaluation.d.ts +0 -2
  790. package/dist/tools/handlers/evaluation.spec.d.ts +0 -1
  791. package/dist/tools/handlers/evaluation.spec.js +0 -1
  792. package/dist/tools/handlers/file-export.d.ts +0 -3
  793. package/dist/tools/handlers/fund-rail-recipe.d.ts +0 -10
  794. package/dist/tools/handlers/goal.d.ts +0 -4
  795. package/dist/tools/handlers/industry-pack.d.ts +0 -3
  796. package/dist/tools/handlers/intent-radar.d.ts +0 -2
  797. package/dist/tools/handlers/keeper.d.ts +0 -12
  798. package/dist/tools/handlers/local.d.ts +0 -6
  799. package/dist/tools/handlers/mark-namespace.d.ts +0 -30
  800. package/dist/tools/handlers/messenger.d.ts +0 -24
  801. package/dist/tools/handlers/monitor.d.ts +0 -26
  802. package/dist/tools/handlers/name-resolution.d.ts +0 -4
  803. package/dist/tools/handlers/name-resolution.spec.d.ts +0 -1
  804. package/dist/tools/handlers/name-resolution.spec.js +0 -1
  805. package/dist/tools/handlers/network.d.ts +0 -1
  806. package/dist/tools/handlers/onchain-name-registration.d.ts +0 -49
  807. package/dist/tools/handlers/onchain-name-registration.spec.d.ts +0 -1
  808. package/dist/tools/handlers/onchain-name-registration.spec.js +0 -1
  809. package/dist/tools/handlers/onchain.d.ts +0 -132
  810. package/dist/tools/handlers/permission.d.ts +0 -2
  811. package/dist/tools/handlers/persona.d.ts +0 -4
  812. package/dist/tools/handlers/publish-binding-echo.d.ts +0 -22
  813. package/dist/tools/handlers/review-chain.d.ts +0 -19
  814. package/dist/tools/handlers/schema-query.d.ts +0 -2
  815. package/dist/tools/handlers/service-clone.d.ts +0 -20
  816. package/dist/tools/handlers/stale-build-check.d.ts +0 -9
  817. package/dist/tools/handlers/strategy-review.d.ts +0 -2
  818. package/dist/tools/handlers/submission-assembly.d.ts +0 -55
  819. package/dist/tools/handlers/watch.d.ts +0 -2
  820. package/dist/tools/handlers/winner-derivation.d.ts +0 -20
  821. package/dist/tools/handlers/wip-upload.d.ts +0 -22
  822. package/dist/tools/handlers/wip.d.ts +0 -2
  823. package/dist/tools/handlers/workflow.d.ts +0 -2
  824. package/dist/tools/handlers/workspace.d.ts +0 -4
  825. package/dist/tools/move-fn-index.gen.d.ts +0 -3
  826. package/dist/tools/publish-gate-state.d.ts +0 -5
  827. package/dist/tools/registry/agent.d.ts +0 -2
  828. package/dist/tools/registry/bridge.d.ts +0 -2
  829. package/dist/tools/registry/business.d.ts +0 -2
  830. package/dist/tools/registry/config.d.ts +0 -2
  831. package/dist/tools/registry/evaluation.d.ts +0 -2
  832. package/dist/tools/registry/files.d.ts +0 -2
  833. package/dist/tools/registry/identity.d.ts +0 -2
  834. package/dist/tools/registry/interaction.d.ts +0 -2
  835. package/dist/tools/registry/local.d.ts +0 -2
  836. package/dist/tools/registry/messenger.d.ts +0 -2
  837. package/dist/tools/registry/monitor.d.ts +0 -2
  838. package/dist/tools/registry/onchain.d.ts +0 -2
  839. package/dist/tools/registry/query.d.ts +0 -2
  840. package/dist/tools/retry.d.ts +0 -8
  841. package/dist/tools/rules-hook.d.ts +0 -5
  842. package/dist/tools/runtime-health.d.ts +0 -10
  843. package/dist/tools/sanitize-description-roundtrip.spec.d.ts +0 -1
  844. package/dist/tools/sanitize-description-roundtrip.spec.js +0 -1
  845. package/dist/tools/sanitize-output.d.ts +0 -4
  846. package/dist/tools/sanitize-output.spec.d.ts +0 -1
  847. package/dist/tools/sanitize-output.spec.js +0 -1
  848. package/dist/tools/shared.d.ts +0 -20
  849. package/dist/tools/transport-integrity.d.ts +0 -7
  850. package/dist/tools/upgrade-check.d.ts +0 -75
  851. package/dist/tools/wip-deploy-assist.d.ts +0 -34
  852. package/dist/tools/wip-verify-ledger.d.ts +0 -16
  853. package/dist/tools/wrap.d.ts +0 -45
@@ -1 +1 @@
1
- export const FREEZE_MAP={'service_publish':{'object':'Service<T>','trigger':'service.publish','frozen':['order_allocators:\x20full\x20replacement\x20blocked\x20(E_ALREADY_PUBLISHED);\x20append-only\x20additions\x20remain\x20possible\x20via\x20the\x20allocator-append\x20mutation\x20(prefix/threshold\x20frozen\x20—\x20EALLOCATORS_NOT_EXTENSION=20)','all\x20settings\x20paths\x20(every\x20mutation\x20aborts\x20once\x20published)'],'preconditions':['order_allocators\x20must\x20be\x20non-empty\x20(E_NO_ALLOCATOR)','compensation_fund\x20>\x200\x20implies\x20arbitrations\x20non-empty'],'consequence':'Wrong/missing\x20allocator\x20or\x20unreachable\x20business-terminal\x20node\x20=\x20permanent\x20brick;\x20the\x20only\x20remedy\x20is\x20a\x20new\x20Service\x20(A-2).','findings':['A-2'],'sources':[{'file':'service.move','line':0x378,'pattern':'E_ALREADY_PUBLISHED'},{'file':'service.move','line':0x359,'pattern':'E_NO_ALLOCATOR'}]},'machine_publish':{'object':'Machine','trigger':'machine.publish','frozen':['entire\x20graph:\x20nodes/pairs/forwards\x20(publish\x20blocks\x20every\x20later\x20graph\x20mutation)'],'preconditions':['publishability\x20checks:\x20E_NO_ENTRY_EDGE(19)\x20E_EDGE_SOURCE_NOT_FOUND(20)\x20E_FORWARD_NO_IDENTITY(21)\x20E_UNREACHABLE_THRESHOLD(22)'],'consequence':'A\x20missing\x20paid->closed_cancel\x20edge\x20can\x20never\x20be\x20added\x20later\x20(A-2/F-2).','findings':['A-2'],'sources':[{'file':'machine.move','line':0x17c,'pattern':'assert_not_published'},{'file':'machine.move','line':0x33,'pattern':'E_NO_ENTRY_EDGE'}]},'forward_construction':{'object':'machine.Forward','trigger':'machine\x20forward\x20construction,\x20guarded\x20or\x20plain\x20(pre-publish)','frozen':[],'preconditions':['permissionIndex\x20>=\x201000\x20(USER_DEFINED_PERM_INDEX)\x20—\x20template\x20perm\x202/3\x20aborts\x20on\x20chain\x20(B-8)','retained_submission\x20ids\x20must\x20exist\x20as\x20the\x20guard\x27s\x20submission\x20slots\x20AND\x20be\x20marked\x20retained\x20(E_SUBMISSION_SLOT_MISSING\x2023\x20/\x20E_SUBMISSION_SLOT_NOT_RETAINED\x2024)','one\x20of\x20namedOperator\x20|\x20permissionIndex\x20|\x20guard\x20must\x20be\x20set\x20(E_PERMISSION_NOT_DEFINED)'],'consequence':'Bad\x20forwards\x20fail\x20at\x20build\x20time\x20—\x20but\x20only\x20if\x20the\x20tool\x20layer\x20surfaces\x20the\x20abort\x20reason.','findings':['B-8'],'sources':[{'file':'machine.move','line':0x75,'pattern':'USER_DEFINED_PERM_INDEX'},{'file':'machine.move','line':0x89,'pattern':'E_SUBMISSION_SLOT_MISSING'}]},'repository_no_freeze':{'object':'Repository','trigger':'(none\x20—\x20no\x20publish\x20concept)','frozen':[],'preconditions':['policies\x20mutable\x20post-share\x20via\x20the\x20permission-guarded\x20policy\x20add/set/remove/clear\x20calls'],'consequence':'Write-policy\x20mistakes\x20are\x20repairable\x20—\x20unlike\x20Machine/Service\x20publish.','sources':[{'file':'repository.move','line':0x3b7,'pattern':'public\x20fun\x20policy_add'}]},'discount_creation':{'object':'Discount','trigger':'service.discounts\x20(creation)','frozen':['all\x20fields\x20including\x20transferable\x20and\x20benchmark'],'preconditions':['discount_type\x20in\x20{0\x20rates,\x201\x20minus};\x20rates\x20requires\x20off\x20<=\x2010000','time_end\x20>=\x20time_start\x20(default\x20now)'],'consequence':'Non-transferable\x20coupon\x20can\x20never\x20be\x20re-homed;\x20benchmark\x20errors\x20burn\x20buyer\x20coupons\x20(A-4).','findings':['A-4'],'sources':[{'file':'service.move','line':0xbe,'pattern':'fun\x20discounts'}]}};
1
+ export const FREEZE_MAP={'service_publish':{'object':'Service<T>','trigger':'service.publish','frozen':['order_allocators:\x20full\x20replacement\x20blocked\x20(E_ALREADY_PUBLISHED);\x20append-only\x20additions\x20remain\x20possible\x20via\x20the\x20allocator-append\x20mutation\x20(prefix/threshold\x20frozen\x20—\x20EALLOCATORS_NOT_EXTENSION=20)','all\x20settings\x20paths\x20(every\x20mutation\x20aborts\x20once\x20published)'],'preconditions':['order_allocators\x20must\x20be\x20non-empty\x20(E_NO_ALLOCATOR)','compensation_fund\x20>\x200\x20implies\x20arbitrations\x20non-empty'],'consequence':'Wrong/missing\x20allocator\x20or\x20unreachable\x20business-terminal\x20node\x20=\x20permanent\x20brick;\x20the\x20only\x20remedy\x20is\x20a\x20new\x20Service\x20(A-2).','findings':['A-2'],'sources':[{'file':'service.move','line':0x378,'pattern':'E_ALREADY_PUBLISHED'},{'file':'service.move','line':0x359,'pattern':'E_NO_ALLOCATOR'}]},'machine_publish':{'object':'Machine','trigger':'machine.publish','frozen':['entire\x20graph:\x20nodes/pairs/forwards\x20(publish\x20blocks\x20every\x20later\x20graph\x20mutation)'],'preconditions':['publishability\x20checks:\x20E_NO_ENTRY_EDGE(19)\x20E_EDGE_SOURCE_NOT_FOUND(20)\x20E_FORWARD_NO_IDENTITY(21)\x20E_UNREACHABLE_THRESHOLD(22)'],'consequence':'A\x20missing\x20paid->closed_cancel\x20edge\x20can\x20never\x20be\x20added\x20later\x20(A-2/F-2).','findings':['A-2'],'sources':[{'file':'machine.move','line':0x17c,'pattern':'assert_not_published'},{'file':'machine.move','line':0x33,'pattern':'E_NO_ENTRY_EDGE'}]},'forward_construction':{'object':'machine.Forward','trigger':'machine\x20forward\x20construction,\x20guarded\x20or\x20plain\x20(pre-publish)','frozen':[],'preconditions':['permissionIndex\x20>=\x201000\x20(USER_DEFINED_PERM_INDEX)\x20—\x20template\x20perm\x202/3\x20aborts\x20on\x20chain\x20(B-8)','retained_submission\x20ids\x20must\x20exist\x20as\x20the\x20guard\x27s\x20submission\x20slots\x20AND\x20be\x20marked\x20retained\x20(E_SUBMISSION_SLOT_MISSING\x2023\x20/\x20E_SUBMISSION_SLOT_NOT_RETAINED\x2024)','one\x20of\x20namedOperator\x20|\x20permissionIndex\x20|\x20guard\x20must\x20be\x20set\x20(E_PERMISSION_NOT_DEFINED)'],'consequence':'Bad\x20forwards\x20fail\x20at\x20build\x20time\x20—\x20but\x20only\x20if\x20the\x20tool\x20layer\x20surfaces\x20the\x20abort\x20reason.','findings':['B-8'],'sources':[{'file':'machine.move','line':0x75,'pattern':'USER_DEFINED_PERM_INDEX'},{'file':'machine.move','line':0x89,'pattern':'E_SUBMISSION_SLOT_MISSING'}]},'repository_no_freeze':{'object':'Repository','trigger':'(none\x20—\x20no\x20publish\x20concept)','frozen':[],'preconditions':['policies\x20mutable\x20post-share\x20via\x20the\x20permission-guarded\x20policy\x20add/set/remove/clear\x20calls'],'consequence':'Write-policy\x20mistakes\x20are\x20repairable\x20—\x20unlike\x20Machine/Service\x20publish.','sources':[{'file':'repository.move','line':0x4d8,'pattern':'public\x20fun\x20policy_add'}]},'discount_creation':{'object':'Discount','trigger':'service.discounts\x20(creation)','frozen':['all\x20fields\x20including\x20transferable\x20and\x20benchmark'],'preconditions':['discount_type\x20in\x20{0\x20rates,\x201\x20minus};\x20rates\x20requires\x20off\x20<=\x2010000','time_end\x20>=\x20time_start\x20(default\x20now)'],'consequence':'Non-transferable\x20coupon\x20can\x20never\x20be\x20re-homed;\x20benchmark\x20errors\x20burn\x20buyer\x20coupons\x20(A-4).','findings':['A-4'],'sources':[{'file':'service.move','line':0xbe,'pattern':'fun\x20discounts'}]}};
@@ -1 +1 @@
1
- export const FUND_FLOWS={'buy_entry':{'kind':'entry','summary':'Buyer\x20pays:\x20coin\x20split\x20->\x20Order\x20+\x20Allocation\x20escrow\x20anchored\x20to\x20the\x20order.','path':['service\x20buy\x20(creates\x20the\x20Order,\x20the\x20on-chain\x20purchase\x20entry)','order-bound\x20Allocation\x20creation\x20(splits\x20coin,\x20sets\x20payment_info.for_object=order,\x20on\x20the\x20order-bound\x20funding\x20path)'],'invariants':['Allocation.balance\x20==\x20order\x20amount\x20at\x20creation','quote.ctx\x20binds\x20quote\x20to\x20tx\x20digest;\x20stock\x20deducted\x20in\x20same\x20tx\x20as\x20buy'],'sources':[{'file':'service.move','line':0x212,'pattern':'buy2_imp'},{'file':'service.move','line':0x1df,'pattern':'order_allocation'}]},'exit_alloc':{'kind':'exit','summary':'Escrow\x20exit\x201\x20(settlement\x20/\x20refund):\x20guard-matched\x20allocators\x20distribute\x20the\x20pool.','path':['the\x20allocation\x20release\x20(on-chain\x20allocation\x20entry)','per\x20matched\x20allocator:\x20once-slot\x20(OnceKey{guard,\x20allocator\x20index,\x20key})\x20consumed','Payment<T>\x20created;\x20CoinWrapper<T>\x20transferred\x20to\x20each\x20recipient','recipient\x20unwraps\x20via\x20payment.unwrap\x20/\x20order.owner_receive'],'invariants':['balance\x20>=\x20allocators.threshold\x20(EINSUFFICIENT_BALANCE)','balance\x20>\x200\x20(EZERO_DISTRIBUTION)\x20—\x20replay\x20on\x20drained\x20pool\x20aborts','payment_info\x20must\x20be\x20some\x20(ENO_PAYMENT_INFO)','every\x20allocator\x20with\x20matching\x20guard\x20RUNS,\x20in\x20vector\x20order,\x20against\x20the\x20shrinking\x20pool','once-slot\x20per\x20allocator\x20index\x20makes\x20replay\x20of\x20the\x20same\x20guard\x20abort'],'findings':['A-3'],'sources':[{'file':'allocation.move','line':0x1ee,'pattern':'public\x20fun\x20alloc<T>'},{'file':'allocation.move','line':0x1f5,'pattern':'EZERO_DISTRIBUTION'}]},'allocation_pool_no_exit':{'kind':'fact','summary':'F-BS-32\x20FINAL\x20RULING\x20(b31\x20audit\x202026-10-22):\x20Allocation\x20has\x20NO\x20drain\x20exit\x20—\x20value\x20leaves\x20a\x20pool\x20ONLY\x20through\x20allocator\x20legs\x20whose\x20guards\x20PASS.','path':['the\x20ONLY\x20sanctioned\x20remedy\x20for\x20a\x20frozen\x20residual\x20is\x20PRE-PUBLISH:\x20extend\x20the\x20allocator\x20set\x20(append-only,\x20publish-gated)\x20with\x20a\x20leg\x20whose\x20guard\x20opens\x20under\x20consensus,\x20or\x20accept\x20the\x20freeze','no\x20order-anchored,\x20service-anchored,\x20or\x20flag-gated\x20side\x20exit\x20exists\x20—\x20a\x20guard-bypassing\x20drain\x20is\x20a\x20backdoor\x20by\x20construction\x20and\x20was\x20REJECTED\x20at\x20the\x20language\x20level'],'invariants':['every\x20on-chain\x20allocation\x20path\x20upholds\x20\x27no\x20value\x20moves\x20without\x20a\x20matching\x20guard\x27\x20—\x20a\x20drain\x20primitive\x20is\x20a\x20rejected\x20shape,\x20NEVER\x20re-propose\x20it','frozen\x20residuals\x20are\x20prevented\x20pre-publish\x20by\x20the\x20AB7-C1\x20shape\x20gate\x20(recipient\x20!=\x20anchor)\x20and\x20allocator\x20planning;\x20mainnet\x200x1dcf3f3a\x20(0.01\x20frozen,\x20no\x20exit)\x20stands\x20as\x20the\x20accepted\x20cost\x20of\x20the\x20discipline'],'findings':['F-BS-32'],'sources':[{'file':'allocation.move','line':0x78,'pattern':'pool-drain\x20primitive\x20REJECTED'},{'file':'service.move','line':0x6bd,'pattern':'NO\x20drain\x20entry\x20exists'}]},'exit_compensation':{'kind':'exit','summary':'Escrow\x20exit\x202\x20(arbitration\x20indemnity):\x20service\x20compensation_fund\x20pays\x20order\x20owner\x20directly.','path':['service\x20compensation\x20claim\x20(arbitrations\x20whitelist\x20+\x20E33\x20conflict\x20check\x20on\x20chain)','arbitration.compensate\x20->\x20order.compensate\x20writes\x20claimed_by','compensation_fund\x20split\x20->\x20public\x20transfer\x20to\x20order.owner\x20(on-chain\x20payout\x20to\x20the\x20order\x20owner)'],'invariants':['order\x20must\x20not\x20be\x20already\x20claimed\x20(E_ORDER_ALREADY_CLAIMED)','claiming\x20arbitration\x20must\x20be\x20in\x20service.arbitrations\x20whitelist'],'sources':[{'file':'service.move','line':0x24c,'pattern':'compensation_claim'},{'file':'service.move','line':0x265,'pattern':'order::owner(order)'},{'file':'order.move','line':0x7c,'pattern':'public(package)\x20fun\x20compensate'}]},'dual_rail_fact':{'kind':'fact','summary':'A-3\x20dual\x20rail:\x20alloc\x20never\x20reads\x20claimed_by;\x20compensate\x20never\x20touches\x20the\x20escrow\x20balance.','path':['the\x20order\x27s\x20indemnity\x20accounting\x20(deliberate:\x20refund-of-principal\x20+\x20damages\x20in\x20one\x20case\x20is\x20legal)'],'invariants':['Double-pay\x20prevention\x20is\x20delegated\x20to\x20template\x20convention:\x20refund\x20guard\x20MUST\x20assert\x20claimed_by\x20is\x20none','Tool\x20layer\x20MUST\x20enforce\x20this\x20convention\x20via\x20rule\x20DUAL-RAIL-01\x20—\x20the\x20chain\x20will\x20not'],'findings':['A-3'],'sources':[{'file':'order.move','line':0x126,'pattern':'claimed_by'}]},'order_anchored_refund':{'kind':'fact','summary':'Order-anchored\x20refunds\x20are\x20deliberate:\x20a\x20GuardIdentifier\x20leg\x20on\x20an\x20order\x20escrow\x20pays\x20the\x20Order\x20OBJECT,\x20and\x20the\x20Order\x27s\x20owner-claim\x20entry\x20extracts\x20the\x20CoinWrapper\x20to\x20order.owner.','path':['GuardIdentifier\x20leg\x20asserts\x20its\x20passport-submitted\x20address\x20==\x20payment_info.for_object\x20(on-chain\x20allocation\x20rule)','the\x20service\x27s\x20escrow\x20setup\x20binds\x20payment_info.for_object\x20to\x20the\x20paying\x20Order','the\x20payment\x20batch\x20transfer\x20moves\x20the\x20CoinWrapper\x20to\x20the\x20Order\x20address','the\x20Order\x27s\x20owner-claim\x20entry\x20receives\x20into\x20the\x20shared\x20Order\x27s\x20own\x20UID\x20(&mut\x20self.id),\x20then\x20transfers\x20the\x20coin\x20to\x20self.owner'],'invariants':['an\x20object\x20address\x20CAN\x20receive:\x20transfer::public_receive\x20only\x20needs\x20&mut\x20UID\x20of\x20the\x20parent,\x20and\x20a\x20shared\x20object\x20qualifies','authorization\x20and\x20destination\x20are\x20separate:\x20the\x20guard\x20decides\x20who\x20may\x20trigger\x20(order.owner\x20or\x20an\x20agent),\x20the\x20payee\x20is\x20always\x20self.owner','the\x20payee\x20is\x20read\x20at\x20extraction\x20time,\x20so\x20a\x20later\x20ownership\x20change\x20is\x20followed\x20automatically','a\x20mismatched\x20submission\x20aborts\x2015\x20—\x20that\x20is\x20the\x20cross-order\x20redirect\x20guard,\x20not\x20a\x20ban\x20on\x20the\x20shape','step\x202\x20is\x20mandatory:\x20the\x20wrapper\x20stays\x20on\x20the\x20Order\x20until\x20the\x20owner-claim\x20entry\x20runs.\x20Build\x20the\x20Receiving\x20from\x20the\x20wrapper\x27s\x20id/version/digest\x20(alloc\x20tx\x20effects);\x20the\x20RPC\x20owned-objects\x20query\x20hardcodes\x20OwnerKind::Address\x20and\x20returns\x20nothing\x20for\x20object-owned\x20children'],'sources':[{'file':'allocation.move','line':0x26d,'pattern':'ERECIPIENT_NOT_FOR_OBJECT'},{'file':'service.move','line':0x1df,'pattern':'order_allocation'},{'file':'order.move','line':0x157,'pattern':'owner_receive'}]},'buyer_receive':{'kind':'exit','summary':'Buyer\x20claims\x20inbound\x20funds:\x20order.owner_receive\x20unwraps\x20Payment\x20and\x20transfers\x20coin\x20to\x20owner.','path':['order.owner_receive\x20(public\x20transfer\x20to\x20self.owner)'],'invariants':['only\x20order.owner\x20receives'],'sources':[{'file':'order.move','line':0x15c,'pattern':'owner_receive'}]},'reward_claim':{'kind':'exit','summary':'Reward\x20pool\x20exit\x201\x20(incentive):\x20guard+passport\x20gated\x20claim\x20transfers\x20coin\x20to\x20recipient.','path':['the\x20reward\x20claim\x20->\x20coin\x20to\x20recipient\x20(on-chain\x20reward\x20pool\x20exit)'],'invariants':['passport\x20must\x20satisfy\x20the\x20matched\x20RewardGuard'],'sources':[{'file':'reward.move','line':0xd8,'pattern':'public\x20fun\x20claim<T>'}]},'reward_withdraw':{'kind':'exit','summary':'Reward\x20pool\x20exit\x202\x20(balance\x20recovery,\x20ETS-B):\x20permission-gated\x20withdraw\x20leaves\x20inside\x20a\x20Payment\x20object\x20receipt.','path':['reward.withdraw[_and_unwrap]\x20(the\x20on-chain\x20balance-recovery\x20rail),\x20precheck\x20E_GUARD_LOCKED_TIME\x20(the\x20internal\x20withdrawal\x20lock)','the\x20escrowed\x20coin\x20is\x20wrapped\x20and\x20delivered\x20to\x20the\x20recipient;\x20the\x20reward\x20source\x20is\x20recorded\x20in\x20the\x20payment\x27s\x20source\x20set;\x20the\x20payment\x20receipt\x20is\x20minted\x20on\x20chain','unwrap=true\x20(single\x20PTB):\x20the\x20receipt\x20is\x20unwrapped\x20to\x20the\x20transaction\x20sender\x20in\x20the\x20same\x20transaction'],'invariants':['permission\x20index\x20158\x20(REWARD_WITHDRAW)\x20on\x20the\x20Reward\x27s\x20Permission\x20object','blocked\x20while\x20guard_not_added_expiration_time\x20is\x20Some\x20and\x20in\x20the\x20future\x20(E_GUARD_LOCKED_TIME)','claim\x20replay\x20protection\x20(once-slots)\x20is\x20untouched\x20—\x20withdraw\x20never\x20reads\x20recipient\x20records'],'sources':[{'file':'reward.move','line':0x2e5,'pattern':'public\x20fun\x20withdraw<T>'}]},'treasury_flows':{'kind':'internal','summary':'Treasury:\x20deposit/withdraw/guard-driven\x20external\x20flows;\x20owner_receive\x20bypasses\x20outflow\x20counter.','path':['treasury.deposit\x20/\x20withdraw\x20(external_*_guard\x20driven\x20variants)','treasury.owner_receive\x20moves\x20value\x20out\x20WITHOUT\x20touching\x20outflow'],'invariants':['inflow\x20and\x20outflow\x20are\x20u128\x20accumulators;\x20conservation\x20audit\x20must\x20read\x20fields,\x20not\x20events'],'sources':[{'file':'treasury.move','line':0x48,'pattern':'public\x20struct\x20Treasury<phantom\x20T>\x20has\x20key'}]},'discount_burn':{'kind':'fact','summary':'A-4:\x20coupon\x20burned\x20at\x20buy;\x20the\x20burned\x20object\x20leaves\x20only\x20a\x20dead\x20address\x20(F-ES-18\x20event\x20now\x20records\x20the\x20grant).','path':['the\x20discounted\x20quote\x20sets\x20quote.discount=some\x20when\x20benchmark\x20is\x20met\x20(on-chain\x20quote\x20step)','the\x20buy\x20path\x20destroys\x20the\x20coupon\x20after\x20capturing\x20its\x20semantics\x20(on-chain\x20burn\x20at\x20purchase)'],'invariants':['Fix\x20(protocol\x20upgrade,\x20body-level):\x20the\x20discounted\x20quote\x20returns\x20discount:none\x20below\x20benchmark','DiscountRedeemedEvent\x20(F-ES-18)\x20is\x20the\x20only\x20on-chain\x20record\x20of\x20what\x20the\x20burned\x20coupon\x20granted'],'findings':['A-4'],'sources':[{'file':'service.move','line':0x1b7,'pattern':'discount'},{'file':'service.move','line':0x227,'pattern':'discount_destroy'}]},'conservation_gap':{'kind':'fact','summary':'No\x20on-chain\x20conservation\x20check:\x20accumulator_*\x20are\x20private\x20and\x20sender==@0x0\x20is\x20unreachable.','path':[],'invariants':['Conservation\x20(sum\x20in\x20==\x20sum\x20out\x20+\x20balances)\x20MUST\x20be\x20audited\x20by\x20the\x20tool\x20layer\x20post-materialization\x20(A-14)'],'findings':['A-14'],'sources':[{'file':'service.move','line':0x100,'pattern':'compensation_fund:\x20Balance<T>'}]}};
1
+ export const FUND_FLOWS={'buy_entry':{'kind':'entry','summary':'Buyer\x20pays:\x20coin\x20split\x20->\x20Order\x20+\x20Allocation\x20escrow\x20anchored\x20to\x20the\x20order.','path':['service\x20buy\x20(creates\x20the\x20Order,\x20the\x20on-chain\x20purchase\x20entry)','order-bound\x20Allocation\x20creation\x20(splits\x20coin,\x20sets\x20payment_info.for_object=order,\x20on\x20the\x20order-bound\x20funding\x20path)'],'invariants':['Allocation.balance\x20==\x20order\x20amount\x20at\x20creation','quote.ctx\x20binds\x20quote\x20to\x20tx\x20digest;\x20stock\x20deducted\x20in\x20same\x20tx\x20as\x20buy'],'sources':[{'file':'service.move','line':0x212,'pattern':'buy2_imp'},{'file':'service.move','line':0x1df,'pattern':'order_allocation'}]},'exit_alloc':{'kind':'exit','summary':'Escrow\x20exit\x201\x20(settlement\x20/\x20refund):\x20guard-matched\x20allocators\x20distribute\x20the\x20pool.','path':['the\x20allocation\x20release\x20(on-chain\x20allocation\x20entry)','per\x20matched\x20allocator:\x20once-slot\x20(OnceKey{guard,\x20allocator\x20index,\x20key})\x20consumed','Payment<T>\x20created;\x20CoinWrapper<T>\x20transferred\x20to\x20each\x20recipient','recipient\x20unwraps\x20via\x20payment.unwrap\x20/\x20order.owner_receive'],'invariants':['balance\x20>=\x20allocators.threshold\x20(EINSUFFICIENT_BALANCE)','balance\x20>\x200\x20(EZERO_DISTRIBUTION)\x20—\x20replay\x20on\x20drained\x20pool\x20aborts','payment_info\x20must\x20be\x20some\x20(ENO_PAYMENT_INFO)','every\x20allocator\x20with\x20matching\x20guard\x20RUNS,\x20in\x20vector\x20order,\x20against\x20the\x20shrinking\x20pool','once-slot\x20per\x20allocator\x20index\x20makes\x20replay\x20of\x20the\x20same\x20guard\x20abort'],'findings':['A-3'],'sources':[{'file':'allocation.move','line':0x1ee,'pattern':'public\x20fun\x20alloc<T>'},{'file':'allocation.move','line':0x1f5,'pattern':'EZERO_DISTRIBUTION'}]},'allocation_pool_no_exit':{'kind':'fact','summary':'F-BS-32\x20FINAL\x20RULING\x20(b31\x20audit\x202026-10-22):\x20Allocation\x20has\x20NO\x20drain\x20exit\x20—\x20value\x20leaves\x20a\x20pool\x20ONLY\x20through\x20allocator\x20legs\x20whose\x20guards\x20PASS.','path':['the\x20ONLY\x20sanctioned\x20remedy\x20for\x20a\x20frozen\x20residual\x20is\x20PRE-PUBLISH:\x20extend\x20the\x20allocator\x20set\x20(append-only,\x20publish-gated)\x20with\x20a\x20leg\x20whose\x20guard\x20opens\x20under\x20consensus,\x20or\x20accept\x20the\x20freeze','no\x20order-anchored,\x20service-anchored,\x20or\x20flag-gated\x20side\x20exit\x20exists\x20—\x20a\x20guard-bypassing\x20drain\x20is\x20a\x20backdoor\x20by\x20construction\x20and\x20was\x20REJECTED\x20at\x20the\x20language\x20level'],'invariants':['every\x20on-chain\x20allocation\x20path\x20upholds\x20\x27no\x20value\x20moves\x20without\x20a\x20matching\x20guard\x27\x20—\x20a\x20drain\x20primitive\x20is\x20a\x20rejected\x20shape,\x20NEVER\x20re-propose\x20it','frozen\x20residuals\x20are\x20prevented\x20pre-publish\x20by\x20the\x20AB7-C1\x20shape\x20gate\x20(recipient\x20!=\x20anchor)\x20and\x20allocator\x20planning;\x20mainnet\x200x1dcf3f3a\x20(0.01\x20frozen,\x20no\x20exit)\x20stands\x20as\x20the\x20accepted\x20cost\x20of\x20the\x20discipline'],'findings':['F-BS-32'],'sources':[{'file':'allocation.move','line':0x78,'pattern':'pool-drain\x20primitive\x20REJECTED'},{'file':'service.move','line':0x6bd,'pattern':'NO\x20drain\x20entry\x20exists'}]},'exit_compensation':{'kind':'exit','summary':'Escrow\x20exit\x202\x20(arbitration\x20indemnity):\x20service\x20compensation_fund\x20pays\x20order\x20owner\x20directly.','path':['service\x20compensation\x20claim\x20(arbitrations\x20whitelist\x20+\x20E33\x20conflict\x20check\x20on\x20chain)','arbitration.compensate\x20->\x20order.compensate\x20writes\x20claimed_by','compensation_fund\x20split\x20->\x20public\x20transfer\x20to\x20order.owner\x20(on-chain\x20payout\x20to\x20the\x20order\x20owner)'],'invariants':['order\x20must\x20not\x20be\x20already\x20claimed\x20(E_ORDER_ALREADY_CLAIMED)','claiming\x20arbitration\x20must\x20be\x20in\x20service.arbitrations\x20whitelist'],'sources':[{'file':'service.move','line':0x24c,'pattern':'compensation_claim'},{'file':'service.move','line':0x265,'pattern':'order::owner(order)'},{'file':'order.move','line':0x7c,'pattern':'public(package)\x20fun\x20compensate'}]},'dual_rail_fact':{'kind':'fact','summary':'A-3\x20dual\x20rail:\x20alloc\x20never\x20reads\x20claimed_by;\x20compensate\x20never\x20touches\x20the\x20escrow\x20balance.','path':['the\x20order\x27s\x20indemnity\x20accounting\x20(deliberate:\x20refund-of-principal\x20+\x20damages\x20in\x20one\x20case\x20is\x20legal)'],'invariants':['Double-pay\x20prevention\x20is\x20delegated\x20to\x20template\x20convention:\x20refund\x20guard\x20MUST\x20assert\x20claimed_by\x20is\x20none','Tool\x20layer\x20MUST\x20enforce\x20this\x20convention\x20via\x20rule\x20DUAL-RAIL-01\x20—\x20the\x20chain\x20will\x20not'],'findings':['A-3'],'sources':[{'file':'order.move','line':0x143,'pattern':'claimed_by'}]},'order_anchored_refund':{'kind':'fact','summary':'Order-anchored\x20refunds\x20are\x20deliberate:\x20a\x20GuardIdentifier\x20leg\x20on\x20an\x20order\x20escrow\x20pays\x20the\x20Order\x20OBJECT,\x20and\x20the\x20Order\x27s\x20owner-claim\x20entry\x20extracts\x20the\x20CoinWrapper\x20to\x20order.owner.','path':['GuardIdentifier\x20leg\x20asserts\x20its\x20passport-submitted\x20address\x20==\x20payment_info.for_object\x20(on-chain\x20allocation\x20rule)','the\x20service\x27s\x20escrow\x20setup\x20binds\x20payment_info.for_object\x20to\x20the\x20paying\x20Order','the\x20payment\x20batch\x20transfer\x20moves\x20the\x20CoinWrapper\x20to\x20the\x20Order\x20address','the\x20Order\x27s\x20owner-claim\x20entry\x20receives\x20into\x20the\x20shared\x20Order\x27s\x20own\x20UID\x20(&mut\x20self.id),\x20then\x20transfers\x20the\x20coin\x20to\x20self.owner'],'invariants':['an\x20object\x20address\x20CAN\x20receive:\x20transfer::public_receive\x20only\x20needs\x20&mut\x20UID\x20of\x20the\x20parent,\x20and\x20a\x20shared\x20object\x20qualifies','authorization\x20and\x20destination\x20are\x20separate:\x20the\x20guard\x20decides\x20who\x20may\x20trigger\x20(order.owner\x20or\x20an\x20agent),\x20the\x20payee\x20is\x20always\x20self.owner','the\x20payee\x20is\x20read\x20at\x20extraction\x20time,\x20so\x20a\x20later\x20ownership\x20change\x20is\x20followed\x20automatically','a\x20mismatched\x20submission\x20aborts\x2015\x20—\x20that\x20is\x20the\x20cross-order\x20redirect\x20guard,\x20not\x20a\x20ban\x20on\x20the\x20shape','step\x202\x20is\x20mandatory:\x20the\x20wrapper\x20stays\x20on\x20the\x20Order\x20until\x20the\x20owner-claim\x20entry\x20runs.\x20Build\x20the\x20Receiving\x20from\x20the\x20wrapper\x27s\x20id/version/digest\x20(alloc\x20tx\x20effects);\x20the\x20RPC\x20owned-objects\x20query\x20hardcodes\x20OwnerKind::Address\x20and\x20returns\x20nothing\x20for\x20object-owned\x20children'],'sources':[{'file':'allocation.move','line':0x26d,'pattern':'ERECIPIENT_NOT_FOR_OBJECT'},{'file':'service.move','line':0x1df,'pattern':'order_allocation'},{'file':'order.move','line':0x172,'pattern':'owner_receive'}]},'buyer_receive':{'kind':'exit','summary':'Buyer\x20claims\x20inbound\x20funds:\x20order.owner_receive\x20unwraps\x20Payment\x20and\x20transfers\x20coin\x20to\x20owner.','path':['order.owner_receive\x20(public\x20transfer\x20to\x20self.owner)'],'invariants':['only\x20order.owner\x20receives'],'sources':[{'file':'order.move','line':0x15e,'pattern':'owner_receive'}]},'reward_claim':{'kind':'exit','summary':'Reward\x20pool\x20exit\x201\x20(incentive):\x20guard+passport\x20gated\x20claim\x20transfers\x20coin\x20to\x20recipient.','path':['the\x20reward\x20claim\x20->\x20coin\x20to\x20recipient\x20(on-chain\x20reward\x20pool\x20exit)'],'invariants':['passport\x20must\x20satisfy\x20the\x20matched\x20RewardGuard'],'sources':[{'file':'reward.move','line':0xe3,'pattern':'public\x20fun\x20claim<T>'}]},'reward_withdraw':{'kind':'exit','summary':'Reward\x20pool\x20exit\x202\x20(balance\x20recovery,\x20ETS-B):\x20permission-gated\x20withdraw\x20leaves\x20inside\x20a\x20Payment\x20object\x20receipt.','path':['reward.withdraw[_and_unwrap]\x20(the\x20on-chain\x20balance-recovery\x20rail),\x20precheck\x20E_GUARD_LOCKED_TIME\x20(the\x20internal\x20withdrawal\x20lock)','the\x20escrowed\x20coin\x20is\x20wrapped\x20and\x20delivered\x20to\x20the\x20recipient;\x20the\x20reward\x20source\x20is\x20recorded\x20in\x20the\x20payment\x27s\x20source\x20set;\x20the\x20payment\x20receipt\x20is\x20minted\x20on\x20chain','unwrap=true\x20(single\x20PTB):\x20the\x20receipt\x20is\x20unwrapped\x20to\x20the\x20transaction\x20sender\x20in\x20the\x20same\x20transaction'],'invariants':['permission\x20index\x20158\x20(REWARD_WITHDRAW)\x20on\x20the\x20Reward\x27s\x20Permission\x20object','blocked\x20while\x20guard_not_added_expiration_time\x20is\x20Some\x20and\x20in\x20the\x20future\x20(E_GUARD_LOCKED_TIME)','claim\x20replay\x20protection\x20(once-slots)\x20is\x20untouched\x20—\x20withdraw\x20never\x20reads\x20recipient\x20records'],'sources':[{'file':'reward.move','line':0x33a,'pattern':'public\x20fun\x20withdraw<T>'}]},'treasury_flows':{'kind':'internal','summary':'Treasury:\x20deposit/withdraw/guard-driven\x20external\x20flows;\x20owner_receive\x20bypasses\x20outflow\x20counter.','path':['treasury.deposit\x20/\x20withdraw\x20(external_*_guard\x20driven\x20variants)','treasury.owner_receive\x20moves\x20value\x20out\x20WITHOUT\x20touching\x20outflow'],'invariants':['inflow\x20and\x20outflow\x20are\x20u128\x20accumulators;\x20conservation\x20audit\x20must\x20read\x20fields,\x20not\x20events'],'sources':[{'file':'treasury.move','line':0x48,'pattern':'public\x20struct\x20Treasury<phantom\x20T>\x20has\x20key'}]},'discount_burn':{'kind':'fact','summary':'A-4:\x20coupon\x20burned\x20at\x20buy;\x20the\x20burned\x20object\x20leaves\x20only\x20a\x20dead\x20address\x20(F-ES-18\x20event\x20now\x20records\x20the\x20grant).','path':['the\x20discounted\x20quote\x20sets\x20quote.discount=some\x20when\x20benchmark\x20is\x20met\x20(on-chain\x20quote\x20step)','the\x20buy\x20path\x20destroys\x20the\x20coupon\x20after\x20capturing\x20its\x20semantics\x20(on-chain\x20burn\x20at\x20purchase)'],'invariants':['Fix\x20(protocol\x20upgrade,\x20body-level):\x20the\x20discounted\x20quote\x20returns\x20discount:none\x20below\x20benchmark','DiscountRedeemedEvent\x20(F-ES-18)\x20is\x20the\x20only\x20on-chain\x20record\x20of\x20what\x20the\x20burned\x20coupon\x20granted'],'findings':['A-4'],'sources':[{'file':'service.move','line':0x1b7,'pattern':'discount'},{'file':'service.move','line':0x227,'pattern':'discount_destroy'}]},'conservation_gap':{'kind':'fact','summary':'No\x20on-chain\x20conservation\x20check:\x20accumulator_*\x20are\x20private\x20and\x20sender==@0x0\x20is\x20unreachable.','path':[],'invariants':['Conservation\x20(sum\x20in\x20==\x20sum\x20out\x20+\x20balances)\x20MUST\x20be\x20audited\x20by\x20the\x20tool\x20layer\x20post-materialization\x20(A-14)'],'findings':['A-14'],'sources':[{'file':'service.move','line':0x100,'pattern':'compensation_fund:\x20Balance<T>'}]}};
@@ -1 +1 @@
1
- export const OBJECT_GRAPH={'Sale':{'module':'service','ownership':'value','references':{},'valueFields':{'name':'String','price':'u64','stock':'u64','suspension':'bool','wip':'String\x20//\x20write-only\x20(A-10)','wip_hash':'String\x20//\x20enforced\x20at\x20quote\x20(E_WIP_HASH_NOT_MATCH)'},'notes':'Value\x20type\x20embedded\x20in\x20Service.sales;\x20no\x20independent\x20identity.','source':{'file':'service.move','line':0x90,'pattern':'public\x20struct\x20Sale\x20has\x20store,\x20drop,\x20copy'},'findings':['A-10','A-15']},'Permission':{'module':'permission','ownership':'shared','references':{'um':'Contact?'},'valueFields':{'owner':'address','admin':'vector<address>','description':'String','remark':'vector<PermissionRemark>','table':'ParentLinkedTable<address,\x20vector<u16>>\x20//\x20entity/guard\x20->\x20perm\x20indexes'},'notes':'USER_DEFINED_PERM_INDEX_START=1000\x20enforced\x20at\x20construction;\x20the\x20permission\x20check\x20grants\x20all\x20indexes\x20to\x20admins.','source':{'file':'permission.move','line':0x21,'pattern':'public\x20struct\x20Permission\x20has\x20key'}},'Guard':{'module':'guard','ownership':'shared','references':{'relies':'address[]\x20//\x20any\x20object'},'valueFields':{'description':'String','table':'vector<TableItem>','validated':'vector<TableItemType>','input':'vector<u8>','relies_logic_and':'bool','immutable':'bool','rep':'bool'},'notes':'rep=false\x20means\x20the\x20queried\x20object/first\x20param\x20failed\x20the\x201167\x20query\x20validation.','source':{'file':'guard.move','line':0x7d,'pattern':'public\x20struct\x20Guard\x20has\x20key'}},'Machine':{'module':'machine','ownership':'shared','references':{'consensus_repositories':'Repository[]','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','nodes':'ParentLinkedTable<String,\x20vector<NodePair>>','bPaused':'bool','bPublished':'bool'},'notes':'Forward\x20=\x20{namedOperator?\x20|\x20permissionIndex?\x20(pre-check,\x20namedOperator\x20first)}\x20+\x20guard?\x20(post-check).\x20permissionIndex>=1000\x20at\x20construction;\x20retained_submission\x20must\x20be\x20subset\x20of\x20guard\x20submissions.\x20namedOperator\x20\x27\x27\x20(empty)\x20=\x20order\x20holder\x20—\x20the\x20open-subscription\x20buyer\x20self-advance\x20standard;\x20\x27\x27\x20may\x20coexist\x20with\x20permissionIndex\x20on\x20one\x20forward\x20(order\x20holder\x20OR\x20permission\x20entity).','source':{'file':'machine.move','line':0x171,'pattern':'public\x20struct\x20Machine\x20has\x20key'}},'Service<T>':{'module':'service','typeParam':'T','ownership':'shared','references':{'repositories':'Repository[]','buy_guard':'Guard?','machine':'Machine?','arbitrations':'Arbitration<T>[]','order_allocators':'Guard\x20(via\x20Allocators.allocators[].guard)','rewards':'Reward<T>[]','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','location':'String','sales':'vector<Sale>','bPublished':'bool','bPaused':'bool','customer_required':'vector<String>','compensation_fund':'Balance<T>','paused_time':'Option<u64>','setting_lock_duration':'u64'},'notes':'customer_required\x20is\x20write-only,\x20buy\x20path\x20never\x20enforces\x20it\x20(A-1).\x20compensation_fund\x20pays\x20arbitrator\x20indemnity\x20directly\x20to\x20order\x20owner.','source':{'file':'service.move','line':0xf4,'pattern':'public\x20struct\x20Service<phantom\x20T>\x20has\x20key'},'findings':['A-1','A-4','A-9','A-10','A-15']},'Order':{'module':'order','ownership':'shared','references':{'service':'Service<T>','machine':'Machine?','progress':'Progress?','allocation':'Allocation<T>?','discount':'Discount?','claimed_by':'Arb<T>?','required_info':'Contact|Proof?','dispute':'Arb<T>[]','agent':'address[]'},'valueFields':{'items':'vector<SaleItem>','amount':'u64','owner':'address','time':'u64\x20//\x20order\x20creation'},'notes':'claimed_by\x20written\x20by\x20compensate;\x20NOT\x20read\x20by\x20allocation.alloc\x20(dual-rail,\x20A-3\x20deliberate).\x20required_info\x20writable\x20by\x20owner\x20only;\x20the\x20FIELD\x20stays\x20attestation-only\x20(A-1:\x20buy\x20never\x20requires\x20it),\x20but\x20a\x20controlled\x20Proof\x20bind\x20entry\x20(MOV-PROTOCOL-1212\x2011)\x20now\x20chain-enforces\x20proof-about==order\x20&&\x20proof-creator==owner\x20at\x20write\x20time\x20(rejection\x20aborts,\x20nothing\x20written).','source':{'file':'order.move','line':0x3f,'pattern':'public\x20struct\x20Order\x20has\x20key'},'findings':['A-1','A-3','A-10']},'Progress':{'module':'progress','ownership':'shared','references':{'machine':'Machine','task':'Order?','context_repositories':'Repository[]'},'valueFields':{'current':'String','namedOperator':'vector<NamedOperator>','session':'vector<Session>','history':'ParentTableVec<History>','current_time':'u64\x20//\x20TIME\x20OF\x20ENTERING\x20CURRENT\x20NODE,\x20path-dependent\x20(E-10)'},'notes':'current_time\x20refreshes\x20on\x20every\x20node\x20transition;\x20window\x20guards\x20anchored\x20on\x20it\x20are\x20path-dependent.','source':{'file':'progress.move','line':0x86,'pattern':'public\x20struct\x20Progress\x20has\x20key'},'findings':['E-10','D-14','A-6']},'Allocation<T>':{'module':'allocation','typeParam':'T','ownership':'shared','references':{'allocators.allocators[].guard':'Guard','payment':'Payment<T>[]','payment_info.for_object':'Order\x20(anchor)'},'valueFields':{'balance':'Balance<T>','allocators':'Allocators','payment_info':'Option<PaymentInfo>'},'notes':'alloc\x20runs\x20EVERY\x20allocator\x20whose\x20guard\x20matches;\x20each\x20consumes\x20a\x20once-slot\x20keyed\x20by\x20allocator\x20index;\x20evaluated\x20in\x20vector\x20order\x20against\x20shrinking\x20pool.','source':{'file':'allocation.move','line':0x1e5,'pattern':'public\x20struct\x20Allocation<phantom\x20T>\x20has\x20key'},'findings':['A-3']},'Payment<T>':{'module':'payment','typeParam':'T','ownership':'shared','references':{'info.for_object':'object?','info.for_guard':'Guard?','from_object':'object?'},'valueFields':{'amount':'u64','time':'u64','info':'PaymentInfo','signer':'address','record':'vector<Revenue>'},'source':{'file':'payment.move','line':0x5c,'pattern':'public\x20struct\x20Payment<phantom\x20T>\x20has\x20key'}},'CoinWrapper<T>':{'module':'payment','typeParam':'T','ownership':'owned','references':{'payment':'Payment<T>'},'valueFields':{'balance':'Balance<T>'},'notes':'Transferred\x20to\x20each\x20recipient;\x20unwrap\x20yields\x20Coin<T>.','source':{'file':'payment.move','line':0x27,'pattern':'public\x20struct\x20CoinWrapper<phantom\x20T>\x20has\x20key,\x20store'}},'Arbitration<T>':{'module':'arbitration','typeParam':'T','ownership':'shared','references':{'voting_guard[].guard':'Guard','usage_guard':'Guard?','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','location':'String','fee':'u64','balance':'Balance<T>','bPaused':'bool'},'notes':'Independent\x20arbitrator\x20=\x20independent\x20account\x20+\x20independent\x20Permission.\x20Empty\x20voting_guard\x20=\x20open\x20voting.','source':{'file':'arbitration.move','line':0x2f,'pattern':'public\x20struct\x20Arbitration<phantom\x20T>\x20has\x20key'}},'Arb<T>':{'module':'arb','typeParam':'T','ownership':'shared','references':{'order':'Order','arbitration':'Arbitration<T>'},'valueFields':{'voted':'vector<Voted>','proposition':'vector<Proposition>','fee':'Balance<T>','feedback':'String','indemnity':'Option<Indemnity>','voting_deadline':'Option<u64>','objection':'String','status':'u8\x20//\x200..6\x20Principal_confirming..Withdrawn','compensation_time':'Option<u64>','time':'u64'},'source':{'file':'arb.move','line':0xb0,'pattern':'public\x20struct\x20Arb<phantom\x20T>\x20has\x20key'}},'Repository':{'module':'repository','ownership':'shared','references':{'policies[].write_guard[].guard':'Guard','policies[].quote_guard':'Guard?','rewards':'Reward<T>[]','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','policies':'vector<PolicyRule>','data':'ParentTable<DataKey,\x20vector<u8>>'},'notes':'Policies\x20mutable\x20post-share\x20via\x20the\x20permission-guarded\x20policy\x20add/set/remove/clear\x20calls.\x20The\x20passport-based\x20id-data\x20removal\x20call\x20always\x20aborts\x20(A-8).','source':{'file':'repository.move','line':0x2db,'pattern':'public\x20struct\x20Repository\x20has\x20key'},'findings':['A-8','A-10']},'Demand':{'module':'demand','ownership':'shared','references':{'rewards':'Reward<T>[]','guards[].guard':'Guard','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','location':'String','presenters':'ParentTable<address,\x20ServiceInfo>'},'source':{'file':'demand.move','line':0x49,'pattern':'public\x20struct\x20Demand\x20has\x20key'}},'Reward<T>':{'module':'reward','typeParam':'T','ownership':'shared','references':{'guards[].guard':'Guard','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','balance':'Balance<T>','guard_not_added_expiration_time':'Option<u64>','record':'ParentTable<address,\x20RecipientRecord>'},'source':{'file':'reward.move','line':0xd2,'pattern':'public\x20struct\x20Reward<phantom\x20T>\x20has\x20key'}},'Treasury<T>':{'module':'treasury','typeParam':'T','ownership':'shared','references':{'external_deposit_guard[].guard':'Guard','external_withdraw_guard[].guard':'Guard','um':'Contact?','permission':'Permission'},'valueFields':{'balance':'Balance<T>','history':'ParentTable<address,\x20Record>','inflow':'u128','outflow':'u128'},'notes':'owner_receive\x20moves\x20value\x20out\x20WITHOUT\x20touching\x20outflow;\x20read\x20inflow\x20field,\x20never\x20re-derive\x20from\x20events.','source':{'file':'treasury.move','line':0x48,'pattern':'public\x20struct\x20Treasury<phantom\x20T>\x20has\x20key'}},'Contact':{'module':'contact','ownership':'shared','references':{'permission':'Permission'},'valueFields':{'description':'String','location':'String','ims':'vector<Im>'},'notes':'The\x20contact\x20status-change\x20call\x20has\x20NO\x20permission\x20check;\x20the\x20permission\x20field\x20is\x20never\x20consulted\x20by\x20it\x20(A-16).','source':{'file':'contact.move','line':0x19,'pattern':'public\x20struct\x20Contact\x20has\x20key'},'findings':['A-16']},'Proof':{'module':'proof','ownership':'owned','references':{'about':'object?'},'valueFields':{'description':'String','proof':'String','item_count':'Option<u64>','server_pubkey':'String','server_signature':'String','signer':'address','proof_type':'u64','time':'u64'},'notes':'No\x20share_object\x20in\x20module;\x20owned\x20by\x20creator.\x20Carrier\x20for\x20WTS\x20evidence\x20anchors.','source':{'file':'proof.move','line':0xd,'pattern':'public\x20struct\x20Proof\x20has\x20key'}},'Discount':{'module':'service','ownership':'owned','references':{'service':'Service<T>'},'valueFields':{'name':'String','discount_type':'u8\x20//\x200=rates\x201=minus','benchmark':'Option<u64>','off':'u64','time_start':'u64','time_end':'u64','transferable':'bool'},'notes':'Transferred\x20to\x20buyer.\x20Burned\x20unconditionally\x20at\x20buy\x20even\x20when\x20benchmark\x20unmet\x20(A-4).','source':{'file':'service.move','line':0xb2,'pattern':'public\x20struct\x20Discount\x20has\x20key'},'findings':['A-4']},'Passport':{'module':'passport','ownership':'owned','references':{'guard[].guard':'Guard','guard[].relies':'address[]','impack':'address[]'},'valueFields':{'result':'bool','tx_hash':'vector<u8>','time':'u64','signer':'address','has_verified':'bool'},'notes':'No\x20share_object\x20in\x20module;\x20carried\x20by\x20signer,\x20mutated\x20across\x20guard\x20checks.','source':{'file':'passport.move','line':0x39,'pattern':'public\x20struct\x20Passport\x20has\x20key'}},'EntityOrders':{'module':'entity_order','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<OrderRoleItem>>'},'notes':'Reverse\x20index\x20entity->orders.\x20FIFO\x20eviction\x20at\x205200\x20entries\x20—\x20silent.','source':{'file':'entity_order.move','line':0x1e,'pattern':'public\x20struct\x20EntityOrders\x20has\x20key'},'findings':['A-13']},'EntityPermission':{'module':'entity_permission','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<PermissionItem>>'},'source':{'file':'entity_permission.move','line':0x1e,'pattern':'public\x20struct\x20EntityPermission\x20has\x20key'}},'EntityContact':{'module':'entity_contact','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<ContactItem>>'},'source':{'file':'entity_contact.move','line':0x18,'pattern':'public\x20struct\x20EntityContact\x20has\x20key'}},'ObjectLinkerCore':{'module':'object_linker','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<CoreLink>>\x20//\x20target\x20->\x20core\x20who[],\x20lossless'},'source':{'file':'object_linker.move','line':0x25,'pattern':'public\x20struct\x20ObjectLinkerCore\x20has\x20key'}},'ObjectLinkerTx':{'module':'object_linker','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20TxBuffer>\x20//\x20target\x20->\x20recent\x20tx\x20who[],\x20lossy\x20FIFO'},'source':{'file':'object_linker.move','line':0x2b,'pattern':'public\x20struct\x20ObjectLinkerTx\x20has\x20key'}},'Registrar':{'module':'registrar','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20Votes>\x20//\x20who\x20->\x20likes/dislikes/favors'},'source':{'file':'registrar.move','line':0xb4,'pattern':'public\x20struct\x20Registrar\x20has\x20key'}},'Entity':{'module':'registrar','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20AddressInfo>'},'source':{'file':'registrar.move','line':0xb9,'pattern':'public\x20struct\x20Entity\x20has\x20key'}},'Messenger':{'module':'registrar','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<String,\x20PubKeyData>'},'notes':'DEAD:\x20struct\x20declared\x20but\x20never\x20shared.\x20No\x20on-chain\x20Messenger\x20(A-16).','source':{'file':'registrar.move','line':0x278,'pattern':'public\x20struct\x20Messenger\x20has\x20key'},'findings':['A-16']},'Resource':{'module':'resource','ownership':'shared','references':{},'valueFields':{'table':'ParentTable<address,\x20AddressTag>'},'source':{'file':'resource.move','line':0x11,'pattern':'public\x20struct\x20Resource\x20has\x20key'}}};
1
+ export const OBJECT_GRAPH={'Sale':{'module':'service','ownership':'value','references':{},'valueFields':{'name':'String','price':'u64','stock':'u64','suspension':'bool','wip':'String\x20//\x20write-only\x20(A-10)','wip_hash':'String\x20//\x20enforced\x20at\x20quote\x20(E_WIP_HASH_NOT_MATCH)'},'notes':'Value\x20type\x20embedded\x20in\x20Service.sales;\x20no\x20independent\x20identity.','source':{'file':'service.move','line':0x90,'pattern':'public\x20struct\x20Sale\x20has\x20store,\x20drop,\x20copy'},'findings':['A-10','A-15']},'Permission':{'module':'permission','ownership':'shared','references':{'um':'Contact?'},'valueFields':{'owner':'address','admin':'vector<address>','description':'String','remark':'vector<PermissionRemark>','table':'ParentLinkedTable<address,\x20vector<u16>>\x20//\x20entity/guard\x20->\x20perm\x20indexes'},'notes':'USER_DEFINED_PERM_INDEX_START=1000\x20enforced\x20at\x20construction;\x20the\x20permission\x20check\x20grants\x20all\x20indexes\x20to\x20admins.','source':{'file':'permission.move','line':0x21,'pattern':'public\x20struct\x20Permission\x20has\x20key'}},'Guard':{'module':'guard','ownership':'shared','references':{'relies':'address[]\x20//\x20any\x20object'},'valueFields':{'description':'String','table':'vector<TableItem>','validated':'vector<TableItemType>','input':'vector<u8>','relies_logic_and':'bool','immutable':'bool','rep':'bool'},'notes':'rep=false\x20means\x20the\x20queried\x20object/first\x20param\x20failed\x20the\x201167\x20query\x20validation.','source':{'file':'guard.move','line':0x7d,'pattern':'public\x20struct\x20Guard\x20has\x20key'}},'Machine':{'module':'machine','ownership':'shared','references':{'consensus_repositories':'Repository[]','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','nodes':'ParentLinkedTable<String,\x20vector<NodePair>>','bPaused':'bool','bPublished':'bool'},'notes':'Forward\x20=\x20{namedOperator?\x20|\x20permissionIndex?\x20(pre-check,\x20namedOperator\x20first)}\x20+\x20guard?\x20(post-check).\x20permissionIndex>=1000\x20at\x20construction;\x20retained_submission\x20must\x20be\x20subset\x20of\x20guard\x20submissions.\x20namedOperator\x20\x27\x27\x20(empty)\x20=\x20order\x20holder\x20—\x20the\x20open-subscription\x20buyer\x20self-advance\x20standard;\x20\x27\x27\x20may\x20coexist\x20with\x20permissionIndex\x20on\x20one\x20forward\x20(order\x20holder\x20OR\x20permission\x20entity).','source':{'file':'machine.move','line':0x171,'pattern':'public\x20struct\x20Machine\x20has\x20key'}},'Service<T>':{'module':'service','typeParam':'T','ownership':'shared','references':{'repositories':'Repository[]','buy_guard':'Guard?','machine':'Machine?','arbitrations':'Arbitration<T>[]','order_allocators':'Guard\x20(via\x20Allocators.allocators[].guard)','rewards':'Reward<T>[]','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','location':'String','sales':'vector<Sale>','bPublished':'bool','bPaused':'bool','customer_required':'vector<String>','compensation_fund':'Balance<T>','paused_time':'Option<u64>','setting_lock_duration':'u64'},'notes':'customer_required\x20is\x20write-only,\x20buy\x20path\x20never\x20enforces\x20it\x20(A-1).\x20compensation_fund\x20pays\x20arbitrator\x20indemnity\x20directly\x20to\x20order\x20owner.','source':{'file':'service.move','line':0xf4,'pattern':'public\x20struct\x20Service<phantom\x20T>\x20has\x20key'},'findings':['A-1','A-4','A-9','A-10','A-15']},'Order':{'module':'order','ownership':'shared','references':{'service':'Service<T>','machine':'Machine?','progress':'Progress?','allocation':'Allocation<T>?','discount':'Discount?','claimed_by':'Arb<T>?','required_info':'Contact|Proof?','dispute':'Arb<T>[]','agent':'address[]'},'valueFields':{'items':'vector<SaleItem>','amount':'u64','owner':'address','time':'u64\x20//\x20order\x20creation'},'notes':'claimed_by\x20written\x20by\x20compensate;\x20NOT\x20read\x20by\x20allocation.alloc\x20(dual-rail,\x20A-3\x20deliberate).\x20required_info\x20writable\x20by\x20owner\x20only;\x20the\x20FIELD\x20stays\x20attestation-only\x20(A-1:\x20buy\x20never\x20requires\x20it),\x20but\x20a\x20controlled\x20Proof\x20bind\x20entry\x20(MOV-PROTOCOL-1212\x2011)\x20now\x20chain-enforces\x20proof-about==order\x20&&\x20proof-creator==owner\x20at\x20write\x20time\x20(rejection\x20aborts,\x20nothing\x20written).','source':{'file':'order.move','line':0x3f,'pattern':'public\x20struct\x20Order\x20has\x20key'},'findings':['A-1','A-3','A-10']},'Progress':{'module':'progress','ownership':'shared','references':{'machine':'Machine','task':'Order?','context_repositories':'Repository[]'},'valueFields':{'current':'String','namedOperator':'vector<NamedOperator>','session':'vector<Session>','history':'ParentTableVec<History>','current_time':'u64\x20//\x20TIME\x20OF\x20ENTERING\x20CURRENT\x20NODE,\x20path-dependent\x20(E-10)'},'notes':'current_time\x20refreshes\x20on\x20every\x20node\x20transition;\x20window\x20guards\x20anchored\x20on\x20it\x20are\x20path-dependent.','source':{'file':'progress.move','line':0x86,'pattern':'public\x20struct\x20Progress\x20has\x20key'},'findings':['E-10','D-14','A-6']},'Allocation<T>':{'module':'allocation','typeParam':'T','ownership':'shared','references':{'allocators.allocators[].guard':'Guard','payment':'Payment<T>[]','payment_info.for_object':'Order\x20(anchor)'},'valueFields':{'balance':'Balance<T>','allocators':'Allocators','payment_info':'Option<PaymentInfo>'},'notes':'alloc\x20runs\x20EVERY\x20allocator\x20whose\x20guard\x20matches;\x20each\x20consumes\x20a\x20once-slot\x20keyed\x20by\x20allocator\x20index;\x20evaluated\x20in\x20vector\x20order\x20against\x20shrinking\x20pool.','source':{'file':'allocation.move','line':0x1e5,'pattern':'public\x20struct\x20Allocation<phantom\x20T>\x20has\x20key'},'findings':['A-3']},'Payment<T>':{'module':'payment','typeParam':'T','ownership':'shared','references':{'info.for_object':'object?','info.for_guard':'Guard?','from_object':'object?'},'valueFields':{'amount':'u64','time':'u64','info':'PaymentInfo','signer':'address','record':'vector<Revenue>'},'source':{'file':'payment.move','line':0x5c,'pattern':'public\x20struct\x20Payment<phantom\x20T>\x20has\x20key'}},'CoinWrapper<T>':{'module':'payment','typeParam':'T','ownership':'owned','references':{'payment':'Payment<T>'},'valueFields':{'balance':'Balance<T>'},'notes':'Transferred\x20to\x20each\x20recipient;\x20unwrap\x20yields\x20Coin<T>.','source':{'file':'payment.move','line':0x27,'pattern':'public\x20struct\x20CoinWrapper<phantom\x20T>\x20has\x20key,\x20store'}},'Arbitration<T>':{'module':'arbitration','typeParam':'T','ownership':'shared','references':{'voting_guard[].guard':'Guard','usage_guard':'Guard?','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','location':'String','fee':'u64','balance':'Balance<T>','bPaused':'bool'},'notes':'Independent\x20arbitrator\x20=\x20independent\x20account\x20+\x20independent\x20Permission.\x20Empty\x20voting_guard\x20=\x20open\x20voting.','source':{'file':'arbitration.move','line':0x3a,'pattern':'public\x20struct\x20Arbitration<phantom\x20T>\x20has\x20key'}},'Arb<T>':{'module':'arb','typeParam':'T','ownership':'shared','references':{'order':'Order','arbitration':'Arbitration<T>'},'valueFields':{'voted':'vector<Voted>','proposition':'vector<Proposition>','fee':'Balance<T>','feedback':'String','indemnity':'Option<Indemnity>','voting_deadline':'Option<u64>','objection':'String','status':'u8\x20//\x200..6\x20Principal_confirming..Withdrawn','compensation_time':'Option<u64>','time':'u64'},'source':{'file':'arb.move','line':0xb0,'pattern':'public\x20struct\x20Arb<phantom\x20T>\x20has\x20key'}},'Repository':{'module':'repository','ownership':'shared','references':{'policies[].write_guard[].guard':'Guard','policies[].quote_guard':'Guard?','rewards':'Reward<T>[]','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','policies':'vector<PolicyRule>','data':'ParentTable<DataKey,\x20vector<u8>>'},'notes':'Policies\x20mutable\x20post-share\x20via\x20the\x20permission-guarded\x20policy\x20add/set/remove/clear\x20calls.\x20The\x20passport-based\x20id-data\x20removal\x20call\x20always\x20aborts\x20(A-8).','source':{'file':'repository.move','line':0x3fc,'pattern':'public\x20struct\x20Repository\x20has\x20key'},'findings':['A-8','A-10']},'Demand':{'module':'demand','ownership':'shared','references':{'rewards':'Reward<T>[]','guards[].guard':'Guard','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','location':'String','presenters':'ParentTable<address,\x20ServiceInfo>'},'source':{'file':'demand.move','line':0x49,'pattern':'public\x20struct\x20Demand\x20has\x20key'}},'Reward<T>':{'module':'reward','typeParam':'T','ownership':'shared','references':{'guards[].guard':'Guard','um':'Contact?','permission':'Permission'},'valueFields':{'description':'String','balance':'Balance<T>','guard_not_added_expiration_time':'Option<u64>','record':'ParentTable<address,\x20RecipientRecord>'},'source':{'file':'reward.move','line':0xd2,'pattern':'public\x20struct\x20Reward<phantom\x20T>\x20has\x20key'}},'Treasury<T>':{'module':'treasury','typeParam':'T','ownership':'shared','references':{'external_deposit_guard[].guard':'Guard','external_withdraw_guard[].guard':'Guard','um':'Contact?','permission':'Permission'},'valueFields':{'balance':'Balance<T>','history':'ParentTable<address,\x20Record>','inflow':'u128','outflow':'u128'},'notes':'owner_receive\x20moves\x20value\x20out\x20WITHOUT\x20touching\x20outflow;\x20read\x20inflow\x20field,\x20never\x20re-derive\x20from\x20events.','source':{'file':'treasury.move','line':0x48,'pattern':'public\x20struct\x20Treasury<phantom\x20T>\x20has\x20key'}},'Contact':{'module':'contact','ownership':'shared','references':{'permission':'Permission'},'valueFields':{'description':'String','location':'String','ims':'vector<Im>'},'notes':'The\x20contact\x20status-change\x20call\x20has\x20NO\x20permission\x20check;\x20the\x20permission\x20field\x20is\x20never\x20consulted\x20by\x20it\x20(A-16).','source':{'file':'contact.move','line':0x19,'pattern':'public\x20struct\x20Contact\x20has\x20key'},'findings':['A-16']},'Proof':{'module':'proof','ownership':'owned','references':{'about':'object?'},'valueFields':{'description':'String','proof':'String','item_count':'Option<u64>','server_pubkey':'String','server_signature':'String','signer':'address','proof_type':'u64','time':'u64'},'notes':'No\x20share_object\x20in\x20module;\x20owned\x20by\x20creator.\x20Carrier\x20for\x20WTS\x20evidence\x20anchors.','source':{'file':'proof.move','line':0xd,'pattern':'public\x20struct\x20Proof\x20has\x20key'}},'Discount':{'module':'service','ownership':'owned','references':{'service':'Service<T>'},'valueFields':{'name':'String','discount_type':'u8\x20//\x200=rates\x201=minus','benchmark':'Option<u64>','off':'u64','time_start':'u64','time_end':'u64','transferable':'bool'},'notes':'Transferred\x20to\x20buyer.\x20Burned\x20unconditionally\x20at\x20buy\x20even\x20when\x20benchmark\x20unmet\x20(A-4).','source':{'file':'service.move','line':0xb2,'pattern':'public\x20struct\x20Discount\x20has\x20key'},'findings':['A-4']},'Passport':{'module':'passport','ownership':'owned','references':{'guard[].guard':'Guard','guard[].relies':'address[]','impack':'address[]'},'valueFields':{'result':'bool','tx_hash':'vector<u8>','time':'u64','signer':'address','has_verified':'bool'},'notes':'No\x20share_object\x20in\x20module;\x20carried\x20by\x20signer,\x20mutated\x20across\x20guard\x20checks.','source':{'file':'passport.move','line':0x39,'pattern':'public\x20struct\x20Passport\x20has\x20key'}},'EntityOrders':{'module':'entity_order','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<OrderRoleItem>>'},'notes':'Reverse\x20index\x20entity->orders.\x20FIFO\x20eviction\x20at\x205200\x20entries\x20—\x20silent.','source':{'file':'entity_order.move','line':0x1e,'pattern':'public\x20struct\x20EntityOrders\x20has\x20key'},'findings':['A-13']},'EntityPermission':{'module':'entity_permission','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<PermissionItem>>'},'source':{'file':'entity_permission.move','line':0x1e,'pattern':'public\x20struct\x20EntityPermission\x20has\x20key'}},'EntityContact':{'module':'entity_contact','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<ContactItem>>'},'source':{'file':'entity_contact.move','line':0x18,'pattern':'public\x20struct\x20EntityContact\x20has\x20key'}},'ObjectLinkerCore':{'module':'object_linker','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20vector<CoreLink>>\x20//\x20target\x20->\x20core\x20who[],\x20lossless'},'source':{'file':'object_linker.move','line':0x25,'pattern':'public\x20struct\x20ObjectLinkerCore\x20has\x20key'}},'ObjectLinkerTx':{'module':'object_linker','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20TxBuffer>\x20//\x20target\x20->\x20recent\x20tx\x20who[],\x20lossy\x20FIFO'},'source':{'file':'object_linker.move','line':0x2b,'pattern':'public\x20struct\x20ObjectLinkerTx\x20has\x20key'}},'Registrar':{'module':'registrar','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20Votes>\x20//\x20who\x20->\x20likes/dislikes/favors'},'source':{'file':'registrar.move','line':0xb4,'pattern':'public\x20struct\x20Registrar\x20has\x20key'}},'Entity':{'module':'registrar','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<address,\x20AddressInfo>'},'source':{'file':'registrar.move','line':0xb9,'pattern':'public\x20struct\x20Entity\x20has\x20key'}},'Messenger':{'module':'registrar','ownership':'singleton','references':{},'valueFields':{'table':'ParentTable<String,\x20PubKeyData>'},'notes':'DEAD:\x20struct\x20declared\x20but\x20never\x20shared.\x20No\x20on-chain\x20Messenger\x20(A-16).','source':{'file':'registrar.move','line':0x281,'pattern':'public\x20struct\x20Messenger\x20has\x20key'},'findings':['A-16']},'Resource':{'module':'resource','ownership':'shared','references':{},'valueFields':{'table':'ParentTable<address,\x20AddressTag>'},'source':{'file':'resource.move','line':0x11,'pattern':'public\x20struct\x20Resource\x20has\x20key'}}};
@@ -1 +1 @@
1
- import{getJudgmentDoc}from'../config/judgment.js';import{evaluateRuleBook}from'../config/rule-engine.js';import{COMPOSITION_VARIANTS,disclosuresFor,primitivesForVariant,isPathDependentTimeQuery}from'../chain-semantics/index.js';import{MAX_INDEMNITY_MULTIPLE,ONCE_SLOT_BYTES,TASK_BINDING_SLOT}from'../knowledge/onchain-constants.js';import{numericAmount}from'../knowledge/audit-rules.js';import{SKU_NAME_MAX_BYTES,skuNameByteLen}from'../knowledge/sku-name-gate.js';import{createsOf,isRef,refsOf,validatePlan}from'./plan.js';function collectQueries(a,b=[]){if(Array['isArray'](a)){for(const c of a)collectQueries(c,b);}else{if(typeof a==='object'&&a!==null){const d=a;d['type']==='query'&&typeof d['query']==='string'&&b['push']({'query':d['query']});for(const e of Object['values'](d))collectQueries(e,b);}}return b;}function acceptedProgressNodes(a,b){const c=new Map();if(Array['isArray'](b))for(const g of b){if(typeof g==='object'&&g!==null){const h=g;typeof h['identifier']==='number'&&typeof h['value']==='string'&&c['set'](h['identifier'],h['value']);}}const d=i=>{if(typeof i!=='object'||i===null)return undefined;const j=i;if(j['type']==='constant'&&typeof j['value']==='string')return j['value'];if(j['type']==='identifier'&&typeof j['identifier']==='number')return c['get'](j['identifier']);return undefined;},e=[],f=i=>{if(Array['isArray'](i)){for(const n of i)f(n);return;}if(typeof i!=='object'||i===null)return;const j=i,k=Array['isArray'](j['nodes'])?j['nodes']:undefined,l=k?.[0x0]??j['left'],m=k?.[0x1]??j['right'];if(typeof j['type']==='string'&&j['type']['startsWith']('logic')&&typeof l==='object'&&l!==null&&l['type']==='query'&&l['query']==='progress.current'){const o=d(m);if(o!==undefined)e['push'](o);}for(const p of Object['values'](j))f(p);};return f(a),e;}const REPO_WHERE_QUERY_TYPES=new Set(['query_repository_data_count_where','query_repository_data_sum_where','query_repository_data_sum_where_bound','query_repository_data_sum_where_bound_all','query_repository_data_find_where']);function collectRepoWhereQueries(a,b=[]){if(Array['isArray'](a)){for(const c of a)collectRepoWhereQueries(c,b);}else{if(typeof a==='object'&&a!==null){const d=a;typeof d['type']==='string'&&REPO_WHERE_QUERY_TYPES['has'](d['type'])&&b['push'](d);for(const e of Object['values'](d))collectRepoWhereQueries(e,b);}}return b;}const REPO_ROW_READ_TYPES=new Set(['query_repository_data_has','query_repository_data','query_repository_data_count_where','query_repository_data_sum_where','query_repository_data_sum_where_bound','query_repository_data_sum_where_bound_all','query_repository_data_find_where','query_repository_data_keys_where']);function subtreeReadsRepositoryRow(a){if(Array['isArray'](a))return a['some'](subtreeReadsRepositoryRow);if(typeof a!=='object'||a===null)return![];const b=a,c=b['type'];if(typeof c==='string'&&REPO_ROW_READ_TYPES['has'](c))return!![];if(c==='query'){const d=b['query'];if(typeof d==='string'&&d['startsWith']('repository.data'))return!![];if(d===0x48e||d===0x48f||d===0x495||d===0x496||d===0x498||d===0x499)return!![];}return Object['values'](b)['some'](subtreeReadsRepositoryRow);}function isRepoDataHasRef(a){if(a['type']==='query'){const c=a['query'];if(typeof c==='string'&&c['trim']()['toLowerCase']()==='repository.data\x20has')return!![];if(c===0x48e||c==='1166')return!![];}const b=a['type'];return typeof b==='string'&&b['toLowerCase']()==='query_repository_data_has';}function subtreeRefsRepoDataHas(a){if(Array['isArray'](a))return a['some'](subtreeRefsRepoDataHas);if(typeof a!=='object'||a===null)return![];const b=a;if(isRepoDataHasRef(b))return!![];return Object['values'](b)['some'](subtreeRefsRepoDataHas);}function rootNegatesRepoDataHas(a){if(Array['isArray'](a))return a['some'](rootNegatesRepoDataHas);if(typeof a!=='object'||a===null)return![];const b=a;if(b['type']==='logic_not'&&subtreeRefsRepoDataHas(b['node']))return!![];return Object['values'](b)['some'](rootNegatesRepoDataHas);}const SYSTEM_ENTITY_ADDRESS='0xaab',WRITE_GUARD_PROMISE_RE=/\b(?:only\s+\w+|must\s+(?:be|bind)\w*|restrict\w*|whitelist\w*|allowlist\w*|allow\s+list\b|authoriz\w*|permissioned|vetted|pre-?approv\w*|approved\s+\w+)\b/i,WRITE_GUARD_TAUTOLOGY_DISCLOSURE_RE=/\b(?:tautolog\w*|self[- ]?report\w*|self[- ]?assert\w*)\b/i;function writeGuardLegClass(a,b){const c=new Map();if(Array['isArray'](b))for(const j of b){if(typeof j==='object'&&j!==null){const k=j;if(typeof k['identifier']==='number')c['set'](k['identifier'],k);}}const d=l=>typeof l==='object'&&l!==null&&l['type']==='context'&&l['context']==='Signer',e=l=>{if(Array['isArray'](l))return l['some'](e);if(typeof l!=='object'||l===null)return![];const m=l;if(m['type']==='context'&&m['context']==='Signer')return!![];return Object['values'](m)['some'](e);},f=l=>{if(typeof l!=='object'||l===null)return![];const m=l;if(m['type']==='identifier'){const n=c['get'](m['identifier']);if(n===undefined||n['b_submission']===!![])return![];const o=n['value'];return typeof o==='string'&&o['trim']()!==''&&!o['includes']('${');}if(m['type']==='constant'){const p=m['value'];if(typeof p!=='string'||p['includes']('${'))return![];if(p['trim']()['toLowerCase']()===SYSTEM_ENTITY_ADDRESS)return![];return!![];}if(m['type']==='query')return!![];return![];};let g=![];const h=(l,m)=>{if(Array['isArray'](l)){let u=![];for(const w of l)u=h(w,m)||u;return u;}if(typeof l!=='object'||l===null)return![];const n=l,o=n['type'];if(o==='logic_not'){const x=n['node']??(Array['isArray'](n['nodes'])?n['nodes'][0x0]:undefined);return x!==undefined?h(x,m+0x1):![];}if((o==='logic_and'||o==='logic_or')&&Array['isArray'](n['nodes'])){const y=n['nodes'];let z=![],A=!![];for(const B of y){const C=h(B,m);z=z||C;if(!C)A=![];}return o==='logic_and'?z:z&&A;}if(typeof o==='string'&&o['startsWith']('query')&&e(n)&&m%0x2===0x0)return g=!![],!![];const p=Array['isArray'](n['nodes'])?n['nodes']:undefined,q=p?.[0x0]??n['left'],r=p?.[0x1]??n['right'];if(o==='vec_contains_address'&&q!==undefined&&r!==undefined){const D=d(q)?r:d(r)?q:undefined;if(D===undefined||m%0x2!==0x0)return![];g=!![];const E=D,F=E['type']==='identifier'?c['get'](E['identifier']):undefined;if(F===undefined||F['b_submission']===!![])return![];const G=F['value'];if(Array['isArray'](G))return G['length']>0x0;if(typeof G!=='string'||G['trim']()===''||G['includes']('${'))return![];try{const H=JSON['parse'](G);return Array['isArray'](H)&&H['length']>0x0;}catch{return![];}}if(o==='logic_equal'&&q!==undefined&&r!==undefined){if(m%0x2!==0x0||!(d(q)||d(r)))return![];return g=!![],f(d(q)?r:q);}let s=![];for(const I of Object['values'](n)){if(typeof I==='object'&&I!==null)s=h(I,m)||s;}return s;},i=h(a,0x0);return{'hasSignerLeg':g,'hasBindingLeg':i};}function staticStringOperand(a,b){if(typeof a!=='object'||a===null)return undefined;const c=a;if(typeof c['identifier']==='number'){const d=b['find'](e=>typeof e==='object'&&e!==null&&e['identifier']===c['identifier']);if(d===undefined||d['b_submission']===!![])return undefined;return typeof d['value']==='string'?d['value']:undefined;}return typeof c['value']==='string'?c['value']:undefined;}function isPlanLocalObjectOperand(a,b){if(typeof a!=='object'||a===null)return![];const c=a;if(typeof c['identifier']!=='number')return![];const d=b['find'](f=>typeof f==='object'&&f!==null&&f['identifier']===c['identifier']);if(d===undefined||d['b_submission']===!![])return![];const e=d['value'];if(typeof e==='object'&&e!==null)return!![];return typeof e==='string'&&e['startsWith']('$');}const REACH_GREATER_TYPES={'logic_as_u256_greater':'gt','logic_as_u256_greater_or_equal':'ge'},REACH_LESSER_TYPES={'logic_as_u256_lesser':'lt','logic_as_u256_lesser_or_equal':'le'},REACH_EQUAL_TYPES=new Set(['logic_as_u256_equal','logic_equal']);function reachChannel(a){if(a['type']==='context'&&typeof a['context']==='string')return'context:'+a['context'];const b=a['query'];if(a['type']==='query'&&(typeof b==='string'||typeof b==='number'))return'query:'+String(b)['trim']()['toLowerCase']();return undefined;}function reachConstant(a,b){const c=d=>typeof d==='string'||typeof d==='number'||typeof d==='boolean';if(a['type']==='identifier'&&typeof a['identifier']==='number'){const d=b['find'](e=>typeof e==='object'&&e!==null&&e['identifier']===a['identifier']);if(d===undefined||d['b_submission']===!![])return undefined;return c(d['value'])?d['value']:undefined;}if(a['type']==='constant')return c(a['value'])?a['value']:undefined;return undefined;}function flattenAndChain(a,b=[]){if(typeof a!=='object'||a===null)return b;const c=a;if(c['type']==='logic_and'){const d=Array['isArray'](c['nodes'])?c['nodes']:[];for(const e of d)flattenAndChain(e,b);return b;}return b['push'](c),b;}function reachLegsOf(a){const b=Array['isArray'](a['params']['table'])?a['params']['table']:[],c=a['params']['root']??a['params']['logic'],d={'legs':[],'selfStrict':[]};if(typeof c!=='object'||c===null)return d;for(const e of flattenAndChain(c)){const f=typeof e['type']==='string'?e['type']:'',g=Array['isArray'](e['nodes'])?e['nodes']:undefined;if(g===undefined||g['length']<0x2)continue;const h=REACH_GREATER_TYPES[f],j=REACH_LESSER_TYPES[f],k=REACH_EQUAL_TYPES['has'](f);if(h===undefined&&j===undefined&&!k)continue;const l=g[0x0];if(typeof l!=='object'||l===null)continue;const m=reachChannel(l),n=reachConstant(l,b);for(let o=0x1;o<g['length'];o++){const p=g[o];if(typeof p!=='object'||p===null)continue;const q=reachConstant(p,b),r=reachChannel(p);if(m!==undefined&&q!==undefined)d['legs']['push']({'channel':m,'dir':k?'eq':h??j,'constant':q});else{if(r!==undefined&&n!==undefined){const s=k?'eq':h!==undefined?h==='gt'?'lt':'le':j==='lt'?'gt':'ge';d['legs']['push']({'channel':r,'dir':s,'constant':n});}else m!==undefined&&r!==undefined&&(m===r&&(h==='gt'||j==='lt')&&d['selfStrict']['push']({'channel':m,'dir':h==='gt'?'gt':'lt'}));}}}return d;}function reachNumeric(a){if(typeof a==='number')return Number['isFinite'](a)?a:undefined;if(typeof a==='string'&&a['trim']()!==''&&!Number['isNaN'](Number(a)))return Number(a);return undefined;}function findReachContradictions(c,f,g=[]){const h=[];for(const l of g){h['push']('guard\x20\x27'+c+'\x27\x20('+l['channel']+'):\x20'+(l['dir']==='gt'?'>':'<')+'\x20itself\x20—\x20'+'unsatisfiable\x20(same-binding\x20self-comparison)');}const k=new Map();for(const m of f){const n=k['get'](m['channel'])??[];n['push'](m),k['set'](m['channel'],n);}for(const [o,p]of k){const q=p['filter'](v=>v['dir']==='gt'||v['dir']==='ge'),r=p['filter'](v=>v['dir']==='lt'||v['dir']==='le');for(const v of q){const w=reachNumeric(v['constant']);if(w===undefined)continue;for(const x of r){const y=reachNumeric(x['constant']);if(y===undefined)continue;(w>y||w===y&&(v['dir']==='gt'||x['dir']==='lt'))&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20'+(v['dir']==='gt'?'>':'>=')+'\x20'+String(v['constant'])+'\x20'+('contradicts\x20'+(x['dir']==='lt'?'<':'<=')+'\x20'+String(x['constant'])+'\x20—\x20unsatisfiable'));}}const t=p['filter'](z=>z['dir']==='eq');for(let z=0x0;z<t['length'];z++){for(let A=z+0x1;A<t['length'];A++){const B=t[z],C=t[A],D=reachNumeric(B['constant']),E=reachNumeric(C['constant']),F=typeof B['constant']==='boolean'&&typeof C['constant']==='boolean'&&B['constant']!==C['constant'],G=D!==undefined&&E!==undefined&&D!==E;(F||G)&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20==\x20'+String(B['constant'])+'\x20'+('contradicts\x20==\x20'+String(C['constant'])+'\x20—\x20unsatisfiable'));}}for(const H of t){const I=reachNumeric(H['constant']);if(I===undefined)continue;for(const J of q){J['dir']==='gt'&&reachNumeric(J['constant'])===I&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20==\x20'+String(H['constant'])+'\x20'+('contradicts\x20>\x20'+String(J['constant'])+'\x20—\x20unsatisfiable'));}for(const K of r){K['dir']==='lt'&&reachNumeric(K['constant'])===I&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20==\x20'+String(H['constant'])+'\x20'+('contradicts\x20<\x20'+String(K['constant'])+'\x20—\x20unsatisfiable'));}}}return h;}function guardProjection(a){const b=a['params']['root']??a['params']['logic'],c=collectQueries(b)['map'](d=>d['query']);return{'stepId':a['id'],'queries':c,'acceptedNodes':acceptedProgressNodes(b,a['params']['table']),'table':Array['isArray'](a['params']['table'])?a['params']['table']:[]};}function allocatorRows(a){const b=[],c=d=>{if(typeof d==='object'&&d!==null&&!Array['isArray'](d)){const e=d;if(Array['isArray'](e['allocators']))d=e['allocators'];}if(!Array['isArray'](d))return;for(const f of d){if(typeof f!=='object'||f===null)continue;const g=f,h=g['guard'],i=g['guard_key'],j=Array['isArray'](g['sharing'])?g['sharing']:[],k=j['map'](l=>typeof l==='object'&&l!==null?l['who']:undefined)['map'](l=>typeof l==='object'&&l!==null?l['GuardIdentifier']:undefined)['filter'](l=>typeof l==='number');b['push']({'track':typeof g['track']==='string'?g['track']:'settlement','guardStep':isRef(h)?h['$ref']:undefined,'guardKey':typeof i==='string'?i:undefined,'identifierLegs':k});}};for(const d of a['steps']){if(d['op']==='create'&&d['object']==='service')c(d['params']['order_allocators']);if(d['op']==='configure'&&d['method']==='order_allocators')c(d['params']['allocators']);}return b;}function machineProjection(a){const b=createsOf(a,'machine')[0x0];if(b===undefined)return undefined;const c=b['params']['nodes'];if(!Array['isArray'](c))return{'nodes':[],'edges':[],'terminals':[],'optionalNodes':[],'forwardGuardRefs':[],'finalRoleNodes':[],'cancelledNodes':[]};const d=[],e=[],h=o=>({'name':typeof o?.['name']==='string'?o['name']:'','roster':typeof o?.['namedOperator']==='string'?o['namedOperator']:typeof o?.['named_operator']==='string'?o['named_operator']:undefined,'perm':typeof o?.['permissionIndex']==='number'?o['permissionIndex']:typeof o?.['permission_index']==='number'?o['permission_index']:undefined}),i=[],j=[],k=[],l=[];for(const o of c){if(typeof o!=='object'||o===null)continue;const q=o,r=typeof q['name']==='string'?q['name']:undefined;if(r===undefined)continue;d['push'](r);const s=typeof q['role']==='string'?q['role']:undefined;if(s==='final'||s==='cancelled')k['push'](r);if(s==='cancelled')l['push'](r);if(q['optional']===!![])i['push'](r);const t=Array['isArray'](q['pairs'])?q['pairs']:[];for(const u of t){const v=u,w=v?.['prev_node'],x=Array['isArray'](v?.['forwards'])?v['forwards']:[],y=[],z=[],A=[];for(const B of x){const C=B,D=C?.['guard'];isRef(D)&&(y['push'](D['$ref']),j['push'](D['$ref']));if(typeof C?.['name']==='string')z['push'](C['name']);A['push'](h(C));}if(typeof w==='string')e['push']({'prev':w,'next':r,'guards':y,'forwardNames':z,'forwardRails':A});}}const m=b['params']['pairs'];if(Array['isArray'](m))for(const E of m){const F=E;if(typeof F?.['prev_node']==='string'&&typeof F?.['next_node']==='string'){const G=Array['isArray'](F['forwards'])?F['forwards']:[],H=[],I=[],J=[];for(const K of G){const L=K,M=L?.['guard'];isRef(M)&&(H['push'](M['$ref']),j['push'](M['$ref']));if(typeof L?.['name']==='string')I['push'](L['name']);J['push'](h(L));}e['push']({'prev':F['prev_node'],'next':F['next_node'],'guards':H,'forwardNames':I,'forwardRails':J});}}const n=new Set(e['filter'](N=>N['prev']!==''&&N['prev']!==N['next'])['map'](N=>N['prev']));return{'nodes':d,'edges':e,'terminals':d['filter'](N=>!n['has'](N)),'optionalNodes':i,'forwardGuardRefs':j,'finalRoleNodes':k,'cancelledNodes':l};}function pathCountCap2(a,b){const c=new Map();for(const g of a){const h=c['get'](g['prev'])??[];h['push'](g['next']),c['set'](g['prev'],h);}let d=0x0;const f=(i,j)=>{if(d>=0x2)return;if(i===b){d+=0x1;return;}if(j['has'](i))return;const k=new Set(j)['add'](i);for(const l of c['get'](i)??[])f(l,k);};for(const i of c['get']('')??[])f(i,new Set());return d;}const WRITE_ONLY_ENFORCEMENT_SOURCES=[{'object':'service','param':'customer_required','coverQuery':'order.required_info','extract':a=>Array['isArray'](a['params']['customer_required'])&&a['params']['customer_required']['length']>0x0},{'object':'service','param':'sales[].wip','coverQuery':'service.sale.wip','extract':a=>Array['isArray'](a['params']['sales'])&&a['params']['sales']['some'](b=>typeof b==='object'&&b!==null&&typeof b['wip']==='string'&&b['wip']['length']>0x0)}],PROSE_UNIT_MS={'minute':0xea60,'hour':0x36ee80,'hrs':0x36ee80,'hr':0x36ee80,'h':0x36ee80,'day':0x5265c00,'week':0x240c8400},PROSE_DURATION_RE=/(\d+)\s*[-\s]?\s*(minute|hour|hrs|hr|h|day|week)s?\b/gi,WINDOW_CONTEXT_RE=/review|accept|cancel|refund|return|window|claim|bounty|escrow|release|revision|dispute/i;function isPlausibleMsDuration(a){return Number['isFinite'](a)&&a>=0xea60&&a%0x3e8===0x0&&a<=0xa*0x16d*0x5265c00;}function formatMs(a){const b=a/0x5265c00;if(Number['isInteger'](b)&&b>=0x2)return b+'\x20days';const c=a/0x36ee80;if(Number['isInteger'](c)&&c>=0x2)return c+'\x20hours';return a/0xea60+'\x20minutes';}export function extractProseWindowPromises(a){const b=[];for(const c of a['matchAll'](PROSE_DURATION_RE)){const d=Number(c[0x1])*(PROSE_UNIT_MS[c[0x2]['toLowerCase']()]??NaN);if(!Number['isFinite'](d)||d<=0x0||c['index']===undefined)continue;const e=Math['max'](0x0,c['index']-0x50),f=Math['min'](a['length'],c['index']+c[0x0]['length']+0x50);if(!WINDOW_CONTEXT_RE['test'](a['slice'](e,f)))continue;b['push']({'ms':d,'quote':c[0x0]});}return b;}const UNANCHORED_RESTART_RE=/\b(?:restart|reset|renew|start(?:s)? again|begin(?:s)? again)[^.]{0,60}\b(?:window|timer|clock|period)\b|\b(?:window|timer|clock|period)\b[^.]{0,60}\b(?:restart|reset|renew)s?\b/i;function collectEnforcedWindowMs(a){const b=new Set();for(const c of createsOf(a,'guard')){const d=Array['isArray'](c['params']['table'])?c['params']['table']:[];for(const e of d){const f=e;if(f['b_submission']===!![]||f['value_type']!=='U64')continue;const g=f['value'],h=typeof g==='number'?g:typeof g==='string'&&g!==''&&!Number['isNaN'](Number(g))?Number(g):NaN;if(isPlausibleMsDuration(h))b['add'](h);}}return b;}const TIME_CMP_TYPES={'logic_as_u256_greater':'gt','logic_as_u256_greater_or_equal':'ge','logic_as_u256_lesser':'lt','logic_as_u256_lesser_or_equal':'le','logic_as_u256_equal':'eq','logic_equal':'eq'};function isClockContext(a){return a['type']==='context'&&a['context']==='Clock';}function subtreeHasBranch(a){if(Array['isArray'](a))return a['some'](subtreeHasBranch);if(typeof a!=='object'||a===null)return![];const b=a;if(b['type']==='logic_or'||b['type']==='logic_not')return!![];return Object['values'](b)['some'](subtreeHasBranch);}function guardWindowOpen(c){if(typeof c!=='object'||c===null)return!![];if(subtreeHasBranch(c))return!![];let d=![];for(const e of flattenAndChain(c)){const f=TIME_CMP_TYPES[typeof e['type']==='string'?e['type']:''];if(f===undefined)continue;const g=Array['isArray'](e['nodes'])?e['nodes']:undefined;if(g===undefined||g['length']<0x2)continue;const h=g[0x0],i=g[0x1];if(typeof h!=='object'||h===null||typeof i!=='object'||i===null)continue;const j=isClockContext(h),k=isClockContext(i);if(j&&!k){if(f==='lt'||f==='le'||f==='eq')d=!![];}else{if(!j&&k){const l=f==='gt'||f==='ge'?'lt':f==='lt'||f==='le'?'gt':'eq';if(l==='lt')d=!![];}}}return!d;}function collectSlotQueries(a,b=[]){if(Array['isArray'](a)){for(const d of a)collectSlotQueries(d,b);return b;}if(typeof a!=='object'||a===null)return b;const c=a;if(c['type']==='query'&&typeof c['query']==='string'){const e=c['object'],f=typeof e==='object'&&e!==null?e:undefined;b['push']({'query':c['query'],'slot':typeof f?.['identifier']==='number'?f['identifier']:undefined,'witness':typeof f?.['convert_witness']==='string'?f['convert_witness']:undefined});}for(const g of Object['values'](c))collectSlotQueries(g,b);return b;}function tableRows(a){const b=a['params']['table'];if(!Array['isArray'](b))return[];return b['filter'](c=>typeof c==='object'&&c!==null);}function rowIdentifier(a){return typeof a['identifier']==='number'?a['identifier']:undefined;}function servicePinRowIds(a,b){const c=[],d=f=>{const g=f['object'];return f['type']==='query'&&f['query']==='order.service'&&typeof g==='object'&&g!==null&&g['identifier']===b;},e=f=>{if(Array['isArray'](f)){for(const i of f)e(i);return;}if(typeof f!=='object'||f===null)return;const g=f,h=g['nodes'];if(g['type']==='logic_equal'&&Array['isArray'](h)&&h['length']===0x2)for(const [j,k]of[[h[0x0],h[0x1]],[h[0x1],h[0x0]]]){if(typeof j!=='object'||j===null||typeof k!=='object'||k===null)continue;const l=k;d(j)&&l['type']==='identifier'&&typeof l['identifier']==='number'&&c['push'](l['identifier']);}for(const m of Object['values'](g))e(m);};return e(a),c;}function ownServiceIdentities(a){const b=new Set();for(const c of createsOf(a,'service')){b['add'](c['id']);const d=c['params']['name'];if(typeof d==='string')b['add'](d);}return b;}function pinIsExternal(a,b){if(typeof a==='string')return!b['has'](a);if(typeof a==='object'&&a!==null){const c=a;if(typeof c['$ref']==='string')return!b['has'](c['$ref']);const d=c['$late'];if(typeof d==='object'&&d!==null){const e=d['mark'];if(typeof e==='string')return!b['has'](e);}}return!![];}function guardCompositionShapes(a){const b=[],c=ownServiceIdentities(a),d=repositoryWriteGuardIds(a),e=writeOnceKeyedSlots(a);for(const f of createsOf(a,'guard')){const g=f['params']['root']??f['params']['logic'],h=collectSlotQueries(g),i=h['filter'](s=>s['query']['startsWith']('order.')),j=[...new Set(i['map'](s=>s['slot'])['filter'](t=>t!==undefined&&t!==HOST_ORDER_SLOT&&t!==TASK_BINDING_SLOT&&t!==ONCE_SLOT_BYTES))],k=tableRows(f),l=new Set(k['filter'](s=>s['b_submission']===![]&&s['value_type']==='Address')['map'](s=>rowIdentifier(s))['filter'](s=>s!==undefined)),m=j['flatMap'](t=>servicePinRowIds(g,t))['filter'](s=>l['has'](s)),n=[...new Set(i['filter'](s=>s['query']==='order.service')['map'](s=>s['slot'])['filter'](t=>t!==undefined))],o=new Map(k['map'](s=>[rowIdentifier(s),s['value']])),p=s=>s['flatMap'](t=>servicePinRowIds(g,t))['filter'](t=>l['has'](t)&&pinIsExternal(o['get'](t),c)),q=p(j)['length']>0x0||d['has'](f['id'])&&p(n)['length']>0x0,r=i['filter'](s=>s['query']==='order.owner')['map'](s=>s['slot']);b['push']({'stepId':f['id'],'foreignSlots':j,'paired':subtreeReadsRepositoryRow(g)||k['some'](s=>rowIdentifier(s)===ONCE_SLOT_BYTES&&s['b_submission']===!![])||j['some'](t=>e['get'](f['id'])?.['has'](t)),'pinned':m['length']>0x0,'pinnedRowIds':m,'procurementPin':q,'ownerCrossed':r['includes'](HOST_ORDER_SLOT)&&j['some'](t=>r['includes'](t))});}return b;}function repositoryPoliciesMerged(a){const b=new Map();for(const d of a['steps']){if(d['op']!=='configure'||d['method']!=='policies')continue;const e=d['target'],f=typeof e==='object'&&e!==null&&typeof e['$ref']==='string'?e['$ref']:undefined;if(f===undefined)continue;const g=d['params']['policy'];if(!Array['isArray'](g))continue;const h=b['get'](f)??[];h['push'](...g['filter'](i=>typeof i==='object'&&i!==null)),b['set'](f,h);}const c=[];for(const i of createsOf(a,'repository')){const j=Array['isArray'](i['params']['policies'])?i['params']['policies']:[];c['push']({'step':i,'policies':[...j,...b['get'](i['id'])??[]]});}return c;}function repositoryWriteGuardIds(a){const b=new Set();for(const {policies:c}of repositoryPoliciesMerged(a)){for(const d of c){if(typeof d!=='object'||d===null)continue;const e=d['write_guard'];if(!Array['isArray'](e))continue;for(const f of e){if(typeof f!=='object'||f===null)continue;const h=f['guard'];typeof h==='object'&&h!==null&&typeof h['$ref']==='string'&&b['add'](h['$ref']);}}}return b;}function writeOnceKeyedSlots(a){const b=new Map();for(const {policies:c}of repositoryPoliciesMerged(a)){for(const d of c){if(typeof d!=='object'||d===null)continue;const e=d;if(e['write_once']!==!![])continue;const f=e['write_guard'];if(!Array['isArray'](f))continue;for(const h of f){if(typeof h!=='object'||h===null)continue;const i=h,j=i['id_from_submission'];if(typeof j!=='number'||j===HOST_ORDER_SLOT)continue;const k=i['guard'];if(typeof k!=='object'||k===null)continue;const l=k['$ref'];if(typeof l!=='string')continue;const m=b['get'](l)??new Set();m['add'](j),b['set'](l,m);}}}return b;}function emittedPrimitives(a,b){const c=new Set();for(const d of createsOf(a,'guard')){const e=d['params']['root']??d['params']['logic'];if(subtreeReadsRepositoryRow(e))c['add']('P1');}if(b['some'](f=>f['foreignSlots']['length']>0x0))c['add']('P2');if(b['some'](f=>f['procurementPin']))c['add']('P3');for(const f of createsOf(a,'machine')){const g=f['params']['nodes'];if(!Array['isArray'](g))continue;if(JSON['stringify'](g)['includes']('retained_submission'))c['add']('P3');}if(maxDistinctGuardsPerTrack(a)>0x1)c['add']('P4');if(planHasFormulaSharing(a))c['add']('P5');if(createsOf(a,'reward')['length']>0x0)c['add']('P6');return c;}const HOST_ORDER_SLOT=0x0;function maxDistinctGuardsPerTrack(a){const b=new Map(),c=f=>{const h=f['guard'];if(h!==undefined)return JSON['stringify'](h);if(typeof f['guard_key']==='string')return'key:'+f['guard_key'];return'<unbound>';},d=f=>{if(typeof f==='object'&&f!==null&&!Array['isArray'](f)){const g=f;if(Array['isArray'](g['allocators']))f=g['allocators'];}if(!Array['isArray'](f))return;for(const h of f){if(typeof h!=='object'||h===null)continue;const i=h,j=typeof i['track']==='string'?i['track']:'settlement',k=b['get'](j);if(k===undefined)b['set'](j,new Set([c(i)]));else k['add'](c(i));}};for(const f of a['steps']){if(f['op']==='create'&&f['object']==='service')d(f['params']['order_allocators']);if(f['op']==='configure'&&f['method']==='order_allocators')d(f['params']['allocators']);}let e=0x0;for(const g of b['values']())e=Math['max'](e,g['size']);return e;}function planHasFormulaSharing(a){const b=c=>{if(typeof c==='object'&&c!==null&&!Array['isArray'](c)){const d=c;if(Array['isArray'](d['allocators']))c=d['allocators'];}if(!Array['isArray'](c))return![];return c['some'](e=>{if(typeof e!=='object'||e===null)return![];const f=e['sharing'];if(!Array['isArray'](f))return![];return f['some'](g=>{if(typeof g!=='object'||g===null)return![];const h=g;return h['mode']===0x4||h['formula']!==undefined;});});};for(const c of a['steps']){if(c['op']==='create'&&c['object']==='service'&&b(c['params']['order_allocators']))return!![];if(c['op']==='configure'&&c['method']==='order_allocators'&&b(c['params']['allocators']))return!![];}return![];}function thirdPartyLegs(a){const b=[],c=d=>{if(typeof d==='object'&&d!==null&&!Array['isArray'](d)){const e=d;if(Array['isArray'](e['allocators']))d=e['allocators'];}if(!Array['isArray'](d))return;for(const f of d){if(typeof f!=='object'||f===null)continue;const g=f,h=typeof g['track']==='string'?g['track']:'settlement',i=Array['isArray'](g['sharing'])?g['sharing']:[];for(const j of i){if(typeof j!=='object'||j===null)continue;const k=j['who'];if(typeof k!=='object'||k===null)continue;const l=k;if(l['Entity']!==undefined)b['push']({'track':h,'kind':'Entity'});else{if(l['Signer']!==undefined)b['push']({'track':h,'kind':'Signer'});}}}};for(const d of a['steps']){if(d['op']==='create'&&d['object']==='service')c(d['params']['order_allocators']);if(d['op']==='configure'&&d['method']==='order_allocators')c(d['params']['allocators']);}return b;}function publicFaceStrings(a){const b=[],c={'service':['description','location'],'contact':['description','location'],'proof':['description','proof'],'repository':['description'],'demand':['description']};for(const d of a['steps']){if(d['op']!=='create')continue;const e=c[d['object']];if(e===undefined)continue;for(const h of e){const i=d['params'][h];if(typeof i==='string'&&i['length']>0x0)b['push']({'face':d['object']+'.'+h,'stepId':d['id'],'text':i});}const g=d['params']['sales'];if(Array['isArray'](g))for(const j of g){if(typeof j!=='object'||j===null)continue;const k=j;for(const l of['description','name','title']){const m=k[l];typeof m==='string'&&m['length']>0x0&&b['push']({'face':d['object']+'.sales.'+l,'stepId':d['id'],'text':m});}}}for(const n of a['steps']){if(n['op']!=='configure')continue;const o=JSON['stringify'](n['params']);if(o['includes']('\x22data\x22')){const p=n['params']['data'];typeof p==='string'&&p['length']>0x0&&b['push']({'face':'repository.data','stepId':n['id'],'text':p});}}return b;}const PII_PATTERNS=[{'kind':'email','re':/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/},{'kind':'street_number','re':/\b\d{1,6}\s+[A-Za-z\u00c0-\u024f\u4e00-\u9fff]+(?:\s+[A-Za-z\u00c0-\u024f\u4e00-\u9fff]+){0,3}\s+(?:st|street|rd|road|ave|avenue|blvd|ln|lane|dr|drive|way|ct|court|fl|floor|apt|unit|rm|room)\b/i},{'kind':'phone','re':/(?:\+\d{1,3}[\s.-]?)?(?:\(\d{2,4}\)[\s.-]?)?\d{3,4}[\s.-]?\d{4}(?:[\s.-]?\d{2,4})?/,'proseOnly':!![]},{'kind':'national_id','re':/\b\d{15}\b|\b\d{17}[\dXx]\b/,'proseOnly':!![]}];function firstPiiHit(a){for(const b of publicFaceStrings(a)){const c=b['face']!=='repository.data';for(const d of PII_PATTERNS){if(d['proseOnly']===!![]&&!c)continue;if(d['re']['test'](b['text']))return{'face':b['face'],'stepId':b['stepId'],'kind':d['kind']};}}return undefined;}const HASH_SHAPE=/^(?:[a-fA-F0-9]{32}|[a-fA-F0-9]{40}|[a-fA-F0-9]{64}|[A-Za-z0-9+/]{43}={0,1}|[A-Za-z0-9+/]{44})$/,TRACKING_SHAPE=/^(?:[A-Za-z]{2,4}[\s-]?\d{8,15}|\d{1,7}[\s-]\d{4,15})$/;function firstRawTrackingValue(a){for(const b of a['steps']){if(b['op']!=='configure')continue;const c=b['params']['data'];if(typeof c!=='string')continue;const d=c['trim']();if(d['length']===0x0||HASH_SHAPE['test'](d))continue;if(TRACKING_SHAPE['test'](d))return{'stepId':b['id'],'value':d};}return undefined;}function perOrderProofBinding(a){for(const b of createsOf(a,'proof')){const c=JSON['stringify'](b['params']['about']??'');if(c['includes']('order'))return b['id'];}for(const d of a['steps']){if(d['op']!=='configure')continue;if(d['method']!=='required_info'&&d['method']!=='required_info_bind')continue;if(JSON['stringify'](d['params'])['includes']('proof'))return d['id'];}return undefined;}function compositionFacts(a){const b=guardCompositionShapes(a),c=emittedPrimitives(a,b),d=b['filter'](t=>t['foreignSlots']['length']>0x0),e=thirdPartyLegs(a),f=c['has']('P6'),g=typeof a['inputs']['composition_variant']==='string'?a['inputs']['composition_variant']:undefined,h=g!==undefined&&g in COMPOSITION_VARIANTS,i=typeof a['inputs']['fulfillment_axis']==='string'?a['inputs']['fulfillment_axis']:undefined,j=i??(h?COMPOSITION_VARIANTS[g]['fulfillmentAxis']:undefined),k=j==='merchant_procured'||j==='user_procured'||j==='mixed',l=d['length']>0x0||k,m=e['length']>0x0||f,n=h?primitivesForVariant(g)['filter'](s=>!c['has'](s)):[],o=firstPiiHit(a),p={'composition_primitives_emitted':[...c]['sort']()['join'](',\x20'),'composition_cross_order_guard_count':d['length'],'third_party_fulfilment_present':l,'third_party_payout_leg_present':m,'third_party_leg_count':e['length'],'reward_pool_present':f,...j!==undefined?{'fulfillment_axis':j}:{},...g!==undefined?{'composition_variant':g,'composition_variant_known':h}:{}};if(d['length']>0x0){const s=d['find'](w=>!w['paired']),t=d['find'](w=>!w['pinned']),u=j!=='merchant_procured'&&j!=='mixed',v=u?d['find'](w=>!w['ownerCrossed']):undefined;p['first_cross_order_guard']=d[0x0]['stepId'],p['cross_order_slots_display']=d[0x0]['foreignSlots']['join'](',\x20');s!==undefined&&(p['first_cross_order_guard_unpaired']=s['stepId'],p['cross_order_unpaired_count']=d['filter'](w=>!w['paired'])['length']);if(t!==undefined)p['first_cross_order_guard_unpinned']=t['stepId'];if(v!==undefined)p['first_cross_order_guard_no_owner_cross']=v['stepId'];!u&&d['some'](w=>!w['ownerCrossed'])&&(p['cross_order_owner_tie_not_expressible']=!![]);}l&&!m&&(p['third_party_fulfilment_without_payout']=!![]);h&&n['length']>0x0&&(p['composition_variant_missing_primitives']=n['join'](',\x20'),p['composition_variant_missing_count']=n['length']);g==='V3'&&(p['composition_dual_refund_unblockable']=!![],p['composition_disclosure_count']=disclosuresFor('V3')['length']);o!==undefined&&(p['first_pii_public_face']=o['face'],p['first_pii_public_face_step']=o['stepId'],p['first_pii_kind']=o['kind']);const q=firstRawTrackingValue(a);q!==undefined&&(p['first_raw_tracking_value_step']=q['stepId'],p['first_raw_tracking_value']=q['value']);const r=perOrderProofBinding(a);if(r!==undefined)p['per_order_proof_binding_step']=r;return p;}export function planFacts(a){const b=new Map(createsOf(a,'guard')['map'](aM=>[aM['id'],guardProjection(aM)])),c=allocatorRows(a),d=machineProjection(a),f=createsOf(a,'service')['length']>0x0,h=createsOf(a,'repository')['length']>0x0,i=a['steps']['some'](aM=>{if(!(aM['op']==='create'&&aM['object']==='service'||aM['op']==='configure'&&aM['method']==='sales'))return![];const aN=aM['params']['sales'];return Array['isArray'](aN)&&aN['length']>0x0;}),j=new Set();for(const aM of c){const aN=aM['guardStep']===undefined?undefined:b['get'](aM['guardStep']);for(const aO of aN?.['acceptedNodes']??[])j['add'](aO);}const k=new Set(d?.['optionalNodes']??[]),l=(d?.['terminals']??[])['filter'](aP=>!k['has'](aP)),o=new Set(),q=new Set(c['map'](aP=>aP['guardStep'])['filter'](aP=>aP!==undefined));for(const aP of d?.['edges']??[]){if(aP['next']===''||aP['guards']['length']===0x0)continue;for(const aQ of aP['guards']){if(!q['has'](aQ))continue;if((b['get'](aQ)?.['acceptedNodes']['length']??0x0)===0x0)o['add'](aP['next']);}}const u=l['find'](aR=>!j['has'](aR)&&!o['has'](aR)),w=(d?.['finalRoleNodes']??[])['find'](aR=>!j['has'](aR)&&!o['has'](aR)),x=(d?.['edges']??[])['find'](aR=>(d?.['cancelledNodes']??[])['includes'](aR['prev'])&&(aR['forwardNames']['some'](aS=>/review|reward/i['test'](aS))||/review|reward/i['test'](aR['next']))),y=new Set([...d?.['finalRoleNodes']??[],...j,...o]),z=[[/settle|release|payout|\bband\b/i,'settle'],[/recover|award/i,'recover'],[/refund|return/i,'refund'],[/arb|indemnity|dispute/i,'arb']],A=aR=>{const aS=[aR['next'],...aR['forwardNames'],...aR['guards']['flatMap'](aT=>b['get'](aT)?.['queries']??[])];for(const [aT,aU]of z){if(aS['some'](aV=>aT['test'](aV)))return aU;}return undefined;};let B;for(const aR of d?.['edges']??[]){if(aR['next']===''||!y['has'](aR['next']))continue;for(const aS of aR['forwardRails']){const aT=aS['perm']!==undefined&&aS['perm']>0x0;typeof aS['roster']==='string'&&aS['roster']!==''&&!aT&&(B??=aR['prev']+'->'+aR['next']+'\x20(forward\x20'+aS['name']+')');}}const C=new Map();for(const aU of d?.['edges']??[]){if(aU['next']===''||!y['has'](aU['next']))continue;const aV=A(aU);if(aV===undefined)continue;for(const aW of aU['forwardRails']){if(typeof aW['perm']==='number'&&aW['perm']>0x0){const aX=C['get'](aW['perm'])??C['set'](aW['perm'],new Set())['get'](aW['perm']);aX['add'](aV);}}}const D=[...C['entries']()]['find'](([,aY])=>aY['size']>=0x2),E=a['pending_guards']??[],F=E['filter'](aY=>aY['site']==='allocator')['length'],G=E['filter'](aY=>aY['site']==='allocator'||aY['site']==='machine_edge'),H=E['filter'](aY=>aY['site']==='service_buy'),I=G[0x0]?.['key'],J=H[0x0]?.['key'],K=d?.['nodes']['find'](aY=>/return/i['test'](aY)),L=a['steps']['some'](aY=>{if(aY['op']==='configure'&&aY['method']==='arbitrations'){const aZ=aY['params']['objects'];return Array['isArray'](aZ)&&aZ['length']>0x0;}if(aY['op']==='create'&&aY['object']==='service'){const b0=aY['params']['arbitrations'];return Array['isArray'](b0)&&b0['length']>0x0;}return![];});let M,N=![];for(const aY of a['steps']){if(aY['op']==='configure'&&aY['method']==='compensation_fund_add'){N=!![];const aZ=numericAmount(aY['params']['balance']);if(aZ!==undefined)M=(M??0x0)+aZ;}}let O,P;const Q=b0=>{if(!Array['isArray'](b0))return;for(const b1 of b0){const b2=numericAmount(b1?.['price']);b2!==undefined&&b2>0x0&&(O=Math['max'](O??0x0,b2),P=P===undefined?b2:Math['min'](P,b2));}};for(const b0 of a['steps']){if(b0['op']==='create'&&b0['object']==='service')Q(b0['params']['sales']);if(b0['op']==='configure'&&b0['method']==='sales')Q(b0['params']['sales']);}const R=M!==undefined&&O!==undefined;let S,T=0x0,U=0x0;const V=b1=>{if(!Array['isArray'](b1))return;for(const b2 of b1){const b3=b2?.['name'];if(typeof b3!=='string'||b3==='')continue;const b4=skuNameByteLen(b3);b4>SKU_NAME_MAX_BYTES&&(U+=0x1,S===undefined&&(S=b3,T=b4));}};for(const b1 of a['steps']){if(b1['op']==='create'&&b1['object']==='service')V(b1['params']['sales']);if(b1['op']==='configure'&&b1['method']==='sales')V(b1['params']['sales']);}const W=createsOf(a,'reward')['length']>0x0;let X,Y;if(W)for(const b2 of a['steps']){if(b2['op']==='configure'&&b2['method']==='guard_add'){const b3=b2['params']['amount'];if(b3!==undefined&&b3!==null&&b3['type']==='Fixed'){const b4=numericAmount(b3['value']);if(b4!==undefined)X=Math['max'](X??0x0,b4);}}if(b2['op']==='configure'&&b2['method']==='coin_add'&&/^reward/['test'](b2['id'])){const b5=numericAmount(b2['params']['coin']);if(b5!==undefined)Y=(Y??0x0)+b5;}}const Z=X!==undefined&&P!==undefined,a0=/^(arb\.indemnity|arb\.order|arb\.status|order\.dispute)/,a1=/settled|refunded|reviewed|completed|closed|cancel/i;let a2;if(d!==undefined)for(const b6 of d['edges']){if(b6['next']===''||b6['guards']['length']===0x0)continue;if(!a1['test'](b6['prev']))continue;if(b6['guards']['some'](b7=>b['get'](b7)?.['queries']['some'](b8=>a0['test'](b8)))){a2=b6['prev'];break;}}const a3=a2!==undefined&&(!N||M===0x0),a4=new Map();for(const b7 of createsOf(a,'guard')){a4['set'](b7['id'],b7['params']['root']??b7['params']['logic']);}const a5=d?.['edges']??[],a6=b8=>b8['guards']['length']===0x0||b8['guards']['every'](b9=>{const ba=a4['get'](b9);return ba===undefined||guardWindowOpen(ba);});let a7;for(const b8 of a5){if(b8['prev']!==''||b8['next']==='')continue;const b9=a5['filter'](ba=>ba['prev']===b8['next']);if(b9['length']===0x0)continue;if(b9['every'](ba=>!a6(ba)))a7??=b8['next'];}const a8=c['some'](ba=>ba['guardStep']===undefined&&ba['guardKey']!==undefined),a9=a5['filter'](ba=>ba['guards']['length']>0x0&&ba['guards']['some'](bb=>b['get'](bb)?.['queries']['some'](bc=>a0['test'](bc))));let aa=![];if(a9['length']>0x0&&!a8){const ba=new Set(a9['map'](bd=>bd['next'])['filter'](bd=>bd!=='')),bb=new Set(a9['flatMap'](bd=>bd['guards'])),bc=new Set();for(const bd of c){const be=bd['guardStep']===undefined?undefined:b['get'](bd['guardStep']);if(be===undefined)continue;if(be['acceptedNodes']['length']>0x0){for(const bf of be['acceptedNodes'])bc['add'](bf);}else for(const bg of a5){bg['next']!==''&&bg['guards']['includes'](bd['guardStep'])&&bc['add'](bg['next']);}}for(const bh of c){const bi=bh['guardStep']===undefined?undefined:b['get'](bh['guardStep']);if(bi===undefined)continue;if(bi['queries']['some'](bj=>a0['test'](bj))||bb['has'](bh['guardStep'])){aa=!![];break;}}if(!aa)for(const bj of ba){if(bc['has'](bj)){aa=!![];break;}}}const ab=a9['length']>0x0&&!aa&&!a8,ac=a9[0x0]===undefined?undefined:a9[0x0]['prev']!==''?a9[0x0]['prev']:a9[0x0]['next'],ad=[];for(const bk of a['steps']){const bl=bk['op']==='create'&&bk['object']==='service',bm=bk['op']==='configure'&&bk['method']==='sales';if(!bl&&!bm)continue;const bn=bk['params'];if(typeof bn['description']==='string')ad['push'](bn['description']);if(!Array['isArray'](bn['sales']))continue;for(const bo of bn['sales']){if(typeof bo!=='object'||bo===null)continue;for(const bp of Object['values'](bo)){if(typeof bp==='string')ad['push'](bp);}}}const ae=ad['flatMap'](bq=>extractProseWindowPromises(bq)),af=collectEnforcedWindowMs(a),ag=ae['filter'](bq=>!af['has'](bq['ms'])),ah=[];for(const bq of ad){const br=UNANCHORED_RESTART_RE['exec'](bq);if(br)ah['push'](br[0x0]);}const ai=c['filter'](bs=>bs['track']==='refund'),aj=new Map();for(const bs of d?.['edges']??[]){for(const bt of bs['guards']){const bu=aj['get'](bt)??[];if(bs['prev']!=='')bu['push'](bs['prev']);if(bs['next']!=='')bu['push'](bs['next']);aj['set'](bt,bu);}}let ak,al=![];for(const bv of b['values']()){if(bv['queries']['some'](isPathDependentTimeQuery)){ak??=bv['stepId'];if(d!==undefined){const bw=[...bv['acceptedNodes'],...aj['get'](bv['stepId'])??[]];for(const bx of bw){if(pathCountCap2(d['edges'],bx)>=0x2){al=!![],ak=bv['stepId'];break;}}}}if(al)break;}const am=[...b['values']()]['flatMap'](by=>by['queries']);let an;for(const by of WRITE_ONLY_ENFORCEMENT_SOURCES){for(const bz of createsOf(a,by['object'])){if(by['extract'](bz)&&!am['some'](bA=>bA['startsWith'](by['coverQuery']))){an=by['param'];break;}}if(an!==undefined)break;}const ao=new Set();for(const bA of a['steps']){if(bA['op']==='create'&&bA['object']==='guard')continue;const bB=refsOf(bA['op']==='publish'?bA['target']:bA['params']);for(const bC of bB)ao['add'](bC);if(bA['op']==='configure'){for(const bD of refsOf(bA['target']))ao['add'](bD);}}const ap=[...b['keys']()]['find'](bE=>!ao['has'](bE)),aq=[...b['values']()]['find'](bE=>!h&&bE['queries']['some'](bF=>bF['startsWith']('repository.')))?.['stepId'];let ar;if(f&&d!==undefined)for(const bE of d['forwardGuardRefs']){const bF=b['get'](bE);if(bF===undefined)continue;const bG=bF['table']['some'](bH=>bH['identifier']===TASK_BINDING_SLOT&&bH['b_submission']===!![]);if(!bG){ar=bE;break;}}let as;for(const bH of c){if(bH['guardStep']===undefined||bH['identifierLegs']['length']===0x0)continue;const bI=b['get'](bH['guardStep']);if(bI===undefined)continue;for(const bJ of bH['identifierLegs']){const bK=bI['table']['find'](bL=>bL['identifier']===bJ);if(bK===undefined||bK['b_submission']!==!![]||bK['value_type']!=='Address'){as='slot\x20'+bJ+'\x20of\x20guard\x20\x27'+bH['guardStep']+'\x27';break;}}if(as!==undefined)break;}const at=new Set();for(const {policies:bL}of repositoryPoliciesMerged(a)){for(const bM of bL){const bN=bM?.['name'];if(typeof bN==='string')at['add'](bN);}}const au=[];if(at['size']>0x0)for(const bO of createsOf(a,'guard')){const bP=Array['isArray'](bO['params']['table'])?bO['params']['table']:[];for(const bQ of collectRepoWhereQueries(bO['params']['root']??bO['params']['logic'])){const bR=staticStringOperand(bQ['key'],bP);if(bR===undefined)continue;if(!isPlanLocalObjectOperand(bQ['object'],bP))continue;!at['has'](bR)&&au['push']('\x27'+bR+'\x27\x20in\x20guard\x20\x27'+bO['id']+'\x27');}}const av=new Set();for(const {policies:bS}of repositoryPoliciesMerged(a)){for(const bT of bS){const bU=bT?.['write_guard'];if(!Array['isArray'](bU))continue;for(const bV of bU){const bW=bV?.['guard'],bX=isRef(bW)?bW['$ref']:bW;if(typeof bX==='string')av['add'](bX);}}}let aw,ax=0x0;for(const bY of createsOf(a,'guard')){if(!av['has'](bY['id']))continue;rootNegatesRepoDataHas(bY['params']['root']??bY['params']['logic'])&&(ax++,aw??=bY['id']);}const ay=new Map(createsOf(a,'guard')['map'](bZ=>[bZ['id'],bZ]));let az,aA=0x0,aB,aC=0x0,aD;for(const {policies:bZ}of repositoryPoliciesMerged(a)){for(const c0 of bZ){const c1=c0,c2=c1['write_guard'];if(!Array['isArray'](c2))continue;const c3=typeof c1['id_from']==='string'?c1['id_from']['toLowerCase']():'none',c4=c3==='none'?'caller-keyed':c3+'-keyed',c5=typeof c1['description']==='string'?c1['description']:'';for(const c6 of c2){const c7=c6?.['guard'],c8=isRef(c7)?c7['$ref']:c7,c9=typeof c8==='string'?ay['get'](c8):undefined;if(c9===undefined)continue;const ca=writeGuardLegClass(c9['params']['root']??c9['params']['logic'],c9['params']['table']);if(!ca['hasSignerLeg']||ca['hasBindingLeg'])continue;const cb='guard\x20\x27'+c9['id']+'\x27\x20(policy\x20\x27'+String(c1['name']??'?')+'\x27,\x20'+c4+')';c3==='signer'||c3==='clock'?(aC++,aB??=cb):(aA++,az??=cb),WRITE_GUARD_PROMISE_RE['test'](c5)&&!WRITE_GUARD_TAUTOLOGY_DISCLOSURE_RE['test'](c5)&&(aD??=cb+'\x20—\x20its\x20description\x20promises\x20a\x20bound\x20writer\x20set\x20the\x20guard\x20legs\x20never\x20encode');}}}let aE,aF=0x0;for(const cc of createsOf(a,'service')){const cd=cc['params']['customer_required'];if(!Array['isArray'](cd)||cd['length']===0x0)continue;cc['params']['buy_guard']===undefined&&(aF++,aE??=cc['id']);}let aG,aH=0x0;for(const ce of d?.['edges']??[]){if(ce['prev']===''||ce['guards']['length']===0x0)continue;for(const cf of ce['guards']){const cg=b['get'](cf);if(cg===undefined||cg['acceptedNodes']['length']===0x0)continue;!cg['acceptedNodes']['includes'](ce['prev'])&&(aH++,aG??=cf+'\x20on\x20edge\x20'+ce['prev']+'->'+ce['next']+'\x20(guard\x20pins\x20progress.current\x20in\x20'+('['+cg['acceptedNodes']['join'](',\x20')+']\x20—\x20never\x20\x27'+ce['prev']+'\x27)'));}}let aI;if(d!==undefined){const ch=(d['edges']['find'](cj=>cj['prev']==='')??{'next':''})['next'],ci=new Set([...d['finalRoleNodes'],...d['optionalNodes']]);for(const cj of d['nodes']){if(ci['has'](cj)||cj===ch)continue;const ck=d['edges']['filter'](cm=>cm['prev']===cj&&cm['next']!==cj);if(ck['length']===0x0)continue;const cl=ck['some'](cm=>cm['guards']['length']===0x0||cm['guards']['some'](cn=>{const co=b['get'](cn);return co===undefined||co['acceptedNodes']['length']===0x0||co['acceptedNodes']['includes'](cj);}));if(!cl)aI??=cj;}}let aJ,aK=0x0;{const cm=new Set(d?.['forwardGuardRefs']??[]);for(const cn of d?.['edges']??[])for(const co of cn['guards'])cm['add'](co);for(const cp of c){const cq=/refund|settle|recover/i['test'](cp['track'])||/refund|settle|recover/i['test'](cp['guardKey']??'');if(!cq||cp['guardStep']===undefined)continue;const cs=b['get'](cp['guardStep']);if(cs===undefined)continue;const ct=cs['acceptedNodes']['length']>0x0||cm['has'](cp['guardStep'])||cs['queries']['includes']('order.dispute.open'),cu=cs['queries']['includes']('order.owner')||cs['queries']['includes']('order.agent\x20has')||cs['queries']['includes']('order.service');if(ct||cu)continue;aK++,aJ??=cp['track']+'\x20row\x20on\x20guard\x20\x27'+(cp['guardKey']??cp['guardStep'])+'\x27\x20('+cp['guardStep']+')\x20—\x20pins\x20no\x20progress\x20node,\x20rides\x20no\x20machine\x20edge,\x20references\x20no\x20order\x20identity\x20or\x20dispute\x20state';}}const aL=[];for(const cv of createsOf(a,'guard')){const cw=reachLegsOf(cv);aL['push'](...findReachContradictions(cv['id'],cw['legs'],cw['selfStrict']));}return{...compositionFacts(a),'has_service':f,'has_machine':d!==undefined,'has_repository':h,'sales_step_present':i,'allocator_row_count':c['length'],'refund_row_count':ai['length'],'terminal_count':l['length'],'terminal_nodes_display':l['join'](',\x20'),'pending_allocator_guard_count':F,'pending_guard_total':E['length'],...u===undefined?{}:{'first_uncovered_terminal':u},...w===undefined?{}:{'first_uncovered_final_node':w},...x===undefined?{}:{'first_cancelled_review_bridge':x['prev']+'\x20->\x20'+x['next']+(x['forwardNames']['length']>0x0?'\x20(forward\x20'+x['forwardNames']['join'](',\x20')+')':'')},...B===undefined?{}:{'first_roster_null_perm_edge':B},...D===undefined?{}:{'coarse_perm_bucket_index':D[0x0],'coarse_perm_bucket_classes':[...D[0x1]]['sort']()['join'](',\x20')},...aI===undefined?{}:{'first_pinned_away_exit_node':aI},'direction_blind_pay_edge_count':aK,...aJ===undefined?{}:{'first_direction_blind_pay_edge':aJ},...ak===undefined?{}:{'first_path_dependent_anchor':ak},'path_sensitive':al,...an===undefined?{}:{'first_write_only_unenforced_field':an},...ap===undefined?{}:{'first_orphan_guard':ap},...aq===undefined?{}:{'first_repo_query_without_repository':aq},'repo_write_once_guard_count':ax,...aw===undefined?{}:{'first_repo_write_once_guard':aw},'tautology_write_guard_count':aA,...az===undefined?{}:{'first_tautology_write_guard':az},'keyed_tautology_write_guard_count':aC,...aB===undefined?{}:{'first_keyed_tautology_write_guard':aB},...aD===undefined?{}:{'first_promise_gap_write_guard':aD},'customer_required_unbacked_count':aF,...aE===undefined?{}:{'first_customer_required_unbacked':aE},...ar===undefined?{}:{'first_edge_guard_missing_254':ar},'node_mismatched_guard_count':aH,...aG===undefined?{}:{'first_node_mismatched_guard':aG},'guard_reach_contradiction_count':aL['length'],...aL['length']>0x0?{'first_guard_reach_contradiction':aL[0x0],'guard_reach_contradiction_display':aL['join'](';\x20')}:{},...as===undefined?{}:{'first_alloc_slot_missing':as},...I===undefined?{}:{'first_pending_fund_guard':I,'pending_fund_guard_count':G['length'],'pending_fund_guard_keys_display':G['map'](cx=>cx['key'])['join'](',\x20')},...J===undefined?{}:{'first_pending_buy_guard':J,'pending_buy_guard_count':H['length'],'pending_buy_guard_keys_display':H['map'](cx=>cx['key'])['join'](',\x20')},'has_return_rail':K!==undefined,...K===undefined?{}:{'return_rail_node':K},'has_arbitration_binding':L,'fund_topup_present':N,...M===undefined?{}:{'fund_topup_amount':M},...R?{'fund_ceiling_breach':M<MAX_INDEMNITY_MULTIPLE*O,'fund_ceiling_basis':MAX_INDEMNITY_MULTIPLE+'x\x20the\x20highest\x20SKU\x20price','fund_concurrent_orders_coverable':Math['floor'](M/(MAX_INDEMNITY_MULTIPLE*O))}:{},'fund_ceiling_unverifiable':N&&!R,...X!==undefined?{'reward_bounty_amount':X,...Y!==undefined?{'reward_funding_amount':Y}:{},...Y!==undefined&&X>0x0?{'reward_max_claims':Math['floor'](Y/X)}:{},...Z?{'lowest_sku_price':P,'reward_scale_breach':X>0.5*P,'reward_scale_ratio_display':(X/P)['toFixed'](0x2)+'x\x20the\x20cheapest\x20SKU\x20price'}:{'reward_scale_unverifiable':!![]}}:{},...U>0x0?{'dead_sku_count':U,'first_dead_sku_name':S,'first_dead_sku_bytes':T}:{},...a3?{'first_arb_exit_node':a2,'fund_arb_route_unfunded':!![]}:{},...a7===undefined?{}:{'entry_no_open_exit':!![],'entry_strand_node':a7},...ab&&ac!==undefined?{'arb_promise_without_settle_rail':!![],'arb_promise_node':ac}:{},...a9['length']>0x0&&a8&&ac!==undefined?{'arb_key_plane_opaque':!![],'arb_key_plane_node':ac}:{},...ae['length']>0x0?{'prose_window_promise_count':ae['length'],'enforced_window_ms_display':[...af]['sort']((cx,cy)=>cx-cy)['map'](formatMs)['join'](',\x20')||'none',...ag['length']>0x0?{'prose_time_mismatch_count':ag['length'],'first_prose_time_mismatch':ag[0x0]['quote'],'prose_time_mismatch_display':ag['map'](cx=>cx['quote'])['join'](';\x20')}:{}}:{},...ah['length']>0x0?{'unanchored_window_promise_count':ah['length'],'first_unanchored_window_promise':ah[0x0]}:{},...at['size']>0x0?{'repo_policy_keys_display':[...at]['join'](',\x20'),...au['length']>0x0?{'repo_gate_key_unbacked_count':au['length'],'first_repo_gate_key_unbacked':au[0x0],'repo_gate_key_unbacked_display':au['join'](',\x20')}:{}}:{}};}function planRuleBook(){const a=getJudgmentDoc()['rules']['domains']['plan'];if(!a)throw new Error('factory\x20rule\x20pack\x20\x27plan\x27\x20missing\x20—\x20broken\x20installation');return a['rules'];}export function auditPlan(a){const b=validatePlan(a),c=planFacts(a),{findings:d}=evaluateRuleBook(planRuleBook(),c),e=b['length']>0x0||d['some'](g=>g['level']==='critical'||g['level']==='high');return{'issues':b,'findings':d,'facts':c,'blocking':e};}
1
+ import{getJudgmentDoc}from'../config/judgment.js';import{evaluateRuleBook}from'../config/rule-engine.js';import{COMPOSITION_VARIANTS,disclosuresFor,primitivesForVariant,isPathDependentTimeQuery}from'../chain-semantics/index.js';import{MAX_INDEMNITY_MULTIPLE,ONCE_SLOT_BYTES,TASK_BINDING_SLOT}from'../knowledge/onchain-constants.js';import{classifyLoopCycle,numericAmount}from'../knowledge/audit-rules.js';import{abortSafeVerbCheck,equalityFaceCheck,setCollapseCheck,submissionRowIdTrustCheck,thresholdLiteralCheck}from'../knowledge/guard-quality.js';import{findLoopCycles}from'../knowledge/machine-topology.js';import{SKU_NAME_MAX_BYTES,skuNameByteLen}from'../knowledge/sku-name-gate.js';import{createsOf,isRef,refsOf,validatePlan}from'./plan.js';function collectQueries(a,b=[]){if(Array['isArray'](a)){for(const c of a)collectQueries(c,b);}else{if(typeof a==='object'&&a!==null){const d=a;d['type']==='query'&&typeof d['query']==='string'&&b['push']({'query':d['query']});for(const e of Object['values'](d))collectQueries(e,b);}}return b;}function acceptedProgressNodes(a,b){const c=new Map();if(Array['isArray'](b))for(const g of b){if(typeof g==='object'&&g!==null){const h=g;typeof h['identifier']==='number'&&typeof h['value']==='string'&&c['set'](h['identifier'],h['value']);}}const d=i=>{if(typeof i!=='object'||i===null)return undefined;const j=i;if(j['type']==='constant'&&typeof j['value']==='string')return j['value'];if(j['type']==='identifier'&&typeof j['identifier']==='number')return c['get'](j['identifier']);return undefined;},e=[],f=i=>{if(Array['isArray'](i)){for(const n of i)f(n);return;}if(typeof i!=='object'||i===null)return;const j=i,k=Array['isArray'](j['nodes'])?j['nodes']:undefined,l=k?.[0x0]??j['left'],m=k?.[0x1]??j['right'];if(typeof j['type']==='string'&&j['type']['startsWith']('logic')&&typeof l==='object'&&l!==null&&l['type']==='query'&&l['query']==='progress.current'){const o=d(m);if(o!==undefined)e['push'](o);}for(const p of Object['values'](j))f(p);};return f(a),e;}const WIP_HASH_QUERY_NAMES=new Set(['order.item.wip_hash']);function collectWipHashComparisons(a,b,c=[]){const d=new Map();if(Array['isArray'](b))for(const h of b){if(typeof h==='object'&&h!==null){const i=h;typeof i['identifier']==='number'&&typeof i['value']==='string'&&d['set'](i['identifier'],i['value']);}}const e=j=>{if(typeof j!=='object'||j===null)return undefined;const k=j;if(k['type']!=='query'||typeof k['query']!=='string')return undefined;const l=k['query']['trim']()['toLowerCase']();return WIP_HASH_QUERY_NAMES['has'](l)?k['query']:undefined;},f=j=>{if(typeof j!=='object'||j===null)return undefined;const k=j;if(k['type']==='constant'&&typeof k['value']==='string')return k['value'];if(k['type']==='identifier'&&typeof k['identifier']==='number')return d['get'](k['identifier']);return undefined;},g=j=>{if(Array['isArray'](j)){for(const o of j)g(o);return;}if(typeof j!=='object'||j===null)return;const k=j,l=Array['isArray'](k['nodes'])?k['nodes']:undefined,m=l?.[0x0]??k['left'],n=l?.[0x1]??k['right'];if(typeof k['type']==='string'&&k['type']['startsWith']('logic')){const p=e(m)??e(n);if(p!==undefined){const r=e(m)!==undefined?n:m,s=f(r);if(s!==undefined)c['push']({'query':p,'constant':s});}}for(const t of Object['values'](k))g(t);};return g(a),c;}const REPO_WHERE_QUERY_TYPES=new Set(['query_repository_data_count_where','query_repository_data_sum_where','query_repository_data_sum_where_bound','query_repository_data_sum_where_bound_all','query_repository_data_find_where']);function collectRepoWhereQueries(a,b=[]){if(Array['isArray'](a)){for(const c of a)collectRepoWhereQueries(c,b);}else{if(typeof a==='object'&&a!==null){const d=a;typeof d['type']==='string'&&REPO_WHERE_QUERY_TYPES['has'](d['type'])&&b['push'](d);for(const e of Object['values'](d))collectRepoWhereQueries(e,b);}}return b;}const REPO_ROW_READ_TYPES=new Set(['query_repository_data_has','query_repository_data','query_repository_data_author','query_repository_data_count_where','query_repository_data_sum_where','query_repository_data_sum_where_bound','query_repository_data_sum_where_bound_all','query_repository_data_find_where','query_repository_data_keys_where']);function subtreeReadsRepositoryRow(a){if(Array['isArray'](a))return a['some'](subtreeReadsRepositoryRow);if(typeof a!=='object'||a===null)return![];const b=a,c=b['type'];if(typeof c==='string'&&REPO_ROW_READ_TYPES['has'](c))return!![];if(c==='query'){const d=b['query'];if(typeof d==='string'&&d['startsWith']('repository.data'))return!![];if(d===0x48e||d===0x48f||d===0x495||d===0x496||d===0x498||d===0x499||d===0x49e)return!![];}return Object['values'](b)['some'](subtreeReadsRepositoryRow);}function isRepoDataHasRef(a){if(a['type']==='query'){const c=a['query'];if(typeof c==='string'&&c['trim']()['toLowerCase']()==='repository.data\x20has')return!![];if(c===0x48e||c==='1166')return!![];}const b=a['type'];return typeof b==='string'&&b['toLowerCase']()==='query_repository_data_has';}function subtreeRefsRepoDataHas(a){if(Array['isArray'](a))return a['some'](subtreeRefsRepoDataHas);if(typeof a!=='object'||a===null)return![];const b=a;if(isRepoDataHasRef(b))return!![];return Object['values'](b)['some'](subtreeRefsRepoDataHas);}function rootNegatesRepoDataHas(a){if(Array['isArray'](a))return a['some'](rootNegatesRepoDataHas);if(typeof a!=='object'||a===null)return![];const b=a;if(b['type']==='logic_not'&&subtreeRefsRepoDataHas(b['node']))return!![];return Object['values'](b)['some'](rootNegatesRepoDataHas);}const SYSTEM_ENTITY_ADDRESS='0xaab',WRITE_GUARD_PROMISE_RE=/\b(?:only\s+\w+|must\s+(?:be|bind)\w*|restrict\w*|whitelist\w*|allowlist\w*|allow\s+list\b|authoriz\w*|permissioned|vetted|pre-?approv\w*|approved\s+\w+)\b/i,WRITE_GUARD_TAUTOLOGY_DISCLOSURE_RE=/\b(?:tautolog\w*|self[- ]?report\w*|self[- ]?assert\w*)\b/i;function writeGuardLegClass(a,b){const c=new Map();if(Array['isArray'](b))for(const j of b){if(typeof j==='object'&&j!==null){const k=j;if(typeof k['identifier']==='number')c['set'](k['identifier'],k);}}const d=l=>typeof l==='object'&&l!==null&&l['type']==='context'&&l['context']==='Signer',e=l=>{if(Array['isArray'](l))return l['some'](e);if(typeof l!=='object'||l===null)return![];const m=l;if(m['type']==='context'&&m['context']==='Signer')return!![];return Object['values'](m)['some'](e);},f=l=>{if(typeof l!=='object'||l===null)return![];const m=l;if(m['type']==='identifier'){const n=c['get'](m['identifier']);if(n===undefined||n['b_submission']===!![])return![];const o=n['value'];return typeof o==='string'&&o['trim']()!==''&&!o['includes']('${');}if(m['type']==='constant'){const p=m['value'];if(typeof p!=='string'||p['includes']('${'))return![];if(p['trim']()['toLowerCase']()===SYSTEM_ENTITY_ADDRESS)return![];return!![];}if(m['type']==='query')return!![];return![];};let g=![];const h=(l,m)=>{if(Array['isArray'](l)){let u=![];for(const w of l)u=h(w,m)||u;return u;}if(typeof l!=='object'||l===null)return![];const n=l,o=n['type'];if(o==='logic_not'){const x=n['node']??(Array['isArray'](n['nodes'])?n['nodes'][0x0]:undefined);return x!==undefined?h(x,m+0x1):![];}if((o==='logic_and'||o==='logic_or')&&Array['isArray'](n['nodes'])){const y=n['nodes'];let z=![],A=!![];for(const B of y){const C=h(B,m);z=z||C;if(!C)A=![];}return o==='logic_and'?z:z&&A;}if(typeof o==='string'&&o['startsWith']('query')&&e(n)&&m%0x2===0x0)return g=!![],!![];const p=Array['isArray'](n['nodes'])?n['nodes']:undefined,q=p?.[0x0]??n['left'],r=p?.[0x1]??n['right'];if(o==='vec_contains_address'&&q!==undefined&&r!==undefined){const D=d(q)?r:d(r)?q:undefined;if(D===undefined||m%0x2!==0x0)return![];g=!![];const E=D,F=E['type']==='identifier'?c['get'](E['identifier']):undefined;if(F===undefined||F['b_submission']===!![])return![];const G=F['value'];if(Array['isArray'](G))return G['length']>0x0;if(typeof G!=='string'||G['trim']()===''||G['includes']('${'))return![];try{const H=JSON['parse'](G);return Array['isArray'](H)&&H['length']>0x0;}catch{return![];}}if(o==='logic_equal'&&q!==undefined&&r!==undefined){if(m%0x2!==0x0||!(d(q)||d(r)))return![];return g=!![],f(d(q)?r:q);}let s=![];for(const I of Object['values'](n)){if(typeof I==='object'&&I!==null)s=h(I,m)||s;}return s;},i=h(a,0x0);return{'hasSignerLeg':g,'hasBindingLeg':i};}function staticStringOperand(a,b){if(typeof a!=='object'||a===null)return undefined;const c=a;if(typeof c['identifier']==='number'){const d=b['find'](e=>typeof e==='object'&&e!==null&&e['identifier']===c['identifier']);if(d===undefined||d['b_submission']===!![])return undefined;return typeof d['value']==='string'?d['value']:undefined;}return typeof c['value']==='string'?c['value']:undefined;}function isPlanLocalObjectOperand(a,b){if(typeof a!=='object'||a===null)return![];const c=a;if(typeof c['identifier']!=='number')return![];const d=b['find'](f=>typeof f==='object'&&f!==null&&f['identifier']===c['identifier']);if(d===undefined||d['b_submission']===!![])return![];const e=d['value'];if(typeof e==='object'&&e!==null)return!![];return typeof e==='string'&&e['startsWith']('$');}const REACH_GREATER_TYPES={'logic_as_u256_greater':'gt','logic_as_u256_greater_or_equal':'ge'},REACH_LESSER_TYPES={'logic_as_u256_lesser':'lt','logic_as_u256_lesser_or_equal':'le'},REACH_EQUAL_TYPES=new Set(['logic_as_u256_equal','logic_equal']);function reachChannel(a){if(a['type']==='context'&&typeof a['context']==='string')return'context:'+a['context'];const b=a['query'];if(a['type']==='query'&&(typeof b==='string'||typeof b==='number'))return'query:'+String(b)['trim']()['toLowerCase']();return undefined;}function reachConstant(a,b){const c=d=>typeof d==='string'||typeof d==='number'||typeof d==='boolean';if(a['type']==='identifier'&&typeof a['identifier']==='number'){const d=b['find'](e=>typeof e==='object'&&e!==null&&e['identifier']===a['identifier']);if(d===undefined||d['b_submission']===!![])return undefined;return c(d['value'])?d['value']:undefined;}if(a['type']==='constant')return c(a['value'])?a['value']:undefined;return undefined;}function flattenAndChain(a,b=[]){if(typeof a!=='object'||a===null)return b;const c=a;if(c['type']==='logic_and'){const d=Array['isArray'](c['nodes'])?c['nodes']:[];for(const e of d)flattenAndChain(e,b);return b;}return b['push'](c),b;}function reachLegsOf(a){const b=Array['isArray'](a['params']['table'])?a['params']['table']:[],c=a['params']['root']??a['params']['logic'],d={'legs':[],'selfStrict':[]};if(typeof c!=='object'||c===null)return d;for(const e of flattenAndChain(c)){const f=typeof e['type']==='string'?e['type']:'',g=Array['isArray'](e['nodes'])?e['nodes']:undefined;if(g===undefined||g['length']<0x2)continue;const h=REACH_GREATER_TYPES[f],j=REACH_LESSER_TYPES[f],k=REACH_EQUAL_TYPES['has'](f);if(h===undefined&&j===undefined&&!k)continue;const l=g[0x0];if(typeof l!=='object'||l===null)continue;const m=reachChannel(l),n=reachConstant(l,b);for(let o=0x1;o<g['length'];o++){const p=g[o];if(typeof p!=='object'||p===null)continue;const q=reachConstant(p,b),r=reachChannel(p);if(m!==undefined&&q!==undefined)d['legs']['push']({'channel':m,'dir':k?'eq':h??j,'constant':q});else{if(r!==undefined&&n!==undefined){const s=k?'eq':h!==undefined?h==='gt'?'lt':'le':j==='lt'?'gt':'ge';d['legs']['push']({'channel':r,'dir':s,'constant':n});}else m!==undefined&&r!==undefined&&(m===r&&(h==='gt'||j==='lt')&&d['selfStrict']['push']({'channel':m,'dir':h==='gt'?'gt':'lt'}));}}}return d;}function reachNumeric(a){if(typeof a==='number')return Number['isFinite'](a)?a:undefined;if(typeof a==='string'&&a['trim']()!==''&&!Number['isNaN'](Number(a)))return Number(a);return undefined;}function findReachContradictions(c,f,g=[]){const h=[];for(const l of g){h['push']('guard\x20\x27'+c+'\x27\x20('+l['channel']+'):\x20'+(l['dir']==='gt'?'>':'<')+'\x20itself\x20—\x20'+'unsatisfiable\x20(same-binding\x20self-comparison)');}const k=new Map();for(const m of f){const n=k['get'](m['channel'])??[];n['push'](m),k['set'](m['channel'],n);}for(const [o,p]of k){const q=p['filter'](v=>v['dir']==='gt'||v['dir']==='ge'),r=p['filter'](v=>v['dir']==='lt'||v['dir']==='le');for(const v of q){const w=reachNumeric(v['constant']);if(w===undefined)continue;for(const x of r){const y=reachNumeric(x['constant']);if(y===undefined)continue;(w>y||w===y&&(v['dir']==='gt'||x['dir']==='lt'))&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20'+(v['dir']==='gt'?'>':'>=')+'\x20'+String(v['constant'])+'\x20'+('contradicts\x20'+(x['dir']==='lt'?'<':'<=')+'\x20'+String(x['constant'])+'\x20—\x20unsatisfiable'));}}const t=p['filter'](z=>z['dir']==='eq');for(let z=0x0;z<t['length'];z++){for(let A=z+0x1;A<t['length'];A++){const B=t[z],C=t[A],D=reachNumeric(B['constant']),E=reachNumeric(C['constant']),F=typeof B['constant']==='boolean'&&typeof C['constant']==='boolean'&&B['constant']!==C['constant'],G=D!==undefined&&E!==undefined&&D!==E;(F||G)&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20==\x20'+String(B['constant'])+'\x20'+('contradicts\x20==\x20'+String(C['constant'])+'\x20—\x20unsatisfiable'));}}for(const H of t){const I=reachNumeric(H['constant']);if(I===undefined)continue;for(const J of q){J['dir']==='gt'&&reachNumeric(J['constant'])===I&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20==\x20'+String(H['constant'])+'\x20'+('contradicts\x20>\x20'+String(J['constant'])+'\x20—\x20unsatisfiable'));}for(const K of r){K['dir']==='lt'&&reachNumeric(K['constant'])===I&&h['push']('guard\x20\x27'+c+'\x27\x20('+o+'):\x20==\x20'+String(H['constant'])+'\x20'+('contradicts\x20<\x20'+String(K['constant'])+'\x20—\x20unsatisfiable'));}}}return h;}function guardProjection(a){const b=a['params']['root']??a['params']['logic'],c=collectQueries(b)['map'](d=>d['query']);return{'stepId':a['id'],'queries':c,'acceptedNodes':acceptedProgressNodes(b,a['params']['table']),'table':Array['isArray'](a['params']['table'])?a['params']['table']:[]};}function allocatorRows(a){const b=[],c=d=>{if(typeof d==='object'&&d!==null&&!Array['isArray'](d)){const e=d;if(Array['isArray'](e['allocators']))d=e['allocators'];}if(!Array['isArray'](d))return;for(const f of d){if(typeof f!=='object'||f===null)continue;const g=f,h=g['guard'],i=g['guard_key'],j=Array['isArray'](g['sharing'])?g['sharing']:[],k=j['map'](l=>typeof l==='object'&&l!==null?l['who']:undefined)['map'](l=>typeof l==='object'&&l!==null?l['GuardIdentifier']:undefined)['filter'](l=>typeof l==='number');b['push']({'track':typeof g['track']==='string'?g['track']:'settlement','guardStep':isRef(h)?h['$ref']:undefined,'guardKey':typeof i==='string'?i:undefined,'identifierLegs':k});}};for(const d of a['steps']){if(d['op']==='create'&&d['object']==='service')c(d['params']['order_allocators']);if(d['op']==='configure'&&d['method']==='order_allocators')c(d['params']['allocators']);}return b;}function machineProjection(a){const b=createsOf(a,'machine')[0x0];if(b===undefined)return undefined;const c=b['params']['nodes'];if(!Array['isArray'](c))return{'nodes':[],'edges':[],'terminals':[],'optionalNodes':[],'forwardGuardRefs':[],'finalRoleNodes':[],'cancelledNodes':[]};const d=[],e=[],h=o=>({'name':typeof o?.['name']==='string'?o['name']:'','roster':typeof o?.['namedOperator']==='string'?o['namedOperator']:typeof o?.['named_operator']==='string'?o['named_operator']:undefined,'perm':typeof o?.['permissionIndex']==='number'?o['permissionIndex']:typeof o?.['permission_index']==='number'?o['permission_index']:undefined}),i=[],j=[],k=[],l=[];for(const o of c){if(typeof o!=='object'||o===null)continue;const q=o,r=typeof q['name']==='string'?q['name']:undefined;if(r===undefined)continue;d['push'](r);const s=typeof q['role']==='string'?q['role']:undefined;if(s==='final'||s==='cancelled')k['push'](r);if(s==='cancelled')l['push'](r);if(q['optional']===!![])i['push'](r);const t=Array['isArray'](q['pairs'])?q['pairs']:[];for(const u of t){const v=u,w=v?.['prev_node'],x=Array['isArray'](v?.['forwards'])?v['forwards']:[],y=[],z=[],A=[];for(const B of x){const C=B,D=C?.['guard'];isRef(D)&&(y['push'](D['$ref']),j['push'](D['$ref']));if(typeof C?.['name']==='string')z['push'](C['name']);A['push'](h(C));}if(typeof w==='string')e['push']({'prev':w,'next':r,'guards':y,'forwardNames':z,'forwardRails':A});}}const m=b['params']['pairs'];if(Array['isArray'](m))for(const E of m){const F=E;if(typeof F?.['prev_node']==='string'&&typeof F?.['next_node']==='string'){const G=Array['isArray'](F['forwards'])?F['forwards']:[],H=[],I=[],J=[];for(const K of G){const L=K,M=L?.['guard'];isRef(M)&&(H['push'](M['$ref']),j['push'](M['$ref']));if(typeof L?.['name']==='string')I['push'](L['name']);J['push'](h(L));}e['push']({'prev':F['prev_node'],'next':F['next_node'],'guards':H,'forwardNames':I,'forwardRails':J});}}const n=new Set(e['filter'](N=>N['prev']!==''&&N['prev']!==N['next'])['map'](N=>N['prev']));return{'nodes':d,'edges':e,'terminals':d['filter'](N=>!n['has'](N)),'optionalNodes':i,'forwardGuardRefs':j,'finalRoleNodes':k,'cancelledNodes':l};}function pathCountCap2(a,b){const c=new Map();for(const g of a){const h=c['get'](g['prev'])??[];h['push'](g['next']),c['set'](g['prev'],h);}let d=0x0;const f=(i,j)=>{if(d>=0x2)return;if(i===b){d+=0x1;return;}if(j['has'](i))return;const k=new Set(j)['add'](i);for(const l of c['get'](i)??[])f(l,k);};for(const i of c['get']('')??[])f(i,new Set());return d;}const WRITE_ONLY_ENFORCEMENT_SOURCES=[{'object':'service','param':'customer_required','coverQuery':'order.required_info','extract':a=>Array['isArray'](a['params']['customer_required'])&&a['params']['customer_required']['length']>0x0},{'object':'service','param':'sales[].wip','coverQuery':'service.sale.wip','extract':a=>Array['isArray'](a['params']['sales'])&&a['params']['sales']['some'](b=>typeof b==='object'&&b!==null&&typeof b['wip']==='string'&&b['wip']['length']>0x0)}],PROSE_UNIT_MS={'minute':0xea60,'hour':0x36ee80,'hrs':0x36ee80,'hr':0x36ee80,'h':0x36ee80,'day':0x5265c00,'week':0x240c8400},PROSE_DURATION_RE=/(\d+)\s*[-\s]?\s*(minute|hour|hrs|hr|h|day|week)s?\b/gi,WINDOW_CONTEXT_RE=/review|accept|cancel|refund|return|window|claim|bounty|escrow|release|revision|dispute/i;function isPlausibleMsDuration(a){return Number['isFinite'](a)&&a>=0xea60&&a%0x3e8===0x0&&a<=0xa*0x16d*0x5265c00;}function formatMs(a){const b=a/0x5265c00;if(Number['isInteger'](b)&&b>=0x2)return b+'\x20days';const c=a/0x36ee80;if(Number['isInteger'](c)&&c>=0x2)return c+'\x20hours';return a/0xea60+'\x20minutes';}export function extractProseWindowPromises(a){const b=[];for(const c of a['matchAll'](PROSE_DURATION_RE)){const d=Number(c[0x1])*(PROSE_UNIT_MS[c[0x2]['toLowerCase']()]??NaN);if(!Number['isFinite'](d)||d<=0x0||c['index']===undefined)continue;const e=Math['max'](0x0,c['index']-0x50),f=Math['min'](a['length'],c['index']+c[0x0]['length']+0x50);if(!WINDOW_CONTEXT_RE['test'](a['slice'](e,f)))continue;b['push']({'ms':d,'quote':c[0x0]});}return b;}const UNANCHORED_RESTART_RE=/\b(?:restart|reset|renew|start(?:s)? again|begin(?:s)? again)[^.]{0,60}\b(?:window|timer|clock|period)\b|\b(?:window|timer|clock|period)\b[^.]{0,60}\b(?:restart|reset|renew)s?\b/i;function collectEnforcedWindowMs(a){const b=new Set();for(const c of createsOf(a,'guard')){const d=Array['isArray'](c['params']['table'])?c['params']['table']:[];for(const e of d){const f=e;if(f['b_submission']===!![]||f['value_type']!=='U64')continue;const g=f['value'],h=typeof g==='number'?g:typeof g==='string'&&g!==''&&!Number['isNaN'](Number(g))?Number(g):NaN;if(isPlausibleMsDuration(h))b['add'](h);}}return b;}const TIME_CMP_TYPES={'logic_as_u256_greater':'gt','logic_as_u256_greater_or_equal':'ge','logic_as_u256_lesser':'lt','logic_as_u256_lesser_or_equal':'le','logic_as_u256_equal':'eq','logic_equal':'eq'};function isClockContext(a){return a['type']==='context'&&a['context']==='Clock';}function subtreeHasBranch(a){if(Array['isArray'](a))return a['some'](subtreeHasBranch);if(typeof a!=='object'||a===null)return![];const b=a;if(b['type']==='logic_or'||b['type']==='logic_not')return!![];return Object['values'](b)['some'](subtreeHasBranch);}function guardWindowOpen(c){if(typeof c!=='object'||c===null)return!![];if(subtreeHasBranch(c))return!![];let d=![];for(const e of flattenAndChain(c)){const f=TIME_CMP_TYPES[typeof e['type']==='string'?e['type']:''];if(f===undefined)continue;const g=Array['isArray'](e['nodes'])?e['nodes']:undefined;if(g===undefined||g['length']<0x2)continue;const h=g[0x0],i=g[0x1];if(typeof h!=='object'||h===null||typeof i!=='object'||i===null)continue;const j=isClockContext(h),k=isClockContext(i);if(j&&!k){if(f==='lt'||f==='le'||f==='eq')d=!![];}else{if(!j&&k){const l=f==='gt'||f==='ge'?'lt':f==='lt'||f==='le'?'gt':'eq';if(l==='lt')d=!![];}}}return!d;}function collectSlotQueries(a,b=[]){if(Array['isArray'](a)){for(const d of a)collectSlotQueries(d,b);return b;}if(typeof a!=='object'||a===null)return b;const c=a;if(c['type']==='query'&&typeof c['query']==='string'){const e=c['object'],f=typeof e==='object'&&e!==null?e:undefined;b['push']({'query':c['query'],'slot':typeof f?.['identifier']==='number'?f['identifier']:undefined,'witness':typeof f?.['convert_witness']==='string'?f['convert_witness']:undefined});}for(const g of Object['values'](c))collectSlotQueries(g,b);return b;}function tableRows(a){const b=a['params']['table'];if(!Array['isArray'](b))return[];return b['filter'](c=>typeof c==='object'&&c!==null);}function rowIdentifier(a){return typeof a['identifier']==='number'?a['identifier']:undefined;}function servicePinRowIds(a,b){const c=[],d=f=>{const g=f['object'];return f['type']==='query'&&f['query']==='order.service'&&typeof g==='object'&&g!==null&&g['identifier']===b;},e=f=>{if(Array['isArray'](f)){for(const i of f)e(i);return;}if(typeof f!=='object'||f===null)return;const g=f,h=g['nodes'];if(g['type']==='logic_equal'&&Array['isArray'](h)&&h['length']===0x2)for(const [j,k]of[[h[0x0],h[0x1]],[h[0x1],h[0x0]]]){if(typeof j!=='object'||j===null||typeof k!=='object'||k===null)continue;const l=k;d(j)&&l['type']==='identifier'&&typeof l['identifier']==='number'&&c['push'](l['identifier']);}for(const m of Object['values'](g))e(m);};return e(a),c;}function ownServiceIdentities(a){const b=new Set();for(const c of createsOf(a,'service')){b['add'](c['id']);const d=c['params']['name'];if(typeof d==='string')b['add'](d);}return b;}function pinIsExternal(a,b){if(typeof a==='string')return!b['has'](a);if(typeof a==='object'&&a!==null){const c=a;if(typeof c['$ref']==='string')return!b['has'](c['$ref']);const d=c['$late'];if(typeof d==='object'&&d!==null){const e=d['mark'];if(typeof e==='string')return!b['has'](e);}}return!![];}function guardCompositionShapes(a){const b=[],c=ownServiceIdentities(a),d=repositoryWriteGuardIds(a),e=writeOnceKeyedSlots(a);for(const f of createsOf(a,'guard')){const g=f['params']['root']??f['params']['logic'],h=collectSlotQueries(g),i=h['filter'](s=>s['query']['startsWith']('order.')),j=[...new Set(i['map'](s=>s['slot'])['filter'](t=>t!==undefined&&t!==HOST_ORDER_SLOT&&t!==TASK_BINDING_SLOT&&t!==ONCE_SLOT_BYTES))],k=tableRows(f),l=new Set(k['filter'](s=>s['b_submission']===![]&&s['value_type']==='Address')['map'](s=>rowIdentifier(s))['filter'](s=>s!==undefined)),m=j['flatMap'](t=>servicePinRowIds(g,t))['filter'](s=>l['has'](s)),n=[...new Set(i['filter'](s=>s['query']==='order.service')['map'](s=>s['slot'])['filter'](t=>t!==undefined))],o=new Map(k['map'](s=>[rowIdentifier(s),s['value']])),p=s=>s['flatMap'](t=>servicePinRowIds(g,t))['filter'](t=>l['has'](t)&&pinIsExternal(o['get'](t),c)),q=p(j)['length']>0x0||d['has'](f['id'])&&p(n)['length']>0x0,r=i['filter'](s=>s['query']==='order.owner')['map'](s=>s['slot']);b['push']({'stepId':f['id'],'foreignSlots':j,'paired':subtreeReadsRepositoryRow(g)||k['some'](s=>rowIdentifier(s)===ONCE_SLOT_BYTES&&s['b_submission']===!![])||j['some'](t=>e['get'](f['id'])?.['has'](t)),'pinned':m['length']>0x0,'pinnedRowIds':m,'procurementPin':q,'ownerCrossed':r['includes'](HOST_ORDER_SLOT)&&j['some'](t=>r['includes'](t))});}return b;}function repositoryPoliciesMerged(a){const b=new Map();for(const d of a['steps']){if(d['op']!=='configure'||d['method']!=='policies')continue;const e=d['target'],f=typeof e==='object'&&e!==null&&typeof e['$ref']==='string'?e['$ref']:undefined;if(f===undefined)continue;const g=d['params']['policy'];if(!Array['isArray'](g))continue;const h=b['get'](f)??[];h['push'](...g['filter'](i=>typeof i==='object'&&i!==null)),b['set'](f,h);}const c=[];for(const i of createsOf(a,'repository')){const j=Array['isArray'](i['params']['policies'])?i['params']['policies']:[];c['push']({'step':i,'policies':[...j,...b['get'](i['id'])??[]]});}return c;}function repositoryWriteGuardIds(a){const b=new Set();for(const {policies:c}of repositoryPoliciesMerged(a)){for(const d of c){if(typeof d!=='object'||d===null)continue;const e=d['write_guard'];if(!Array['isArray'](e))continue;for(const f of e){if(typeof f!=='object'||f===null)continue;const h=f['guard'];typeof h==='object'&&h!==null&&typeof h['$ref']==='string'&&b['add'](h['$ref']);}}}return b;}function writeOnceKeyedSlots(a){const b=new Map();for(const {policies:c}of repositoryPoliciesMerged(a)){for(const d of c){if(typeof d!=='object'||d===null)continue;const e=d;if(e['write_once']!==!![])continue;const f=e['write_guard'];if(!Array['isArray'](f))continue;for(const h of f){if(typeof h!=='object'||h===null)continue;const i=h,j=i['id_from_submission'];if(typeof j!=='number'||j===HOST_ORDER_SLOT)continue;const k=i['guard'];if(typeof k!=='object'||k===null)continue;const l=k['$ref'];if(typeof l!=='string')continue;const m=b['get'](l)??new Set();m['add'](j),b['set'](l,m);}}}return b;}function emittedPrimitives(a,b){const c=new Set();for(const d of createsOf(a,'guard')){const e=d['params']['root']??d['params']['logic'];if(subtreeReadsRepositoryRow(e))c['add']('P1');}if(b['some'](f=>f['foreignSlots']['length']>0x0))c['add']('P2');if(b['some'](f=>f['procurementPin']))c['add']('P3');for(const f of createsOf(a,'machine')){const g=f['params']['nodes'];if(!Array['isArray'](g))continue;if(JSON['stringify'](g)['includes']('retained_submission'))c['add']('P3');}if(maxDistinctGuardsPerTrack(a)>0x1)c['add']('P4');if(planHasFormulaSharing(a))c['add']('P5');if(createsOf(a,'reward')['length']>0x0)c['add']('P6');return c;}const HOST_ORDER_SLOT=0x0;function maxDistinctGuardsPerTrack(a){const b=new Map(),c=f=>{const h=f['guard'];if(h!==undefined)return JSON['stringify'](h);if(typeof f['guard_key']==='string')return'key:'+f['guard_key'];return'<unbound>';},d=f=>{if(typeof f==='object'&&f!==null&&!Array['isArray'](f)){const g=f;if(Array['isArray'](g['allocators']))f=g['allocators'];}if(!Array['isArray'](f))return;for(const h of f){if(typeof h!=='object'||h===null)continue;const i=h,j=typeof i['track']==='string'?i['track']:'settlement',k=b['get'](j);if(k===undefined)b['set'](j,new Set([c(i)]));else k['add'](c(i));}};for(const f of a['steps']){if(f['op']==='create'&&f['object']==='service')d(f['params']['order_allocators']);if(f['op']==='configure'&&f['method']==='order_allocators')d(f['params']['allocators']);}let e=0x0;for(const g of b['values']())e=Math['max'](e,g['size']);return e;}function planHasFormulaSharing(a){const b=c=>{if(typeof c==='object'&&c!==null&&!Array['isArray'](c)){const d=c;if(Array['isArray'](d['allocators']))c=d['allocators'];}if(!Array['isArray'](c))return![];return c['some'](e=>{if(typeof e!=='object'||e===null)return![];const f=e['sharing'];if(!Array['isArray'](f))return![];return f['some'](g=>{if(typeof g!=='object'||g===null)return![];const h=g;return h['mode']===0x4||h['formula']!==undefined;});});};for(const c of a['steps']){if(c['op']==='create'&&c['object']==='service'&&b(c['params']['order_allocators']))return!![];if(c['op']==='configure'&&c['method']==='order_allocators'&&b(c['params']['allocators']))return!![];}return![];}function thirdPartyLegs(a){const b=[],c=d=>{if(typeof d==='object'&&d!==null&&!Array['isArray'](d)){const e=d;if(Array['isArray'](e['allocators']))d=e['allocators'];}if(!Array['isArray'](d))return;for(const f of d){if(typeof f!=='object'||f===null)continue;const g=f,h=typeof g['track']==='string'?g['track']:'settlement',i=Array['isArray'](g['sharing'])?g['sharing']:[];for(const j of i){if(typeof j!=='object'||j===null)continue;const k=j['who'];if(typeof k!=='object'||k===null)continue;const l=k;if(l['Entity']!==undefined)b['push']({'track':h,'kind':'Entity'});else{if(l['Signer']!==undefined)b['push']({'track':h,'kind':'Signer'});}}}};for(const d of a['steps']){if(d['op']==='create'&&d['object']==='service')c(d['params']['order_allocators']);if(d['op']==='configure'&&d['method']==='order_allocators')c(d['params']['allocators']);}return b;}function publicFaceStrings(a){const b=[],c={'service':['description','location'],'contact':['description','location'],'proof':['description','proof'],'repository':['description'],'demand':['description']};for(const d of a['steps']){if(d['op']!=='create')continue;const e=c[d['object']];if(e===undefined)continue;for(const h of e){const i=d['params'][h];if(typeof i==='string'&&i['length']>0x0)b['push']({'face':d['object']+'.'+h,'stepId':d['id'],'text':i});}const g=d['params']['sales'];if(Array['isArray'](g))for(const j of g){if(typeof j!=='object'||j===null)continue;const k=j;for(const l of['description','name','title']){const m=k[l];typeof m==='string'&&m['length']>0x0&&b['push']({'face':d['object']+'.sales.'+l,'stepId':d['id'],'text':m});}}}for(const n of a['steps']){if(n['op']!=='configure')continue;const o=JSON['stringify'](n['params']);if(o['includes']('\x22data\x22')){const p=n['params']['data'];typeof p==='string'&&p['length']>0x0&&b['push']({'face':'repository.data','stepId':n['id'],'text':p});}}return b;}const PII_PATTERNS=[{'kind':'email','re':/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/},{'kind':'street_number','re':/\b\d{1,6}\s+[A-Za-z\u00c0-\u024f\u4e00-\u9fff]+(?:\s+[A-Za-z\u00c0-\u024f\u4e00-\u9fff]+){0,3}\s+(?:st|street|rd|road|ave|avenue|blvd|ln|lane|dr|drive|way|ct|court|fl|floor|apt|unit|rm|room)\b/i},{'kind':'phone','re':/(?:\+\d{1,3}[\s.-]?)?(?:\(\d{2,4}\)[\s.-]?)?\d{3,4}[\s.-]?\d{4}(?:[\s.-]?\d{2,4})?/,'proseOnly':!![]},{'kind':'national_id','re':/\b\d{15}\b|\b\d{17}[\dXx]\b/,'proseOnly':!![]}];function firstPiiHit(a){for(const b of publicFaceStrings(a)){const c=b['face']!=='repository.data';for(const d of PII_PATTERNS){if(d['proseOnly']===!![]&&!c)continue;if(d['re']['test'](b['text']))return{'face':b['face'],'stepId':b['stepId'],'kind':d['kind']};}}return undefined;}const HASH_SHAPE=/^(?:[a-fA-F0-9]{32}|[a-fA-F0-9]{40}|[a-fA-F0-9]{64}|[A-Za-z0-9+/]{43}={0,1}|[A-Za-z0-9+/]{44})$/,TRACKING_SHAPE=/^(?:[A-Za-z]{2,4}[\s-]?\d{8,15}|\d{1,7}[\s-]\d{4,15})$/;function firstRawTrackingValue(a){for(const b of a['steps']){if(b['op']!=='configure')continue;const c=b['params']['data'];if(typeof c!=='string')continue;const d=c['trim']();if(d['length']===0x0||HASH_SHAPE['test'](d))continue;if(TRACKING_SHAPE['test'](d))return{'stepId':b['id'],'value':d};}return undefined;}function perOrderProofBinding(a){for(const b of createsOf(a,'proof')){const c=JSON['stringify'](b['params']['about']??'');if(c['includes']('order'))return b['id'];}for(const d of a['steps']){if(d['op']!=='configure')continue;if(d['method']!=='required_info'&&d['method']!=='required_info_bind')continue;if(JSON['stringify'](d['params'])['includes']('proof'))return d['id'];}return undefined;}function compositionFacts(a){const b=guardCompositionShapes(a),c=emittedPrimitives(a,b),d=b['filter'](t=>t['foreignSlots']['length']>0x0),e=thirdPartyLegs(a),f=c['has']('P6'),g=typeof a['inputs']?.['composition_variant']==='string'?a['inputs']['composition_variant']:undefined,h=g!==undefined&&g in COMPOSITION_VARIANTS,i=typeof a['inputs']?.['fulfillment_axis']==='string'?a['inputs']['fulfillment_axis']:undefined,j=i??(h?COMPOSITION_VARIANTS[g]['fulfillmentAxis']:undefined),k=j==='merchant_procured'||j==='user_procured'||j==='mixed',l=d['length']>0x0||k,m=e['length']>0x0||f,n=h?primitivesForVariant(g)['filter'](s=>!c['has'](s)):[],o=firstPiiHit(a),p={'composition_primitives_emitted':[...c]['sort']()['join'](',\x20'),'composition_cross_order_guard_count':d['length'],'third_party_fulfilment_present':l,'third_party_payout_leg_present':m,'third_party_leg_count':e['length'],'reward_pool_present':f,...j!==undefined?{'fulfillment_axis':j}:{},...g!==undefined?{'composition_variant':g,'composition_variant_known':h}:{}};if(d['length']>0x0){const s=d['find'](w=>!w['paired']),t=d['find'](w=>!w['pinned']),u=j!=='merchant_procured'&&j!=='mixed',v=u?d['find'](w=>!w['ownerCrossed']):undefined;p['first_cross_order_guard']=d[0x0]['stepId'],p['cross_order_slots_display']=d[0x0]['foreignSlots']['join'](',\x20');s!==undefined&&(p['first_cross_order_guard_unpaired']=s['stepId'],p['cross_order_unpaired_count']=d['filter'](w=>!w['paired'])['length']);if(t!==undefined)p['first_cross_order_guard_unpinned']=t['stepId'];if(v!==undefined)p['first_cross_order_guard_no_owner_cross']=v['stepId'];!u&&d['some'](w=>!w['ownerCrossed'])&&(p['cross_order_owner_tie_not_expressible']=!![]);}l&&!m&&(p['third_party_fulfilment_without_payout']=!![]);h&&n['length']>0x0&&(p['composition_variant_missing_primitives']=n['join'](',\x20'),p['composition_variant_missing_count']=n['length']);g==='V3'&&(p['composition_dual_refund_unblockable']=!![],p['composition_disclosure_count']=disclosuresFor('V3')['length']);o!==undefined&&(p['first_pii_public_face']=o['face'],p['first_pii_public_face_step']=o['stepId'],p['first_pii_kind']=o['kind']);const q=firstRawTrackingValue(a);q!==undefined&&(p['first_raw_tracking_value_step']=q['stepId'],p['first_raw_tracking_value']=q['value']);const r=perOrderProofBinding(a);if(r!==undefined)p['per_order_proof_binding_step']=r;return p;}function guardQualityFacts(a){const b=e=>a['filter'](g=>g['rule']===e),c=e=>'guard\x20\x27'+e['key']+'\x27:\x20'+e['subject'],d=(e,f)=>{const g=b(e);if(g['length']===0x0)return{};return{[f+'_count']:g['length'],['first_'+f]:c(g[0x0]),[f+'_display']:g['map'](c)['join'](';\x20')};};return{...d('GUARD-EQUALITY-DRIFT','guard_equality_drift'),...d('GUARD-THRESHOLD-LITERAL','guard_threshold_literal'),...d('GUARD-SET-COLLAPSE','guard_set_collapse'),...d('GUARD-INPUT-TRUST','guard_input_trust'),...d('GUARD-ABORT-SAFE','guard_abort_unsafe')};}export function planFacts(c){const d=new Map(createsOf(c,'guard')['map'](bn=>[bn['id'],guardProjection(bn)])),f=allocatorRows(c),h=machineProjection(c),k=createsOf(c,'service')['length']>0x0,l=createsOf(c,'repository')['length']>0x0,o=c['steps']['some'](bn=>{if(!(bn['op']==='create'&&bn['object']==='service'||bn['op']==='configure'&&bn['method']==='sales'))return![];const bo=bn['params']['sales'];return Array['isArray'](bo)&&bo['length']>0x0;}),q=new Set();for(const bn of f){const bo=bn['guardStep']===undefined?undefined:d['get'](bn['guardStep']);for(const bp of bo?.['acceptedNodes']??[])q['add'](bp);}const u=new Set(h?.['optionalNodes']??[]),w=(h?.['terminals']??[])['filter'](bq=>!u['has'](bq)),x=new Set(),y=new Set(f['map'](bq=>bq['guardStep'])['filter'](bq=>bq!==undefined));for(const bq of h?.['edges']??[]){if(bq['next']===''||bq['guards']['length']===0x0)continue;for(const br of bq['guards']){if(!y['has'](br))continue;if((d['get'](br)?.['acceptedNodes']['length']??0x0)===0x0)x['add'](bq['next']);}}const z=[];for(const bs of h?.['edges']??[]){if(!bs['forwardNames']['includes']('WithdrawClaim')||bs['guards']['length']===0x0)continue;const bt=bs['guards']['map'](bu=>d['get'](bu))['filter'](bu=>bu!==undefined);bt['length']>0x0&&!bt['some'](bu=>bu['queries']['includes']('order.dispute.open'))&&z['push']((bs['prev']||'(entry)')+'->'+bs['next']);}const A=bu=>bu['forwardNames']['some'](bv=>/withdraw/i['test'](bv)),B=[];for(const bu of h?.['edges']??[]){if(A(bu)||bu['guards']['length']===0x0)continue;const bv=bu['guards']['map'](bw=>d['get'](bw))['filter'](bw=>bw!==undefined);bv['some'](bw=>bw['queries']['includes']('order.dispute.open'))&&B['push']((bu['prev']||'(entry)')+'->'+bu['next']);}const C=[];for(const bw of h?.['edges']??[]){if(!A(bw)||bw['guards']['length']===0x0)continue;const bx=bw['guards']['map'](by=>d['get'](by))['filter'](by=>by!==undefined);bx['some'](by=>by['queries']['includes']('order.dispute.open'))&&!bx['some'](by=>by['queries']['includes']('order.claimed_by'))&&C['push']((bw['prev']||'(entry)')+'->'+bw['next']);}const D=(h?.['edges']??[])['some'](by=>by['forwardNames']['some'](bz=>/conclude|compensate/i['test'](bz))),E=B['length']>0x0&&C['length']>0x0&&!D,F=B['length']>0x0&&C['length']>0x0&&D,G=w['find'](by=>!q['has'](by)&&!x['has'](by)),H=(h?.['finalRoleNodes']??[])['find'](by=>!q['has'](by)&&!x['has'](by)),I=(h?.['edges']??[])['find'](by=>(h?.['cancelledNodes']??[])['includes'](by['prev'])&&(by['forwardNames']['some'](bz=>/review|reward/i['test'](bz))||/review|reward/i['test'](by['next']))),J=new Set([...h?.['finalRoleNodes']??[],...q,...x]),K=[[/settle|release|payout|\bband\b/i,'settle'],[/recover|award/i,'recover'],[/refund|return/i,'refund'],[/arb|indemnity|dispute/i,'arb']],L=by=>{const bz=[by['next'],...by['forwardNames'],...by['guards']['flatMap'](bA=>d['get'](bA)?.['queries']??[])];for(const [bA,bB]of K){if(bz['some'](bC=>bA['test'](bC)))return bB;}return undefined;};let M;for(const by of h?.['edges']??[]){if(by['next']===''||!J['has'](by['next']))continue;for(const bz of by['forwardRails']){const bA=bz['perm']!==undefined&&bz['perm']>0x0;typeof bz['roster']==='string'&&bz['roster']!==''&&!bA&&(M??=by['prev']+'->'+by['next']+'\x20(forward\x20'+bz['name']+')');}}const N=new Map();for(const bB of h?.['edges']??[]){if(bB['next']===''||!J['has'](bB['next']))continue;const bC=L(bB);if(bC===undefined)continue;for(const bD of bB['forwardRails']){if(typeof bD['perm']==='number'&&bD['perm']>0x0){const bE=N['get'](bD['perm'])??N['set'](bD['perm'],new Set())['get'](bD['perm']);bE['add'](bC);}}}const O=[...N['entries']()]['find'](([,bF])=>bF['size']>=0x2),P=c['pending_guards']??[],Q=P['filter'](bF=>bF['site']==='allocator')['length'],R=P['filter'](bF=>bF['site']==='allocator'||bF['site']==='machine_edge'),S=P['filter'](bF=>bF['site']==='service_buy'),T=R[0x0]?.['key'],U=S[0x0]?.['key'],V=h?.['nodes']['find'](bF=>/return/i['test'](bF)),W=c['steps']['some'](bF=>{if(bF['op']==='configure'&&bF['method']==='arbitrations'){const bG=bF['params']['objects'];return Array['isArray'](bG)&&bG['length']>0x0;}if(bF['op']==='create'&&bF['object']==='service'){const bH=bF['params']['arbitrations'];return Array['isArray'](bH)&&bH['length']>0x0;}return![];});let X,Y=![];for(const bF of c['steps']){if(bF['op']==='configure'&&bF['method']==='compensation_fund_add'){Y=!![];const bG=numericAmount(bF['params']['balance']);if(bG!==undefined)X=(X??0x0)+bG;}}let Z,a0;const a1=/free[\s_-]*tier|free[\s_-]*trial|trial|\u8bd5\u7528|\u4f53\u9a8c|\u514d\u8d39/i,a2=bH=>{if(!Array['isArray'](bH))return;for(const bI of bH){const bJ=bI,bK=numericAmount(bJ?.['price']);if(bK!==undefined&&bK>0x0){Z=Math['max'](Z??0x0,bK);const bL=typeof bJ?.['name']==='string'?bJ['name']:'';!a1['test'](bL)&&(a0=a0===undefined?bK:Math['min'](a0,bK));}}};for(const bH of c['steps']){if(bH['op']==='create'&&bH['object']==='service')a2(bH['params']['sales']);if(bH['op']==='configure'&&bH['method']==='sales')a2(bH['params']['sales']);}const a3=X!==undefined&&Z!==undefined;let a4,a5=0x0,a6=0x0;const a7=bI=>{if(!Array['isArray'](bI))return;for(const bJ of bI){const bK=bJ?.['name'];if(typeof bK!=='string'||bK==='')continue;const bL=skuNameByteLen(bK);bL>SKU_NAME_MAX_BYTES&&(a6+=0x1,a4===undefined&&(a4=bK,a5=bL));}};for(const bI of c['steps']){if(bI['op']==='create'&&bI['object']==='service')a7(bI['params']['sales']);if(bI['op']==='configure'&&bI['method']==='sales')a7(bI['params']['sales']);}const a8=new Set(),a9=bJ=>{if(!Array['isArray'](bJ))return;for(const bK of bJ){const bL=bK?.['name'];if(typeof bL==='string'&&bL!=='')a8['add'](bL);}};for(const bJ of c['steps']){if(bJ['op']==='create'&&bJ['object']==='service')a9(bJ['params']['sales']);if(bJ['op']==='configure'&&bJ['method']==='sales')a9(bJ['params']['sales']);}const aa=[];if(a8['size']>0x0)for(const bK of createsOf(c,'guard')){const bL=bK['params']['root']??bK['params']['logic'];for(const bM of collectWipHashComparisons(bL,bK['params']['table'])){!a8['has'](bM['constant'])&&aa['push']({'guard':bK['id'],'query':bM['query'],'constant':bM['constant']});}}const ab=createsOf(c,'reward')['length']>0x0;let ac,ad;if(ab)for(const bN of c['steps']){if(bN['op']==='configure'&&bN['method']==='guard_add'){const bO=bN['params']['amount'];if(bO!==undefined&&bO!==null&&bO['type']==='Fixed'){const bP=numericAmount(bO['value']);if(bP!==undefined)ac=Math['max'](ac??0x0,bP);}}if(bN['op']==='configure'&&bN['method']==='coin_add'&&/^reward/['test'](bN['id'])){const bQ=numericAmount(bN['params']['coin']);if(bQ!==undefined)ad=(ad??0x0)+bQ;}}const ae=ac!==undefined&&a0!==undefined,af=/^(arb\.indemnity|arb\.order|arb\.status|order\.dispute)/,ag=/settled|refunded|reviewed|completed|closed|cancel/i;let ah;if(h!==undefined)for(const bR of h['edges']){if(bR['next']===''||bR['guards']['length']===0x0)continue;if(!ag['test'](bR['prev']))continue;if(bR['guards']['some'](bS=>d['get'](bS)?.['queries']['some'](bT=>af['test'](bT)))){ah=bR['prev'];break;}}const ai=ah!==undefined&&(!Y||X===0x0),aj=new Map();for(const bS of createsOf(c,'guard')){aj['set'](bS['id'],bS['params']['root']??bS['params']['logic']);}const ak=h?.['edges']??[],al=bT=>bT['guards']['length']===0x0||bT['guards']['every'](bU=>{const bV=aj['get'](bU);return bV===undefined||guardWindowOpen(bV);});let am;const an=new Set(ak['filter'](bT=>bT['prev']==='')['map'](bT=>bT['next'])),ao=[];for(const bT of new Set(ak['map'](bU=>bU['prev'])['concat'](ak['map'](bU=>bU['next'])))){if(bT===''||an['has'](bT))continue;const bU=ak['filter'](bV=>bV['prev']===bT);if(bU['length']===0x0)continue;if(bU['every'](bV=>!al(bV)))ao['push'](bT);}for(const bV of ao){if(bV==='')ao['splice'](ao['indexOf'](bV),0x1);}for(const bW of ak){if(bW['prev']!==''||bW['next']==='')continue;const bX=ak['filter'](bY=>bY['prev']===bW['next']);if(bX['length']===0x0)continue;if(bX['every'](bY=>!al(bY)))am??=bW['next'];}const ap=f['some'](bY=>bY['guardStep']===undefined&&bY['guardKey']!==undefined),aq=ak['filter'](bY=>bY['guards']['length']>0x0&&bY['guards']['some'](bZ=>d['get'](bZ)?.['queries']['some'](c0=>af['test'](c0))));let ar=![];if(aq['length']>0x0&&!ap){const bY=new Set(aq['map'](c1=>c1['next'])['filter'](c1=>c1!=='')),bZ=new Set(aq['flatMap'](c1=>c1['guards'])),c0=new Set();for(const c1 of f){const c2=c1['guardStep']===undefined?undefined:d['get'](c1['guardStep']);if(c2===undefined)continue;if(c2['acceptedNodes']['length']>0x0){for(const c3 of c2['acceptedNodes'])c0['add'](c3);}else for(const c4 of ak){c4['next']!==''&&c4['guards']['includes'](c1['guardStep'])&&c0['add'](c4['next']);}}for(const c5 of f){const c6=c5['guardStep']===undefined?undefined:d['get'](c5['guardStep']);if(c6===undefined)continue;if(c6['queries']['some'](c7=>af['test'](c7))||bZ['has'](c5['guardStep'])){ar=!![];break;}}if(!ar)for(const c7 of bY){if(c0['has'](c7)){ar=!![];break;}}}const as=aq['length']>0x0&&!ar&&!ap,at=aq[0x0]===undefined?undefined:aq[0x0]['prev']!==''?aq[0x0]['prev']:aq[0x0]['next'],au=[];for(const c8 of c['steps']){const c9=c8['op']==='create'&&c8['object']==='service',ca=c8['op']==='configure'&&c8['method']==='sales';if(!c9&&!ca)continue;const cb=c8['params'];if(typeof cb['description']==='string')au['push'](cb['description']);if(!Array['isArray'](cb['sales']))continue;for(const cc of cb['sales']){if(typeof cc!=='object'||cc===null)continue;for(const cd of Object['values'](cc)){if(typeof cd==='string')au['push'](cd);}}}const av=au['flatMap'](ce=>extractProseWindowPromises(ce)),aw=collectEnforcedWindowMs(c),ax=av['filter'](ce=>!aw['has'](ce['ms'])),ay=[];for(const ce of au){const cf=UNANCHORED_RESTART_RE['exec'](ce);if(cf)ay['push'](cf[0x0]);}const az=f['filter'](cg=>cg['track']==='refund');let aA=![];if(h!==undefined)for(const cg of h['edges']){if(cg['next']!=='closed_refunded'||cg['guards']['length']===0x0)continue;if(cg['guards']['some'](ch=>(d['get'](ch)?.['queries']??[])['includes']('order.principal_refunded'))){aA=!![];break;}}let aB=0x0;const aC=[];if(h!==undefined)for(const ch of h['edges']){const ci=ch['forwardNames']['filter'](cj=>cj['endsWith']('_late'));if(ci['length']===0x0)continue;for(const cj of ci){aB+=0x1;const ck=ch['guards']['some'](cl=>(d['get'](cl)?.['queries']??[])['some'](cm=>/^permission\.entity\.perm/['test'](cm)));if(!ck)aC['push'](ch['prev']+'\x20->\x20'+ch['next']+'\x20('+cj+')');}}const aD=[];let aE=0x0;for(const cl of f){if(cl['track']!=='settlement')continue;const cm=cl['guardStep']===undefined?[]:d['get'](cl['guardStep'])?.['queries']??[],cn=[];if(cm['includes']('order.owner'))cn['push']('order.owner==signer\x20(buyer)');if(cm['includes']('order.agent'))cn['push']('order.agent\x20has\x20signer');if(cm['includes']('order.service'))cn['push']('order.service\x20binding');if(cm['some'](cp=>/^permission\.(owner|admin)$/['test'](cp)))cn['push']('permission\x20role');const co=cl['guardStep']??cl['guardKey']??'<unbound>';cn['length']===0x0?aD['push'](co+':\x20no\x20guard\x20identity\x20face\x20(edge\x20rail:\x20merchant\x20permission\x201000\x20default)'):(cn['every'](cp=>cp['startsWith']('order.owner')||cp['startsWith']('order.agent'))&&!cm['includes']('order.service')&&!cm['some'](cp=>/^permission\./['test'](cp))&&(aE+=0x1),aD['push'](co+':\x20'+cn['join']('\x20|\x20')));}const aF=new Map();for(const cp of h?.['edges']??[]){for(const cq of cp['guards']){const cs=aF['get'](cq)??[];if(cp['prev']!=='')cs['push'](cp['prev']);if(cp['next']!=='')cs['push'](cp['next']);aF['set'](cq,cs);}}let aG,aH=![];for(const ct of d['values']()){if(ct['queries']['some'](isPathDependentTimeQuery)){aG??=ct['stepId'];if(h!==undefined){const cu=[...ct['acceptedNodes'],...aF['get'](ct['stepId'])??[]];for(const cv of cu){if(pathCountCap2(h['edges'],cv)>=0x2){aH=!![],aG=ct['stepId'];break;}}}}if(aH)break;}const aI=[...d['values']()]['flatMap'](cw=>cw['queries']);let aJ;for(const cw of WRITE_ONLY_ENFORCEMENT_SOURCES){for(const cx of createsOf(c,cw['object'])){if(cw['extract'](cx)&&!aI['some'](cy=>cy['startsWith'](cw['coverQuery']))){aJ=cw['param'];break;}}if(aJ!==undefined)break;}const aK=new Set();for(const cy of c['steps']){if(cy['op']==='create'&&cy['object']==='guard')continue;const cz=refsOf(cy['op']==='publish'?cy['target']:cy['params']);for(const cA of cz)aK['add'](cA);if(cy['op']==='configure'){for(const cB of refsOf(cy['target']))aK['add'](cB);}}const aL=[...d['keys']()]['find'](cC=>!aK['has'](cC)),aM=[...d['values']()]['find'](cC=>!l&&cC['queries']['some'](cD=>cD['startsWith']('repository.')))?.['stepId'];let aN;if(k&&h!==undefined)for(const cC of h['forwardGuardRefs']){const cD=d['get'](cC);if(cD===undefined)continue;const cE=cD['table']['some'](cF=>cF['identifier']===TASK_BINDING_SLOT&&cF['b_submission']===!![]);if(!cE){aN=cC;break;}}let aO;for(const cF of f){if(cF['guardStep']===undefined||cF['identifierLegs']['length']===0x0)continue;const cG=d['get'](cF['guardStep']);if(cG===undefined)continue;for(const cH of cF['identifierLegs']){const cI=cG['table']['find'](cJ=>cJ['identifier']===cH);if(cI===undefined||cI['b_submission']!==!![]||cI['value_type']!=='Address'){aO='slot\x20'+cH+'\x20of\x20guard\x20\x27'+cF['guardStep']+'\x27';break;}}if(aO!==undefined)break;}const aP=new Set();for(const {policies:cJ}of repositoryPoliciesMerged(c)){for(const cK of cJ){const cL=cK?.['name'];if(typeof cL==='string')aP['add'](cL);}}const aQ=[];if(aP['size']>0x0)for(const cM of createsOf(c,'guard')){const cN=Array['isArray'](cM['params']['table'])?cM['params']['table']:[];for(const cO of collectRepoWhereQueries(cM['params']['root']??cM['params']['logic'])){const cP=staticStringOperand(cO['key'],cN);if(cP===undefined)continue;if(!isPlanLocalObjectOperand(cO['object'],cN))continue;!aP['has'](cP)&&aQ['push']('\x27'+cP+'\x27\x20in\x20guard\x20\x27'+cM['id']+'\x27');}}const aR=[];for(const cQ of createsOf(c,'guard')){const cR=Array['isArray'](cQ['params']['table'])?cQ['params']['table']:[];for(const cS of collectRepoWhereQueries(cQ['params']['root']??cQ['params']['logic'])){const cT=cS['type'];if(typeof cT!=='string'||!cT['includes']('sum_where'))continue;const cU=cS['object'];if(typeof cU!=='object'||cU===null)continue;const cV=cU['identifier'];if(typeof cV!=='number')continue;const cW=cR['find'](cX=>typeof cX==='object'&&cX!==null&&cX['identifier']===cV);cW!==undefined&&cW['b_submission']===!![]&&aR['push']('slot\x20'+cV+'\x20of\x20guard\x20\x27'+cQ['id']+'\x27');}}const aS=[];{const cX=new Map(createsOf(c,'guard')['map'](d0=>[d0['id'],guardProjection(d0)])),cY=[],cZ=d0=>{if(typeof d0==='object'&&d0!==null&&!Array['isArray'](d0)){const d1=d0;if(Array['isArray'](d1['allocators']))d0=d1['allocators'];}if(!Array['isArray'](d0))return;for(const d2 of d0){if(typeof d2!=='object'||d2===null)continue;const d3=d2,d4=[],d5=Array['isArray'](d3['sharing'])?d3['sharing']:[];for(const d8 of d5){if(typeof d8!=='object'||d8===null)continue;const d9=d8['who'];if(typeof d9!=='object'||d9===null)continue;const da=d9;if(typeof da['GuardIdentifier']==='number')d4['push']('guard-slot:'+da['GuardIdentifier']);else{if(typeof da['Entity']==='string')d4['push']('entity:'+String(da['Entity'])['toLowerCase']());else{if(da['Signer']!==undefined)d4['push']('signer');}}}const d6=isRef(d3['guard'])?d3['guard']['$ref']:undefined,d7=d6!==undefined?cX['get'](d6):undefined;cY['push']({'track':typeof d3['track']==='string'?d3['track']:'settlement','guard':d6??'(keyed)','nodes':d7?[...d7['acceptedNodes']]['sort']():[],'payees':[...d4]['sort']()});}};for(const d0 of c['steps']){if(d0['op']==='create'&&d0['object']==='service')cZ(d0['params']['order_allocators']);if(d0['op']==='configure'&&d0['method']==='order_allocators')cZ(d0['params']['allocators']);}for(let d1=0x0;d1<cY['length'];d1++){for(let d2=d1+0x1;d2<cY['length'];d2++){const d3=cY[d1],d4=cY[d2];if(d3['nodes']['length']===0x0||d4['nodes']['length']===0x0)continue;if(d3['payees']['length']===0x0||d4['payees']['length']===0x0)continue;const d5=d3['nodes']['some'](d7=>d4['nodes']['includes'](d7)),d6=d3['payees']['length']===d4['payees']['length']&&d3['payees']['every']((d7,d8)=>d7===d4['payees'][d8]);d5&&!d6&&aS['push']('row#'+(d1+0x1)+'('+d3['track']+',guard\x20\x27'+d3['guard']+'\x27,pays\x20'+d3['payees']['join']('|')+')\x20vs\x20'+('row#'+(d2+0x1)+'('+d4['track']+',guard\x20\x27'+d4['guard']+'\x27,pays\x20'+d4['payees']['join']('|')+')\x20share\x20node(s)\x20')+('['+d3['nodes']['filter'](d7=>d4['nodes']['includes'](d7))['join'](',')+']\x20with\x20different\x20payees'));}}}const aT=new Set();for(const {policies:d7}of repositoryPoliciesMerged(c)){for(const d8 of d7){const d9=d8?.['write_guard'];if(!Array['isArray'](d9))continue;for(const da of d9){const db=da?.['guard'],dc=isRef(db)?db['$ref']:db;if(typeof dc==='string')aT['add'](dc);}}}let aU,aV=0x0;for(const dd of createsOf(c,'guard')){if(!aT['has'](dd['id']))continue;rootNegatesRepoDataHas(dd['params']['root']??dd['params']['logic'])&&(aV++,aU??=dd['id']);}const aW=[],aX=new Set(),aY=de=>{if(!Array['isArray'](de))return[];return de['filter'](df=>typeof df==='object'&&df!==null)['filter'](df=>df['write_once']===!![]&&typeof df['name']==='string')['map'](df=>df['name']);};for(const de of c['steps']){if(de['op']==='create'&&de['object']==='repository'){for(const di of aY(de['params']['policies']))aX['add'](di);continue;}if(de['op']!=='configure'||de['method']!=='policies')continue;const df=de['params'],dg=typeof df['op']==='string'?df['op']:'add',dh=(dj,dk)=>{aW['push']('step\x20\x27'+de['id']+'\x27\x20'+dj+':\x20'+dk['join'](',\x20'));};if(dg==='set'){const dj=new Set(aY(df['policy'])),dk=[...aX]['filter'](dl=>!dj['has'](dl));if(dk['length']>0x0)dh('REPLACES\x20the\x20policy\x20list\x20and\x20drops\x20write_once\x20attestation(s)',dk);for(const dl of aY(df['policy']))aX['add'](dl);}else{if(dg==='remove'){const dm=Array['isArray'](df['policy'])?df['policy']['filter'](dp=>typeof dp==='string'):[],dn=dm['filter'](dp=>aX['has'](dp));if(dn['length']>0x0)dh('REMOVES\x20write_once\x20attestation\x20policy/policies',dn);for(const dp of dn)aX['delete'](dp);}else{if(dg==='clear'){if(aX['size']>0x0)dh('CLEARS\x20the\x20policy\x20list\x20including\x20write_once\x20attestation(s)',[...aX]);aX['clear']();}else{if(Array['isArray'](df['policy']))for(const dq of df['policy']){const dr=dq;if(typeof dr?.['name']!=='string')continue;const ds=dr['name'];if(dr['write_once']===!![])aX['add'](ds);else aX['has'](ds)&&(dh('UPDATES\x20a\x20write_once\x20policy\x20with\x20write_once\x20unset/false\x20(silent\x20downgrade)',[ds]),aX['delete'](ds));}}}}}const aZ=new Map(createsOf(c,'guard')['map'](dt=>[dt['id'],dt]));let b0,b1=0x0,b2,b3=0x0,b4;for(const {policies:dt}of repositoryPoliciesMerged(c)){for(const du of dt){const dv=du,dw=dv['write_guard'];if(!Array['isArray'](dw))continue;const dx=typeof dv['id_from']==='string'?dv['id_from']['toLowerCase']():'none',dy=dx==='none'?'caller-keyed':dx+'-keyed',dz=typeof dv['description']==='string'?dv['description']:'';for(const dA of dw){const dB=dA?.['guard'],dC=isRef(dB)?dB['$ref']:dB,dD=typeof dC==='string'?aZ['get'](dC):undefined;if(dD===undefined)continue;const dE=writeGuardLegClass(dD['params']['root']??dD['params']['logic'],dD['params']['table']);if(!dE['hasSignerLeg']||dE['hasBindingLeg'])continue;const dF='guard\x20\x27'+dD['id']+'\x27\x20(policy\x20\x27'+String(dv['name']??'?')+'\x27,\x20'+dy+')';dx==='signer'||dx==='clock'?(b3++,b2??=dF):(b1++,b0??=dF),WRITE_GUARD_PROMISE_RE['test'](dz)&&!WRITE_GUARD_TAUTOLOGY_DISCLOSURE_RE['test'](dz)&&(b4??=dF+'\x20—\x20its\x20description\x20promises\x20a\x20bound\x20writer\x20set\x20the\x20guard\x20legs\x20never\x20encode');}}}let b5,b6=0x0;for(const dG of createsOf(c,'service')){const dH=dG['params']['customer_required'];if(!Array['isArray'](dH)||dH['length']===0x0)continue;dG['params']['buy_guard']===undefined&&(b6++,b5??=dG['id']);}let b7,b8=0x0;for(const dI of h?.['edges']??[]){if(dI['prev']===''||dI['guards']['length']===0x0)continue;for(const dJ of dI['guards']){const dK=d['get'](dJ);if(dK===undefined||dK['acceptedNodes']['length']===0x0)continue;!dK['acceptedNodes']['includes'](dI['prev'])&&(b8++,b7??=dJ+'\x20on\x20edge\x20'+dI['prev']+'->'+dI['next']+'\x20(guard\x20pins\x20progress.current\x20in\x20'+('['+dK['acceptedNodes']['join'](',\x20')+']\x20—\x20never\x20\x27'+dI['prev']+'\x27)'));}}let b9;if(h!==undefined){const dL=(h['edges']['find'](dN=>dN['prev']==='')??{'next':''})['next'],dM=new Set([...h['finalRoleNodes'],...h['optionalNodes']]);for(const dN of h['nodes']){if(dM['has'](dN)||dN===dL)continue;const dO=h['edges']['filter'](dQ=>dQ['prev']===dN&&dQ['next']!==dN);if(dO['length']===0x0)continue;const dP=dO['some'](dQ=>dQ['guards']['length']===0x0||dQ['guards']['some'](dR=>{const dS=d['get'](dR);return dS===undefined||dS['acceptedNodes']['length']===0x0||dS['acceptedNodes']['includes'](dN);}));if(!dP)b9??=dN;}}let ba,bb=0x0;{const dQ=new Set(h?.['forwardGuardRefs']??[]);for(const dR of h?.['edges']??[])for(const dS of dR['guards'])dQ['add'](dS);for(const dT of f){const dU=/refund|settle|recover/i['test'](dT['track'])||/refund|settle|recover/i['test'](dT['guardKey']??'');if(!dU||dT['guardStep']===undefined)continue;const dV=d['get'](dT['guardStep']);if(dV===undefined)continue;const dW=dV['acceptedNodes']['length']>0x0||dQ['has'](dT['guardStep'])||dV['queries']['includes']('order.dispute.open'),dX=dV['queries']['includes']('order.owner')||dV['queries']['includes']('order.agent\x20has')||dV['queries']['includes']('order.service');if(dW||dX)continue;bb++,ba??=dT['track']+'\x20row\x20on\x20guard\x20\x27'+(dT['guardKey']??dT['guardStep'])+'\x27\x20('+dT['guardStep']+')\x20—\x20pins\x20no\x20progress\x20node,\x20rides\x20no\x20machine\x20edge,\x20references\x20no\x20order\x20identity\x20or\x20dispute\x20state';}}const bc=[];for(const dY of createsOf(c,'guard')){const dZ=reachLegsOf(dY);bc['push'](...findReachContradictions(dY['id'],dZ['legs'],dZ['selfStrict']));}const bd=[];for(const e0 of createsOf(c,'guard')){const e1=e0['params']['root']??e0['params']['logic'],e2=e0['params']['table'],e3=typeof e0['params']['description']==='string'?e0['params']['description']:'',e4=equalityFaceCheck(e0['id'],e3,e1);if(e4!==null)bd['push'](e4);bd['push'](...thresholdLiteralCheck(e0['id'],e2)),bd['push'](...setCollapseCheck(e0['id'],e2)),bd['push'](...submissionRowIdTrustCheck(e0['id'],e1,e2)),bd['push'](...abortSafeVerbCheck(e0['id'],e1));}const be=new Map();for(const e5 of h?.['edges']??[]){const e6=be['get'](e5['prev'])??[];e6['push'](e5['next']),be['set'](e5['prev'],e6);}const bf=new Map();for(const e7 of findLoopCycles(be)){const e8=classifyLoopCycle(e7['cycle']);for(const e9 of e7['cycle'])bf['set'](e9,e8);}const bg=ea=>{const eb=bf['get'](ea);return eb==='renewal'||eb==='charge';},bh=[];if(bf['size']>0x0)for(const ea of createsOf(c,'guard')){const eb=ea['params']['root']??ea['params']['logic'];if(eb===undefined)continue;const ec=typeof ea['params']['description']==='string'?ea['params']['description']:'',ed=ee=>{if(!ee||typeof ee!=='object')return;if(Array['isArray'](ee)){ee['forEach'](ed);return;}const ef=ee,eg=typeof ef['type']==='string'?ef['type']:'',eh=ef['where']??null;if(eg['startsWith']('query_progress_history_time')&&ef['find']==='first'&&eh!==null&&typeof eh==='object'){const ei=typeof eh['nextNode']==='string'?eh['nextNode']:undefined;if(ei!==undefined&&bg(ei)){const ej=/\bper[- ]period\b|\bthis period\b|\beach period\b|\bevery period\b|\u6bcf\u671f|\u5f53\u671f|\u672c\u671f/i['test'](ec);bh['push']({'guard':ea['id'],'target':ei,'perPeriodClaim':ej});}}for(const ek of Object['values'](ef))ed(ek);};ed(eb);}const bi=ee=>'guard\x20\x27'+ee['guard']+'\x27\x20anchors\x20a\x20history\x20clock\x20at\x20find:\x22first\x22\x20on\x20PERIODIC\x20node\x20\x27'+ee['target']+'\x27\x20'+'(re-enters\x20per\x20billed\x20period)'+(ee['perPeriodClaim']?'\x20while\x20its\x20description\x20claims\x20per-period\x20semantics\x20—\x20period\x202+\x20reads\x20the\x20FIRST\x20visit\x27s\x20timestamp\x20(ofnz8\x20F-61)':'\x20—\x20intentional\x20once-per-life\x20gate,\x20or\x20the\x20stale-anchor\x20defect\x20(ofnz8\x20F-61)?'),bj=bh['find'](ee=>ee['perPeriodClaim'])??bh[0x0],bk=[],bl=[],bm=(ee,ef,eg,eh)=>{if(ef===null||typeof ef!=='object')return;if(Array['isArray'](ef)){ef['forEach']((ei,ej)=>bm(ee,ei,eg+'['+ej+']',eh));return;}for(const [ei,ej]of Object['entries'](ef)){const ek=eg?eg+'.'+ei:ei,el=typeof ej==='number'&&Number['isFinite'](ej)&&!Number['isInteger'](ej);/_days$/['test'](ei)&&ei!=='campaign_duration_days'&&el&&bk['push']('step\x20\x27'+ee+'\x27:\x20'+ek+'\x20=\x20'+ej+'\x20—\x20the\x20U64\x20day\x20slot\x20truncates\x20to\x20'+Math['trunc'](ej)+'\x20at\x20BCS\x20encode'),eh&&(/_hours$/['test'](ei)||/_minutes$/['test'](ei))&&el&&bl['push']('step\x20\x27'+ee+'\x27:\x20'+ek+'\x20=\x20'+ej+'\x20—\x20the\x20U64\x20'+(/_minutes$/['test'](ei)?'minute':'hour')+'\x20slot\x20truncates\x20to\x20'+Math['trunc'](ej)+'\x20at\x20BCS\x20encode'),bm(ee,ej,ek,eh);}};for(const ee of c['steps']){const ef=ee['params'];if(ef!==undefined)bm(ee['id'],ef,'',!![]);}return bm('<plan.inputs>',c['inputs'],'',![]),{...compositionFacts(c),'has_service':k,'has_machine':h!==undefined,'has_repository':l,'sales_step_present':o,'allocator_row_count':f['length'],'refund_row_count':az['length'],'terminal_count':w['length'],'terminal_nodes_display':w['join'](',\x20'),'pending_allocator_guard_count':Q,'pending_guard_total':P['length'],...G===undefined?{}:{'first_uncovered_terminal':G},...H===undefined?{}:{'first_uncovered_final_node':H},...I===undefined?{}:{'first_cancelled_review_bridge':I['prev']+'\x20->\x20'+I['next']+(I['forwardNames']['length']>0x0?'\x20(forward\x20'+I['forwardNames']['join'](',\x20')+')':'')},...M===undefined?{}:{'first_roster_null_perm_edge':M},...O===undefined?{}:{'coarse_perm_bucket_index':O[0x0],'coarse_perm_bucket_classes':[...O[0x1]]['sort']()['join'](',\x20')},...b9===undefined?{}:{'first_pinned_away_exit_node':b9},'direction_blind_pay_edge_count':bb,...ba===undefined?{}:{'first_direction_blind_pay_edge':ba},...aG===undefined?{}:{'first_path_dependent_anchor':aG},'path_sensitive':aH,...aJ===undefined?{}:{'first_write_only_unenforced_field':aJ},...aL===undefined?{}:{'first_orphan_guard':aL},...aM===undefined?{}:{'first_repo_query_without_repository':aM},'repo_write_once_guard_count':aV,...aU===undefined?{}:{'first_repo_write_once_guard':aU},...aW['length']===0x0?{}:{'write_once_removable_count':aW['length'],'first_write_once_removable':aW[0x0],'write_once_removable_display':aW['join'](';\x20')},'tautology_write_guard_count':b1,...b0===undefined?{}:{'first_tautology_write_guard':b0},'keyed_tautology_write_guard_count':b3,...b2===undefined?{}:{'first_keyed_tautology_write_guard':b2},...b4===undefined?{}:{'first_promise_gap_write_guard':b4},'customer_required_unbacked_count':b6,...b5===undefined?{}:{'first_customer_required_unbacked':b5},...aN===undefined?{}:{'first_edge_guard_missing_254':aN},'node_mismatched_guard_count':b8,...b7===undefined?{}:{'first_node_mismatched_guard':b7},'guard_reach_contradiction_count':bc['length'],...bc['length']>0x0?{'first_guard_reach_contradiction':bc[0x0],'guard_reach_contradiction_display':bc['join'](';\x20')}:{},...guardQualityFacts(bd),...bh['length']>0x0?{'first_guard_find_polarity':bi(bj),'guard_find_polarity_count':bh['length'],...bh['some'](eg=>eg['perPeriodClaim'])?{'guard_find_polarity_per_period':!![]}:{},'guard_find_polarity_display':bh['map'](bi)['join'](';\x20')}:{},...bk['length']>0x0?{'fractional_day_knob_count':bk['length'],'first_fractional_day_knob':bk[0x0],'fractional_day_knob_display':bk['join'](';\x20')}:{},...bl['length']>0x0?{'fractional_hour_knob_count':bl['length'],'first_fractional_hour_knob':bl[0x0],'fractional_hour_knob_display':bl['join'](';\x20')}:{},...aO===undefined?{}:{'first_alloc_slot_missing':aO},...T===undefined?{}:{'first_pending_fund_guard':T,'pending_fund_guard_count':R['length'],'pending_fund_guard_keys_display':R['map'](eg=>eg['key'])['join'](',\x20')},...U===undefined?{}:{'first_pending_buy_guard':U,'pending_buy_guard_count':S['length'],'pending_buy_guard_keys_display':S['map'](eg=>eg['key'])['join'](',\x20')},'has_return_rail':V!==undefined,...V===undefined?{}:{'return_rail_node':V},'has_arbitration_binding':W,'fund_topup_present':Y,...X===undefined?{}:{'fund_topup_amount':X},...a3?{'fund_ceiling_breach':X<MAX_INDEMNITY_MULTIPLE*Z,'fund_ceiling_basis':MAX_INDEMNITY_MULTIPLE+'x\x20the\x20highest\x20SKU\x20price','fund_concurrent_orders_coverable':Math['floor'](X/(MAX_INDEMNITY_MULTIPLE*Z))}:{},'fund_ceiling_unverifiable':Y&&!a3,...ac!==undefined?{'reward_bounty_amount':ac,...ad!==undefined?{'reward_funding_amount':ad}:{},...ad!==undefined&&ac>0x0?{'reward_max_claims':Math['floor'](ad/ac)}:{},...ae?{'lowest_sku_price':a0,'reward_scale_breach':ac>0.5*a0,'reward_scale_ratio_display':(ac/a0)['toFixed'](0x2)+'x\x20the\x20cheapest\x20SKU\x20price'}:{'reward_scale_unverifiable':!![]}}:{},...a6>0x0?{'dead_sku_count':a6,'first_dead_sku_name':a4,'first_dead_sku_bytes':a5}:{},...ai?{'first_arb_exit_node':ah,'fund_arb_route_unfunded':!![]}:{},...am===undefined?{}:{'entry_no_open_exit':!![],'entry_strand_node':am},...ao['length']===0x0?{}:{'window_strand_nodes':ao['join'](',\x20'),'window_strand_count':ao['length']},...as&&at!==undefined?{'arb_promise_without_settle_rail':!![],'arb_promise_node':at}:{},...aq['length']>0x0&&ap&&at!==undefined?{'arb_key_plane_opaque':!![],'arb_key_plane_node':at}:{},...av['length']>0x0?{'prose_window_promise_count':av['length'],'enforced_window_ms_display':[...aw]['sort']((eg,eh)=>eg-eh)['map'](formatMs)['join'](',\x20')||'none',...ax['length']>0x0?{'prose_time_mismatch_count':ax['length'],'first_prose_time_mismatch':ax[0x0]['quote'],'prose_time_mismatch_display':ax['map'](eg=>eg['quote'])['join'](';\x20')}:{}}:{},...ay['length']>0x0?{'unanchored_window_promise_count':ay['length'],'first_unanchored_window_promise':ay[0x0]}:{},...aP['size']>0x0?{'repo_policy_keys_display':[...aP]['join'](',\x20'),...aQ['length']>0x0?{'repo_gate_key_unbacked_count':aQ['length'],'first_repo_gate_key_unbacked':aQ[0x0],'repo_gate_key_unbacked_display':aQ['join'](',\x20')}:{}}:{},...aa['length']>0x0?{'wip_query_totality_count':aa['length'],'first_wip_query_totality':aa[0x0]['guard']+':\x20'+aa[0x0]['query']+'\x20vs\x20\x27'+aa[0x0]['constant']+'\x27','wip_query_totality_display':aa['map'](eg=>eg['guard']+':\x20'+eg['query']+'\x20vs\x20\x27'+eg['constant']+'\x27')['join'](';\x20'),'wip_query_totality_sku_display':[...a8]['join'](',\x20')}:{},...aR['length']>0x0?{'repo_agg_submitted_count':aR['length'],'first_repo_agg_submitted':aR[0x0],'repo_agg_submitted_display':aR['join'](',\x20')}:{},...aS['length']>0x0?{'alloc_overlap_payee_count':aS['length'],'first_alloc_overlap_payee':aS[0x0],'alloc_overlap_payee_display':aS['join'](';\x20')}:{},...az['length']>0x0&&!aA?{'refund_convergence_missing':!![]}:{},...aB>0x0?{'late_remedy_edge_count':aB}:{},...aC['length']>0x0?{'late_remedy_gate_missing':!![],'first_late_remedy_gate_missing':aC[0x0],'late_remedy_gate_missing_display':aC['join'](';\x20')}:{},...z['length']>0x0?{'withdraw_no_case_bind_count':z['length'],'first_withdraw_no_case_bind':z[0x0],'withdraw_no_case_bind_display':z['join'](';\x20')}:{},...B['length']>0x0?{'dispute_freeze_rail_count':B['length'],'dispute_freeze_rail_display':B['join'](';\x20')}:{},...B['length']>0x0&&C['length']>0x0?{'dispute_exit_live_withdraw_count':C['length'],'dispute_exit_live_withdraw_display':C['join'](';\x20'),...E?{'dispute_exit_dead_topology':0x1}:{},...F?{'dispute_exit_indirect_stamp':0x1}:{}}:{},...aD['length']>0x0?{'settlement_triggers_display':aD['join'](';\x20'),...aE>0x0?{'settlement_buyer_only_count':aE}:{}}:{}};}function planRuleBook(){const a=getJudgmentDoc()['rules']['domains']['plan'];if(!a)throw new Error('factory\x20rule\x20pack\x20\x27plan\x27\x20missing\x20—\x20broken\x20installation');return a['rules'];}export function auditPlan(a){const b=validatePlan(a),c=planFacts(a),{findings:d}=evaluateRuleBook(planRuleBook(),c),e=b['length']>0x0||d['some'](g=>g['level']==='critical'||g['level']==='high');return{'issues':b,'findings':d,'facts':c,'blocking':e};}