@wowok/agent-mcp 3.3.3 → 3.3.6

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 (202) hide show
  1. package/dist/chain-semantics/eval-order.d.ts +17 -0
  2. package/dist/chain-semantics/eval-order.js +1 -0
  3. package/dist/chain-semantics/freeze-map.js +1 -1
  4. package/dist/chain-semantics/fund-flow.js +1 -1
  5. package/dist/chain-semantics/index.d.ts +1 -0
  6. package/dist/chain-semantics/index.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.d.ts +4 -1
  10. package/dist/composition/compile.js +1 -1
  11. package/dist/data/api/api.spec.d.ts +1 -0
  12. package/dist/data/api/api.spec.js +1 -0
  13. package/dist/data/api/cli.d.ts +1 -0
  14. package/dist/data/api/cli.js +1 -0
  15. package/dist/data/api/head.d.ts +16 -0
  16. package/dist/data/api/head.js +1 -0
  17. package/dist/data/api/head.spec.d.ts +1 -0
  18. package/dist/data/api/head.spec.js +1 -0
  19. package/dist/data/api/index.d.ts +2 -0
  20. package/dist/data/api/index.js +1 -0
  21. package/dist/data/api/match.d.ts +69 -0
  22. package/dist/data/api/match.js +1 -0
  23. package/dist/data/api/match.spec.d.ts +1 -0
  24. package/dist/data/api/match.spec.js +1 -0
  25. package/dist/data/api/server.d.ts +12 -0
  26. package/dist/data/api/server.js +1 -0
  27. package/dist/data/projection/cli.d.ts +1 -0
  28. package/dist/data/projection/cli.js +1 -0
  29. package/dist/data/projection/edges.d.ts +8 -0
  30. package/dist/data/projection/edges.js +1 -0
  31. package/dist/data/projection/edges.spec.d.ts +1 -0
  32. package/dist/data/projection/edges.spec.js +1 -0
  33. package/dist/data/projection/facets.d.ts +18 -0
  34. package/dist/data/projection/facets.js +1 -0
  35. package/dist/data/projection/facets.spec.d.ts +1 -0
  36. package/dist/data/projection/facets.spec.js +1 -0
  37. package/dist/data/projection/facts.d.ts +40 -0
  38. package/dist/data/projection/facts.js +1 -0
  39. package/dist/data/projection/index.d.ts +6 -0
  40. package/dist/data/projection/index.js +1 -0
  41. package/dist/data/projection/project.d.ts +10 -0
  42. package/dist/data/projection/project.js +1 -0
  43. package/dist/data/projection/projection.spec.d.ts +1 -0
  44. package/dist/data/projection/projection.spec.js +1 -0
  45. package/dist/data/projection/schema.d.ts +1 -0
  46. package/dist/data/projection/schema.js +1 -0
  47. package/dist/data/projection/store.d.ts +49 -0
  48. package/dist/data/projection/store.js +1 -0
  49. package/dist/data/projection/types.d.ts +137 -0
  50. package/dist/data/projection/types.js +1 -0
  51. package/dist/data/sync/cdc.d.ts +34 -0
  52. package/dist/data/sync/cdc.js +1 -0
  53. package/dist/data/sync/cdc.spec.d.ts +1 -0
  54. package/dist/data/sync/cdc.spec.js +1 -0
  55. package/dist/data/sync/graphql-source.d.ts +16 -0
  56. package/dist/data/sync/graphql-source.js +1 -0
  57. package/dist/data/sync/index.d.ts +5 -0
  58. package/dist/data/sync/index.js +1 -0
  59. package/dist/data/sync/reconciler.d.ts +14 -0
  60. package/dist/data/sync/reconciler.js +1 -0
  61. package/dist/data/sync/reconciler.spec.d.ts +1 -0
  62. package/dist/data/sync/reconciler.spec.js +1 -0
  63. package/dist/data/sync/schema.d.ts +1 -0
  64. package/dist/data/sync/schema.js +1 -0
  65. package/dist/data/sync/store.d.ts +19 -0
  66. package/dist/data/sync/store.js +1 -0
  67. package/dist/data/sync/sync.spec.d.ts +1 -0
  68. package/dist/data/sync/sync.spec.js +1 -0
  69. package/dist/data/sync/synchronizer.d.ts +10 -0
  70. package/dist/data/sync/synchronizer.js +1 -0
  71. package/dist/data/sync/types.d.ts +162 -0
  72. package/dist/data/sync/types.js +1 -0
  73. package/dist/evaluation/builtins/demand-match.js +1 -1
  74. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  75. package/dist/evaluation/capability.d.ts +1 -0
  76. package/dist/evaluation/engine.js +1 -1
  77. package/dist/evaluation/extract.d.ts +7 -1
  78. package/dist/evaluation/extract.js +1 -1
  79. package/dist/evaluation/match-policy.d.ts +118 -0
  80. package/dist/evaluation/match-policy.js +1 -0
  81. package/dist/evaluation/match-policy.spec.d.ts +1 -0
  82. package/dist/evaluation/match-policy.spec.js +1 -0
  83. package/dist/evaluation/node-game.d.ts +3 -0
  84. package/dist/evaluation/node-game.js +1 -1
  85. package/dist/experience/realtime-feedback.js +1 -1
  86. package/dist/graph/onchain/expand.js +1 -1
  87. package/dist/graph/onchain/exposure.js +1 -1
  88. package/dist/harness/recover.js +1 -1
  89. package/dist/knowledge/arbitration-ledger.js +1 -1
  90. package/dist/knowledge/baselines/rules/plan.json +16 -1
  91. package/dist/knowledge/builtin-templates.d.ts +1 -1
  92. package/dist/knowledge/builtin-templates.js +1 -1
  93. package/dist/knowledge/getting-started.js +1 -1
  94. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  95. package/dist/knowledge/guard-design-patterns.js +1 -1
  96. package/dist/knowledge/guard-ledger.js +1 -1
  97. package/dist/knowledge/guard-puzzle.js +1 -1
  98. package/dist/knowledge/guard-render.js +1 -1
  99. package/dist/knowledge/guard-risk.js +1 -1
  100. package/dist/knowledge/guard-templates.d.ts +1 -1
  101. package/dist/knowledge/guard-templates.js +1 -1
  102. package/dist/knowledge/guard-translation.js +1 -1
  103. package/dist/knowledge/index.js +1 -1
  104. package/dist/knowledge/industry-registry.js +1 -1
  105. package/dist/knowledge/jsonrpc-enum.d.ts +26 -10
  106. package/dist/knowledge/jsonrpc-enum.js +1 -1
  107. package/dist/knowledge/projection.d.ts +54 -0
  108. package/dist/knowledge/projection.js +1 -0
  109. package/dist/knowledge/projection.spec.d.ts +1 -0
  110. package/dist/knowledge/projection.spec.js +1 -0
  111. package/dist/knowledge/recipient-constraint.d.ts +9 -0
  112. package/dist/knowledge/recipient-constraint.js +1 -1
  113. package/dist/knowledge/scenario-modes.d.ts +1 -0
  114. package/dist/knowledge/service-ledger.d.ts +1 -1
  115. package/dist/knowledge/service-ledger.js +1 -1
  116. package/dist/knowledge/template-loader.d.ts +1 -0
  117. package/dist/knowledge/template-loader.js +1 -1
  118. package/dist/knowledge/template-registry.js +1 -1
  119. package/dist/knowledge/template-scanner.js +1 -1
  120. package/dist/monitor/MonitorLoop.js +1 -1
  121. package/dist/participation/node-action-advisor.js +1 -1
  122. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  123. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  124. package/dist/playbooks/service-build/object-panorama.js +1 -1
  125. package/dist/playbooks/service-build/participation-radar.js +1 -1
  126. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  127. package/dist/playbooks/service-build/service-panorama.js +1 -1
  128. package/dist/playbooks/service-build/service-quote.js +1 -1
  129. package/dist/playbooks/service-build/service-quote.spec.js +1 -1
  130. package/dist/review/index.js +1 -1
  131. package/dist/role/profiles.js +1 -1
  132. package/dist/safety/confirm-gate.js +1 -1
  133. package/dist/schema/call/allocation.js +1 -1
  134. package/dist/schema/call/base.d.ts +25 -0
  135. package/dist/schema/call/base.js +1 -1
  136. package/dist/schema/call/bridge.d.ts +1 -0
  137. package/dist/schema/call/error-codes.d.ts +1 -1
  138. package/dist/schema/call/error-codes.js +1 -1
  139. package/dist/schema/call/handler.js +1 -1
  140. package/dist/schema/call/order.d.ts +12 -0
  141. package/dist/schema/call/order.js +1 -1
  142. package/dist/schema/call/progress.js +1 -1
  143. package/dist/schema/call/proof.js +1 -1
  144. package/dist/schema/call/semantic.js +1 -1
  145. package/dist/schema/call/service.js +1 -1
  146. package/dist/schema/common/index.js +1 -1
  147. package/dist/schema/evaluation/index.d.ts +189 -0
  148. package/dist/schema/evaluation/index.js +1 -1
  149. package/dist/schema/local/index.d.ts +10 -0
  150. package/dist/schema/local/index.js +1 -1
  151. package/dist/schema/operations.d.ts +4 -0
  152. package/dist/schema/query/bi.d.ts +8 -0
  153. package/dist/schema/query/bi.js +1 -1
  154. package/dist/schema/query/index.d.ts +147 -0
  155. package/dist/schema/query/index.js +1 -1
  156. package/dist/schema/schema-version.js +1 -1
  157. package/dist/schema-query-impl/index.js +1 -1
  158. package/dist/schemas/account_operation.output.json +2 -1
  159. package/dist/schemas/bridge_operation.output.json +2 -1
  160. package/dist/schemas/evaluation_operation.output.json +384 -2
  161. package/dist/schemas/evaluation_operation.schema.json +202 -4
  162. package/dist/schemas/index.json +1 -1
  163. package/dist/schemas/keeper_operation.output.json +1 -1
  164. package/dist/schemas/local_cache_operation.output.json +2 -1
  165. package/dist/schemas/local_history_operation.output.json +2 -1
  166. package/dist/schemas/local_info_operation.output.json +2 -1
  167. package/dist/schemas/local_mark_operation.output.json +2 -1
  168. package/dist/schemas/messenger_operation.output.json +1 -1
  169. package/dist/schemas/monitor_events.output.json +1 -1
  170. package/dist/schemas/monitor_subscription.output.json +1 -1
  171. package/dist/schemas/onchain_events.output.json +1 -1
  172. package/dist/schemas/onchain_operations.output.json +35 -4
  173. package/dist/schemas/onchain_operations.schema.json +687 -103
  174. package/dist/schemas/onchain_operations_allocation.schema.json +1 -1
  175. package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
  176. package/dist/schemas/onchain_operations_guard.schema.json +660 -94
  177. package/dist/schemas/onchain_operations_order.schema.json +19 -1
  178. package/dist/schemas/onchain_operations_progress.schema.json +2 -2
  179. package/dist/schemas/onchain_operations_service.schema.json +4 -4
  180. package/dist/schemas/onchain_table_data.output.json +2 -2
  181. package/dist/schemas/query_toolkit.output.json +316 -1
  182. package/dist/schemas/query_toolkit.schema.json +1 -1
  183. package/dist/schemas/wowok_buildin_info.output.json +259 -0
  184. package/dist/schemas/wowok_buildin_info.schema.json +121 -0
  185. package/dist/tools/build-fingerprint.d.ts +28 -0
  186. package/dist/tools/build-fingerprint.js +1 -0
  187. package/dist/tools/handlers/benchmark-migration.d.ts +4 -2
  188. package/dist/tools/handlers/benchmark-migration.js +1 -1
  189. package/dist/tools/handlers/config.js +1 -1
  190. package/dist/tools/handlers/evaluation.js +1 -1
  191. package/dist/tools/handlers/evaluation.spec.js +1 -1
  192. package/dist/tools/handlers/onchain.d.ts +7 -0
  193. package/dist/tools/handlers/onchain.js +1 -1
  194. package/dist/tools/handlers/query.js +1 -1
  195. package/dist/tools/handlers/review-chain.d.ts +9 -13
  196. package/dist/tools/handlers/review-chain.js +1 -1
  197. package/dist/tools/index.js +1 -1
  198. package/dist/tools/registry/business.js +1 -1
  199. package/dist/tools/upgrade-check.d.ts +1 -0
  200. package/dist/tools/upgrade-check.js +1 -1
  201. package/dist/tools/wrap.js +1 -1
  202. package/package.json +7 -2
