@wowok/agent-mcp 3.3.1 → 3.3.3

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 (277) hide show
  1. package/dist/chain-semantics/field-capability.js +1 -1
  2. package/dist/chain-semantics/freeze-map.js +1 -1
  3. package/dist/chain-semantics/fund-flow.js +1 -1
  4. package/dist/chain-semantics/guard-verbs.js +1 -1
  5. package/dist/chain-semantics/object-graph.js +1 -1
  6. package/dist/composition/audit.d.ts +5 -0
  7. package/dist/composition/audit.js +1 -1
  8. package/dist/composition/blueprint-view.d.ts +0 -1
  9. package/dist/composition/blueprint-view.js +1 -1
  10. package/dist/composition/compile.d.ts +5 -3
  11. package/dist/composition/compile.js +1 -1
  12. package/dist/composition/inflight.d.ts +32 -4
  13. package/dist/composition/inflight.js +1 -1
  14. package/dist/config/judgment.d.ts +111 -1
  15. package/dist/config/judgment.js +1 -1
  16. package/dist/customer/industry-risks.js +1 -1
  17. package/dist/customer/user-preferences.js +1 -1
  18. package/dist/evaluation/arbitration-game.d.ts +4 -0
  19. package/dist/evaluation/arbitration-game.js +1 -1
  20. package/dist/evaluation/builtins/graph-service.js +1 -1
  21. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  22. package/dist/evaluation/game-strategy.d.ts +6 -0
  23. package/dist/evaluation/game-strategy.js +1 -1
  24. package/dist/evaluation/node-game.d.ts +4 -0
  25. package/dist/evaluation/node-game.js +1 -1
  26. package/dist/evaluation/value-risk.d.ts +8 -0
  27. package/dist/evaluation/value-risk.js +1 -0
  28. package/dist/experience/realtime-feedback.js +1 -1
  29. package/dist/extensions/business-modules.d.ts +7 -2
  30. package/dist/extensions/business-modules.js +1 -1
  31. package/dist/extensions/industry-audit.spec.js +1 -1
  32. package/dist/extensions/industry-pack.d.ts +3 -2
  33. package/dist/extensions/industry-pack.js +1 -1
  34. package/dist/extensions/modes.js +1 -1
  35. package/dist/graph/onchain/analyze.js +1 -1
  36. package/dist/graph/onchain/analyze.spec.js +1 -1
  37. package/dist/graph/onchain/expand.js +1 -1
  38. package/dist/graph/onchain/exposure.js +1 -1
  39. package/dist/graph/onchain/facet-projection.js +1 -1
  40. package/dist/graph/onchain/facet-projection.spec.js +1 -1
  41. package/dist/graph/onchain/facts.d.ts +20 -0
  42. package/dist/graph/onchain/facts.js +1 -1
  43. package/dist/graph/onchain/facts.spec.js +1 -1
  44. package/dist/graph/onchain/object-held-receipts.d.ts +20 -0
  45. package/dist/graph/onchain/object-held-receipts.js +1 -0
  46. package/dist/graph/onchain/object-held-receipts.spec.d.ts +1 -0
  47. package/dist/graph/onchain/object-held-receipts.spec.js +1 -0
  48. package/dist/graph/onchain/project-relationship.js +1 -1
  49. package/dist/graph/onchain/sdk-batch.d.ts +1 -0
  50. package/dist/graph/onchain/sdk-batch.js +1 -1
  51. package/dist/harness/index.d.ts +1 -0
  52. package/dist/harness/recover.d.ts +2 -1
  53. package/dist/harness/recover.js +1 -1
  54. package/dist/knowledge/acquisition-flywheel.js +1 -1
  55. package/dist/knowledge/allocation-ledger.d.ts +3 -1
  56. package/dist/knowledge/allocation-ledger.js +1 -1
  57. package/dist/knowledge/allocation-puzzle.d.ts +1 -0
  58. package/dist/knowledge/allocation-puzzle.js +1 -1
  59. package/dist/knowledge/allocation-risk.d.ts +1 -1
  60. package/dist/knowledge/allocation-risk.js +1 -1
  61. package/dist/knowledge/arb-fund-facts.d.ts +12 -0
  62. package/dist/knowledge/arb-fund-facts.js +1 -1
  63. package/dist/knowledge/audit-rules.d.ts +4 -3
  64. package/dist/knowledge/audit-rules.js +1 -1
  65. package/dist/knowledge/baselines/judgment-baselines.json +502 -81
  66. package/dist/knowledge/baselines/rules/allocation.json +0 -14
  67. package/dist/knowledge/baselines/rules/graph.json +4 -4
  68. package/dist/knowledge/baselines/rules/plan.json +81 -5
  69. package/dist/knowledge/baselines/rules/reward.json +1 -1
  70. package/dist/knowledge/builtin-templates.d.ts +9 -1
  71. package/dist/knowledge/builtin-templates.js +1 -1
  72. package/dist/knowledge/discount-threshold.js +1 -1
  73. package/dist/knowledge/event-semantics.js +1 -1
  74. package/dist/knowledge/game-scenarios.d.ts +21 -0
  75. package/dist/knowledge/game-scenarios.js +1 -0
  76. package/dist/knowledge/getting-started.js +1 -1
  77. package/dist/knowledge/guard-bindings.js +1 -1
  78. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  79. package/dist/knowledge/guard-design-patterns.js +1 -1
  80. package/dist/knowledge/guard-field-cognition.js +1 -1
  81. package/dist/knowledge/guard-leg-map.d.ts +5 -0
  82. package/dist/knowledge/guard-leg-map.js +1 -0
  83. package/dist/knowledge/guard-lint.js +1 -1
  84. package/dist/knowledge/guard-puzzle.js +1 -1
  85. package/dist/knowledge/guard-render.js +1 -1
  86. package/dist/knowledge/guard-risk.js +1 -1
  87. package/dist/knowledge/guard-submission-brief.d.ts +5 -0
  88. package/dist/knowledge/guard-submission-brief.js +1 -1
  89. package/dist/knowledge/guard-submission-prompt.d.ts +2 -1
  90. package/dist/knowledge/guard-submission-prompt.js +1 -1
  91. package/dist/knowledge/guard-templates.d.ts +1 -1
  92. package/dist/knowledge/guard-templates.js +1 -1
  93. package/dist/knowledge/guard-translation.js +1 -1
  94. package/dist/knowledge/index.js +1 -1
  95. package/dist/knowledge/industry-generalizer.js +1 -1
  96. package/dist/knowledge/industry-registry.js +1 -1
  97. package/dist/knowledge/industry-strategy.js +1 -1
  98. package/dist/knowledge/jsonrpc-enum.js +1 -1
  99. package/dist/knowledge/onchain-constants.d.ts +4 -2
  100. package/dist/knowledge/onchain-constants.js +1 -1
  101. package/dist/knowledge/order-ledger.d.ts +1 -1
  102. package/dist/knowledge/order-ledger.js +1 -1
  103. package/dist/knowledge/order-puzzle.d.ts +3 -0
  104. package/dist/knowledge/order-risk.d.ts +1 -1
  105. package/dist/knowledge/passport-ledger.d.ts +12 -0
  106. package/dist/knowledge/passport-ledger.js +1 -1
  107. package/dist/knowledge/payment-tracker.js +1 -1
  108. package/dist/knowledge/protocol-facts.d.ts +1 -0
  109. package/dist/knowledge/protocol-facts.js +1 -1
  110. package/dist/knowledge/repository-write-semantics.d.ts +1 -1
  111. package/dist/knowledge/repository-write-semantics.js +1 -1
  112. package/dist/knowledge/reward-ledger.js +1 -1
  113. package/dist/knowledge/reward-puzzle.d.ts +1 -1
  114. package/dist/knowledge/reward-risk.d.ts +1 -1
  115. package/dist/knowledge/scenario-modes.d.ts +2 -2
  116. package/dist/knowledge/scenario-modes.js +1 -1
  117. package/dist/knowledge/scenario-topology.js +1 -1
  118. package/dist/knowledge/service-ledger.d.ts +14 -0
  119. package/dist/knowledge/service-ledger.js +1 -1
  120. package/dist/knowledge/strategy-manuals.js +1 -1
  121. package/dist/knowledge/template-index.d.ts +19 -0
  122. package/dist/knowledge/template-index.js +1 -0
  123. package/dist/knowledge/template-loader.d.ts +36 -0
  124. package/dist/knowledge/template-loader.js +1 -1
  125. package/dist/knowledge/template-registry.js +1 -1
  126. package/dist/knowledge/template-scanner.d.ts +11 -0
  127. package/dist/knowledge/template-scanner.js +1 -1
  128. package/dist/knowledge/tool-constraints.js +1 -1
  129. package/dist/knowledge/workflow-guidance.d.ts +2 -0
  130. package/dist/knowledge/workflow-guidance.js +1 -1
  131. package/dist/monitor/MonitorLoop.js +1 -1
  132. package/dist/participation/allocation-advice.d.ts +8 -1
  133. package/dist/participation/allocation-advice.js +1 -1
  134. package/dist/participation/game-context.d.ts +25 -0
  135. package/dist/participation/game-context.js +1 -0
  136. package/dist/participation/node-action-advisor.d.ts +64 -0
  137. package/dist/participation/node-action-advisor.js +1 -0
  138. package/dist/participation/radar-core.d.ts +1 -0
  139. package/dist/participation/radar-core.js +1 -1
  140. package/dist/persona/defaults.js +1 -1
  141. package/dist/persona/topology-focus.js +1 -1
  142. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  143. package/dist/playbooks/service-build/game-theory.d.ts +4 -1
  144. package/dist/playbooks/service-build/game-theory.js +1 -1
  145. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  146. package/dist/playbooks/service-build/merchant-guide.d.ts +26 -1
  147. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  148. package/dist/playbooks/service-build/migration-planner.d.ts +2 -2
  149. package/dist/playbooks/service-build/migration-planner.js +1 -1
  150. package/dist/playbooks/service-build/object-panorama.d.ts +13 -1
  151. package/dist/playbooks/service-build/object-panorama.js +1 -1
  152. package/dist/playbooks/service-build/participation-radar.js +1 -1
  153. package/dist/playbooks/service-build/pipeline-actions.d.ts +4 -1
  154. package/dist/playbooks/service-build/pipeline-actions.js +1 -1
  155. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  156. package/dist/playbooks/service-build/service-panorama.d.ts +12 -0
  157. package/dist/playbooks/service-build/service-panorama.js +1 -1
  158. package/dist/playbooks/service-build/service-quote.js +1 -1
  159. package/dist/playbooks/service-build/service-quote.spec.js +1 -1
  160. package/dist/relationship/derivation.d.ts +1 -1
  161. package/dist/review/index.js +1 -1
  162. package/dist/review/repository.js +1 -1
  163. package/dist/role/intent.d.ts +23 -0
  164. package/dist/role/intent.js +1 -0
  165. package/dist/safety/confirm-gate.js +1 -1
  166. package/dist/schema/benchmark-migration/index.d.ts +39 -0
  167. package/dist/schema/benchmark-migration/index.js +1 -1
  168. package/dist/schema/call/allocation.d.ts +49 -3
  169. package/dist/schema/call/allocation.js +1 -1
  170. package/dist/schema/call/arbitration.js +1 -1
  171. package/dist/schema/call/base.d.ts +52 -0
  172. package/dist/schema/call/base.js +1 -1
  173. package/dist/schema/call/bridge.d.ts +3 -0
  174. package/dist/schema/call/contact.js +1 -1
  175. package/dist/schema/call/error-codes.d.ts +1 -1
  176. package/dist/schema/call/error-codes.js +1 -1
  177. package/dist/schema/call/guard.js +1 -1
  178. package/dist/schema/call/handler.js +1 -1
  179. package/dist/schema/call/machine.d.ts +10 -0
  180. package/dist/schema/call/machine.js +1 -1
  181. package/dist/schema/call/order.d.ts +2 -0
  182. package/dist/schema/call/order.js +1 -1
  183. package/dist/schema/call/progress.d.ts +6 -3
  184. package/dist/schema/call/progress.js +1 -1
  185. package/dist/schema/call/repository.d.ts +4 -0
  186. package/dist/schema/call/repository.js +1 -1
  187. package/dist/schema/call/reward.d.ts +2 -2
  188. package/dist/schema/call/reward.js +1 -1
  189. package/dist/schema/call/semantic.d.ts +6 -0
  190. package/dist/schema/call/semantic.js +1 -1
  191. package/dist/schema/call/service.d.ts +42 -4
  192. package/dist/schema/call/service.js +1 -1
  193. package/dist/schema/common/index.js +1 -1
  194. package/dist/schema/goal/index.d.ts +54 -0
  195. package/dist/schema/goal/planning.d.ts +86 -0
  196. package/dist/schema/goal/planning.js +1 -1
  197. package/dist/schema/keeper/index.d.ts +2 -0
  198. package/dist/schema/local/index.d.ts +72 -0
  199. package/dist/schema/local/index.js +1 -1
  200. package/dist/schema/messenger/index.d.ts +2 -0
  201. package/dist/schema/operations.d.ts +46 -5
  202. package/dist/schema/operations.js +1 -1
  203. package/dist/schema/persona/index.d.ts +484 -0
  204. package/dist/schema/query/bi.d.ts +4 -0
  205. package/dist/schema/query/bi.js +1 -1
  206. package/dist/schema/query/index.d.ts +84 -60
  207. package/dist/schema/query/index.js +1 -1
  208. package/dist/schema/schema-version.d.ts +1 -1
  209. package/dist/schema/schema-version.js +1 -1
  210. package/dist/schema-query-impl/index.js +1 -1
  211. package/dist/schemas/account_operation.output.json +41 -10
  212. package/dist/schemas/account_operation.schema.json +1 -1
  213. package/dist/schemas/benchmark_migration_operation.output.json +8 -5
  214. package/dist/schemas/benchmark_migration_operation.schema.json +91 -3
  215. package/dist/schemas/bridge_operation.output.json +13 -7
  216. package/dist/schemas/goal_operation.schema.json +94 -0
  217. package/dist/schemas/index.json +1 -1
  218. package/dist/schemas/keeper_operation.output.json +12 -7
  219. package/dist/schemas/local_cache_operation.output.json +34 -7
  220. package/dist/schemas/local_cache_operation.schema.json +16 -1
  221. package/dist/schemas/local_history_operation.output.json +13 -7
  222. package/dist/schemas/local_info_operation.output.json +13 -7
  223. package/dist/schemas/local_info_operation.schema.json +5 -1
  224. package/dist/schemas/local_mark_operation.output.json +13 -7
  225. package/dist/schemas/messenger_operation.output.json +12 -7
  226. package/dist/schemas/monitor_events.output.json +12 -7
  227. package/dist/schemas/monitor_subscription.output.json +12 -7
  228. package/dist/schemas/onchain_events.output.json +67 -18
  229. package/dist/schemas/onchain_events.schema.json +4 -0
  230. package/dist/schemas/onchain_operations.output.json +81 -24
  231. package/dist/schemas/onchain_operations.schema.json +531 -126
  232. package/dist/schemas/onchain_operations_allocation.schema.json +294 -6
  233. package/dist/schemas/onchain_operations_arbitration.schema.json +3 -3
  234. package/dist/schemas/onchain_operations_contact.schema.json +2 -2
  235. package/dist/schemas/onchain_operations_demand.schema.json +3 -3
  236. package/dist/schemas/onchain_operations_gen_passport.schema.json +1 -1
  237. package/dist/schemas/onchain_operations_guard.schema.json +99 -63
  238. package/dist/schemas/onchain_operations_machine.schema.json +10 -1
  239. package/dist/schemas/onchain_operations_order.schema.json +8 -4
  240. package/dist/schemas/onchain_operations_progress.schema.json +8 -4
  241. package/dist/schemas/onchain_operations_proof.schema.json +1 -1
  242. package/dist/schemas/onchain_operations_repository.schema.json +6 -2
  243. package/dist/schemas/onchain_operations_reward.schema.json +8 -8
  244. package/dist/schemas/onchain_operations_service.schema.json +81 -21
  245. package/dist/schemas/onchain_operations_treasury.schema.json +7 -7
  246. package/dist/schemas/onchain_table_data.output.json +16 -7
  247. package/dist/schemas/persona_operation.output.json +1387 -0
  248. package/dist/schemas/persona_operation.schema.json +219 -0
  249. package/dist/schemas/query_toolkit.output.json +115 -64
  250. package/dist/schemas/query_toolkit.schema.json +8 -0
  251. package/dist/schemas/workflow_operation.schema.json +1 -1
  252. package/dist/tools/handlers/benchmark-migration.js +1 -1
  253. package/dist/tools/handlers/bridge.js +1 -1
  254. package/dist/tools/handlers/config.js +1 -1
  255. package/dist/tools/handlers/dispatch-expectations.js +1 -1
  256. package/dist/tools/handlers/file-export.js +1 -1
  257. package/dist/tools/handlers/industry-pack.d.ts +1 -0
  258. package/dist/tools/handlers/industry-pack.js +1 -1
  259. package/dist/tools/handlers/local.js +1 -1
  260. package/dist/tools/handlers/messenger.js +1 -1
  261. package/dist/tools/handlers/onchain-name-registration.d.ts +11 -0
  262. package/dist/tools/handlers/onchain-name-registration.js +1 -1
  263. package/dist/tools/handlers/onchain.d.ts +28 -0
  264. package/dist/tools/handlers/onchain.js +1 -1
  265. package/dist/tools/handlers/query.js +1 -1
  266. package/dist/tools/handlers/review-chain.d.ts +1 -1
  267. package/dist/tools/handlers/review-chain.js +1 -1
  268. package/dist/tools/handlers/schema-query.js +1 -1
  269. package/dist/tools/handlers/workflow.js +1 -1
  270. package/dist/tools/move-fn-index.gen.js +1 -1
  271. package/dist/tools/registry/agent.js +1 -1
  272. package/dist/tools/registry/local.js +1 -1
  273. package/dist/tools/registry/onchain.js +1 -1
  274. package/dist/tools/registry/query.js +1 -1
  275. package/dist/tools/wip-deploy-assist.js +1 -1
  276. package/dist/tools/wrap.js +1 -1
  277. package/package.json +3 -3
@@ -1 +1 @@
1
- export const BUYER_ACTION_NODE_RE=/^(reviewed|return_requested|guest_cancelled|withdrawn|charging|cancelled|closed_cancel)$/i;export function unannotatedBuyerActionNodes(a){return a['filter'](b=>!b['operator']&&BUYER_ACTION_NODE_RE['test'](b['name']))['map'](b=>b['name']);}export const SCENARIO_MODES=[{'name':'freelance','phase':0x1,'industry':'Design\x20/\x20dev\x20/\x20consulting\x20/\x20writing','trust_pattern':'Milestone\x20allocation,\x20acceptance\x20gate','traits':{'has_logistics':![],'communication_heavy':!![],'pure_digital':!![],'long_cycle':!![],'deposit_required':![],'multi_tier_allocation':![]},'default_template':'freelance/enterprise-talent-market','key_risk':'Customer\x20never\x20accepts\x20delivery\x20—\x20provider\x20cannot\x20get\x20paid','build_notes':['Use\x20Service\x20`setting_lock_duration`\x20to\x20lock\x20rules\x20for\x20the\x20engagement\x20duration','WIP\x20hash\x20on\x20every\x20milestone\x20deliverable\x20is\x20mandatory\x20—\x20protects\x20provider\x20in\x20disputes','Acceptance\x20gate\x20is\x20the\x20trust\x20pivot\x20—\x20both\x20parties\x20must\x20agree\x20on\x20criteria\x20per\x20milestone','Milestones\x20map\x20to\x20deliverable-Guarded\x20forwards;\x20each\x20accepted\x20milestone\x20releases\x20its\x20escrowed\x20slice\x20(allocation.distribute_milestone)','Scope\x20changes\x20are\x20recorded\x20as\x20WTS\x20change-requests\x20at\x20kickoff/throughout\x20—\x20never\x20silent','R-M1-11:\x20no\x20\x27refunded\x27/\x27disputed\x27/\x27arb\x27/\x27cancelled\x27\x20nodes\x20—\x20refunds\x20route\x20via\x20Allocator\x20(to\x20OrderHolder)\x20triggered\x20by\x20\x27closed_cancel\x27,\x20disputes\x20via\x20Arbitration','Payment\x20exception\x20compensation\x20for\x20delivery\x20delays\x20—\x20provider\x20Treasury\x20auto-compensates\x20customer\x20(§2.13)','Project-Catalog\x20orders\x20have\x20NO\x20milestones\x20(single\x20funded\x20order\x20+\x20steps\x20timeline);\x20milestones\x20here\x20model\x20fixed-price\x20CONTRACTS.\x20For\x20catalog-style\x20listings\x20(tiered\x20pricing\x20+\x20add-ons\x20+\x20buyer\x20requirements)\x20use\x20the\x20freelance/catalog-tiers\x20template\x20instead','Time-bound\x20catalog\x20rules\x20(24h\x20instant\x20cancel,\x2048h\x20requirements\x20timeout,\x2014-day\x20auto-accept)\x20need\x20a\x20time\x20Guard\x20PLUS\x20an\x20off-chain\x20keeper\x20per\x20window\x20-\x20Guards\x20take\x20an\x20immutable\x20duration\x20constant']},{'name':'rental','phase':0x1,'industry':'Equipment\x20/\x20vehicle\x20/\x20property\x20rental','trust_pattern':'Deposit\x20escrow,\x20return\x20inspection','traits':{'has_logistics':!![],'communication_heavy':!![],'pure_digital':![],'long_cycle':![],'deposit_required':!![],'multi_tier_allocation':![]},'default_template':'rental/institutional-longstay','key_risk':'Owner\x20claims\x20damage\x20without\x20pre-rental\x20WIP\x20—\x20customer\x20loses\x20deposit\x20unfairly','build_notes':['Pre-rental\x20WIP\x20is\x20non-negotiable\x20—\x20without\x20it,\x20damage\x20claims\x20fail','Deposit\x20must\x20be\x20escrowed,\x20not\x20direct-transferred\x20—\x20enables\x20fair\x20deduction','Inspection\x20gate\x20prevents\x20customer\x20from\x20denying\x20damage','Overdue\x20handling\x20uses\x20a\x20time-lock\x20Guard\x20(clock)\x20—\x20the\x20Guard\x20only\x20ALLOWS\x20the\x20overdue\x20transition;\x20automatic\x20advancement\x20needs\x20an\x20off-chain\x20keeper\x20(see\x20DESIGN-REVIEW\x20C-3)','Extensions\x20are\x20modeled\x20as\x20separate\x20sub-orders\x20(REUSE\x20pattern),\x20not\x20as\x20machine\x20cycles\x20—\x20an\x20in-order\x20loop\x20replays\x20its\x20forwards\x27\x20fund\x20rails\x20every\x20lap','R-M1-11:\x20no\x20\x27deposit_refunded\x27/\x27deposit_deducted\x27/\x27refunded\x27\x20nodes\x20—\x20deposit\x20refund/deduction\x20flows\x20through\x20Allocator\x20triggered\x20by\x20return_approved/damage_confirmed\x20business\x20states','Payment\x20exception\x20compensation\x20for\x20return\x20delays\x20—\x20Treasury\x20withdraws\x20scene-bound\x20Payment\x20(§2.13)','Repository\x20quote_guard\x20for\x20weather/usage\x20data\x20subscription\x20revenue\x20(§2.11)']},{'name':'education','phase':0x2,'industry':'Courses\x20/\x20training\x20/\x20tutoring','trust_pattern':'Periodic\x20release\x20per\x20session,\x20attendance\x20Guard','traits':{'has_logistics':![],'communication_heavy':!![],'pure_digital':![],'long_cycle':!![],'deposit_required':!![],'multi_tier_allocation':![]},'default_template':'education/live-class-cohort','key_risk':'Tutoring\x20institutions\x20run\x20away\x20with\x20prepaid\x20tuition','build_notes':['Use\x20Service\x20`setting_lock_duration`\x20to\x20lock\x20rules\x20for\x20the\x20entire\x20term\x20(regulatory\x20compliance,\x20>=90d)','Attendance\x20Guard\x20needs\x20WIP\x20hash\x20for\x20session\x20content\x20commitment;\x20attendance\x20evidence\x20lives\x20in\x20the\x20class\x20Repository','Per-session\x20release\x20requires\x20threshold-based\x20trigger\x20—\x20each\x20attended\x20session\x20releases\x201/N','session_1..session_3\x20are\x20representative\x20—\x20configure\x20the\x20real\x20session\x20count\x20(session_N)\x20at\x20build\x20time;\x20each\x20session\x20=\x20one\x20attendance-Guarded\x20forward','Pause/deferral\x20is\x20a\x20terminal\x20node\x20+\x20new\x20sub-order\x20(REUSE\x20pattern)\x20—\x20never\x20a\x20loop\x20back\x20into\x20the\x20session\x20chain\x20(a\x20loop\x20replays\x20the\x20session\x20forwards\x27\x20fund\x20rails\x20every\x20lap;\x20if\x20a\x20loop\x20is\x20unavoidable\x20it\x20must\x20keep\x20a\x20cycle-breaking\x20exit)','Supply\x20chain\x20sub-orders\x20for\x20course\x20module\x20progressive\x20unlock\x20—\x20each\x20module\x20=\x20sub-service\x20with\x20buy_guard\x20verifying\x20previous\x20module\x20completion\x20(§2.12)','Repository\x20for\x20learning\x20progress\x20collaboration\x20data\x20—\x20progress\x20as\x20key,\x20session\x20data\x20as\x20value\x20(§2.10)']},{'name':'travel','phase':0x2,'industry':'Custom\x20tours\x20/\x20multi-segment\x20trips','trust_pattern':'Multi-tier\x20allocation\x20per\x20segment','traits':{'has_logistics':![],'communication_heavy':!![],'pure_digital':![],'long_cycle':!![],'deposit_required':!![],'multi_tier_allocation':!![]},'default_template':'travel/destination-experience','key_risk':'Paid\x20in\x20full\x20then\x20service\x20shrinks\x20—\x20multi-tier\x20transparency\x20prevents\x20this','build_notes':['Multi-tier\x20Allocation\x20is\x20WoWok\x27s\x20unique\x20advantage\x20over\x20traditional\x20travel\x20platforms','segment_guard\x20needs\x20standardized\x20WIP\x20templates\x20per\x20segment\x20type\x20(hotel,\x20transport,\x20activity)','Multi-tier\x20waterfall\x20needs\x20guard\x20chaining\x20validation','Weather/force-majeure\x20branches\x20enter\x20reschedule\x20(terminal)\x20or\x20partial-refund\x20interrupted\x20terminal\x20—\x20never\x20loop\x20back\x20into\x20the\x20segment\x20chain\x20(a\x20loop\x20replays\x20the\x20segment\x20forwards\x27\x20fund\x20rails\x20every\x20lap;\x20if\x20a\x20loop\x20is\x20unavoidable\x20it\x20must\x20keep\x20a\x20cycle-breaking\x20exit)','Supplier\x20sub-orders\x20each\x20carry\x20their\x20own\x20machine\x20—\x20hotel/guide/driver\x20fulfill\x20independently\x20(§2.12)','Supply\x20chain\x20sub-orders\x20—\x20each\x20tour\x20segment\x20=\x20sub-service\x20with\x20buy_guard\x20verifying\x20main\x20tour\x20order\x20(§2.12)','Payment\x20exception\x20compensation\x20for\x20flight/segment\x20delays\x20(§2.13)','Repository\x20quote_guard\x20for\x20weather/travel\x20data\x20subscription\x20revenue\x20(§2.11)']},{'name':'subscription','phase':0x3,'industry':'SaaS\x20/\x20content\x20membership\x20/\x20periodic\x20service','trust_pattern':'Periodic\x20charge,\x20cancel\x20Guard','traits':{'has_logistics':![],'communication_heavy':![],'pure_digital':!![],'long_cycle':!![],'deposit_required':![],'multi_tier_allocation':![]},'default_template':'subscription/creator-membership','key_risk':'Auto-renew\x20trap\x20and\x20platform-takes-30%\x20—\x20WoWok\x20native\x20solution','build_notes':['Pure\x20digital\x20—\x20native\x20WoWok\x20soil','charge_guard\x20needs\x20periodic\x20trigger\x20(off-chain\x20scheduler\x20+\x20on-chain\x20Guard)','Renewal\x20is\x20an\x20explicit\x20buyer-side\x20forward\x20(or\x20a\x20Guard-gated\x20auto-renew\x20WITH\x20WTS\x20notice)\x20—\x20never\x20silent','Cancellation\x20is\x20frictionless\x20and\x20next-period\x20effective;\x20pro-rata\x20refund\x20for\x20unearned\x20periods','Forbid\x20dead-end\x20nodes\x20(prevent\x20lock-in);\x20every\x20state\x20must\x20have\x20a\x20forward\x20or\x20be\x20an\x20intended\x20terminal','Targets\x20indie\x20creators,\x20niche\x20SaaS,\x20paid\x20newsletters','Repository\x20quote_guard\x20for\x20creator\x20data\x20subscription\x20revenue\x20—\x20creators\x20publish\x20paid\x20data,\x20users\x20pay\x20to\x20access\x20(§2.11)']},{'name':'retail','phase':0x1,'industry':'Goods\x20retail\x20/\x20marketplace\x20/\x20e-commerce','trust_pattern':'Escrow\x20+\x20confirm-on-receipt\x20release','traits':{'has_logistics':!![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![]},'default_template':'retail/scale-marketplace','key_risk':'Products\x20don\x27t\x20match\x20description\x20—\x20no\x20refund\x20path\x20for\x20returns','build_notes':['Logistics\x20WIP\x20(tracking\x20number)\x20is\x20essential\x20—\x20shipping\x20evidence\x20protects\x20both\x20parties\x20in\x20return\x20disputes','Confirm\x20gate\x20prevents\x20merchant\x20from\x20self-confirming\x20receipt','Refund\x20path\x20must\x20support\x20return-and-exchange\x20flow;\x20refund_window\x20>=\x207d','Return\x20request\x20is\x20time-lock\x20gated\x20—\x20after\x20the\x20window\x20closes,\x20returns\x20need\x20merchant\x20permission\x20or\x20arbitration','Compensation\x20fund\x20covers\x20return/exchange\x20disputes','R-M1-11:\x20no\x20\x27refunded\x27\x20node\x20—\x20refunds\x20route\x20via\x20Allocator\x20triggered\x20by\x20returned/cancelled\x20business\x20states;\x20disputes\x20go\x20to\x20Arbitration']},{'name':'general','phase':0x1,'industry':'Anything\x20not\x20covered\x20/\x20hybrid','trust_pattern':'User-defined\x20from\x20scratch','traits':{'has_logistics':![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![]},'default_template':null,'key_risk':'No\x20safety\x20net\x20—\x20user\x20must\x20design\x20all\x20trust\x20mechanisms\x20manually','build_notes':['Escape\x20hatch:\x20any\x20user\x20can\x20switch\x20to\x20general\x20mode\x20at\x20any\x20time','Already-created\x20objects\x20under\x20a\x20previous\x20mode\x20remain\x20on-chain\x20(REUSE\x20pattern)','wowok-machine\x20/\x20wowok-guard\x20/\x20wowok-provider\x20become\x20primary\x20references']}];export function matchScenarioMode(a){const b=a['toLowerCase'](),c=inferScenarioTraits(a),e=SCENARIO_MODES['map'](h=>{let i=0x0,j=0x0;for(const k of Object['keys'](c)){j+=0x1;if(h['traits'][k]===c[k])i+=0x1;}if(h['name']!=='general'){const l=MODE_KEYWORDS[h['name']]??[];for(const m of l){if(b['includes'](m))i+=0.5;}}return{'mode':h,'score':i,'total':j};});let f=e[0x0];for(const h of e){if(h['score']>f['score'])f=h;}const g=f['total']>0x0?Math['min'](0x1,f['score']/f['total']):0x0;return{'mode':f['mode'],'confidence':g};}const MODE_KEYWORDS={'freelance':['freelance','design','develop','consult','write','consulting'],'rental':['rent','rental','lease','borrow','equipment','vehicle','property'],'education':['course','training','tutor','teach','education','class'],'travel':['tour','travel','trip','itinerary','vacation'],'subscription':['subscribe','subscription','membership','saas','newsletter','recurring'],'retail':['retail','shop','store','marketplace','sell\x20goods','ecommerce','e-commerce']};export function inferScenarioTraits(a){const b=a['toLowerCase']();return{'has_logistics':/ship|delivery|equipment|vehicle|physical|goods/['test'](b),'communication_heavy':/consult|discuss|back-and-forth|custom|bespoke|negotiate/['test'](b),'pure_digital':/digital|file|download|online|software|code|design|content/['test'](b),'long_cycle':/month|long-term|engagement|project|semester|period/['test'](b),'deposit_required':/deposit|escrow|prepay|tuition|reserve/['test'](b),'multi_tier_allocation':/tier|segment|multi-|agency|hotel|guide|driver/['test'](b)};}export const MODE_COMPOSITIONS=[{'modes':['freelance','subscription'],'use_case':'Retainer\x20consulting\x20(monthly\x20+\x20milestone)','conflict_resolution':'Allocator:\x20split\x20into\x20retainer\x20(subscription)\x20+\x20milestone\x20(freelance)'},{'modes':['rental','education'],'use_case':'Equipment\x20training\x20rental','conflict_resolution':'Machine:\x20extend\x20rental\x20nodes\x20with\x20attendance\x20gates'},{'modes':['travel','rental'],'use_case':'Tour\x20with\x20equipment','conflict_resolution':'Allocator:\x20segment\x20allocation\x20+\x20deposit\x20escrow\x20side-by-side'}];export function getScenarioMode(a){return SCENARIO_MODES['find'](b=>b['name']===a);}export function listScenarioModes(){return SCENARIO_MODES;}export function getShippedModes(){return SCENARIO_MODES['filter'](a=>a['phase']===0x1);}export function getModeCompositions(a){return MODE_COMPOSITIONS['filter'](b=>b['modes']['includes'](a));}export const SCENARIO_MODES_VERSION=0x7;
1
+ export const BUYER_ACTION_NODE_RE=/^(reviewed|return_requested|guest_cancelled|withdrawn|charging|cancelled|closed_cancel)$/i;export function unannotatedBuyerActionNodes(a){return a['filter'](b=>!b['operator']&&BUYER_ACTION_NODE_RE['test'](b['name']))['map'](b=>b['name']);}export const SCENARIO_MODES=[{'name':'freelance','phase':0x1,'industry':'Design\x20/\x20dev\x20/\x20consulting\x20/\x20writing','trust_pattern':'Milestone\x20allocation,\x20acceptance\x20gate','traits':{'has_logistics':![],'communication_heavy':!![],'pure_digital':!![],'long_cycle':!![],'deposit_required':![],'multi_tier_allocation':![]},'default_template':'freelance/enterprise-talent-market','key_risk':'Customer\x20never\x20accepts\x20delivery\x20—\x20provider\x20cannot\x20get\x20paid','build_notes':['Use\x20Service\x20`setting_lock_duration`\x20to\x20lock\x20rules\x20for\x20the\x20engagement\x20duration','WIP\x20hash\x20on\x20every\x20milestone\x20deliverable\x20is\x20mandatory\x20—\x20protects\x20provider\x20in\x20disputes','Acceptance\x20gate\x20is\x20the\x20trust\x20pivot\x20—\x20both\x20parties\x20must\x20agree\x20on\x20criteria\x20per\x20milestone','Milestones\x20map\x20to\x20deliverable-Guarded\x20forwards;\x20each\x20accepted\x20milestone\x20releases\x20its\x20escrowed\x20slice\x20(allocation.distribute_milestone)','Scope\x20changes\x20are\x20recorded\x20as\x20WTS\x20change-requests\x20at\x20kickoff/throughout\x20—\x20never\x20silent','R-M1-11:\x20no\x20\x27refunded\x27/\x27disputed\x27/\x27arb\x27/\x27cancelled\x27\x20nodes\x20—\x20refunds\x20route\x20via\x20Allocator\x20(to\x20OrderHolder)\x20triggered\x20by\x20\x27closed_cancel\x27,\x20disputes\x20via\x20Arbitration','Payment\x20exception\x20compensation\x20for\x20delivery\x20delays\x20—\x20provider\x20Treasury\x20auto-compensates\x20customer\x20(§2.13)','Project-Catalog\x20orders\x20have\x20NO\x20milestones\x20(single\x20funded\x20order\x20+\x20steps\x20timeline);\x20milestones\x20here\x20model\x20fixed-price\x20CONTRACTS.\x20For\x20catalog-style\x20listings\x20(tiered\x20pricing\x20+\x20add-ons\x20+\x20buyer\x20requirements)\x20use\x20the\x20freelance/catalog-tiers\x20template\x20instead','Time-bound\x20catalog\x20rules\x20(24h\x20instant\x20cancel,\x2048h\x20requirements\x20timeout,\x2014-day\x20auto-accept)\x20need\x20a\x20time\x20Guard\x20PLUS\x20an\x20off-chain\x20keeper\x20per\x20window\x20-\x20Guards\x20take\x20an\x20immutable\x20duration\x20constant']},{'name':'rental','phase':0x1,'industry':'Equipment\x20/\x20vehicle\x20/\x20property\x20rental','trust_pattern':'Deposit\x20escrow,\x20return\x20inspection','traits':{'has_logistics':!![],'communication_heavy':!![],'pure_digital':![],'long_cycle':![],'deposit_required':!![],'multi_tier_allocation':![]},'default_template':'rental/institutional-longstay','key_risk':'Owner\x20claims\x20damage\x20without\x20pre-rental\x20WIP\x20—\x20customer\x20loses\x20deposit\x20unfairly','build_notes':['Pre-rental\x20WIP\x20is\x20non-negotiable\x20—\x20without\x20it,\x20damage\x20claims\x20fail','Deposit\x20must\x20be\x20escrowed,\x20not\x20direct-transferred\x20—\x20enables\x20fair\x20deduction','Inspection\x20gate\x20prevents\x20customer\x20from\x20denying\x20damage','Overdue\x20handling\x20uses\x20a\x20time-lock\x20Guard\x20(clock)\x20—\x20the\x20Guard\x20only\x20ALLOWS\x20the\x20overdue\x20transition;\x20automatic\x20advancement\x20needs\x20an\x20off-chain\x20keeper\x20(see\x20DESIGN-REVIEW\x20C-3)','Extensions\x20are\x20modeled\x20as\x20separate\x20sub-orders\x20(REUSE\x20pattern),\x20not\x20as\x20machine\x20cycles\x20—\x20an\x20in-order\x20loop\x20replays\x20its\x20forwards\x27\x20fund\x20rails\x20every\x20lap','R-M1-11:\x20no\x20\x27deposit_refunded\x27/\x27deposit_deducted\x27/\x27refunded\x27\x20nodes\x20—\x20deposit\x20refund/deduction\x20flows\x20through\x20Allocator\x20triggered\x20by\x20return_approved/damage_confirmed\x20business\x20states','Payment\x20exception\x20compensation\x20for\x20return\x20delays\x20—\x20Treasury\x20withdraws\x20scene-bound\x20Payment\x20(§2.13)','Repository\x20quote_guard\x20for\x20weather/usage\x20data\x20subscription\x20revenue\x20(§2.11)']},{'name':'education','phase':0x2,'industry':'Courses\x20/\x20training\x20/\x20tutoring','trust_pattern':'Periodic\x20release\x20per\x20session,\x20attendance\x20Guard','traits':{'has_logistics':![],'communication_heavy':!![],'pure_digital':![],'long_cycle':!![],'deposit_required':!![],'multi_tier_allocation':![]},'default_template':'education/live-class-cohort','key_risk':'Tutoring\x20institutions\x20run\x20away\x20with\x20prepaid\x20tuition','build_notes':['Use\x20Service\x20`setting_lock_duration`\x20to\x20lock\x20rules\x20for\x20the\x20entire\x20term\x20(regulatory\x20compliance,\x20>=90d)','Attendance\x20Guard\x20needs\x20WIP\x20hash\x20for\x20session\x20content\x20commitment;\x20attendance\x20evidence\x20lives\x20in\x20the\x20class\x20Repository','Per-session\x20release\x20requires\x20threshold-based\x20trigger\x20—\x20each\x20attended\x20session\x20releases\x201/N','session_1..session_3\x20are\x20representative\x20—\x20configure\x20the\x20real\x20session\x20count\x20(session_N)\x20at\x20build\x20time;\x20each\x20session\x20=\x20one\x20attendance-Guarded\x20forward','Pause/deferral\x20is\x20a\x20terminal\x20node\x20+\x20new\x20sub-order\x20(REUSE\x20pattern)\x20—\x20never\x20a\x20loop\x20back\x20into\x20the\x20session\x20chain\x20(a\x20loop\x20replays\x20the\x20session\x20forwards\x27\x20fund\x20rails\x20every\x20lap;\x20if\x20a\x20loop\x20is\x20unavoidable\x20it\x20must\x20keep\x20a\x20cycle-breaking\x20exit)','Supply\x20chain\x20sub-orders\x20for\x20course\x20module\x20progressive\x20unlock\x20—\x20each\x20module\x20=\x20sub-service\x20with\x20buy_guard\x20verifying\x20previous\x20module\x20completion\x20(§2.12)','Repository\x20for\x20learning\x20progress\x20collaboration\x20data\x20—\x20progress\x20as\x20key,\x20session\x20data\x20as\x20value\x20(§2.10)']},{'name':'travel','phase':0x2,'industry':'Custom\x20tours\x20/\x20multi-segment\x20trips','trust_pattern':'Multi-tier\x20allocation\x20per\x20segment','traits':{'has_logistics':![],'communication_heavy':!![],'pure_digital':![],'long_cycle':!![],'deposit_required':!![],'multi_tier_allocation':!![]},'default_template':'travel/destination-experience','key_risk':'Paid\x20in\x20full\x20then\x20service\x20shrinks\x20—\x20multi-tier\x20transparency\x20prevents\x20this','build_notes':['Multi-tier\x20Allocation\x20is\x20WoWok\x27s\x20unique\x20advantage\x20over\x20traditional\x20travel\x20platforms','segment_guard\x20needs\x20standardized\x20WIP\x20templates\x20per\x20segment\x20type\x20(hotel,\x20transport,\x20activity)','Multi-tier\x20waterfall\x20needs\x20guard\x20chaining\x20validation','Weather/force-majeure\x20branches\x20enter\x20reschedule\x20(terminal)\x20or\x20partial-refund\x20interrupted\x20terminal\x20—\x20never\x20loop\x20back\x20into\x20the\x20segment\x20chain\x20(a\x20loop\x20replays\x20the\x20segment\x20forwards\x27\x20fund\x20rails\x20every\x20lap;\x20if\x20a\x20loop\x20is\x20unavoidable\x20it\x20must\x20keep\x20a\x20cycle-breaking\x20exit)','Supplier\x20sub-orders\x20each\x20carry\x20their\x20own\x20machine\x20—\x20hotel/guide/driver\x20fulfill\x20independently\x20(§2.12)','Supply\x20chain\x20sub-orders\x20—\x20each\x20tour\x20segment\x20=\x20sub-service\x20with\x20buy_guard\x20verifying\x20main\x20tour\x20order\x20(§2.12)','Payment\x20exception\x20compensation\x20for\x20flight/segment\x20delays\x20(§2.13)','Repository\x20quote_guard\x20for\x20weather/travel\x20data\x20subscription\x20revenue\x20(§2.11)']},{'name':'subscription','phase':0x3,'industry':'SaaS\x20/\x20content\x20membership\x20/\x20periodic\x20service','trust_pattern':'Periodic\x20charge,\x20cancel\x20Guard','traits':{'has_logistics':![],'communication_heavy':![],'pure_digital':!![],'long_cycle':!![],'deposit_required':![],'multi_tier_allocation':![]},'default_template':'subscription/creator-membership','key_risk':'Auto-renew\x20trap\x20and\x20platform-takes-30%\x20—\x20WoWok\x20native\x20solution','build_notes':['Pure\x20digital\x20—\x20native\x20WoWok\x20soil','charge_guard\x20needs\x20periodic\x20trigger\x20(off-chain\x20scheduler\x20+\x20on-chain\x20Guard)','Renewal\x20is\x20an\x20explicit\x20buyer-side\x20forward\x20(or\x20a\x20Guard-gated\x20auto-renew\x20WITH\x20WTS\x20notice)\x20—\x20never\x20silent','Cancellation\x20is\x20frictionless\x20and\x20next-period\x20effective;\x20pro-rata\x20refund\x20for\x20unearned\x20periods','Forbid\x20dead-end\x20nodes\x20(prevent\x20lock-in);\x20every\x20state\x20must\x20have\x20a\x20forward\x20or\x20be\x20an\x20intended\x20terminal','Targets\x20indie\x20creators,\x20niche\x20SaaS,\x20paid\x20newsletters','Repository\x20quote_guard\x20for\x20creator\x20data\x20subscription\x20revenue\x20—\x20creators\x20publish\x20paid\x20data,\x20users\x20pay\x20to\x20access\x20(§2.11)']},{'name':'retail','phase':0x1,'industry':'Goods\x20retail\x20/\x20marketplace\x20/\x20e-commerce','trust_pattern':'Escrow\x20+\x20confirm-on-receipt\x20release','traits':{'has_logistics':!![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![]},'default_template':'retail/scale-marketplace','key_risk':'Products\x20don\x27t\x20match\x20description\x20—\x20no\x20refund\x20path\x20for\x20returns','build_notes':['Logistics\x20WIP\x20(tracking\x20number)\x20is\x20essential\x20—\x20shipping\x20evidence\x20protects\x20both\x20parties\x20in\x20return\x20disputes','Confirm\x20gate\x20prevents\x20merchant\x20from\x20self-confirming\x20receipt','Refund\x20path\x20must\x20support\x20return-and-exchange\x20flow;\x20refund_window\x20>=\x207d','Return\x20request\x20is\x20time-lock\x20gated\x20—\x20after\x20the\x20window\x20closes,\x20returns\x20need\x20merchant\x20permission\x20or\x20arbitration','Compensation\x20fund\x20covers\x20return/exchange\x20disputes','R-M1-11:\x20no\x20\x27refunded\x27\x20node\x20—\x20refunds\x20route\x20via\x20Allocator\x20triggered\x20by\x20returned/cancelled\x20business\x20states;\x20disputes\x20go\x20to\x20Arbitration']},{'name':'licensing','phase':0x1,'industry':'IP\x20/\x20royalty\x20licensing\x20/\x20metered\x20asset\x20licenses','trust_pattern':'Terms\x20hash-anchored,\x20on-chain\x20royalty\x20split,\x20territory/term\x20Guard','traits':{'has_logistics':![],'communication_heavy':![],'pure_digital':!![],'long_cycle':!![],'deposit_required':![],'multi_tier_allocation':!![]},'default_template':'licensing/royalty-stream-auction','key_risk':'Buyer\x20trusts\x20the\x20seller\x27s\x20royalty/usage\x20reporting\x20—\x20without\x20an\x20on-chain\x20meter\x20the\x20accounting\x20honesty\x20is\x20only\x20as\x20good\x20as\x20the\x20attestation\x20and\x20the\x20compensation\x20backstop','build_notes':['Anchor\x20the\x20license\x20terms\x20(territory,\x20term,\x20media,\x20caps,\x20exclusivity)\x20as\x20a\x20WIP\x20hash\x20—\x20the\x20granted\x20rights\x20must\x20be\x20provable\x20in\x20a\x20dispute,\x20not\x20prose','Royalty\x20/\x20purchase-proceeds\x20split\x20is\x20an\x20Allocation\x20Rate\x20plan\x20(bps\x20summing\x20to\x2010000\x20across\x20rights-holders\x20+\x20platform);\x20the\x20split\x20is\x20frozen\x20at\x20publish\x20and\x20auditable\x20by\x20every\x20recipient','Recurring\x20royalty:\x20the\x20Allocation\x20pool\x20is\x20re-fillable\x20(order_renew\x20top-ups)\x20and\x20a\x20guard-keyed\x20periodic\x20alloc\x20with\x20a\x20period-N\x20once-key\x20(identifier\x20255)\x20releases\x20each\x20period\x20—\x20payroll-style\x20repeat\x20runs\x20stay\x20possible\x20without\x20the\x20once-slot','Territory\x20is\x20enforced\x20by\x20a\x20Service\x20buy_guard\x20running\x20pattern.identity_check_allowlist\x20(allowlist\x20as\x20an\x20Address-vector\x20table\x20constant);\x20term\x20/\x20inspection\x20window\x20is\x20a\x20tpl_time_lock_progress\x20forward\x20guard\x20(Clock\x20>=\x20entry_time\x20+\x20duration)','Time-lock\x20duration\x20is\x20an\x20IMMUTABLE\x20table\x20constant\x20fixed\x20at\x20publish\x20—\x20an\x20expired\x20window\x20only\x20BLOCKS\x20the\x20forward,\x20it\x20never\x20auto-refunds;\x20automatic\x20advancement\x20on\x20timeout\x20needs\x20an\x20off-chain\x20keeper','🔴\x20AUCTION\x20GAP:\x20there\x20is\x20NO\x20on-chain\x20ascending-auction\x20/\x20bid-ledger\x20/\x20highest-bidder\x20primitive.\x20Model\x20a\x20competitive\x20sale\x20as:\x20winner\x20resolved\x20OFF-CHAIN\x20(prose),\x20then\x20the\x20winner\x20calls\x20buy\x20like\x20any\x20buyer\x20—\x20optionally\x20gate\x20buy\x20with\x20an\x20allowlist\x20guard\x20carrying\x20the\x20attested\x20winner\x20address.\x20Never\x20claim\x20the\x20chain\x20runs\x20the\x20auction','🔴\x20METERED-CAPS\x20GAP:\x20there\x20is\x20NO\x20usage\x20oracle/meter.\x20A\x20\x27limited\x20to\x20N\x20streams/sales\x27\x20cap\x20can\x20only\x20be\x20an\x20ATTESTED\x20Repository\x20counter\x20that\x20a\x20forward\x20guard\x20reads\x20via\x20the\x20repository.data\x20count-where\x20query\x20—\x20the\x20count\x20is\x20only\x20as\x20trustworthy\x20as\x20its\x20write-guard\x20(self/attested),\x20never\x20an\x20oracle\x20feed.\x20Disclose\x20this\x20honestly;\x20never\x20present\x20a\x20cap\x20as\x20chain-enforced\x20metering','R-M1-11:\x20no\x20\x27refunded\x27/\x27cancelled\x27\x20fund\x20terminals\x20—\x20refunds\x20route\x20via\x20the\x20Allocator\x20triggered\x20by\x20a\x20business\x20state\x20(e.g.\x20inspection_failed);\x20disputes\x20go\x20to\x20Arbitration']},{'name':'crowdfunding','phase':0x1,'industry':'All-or-nothing\x20threshold\x20campaigns\x20/\x20flexible\x20keep-it-all\x20fundraising','trust_pattern':'Per-contributor\x20escrow\x20(unpooled)\x20+\x20on-chain\x20aggregate\x20threshold\x20+\x20deadline\x20two-leg\x20release/refund','traits':{'has_logistics':![],'communication_heavy':!![],'pure_digital':!![],'long_cycle':!![],'deposit_required':!![],'multi_tier_allocation':!![]},'default_template':'crowdfunding/all-or-nothing-threshold','key_risk':'The\x20funding\x20threshold\x20is\x20an\x20aggregate\x20read\x20over\x20a\x20shared\x20campaign\x20ledger\x20—\x20each\x20contribution\x20row\x20is\x20writer-bound\x20to\x20its\x20funder,\x20but\x20the\x20aggregate\x20is\x20a\x20read-only\x20sum\x20of\x20declared\x20rows,\x20not\x20an\x20independent\x20re-computation\x20of\x20every\x20escrow;\x20roster\x20completeness\x20is\x20keeper-attested.\x20Funders\x20also\x20trust\x20eventual\x20project\x20delivery,\x20backed\x20only\x20by\x20compensation_fund\x20+\x20arbitration','build_notes':['Per-contributor\x20escrow,\x20NEVER\x20pooled:\x20each\x20funder\x27s\x20Order\x20holds\x20its\x20OWN\x20Allocation\x20with\x20payment_info.for_object\x20bound\x20to\x20that\x20Order\x20—\x20because\x20the\x20money\x20is\x20never\x20balance::join-ed\x20into\x20one\x20pot,\x20attribution\x20survives\x20and\x20each\x20contribution\x20is\x20refundable\x20to\x20its\x20own\x20funder','Threshold\x20gate\x20=\x20an\x20on-chain\x20aggregate:\x20a\x20shared\x20campaign\x20Repository\x20holds\x20one\x20numeric\x20row\x20per\x20contribution\x20(keyed\x20by\x20the\x20contribution,\x20tagged\x20with\x20a\x20campaign\x20id);\x20the\x20settlement\x20Guard\x20reads\x20it\x20back\x20with\x20the\x20repository.data\x20sum-where\x20query\x20(1174\x20→\x20U256,\x20overflow-safe)\x20and\x20compares\x20against\x20the\x20threshold\x20constant','Write-side\x20binding\x20is\x20MANDATORY:\x20contribution\x20rows\x20are\x20written\x20under\x20pattern.repository_write_authorization\x20with\x20an\x20identity\x20leaf\x20(order.owner\x20==\x20Signer\x20/\x20order.agent\x20has\x20Signer)\x20so\x20a\x20funder\x20can\x20only\x20record\x20their\x20OWN\x20contribution\x20—\x20existence-is-not-trust\x20(R-X1-17),\x20an\x20unbound\x20write_guard\x20makes\x20the\x20aggregate\x20forgeable','Deadline\x20=\x20a\x20time-lock:\x20both\x20settlement\x20legs\x20require\x20Clock\x20>=\x20deadline\x20via\x20pattern.time_lock_progress\x20(query\x201280,\x20node-ENTRY\x20anchored);\x20BEFORE\x20the\x20deadline\x20a\x20funder\x20may\x20withdraw\x20(buyer-self-service\x20withdrawn\x20rail:\x20removes\x20their\x20writer-bound\x20row\x20+\x20full\x20refund\x20—\x20A12\x20fix,\x20was\x20wrongly\x20\x27no\x20early\x20withdrawal\x27);\x20AFTER\x20the\x20deadline\x20funds\x20are\x20committed\x20to\x20the\x20threshold\x20outcome','Two-leg\x20escrow\x20exit\x20(D-BUG-2\x20polarity):\x20release\x20leg\x20(→\x20project\x20Entity)\x20gated\x20logic_and[sum_where\x20>=\x20threshold,\x20clock\x20>=\x20deadline];\x20refund\x20leg\x20(→\x20for_object,\x20the\x20funder\x27s\x20own\x20Order)\x20gated\x20logic_and[sum_where\x20<\x20threshold,\x20clock\x20>=\x20deadline]\x20—\x20mutually\x20exclusive\x20on\x20the\x20aggregate\x20comparison,\x20so\x20exactly\x20one\x20is\x20satisfiable\x20once\x20the\x20deadline\x20passes','Keeper\x20batch\x20settlement:\x20on\x20a\x20missed\x20campaign\x20a\x20keeper\x20enumerates\x20every\x20contributor\x20via\x20repository.data\x20find-where\x20(1176\x20→\x20VectorAddress)\x20/\x20keys-where\x20(1177\x20→\x20VectorString)\x20and\x20advances\x20each\x20funder\x27s\x20refund\x20leg\x20in\x20one\x20PTB\x20(or\x20N\x20PTBs)\x20—\x20an\x20ops\x20efficiency,\x20not\x20a\x20chain\x20capability','🔴\x20AGGREGATE\x20TRUST\x20BOUNDARY:\x20the\x20sum\x20is\x20only\x20as\x20honest\x20as\x20the\x20writer-bound\x20rows;\x20it\x20is\x20NOT\x20independently\x20re-derivable\x20on-chain\x20without\x20reading\x20every\x20escrow\x20balance.\x20Disclose\x20this\x20honestly\x20(L-04);\x20never\x20present\x20the\x20threshold\x20as\x20a\x20chain-verified\x20total-custody\x20proof','🔴\x20L-01\x20NON-INVESTMENT:\x20crowdfunding\x20copy\x20must\x20never\x20promise\x20investment\x20returns,\x20yield,\x20or\x20token-price\x20appreciation\x20—\x20it\x20is\x20a\x20threshold\x20purchase/preorder/donation,\x20not\x20a\x20security','🔴\x20L-05\x20KYC/AML:\x20pooled\x20fundraising\x20is\x20high\x20regulatory\x20intensity\x20—\x20cross-border\x20funds\x20and\x20reward\x20tiers\x20may\x20trigger\x20securities/money-transmission\x20rules;\x20flag\x20for\x20compliance,\x20do\x20not\x20automate\x20around\x20them','R-M1-11:\x20no\x20\x27refunded\x27/\x27cancelled\x27\x20fund\x20terminals\x20—\x20the\x20refund\x20leg\x20routes\x20via\x20the\x20Allocator\x20triggered\x20by\x20the\x20missed-threshold\x20business\x20state\x20at\x20deadline;\x20disputes\x20go\x20to\x20Arbitration']},{'name':'general','phase':0x1,'industry':'Anything\x20not\x20covered\x20/\x20hybrid','trust_pattern':'User-defined\x20from\x20scratch','traits':{'has_logistics':![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![]},'default_template':null,'key_risk':'No\x20safety\x20net\x20—\x20user\x20must\x20design\x20all\x20trust\x20mechanisms\x20manually','build_notes':['Escape\x20hatch:\x20any\x20user\x20can\x20switch\x20to\x20general\x20mode\x20at\x20any\x20time','Already-created\x20objects\x20under\x20a\x20previous\x20mode\x20remain\x20on-chain\x20(REUSE\x20pattern)','wowok-machine\x20/\x20wowok-guard\x20/\x20wowok-provider\x20become\x20primary\x20references']}];export function matchScenarioMode(a){const b=a['toLowerCase'](),c=inferScenarioTraits(a),e=SCENARIO_MODES['map'](h=>{let i=0x0,j=0x0;for(const k of Object['keys'](c)){j+=0x1;if(h['traits'][k]===c[k])i+=0x1;}if(h['name']!=='general'){const l=MODE_KEYWORDS[h['name']]??[];for(const m of l){if(b['includes'](m))i+=0.5;}}return{'mode':h,'score':i,'total':j};});let f=e[0x0];for(const h of e){if(h['score']>f['score'])f=h;}const g=f['total']>0x0?Math['min'](0x1,f['score']/f['total']):0x0;return{'mode':f['mode'],'confidence':g};}const MODE_KEYWORDS={'freelance':['freelance','design','develop','consult','write','consulting'],'rental':['rent','rental','lease','borrow','equipment','vehicle','property'],'education':['course','training','tutor','teach','education','class'],'travel':['tour','travel','trip','itinerary','vacation'],'subscription':['subscribe','subscription','membership','saas','newsletter','recurring'],'retail':['retail','shop','store','marketplace','sell\x20goods','ecommerce','e-commerce'],'licensing':['license','licensing','royalty','royalties','ip','intellectual\x20property','music\x20rights','sync','beat','franchise','rights'],'crowdfunding':['crowdfunding','crowdfund','fundraising','pledge','backer','kickstarter','campaign','all-or-nothing','threshold\x20goal','presale\x20campaign','raise\x20funds']};export function inferScenarioTraits(a){const b=a['toLowerCase']();return{'has_logistics':/ship|delivery|equipment|vehicle|physical|goods/['test'](b),'communication_heavy':/consult|discuss|back-and-forth|custom|bespoke|negotiate/['test'](b),'pure_digital':/digital|file|download|online|software|code|design|content/['test'](b),'long_cycle':/month|long-term|engagement|project|semester|period/['test'](b),'deposit_required':/deposit|escrow|prepay|tuition|reserve/['test'](b),'multi_tier_allocation':/tier|segment|multi-|agency|hotel|guide|driver/['test'](b)};}export const MODE_COMPOSITIONS=[{'modes':['freelance','subscription'],'use_case':'Retainer\x20consulting\x20(monthly\x20+\x20milestone)','conflict_resolution':'Allocator:\x20split\x20into\x20retainer\x20(subscription)\x20+\x20milestone\x20(freelance)'},{'modes':['rental','education'],'use_case':'Equipment\x20training\x20rental','conflict_resolution':'Machine:\x20extend\x20rental\x20nodes\x20with\x20attendance\x20gates'},{'modes':['travel','rental'],'use_case':'Tour\x20with\x20equipment','conflict_resolution':'Allocator:\x20segment\x20allocation\x20+\x20deposit\x20escrow\x20side-by-side'}];export function getScenarioMode(a){return SCENARIO_MODES['find'](b=>b['name']===a);}export function listScenarioModes(){return SCENARIO_MODES;}export function getShippedModes(){return SCENARIO_MODES['filter'](a=>a['phase']===0x1);}export function getModeCompositions(a){return MODE_COMPOSITIONS['filter'](b=>b['modes']['includes'](a));}export const SCENARIO_MODES_VERSION=0x9;
@@ -1 +1 @@
1
- import{EDGE_SCHEMA_BY_ID,EDGE_ID_REPOSITORY_POLICY_GUARD}from'../graph/onchain/index.js';export const SCENARIO_BRIDGE_REGISTRY=[{'id':'bridge.supply_match','code':'b03','edge_refs':['demand.guard','demand.presenter','demand.presenter_service'],'name':'Supply-Demand\x20Match','participants':[{'object':'Demand','role':'need\x20expression\x20(what\x20is\x20wanted)'},{'object':'Service','role':'capability\x20offering\x20(what\x20can\x20be\x20delivered)'},{'object':'Guard','role':'presentation\x20qualification\x20(who\x20may\x20present\x20what)'}],'bridge_fields':[{'object':'Demand','field':'guards:\x20vector<ServiceGuard>\x20{\x20guard,\x20service_identifier\x20}','meaning':'presenters\x20must\x20pass\x20the\x20guard;\x20service_identifier\x20resolves\x20WHICH\x20service\x20they\x20present\x20for'},{'object':'Demand','field':'presentation\x20call\x20carries\x20the\x20Service\x20object\x20as\x20its\x20argument','meaning':'a\x20Service\x20object\x20is\x20supplied\x20AT\x20the\x20presentation\x20—\x20the\x20demand\x20does\x20not\x20store\x20services;\x20suppliers\x20bring\x20them'}],'move_anchor':'presentation\x20resolves\x20the\x20guard\x27s\x20verdict\x20from\x20the\x20submitted\x20service-identifier\x20evidence','scenario':{'from':'Demand\x20scenario\x20(need\x20expression)','to':'Service\x20scenario\x20(product\x20listing)','merged':'Matchmaking\x20(discovery\x20+\x20qualification\x20+\x20choice)'},'capability_gained':'Choice\x20among\x20qualified\x20offers:\x20the\x20demander\x20compares\x20presented\x20Services\x20(acceptance_score\x20accumulates\x20per\x20presenter)\x20'+'—\x20a\x20capability\x20neither\x20a\x20bare\x20Demand\x20(no\x20offers)\x20nor\x20a\x20bare\x20Service\x20(no\x20buyer\x20context)\x20possesses.','value_flow':'No\x20funds\x20move\x20yet\x20—\x20this\x20bridge\x20prices\x20ATTENTION:\x20acceptance_score\x20on\x20the\x20presenter\x27s\x20entity\x20is\x20the\x20reputation\x20currency.','prerequisites':['Demand\x20not\x20yet\x20paused','Presenter\x20passes\x20the\x20Demand\x27s\x20guard\x20(E_NEED_PASSPORT\x20when\x20guards\x20exist\x20and\x20no\x20passport\x20is\x20given)'],'examples':['Procurement\x20tender:\x20a\x20company\x20posts\x20a\x20Demand;\x20certified\x20suppliers\x20present\x20their\x20Services;\x20the\x20best\x20acceptance_score\x20wins\x20the\x20order.','Local\x20services\x20marketplace:\x20\x27repair\x20my\x20roof\x27\x20demand\x20meets\x20licensed\x20roofer\x20services.']},{'id':'bridge.purchase','code':'b01','edge_refs':['service.buy_guard','order.service','order.machine','order.discount','discount.service','order.builder','eoa.order','service.order'],'name':'Purchase\x20(Quote\x20→\x20Order)','participants':[{'object':'Service','role':'published\x20offering\x20(sales,\x20wip,\x20price)'},{'object':'Quote','role':'buyer\x27s\x20item\x20selection\x20+\x20computed\x20total'},{'object':'Discount','role':'transferable\x20price\x20reduction\x20bound\x20to\x20the\x20service'},{'object':'Guard','role':'buy\x20qualification\x20(buy_guard)'},{'object':'Order','role':'the\x20created\x20agreement'}],'bridge_fields':[{'object':'Service','field':'buy_guard:\x20Option<address>','meaning':'who\x20may\x20buy\x20(qualification);\x20buy()\x20refuses\x20when\x20a\x20guard\x20exists\x20and\x20no\x20passport\x20proves\x20it'},{'object':'Discount','field':'service:\x20address\x20(+\x20time\x20window,\x20benchmark,\x20transferable)','meaning':'the\x20discount\x20object\x20itself\x20carries\x20WHICH\x20service\x20it\x20applies\x20to\x20—\x20it\x20travels\x20wallet-to-wallet\x20but\x20stays\x20bound\x20to\x20the\x20service'},{'object':'Order','field':'machine:\x20Option<address>\x20(copied\x20from\x20the\x20Service\x20at\x20order\x20creation)','meaning':'the\x20fulfillment\x20workflow\x20is\x20PRE-BINDED\x20at\x20purchase\x20time\x20—\x20the\x20order\x20reserves\x20its\x20own\x20execution\x20path'}],'move_anchor':'the\x20purchase\x20entry\x20(open\x20or\x20passport-gated)\x20creates\x20the\x20Order','scenario':{'from':'Service\x20scenario\x20(offering)','to':'Order\x20scenario\x20(agreement\x20+\x20escrow\x20intent)','merged':'Transaction\x20(commitment\x20with\x20reserved\x20fulfillment)'},'capability_gained':'A\x20binding\x20agreement\x20that\x20reserves\x20its\x20own\x20execution\x20path:\x20the\x20Order\x20snapshot\x20copies\x20the\x20Service\x27s\x20machine\x20reference\x20'+'at\x20creation,\x20so\x20later\x20Service\x20edits\x20cannot\x20retroactively\x20change\x20how\x20THIS\x20order\x20is\x20fulfilled.','value_flow':'Amount\x20is\x20recorded\x20(order.amount)\x20but\x20coins\x20are\x20not\x20yet\x20moved\x20—\x20payment\x20happens\x20at\x20the\x20allocation\x20bridge.','prerequisites':['Service\x20published\x20(bPublished)\x20and\x20not\x20paused\x20(E_NOT_PUBLISHED\x20/\x20E_PAUSED)','Quote\x20signed\x20by\x20the\x20tx\x20digest\x20(E_INVALID_QUOTE)\x20—\x20prevents\x20quote\x20replay\x20across\x20transactions','buy_guard\x20passed\x20when\x20present\x20(E_BUY_GUARD_PASSPORT_REQUIRED)'],'examples':['Standard\x20e-commerce\x20checkout:\x20quote\x20items,\x20apply\x20a\x20transferred\x20Discount,\x20create\x20the\x20Order.','Gated\x20purchase:\x20only\x20KYC-passed\x20wallets\x20(buy_guard)\x20can\x20order\x20a\x20licensed\x20service.']},{'id':'bridge.escrow_split','code':'b05','edge_refs':['service.order_allocator_guard','order.allocation','allocation.guard','allocation.payment','allocation.for_object','allocation.for_guard','wf.forward_guard','payment.recipient','payment.from_object','payment.for_object','payment.for_guard'],'name':'Escrow\x20&\x20Split\x20(Order\x20→\x20Allocation\x20→\x20Payment)','participants':[{'object':'Service','role':'payout\x20rules\x20owner\x20(order_allocators)'},{'object':'Order','role':'escrowed\x20amount\x20+\x20single\x20allocation\x20slot'},{'object':'Allocation','role':'guard-gated\x20distributor'},{'object':'Payment','role':'the\x20actual\x20value\x20transfer\x20with\x20provenance'}],'bridge_fields':[{'object':'Service','field':'order_allocators:\x20Option<Allocators>','meaning':'who\x20may\x20run\x20the\x20split\x20and\x20under\x20which\x20guards\x20—\x20the\x20merchant\x27s\x20payout\x20policy,\x20pre-registered\x20on\x20the\x20Service'},{'object':'Order','field':'allocation:\x20Option<address>\x20(set\x20once\x20—\x20single-shot\x20split)','meaning':'the\x20order\x20can\x20be\x20split\x20exactly\x20once\x20—\x20the\x20escrow-to-payout\x20transition\x20is\x20one-way\x20and\x20auditable'},{'object':'Payment','field':'info.for_object\x20/\x20from_object','meaning':'every\x20payout\x20carries\x20the\x20source\x20object\x20address\x20—\x20money\x20always\x20answers\x20\x27which\x20business\x20object\x20paid\x20me\x27'}],'move_anchor':'order-side\x20allocation\x20entry\x20(E_ORDER_SERVICE_NOT_MATCH)\x20→\x20coin\x20escrow\x20split\x20for\x20the\x20order\x20(payment_info(order),\x20alloc)','scenario':{'from':'Order\x20scenario\x20(agreement\x20+\x20funds)','to':'Payment\x20scenario\x20(value\x20transfer)','merged':'Settlement\x20(escrowed\x20funds\x20split\x20by\x20declared\x20policy)'},'capability_gained':'Trustless\x20settlement:\x20the\x20buyer\x20pays\x20into\x20the\x20order\x20amount,\x20and\x20the\x20split\x20executes\x20only\x20under\x20the\x20merchant\x27s\x20'+'pre-registered\x20allocator\x20guards\x20—\x20neither\x20side\x20can\x20redirect\x20the\x20other\x27s\x20share;\x20the\x20Payment\x27s\x20from_object\x20makes\x20'+'every\x20revenue\x20line\x20item\x20auditable\x20back\x20to\x20its\x20order.','value_flow':'Buyer\x20coin\x20→\x20Allocation\x20balance\x20→\x20(guard-gated\x20alloc)\x20→\x20Payment\x20recipients\x20(Entity\x20/\x20Signer\x20/\x20GuardIdentifier).','prerequisites':['Coin\x20≥\x20order.amount\x20(E_COIN_NOT_ENOUGH),\x20excess\x20refunded\x20to\x20the\x20sender\x20in\x20the\x20same\x20tx','The\x20calling\x20Service\x20IS\x20the\x20order\x27s\x20service\x20(E_ORDER_SERVICE_NOT_MATCH)','Rate\x20shares\x20must\x20complete\x2010000\x20basis\x20points\x20unless\x20a\x20Surplus\x20entry\x20exists'],'examples':['Multi-vendor\x20order:\x20one\x20payment\x20split\x20across\x20goods\x20supplier,\x20logistics\x20operator,\x20and\x20platform\x20surplus.','Payroll-style\x20settlement:\x20order\x20revenue\x20split\x20to\x20staff\x20entities\x20by\x20Rate\x20with\x20the\x20owner\x20taking\x20Surplus.']},{'id':'bridge.fulfillment','code':'b04','edge_refs':['service.machine','order.machine','order.progress','progress.machine','progress.task','progress.named_operator','progress.context_repository','machine.node','wf.transition','wf.forward_guard','permission.entity'],'name':'Fulfillment\x20(Order\x20×\x20Machine\x20→\x20Progress)','participants':[{'object':'Service','role':'workflow\x20owner\x20(machine\x20field)'},{'object':'Order','role':'the\x20work\x20item\x20to\x20execute'},{'object':'Machine','role':'workflow\x20template\x20(nodes\x20+\x20forwards)'},{'object':'Progress','role':'per-order\x20workflow\x20instance'},{'object':'Permission','role':'who\x20may\x20advance\x20which\x20edge'}],'bridge_fields':[{'object':'Service','field':'machine:\x20Option<address>','meaning':'the\x20workflow\x20template\x20the\x20service\x20promises\x20to\x20execute\x20—\x20locked\x20at\x20publish\x20(bPublished)'},{'object':'Progress','field':'order\x20namespace\x20+\x20the\x20buyer\x20registered\x20as\x20the\x20order\x27s\x20owner','meaning':'the\x20buyer\x20becomes\x20the\x20Progress\x27s\x20order-owner\x20namespace:\x20operators\x20advance\x20THEIR\x20copy,\x20the\x20buyer\x27s\x20own\x20Progress\x20view\x20aggregates'},{'object':'Machine','field':'Forward\x20{\x20namedOperator\x20|\x20permissionIndex\x20|\x20guard\x20}','meaning':'each\x20edge\x20declares\x20its\x20operator\x20—\x20internal\x20staff,\x20permission\x20entity,\x20or\x20guard-proven\x20external\x20party'}],'move_anchor':'per-order\x20workflow\x20instantiation\x20(E_MACHINE_NOT_MATCH\x20prechecked)\x20attaches\x20the\x20Progress\x20instance\x20to\x20the\x20order','scenario':{'from':'Order\x20scenario\x20(agreement)','to':'Machine\x20scenario\x20(process\x20template)','merged':'Execution\x20(per-order\x20workflow\x20with\x20multi-party\x20advancement)'},'capability_gained':'Coordinated\x20execution:\x20the\x20SAME\x20template\x20runs\x20independently\x20per\x20order,\x20with\x20each\x20edge\x20potentially\x20operated\x20by\x20a\x20'+'different\x20party\x20(employee\x20/\x20supplier\x20/\x20buyer)\x20under\x20permission\x20or\x20guard\x20checks\x20—\x20process\x20outsourcing\x20with\x20on-chain\x20accountability.','prerequisites':['The\x20supplied\x20machine\x20IS\x20the\x20service\x27s\x20machine\x20(E_MACHINE_NOT_MATCH)','Each\x20forward\x27s\x20weight\x20counts\x20at\x20most\x20once\x20per\x20session\x20(E_NOT_THE_HOLDER\x20on\x20re-execution)','Edge\x20guard\x20(when\x20present)\x20requires\x20submitted\x20evidence\x20—\x20retained\x20submissions\x20persist\x20into\x20the\x20session\x20history'],'examples':['Custom\x20manufacturing:\x20paid\x20→\x20machining\x20→\x20QC\x20→\x20shipped,\x20where\x20QC\x20is\x20advanced\x20by\x20an\x20independent\x20inspector\x20(namedOperator).','Multi-supplier\x20sub-orders:\x20the\x20machine\x27s\x20nodes\x20hand\x20off\x20between\x20the\x20merchant\x20and\x20subcontracted\x20suppliers.']},{'id':'bridge.dispute','code':'b06','edge_refs':['service.permission','service.arbitration','arbitration.permission','arbitration.voting_guard','arbitration.usage_guard','order.dispute','order.claimed_by','arb.order','arb.arbitration_service','arb.voter'],'name':'Dispute\x20&\x20Compensation\x20(Service\x20×\x20Arbitration\x20×\x20Order\x20→\x20Arb)','participants':[{'object':'Service','role':'pre-registered\x20arbitrations\x20+\x20compensation\x20fund'},{'object':'Arbitration','role':'voting\x20rules\x20+\x20usage\x20gate'},{'object':'Order','role':'the\x20disputed\x20agreement\x20(single\x20claim)'},{'object':'Arb','role':'the\x20case\x20(7-state\x20lifecycle)'}],'bridge_fields':[{'object':'Service','field':'arbitrations:\x20vector<address>\x20+\x20compensation_fund:\x20Balance<T>','meaning':'the\x20merchant\x20pre-commits\x20BOTH\x20who\x20judges\x20(independent\x20permission)\x20AND\x20the\x20money\x20that\x20backs\x20the\x20verdict'},{'object':'Service','field':'arbitration\x20registration\x20fairness\x20check','meaning':'E_ARBITRATION_PERMISSION_CONFLICT:\x20an\x20Arbitration\x20sharing\x20the\x20Service\x27s\x20own\x20Permission\x20is\x20REJECTED\x20—\x20fairness\x20is\x20enforced\x20as\x20a\x20RELATIONAL\x20constraint,\x20not\x20a\x20promise'},{'object':'Order','field':'dispute:\x20vector<address>\x20+\x20claimed_by:\x20Option<address>','meaning':'disputes\x20append\x20to\x20the\x20order;\x20compensation\x20claims\x20it\x20exactly\x20once\x20(E_ORDER_ALREADY_CLAIMED)\x20—\x20the\x20payout\x20is\x20single-shot\x20by\x20construction'}],'move_anchor':'dispute\x20filing\x20(open\x20or\x20passport-gated)\x20+\x20compensation\x20claim,\x207-state\x20lifecycle','scenario':{'from':'Fulfillment\x20scenario\x20(execution\x20with\x20possible\x20disagreement)','to':'Arbitration\x20scenario\x20(independent\x20judgment)','merged':'Remedy\x20(wrong\x20execution\x20→\x20compensated\x20loss)'},'capability_gained':'Credible\x20remedy:\x20the\x20loser\x20of\x20a\x20bad\x20transaction\x20is\x20made\x20whole\x20from\x20a\x20fund\x20the\x20merchant\x20could\x20not\x20pre-empty,\x20'+'judged\x20by\x20parties\x20the\x20merchant\x20cannot\x20appoint\x20unilaterally\x20—\x20trustlessness\x20expressed\x20as\x20a\x20field-level\x20topology\x20constraint.','value_flow':'compensation_fund\x20(Service)\x20→\x20indemnity\x20(Arb)\x20→\x20compensation\x20claim\x20to\x20the\x20winning\x20party\x20(single\x20claim\x20per\x20order).','prerequisites':['Disputant\x20passes\x20the\x20Arbitration\x27s\x20usage_guard\x20when\x20set\x20(E_NEED_PASSPORT)','Voters\x20pass\x20voting\x20guards;\x20vote\x20weight\x20from\x20FixedValue\x20or\x20GuardIdentifier\x20submission','Voting\x20deadline\x20elapsed\x20before\x20finish;\x20objection\x20windows\x20respected\x20(state\x20machine)'],'examples':['Delivery\x20dispute:\x20buyer\x20proves\x20non-delivery\x20via\x20WTS\x20evidence;\x20independent\x20arbitrators\x20vote;\x20compensation\x20pays\x20from\x20the\x20fund.','SLA\x20breach:\x20machine\x20timestamps\x20prove\x20late\x20delivery;\x20weighted\x20voters\x20set\x20the\x20indemnity.']},{'id':'bridge.data_service','code':'b02','edge_refs':['service.repository','repository.permission',EDGE_ID_REPOSITORY_POLICY_GUARD,'repository.quote_guard','repository.data_about','progress.context_repository'],'name':'Data\x20Service\x20(Service\x20×\x20Repository)','participants':[{'object':'Service','role':'the\x20offering\x20that\x20includes\x20data\x20deliverables'},{'object':'Repository','role':'on-chain\x20database\x20(policies,\x20rows)'},{'object':'Guard','role':'write/quote\x20qualification\x20per\x20policy'}],'bridge_fields':[{'object':'Service','field':'repositories:\x20vector<address>\x20(max\x20100)','meaning':'databases\x20the\x20service\x20commits\x20to\x20maintain\x20—\x20the\x20deliverable\x20IS\x20the\x20data'},{'object':'Repository','field':'PolicyGuard\x20{\x20id_from_submission,\x20data_from_submission\x20}','meaning':'writes\x20are\x20guard-qualified:\x20WHO\x20(row\x20key)\x20may\x20write\x20WHAT\x20(the\x20submitted\x20data\x20itself)'}],'move_anchor':'repositories\x20field,\x20policy-guarded\x20writes','scenario':{'from':'Service\x20scenario\x20(offering)','to':'Repository\x20scenario\x20(on-chain\x20database)','merged':'Data\x20products\x20(paid,\x20qualified,\x20auditable\x20data\x20maintenance)'},'capability_gained':'Verifiable\x20data\x20work:\x20a\x20subscription\x20where\x20the\x20provider\x27s\x20every\x20write\x20is\x20qualified\x20by\x20guards\x20and\x20attributable\x20to\x20'+'the\x20paid\x20service\x20—\x20data\x20quality\x20becomes\x20an\x20enforceable\x20contract\x20term,\x20not\x20a\x20promise.','prerequisites':['Writer\x20passes\x20the\x20policy\x27s\x20write\x20guards','Row\x20key\x20resolves\x20via\x20id_from_submission\x20(or\x20PolicyRule.id_from\x20static\x20override)'],'examples':['Market-data\x20feed\x20service:\x20subscribers\x20pay;\x20the\x20provider\x20writes\x20rows\x20under\x20a\x20write\x20guard\x20proving\x20oracle\x20provenance.','Review\x20platform:\x20reviewers\x20pass\x20reputation\x20guards;\x20their\x20submissions\x20become\x20the\x20product\x20others\x20pay\x20to\x20read\x20(quote_guard).']},{'id':'bridge.qualification','code':'b10','edge_refs':['service.buy_guard','demand.guard','arbitration.voting_guard','arbitration.usage_guard','wf.forward_guard','repository.quote_guard',EDGE_ID_REPOSITORY_POLICY_GUARD,'treasury.deposit_guard','treasury.withdraw_guard','guard.relies','passport.guard','passport.ticket_relies'],'name':'Qualification\x20(Guard\x20×\x20every\x20gated\x20scenario)','participants':[{'object':'Guard','role':'the\x20proof\x20machine'},{'object':'Passport','role':'per-tx\x20proof\x20carrier'},{'object':'gated\x20objects','role':'Service(buy)\x20/\x20Demand(present)\x20/\x20Arbitration(vote,\x20dispute)\x20/\x20Machine(forward)\x20/\x20Repository(write)\x20/\x20Treasury(external\x20flows)'}],'bridge_fields':[{'object':'gated\x20object','field':'*_guard\x20/\x20guards\x20fields\x20(buy_guard,\x20usage_guard,\x20voting_guard,\x20forward\x20guard,\x20policy\x20write\x20guards,\x20external\x20guards)','meaning':'the\x20object\x20declares\x20WHICH\x20guard\x20governs\x20its\x20gate\x20—\x20preset\x20slots\x20(guard-bindings.ts)\x20define\x20what\x20the\x20guard\x27s\x20submissions\x20MEAN\x20for\x20that\x20object'}],'move_anchor':'guard\x20verdict\x20resolution\x20+\x20evidence\x20retrieval\x20(native\x20DSL:\x20Signer/Clock/Query\x20×\x20logic\x20tree)','scenario':{'from':'Proof\x20scenario\x20(evidence\x20+\x20verification)','to':'any\x20gated\x20business\x20scenario','merged':'Programmable\x20trust\x20(rules-as-code\x20participation)'},'capability_gained':'Unforgeable\x20participation\x20rules:\x20KYC,\x20stake,\x20membership,\x20time\x20windows,\x20oracle\x20facts\x20—\x20expressed\x20once\x20in\x20a\x20Guard\x20and\x20'+'reused\x20across\x20every\x20gate\x20that\x20binds\x20it;\x20the\x20same\x20guard\x20can\x20gate\x20buying,\x20presenting,\x20voting,\x20and\x20writing\x20consistently.','prerequisites':['Guard\x20DSL\x20type\x20compatibility\x20(e.g.\x20RewardIdentifier\x20needs\x20address-typed\x20submissions)','Passport\x20carries\x20the\x20guard\x27s\x20required\x20submissions\x20in\x20the\x20same\x20tx'],'examples':['One\x20KYC\x20guard\x20reused\x20by\x20five\x20services\x27\x20buy_gates\x20—\x20one\x20proof,\x20five\x20doors.','Stake-weighted\x20voting\x20guard:\x20the\x20same\x20guard\x20governs\x20both\x20arbitration\x20ballots\x20and\x20treasury\x20withdrawals.']},{'id':'bridge.communication','code':'b11','edge_refs':['service.um','machine.um','demand.um','arbitration.um','reward.um','repository.um','permission.um','treasury.um','contact.permission','contact.im','order.required_info','eoa.contact'],'name':'Communication\x20(um:\x20Contact\x20×\x20every\x20business\x20object)','participants':[{'object':'Contact','role':'bound\x20IM\x20channel\x20(ims\x20members)'},{'object':'business\x20objects','role':'Service\x20/\x20Order\x20context\x20/\x20Demand\x20/\x20Arbitration\x20/\x20Treasury\x20/\x20Reward\x20/\x20Repository\x20/\x20Machine'}],'bridge_fields':[{'object':'business\x20object','field':'um:\x20Option<address>','meaning':'each\x20object\x20can\x20bind\x20ONE\x20Contact\x20—\x20its\x20dedicated\x20negotiation/coordination\x20channel;\x20affiliation\x20registered\x20in\x20object_linker'},{'object':'Contact','field':'ims:\x20vector<Im{at,\x20status,\x20description}>','meaning':'channel\x20membership\x20with\x20per-member\x20status\x20—\x20the\x20roster\x20of\x20who\x20talks\x20about\x20THIS\x20object\x27s\x20business'}],'move_anchor':'channel\x20roster\x20membership\x20(ims)\x20add/remove,\x20per-object\x20channel\x20bind/unbind','scenario':{'from':'Business\x20scenario\x20(any\x20object\x20lifecycle)','to':'Encrypted\x20IM\x20scenario\x20(WTS\x20evidence,\x20negotiation)','merged':'Contextual\x20communication\x20(talk\x20WITH\x20evidence\x20about\x20the\x20exact\x20business)'},'capability_gained':'Every\x20business\x20object\x20can\x20grow\x20its\x20own\x20communication\x20channel:\x20pre-order\x20negotiation,\x20in-flight\x20coordination,\x20and\x20'+'dispute\x20evidence\x20collection\x20happen\x20IN\x20the\x20context\x20of\x20the\x20exact\x20object\x20they\x20concern\x20—\x20messages\x20become\x20evidence\x20'+'(WTS)\x20tied\x20to\x20the\x20on-chain\x20thing.','prerequisites':['um\x20binding\x20is\x20single\x20(one\x20Contact\x20per\x20object;\x20rebinding\x20replaces\x20the\x20affiliation\x20record)','IM\x20membership\x20managed\x20by\x20the\x20Contact\x20owner'],'examples':['Order-level\x20channel:\x20buyer,\x20merchant,\x20and\x20the\x20assigned\x20operator\x20coordinate\x20delivery\x20in\x20the\x20order\x27s\x20um.','Arbitration\x20evidence\x20room:\x20disputants\x20and\x20arbitrators\x20exchange\x20WTS-signed\x20evidence\x20in\x20the\x20arbitration\x27s\x20um.']},{'id':'bridge.governance','code':'b09','edge_refs':['service.permission','arbitration.permission','demand.permission','machine.permission','reward.permission','repository.permission','contact.permission','treasury.permission','permission.admin','permission.owner','permission.entity','eoa.permission','permission.core_binding','permission.tx_binding'],'name':'Governance\x20(permission\x20×\x20every\x20object)','participants':[{'object':'Permission','role':'owner/admins/entities\x20+\x20per-index\x20operation\x20rights'},{'object':'business\x20objects','role':'every\x20w::\x20object\x20(permission\x20field)'},{'object':'EntityPermission','role':'reverse\x20index:\x20entity\x20→\x20memberships'}],'bridge_fields':[{'object':'business\x20object','field':'permission:\x20address','meaning':'ALL\x20admin\x20operations\x20on\x20the\x20object\x20route\x20through\x20this\x20one\x20table\x20—\x20a\x20single\x20governance\x20backbone\x20across\x20the\x20whole\x20topology'},{'object':'Permission','field':'tables:\x20entity\x20→\x20perm\x20indices\x20(0..USER_DEFINED)','meaning':'fine-grained\x20operation\x20rights\x20per\x20entity;\x20object\x20functions\x20assert\x20their\x20own\x20index\x20(e.g.\x20reward\x20new=150)'}],'move_anchor':'per-index\x20operation-rights\x20assertion\x20on\x20every\x20mutating\x20entry,\x20entity_permission\x20(0xaa8\x20reverse\x20index)','scenario':{'from':'Operation\x20scenario\x20(any\x20mutating\x20call)','to':'Permission\x20scenario\x20(roles\x20+\x20indices)','merged':'Delegated\x20administration\x20(staff\x20act\x20within\x20bounded\x20rights)'},'capability_gained':'Organizational\x20scale:\x20one\x20merchant\x20operates\x20hundreds\x20of\x20objects\x20through\x20shared\x20Permissions;\x20staff\x20gain\x20scoped\x20rights\x20'+'(per-operation\x20indices)\x20—\x20the\x20topology\x20stays\x20governable\x20as\x20it\x20grows,\x20and\x20EntityPermission\x20makes\x20any\x20address\x27s\x20'+'role\x20discoverable\x20(the\x20account-side\x20entry\x20into\x20the\x20topology).','prerequisites':['Caller\x27s\x20operation\x20rights\x20are\x20asserted\x20at\x20the\x20operation\x27s\x20permission\x20index','Zero-index\x20entities\x20have\x20membership\x20but\x20no\x20operation\x20rights\x20(fact\x20preserved\x20by\x20design)'],'examples':['Customer\x20service\x20staff\x20hold\x20index\x20225\x20(progress\x20owner_receive)\x20without\x20any\x20treasury\x20rights.','A\x20merchant\x27s\x20entire\x20object\x20fleet\x20re-governed\x20by\x20swapping\x20one\x20Permission\x20(permission\x20rebinding\x20+\x20affiliation\x20change).']},{'id':'bridge.incentive','code':'b07','edge_refs':['service.reward','demand.reward','repository.reward','reward.guard','reward.claim'],'name':'Incentive\x20(Reward\x20×\x20Guard\x20×\x20employing\x20object)','participants':[{'object':'Reward','role':'guarded\x20fund\x20pool'},{'object':'Guard','role':'claim\x20qualification\x20+\x20dynamic\x20recipient/amount'},{'object':'Service','role':'rewards:\x20vector<address>\x20—\x20marketing\x20attach\x20point'},{'object':'employee\x20entities','role':'claimants\x20(KPI-qualified)'}],'bridge_fields':[{'object':'Service','field':'rewards:\x20vector<address>\x20(max\x2020)','meaning':'marketing/incentive\x20pools\x20attached\x20to\x20the\x20offering'},{'object':'Reward','field':'RewardGuard\x20{\x20guard,\x20recipient,\x20amount,\x20expiration_time,\x20store_from_id\x20}','meaning':'claim\x20rules\x20—\x20preset\x20slots\x20read\x20payee/amount/deadline\x20from\x20guard\x20submissions\x20(see\x20guard-bindings.ts)'}],'move_anchor':'rewards\x20field,\x20guard\x20binding\x20+\x20claim','scenario':{'from':'Employment/operation\x20scenario\x20(work\x20done)','to':'Reward\x20scenario\x20(guarded\x20payout)','merged':'Incentive\x20alignment\x20(KPI\x20→\x20acceptance\x20→\x20reward\x20claim)'},'capability_gained':'Performance-contingent\x20compensation:\x20staff\x20claim\x20rewards\x20by\x20proving\x20work\x20(guard\x20evidence:\x20reaction\x20time,\x20node\x20'+'completion,\x20acceptance\x20records)\x20—\x20the\x20employment\x20tension\x20(fixed\x20pay\x20vs\x20outcome)\x20is\x20bridged\x20by\x20making\x20the\x20payout\x20'+'itself\x20evidence-gated.','value_flow':'Deposited\x20coins\x20→\x20balance\x20→\x20guard-gated\x20claim\x20(the\x20ONLY\x20balance\x20exit\x20—\x20R-R-7-01\x20requires\x20an\x20owner\x20escape\x20guard).','prerequisites':['Claim\x20within\x20expiration\x20window\x20(clock\x20≤\x20expiration_time)','Claim\x20amount\x20≤\x20balance;\x20recipient\x20resolved\x20by\x20the\x20guard\x20submission\x20(Entity\x20/\x20Signer\x20/\x20GuardIdentifier)'],'examples':['Staff\x20KPI\x20reward:\x20guard\x20verifies\x20node\x20reaction-time\x20submissions;\x20employee\x20claims\x20a\x20GuardU64Identifier\x20amount.','Referral\x20marketing:\x20purchasers\x20submit\x20receipt\x20proofs;\x20campaign\x20guard\x20pays\x20cashback\x20to\x20the\x20submitted\x20address.']},{'id':'bridge.evidence','code':'b12','edge_refs':['wf.forward_guard','passport.signer','passport.guard','passport.ticket_relies','passport.impack','order.required_info','proof.signer','proof.about'],'name':'Evidence\x20(Proof\x20/\x20retained\x20submissions\x20×\x20Progress\x20&\x20Arb)','participants':[{'object':'Proof','role':'frozen\x20signed\x20fact\x20(WTS,\x20oracle\x20attestation)'},{'object':'Machine\x20Forward','role':'retained_submission\x20requirement'},{'object':'Progress','role':'session\x20history\x20storage'},{'object':'Arb','role':'proposition/vote\x20context'}],'bridge_fields':[{'object':'Machine\x20Forward','field':'retained_submission:\x20vector<u8>','meaning':'the\x20edge\x20cannot\x20be\x20crossed\x20without\x20submitting\x20these\x20slots\x20—\x20and\x20the\x20values\x20persist\x20into\x20the\x20session\x20history'},{'object':'Order','field':'required_info:\x20Option<address>\x20(im\x20or\x20proof)','meaning':'the\x20buyer\x20attaches\x20context\x20(IM\x20thread\x20or\x20proof\x20object)\x20the\x20merchant\x20needs\x20to\x20fulfill'}],'move_anchor':'retained\x20submissions\x20persist\x20into\x20the\x20session\x20history;\x20proof\x20object\x20(frozen,\x20signer-anchored)','scenario':{'from':'Execution\x20scenario\x20(workflow\x20edges)','to':'Attestation\x20scenario\x20(signed\x20facts)','merged':'Accountable\x20execution\x20(every\x20step\x20provable\x20after\x20the\x20fact)'},'capability_gained':'An\x20audit-grade\x20trail\x20for\x20INTANGIBLE\x20work:\x20what\x20the\x20operator\x20submitted\x20to\x20cross\x20each\x20edge\x20is\x20on-chain\x20forever\x20—\x20'+'later\x20disputes,\x20KPI\x20assessments,\x20and\x20reputation\x20scores\x20read\x20the\x20same\x20trail,\x20so\x20execution\x20quality\x20becomes\x20evidence.','prerequisites':['retained_submission\x20ids\x20must\x20be\x20submission\x20slots\x20of\x20the\x20forward\x27s\x20guard\x20(E_RETAINED_SUBMISSION_ERROR)','Proof\x20objects\x20are\x20immutable\x20once\x20frozen\x20(create\x20→\x20freeze_object)'],'examples':['QC\x20step\x20requires\x20a\x20signed\x20inspection\x20proof;\x20the\x20proof\x20lands\x20in\x20the\x20session\x20history\x20with\x20the\x20advancing\x20tx.','Buyer\x20attaches\x20a\x20WTS\x20message\x20thread\x20as\x20order\x20required_info;\x20the\x20merchant\x20fulfills\x20against\x20it.']},{'id':'bridge.fund_object','code':'b08','edge_refs':['payment.recipient','payment.from_object','payment.for_object','allocation.payment','allocation.for_object','allocation.for_guard','payment.signer','treasury.record'],'name':'Fund-as-Object\x20(CoinWrapper\x20×\x20owner_receive\x20×\x20any\x20object)','participants':[{'object':'Payment\x20/\x20CoinWrapper<K>','role':'value\x20wrapped\x20as\x20a\x20transferable\x20object\x20(any\x20token\x20K)'},{'object':'receiving\x20objects','role':'Reward\x20/\x20Treasury\x20/\x20Service\x20/\x20Arbitration\x20/\x20Repository\x20/\x20Contact\x20...'},{'object':'Permission\x20owner','role':'the\x20extraction\x20target'}],'bridge_fields':[{'object':'receiving\x20object','field':'receive\x20(join\x20into\x20balance)\x20vs\x20owner_receive\x20(extract\x20received\x20objects\x20to\x20Permission\x20owner)','meaning':'two\x20DIFFERENT\x20doors:\x20receive\x20turns\x20an\x20arrived\x20payment\x20into\x20claimable\x20balance;\x20owner_receive\x20forwards\x20arrived\x20objects\x20(any\x20K,\x20incl.\x20NFT-like)\x20to\x20the\x20owner\x20without\x20touching\x20balance'},{'object':'CoinWrapper','field':'payment:\x20address','meaning':'the\x20wrapper\x20remembers\x20WHICH\x20payment\x20object\x20it\x20came\x20from\x20—\x20provenance\x20survives\x20the\x20transfer'}],'move_anchor':'receive\x20vs\x20owner-side\x20object\x20extraction,\x20unwrap\x20family','scenario':{'from':'Transfer\x20scenario\x20(objects\x20move\x20between\x20wallets/objects)','to':'Accounting\x20scenario\x20(balance\x20vs\x20custody)','merged':'Universal\x20value\x20custody\x20(any\x20asset\x20class,\x20any\x20token,\x20one\x20idiom)'},'capability_gained':'Objects\x20can\x20safely\x20RECEIVE\x20value\x20they\x20were\x20not\x20typed\x20for:\x20a\x20Reward<WOW>\x20can\x20custody\x20a\x20USDT\x20CoinWrapper\x20or\x20an\x20NFT\x20'+'via\x20owner_receive\x20—\x20cross-asset\x20custody\x20with\x20a\x20single,\x20uniform\x20extraction\x20rule\x20(to\x20the\x20Permission\x20owner).','value_flow':'CoinWrapper<K>\x20→\x20object\x20custody\x20→\x20owner_receive\x20→\x20Permission\x20owner\x20(NEVER\x20into\x20the\x20object\x27s\x20own\x20balance).','prerequisites':['owner_receive\x20requires\x20the\x20object\x27s\x20Permission\x20+\x20Receiving<K>\x20argument\x20(version+digest)','unwrapping\x20asserts\x20the\x20wrapper\x27s\x20payment\x20provenance\x20(EPAYMENT_NOT_MATCH)'],'examples':['A\x20customer\x20sends\x20an\x20NFT\x20coupon\x20to\x20a\x20Service;\x20the\x20merchant\x20extracts\x20it\x20via\x20service.owner_receive.','A\x20mixed-token\x20gift\x20lands\x20on\x20a\x20Reward;\x20owner_receive\x20forwards\x20it\x20without\x20polluting\x20the\x20WOW\x20claimable\x20balance.']}];for(const bridge of SCENARIO_BRIDGE_REGISTRY){for(const ref of bridge['edge_refs']){if(!EDGE_SCHEMA_BY_ID['has'](ref))throw new Error('scenario-topology:\x20bridge\x20'+bridge['id']+'\x20edge_ref\x20\x22'+ref+'\x22\x20is\x20not\x20a\x20registered\x20EdgeSchema\x20id');}}export const SCENARIO_CHAINS=[{'id':'chain.standard_ecommerce','name':'Standard\x20E-commerce','steps':[{'bridge':'bridge.qualification','note':'buy_guard\x20gates\x20who\x20may\x20purchase'},{'bridge':'bridge.purchase','note':'quote\x20+\x20discount\x20→\x20order\x20(machine\x20pre-bound)'},{'bridge':'bridge.communication','note':'um\x20channel\x20for\x20delivery\x20coordination'},{'bridge':'bridge.fulfillment','note':'progress\x20runs\x20the\x20machine;\x20evidence\x20retained\x20per\x20edge'},{'bridge':'bridge.escrow_split','note':'allocation\x20splits\x20escrow\x20to\x20suppliers\x20+\x20surplus'},{'bridge':'bridge.incentive','note':'optional:\x20staff\x20KPI\x20rewards\x20for\x20fast\x20fulfillment'}],'application_capability':'A\x20complete\x20store:\x20gated\x20checkout,\x20coordinated\x20delivery,\x20evidence-backed\x20fulfillment,\x20and\x20trustless\x20split\x20payout.','objects_touched':['Guard','Service','Discount','Order','Contact','Machine','Progress','Allocation','Payment','Reward','Permission','Passport']},{'id':'chain.procurement_tender','name':'Procurement\x20Tender','steps':[{'bridge':'bridge.supply_match','note':'demand\x20published;\x20qualified\x20services\x20present'},{'bridge':'bridge.qualification','note':'presentation\x20guards\x20filter\x20suppliers'},{'bridge':'bridge.purchase','note':'winning\x20offer\x20becomes\x20the\x20order'},{'bridge':'bridge.fulfillment','note':'multi-supplier\x20machine\x20handoffs'},{'bridge':'bridge.escrow_split','note':'allocation\x20pays\x20suppliers\x20+\x20surplus\x20to\x20demander?'},{'bridge':'bridge.dispute','note':'if\x20delivery\x20fails:\x20independent\x20arbitration\x20+\x20compensation'}],'application_capability':'A\x20full\x20tender\x20lifecycle:\x20need\x20→\x20competing\x20offers\x20→\x20award\x20→\x20delivery\x20→\x20settlement\x20with\x20credible\x20remedy.','objects_touched':['Demand','Guard','Service','Order','Machine','Progress','Allocation','Arbitration','Arb','Payment','Permission']},{'id':'chain.data_subscription','name':'Data\x20Subscription\x20Service','steps':[{'bridge':'bridge.data_service','note':'service\x20commits\x20to\x20repository\x20maintenance'},{'bridge':'bridge.qualification','note':'subscription\x20gate\x20(buy_guard)'},{'bridge':'bridge.purchase','note':'recurring\x20orders\x20or\x20one-off'},{'bridge':'bridge.escrow_split','note':'subscription\x20revenue\x20to\x20data\x20suppliers'},{'bridge':'bridge.communication','note':'um\x20for\x20data\x20requests\x20/\x20clarifications'},{'bridge':'bridge.dispute','note':'stale-data\x20compensation\x20via\x20arbitration'}],'application_capability':'Data\x20as\x20a\x20product:\x20paid,\x20guard-qualified\x20writes,\x20auditable\x20quality,\x20and\x20compensation\x20for\x20staleness.','objects_touched':['Repository','Guard','Service','Order','Allocation','Payment','Contact','Arbitration','Arb']},{'id':'chain.collaborative_operations','name':'Collaborative\x20Operations\x20(staff\x20+\x20outsourced\x20process)','steps':[{'bridge':'bridge.governance','note':'permission\x20entities\x20=\x20staff\x20with\x20scoped\x20indices'},{'bridge':'bridge.fulfillment','note':'machine\x20edges\x20operated\x20by\x20named\x20operators\x20/\x20permission\x20entities'},{'bridge':'bridge.evidence','note':'each\x20advance\x20retains\x20submissions'},{'bridge':'bridge.incentive','note':'KPI\x20guards\x20→\x20reward\x20claims'},{'bridge':'bridge.communication','note':'per-object\x20um\x20channels'}],'application_capability':'An\x20operating\x20company\x20on-chain:\x20internal\x20staff,\x20external\x20operators,\x20audited\x20execution,\x20aligned\x20pay.','objects_touched':['Permission','Machine','Progress','Guard','Reward','Contact','Proof']}];export const SCENARIO_TOPOLOGY_VERSION='1.1.0';export function getBridgeById(a){return SCENARIO_BRIDGE_REGISTRY['find'](c=>c['id']===a);}export function getBridgeByCode(a){return SCENARIO_BRIDGE_REGISTRY['find'](c=>c['code']===a);}export function getBridgesByObject(a){return SCENARIO_BRIDGE_REGISTRY['filter'](c=>c['participants']['some'](d=>d['object']===a)||c['bridge_fields']['some'](d=>d['object']===a));}export function getBridgesForEdge(a){return SCENARIO_BRIDGE_REGISTRY['filter'](c=>c['edge_refs']['includes'](a));}export function detectBridgesForEdges(a){const b=new Set(a);return SCENARIO_BRIDGE_REGISTRY['filter'](c=>c['edge_refs']['some'](d=>b['has'](d)));}export function getChainById(a){return SCENARIO_CHAINS['find'](b=>b['id']===a);}export function summarizeBridge(a){const c=a['participants']['map'](d=>d['object'])['join']('\x20×\x20');return'['+a['name']+']\x20'+c+'\x20→\x20'+a['scenario']['merged']+':\x20'+a['capability_gained']['split']('.\x20')[0x0]+'.';}export function detectBridgesForObjects(a){const b=new Set(a['map'](c=>c['toLowerCase']()));return SCENARIO_BRIDGE_REGISTRY['filter'](c=>c['bridge_fields']['some'](d=>b['has'](d['object']['toLowerCase']()))&&c['participants']['filter'](d=>b['has'](d['object']['toLowerCase']()))['length']>=0x2);}
1
+ import{EDGE_SCHEMA_BY_ID,EDGE_ID_REPOSITORY_POLICY_GUARD}from'../graph/onchain/index.js';export const SCENARIO_BRIDGE_REGISTRY=[{'id':'bridge.supply_match','code':'b03','edge_refs':['demand.guard','demand.presenter','demand.presenter_service'],'name':'Supply-Demand\x20Match','participants':[{'object':'Demand','role':'need\x20expression\x20(what\x20is\x20wanted)'},{'object':'Service','role':'capability\x20offering\x20(what\x20can\x20be\x20delivered)'},{'object':'Guard','role':'presentation\x20qualification\x20(who\x20may\x20present\x20what)'}],'bridge_fields':[{'object':'Demand','field':'guards:\x20vector<ServiceGuard>\x20{\x20guard,\x20service_identifier\x20}','meaning':'presenters\x20must\x20pass\x20the\x20guard;\x20service_identifier\x20resolves\x20WHICH\x20service\x20they\x20present\x20for'},{'object':'Demand','field':'presentation\x20call\x20carries\x20the\x20Service\x20object\x20as\x20its\x20argument','meaning':'a\x20Service\x20object\x20is\x20supplied\x20AT\x20the\x20presentation\x20—\x20the\x20demand\x20does\x20not\x20store\x20services;\x20suppliers\x20bring\x20them'}],'move_anchor':'presentation\x20resolves\x20the\x20guard\x27s\x20verdict\x20from\x20the\x20submitted\x20service-identifier\x20evidence','scenario':{'from':'Demand\x20scenario\x20(need\x20expression)','to':'Service\x20scenario\x20(product\x20listing)','merged':'Matchmaking\x20(discovery\x20+\x20qualification\x20+\x20choice)'},'capability_gained':'Choice\x20among\x20qualified\x20offers:\x20the\x20demander\x20compares\x20presented\x20Services\x20(acceptance_score\x20accumulates\x20per\x20presenter)\x20'+'—\x20a\x20capability\x20neither\x20a\x20bare\x20Demand\x20(no\x20offers)\x20nor\x20a\x20bare\x20Service\x20(no\x20buyer\x20context)\x20possesses.','value_flow':'No\x20funds\x20move\x20yet\x20—\x20this\x20bridge\x20prices\x20ATTENTION:\x20acceptance_score\x20on\x20the\x20presenter\x27s\x20entity\x20is\x20the\x20reputation\x20currency.','prerequisites':['Demand\x20not\x20yet\x20paused','Presenter\x20passes\x20the\x20Demand\x27s\x20guard\x20(E_NEED_PASSPORT\x20when\x20guards\x20exist\x20and\x20no\x20passport\x20is\x20given)'],'examples':['Procurement\x20tender:\x20a\x20company\x20posts\x20a\x20Demand;\x20certified\x20suppliers\x20present\x20their\x20Services;\x20the\x20best\x20acceptance_score\x20wins\x20the\x20order.','Local\x20services\x20marketplace:\x20\x27repair\x20my\x20roof\x27\x20demand\x20meets\x20licensed\x20roofer\x20services.']},{'id':'bridge.purchase','code':'b01','edge_refs':['service.buy_guard','order.service','order.machine','order.discount','discount.service','order.builder','eoa.order','service.order'],'name':'Purchase\x20(Quote\x20→\x20Order)','participants':[{'object':'Service','role':'published\x20offering\x20(sales,\x20wip,\x20price)'},{'object':'Quote','role':'buyer\x27s\x20item\x20selection\x20+\x20computed\x20total'},{'object':'Discount','role':'transferable\x20price\x20reduction\x20bound\x20to\x20the\x20service'},{'object':'Guard','role':'buy\x20qualification\x20(buy_guard)'},{'object':'Order','role':'the\x20created\x20agreement'}],'bridge_fields':[{'object':'Service','field':'buy_guard:\x20Option<address>','meaning':'who\x20may\x20buy\x20(qualification);\x20buy()\x20refuses\x20when\x20a\x20guard\x20exists\x20and\x20no\x20passport\x20proves\x20it'},{'object':'Discount','field':'service:\x20address\x20(+\x20time\x20window,\x20benchmark,\x20transferable)','meaning':'the\x20discount\x20object\x20itself\x20carries\x20WHICH\x20service\x20it\x20applies\x20to\x20—\x20it\x20travels\x20wallet-to-wallet\x20but\x20stays\x20bound\x20to\x20the\x20service'},{'object':'Order','field':'machine:\x20Option<address>\x20(copied\x20from\x20the\x20Service\x20at\x20order\x20creation)','meaning':'the\x20fulfillment\x20workflow\x20is\x20PRE-BINDED\x20at\x20purchase\x20time\x20—\x20the\x20order\x20reserves\x20its\x20own\x20execution\x20path'}],'move_anchor':'the\x20purchase\x20entry\x20(open\x20or\x20passport-gated)\x20creates\x20the\x20Order','scenario':{'from':'Service\x20scenario\x20(offering)','to':'Order\x20scenario\x20(agreement\x20+\x20escrow\x20intent)','merged':'Transaction\x20(commitment\x20with\x20reserved\x20fulfillment)'},'capability_gained':'A\x20binding\x20agreement\x20that\x20reserves\x20its\x20own\x20execution\x20path:\x20the\x20Order\x20snapshot\x20copies\x20the\x20Service\x27s\x20machine\x20reference\x20'+'at\x20creation,\x20so\x20later\x20Service\x20edits\x20cannot\x20retroactively\x20change\x20how\x20THIS\x20order\x20is\x20fulfilled.','value_flow':'Amount\x20is\x20recorded\x20(order.amount)\x20but\x20coins\x20are\x20not\x20yet\x20moved\x20—\x20payment\x20happens\x20at\x20the\x20allocation\x20bridge.','prerequisites':['Service\x20published\x20(bPublished)\x20and\x20not\x20paused\x20(E_NOT_PUBLISHED\x20/\x20E_PAUSED)','Quote\x20signed\x20by\x20the\x20tx\x20digest\x20(E_INVALID_QUOTE)\x20—\x20prevents\x20quote\x20replay\x20across\x20transactions','buy_guard\x20passed\x20when\x20present\x20(E_BUY_GUARD_PASSPORT_REQUIRED)'],'examples':['Standard\x20e-commerce\x20checkout:\x20quote\x20items,\x20apply\x20a\x20transferred\x20Discount,\x20create\x20the\x20Order.','Gated\x20purchase:\x20only\x20KYC-passed\x20wallets\x20(buy_guard)\x20can\x20order\x20a\x20licensed\x20service.']},{'id':'bridge.escrow_split','code':'b05','edge_refs':['service.order_allocator_guard','order.allocation','allocation.guard','allocation.payment','allocation.for_object','allocation.for_guard','wf.forward_guard','payment.recipient','payment.from_object','payment.for_object','payment.for_guard'],'name':'Escrow\x20&\x20Split\x20(Order\x20→\x20Allocation\x20→\x20Payment)','participants':[{'object':'Service','role':'payout\x20rules\x20owner\x20(order_allocators)'},{'object':'Order','role':'escrowed\x20amount\x20+\x20single\x20allocation\x20slot'},{'object':'Allocation','role':'guard-gated\x20distributor'},{'object':'Payment','role':'the\x20actual\x20value\x20transfer\x20with\x20provenance'}],'bridge_fields':[{'object':'Service','field':'order_allocators:\x20Option<Allocators>','meaning':'who\x20may\x20run\x20the\x20split\x20and\x20under\x20which\x20guards\x20—\x20the\x20merchant\x27s\x20payout\x20policy,\x20pre-registered\x20on\x20the\x20Service'},{'object':'Order','field':'allocation:\x20Option<address>\x20(set\x20once\x20—\x20single-shot\x20split)','meaning':'the\x20order\x20can\x20be\x20split\x20exactly\x20once\x20—\x20the\x20escrow-to-payout\x20transition\x20is\x20one-way\x20and\x20auditable'},{'object':'Payment','field':'info.for_object\x20/\x20from_object','meaning':'every\x20payout\x20carries\x20the\x20source\x20object\x20address\x20—\x20money\x20always\x20answers\x20\x27which\x20business\x20object\x20paid\x20me\x27'}],'move_anchor':'order-side\x20allocation\x20entry\x20(E_ORDER_SERVICE_NOT_MATCH)\x20→\x20coin\x20escrow\x20split\x20for\x20the\x20order\x20(payment_info(order),\x20alloc)','scenario':{'from':'Order\x20scenario\x20(agreement\x20+\x20funds)','to':'Payment\x20scenario\x20(value\x20transfer)','merged':'Settlement\x20(escrowed\x20funds\x20split\x20by\x20declared\x20policy)'},'capability_gained':'Trustless\x20settlement:\x20the\x20buyer\x20pays\x20into\x20the\x20order\x20amount,\x20and\x20the\x20split\x20executes\x20only\x20under\x20the\x20merchant\x27s\x20'+'pre-registered\x20allocator\x20guards\x20—\x20neither\x20side\x20can\x20redirect\x20the\x20other\x27s\x20share;\x20the\x20Payment\x27s\x20from_object\x20makes\x20'+'every\x20revenue\x20line\x20item\x20auditable\x20back\x20to\x20its\x20order.','value_flow':'Buyer\x20coin\x20→\x20Allocation\x20balance\x20→\x20(guard-gated\x20alloc)\x20→\x20Payment\x20recipients\x20(Entity\x20/\x20Signer\x20/\x20GuardIdentifier).','prerequisites':['Coin\x20≥\x20order.amount\x20(E_COIN_NOT_ENOUGH),\x20excess\x20refunded\x20to\x20the\x20sender\x20in\x20the\x20same\x20tx','The\x20calling\x20Service\x20IS\x20the\x20order\x27s\x20service\x20(E_ORDER_SERVICE_NOT_MATCH)','Rate\x20shares\x20must\x20complete\x2010000\x20basis\x20points\x20unless\x20a\x20Surplus\x20entry\x20exists'],'examples':['Multi-vendor\x20order:\x20one\x20payment\x20split\x20across\x20goods\x20supplier,\x20logistics\x20operator,\x20and\x20platform\x20surplus.','Payroll-style\x20settlement:\x20order\x20revenue\x20split\x20to\x20staff\x20entities\x20by\x20Rate\x20with\x20the\x20owner\x20taking\x20Surplus.']},{'id':'bridge.fulfillment','code':'b04','edge_refs':['service.machine','order.machine','order.progress','progress.machine','progress.task','progress.named_operator','progress.context_repository','machine.node','wf.transition','wf.forward_guard','permission.entity'],'name':'Fulfillment\x20(Order\x20×\x20Machine\x20→\x20Progress)','participants':[{'object':'Service','role':'workflow\x20owner\x20(machine\x20field)'},{'object':'Order','role':'the\x20work\x20item\x20to\x20execute'},{'object':'Machine','role':'workflow\x20template\x20(nodes\x20+\x20forwards)'},{'object':'Progress','role':'per-order\x20workflow\x20instance'},{'object':'Permission','role':'who\x20may\x20advance\x20which\x20edge'}],'bridge_fields':[{'object':'Service','field':'machine:\x20Option<address>','meaning':'the\x20workflow\x20template\x20the\x20service\x20promises\x20to\x20execute\x20—\x20locked\x20at\x20publish\x20(bPublished)'},{'object':'Progress','field':'order\x20namespace\x20+\x20the\x20buyer\x20registered\x20as\x20the\x20order\x27s\x20owner','meaning':'the\x20buyer\x20becomes\x20the\x20Progress\x27s\x20order-owner\x20namespace:\x20operators\x20advance\x20THEIR\x20copy,\x20the\x20buyer\x27s\x20own\x20Progress\x20view\x20aggregates'},{'object':'Machine','field':'Forward\x20{\x20namedOperator\x20|\x20permissionIndex\x20|\x20guard\x20}','meaning':'each\x20edge\x20declares\x20its\x20operator\x20—\x20internal\x20staff,\x20permission\x20entity,\x20or\x20guard-proven\x20external\x20party'}],'move_anchor':'per-order\x20workflow\x20instantiation\x20(E_MACHINE_NOT_MATCH\x20prechecked)\x20attaches\x20the\x20Progress\x20instance\x20to\x20the\x20order','scenario':{'from':'Order\x20scenario\x20(agreement)','to':'Machine\x20scenario\x20(process\x20template)','merged':'Execution\x20(per-order\x20workflow\x20with\x20multi-party\x20advancement)'},'capability_gained':'Coordinated\x20execution:\x20the\x20SAME\x20template\x20runs\x20independently\x20per\x20order,\x20with\x20each\x20edge\x20potentially\x20operated\x20by\x20a\x20'+'different\x20party\x20(employee\x20/\x20supplier\x20/\x20buyer)\x20under\x20permission\x20or\x20guard\x20checks\x20—\x20process\x20outsourcing\x20with\x20on-chain\x20accountability.','prerequisites':['The\x20supplied\x20machine\x20IS\x20the\x20service\x27s\x20machine\x20(E_MACHINE_NOT_MATCH)','Each\x20forward\x27s\x20weight\x20counts\x20at\x20most\x20once\x20per\x20session\x20(E_NOT_THE_HOLDER\x20on\x20re-execution)','Edge\x20guard\x20(when\x20present)\x20requires\x20submitted\x20evidence\x20—\x20retained\x20submissions\x20persist\x20into\x20the\x20session\x20history'],'examples':['Custom\x20manufacturing:\x20paid\x20→\x20machining\x20→\x20QC\x20→\x20shipped,\x20where\x20QC\x20is\x20advanced\x20by\x20an\x20independent\x20inspector\x20(namedOperator).','Multi-supplier\x20sub-orders:\x20the\x20machine\x27s\x20nodes\x20hand\x20off\x20between\x20the\x20merchant\x20and\x20subcontracted\x20suppliers.']},{'id':'bridge.dispute','code':'b06','edge_refs':['service.permission','service.arbitration','arbitration.permission','arbitration.voting_guard','arbitration.usage_guard','order.dispute','order.claimed_by','arb.order','arb.arbitration_service','arb.voter'],'name':'Dispute\x20&\x20Compensation\x20(Service\x20×\x20Arbitration\x20×\x20Order\x20→\x20Arb)','participants':[{'object':'Service','role':'pre-registered\x20arbitrations\x20+\x20compensation\x20fund'},{'object':'Arbitration','role':'voting\x20rules\x20+\x20usage\x20gate'},{'object':'Order','role':'the\x20disputed\x20agreement\x20(single\x20claim)'},{'object':'Arb','role':'the\x20case\x20(7-state\x20lifecycle)'}],'bridge_fields':[{'object':'Service','field':'arbitrations:\x20vector<address>\x20+\x20compensation_fund:\x20Balance<T>','meaning':'the\x20merchant\x20pre-commits\x20BOTH\x20who\x20judges\x20(independent\x20permission)\x20AND\x20the\x20money\x20that\x20backs\x20the\x20verdict'},{'object':'Service','field':'arbitration\x20registration\x20fairness\x20check','meaning':'E_ARBITRATION_PERMISSION_CONFLICT:\x20an\x20Arbitration\x20sharing\x20the\x20Service\x27s\x20own\x20Permission\x20is\x20REJECTED\x20—\x20fairness\x20is\x20enforced\x20as\x20a\x20RELATIONAL\x20constraint,\x20not\x20a\x20promise'},{'object':'Order','field':'dispute:\x20vector<address>\x20+\x20claimed_by:\x20Option<address>','meaning':'disputes\x20append\x20to\x20the\x20order;\x20compensation\x20claims\x20it\x20exactly\x20once\x20(E_ORDER_ALREADY_CLAIMED)\x20—\x20the\x20payout\x20is\x20single-shot\x20by\x20construction'}],'move_anchor':'dispute\x20filing\x20(open\x20or\x20passport-gated)\x20+\x20compensation\x20claim,\x207-state\x20lifecycle','scenario':{'from':'Fulfillment\x20scenario\x20(execution\x20with\x20possible\x20disagreement)','to':'Arbitration\x20scenario\x20(independent\x20judgment)','merged':'Remedy\x20(wrong\x20execution\x20→\x20compensated\x20loss)'},'capability_gained':'Credible\x20remedy:\x20the\x20loser\x20of\x20a\x20bad\x20transaction\x20is\x20made\x20whole\x20from\x20a\x20fund\x20the\x20merchant\x20could\x20not\x20pre-empty,\x20'+'judged\x20by\x20parties\x20the\x20merchant\x20cannot\x20appoint\x20unilaterally\x20—\x20trustlessness\x20expressed\x20as\x20a\x20field-level\x20topology\x20constraint.','value_flow':'compensation_fund\x20(Service)\x20→\x20indemnity\x20(Arb)\x20→\x20compensation\x20claim\x20to\x20the\x20winning\x20party\x20(single\x20claim\x20per\x20order).','prerequisites':['Disputant\x20passes\x20the\x20Arbitration\x27s\x20usage_guard\x20when\x20set\x20(E_NEED_PASSPORT)','Voters\x20pass\x20voting\x20guards;\x20vote\x20weight\x20from\x20FixedValue\x20or\x20GuardIdentifier\x20submission','Voting\x20deadline\x20elapsed\x20before\x20finish;\x20objection\x20windows\x20respected\x20(state\x20machine)'],'examples':['Delivery\x20dispute:\x20buyer\x20proves\x20non-delivery\x20via\x20WTS\x20evidence;\x20independent\x20arbitrators\x20vote;\x20compensation\x20pays\x20from\x20the\x20fund.','SLA\x20breach:\x20machine\x20timestamps\x20prove\x20late\x20delivery;\x20weighted\x20voters\x20set\x20the\x20indemnity.']},{'id':'bridge.data_service','code':'b02','edge_refs':['service.repository','repository.permission',EDGE_ID_REPOSITORY_POLICY_GUARD,'repository.quote_guard','repository.data_about','progress.context_repository'],'name':'Data\x20Service\x20(Service\x20×\x20Repository)','participants':[{'object':'Service','role':'the\x20offering\x20that\x20includes\x20data\x20deliverables'},{'object':'Repository','role':'on-chain\x20database\x20(policies,\x20rows)'},{'object':'Guard','role':'write/quote\x20qualification\x20per\x20policy'}],'bridge_fields':[{'object':'Service','field':'repositories:\x20vector<address>\x20(max\x20100)','meaning':'databases\x20the\x20service\x20commits\x20to\x20maintain\x20—\x20the\x20deliverable\x20IS\x20the\x20data'},{'object':'Repository','field':'PolicyGuard\x20{\x20id_from_submission,\x20data_from_submission\x20}','meaning':'writes\x20are\x20guard-qualified:\x20WHO\x20(row\x20key)\x20may\x20write\x20WHAT\x20(the\x20submitted\x20data\x20itself)'}],'move_anchor':'repositories\x20field,\x20policy-guarded\x20writes','scenario':{'from':'Service\x20scenario\x20(offering)','to':'Repository\x20scenario\x20(on-chain\x20database)','merged':'Data\x20products\x20(paid,\x20qualified,\x20auditable\x20data\x20maintenance)'},'capability_gained':'Verifiable\x20data\x20work:\x20a\x20subscription\x20where\x20the\x20provider\x27s\x20every\x20write\x20is\x20qualified\x20by\x20guards\x20and\x20attributable\x20to\x20'+'the\x20paid\x20service\x20—\x20data\x20quality\x20becomes\x20an\x20enforceable\x20contract\x20term,\x20not\x20a\x20promise.','prerequisites':['Writer\x20passes\x20the\x20policy\x27s\x20write\x20guards','Row\x20key\x20resolves\x20via\x20id_from_submission\x20(or\x20PolicyRule.id_from\x20static\x20override)'],'examples':['Market-data\x20feed\x20service:\x20subscribers\x20pay;\x20the\x20provider\x20writes\x20rows\x20under\x20a\x20write\x20guard\x20proving\x20oracle\x20provenance.','Review\x20platform:\x20reviewers\x20pass\x20reputation\x20guards;\x20their\x20submissions\x20become\x20the\x20product\x20others\x20pay\x20to\x20read\x20(quote_guard).']},{'id':'bridge.qualification','code':'b10','edge_refs':['service.buy_guard','demand.guard','arbitration.voting_guard','arbitration.usage_guard','wf.forward_guard','repository.quote_guard',EDGE_ID_REPOSITORY_POLICY_GUARD,'treasury.deposit_guard','treasury.withdraw_guard','guard.relies','passport.guard','passport.ticket_relies'],'name':'Qualification\x20(Guard\x20×\x20every\x20gated\x20scenario)','participants':[{'object':'Guard','role':'the\x20proof\x20machine'},{'object':'Passport','role':'per-tx\x20proof\x20carrier'},{'object':'gated\x20objects','role':'Service(buy)\x20/\x20Demand(present)\x20/\x20Arbitration(vote,\x20dispute)\x20/\x20Machine(forward)\x20/\x20Repository(write)\x20/\x20Treasury(external\x20flows)'}],'bridge_fields':[{'object':'gated\x20object','field':'*_guard\x20/\x20guards\x20fields\x20(buy_guard,\x20usage_guard,\x20voting_guard,\x20forward\x20guard,\x20policy\x20write\x20guards,\x20external\x20guards)','meaning':'the\x20object\x20declares\x20WHICH\x20guard\x20governs\x20its\x20gate\x20—\x20preset\x20slots\x20(guard-bindings.ts)\x20define\x20what\x20the\x20guard\x27s\x20submissions\x20MEAN\x20for\x20that\x20object'}],'move_anchor':'guard\x20verdict\x20resolution\x20+\x20evidence\x20retrieval\x20(native\x20DSL:\x20Signer/Clock/Query\x20×\x20logic\x20tree)','scenario':{'from':'Proof\x20scenario\x20(evidence\x20+\x20verification)','to':'any\x20gated\x20business\x20scenario','merged':'Programmable\x20trust\x20(rules-as-code\x20participation)'},'capability_gained':'Unforgeable\x20participation\x20rules:\x20KYC,\x20stake,\x20membership,\x20time\x20windows,\x20oracle\x20facts\x20—\x20expressed\x20once\x20in\x20a\x20Guard\x20and\x20'+'reused\x20across\x20every\x20gate\x20that\x20binds\x20it;\x20the\x20same\x20guard\x20can\x20gate\x20buying,\x20presenting,\x20voting,\x20and\x20writing\x20consistently.','prerequisites':['Guard\x20DSL\x20type\x20compatibility\x20(e.g.\x20RewardIdentifier\x20needs\x20address-typed\x20submissions)','Passport\x20carries\x20the\x20guard\x27s\x20required\x20submissions\x20in\x20the\x20same\x20tx'],'examples':['One\x20KYC\x20guard\x20reused\x20by\x20five\x20services\x27\x20buy_gates\x20—\x20one\x20proof,\x20five\x20doors.','Stake-weighted\x20voting\x20guard:\x20the\x20same\x20guard\x20governs\x20both\x20arbitration\x20ballots\x20and\x20treasury\x20withdrawals.']},{'id':'bridge.communication','code':'b11','edge_refs':['service.um','machine.um','demand.um','arbitration.um','reward.um','repository.um','permission.um','treasury.um','contact.permission','contact.im','order.required_info','eoa.contact'],'name':'Communication\x20(um:\x20Contact\x20×\x20every\x20business\x20object)','participants':[{'object':'Contact','role':'bound\x20IM\x20channel\x20(ims\x20members)'},{'object':'business\x20objects','role':'Service\x20/\x20Order\x20context\x20/\x20Demand\x20/\x20Arbitration\x20/\x20Treasury\x20/\x20Reward\x20/\x20Repository\x20/\x20Machine'}],'bridge_fields':[{'object':'business\x20object','field':'um:\x20Option<address>','meaning':'each\x20object\x20can\x20bind\x20ONE\x20Contact\x20—\x20its\x20dedicated\x20negotiation/coordination\x20channel;\x20affiliation\x20registered\x20in\x20object_linker'},{'object':'Contact','field':'ims:\x20vector<Im{at,\x20status,\x20description}>','meaning':'channel\x20membership\x20with\x20per-member\x20status\x20—\x20the\x20roster\x20of\x20who\x20talks\x20about\x20THIS\x20object\x27s\x20business'}],'move_anchor':'channel\x20roster\x20membership\x20(ims)\x20add/remove,\x20per-object\x20channel\x20bind/unbind','scenario':{'from':'Business\x20scenario\x20(any\x20object\x20lifecycle)','to':'Encrypted\x20IM\x20scenario\x20(WTS\x20evidence,\x20negotiation)','merged':'Contextual\x20communication\x20(talk\x20WITH\x20evidence\x20about\x20the\x20exact\x20business)'},'capability_gained':'Every\x20business\x20object\x20can\x20grow\x20its\x20own\x20communication\x20channel:\x20pre-order\x20negotiation,\x20in-flight\x20coordination,\x20and\x20'+'dispute\x20evidence\x20collection\x20happen\x20IN\x20the\x20context\x20of\x20the\x20exact\x20object\x20they\x20concern\x20—\x20messages\x20become\x20evidence\x20'+'(WTS)\x20tied\x20to\x20the\x20on-chain\x20thing.','prerequisites':['um\x20binding\x20is\x20single\x20(one\x20Contact\x20per\x20object;\x20rebinding\x20replaces\x20the\x20affiliation\x20record)','IM\x20membership\x20managed\x20by\x20the\x20Contact\x20owner'],'examples':['Order-level\x20channel:\x20buyer,\x20merchant,\x20and\x20the\x20assigned\x20operator\x20coordinate\x20delivery\x20in\x20the\x20order\x27s\x20um.','Arbitration\x20evidence\x20room:\x20disputants\x20and\x20arbitrators\x20exchange\x20WTS-signed\x20evidence\x20in\x20the\x20arbitration\x27s\x20um.']},{'id':'bridge.governance','code':'b09','edge_refs':['service.permission','arbitration.permission','demand.permission','machine.permission','reward.permission','repository.permission','contact.permission','treasury.permission','permission.admin','permission.owner','permission.entity','eoa.permission','permission.core_binding','permission.tx_binding'],'name':'Governance\x20(permission\x20×\x20every\x20object)','participants':[{'object':'Permission','role':'owner/admins/entities\x20+\x20per-index\x20operation\x20rights'},{'object':'business\x20objects','role':'every\x20w::\x20object\x20(permission\x20field)'},{'object':'EntityPermission','role':'reverse\x20index:\x20entity\x20→\x20memberships'}],'bridge_fields':[{'object':'business\x20object','field':'permission:\x20address','meaning':'ALL\x20admin\x20operations\x20on\x20the\x20object\x20route\x20through\x20this\x20one\x20table\x20—\x20a\x20single\x20governance\x20backbone\x20across\x20the\x20whole\x20topology'},{'object':'Permission','field':'tables:\x20entity\x20→\x20perm\x20indices\x20(0..USER_DEFINED)','meaning':'fine-grained\x20operation\x20rights\x20per\x20entity;\x20object\x20functions\x20assert\x20their\x20own\x20index\x20(e.g.\x20reward\x20new=150)'}],'move_anchor':'per-index\x20operation-rights\x20assertion\x20on\x20every\x20mutating\x20entry,\x20entity_permission\x20(0xaa8\x20reverse\x20index)','scenario':{'from':'Operation\x20scenario\x20(any\x20mutating\x20call)','to':'Permission\x20scenario\x20(roles\x20+\x20indices)','merged':'Delegated\x20administration\x20(staff\x20act\x20within\x20bounded\x20rights)'},'capability_gained':'Organizational\x20scale:\x20one\x20merchant\x20operates\x20hundreds\x20of\x20objects\x20through\x20shared\x20Permissions;\x20staff\x20gain\x20scoped\x20rights\x20'+'(per-operation\x20indices)\x20—\x20the\x20topology\x20stays\x20governable\x20as\x20it\x20grows,\x20and\x20EntityPermission\x20makes\x20any\x20address\x27s\x20'+'role\x20discoverable\x20(the\x20account-side\x20entry\x20into\x20the\x20topology).','prerequisites':['Caller\x27s\x20operation\x20rights\x20are\x20asserted\x20at\x20the\x20operation\x27s\x20permission\x20index','Zero-index\x20entities\x20have\x20membership\x20but\x20no\x20operation\x20rights\x20(fact\x20preserved\x20by\x20design)'],'examples':['Customer\x20service\x20staff\x20hold\x20index\x20225\x20(progress\x20owner_receive)\x20without\x20any\x20treasury\x20rights.','A\x20merchant\x27s\x20entire\x20object\x20fleet\x20re-governed\x20by\x20swapping\x20one\x20Permission\x20(permission\x20rebinding\x20+\x20affiliation\x20change).']},{'id':'bridge.incentive','code':'b07','edge_refs':['service.reward','demand.reward','repository.reward','reward.guard','reward.claim'],'name':'Incentive\x20(Reward\x20×\x20Guard\x20×\x20employing\x20object)','participants':[{'object':'Reward','role':'guarded\x20fund\x20pool'},{'object':'Guard','role':'claim\x20qualification\x20+\x20dynamic\x20recipient/amount'},{'object':'Service','role':'rewards:\x20vector<address>\x20—\x20marketing\x20attach\x20point'},{'object':'employee\x20entities','role':'claimants\x20(KPI-qualified)'}],'bridge_fields':[{'object':'Service','field':'rewards:\x20vector<address>\x20(max\x2020)','meaning':'marketing/incentive\x20pools\x20attached\x20to\x20the\x20offering'},{'object':'Reward','field':'RewardGuard\x20{\x20guard,\x20recipient,\x20amount,\x20expiration_time,\x20store_from_id\x20}','meaning':'claim\x20rules\x20—\x20preset\x20slots\x20read\x20payee/amount/deadline\x20from\x20guard\x20submissions\x20(see\x20guard-bindings.ts)'}],'move_anchor':'rewards\x20field,\x20guard\x20binding\x20+\x20claim','scenario':{'from':'Employment/operation\x20scenario\x20(work\x20done)','to':'Reward\x20scenario\x20(guarded\x20payout)','merged':'Incentive\x20alignment\x20(KPI\x20→\x20acceptance\x20→\x20reward\x20claim)'},'capability_gained':'Performance-contingent\x20compensation:\x20staff\x20claim\x20rewards\x20by\x20proving\x20work\x20(guard\x20evidence:\x20reaction\x20time,\x20node\x20'+'completion,\x20acceptance\x20records)\x20—\x20the\x20employment\x20tension\x20(fixed\x20pay\x20vs\x20outcome)\x20is\x20bridged\x20by\x20making\x20the\x20payout\x20'+'itself\x20evidence-gated.','value_flow':'Deposited\x20coins\x20→\x20balance\x20→\x20guard-gated\x20claim\x20(the\x20ONLY\x20balance\x20exit\x20—\x20R-R-7-01\x20requires\x20an\x20owner\x20escape\x20guard).','prerequisites':['Claim\x20within\x20expiration\x20window\x20(clock\x20≤\x20expiration_time)','Claim\x20amount\x20≤\x20balance;\x20recipient\x20resolved\x20by\x20the\x20guard\x20submission\x20(Entity\x20/\x20Signer\x20/\x20GuardIdentifier)'],'examples':['Staff\x20KPI\x20reward:\x20guard\x20verifies\x20node\x20reaction-time\x20submissions;\x20employee\x20claims\x20a\x20GuardU64Identifier\x20amount.','Referral\x20marketing:\x20purchasers\x20submit\x20receipt\x20proofs;\x20campaign\x20guard\x20pays\x20cashback\x20to\x20the\x20submitted\x20address.']},{'id':'bridge.evidence','code':'b12','edge_refs':['wf.forward_guard','passport.signer','passport.guard','passport.ticket_relies','passport.impack','order.required_info','proof.signer','proof.about'],'name':'Evidence\x20(Proof\x20/\x20retained\x20submissions\x20×\x20Progress\x20&\x20Arb)','participants':[{'object':'Proof','role':'frozen\x20signed\x20fact\x20(WTS,\x20oracle\x20attestation)'},{'object':'Machine\x20Forward','role':'retained_submission\x20requirement'},{'object':'Progress','role':'session\x20history\x20storage'},{'object':'Arb','role':'proposition/vote\x20context'}],'bridge_fields':[{'object':'Machine\x20Forward','field':'retained_submission:\x20vector<u8>','meaning':'the\x20edge\x20cannot\x20be\x20crossed\x20without\x20submitting\x20these\x20slots\x20—\x20and\x20the\x20values\x20persist\x20into\x20the\x20session\x20history'},{'object':'Order','field':'required_info:\x20Option<address>\x20(im\x20or\x20proof)','meaning':'the\x20buyer\x20attaches\x20context\x20(IM\x20thread\x20or\x20proof\x20object)\x20the\x20merchant\x20needs\x20to\x20fulfill'}],'move_anchor':'retained\x20submissions\x20persist\x20into\x20the\x20session\x20history;\x20proof\x20object\x20(frozen,\x20signer-anchored)','scenario':{'from':'Execution\x20scenario\x20(workflow\x20edges)','to':'Attestation\x20scenario\x20(signed\x20facts)','merged':'Accountable\x20execution\x20(every\x20step\x20provable\x20after\x20the\x20fact)'},'capability_gained':'An\x20audit-grade\x20trail\x20for\x20INTANGIBLE\x20work:\x20what\x20the\x20operator\x20submitted\x20to\x20cross\x20each\x20edge\x20is\x20on-chain\x20forever\x20—\x20'+'later\x20disputes,\x20KPI\x20assessments,\x20and\x20reputation\x20scores\x20read\x20the\x20same\x20trail,\x20so\x20execution\x20quality\x20becomes\x20evidence.','prerequisites':['retained_submission\x20ids\x20must\x20be\x20retained\x20submission\x20slots\x20of\x20the\x20forward\x27s\x20guard\x20(E_SUBMISSION_SLOT_MISSING\x20/\x20E_SUBMISSION_SLOT_NOT_RETAINED)','Proof\x20objects\x20are\x20immutable\x20once\x20frozen\x20(create\x20→\x20freeze_object)'],'examples':['QC\x20step\x20requires\x20a\x20signed\x20inspection\x20proof;\x20the\x20proof\x20lands\x20in\x20the\x20session\x20history\x20with\x20the\x20advancing\x20tx.','Buyer\x20attaches\x20a\x20WTS\x20message\x20thread\x20as\x20order\x20required_info;\x20the\x20merchant\x20fulfills\x20against\x20it.']},{'id':'bridge.fund_object','code':'b08','edge_refs':['payment.recipient','payment.from_object','payment.for_object','allocation.payment','allocation.for_object','allocation.for_guard','payment.signer','treasury.record'],'name':'Fund-as-Object\x20(CoinWrapper\x20×\x20owner_receive\x20×\x20any\x20object)','participants':[{'object':'Payment\x20/\x20CoinWrapper<K>','role':'value\x20wrapped\x20as\x20a\x20transferable\x20object\x20(any\x20token\x20K)'},{'object':'receiving\x20objects','role':'Reward\x20/\x20Treasury\x20/\x20Service\x20/\x20Arbitration\x20/\x20Repository\x20/\x20Contact\x20...'},{'object':'Permission\x20owner','role':'the\x20extraction\x20target'}],'bridge_fields':[{'object':'receiving\x20object','field':'receive\x20(join\x20into\x20balance)\x20vs\x20owner_receive\x20(extract\x20received\x20objects\x20to\x20Permission\x20owner)','meaning':'two\x20DIFFERENT\x20doors:\x20receive\x20turns\x20an\x20arrived\x20payment\x20into\x20claimable\x20balance;\x20owner_receive\x20forwards\x20arrived\x20objects\x20(any\x20K,\x20incl.\x20NFT-like)\x20to\x20the\x20owner\x20without\x20touching\x20balance'},{'object':'CoinWrapper','field':'payment:\x20address','meaning':'the\x20wrapper\x20remembers\x20WHICH\x20payment\x20object\x20it\x20came\x20from\x20—\x20provenance\x20survives\x20the\x20transfer'}],'move_anchor':'receive\x20vs\x20owner-side\x20object\x20extraction,\x20unwrap\x20family','scenario':{'from':'Transfer\x20scenario\x20(objects\x20move\x20between\x20wallets/objects)','to':'Accounting\x20scenario\x20(balance\x20vs\x20custody)','merged':'Universal\x20value\x20custody\x20(any\x20asset\x20class,\x20any\x20token,\x20one\x20idiom)'},'capability_gained':'Objects\x20can\x20safely\x20RECEIVE\x20value\x20they\x20were\x20not\x20typed\x20for:\x20a\x20Reward<WOW>\x20can\x20custody\x20a\x20USDT\x20CoinWrapper\x20or\x20an\x20NFT\x20'+'via\x20owner_receive\x20—\x20cross-asset\x20custody\x20with\x20a\x20single,\x20uniform\x20extraction\x20rule\x20(to\x20the\x20Permission\x20owner).','value_flow':'CoinWrapper<K>\x20→\x20object\x20custody\x20→\x20owner_receive\x20→\x20Permission\x20owner\x20(NEVER\x20into\x20the\x20object\x27s\x20own\x20balance).','prerequisites':['owner_receive\x20requires\x20the\x20object\x27s\x20Permission\x20+\x20Receiving<K>\x20argument\x20(version+digest)','unwrapping\x20asserts\x20the\x20wrapper\x27s\x20payment\x20provenance\x20(EPAYMENT_NOT_MATCH)'],'examples':['A\x20customer\x20sends\x20an\x20NFT\x20coupon\x20to\x20a\x20Service;\x20the\x20merchant\x20extracts\x20it\x20via\x20service.owner_receive.','A\x20mixed-token\x20gift\x20lands\x20on\x20a\x20Reward;\x20owner_receive\x20forwards\x20it\x20without\x20polluting\x20the\x20WOW\x20claimable\x20balance.']}];for(const bridge of SCENARIO_BRIDGE_REGISTRY){for(const ref of bridge['edge_refs']){if(!EDGE_SCHEMA_BY_ID['has'](ref))throw new Error('scenario-topology:\x20bridge\x20'+bridge['id']+'\x20edge_ref\x20\x22'+ref+'\x22\x20is\x20not\x20a\x20registered\x20EdgeSchema\x20id');}}export const SCENARIO_CHAINS=[{'id':'chain.standard_ecommerce','name':'Standard\x20E-commerce','steps':[{'bridge':'bridge.qualification','note':'buy_guard\x20gates\x20who\x20may\x20purchase'},{'bridge':'bridge.purchase','note':'quote\x20+\x20discount\x20→\x20order\x20(machine\x20pre-bound)'},{'bridge':'bridge.communication','note':'um\x20channel\x20for\x20delivery\x20coordination'},{'bridge':'bridge.fulfillment','note':'progress\x20runs\x20the\x20machine;\x20evidence\x20retained\x20per\x20edge'},{'bridge':'bridge.escrow_split','note':'allocation\x20splits\x20escrow\x20to\x20suppliers\x20+\x20surplus'},{'bridge':'bridge.incentive','note':'optional:\x20staff\x20KPI\x20rewards\x20for\x20fast\x20fulfillment'}],'application_capability':'A\x20complete\x20store:\x20gated\x20checkout,\x20coordinated\x20delivery,\x20evidence-backed\x20fulfillment,\x20and\x20trustless\x20split\x20payout.','objects_touched':['Guard','Service','Discount','Order','Contact','Machine','Progress','Allocation','Payment','Reward','Permission','Passport']},{'id':'chain.procurement_tender','name':'Procurement\x20Tender','steps':[{'bridge':'bridge.supply_match','note':'demand\x20published;\x20qualified\x20services\x20present'},{'bridge':'bridge.qualification','note':'presentation\x20guards\x20filter\x20suppliers'},{'bridge':'bridge.purchase','note':'winning\x20offer\x20becomes\x20the\x20order'},{'bridge':'bridge.fulfillment','note':'multi-supplier\x20machine\x20handoffs'},{'bridge':'bridge.escrow_split','note':'allocation\x20pays\x20suppliers\x20+\x20surplus\x20to\x20demander?'},{'bridge':'bridge.dispute','note':'if\x20delivery\x20fails:\x20independent\x20arbitration\x20+\x20compensation'}],'application_capability':'A\x20full\x20tender\x20lifecycle:\x20need\x20→\x20competing\x20offers\x20→\x20award\x20→\x20delivery\x20→\x20settlement\x20with\x20credible\x20remedy.','objects_touched':['Demand','Guard','Service','Order','Machine','Progress','Allocation','Arbitration','Arb','Payment','Permission']},{'id':'chain.data_subscription','name':'Data\x20Subscription\x20Service','steps':[{'bridge':'bridge.data_service','note':'service\x20commits\x20to\x20repository\x20maintenance'},{'bridge':'bridge.qualification','note':'subscription\x20gate\x20(buy_guard)'},{'bridge':'bridge.purchase','note':'recurring\x20orders\x20or\x20one-off'},{'bridge':'bridge.escrow_split','note':'subscription\x20revenue\x20to\x20data\x20suppliers'},{'bridge':'bridge.communication','note':'um\x20for\x20data\x20requests\x20/\x20clarifications'},{'bridge':'bridge.dispute','note':'stale-data\x20compensation\x20via\x20arbitration'}],'application_capability':'Data\x20as\x20a\x20product:\x20paid,\x20guard-qualified\x20writes,\x20auditable\x20quality,\x20and\x20compensation\x20for\x20staleness.','objects_touched':['Repository','Guard','Service','Order','Allocation','Payment','Contact','Arbitration','Arb']},{'id':'chain.collaborative_operations','name':'Collaborative\x20Operations\x20(staff\x20+\x20outsourced\x20process)','steps':[{'bridge':'bridge.governance','note':'permission\x20entities\x20=\x20staff\x20with\x20scoped\x20indices'},{'bridge':'bridge.fulfillment','note':'machine\x20edges\x20operated\x20by\x20named\x20operators\x20/\x20permission\x20entities'},{'bridge':'bridge.evidence','note':'each\x20advance\x20retains\x20submissions'},{'bridge':'bridge.incentive','note':'KPI\x20guards\x20→\x20reward\x20claims'},{'bridge':'bridge.communication','note':'per-object\x20um\x20channels'}],'application_capability':'An\x20operating\x20company\x20on-chain:\x20internal\x20staff,\x20external\x20operators,\x20audited\x20execution,\x20aligned\x20pay.','objects_touched':['Permission','Machine','Progress','Guard','Reward','Contact','Proof']}];export const SCENARIO_TOPOLOGY_VERSION='1.1.0';export function getBridgeById(a){return SCENARIO_BRIDGE_REGISTRY['find'](c=>c['id']===a);}export function getBridgeByCode(a){return SCENARIO_BRIDGE_REGISTRY['find'](c=>c['code']===a);}export function getBridgesByObject(a){return SCENARIO_BRIDGE_REGISTRY['filter'](c=>c['participants']['some'](d=>d['object']===a)||c['bridge_fields']['some'](d=>d['object']===a));}export function getBridgesForEdge(a){return SCENARIO_BRIDGE_REGISTRY['filter'](c=>c['edge_refs']['includes'](a));}export function detectBridgesForEdges(a){const b=new Set(a);return SCENARIO_BRIDGE_REGISTRY['filter'](c=>c['edge_refs']['some'](d=>b['has'](d)));}export function getChainById(a){return SCENARIO_CHAINS['find'](b=>b['id']===a);}export function summarizeBridge(a){const c=a['participants']['map'](d=>d['object'])['join']('\x20×\x20');return'['+a['name']+']\x20'+c+'\x20→\x20'+a['scenario']['merged']+':\x20'+a['capability_gained']['split']('.\x20')[0x0]+'.';}export function detectBridgesForObjects(a){const b=new Set(a['map'](c=>c['toLowerCase']()));return SCENARIO_BRIDGE_REGISTRY['filter'](c=>c['bridge_fields']['some'](d=>b['has'](d['object']['toLowerCase']()))&&c['participants']['filter'](d=>b['has'](d['object']['toLowerCase']()))['length']>=0x2);}
@@ -52,6 +52,20 @@ export interface ServiceOrderFlowStage {
52
52
  always_executed: boolean;
53
53
  }
54
54
  export declare const SERVICE_PERMISSIONS: ServicePermissionEntry[];
55
+ export declare const SERVICE_LISTING_REFUND_GATES: {
56
+ readonly price_floor: {
57
+ readonly rule: "A sale listed at price 0 is REFUSED at construction time (aborts E_PRICE_BELOW_FLOOR = 44) — applies to every sale-minting path (sales add / sales set / replace). The SDK refuses it locally in the sale builder.";
58
+ readonly rationale: "A zero-priced listing plus an allocation-free 0-amount order produced stores whose entire economics live outside the chain. Repricing an EXISTING sale down to zero stays legal and is caught at buy time by the zero-total order gate.";
59
+ };
60
+ readonly restock: {
61
+ readonly rule: "Refund restocking is opt-in per SKU: the merchant marks an ALIVE sale with the restock flag (305), then a refunded order's purchased units can be put back on shelf (305). Two-pass on-chain (validate every line, then apply) — ALL lines restock or NOTHING mutates. Unflagged or delisted lines abort E_RESTOCK_NOT_FLAGGED = 46 / E_SALE_ITEM_NOT_FOUND. Quantities come from the order's purchase rows.";
62
+ readonly events: "StockRestockedEvent per line (service, order, item, quantity, time).";
63
+ };
64
+ readonly dismissal_conclusion: {
65
+ readonly rule: "The dismissal conclusion stamps a CONCLUDED, DEFENDANT-FAVORED ruling onto the order (claimed_by = case address) — the mirror of the compensation claim. Requires: order belongs to this service, arbitration on the merchant allowlist, no self-judging (E_ARBITRATION_PERMISSION_CONFLICT), case concluded (Arbitrated/Withdrawn) AND indemnity none/0 (E_CASE_NOT_DISMISSAL_CONCLUSION = 48). Permissionless keeper surface; writes a flag, moves no funds.";
66
+ readonly closes: "A dismissal ruling would otherwise never stamp claimed_by (the zero-indemnity claim gate refuses the claim path), so a buyer who LOST the case kept every `claimed_by none` refund rail open forever.";
67
+ };
68
+ };
55
69
  export declare const SERVICE_ORDER_FLOW_STAGES: ServiceOrderFlowStage[];
56
70
  export declare const SERVICE_CROSS_OBJECT_BINDINGS: ServiceCrossObjectBinding[];
57
71
  export declare const SERVICE_SCENES: ServiceScene[];
@@ -1 +1 @@
1
- export const SERVICE_PERMISSIONS=[{'index':0x12c,'name':'SERVICE_NEW','description':'Create\x20new\x20Service','governed_operation':'create\x20a\x20new\x20Service','post_publish_mutability':'na'},{'index':0x12d,'name':'SERVICE_DESCRIPTION','description':'Modify\x20Service\x20description','governed_operation':'modify\x20the\x20Service\x20description','post_publish_mutability':'mutable'},{'index':0x12f,'name':'SERVICE_LOCATION','description':'Set\x20Service\x20location/URL','governed_operation':'set\x20the\x20Service\x20location/URL','post_publish_mutability':'mutable'},{'index':0x130,'name':'SERVICE_REPOSITORY','description':'Add/remove\x20Repository\x20references','governed_operation':'add/remove/clear\x20Repository\x20references','post_publish_mutability':'mutable'},{'index':0x131,'name':'SERVICE_SALES','description':'Add/set/remove/clear\x20sales\x20items','governed_operation':'add/set/remove/clear\x20sales\x20items','post_publish_mutability':'mutable'},{'index':0x132,'name':'SERVICE_MACHINE','description':'Bind/unbind\x20Machine\x20workflow\x20template','governed_operation':'bind/unbind\x20the\x20Machine\x20workflow\x20template','post_publish_mutability':'immutable'},{'index':0x133,'name':'SERVICE_BUY_GUARD','description':'Set/clear\x20buy\x20Guard\x20(post-publish\x20mutable)','governed_operation':'set/clear\x20the\x20buy_guard\x20check','post_publish_mutability':'mutable'},{'index':0x134,'name':'SERVICE_ARBITRATION','description':'Add/remove\x20Arbitration\x20references','governed_operation':'add/remove/clear\x20Arbitration\x20references','post_publish_mutability':'immutable'},{'index':0x135,'name':'SERVICE_CUSTOMER_INFO_REQUIRED','description':'Set\x20customer\x20required\x20info\x20fields','governed_operation':'set\x20customer\x20required\x20info\x20fields','post_publish_mutability':'mutable'},{'index':0x136,'name':'SERVICE_PAUSE','description':'Pause/resume\x20Service\x20(block\x20new\x20orders)','governed_operation':'pause/resume\x20the\x20Service','post_publish_mutability':'mutable'},{'index':0x137,'name':'SERVICE_PUBLISH','description':'Publish\x20Service\x20(IRREVERSIBLE)','governed_operation':'publish\x20the\x20Service\x20(irreversible)','post_publish_mutability':'one_shot'},{'index':0x138,'name':'SERVICE_DISCOUNT','description':'Issue/discount_destroy\x20discount\x20coupons','governed_operation':'issue/destroy\x20discount\x20coupons','post_publish_mutability':'mutable'},{'index':0x139,'name':'SERVICE_ORDER_ALLOCATOR','description':'Set\x20order\x20allocator\x20strategy','governed_operation':'set\x20the\x20order_allocators\x20strategy','post_publish_mutability':'immutable'},{'index':0x13a,'name':'SERVICE_COMPENSATION_FUND_WITHDRAW','description':'Withdraw\x20compensation\x20fund\x20(time-locked)','governed_operation':'withdraw\x20from\x20the\x20compensation_fund\x20(time-locked)','post_publish_mutability':'locked_by_duration'},{'index':0x13b,'name':'SERVICE_COMPENSATION_FUND_DEPOSIT','description':'Deposit\x20to\x20compensation\x20fund','governed_operation':'deposit\x20to\x20the\x20compensation_fund','post_publish_mutability':'mutable'},{'index':0x13c,'name':'SERVICE_COMPENSATION_FUND_RECEIVE','description':'Receive\x20compensation\x20fund\x20(arbitration\x20payout)','governed_operation':'receive\x20the\x20compensation_fund\x20payout\x20(arbitration\x20payout)','post_publish_mutability':'mutable'},{'index':0x13d,'name':'SERVICE_COMPENSATION_LOCK_DURATION_ADD','description':'Extend\x20setting_lock_duration\x20(only-increase)','governed_operation':'extend\x20setting_lock_duration\x20(only-increase)','post_publish_mutability':'mutable'},{'index':0x13e,'name':'SERVICE_REWARD','description':'Add/remove\x20Reward\x20references\x20(remove/clear\x20time-locked)','governed_operation':'add/remove/clear\x20Reward\x20references','post_publish_mutability':'locked_by_duration'},{'index':0x13f,'name':'SERVICE_OWNER_RECEIVE','description':'Receive\x20Payment/objects\x20to\x20owner','governed_operation':'receive\x20Payments/objects\x20to\x20owner','post_publish_mutability':'mutable'},{'index':0x140,'name':'SERVICE_UM','description':'Bind/unbind\x20Contact\x20as\x20UM','governed_operation':'bind/unbind\x20Contact\x20as\x20UM','post_publish_mutability':'mutable'},{'index':0x141,'name':'SERVICE_ARB_STATEMENT','description':'Append\x20seller\x20statement\x20to\x20an\x20Arb\x20case\x20(event-only)','governed_operation':'append\x20seller\x20text\x20to\x20a\x20case\x20against\x20an\x20order\x20of\x20this\x20service\x20(ArbStatementEvent;\x20no\x20Arb\x20state\x20change)','post_publish_mutability':'mutable'}];export const SERVICE_ORDER_FLOW_STAGES=[{'stage':0x1,'name':'pre_check','preconditions':['Service.bPublished\x20==\x20true\x20(else\x20E_NOT_PUBLISHED,\x20service:7)','Service.bPaused\x20==\x20false\x20(else\x20E_PAUSED,\x20service:19)','buy_guard\x20(if\x20set)\x20added\x20to\x20guards[]\x20list\x20for\x20verification'],'side_effects':[],'always_executed':!![]},{'stage':0x2,'name':'wip_verify','preconditions':['buy.items\x20non-empty','Each\x20item.name\x20matches\x20a\x20sale\x20in\x20Service.sales\x20(else\x20E_SALE_ITEM_NOT_FOUND,\x20service:32)','sale.suspension\x20==\x20false\x20(else\x20E_SALE_SUSPENDED)'],'side_effects':['If\x20buyer\x20passes\x20empty\x20wip_hash,\x20SDK\x20auto-fills\x20with\x20sale.wip_hash','verifiedWipUrls\x20Set\x20avoids\x20re-verifying\x20same\x20WIP\x20URL\x20across\x20items','verify_wip()\x20fetches\x20WIP\x20file\x20and\x20compares\x20hash\x20(else\x20E_WIP_HASH_NOT_MATCH)'],'always_executed':!![]},{'stage':0x3,'name':'quote','preconditions':['All\x20items\x20have\x20valid\x20sale\x20+\x20wip_hash\x20match','stock\x20>=\x20purchase\x20quantity\x20(else\x20E_STOCK_NOT_ENOUGH,\x20service:16)','discount\x20object\x20(if\x20used)\x20is\x20valid\x20and\x20within\x20its\x20[time_start,\x20time_end]\x20window\x20(else\x20E_DISCOUNT_TIME_INVALID)'],'side_effects':['The\x20quote\x20step\x20computes\x20the\x20total\x20price\x20(with\x20discount\x20if\x20applicable)','⚠️\x20Stock\x20is\x20deducted\x20(split)\x20—\x20side\x20effect\x20is\x20NOT\x20auto-rolled-back\x20on\x20later\x20failure','The\x20on-chain\x20quote\x20call\x20executes\x20(the\x20discount\x20path\x20validates\x20the\x20Clock\x20time-window\x20check)'],'always_executed':!![]},{'stage':0x4,'name':'create_order','preconditions':['Quote\x20object\x20from\x20stage\x203','Registrar\x20+\x20Clock\x20objects\x20available'],'side_effects':['The\x20atomic\x20on-chain\x20buy\x20call\x20executes\x20(passport-gated\x20variant\x20supported)','Order\x20object\x20created\x20(builder=customer,\x20service=Service.id)','Order.id\x20recorded\x20for\x20stages\x205-7'],'always_executed':!![]},{'stage':0x5,'name':'create_allocation','preconditions':['Service.order_allocators\x20is\x20Some\x20(configured)','Order\x20from\x20stage\x204','CoinParam\x20for\x20total_pay\x20matches\x20Service<T>\x20type'],'side_effects':['The\x20on-chain\x20allocation\x20call\x20executes','Allocation\x20object\x20created\x20(guard-selected\x20fund\x20distribution)','Order.allocation\x20=\x20Allocation\x20address'],'always_executed':!![]},{'stage':0x6,'name':'create_progress','preconditions':['Service.machine\x20is\x20Some\x20(machine\x20bound)','Order\x20from\x20stage\x204','Machine\x20from\x20Service.machine'],'side_effects':['The\x20on-chain\x20progress-creation\x20call\x20executes','Progress\x20object\x20created\x20(Progress.machine\x20=\x20Service.machine,\x20Progress.task\x20=\x20Order.id)'],'always_executed':![]},{'stage':0x7,'name':'post_actions','preconditions':['Order/Allocation/Progress\x20objects\x20from\x20stages\x204-6'],'side_effects':['Attach\x20agents\x20to\x20the\x20order\x20(if\x20order_new.agents\x20provided)','order_required_info_update\x20(if\x20order_required_info\x20provided)','Transfer\x20Order\x20ownership\x20(if\x20transfer\x20provided\x20—\x20sets\x20new\x20Order\x20owner)','namedNewOrder\x20/\x20namedNewAllocation\x20/\x20namedNewProgress\x20(local\x20naming)'],'always_executed':![]},{'stage':0x8,'name':'return_result','preconditions':['All\x20preceding\x20stages\x20succeeded'],'side_effects':['Returns\x20BuyResult\x20{\x20order,\x20allocation?,\x20progress?\x20}','Caller\x20proceeds\x20to\x20sign\x20+\x20submit\x20transaction'],'always_executed':!![]}];export const SERVICE_CROSS_OBJECT_BINDINGS=[{'object':'Machine','field':'machine','required':![],'locked_after_publish':!![],'notes':'Workflow\x20template;\x20post-publish\x20immutable\x20(F-S-20).\x20Progress.machine\x20inherits\x20this\x20value.'},{'object':'Guard','field':'buy_guard','required':![],'locked_after_publish':![],'notes':'Buyer\x20eligibility\x20guard;\x20post-publish\x20STILL\x20MUTABLE\x20(unusual\x20—\x20see\x20F-S-26)'},{'object':'Allocation','field':'order_allocators','required':!![],'locked_after_publish':!![],'notes':'Order\x20fund\x20distribution\x20strategy;\x20publish\x20prerequisite\x20(F-S-18).\x20Post-publish\x20immutable\x20(F-S-22).'},{'object':'Arbitration','field':'arbitrations','required':![],'locked_after_publish':![],'notes':'Dispute\x20handlers;\x20required\x20if\x20compensation_fund\x20>\x200\x20(F-S-19).\x20add\x20always\x20mutable;\x20remove/clear\x20time-locked\x20after\x20publish\x20(F-S-21).'},{'object':'Repository','field':'repositories','required':![],'locked_after_publish':![],'notes':'Shared\x20data\x20stores;\x20mutable\x20post-publish'},{'object':'Reward','field':'rewards','required':![],'locked_after_publish':![],'notes':'Marketing\x20incentives;\x20add\x20always\x20mutable;\x20remove/clear\x20time-locked\x20after\x20publish\x20(F-S-24)'},{'object':'Contact','field':'um','required':![],'locked_after_publish':![],'notes':'User\x20Manager\x20(Contact\x20object);\x20mutable\x20post-publish'},{'object':'Treasury','field':'(indirect\x20via\x20order_allocators.sharing.who=Entity)','required':![],'locked_after_publish':![],'notes':'Treasury\x20is\x20referenced\x20by\x20Allocation.sharing.who,\x20not\x20by\x20Service\x20directly'}];export const SERVICE_SCENES=[{'id':'service_retail','name':'Retail\x20e-commerce\x20Service','category':'retail','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL','set\x20customer\x20required\x20info\x20fields'],'permission_index_operations':['publish\x20the\x20Service\x20(311)','pause/resume\x20the\x20Service\x20(310)','add/set/remove/clear\x20sales\x20items\x20(305)','set\x20the\x20order_allocators\x20strategy\x20(313)','set/clear\x20the\x20buy_guard\x20check\x20(307)','issue/destroy\x20discount\x20coupons\x20(312)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set\x20(F-S-18,\x20E_NO_ALLOCATOR)','If\x20compensation_fund\x20>\x200,\x20arbitrations\x20must\x20be\x20non-empty\x20(F-S-19)'],'common_patterns':['Multi-tier\x20pricing\x20via\x20sales[]\x20(Standard/Premium/Enterprise)','WIP\x20hash\x20per\x20sale\x20item\x20for\x20tamper-proof\x20product\x20info','buy_guard\x20for\x20KYC\x20whitelist\x20during\x20pre-sale,\x20then\x20null\x20for\x20public\x20sale','compensation_fund\x20deposited\x20before\x20publish\x20+\x20arbitrations\x20configured'],'recommended_templates':['T-S-01','T-S-06']},{'id':'service_rental','name':'Rental\x20Service\x20(short/long-term)','category':'rental','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL'],'permission_index_operations':['publish\x20the\x20Service\x20(311)','add/set\x20sales\x20items\x20(305)','bind\x20the\x20Machine\x20workflow\x20(306)\x20—\x20for\x20rental\x20workflow','add\x20Arbitration\x20references\x20(308)\x20—\x20for\x20deposit\x20disputes'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set','machine\x20recommended\x20(rental\x20workflow\x20with\x20deposit/return\x20stages)','arbitrations\x20recommended\x20(deposit\x20refund\x20disputes)'],'common_patterns':['Machine\x20workflow\x20with\x20\x27Deposit\x20→\x20Use\x20→\x20Return\x20→\x20Refund\x27\x20nodes','compensation_fund\x20holds\x20deposit\x20guarantees','buy_guard\x20verifies\x20renter\x20identity/KYC','stock=1\x20per\x20rental\x20item\x20(unique\x20items)'],'recommended_templates':['T-S-02','T-S-04']},{'id':'service_subscription','name':'Subscription\x20Service\x20(recurring)','category':'subscription','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL'],'permission_index_operations':['publish\x20the\x20Service\x20(311)','add/set\x20sales\x20items\x20(305)','issue\x20discount\x20coupons\x20(312)\x20—\x20promotional\x20rates','add\x20Reward\x20references\x20(318)\x20—\x20loyalty\x20rewards'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Tiered\x20plans\x20(Free/Pro/Enterprise)\x20as\x20sales[]','Discount\x20coupons\x20for\x20trial\x20periods','Rewards\x20for\x20long-term\x20subscribers','Renewal\x20handled\x20by\x20repeat\x20orders\x20(no\x20native\x20recurring\x20billing)'],'recommended_templates':['T-S-03']},{'id':'service_workflow','name':'Workflow-bound\x20Service\x20(machine-bound)','category':'workflow','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL'],'permission_index_operations':['bind\x20the\x20Machine\x20workflow\x20(306)','publish\x20the\x20Service\x20(311)','set\x20the\x20order_allocators\x20strategy\x20(313)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set','machine\x20must\x20be\x20published\x20before\x20binding','machine\x20recommended\x20for\x20any\x20multi-stage\x20service\x20delivery'],'common_patterns':['Machine\x20defines\x20Pay\x20→\x20Confirm\x20→\x20Deliver\x20→\x20Sign-off\x20nodes','Progress\x20created\x20per\x20order\x20(stage\x206\x20of\x20buy\x20flow)','Named\x20operators\x20assigned\x20per\x20Forward\x20in\x20Machine','Service.paused\x20does\x20NOT\x20affect\x20already-created\x20Progress\x20(existing\x20orders\x20continue)'],'recommended_templates':['T-S-04']},{'id':'service_arbitration','name':'Arbitration-bound\x20Service\x20(dispute-ready)','category':'arbitration','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['add\x20Arbitration\x20references\x20(308)','deposit\x20to\x20the\x20compensation_fund\x20(315)','extend\x20setting_lock_duration\x20(317)','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['If\x20compensation_fund\x20>\x200,\x20arbitrations\x20must\x20be\x20non-empty\x20(F-S-19)','Arbitration\x20objects\x20must\x20be\x20created\x20before\x20binding','compensation_fund_add\x20before\x20publish\x20recommended\x20(else\x20post-publish\x20deposit\x20still\x20possible)'],'common_patterns':['2-3\x20Arbitration\x20objects\x20(different\x20arb\x20committees\x20for\x20different\x20dispute\x20types)','compensation_fund\x20deposited\x20as\x20%\x20of\x20expected\x20order\x20volume','setting_lock_duration\x20extended\x20by\x20owner\x20to\x20build\x20customer\x20trust','Arbitration\x20compensation\x20payout\x20triggered\x20by\x20the\x20arbitration\x20result\x20(not\x20by\x20Service\x20directly)'],'recommended_templates':['T-S-05','T-S-06']},{'id':'service_compensation_fund','name':'Compensation\x20Fund\x20Service\x20(embedded\x20balance)','category':'compensation_fund','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['deposit\x20to\x20the\x20compensation_fund\x20(315)','withdraw\x20from\x20the\x20compensation_fund\x20(314)\x20—\x20time-locked\x20after\x20publish','receive\x20the\x20compensation_fund\x20payout\x20(316)\x20—\x20arbitration\x20payout\x20(always\x20mutable)','extend\x20setting_lock_duration\x20(317)\x20—\x20extend\x20lock'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['compensation_fund\x20>\x200\x20→\x20arbitrations\x20non-empty\x20(F-S-19)','compensation_fund\x20coin\x20type\x20must\x20match\x20Service<T>\x20type\x20parameter'],'common_patterns':['Fund\x20inflow:\x20compensation_fund_add\x20(315)\x20—\x20always\x20mutable','Fund\x20outflow:\x20compensation_fund_withdraw\x20(314)\x20—\x20requires\x20bPaused\x20+\x20lock_duration\x20expired','Fund\x20receive:\x20compensation_fund_receive\x20(316)\x20—\x20arbitration\x20payout,\x20always\x20mutable','Fund\x20consumer:\x20arbitration\x20compensation\x20payout\x20(driven\x20by\x20arb\x20result)','Distinct\x20from\x20Treasury:\x20Service-internal,\x20arbitration-bound,\x20lock-protected'],'recommended_templates':['T-S-06']},{'id':'service_reward','name':'Reward-attached\x20Service\x20(marketing)','category':'reward','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['add/remove/clear\x20Reward\x20references\x20(318)\x20—\x20add\x20always\x20mutable;\x20remove/clear\x20time-locked\x20after\x20publish','issue/destroy\x20discount\x20coupons\x20(312)','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Rewards\x20added\x20post-publish\x20(always\x20allowed;\x20remove/clear\x20is\x20time-locked\x20after\x20publish)','Reward\x20objects\x20must\x20exist\x20before\x20binding\x20(queryObjectsWithType\x20validation)','MAX_REWARD_COUNT\x20=\x2020\x20per\x20Service','Reward\x20remove/clear\x20requires\x20Service\x20paused\x20+\x20setting_lock_duration\x20elapsed\x20(protects\x20customer\x20expectations)'],'recommended_templates':['T-S-08']},{'id':'service_arbitration_binding','name':'Arbitration\x20Binding\x20Service\x20(post-publish\x20immutable)','category':'arbitration','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['add\x20Arbitration\x20references\x20(308)\x20—\x20pre-publish\x20only','remove\x20an\x20Arbitration\x20reference\x20(308)\x20—\x20pre-publish\x20only','clear\x20Arbitration\x20references\x20(308)\x20—\x20pre-publish\x20only','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['MAX_ARBITRATION_COUNT\x20=\x2020\x20per\x20Service\x20(F-S-04)','Each\x20Arbitration\x20object\x20must\x20be\x20valid\x20(queryObjectsWithType\x20validation)','Arbitration\x20bound\x20=\x20locked\x20post-publish\x20(F-S-21).\x20To\x20change:\x20create\x20new\x20Service.'],'common_patterns':['Pre-publish:\x20set\x201-3\x20Arbitration\x20objects\x20for\x20different\x20dispute\x20scopes','Post-publish:\x20immutable\x20—\x20clone\x20Service\x20if\x20change\x20needed','⚠️\x20Data\x20inconsistency:\x20dynamic-pricing.ts\x20marks\x20arbitrations\x20as\x20mutable,\x20but\x20SDK\x20blocks\x20it\x20(F-S-21)'],'recommended_templates':['T-S-05']},{'id':'service_buy_guard','name':'Buy\x20Guard\x20Service\x20(post-publish\x20mutable\x20guard)','category':'buy_guard','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['bind\x20the\x20buy_guard\x20Guard\x20(307)','clear\x20the\x20buy_guard\x20Guard\x20(307)','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Pre-sale\x20phase:\x20buy_guard\x20=\x20whitelist\x20Guard\x20(KYC\x20verified\x20buyers\x20only)','Public\x20sale:\x20buy_guard\x20=\x20null\x20(anyone\x20can\x20buy)','Restricted\x20phase:\x20buy_guard\x20=\x20KYC\x20Guard\x20(compliance)','⚠️\x20buy_guard\x20is\x20the\x20ONLY\x20publish-locked-field\x20exception\x20—\x20still\x20mutable\x20post-publish','buy_guard\x20verification\x20happens\x20at\x20Stage\x201\x20of\x20buy\x20flow\x20(pre_check)'],'recommended_templates':['T-S-01']},{'id':'service_order_allocator','name':'Order\x20Allocator\x20Service\x20(fund\x20distribution\x20config)','category':'order_allocator','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['set\x20the\x20order_allocators\x20strategy\x20(313)\x20—\x20pre-publish\x20only','publish\x20the\x20Service\x20(311)\x20—\x20requires\x20order_allocators\x20(F-S-18)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20MUST\x20be\x20set\x20(F-S-18,\x20E_NO_ALLOCATOR)','Allocators.sharing.who\x20can\x20reference\x20Treasury\x20addresses\x20(indirect\x20Treasury\x20binding)','MAX_SHARING_COUNT\x20=\x20100\x20per\x20allocator'],'common_patterns':['Multi-party\x20split:\x20merchant\x2080%\x20/\x20platform\x2010%\x20/\x20logistics\x2010%','Threshold-based:\x20different\x20allocators\x20for\x20different\x20order\x20sizes','Guard-bound\x20allocator:\x20allocation\x20execution\x20requires\x20Guard\x20verification','Post-publish\x20immutable\x20—\x20clone\x20Service\x20to\x20change\x20allocation\x20strategy'],'recommended_templates':['T-S-08']},{'id':'service_dynamic_pricing','name':'Dynamic\x20Pricing\x20Service\x20(discount-driven)','category':'dynamic_pricing','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['issue\x20discount\x20coupons\x20(312)','add/set\x20sales\x20items\x20(305)\x20—\x20adjust\x20base\x20prices','remove\x20sales\x20items\x20(305)\x20—\x20remove\x20deprecated\x20SKUs'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Discount\x20types:\x200=rates\x20(basis\x20points,\x20per\x2010000),\x201=minus\x20(direct\x20deduction)','MAX_DISCOUNT_COUNT_ONCE\x20=\x201000\x20per\x20issue\x20call','MAX_DISCOUNT_RECEIVER_ONCE\x20=\x201000\x20receivers\x20per\x20call','MAX_DISCOUNT_TOTAL_COUNT\x20=\x2020000\x20total\x20coupons','discount_destroy:\x20holder-only\x20(no\x20SERVICE_DISCOUNT\x20permission\x20needed)','discount_send:\x20holder-only\x20transfer\x20of\x20owned\x20transferable:true\x20coupons\x20to\x20another\x20address\x20(no\x20permission\x20needed)'],'recommended_templates':['T-S-07']},{'id':'service_multi_allocator','name':'Multi-Allocator\x20Service\x20(tiered\x20fund\x20distribution)','category':'multi_allocator','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['set\x20the\x20order_allocators\x20strategy\x20(313)\x20—\x20pre-publish\x20only','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20MUST\x20be\x20set','Each\x20allocator\x20has\x20its\x20own\x20Guard\x20+\x20sharing\x20+\x20threshold','Each\x20allocator\x20is\x20bound\x20to\x20a\x20DIFFERENT\x20guard\x20—\x20the\x20caller\x27s\x20submitted\x20guard\x20selects\x20which\x20path\x20fires'],'common_patterns':['Tier\x201\x20(small\x20orders):\x20single-recipient\x20allocator\x20(low\x20fee)','Tier\x202\x20(medium\x20orders):\x20two-recipient\x20split\x20(merchant\x20+\x20platform)','Tier\x203\x20(large\x20orders):\x20three-recipient\x20split\x20(merchant\x20+\x20platform\x20+\x20logistics)','Each\x20tier\x20can\x20have\x20its\x20own\x20Guard\x20for\x20execution\x20authorization'],'recommended_templates':['T-S-08']}];export const SERVICE_LEDGER_VERSION='1.0.0';export function getScenesByCategory(a){return SERVICE_SCENES['filter'](b=>b['category']===a);}export function findSceneById(a){return SERVICE_SCENES['find'](b=>b['id']===a);}export function getServicePermissionByIndex(a){return SERVICE_PERMISSIONS['find'](b=>b['index']===a);}export function isServicePermission(a){return getServicePermissionByIndex(a)!==undefined;}export function getPermissionsByMutability(a){return SERVICE_PERMISSIONS['filter'](b=>b['post_publish_mutability']===a);}export function getImmutablePostPublishPermissions(){return SERVICE_PERMISSIONS['filter'](a=>a['post_publish_mutability']==='immutable'||a['post_publish_mutability']==='one_shot');}export function getLockedByDurationPermissions(){return SERVICE_PERMISSIONS['filter'](a=>a['post_publish_mutability']==='locked_by_duration');}export function inferSceneFromIntent(a){const b=a['toLowerCase'](),c=[['retail','retail'],['ecommerce','retail'],['rental','rental'],['rent','rental'],['short-term\x20rental','rental'],['long-term\x20rental','rental'],['subscription','subscription'],['subscribe','subscription'],['workflow','workflow'],['machine-bound','workflow'],['arbitration','arbitration'],['dispute','arbitration'],['compensation','compensation_fund'],['compensation_fund','compensation_fund'],['reward','reward'],['marketing','reward'],['buy_guard','buy_guard'],['kyc','buy_guard'],['whitelist','buy_guard'],['allocator','order_allocator'],['discount','dynamic_pricing'],['coupon','dynamic_pricing'],['multi-allocator','multi_allocator'],['tiered','multi_allocator']];for(const [d,e]of c){if(b['includes'](d)){const f=getScenesByCategory(e);if(f['length']>0x0)return f[0x0];}}if(b['includes']('service'))return findSceneById('service_retail');return undefined;}export function getAllServiceScenes(){return[...SERVICE_SCENES];}export function getServiceScenesCount(){return SERVICE_SCENES['length'];}export function getServicePermissionsCount(){return SERVICE_PERMISSIONS['length'];}export function getOrderFlowStage(a){return SERVICE_ORDER_FLOW_STAGES['find'](b=>b['stage']===a);}export function getCrossObjectBindings(){return[...SERVICE_CROSS_OBJECT_BINDINGS];}
1
+ export const SERVICE_PERMISSIONS=[{'index':0x12c,'name':'SERVICE_NEW','description':'Create\x20new\x20Service','governed_operation':'create\x20a\x20new\x20Service','post_publish_mutability':'na'},{'index':0x12d,'name':'SERVICE_DESCRIPTION','description':'Modify\x20Service\x20description','governed_operation':'modify\x20the\x20Service\x20description','post_publish_mutability':'mutable'},{'index':0x12f,'name':'SERVICE_LOCATION','description':'Set\x20Service\x20location/URL','governed_operation':'set\x20the\x20Service\x20location/URL','post_publish_mutability':'mutable'},{'index':0x130,'name':'SERVICE_REPOSITORY','description':'Add/remove\x20Repository\x20references','governed_operation':'add/remove/clear\x20Repository\x20references','post_publish_mutability':'mutable'},{'index':0x131,'name':'SERVICE_SALES','description':'Add/set/remove/clear\x20sales\x20items;\x20opt\x20SKUs\x20into\x20refund\x20restocking\x20(per-SKU\x20restock\x20flag\x20and\x20order\x20restock)','governed_operation':'add/set/remove/clear\x20sales\x20items;\x20restock\x20flags\x20+\x20order\x20restock','post_publish_mutability':'mutable'},{'index':0x132,'name':'SERVICE_MACHINE','description':'Bind/unbind\x20Machine\x20workflow\x20template','governed_operation':'bind/unbind\x20the\x20Machine\x20workflow\x20template','post_publish_mutability':'immutable'},{'index':0x133,'name':'SERVICE_BUY_GUARD','description':'Set/clear\x20buy\x20Guard\x20(post-publish\x20mutable)','governed_operation':'set/clear\x20the\x20buy_guard\x20check','post_publish_mutability':'mutable'},{'index':0x134,'name':'SERVICE_ARBITRATION','description':'Add/remove\x20Arbitration\x20references','governed_operation':'add/remove/clear\x20Arbitration\x20references','post_publish_mutability':'immutable'},{'index':0x135,'name':'SERVICE_CUSTOMER_INFO_REQUIRED','description':'Set\x20customer\x20required\x20info\x20fields','governed_operation':'set\x20customer\x20required\x20info\x20fields','post_publish_mutability':'mutable'},{'index':0x136,'name':'SERVICE_PAUSE','description':'Pause/resume\x20Service\x20(block\x20new\x20orders)','governed_operation':'pause/resume\x20the\x20Service','post_publish_mutability':'mutable'},{'index':0x137,'name':'SERVICE_PUBLISH','description':'Publish\x20Service\x20(IRREVERSIBLE)','governed_operation':'publish\x20the\x20Service\x20(irreversible)','post_publish_mutability':'one_shot'},{'index':0x138,'name':'SERVICE_DISCOUNT','description':'Issue/discount_destroy\x20discount\x20coupons','governed_operation':'issue/destroy\x20discount\x20coupons','post_publish_mutability':'mutable'},{'index':0x139,'name':'SERVICE_ORDER_ALLOCATOR','description':'Set\x20order\x20allocator\x20strategy','governed_operation':'set\x20the\x20order_allocators\x20strategy','post_publish_mutability':'immutable'},{'index':0x13a,'name':'SERVICE_COMPENSATION_FUND_WITHDRAW','description':'Withdraw\x20compensation\x20fund\x20(time-locked)','governed_operation':'withdraw\x20from\x20the\x20compensation_fund\x20(time-locked)','post_publish_mutability':'locked_by_duration'},{'index':0x13b,'name':'SERVICE_COMPENSATION_FUND_DEPOSIT','description':'Deposit\x20to\x20compensation\x20fund','governed_operation':'deposit\x20to\x20the\x20compensation_fund','post_publish_mutability':'mutable'},{'index':0x13c,'name':'SERVICE_COMPENSATION_FUND_RECEIVE','description':'Receive\x20compensation\x20fund\x20(arbitration\x20payout)','governed_operation':'receive\x20the\x20compensation_fund\x20payout\x20(arbitration\x20payout)','post_publish_mutability':'mutable'},{'index':0x13d,'name':'SERVICE_COMPENSATION_LOCK_DURATION_ADD','description':'Extend\x20setting_lock_duration\x20(only-increase)','governed_operation':'extend\x20setting_lock_duration\x20(only-increase)','post_publish_mutability':'mutable'},{'index':0x13e,'name':'SERVICE_REWARD','description':'Add/remove\x20Reward\x20references\x20(remove/clear\x20time-locked)','governed_operation':'add/remove/clear\x20Reward\x20references','post_publish_mutability':'locked_by_duration'},{'index':0x13f,'name':'SERVICE_OWNER_RECEIVE','description':'Receive\x20Payment/objects\x20to\x20owner','governed_operation':'receive\x20Payments/objects\x20to\x20owner','post_publish_mutability':'mutable'},{'index':0x140,'name':'SERVICE_UM','description':'Bind/unbind\x20Contact\x20as\x20UM','governed_operation':'bind/unbind\x20Contact\x20as\x20UM','post_publish_mutability':'mutable'},{'index':0x141,'name':'SERVICE_ARB_STATEMENT','description':'Append\x20seller\x20statement\x20to\x20an\x20Arb\x20case\x20(event-only)','governed_operation':'append\x20seller\x20text\x20to\x20a\x20case\x20against\x20an\x20order\x20of\x20this\x20service\x20(ArbStatementEvent;\x20no\x20Arb\x20state\x20change)','post_publish_mutability':'mutable'}];export const SERVICE_LISTING_REFUND_GATES={'price_floor':{'rule':'A\x20sale\x20listed\x20at\x20price\x200\x20is\x20REFUSED\x20at\x20construction\x20time\x20(aborts\x20E_PRICE_BELOW_FLOOR\x20=\x2044)\x20—\x20applies\x20to\x20every\x20sale-minting\x20path\x20(sales\x20add\x20/\x20sales\x20set\x20/\x20replace).\x20The\x20SDK\x20refuses\x20it\x20locally\x20in\x20the\x20sale\x20builder.','rationale':'A\x20zero-priced\x20listing\x20plus\x20an\x20allocation-free\x200-amount\x20order\x20produced\x20stores\x20whose\x20entire\x20economics\x20live\x20outside\x20the\x20chain.\x20Repricing\x20an\x20EXISTING\x20sale\x20down\x20to\x20zero\x20stays\x20legal\x20and\x20is\x20caught\x20at\x20buy\x20time\x20by\x20the\x20zero-total\x20order\x20gate.'},'restock':{'rule':'Refund\x20restocking\x20is\x20opt-in\x20per\x20SKU:\x20the\x20merchant\x20marks\x20an\x20ALIVE\x20sale\x20with\x20the\x20restock\x20flag\x20(305),\x20then\x20a\x20refunded\x20order\x27s\x20purchased\x20units\x20can\x20be\x20put\x20back\x20on\x20shelf\x20(305).\x20Two-pass\x20on-chain\x20(validate\x20every\x20line,\x20then\x20apply)\x20—\x20ALL\x20lines\x20restock\x20or\x20NOTHING\x20mutates.\x20Unflagged\x20or\x20delisted\x20lines\x20abort\x20E_RESTOCK_NOT_FLAGGED\x20=\x2046\x20/\x20E_SALE_ITEM_NOT_FOUND.\x20Quantities\x20come\x20from\x20the\x20order\x27s\x20purchase\x20rows.','events':'StockRestockedEvent\x20per\x20line\x20(service,\x20order,\x20item,\x20quantity,\x20time).'},'dismissal_conclusion':{'rule':'The\x20dismissal\x20conclusion\x20stamps\x20a\x20CONCLUDED,\x20DEFENDANT-FAVORED\x20ruling\x20onto\x20the\x20order\x20(claimed_by\x20=\x20case\x20address)\x20—\x20the\x20mirror\x20of\x20the\x20compensation\x20claim.\x20Requires:\x20order\x20belongs\x20to\x20this\x20service,\x20arbitration\x20on\x20the\x20merchant\x20allowlist,\x20no\x20self-judging\x20(E_ARBITRATION_PERMISSION_CONFLICT),\x20case\x20concluded\x20(Arbitrated/Withdrawn)\x20AND\x20indemnity\x20none/0\x20(E_CASE_NOT_DISMISSAL_CONCLUSION\x20=\x2048).\x20Permissionless\x20keeper\x20surface;\x20writes\x20a\x20flag,\x20moves\x20no\x20funds.','closes':'A\x20dismissal\x20ruling\x20would\x20otherwise\x20never\x20stamp\x20claimed_by\x20(the\x20zero-indemnity\x20claim\x20gate\x20refuses\x20the\x20claim\x20path),\x20so\x20a\x20buyer\x20who\x20LOST\x20the\x20case\x20kept\x20every\x20`claimed_by\x20none`\x20refund\x20rail\x20open\x20forever.'}};export const SERVICE_ORDER_FLOW_STAGES=[{'stage':0x1,'name':'pre_check','preconditions':['Service.bPublished\x20==\x20true\x20(else\x20E_NOT_PUBLISHED,\x20service:7)','Service.bPaused\x20==\x20false\x20(else\x20E_PAUSED,\x20service:19)','buy_guard\x20(if\x20set)\x20added\x20to\x20guards[]\x20list\x20for\x20verification'],'side_effects':[],'always_executed':!![]},{'stage':0x2,'name':'wip_verify','preconditions':['buy.items\x20non-empty','Each\x20item.name\x20matches\x20a\x20sale\x20in\x20Service.sales\x20(else\x20E_SALE_ITEM_NOT_FOUND,\x20service:32)','sale.suspension\x20==\x20false\x20(else\x20E_SALE_SUSPENDED)'],'side_effects':['If\x20buyer\x20passes\x20empty\x20wip_hash,\x20SDK\x20auto-fills\x20with\x20sale.wip_hash','verifiedWipUrls\x20Set\x20avoids\x20re-verifying\x20same\x20WIP\x20URL\x20across\x20items','verify_wip()\x20fetches\x20WIP\x20file\x20and\x20compares\x20hash\x20(else\x20E_WIP_HASH_NOT_MATCH)'],'always_executed':!![]},{'stage':0x3,'name':'quote','preconditions':['All\x20items\x20have\x20valid\x20sale\x20+\x20wip_hash\x20match','stock\x20>=\x20purchase\x20quantity\x20(else\x20E_STOCK_NOT_ENOUGH,\x20service:16)','discount\x20object\x20(if\x20used)\x20is\x20valid\x20and\x20within\x20its\x20[time_start,\x20time_end]\x20window\x20(else\x20E_DISCOUNT_TIME_INVALID)'],'side_effects':['The\x20quote\x20step\x20computes\x20the\x20total\x20price\x20(with\x20discount\x20if\x20applicable)','⚠️\x20Stock\x20is\x20deducted\x20(split)\x20—\x20side\x20effect\x20is\x20NOT\x20auto-rolled-back\x20on\x20later\x20failure','The\x20on-chain\x20quote\x20call\x20executes\x20(the\x20discount\x20path\x20validates\x20the\x20Clock\x20time-window\x20check)'],'always_executed':!![]},{'stage':0x4,'name':'create_order','preconditions':['Quote\x20object\x20from\x20stage\x203','Registrar\x20+\x20Clock\x20objects\x20available'],'side_effects':['The\x20atomic\x20on-chain\x20buy\x20call\x20executes\x20(passport-gated\x20variant\x20supported)','Order\x20object\x20created\x20(builder=customer,\x20service=Service.id)','Order.id\x20recorded\x20for\x20stages\x205-7'],'always_executed':!![]},{'stage':0x5,'name':'create_allocation','preconditions':['Service.order_allocators\x20is\x20Some\x20(configured)','Order\x20from\x20stage\x204','CoinParam\x20for\x20total_pay\x20matches\x20Service<T>\x20type'],'side_effects':['The\x20on-chain\x20allocation\x20call\x20executes','Allocation\x20object\x20created\x20(guard-selected\x20fund\x20distribution)','Order.allocation\x20=\x20Allocation\x20address'],'always_executed':!![]},{'stage':0x6,'name':'create_progress','preconditions':['Service.machine\x20is\x20Some\x20(machine\x20bound)','Order\x20from\x20stage\x204','Machine\x20from\x20Service.machine'],'side_effects':['The\x20on-chain\x20progress-creation\x20call\x20executes','Progress\x20object\x20created\x20(Progress.machine\x20=\x20Service.machine,\x20Progress.task\x20=\x20Order.id)'],'always_executed':![]},{'stage':0x7,'name':'post_actions','preconditions':['Order/Allocation/Progress\x20objects\x20from\x20stages\x204-6'],'side_effects':['Attach\x20agents\x20to\x20the\x20order\x20(if\x20order_new.agents\x20provided)','order_required_info_update\x20(if\x20order_required_info\x20provided)','Transfer\x20Order\x20ownership\x20(if\x20transfer\x20provided\x20—\x20sets\x20new\x20Order\x20owner)','namedNewOrder\x20/\x20namedNewAllocation\x20/\x20namedNewProgress\x20(local\x20naming)'],'always_executed':![]},{'stage':0x8,'name':'return_result','preconditions':['All\x20preceding\x20stages\x20succeeded'],'side_effects':['Returns\x20BuyResult\x20{\x20order,\x20allocation?,\x20progress?\x20}','Caller\x20proceeds\x20to\x20sign\x20+\x20submit\x20transaction'],'always_executed':!![]}];export const SERVICE_CROSS_OBJECT_BINDINGS=[{'object':'Machine','field':'machine','required':![],'locked_after_publish':!![],'notes':'Workflow\x20template;\x20post-publish\x20immutable\x20(F-S-20).\x20Progress.machine\x20inherits\x20this\x20value.'},{'object':'Guard','field':'buy_guard','required':![],'locked_after_publish':![],'notes':'Buyer\x20eligibility\x20guard;\x20post-publish\x20STILL\x20MUTABLE\x20(unusual\x20—\x20see\x20F-S-26)'},{'object':'Allocation','field':'order_allocators','required':!![],'locked_after_publish':!![],'notes':'Order\x20fund\x20distribution\x20strategy;\x20publish\x20prerequisite\x20(F-S-18).\x20Post-publish\x20immutable\x20(F-S-22).'},{'object':'Arbitration','field':'arbitrations','required':![],'locked_after_publish':![],'notes':'Dispute\x20handlers;\x20required\x20if\x20compensation_fund\x20>\x200\x20(F-S-19).\x20add\x20always\x20mutable;\x20remove/clear\x20time-locked\x20after\x20publish\x20(F-S-21).'},{'object':'Repository','field':'repositories','required':![],'locked_after_publish':![],'notes':'Shared\x20data\x20stores;\x20mutable\x20post-publish'},{'object':'Reward','field':'rewards','required':![],'locked_after_publish':![],'notes':'Marketing\x20incentives;\x20add\x20always\x20mutable;\x20remove/clear\x20time-locked\x20after\x20publish\x20(F-S-24)'},{'object':'Contact','field':'um','required':![],'locked_after_publish':![],'notes':'User\x20Manager\x20(Contact\x20object);\x20mutable\x20post-publish'},{'object':'Treasury','field':'(indirect\x20via\x20order_allocators.sharing.who=Entity)','required':![],'locked_after_publish':![],'notes':'Treasury\x20is\x20referenced\x20by\x20Allocation.sharing.who,\x20not\x20by\x20Service\x20directly'}];export const SERVICE_SCENES=[{'id':'service_retail','name':'Retail\x20e-commerce\x20Service','category':'retail','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL','set\x20customer\x20required\x20info\x20fields'],'permission_index_operations':['publish\x20the\x20Service\x20(311)','pause/resume\x20the\x20Service\x20(310)','add/set/remove/clear\x20sales\x20items\x20(305)','set\x20the\x20order_allocators\x20strategy\x20(313)','set/clear\x20the\x20buy_guard\x20check\x20(307)','issue/destroy\x20discount\x20coupons\x20(312)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set\x20(F-S-18,\x20E_NO_ALLOCATOR)','If\x20compensation_fund\x20>\x200,\x20arbitrations\x20must\x20be\x20non-empty\x20(F-S-19)'],'common_patterns':['Multi-tier\x20pricing\x20via\x20sales[]\x20(Standard/Premium/Enterprise)','WIP\x20hash\x20per\x20sale\x20item\x20for\x20tamper-proof\x20product\x20info','buy_guard\x20for\x20KYC\x20whitelist\x20during\x20pre-sale,\x20then\x20null\x20for\x20public\x20sale','compensation_fund\x20deposited\x20before\x20publish\x20+\x20arbitrations\x20configured'],'recommended_templates':['T-S-01','T-S-06']},{'id':'service_rental','name':'Rental\x20Service\x20(short/long-term)','category':'rental','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL'],'permission_index_operations':['publish\x20the\x20Service\x20(311)','add/set\x20sales\x20items\x20(305)','bind\x20the\x20Machine\x20workflow\x20(306)\x20—\x20for\x20rental\x20workflow','add\x20Arbitration\x20references\x20(308)\x20—\x20for\x20deposit\x20disputes'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set','machine\x20recommended\x20(rental\x20workflow\x20with\x20deposit/return\x20stages)','arbitrations\x20recommended\x20(deposit\x20refund\x20disputes)'],'common_patterns':['Machine\x20workflow\x20with\x20\x27Deposit\x20→\x20Use\x20→\x20Return\x20→\x20Refund\x27\x20nodes','compensation_fund\x20holds\x20deposit\x20guarantees','buy_guard\x20verifies\x20renter\x20identity/KYC','stock=1\x20per\x20rental\x20item\x20(unique\x20items)'],'recommended_templates':['T-S-02','T-S-04']},{'id':'service_subscription','name':'Subscription\x20Service\x20(recurring)','category':'subscription','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL'],'permission_index_operations':['publish\x20the\x20Service\x20(311)','add/set\x20sales\x20items\x20(305)','issue\x20discount\x20coupons\x20(312)\x20—\x20promotional\x20rates','add\x20Reward\x20references\x20(318)\x20—\x20loyalty\x20rewards'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Tiered\x20plans\x20(Free/Pro/Enterprise)\x20as\x20sales[]','Discount\x20coupons\x20for\x20trial\x20periods','Rewards\x20for\x20long-term\x20subscribers','Renewal\x20handled\x20by\x20repeat\x20orders\x20(no\x20native\x20recurring\x20billing)'],'recommended_templates':['T-S-03']},{'id':'service_workflow','name':'Workflow-bound\x20Service\x20(machine-bound)','category':'workflow','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description','set\x20the\x20location/URL'],'permission_index_operations':['bind\x20the\x20Machine\x20workflow\x20(306)','publish\x20the\x20Service\x20(311)','set\x20the\x20order_allocators\x20strategy\x20(313)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set','machine\x20must\x20be\x20published\x20before\x20binding','machine\x20recommended\x20for\x20any\x20multi-stage\x20service\x20delivery'],'common_patterns':['Machine\x20defines\x20Pay\x20→\x20Confirm\x20→\x20Deliver\x20→\x20Sign-off\x20nodes','Progress\x20created\x20per\x20order\x20(stage\x206\x20of\x20buy\x20flow)','Named\x20operators\x20assigned\x20per\x20Forward\x20in\x20Machine','Service.paused\x20does\x20NOT\x20affect\x20already-created\x20Progress\x20(existing\x20orders\x20continue)'],'recommended_templates':['T-S-04']},{'id':'service_arbitration','name':'Arbitration-bound\x20Service\x20(dispute-ready)','category':'arbitration','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['add\x20Arbitration\x20references\x20(308)','deposit\x20to\x20the\x20compensation_fund\x20(315)','extend\x20setting_lock_duration\x20(317)','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['If\x20compensation_fund\x20>\x200,\x20arbitrations\x20must\x20be\x20non-empty\x20(F-S-19)','Arbitration\x20objects\x20must\x20be\x20created\x20before\x20binding','compensation_fund_add\x20before\x20publish\x20recommended\x20(else\x20post-publish\x20deposit\x20still\x20possible)'],'common_patterns':['2-3\x20Arbitration\x20objects\x20(different\x20arb\x20committees\x20for\x20different\x20dispute\x20types)','compensation_fund\x20deposited\x20as\x20%\x20of\x20expected\x20order\x20volume','setting_lock_duration\x20extended\x20by\x20owner\x20to\x20build\x20customer\x20trust','Arbitration\x20compensation\x20payout\x20triggered\x20by\x20the\x20arbitration\x20result\x20(not\x20by\x20Service\x20directly)'],'recommended_templates':['T-S-05','T-S-06']},{'id':'service_compensation_fund','name':'Compensation\x20Fund\x20Service\x20(embedded\x20balance)','category':'compensation_fund','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['deposit\x20to\x20the\x20compensation_fund\x20(315)','withdraw\x20from\x20the\x20compensation_fund\x20(314)\x20—\x20time-locked\x20after\x20publish','receive\x20the\x20compensation_fund\x20payout\x20(316)\x20—\x20arbitration\x20payout\x20(always\x20mutable)','extend\x20setting_lock_duration\x20(317)\x20—\x20extend\x20lock'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['compensation_fund\x20>\x200\x20→\x20arbitrations\x20non-empty\x20(F-S-19)','compensation_fund\x20coin\x20type\x20must\x20match\x20Service<T>\x20type\x20parameter'],'common_patterns':['Fund\x20inflow:\x20compensation_fund_add\x20(315)\x20—\x20always\x20mutable','Fund\x20outflow:\x20compensation_fund_withdraw\x20(314)\x20—\x20requires\x20bPaused\x20+\x20lock_duration\x20expired','Fund\x20receive:\x20compensation_fund_receive\x20(316)\x20—\x20arbitration\x20payout,\x20always\x20mutable','Fund\x20consumer:\x20arbitration\x20compensation\x20payout\x20(driven\x20by\x20arb\x20result)','Distinct\x20from\x20Treasury:\x20Service-internal,\x20arbitration-bound,\x20lock-protected'],'recommended_templates':['T-S-06']},{'id':'service_reward','name':'Reward-attached\x20Service\x20(marketing)','category':'reward','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['add/remove/clear\x20Reward\x20references\x20(318)\x20—\x20add\x20always\x20mutable;\x20remove/clear\x20time-locked\x20after\x20publish','issue/destroy\x20discount\x20coupons\x20(312)','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Rewards\x20added\x20post-publish\x20(always\x20allowed;\x20remove/clear\x20is\x20time-locked\x20after\x20publish)','Reward\x20objects\x20must\x20exist\x20before\x20binding\x20(queryObjectsWithType\x20validation)','MAX_REWARD_COUNT\x20=\x2020\x20per\x20Service','Reward\x20remove/clear\x20requires\x20Service\x20paused\x20+\x20setting_lock_duration\x20elapsed\x20(protects\x20customer\x20expectations)'],'recommended_templates':['T-S-08']},{'id':'service_arbitration_binding','name':'Arbitration\x20Binding\x20Service\x20(post-publish\x20immutable)','category':'arbitration','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['add\x20Arbitration\x20references\x20(308)\x20—\x20pre-publish\x20only','remove\x20an\x20Arbitration\x20reference\x20(308)\x20—\x20pre-publish\x20only','clear\x20Arbitration\x20references\x20(308)\x20—\x20pre-publish\x20only','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['MAX_ARBITRATION_COUNT\x20=\x2020\x20per\x20Service\x20(F-S-04)','Each\x20Arbitration\x20object\x20must\x20be\x20valid\x20(queryObjectsWithType\x20validation)','Arbitration\x20bound\x20=\x20locked\x20post-publish\x20(F-S-21).\x20To\x20change:\x20create\x20new\x20Service.'],'common_patterns':['Pre-publish:\x20set\x201-3\x20Arbitration\x20objects\x20for\x20different\x20dispute\x20scopes','Post-publish:\x20immutable\x20—\x20clone\x20Service\x20if\x20change\x20needed','⚠️\x20Data\x20inconsistency:\x20dynamic-pricing.ts\x20marks\x20arbitrations\x20as\x20mutable,\x20but\x20SDK\x20blocks\x20it\x20(F-S-21)'],'recommended_templates':['T-S-05']},{'id':'service_buy_guard','name':'Buy\x20Guard\x20Service\x20(post-publish\x20mutable\x20guard)','category':'buy_guard','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['bind\x20the\x20buy_guard\x20Guard\x20(307)','clear\x20the\x20buy_guard\x20Guard\x20(307)','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Pre-sale\x20phase:\x20buy_guard\x20=\x20whitelist\x20Guard\x20(KYC\x20verified\x20buyers\x20only)','Public\x20sale:\x20buy_guard\x20=\x20null\x20(anyone\x20can\x20buy)','Restricted\x20phase:\x20buy_guard\x20=\x20KYC\x20Guard\x20(compliance)','⚠️\x20buy_guard\x20is\x20the\x20ONLY\x20publish-locked-field\x20exception\x20—\x20still\x20mutable\x20post-publish','buy_guard\x20verification\x20happens\x20at\x20Stage\x201\x20of\x20buy\x20flow\x20(pre_check)'],'recommended_templates':['T-S-01']},{'id':'service_order_allocator','name':'Order\x20Allocator\x20Service\x20(fund\x20distribution\x20config)','category':'order_allocator','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['set\x20the\x20order_allocators\x20strategy\x20(313)\x20—\x20pre-publish\x20only','publish\x20the\x20Service\x20(311)\x20—\x20requires\x20order_allocators\x20(F-S-18)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20MUST\x20be\x20set\x20(F-S-18,\x20E_NO_ALLOCATOR)','Allocators.sharing.who\x20can\x20reference\x20Treasury\x20addresses\x20(indirect\x20Treasury\x20binding)','MAX_SHARING_COUNT\x20=\x20100\x20per\x20allocator'],'common_patterns':['Multi-party\x20split:\x20merchant\x2080%\x20/\x20platform\x2010%\x20/\x20logistics\x2010%','Threshold-based:\x20different\x20allocators\x20for\x20different\x20order\x20sizes','Guard-bound\x20allocator:\x20allocation\x20execution\x20requires\x20Guard\x20verification','Post-publish\x20immutable\x20—\x20clone\x20Service\x20to\x20change\x20allocation\x20strategy'],'recommended_templates':['T-S-08']},{'id':'service_dynamic_pricing','name':'Dynamic\x20Pricing\x20Service\x20(discount-driven)','category':'dynamic_pricing','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['issue\x20discount\x20coupons\x20(312)','add/set\x20sales\x20items\x20(305)\x20—\x20adjust\x20base\x20prices','remove\x20sales\x20items\x20(305)\x20—\x20remove\x20deprecated\x20SKUs'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20must\x20be\x20set'],'common_patterns':['Discount\x20types:\x200=rates\x20(basis\x20points,\x20per\x2010000),\x201=minus\x20(direct\x20deduction)','MAX_DISCOUNT_COUNT_ONCE\x20=\x201000\x20per\x20issue\x20call','MAX_DISCOUNT_RECEIVER_ONCE\x20=\x201000\x20receivers\x20per\x20call','MAX_DISCOUNT_TOTAL_COUNT\x20=\x2020000\x20total\x20coupons','discount_destroy:\x20holder-only\x20(no\x20SERVICE_DISCOUNT\x20permission\x20needed)','discount_send:\x20holder-only\x20transfer\x20of\x20owned\x20transferable:true\x20coupons\x20to\x20another\x20address\x20(no\x20permission\x20needed)'],'recommended_templates':['T-S-07']},{'id':'service_multi_allocator','name':'Multi-Allocator\x20Service\x20(tiered\x20fund\x20distribution)','category':'multi_allocator','permission_index_range':'300-320','builtin_indexes':SERVICE_PERMISSIONS,'cross_object_bindings':SERVICE_CROSS_OBJECT_BINDINGS,'order_flow_stages':SERVICE_ORDER_FLOW_STAGES,'owner_operations':['bind/unbind\x20the\x20UM\x20Contact','builder\x20(transfer)'],'admin_operations':['update\x20the\x20description'],'permission_index_operations':['set\x20the\x20order_allocators\x20strategy\x20(313)\x20—\x20pre-publish\x20only','publish\x20the\x20Service\x20(311)'],'mutable_after_publish':{'machine':![],'arbitrations':![],'order_allocators':![],'buy_guard':!![],'rewards':'locked_by_duration','compensation_fund_withdraw':'locked_by_duration','compensation_fund_receive':'mutable','sales':!![],'description':!![],'location':!![],'repositories':!![],'customer_required':!![],'discount':!![],'um':!![],'pause':!![]},'publish_prerequisites':['order_allocators\x20MUST\x20be\x20set','Each\x20allocator\x20has\x20its\x20own\x20Guard\x20+\x20sharing\x20+\x20threshold','Each\x20allocator\x20is\x20bound\x20to\x20a\x20DIFFERENT\x20guard\x20—\x20the\x20caller\x27s\x20submitted\x20guard\x20selects\x20which\x20path\x20fires'],'common_patterns':['Tier\x201\x20(small\x20orders):\x20single-recipient\x20allocator\x20(low\x20fee)','Tier\x202\x20(medium\x20orders):\x20two-recipient\x20split\x20(merchant\x20+\x20platform)','Tier\x203\x20(large\x20orders):\x20three-recipient\x20split\x20(merchant\x20+\x20platform\x20+\x20logistics)','Each\x20tier\x20can\x20have\x20its\x20own\x20Guard\x20for\x20execution\x20authorization'],'recommended_templates':['T-S-08']}];export const SERVICE_LEDGER_VERSION='1.0.0';export function getScenesByCategory(a){return SERVICE_SCENES['filter'](b=>b['category']===a);}export function findSceneById(a){return SERVICE_SCENES['find'](b=>b['id']===a);}export function getServicePermissionByIndex(a){return SERVICE_PERMISSIONS['find'](b=>b['index']===a);}export function isServicePermission(a){return getServicePermissionByIndex(a)!==undefined;}export function getPermissionsByMutability(a){return SERVICE_PERMISSIONS['filter'](b=>b['post_publish_mutability']===a);}export function getImmutablePostPublishPermissions(){return SERVICE_PERMISSIONS['filter'](a=>a['post_publish_mutability']==='immutable'||a['post_publish_mutability']==='one_shot');}export function getLockedByDurationPermissions(){return SERVICE_PERMISSIONS['filter'](a=>a['post_publish_mutability']==='locked_by_duration');}export function inferSceneFromIntent(a){const b=a['toLowerCase'](),c=[['retail','retail'],['ecommerce','retail'],['rental','rental'],['rent','rental'],['short-term\x20rental','rental'],['long-term\x20rental','rental'],['subscription','subscription'],['subscribe','subscription'],['workflow','workflow'],['machine-bound','workflow'],['arbitration','arbitration'],['dispute','arbitration'],['compensation','compensation_fund'],['compensation_fund','compensation_fund'],['reward','reward'],['marketing','reward'],['buy_guard','buy_guard'],['kyc','buy_guard'],['whitelist','buy_guard'],['allocator','order_allocator'],['discount','dynamic_pricing'],['coupon','dynamic_pricing'],['multi-allocator','multi_allocator'],['tiered','multi_allocator']];for(const [d,e]of c){if(b['includes'](d)){const f=getScenesByCategory(e);if(f['length']>0x0)return f[0x0];}}if(b['includes']('service'))return findSceneById('service_retail');return undefined;}export function getAllServiceScenes(){return[...SERVICE_SCENES];}export function getServiceScenesCount(){return SERVICE_SCENES['length'];}export function getServicePermissionsCount(){return SERVICE_PERMISSIONS['length'];}export function getOrderFlowStage(a){return SERVICE_ORDER_FLOW_STAGES['find'](b=>b['stage']===a);}export function getCrossObjectBindings(){return[...SERVICE_CROSS_OBJECT_BINDINGS];}