@@ -1 +1 @@
1
- import{MAX_SUBMISSION_SIZE_PASSPORT}from'@wowok/wowok';export const SEMANTIC_TO_SCHEMA_RULES=[{'id':'P02','pattern_name':'Query\x20published\x20object\x20+\x20system\x20context','data_source_combination':'Type1\x20+\x20Type4','semantic_intent':'Query\x20published\x20on-chain\x20object\x20fields\x20and\x20compare\x20with\x20system\x20context','match_keywords':['paused','published','service\x20status','machine\x20status','paused','published'],'schema_elements':{'root_type':'logic_equal\x20/\x20logic_and','table_entries':[{'value_type':'Address','b_submission':![],'purpose':'Published\x20object\x20address\x20constant\x20(Type1)'}],'context_nodes':[{'context_type':'Signer','purpose':'Optional:\x20identity\x20validation'}],'tree_structure':'logic_equal(query(<instruction>,\x20object:\x20{\x20identifier:\x200\x20}),\x20identifier[1]\x20or\x20context(Signer))'},'constraints':['The\x20object_type\x20of\x20table[0]\x20must\x20match\x20the\x20target\x20object\x20type\x20of\x20the\x20query\x20instruction','The\x20query\x20return\x20type\x20must\x20be\x20compatible\x20with\x20the\x20comparison\x20object','The\x20object\x20must\x20be\x20published\x20(published=true)\x20to\x20ensure\x20fields\x20are\x20immutable'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'query','query':'service.paused','object':{'identifier':0x0},'parameters':[]},{'type':'identifier','identifier':0x1}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':'0xSERVICE','name':'Service\x20object\x20address'},{'identifier':0x1,'b_submission':![],'value_type':'Bool','value':![],'name':'Expected\x20paused\x20state\x20(false=not\x20paused)'}]}},{'id':'P03','pattern_name':'Identity\x20check\x20(single\x20address)','data_source_combination':'Type4\x20+\x20Type1\x20constant','semantic_intent':'Only\x20a\x20specific\x20address\x20can\x20perform\x20the\x20operation','match_keywords':['only','allow','authorize','identity','specified\x20address','signer'],'schema_elements':{'root_type':'logic_equal','table_entries':[{'value_type':'Address','b_submission':![],'purpose':'Authorized\x20address\x20constant\x20(Type1\x20constant)'}],'context_nodes':[{'context_type':'Signer','purpose':'Current\x20transaction\x20signer\x20(Type4)'}],'tree_structure':'logic_equal(context(Signer),\x20identifier[0])'},'constraints':['root\x20must\x20be\x20logic_equal\x20(returns\x20Bool)','table[0]\x20must\x20be\x20Address\x20type,\x20b_submission=false','context(Signer)\x20returns\x20the\x20current\x20transaction\x20signer\x20address'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'context','context':'Signer'},{'type':'identifier','identifier':0x0}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':'0xabc...','name':'Authorized\x20operator\x20address'}]}},{'id':'P04','pattern_name':'Identity\x20check\x20(whitelist)','data_source_combination':'Type4\x20+\x20Type1\x20constant\x20(VecAddress)','semantic_intent':'Addresses\x20in\x20the\x20whitelist\x20can\x20perform\x20this\x20operation','match_keywords':['whitelist','multiple\x20addresses','list','allowlist','roster'],'schema_elements':{'root_type':'vec_contains_address','table_entries':[{'value_type':'VecAddress','b_submission':![],'purpose':'Authorized\x20address\x20list\x20(Type1\x20constant)'}],'context_nodes':[{'context_type':'Signer','purpose':'Signer\x20being\x20looked\x20up\x20(Type4)'}],'tree_structure':'vec_contains_address(identifier[0],\x20context(Signer))'},'constraints':['root\x20vec_contains_address\x20returns\x20Bool','table[0]\x20must\x20be\x20VecAddress\x20type','context(Signer)\x20is\x20the\x20element\x20being\x20looked\x20up'],'example':{'root':{'type':'vec_contains_address','nodes':[{'type':'identifier','identifier':0x0},{'type':'context','context':'Signer'}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'VecAddress','value':['0xabc...','0xdef...'],'name':'Authorized\x20address\x20whitelist'}]}},{'id':'P05a','pattern_name':'Deadline\x20passed\x20(lower-bound\x20time\x20lock)','data_source_combination':'Type2\x20+\x20Type4\x20+\x20Type1\x20constant','semantic_intent':'This\x20operation\x20becomes\x20available\x20once\x20N\x20milliseconds\x20have\x20elapsed\x20since\x20the\x20current\x20node\x20was\x20entered.\x20'+'This\x20is\x20a\x20LOWER\x20bound\x20and\x20stays\x20true\x20forever\x20—\x20it\x20is\x20NOT\x20a\x20window\x20and\x20needs\x20no\x20upper\x20bound.','match_keywords':['wait','time','lock','delay','hours','days','milliseconds','after\x20delivery','cooldown','cooling'],'schema_elements':{'root_type':'logic_as_u256_greater_or_equal','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Source\x20object\x20address\x20(e.g.\x20Order,\x20Type3)\x20or\x20constant\x20(Type1)'},{'value_type':'U64','b_submission':![],'purpose':'Lock\x20duration\x20(in\x20milliseconds,\x201000\x20for\x20tests,\x20Type1\x20constant)'}],'query_nodes':[{'query_name':'progress.current_time','object_type':'Progress','convert_witness':0x64}],'context_nodes':[{'context_type':'Clock','purpose':'Current\x20on-chain\x20timestamp\x20(Type4)'}],'tree_structure':'logic_as_u256_greater_or_equal(context(Clock),\x20calc_number_add(query(1272:\x20progress.current_time,\x20witness=100,\x20identifier[0]),\x20identifier[1]))'},'constraints':['Time\x20unit\x20is\x20milliseconds;\x20use\x201000ms\x20for\x20tests\x20and\x20adjust\x20in\x20production','convert_witness=100\x20(TypeOrderProgress)\x20converts\x20from\x20Order\x20to\x20Progress','The\x20object_type\x20of\x20table[0]\x20must\x20match\x20the\x20witness\x20source\x20type\x20(Order)','calc_number_add\x20returns\x20U256,\x20context(Clock)\x20returns\x20U64,\x20auto-widened','Key:\x20use\x20progress.current_time(1272)\x20rather\x20than\x20progress.session.forward.time(1271);\x20the\x20latter\x20querying\x20an\x20unforwarded\x20session\x20returns\x200\x20and\x20disables\x20the\x20time\x20lock','CRITICAL\x20—\x20progress.current_time\x20is\x20REFRESHED\x20on\x20every\x20forward.\x20If\x20this\x20guard\x20is\x20attached\x20to\x20a\x20forward\x20that\x20also\x20changes\x20the\x20node,\x20the\x20clock\x20restarts\x20from\x20the\x20node\x20change,\x20so\x20a\x20post-transition\x20guard\x20(e.g.\x20a\x20settlement\x20allocator)\x20waits\x20its\x20full\x20duration\x20AGAIN\x20after\x20the\x20transition','Use\x20this\x20pattern\x20when\x20the\x20intent\x20is\x20\x27no\x20earlier\x20than\x20T+K\x27\x20(return\x20window\x20opening,\x20dispute\x20filing,\x20auto-settlement).\x20Do\x20NOT\x20add\x20a\x20`<=`\x20clause\x20with\x20the\x20same\x20right-hand\x20side\x20—\x20see\x20P05b'],'example':{'root':{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'calc_number_add','nodes':[{'type':'query','query':'progress.current_time','object':{'identifier':0x0,'convert_witness':0x64},'parameters':[]},{'type':'identifier','identifier':0x1}]}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'Target\x20Order\x20address','object_type':'Order'},{'identifier':0x1,'b_submission':![],'value_type':'U64','value':0x3e8,'name':'Lock\x20duration\x20(milliseconds)'}]}},{'id':'P05b','pattern_name':'Window\x20open\x20(two-sided\x20time\x20window)','data_source_combination':'Type2\x20+\x20Type4\x20+\x20Type1\x20constant','semantic_intent':'This\x20operation\x20is\x20only\x20available\x20WITHIN\x20a\x20window\x20that\x20opened\x20at\x20t\x20and\x20closes\x20at\x20t+K.\x20'+'Both\x20bounds\x20are\x20required,\x20and\x20the\x20two\x20right-hand\x20sides\x20MUST\x20differ.','match_keywords':['window','within','valid\x20until','expire','expiry','grace\x20period','only\x20before'],'schema_elements':{'root_type':'logic_and','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Source\x20object\x20address\x20(e.g.\x20Order,\x20Type3)\x20or\x20constant\x20(Type1)'},{'value_type':'U64','b_submission':![],'purpose':'Window\x20length\x20in\x20milliseconds\x20(Type1\x20constant)'}],'query_nodes':[{'query_name':'progress.current_time','object_type':'Progress','convert_witness':0x64}],'context_nodes':[{'context_type':'Clock','purpose':'Current\x20on-chain\x20timestamp\x20(Type4)'}],'tree_structure':'logic_and(\x20logic_as_u256_greater_or_equal(context(Clock),\x20query(1272:\x20progress.current_time,\x20witness=100,\x20identifier[0])),\x20'+'logic_as_u256_lesser_or_equal(context(Clock),\x20calc_number_add(query(1272:\x20progress.current_time,\x20witness=100,\x20identifier[0]),\x20identifier[1]))\x20)'},'constraints':['The\x20two\x20right-hand\x20sides\x20MUST\x20be\x20structurally\x20different:\x20lower\x20bound\x20uses\x20`t`\x20alone,\x20upper\x20bound\x20uses\x20`t\x20+\x20K`','NEVER\x20write\x20`L\x20>=\x20(t+K)`\x20together\x20with\x20`L\x20<=\x20(t+K)`\x20—\x20that\x20conjunction\x20is\x20`L\x20==\x20t+K`,\x20an\x20~1\x20ms\x20window\x20on\x20a\x20millisecond\x20Clock,\x20and\x20the\x20guarded\x20forward\x20becomes\x20unreachable\x20(lint\x20rule\x20LE-08\x20/\x20R-TIMEWINDOW-DEGENERATE\x20flags\x20it)','`logic_as_u256_greater_or_equal`\x20is\x20a\x20lower\x20bound\x20ONLY.\x20Adding\x20it\x20does\x20not\x20\x27cap\x27\x20anything\x20—\x20a\x20common\x20misreading\x20that\x20produced\x20the\x20P0-1\x20outage\x20in\x20wiki/test/10','The\x20lower\x20bound\x20`L\x20>=\x20t`\x20is\x20usually\x20redundant\x20because\x20progress.current_time\x20<=\x20Clock\x20always\x20holds;\x20keep\x20it\x20only\x20for\x20explicitness','Time\x20unit\x20is\x20milliseconds'],'example':{'root':{'type':'logic_and','nodes':[{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'query','query':'progress.current_time','object':{'identifier':0x0,'convert_witness':0x64},'parameters':[]}]},{'type':'logic_as_u256_lesser_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'calc_number_add','nodes':[{'type':'query','query':'progress.current_time','object':{'identifier':0x0,'convert_witness':0x64},'parameters':[]},{'type':'identifier','identifier':0x1}]}]}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'Target\x20Order\x20address','object_type':'Order'},{'identifier':0x1,'b_submission':![],'value_type':'U64','value':0x3e8,'name':'Window\x20length\x20(milliseconds)'}]}},{'id':'P06','pattern_name':'Progress\x20state\x20check','data_source_combination':'Type2\x20+\x20Type1\x20constant','semantic_intent':'The\x20order\x20progress\x20must\x20reach\x20the\x20specified\x20node\x20before\x20this\x20operation\x20can\x20be\x20executed','match_keywords':['progress','node','state','completed','reach','current\x20node'],'schema_elements':{'root_type':'logic_equal','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Source\x20Order\x20address\x20(Type3,\x20witness\x20source)'},{'value_type':'String','b_submission':![],'purpose':'Expected\x20node\x20name\x20(Type1\x20constant)'}],'query_nodes':[{'query_name':'progress.current','object_type':'Progress','convert_witness':0x64}],'tree_structure':'logic_equal(query(1253:\x20progress.current,\x20witness=100,\x20identifier[0]),\x20identifier[1])'},'constraints':['query\x20returns\x20String;\x20identifier[1]\x20must\x20be\x20String\x20type','logic_equal\x20comparison\x20on\x20String\x20is\x20case-sensitive','For\x20case-insensitive\x20comparison,\x20use\x20logic_string_nocase_equal','convert_witness=100\x20(TypeOrderProgress)\x20converts\x20from\x20Order','Type2\x20stacks\x20on\x20Type3:\x20the\x20source\x20object\x20Order\x20is\x20submitted\x20(b_submission=true)'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'query','query':'progress.current','object':{'identifier':0x0,'convert_witness':0x64},'parameters':[]},{'type':'identifier','identifier':0x1}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'Target\x20Order\x20address','object_type':'Order'},{'identifier':0x1,'b_submission':![],'value_type':'String','value':'Completed','name':'Expected\x20progress\x20node\x20name'}]}},{'id':'P07','pattern_name':'One-time\x20claim\x20check','data_source_combination':'Type3\x20+\x20Type1\x20constant','semantic_intent':'Users\x20can\x20only\x20claim\x20the\x20reward\x20once','match_keywords':['once','claim','duplicate','already\x20claimed','claimed\x20before'],'schema_elements':{'root_type':'logic_equal','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Reward\x20object\x20address\x20(Type3,\x20submitted)'},{'value_type':'U64','b_submission':![],'purpose':'Expected\x20historical\x20claim\x20count\x200\x20(Type1\x20constant)'}],'query_nodes':[{'query_name':'reward.record.count','object_type':'Reward'}],'tree_structure':'logic_equal(query_reward_record_count(object:\x20{\x20identifier:\x200\x20},\x20recipient:\x20context(Signer)),\x20identifier[1])'},'constraints':['query_reward_record_count\x20returns\x20U64','Comparing\x20count\x20==\x200\x20means\x20no\x20history\x20record\x20(can\x20claim)','recipient\x20defaults\x20to\x20context(Signer)\x20to\x20ensure\x20the\x20claimer\x27s\x20identity\x20is\x20bound','Type3\x20submitted\x20objects\x20must\x20have\x20constraint\x20rules\x20(here\x20the\x20constraint\x20is\x20count==0\x20and\x20recipient=Signer)'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'query_reward_record_count','object':{'identifier':0x0}},{'type':'identifier','identifier':0x1}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'Reward\x20object\x20address','object_type':'Reward'},{'identifier':0x1,'b_submission':![],'value_type':'U64','value':0x0,'name':'Expected\x20historical\x20claim\x20count\x20(0)'}]}},{'id':'P08','pattern_name':'Submitted\x20object\x20identity\x20validation','data_source_combination':'Type3\x20+\x20Type4','semantic_intent':'Verify\x20that\x20the\x20owner\x20of\x20the\x20submitted\x20object\x20matches\x20the\x20signer','match_keywords':['ownership','belonging','customer','submitted\x20object','order.customer'],'schema_elements':{'root_type':'logic_equal','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Submitted\x20Order\x20address\x20(Type3)'}],'context_nodes':[{'context_type':'Signer','purpose':'Current\x20signer\x20(Type4),\x20compared\x20with\x20order.customer'}],'query_nodes':[{'query_name':'order.customer','object_type':'Order'}],'tree_structure':'logic_equal(query(1550:\x20order.customer,\x20object:\x20{\x20identifier:\x200\x20}),\x20context(Signer))'},'constraints':['query\x20returns\x20Address,\x20context(Signer)\x20returns\x20Address,\x20types\x20compatible','Type3\x20submitted\x20object\x20constraint:\x20indirectly\x20binds\x20submitter\x20identity\x20via\x20order.customer\x20==\x20Signer','Ensures\x20callers\x20cannot\x20submit\x20other\x20users\x27\x20Order\x20addresses'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'query','query':'order.customer','object':{'identifier':0x0},'parameters':[]},{'type':'context','context':'Signer'}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'User-submitted\x20Order\x20address','object_type':'Order'}]}},{'id':'P09','pattern_name':'Submitted\x20object\x20+\x20witness\x20derivation\x20query','data_source_combination':'Type3\x20+\x20Type2\x20(source\x20is\x20Type3)','semantic_intent':'User\x20submits\x20an\x20Order\x20and\x20queries\x20the\x20Progress\x20state\x20via\x20witness','match_keywords':['submit','derive','witness','order\x20to\x20progress','convert'],'schema_elements':{'root_type':'logic_equal\x20/\x20logic_and','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Submitted\x20Order\x20address\x20(Type3,\x20witness\x20source)'},{'value_type':'String','b_submission':![],'purpose':'Expected\x20node\x20name\x20(Type1\x20constant)'}],'query_nodes':[{'query_name':'progress.current','object_type':'Progress','convert_witness':0x64}],'tree_structure':'logic_equal(query(1253:\x20progress.current,\x20object:\x20{\x20identifier:\x200,\x20convert_witness:\x20100\x20}),\x20identifier[1])'},'constraints':['Type2\x20stacks\x20on\x20Type3:\x20the\x20source\x20object\x20Order\x20has\x20b_submission=true','witness=100\x20(TypeOrderProgress)\x20derives\x20Progress\x20from\x20the\x20submitted\x20Order','query\x20returns\x20String;\x20identifier[1]\x20must\x20be\x20String\x20type','Key:\x20Type2\x20can\x20stack\x20on\x20Type1\x20or\x20Type3,\x20depending\x20on\x20the\x20source\x20object\x27s\x20b_submission'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'query','query':'progress.current','object':{'identifier':0x0,'convert_witness':0x64},'parameters':[]},{'type':'identifier','identifier':0x1}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'User-submitted\x20Order\x20address','object_type':'Order'},{'identifier':0x1,'b_submission':![],'value_type':'String','value':'Inspecting','name':'Expected\x20progress\x20node\x20name'}]}},{'id':'P10','pattern_name':'Multi-condition\x20combination\x20(AND/OR)','data_source_combination':'Type1\x20+\x20Type2\x20+\x20Type3\x20+\x20Type4\x20(combination)','semantic_intent':'Multiple\x20conditions\x20must\x20all\x20be\x20satisfied\x20(AND)\x20or\x20any\x20one\x20is\x20satisfied\x20(OR)','match_keywords':['and','simultaneously','all\x20satisfied','AND','and\x20also','also\x20need','or','any','OR','or','one\x20of'],'schema_elements':{'root_type':'logic_and\x20/\x20logic_or','table_entries':[],'tree_structure':'logic_and/logic_or([condition1,\x20condition2,\x20...])\x20—\x20each\x20condition\x20can\x20be\x20any\x20combination\x20of\x20P03-P09'},'constraints':['All\x20subnodes\x20of\x20logic_and/logic_or\x20must\x20return\x20Bool','Subnode\x20count\x202-8\x20(MAX_MULTI_OPERANDS)','Each\x20subcondition\x20can\x20be\x20any\x20node\x20that\x20returns\x20Bool','Multi-condition\x20combination\x20is\x20a\x20container\x20for\x20other\x20Patterns\x20and\x20does\x20not\x20stand\x20alone'],'example':{'root':{'type':'logic_and','nodes':[{},{}]}}},{'id':'P11','pattern_name':'Entity\x20registration\x20check','data_source_combination':'Type1\x20system\x20address\x20+\x20Type3','semantic_intent':'Verify\x20that\x20the\x20user\x20is\x20registered\x20in\x20the\x20entity\x20registrar','match_keywords':['register','entity','EntityRegistrar','member','certify'],'schema_elements':{'root_type':'logic_and','table_entries':[{'value_type':'Address','b_submission':![],'purpose':'EntityRegistrar\x20system\x20address\x200xaab\x20(Type1\x20system\x20address)'},{'value_type':'Address','b_submission':!![],'purpose':'User\x20address\x20(Type3,\x20submitted)'}],'query_nodes':[{'query_name':'entity.registrar.records','object_type':'EntityRegistrar'}],'tree_structure':'logic_and(query(1760:\x20entity.registrar.records,\x20object:\x20{\x20identifier:\x200\x20},\x20parameters:\x20[identifier[1]]),\x20...)'},'constraints':['EntityRegistrar\x20address\x20is\x20fixed\x20at\x200xaab\x20(system\x20address)','EntityLinker\x20address\x20is\x20fixed\x20at\x200xaaa','table[0]\x20has\x20is_system_address=true','query\x20parameters\x20must\x20match\x20the\x20instruction\x20definition'],'example':{'root':{'type':'logic_and','nodes':[{'type':'query','query':'entity.registrar.records','object':{'identifier':0x0},'parameters':[{'type':'identifier','identifier':0x1}]}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':'0xaab','name':'EntityRegistrar\x20system\x20address'},{'identifier':0x1,'b_submission':!![],'value_type':'Address','name':'User\x20address\x20(submitted)'}]}},{'id':'P12','pattern_name':'Dynamic\x20voting\x20weight','data_source_combination':'Type3\x20+\x20Type4\x20+\x20Type1\x20constant','semantic_intent':'Voting\x20weight\x20equals\x20the\x20reputation\x20score\x20(extracted\x20from\x20submitted\x20data)','match_keywords':['weight','vote','reputation','score','voting','weight'],'schema_elements':{'root_type':'logic_and','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Voter\x20address\x20(Type3)'},{'value_type':'U64','b_submission':!![],'purpose':'Voter\x20weight\x20(Type3,\x20extracted\x20by\x20GuardIdentifier)'}],'context_nodes':[{'context_type':'Signer','purpose':'Validate\x20voter\x20identity\x20(Type4)'}],'query_nodes':[{'query_name':'entity.registrar.records','object_type':'EntityRegistrar'}],'tree_structure':'logic_and(identity\x20check:\x20logic_equal(context(Signer),\x20identifier[0]),\x20weight\x20comparison:\x20GuardIdentifier\x20extracts\x20identifier[1])'},'constraints':['The\x20table\x20entry\x20referenced\x20by\x20GuardIdentifier\x20must\x20be\x20numeric\x20(U8-U256)','b_submission\x20must\x20be\x20true\x20(weight\x20is\x20submitted\x20at\x20runtime\x20by\x20the\x20voter)','Non-numeric\x20types\x20cause\x20E_GUARD_IDENTIFIER_NOT_NUMBER\x20error','Weight\x20value\x20is\x20cast\x20to\x20u32','voting_guard\x20scene\x20special\x20constraint:\x20GuardIdentifier\x20numeric'],'example':{'root':{'type':'logic_and','nodes':[{},{}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'Voter\x20address'},{'identifier':0x1,'b_submission':!![],'value_type':'U64','name':'Voter\x20weight\x20(extracted\x20from\x20reputation\x20score)'}]}},{'id':'P13','pattern_name':'Repository\x20data\x20query','data_source_combination':'Type1\x20+\x20Type2','semantic_intent':'Query\x20Repository\x20data\x20and\x20validate','match_keywords':['Repository','storage','data\x20source','weather','external\x20data','oracle'],'schema_elements':{'root_type':'logic_and','table_entries':[{'value_type':'Address','b_submission':![],'purpose':'Repository\x20address\x20(Type1\x20constant)'}],'query_nodes':[{'query_name':'repository.data','object_type':'Repository'}],'tree_structure':'logic_and(query(1167:\x20repository.data,\x20object:\x20{\x20identifier:\x200\x20},\x20parameters:\x20[...]),\x20[data\x20validation\x20condition])'},'constraints':['quote_guard\x20is\x20a\x20RIGID\x20verification\x20requirement:\x20any\x20guard\x20querying\x20Repository\x20data\x20with\x20quote_guard\x20must\x20satisfy\x20it','Two-phase:\x20passport\x20generation\x20scans/prepares\x20quote_guard,\x20passport\x20verification\x20re-checks\x20+\x20verifies\x20(see\x20R-X1-10)','If\x20quote_guard==None:\x20no\x20access\x20control\x20—\x20Repository\x20data\x20is\x20freely\x20queryable','rep\x20semantics:\x20repository.data\x20query\x20does\x20not\x20depend\x20on\x20runtime\x20submission,\x20so\x20rep=true'],'example':{'root':{'type':'logic_and','nodes':[{'type':'query','query':'repository.data','object':{'identifier':0x0},'parameters':[{'type':'identifier','identifier':0x1}]},{}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':'0xREPO','name':'Repository\x20address'}]}},{'id':'P14','pattern_name':'Pure\x20dependency\x20combination','data_source_combination':'None\x20(rely\x20only)','semantic_intent':'Does\x20not\x20compute\x20itself;\x20fully\x20depends\x20on\x20the\x20results\x20of\x20other\x20Guards','match_keywords':['depend','combine','reuse','rely','delegate'],'schema_elements':{'root_type':'logic_and\x20/\x20logic_or\x20(minimized\x20tautology)','table_entries':[],'tree_structure':'root:\x20minimized\x20(e.g.\x20context(Clock)\x20>=\x200,\x20tautology)\x20+\x20rely:\x20{\x20guards:\x20[...],\x20logic_or:\x20false\x20}'},'constraints':['Depended-on\x20Guards\x20must\x20have\x20rep=true\x20(repository.data\x20query\x20does\x20not\x20depend\x20on\x20runtime\x20submission)','rely.guards\x20supports\x20at\x20most\x204\x20(MAX_DEPENDED_COUNT)','Self-reference\x20is\x20forbidden','AND\x20logic:\x20all\x20dependencies\x20must\x20pass;\x20OR\x20logic:\x20any\x20one\x20passing\x20is\x20sufficient'],'example':{'root':{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'identifier','identifier':0x0}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'U64','value':0x0,'name':'Tautology\x20baseline\x20value\x20(0)'}],'rely':{'guards':['guard_a','guard_b'],'logic_or':![]}}},{'id':'P15','pattern_name':'Submission\x20data\x20retention\x20pattern\x20(retained_submission)','data_source_combination':'Type3\x20+\x20Type4\x20(submission\x20+\x20system\x20context\x20binding)','semantic_intent':'Guard\x20accepts\x20runtime-submitted\x20data\x20but\x20ensures\x20it\x20is\x20trustworthy\x20via\x20Signer\x20binding\x20and\x20type\x20checking','match_keywords':['submit','retain','retained','submission','bind\x20signer','submission\x20check'],'schema_elements':{'root_type':'logic_and','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Submitted\x20object\x20address\x20(Type3,\x20requires\x20Signer\x20binding)'},{'value_type':'U256','b_submission':!![],'purpose':'Submitted\x20numeric\x20value\x20(e.g.\x20amount,\x20weight,\x20requires\x20range\x20check)'}],'context_nodes':[{'context_type':'Signer','purpose':'Validate\x20submitter\x20identity\x20to\x20ensure\x20submission\x20data\x20ownership'}],'tree_structure':'logic_and(logic_equal(context(Signer),\x20query(...,\x20signer_field)),\x20logic_as_u256_greater_or_equal(identifier[1],\x20identifier[2]))'},'constraints':['The\x20name\x20of\x20each\x20b_submission=true\x20entry\x20must\x20be\x20a\x20complete\x20natural-language\x20description\x20(not\x20a\x20technical\x20identifier)','The\x20submitted\x20object\x20address\x20should\x20be\x20bound\x20to\x20Signer\x20(query\x20the\x20signer/owner\x20field\x20of\x20the\x20submitted\x20object\x20to\x20validate\x20ownership)','Submitted\x20numeric\x20values\x20should\x20have\x20range\x20checks\x20(>=\x20min,\x20<=\x20max)','Total\x20table\x20size\x20must\x20not\x20exceed\x2040000\x20bytes','Total\x20submission\x20bytes\x20must\x20not\x20exceed\x20'+MAX_SUBMISSION_SIZE_PASSPORT],'example':{'root':{'type':'logic_and','nodes':[{'type':'logic_equal','nodes':[{'type':'context','context':'Signer'},{'type':'query','query':0x4d5,'object':{'identifier':0x0},'parameters':[]}]},{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'identifier','identifier':0x1},{'type':'identifier','identifier':0x2}]}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'Submitted\x20Order\x20object\x20address;\x20must\x20belong\x20to\x20the\x20current\x20signer'},{'identifier':0x1,'b_submission':!![],'value_type':'U256','name':'Submitted\x20amount\x20(unit:\x20MIST);\x20must\x20be\x20>=\x20minimum\x20amount'},{'identifier':0x2,'b_submission':![],'value_type':'U256','value':0xf4240,'name':'Minimum\x20amount\x20constant\x20(1\x20MIST)'}]}},{'id':'P16','pattern_name':'Circular\x20reference\x20pattern\x20(Guard\x20references\x20the\x20host\x20object\x20itself)','data_source_combination':'Type1\x20(host\x20object\x20as\x20constant,\x20using\x20name\x20instead\x20of\x20address)','semantic_intent':'Guard\x20binds\x20to\x20a\x20Host\x20Object\x20while\x20querying\x20the\x20Host\x20Object\x27s\x20own\x20fields;\x20uses\x20name\x20reference\x20to\x20achieve\x20circular\x20binding','match_keywords':['circular\x20reference','self','host','host','circular','self-reference'],'schema_elements':{'root_type':'logic_equal\x20/\x20logic_and','table_entries':[{'value_type':'Address','b_submission':![],'purpose':'Host\x20object\x20name\x20(SDK\x20resolves\x20to\x20address\x20at\x20binding\x20time)'}],'query_nodes':[{'query_name':'query_service_*\x20/\x20query_machine_*','object_type':'Service\x20/\x20Machine'}],'tree_structure':'logic_equal(query(<host_field_query>,\x20object:\x20{\x20identifier:\x200\x20}),\x20identifier[1]\x20or\x20context(Signer))'},'constraints':['The\x20Host\x20Object\x20must\x20not\x20be\x20published\x20(bPublished=false)\x20when\x20creating\x20and\x20binding\x20the\x20Guard','Use\x20the\x20Host\x20Object\x20name\x20(not\x20address)\x20in\x20the\x20table;\x20the\x20SDK\x20resolves\x20it\x20at\x20binding\x20time','The\x20Host\x20Object\x20can\x20only\x20be\x20published\x20after\x20the\x20Guard\x20is\x20bound','Guard\x20verification\x20only\x20runs\x20normally\x20after\x20the\x20Host\x20Object\x20is\x20published','Use\x20guard2file\x20to\x20export\x20Guard\x20backups\x20for\x20easy\x20rebuilding'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'query','query':0x4cf,'object':{'identifier':0x0},'parameters':[]},{'type':'identifier','identifier':0x1}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':'my_service','name':'Host\x20Service\x20name\x20(circular\x20reference,\x20resolved\x20by\x20SDK\x20at\x20binding\x20time)'},{'identifier':0x1,'b_submission':![],'value_type':'Bool','value':![],'name':'Expected\x20Service\x20paused\x20state\x20(false=not\x20paused)'}]}},{'id':'P17','pattern_name':'Query\x20parameter\x20translation\x20pattern\x20(type\x20conversion\x20node\x20combination)','data_source_combination':'Type1/2\x20+\x20type\x20conversion\x20(query\x20parameter\x20type\x20translation)','semantic_intent':'Guard\x20queries\x20parameters\x20that\x20require\x20type\x20conversion\x20(e.g.\x20Address\x20→\x20U64\x20timestamp\x20key);\x20uses\x20convert_*\x20nodes\x20to\x20translate','match_keywords':['type\x20conversion','translate','convert','timestamp\x20key','parameter\x20translation','address\x20to\x20u64'],'schema_elements':{'root_type':'logic_equal\x20/\x20logic_as_u256_greater_or_equal','table_entries':[{'value_type':'Address','b_submission':![],'purpose':'Query\x20target\x20object\x20address\x20(Type1/2)'},{'value_type':'U64','b_submission':![],'purpose':'Comparison\x20baseline\x20value\x20(e.g.\x20timestamp\x20threshold)'}],'query_nodes':[{'query_name':'query_repository_data\x20/\x20query_progress_history_*','object_type':'Repository\x20/\x20Progress'}],'tree_structure':'logic_as_u256_greater_or_equal(query(<query_with_converted_param>,\x20object:\x20{\x20identifier:\x200\x20},\x20parameters:\x20[convert_number_address(identifier[1])]),\x20identifier[2])'},'constraints':['The\x20query\x20parameter\x20type\x20must\x20match\x20the\x20parameters\x20type\x20defined\x20in\x20GUARDQUERY','If\x20the\x20table\x20declares\x20Address\x20but\x20the\x20query\x20requires\x20U64,\x20convert_number_address\x20must\x20be\x20used\x20to\x20translate','The\x20input\x20type\x20of\x20convert_*\x20nodes\x20must\x20be\x20compatible\x20with\x20the\x20child\x20node\x27s\x20return\x20type','The\x20translated\x20type\x20must\x20match\x20the\x20parameters\x20definition\x20of\x20the\x20query\x20instruction','Use\x20wowok_buildin_info\x20info=\x27guard\x20instructions\x27\x20to\x20verify\x20parameter\x20types'],'example':{'root':{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'query','query':0x48f,'object':{'identifier':0x0},'parameters':[{'type':'convert_number_address','nodes':[{'type':'identifier','identifier':0x1}]}]},{'type':'identifier','identifier':0x2}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':'0xrepo','name':'Repository\x20address\x20constant'},{'identifier':0x1,'b_submission':![],'value_type':'U64','value':0x18bcfe56800,'name':'Timestamp\x20key\x20(U64,\x20needs\x20to\x20be\x20converted\x20to\x20Address\x20for\x20Repository\x20query)'},{'identifier':0x2,'b_submission':![],'value_type':'U256','value':0x64,'name':'Expected\x20Repository\x20data\x20value'}]}}];export const SCHEMA_TO_SEMANTIC_RULES=[{'element_type':'node','type_name':'logic_equal','semantic':'Equality\x20comparison\x20(==),\x20returns\x20Bool.\x20Accepts\x20any\x20type\x20but\x20both\x20operands\x20must\x20be\x20type-compatible','return_type':'Bool','child_constraints':'2\x20child\x20nodes,\x20types\x20must\x20be\x20compatible'},{'element_type':'node','type_name':'logic_not','semantic':'Logical\x20NOT\x20(!),\x20returns\x20Bool','return_type':'Bool','child_constraints':'1\x20child\x20node,\x20must\x20be\x20Bool'},{'element_type':'node','type_name':'logic_and','semantic':'Logical\x20AND;\x20true\x20if\x20all\x20child\x20nodes\x20are\x20true','return_type':'Bool','child_constraints':'2-8\x20Bool\x20child\x20nodes\x20(MAX_MULTI_OPERANDS)'},{'element_type':'node','type_name':'logic_or','semantic':'Logical\x20OR;\x20true\x20if\x20any\x20child\x20node\x20is\x20true','return_type':'Bool','child_constraints':'2-8\x20Bool\x20child\x20nodes'},{'element_type':'node','type_name':'logic_as_u256_greater','semantic':'Numeric\x20greater\x20than\x20(>),\x20auto-widened\x20to\x20U256','return_type':'Bool','child_constraints':'2\x20numeric\x20child\x20nodes\x20(U8-U256\x20compatible)'},{'element_type':'node','type_name':'logic_as_u256_lesser','semantic':'Numeric\x20less\x20than\x20(<)','return_type':'Bool','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'logic_as_u256_equal','semantic':'Numeric\x20equality\x20(==)','return_type':'Bool','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'logic_as_u256_greater_or_equal','semantic':'Numeric\x20greater\x20than\x20or\x20equal\x20(>=)','return_type':'Bool','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'logic_as_u256_lesser_or_equal','semantic':'Numeric\x20less\x20than\x20or\x20equal\x20(<=)','return_type':'Bool','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'logic_string_contains','semantic':'String\x20contains\x20(case-sensitive)','return_type':'Bool','child_constraints':'2\x20String\x20child\x20nodes'},{'element_type':'node','type_name':'logic_string_nocase_contains','semantic':'String\x20contains\x20(case-insensitive)','return_type':'Bool','child_constraints':'2\x20String\x20child\x20nodes'},{'element_type':'node','type_name':'logic_string_nocase_equal','semantic':'String\x20equality\x20(case-insensitive)','return_type':'Bool','child_constraints':'2\x20String\x20child\x20nodes'},{'element_type':'node','type_name':'identifier','semantic':'References\x20the\x20value\x20of\x20a\x20table\x20entry.\x20The\x20data\x20source\x20type\x20depends\x20on\x20b_submission:\x20false=Type1\x20constant,\x20true=Type3\x20submitted','return_type':'Determined\x20by\x20table\x20entry\x20value_type','child_constraints':'No\x20child\x20nodes;\x20requires\x20identifier\x20field\x20to\x20reference\x20table','data_source_class':'Type1_OnChainConstant'},{'element_type':'node','type_name':'context','semantic':'Transaction\x20context\x20data\x20(Type4\x20SystemContext).\x20Signer=signer\x20address,\x20Clock=on-chain\x20timestamp\x20(U64),\x20Guard=ObjectID\x20of\x20the\x20Guard\x20currently\x20being\x20verified','return_type':'Address\x20(Signer/Guard)\x20/\x20U64\x20(Clock)','child_constraints':'No\x20child\x20nodes','data_source_class':'Type4_SystemContext'},{'element_type':'node','type_name':'query','semantic':'Queries\x20on-chain\x20object\x20data.\x20The\x20data\x20source\x20type\x20depends\x20on\x20object.convert_witness:\x20present=Type2\x20(witness-derived),\x20absent+constant=Type1,\x20absent+submitted=Type3','return_type':'Determined\x20by\x20the\x20query\x20instruction','child_constraints':'Requires\x20query\x20+\x20object\x20+\x20parameters\x20fields','data_source_class':'Type1_OnChainConstant','discovery_tool':'wowok_buildin_info(info=\x27guard\x20instructions\x27)'},{'element_type':'query','type_name':'enum_variant','semantic':'Enum-typed\x20object\x20field\x20read\x20channel.\x20\x27<field>.variant\x27\x20returns\x20the\x20U8\x20tag\x20(declaration\x20order\x20in\x20the\x20Move\x20source,\x200-based,\x20ABI-stable\x20per\x20package\x20version)\x20plus\x20one\x20payload\x20query\x20per\x20variant\x20(\x27<field>.identifier\x27\x20/\x20\x27.value\x27\x20/\x20\x27.address\x27\x20/\x20\x27.fixed\x27\x20...).\x20Both\x20are\x20non-Bool;\x20variant\x20results\x20must\x20be\x20wrapped\x20in\x20logic_as_u256_equal\x20to\x20enter\x20a\x20guard\x20tree.\x20Payload\x20queries\x20abort\x20W_FIELD_TYPE_ERROR\x20on\x20a\x20variant\x20mismatch,\x20and\x20Guards\x20have\x20no\x20short-circuit,\x20so\x20a\x20payload\x20read\x20is\x20safe\x20only\x20when\x20the\x20host\x20guarantees\x20that\x20variant\x20(mode\x20fixed\x20at\x20add\x20time)','return_type':'U8\x20(variant)\x20/\x20payload\x20type\x20(identifier:\x20U8,\x20value/fixed:\x20U32-U64,\x20address:\x20Address)','child_constraints':'query\x20node\x20+\x20object\x20+\x20parameters','data_source_class':'Type3_SubmittedObject','discovery_tool':'wowok_buildin_info(info=\x27guard\x20instructions\x27)'},{'element_type':'node','type_name':'calc_number_add','semantic':'Numeric\x20addition','return_type':'U256','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'calc_number_subtract','semantic':'Numeric\x20subtraction','return_type':'U256','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'time_until','semantic':'Saturating\x20time\x20delta:\x20max(0,\x20target\x20-\x20now)\x20in\x20ms,\x20where\x20now\x20is\x20the\x20on-chain\x20clock\x20at\x20evaluation\x20time.\x20Unlike\x20calc_number_subtract\x20it\x20never\x20aborts\x20GUARD_NUMBER_SUB_OVERFLOW\x20—\x20a\x20past\x20target\x20yields\x200\x20(deadline\x20reached).\x20Preferred\x20for\x20deadline\x20checks\x20(time\x20until\x20expiry,\x20remaining\x20window)','return_type':'U64','child_constraints':'1\x20numeric\x20child\x20node\x20(target\x20timestamp)'},{'element_type':'node','type_name':'calc_number_multiply','semantic':'Numeric\x20multiplication','return_type':'U256','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'calc_number_divide','semantic':'Numeric\x20division','return_type':'U256','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'calc_number_mod','semantic':'Numeric\x20modulo','return_type':'U256','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'calc_string_length','semantic':'String\x20length','return_type':'U64','child_constraints':'1\x20String\x20child\x20node'},{'element_type':'node','type_name':'calc_string_contains','semantic':'String\x20contains\x20(returns\x20Bool)','return_type':'Bool','child_constraints':'2\x20String\x20child\x20nodes'},{'element_type':'node','type_name':'calc_string_nocase_contains','semantic':'String\x20contains\x20(case-insensitive,\x20returns\x20Bool)','return_type':'Bool','child_constraints':'2\x20String\x20child\x20nodes'},{'element_type':'node','type_name':'calc_string_nocase_equal','semantic':'String\x20equality\x20(case-insensitive,\x20returns\x20Bool)','return_type':'Bool','child_constraints':'2\x20String\x20child\x20nodes'},{'element_type':'node','type_name':'calc_string_indexof','semantic':'String\x20find\x20index','return_type':'U64','child_constraints':'2\x20String\x20child\x20nodes\x20+\x20order'},{'element_type':'node','type_name':'calc_string_nocase_indexof','semantic':'String\x20find\x20index\x20(case-insensitive)','return_type':'U64','child_constraints':'2\x20String\x20child\x20nodes\x20+\x20order'},{'element_type':'node','type_name':'convert_number_address','semantic':'Number\x20→\x20Address\x20conversion\x20(e.g.\x20timestamp\x20to\x20address)','return_type':'Address','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_address_number','semantic':'Address\x20→\x20Number\x20conversion','return_type':'U256','child_constraints':'1\x20Address\x20child\x20node'},{'element_type':'node','type_name':'convert_number_string','semantic':'Number\x20→\x20String\x20conversion','return_type':'String','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_string_number','semantic':'String\x20→\x20Number\x20conversion','return_type':'U256','child_constraints':'1\x20String\x20child\x20node'},{'element_type':'node','type_name':'convert_safe_u8','semantic':'Safe\x20conversion\x20to\x20U8\x20(errors\x20on\x20overflow)','return_type':'U8','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_safe_u16','semantic':'Safe\x20conversion\x20to\x20U16','return_type':'U16','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_safe_u32','semantic':'Safe\x20conversion\x20to\x20U32','return_type':'U32','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_safe_u64','semantic':'Safe\x20conversion\x20to\x20U64','return_type':'U64','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_safe_u128','semantic':'Safe\x20conversion\x20to\x20U128','return_type':'U128','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_safe_u256','semantic':'Safe\x20conversion\x20to\x20U256','return_type':'U256','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'value_type','semantic':'Returns\x20the\x20value\x27s\x20type\x20identifier\x20(U8)\x20—\x20used\x20for\x20dynamic\x20type\x20checking','return_type':'U8','child_constraints':'1\x20variable\x20child\x20node'},{'element_type':'node','type_name':'vec_length','semantic':'Vector\x20length','return_type':'U64','child_constraints':'1\x20vec\x20child\x20node'},{'element_type':'node','type_name':'vec_contains_bool','semantic':'Whether\x20the\x20vector\x20contains\x20a\x20Bool\x20value','return_type':'Bool','child_constraints':'1\x20VecBool\x20+\x201\x20Bool'},{'element_type':'node','type_name':'vec_contains_address','semantic':'Whether\x20the\x20vector\x20contains\x20an\x20Address\x20(whitelist\x20check)','return_type':'Bool','child_constraints':'1\x20VecAddress\x20+\x201\x20Address'},{'element_type':'node','type_name':'vec_contains_string','semantic':'Whether\x20the\x20vector\x20contains\x20a\x20String','return_type':'Bool','child_constraints':'1\x20VecString\x20+\x201\x20String'},{'element_type':'node','type_name':'vec_contains_string_nocase','semantic':'Whether\x20the\x20vector\x20contains\x20a\x20String\x20(case-insensitive)','return_type':'Bool','child_constraints':'1\x20VecString\x20+\x201\x20String'},{'element_type':'node','type_name':'vec_contains_number','semantic':'Whether\x20the\x20vector\x20contains\x20a\x20number','return_type':'Bool','child_constraints':'1\x20Vec*\x20+\x201\x20Number'},{'element_type':'node','type_name':'vec_indexof_bool','semantic':'Bool\x20vector\x20find\x20index','return_type':'U64','child_constraints':'VecBool\x20+\x20Bool\x20+\x20order'},{'element_type':'node','type_name':'vec_indexof_address','semantic':'Address\x20vector\x20find\x20index','return_type':'U64','child_constraints':'VecAddress\x20+\x20Address\x20+\x20order'},{'element_type':'node','type_name':'vec_indexof_string','semantic':'String\x20vector\x20find\x20index','return_type':'U64','child_constraints':'VecString\x20+\x20String\x20+\x20order'},{'element_type':'node','type_name':'vec_indexof_string_nocase','semantic':'String\x20vector\x20find\x20index\x20(case-insensitive)','return_type':'U64','child_constraints':'VecString\x20+\x20String\x20+\x20order'},{'element_type':'node','type_name':'vec_indexof_number','semantic':'Numeric\x20vector\x20find\x20index','return_type':'U64','child_constraints':'Vec*\x20+\x20Number\x20+\x20order'},{'element_type':'node','type_name':'query_reward_record_find','semantic':'Query\x20reward\x20claim\x20records\x20(returns\x20the\x20found\x20record)','return_type':'Bool','child_constraints':'Requires\x20object\x20+\x20recipient\x20+\x20where\x20+\x20find'},{'element_type':'node','type_name':'query_reward_record_count','semantic':'Query\x20reward\x20claim\x20record\x20count\x20(U64)','return_type':'U64','child_constraints':'Requires\x20object\x20+\x20recipient\x20(optional)'},{'element_type':'node','type_name':'query_reward_record_exists','semantic':'Query\x20whether\x20a\x20reward\x20claim\x20record\x20exists\x20(Bool)','return_type':'Bool','child_constraints':'Requires\x20object\x20+\x20recipient\x20(optional)'},{'element_type':'node','type_name':'query_progress_history_find','semantic':'Query\x20whether\x20a\x20specified\x20session\x20exists\x20in\x20Progress\x20history','return_type':'Bool','child_constraints':'Requires\x20object\x20+\x20where\x20+\x20find'},{'element_type':'node','type_name':'query_progress_history_session_find','semantic':'Query\x20a\x20Progress\x20session','return_type':'Bool','child_constraints':'Requires\x20object\x20+\x20historyIdx\x20+\x20where\x20+\x20find'},{'element_type':'node','type_name':'query_progress_history_session_forward_find','semantic':'Query\x20whether\x20a\x20specified\x20forward\x20exists\x20in\x20a\x20Progress\x20session','return_type':'Bool','child_constraints':'Requires\x20object\x20+\x20historyIdx\x20+\x20sessionIdx\x20+\x20where\x20+\x20find'},{'element_type':'node','type_name':'query_progress_history_session_count','semantic':'Query\x20the\x20number\x20of\x20Progress\x20sessions','return_type':'U64','child_constraints':'Requires\x20object\x20+\x20historyIdx'},{'element_type':'node','type_name':'query_progress_history_session_forward_count','semantic':'Query\x20the\x20number\x20of\x20forwards\x20in\x20a\x20Progress\x20session','return_type':'U64','child_constraints':'Requires\x20object\x20+\x20historyIdx\x20+\x20sessionIdx'},{'element_type':'node','type_name':'query_progress_history_session_forward_retained_submission_count','semantic':'Query\x20the\x20retained\x20submission\x20count\x20of\x20a\x20forward\x20in\x20a\x20Progress\x20session','return_type':'U64','child_constraints':'Requires\x20object\x20+\x20historyIdx\x20+\x20sessionIdx\x20+\x20forwardIdx'},{'element_type':'node','type_name':'query_repository_data_count_where','semantic':'Count\x20repository\x20data\x20entries\x20among\x20candidate\x20IDs\x20matching\x20the\x20BCS\x20predicate\x20(U256\x20comparison:\x20==,\x20>,\x20>=,\x20<,\x20<=,\x20closed/open\x20range;\x20plus\x20address\x20equality,\x20string\x20equal/contains/nocase-contains,\x20or\x20bool\x20equality;\x20missing/incompatible\x20skipped;\x20blob\x20type\x20auto-checked\x20against\x20the\x20policy\x20value_type)','return_type':'U64','child_constraints':'Requires\x20object\x20(Repository)\x20+\x20key\x20(String\x20entry)\x20+\x20predicate\x20+\x20ids\x20(VecAddress\x20entry)'},{'element_type':'node','type_name':'query_repository_data_sum_where','semantic':'Sum\x20(U256)\x20numeric\x20repository\x20data\x20payloads\x20among\x20candidate\x20IDs\x20matching\x20the\x20BCS\x20predicate','return_type':'U256','child_constraints':'Requires\x20object\x20(Repository)\x20+\x20key\x20(String\x20entry)\x20+\x20predicate\x20+\x20ids\x20(VecAddress\x20entry)'},{'element_type':'node','type_name':'query_repository_data_find_where','semantic':'List\x20the\x20IDs\x20of\x20all\x20matching\x20candidates\x20in\x20candidate\x20order\x20(combine\x20with\x20vec_indexof\x20for\x20first/last,\x20vec_length\x20for\x20exists,\x20vec_contains\x20for\x20membership)','return_type':'VecAddress','child_constraints':'Requires\x20object\x20(Repository)\x20+\x20key\x20(String\x20entry)\x20+\x20predicate\x20+\x20ids\x20(VecAddress\x20entry)'},{'element_type':'node','type_name':'query_repository_data_keys_where','semantic':'Reverse\x20lookup:\x20all\x20policy\x20keys\x20whose\x20stored\x20value\x20for\x20the\x20given\x20ID\x20matches\x20the\x20BCS\x20predicate\x20(scans\x20the\x20policy\x20schema\x20and\x20probes\x20each\x20key)','return_type':'VecString','child_constraints':'Requires\x20object\x20(Repository)\x20+\x20id\x20(Address\x20entry)\x20+\x20predicate'},{'element_type':'node','type_name':'query_repository_policies_keys','semantic':'List\x20all\x20repository\x20policy\x20names\x20(the\x20valid\x20key\x20set\x20of\x20the\x20data\x20table)','return_type':'VecString','child_constraints':'Requires\x20object\x20(Repository)'},{'element_type':'witness','type_name':'TypeOrderProgress','semantic':'Reads\x20the\x20order.progress\x20field\x20from\x20an\x20Order\x20address\x20to\x20derive\x20Progress\x20(100,\x20single\x20hop)','data_source_class':'Type2_WitnessDerived','discovery_tool':'wowok_buildin_info(info=\x27guard\x20instructions\x27)'},{'element_type':'witness','type_name':'TypeOrderMachine','semantic':'Reads\x20the\x20order.machine\x20field\x20from\x20an\x20Order\x20address\x20to\x20derive\x20Machine\x20(101,\x20single\x20hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeOrderService','semantic':'Reads\x20the\x20order.service\x20field\x20from\x20an\x20Order\x20address\x20to\x20derive\x20Service\x20(102,\x20single\x20hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeProgressMachine','semantic':'Reads\x20the\x20progress.machine\x20field\x20from\x20a\x20Progress\x20address\x20to\x20derive\x20Machine\x20(103,\x20single\x20hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeArbOrder','semantic':'Reads\x20the\x20arb.order\x20field\x20from\x20an\x20Arb\x20address\x20to\x20derive\x20Order\x20(104,\x20single\x20hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeArbArbitration','semantic':'Reads\x20the\x20arb.arbitration\x20field\x20from\x20an\x20Arb\x20address\x20to\x20derive\x20the\x20parent\x20Arbitration\x20service\x20(105,\x20single\x20hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeArbProgress','semantic':'Derives\x20from\x20Arb\x20in\x20two\x20hops:\x20arb.order\x20→\x20order.progress\x20(106,\x20multi-hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeArbMachine','semantic':'Derives\x20from\x20Arb\x20in\x20two\x20hops:\x20arb.order\x20→\x20order.machine\x20(107,\x20multi-hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeArbService','semantic':'Derives\x20from\x20Arb\x20in\x20two\x20hops:\x20arb.order\x20→\x20order.service\x20(108,\x20multi-hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeOrderAllocation','semantic':'Reads\x20the\x20order.allocation\x20field\x20from\x20an\x20Order\x20address\x20to\x20derive\x20the\x20escrow\x20Allocation\x20(109,\x20single\x20hop)\x20—\x20pair\x20with\x20the\x20allocation.balance\x20query\x20(1051)\x20for\x20fund\x20gates','data_source_class':'Type2_WitnessDerived'},{'element_type':'context','type_name':'Signer','semantic':'Current\x20transaction\x20signer\x20address\x20(TransactionContext.sender())','return_type':'Address','data_source_class':'Type4_SystemContext'},{'element_type':'context','type_name':'Clock','semantic':'Current\x20on-chain\x20timestamp\x20(reads\x20timestamp_ms\x20of\x20WOW_CLOCK_OBJECT_ID\x200x6)','return_type':'U64','data_source_class':'Type4_SystemContext'},{'element_type':'context','type_name':'Guard','semantic':'ObjectID\x20of\x20the\x20Guard\x20object\x20currently\x20being\x20verified\x20(self-reference,\x20rare)','return_type':'Address','data_source_class':'Type4_SystemContext'},{'element_type':'table_entry','type_name':'Bool','semantic':'Boolean\x20constant\x20or\x20submission'},{'element_type':'table_entry','type_name':'Address','semantic':'Address\x20constant\x20(Type1)\x20or\x20submission\x20(Type3).\x20Object\x20address\x20type'},{'element_type':'table_entry','type_name':'String','semantic':'String\x20constant\x20or\x20submission'},{'element_type':'table_entry','type_name':'U8','semantic':'8-bit\x20unsigned\x20integer'},{'element_type':'table_entry','type_name':'U16','semantic':'16-bit\x20unsigned\x20integer'},{'element_type':'table_entry','type_name':'U32','semantic':'32-bit\x20unsigned\x20integer'},{'element_type':'table_entry','type_name':'U64','semantic':'64-bit\x20unsigned\x20integer\x20(commonly\x20used\x20for\x20timestamps)'},{'element_type':'table_entry','type_name':'U128','semantic':'128-bit\x20unsigned\x20integer'},{'element_type':'table_entry','type_name':'U256','semantic':'256-bit\x20unsigned\x20integer\x20(auto-widening\x20target\x20for\x20numeric\x20operations)'},{'element_type':'table_entry','type_name':'VecAddress','semantic':'Address\x20vector\x20(used\x20for\x20whitelists,\x20Type1\x20constant)'},{'element_type':'table_entry','type_name':'VecString','semantic':'String\x20vector'},{'element_type':'table_entry','type_name':'VecU64','semantic':'U64\x20vector'},{'element_type':'table_entry','type_name':'VecU8','semantic':'U8\x20vector\x20(raw\x20bytes)'},{'element_type':'table_entry','type_name':'Value','semantic':'Dynamic\x20type\x20(19,\x20first\x20byte\x20is\x20the\x20type\x20identifier)\x20—\x20used\x20for\x20Repository\x20data,\x20EntityRegistrar\x20records,\x20Passport\x20submission\x20value'},{'element_type':'rely','type_name':'rely_and','semantic':'Depends\x20on\x20other\x20Guards,\x20AND\x20logic\x20(all\x20must\x20pass).\x20Depended-on\x20Guards\x20must\x20have\x20rep=true','child_constraints':'At\x20most\x204\x20dependencies,\x20each\x20with\x20rep=true\x20(repository.data\x20query\x20does\x20not\x20depend\x20on\x20submission)'},{'element_type':'rely','type_name':'rely_or','semantic':'Depends\x20on\x20other\x20Guards,\x20OR\x20logic\x20(any\x20one\x20passing\x20is\x20sufficient).\x20Depended-on\x20Guards\x20must\x20have\x20rep=true','child_constraints':'At\x20most\x204\x20dependencies,\x20each\x20with\x20rep=true'}];export const GUARD_CONSTRAINT_RULES=[{'id':'ROOT_01','name':'root\x20returns\x20Bool','description':'The\x20Guard\x20root\x20node\x20must\x20return\x20a\x20Bool\x20type','category':'root','phase':'creation','validation_logic':'root.node_type\x20must\x20be\x20in\x20the\x20allowedTypes\x20list\x20(logic_*,\x20calc_string_contains,\x20vec_contains_*,\x20query_reward_record_exists,\x20query[Bool\x20return],\x20identifier[Bool\x20type])','failure_message':'Guard\x20root\x20node\x20must\x20be\x20an\x20operation\x20that\x20returns\x20Bool','verification_location':'SDK\x20buildNode(root,\x20ValueType.Bool,\x20...)','pitfall_number':0x7},{'id':'TABLE_01','name':'identifier\x20uniqueness','description':'Each\x20identifier\x20in\x20the\x20table\x20must\x20be\x20unique\x20(0-255)','category':'table','phase':'creation','validation_logic':'No\x20duplicate\x20identifiers\x20in\x20the\x20table','failure_message':'Duplicate\x20table\x20identifier','verification_location':'SDK\x20lodash\x20groupBy'},{'id':'TABLE_02','name':'identifier\x20referential\x20integrity','description':'Every\x20identifier\x20node\x20in\x20the\x20computation\x20tree\x20must\x20exist\x20in\x20the\x20table','category':'table','phase':'creation','validation_logic':'Traverse\x20the\x20computation\x20tree;\x20each\x20identifier\x20node\x27s\x20index\x20exists\x20in\x20the\x20table','failure_message':'Identifier\x20not\x20found\x20in\x20table','verification_location':'SDK\x20buildNode','pitfall_number':0x1},{'id':'TABLE_03','name':'Constant\x20entries\x20must\x20have\x20a\x20value','description':'Entries\x20with\x20b_submission=false\x20must\x20have\x20a\x20value\x20field','category':'table','phase':'creation','validation_logic':'All\x20entries\x20with\x20b_submission=false\x20have\x20a\x20non-empty\x20value\x20field','failure_message':'Constant\x20table\x20entry\x20must\x20have\x20a\x20value','verification_location':'SDK\x20operate'},{'id':'TABLE_04','name':'table\x20size\x20limit','description':'At\x20most\x20256\x20entries;\x20serialized\x20size\x20must\x20not\x20exceed\x2040000\x20bytes','category':'table','phase':'creation','validation_logic':'table.length\x20<=\x20256\x20&&\x20serialize(table).length\x20<=\x2040000','failure_message':'Table\x20exceeds\x20size\x20limit\x20(256\x20entries\x20or\x2040000\x20bytes)','verification_location':'Move\x20guard\x20creation'},{'id':'TABLE_05','name':'submission\x20entry\x20value\x20is\x201\x20byte\x20(type\x20code\x20only)','description':'Entries\x20with\x20b_submission=true\x20have\x20a\x20serialized\x20value\x20of\x20just\x201\x20byte\x20(the\x20type\x20code)','category':'table','phase':'creation','validation_logic':'When\x20b_submission=true,\x20bcsValue.length\x20===\x201\x20and\x20bcsValue[0]\x20===\x20valueType','failure_message':'Submission\x20table\x20entry\x20value\x20must\x20be\x201\x20byte\x20(type\x20code\x20only)','verification_location':'native\x20deserialize_constants'},{'id':'QUERY_01','name':'query\x20instruction\x20valid','description':'The\x20query\x20field\x20of\x20a\x20query\x20node\x20must\x20be\x20a\x20valid\x20GUARDQUERY\x20ID\x20or\x20name','category':'query','phase':'creation','validation_logic':'The\x20query\x20field\x20exists\x20in\x20GUARDQUERY\x20(via\x20isValidGuardQueryIdOrName)','failure_message':'Invalid\x20Guard\x20query\x20instruction','verification_location':'SDK\x20getGuardQueryInfo','pitfall_number':0x3},{'id':'QUERY_02','name':'query\x20parameter\x20count\x20match','description':'The\x20number\x20and\x20types\x20of\x20parameters\x20in\x20a\x20query\x20node\x20must\x20match\x20the\x20instruction\x20definition','category':'query','phase':'creation','validation_logic':'parameters.length\x20===\x20instruction.parameters.length\x20&&\x20type-compatible','failure_message':'Query\x20parameter\x20count\x20or\x20type\x20mismatch','verification_location':'SDK\x20buildNode','pitfall_number':0x3},{'id':'QUERY_03','name':'query\x20return\x20type\x20compatible','description':'The\x20return\x20type\x20of\x20a\x20query\x20node\x20must\x20be\x20compatible\x20with\x20the\x20parent\x20node\x27s\x20expected\x20type','category':'query','phase':'creation','validation_logic':'checkType(query.return_type,\x20parent.expected_type)','failure_message':'Query\x20return\x20type\x20incompatible\x20with\x20parent\x20node','verification_location':'SDK\x20checkType'},{'id':'QUERY_04','name':'query\x20object\x20identifier\x27s\x20value_type\x20is\x20Address','description':'The\x20table\x20entry\x20referenced\x20by\x20query\x20node\x27s\x20object.identifier\x20must\x20have\x20value_type\x20of\x20Address','category':'query','phase':'creation','validation_logic':'table[object.identifier].value_type\x20===\x20Address','failure_message':'Query\x20object\x20identifier\x20must\x20reference\x20an\x20Address-type\x20table\x20entry','verification_location':'SDK\x20buildNode\x20L603-609'},{'id':'QUERY_05','name':'enum\x20variant\x20query\x20is\x20U8,\x20not\x20Bool','description':'A\x20\x27<field>.variant\x27\x20query\x20returns\x20the\x20enum\x20tag\x20as\x20U8.\x20It\x20can\x20never\x20be\x20a\x20Guard\x20root\x20and\x20never\x20a\x20direct\x20logic_and/logic_or\x20child;\x20it\x20must\x20be\x20compared\x20(logic_as_u256_equal)\x20inside\x20a\x20Bool-producing\x20node','category':'query','phase':'creation','validation_logic':'query.return\x20===\x20U8\x20=>\x20parent/root\x20must\x20wrap\x20it\x20in\x20a\x20numeric\x20comparison','failure_message':'Guard\x20root\x20node\x20must\x20be\x20an\x20operation\x20that\x20returns\x20Bool\x20(variant\x20query\x20returns\x20U8)','verification_location':'MCP\x20guard\x20schema\x20(isBoolReturningQuery\x20/\x20CallGuard_RootSchema)','pitfall_number':0x7},{'id':'QUERY_06','name':'enum\x20payload\x20query\x20is\x20variant-strict,\x20and\x20Guards\x20do\x20not\x20short-circuit','description':'A\x20payload\x20query\x20(identifier/value/address/fixed)\x20aborts\x20with\x20W_FIELD_TYPE_ERROR\x20when\x20the\x20stored\x20enum\x20variant\x20is\x20not\x20the\x20one\x20it\x20reads.\x20Guard\x20evaluation\x20has\x20no\x20short-circuit\x20—\x20logic_and/logic_or\x20operands\x20are\x20all\x20evaluated\x20before\x20combining\x20and\x20any\x20query\x20error\x20aborts\x20the\x20whole\x20verification\x20—\x20so\x20a\x20payload\x20read\x20can\x20never\x20be\x20made\x20safe\x20by\x20a\x20sibling\x20variant\x20test','category':'query','phase':'runtime','validation_logic':'Design-time:\x20only\x20submit\x20a\x20payload\x20query\x20when\x20the\x20host\x20guarantees\x20that\x20variant\x20(mode\x20fixed\x20at\x20add\x20time);\x20never\x20pair\x20it\x20with\x20a\x20variant\x20comparison\x20as\x20a\x20runtime\x20guard','failure_message':'W_FIELD_TYPE_ERROR\x20at\x20verification\x20time\x20(variant\x20mismatch);\x20the\x20whole\x20Guard\x20fails,\x20it\x20does\x20not\x20evaluate\x20to\x20false','verification_location':'native\x20object\x20query\x20handlers\x20+\x20the\x20passport\x20verification\x20entry\x20that\x20runs\x20the\x20guard'},{'id':'WITNESS_01','name':'witness\x20type\x20valid','description':'convert_witness\x20must\x20be\x20a\x20valid\x20WitnessType\x20(100-109)','category':'witness','phase':'creation','validation_logic':'The\x20witness\x20value\x20is\x20within\x20the\x20range\x20allowed\x20by\x20WitnessTypeSchema\x20(100-109)','failure_message':'Invalid\x20witness\x20type','verification_location':'SDK\x20isWitnessType','pitfall_number':0x4},{'id':'WITNESS_02','name':'witness\x20target\x20matches\x20query\x20objectType','description':'The\x20witness\x27s\x20target\x20type\x20must\x20match\x20the\x20query\x20instruction\x27s\x20objectType','category':'witness','phase':'creation','validation_logic':'witness.target_type\x20===\x20instruction.objectType','failure_message':'Witness\x20target\x20type\x20does\x20not\x20match\x20query\x20object\x20type','verification_location':'SDK\x20buildNode\x20L613-619','pitfall_number':0x4},{'id':'WITNESS_03','name':'witness\x20source\x20matches\x20tableItem\x20object_type','description':'The\x20witness\x27s\x20source\x20type\x20must\x20match\x20the\x20object_type\x20declared\x20in\x20the\x20table\x20entry\x20(if\x20declared)','category':'witness','phase':'creation','validation_logic':'table[identifier].object_type\x20===\x20witness.source_type\x20(if\x20tableItem.object_type\x20is\x20declared)','failure_message':'Witness\x20source\x20type\x20does\x20not\x20match\x20table\x20entry\x20object_type','verification_location':'SDK\x20buildNode\x20L622-631','pitfall_number':0x4},{'id':'RELY_01','name':'rely\x20dependency\x20count\x20≤\x204','description':'rely.guards\x20supports\x20at\x20most\x204\x20dependencies\x20(MAX_DEPENDED_COUNT)','category':'rely','phase':'creation','validation_logic':'rely.guards.length\x20<=\x204','failure_message':'Rely\x20dependencies\x20exceed\x20limit\x20(4)','verification_location':'SDK\x20reliesAdd'},{'id':'RELY_02','name':'rely\x20dependency\x20rep=true','description':'All\x20rely-depended\x20Guards\x20must\x20have\x20rep=true\x20(repository.data\x20query\x20does\x20not\x20depend\x20on\x20runtime\x20submission)','category':'rely','phase':'creation','validation_logic':'Query\x20each\x20depended\x20Guard\x27s\x20rep\x20field;\x20must\x20be\x20true','failure_message':'Rely\x20dependency\x20has\x20rep=false\x20(not\x20standalone)','verification_location':'Move\x20guard\x20rely\x20registration','pitfall_number':0x8},{'id':'RELY_03','name':'rely\x20forbids\x20self-reference','description':'A\x20Guard\x20cannot\x20depend\x20on\x20itself','category':'rely','phase':'creation','validation_logic':'rely.guards\x20does\x20not\x20contain\x20the\x20current\x20Guard\x27s\x20address','failure_message':'Guard\x20cannot\x20rely\x20on\x20itself','verification_location':'SDK\x20reliesAdd'},{'id':'BINDING_01','name':'voting_guard\x20GuardIdentifier\x20numeric','description':'The\x20table\x20entry\x20referenced\x20by\x20Arbitration\x20voting_guard\x27s\x20GuardIdentifier\x20must\x20be\x20of\x20a\x20numeric\x20type','category':'binding','phase':'creation','validation_logic':'If\x20binding=voting_guard,\x20the\x20table\x20entry\x20pointed\x20to\x20by\x20GuardIdentifier\x20has\x20value_type\x20in\x20[U8,U16,U32,U64,U128,U256]','failure_message':'E_GUARD_IDENTIFIER_NOT_NUMBER:\x20voting_guard\x20weight\x20must\x20be\x20numeric','verification_location':'Move\x20Arbitration','pitfall_number':0x9},{'id':'BINDING_02','name':'Repository\x20id_from_submission\x20Address','description':'The\x20table\x20entry\x20referenced\x20by\x20Repository\x20write_guard\x27s\x20id_from_submission\x20must\x20be\x20of\x20Address\x20type','category':'binding','phase':'creation','validation_logic':'If\x20binding=write_guard\x20and\x20id_from_submission\x20is\x20set,\x20table[id_from_submission].value_type\x20===\x20Address','failure_message':'Repository\x20id_from_submission\x20must\x20be\x20Address\x20type','verification_location':'Move\x20Repository'},{'id':'BINDING_03','name':'Repository\x20data_from_submission\x20type\x20match','description':'The\x20table\x20entry\x20referenced\x20by\x20Repository\x20write_guard\x27s\x20data_from_submission\x20must\x20match\x20the\x20Repository\x20value_type','category':'binding','phase':'creation','validation_logic':'If\x20binding=write_guard\x20and\x20data_from_submission\x20is\x20set,\x20table[data_from_submission].value_type\x20===\x20Repository.value_type','failure_message':'Repository\x20data_from_submission\x20type\x20mismatch','verification_location':'Move\x20Repository'},{'id':'INPUT_01','name':'root\x20byte\x20stream\x20non-empty','description':'The\x20serialized\x20byte\x20stream\x20of\x20root\x20cannot\x20be\x20empty','category':'input','phase':'creation','validation_logic':'input.length\x20>\x200','failure_message':'Input\x20cannot\x20be\x20empty','verification_location':'SDK\x20newGuard'},{'id':'INPUT_02','name':'root\x20byte\x20stream\x20≤\x20MAX_INPUT_SIZE','description':'The\x20serialized\x20byte\x20stream\x20of\x20root\x20must\x20not\x20exceed\x20MAX_INPUT_SIZE','category':'input','phase':'creation','validation_logic':'input.length\x20<=\x20MAX_INPUT_SIZE','failure_message':'Input\x20size\x20exceeds\x20maximum\x20limit','verification_location':'SDK\x20newGuard'},{'id':'IMMUTABLE_01','name':'Guard\x20immutable=true\x20after\x20creation','description':'After\x20creation,\x20a\x20Guard\x20cannot\x20be\x20modified\x20or\x20deleted\x20(CREATE-only)','category':'immutable','phase':'creation','validation_logic':'After\x20the\x20Guard\x20is\x20created,\x20the\x20immutable\x20field\x20is\x20set\x20to\x20true','failure_message':'Guard\x20is\x20immutable\x20after\x20creation','verification_location':'Move\x20guard\x20creation'},{'id':'RUN_IMMUTABLE_01','name':'Guard\x20must\x20be\x20immutable=true\x20to\x20verify','description':'At\x20runtime\x20verification,\x20the\x20Guard\x20must\x20be\x20frozen\x20(immutable=true)','category':'immutable','phase':'runtime','validation_logic':'guard.immutable\x20===\x20true','failure_message':'Guard\x20must\x20be\x20immutable\x20to\x20verify','verification_location':'native\x20guard\x20verification\x20L497-506'},{'id':'RUN_SUB_01','name':'submission\x20type\x20byte\x20matches\x20table\x20declaration','description':'The\x20value[0]\x20(type\x20byte)\x20of\x20submission\x20must\x20match\x20the\x20value_type\x20declared\x20in\x20the\x20table','category':'table','phase':'runtime','validation_logic':'submissionValue[0]\x20===\x20table[identifier].value_type','failure_message':'Submission\x20type\x20byte\x20does\x20not\x20match\x20table\x20declaration','verification_location':'native\x20parse_table_items\x20L306'},{'id':'RUN_SUB_02','name':'table\x20entries\x20with\x20b_submission=true\x20must\x20be\x20found\x20in\x20submission','description':'All\x20table\x20entries\x20declared\x20as\x20submitted\x20must\x20have\x20corresponding\x20submission\x20data','category':'table','phase':'runtime','validation_logic':'forall\x20identifier\x20in\x20table\x20where\x20b_submission=true:\x20identifier\x20in\x20submission_map','failure_message':'Missing\x20submission\x20for\x20declared\x20b_submission=true\x20table\x20entry','verification_location':'native\x20parse_table_items\x20L301-321'},{'id':'RUN_SUB_03','name':'submission\x20total\x20bytes\x20≤\x20MAX_SUBMISSION_SIZE_PASSPORT\x20('+MAX_SUBMISSION_SIZE_PASSPORT+')','description':'The\x20total\x20bytes\x20of\x20all\x20data\x20submitted\x20at\x20runtime\x20must\x20not\x20exceed\x20'+MAX_SUBMISSION_SIZE_PASSPORT,'category':'table','phase':'runtime','validation_logic':'total_submission_bytes\x20<=\x20'+MAX_SUBMISSION_SIZE_PASSPORT,'failure_message':'Submission\x20exceeds\x20MAX_SUBMISSION_SIZE_PASSPORT\x20('+MAX_SUBMISSION_SIZE_PASSPORT+'\x20bytes)','verification_location':'Move\x20verify\x20L252'},{'id':'RUN_WITNESS_01','name':'witness\x20derivation\x20source\x20object\x20must\x20have\x20the\x20required\x20relation\x20field','description':'When\x20witness\x20conversion\x20occurs,\x20the\x20source\x20object\x20must\x20contain\x20the\x20relation\x20field\x20needed\x20for\x20derivation','category':'witness','phase':'runtime','validation_logic':'The\x20source\x20object\x20exists\x20and\x20contains\x20the\x20field\x20required\x20for\x20witness\x20derivation\x20(e.g.\x20order.progress\x20field\x20is\x20non-empty)','failure_message':'Witness\x20source\x20object\x20missing\x20required\x20field\x20for\x20derivation','verification_location':'native\x20convert_witness'},{'id':'RUN_WITNESS_02','name':'witness-derived\x20target\x20object\x20must\x20exist','description':'The\x20target\x20object\x20derived\x20by\x20witness\x20must\x20exist\x20on-chain','category':'witness','phase':'runtime','validation_logic':'The\x20derived\x20target\x20object\x20ID\x20exists\x20on-chain','failure_message':'Witness\x20derived\x20target\x20object\x20does\x20not\x20exist','verification_location':'native\x20convert_witness'},{'id':'RUN_QUERY_01','name':'query\x20target\x20object\x20must\x20exist\x20and\x20type\x20match','description':'The\x20target\x20object\x20of\x20a\x20query\x20must\x20exist\x20on-chain\x20and\x20its\x20type\x20must\x20match','category':'query','phase':'runtime','validation_logic':'Target\x20object\x20exists\x20&&\x20object\x20type\x20matches\x20query.objectType','failure_message':'Query\x20target\x20object\x20does\x20not\x20exist\x20or\x20type\x20mismatch','verification_location':'native\x20process_object_query'},{'id':'RUN_IMPACK_01','name':'at\x20least\x20one\x20impack\x20guard','description':'Passport\x20verification\x20requires\x20at\x20least\x20one\x20impack\x20guard','category':'runtime','phase':'runtime','validation_logic':'impack_list.length\x20>=\x201\x20(note:\x20impack_list\x20is\x20always\x20empty\x20during\x20verify\x20phase;\x20this\x20constraint\x20is\x20checked\x20in\x20result_for_permission\x20phase)','failure_message':'No\x20impack\x20guard\x20found','verification_location':'Move\x20verify\x20L281'},{'id':'RUN_IMPACK_02','name':'impack\x20guard\x20failure\x20fails\x20the\x20entire\x20passport','description':'If\x20any\x20impack\x20guard\x20verification\x20fails,\x20the\x20entire\x20passport\x20verification\x20fails','category':'runtime','phase':'runtime','validation_logic':'forall\x20guard\x20in\x20impack_list:\x20guard.result\x20===\x20true','failure_message':'Impack\x20guard\x20verification\x20failed','verification_location':'Move\x20verify\x20L270-275'},{'id':'RUN_TX_01','name':'Passport\x20tx_hash\x20must\x20match\x20the\x20current\x20transaction','description':'The\x20tx_hash\x20recorded\x20in\x20the\x20Passport\x20must\x20match\x20the\x20hash\x20of\x20the\x20currently\x20executing\x20transaction','category':'runtime','phase':'runtime','validation_logic':'passport.tx_hash\x20===\x20current_tx_hash','failure_message':'Passport\x20tx_hash\x20does\x20not\x20match\x20current\x20transaction','verification_location':'Move\x20verify\x20L231'},{'id':'RUN_RELY_01','name':'rely\x20guard\x20must\x20have\x20been\x20added\x20to\x20passport','description':'Guards\x20relied\x20on\x20must\x20have\x20been\x20registered\x20in\x20the\x20passport','category':'rely','phase':'runtime','validation_logic':'forall\x20guard\x20in\x20rely.guards:\x20guard\x20in\x20passport.relies','failure_message':'Rely\x20guard\x20not\x20added\x20to\x20passport','verification_location':'Move\x20rely\x20result\x20computation'}];export function matchSemanticPattern(a){const b=a['toLowerCase']();return SEMANTIC_TO_SCHEMA_RULES['filter'](c=>c['match_keywords']['some'](d=>b['includes'](d['toLowerCase']())));}export function explainNode(a){return SCHEMA_TO_SEMANTIC_RULES['find'](b=>b['element_type']==='node'&&b['type_name']===a);}export function explainWitness(a){const b={0x64:'TypeOrderProgress',0x65:'TypeOrderMachine',0x66:'TypeOrderService',0x67:'TypeProgressMachine',0x68:'TypeArbOrder',0x69:'TypeArbArbitration',0x6a:'TypeArbProgress',0x6b:'TypeArbMachine',0x6c:'TypeArbService',0x6d:'TypeOrderAllocation'},c=b[a];return SCHEMA_TO_SEMANTIC_RULES['find'](d=>d['element_type']==='witness'&&d['type_name']===c);}export function explainContext(a){return SCHEMA_TO_SEMANTIC_RULES['find'](b=>b['element_type']==='context'&&b['type_name']===a);}export function getConstraintsByCategory(a){return GUARD_CONSTRAINT_RULES['filter'](b=>b['category']===a);}export function getConstraintsByPhase(a){return GUARD_CONSTRAINT_RULES['filter'](b=>b['phase']===a);}export function getPatternById(a){return SEMANTIC_TO_SCHEMA_RULES['find'](b=>b['id']===a);}export function getDataSourceCombinations(){return[...new Set(SEMANTIC_TO_SCHEMA_RULES['map'](a=>a['data_source_combination']))];}
1
+ import{MAX_SUBMISSION_SIZE_PASSPORT}from'@wowok/wowok';export const SEMANTIC_TO_SCHEMA_RULES=[{'id':'P02','pattern_name':'Query\x20published\x20object\x20+\x20system\x20context','data_source_combination':'Type1\x20+\x20Type4','semantic_intent':'Query\x20published\x20on-chain\x20object\x20fields\x20and\x20compare\x20with\x20system\x20context','match_keywords':['paused','published','service\x20status','machine\x20status','paused','published'],'schema_elements':{'root_type':'logic_equal\x20/\x20logic_and','table_entries':[{'value_type':'Address','b_submission':![],'purpose':'Published\x20object\x20address\x20constant\x20(Type1)'}],'context_nodes':[{'context_type':'Signer','purpose':'Optional:\x20identity\x20validation'}],'tree_structure':'logic_equal(query(<instruction>,\x20object:\x20{\x20identifier:\x200\x20}),\x20identifier[1]\x20or\x20context(Signer))'},'constraints':['The\x20object_type\x20of\x20table[0]\x20must\x20match\x20the\x20target\x20object\x20type\x20of\x20the\x20query\x20instruction','The\x20query\x20return\x20type\x20must\x20be\x20compatible\x20with\x20the\x20comparison\x20object','The\x20object\x20must\x20be\x20published\x20(published=true)\x20to\x20ensure\x20fields\x20are\x20immutable'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'query','query':'service.paused','object':{'identifier':0x0},'parameters':[]},{'type':'identifier','identifier':0x1}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':'0xSERVICE','name':'Service\x20object\x20address'},{'identifier':0x1,'b_submission':![],'value_type':'Bool','value':![],'name':'Expected\x20paused\x20state\x20(false=not\x20paused)'}]}},{'id':'P03','pattern_name':'Identity\x20check\x20(single\x20address)','data_source_combination':'Type4\x20+\x20Type1\x20constant','semantic_intent':'Only\x20a\x20specific\x20address\x20can\x20perform\x20the\x20operation','match_keywords':['only','allow','authorize','identity','specified\x20address','signer'],'schema_elements':{'root_type':'logic_equal','table_entries':[{'value_type':'Address','b_submission':![],'purpose':'Authorized\x20address\x20constant\x20(Type1\x20constant)'}],'context_nodes':[{'context_type':'Signer','purpose':'Current\x20transaction\x20signer\x20(Type4)'}],'tree_structure':'logic_equal(context(Signer),\x20identifier[0])'},'constraints':['root\x20must\x20be\x20logic_equal\x20(returns\x20Bool)','table[0]\x20must\x20be\x20Address\x20type,\x20b_submission=false','context(Signer)\x20returns\x20the\x20current\x20transaction\x20signer\x20address'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'context','context':'Signer'},{'type':'identifier','identifier':0x0}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':'0xabc...','name':'Authorized\x20operator\x20address'}]}},{'id':'P04','pattern_name':'Identity\x20check\x20(whitelist)','data_source_combination':'Type4\x20+\x20Type1\x20constant\x20(VecAddress)','semantic_intent':'Addresses\x20in\x20the\x20whitelist\x20can\x20perform\x20this\x20operation','match_keywords':['whitelist','multiple\x20addresses','list','allowlist','roster'],'schema_elements':{'root_type':'vec_contains_address','table_entries':[{'value_type':'VecAddress','b_submission':![],'purpose':'Authorized\x20address\x20list\x20(Type1\x20constant)'}],'context_nodes':[{'context_type':'Signer','purpose':'Signer\x20being\x20looked\x20up\x20(Type4)'}],'tree_structure':'vec_contains_address(identifier[0],\x20context(Signer))'},'constraints':['root\x20vec_contains_address\x20returns\x20Bool','table[0]\x20must\x20be\x20VecAddress\x20type','context(Signer)\x20is\x20the\x20element\x20being\x20looked\x20up'],'example':{'root':{'type':'vec_contains_address','nodes':[{'type':'identifier','identifier':0x0},{'type':'context','context':'Signer'}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'VecAddress','value':['0xabc...','0xdef...'],'name':'Authorized\x20address\x20whitelist'}]}},{'id':'P05a','pattern_name':'Deadline\x20passed\x20(lower-bound\x20time\x20lock)','data_source_combination':'Type2\x20+\x20Type4\x20+\x20Type1\x20constant','semantic_intent':'This\x20operation\x20becomes\x20available\x20once\x20N\x20milliseconds\x20have\x20elapsed\x20since\x20the\x20current\x20node\x20was\x20entered.\x20'+'This\x20is\x20a\x20LOWER\x20bound\x20and\x20stays\x20true\x20forever\x20—\x20it\x20is\x20NOT\x20a\x20window\x20and\x20needs\x20no\x20upper\x20bound.','match_keywords':['wait','time','lock','delay','hours','days','milliseconds','after\x20delivery','cooldown','cooling'],'schema_elements':{'root_type':'logic_as_u256_greater_or_equal','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Source\x20object\x20address\x20(e.g.\x20Order,\x20Type3)\x20or\x20constant\x20(Type1)'},{'value_type':'U64','b_submission':![],'purpose':'Lock\x20duration\x20(in\x20milliseconds,\x201000\x20for\x20tests,\x20Type1\x20constant)'}],'query_nodes':[{'query_name':'progress.current_time','object_type':'Progress','convert_witness':0x64}],'context_nodes':[{'context_type':'Clock','purpose':'Current\x20on-chain\x20timestamp\x20(Type4)'}],'tree_structure':'logic_as_u256_greater_or_equal(context(Clock),\x20calc_number_add(query(1272:\x20progress.current_time,\x20witness=100,\x20identifier[0]),\x20identifier[1]))'},'constraints':['Time\x20unit\x20is\x20milliseconds;\x20use\x201000ms\x20for\x20tests\x20and\x20adjust\x20in\x20production','convert_witness=100\x20(TypeOrderProgress)\x20converts\x20from\x20Order\x20to\x20Progress','The\x20object_type\x20of\x20table[0]\x20must\x20match\x20the\x20witness\x20source\x20type\x20(Order)','calc_number_add\x20returns\x20U256,\x20context(Clock)\x20returns\x20U64,\x20auto-widened','Key:\x20use\x20progress.current_time(1272)\x20rather\x20than\x20progress.session.forward.time(1271);\x20the\x20latter\x20querying\x20an\x20unforwarded\x20session\x20returns\x200\x20and\x20disables\x20the\x20time\x20lock','CRITICAL\x20—\x20progress.current_time\x20is\x20REFRESHED\x20on\x20every\x20forward.\x20If\x20this\x20guard\x20is\x20attached\x20to\x20a\x20forward\x20that\x20also\x20changes\x20the\x20node,\x20the\x20clock\x20restarts\x20from\x20the\x20node\x20change,\x20so\x20a\x20post-transition\x20guard\x20(e.g.\x20a\x20settlement\x20allocator)\x20waits\x20its\x20full\x20duration\x20AGAIN\x20after\x20the\x20transition','Use\x20this\x20pattern\x20when\x20the\x20intent\x20is\x20\x27no\x20earlier\x20than\x20T+K\x27\x20(return\x20window\x20opening,\x20dispute\x20filing,\x20auto-settlement).\x20Do\x20NOT\x20add\x20a\x20`<=`\x20clause\x20with\x20the\x20same\x20right-hand\x20side\x20—\x20see\x20P05b'],'example':{'root':{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'calc_number_add','nodes':[{'type':'query','query':'progress.current_time','object':{'identifier':0x0,'convert_witness':0x64},'parameters':[]},{'type':'identifier','identifier':0x1}]}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'Target\x20Order\x20address','object_type':'Order'},{'identifier':0x1,'b_submission':![],'value_type':'U64','value':0x3e8,'name':'Lock\x20duration\x20(milliseconds)'}]}},{'id':'P05b','pattern_name':'Window\x20open\x20(two-sided\x20time\x20window)','data_source_combination':'Type2\x20+\x20Type4\x20+\x20Type1\x20constant','semantic_intent':'This\x20operation\x20is\x20only\x20available\x20WITHIN\x20a\x20window\x20that\x20opened\x20at\x20t\x20and\x20closes\x20at\x20t+K.\x20'+'Both\x20bounds\x20are\x20required,\x20and\x20the\x20two\x20right-hand\x20sides\x20MUST\x20differ.','match_keywords':['window','within','valid\x20until','expire','expiry','grace\x20period','only\x20before'],'schema_elements':{'root_type':'logic_and','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Source\x20object\x20address\x20(e.g.\x20Order,\x20Type3)\x20or\x20constant\x20(Type1)'},{'value_type':'U64','b_submission':![],'purpose':'Window\x20length\x20in\x20milliseconds\x20(Type1\x20constant)'}],'query_nodes':[{'query_name':'progress.current_time','object_type':'Progress','convert_witness':0x64}],'context_nodes':[{'context_type':'Clock','purpose':'Current\x20on-chain\x20timestamp\x20(Type4)'}],'tree_structure':'logic_and(\x20logic_as_u256_greater_or_equal(context(Clock),\x20query(1272:\x20progress.current_time,\x20witness=100,\x20identifier[0])),\x20'+'logic_as_u256_lesser_or_equal(context(Clock),\x20calc_number_add(query(1272:\x20progress.current_time,\x20witness=100,\x20identifier[0]),\x20identifier[1]))\x20)'},'constraints':['The\x20two\x20right-hand\x20sides\x20MUST\x20be\x20structurally\x20different:\x20lower\x20bound\x20uses\x20`t`\x20alone,\x20upper\x20bound\x20uses\x20`t\x20+\x20K`','NEVER\x20write\x20`L\x20>=\x20(t+K)`\x20together\x20with\x20`L\x20<=\x20(t+K)`\x20—\x20that\x20conjunction\x20is\x20`L\x20==\x20t+K`,\x20an\x20~1\x20ms\x20window\x20on\x20a\x20millisecond\x20Clock,\x20and\x20the\x20guarded\x20forward\x20becomes\x20unreachable\x20(lint\x20rule\x20LE-08\x20/\x20R-TIMEWINDOW-DEGENERATE\x20flags\x20it)','`logic_as_u256_greater_or_equal`\x20is\x20a\x20lower\x20bound\x20ONLY.\x20Adding\x20it\x20does\x20not\x20\x27cap\x27\x20anything\x20—\x20a\x20common\x20misreading\x20that\x20produced\x20the\x20P0-1\x20outage\x20in\x20wiki/test/10','The\x20lower\x20bound\x20`L\x20>=\x20t`\x20is\x20usually\x20redundant\x20because\x20progress.current_time\x20<=\x20Clock\x20always\x20holds;\x20keep\x20it\x20only\x20for\x20explicitness','Time\x20unit\x20is\x20milliseconds'],'example':{'root':{'type':'logic_and','nodes':[{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'query','query':'progress.current_time','object':{'identifier':0x0,'convert_witness':0x64},'parameters':[]}]},{'type':'logic_as_u256_lesser_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'calc_number_add','nodes':[{'type':'query','query':'progress.current_time','object':{'identifier':0x0,'convert_witness':0x64},'parameters':[]},{'type':'identifier','identifier':0x1}]}]}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'Target\x20Order\x20address','object_type':'Order'},{'identifier':0x1,'b_submission':![],'value_type':'U64','value':0x3e8,'name':'Window\x20length\x20(milliseconds)'}]}},{'id':'P06','pattern_name':'Progress\x20state\x20check','data_source_combination':'Type2\x20+\x20Type1\x20constant','semantic_intent':'The\x20order\x20progress\x20must\x20reach\x20the\x20specified\x20node\x20before\x20this\x20operation\x20can\x20be\x20executed','match_keywords':['progress','node','state','completed','reach','current\x20node'],'schema_elements':{'root_type':'logic_equal','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Source\x20Order\x20address\x20(Type3,\x20witness\x20source)'},{'value_type':'String','b_submission':![],'purpose':'Expected\x20node\x20name\x20(Type1\x20constant)'}],'query_nodes':[{'query_name':'progress.current','object_type':'Progress','convert_witness':0x64}],'tree_structure':'logic_equal(query(1253:\x20progress.current,\x20witness=100,\x20identifier[0]),\x20identifier[1])'},'constraints':['query\x20returns\x20String;\x20identifier[1]\x20must\x20be\x20String\x20type','logic_equal\x20comparison\x20on\x20String\x20is\x20case-sensitive','For\x20case-insensitive\x20comparison,\x20use\x20logic_string_nocase_equal','convert_witness=100\x20(TypeOrderProgress)\x20converts\x20from\x20Order','Type2\x20stacks\x20on\x20Type3:\x20the\x20source\x20object\x20Order\x20is\x20submitted\x20(b_submission=true)'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'query','query':'progress.current','object':{'identifier':0x0,'convert_witness':0x64},'parameters':[]},{'type':'identifier','identifier':0x1}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'Target\x20Order\x20address','object_type':'Order'},{'identifier':0x1,'b_submission':![],'value_type':'String','value':'Completed','name':'Expected\x20progress\x20node\x20name'}]}},{'id':'P07','pattern_name':'One-time\x20claim\x20check','data_source_combination':'Type3\x20+\x20Type1\x20constant','semantic_intent':'Users\x20can\x20only\x20claim\x20the\x20reward\x20once','match_keywords':['once','claim','duplicate','already\x20claimed','claimed\x20before'],'schema_elements':{'root_type':'logic_equal','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Reward\x20object\x20address\x20(Type3,\x20submitted)'},{'value_type':'U64','b_submission':![],'purpose':'Expected\x20historical\x20claim\x20count\x200\x20(Type1\x20constant)'}],'query_nodes':[{'query_name':'reward.record.count','object_type':'Reward'}],'tree_structure':'logic_equal(query_reward_record_count(object:\x20{\x20identifier:\x200\x20},\x20recipient:\x20context(Signer)),\x20identifier[1])'},'constraints':['query_reward_record_count\x20returns\x20U64','Comparing\x20count\x20==\x200\x20means\x20no\x20history\x20record\x20(can\x20claim)','recipient\x20defaults\x20to\x20context(Signer)\x20to\x20ensure\x20the\x20claimer\x27s\x20identity\x20is\x20bound','Type3\x20submitted\x20objects\x20must\x20have\x20constraint\x20rules\x20(here\x20the\x20constraint\x20is\x20count==0\x20and\x20recipient=Signer)'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'query_reward_record_count','object':{'identifier':0x0}},{'type':'identifier','identifier':0x1}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'Reward\x20object\x20address','object_type':'Reward'},{'identifier':0x1,'b_submission':![],'value_type':'U64','value':0x0,'name':'Expected\x20historical\x20claim\x20count\x20(0)'}]}},{'id':'P08','pattern_name':'Submitted\x20object\x20identity\x20validation','data_source_combination':'Type3\x20+\x20Type4','semantic_intent':'Verify\x20that\x20the\x20owner\x20of\x20the\x20submitted\x20object\x20matches\x20the\x20signer','match_keywords':['ownership','belonging','customer','submitted\x20object','order.customer'],'schema_elements':{'root_type':'logic_equal','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Submitted\x20Order\x20address\x20(Type3)'}],'context_nodes':[{'context_type':'Signer','purpose':'Current\x20signer\x20(Type4),\x20compared\x20with\x20order.customer'}],'query_nodes':[{'query_name':'order.customer','object_type':'Order'}],'tree_structure':'logic_equal(query(1550:\x20order.customer,\x20object:\x20{\x20identifier:\x200\x20}),\x20context(Signer))'},'constraints':['query\x20returns\x20Address,\x20context(Signer)\x20returns\x20Address,\x20types\x20compatible','Type3\x20submitted\x20object\x20constraint:\x20indirectly\x20binds\x20submitter\x20identity\x20via\x20order.customer\x20==\x20Signer','Ensures\x20callers\x20cannot\x20submit\x20other\x20users\x27\x20Order\x20addresses'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'query','query':'order.customer','object':{'identifier':0x0},'parameters':[]},{'type':'context','context':'Signer'}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'User-submitted\x20Order\x20address','object_type':'Order'}]}},{'id':'P09','pattern_name':'Submitted\x20object\x20+\x20witness\x20derivation\x20query','data_source_combination':'Type3\x20+\x20Type2\x20(source\x20is\x20Type3)','semantic_intent':'User\x20submits\x20an\x20Order\x20and\x20queries\x20the\x20Progress\x20state\x20via\x20witness','match_keywords':['submit','derive','witness','order\x20to\x20progress','convert'],'schema_elements':{'root_type':'logic_equal\x20/\x20logic_and','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Submitted\x20Order\x20address\x20(Type3,\x20witness\x20source)'},{'value_type':'String','b_submission':![],'purpose':'Expected\x20node\x20name\x20(Type1\x20constant)'}],'query_nodes':[{'query_name':'progress.current','object_type':'Progress','convert_witness':0x64}],'tree_structure':'logic_equal(query(1253:\x20progress.current,\x20object:\x20{\x20identifier:\x200,\x20convert_witness:\x20100\x20}),\x20identifier[1])'},'constraints':['Type2\x20stacks\x20on\x20Type3:\x20the\x20source\x20object\x20Order\x20has\x20b_submission=true','witness=100\x20(TypeOrderProgress)\x20derives\x20Progress\x20from\x20the\x20submitted\x20Order','query\x20returns\x20String;\x20identifier[1]\x20must\x20be\x20String\x20type','Key:\x20Type2\x20can\x20stack\x20on\x20Type1\x20or\x20Type3,\x20depending\x20on\x20the\x20source\x20object\x27s\x20b_submission'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'query','query':'progress.current','object':{'identifier':0x0,'convert_witness':0x64},'parameters':[]},{'type':'identifier','identifier':0x1}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'User-submitted\x20Order\x20address','object_type':'Order'},{'identifier':0x1,'b_submission':![],'value_type':'String','value':'Inspecting','name':'Expected\x20progress\x20node\x20name'}]}},{'id':'P10','pattern_name':'Multi-condition\x20combination\x20(AND/OR)','data_source_combination':'Type1\x20+\x20Type2\x20+\x20Type3\x20+\x20Type4\x20(combination)','semantic_intent':'Multiple\x20conditions\x20must\x20all\x20be\x20satisfied\x20(AND)\x20or\x20any\x20one\x20is\x20satisfied\x20(OR)','match_keywords':['and','simultaneously','all\x20satisfied','AND','and\x20also','also\x20need','or','any','OR','or','one\x20of'],'schema_elements':{'root_type':'logic_and\x20/\x20logic_or','table_entries':[],'tree_structure':'logic_and/logic_or([condition1,\x20condition2,\x20...])\x20—\x20each\x20condition\x20can\x20be\x20any\x20combination\x20of\x20P03-P09'},'constraints':['All\x20subnodes\x20of\x20logic_and/logic_or\x20must\x20return\x20Bool','Subnode\x20count\x202-8\x20(MAX_MULTI_OPERANDS)','Each\x20subcondition\x20can\x20be\x20any\x20node\x20that\x20returns\x20Bool','Multi-condition\x20combination\x20is\x20a\x20container\x20for\x20other\x20Patterns\x20and\x20does\x20not\x20stand\x20alone'],'example':{'root':{'type':'logic_and','nodes':[{},{}]}}},{'id':'P11','pattern_name':'Entity\x20registration\x20check','data_source_combination':'Type1\x20system\x20address\x20+\x20Type3','semantic_intent':'Verify\x20that\x20the\x20user\x20is\x20registered\x20in\x20the\x20entity\x20registrar','match_keywords':['register','entity','EntityRegistrar','member','certify'],'schema_elements':{'root_type':'logic_and','table_entries':[{'value_type':'Address','b_submission':![],'purpose':'EntityRegistrar\x20system\x20address\x200xaab\x20(Type1\x20system\x20address)'},{'value_type':'Address','b_submission':!![],'purpose':'User\x20address\x20(Type3,\x20submitted)'}],'query_nodes':[{'query_name':'entity.registrar.records','object_type':'EntityRegistrar'}],'tree_structure':'logic_and(query(1760:\x20entity.registrar.records,\x20object:\x20{\x20identifier:\x200\x20},\x20parameters:\x20[identifier[1]]),\x20...)'},'constraints':['EntityRegistrar\x20address\x20is\x20fixed\x20at\x200xaab\x20(system\x20address)','EntityLinker\x20address\x20is\x20fixed\x20at\x200xaaa','table[0]\x20has\x20is_system_address=true','query\x20parameters\x20must\x20match\x20the\x20instruction\x20definition'],'example':{'root':{'type':'logic_and','nodes':[{'type':'query','query':'entity.registrar.records','object':{'identifier':0x0},'parameters':[{'type':'identifier','identifier':0x1}]}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':'0xaab','name':'EntityRegistrar\x20system\x20address'},{'identifier':0x1,'b_submission':!![],'value_type':'Address','name':'User\x20address\x20(submitted)'}]}},{'id':'P12','pattern_name':'Dynamic\x20voting\x20weight','data_source_combination':'Type3\x20+\x20Type4\x20+\x20Type1\x20constant','semantic_intent':'Voting\x20weight\x20equals\x20the\x20reputation\x20score\x20(extracted\x20from\x20submitted\x20data)','match_keywords':['weight','vote','reputation','score','voting','weight'],'schema_elements':{'root_type':'logic_and','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Voter\x20address\x20(Type3)'},{'value_type':'U64','b_submission':!![],'purpose':'Voter\x20weight\x20(Type3,\x20extracted\x20by\x20GuardIdentifier)'}],'context_nodes':[{'context_type':'Signer','purpose':'Validate\x20voter\x20identity\x20(Type4)'}],'query_nodes':[{'query_name':'entity.registrar.records','object_type':'EntityRegistrar'}],'tree_structure':'logic_and(identity\x20check:\x20logic_equal(context(Signer),\x20identifier[0]),\x20weight\x20comparison:\x20GuardIdentifier\x20extracts\x20identifier[1])'},'constraints':['The\x20table\x20entry\x20referenced\x20by\x20GuardIdentifier\x20must\x20be\x20numeric\x20(U8-U256)','b_submission\x20must\x20be\x20true\x20(weight\x20is\x20submitted\x20at\x20runtime\x20by\x20the\x20voter)','Non-numeric\x20types\x20cause\x20E_GUARD_IDENTIFIER_NOT_NUMBER\x20error','Weight\x20value\x20is\x20cast\x20to\x20u32','voting_guard\x20scene\x20special\x20constraint:\x20GuardIdentifier\x20numeric'],'example':{'root':{'type':'logic_and','nodes':[{},{}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'Voter\x20address'},{'identifier':0x1,'b_submission':!![],'value_type':'U64','name':'Voter\x20weight\x20(extracted\x20from\x20reputation\x20score)'}]}},{'id':'P13','pattern_name':'Repository\x20data\x20query','data_source_combination':'Type1\x20+\x20Type2','semantic_intent':'Query\x20Repository\x20data\x20and\x20validate','match_keywords':['Repository','storage','data\x20source','weather','external\x20data','oracle'],'schema_elements':{'root_type':'logic_and','table_entries':[{'value_type':'Address','b_submission':![],'purpose':'Repository\x20address\x20(Type1\x20constant)'}],'query_nodes':[{'query_name':'repository.data','object_type':'Repository'}],'tree_structure':'logic_and(query(1167:\x20repository.data,\x20object:\x20{\x20identifier:\x200\x20},\x20parameters:\x20[...]),\x20[data\x20validation\x20condition])'},'constraints':['quote_guard\x20is\x20a\x20RIGID\x20verification\x20requirement:\x20any\x20guard\x20querying\x20Repository\x20data\x20with\x20quote_guard\x20must\x20satisfy\x20it','Two-phase:\x20passport\x20generation\x20scans/prepares\x20quote_guard,\x20passport\x20verification\x20re-checks\x20+\x20verifies\x20(see\x20R-X1-10)','If\x20quote_guard==None:\x20no\x20access\x20control\x20—\x20Repository\x20data\x20is\x20freely\x20queryable','rep\x20semantics:\x20repository.data\x20query\x20does\x20not\x20depend\x20on\x20runtime\x20submission,\x20so\x20rep=true'],'example':{'root':{'type':'logic_and','nodes':[{'type':'query','query':'repository.data','object':{'identifier':0x0},'parameters':[{'type':'identifier','identifier':0x1}]},{}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':'0xREPO','name':'Repository\x20address'}]}},{'id':'P14','pattern_name':'Pure\x20dependency\x20combination','data_source_combination':'None\x20(rely\x20only)','semantic_intent':'Does\x20not\x20compute\x20itself;\x20fully\x20depends\x20on\x20the\x20results\x20of\x20other\x20Guards','match_keywords':['depend','combine','reuse','rely','delegate'],'schema_elements':{'root_type':'logic_and\x20/\x20logic_or\x20(minimized\x20tautology)','table_entries':[],'tree_structure':'root:\x20minimized\x20(e.g.\x20context(Clock)\x20>=\x200,\x20tautology)\x20+\x20rely:\x20{\x20guards:\x20[...],\x20logic_or:\x20false\x20}'},'constraints':['Depended-on\x20Guards\x20must\x20have\x20rep=true\x20(repository.data\x20query\x20does\x20not\x20depend\x20on\x20runtime\x20submission)','rely.guards\x20supports\x20at\x20most\x204\x20(MAX_DEPENDED_COUNT)','Self-reference\x20is\x20forbidden','AND\x20logic:\x20all\x20dependencies\x20must\x20pass;\x20OR\x20logic:\x20any\x20one\x20passing\x20is\x20sufficient'],'example':{'root':{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'context','context':'Clock'},{'type':'identifier','identifier':0x0}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'U64','value':0x0,'name':'Tautology\x20baseline\x20value\x20(0)'}],'rely':{'guards':['guard_a','guard_b'],'logic_or':![]}}},{'id':'P15','pattern_name':'Submission\x20data\x20retention\x20pattern\x20(retained_submission)','data_source_combination':'Type3\x20+\x20Type4\x20(submission\x20+\x20system\x20context\x20binding)','semantic_intent':'Guard\x20accepts\x20runtime-submitted\x20data\x20but\x20ensures\x20it\x20is\x20trustworthy\x20via\x20Signer\x20binding\x20and\x20type\x20checking','match_keywords':['submit','retain','retained','submission','bind\x20signer','submission\x20check'],'schema_elements':{'root_type':'logic_and','table_entries':[{'value_type':'Address','b_submission':!![],'purpose':'Submitted\x20object\x20address\x20(Type3,\x20requires\x20Signer\x20binding)'},{'value_type':'U256','b_submission':!![],'purpose':'Submitted\x20numeric\x20value\x20(e.g.\x20amount,\x20weight,\x20requires\x20range\x20check)'}],'context_nodes':[{'context_type':'Signer','purpose':'Validate\x20submitter\x20identity\x20to\x20ensure\x20submission\x20data\x20ownership'}],'tree_structure':'logic_and(logic_equal(context(Signer),\x20query(...,\x20signer_field)),\x20logic_as_u256_greater_or_equal(identifier[1],\x20identifier[2]))'},'constraints':['The\x20name\x20of\x20each\x20b_submission=true\x20entry\x20must\x20be\x20a\x20complete\x20natural-language\x20description\x20(not\x20a\x20technical\x20identifier)','The\x20submitted\x20object\x20address\x20should\x20be\x20bound\x20to\x20Signer\x20(query\x20the\x20signer/owner\x20field\x20of\x20the\x20submitted\x20object\x20to\x20validate\x20ownership)','Submitted\x20numeric\x20values\x20should\x20have\x20range\x20checks\x20(>=\x20min,\x20<=\x20max)','Total\x20table\x20size\x20must\x20not\x20exceed\x2040000\x20bytes','Total\x20submission\x20bytes\x20must\x20not\x20exceed\x20'+MAX_SUBMISSION_SIZE_PASSPORT],'example':{'root':{'type':'logic_and','nodes':[{'type':'logic_equal','nodes':[{'type':'context','context':'Signer'},{'type':'query','query':0x4d5,'object':{'identifier':0x0},'parameters':[]}]},{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'identifier','identifier':0x1},{'type':'identifier','identifier':0x2}]}]},'table':[{'identifier':0x0,'b_submission':!![],'value_type':'Address','name':'Submitted\x20Order\x20object\x20address;\x20must\x20belong\x20to\x20the\x20current\x20signer'},{'identifier':0x1,'b_submission':!![],'value_type':'U256','name':'Submitted\x20amount\x20(unit:\x20MIST);\x20must\x20be\x20>=\x20minimum\x20amount'},{'identifier':0x2,'b_submission':![],'value_type':'U256','value':0xf4240,'name':'Minimum\x20amount\x20constant\x20(1\x20MIST)'}]}},{'id':'P16','pattern_name':'Circular\x20reference\x20pattern\x20(Guard\x20references\x20the\x20host\x20object\x20itself)','data_source_combination':'Type1\x20(host\x20object\x20as\x20constant,\x20using\x20name\x20instead\x20of\x20address)','semantic_intent':'Guard\x20binds\x20to\x20a\x20Host\x20Object\x20while\x20querying\x20the\x20Host\x20Object\x27s\x20own\x20fields;\x20uses\x20name\x20reference\x20to\x20achieve\x20circular\x20binding','match_keywords':['circular\x20reference','self','host','host','circular','self-reference'],'schema_elements':{'root_type':'logic_equal\x20/\x20logic_and','table_entries':[{'value_type':'Address','b_submission':![],'purpose':'Host\x20object\x20name\x20(SDK\x20resolves\x20to\x20address\x20at\x20binding\x20time)'}],'query_nodes':[{'query_name':'query_service_*\x20/\x20query_machine_*','object_type':'Service\x20/\x20Machine'}],'tree_structure':'logic_equal(query(<host_field_query>,\x20object:\x20{\x20identifier:\x200\x20}),\x20identifier[1]\x20or\x20context(Signer))'},'constraints':['The\x20Host\x20Object\x20must\x20not\x20be\x20published\x20(bPublished=false)\x20when\x20creating\x20and\x20binding\x20the\x20Guard','Use\x20the\x20Host\x20Object\x20name\x20(not\x20address)\x20in\x20the\x20table;\x20the\x20SDK\x20resolves\x20it\x20at\x20binding\x20time','The\x20Host\x20Object\x20can\x20only\x20be\x20published\x20after\x20the\x20Guard\x20is\x20bound','Guard\x20verification\x20only\x20runs\x20normally\x20after\x20the\x20Host\x20Object\x20is\x20published','Use\x20guard2file\x20to\x20export\x20Guard\x20backups\x20for\x20easy\x20rebuilding'],'example':{'root':{'type':'logic_equal','nodes':[{'type':'query','query':0x4cf,'object':{'identifier':0x0},'parameters':[]},{'type':'identifier','identifier':0x1}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':'my_service','name':'Host\x20Service\x20name\x20(circular\x20reference,\x20resolved\x20by\x20SDK\x20at\x20binding\x20time)'},{'identifier':0x1,'b_submission':![],'value_type':'Bool','value':![],'name':'Expected\x20Service\x20paused\x20state\x20(false=not\x20paused)'}]}},{'id':'P17','pattern_name':'Query\x20parameter\x20translation\x20pattern\x20(type\x20conversion\x20node\x20combination)','data_source_combination':'Type1/2\x20+\x20type\x20conversion\x20(query\x20parameter\x20type\x20translation)','semantic_intent':'Guard\x20queries\x20parameters\x20that\x20require\x20type\x20conversion\x20(e.g.\x20Address\x20→\x20U64\x20timestamp\x20key);\x20uses\x20convert_*\x20nodes\x20to\x20translate','match_keywords':['type\x20conversion','translate','convert','timestamp\x20key','parameter\x20translation','address\x20to\x20u64'],'schema_elements':{'root_type':'logic_equal\x20/\x20logic_as_u256_greater_or_equal','table_entries':[{'value_type':'Address','b_submission':![],'purpose':'Query\x20target\x20object\x20address\x20(Type1/2)'},{'value_type':'U64','b_submission':![],'purpose':'Comparison\x20baseline\x20value\x20(e.g.\x20timestamp\x20threshold)'}],'query_nodes':[{'query_name':'query_repository_data\x20/\x20query_progress_history_*','object_type':'Repository\x20/\x20Progress'}],'tree_structure':'logic_as_u256_greater_or_equal(query(<query_with_converted_param>,\x20object:\x20{\x20identifier:\x200\x20},\x20parameters:\x20[convert_number_address(identifier[1])]),\x20identifier[2])'},'constraints':['The\x20query\x20parameter\x20type\x20must\x20match\x20the\x20parameters\x20type\x20defined\x20in\x20GUARDQUERY','If\x20the\x20table\x20declares\x20Address\x20but\x20the\x20query\x20requires\x20U64,\x20convert_number_address\x20must\x20be\x20used\x20to\x20translate','The\x20input\x20type\x20of\x20convert_*\x20nodes\x20must\x20be\x20compatible\x20with\x20the\x20child\x20node\x27s\x20return\x20type','The\x20translated\x20type\x20must\x20match\x20the\x20parameters\x20definition\x20of\x20the\x20query\x20instruction','Use\x20wowok_buildin_info\x20info=\x27guard\x20instructions\x27\x20to\x20verify\x20parameter\x20types'],'example':{'root':{'type':'logic_as_u256_greater_or_equal','nodes':[{'type':'query','query':0x48f,'object':{'identifier':0x0},'parameters':[{'type':'convert_number_address','nodes':[{'type':'identifier','identifier':0x1}]}]},{'type':'identifier','identifier':0x2}]},'table':[{'identifier':0x0,'b_submission':![],'value_type':'Address','value':'0xrepo','name':'Repository\x20address\x20constant'},{'identifier':0x1,'b_submission':![],'value_type':'U64','value':0x18bcfe56800,'name':'Timestamp\x20key\x20(U64,\x20needs\x20to\x20be\x20converted\x20to\x20Address\x20for\x20Repository\x20query)'},{'identifier':0x2,'b_submission':![],'value_type':'U256','value':0x64,'name':'Expected\x20Repository\x20data\x20value'}]}}];export const SCHEMA_TO_SEMANTIC_RULES=[{'element_type':'node','type_name':'logic_equal','semantic':'Equality\x20comparison\x20(==),\x20returns\x20Bool.\x20Accepts\x20any\x20type\x20but\x20both\x20operands\x20must\x20be\x20type-compatible','return_type':'Bool','child_constraints':'2\x20child\x20nodes,\x20types\x20must\x20be\x20compatible'},{'element_type':'node','type_name':'logic_not','semantic':'Logical\x20NOT\x20(!),\x20returns\x20Bool','return_type':'Bool','child_constraints':'1\x20child\x20node,\x20must\x20be\x20Bool'},{'element_type':'node','type_name':'logic_and','semantic':'Logical\x20AND;\x20true\x20if\x20all\x20child\x20nodes\x20are\x20true','return_type':'Bool','child_constraints':'2-8\x20Bool\x20child\x20nodes\x20(MAX_MULTI_OPERANDS)'},{'element_type':'node','type_name':'logic_or','semantic':'Logical\x20OR;\x20true\x20if\x20any\x20child\x20node\x20is\x20true','return_type':'Bool','child_constraints':'2-8\x20Bool\x20child\x20nodes'},{'element_type':'node','type_name':'logic_as_u256_greater','semantic':'Numeric\x20greater\x20than\x20(>),\x20auto-widened\x20to\x20U256','return_type':'Bool','child_constraints':'2\x20numeric\x20child\x20nodes\x20(U8-U256\x20compatible)'},{'element_type':'node','type_name':'logic_as_u256_lesser','semantic':'Numeric\x20less\x20than\x20(<)','return_type':'Bool','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'logic_as_u256_equal','semantic':'Numeric\x20equality\x20(==)','return_type':'Bool','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'logic_as_u256_greater_or_equal','semantic':'Numeric\x20greater\x20than\x20or\x20equal\x20(>=)','return_type':'Bool','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'logic_as_u256_lesser_or_equal','semantic':'Numeric\x20less\x20than\x20or\x20equal\x20(<=)','return_type':'Bool','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'logic_string_contains','semantic':'String\x20contains\x20(case-sensitive)','return_type':'Bool','child_constraints':'2\x20String\x20child\x20nodes'},{'element_type':'node','type_name':'logic_string_nocase_contains','semantic':'String\x20contains\x20(case-insensitive)','return_type':'Bool','child_constraints':'2\x20String\x20child\x20nodes'},{'element_type':'node','type_name':'logic_string_nocase_equal','semantic':'String\x20equality\x20(case-insensitive)','return_type':'Bool','child_constraints':'2\x20String\x20child\x20nodes'},{'element_type':'node','type_name':'identifier','semantic':'References\x20the\x20value\x20of\x20a\x20table\x20entry.\x20The\x20data\x20source\x20type\x20depends\x20on\x20b_submission:\x20false=Type1\x20constant,\x20true=Type3\x20submitted','return_type':'Determined\x20by\x20table\x20entry\x20value_type','child_constraints':'No\x20child\x20nodes;\x20requires\x20identifier\x20field\x20to\x20reference\x20table','data_source_class':'Type1_OnChainConstant'},{'element_type':'node','type_name':'context','semantic':'Transaction\x20context\x20data\x20(Type4\x20SystemContext).\x20Signer=signer\x20address,\x20Clock=on-chain\x20timestamp\x20(U64),\x20Guard=ObjectID\x20of\x20the\x20Guard\x20currently\x20being\x20verified','return_type':'Address\x20(Signer/Guard)\x20/\x20U64\x20(Clock)','child_constraints':'No\x20child\x20nodes','data_source_class':'Type4_SystemContext'},{'element_type':'node','type_name':'query','semantic':'Queries\x20on-chain\x20object\x20data.\x20The\x20data\x20source\x20type\x20depends\x20on\x20object.convert_witness:\x20present=Type2\x20(witness-derived),\x20absent+constant=Type1,\x20absent+submitted=Type3','return_type':'Determined\x20by\x20the\x20query\x20instruction','child_constraints':'Requires\x20query\x20+\x20object\x20+\x20parameters\x20fields','data_source_class':'Type1_OnChainConstant','discovery_tool':'wowok_buildin_info(info=\x27guard\x20instructions\x27)'},{'element_type':'query','type_name':'enum_variant','semantic':'Enum-typed\x20object\x20field\x20read\x20channel.\x20\x27<field>.variant\x27\x20returns\x20the\x20U8\x20tag\x20(declaration\x20order\x20in\x20the\x20Move\x20source,\x200-based,\x20ABI-stable\x20per\x20package\x20version)\x20plus\x20one\x20payload\x20query\x20per\x20variant\x20(\x27<field>.identifier\x27\x20/\x20\x27.value\x27\x20/\x20\x27.address\x27\x20/\x20\x27.fixed\x27\x20...).\x20Both\x20are\x20non-Bool;\x20variant\x20results\x20must\x20be\x20wrapped\x20in\x20logic_as_u256_equal\x20to\x20enter\x20a\x20guard\x20tree.\x20Payload\x20queries\x20abort\x20W_FIELD_TYPE_ERROR\x20on\x20a\x20variant\x20mismatch,\x20and\x20Guards\x20have\x20no\x20short-circuit,\x20so\x20a\x20payload\x20read\x20is\x20safe\x20only\x20when\x20the\x20host\x20guarantees\x20that\x20variant\x20(mode\x20fixed\x20at\x20add\x20time)','return_type':'U8\x20(variant)\x20/\x20payload\x20type\x20(identifier:\x20U8,\x20value/fixed:\x20U32-U64,\x20address:\x20Address)','child_constraints':'query\x20node\x20+\x20object\x20+\x20parameters','data_source_class':'Type3_SubmittedObject','discovery_tool':'wowok_buildin_info(info=\x27guard\x20instructions\x27)'},{'element_type':'node','type_name':'calc_number_add','semantic':'Numeric\x20addition','return_type':'U256','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'calc_number_subtract','semantic':'Numeric\x20subtraction','return_type':'U256','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'time_until','semantic':'Saturating\x20time\x20delta:\x20max(0,\x20target\x20-\x20now)\x20in\x20ms,\x20where\x20now\x20is\x20the\x20on-chain\x20clock\x20at\x20evaluation\x20time.\x20Unlike\x20calc_number_subtract\x20it\x20never\x20aborts\x20GUARD_NUMBER_SUB_OVERFLOW\x20—\x20a\x20past\x20target\x20yields\x200\x20(deadline\x20reached).\x20Preferred\x20for\x20deadline\x20checks\x20(time\x20until\x20expiry,\x20remaining\x20window)','return_type':'U64','child_constraints':'1\x20numeric\x20child\x20node\x20(target\x20timestamp)'},{'element_type':'node','type_name':'calc_number_multiply','semantic':'Numeric\x20multiplication','return_type':'U256','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'calc_number_divide','semantic':'Numeric\x20division','return_type':'U256','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'calc_number_mod','semantic':'Numeric\x20modulo','return_type':'U256','child_constraints':'2\x20numeric\x20child\x20nodes'},{'element_type':'node','type_name':'calc_string_length','semantic':'String\x20length','return_type':'U64','child_constraints':'1\x20String\x20child\x20node'},{'element_type':'node','type_name':'calc_string_contains','semantic':'String\x20contains\x20(returns\x20Bool)','return_type':'Bool','child_constraints':'2\x20String\x20child\x20nodes'},{'element_type':'node','type_name':'calc_string_nocase_contains','semantic':'String\x20contains\x20(case-insensitive,\x20returns\x20Bool)','return_type':'Bool','child_constraints':'2\x20String\x20child\x20nodes'},{'element_type':'node','type_name':'calc_string_nocase_equal','semantic':'String\x20equality\x20(case-insensitive,\x20returns\x20Bool)','return_type':'Bool','child_constraints':'2\x20String\x20child\x20nodes'},{'element_type':'node','type_name':'calc_string_indexof','semantic':'String\x20find\x20index','return_type':'U64','child_constraints':'2\x20String\x20child\x20nodes\x20+\x20order'},{'element_type':'node','type_name':'calc_string_nocase_indexof','semantic':'String\x20find\x20index\x20(case-insensitive)','return_type':'U64','child_constraints':'2\x20String\x20child\x20nodes\x20+\x20order'},{'element_type':'node','type_name':'convert_number_address','semantic':'Number\x20→\x20Address\x20conversion\x20(e.g.\x20timestamp\x20to\x20address)','return_type':'Address','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_address_number','semantic':'Address\x20→\x20Number\x20conversion','return_type':'U256','child_constraints':'1\x20Address\x20child\x20node'},{'element_type':'node','type_name':'convert_number_string','semantic':'Number\x20→\x20String\x20conversion','return_type':'String','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_string_number','semantic':'String\x20→\x20Number\x20conversion','return_type':'U256','child_constraints':'1\x20String\x20child\x20node'},{'element_type':'node','type_name':'convert_safe_u8','semantic':'Safe\x20conversion\x20to\x20U8\x20(errors\x20on\x20overflow)','return_type':'U8','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_safe_u16','semantic':'Safe\x20conversion\x20to\x20U16','return_type':'U16','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_safe_u32','semantic':'Safe\x20conversion\x20to\x20U32','return_type':'U32','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_safe_u64','semantic':'Safe\x20conversion\x20to\x20U64','return_type':'U64','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_safe_u128','semantic':'Safe\x20conversion\x20to\x20U128','return_type':'U128','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'convert_safe_u256','semantic':'Safe\x20conversion\x20to\x20U256','return_type':'U256','child_constraints':'1\x20numeric\x20child\x20node'},{'element_type':'node','type_name':'value_type','semantic':'Returns\x20the\x20value\x27s\x20type\x20identifier\x20(U8)\x20—\x20used\x20for\x20dynamic\x20type\x20checking','return_type':'U8','child_constraints':'1\x20variable\x20child\x20node'},{'element_type':'node','type_name':'vec_length','semantic':'Vector\x20length','return_type':'U64','child_constraints':'1\x20vec\x20child\x20node'},{'element_type':'node','type_name':'vec_contains_bool','semantic':'Whether\x20the\x20vector\x20contains\x20a\x20Bool\x20value','return_type':'Bool','child_constraints':'1\x20VecBool\x20+\x201\x20Bool'},{'element_type':'node','type_name':'vec_contains_address','semantic':'Whether\x20the\x20vector\x20contains\x20an\x20Address\x20(whitelist\x20check)','return_type':'Bool','child_constraints':'1\x20VecAddress\x20+\x201\x20Address'},{'element_type':'node','type_name':'vec_contains_string','semantic':'Whether\x20the\x20vector\x20contains\x20a\x20String','return_type':'Bool','child_constraints':'1\x20VecString\x20+\x201\x20String'},{'element_type':'node','type_name':'vec_contains_string_nocase','semantic':'Whether\x20the\x20vector\x20contains\x20a\x20String\x20(case-insensitive)','return_type':'Bool','child_constraints':'1\x20VecString\x20+\x201\x20String'},{'element_type':'node','type_name':'vec_contains_number','semantic':'Whether\x20the\x20vector\x20contains\x20a\x20number','return_type':'Bool','child_constraints':'1\x20Vec*\x20+\x201\x20Number'},{'element_type':'node','type_name':'vec_indexof_bool','semantic':'Bool\x20vector\x20find\x20index','return_type':'U64','child_constraints':'VecBool\x20+\x20Bool\x20+\x20order'},{'element_type':'node','type_name':'vec_indexof_address','semantic':'Address\x20vector\x20find\x20index','return_type':'U64','child_constraints':'VecAddress\x20+\x20Address\x20+\x20order'},{'element_type':'node','type_name':'vec_indexof_string','semantic':'String\x20vector\x20find\x20index','return_type':'U64','child_constraints':'VecString\x20+\x20String\x20+\x20order'},{'element_type':'node','type_name':'vec_indexof_string_nocase','semantic':'String\x20vector\x20find\x20index\x20(case-insensitive)','return_type':'U64','child_constraints':'VecString\x20+\x20String\x20+\x20order'},{'element_type':'node','type_name':'vec_indexof_number','semantic':'Numeric\x20vector\x20find\x20index','return_type':'U64','child_constraints':'Vec*\x20+\x20Number\x20+\x20order'},{'element_type':'node','type_name':'query_reward_record_find','semantic':'Query\x20reward\x20claim\x20records\x20(returns\x20the\x20found\x20record)','return_type':'Bool','child_constraints':'Requires\x20object\x20+\x20recipient\x20+\x20where\x20+\x20find'},{'element_type':'node','type_name':'query_reward_record_count','semantic':'Query\x20reward\x20claim\x20record\x20count\x20(U64)','return_type':'U64','child_constraints':'Requires\x20object\x20+\x20recipient\x20(optional)'},{'element_type':'node','type_name':'query_reward_record_exists','semantic':'Query\x20whether\x20a\x20reward\x20claim\x20record\x20exists\x20(Bool)','return_type':'Bool','child_constraints':'Requires\x20object\x20+\x20recipient\x20(optional)'},{'element_type':'node','type_name':'query_progress_history_find','semantic':'Query\x20whether\x20a\x20specified\x20session\x20exists\x20in\x20Progress\x20history','return_type':'Bool','child_constraints':'Requires\x20object\x20+\x20where\x20+\x20find'},{'element_type':'node','type_name':'query_progress_history_session_find','semantic':'Query\x20a\x20Progress\x20session','return_type':'Bool','child_constraints':'Requires\x20object\x20+\x20historyIdx\x20+\x20where\x20+\x20find'},{'element_type':'node','type_name':'query_progress_history_session_forward_find','semantic':'Query\x20whether\x20a\x20specified\x20forward\x20exists\x20in\x20a\x20Progress\x20session','return_type':'Bool','child_constraints':'Requires\x20object\x20+\x20historyIdx\x20+\x20sessionIdx\x20+\x20where\x20+\x20find'},{'element_type':'node','type_name':'query_progress_history_session_count','semantic':'Query\x20the\x20number\x20of\x20Progress\x20sessions','return_type':'U64','child_constraints':'Requires\x20object\x20+\x20historyIdx'},{'element_type':'node','type_name':'query_progress_history_session_forward_count','semantic':'Query\x20the\x20number\x20of\x20forwards\x20in\x20a\x20Progress\x20session','return_type':'U64','child_constraints':'Requires\x20object\x20+\x20historyIdx\x20+\x20sessionIdx'},{'element_type':'node','type_name':'query_progress_history_session_forward_retained_submission_count','semantic':'Query\x20the\x20retained\x20submission\x20count\x20of\x20a\x20forward\x20in\x20a\x20Progress\x20session','return_type':'U64','child_constraints':'Requires\x20object\x20+\x20historyIdx\x20+\x20sessionIdx\x20+\x20forwardIdx'},{'element_type':'node','type_name':'query_repository_data_count_where','semantic':'Count\x20repository\x20data\x20entries\x20among\x20candidate\x20IDs\x20matching\x20the\x20BCS\x20predicate\x20(U256\x20comparison:\x20==,\x20>,\x20>=,\x20<,\x20<=,\x20closed/open\x20range;\x20plus\x20address\x20equality,\x20string\x20equal/contains/nocase-contains,\x20or\x20bool\x20equality;\x20missing/incompatible\x20skipped;\x20blob\x20type\x20auto-checked\x20against\x20the\x20policy\x20value_type)','return_type':'U64','child_constraints':'Requires\x20object\x20(Repository)\x20+\x20key\x20(String\x20entry)\x20+\x20predicate\x20+\x20ids\x20(VecAddress\x20entry)'},{'element_type':'node','type_name':'query_repository_data_sum_where','semantic':'Sum\x20(U256)\x20numeric\x20repository\x20data\x20payloads\x20among\x20candidate\x20IDs\x20matching\x20the\x20BCS\x20predicate','return_type':'U256','child_constraints':'Requires\x20object\x20(Repository)\x20+\x20key\x20(String\x20entry)\x20+\x20predicate\x20+\x20ids\x20(VecAddress\x20entry)'},{'element_type':'node','type_name':'query_repository_data_sum_where_bound','semantic':'ESCROW-BOUND\x20sum\x20(U256):\x20per-row\x20min(row\x20value,\x20order.amount\x20of\x20the\x20Order\x20the\x20row\x20id\x20names);\x20a\x20row\x20keyed\x20by\x20anything\x20that\x20is\x20not\x20an\x20Order\x20contributes\x200\x20(fail-closed)\x20—\x20a\x20row\x20cannot\x20claim\x20more\x20than\x20the\x20Order\x20actually\x20escrowed','return_type':'U256','child_constraints':'Requires\x20object\x20(Repository)\x20+\x20key\x20(String\x20entry)\x20+\x20predicate\x20+\x20ids\x20(VecAddress\x20entry\x20whose\x20ids\x20are\x20ORDER\x20addresses,\x20e.g.\x20order-keyed\x20contribution\x20rows)'},{'element_type':'node','type_name':'query_repository_data_find_where','semantic':'List\x20the\x20IDs\x20of\x20all\x20matching\x20candidates\x20in\x20candidate\x20order\x20(combine\x20with\x20vec_indexof\x20for\x20first/last,\x20vec_length\x20for\x20exists,\x20vec_contains\x20for\x20membership)','return_type':'VecAddress','child_constraints':'Requires\x20object\x20(Repository)\x20+\x20key\x20(String\x20entry)\x20+\x20predicate\x20+\x20ids\x20(VecAddress\x20entry)'},{'element_type':'node','type_name':'query_repository_data_keys_where','semantic':'Reverse\x20lookup:\x20all\x20policy\x20keys\x20whose\x20stored\x20value\x20for\x20the\x20given\x20ID\x20matches\x20the\x20BCS\x20predicate\x20(scans\x20the\x20policy\x20schema\x20and\x20probes\x20each\x20key)','return_type':'VecString','child_constraints':'Requires\x20object\x20(Repository)\x20+\x20id\x20(Address\x20entry)\x20+\x20predicate'},{'element_type':'node','type_name':'query_repository_policies_keys','semantic':'List\x20all\x20repository\x20policy\x20names\x20(the\x20valid\x20key\x20set\x20of\x20the\x20data\x20table)','return_type':'VecString','child_constraints':'Requires\x20object\x20(Repository)'},{'element_type':'witness','type_name':'TypeOrderProgress','semantic':'Reads\x20the\x20order.progress\x20field\x20from\x20an\x20Order\x20address\x20to\x20derive\x20Progress\x20(100,\x20single\x20hop)','data_source_class':'Type2_WitnessDerived','discovery_tool':'wowok_buildin_info(info=\x27guard\x20instructions\x27)'},{'element_type':'witness','type_name':'TypeOrderMachine','semantic':'Reads\x20the\x20order.machine\x20field\x20from\x20an\x20Order\x20address\x20to\x20derive\x20Machine\x20(101,\x20single\x20hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeOrderService','semantic':'Reads\x20the\x20order.service\x20field\x20from\x20an\x20Order\x20address\x20to\x20derive\x20Service\x20(102,\x20single\x20hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeProgressMachine','semantic':'Reads\x20the\x20progress.machine\x20field\x20from\x20a\x20Progress\x20address\x20to\x20derive\x20Machine\x20(103,\x20single\x20hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeArbOrder','semantic':'Reads\x20the\x20arb.order\x20field\x20from\x20an\x20Arb\x20address\x20to\x20derive\x20Order\x20(104,\x20single\x20hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeArbArbitration','semantic':'Reads\x20the\x20arb.arbitration\x20field\x20from\x20an\x20Arb\x20address\x20to\x20derive\x20the\x20parent\x20Arbitration\x20service\x20(105,\x20single\x20hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeArbProgress','semantic':'Derives\x20from\x20Arb\x20in\x20two\x20hops:\x20arb.order\x20→\x20order.progress\x20(106,\x20multi-hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeArbMachine','semantic':'Derives\x20from\x20Arb\x20in\x20two\x20hops:\x20arb.order\x20→\x20order.machine\x20(107,\x20multi-hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeArbService','semantic':'Derives\x20from\x20Arb\x20in\x20two\x20hops:\x20arb.order\x20→\x20order.service\x20(108,\x20multi-hop)','data_source_class':'Type2_WitnessDerived'},{'element_type':'witness','type_name':'TypeOrderAllocation','semantic':'Reads\x20the\x20order.allocation\x20field\x20from\x20an\x20Order\x20address\x20to\x20derive\x20the\x20escrow\x20Allocation\x20(109,\x20single\x20hop)\x20—\x20pair\x20with\x20the\x20allocation.balance\x20query\x20(1051)\x20for\x20fund\x20gates','data_source_class':'Type2_WitnessDerived'},{'element_type':'context','type_name':'Signer','semantic':'Current\x20transaction\x20signer\x20address\x20(TransactionContext.sender())','return_type':'Address','data_source_class':'Type4_SystemContext'},{'element_type':'context','type_name':'Clock','semantic':'Current\x20on-chain\x20timestamp\x20(reads\x20timestamp_ms\x20of\x20WOW_CLOCK_OBJECT_ID\x200x6)','return_type':'U64','data_source_class':'Type4_SystemContext'},{'element_type':'context','type_name':'Guard','semantic':'ObjectID\x20of\x20the\x20Guard\x20object\x20currently\x20being\x20verified\x20(self-reference,\x20rare)','return_type':'Address','data_source_class':'Type4_SystemContext'},{'element_type':'table_entry','type_name':'Bool','semantic':'Boolean\x20constant\x20or\x20submission'},{'element_type':'table_entry','type_name':'Address','semantic':'Address\x20constant\x20(Type1)\x20or\x20submission\x20(Type3).\x20Object\x20address\x20type'},{'element_type':'table_entry','type_name':'String','semantic':'String\x20constant\x20or\x20submission'},{'element_type':'table_entry','type_name':'U8','semantic':'8-bit\x20unsigned\x20integer'},{'element_type':'table_entry','type_name':'U16','semantic':'16-bit\x20unsigned\x20integer'},{'element_type':'table_entry','type_name':'U32','semantic':'32-bit\x20unsigned\x20integer'},{'element_type':'table_entry','type_name':'U64','semantic':'64-bit\x20unsigned\x20integer\x20(commonly\x20used\x20for\x20timestamps)'},{'element_type':'table_entry','type_name':'U128','semantic':'128-bit\x20unsigned\x20integer'},{'element_type':'table_entry','type_name':'U256','semantic':'256-bit\x20unsigned\x20integer\x20(auto-widening\x20target\x20for\x20numeric\x20operations)'},{'element_type':'table_entry','type_name':'VecAddress','semantic':'Address\x20vector\x20(used\x20for\x20whitelists,\x20Type1\x20constant)'},{'element_type':'table_entry','type_name':'VecString','semantic':'String\x20vector'},{'element_type':'table_entry','type_name':'VecU64','semantic':'U64\x20vector'},{'element_type':'table_entry','type_name':'VecU8','semantic':'U8\x20vector\x20(raw\x20bytes)'},{'element_type':'table_entry','type_name':'Value','semantic':'Dynamic\x20type\x20(19,\x20first\x20byte\x20is\x20the\x20type\x20identifier)\x20—\x20used\x20for\x20Repository\x20data,\x20EntityRegistrar\x20records,\x20Passport\x20submission\x20value'},{'element_type':'rely','type_name':'rely_and','semantic':'Depends\x20on\x20other\x20Guards,\x20AND\x20logic\x20(all\x20must\x20pass).\x20Depended-on\x20Guards\x20must\x20have\x20rep=true','child_constraints':'At\x20most\x204\x20dependencies,\x20each\x20with\x20rep=true\x20(repository.data\x20query\x20does\x20not\x20depend\x20on\x20submission)'},{'element_type':'rely','type_name':'rely_or','semantic':'Depends\x20on\x20other\x20Guards,\x20OR\x20logic\x20(any\x20one\x20passing\x20is\x20sufficient).\x20Depended-on\x20Guards\x20must\x20have\x20rep=true','child_constraints':'At\x20most\x204\x20dependencies,\x20each\x20with\x20rep=true'}];export const GUARD_CONSTRAINT_RULES=[{'id':'ROOT_01','name':'root\x20returns\x20Bool','description':'The\x20Guard\x20root\x20node\x20must\x20return\x20a\x20Bool\x20type','category':'root','phase':'creation','validation_logic':'root.node_type\x20must\x20be\x20in\x20the\x20allowedTypes\x20list\x20(logic_*,\x20calc_string_contains,\x20vec_contains_*,\x20query_reward_record_exists,\x20query[Bool\x20return],\x20identifier[Bool\x20type])','failure_message':'Guard\x20root\x20node\x20must\x20be\x20an\x20operation\x20that\x20returns\x20Bool','verification_location':'SDK\x20buildNode(root,\x20ValueType.Bool,\x20...)','pitfall_number':0x7},{'id':'TABLE_01','name':'identifier\x20uniqueness','description':'Each\x20identifier\x20in\x20the\x20table\x20must\x20be\x20unique\x20(0-255)','category':'table','phase':'creation','validation_logic':'No\x20duplicate\x20identifiers\x20in\x20the\x20table','failure_message':'Duplicate\x20table\x20identifier','verification_location':'SDK\x20lodash\x20groupBy'},{'id':'TABLE_02','name':'identifier\x20referential\x20integrity','description':'Every\x20identifier\x20node\x20in\x20the\x20computation\x20tree\x20must\x20exist\x20in\x20the\x20table','category':'table','phase':'creation','validation_logic':'Traverse\x20the\x20computation\x20tree;\x20each\x20identifier\x20node\x27s\x20index\x20exists\x20in\x20the\x20table','failure_message':'Identifier\x20not\x20found\x20in\x20table','verification_location':'SDK\x20buildNode','pitfall_number':0x1},{'id':'TABLE_03','name':'Constant\x20entries\x20must\x20have\x20a\x20value','description':'Entries\x20with\x20b_submission=false\x20must\x20have\x20a\x20value\x20field','category':'table','phase':'creation','validation_logic':'All\x20entries\x20with\x20b_submission=false\x20have\x20a\x20non-empty\x20value\x20field','failure_message':'Constant\x20table\x20entry\x20must\x20have\x20a\x20value','verification_location':'SDK\x20operate'},{'id':'TABLE_04','name':'table\x20size\x20limit','description':'At\x20most\x20256\x20entries;\x20serialized\x20size\x20must\x20not\x20exceed\x2040000\x20bytes','category':'table','phase':'creation','validation_logic':'table.length\x20<=\x20256\x20&&\x20serialize(table).length\x20<=\x2040000','failure_message':'Table\x20exceeds\x20size\x20limit\x20(256\x20entries\x20or\x2040000\x20bytes)','verification_location':'Move\x20guard\x20creation'},{'id':'TABLE_05','name':'submission\x20entry\x20value\x20is\x201\x20byte\x20(type\x20code\x20only)','description':'Entries\x20with\x20b_submission=true\x20have\x20a\x20serialized\x20value\x20of\x20just\x201\x20byte\x20(the\x20type\x20code)','category':'table','phase':'creation','validation_logic':'When\x20b_submission=true,\x20bcsValue.length\x20===\x201\x20and\x20bcsValue[0]\x20===\x20valueType','failure_message':'Submission\x20table\x20entry\x20value\x20must\x20be\x201\x20byte\x20(type\x20code\x20only)','verification_location':'native\x20deserialize_constants'},{'id':'QUERY_01','name':'query\x20instruction\x20valid','description':'The\x20query\x20field\x20of\x20a\x20query\x20node\x20must\x20be\x20a\x20valid\x20GUARDQUERY\x20ID\x20or\x20name','category':'query','phase':'creation','validation_logic':'The\x20query\x20field\x20exists\x20in\x20GUARDQUERY\x20(via\x20isValidGuardQueryIdOrName)','failure_message':'Invalid\x20Guard\x20query\x20instruction','verification_location':'SDK\x20getGuardQueryInfo','pitfall_number':0x3},{'id':'QUERY_02','name':'query\x20parameter\x20count\x20match','description':'The\x20number\x20and\x20types\x20of\x20parameters\x20in\x20a\x20query\x20node\x20must\x20match\x20the\x20instruction\x20definition','category':'query','phase':'creation','validation_logic':'parameters.length\x20===\x20instruction.parameters.length\x20&&\x20type-compatible','failure_message':'Query\x20parameter\x20count\x20or\x20type\x20mismatch','verification_location':'SDK\x20buildNode','pitfall_number':0x3},{'id':'QUERY_03','name':'query\x20return\x20type\x20compatible','description':'The\x20return\x20type\x20of\x20a\x20query\x20node\x20must\x20be\x20compatible\x20with\x20the\x20parent\x20node\x27s\x20expected\x20type','category':'query','phase':'creation','validation_logic':'checkType(query.return_type,\x20parent.expected_type)','failure_message':'Query\x20return\x20type\x20incompatible\x20with\x20parent\x20node','verification_location':'SDK\x20checkType'},{'id':'QUERY_04','name':'query\x20object\x20identifier\x27s\x20value_type\x20is\x20Address','description':'The\x20table\x20entry\x20referenced\x20by\x20query\x20node\x27s\x20object.identifier\x20must\x20have\x20value_type\x20of\x20Address','category':'query','phase':'creation','validation_logic':'table[object.identifier].value_type\x20===\x20Address','failure_message':'Query\x20object\x20identifier\x20must\x20reference\x20an\x20Address-type\x20table\x20entry','verification_location':'SDK\x20buildNode\x20L603-609'},{'id':'QUERY_05','name':'enum\x20variant\x20query\x20is\x20U8,\x20not\x20Bool','description':'A\x20\x27<field>.variant\x27\x20query\x20returns\x20the\x20enum\x20tag\x20as\x20U8.\x20It\x20can\x20never\x20be\x20a\x20Guard\x20root\x20and\x20never\x20a\x20direct\x20logic_and/logic_or\x20child;\x20it\x20must\x20be\x20compared\x20(logic_as_u256_equal)\x20inside\x20a\x20Bool-producing\x20node','category':'query','phase':'creation','validation_logic':'query.return\x20===\x20U8\x20=>\x20parent/root\x20must\x20wrap\x20it\x20in\x20a\x20numeric\x20comparison','failure_message':'Guard\x20root\x20node\x20must\x20be\x20an\x20operation\x20that\x20returns\x20Bool\x20(variant\x20query\x20returns\x20U8)','verification_location':'MCP\x20guard\x20schema\x20(isBoolReturningQuery\x20/\x20CallGuard_RootSchema)','pitfall_number':0x7},{'id':'QUERY_06','name':'enum\x20payload\x20query\x20is\x20variant-strict,\x20and\x20Guards\x20do\x20not\x20short-circuit','description':'A\x20payload\x20query\x20(identifier/value/address/fixed)\x20aborts\x20with\x20W_FIELD_TYPE_ERROR\x20when\x20the\x20stored\x20enum\x20variant\x20is\x20not\x20the\x20one\x20it\x20reads.\x20Guard\x20evaluation\x20has\x20no\x20short-circuit\x20—\x20logic_and/logic_or\x20operands\x20are\x20all\x20evaluated\x20before\x20combining\x20and\x20any\x20query\x20error\x20aborts\x20the\x20whole\x20verification\x20—\x20so\x20a\x20payload\x20read\x20can\x20never\x20be\x20made\x20safe\x20by\x20a\x20sibling\x20variant\x20test','category':'query','phase':'runtime','validation_logic':'Design-time:\x20only\x20submit\x20a\x20payload\x20query\x20when\x20the\x20host\x20guarantees\x20that\x20variant\x20(mode\x20fixed\x20at\x20add\x20time);\x20never\x20pair\x20it\x20with\x20a\x20variant\x20comparison\x20as\x20a\x20runtime\x20guard','failure_message':'W_FIELD_TYPE_ERROR\x20at\x20verification\x20time\x20(variant\x20mismatch);\x20the\x20whole\x20Guard\x20fails,\x20it\x20does\x20not\x20evaluate\x20to\x20false','verification_location':'native\x20object\x20query\x20handlers\x20+\x20the\x20passport\x20verification\x20entry\x20that\x20runs\x20the\x20guard'},{'id':'WITNESS_01','name':'witness\x20type\x20valid','description':'convert_witness\x20must\x20be\x20a\x20valid\x20WitnessType\x20(100-109)','category':'witness','phase':'creation','validation_logic':'The\x20witness\x20value\x20is\x20within\x20the\x20range\x20allowed\x20by\x20WitnessTypeSchema\x20(100-109)','failure_message':'Invalid\x20witness\x20type','verification_location':'SDK\x20isWitnessType','pitfall_number':0x4},{'id':'WITNESS_02','name':'witness\x20target\x20matches\x20query\x20objectType','description':'The\x20witness\x27s\x20target\x20type\x20must\x20match\x20the\x20query\x20instruction\x27s\x20objectType','category':'witness','phase':'creation','validation_logic':'witness.target_type\x20===\x20instruction.objectType','failure_message':'Witness\x20target\x20type\x20does\x20not\x20match\x20query\x20object\x20type','verification_location':'SDK\x20buildNode\x20L613-619','pitfall_number':0x4},{'id':'WITNESS_03','name':'witness\x20source\x20matches\x20tableItem\x20object_type','description':'The\x20witness\x27s\x20source\x20type\x20must\x20match\x20the\x20object_type\x20declared\x20in\x20the\x20table\x20entry\x20(if\x20declared)','category':'witness','phase':'creation','validation_logic':'table[identifier].object_type\x20===\x20witness.source_type\x20(if\x20tableItem.object_type\x20is\x20declared)','failure_message':'Witness\x20source\x20type\x20does\x20not\x20match\x20table\x20entry\x20object_type','verification_location':'SDK\x20buildNode\x20L622-631','pitfall_number':0x4},{'id':'RELY_01','name':'rely\x20dependency\x20count\x20≤\x204','description':'rely.guards\x20supports\x20at\x20most\x204\x20dependencies\x20(MAX_DEPENDED_COUNT)','category':'rely','phase':'creation','validation_logic':'rely.guards.length\x20<=\x204','failure_message':'Rely\x20dependencies\x20exceed\x20limit\x20(4)','verification_location':'SDK\x20reliesAdd'},{'id':'RELY_02','name':'rely\x20dependency\x20rep=true','description':'All\x20rely-depended\x20Guards\x20must\x20have\x20rep=true\x20(repository.data\x20query\x20does\x20not\x20depend\x20on\x20runtime\x20submission)','category':'rely','phase':'creation','validation_logic':'Query\x20each\x20depended\x20Guard\x27s\x20rep\x20field;\x20must\x20be\x20true','failure_message':'Rely\x20dependency\x20has\x20rep=false\x20(not\x20standalone)','verification_location':'Move\x20guard\x20rely\x20registration','pitfall_number':0x8},{'id':'RELY_03','name':'rely\x20forbids\x20self-reference','description':'A\x20Guard\x20cannot\x20depend\x20on\x20itself','category':'rely','phase':'creation','validation_logic':'rely.guards\x20does\x20not\x20contain\x20the\x20current\x20Guard\x27s\x20address','failure_message':'Guard\x20cannot\x20rely\x20on\x20itself','verification_location':'SDK\x20reliesAdd'},{'id':'BINDING_01','name':'voting_guard\x20GuardIdentifier\x20numeric','description':'The\x20table\x20entry\x20referenced\x20by\x20Arbitration\x20voting_guard\x27s\x20GuardIdentifier\x20must\x20be\x20of\x20a\x20numeric\x20type','category':'binding','phase':'creation','validation_logic':'If\x20binding=voting_guard,\x20the\x20table\x20entry\x20pointed\x20to\x20by\x20GuardIdentifier\x20has\x20value_type\x20in\x20[U8,U16,U32,U64,U128,U256]','failure_message':'E_GUARD_IDENTIFIER_NOT_NUMBER:\x20voting_guard\x20weight\x20must\x20be\x20numeric','verification_location':'Move\x20Arbitration','pitfall_number':0x9},{'id':'BINDING_02','name':'Repository\x20id_from_submission\x20Address','description':'The\x20table\x20entry\x20referenced\x20by\x20Repository\x20write_guard\x27s\x20id_from_submission\x20must\x20be\x20of\x20Address\x20type','category':'binding','phase':'creation','validation_logic':'If\x20binding=write_guard\x20and\x20id_from_submission\x20is\x20set,\x20table[id_from_submission].value_type\x20===\x20Address','failure_message':'Repository\x20id_from_submission\x20must\x20be\x20Address\x20type','verification_location':'Move\x20Repository'},{'id':'BINDING_03','name':'Repository\x20data_from_submission\x20type\x20match','description':'The\x20table\x20entry\x20referenced\x20by\x20Repository\x20write_guard\x27s\x20data_from_submission\x20must\x20match\x20the\x20Repository\x20value_type','category':'binding','phase':'creation','validation_logic':'If\x20binding=write_guard\x20and\x20data_from_submission\x20is\x20set,\x20table[data_from_submission].value_type\x20===\x20Repository.value_type','failure_message':'Repository\x20data_from_submission\x20type\x20mismatch','verification_location':'Move\x20Repository'},{'id':'INPUT_01','name':'root\x20byte\x20stream\x20non-empty','description':'The\x20serialized\x20byte\x20stream\x20of\x20root\x20cannot\x20be\x20empty','category':'input','phase':'creation','validation_logic':'input.length\x20>\x200','failure_message':'Input\x20cannot\x20be\x20empty','verification_location':'SDK\x20newGuard'},{'id':'INPUT_02','name':'root\x20byte\x20stream\x20≤\x20MAX_INPUT_SIZE','description':'The\x20serialized\x20byte\x20stream\x20of\x20root\x20must\x20not\x20exceed\x20MAX_INPUT_SIZE','category':'input','phase':'creation','validation_logic':'input.length\x20<=\x20MAX_INPUT_SIZE','failure_message':'Input\x20size\x20exceeds\x20maximum\x20limit','verification_location':'SDK\x20newGuard'},{'id':'IMMUTABLE_01','name':'Guard\x20immutable=true\x20after\x20creation','description':'After\x20creation,\x20a\x20Guard\x20cannot\x20be\x20modified\x20or\x20deleted\x20(CREATE-only)','category':'immutable','phase':'creation','validation_logic':'After\x20the\x20Guard\x20is\x20created,\x20the\x20immutable\x20field\x20is\x20set\x20to\x20true','failure_message':'Guard\x20is\x20immutable\x20after\x20creation','verification_location':'Move\x20guard\x20creation'},{'id':'RUN_IMMUTABLE_01','name':'Guard\x20must\x20be\x20immutable=true\x20to\x20verify','description':'At\x20runtime\x20verification,\x20the\x20Guard\x20must\x20be\x20frozen\x20(immutable=true)','category':'immutable','phase':'runtime','validation_logic':'guard.immutable\x20===\x20true','failure_message':'Guard\x20must\x20be\x20immutable\x20to\x20verify','verification_location':'native\x20guard\x20verification\x20L497-506'},{'id':'RUN_SUB_01','name':'submission\x20type\x20byte\x20matches\x20table\x20declaration','description':'The\x20value[0]\x20(type\x20byte)\x20of\x20submission\x20must\x20match\x20the\x20value_type\x20declared\x20in\x20the\x20table','category':'table','phase':'runtime','validation_logic':'submissionValue[0]\x20===\x20table[identifier].value_type','failure_message':'Submission\x20type\x20byte\x20does\x20not\x20match\x20table\x20declaration','verification_location':'native\x20parse_table_items\x20L306'},{'id':'RUN_SUB_02','name':'table\x20entries\x20with\x20b_submission=true\x20must\x20be\x20found\x20in\x20submission','description':'All\x20table\x20entries\x20declared\x20as\x20submitted\x20must\x20have\x20corresponding\x20submission\x20data','category':'table','phase':'runtime','validation_logic':'forall\x20identifier\x20in\x20table\x20where\x20b_submission=true:\x20identifier\x20in\x20submission_map','failure_message':'Missing\x20submission\x20for\x20declared\x20b_submission=true\x20table\x20entry','verification_location':'native\x20parse_table_items\x20L301-321'},{'id':'RUN_SUB_03','name':'submission\x20total\x20bytes\x20≤\x20MAX_SUBMISSION_SIZE_PASSPORT\x20('+MAX_SUBMISSION_SIZE_PASSPORT+')','description':'The\x20total\x20bytes\x20of\x20all\x20data\x20submitted\x20at\x20runtime\x20must\x20not\x20exceed\x20'+MAX_SUBMISSION_SIZE_PASSPORT,'category':'table','phase':'runtime','validation_logic':'total_submission_bytes\x20<=\x20'+MAX_SUBMISSION_SIZE_PASSPORT,'failure_message':'Submission\x20exceeds\x20MAX_SUBMISSION_SIZE_PASSPORT\x20('+MAX_SUBMISSION_SIZE_PASSPORT+'\x20bytes)','verification_location':'Move\x20verify\x20L252'},{'id':'RUN_WITNESS_01','name':'witness\x20derivation\x20source\x20object\x20must\x20have\x20the\x20required\x20relation\x20field','description':'When\x20witness\x20conversion\x20occurs,\x20the\x20source\x20object\x20must\x20contain\x20the\x20relation\x20field\x20needed\x20for\x20derivation','category':'witness','phase':'runtime','validation_logic':'The\x20source\x20object\x20exists\x20and\x20contains\x20the\x20field\x20required\x20for\x20witness\x20derivation\x20(e.g.\x20order.progress\x20field\x20is\x20non-empty)','failure_message':'Witness\x20source\x20object\x20missing\x20required\x20field\x20for\x20derivation','verification_location':'native\x20convert_witness'},{'id':'RUN_WITNESS_02','name':'witness-derived\x20target\x20object\x20must\x20exist','description':'The\x20target\x20object\x20derived\x20by\x20witness\x20must\x20exist\x20on-chain','category':'witness','phase':'runtime','validation_logic':'The\x20derived\x20target\x20object\x20ID\x20exists\x20on-chain','failure_message':'Witness\x20derived\x20target\x20object\x20does\x20not\x20exist','verification_location':'native\x20convert_witness'},{'id':'RUN_QUERY_01','name':'query\x20target\x20object\x20must\x20exist\x20and\x20type\x20match','description':'The\x20target\x20object\x20of\x20a\x20query\x20must\x20exist\x20on-chain\x20and\x20its\x20type\x20must\x20match','category':'query','phase':'runtime','validation_logic':'Target\x20object\x20exists\x20&&\x20object\x20type\x20matches\x20query.objectType','failure_message':'Query\x20target\x20object\x20does\x20not\x20exist\x20or\x20type\x20mismatch','verification_location':'native\x20process_object_query'},{'id':'RUN_IMPACK_01','name':'at\x20least\x20one\x20impack\x20guard','description':'Passport\x20verification\x20requires\x20at\x20least\x20one\x20impack\x20guard','category':'runtime','phase':'runtime','validation_logic':'impack_list.length\x20>=\x201\x20(note:\x20impack_list\x20is\x20always\x20empty\x20during\x20verify\x20phase;\x20this\x20constraint\x20is\x20checked\x20in\x20result_for_permission\x20phase)','failure_message':'No\x20impack\x20guard\x20found','verification_location':'Move\x20verify\x20L281'},{'id':'RUN_IMPACK_02','name':'impack\x20guard\x20failure\x20fails\x20the\x20entire\x20passport','description':'If\x20any\x20impack\x20guard\x20verification\x20fails,\x20the\x20entire\x20passport\x20verification\x20fails','category':'runtime','phase':'runtime','validation_logic':'forall\x20guard\x20in\x20impack_list:\x20guard.result\x20===\x20true','failure_message':'Impack\x20guard\x20verification\x20failed','verification_location':'Move\x20verify\x20L270-275'},{'id':'RUN_TX_01','name':'Passport\x20tx_hash\x20must\x20match\x20the\x20current\x20transaction','description':'The\x20tx_hash\x20recorded\x20in\x20the\x20Passport\x20must\x20match\x20the\x20hash\x20of\x20the\x20currently\x20executing\x20transaction','category':'runtime','phase':'runtime','validation_logic':'passport.tx_hash\x20===\x20current_tx_hash','failure_message':'Passport\x20tx_hash\x20does\x20not\x20match\x20current\x20transaction','verification_location':'Move\x20verify\x20L231'},{'id':'RUN_RELY_01','name':'rely\x20guard\x20must\x20have\x20been\x20added\x20to\x20passport','description':'Guards\x20relied\x20on\x20must\x20have\x20been\x20registered\x20in\x20the\x20passport','category':'rely','phase':'runtime','validation_logic':'forall\x20guard\x20in\x20rely.guards:\x20guard\x20in\x20passport.relies','failure_message':'Rely\x20guard\x20not\x20added\x20to\x20passport','verification_location':'Move\x20rely\x20result\x20computation'}];export function matchSemanticPattern(a){const b=a['toLowerCase']();return SEMANTIC_TO_SCHEMA_RULES['filter'](c=>c['match_keywords']['some'](d=>b['includes'](d['toLowerCase']())));}export function explainNode(a){return SCHEMA_TO_SEMANTIC_RULES['find'](b=>b['element_type']==='node'&&b['type_name']===a);}export function explainWitness(a){const b={0x64:'TypeOrderProgress',0x65:'TypeOrderMachine',0x66:'TypeOrderService',0x67:'TypeProgressMachine',0x68:'TypeArbOrder',0x69:'TypeArbArbitration',0x6a:'TypeArbProgress',0x6b:'TypeArbMachine',0x6c:'TypeArbService',0x6d:'TypeOrderAllocation'},c=b[a];return SCHEMA_TO_SEMANTIC_RULES['find'](d=>d['element_type']==='witness'&&d['type_name']===c);}export function explainContext(a){return SCHEMA_TO_SEMANTIC_RULES['find'](b=>b['element_type']==='context'&&b['type_name']===a);}export function getConstraintsByCategory(a){return GUARD_CONSTRAINT_RULES['filter'](b=>b['category']===a);}export function getConstraintsByPhase(a){return GUARD_CONSTRAINT_RULES['filter'](b=>b['phase']===a);}export function getPatternById(a){return SEMANTIC_TO_SCHEMA_RULES['find'](b=>b['id']===a);}export function getDataSourceCombinations(){return[...new Set(SEMANTIC_TO_SCHEMA_RULES['map'](a=>a['data_source_combination']))];}