@wowok/agent-mcp 3.4.1 → 3.4.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 (323) hide show
  1. package/dist/.build-stamp.json +5 -0
  2. package/dist/chain-semantics/composition-truth.js +1 -1
  3. package/dist/chain-semantics/eval-order.js +1 -1
  4. package/dist/chain-semantics/field-capability.js +1 -1
  5. package/dist/chain-semantics/freeze-map.js +1 -1
  6. package/dist/chain-semantics/fund-flow.js +1 -1
  7. package/dist/chain-semantics/guard-verbs.js +1 -1
  8. package/dist/chain-semantics/object-graph.js +1 -1
  9. package/dist/composition/audit.js +1 -1
  10. package/dist/composition/compile.d.ts +10 -3
  11. package/dist/composition/compile.js +1 -1
  12. package/dist/composition/emit-phases.d.ts +30 -2
  13. package/dist/composition/emit-phases.js +1 -1
  14. package/dist/composition/guard-fill.d.ts +8 -0
  15. package/dist/composition/guard-fill.js +1 -1
  16. package/dist/composition/inflight.js +1 -1
  17. package/dist/composition/input-normalize.js +1 -1
  18. package/dist/composition/materialize.d.ts +2 -0
  19. package/dist/composition/materialize.js +1 -1
  20. package/dist/composition/mode-gates.js +1 -1
  21. package/dist/composition/param-disclosure.js +1 -1
  22. package/dist/composition/plan-retry-ledger.d.ts +16 -0
  23. package/dist/composition/plan-retry-ledger.js +1 -1
  24. package/dist/composition/plan.d.ts +15 -1
  25. package/dist/composition/plan.js +1 -1
  26. package/dist/config/config-audit.spec.js +1 -1
  27. package/dist/config/judgment.d.ts +5 -0
  28. package/dist/config/judgment.js +1 -1
  29. package/dist/evaluation/builtins/arbitration-score.d.ts +1 -0
  30. package/dist/evaluation/builtins/arbitration-score.js +1 -1
  31. package/dist/evaluation/builtins/demand-match.js +1 -1
  32. package/dist/evaluation/builtins/graph-service.d.ts +8 -0
  33. package/dist/evaluation/builtins/graph-service.js +1 -1
  34. package/dist/evaluation/capability.d.ts +9 -0
  35. package/dist/evaluation/engine.js +1 -1
  36. package/dist/evaluation/extract.d.ts +9 -1
  37. package/dist/evaluation/extract.js +1 -1
  38. package/dist/evaluation/match-operation.js +1 -1
  39. package/dist/evaluation/match-policy.d.ts +5 -3
  40. package/dist/evaluation/match-policy.js +1 -1
  41. package/dist/evaluation/standards.d.ts +1 -0
  42. package/dist/evaluation/standards.js +1 -1
  43. package/dist/evaluation/structured-lines.js +1 -1
  44. package/dist/evaluation/types.d.ts +1 -0
  45. package/dist/extensions/capability.js +1 -1
  46. package/dist/extensions/industry-pack.js +1 -1
  47. package/dist/extensions/modes.js +1 -1
  48. package/dist/harness/recover.js +1 -1
  49. package/dist/index.js +1 -1
  50. package/dist/intent/types.d.ts +1 -1
  51. package/dist/intent/types.js +1 -1
  52. package/dist/knowledge/allocation-ledger.js +1 -1
  53. package/dist/knowledge/allocator-rail-verifier.d.ts +17 -1
  54. package/dist/knowledge/allocator-rail-verifier.js +1 -1
  55. package/dist/knowledge/arb-fund-facts.d.ts +7 -0
  56. package/dist/knowledge/arb-fund-facts.js +1 -1
  57. package/dist/knowledge/arbitration-rail-verifier.d.ts +35 -0
  58. package/dist/knowledge/arbitration-rail-verifier.js +1 -0
  59. package/dist/knowledge/arbitration-templates.js +1 -1
  60. package/dist/knowledge/audit-rules.d.ts +13 -1
  61. package/dist/knowledge/audit-rules.js +1 -1
  62. package/dist/knowledge/baselines/judgment-baselines.json +1 -0
  63. package/dist/knowledge/baselines/rules/guard.json +7 -6
  64. package/dist/knowledge/baselines/rules/progress.json +4 -4
  65. package/dist/knowledge/baselines/rules/reward.json +118 -3
  66. package/dist/knowledge/builtin-templates.d.ts +19 -2
  67. package/dist/knowledge/builtin-templates.js +1 -1
  68. package/dist/knowledge/chain-query-registry.d.ts +14 -0
  69. package/dist/knowledge/chain-query-registry.js +1 -0
  70. package/dist/knowledge/event-semantics.js +1 -1
  71. package/dist/knowledge/fee-param-bindings.d.ts +2 -0
  72. package/dist/knowledge/fee-param-bindings.js +1 -1
  73. package/dist/knowledge/getting-started.js +1 -1
  74. package/dist/knowledge/guard-binding-table.js +1 -1
  75. package/dist/knowledge/guard-binding-verifier.d.ts +7 -0
  76. package/dist/knowledge/guard-binding-verifier.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-host-context.js +1 -1
  82. package/dist/knowledge/guard-lint.js +1 -1
  83. package/dist/knowledge/guard-node-gates.d.ts +3 -1
  84. package/dist/knowledge/guard-node-gates.js +1 -1
  85. package/dist/knowledge/guard-puzzle.js +1 -1
  86. package/dist/knowledge/guard-render.js +1 -1
  87. package/dist/knowledge/guard-risk.js +1 -1
  88. package/dist/knowledge/guard-templates.d.ts +2 -1
  89. package/dist/knowledge/guard-templates.js +1 -1
  90. package/dist/knowledge/guard-translation.js +1 -1
  91. package/dist/knowledge/index.d.ts +2 -0
  92. package/dist/knowledge/index.js +1 -1
  93. package/dist/knowledge/industry-registry.js +1 -1
  94. package/dist/knowledge/jsonrpc-enum.js +1 -1
  95. package/dist/knowledge/knob-docs.js +1 -1
  96. package/dist/knowledge/param-schema.d.ts +1 -1
  97. package/dist/knowledge/param-schema.js +1 -1
  98. package/dist/knowledge/param-tiers.d.ts +2 -0
  99. package/dist/knowledge/param-tiers.js +1 -1
  100. package/dist/knowledge/path-oracle/products/food-delivery.js +1 -1
  101. package/dist/knowledge/pattern-resolutions.d.ts +2 -0
  102. package/dist/knowledge/pattern-resolutions.js +1 -1
  103. package/dist/knowledge/product-detail-source.d.ts +37 -0
  104. package/dist/knowledge/product-detail-source.js +1 -0
  105. package/dist/knowledge/product-doc-b5.d.ts +16 -0
  106. package/dist/knowledge/product-doc-b5.js +1 -0
  107. package/dist/knowledge/progress-ledger.js +1 -1
  108. package/dist/knowledge/projection.spec.js +1 -1
  109. package/dist/knowledge/publish-gate.d.ts +20 -0
  110. package/dist/knowledge/publish-gate.js +1 -0
  111. package/dist/knowledge/publish-readiness.d.ts +25 -0
  112. package/dist/knowledge/publish-readiness.js +1 -0
  113. package/dist/knowledge/publish-surface-contract.d.ts +16 -0
  114. package/dist/knowledge/publish-surface-contract.js +1 -0
  115. package/dist/knowledge/rail-exit-satisfiability.d.ts +25 -0
  116. package/dist/knowledge/rail-exit-satisfiability.js +1 -0
  117. package/dist/knowledge/reward-ledger.d.ts +1 -1
  118. package/dist/knowledge/reward-ledger.js +1 -1
  119. package/dist/knowledge/reward-risk.d.ts +1 -1
  120. package/dist/knowledge/reward-risk.js +1 -1
  121. package/dist/knowledge/scenario-modes.js +1 -1
  122. package/dist/knowledge/service-ledger.d.ts +3 -1
  123. package/dist/knowledge/service-ledger.js +1 -1
  124. package/dist/knowledge/template-loader.d.ts +41 -2
  125. package/dist/knowledge/template-loader.js +1 -1
  126. package/dist/knowledge/template-registry.js +1 -1
  127. package/dist/knowledge/template-scanner.d.ts +17 -0
  128. package/dist/knowledge/template-scanner.js +1 -1
  129. package/dist/knowledge/template-test-profiles.js +1 -1
  130. package/dist/knowledge/workflow-guidance.d.ts +4 -0
  131. package/dist/knowledge/workflow-guidance.js +1 -1
  132. package/dist/monitor/MonitorLoop.js +1 -1
  133. package/dist/monitor/normalize.d.ts +1 -1
  134. package/dist/monitor/normalize.js +1 -1
  135. package/dist/monitor/types.js +1 -1
  136. package/dist/participation/customer-interest.d.ts +4 -0
  137. package/dist/participation/customer-interest.js +1 -1
  138. package/dist/participation/game-context.js +1 -1
  139. package/dist/participation/node-action-advisor.d.ts +4 -0
  140. package/dist/participation/node-action-advisor.js +1 -1
  141. package/dist/participation/radar-core.js +1 -1
  142. package/dist/participation/time-window.d.ts +11 -0
  143. package/dist/participation/time-window.js +1 -1
  144. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  145. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  146. package/dist/playbooks/service-build/merchant-guide.d.ts +28 -3
  147. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  148. package/dist/playbooks/service-build/object-panorama.d.ts +4 -0
  149. package/dist/playbooks/service-build/object-panorama.js +1 -1
  150. package/dist/playbooks/service-build/participation-radar.js +1 -1
  151. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  152. package/dist/playbooks/service-build/service-panorama.js +1 -1
  153. package/dist/playbooks/service-build/service-quote.js +1 -1
  154. package/dist/review/index.js +1 -1
  155. package/dist/review/order.js +1 -1
  156. package/dist/safety/confirm-gate.js +1 -1
  157. package/dist/schema/benchmark-migration/index.d.ts +24 -0
  158. package/dist/schema/benchmark-migration/index.js +1 -1
  159. package/dist/schema/call/allocation.d.ts +11 -7
  160. package/dist/schema/call/allocation.js +1 -1
  161. package/dist/schema/call/arbitration.d.ts +4 -0
  162. package/dist/schema/call/arbitration.js +1 -1
  163. package/dist/schema/call/base.d.ts +28 -0
  164. package/dist/schema/call/base.js +1 -1
  165. package/dist/schema/call/bridge.d.ts +21 -0
  166. package/dist/schema/call/contact.d.ts +4 -0
  167. package/dist/schema/call/demand.d.ts +4 -0
  168. package/dist/schema/call/guard.d.ts +12 -0
  169. package/dist/schema/call/handler.d.ts +1 -0
  170. package/dist/schema/call/handler.js +1 -1
  171. package/dist/schema/call/machine.d.ts +16 -8
  172. package/dist/schema/call/normalize-error.d.ts +1 -0
  173. package/dist/schema/call/normalize-error.js +1 -0
  174. package/dist/schema/call/order.d.ts +7 -3
  175. package/dist/schema/call/order.js +1 -1
  176. package/dist/schema/call/payment.d.ts +7 -3
  177. package/dist/schema/call/permission.d.ts +4 -0
  178. package/dist/schema/call/personal.d.ts +4 -0
  179. package/dist/schema/call/progress.d.ts +4 -0
  180. package/dist/schema/call/progress.js +1 -1
  181. package/dist/schema/call/proof.d.ts +8 -0
  182. package/dist/schema/call/proof.js +1 -1
  183. package/dist/schema/call/receipt.js +1 -1
  184. package/dist/schema/call/repository.d.ts +4 -0
  185. package/dist/schema/call/reward.d.ts +6 -2
  186. package/dist/schema/call/reward.js +1 -1
  187. package/dist/schema/call/semantic.d.ts +2 -2
  188. package/dist/schema/call/semantic.js +1 -1
  189. package/dist/schema/call/service.d.ts +21 -7
  190. package/dist/schema/call/service.js +1 -1
  191. package/dist/schema/call/treasury.d.ts +10 -6
  192. package/dist/schema/common/index.js +1 -1
  193. package/dist/schema/envelope-unify.d.ts +1 -0
  194. package/dist/schema/envelope-unify.js +1 -1
  195. package/dist/schema/evaluation/index.d.ts +43 -0
  196. package/dist/schema/evaluation/index.js +1 -1
  197. package/dist/schema/goal/index.d.ts +14 -2
  198. package/dist/schema/goal/planning.d.ts +18 -0
  199. package/dist/schema/goal/planning.js +1 -1
  200. package/dist/schema/intent-radar/index.d.ts +12 -0
  201. package/dist/schema/intent-radar/index.js +1 -1
  202. package/dist/schema/keeper/index.d.ts +1 -0
  203. package/dist/schema/local/index.d.ts +10 -0
  204. package/dist/schema/local/index.js +1 -1
  205. package/dist/schema/local/wip.js +1 -1
  206. package/dist/schema/messenger/index.d.ts +1 -0
  207. package/dist/schema/messenger/index.js +1 -1
  208. package/dist/schema/operations.d.ts +98 -13
  209. package/dist/schema/operations.js +1 -1
  210. package/dist/schema/persona/index.d.ts +22 -0
  211. package/dist/schema/query/bi.d.ts +28 -2
  212. package/dist/schema/query/bi.js +1 -1
  213. package/dist/schema/query/index.d.ts +67 -61
  214. package/dist/schema/query/index.js +1 -1
  215. package/dist/schema/schema-version.js +1 -1
  216. package/dist/schema/workflow/index.js +1 -1
  217. package/dist/schema-query-impl/index.d.ts +1 -0
  218. package/dist/schema-query-impl/index.js +1 -1
  219. package/dist/schemas/account_operation.output.json +2 -1
  220. package/dist/schemas/benchmark_migration_operation.output.json +74 -0
  221. package/dist/schemas/benchmark_migration_operation.schema.json +33 -1
  222. package/dist/schemas/bridge_operation.output.json +2 -1
  223. package/dist/schemas/bridge_operation.schema.json +40 -0
  224. package/dist/schemas/evaluation_operation.output.json +96 -0
  225. package/dist/schemas/evaluation_operation.schema.json +39 -0
  226. package/dist/schemas/goal_operation.schema.json +32 -0
  227. package/dist/schemas/guard2file.schema.json +8 -0
  228. package/dist/schemas/index.json +1 -1
  229. package/dist/schemas/intent_radar.output.json +10 -2
  230. package/dist/schemas/intent_radar.schema.json +5 -1
  231. package/dist/schemas/keeper_operation.output.json +2 -1
  232. package/dist/schemas/local_cache_operation.output.json +2 -1
  233. package/dist/schemas/local_history_operation.output.json +2 -1
  234. package/dist/schemas/local_info_operation.output.json +2 -1
  235. package/dist/schemas/local_mark_operation.output.json +2 -1
  236. package/dist/schemas/local_mark_operation.schema.json +10 -1
  237. package/dist/schemas/machineNode2file.schema.json +8 -0
  238. package/dist/schemas/messenger_operation.output.json +2 -1
  239. package/dist/schemas/messenger_operation.schema.json +2 -1
  240. package/dist/schemas/monitor_events.output.json +2 -1
  241. package/dist/schemas/monitor_subscription.output.json +2 -1
  242. package/dist/schemas/onchain_events.output.json +206 -13
  243. package/dist/schemas/onchain_events.schema.json +16 -0
  244. package/dist/schemas/onchain_operations.output.json +22 -3
  245. package/dist/schemas/onchain_operations.schema.json +982 -327
  246. package/dist/schemas/onchain_operations_allocation.schema.json +20 -13
  247. package/dist/schemas/onchain_operations_arbitration.schema.json +9 -1
  248. package/dist/schemas/onchain_operations_contact.schema.json +8 -0
  249. package/dist/schemas/onchain_operations_demand.schema.json +8 -0
  250. package/dist/schemas/onchain_operations_gen_passport.schema.json +8 -0
  251. package/dist/schemas/onchain_operations_gen_proof.schema.json +8 -0
  252. package/dist/schemas/onchain_operations_guard.schema.json +655 -115
  253. package/dist/schemas/onchain_operations_machine.schema.json +11 -3
  254. package/dist/schemas/onchain_operations_order.schema.json +14 -11
  255. package/dist/schemas/onchain_operations_payment.schema.json +12 -9
  256. package/dist/schemas/onchain_operations_permission.schema.json +8 -0
  257. package/dist/schemas/onchain_operations_personal.schema.json +8 -0
  258. package/dist/schemas/onchain_operations_progress.schema.json +9 -1
  259. package/dist/schemas/onchain_operations_proof.schema.json +9 -1
  260. package/dist/schemas/onchain_operations_repository.schema.json +8 -0
  261. package/dist/schemas/onchain_operations_reward.schema.json +14 -11
  262. package/dist/schemas/onchain_operations_service.schema.json +25 -12
  263. package/dist/schemas/onchain_operations_treasury.schema.json +17 -19
  264. package/dist/schemas/onchain_table_data.output.json +52 -10
  265. package/dist/schemas/persona_operation.output.json +57 -0
  266. package/dist/schemas/persona_operation.schema.json +9 -0
  267. package/dist/schemas/query_toolkit.output.json +326 -23
  268. package/dist/schemas/query_toolkit.schema.json +18 -5
  269. package/dist/schemas/wip_file.output.json +2 -2
  270. package/dist/schemas/wip_file.schema.json +2 -2
  271. package/dist/schemas/workflow_operation.schema.json +1 -1
  272. package/dist/tools/error-catalog.d.ts +17 -0
  273. package/dist/tools/error-catalog.js +1 -0
  274. package/dist/tools/handlers/benchmark-migration.d.ts +29 -8
  275. package/dist/tools/handlers/benchmark-migration.js +1 -1
  276. package/dist/tools/handlers/config.js +1 -1
  277. package/dist/tools/handlers/entry-edge-recipe.d.ts +101 -0
  278. package/dist/tools/handlers/entry-edge-recipe.js +1 -0
  279. package/dist/tools/handlers/escrow-deficit.d.ts +10 -0
  280. package/dist/tools/handlers/escrow-deficit.js +1 -0
  281. package/dist/tools/handlers/evaluation.js +1 -1
  282. package/dist/tools/handlers/fund-rail-recipe.d.ts +10 -0
  283. package/dist/tools/handlers/fund-rail-recipe.js +1 -0
  284. package/dist/tools/handlers/intent-radar.js +1 -1
  285. package/dist/tools/handlers/local.js +1 -1
  286. package/dist/tools/handlers/mark-namespace.d.ts +30 -0
  287. package/dist/tools/handlers/mark-namespace.js +1 -0
  288. package/dist/tools/handlers/messenger.js +1 -1
  289. package/dist/tools/handlers/onchain-name-registration.d.ts +1 -0
  290. package/dist/tools/handlers/onchain-name-registration.js +1 -1
  291. package/dist/tools/handlers/onchain-name-registration.spec.js +1 -1
  292. package/dist/tools/handlers/onchain.d.ts +40 -1
  293. package/dist/tools/handlers/onchain.js +1 -1
  294. package/dist/tools/handlers/publish-binding-echo.d.ts +22 -0
  295. package/dist/tools/handlers/publish-binding-echo.js +1 -0
  296. package/dist/tools/handlers/query.d.ts +1 -1
  297. package/dist/tools/handlers/query.js +1 -1
  298. package/dist/tools/handlers/review-chain.d.ts +1 -0
  299. package/dist/tools/handlers/review-chain.js +1 -1
  300. package/dist/tools/handlers/schema-query.js +1 -1
  301. package/dist/tools/handlers/stale-build-check.d.ts +9 -0
  302. package/dist/tools/handlers/stale-build-check.js +1 -0
  303. package/dist/tools/handlers/submission-assembly.d.ts +55 -0
  304. package/dist/tools/handlers/submission-assembly.js +1 -0
  305. package/dist/tools/handlers/wip.js +1 -1
  306. package/dist/tools/index.d.ts +1 -0
  307. package/dist/tools/index.js +1 -1
  308. package/dist/tools/move-fn-index.gen.js +1 -1
  309. package/dist/tools/publish-gate-state.d.ts +5 -0
  310. package/dist/tools/publish-gate-state.js +1 -0
  311. package/dist/tools/registry/business.js +1 -1
  312. package/dist/tools/registry/onchain.js +1 -1
  313. package/dist/tools/registry/query.js +1 -1
  314. package/dist/tools/retry.js +1 -1
  315. package/dist/tools/runtime-health.js +1 -1
  316. package/dist/tools/shared.js +1 -1
  317. package/dist/tools/upgrade-check.d.ts +1 -0
  318. package/dist/tools/upgrade-check.js +1 -1
  319. package/dist/tools/wip-verify-ledger.d.ts +2 -0
  320. package/dist/tools/wip-verify-ledger.js +1 -1
  321. package/dist/tools/wrap.d.ts +15 -1
  322. package/dist/tools/wrap.js +1 -1
  323. package/package.json +5 -3
@@ -1 +1 @@
1
- import{getScenarioMode}from'../knowledge/scenario-modes.js';import{BUILTIN_TEMPLATES}from'../knowledge/builtin-templates.js';import{getIndustryTraits}from'../knowledge/industry-registry.js';import{getIndustryRiskChecks,getIndustryNeeds}from'../customer/index.js';import{SUPPORTED_INDUSTRIES}from'../customer/user-preferences.js';import{getFlywheelForIndustry}from'../knowledge/acquisition-flywheel.js';const GENERAL_TRAITS={'has_logistics':![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'occasional','avg_ticket_size':'medium'},GENERAL_FLYWHEEL={'industry':'general','trustSellingPoints':[],'keyActions':[],'rewardStrategy':'User-defined','discountStrategy':'User-defined','trustDescription':'User-defined\x20trust\x20mechanism'},GENERAL_MACHINE_SHAPE=[{'name':'paid','role':'Entry:\x20order\x20created\x20and\x20paid'},{'name':'delivering','role':'Service\x20delivery\x20in\x20progress'},{'name':'delivered','role':'Deliverable\x20available\x20for\x20review'},{'name':'completed','role':'Service\x20completed,\x20funds\x20released'},{'name':'cancelled','role':'Pre-delivery\x20cancellation\x20—\x20triggers\x20refund\x20Allocator','operator':'order_payer'}],GENERAL_ALLOCATOR={'recipient':'signer','count':0x1,'mode':'surplus','description':'Default:\x20surplus\x20to\x20service\x20owner\x20(general\x20fallback)'},RETAIL_D2C_MACHINE_SHAPE=[{'name':'ordered','role':'Entry:\x20order\x20created\x20(funds\x20escrowed\x20in\x20Allocation)'},{'name':'shipped','role':'Merchant\x20ships\x20goods'},{'name':'delivered','role':'Goods\x20delivered\x20to\x20buyer'},{'name':'completed','role':'Buyer\x20confirms\x20receipt\x20—\x20withdraw_guard\x20releases\x20funds','operator':'order_payer'},{'name':'cancelled','role':'Pre-ship\x20cancellation\x20—\x20refund_guard\x20refunds\x20buyer','operator':'order_payer'}],RETAIL_D2C_GUARDS=[{'template_id':'withdraw_guard_delivery','host':'service','purpose':'Release\x20funds\x20to\x20merchant\x20+\x20processor\x20on\x20order\x20completion\x20(delivery\x20confirmation)'},{'template_id':'refund_guard_cancellation','host':'service','purpose':'Refund\x20100%\x20to\x20buyer\x20on\x20order\x20cancellation'}],RETAIL_D2C_ALLOCATOR={'recipient':'entity','count':0x2,'mode':'rate','description':'Merchant\x2097%\x20+\x20Processor\x203%\x20(rate-based\x20split,\x20no\x20platform\x20commission)'},RETAIL_D2C_KEY_RISK='No\x20platform\x20arbitration\x20—\x20disputes\x20rely\x20on\x20optional\x20Arbitration\x20or\x20off-chain\x20chargeback',RETAIL_D2C_BUILD_NOTES=['Allocation\x20escrow\x20replaces\x20platform\x20custody\x20—\x20funds\x20locked\x20in\x20contract\x20until\x20Guard\x20releases','withdraw_guard\x20enforces\x20delivery\x20gate\x20—\x20merchant\x20must\x20reach\x20\x27completed\x27\x20state\x20to\x20receive\x20payment','refund_guard\x20ensures\x20100%\x20refund\x20on\x20cancellation\x20—\x20no\x20merchant\x20approval\x20needed','No\x20buy_guard\x20needed\x20—\x20D2C\x20doesn\x27t\x20gate\x20purchases\x20(open\x20storefront)','Arbitration\x20is\x20optional\x20—\x20add\x20when\x20dispute\x20volume\x20justifies\x20the\x20cost','Service\x20↔\x20Guard\x20circular\x20dependency:\x20create\x20Service\x20(unpublished)\x20→\x20create\x20Guards\x20→\x20update\x20Service\x20(publish)'],SUPPORTED_INDUSTRY_SET=new Set([...SUPPORTED_INDUSTRIES,'retail_d2c']);function fetchTemplate(a){const b=a==='retail_d2c'?'retail':a,c=getIndustryTraits(b)??GENERAL_TRAITS,d=SUPPORTED_INDUSTRY_SET['has'](a),e=a==='retail_d2c'?'retail':a,f=d?getIndustryRiskChecks(e):[],g=d?getIndustryNeeds(e):[],h=getFlywheelForIndustry(b)??GENERAL_FLYWHEEL;let i,j,k,l,m;if(a==='retail_d2c')i=RETAIL_D2C_MACHINE_SHAPE,j=RETAIL_D2C_GUARDS,k=RETAIL_D2C_ALLOCATOR,l=RETAIL_D2C_KEY_RISK,m=RETAIL_D2C_BUILD_NOTES;else{if(a==='general'){const n=getScenarioMode('general');i=GENERAL_MACHINE_SHAPE,j=[],k=GENERAL_ALLOCATOR,l=n?.['key_risk']??'No\x20safety\x20net\x20—\x20user\x20must\x20design\x20all\x20trust\x20mechanisms\x20manually',m=n?.['build_notes'];}else{const o=getScenarioMode(a);if(!o)throw new Error('No\x20scenario\x20mode\x20found\x20for\x20industry:\x20'+a);const p=BUILTIN_TEMPLATES['find'](q=>q['id']===o['default_template']);if(!p)throw new Error('Mode\x20\x27'+a+'\x27\x20default_template\x20\x27'+o['default_template']+'\x27\x20is\x20not\x20in\x20the\x20builtin\x20template\x20catalog');i=p['machine_shape'],j=p['guards'],k=p['allocator'],l=o['key_risk'],m=o['build_notes'];}}return{'traits':c,'risk_checks':f,'needs':g,'flywheel':h,'machine_shape':i,'guards':j,'allocator':k,'key_risk':l,'build_notes':m};}export const BUILTIN_MODES=[{'name':'freelance','display_name':'Freelance','version':'v1','source':'builtin',...fetchTemplate('freelance'),'analyze':{'key_questions':['Are\x20WIP\x20hashes\x20bound\x20to\x20each\x20milestone,\x20so\x20delivery\x20evidence\x20cannot\x20be\x20substituted\x20after\x20acceptance?','Does\x20the\x20acceptance\x20gate\x20have\x20a\x20time-bounded\x20escape\x20(keeper-driven\x20auto-accept),\x20or\x20can\x20a\x20silent\x20buyer\x20hold\x20the\x20provider\x27s\x20funds\x20hostage\x20indefinitely?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','allocation.distribute_milestone','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'service':{'setting_lock_duration':'30d','engagement_type':'milestone'},'machine':{'wip_required':!![],'wip_hash_algorithm':'sha256','acceptance_gate':!![]}},'expected_benefits':[{'metric':'Dispute\x20rate\x20reduction','expected_value':'40%','evidence':'WIP\x20hash\x20+\x20milestone\x20allocation\x20enforces\x20delivery\x20evidence'},{'metric':'Delivery\x20confirmation\x20efficiency','expected_value':'+50%','evidence':'acceptance\x20gate\x20automates\x20acceptance\x20workflow'},{'metric':'Provider\x20payment\x20assurance','expected_value':'100%','evidence':'Funds\x20auto-release\x20to\x20provider\x20after\x20accepted\x20node'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':![],'require_wip_evidence':!![],'other_constraints':['setting_lock_duration\x20>=\x207d\x20to\x20lock\x20engagement-period\x20rules','Acceptance\x20timeout\x20=\x20the\x20template\x27s\x20escrow_release_days\x20(single\x20source:\x20fee_params,\x20override\x20via\x20fee_overrides).\x20Mechanism:\x20dual-branch\x20time-gated\x20forward\x20(pattern.time_lock_progress\x20anchored\x20on\x20the\x20delivered\x20entry);\x20a\x20keeper\x20advances\x20the\x20timeout\x20path.\x20adminUnhold\x20(224)\x20is\x20ONLY\x20the\x20hold-release\x20escape\x20hatch,\x20never\x20the\x20timeout\x20mechanism.']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Suitable\x20for\x20mid-to-long-term\x20project\x20delivery','Requires\x20milestone-based\x20phased\x20acceptance']},'similar_industries':['rental','education'],'novel_capabilities':['allocation.distribute_milestone'],'disabled_builtin_constraints':['require_compensation_fund']},{'name':'rental','display_name':'Rental','version':'v1','source':'builtin',...fetchTemplate('rental'),'analyze':{'key_questions':['Is\x20the\x20deposit\x20escrowed\x20on-chain\x20and\x20sized\x20against\x20the\x20item\x27s\x20full\x20replacement\x20value,\x20not\x20just\x20the\x20rental\x20fee?','Are\x20pre-handover\x20and\x20post-return\x20WIP\x20states\x20hash-recorded,\x20so\x20damage\x20attribution\x20is\x20provable\x20rather\x20than\x20asserted?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'treasury':{'deposit_escrow':!![],'deposit_deductible':!![]},'machine':{'wip_required':!![],'wip_stages':['handover_out','returned'],'inspection_gate':!![]}},'expected_benefits':[{'metric':'Deposit\x20dispute\x20rate','expected_value':'-60%','evidence':'pre-rental\x20WIP\x20mandatorily\x20records\x20item\x27s\x20original\x20state'},{'metric':'Damage\x20liability\x20accuracy','expected_value':'+70%','evidence':'pre/post\x20WIP\x20hash\x20comparison\x20eliminates\x20unfounded\x20deductions'},{'metric':'Trust\x20score','expected_value':'+25%','evidence':'compensation_fund\x20covers\x20damage\x20risk'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'max_single_transaction':0x2710,'compensation_fund_coverage_ratio':0xa,'other_constraints':['Deposit\x20must\x20be\x20escrowed\x20(no\x20direct\x20transfer)','lock_duration\x20>=\x207d\x20to\x20prevent\x20arbitrary\x20merchant\x20withdrawal']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Requires\x20physical\x20item\x20handover','Has\x20logistics\x20or\x20offline\x20delivery\x20leg']},'similar_industries':['retail','travel'],'novel_capabilities':[]},{'name':'education','display_name':'Education','version':'v1','source':'builtin',...fetchTemplate('education'),'analyze':{'key_questions':['Does\x20tuition\x20release\x20per\x20attended\x20session\x20(Progress\x20node),\x20so\x20undelivered\x20sessions\x20stay\x20refundable\x20if\x20the\x20institution\x20disappears?','Does\x20setting_lock_duration\x20span\x20the\x20full\x20term,\x20so\x20the\x20institution\x20cannot\x20tighten\x20refund\x20rules\x20mid-course?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','allocation.distribute_milestone','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'allocation':{'strategy':{'recipient':'entity','count':0x1,'mode':'amount','description':'1/N\x20of\x20tuition\x20released\x20per\x20session\x20attendance'},'session_threshold':!![]},'service':{'setting_lock_duration':'120d','anti_runaway':!![]}},'expected_benefits':[{'metric':'Refund\x20dispute\x20rate','expected_value':'-50%','evidence':'per-session\x20release\x20distributes\x20tuition\x20by\x20class'},{'metric':'Institution\x20runaway\x20risk','expected_value':'eliminated','evidence':'Funds\x20release\x20per\x20session;\x20undelivered\x20portion\x20is\x20refundable'},{'metric':'Attendance\x20traceability','expected_value':'100%','evidence':'attendance_guard\x20signs\x20each\x20session'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':![],'other_constraints':['setting_lock_duration\x20covers\x20the\x20entire\x20term\x20(>=90d)','Long-cycle\x20projects\x20must\x20monitor\x20>90d\x20progress']},'applicable_conditions':{'business_scale':'medium','min_daily_orders':0x1,'other_conditions':['Long-cycle\x20delivery','Requires\x20per-session\x20acceptance','Regulatory\x20intensity:\x20medium']},'similar_industries':['freelance','subscription'],'novel_capabilities':['allocation.distribute_milestone'],'disabled_builtin_constraints':['require_wip_evidence']},{'name':'travel','display_name':'Travel','version':'v1','source':'builtin',...fetchTemplate('travel'),'analyze':{'key_questions':['Does\x20each\x20itinerary\x20segment\x20have\x20its\x20own\x20guard\x20and\x20WIP\x20acceptance,\x20so\x20one\x20failed\x20leg\x20is\x20refundable\x20without\x20unwinding\x20the\x20whole\x20trip?','Is\x20the\x20multi-tier\x20allocation\x20waterfall\x20(agency\x20→\x20hotel/guide/driver)\x20visible\x20on-chain,\x20so\x20the\x20agency\x20cannot\x20silently\x20re-split\x20funds?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'allocation':{'strategy':{'recipient':'entity','count':0x3,'mode':'amount','description':'Deposit\x2020%\x20to\x20agency,\x20final\x2080%\x20to\x20agency,\x20then\x20agency-side\x20Allocation\x20splits\x20to\x20hotel/guide/driver\x20per\x20segment'},'multi_tier_waterfall':!![],'guard_chaining':!![]},'service':{'supply_chain_suborders':!![],'segment_guard_required':!![]}},'expected_benefits':[{'metric':'Fund\x20transparency','expected_value':'100%','evidence':'multi-tier\x20allocation\x20splits\x20per\x20segment\x20to\x20hotel/guide/driver'},{'metric':'Itinerary\x20change\x20disputes','expected_value':'-45%','evidence':'segment\x20WIP\x20accepts\x20each\x20leg'},{'metric':'Breach\x20compensation\x20assurance','expected_value':'+60%','evidence':'compensation_fund\x20covers\x20itinerary\x20breach'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['Multi-tier\x20allocation\x20requires\x20guard\x20chaining\x20validation','deposit\x2020%\x20+\x20final\x2080%\x20two-stage\x20payment']},'applicable_conditions':{'business_scale':'medium','min_daily_orders':0x1,'other_conditions':['Multi-segment\x20itinerary\x20combination','Requires\x20hotel/guide/driver\x20multi-party\x20allocation']},'similar_industries':['rental','education'],'novel_capabilities':[]},{'name':'subscription','display_name':'Subscription','version':'v1','source':'builtin',...fetchTemplate('subscription'),'analyze':{'key_questions':['Is\x20every\x20periodic\x20charge\x20gated\x20by\x20an\x20explicit\x20user\x20confirmation,\x20with\x20no\x20auto-renew\x20default?','Can\x20the\x20subscriber\x20cancel\x20anytime\x20effective\x20next\x20period,\x20without\x20a\x20dead-end\x20node\x20in\x20the\x20machine?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','reward.claim_guard','contact.im_create'],'config_overrides':{'machine':{'no_auto_renew_trap':!![],'user_confirmed_charge':!![],'cancel_anytime':!![],'next_period_effective':!![]},'service':{'creator_data_subscription':!![],'periodic_billing':!![]}},'expected_benefits':[{'metric':'Renewal\x20rate','expected_value':'+25%','evidence':'loyalty\x20reward\x20+\x20transparent\x20subscription\x20mechanism'},{'metric':'Cancellation\x20disputes','expected_value':'eliminated','evidence':'cancel\x20anytime\x20+\x20no\x20auto-renew\x20trap'},{'metric':'Creator\x20retention','expected_value':'+30%','evidence':'deliver_guard_wip\x20prevents\x20content\x20dropout'}],'risk_appetite':'aggressive','risk_constraints':{'require_arbitration':![],'require_compensation_fund':![],'require_wip_evidence':![],'compensation_fund_coverage_ratio':0x3,'other_constraints':['Forbid\x20dead-end\x20nodes\x20(prevent\x20lock-in)','charge_guard\x20requires\x20user\x20confirmation\x20each\x20period']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x5,'other_conditions':['Pure-digital\x20delivery','Periodic\x20content\x20or\x20SaaS\x20service']},'similar_industries':['freelance','education'],'novel_capabilities':[],'disabled_builtin_constraints':['require_arbitration','require_compensation_fund','require_wip_evidence']},{'name':'retail','display_name':'Retail','version':'v1','source':'builtin',...fetchTemplate('retail'),'analyze':{'key_questions':['Is\x20the\x20logistics\x20tracking\x20number\x20recorded\x20as\x20WIP\x20before\x20the\x20confirm\x20gate,\x20so\x20receipt\x20disputes\x20have\x20carrier\x20evidence?','Is\x20the\x20refund\x20window\x20at\x20least\x207\x20days\x20with\x20an\x20on-chain\x20refund\x20path\x20that\x20does\x20not\x20rely\x20on\x20merchant\x20goodwill?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','reward.claim_guard','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'wip_field':'tracking_number','confirm_gate':!![],'refund_requires_approval':!![]},'service':{'first_order_discount':!![]}},'expected_benefits':[{'metric':'Return\x20dispute\x20rate','expected_value':'-35%','evidence':'logistics\x20WIP\x20+\x20refund\x20path\x20assurance'},{'metric':'Repurchase\x20rate','expected_value':'+20%','evidence':'spend\x20cashback\x20reward'},{'metric':'Product\x20authenticity\x20traceability','expected_value':'100%','evidence':'WIP\x20verifies\x20product/logistics\x20info'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':![],'compensation_fund_coverage_ratio':0x5,'other_constraints':['refund_window\x20>=\x207d','confirm_gate:\x20only\x20buyer\x20can\x20confirm\x20receipt']},'applicable_conditions':{'business_scale':'medium','min_daily_orders':0xa,'other_conditions':['Has\x20logistics\x20shipping\x20leg','High-frequency\x20small-ticket\x20transactions']},'similar_industries':['rental','subscription'],'novel_capabilities':[],'disabled_builtin_constraints':['require_wip_evidence']},{'name':'retail_d2c','display_name':'Retail\x20D2C\x20(Direct-to-Consumer)','version':'v1','source':'builtin',...fetchTemplate('retail_d2c'),'analyze':{'key_questions':['Do\x20withdraw_guard\x20and\x20refund_guard\x20fully\x20enclose\x20the\x20Allocation\x20escrow,\x20so\x20neither\x20side\x20can\x20move\x20funds\x20outside\x20the\x20contract\x20path?','With\x20no\x20platform\x20arbitration,\x20what\x20off-chain\x20recourse\x20(if\x20any)\x20backs\x20a\x20delivery\x20failure\x20—\x20and\x20is\x20that\x20acceptable\x20for\x20the\x20ticket\x20size?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_withdraw','guard.validate_refund','machine.node_topology','allocation.distribute','service.publish','progress.advance','contact.im_create'],'config_overrides':{'machine':{'wip_required':![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Merchant\x20revenue\x20share','expected_value':'97%','evidence':'No\x20platform\x20commission\x20—\x20only\x203%\x20processing\x20fee'},{'metric':'Fund\x20safety','expected_value':'contract-grade','evidence':'Allocation\x20escrow\x20+\x20Guard\x20verification\x20replaces\x20platform\x20custody'},{'metric':'Delivery\x20reliability','expected_value':'high','evidence':'withdraw_guard\x20enforces\x20delivery\x20confirmation\x20before\x20payment'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':![],'require_compensation_fund':![],'require_wip_evidence':![],'other_constraints':['Allocation\x20escrow\x20required\x20(withdraw_guard\x20+\x20refund_guard)','Service\x20↔\x20Guard\x20circular\x20dependency\x20requires\x203-step\x20creation\x20pattern']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Independent\x20storefront\x20(no\x20marketplace)','Merchant-managed\x20logistics','Allocation\x20escrow\x20model']},'similar_industries':['retail','subscription'],'novel_capabilities':['Allocation\x20escrow\x20as\x20platform-custody\x20alternative','Multi-recipient\x20allocation\x20(merchant\x20+\x20processor)'],'disabled_builtin_constraints':['require_arbitration','require_compensation_fund','require_wip_evidence']},{'name':'licensing','display_name':'Licensing','version':'v1','source':'builtin',...fetchTemplate('licensing'),'analyze':{'key_questions':['Is\x20the\x20license\x20grant\x20(terms\x20+\x20asset/certificate\x20hash)\x20anchored\x20as\x20a\x20WIP\x20artifact\x20and\x20an\x20evidence\x20Repository\x20row\x20BEFORE\x20release,\x20so\x20a\x20misrepresentation\x20dispute\x20has\x20an\x20on-chain\x20artifact\x20to\x20read?','Does\x20the\x20release\x20split\x20sum\x20to\x20exactly\x2010000\x20bps\x20across\x20explicit\x20NON-EMPTY\x20rights-holder\x20Entities\x20(no\x20empty\x20Entity\x20routing\x20the\x20share\x20to\x20the\x20deployer,\x20no\x20Surplus\x20draining\x20the\x20pool)?','Are\x20the\x20chain\x20GAPs\x20disclosed\x20honestly\x20—\x20the\x20auction\x20resolved\x20OFF-chain\x20(no\x20bid\x20ledger)\x20and\x20usage\x20caps\x20enforced\x20as\x20attested-counter\x20arbitration\x20evidence\x20(no\x20metering\x20oracle),\x20never\x20as\x20chain-enforced\x20limits?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':!![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Royalty-split\x20transparency','expected_value':'100%','evidence':'every\x20rights-holder\x20share\x20is\x20an\x20on-chain\x20Rate\x20leg\x20the\x20buyer\x20can\x20audit\x20before\x20ordering'},{'metric':'Misrepresentation\x20dispute\x20rate','expected_value':'-40%','evidence':'inspection-window\x20escrow\x20+\x20grant-artifact\x20WIP\x20anchor\x20the\x20terms\x20before\x20release'},{'metric':'Settlement\x20latency','expected_value':'seconds','evidence':'release\x20fires\x20on\x20buyer\x20accept\x20/\x20time-lock,\x20not\x20a\x20calendar\x20freeze'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['release\x20split\x20Rate\x20legs\x20sum\x20exactly\x2010000\x20(ERATE_NOT_10000);\x20every\x20recipient\x20an\x20explicit\x20NON-EMPTY\x20Entity','inspection/delivery\x20window\x20>=\x203d\x20so\x20the\x20buyer\x20can\x20verify\x20the\x20grant\x20before\x20auto-accept','🔴\x20auction\x20resolved\x20OFF-chain\x20(no\x20bid\x20ledger)\x20and\x20usage\x20caps\x20attested\x20(no\x20oracle)\x20—\x20disclosed,\x20never\x20chain-enforced']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Pure-digital\x20grant\x20(no\x20logistics\x20leg)','Rights-holder\x20/\x20producer\x20/\x20publisher\x20owns\x20the\x20IP','Long-lived\x20value\x20(a\x20royalty\x20share\x20or\x20a\x20license\x20term)']},'similar_industries':['subscription','freelance'],'novel_capabilities':['Multi-recipient\x20royalty\x20split\x20(Allocation\x20Rate\x20plan)','Territory/qualification\x20allowlist\x20buy\x20gate','Inspection-window\x20escrow\x20before\x20release']},{'name':'crowdfunding','display_name':'Crowdfunding','version':'v1','source':'builtin',...fetchTemplate('crowdfunding'),'analyze':{'key_questions':['Is\x20each\x20contribution\x20escrowed\x20to\x20the\x20funder\x27s\x20OWN\x20Order\x20(for_object)\x20and\x20NEVER\x20pooled\x20via\x20balance::join,\x20so\x20per-backer\x20attribution\x20survives\x20settlement\x20or\x20refund?','Does\x20the\x20threshold\x20gate\x20read\x20a\x20WRITER-BOUND\x20Repository\x20numeric\x20row\x20(id_from\x20signer,\x20value\x20=\x20amount)\x20summed\x20via\x20the\x20sum-where\x20query,\x20ANDed\x20with\x20an\x20ABSOLUTE\x20shared\x20campaign\x20deadline\x20—\x20so\x20a\x20funder\x20cannot\x20inflate\x20the\x20total\x20and\x20every\x20backer\x20sees\x20the\x20same\x20cutoff?','Is\x20the\x20aggregate\x20total\x20disclosed\x20honestly\x20as\x20a\x20keeper-attested\x20Repository\x20sum\x20(arbitration\x20evidence,\x20NOT\x20a\x20chain-verified\x20money\x20oracle),\x20and\x20is\x20the\x20escrow-exit\x20two-leg\x20polarity\x20exact\x20(refund\x20claimed_by\x20some==false\x20XOR\x20recover_gate\x20claimed_by\x20some==true,\x20D-BUG-2)?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Backer\x20attribution','expected_value':'100%','evidence':'each\x20contribution\x20is\x20a\x20for_object-bound\x20Allocation\x20on\x20the\x20funder\x27s\x20own\x20Order\x20—\x20never\x20pooled'},{'metric':'Unmet-threshold\x20refund','expected_value':'automatic','evidence':'the\x20sum-where\x20<\x20goal\x20leg\x20fires\x20the\x20refund\x20exit\x20with\x20no\x20merchant\x20approval\x20(D-BUG-2\x20polarity)'},{'metric':'Campaign\x20deadline\x20drift','expected_value':'0','evidence':'one\x20ABSOLUTE\x20Clock\x20timestamp\x20shared\x20by\x20every\x20funder,\x20not\x20per-order\x20entry+duration'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['per-contributor\x20Allocation\x20for_object\x20=\x20own\x20Order;\x20NEVER\x20balance::join\x20(attribution\x20survives)','threshold\x20gate\x20=\x20repository.data\x20sum-where\x20(1174)\x20over\x20WRITER-BOUND\x20rows\x20ANDed\x20with\x20an\x20ABSOLUTE\x20deadline','🔴\x20the\x20aggregate\x20total\x20is\x20a\x20keeper-attested\x20Repository\x20sum\x20(arbitration\x20evidence),\x20NOT\x20a\x20chain-verified\x20money\x20oracle\x20—\x20disclosed','🔴\x20L-01\x20never\x20promises\x20investment\x20returns\x20or\x20promotes\x20coin\x20price;\x20L-05\x20KYC/AML\x20+\x20cross-border\x20caution\x20(HIGH\x20regulatory\x20intensity)']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Aggregate\x20funding\x20goal\x20with\x20a\x20fixed\x20campaign\x20deadline','Per-backer\x20reward\x20tiers\x20or\x20donation\x20(no\x20logistics\x20leg\x20required)','All-or-nothing\x20(refund\x20if\x20unmet)\x20or\x20keep-it-all\x20(no\x20refund)\x20campaign\x20shape']},'similar_industries':['retail','licensing'],'novel_capabilities':['Aggregate-goal\x20threshold\x20gate\x20via\x20writer-bound\x20Repository\x20sum-where','Per-contributor\x20for_object\x20escrow\x20(attribution-preserving,\x20never\x20pooled)','Absolute\x20shared\x20campaign\x20deadline\x20+\x20two-leg\x20escrow-exit\x20(release\x20XOR\x20refund)']},{'name':'delivery','display_name':'Local\x20Delivery','version':'v1','source':'builtin',...fetchTemplate('delivery'),'analyze':{'key_questions':['Who\x20writes\x20the\x20rider\x20roster\x20(permission\x20221)\x20—\x20is\x20that\x20admission\x20power\x20disclosed,\x20and\x20is\x20the\x20roster\x20budget\x20(60\x20rosters\x20/\x2080\x20addresses\x20per\x20Progress)\x20respected?','Does\x20settlement\x20depart\x20a\x20SERIAL\x20claim\x20window\x20(TPL-09)\x20with\x20settle_hours\x20>=\x20claim_window_hours,\x20so\x20no\x20payout\x20can\x20race\x20an\x20open\x20dispute\x20(FACT-ALLOC-03)?','Are\x20handover\x20records\x20(ready/pickup/deliver)\x20writer-bound\x20repository\x20rows,\x20and\x20is\x20the\x20buyer-facing\x20copy\x20honest\x20that\x20dispatch,\x20ETA\x20and\x20rider\x20pay\x20are\x20OFF-CHAIN?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','progress.named_operator','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Silent-buyer\x20stranding','expected_value':'0','evidence':'buyer-first\x20confirmation\x20+\x20keeper\x20auto-confirm\x20within\x20auto_confirm_hours\x20(T-04)'},{'metric':'Payout/claim\x20race','expected_value':'unreachable','evidence':'the\x20serial\x20claim\x20window\x20makes\x20settlement\x20depart\x20only\x20after\x20filing\x20closes\x20(TPL-09)'},{'metric':'Rider\x20money-surface','expected_value':'0\x20legs','evidence':'the\x20escrow\x20can\x20never\x20pay\x20a\x20per-order\x20rider\x20(for_object\x20lock);\x20payroll\x20is\x20the\x20platform\x27s\x20off-chain\x20duty'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':![],'require_wip_evidence':!![],'other_constraints':['rider\x20roster\x20=\x20rider-admission\x20power;\x20disclose\x20the\x20roster\x20writer\x20(NAMED_OPERATOR_ROSTER_UNDISCLOSED)','settle_hours\x20>=\x20claim_window_hours\x20asserted\x20at\x20generation\x20(serial\x20window\x20math)','🔴\x20rider\x20pay\x20is\x20OFF-CHAIN\x20platform\x20payroll\x20—\x20never\x20model\x20a\x20per-order\x20rider\x20payout\x20leg','🔴\x20no\x20ETA/distance\x20oracle\x20—\x20pricing\x20and\x20delivery\x20estimates\x20are\x20not\x20chain-verifiable']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Local\x20fulfillment\x20within\x20minutes-hours\x20windows\x20(perishable\x20or\x20time-boxed)','Per-order\x20dispatched\x20fulfillers\x20(no\x20fixed\x20staff\x20roster)','Fee-graded\x20cancellation\x20(free\x20pre-acceptance,\x20fee\x20post-acceptance)']},'similar_industries':['retail','group_buy'],'novel_capabilities':['Named-operator\x20roster\x20rail\x20for\x20per-order\x20dispatched\x20riders\x20(K-1)','Serial\x20claim\x20window\x20on\x20hours-scale\x20timing\x20(TPL-09)','Fee-graded\x20cancel\x20taxonomy\x20with\x20a\x20dedicated\x20kill\x20terminal']},{'name':'group_buy','display_name':'Community\x20Group-Buy','version':'v1','source':'builtin',...fetchTemplate('group_buy'),'analyze':{'key_questions':['Is\x20the\x20batch\x20cutoff\x20ONE\x20shared\x20absolute\x20timestamp\x20(keeper-written\x20Repository\x20row\x20+\x20time_source\x20oracle),\x20not\x20a\x20per-order\x20entry+duration\x20lock?','Does\x20the\x20leader\x20template\x20fix\x20the\x20supplier\x27s\x20sub-service\x20address\x20in\x20the\x20ConsolidateBatch\x20guard\x20table\x20(b_submission\x20false,\x20Address)\x20so\x20the\x20procurement\x20graph\x20is\x20diligence-able\x20before\x20any\x20buyer\x20pays?','In\x20threshold\x20mode,\x20are\x20contribution\x20rows\x20ORDER-keyed\x20with\x20the\x20escrow-bound\x20aggregate\x20(per-row\x20min(row,\x20order.amount,\x20live\x20allocation.balance\x20—\x20v139\x20live\x20cap))\x20and\x20the\x20live-escrow\x20+\x20claimed_by-false\x20legs\x20—\x20the\x20three\x20CROWDFUNDING_*\x20blockers\x20armed?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','progress.named_operator','repository.data_write','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Cutoff\x20fairness','expected_value':'1\x20clock','evidence':'one\x20absolute\x20shared\x20cutoff\x20per\x20batch\x20(time_lock_absolute),\x20never\x20per-order\x20entry+duration'},{'metric':'Unformed-batch\x20refund','expected_value':'automatic','evidence':'ThresholdMissed\x20/\x20AbandonTimeout\x20rails\x20refund\x20per-order\x20with\x20no\x20merchant\x20grace'},{'metric':'Procurement\x20diligence','expected_value':'pre-order','evidence':'the\x20supplier\x20sub-service\x20address\x20is\x20a\x20fixed\x20guard-table\x20promise\x20(leader\x20shape)'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['batch\x20cutoff\x20=\x20shared\x20ABSOLUTE\x20timestamp\x20via\x20pattern.time_lock_absolute\x20+\x20time_source_repository_oracle','threshold\x20mode\x20reuses\x20the\x20crowdfunding\x20construction\x20(ORDER-keyed\x20rows,\x20escrow-bound\x20aggregate,\x20CROWDFUNDING_*\x20blockers)','🔴\x20multi-level\x20commission\x20is\x20NOT\x20expressible\x20—\x20single-layer\x20rate\x20leg\x20to\x20the\x20platform\x20Entity\x20with\x20off-chain\x20pass-through,\x20disclosed','🔴\x20delay\x20compensation\x20pays\x20from\x20compensation_fund,\x20NEVER\x20the\x20buyer\x20escrow\x20(Order\x20binds\x20<=\x201\x20allocator);\x20fund\x20pre-locked\x203x\x20(B2)']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Neighborhood\x20batch\x20buying\x20with\x20a\x20daily/periodic\x20cutoff','Pickup-point\x20fulfillment\x20(staffed\x20point\x20or\x20automated\x20locker)','Leader\x20consolidation\x20ahead\x20of\x20a\x20supplier\x20sub-order']},'similar_industries':['crowdfunding','delivery'],'novel_capabilities':['Shared\x20absolute\x20batch\x20cutoff\x20via\x20keeper-written\x20Repository\x20row\x20+\x20time-source\x20oracle','Supply-chain\x20suborder\x20commitment\x20in\x20the\x20guard\x20table\x20(pre-order\x20diligence)','point_type-conditional\x20pickup\x20topology\x20(staffed\x20leader\x20rail\x20vs\x20automated\x20locker)']},{'name':'general','display_name':'General','version':'v1','source':'builtin',...fetchTemplate('general'),'analyze':{'key_questions':['Which\x20trust\x20mechanisms\x20(arbitration,\x20compensation\x20fund,\x20WIP\x20evidence)\x20are\x20missing\x20here,\x20and\x20what\x20does\x20each\x20absence\x20cost\x20in\x20the\x20worst\x20case?','What\x20is\x20the\x20single\x20point\x20of\x20failure\x20—\x20who\x20can\x20unilaterally\x20take\x20funds\x20or\x20stall\x20the\x20workflow?']},'capabilities_used':['permission.index_create','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance'],'expected_benefits':[{'metric':'Flexibility','expected_value':'100%','evidence':'User\x20customizes\x20all\x20trust\x20mechanism\x20parameters'},{'metric':'Degraded\x20safety','expected_value':'usable','evidence':'Can\x20fall\x20back\x20to\x20general\x20at\x20any\x20time'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':![],'require_compensation_fund':![],'require_wip_evidence':![]},'applicable_conditions':{'business_scale':'small','other_conditions':['Fallback\x20degraded\x20mode','Hybrid\x20scenarios\x20not\x20covered\x20by\x20other\x20industries']},'similar_industries':[],'novel_capabilities':[],'disabled_builtin_constraints':['require_arbitration','require_compensation_fund','require_wip_evidence']}];
1
+ import{getScenarioMode}from'../knowledge/scenario-modes.js';import{BUILTIN_TEMPLATES}from'../knowledge/builtin-templates.js';import{getIndustryTraits}from'../knowledge/industry-registry.js';import{getIndustryRiskChecks,getIndustryNeeds}from'../customer/index.js';import{SUPPORTED_INDUSTRIES}from'../customer/user-preferences.js';import{getFlywheelForIndustry}from'../knowledge/acquisition-flywheel.js';const GENERAL_TRAITS={'has_logistics':![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'occasional','avg_ticket_size':'medium'},GENERAL_FLYWHEEL={'industry':'general','trustSellingPoints':[],'keyActions':[],'rewardStrategy':'User-defined','discountStrategy':'User-defined','trustDescription':'User-defined\x20trust\x20mechanism'},GENERAL_MACHINE_SHAPE=[{'name':'paid','role':'Entry:\x20order\x20created\x20and\x20paid'},{'name':'delivering','role':'Service\x20delivery\x20in\x20progress'},{'name':'delivered','role':'Deliverable\x20available\x20for\x20review'},{'name':'completed','role':'Service\x20completed,\x20funds\x20released'},{'name':'cancelled','role':'Pre-delivery\x20cancellation\x20—\x20triggers\x20refund\x20Allocator','operator':'order_payer'}],GENERAL_ALLOCATOR={'recipient':'signer','count':0x1,'mode':'surplus','description':'Default:\x20surplus\x20to\x20service\x20owner\x20(general\x20fallback)'},RETAIL_D2C_MACHINE_SHAPE=[{'name':'ordered','role':'Entry:\x20order\x20created\x20(funds\x20escrowed\x20in\x20Allocation)'},{'name':'shipped','role':'Merchant\x20ships\x20goods'},{'name':'delivered','role':'Goods\x20delivered\x20to\x20buyer'},{'name':'completed','role':'Buyer\x20confirms\x20receipt\x20—\x20withdraw_guard\x20releases\x20funds','operator':'order_payer'},{'name':'cancelled','role':'Pre-ship\x20cancellation\x20—\x20refund_guard\x20refunds\x20buyer','operator':'order_payer'}],RETAIL_D2C_GUARDS=[{'template_id':'withdraw_guard_delivery','host':'service','purpose':'Release\x20funds\x20to\x20merchant\x20+\x20processor\x20on\x20order\x20completion\x20(delivery\x20confirmation)'},{'template_id':'refund_guard_cancellation','host':'service','purpose':'Refund\x20100%\x20to\x20buyer\x20on\x20order\x20cancellation'}],RETAIL_D2C_ALLOCATOR={'recipient':'entity','count':0x2,'mode':'rate','description':'Merchant\x2097%\x20+\x20Processor\x203%\x20(rate-based\x20split,\x20no\x20platform\x20commission)'},RETAIL_D2C_KEY_RISK='No\x20platform\x20arbitration\x20—\x20disputes\x20rely\x20on\x20optional\x20Arbitration\x20or\x20off-chain\x20chargeback',RETAIL_D2C_BUILD_NOTES=['Allocation\x20escrow\x20replaces\x20platform\x20custody\x20—\x20funds\x20locked\x20in\x20contract\x20until\x20Guard\x20releases','withdraw_guard\x20enforces\x20delivery\x20gate\x20—\x20merchant\x20must\x20reach\x20\x27completed\x27\x20state\x20to\x20receive\x20payment','refund_guard\x20ensures\x20100%\x20refund\x20on\x20cancellation\x20—\x20no\x20merchant\x20approval\x20needed','No\x20buy_guard\x20needed\x20—\x20D2C\x20doesn\x27t\x20gate\x20purchases\x20(open\x20storefront)','Arbitration\x20is\x20optional\x20—\x20add\x20when\x20dispute\x20volume\x20justifies\x20the\x20cost','Service\x20↔\x20Guard\x20circular\x20dependency:\x20create\x20Service\x20(unpublished)\x20→\x20create\x20Guards\x20→\x20update\x20Service\x20(publish)'],SUPPORTED_INDUSTRY_SET=new Set([...SUPPORTED_INDUSTRIES,'retail_d2c']);function fetchTemplate(a){const b=a==='retail_d2c'?'retail':a,c=getIndustryTraits(b)??GENERAL_TRAITS,d=SUPPORTED_INDUSTRY_SET['has'](a),e=a==='retail_d2c'?'retail':a,f=d?getIndustryRiskChecks(e):[],g=d?getIndustryNeeds(e):[],h=getFlywheelForIndustry(b)??GENERAL_FLYWHEEL;let i,j,k,l,m;if(a==='retail_d2c')i=RETAIL_D2C_MACHINE_SHAPE,j=RETAIL_D2C_GUARDS,k=RETAIL_D2C_ALLOCATOR,l=RETAIL_D2C_KEY_RISK,m=RETAIL_D2C_BUILD_NOTES;else{if(a==='general'){const n=getScenarioMode('general');i=GENERAL_MACHINE_SHAPE,j=[],k=GENERAL_ALLOCATOR,l=n?.['key_risk']??'No\x20safety\x20net\x20—\x20user\x20must\x20design\x20all\x20trust\x20mechanisms\x20manually',m=n?.['build_notes'];}else{const o=getScenarioMode(a);if(!o)throw new Error('No\x20scenario\x20mode\x20found\x20for\x20industry:\x20'+a);const p=BUILTIN_TEMPLATES['find'](q=>q['id']===o['default_template']);if(!p)throw new Error('Mode\x20\x27'+a+'\x27\x20default_template\x20\x27'+o['default_template']+'\x27\x20is\x20not\x20in\x20the\x20builtin\x20template\x20catalog');i=p['machine_shape'],j=p['guards'],k=p['allocator'],l=o['key_risk'],m=o['build_notes'];}}return{'traits':c,'risk_checks':f,'needs':g,'flywheel':h,'machine_shape':i,'guards':j,'allocator':k,'key_risk':l,'build_notes':m};}export const BUILTIN_MODES=[{'name':'freelance','display_name':'Freelance','version':'v1','source':'builtin',...fetchTemplate('freelance'),'analyze':{'key_questions':['Are\x20WIP\x20hashes\x20bound\x20to\x20each\x20milestone,\x20so\x20delivery\x20evidence\x20cannot\x20be\x20substituted\x20after\x20acceptance?','Does\x20the\x20acceptance\x20gate\x20have\x20a\x20time-bounded\x20escape\x20(keeper-driven\x20auto-accept),\x20or\x20can\x20a\x20silent\x20buyer\x20hold\x20the\x20provider\x27s\x20funds\x20hostage\x20indefinitely?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','allocation.distribute_milestone','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'service':{'setting_lock_duration':'30d','engagement_type':'milestone'},'machine':{'wip_required':!![],'wip_hash_algorithm':'sha256','acceptance_gate':!![]}},'expected_benefits':[{'metric':'Dispute\x20rate\x20reduction','expected_value':'40%','evidence':'WIP\x20hash\x20+\x20milestone\x20allocation\x20enforces\x20delivery\x20evidence'},{'metric':'Delivery\x20confirmation\x20efficiency','expected_value':'+50%','evidence':'acceptance\x20gate\x20automates\x20acceptance\x20workflow'},{'metric':'Provider\x20payment\x20assurance','expected_value':'100%','evidence':'Funds\x20auto-release\x20to\x20provider\x20after\x20accepted\x20node'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':![],'require_wip_evidence':!![],'other_constraints':['setting_lock_duration\x20>=\x207d\x20to\x20lock\x20engagement-period\x20rules','Acceptance\x20timeout\x20=\x20the\x20template\x27s\x20escrow_release_days\x20(single\x20source:\x20fee_params,\x20override\x20via\x20fee_overrides).\x20Mechanism:\x20dual-branch\x20time-gated\x20forward\x20(pattern.time_lock_progress\x20anchored\x20on\x20the\x20delivered\x20entry);\x20a\x20keeper\x20advances\x20the\x20timeout\x20path.\x20adminUnhold\x20(224)\x20is\x20ONLY\x20the\x20hold-release\x20escape\x20hatch,\x20never\x20the\x20timeout\x20mechanism.']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Suitable\x20for\x20mid-to-long-term\x20project\x20delivery','Requires\x20milestone-based\x20phased\x20acceptance']},'similar_industries':['rental','education'],'novel_capabilities':['allocation.distribute_milestone'],'disabled_builtin_constraints':['require_compensation_fund']},{'name':'rental','display_name':'Rental','version':'v1','source':'builtin',...fetchTemplate('rental'),'analyze':{'key_questions':['Is\x20the\x20deposit\x20escrowed\x20on-chain\x20and\x20sized\x20against\x20the\x20item\x27s\x20full\x20replacement\x20value,\x20not\x20just\x20the\x20rental\x20fee?','Are\x20pre-handover\x20and\x20post-return\x20WIP\x20states\x20hash-recorded,\x20so\x20damage\x20attribution\x20is\x20provable\x20rather\x20than\x20asserted?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'treasury':{'deposit_escrow':!![],'deposit_deductible':!![]},'machine':{'wip_required':!![],'wip_stages':['handover_out','returned'],'inspection_gate':!![]}},'expected_benefits':[{'metric':'Deposit\x20dispute\x20rate','expected_value':'-60%','evidence':'pre-rental\x20WIP\x20mandatorily\x20records\x20item\x27s\x20original\x20state'},{'metric':'Damage\x20liability\x20accuracy','expected_value':'+70%','evidence':'pre/post\x20WIP\x20hash\x20comparison\x20eliminates\x20unfounded\x20deductions'},{'metric':'Trust\x20score','expected_value':'+25%','evidence':'compensation_fund\x20covers\x20damage\x20risk'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'max_single_transaction':0x2710,'compensation_fund_coverage_ratio':0xa,'other_constraints':['Deposit\x20must\x20be\x20escrowed\x20(no\x20direct\x20transfer)','lock_duration\x20>=\x207d\x20to\x20prevent\x20arbitrary\x20merchant\x20withdrawal']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Requires\x20physical\x20item\x20handover','Has\x20logistics\x20or\x20offline\x20delivery\x20leg']},'similar_industries':['retail','travel'],'novel_capabilities':[]},{'name':'education','display_name':'Education','version':'v1','source':'builtin',...fetchTemplate('education'),'analyze':{'key_questions':['Does\x20tuition\x20release\x20per\x20attended\x20session\x20(Progress\x20node),\x20so\x20undelivered\x20sessions\x20stay\x20refundable\x20if\x20the\x20institution\x20disappears?','Does\x20setting_lock_duration\x20span\x20the\x20full\x20term,\x20so\x20the\x20institution\x20cannot\x20tighten\x20refund\x20rules\x20mid-course?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','allocation.distribute_milestone','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'allocation':{'strategy':{'recipient':'entity','count':0x1,'mode':'amount','description':'1/N\x20of\x20tuition\x20released\x20per\x20session\x20attendance'},'session_threshold':!![]},'service':{'setting_lock_duration':'120d','anti_runaway':!![]}},'expected_benefits':[{'metric':'Refund\x20dispute\x20rate','expected_value':'-50%','evidence':'per-session\x20release\x20distributes\x20tuition\x20by\x20class'},{'metric':'Institution\x20runaway\x20risk','expected_value':'eliminated','evidence':'Funds\x20release\x20per\x20session;\x20undelivered\x20portion\x20is\x20refundable'},{'metric':'Attendance\x20traceability','expected_value':'100%','evidence':'attendance_guard\x20signs\x20each\x20session'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':![],'other_constraints':['setting_lock_duration\x20covers\x20the\x20entire\x20term\x20(>=90d)','Long-cycle\x20projects\x20must\x20monitor\x20>90d\x20progress']},'applicable_conditions':{'business_scale':'medium','min_daily_orders':0x1,'other_conditions':['Long-cycle\x20delivery','Requires\x20per-session\x20acceptance','Regulatory\x20intensity:\x20medium']},'similar_industries':['freelance','subscription'],'novel_capabilities':['allocation.distribute_milestone'],'disabled_builtin_constraints':['require_wip_evidence']},{'name':'travel','display_name':'Travel','version':'v1','source':'builtin',...fetchTemplate('travel'),'analyze':{'key_questions':['Does\x20each\x20itinerary\x20segment\x20have\x20its\x20own\x20guard\x20and\x20WIP\x20acceptance,\x20so\x20one\x20failed\x20leg\x20is\x20refundable\x20without\x20unwinding\x20the\x20whole\x20trip?','Is\x20the\x20multi-tier\x20allocation\x20waterfall\x20(agency\x20→\x20hotel/guide/driver)\x20visible\x20on-chain,\x20so\x20the\x20agency\x20cannot\x20silently\x20re-split\x20funds?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'allocation':{'strategy':{'recipient':'entity','count':0x3,'mode':'amount','description':'Deposit\x2020%\x20to\x20agency,\x20final\x2080%\x20to\x20agency,\x20then\x20agency-side\x20Allocation\x20splits\x20to\x20hotel/guide/driver\x20per\x20segment'},'multi_tier_waterfall':!![],'guard_chaining':!![]},'service':{'supply_chain_suborders':!![],'segment_guard_required':!![]}},'expected_benefits':[{'metric':'Fund\x20transparency','expected_value':'100%','evidence':'multi-tier\x20allocation\x20splits\x20per\x20segment\x20to\x20hotel/guide/driver'},{'metric':'Itinerary\x20change\x20disputes','expected_value':'-45%','evidence':'segment\x20WIP\x20accepts\x20each\x20leg'},{'metric':'Breach\x20compensation\x20assurance','expected_value':'+60%','evidence':'compensation_fund\x20covers\x20itinerary\x20breach'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['Multi-tier\x20allocation\x20requires\x20guard\x20chaining\x20validation','deposit\x2020%\x20+\x20final\x2080%\x20two-stage\x20payment']},'applicable_conditions':{'business_scale':'medium','min_daily_orders':0x1,'other_conditions':['Multi-segment\x20itinerary\x20combination','Requires\x20hotel/guide/driver\x20multi-party\x20allocation']},'similar_industries':['rental','education'],'novel_capabilities':[]},{'name':'subscription','display_name':'Subscription','version':'v1','source':'builtin',...fetchTemplate('subscription'),'analyze':{'key_questions':['Is\x20every\x20periodic\x20charge\x20gated\x20by\x20an\x20explicit\x20user\x20confirmation,\x20with\x20no\x20auto-renew\x20default?','Can\x20the\x20subscriber\x20cancel\x20anytime\x20effective\x20next\x20period,\x20without\x20a\x20dead-end\x20node\x20in\x20the\x20machine?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','reward.claim_guard','contact.im_create'],'config_overrides':{'machine':{'no_auto_renew_trap':!![],'user_confirmed_charge':!![],'cancel_anytime':!![],'next_period_effective':!![]},'service':{'creator_data_subscription':!![],'periodic_billing':!![]}},'expected_benefits':[{'metric':'Renewal\x20rate','expected_value':'+25%','evidence':'loyalty\x20reward\x20+\x20transparent\x20subscription\x20mechanism'},{'metric':'Cancellation\x20disputes','expected_value':'eliminated','evidence':'cancel\x20anytime\x20+\x20no\x20auto-renew\x20trap'},{'metric':'Creator\x20retention','expected_value':'+30%','evidence':'deliver_guard_wip\x20prevents\x20content\x20dropout'}],'risk_appetite':'aggressive','risk_constraints':{'require_arbitration':![],'require_compensation_fund':![],'require_wip_evidence':![],'compensation_fund_coverage_ratio':0x3,'other_constraints':['Forbid\x20dead-end\x20nodes\x20(prevent\x20lock-in)','charge_guard\x20requires\x20user\x20confirmation\x20each\x20period']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x5,'other_conditions':['Pure-digital\x20delivery','Periodic\x20content\x20or\x20SaaS\x20service']},'similar_industries':['freelance','education'],'novel_capabilities':[],'disabled_builtin_constraints':['require_arbitration','require_compensation_fund','require_wip_evidence']},{'name':'retail','display_name':'Retail','version':'v1','source':'builtin',...fetchTemplate('retail'),'analyze':{'key_questions':['Is\x20the\x20logistics\x20tracking\x20number\x20recorded\x20as\x20WIP\x20before\x20the\x20confirm\x20gate,\x20so\x20receipt\x20disputes\x20have\x20carrier\x20evidence?','Is\x20the\x20refund\x20window\x20at\x20least\x207\x20days\x20with\x20an\x20on-chain\x20refund\x20path\x20that\x20does\x20not\x20rely\x20on\x20merchant\x20goodwill?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','reward.claim_guard','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'wip_field':'tracking_number','confirm_gate':!![],'refund_requires_approval':!![]},'service':{'first_order_discount':!![]}},'expected_benefits':[{'metric':'Return\x20dispute\x20rate','expected_value':'-35%','evidence':'logistics\x20WIP\x20+\x20refund\x20path\x20assurance'},{'metric':'Repurchase\x20rate','expected_value':'+20%','evidence':'spend\x20cashback\x20reward'},{'metric':'Product\x20authenticity\x20traceability','expected_value':'100%','evidence':'WIP\x20verifies\x20product/logistics\x20info'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':![],'compensation_fund_coverage_ratio':0x5,'other_constraints':['refund_window\x20>=\x207d','confirm_gate:\x20only\x20buyer\x20can\x20confirm\x20receipt']},'applicable_conditions':{'business_scale':'medium','min_daily_orders':0xa,'other_conditions':['Has\x20logistics\x20shipping\x20leg','High-frequency\x20small-ticket\x20transactions']},'similar_industries':['rental','subscription'],'novel_capabilities':[],'disabled_builtin_constraints':['require_wip_evidence']},{'name':'retail_d2c','display_name':'Retail\x20D2C\x20(Direct-to-Consumer)','version':'v1','source':'builtin',...fetchTemplate('retail_d2c'),'analyze':{'key_questions':['Do\x20withdraw_guard\x20and\x20refund_guard\x20fully\x20enclose\x20the\x20Allocation\x20escrow,\x20so\x20neither\x20side\x20can\x20move\x20funds\x20outside\x20the\x20contract\x20path?','With\x20no\x20platform\x20arbitration,\x20what\x20off-chain\x20recourse\x20(if\x20any)\x20backs\x20a\x20delivery\x20failure\x20—\x20and\x20is\x20that\x20acceptable\x20for\x20the\x20ticket\x20size?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_withdraw','guard.validate_refund','machine.node_topology','allocation.distribute','service.publish','progress.advance','contact.im_create'],'config_overrides':{'machine':{'wip_required':![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Merchant\x20revenue\x20share','expected_value':'97%','evidence':'No\x20platform\x20commission\x20—\x20only\x203%\x20processing\x20fee'},{'metric':'Fund\x20safety','expected_value':'contract-grade','evidence':'Allocation\x20escrow\x20+\x20Guard\x20verification\x20replaces\x20platform\x20custody'},{'metric':'Delivery\x20reliability','expected_value':'high','evidence':'withdraw_guard\x20enforces\x20delivery\x20confirmation\x20before\x20payment'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':![],'require_compensation_fund':![],'require_wip_evidence':![],'other_constraints':['Allocation\x20escrow\x20required\x20(withdraw_guard\x20+\x20refund_guard)','Service\x20↔\x20Guard\x20circular\x20dependency\x20requires\x203-step\x20creation\x20pattern']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Independent\x20storefront\x20(no\x20marketplace)','Merchant-managed\x20logistics','Allocation\x20escrow\x20model']},'similar_industries':['retail','subscription'],'novel_capabilities':['Allocation\x20escrow\x20as\x20platform-custody\x20alternative','Multi-recipient\x20allocation\x20(merchant\x20+\x20processor)'],'disabled_builtin_constraints':['require_arbitration','require_compensation_fund','require_wip_evidence']},{'name':'licensing','display_name':'Licensing','version':'v1','source':'builtin',...fetchTemplate('licensing'),'analyze':{'key_questions':['Is\x20the\x20license\x20grant\x20(terms\x20+\x20asset/certificate\x20hash)\x20anchored\x20as\x20a\x20WIP\x20artifact\x20and\x20an\x20evidence\x20Repository\x20row\x20BEFORE\x20release,\x20so\x20a\x20misrepresentation\x20dispute\x20has\x20an\x20on-chain\x20artifact\x20to\x20read?','Does\x20the\x20release\x20split\x20sum\x20to\x20exactly\x2010000\x20bps\x20across\x20explicit\x20NON-EMPTY\x20rights-holder\x20Entities\x20(no\x20empty\x20Entity\x20routing\x20the\x20share\x20to\x20the\x20deployer,\x20no\x20Surplus\x20draining\x20the\x20pool)?','Are\x20the\x20chain\x20GAPs\x20disclosed\x20honestly\x20—\x20the\x20auction\x20resolved\x20OFF-chain\x20(no\x20bid\x20ledger)\x20and\x20usage\x20caps\x20enforced\x20as\x20attested-counter\x20arbitration\x20evidence\x20(no\x20metering\x20oracle),\x20never\x20as\x20chain-enforced\x20limits?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':!![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Royalty-split\x20transparency','expected_value':'100%','evidence':'every\x20rights-holder\x20share\x20is\x20an\x20on-chain\x20Rate\x20leg\x20the\x20buyer\x20can\x20audit\x20before\x20ordering'},{'metric':'Misrepresentation\x20dispute\x20rate','expected_value':'-40%','evidence':'inspection-window\x20escrow\x20+\x20grant-artifact\x20WIP\x20anchor\x20the\x20terms\x20before\x20release'},{'metric':'Settlement\x20latency','expected_value':'seconds','evidence':'release\x20fires\x20on\x20buyer\x20accept\x20/\x20time-lock,\x20not\x20a\x20calendar\x20freeze'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['release\x20split\x20Rate\x20legs\x20sum\x20exactly\x2010000\x20(ERATE_NOT_10000);\x20every\x20recipient\x20an\x20explicit\x20NON-EMPTY\x20Entity','inspection/delivery\x20window\x20>=\x203d\x20so\x20the\x20buyer\x20can\x20verify\x20the\x20grant\x20before\x20auto-accept','🔴\x20auction\x20resolved\x20OFF-chain\x20(no\x20bid\x20ledger)\x20and\x20usage\x20caps\x20attested\x20(no\x20oracle)\x20—\x20disclosed,\x20never\x20chain-enforced']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Pure-digital\x20grant\x20(no\x20logistics\x20leg)','Rights-holder\x20/\x20producer\x20/\x20publisher\x20owns\x20the\x20IP','Long-lived\x20value\x20(a\x20royalty\x20share\x20or\x20a\x20license\x20term)']},'similar_industries':['subscription','freelance'],'novel_capabilities':['Multi-recipient\x20royalty\x20split\x20(Allocation\x20Rate\x20plan)','Territory/qualification\x20allowlist\x20buy\x20gate','Inspection-window\x20escrow\x20before\x20release']},{'name':'crowdfunding','display_name':'Crowdfunding','version':'v1','source':'builtin',...fetchTemplate('crowdfunding'),'analyze':{'key_questions':['Is\x20each\x20contribution\x20escrowed\x20to\x20the\x20funder\x27s\x20OWN\x20Order\x20(for_object)\x20and\x20NEVER\x20pooled\x20via\x20balance::join,\x20so\x20per-backer\x20attribution\x20survives\x20settlement\x20or\x20refund?','Does\x20the\x20threshold\x20gate\x20read\x20a\x20WRITER-BOUND\x20Repository\x20numeric\x20row\x20(id_from\x20signer,\x20value\x20=\x20amount)\x20summed\x20via\x20the\x20sum-where\x20query,\x20ANDed\x20with\x20an\x20ABSOLUTE\x20shared\x20campaign\x20deadline\x20—\x20so\x20a\x20funder\x20cannot\x20inflate\x20the\x20total\x20and\x20every\x20backer\x20sees\x20the\x20same\x20cutoff?','Is\x20the\x20aggregate\x20total\x20disclosed\x20honestly\x20as\x20a\x20keeper-attested\x20Repository\x20sum\x20(arbitration\x20evidence,\x20NOT\x20a\x20chain-verified\x20money\x20oracle),\x20and\x20is\x20the\x20escrow-exit\x20two-leg\x20polarity\x20exact\x20(refund\x20claimed_by\x20some==false\x20XOR\x20recover_gate\x20claimed_by\x20some==true,\x20D-BUG-2)?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Backer\x20attribution','expected_value':'100%','evidence':'each\x20contribution\x20is\x20a\x20for_object-bound\x20Allocation\x20on\x20the\x20funder\x27s\x20own\x20Order\x20—\x20never\x20pooled'},{'metric':'Unmet-threshold\x20refund','expected_value':'automatic','evidence':'the\x20sum-where\x20<\x20goal\x20leg\x20fires\x20the\x20refund\x20exit\x20with\x20no\x20merchant\x20approval\x20(D-BUG-2\x20polarity)'},{'metric':'Campaign\x20deadline\x20drift','expected_value':'0','evidence':'one\x20ABSOLUTE\x20Clock\x20timestamp\x20shared\x20by\x20every\x20funder,\x20not\x20per-order\x20entry+duration'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['per-contributor\x20Allocation\x20for_object\x20=\x20own\x20Order;\x20NEVER\x20balance::join\x20(attribution\x20survives)','threshold\x20gate\x20=\x20repository.data\x20sum-where\x20(1174)\x20over\x20WRITER-BOUND\x20rows\x20ANDed\x20with\x20an\x20ABSOLUTE\x20deadline','🔴\x20the\x20aggregate\x20total\x20is\x20a\x20keeper-attested\x20Repository\x20sum\x20(arbitration\x20evidence),\x20NOT\x20a\x20chain-verified\x20money\x20oracle\x20—\x20disclosed','🔴\x20L-01\x20never\x20promises\x20investment\x20returns\x20or\x20promotes\x20coin\x20price;\x20L-05\x20KYC/AML\x20+\x20cross-border\x20caution\x20(HIGH\x20regulatory\x20intensity)']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Aggregate\x20funding\x20goal\x20with\x20a\x20fixed\x20campaign\x20deadline','Per-backer\x20reward\x20tiers\x20or\x20donation\x20(no\x20logistics\x20leg\x20required)','All-or-nothing\x20(refund\x20if\x20unmet)\x20or\x20keep-it-all\x20(no\x20refund)\x20campaign\x20shape']},'similar_industries':['retail','licensing'],'novel_capabilities':['Aggregate-goal\x20threshold\x20gate\x20via\x20writer-bound\x20Repository\x20sum-where','Per-contributor\x20for_object\x20escrow\x20(attribution-preserving,\x20never\x20pooled)','Absolute\x20shared\x20campaign\x20deadline\x20+\x20two-leg\x20escrow-exit\x20(release\x20XOR\x20refund)']},{'name':'delivery','display_name':'Local\x20Delivery','version':'v1','source':'builtin',...fetchTemplate('delivery'),'analyze':{'key_questions':['Who\x20writes\x20the\x20rider\x20roster\x20(permission\x20221)\x20—\x20is\x20that\x20admission\x20power\x20disclosed,\x20and\x20is\x20the\x20roster\x20budget\x20(60\x20rosters\x20/\x2080\x20addresses\x20per\x20Progress)\x20respected?','Does\x20settlement\x20depart\x20a\x20SERIAL\x20claim\x20window\x20(TPL-09)\x20with\x20settle_hours\x20>=\x20claim_window_hours,\x20so\x20no\x20payout\x20can\x20race\x20an\x20open\x20dispute\x20(FACT-ALLOC-03)?','Are\x20handover\x20records\x20(ready/pickup/deliver)\x20writer-bound\x20repository\x20rows,\x20and\x20is\x20the\x20buyer-facing\x20copy\x20honest\x20that\x20dispatch,\x20ETA\x20and\x20rider\x20pay\x20are\x20OFF-CHAIN?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','progress.named_operator','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Silent-buyer\x20stranding','expected_value':'0','evidence':'buyer-first\x20confirmation\x20+\x20keeper\x20auto-confirm\x20within\x20auto_confirm_hours\x20(T-04)'},{'metric':'Payout/claim\x20race','expected_value':'unreachable','evidence':'the\x20serial\x20claim\x20window\x20makes\x20settlement\x20depart\x20only\x20after\x20filing\x20closes\x20(TPL-09)'},{'metric':'Rider\x20money-surface','expected_value':'0\x20legs','evidence':'the\x20escrow\x20can\x20never\x20pay\x20a\x20per-order\x20rider\x20(for_object\x20lock);\x20payroll\x20is\x20the\x20platform\x27s\x20off-chain\x20duty'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':![],'require_wip_evidence':!![],'other_constraints':['rider\x20roster\x20=\x20rider-admission\x20power;\x20disclose\x20the\x20roster\x20writer\x20(NAMED_OPERATOR_ROSTER_UNDISCLOSED)','settle_hours\x20>=\x20claim_window_hours\x20asserted\x20at\x20generation\x20(serial\x20window\x20math)','🔴\x20rider\x20pay\x20is\x20OFF-CHAIN\x20platform\x20payroll\x20—\x20never\x20model\x20a\x20per-order\x20rider\x20payout\x20leg','🔴\x20no\x20ETA/distance\x20oracle\x20—\x20pricing\x20and\x20delivery\x20estimates\x20are\x20not\x20chain-verifiable']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Local\x20fulfillment\x20within\x20minutes-hours\x20windows\x20(perishable\x20or\x20time-boxed)','Per-order\x20dispatched\x20fulfillers\x20(no\x20fixed\x20staff\x20roster)','Fee-graded\x20cancellation\x20(free\x20pre-acceptance,\x20fee\x20post-acceptance)']},'similar_industries':['retail','group_buy'],'novel_capabilities':['Named-operator\x20roster\x20rail\x20for\x20per-order\x20dispatched\x20riders\x20(K-1)','Serial\x20claim\x20window\x20on\x20hours-scale\x20timing\x20(TPL-09)','Fee-graded\x20cancel\x20taxonomy\x20with\x20a\x20dedicated\x20kill\x20terminal']},{'name':'group_buy','display_name':'Community\x20Group-Buy','version':'v1','source':'builtin',...fetchTemplate('group_buy'),'analyze':{'key_questions':['Is\x20the\x20batch\x20cutoff\x20ONE\x20shared\x20absolute\x20timestamp\x20(keeper-written\x20Repository\x20row\x20+\x20time_source\x20oracle),\x20not\x20a\x20per-order\x20entry+duration\x20lock?','Does\x20the\x20leader\x20template\x20fix\x20the\x20supplier\x27s\x20sub-service\x20address\x20in\x20the\x20ConsolidateBatch\x20guard\x20table\x20(b_submission\x20false,\x20Address)\x20so\x20the\x20procurement\x20graph\x20is\x20diligence-able\x20before\x20any\x20buyer\x20pays?','In\x20threshold\x20mode,\x20are\x20contribution\x20rows\x20ORDER-keyed\x20with\x20the\x20escrow-bound\x20aggregate\x20(per-row\x20min(row,\x20order.amount,\x20live\x20allocation.balance\x20—\x20v140\x20live\x20cap))\x20and\x20the\x20live-escrow\x20+\x20claimed_by-false\x20legs\x20—\x20the\x20three\x20CROWDFUNDING_*\x20blockers\x20armed?']},'capabilities_used':['permission.index_create','permission.role_assign','guard.validate_buy','guard.validate_wip_hash','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance','progress.named_operator','repository.data_write','arb.vote_weighted','contact.im_create'],'config_overrides':{'machine':{'wip_required':!![],'confirm_gate':!![],'refund_requires_approval':![]},'service':{'multi_recipient_allocation':!![]}},'expected_benefits':[{'metric':'Cutoff\x20fairness','expected_value':'1\x20clock','evidence':'one\x20absolute\x20shared\x20cutoff\x20per\x20batch\x20(time_lock_absolute),\x20never\x20per-order\x20entry+duration'},{'metric':'Unformed-batch\x20refund','expected_value':'automatic','evidence':'ThresholdMissed\x20/\x20AbandonTimeout\x20rails\x20refund\x20per-order\x20with\x20no\x20merchant\x20grace'},{'metric':'Procurement\x20diligence','expected_value':'pre-order','evidence':'the\x20supplier\x20sub-service\x20address\x20is\x20a\x20fixed\x20guard-table\x20promise\x20(leader\x20shape)'}],'risk_appetite':'conservative','risk_constraints':{'require_arbitration':!![],'require_compensation_fund':!![],'require_wip_evidence':!![],'other_constraints':['batch\x20cutoff\x20=\x20shared\x20ABSOLUTE\x20timestamp\x20via\x20pattern.time_lock_absolute\x20+\x20time_source_repository_oracle','threshold\x20mode\x20reuses\x20the\x20crowdfunding\x20construction\x20(ORDER-keyed\x20rows,\x20escrow-bound\x20aggregate,\x20CROWDFUNDING_*\x20blockers)','🔴\x20multi-level\x20commission\x20is\x20NOT\x20expressible\x20—\x20single-layer\x20rate\x20leg\x20to\x20the\x20platform\x20Entity\x20with\x20off-chain\x20pass-through,\x20disclosed','🔴\x20delay\x20compensation\x20pays\x20from\x20compensation_fund,\x20NEVER\x20the\x20buyer\x20escrow\x20(Order\x20binds\x20<=\x201\x20allocator);\x20fund\x20pre-locked\x203x\x20(B2)']},'applicable_conditions':{'business_scale':'small','min_daily_orders':0x1,'other_conditions':['Neighborhood\x20batch\x20buying\x20with\x20a\x20daily/periodic\x20cutoff','Pickup-point\x20fulfillment\x20(staffed\x20point\x20or\x20automated\x20locker)','Leader\x20consolidation\x20ahead\x20of\x20a\x20supplier\x20sub-order']},'similar_industries':['crowdfunding','delivery'],'novel_capabilities':['Shared\x20absolute\x20batch\x20cutoff\x20via\x20keeper-written\x20Repository\x20row\x20+\x20time-source\x20oracle','Supply-chain\x20suborder\x20commitment\x20in\x20the\x20guard\x20table\x20(pre-order\x20diligence)','point_type-conditional\x20pickup\x20topology\x20(staffed\x20leader\x20rail\x20vs\x20automated\x20locker)']},{'name':'general','display_name':'General','version':'v1','source':'builtin',...fetchTemplate('general'),'analyze':{'key_questions':['Which\x20trust\x20mechanisms\x20(arbitration,\x20compensation\x20fund,\x20WIP\x20evidence)\x20are\x20missing\x20here,\x20and\x20what\x20does\x20each\x20absence\x20cost\x20in\x20the\x20worst\x20case?','What\x20is\x20the\x20single\x20point\x20of\x20failure\x20—\x20who\x20can\x20unilaterally\x20take\x20funds\x20or\x20stall\x20the\x20workflow?']},'capabilities_used':['permission.index_create','machine.node_topology','treasury.owner_receive','allocation.distribute','service.publish','progress.advance'],'expected_benefits':[{'metric':'Flexibility','expected_value':'100%','evidence':'User\x20customizes\x20all\x20trust\x20mechanism\x20parameters'},{'metric':'Degraded\x20safety','expected_value':'usable','evidence':'Can\x20fall\x20back\x20to\x20general\x20at\x20any\x20time'}],'risk_appetite':'balanced','risk_constraints':{'require_arbitration':![],'require_compensation_fund':![],'require_wip_evidence':![]},'applicable_conditions':{'business_scale':'small','other_conditions':['Fallback\x20degraded\x20mode','Hybrid\x20scenarios\x20not\x20covered\x20by\x20other\x20industries']},'similar_industries':[],'novel_capabilities':[],'disabled_builtin_constraints':['require_arbitration','require_compensation_fund','require_wip_evidence']}];
@@ -1 +1 @@
1
- export const RECOVERY_RULES={'insufficient_balance':{'error_code':'insufficient_balance','strategy':'claim_faucet','max_attempts':0x3,'automation':'semi','detail':'1.\x20Testnet:\x20claim\x20WOW\x20from\x20the\x20faucet\x202.\x20Mainnet:\x20transfer\x20ETH/USDT/USDC/WBTC\x20via\x20the\x20ETH\x20mainnet\x20cross-chain\x20bridge\x20(query\x20active\x20EVM\x20account\x20→\x20top\x20up\x20from\x20external\x20wallet\x20→\x20confirm\x20→\x20cross-chain)\x203.\x20Point\x20the\x20user\x20to\x20the\x20live\x20airdrop\x20page\x20(https://wowok.net/airdrop.html)\x20for\x20the\x20current\x20round\x204.\x20Retry\x20original\x20operation.\x20NOTE:\x20this\x20rule\x20is\x20for\x20the\x20SIGNING\x20ACCOUNT\x27s\x20wallet/gas\x20only\x20—\x20an\x20on-chain\x20POOL\x20shortage\x20(reward/allocation)\x20classifies\x20as\x20pool_shortage,\x20never\x20here','user_prompt':'Insufficient\x20balance\x20for\x20gas\x20or\x20operation.\x20How\x20to\x20obtain\x20WOW\x20tokens:\x20(1)\x20Testnet\x20—\x20claim\x20WOW\x20from\x20the\x20faucet\x20(https://faucet.testnet.wowok.net);\x20all\x20merchant\x20and\x20order\x20testing\x20can\x20use\x20WOW\x20as\x20the\x20payment\x20token.\x20(2)\x20Mainnet\x20—\x20transfer\x20ETH\x20/\x20USDT\x20/\x20USDC\x20/\x20WBTC\x20via\x20the\x20ETH\x20mainnet\x20cross-chain\x20bridge:\x20first\x20query\x20the\x20active\x20EVM\x20account\x20(bridge_operation\x20query_active_evm_account,\x20auto-generated\x20on\x20first\x20use),\x20then\x20transfer\x20from\x20an\x20external\x20wallet\x20(e.g.\x20MetaMask)\x20to\x20that\x20address,\x20confirm\x20the\x20balance\x20arrived,\x20and\x20cross-chain\x20to\x20WOW\x20mainnet\x20(bridge_operation\x20cross_chain_evm_to_wow).\x20(3)\x20WOW\x20airdrop:\x20current\x20round\x20status,\x20pool\x20and\x20eligibility\x20are\x20published\x20live\x20at\x20https://wowok.net/airdrop.html\x20(referral:\x20https://wowok.net/refer.html)\x20—\x20open\x20that\x20page\x20rather\x20than\x20assuming\x20a\x20round\x20is\x20live\x20or\x20closed.\x20Query\x20wowok_buildin_info\x20with\x20info=\x27funding\x20guidance\x27\x20for\x20the\x20canonical\x20funding\x20guidance.'},'pool_shortage':{'error_code':'pool_shortage','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'An\x20on-chain\x20POOL\x20cannot\x20cover\x20the\x20operation\x20(the\x20reward\x20pool\x20aborts\x20with\x206,\x20'+'the\x20allocation\x20pool\x20with\x207)\x20—\x20a\x20pool\x20funding\x20problem,\x20NOT\x20the\x20caller\x27s\x20wallet;\x20a\x20faucet\x20claim\x20will\x20NOT\x20help\x20and\x20re-sending\x20the\x20rail\x20unchanged\x20changes\x20nothing.\x201.\x20Reward\x20pool:\x20the\x20reward\x20ISSUER\x20tops\x20it\x20up\x20with\x20reward\x20coin_add\x20(permission\x20153)\x20—\x20the\x20claim\x20key\x20slot\x20is\x20written\x20BEFORE\x20the\x20balance\x20assert\x20and\x20the\x20abort\x20rolls\x20it\x20back,\x20so\x20NOTHING\x20was\x20consumed;\x20the\x20identical\x20claim\x20succeeds\x20after\x20the\x20top-up\x20(mainnet-proven,\x20T14).\x202.\x20Allocation\x20pool:\x20the\x20payer\x20side\x20funds\x20the\x20order/allocation\x20first\x20(order\x20renew,\x20payment\x20create\x20into\x20the\x20allocation),\x20then\x20re-runs\x20the\x20rail;\x20if\x20the\x20pool\x20is\x20drained\x20because\x20the\x20rail\x20ALREADY\x20paid\x20(balance\x200,\x20once-slot\x20consumed),\x20verify\x20via\x20the\x20Payment\x20record\x20instead\x20of\x20retrying.\x203.\x20As\x20the\x20BUYER:\x20report\x20the\x20shortage\x20to\x20the\x20merchant\x20—\x20never\x20fund\x20a\x20pool\x20you\x20do\x20not\x20own','user_prompt':'The\x20on-chain\x20pool\x20backing\x20this\x20operation\x20is\x20short\x20of\x20funds.\x20The\x20pool\x27s\x20owner\x20must\x20top\x20it\x20up\x20(reward\x20coin_add\x20/\x20allocation\x20funding)\x20—\x20a\x20faucet\x20claim\x20will\x20not\x20help.\x20As\x20the\x20buyer,\x20ask\x20the\x20merchant\x20to\x20fund\x20the\x20pool.'},'stock_exhausted':{'error_code':'stock_exhausted','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'Merchant-side\x20inventory\x20shortfall\x20(on-chain\x20E_STOCK_NOT_ENOUGH)\x20—\x20NOT\x20a\x20buyer\x20balance\x20problem,\x20so\x20a\x20faucet\x20claim\x20will\x20NOT\x20help.\x201.\x20Reduce\x20the\x20purchase\x20quantity\x20to\x20the\x20item\x27s\x20remaining\x20stock\x202.\x20Pick\x20another\x20sale\x20item\x203.\x20Ask\x20the\x20merchant\x20to\x20restock,\x20then\x20retry','user_prompt':'The\x20sale\x20item\x27s\x20stock\x20is\x20exhausted\x20for\x20the\x20requested\x20quantity.\x20Reduce\x20the\x20quantity,\x20choose\x20another\x20item,\x20or\x20ask\x20the\x20merchant\x20to\x20restock.'},'allocation_empty':{'error_code':'allocation_empty','strategy':'stop','max_attempts':0x1,'automation':'semi','detail':'The\x20Allocation\x20distributed\x20zero\x20value:\x20its\x20pool\x20is\x20empty\x20(already\x20fully\x20distributed,\x20or\x20the\x20order\x20total\x20was\x20discounted/couponed\x20to\x20zero)\x20—\x20a\x20legitimate\x20outcome\x20for\x20zero-total\x20orders.\x201.\x20Do\x20NOT\x20retry\x20the\x20allocation;\x20it\x20cannot\x20change\x20this.\x202.\x20If\x20funds\x20WERE\x20expected:\x20check\x20whether\x20the\x20order\x27s\x20payments\x20actually\x20funded\x20this\x20Allocation\x20before\x20the\x20rail\x20ran\x20(upstream\x20funding\x20problem),\x20and\x20verify\x20the\x20Payment\x20record\x20—\x20on\x20a\x20RETRIED\x20submission\x20the\x20FIRST\x20attempt\x20may\x20have\x20already\x20landed\x20(a\x20zero\x20balance\x20is\x20exactly\x20what\x20a\x20completed\x20distribution\x20looks\x20like,\x20F-M10).\x203.\x20The\x20chain\x20checks\x20the\x20balance\x20BEFORE\x20guard\x20evaluation,\x20so\x20this\x20abort\x20is\x20NOT\x20evidence\x20about\x20a\x20guard\x27s\x20verdict\x20—\x20never\x20conclude\x20\x27guard\x20rejected\x27\x20from\x20it','user_prompt':'The\x20allocation\x20pool\x20holds\x20nothing\x20to\x20distribute\x20(zero\x20total\x20or\x20already\x20fully\x20paid\x20out).\x20Verify\x20the\x20Payment\x20record\x20before\x20re-running\x20anything;\x20if\x20a\x20payout\x20was\x20expected,\x20the\x20pool\x20needs\x20funding\x20first.'},'sale_suspended':{'error_code':'sale_suspended','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'The\x20merchant\x20suspended\x20this\x20sale\x20item\x20(Move\x20service:34\x20E_SALE_SUSPENDED).\x201.\x20Pick\x20another\x20(non-suspended)\x20item\x202.\x20Contact\x20the\x20merchant\x20to\x20resume\x20the\x20sale,\x20then\x20retry','user_prompt':'The\x20sale\x20item\x20is\x20suspended\x20by\x20the\x20merchant.\x20Please\x20choose\x20another\x20item\x20or\x20contact\x20the\x20merchant.'},'discount_invalid':{'error_code':'discount_invalid','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'The\x20discount\x20is\x20outside\x20its\x20[time_start,\x20time_end]\x20validity\x20window\x20(Move\x20service:35\x20E_DISCOUNT_TIME_INVALID).\x201.\x20Retry\x20without\x20the\x20discount\x202.\x20Ask\x20the\x20merchant\x20for\x20a\x20fresh\x20discount,\x20then\x20retry','user_prompt':'The\x20discount\x20is\x20not\x20valid\x20at\x20the\x20current\x20time\x20(outside\x20its\x20validity\x20window).\x20Buy\x20without\x20the\x20discount\x20or\x20ask\x20the\x20merchant\x20for\x20a\x20new\x20one.'},'rate_limit':{'error_code':'rate_limit','strategy':'retry','max_attempts':0x5,'automation':'full','detail':'Rate\x20limit\x20hit\x20(HTTP\x20429).\x20Exponential\x20backoff\x20retry:\x202s\x20/\x204s\x20/\x208s\x20/\x2016s\x20/\x2032s.\x20Avoid\x20parallel\x20calls\x20while\x20the\x20limit\x20window\x20is\x20active.'},'gas_exceeded':{'error_code':'gas_exceeded','strategy':'adjust_params','max_attempts':0x3,'automation':'semi','detail':'Gas\x20budget\x20exceeded.\x201.\x20Increase\x20the\x20gas_budget\x20parameter\x202.\x20Reduce\x20the\x20operation\x20size\x20(fewer\x20objects\x20per\x20transaction)\x203.\x20Retry\x20the\x20original\x20operation','user_prompt':'Gas\x20budget\x20exceeded.\x20Increase\x20the\x20gas\x20budget\x20or\x20reduce\x20the\x20operation\x20size,\x20then\x20retry.'},'insufficient_gas':{'error_code':'insufficient_gas','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'Gas\x20exhausted\x20—\x20the\x20transaction\x20failed\x20deterministically\x20and\x20did\x20NOT\x20commit\x20on-chain\x20(no\x20state\x20changed;\x20commit-state\x20verification\x20is\x20NOT\x20needed).\x201.\x20Raise\x20the\x20gas_budget\x20parameter\x20above\x20the\x20failed\x20transaction\x27s\x20gas_used\x202.\x20If\x20the\x20account\x20balance\x20cannot\x20cover\x20any\x20budget,\x20fund\x20the\x20signing\x20account\x20with\x20gas\x20tokens\x20first\x203.\x20Resubmit\x20as\x20a\x20FRESH\x20call\x20—\x20do\x20NOT\x20replay\x20the\x20same\x20transaction','user_prompt':'The\x20transaction\x20ran\x20out\x20of\x20gas\x20and\x20did\x20not\x20commit\x20on-chain.\x20Increase\x20the\x20gas\x20budget\x20(or\x20fund\x20the\x20account\x20with\x20gas)\x20and\x20submit\x20a\x20fresh\x20transaction\x20—\x20retrying\x20unchanged\x20will\x20fail\x20the\x20same\x20way.'},'bcs_error':{'error_code':'bcs_error','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'BCS\x20serialization/deserialization\x20error\x20—\x20a\x20parameter\x20does\x20not\x20match\x20the\x20expected\x20type/structure.\x201.\x20Query\x20the\x20operation\x20schema\x20(schema_query)\x202.\x20Fix\x20the\x20offending\x20parameter\x20type\x20(e.g.\x20BigInt\x20vs\x20number,\x20vector\x20element\x20type)\x203.\x20Retry','user_prompt':'A\x20parameter\x20failed\x20serialization.\x20Check\x20the\x20parameter\x20types\x20against\x20the\x20schema\x20and\x20retry.'},'signature_error':{'error_code':'signature_error','strategy':'switch_account','max_attempts':0x2,'automation':'semi','detail':'Signature\x20verification\x20failed.\x201.\x20Verify\x20the\x20account\x20is\x20not\x20suspended\x202.\x20Check\x20the\x20network\x20matches\x20the\x20account\x27s\x203.\x20Switch\x20to\x20a\x20healthy\x20account\x20and\x20retry','user_prompt':'Signature\x20verification\x20failed.\x20The\x20account\x20may\x20be\x20suspended\x20or\x20misconfigured.\x20Switch\x20accounts\x20or\x20check\x20the\x20configuration\x20and\x20retry.'},'config_error':{'error_code':'config_error','strategy':'escalate_human','max_attempts':0x1,'automation':'manual','detail':'Local\x20configuration\x20error\x20(network\x20not\x20specified,\x20persistent\x20storage\x20not\x20set).\x201.\x20Show\x20the\x20user\x20which\x20configuration\x20is\x20missing\x202.\x20Guide\x20the\x20user\x20through\x20the\x20account_operation/config\x20setup\x203.\x20Retry\x20after\x20the\x20user\x20fixes\x20it','user_prompt':'Local\x20configuration\x20is\x20incomplete.\x20Please\x20finish\x20the\x20account/network\x20setup\x20and\x20retry.'},'wip_verification_failed':{'error_code':'wip_verification_failed','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'WIP\x20file\x20not\x20publicly\x20reachable\x20/\x20hash\x20mismatch.\x201.\x20Upload\x20via\x20the\x20wip\x20storage\x20service\x20(wip_file\x20type=\x27upload\x27\x20—\x20official\x20free\x20store\x20or\x20storage=\x27custom\x27)\x202.\x20Or\x20deploy\x20to\x20a\x20public\x20URL\x20(GitHub\x20Pages\x20/\x20IPFS\x20/\x20own\x20site)\x203.\x20Update\x20the\x20sale\x27s\x20wip\x20URL\x204.\x20Re-run\x20the\x20operation','user_prompt':'The\x20WIP\x20file\x20could\x20not\x20be\x20verified\x20from\x20a\x20public\x20URL.\x20Upload\x20it\x20with\x20wip_file\x20type=\x27upload\x27\x20(official\x20free\x20store\x20or\x20your\x20own\x20service)\x20or\x20deploy\x20it\x20(GitHub\x20Pages\x20/\x20IPFS),\x20update\x20the\x20sale\x27s\x20WIP\x20URL,\x20and\x20retry.'},'wip_storage_unavailable':{'error_code':'wip_storage_unavailable','strategy':'retry','max_attempts':0x3,'automation':'full','detail':'Transient\x20wip\x20storage\x20transport\x20failure.\x201.\x20Retry\x20the\x20same\x20request\x20with\x20bounded\x20backoff\x202.\x20Large\x20WIP\x20files\x20are\x20network-sensitive:\x20compress\x20images\x20before\x20generate\x20(each\x20image\x20<=\x202MB,\x20total\x20<=\x2010MB)\x203.\x20Check\x20connectivity\x20to\x20the\x20storage\x20base\x20URL\x20if\x20retries\x20keep\x20failing','user_prompt':'The\x20wip\x20storage\x20request\x20failed\x20due\x20to\x20a\x20network\x20problem.\x20Retry\x20the\x20upload;\x20if\x20it\x20keeps\x20failing,\x20reduce\x20the\x20file\x20size\x20or\x20check\x20connectivity.'},'wip_storage_rejected':{'error_code':'wip_storage_rejected','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'WIP\x20storage\x20service\x20rejected\x20the\x20request\x20(HTTP\x204xx\x20—\x20deterministic\x20client-side\x20fault,\x20retrying\x20unchanged\x20fails\x20identically).\x20400:\x20malformed\x20body\x20or\x20failed\x20WIP\x20validation\x20—\x20re-generate\x20via\x20wip_file\x20type=\x27generate\x27\x20401:\x20re-sign\x20with\x20a\x20fresh\x20nonce\x20inside\x20the\x20timestamp\x20window\x20403:\x20check\x20storage\x20service\x20configuration\x20404:\x20file\x20does\x20not\x20exist\x20—\x20re-upload\x20409:\x20quota\x20—\x20delete\x20old\x20files\x20via\x20wip_file\x20type=\x27list\x27\x20then\x20delete\x20413:\x20compress\x20images\x20(each\x20<=\x202MB,\x20total\x20<=\x2010MB)\x20and\x20regenerate','user_prompt':'The\x20WIP\x20storage\x20service\x20rejected\x20the\x20request\x20(HTTP\x204xx).\x20Fix\x20the\x20specific\x20fault\x20(re-generate/re-sign/re-upload\x20per\x20the\x20status\x20code)\x20and\x20retry\x20—\x20do\x20not\x20retry\x20unchanged.'},'network_error':{'error_code':'network_error','strategy':'retry','max_attempts':0x5,'automation':'full','detail':'Transport\x20failure\x20(timeout\x20/\x20connection\x20reset\x20/\x20RPC\x20unreachable\x20/\x20HTTP\x205xx\x20gateway\x20error).\x20Exponential\x20backoff\x20retry:\x201s\x20/\x202s\x20/\x204s\x20/\x208s\x20/\x2016s.\x20Switch\x20RPC\x20node\x20if\x20available.\x20READS:\x20a\x20plain\x20retry\x20is\x20safe.\x20FUND-MOVING\x20WRITES:\x20before\x20any\x20resubmission,\x20verify\x20whether\x20the\x20previous\x20attempt\x20landed\x20(query\x20the\x20reported\x20digest\x20directly,\x20or\x20the\x20expected\x20object\x20via\x20the\x20sender\x27s\x20recent\x20on-chain\x20objects\x20/\x20onchain_events)\x20—\x20if\x20it\x20landed,\x20ADOPT\x20it\x20and\x20stop;\x20a\x20blind\x20backoff\x20retry\x20of\x20a\x20landed\x20write\x20moves\x20the\x20funds\x20a\x20second\x20time.'},'submission_unknown':{'error_code':'submission_unknown','strategy':'query_and_retry','max_attempts':0x2,'automation':'semi','detail':'Transport-level\x20failure\x20after\x20the\x20request\x20left\x20the\x20client\x20—\x20the\x20submission\x20state\x20is\x20UNKNOWN\x20and\x20the\x20transaction\x20may\x20already\x20be\x20committed.\x20NEVER\x20auto-retry\x20a\x20write\x20here.\x201.\x20Verify\x20commit\x20state\x20on-chain:\x20query_toolkit\x20for\x20the\x20object\x20this\x20call\x20would\x20create/modify\x20(resolve\x20the\x20reference\x20from\x20the\x20call\x27s\x20own\x20arguments),\x20or\x20onchain_events\x20for\x20the\x20sender\x27s\x20recent\x20transactions.\x202.\x20If\x20the\x20expected\x20object\x20EXISTS,\x20adopt\x20it\x20and\x20continue\x20the\x20workflow\x20(the\x20operation\x20succeeded\x20despite\x20the\x20transport\x20error).\x203.\x20If\x20confirmed\x20ABSENT,\x20resubmit\x20the\x20SAME\x20call\x20once\x20—\x20for\x20a\x20FIRST-EVER\x20transaction\x20on\x20a\x20fresh\x20account\x20make\x20that\x20resubmission\x20with\x20env.no_auto_register=true\x20and\x20SAY\x20SO\x20(the\x20SDK\x20silently\x20appends\x20an\x20entity\x20registration\x20to\x20a\x20first\x20business\x20call;\x20if\x20that\x20appended\x20leg\x20was\x20the\x20failing\x20leg\x20the\x20skip\x20lets\x20the\x20call\x20through\x20—\x20ziroom-mn-261013\x20live\x20case;\x20if\x20the\x20resubmission\x20aborts,\x20the\x20envelope\x20now\x20names\x20the\x20abort\x20—\x20re-enable\x20auto\x20registration\x20and\x20retry).\x204.\x20If\x20the\x20reported\x20digest\x20does\x20not\x20resolve\x20or\x20the\x20failure\x20repeats,\x20STOP\x20looping\x20on\x20digest\x20checks\x20and\x20re-run\x20the\x20SAME\x20call\x20with\x20env.dry_run=true\x20—\x20the\x20simulation\x20surfaces\x20the\x20real\x20failure\x20(exact\x20Move\x20abort)\x20without\x20gas\x20or\x20duplicate\x20risk.\x205.\x20Reads\x20are\x20idempotent\x20—\x20retry\x20immediately.\x206.\x20M-K2\x20replay\x20discipline:\x20a\x20FAILED\x20receipt\x20is\x20final\x20—\x20its\x20digest\x20is\x20consumed\x20and\x20replaying\x20the\x20same\x20bytes\x20returns\x20the\x20same\x20failure\x20forever;\x20fix\x20the\x20cause\x20(usually\x20funding)\x20and\x20build\x20a\x20FRESH\x20transaction.\x20Live\x20mainnet\x20incident\x20behind\x20this\x20rule:\x20an\x20order_new\x20-32603\x20\x27did\x20not\x20complete\x27\x20had\x20committed;\x20the\x20blind\x20retry\x20created\x20a\x20second\x20order\x20with\x20a\x20second\x20full\x20escrow\x20and\x20a\x20second\x20stock\x20decrement','user_prompt':'The\x20request\x20failed\x20at\x20transport\x20level\x20but\x20may\x20have\x20already\x20been\x20committed\x20on-chain.\x20Verify\x20whether\x20the\x20expected\x20object\x20exists\x20(query\x20it)\x20before\x20any\x20retry\x20—\x20a\x20blind\x20retry\x20can\x20duplicate\x20the\x20operation\x20(double\x20escrow).\x20For\x20read\x20operations,\x20a\x20plain\x20retry\x20is\x20safe.'},'transaction_expired':{'error_code':'transaction_expired','strategy':'retry','max_attempts':0x3,'automation':'full','detail':'The\x20transaction\x20expired\x20before\x20execution\x20(epoch\x20boundary\x20or\x20validator/gateway\x20outage)\x20—\x20it\x20did\x20NOT\x20land\x20and\x20nothing\x20was\x20committed.\x20Bounded\x20backoff\x20retry:\x2010s\x20/\x2030s\x20/\x2060s,\x20resubmit\x20the\x20SAME\x20call\x20unchanged.\x20If\x20a\x20dry_run\x20passes\x20while\x20the\x20real\x20call\x20keeps\x20failing,\x20the\x20fault\x20is\x20chain-side\x20—\x20wait\x20it\x20out.\x20Verify\x20with\x20onchain_events\x20if\x20unsure.'},'submission_too_large':{'error_code':'submission_too_large','strategy':'adjust_params','max_attempts':0x1,'automation':'manual','detail':'The\x20guard\x20submission\x27s\x20BCS\x20size\x20exceeded\x20MAX_SUBMISSION_SIZE=4096\x20(the\x20guard\x20submission-size\x20ceiling,\x20abort\x203;\x20v139\x20raised\x20it\x20from\x20256\x20so\x20a\x20100-address\x20roster\x20witness\x20fits)\x20—\x20the\x20whole\x20submission\x20struct,\x20not\x20the\x20guard-table\x20candidate\x20vector.\x201.\x20Move\x20roster/candidate\x20lists\x20OUT\x20of\x20the\x20witness:\x20sum_where/count_where\x20\x27ids\x27\x20accept\x20a\x20guard-table\x20VecAddress\x20entry\x20(cap\x20100\x20ids).\x202.\x20Keep\x20only\x20per-call\x20attestation\x20inline\x20—\x20a\x20100-address\x20roster\x20(100×32B\x20=\x203200B)\x20already\x20consumes\x20most\x20of\x20the\x20budget\x20once\x20the\x20protocol\x20slots\x20254/255\x20ride\x20along.\x203.\x20Split\x20the\x20verification\x20into\x20multiple\x20guards\x20if\x20more\x20inline\x20evidence\x20is\x20unavoidable.\x204.\x20Resubmit\x20with\x20the\x20shrunken\x20submission.','user_prompt':'The\x20guard\x20submission\x20is\x20too\x20large\x20for\x20the\x20protocol\x27s\x204096-byte\x20witness\x20ceiling.\x20Roster-style\x20candidate\x20lists\x20(up\x20to\x20100)\x20belong\x20in\x20the\x20guard-table\x20id\x20vector;\x20the\x20inline\x20witness\x20should\x20carry\x20only\x20per-call\x20attestation.\x20Slim\x20the\x20submission\x20and\x20retry.'},'guard_rejected':{'error_code':'guard_rejected','strategy':'fill_submission','max_attempts':0x2,'automation':'semi','detail':'1.\x20Parse\x20Guard\x20table\x20structure\x202.\x20If\x20the\x20Guard\x20defines\x20submission\x20items,\x20fill\x20them\x20and\x20resubmit\x20with\x20call_with_submission\x203.\x20If\x20it\x20defines\x20none,\x20the\x20rule\x20evaluated\x20false\x20—\x20typical\x20causes:\x20a\x20TIME\x20WINDOW\x20(Clock\x20deadline/opening\x20comparison\x20—\x20this\x20call\x20may\x20sit\x20outside\x20the\x20window,\x20and\x20a\x20mis-oriented\x20comparison\x20inverts\x20it:\x20everything\x20inside\x20rejected,\x20everything\x20after\x20admitted),\x20an\x20IDENTITY\x20condition\x20(signer/state\x20checks\x20—\x20the\x20caller\x20may\x20not\x20be\x20the\x20address\x20the\x20rule\x20expects),\x20or\x20a\x20DATA-DEPENDENCY\x20ORDERING\x20(R-03,\x20nnd-tn-261025:\x20the\x20rule\x20reads\x20a\x20repository\x20row\x20/\x20workflow\x20state\x20that\x20does\x20not\x20hold\x20yet\x20—\x20e.g.\x20a\x20repository\x20data_add\x20whose\x20policy\x20write_guard\x20checks\x20progress.current\x20is\x20only\x20admitted\x20AFTER\x20the\x20machine\x20reaches\x20the\x20granting\x20node,\x20while\x20that\x20node\x27s\x20forward\x20may\x20read\x20this\x20very\x20row;\x20the\x20fix\x20is\x20ORDER,\x20not\x20parameters\x20—\x20find\x20the\x20reading\x20node\x20via\x20the\x20machine\x20node\x20table\x20(onchain_table_data)\x20or\x20analyze_guard_semantics,\x20advance\x20there\x20first,\x20then\x20re-run\x20the\x20SAME\x20write);\x20adjust\x20the\x20call\x27s\x20parameters\x20or\x20change\x20the\x20Guard\x20(docs#40)\x204.\x20When\x20the\x20failure\x20is\x20passport\x20E_VERIFY_FAILED\x20and\x20a\x20submission\x20was\x20supplied,\x20the\x20response\x20appends\x20a\x20\x27Guard\x20diagnosis\x20(dry-run)\x27\x20line\x20naming\x20the\x20first\x20failing\x20impact\x20guard\x20—\x20fix\x20that\x20guard\x20first\x205.\x20A\x20TIME-window\x20rejection\x20may\x20simply\x20be\x20EARLY:\x20re-run\x20the\x20SAME\x20call\x20with\x20env.dry_run=true\x20to\x20probe\x20the\x20window\x20for\x20free\x20(guard\x20rejections\x20do\x20NOT\x20consume\x20the\x20total\x20retry\x20budget;\x20only\x20the\x20per-code\x20cap\x20of\x202\x20applies)','user_prompt':'Guard\x20verification\x20rejected.\x20If\x20the\x20Guard\x20defines\x20submission\x20items,\x20fill\x20in\x20the\x20required\x20submission\x20data\x20and\x20resubmit;\x20if\x20it\x20defines\x20none,\x20the\x20Guard\x20rule\x20evaluated\x20false\x20—\x20the\x20usual\x20causes\x20are\x20a\x20time\x20window\x20(this\x20call\x20may\x20be\x20outside\x20the\x20Clock\x20deadline/opening\x20window),\x20an\x20identity\x20condition\x20(the\x20caller\x20is\x20not\x20the\x20address\x20the\x20rule\x20expects),\x20or\x20a\x20data-dependency\x20ordering\x20(the\x20rule\x20reads\x20a\x20row\x20/\x20workflow\x20state\x20that\x20does\x20not\x20hold\x20yet\x20—\x20advance\x20the\x20workflow\x20to\x20the\x20granting\x20node\x20first,\x20then\x20re-run\x20the\x20same\x20write);\x20adjust\x20this\x20call\x27s\x20parameters\x20or\x20change\x20the\x20Guard\x20rule.\x20When\x20the\x20response\x20includes\x20a\x20\x27Guard\x20diagnosis\x20(dry-run)\x27\x20line,\x20it\x20names\x20the\x20first\x20failing\x20impact\x20guard\x20—\x20address\x20that\x20guard\x20first.\x20A\x20time-window\x20rejection\x20may\x20simply\x20be\x20early:\x20probe\x20the\x20window\x20with\x20env.dry_run=true\x20(free\x20—\x20guard\x20rejections\x20do\x20not\x20consume\x20the\x20total\x20retry\x20budget).'},'time_lock_not_elapsed':{'error_code':'time_lock_not_elapsed','strategy':'wait_and_retry','max_attempts':0x1,'automation':'semi','detail':'1.\x20Verify\x20Service\x20is\x20paused\x20(bPaused=true).\x20If\x20not,\x20submit\x20pause=true\x20first.\x202.\x20Wait\x20until\x20paused_time\x20+\x20setting_lock_duration\x20<=\x20current\x20clock.\x203.\x20Retry\x20the\x20original\x20operation.\x20Do\x20NOT\x20recreate\x20the\x20object.','user_prompt':'Service\x20setting_lock_duration\x20has\x20not\x20elapsed\x20since\x20the\x20Service\x20was\x20paused.\x20Please\x20pause\x20the\x20Service\x20if\x20it\x20is\x20not\x20already\x20paused,\x20wait\x20for\x20the\x20lock\x20duration\x20to\x20elapse,\x20then\x20retry.'},'immutable_violation':{'error_code':'immutable_violation','strategy':'recreate','max_attempts':0x1,'automation':'semi','detail':'1.\x20Stop\x20modification\x20attempt\x202.\x20Evaluate\x20creating\x20a\x20new\x20object\x20as\x20replacement\x203.\x20Re-plan\x20affected\x20phases','user_prompt':'Cannot\x20modify\x20an\x20immutable\x20object.\x20A\x20new\x20object\x20must\x20be\x20created\x20as\x20a\x20replacement.\x20Confirm\x20to\x20proceed\x20with\x20recreation.'},'permission_denied':{'error_code':'permission_denied','strategy':'switch_account','max_attempts':0x2,'automation':'semi','detail':'1.\x20Query\x20object\x27s\x20permission_guard\x202.\x20List\x20accounts\x20with\x20permission\x203.\x20Switch\x20account\x20or\x20prompt\x20user\x20to\x20add\x20permission','user_prompt':'Current\x20account\x20lacks\x20permission\x20for\x20this\x20operation.\x20Switch\x20to\x20an\x20authorized\x20account\x20or\x20update\x20the\x20Permission\x20object.'},'object_not_found':{'error_code':'object_not_found','strategy':'query_and_retry','max_attempts':0x3,'automation':'semi','detail':'1.\x20Verify\x20the\x20referenced\x20name/ID\x20spelling\x20(local_mark_list)\x20and\x20that\x20the\x20object\x20exists\x20on\x20the\x20current\x20network\x202.\x20If\x20recently\x20created,\x20re-query\x20the\x20object\x20(may\x20be\x20sync\x20delay)\x203.\x20If\x20truly\x20absent,\x20search\x20for\x20similar\x20objects\x204.\x20Prompt\x20user\x20to\x20reselect','user_prompt':'Referenced\x20object\x20not\x20found.\x20First\x20verify\x20the\x20name/ID\x20spelling\x20and\x20that\x20the\x20object\x20exists\x20on\x20the\x20current\x20network;\x20if\x20it\x20was\x20created\x20recently,\x20this\x20may\x20be\x20a\x20synchronization\x20delay\x20—\x20retry.\x20If\x20the\x20issue\x20persists,\x20please\x20select\x20a\x20valid\x20object.'},'state_conflict':{'error_code':'state_conflict','strategy':'adjust_params','max_attempts':0x2,'automation':'full','detail':'1.\x20Query\x20object\x27s\x20current\x20true\x20state\x202.\x20Update\x20ODG\x20status\x20annotations\x203.\x20Adjust\x20subsequent\x20operations\x20(e.g.,\x20skip\x20completed\x20steps)'},'invalid_parameter':{'error_code':'invalid_parameter','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'1.\x20Query\x20the\x20relevant\x20schema\x202.\x20Auto-fix\x20obvious\x20errors\x20(e.g.,\x20BigInt\x20vs\x20string)\x203.\x20If\x20unfixable,\x20prompt\x20user','user_prompt':'Parameter\x20validation\x20failed.\x20Please\x20check\x20the\x20parameter\x20types\x20and\x20values\x20against\x20the\x20schema\x20and\x20retry.'},'move_abort_unmapped':{'error_code':'move_abort_unmapped','strategy':'stop','max_attempts':0x1,'automation':'manual','detail':'The\x20chain\x27s\x20business\x20logic\x20aborted\x20and\x20the\x20(module,\x20abort\x20code)\x20pair\x20has\x20no\x20local\x20mapping.\x20Read\x20the\x20module\x20and\x20abort\x20code\x20from\x20move_abort_info\x20/\x20the\x20message\x20(rendered\x20as\x20\x27abort\x20(N)\x27),\x20resolve\x20their\x20meaning\x20from\x20the\x20module\x27s\x20documentation\x20or\x20the\x20wowok-tools\x20Skill,\x20fix\x20the\x20business\x20cause,\x20and\x20issue\x20a\x20NEW\x20call.\x20Do\x20NOT\x20restart\x20the\x20server\x20and\x20do\x20NOT\x20retry\x20the\x20identical\x20call\x20—\x20it\x20aborts\x20deterministically.','user_prompt':'The\x20operation\x20was\x20rejected\x20by\x20the\x20chain\x27s\x20business\x20logic\x20and\x20its\x20abort\x20code\x20is\x20not\x20mapped\x20locally.\x20The\x20module\x20name\x20and\x20abort\x20code\x20in\x20the\x20error\x20are\x20authoritative\x20—\x20review\x20them\x20(and\x20the\x20object\x20state\x20via\x20query_toolkit)\x20before\x20adjusting\x20anything.'},'missing_data':{'error_code':'missing_data','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'A\x20guard\x20rule\x20read\x20a\x20keyed\x20table\x20row\x20that\x20does\x20NOT\x20exist\x20(repository.data\x20/\x20oracle\x20entry)\x20and\x20the\x20verifier\x20surfaced\x20it\x20as\x20a\x20location-only\x20fault\x20inside\x20the\x20passport\x20module\x20—\x20no\x20abort\x20code,\x20because\x20the\x20framework\x20cannot\x20express\x20\x27row\x20absent\x27\x20as\x20an\x20abort.\x20This\x20is\x20a\x20DATA\x20problem:\x201.\x20Identify\x20the\x20repository\x20and\x20key\x20the\x20guard\x20rule\x20reads\x20(guard2file\x20/\x20analyze_guard_semantics\x20on\x20the\x20guard\x20source)\x202.\x20Have\x20the\x20row\x27s\x20producer\x20write\x20it\x20(e.g.\x20an\x20oracle\x20timestamp\x20like\x20checkin_ts),\x20or\x20add\x20it\x20with\x20repository\x20data_add\x20(data_add.name\x20must\x20match\x20a\x20policy\x20rule\x20name)\x203.\x20Retry\x20the\x20SAME\x20call\x20unchanged\x20—\x20a\x20dry_run\x20that\x20turns\x20clean\x20after\x20the\x20row\x20exists\x20confirms\x20the\x20diagnosis.\x20OR-BRANCH\x20NOTE\x20(alg26\x20261026\x20F-A26-13):\x20a\x20guard\x27s\x20OR\x20does\x20NOT\x20short-circuit\x20—\x20every\x20branch\x20is\x20evaluated,\x20so\x20a\x20row\x20read\x20by\x20ANY\x20branch\x20must\x20exist\x20even\x20when\x20the\x20taken\x20path\x20would\x20not\x20read\x20it;\x20seed\x20initial\x20rows\x20(e.g.\x20a\x20counter\x20at\x200)\x20for\x20every\x20OR\x20branch\x20before\x20first\x20use','user_prompt':'A\x20guard\x20rule\x20references\x20a\x20data\x20row\x20that\x20has\x20not\x20been\x20written\x20yet\x20(location-only\x20fault\x20inside\x20the\x20passport\x20module\x20—\x20NOT\x20a\x20network\x20problem).\x20Identify\x20the\x20repository\x20row\x20the\x20guard\x20expects\x20(guard2file\x20/\x20analyze_guard_semantics),\x20write\x20it\x20with\x20repository\x20data_add\x20(or\x20let\x20its\x20producer\x20write\x20it),\x20then\x20retry.'},'guard_data_missing':{'error_code':'guard_data_missing','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'A\x20guard\x20rule\x20read\x20DATA\x20that\x20does\x20not\x20exist\x20—\x20a\x20keyed\x20(id,key)\x20repository/oracle\x20row\x20or\x20a\x20field\x20of\x20an\x20object\x20the\x20guard\x20references\x20—\x20and\x20the\x20passport\x20guard\x20verifier\x20panicked\x20at\x20execution\x20time\x20with\x20NO\x20abort\x20code.\x20This\x20is\x20a\x20GUARD-DATA\x20problem,\x20NOT\x20an\x20environment\x20fault\x20(do\x20not\x20restart\x20the\x20server,\x20do\x20not\x20look\x20for\x20a\x20routing\x20cause).\x201.\x20Export\x20the\x20guard\x20(guard2file\x20/\x20analyze_guard_semantics)\x20and\x20list\x20every\x20row/field\x20it\x20reads,\x20including\x20OR\x20branches\x20(an\x20OR\x20does\x20not\x20short-circuit\x20—\x20every\x20branch\x27s\x20row\x20must\x20exist).\x202.\x20Seed\x20the\x20missing\x20(id,key)\x20row\x20with\x20repository\x20data_add\x20(data_add.name\x20must\x20match\x20a\x20policy\x20rule\x20name),\x20or\x20point\x20the\x20guard\x20at\x20a\x20row/object\x20that\x20already\x20exists\x20—\x20a\x20history-time\x20anchor\x20(query_progress_history_time\x20id\x201280,\x20next_node,\x20find=last)\x20must\x20name\x20a\x20node\x20present\x20on\x20this\x20order\x27s\x20path/period.\x203.\x20Retry\x20the\x20SAME\x20call\x20unchanged;\x20a\x20dry_run\x20that\x20turns\x20clean\x20confirms\x20the\x20diagnosis.','user_prompt':'A\x20guard\x20reads\x20repository\x20data\x20that\x20has\x20not\x20been\x20written\x20yet\x20(not\x20a\x20network\x20or\x20server\x20problem).\x20Identify\x20the\x20(id,key)\x20row\x20the\x20guard\x20expects,\x20write\x20it\x20with\x20repository\x20data_add\x20or\x20use\x20an\x20existing\x20row,\x20then\x20retry.'},'state_not_visible':{'error_code':'state_not_visible','strategy':'wait_and_retry','max_attempts':0x3,'automation':'full','detail':'The\x20state\x20this\x20call\x20needs\x20was\x20JUST\x20written\x20and\x20is\x20not\x20yet\x20visible\x20to\x20reads\x20(write-to-visibility\x20window),\x20or\x20it\x20does\x20not\x20exist\x20at\x20all.\x201.\x20If\x20a\x20write\x20on\x20this\x20order/machine\x20committed\x20within\x20the\x20last\x20few\x20seconds,\x20wait\x20500ms\x20(doubling\x20each\x20attempt)\x20and\x20replay\x20the\x20SAME\x20call\x20UNCHANGED\x20—\x20NEVER\x20edit\x20parameters\x20to\x20\x27fix\x27\x20a\x20visibility\x20window;\x20an\x20aborted\x20call\x20never\x20landed,\x20so\x20the\x20replay\x20cannot\x20double-spend.\x202.\x20If\x20the\x20fault\x20persists\x20past\x20~3\x20attempts\x20(or\x20nothing\x20was\x20just\x20written),\x20the\x20state\x20is\x20deterministically\x20ABSENT\x20—\x20stop\x20retrying:\x20for\x20a\x20forward-info\x20miss\x20query\x20the\x20Machine\x27s\x20node\x20table\x20(onchain_table_data\x20onchain_table_item_machine_node)\x20and\x20use\x20an\x20existing\x20node/next_node/forward\x20triple\x20—\x20on\x20an\x20already-built\x20machine\x20check\x20TOPOLOGY\x20first\x20(alg26\x20261026\x20F-A26-14):\x20the\x20forward\x20may\x20simply\x20not\x20be\x20an\x20out-edge\x20of\x20the\x20order\x27s\x20CURRENT\x20node,\x20which\x20no\x20retry\x20can\x20fix;\x20for\x20a\x20guard-read\x20repository\x20row\x20follow\x20the\x20missing_data\x20path\x20(write\x20the\x20row).','user_prompt':'A\x20just-committed\x20write\x20is\x20not\x20visible\x20to\x20this\x20read\x20yet.\x20The\x20same\x20call\x20will\x20be\x20replayed\x20after\x20a\x20short\x20wait\x20—\x20no\x20parameter\x20change\x20is\x20needed.\x20If\x20it\x20keeps\x20failing,\x20the\x20required\x20state\x20is\x20genuinely\x20missing\x20and\x20must\x20be\x20created\x20first.'},'unreachable_transition':{'error_code':'unreachable_transition','strategy':'query_and_retry','max_attempts':0x1,'automation':'full','detail':'The\x20requested\x20forward\x20name\x20does\x20not\x20exist\x20on\x20the\x20(prev_node,\x20node)\x20pair\x20at\x20the\x20order\x27s\x20current\x20node\x20(on-chain\x20E_FORWARD_NOT_AT_NODE)\x20—\x20the\x20transition\x20is\x20not\x20in\x20the\x20Machine\x20graph.\x20Deterministic:\x20no\x20account\x20switch,\x20retry\x20or\x20gas\x20change\x20can\x20create\x20a\x20missing\x20edge,\x20and\x20a\x20published\x20Machine\x20is\x20immutable\x20(IMMUT-001).\x201.\x20Read\x20the\x20order\x27s\x20current\x20progress\x20node\x20(order\x20progress\x20with\x20convert_witness=\x27OrderProgress\x27).\x202.\x20Query\x20the\x20Machine\x20node\x20table\x20(onchain_table_item_machine_node)\x20and\x20list\x20the\x20pair\x27s\x20ACTUAL\x20forwards.\x203.\x20Re-issue\x20the\x20operation\x20with\x20an\x20existing\x20forward\x20name\x20that\x20leads\x20toward\x20the\x20goal.\x204.\x20If\x20no\x20existing\x20edge\x20reaches\x20the\x20intended\x20state\x20on\x20a\x20published\x20Machine,\x20the\x20path\x20is\x20impossible\x20—\x20redesign\x20requires\x20a\x20NEW\x20Machine\x20version\x20(pre-publish:\x20fix\x20the\x20graph\x20and\x20republish).','user_prompt':'The\x20requested\x20machine\x20transition\x20does\x20not\x20exist\x20at\x20the\x20order\x27s\x20current\x20node\x20—\x20retrying\x20or\x20switching\x20accounts\x20cannot\x20help.\x20The\x20available\x20forwards\x20must\x20be\x20read\x20from\x20the\x20machine\x27s\x20node\x20table\x20and\x20an\x20existing\x20one\x20used\x20instead;\x20if\x20none\x20fits,\x20the\x20machine\x20graph\x20itself\x20must\x20be\x20changed\x20before\x20publish.'},'forward_not_at_node':{'error_code':'forward_not_at_node','strategy':'query_and_retry','max_attempts':0x1,'automation':'full','detail':'The\x20order\x27s\x20CURRENT\x20Progress\x20node\x20carries\x20no\x20forward\x20with\x20the\x20requested\x20name\x20(on-chain\x20E_INFO_NOT_FOUND\x20=\x2013)\x20—\x20the\x20forward\x20is\x20not\x20an\x20out-edge\x20of\x20the\x20node\x20the\x20order\x20stands\x20on.\x20Deterministic\x20topology\x20mismatch:\x20retrying\x20the\x20same\x20triple,\x20waiting\x20or\x20switching\x20accounts\x20cannot\x20create\x20the\x20edge.\x201.\x20Read\x20the\x20order\x27s\x20CURRENT\x20node\x20(order\x20progress\x20with\x20convert_witness=\x27OrderProgress\x27).\x202.\x20Query\x20the\x20Machine\x20node\x20table\x20(onchain_table_item_machine_node)\x20and\x20list\x20the\x20pair\x27s\x20ACTUAL\x20forwards\x20at\x20that\x20node.\x203.\x20Re-issue\x20with\x20one\x20of\x20those\x20forward\x20names,\x20or\x20first\x20advance\x20through\x20the\x20intermediate\x20node\x20that\x20carries\x20the\x20intended\x20edge.\x204.\x20Always\x20surface\x20current_node\x20+\x20available_forwards,\x20never\x20the\x20same\x20triple\x20again.\x20Distinct\x20from\x20unreachable_transition\x20(machine:25)\x20where\x20the\x20pair\x20exists\x20at\x20this\x20node\x20and\x20only\x20the\x20name\x20is\x20missing.','user_prompt':'The\x20order\x20is\x20standing\x20on\x20a\x20node\x20that\x20has\x20no\x20such\x20forward.\x20The\x20current\x20node\x20and\x20its\x20actual\x20forward\x20names\x20must\x20be\x20read\x20from\x20the\x20machine\x20node\x20table\x20and\x20an\x20edge\x20sourced\x20there\x20used\x20instead\x20(or\x20the\x20order\x20advanced\x20to\x20the\x20right\x20node\x20first).\x20Retrying\x20cannot\x20help.'},'anchor_unavailable':{'error_code':'anchor_unavailable','strategy':'escalate_human','max_attempts':0x1,'automation':'manual','detail':'The\x20messenger\x20WTS\x20evidence\x20chain\x20is\x20unavailable:\x20the\x20server\x20key-book\x20anchor\x20could\x20not\x20be\x20confirmed\x20on\x20the\x20current\x20network\x20(signer\x20not\x20pinned\x20for\x20this\x20network,\x20anchor\x20repository\x20absent\x20on-chain\x20—\x20typical\x20after\x20a\x20chain\x20re-genesis\x20—\x20or\x20the\x20anchor\x20chain\x20read\x20failed).\x20This\x20is\x20an\x20INFRASTRUCTURE\x20configuration\x20gap,\x20NOT\x20a\x20guard\x20rejection,\x20a\x20network\x20fault,\x20or\x20a\x20parameter\x20problem\x20—\x20signing\x20and\x20anchoring\x20fail\x20closed\x20by\x20design\x20(an\x20unconfirmed\x20key\x20book\x20cannot\x20ground\x20evidence).\x20Remedy\x20(out\x20of\x20band,\x20no\x20retry\x20will\x20help):\x201.\x20Deploy\x20or\x20re-anchor\x20the\x20messenger\x20server\x20key\x20book\x20on\x20the\x20target\x20network\x202.\x20Pin\x20its\x20signer\x20for\x20that\x20network\x20in\x20the\x20SDK\x20keybook\x20table\x203.\x20Until\x20then,\x20treat\x20the\x20messenger\x20channel\x20as\x20private\x20communication\x20WITHOUT\x20third-party\x20provability\x20(verify_wts\x20still\x20returns\x20a\x20structured\x20valid:false\x20verdict\x20with\x20the\x20anchor\x20reason)','user_prompt':'The\x20WTS\x20evidence\x20chain\x20cannot\x20be\x20anchored\x20on\x20this\x20network:\x20the\x20messenger\x20server\x20key-book\x20anchor\x20is\x20missing\x20or\x20unconfirmed.\x20This\x20needs\x20an\x20out-of-band\x20keybook\x20deployment\x20plus\x20SDK\x20signer\x20pinning\x20for\x20the\x20network\x20—\x20retrying\x20the\x20call\x20will\x20fail\x20the\x20same\x20way.\x20Until\x20fixed,\x20messenger\x20communication\x20remains\x20private\x20but\x20cannot\x20be\x20turned\x20into\x20third-party-verifiable\x20evidence.'},'capability_unavailable':{'error_code':'capability_unavailable','strategy':'stop','max_attempts':0x1,'automation':'manual','detail':'The\x20connected\x20chain\x20package\x20does\x20not\x20carry\x20this\x20protocol\x20entry,\x20so\x20the\x20call\x20is\x20impossible\x20on\x20this\x20package\x20version.\x20Deterministic\x20—\x20retrying,\x20re-signing\x20or\x20editing\x20parameters\x20cannot\x20add\x20the\x20missing\x20entry.\x20Remedy\x20(no\x20retry\x20involved):\x201.\x20Apply\x20the\x20documented\x20downgrade\x20for\x20the\x20intent\x20(for\x20a\x20reward\x20evidence\x20pin:\x20drop\x20the\x20evidence\x20binding\x20and\x20keep\x20the\x20repository-floor\x20guard\x20leg,\x20disclosing\x20that\x20it\x20proves\x20only\x20\x27a\x20qualifying\x20repository\x20row\x20exists\x20for\x20this\x20order\x27\x20—\x20not\x20who\x20wrote\x20it)\x202.\x20Check\x20the\x20target\x20network\x27s\x20package\x20release\x20notes\x20for\x20the\x20version\x20that\x20ships\x20the\x20entry\x20before\x20re-enabling\x20it\x203.\x20Never\x20treat\x20the\x20missing\x20entry\x20name\x20as\x20a\x20fixable\x20parameter','user_prompt':'This\x20call\x20needs\x20a\x20chain\x20capability\x20the\x20connected\x20package\x20does\x20not\x20have\x20yet.\x20It\x20cannot\x20succeed\x20on\x20this\x20network\x20version\x20—\x20no\x20retry\x20or\x20parameter\x20change\x20will\x20help.\x20The\x20documented\x20downgrade\x20keeps\x20the\x20goal\x20achievable\x20with\x20a\x20weaker\x20guarantee\x20that\x20must\x20be\x20disclosed\x20(for\x20a\x20review\x20bounty:\x20the\x20repository-floor\x20leg\x20proves\x20a\x20qualifying\x20rating\x20row\x20exists\x20for\x20the\x20order,\x20not\x20that\x20the\x20buyer\x20wrote\x20a\x20real\x20review).'},'delivery_unknown':{'error_code':'delivery_unknown','strategy':'query_and_retry','max_attempts':0x1,'automation':'semi','detail':'The\x20messenger\x20send\x20failed\x20at\x20transport\x20level\x20AFTER\x20submission:\x20delivery\x20state\x20is\x20UNKNOWN\x20because\x20the\x20relay\x20may\x20have\x20already\x20committed\x20the\x20message\x20despite\x20the\x20client-side\x20failure.\x20A\x20blind\x20re-send\x20DOUBLE-DELIVERS\x20the\x20same\x20encrypted\x20payload,\x20so\x20the\x20retry\x20loop\x20is\x20verify-first:\x20read\x20the\x20conversation\x20(watch_conversations\x20/\x20message\x20list)\x20and\x20check\x20for\x20the\x20identical\x20payload;\x20re-send\x20only\x20after\x20confirming\x20it\x20never\x20arrived.\x20Note\x20the\x20message,\x20when\x20it\x20did\x20arrive,\x20is\x20fully\x20end-to-end\x20encrypted\x20—\x20only\x20delivery\x20is\x20uncertain','user_prompt':'The\x20send\x20failed\x20after\x20submission,\x20so\x20delivery\x20is\x20uncertain\x20(the\x20server\x20may\x20have\x20committed\x20it\x20anyway).\x20Do\x20NOT\x20resend\x20blindly:\x20first\x20check\x20the\x20conversation\x20for\x20the\x20same\x20message;\x20resend\x20only\x20if\x20it\x20never\x20arrived.'},'transport_unavailable':{'error_code':'transport_unavailable','strategy':'retry','max_attempts':0x3,'automation':'full','detail':'A\x20transport-level\x20object\x20FETCH\x20failed\x20(\x27Fetch\x20<Type>\x20object\x200x...\x20failed\x27)\x20—\x20a\x20READ-path\x20availability\x20problem\x20(fullnode/gateway),\x20NOT\x20a\x20guard\x20rejection\x20and\x20NOT\x20an\x20on-chain\x20abort.\x201.\x20READ\x20calls\x20are\x20idempotent:\x20retry\x20after\x20a\x20brief\x20backoff,\x20or\x20against\x20a\x20healthy\x20endpoint.\x202.\x20If\x20this\x20error\x20surfaced\x20on\x20a\x20WRITE\x20call,\x20the\x20write\x27s\x20submission\x20state\x20is\x20UNKNOWN\x20—\x20do\x20NOT\x20blindly\x20resend;\x20first\x20query\x20the\x20expected\x20object\x20on-chain\x20and\x20adopt\x20or\x20resubmit\x20per\x20the\x20submission_unknown\x20discipline\x20(ghost-order\x20hazard).\x203.\x20Never\x20re-interpret\x20this\x20as\x20a\x20guard\x20failure:\x20no\x20guard\x20was\x20evaluated,\x20nothing\x20reached\x20Move.\x204.\x20Persistent\x20failures\x20across\x20endpoints\x20→\x20check\x20network/fullnode\x20health\x20before\x20touching\x20business\x20logic'},'peer_not_registered':{'error_code':'peer_not_registered','strategy':'stop','max_attempts':0x1,'automation':'manual','detail':'The\x20message\x20RECIPIENT\x20is\x20not\x20registered\x20on\x20the\x20messenger\x20server\x20for\x20this\x20network\x20—\x20the\x20relay\x20has\x20no\x20keybook\x20entry\x20for\x20their\x20address,\x20so\x20delivery\x20is\x20impossible\x20until\x20THEY\x20enable\x20messenger.\x20Deterministic\x20recipient-side\x20gap:\x20retrying,\x20re-signing\x20or\x20switching\x20the\x20sender\x27s\x20account\x20cannot\x20fix\x20it.\x201.\x20Verify\x20the\x20recipient\x20address\x20spelling\x20and\x20that\x20both\x20sides\x20are\x20on\x20the\x20SAME\x20network\x20(a\x20foreign-network\x20address\x20reads\x20as\x20unregistered).\x202.\x20Ask\x20the\x20recipient\x20to\x20enable\x20messenger\x20once\x20from\x20their\x20own\x20account\x20(account_operation\x20with\x20messenger\x20registration)\x20on\x20this\x20network.\x203.\x20Re-send\x20AFTER\x20their\x20registration\x20—\x20until\x20then\x20the\x20thread\x20stays\x20undeliverable,\x20not\x20lost\x20(history\x20survives\x20on\x20the\x20sender\x27s\x20side).','user_prompt':'The\x20recipient\x20has\x20not\x20enabled\x20the\x20messenger\x20yet,\x20so\x20the\x20message\x20cannot\x20be\x20delivered.\x20Ask\x20them\x20to\x20enable\x20messenger\x20on\x20this\x20network\x20first,\x20then\x20re-send.\x20Retrying\x20on\x20your\x20side\x20will\x20not\x20help.'},'unknown':{'error_code':'unknown','strategy':'escalate_human','max_attempts':0x1,'automation':'manual','detail':'1.\x20Report\x20full\x20error\x20context\x20to\x20the\x20user\x202.\x20Escalate\x20to\x20human\x20intervention\x203.\x20Flag\x20for\x20error-classification\x20rule\x20addition','user_prompt':'An\x20unclassified\x20error\x20occurred.\x20Please\x20review\x20the\x20error\x20details\x20and\x20contact\x20support\x20if\x20needed.'}};const operationAttempts=new Map();function getAttemptCount(a,b){const c=operationAttempts['get'](a);if(!c)return 0x0;return c['get'](b)??0x0;}function incrementAttempt(a,b){!operationAttempts['has'](a)&&operationAttempts['set'](a,new Map());const c=operationAttempts['get'](a),d=(c['get'](b)??0x0)+0x1;return c['set'](b,d),d;}const BUDGET_EXEMPT_CODES=new Set(['guard_rejected']);function getBudgetAttempts(a){const b=operationAttempts['get'](a);if(!b)return 0x0;let c=0x0;for(const [d,e]of b){if(!BUDGET_EXEMPT_CODES['has'](d))c+=e;}return c;}export function resetAttempts(a){operationAttempts['delete'](a);}export function recover(a,b,c){const d=RECOVERY_RULES[a]??RECOVERY_RULES['unknown'],e=0x5,f=getBudgetAttempts(b),g=getAttemptCount(b,a);if(d['max_attempts']<=0x1||d['strategy']==='stop')return{'strategy':d['strategy'],'should_retry':![],'max_attempts':d['max_attempts'],'current_attempt':g,'adjusted_params':d['adjusted_params'],'user_prompt':d['user_prompt'],'detail':d['detail']};if(f>=e)return{'strategy':'stop','should_retry':![],'max_attempts':e,'current_attempt':f,'detail':'Total\x20retry\x20limit\x20('+e+')\x20reached\x20for\x20operation\x20'+b+'.\x20Escalating\x20to\x20human\x20intervention.\x20Attempts\x20recorded\x20for\x20this\x20operation\x20id:\x20'+([...(operationAttempts['get'](b)??new Map())['entries']()]['map'](([j,k])=>j+':'+k)['join'](',\x20')||'none')+'.','user_prompt':'Maximum\x20retry\x20attempts\x20reached.\x20Manual\x20intervention\x20required.'};if(g>=d['max_attempts'])return{'strategy':'escalate_human','should_retry':![],'max_attempts':d['max_attempts'],'current_attempt':g,'detail':'Per-error-code\x20retry\x20limit\x20('+d['max_attempts']+')\x20reached\x20for\x20'+a+'.\x20Escalating\x20to\x20human.','user_prompt':'Recovery\x20attempts\x20for\x20'+a+'\x20exhausted.\x20Manual\x20intervention\x20required.'};const h=incrementAttempt(b,a),i={'strategy':d['strategy'],'should_retry':d['automation']==='full'||h<d['max_attempts'],'max_attempts':d['max_attempts'],'current_attempt':h,'adjusted_params':d['adjusted_params'],'user_prompt':d['user_prompt'],'detail':d['detail']};return i['should_retry']&&c?.['retryable']===![]&&a!=='guard_rejected'&&d['strategy']!=='fill_submission'&&d['strategy']!=='query_and_retry'&&(i['should_retry']=![],i['detail']+='\x20NON-RETRYABLE\x20CLASSIFICATION:\x20retrying\x20the\x20IDENTICAL\x20call\x20fails\x20identically\x20—\x20apply\x20the\x20strategy\x20above\x20to\x20fix\x20the\x20cause,\x20then\x20submit\x20a\x20FRESH\x20call.'),i;}export function getBackoffDelay(a){return Math['pow'](0x2,a-0x1)*0x3e8;}
1
+ export const RECOVERY_RULES={'insufficient_balance':{'error_code':'insufficient_balance','strategy':'claim_faucet','max_attempts':0x3,'automation':'semi','detail':'1.\x20Testnet:\x20claim\x20WOW\x20from\x20the\x20faucet\x20—\x20the\x20payout\x20itself\x20needs\x20NO\x20gas\x20on\x20the\x20claiming\x20account\x20(the\x20faucet\x20server\x20transfers\x20the\x20coins),\x20so\x20a\x20zero-gas\x20account\x20claims\x20FIRST\x20and\x20transacts\x20AFTER;\x20if\x20the\x20account\x20already\x20holds\x20WOW\x20but\x20every\x20op\x20still\x20fails\x20on\x20gas\x20(fragmented\x20payout\x20coins\x20below\x20the\x20gas\x20reserve),\x20claim\x20AGAIN\x20—\x20each\x20payout\x20lands\x20fresh\x201-WOW\x20coins\x20that\x20serve\x20as\x20valid\x20gas\x20inputs\x20(the\x20silent\x20merge\x20failure\x20leaves\x20usable\x20coins).\x202.\x20Mainnet:\x20transfer\x20ETH/USDT/USDC/WBTC\x20via\x20the\x20ETH\x20mainnet\x20cross-chain\x20bridge\x20(query\x20active\x20EVM\x20account\x20→\x20top\x20up\x20from\x20external\x20wallet\x20→\x20confirm\x20→\x20cross-chain)\x203.\x20Point\x20the\x20user\x20to\x20the\x20live\x20airdrop\x20page\x20(https://wowok.net/airdrop.html)\x20for\x20the\x20current\x20round\x204.\x20Retry\x20original\x20operation.\x20NOTE:\x20this\x20rule\x20is\x20for\x20the\x20SIGNING\x20ACCOUNT\x27s\x20wallet/gas\x20only\x20—\x20an\x20on-chain\x20POOL\x20shortage\x20(reward/allocation)\x20classifies\x20as\x20pool_shortage,\x20never\x20here','user_prompt':'Insufficient\x20balance\x20for\x20gas\x20or\x20operation.\x20How\x20to\x20obtain\x20WOW\x20tokens:\x20(1)\x20Testnet\x20—\x20claim\x20WOW\x20from\x20the\x20faucet\x20(https://faucet.testnet.wowok.net);\x20the\x20claim\x20itself\x20costs\x20no\x20gas\x20(server-side\x20payout),\x20so\x20claim\x20first\x20even\x20on\x20an\x20account\x20that\x20cannot\x20transact\x20yet;\x20if\x20the\x20account\x20still\x20cannot\x20pay\x20gas\x20after\x20a\x20claim,\x20claim\x20again\x20(fresh\x20whole-coin\x20payouts\x20provide\x20valid\x20gas\x20coins).\x20All\x20merchant\x20and\x20order\x20testing\x20can\x20use\x20WOW\x20as\x20the\x20payment\x20token.\x20(2)\x20Mainnet\x20—\x20transfer\x20ETH\x20/\x20USDT\x20/\x20USDC\x20/\x20WBTC\x20via\x20the\x20ETH\x20mainnet\x20cross-chain\x20bridge:\x20first\x20query\x20the\x20active\x20EVM\x20account\x20(bridge_operation\x20query_active_evm_account,\x20auto-generated\x20on\x20first\x20use),\x20then\x20transfer\x20from\x20an\x20external\x20wallet\x20(e.g.\x20MetaMask)\x20to\x20that\x20address,\x20confirm\x20the\x20balance\x20arrived,\x20and\x20cross-chain\x20to\x20WOW\x20mainnet\x20(bridge_operation\x20cross_chain_evm_to_wow).\x20(3)\x20WOW\x20airdrop:\x20current\x20round\x20status,\x20pool\x20and\x20eligibility\x20are\x20published\x20live\x20at\x20https://wowok.net/airdrop.html\x20(referral:\x20https://wowok.net/refer.html)\x20—\x20open\x20that\x20page\x20rather\x20than\x20assuming\x20a\x20round\x20is\x20live\x20or\x20closed.\x20Query\x20wowok_buildin_info\x20with\x20info=\x27funding\x20guidance\x27\x20for\x20the\x20canonical\x20funding\x20guidance.'},'pool_shortage':{'error_code':'pool_shortage','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'An\x20on-chain\x20POOL\x20cannot\x20cover\x20the\x20operation\x20(the\x20reward\x20pool\x20aborts\x20with\x206,\x20'+'the\x20allocation\x20pool\x20with\x207)\x20—\x20a\x20pool\x20funding\x20problem,\x20NOT\x20the\x20caller\x27s\x20wallet;\x20a\x20faucet\x20claim\x20will\x20NOT\x20help\x20and\x20re-sending\x20the\x20rail\x20unchanged\x20changes\x20nothing.\x201.\x20Reward\x20pool:\x20the\x20reward\x20ISSUER\x20tops\x20it\x20up\x20with\x20reward\x20coin_add\x20(permission\x20153)\x20—\x20the\x20claim\x20key\x20slot\x20is\x20written\x20BEFORE\x20the\x20balance\x20assert\x20and\x20the\x20abort\x20rolls\x20it\x20back,\x20so\x20NOTHING\x20was\x20consumed;\x20the\x20identical\x20claim\x20succeeds\x20after\x20the\x20top-up\x20(mainnet-proven,\x20T14).\x202.\x20Allocation\x20pool:\x20the\x20payer\x20side\x20funds\x20the\x20order/allocation\x20first\x20(order\x20renew,\x20payment\x20create\x20into\x20the\x20allocation),\x20then\x20re-runs\x20the\x20rail;\x20if\x20the\x20pool\x20is\x20drained\x20because\x20the\x20rail\x20ALREADY\x20paid\x20(balance\x200,\x20once-slot\x20consumed),\x20verify\x20via\x20the\x20Payment\x20record\x20instead\x20of\x20retrying.\x203.\x20As\x20the\x20BUYER:\x20report\x20the\x20shortage\x20to\x20the\x20merchant\x20—\x20never\x20fund\x20a\x20pool\x20you\x20do\x20not\x20own','user_prompt':'The\x20on-chain\x20pool\x20backing\x20this\x20operation\x20is\x20short\x20of\x20funds.\x20The\x20pool\x27s\x20owner\x20must\x20top\x20it\x20up\x20(reward\x20coin_add\x20/\x20allocation\x20funding)\x20—\x20a\x20faucet\x20claim\x20will\x20not\x20help.\x20As\x20the\x20buyer,\x20ask\x20the\x20merchant\x20to\x20fund\x20the\x20pool.'},'stock_exhausted':{'error_code':'stock_exhausted','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'Merchant-side\x20inventory\x20shortfall\x20(on-chain\x20E_STOCK_NOT_ENOUGH)\x20—\x20NOT\x20a\x20buyer\x20balance\x20problem,\x20so\x20a\x20faucet\x20claim\x20will\x20NOT\x20help.\x201.\x20Reduce\x20the\x20purchase\x20quantity\x20to\x20the\x20item\x27s\x20remaining\x20stock\x202.\x20Pick\x20another\x20sale\x20item\x203.\x20Ask\x20the\x20merchant\x20to\x20restock,\x20then\x20retry','user_prompt':'The\x20sale\x20item\x27s\x20stock\x20is\x20exhausted\x20for\x20the\x20requested\x20quantity.\x20Reduce\x20the\x20quantity,\x20choose\x20another\x20item,\x20or\x20ask\x20the\x20merchant\x20to\x20restock.'},'allocation_empty':{'error_code':'allocation_empty','strategy':'stop','max_attempts':0x1,'automation':'semi','detail':'The\x20Allocation\x20distributed\x20zero\x20value:\x20its\x20pool\x20is\x20empty\x20(already\x20fully\x20distributed,\x20or\x20the\x20order\x20total\x20was\x20discounted/couponed\x20to\x20zero)\x20—\x20a\x20legitimate\x20outcome\x20for\x20zero-total\x20orders.\x201.\x20Do\x20NOT\x20retry\x20the\x20allocation;\x20it\x20cannot\x20change\x20this.\x202.\x20If\x20funds\x20WERE\x20expected:\x20check\x20whether\x20the\x20order\x27s\x20payments\x20actually\x20funded\x20this\x20Allocation\x20before\x20the\x20rail\x20ran\x20(upstream\x20funding\x20problem),\x20and\x20verify\x20the\x20Payment\x20record\x20—\x20on\x20a\x20RETRIED\x20submission\x20the\x20FIRST\x20attempt\x20may\x20have\x20already\x20landed\x20(a\x20zero\x20balance\x20is\x20exactly\x20what\x20a\x20completed\x20distribution\x20looks\x20like,\x20F-M10).\x203.\x20The\x20chain\x20checks\x20the\x20balance\x20BEFORE\x20guard\x20evaluation,\x20so\x20this\x20abort\x20is\x20NOT\x20evidence\x20about\x20a\x20guard\x27s\x20verdict\x20—\x20never\x20conclude\x20\x27guard\x20rejected\x27\x20from\x20it','user_prompt':'The\x20allocation\x20pool\x20holds\x20nothing\x20to\x20distribute\x20(zero\x20total\x20or\x20already\x20fully\x20paid\x20out).\x20Verify\x20the\x20Payment\x20record\x20before\x20re-running\x20anything;\x20if\x20a\x20payout\x20was\x20expected,\x20the\x20pool\x20needs\x20funding\x20first.'},'sale_suspended':{'error_code':'sale_suspended','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'The\x20merchant\x20suspended\x20this\x20sale\x20item\x20(Move\x20service:34\x20E_SALE_SUSPENDED).\x201.\x20Pick\x20another\x20(non-suspended)\x20item\x202.\x20Contact\x20the\x20merchant\x20to\x20resume\x20the\x20sale,\x20then\x20retry','user_prompt':'The\x20sale\x20item\x20is\x20suspended\x20by\x20the\x20merchant.\x20Please\x20choose\x20another\x20item\x20or\x20contact\x20the\x20merchant.'},'discount_invalid':{'error_code':'discount_invalid','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'The\x20discount\x20is\x20outside\x20its\x20[time_start,\x20time_end]\x20validity\x20window\x20(Move\x20service:35\x20E_DISCOUNT_TIME_INVALID).\x201.\x20Retry\x20without\x20the\x20discount\x202.\x20Ask\x20the\x20merchant\x20for\x20a\x20fresh\x20discount,\x20then\x20retry','user_prompt':'The\x20discount\x20is\x20not\x20valid\x20at\x20the\x20current\x20time\x20(outside\x20its\x20validity\x20window).\x20Buy\x20without\x20the\x20discount\x20or\x20ask\x20the\x20merchant\x20for\x20a\x20new\x20one.'},'rate_limit':{'error_code':'rate_limit','strategy':'retry','max_attempts':0x5,'automation':'full','detail':'Rate\x20limit\x20hit\x20(HTTP\x20429).\x20Exponential\x20backoff\x20retry:\x202s\x20/\x204s\x20/\x208s\x20/\x2016s\x20/\x2032s.\x20Avoid\x20parallel\x20calls\x20while\x20the\x20limit\x20window\x20is\x20active.'},'gas_exceeded':{'error_code':'gas_exceeded','strategy':'adjust_params','max_attempts':0x3,'automation':'semi','detail':'Gas\x20budget\x20exceeded.\x201.\x20Increase\x20the\x20gas_budget\x20parameter\x202.\x20Reduce\x20the\x20operation\x20size\x20(fewer\x20objects\x20per\x20transaction)\x203.\x20Retry\x20the\x20original\x20operation','user_prompt':'Gas\x20budget\x20exceeded.\x20Increase\x20the\x20gas\x20budget\x20or\x20reduce\x20the\x20operation\x20size,\x20then\x20retry.'},'insufficient_gas':{'error_code':'insufficient_gas','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'Gas\x20exhausted\x20—\x20the\x20transaction\x20failed\x20deterministically\x20and\x20did\x20NOT\x20commit\x20on-chain\x20(no\x20state\x20changed;\x20commit-state\x20verification\x20is\x20NOT\x20needed).\x201.\x20Raise\x20the\x20gas_budget\x20parameter\x20above\x20the\x20failed\x20transaction\x27s\x20gas_used\x202.\x20If\x20the\x20account\x20balance\x20cannot\x20cover\x20any\x20budget,\x20fund\x20the\x20signing\x20account\x20with\x20gas\x20tokens\x20first\x203.\x20Resubmit\x20as\x20a\x20FRESH\x20call\x20—\x20do\x20NOT\x20replay\x20the\x20same\x20transaction','user_prompt':'The\x20transaction\x20ran\x20out\x20of\x20gas\x20and\x20did\x20not\x20commit\x20on-chain.\x20Increase\x20the\x20gas\x20budget\x20(or\x20fund\x20the\x20account\x20with\x20gas)\x20and\x20submit\x20a\x20fresh\x20transaction\x20—\x20retrying\x20unchanged\x20will\x20fail\x20the\x20same\x20way.'},'bcs_error':{'error_code':'bcs_error','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'BCS\x20serialization/deserialization\x20error\x20—\x20a\x20parameter\x20does\x20not\x20match\x20the\x20expected\x20type/structure.\x201.\x20Query\x20the\x20operation\x20schema\x20(schema_query)\x202.\x20Fix\x20the\x20offending\x20parameter\x20type\x20(e.g.\x20BigInt\x20vs\x20number,\x20vector\x20element\x20type)\x203.\x20Retry','user_prompt':'A\x20parameter\x20failed\x20serialization.\x20Check\x20the\x20parameter\x20types\x20against\x20the\x20schema\x20and\x20retry.'},'signature_error':{'error_code':'signature_error','strategy':'switch_account','max_attempts':0x2,'automation':'semi','detail':'Signature\x20verification\x20failed.\x201.\x20Verify\x20the\x20account\x20is\x20not\x20suspended\x202.\x20Check\x20the\x20network\x20matches\x20the\x20account\x27s\x203.\x20Switch\x20to\x20a\x20healthy\x20account\x20and\x20retry','user_prompt':'Signature\x20verification\x20failed.\x20The\x20account\x20may\x20be\x20suspended\x20or\x20misconfigured.\x20Switch\x20accounts\x20or\x20check\x20the\x20configuration\x20and\x20retry.'},'config_error':{'error_code':'config_error','strategy':'escalate_human','max_attempts':0x1,'automation':'manual','detail':'Local\x20configuration\x20error\x20(network\x20not\x20specified,\x20persistent\x20storage\x20not\x20set).\x201.\x20Show\x20the\x20user\x20which\x20configuration\x20is\x20missing\x202.\x20Guide\x20the\x20user\x20through\x20the\x20account_operation/config\x20setup\x203.\x20Retry\x20after\x20the\x20user\x20fixes\x20it','user_prompt':'Local\x20configuration\x20is\x20incomplete.\x20Please\x20finish\x20the\x20account/network\x20setup\x20and\x20retry.'},'wip_verification_failed':{'error_code':'wip_verification_failed','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'WIP\x20file\x20not\x20publicly\x20reachable\x20/\x20hash\x20mismatch.\x201.\x20Upload\x20via\x20the\x20wip\x20storage\x20service\x20(wip_file\x20type=\x27upload\x27\x20—\x20official\x20free\x20store\x20or\x20storage=\x27custom\x27)\x202.\x20Or\x20deploy\x20to\x20a\x20public\x20URL\x20(GitHub\x20Pages\x20/\x20IPFS\x20/\x20own\x20site)\x203.\x20Update\x20the\x20sale\x27s\x20wip\x20URL\x204.\x20Re-run\x20the\x20operation','user_prompt':'The\x20WIP\x20file\x20could\x20not\x20be\x20verified\x20from\x20a\x20public\x20URL.\x20Upload\x20it\x20with\x20wip_file\x20type=\x27upload\x27\x20(official\x20free\x20store\x20or\x20your\x20own\x20service)\x20or\x20deploy\x20it\x20(GitHub\x20Pages\x20/\x20IPFS),\x20update\x20the\x20sale\x27s\x20WIP\x20URL,\x20and\x20retry.'},'wip_storage_unavailable':{'error_code':'wip_storage_unavailable','strategy':'retry','max_attempts':0x3,'automation':'full','detail':'Transient\x20wip\x20storage\x20transport\x20failure.\x201.\x20Retry\x20the\x20same\x20request\x20with\x20bounded\x20backoff\x202.\x20Large\x20WIP\x20files\x20are\x20network-sensitive:\x20compress\x20images\x20before\x20generate\x20(each\x20image\x20<=\x202MB,\x20total\x20<=\x2010MB)\x203.\x20Check\x20connectivity\x20to\x20the\x20storage\x20base\x20URL\x20if\x20retries\x20keep\x20failing','user_prompt':'The\x20wip\x20storage\x20request\x20failed\x20due\x20to\x20a\x20network\x20problem.\x20Retry\x20the\x20upload;\x20if\x20it\x20keeps\x20failing,\x20reduce\x20the\x20file\x20size\x20or\x20check\x20connectivity.'},'wip_storage_rejected':{'error_code':'wip_storage_rejected','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'WIP\x20storage\x20service\x20rejected\x20the\x20request\x20(HTTP\x204xx\x20—\x20deterministic\x20client-side\x20fault,\x20retrying\x20unchanged\x20fails\x20identically).\x20400:\x20malformed\x20body\x20or\x20failed\x20WIP\x20validation\x20—\x20re-generate\x20via\x20wip_file\x20type=\x27generate\x27\x20401:\x20re-sign\x20with\x20a\x20fresh\x20nonce\x20inside\x20the\x20timestamp\x20window\x20403:\x20check\x20storage\x20service\x20configuration\x20404:\x20file\x20does\x20not\x20exist\x20—\x20re-upload\x20409:\x20quota\x20—\x20delete\x20old\x20files\x20via\x20wip_file\x20type=\x27list\x27\x20then\x20delete\x20413:\x20compress\x20images\x20(each\x20<=\x202MB,\x20total\x20<=\x2010MB)\x20and\x20regenerate','user_prompt':'The\x20WIP\x20storage\x20service\x20rejected\x20the\x20request\x20(HTTP\x204xx).\x20Fix\x20the\x20specific\x20fault\x20(re-generate/re-sign/re-upload\x20per\x20the\x20status\x20code)\x20and\x20retry\x20—\x20do\x20not\x20retry\x20unchanged.'},'network_error':{'error_code':'network_error','strategy':'retry','max_attempts':0x5,'automation':'full','detail':'Transport\x20failure\x20(timeout\x20/\x20connection\x20reset\x20/\x20RPC\x20unreachable\x20/\x20HTTP\x205xx\x20gateway\x20error).\x20Exponential\x20backoff\x20retry:\x201s\x20/\x202s\x20/\x204s\x20/\x208s\x20/\x2016s.\x20Switch\x20RPC\x20node\x20if\x20available.\x20READS:\x20a\x20plain\x20retry\x20is\x20safe.\x20FUND-MOVING\x20WRITES:\x20before\x20any\x20resubmission,\x20verify\x20whether\x20the\x20previous\x20attempt\x20landed\x20(query\x20the\x20reported\x20digest\x20directly,\x20or\x20the\x20expected\x20object\x20via\x20the\x20sender\x27s\x20recent\x20on-chain\x20objects\x20/\x20onchain_events)\x20—\x20if\x20it\x20landed,\x20ADOPT\x20it\x20and\x20stop;\x20a\x20blind\x20backoff\x20retry\x20of\x20a\x20landed\x20write\x20moves\x20the\x20funds\x20a\x20second\x20time.'},'submission_unknown':{'error_code':'submission_unknown','strategy':'query_and_retry','max_attempts':0x2,'automation':'semi','detail':'Transport-level\x20failure\x20after\x20the\x20request\x20left\x20the\x20client\x20—\x20the\x20submission\x20state\x20is\x20UNKNOWN\x20and\x20the\x20transaction\x20may\x20already\x20be\x20committed.\x20NEVER\x20auto-retry\x20a\x20write\x20here.\x201.\x20Verify\x20commit\x20state\x20on-chain:\x20query_toolkit\x20for\x20the\x20object\x20this\x20call\x20would\x20create/modify\x20(resolve\x20the\x20reference\x20from\x20the\x20call\x27s\x20own\x20arguments),\x20or\x20onchain_events\x20for\x20the\x20sender\x27s\x20recent\x20transactions.\x202.\x20If\x20the\x20expected\x20object\x20EXISTS,\x20adopt\x20it\x20and\x20continue\x20the\x20workflow\x20(the\x20operation\x20succeeded\x20despite\x20the\x20transport\x20error).\x203.\x20If\x20confirmed\x20ABSENT,\x20resubmit\x20the\x20SAME\x20call\x20once\x20—\x20for\x20a\x20FIRST-EVER\x20transaction\x20on\x20a\x20fresh\x20account\x20make\x20that\x20resubmission\x20with\x20env.no_auto_register=true\x20and\x20SAY\x20SO\x20(the\x20SDK\x20silently\x20appends\x20an\x20entity\x20registration\x20to\x20a\x20first\x20business\x20call;\x20if\x20that\x20appended\x20leg\x20was\x20the\x20failing\x20leg\x20the\x20skip\x20lets\x20the\x20call\x20through\x20—\x20ziroom-mn-261013\x20live\x20case;\x20if\x20the\x20resubmission\x20aborts,\x20the\x20envelope\x20now\x20names\x20the\x20abort\x20—\x20re-enable\x20auto\x20registration\x20and\x20retry).\x204.\x20If\x20the\x20reported\x20digest\x20does\x20not\x20resolve\x20or\x20the\x20failure\x20repeats,\x20STOP\x20looping\x20on\x20digest\x20checks\x20and\x20re-run\x20the\x20SAME\x20call\x20with\x20env.dry_run=true\x20—\x20the\x20simulation\x20surfaces\x20the\x20real\x20failure\x20(exact\x20Move\x20abort)\x20without\x20gas\x20or\x20duplicate\x20risk.\x205.\x20Reads\x20are\x20idempotent\x20—\x20retry\x20immediately.\x206.\x20M-K2\x20replay\x20discipline:\x20a\x20FAILED\x20receipt\x20is\x20final\x20—\x20its\x20digest\x20is\x20consumed\x20and\x20replaying\x20the\x20same\x20bytes\x20returns\x20the\x20same\x20failure\x20forever;\x20fix\x20the\x20cause\x20(usually\x20funding)\x20and\x20build\x20a\x20FRESH\x20transaction.\x20Live\x20mainnet\x20incident\x20behind\x20this\x20rule:\x20an\x20order_new\x20-32603\x20\x27did\x20not\x20complete\x27\x20had\x20committed;\x20the\x20blind\x20retry\x20created\x20a\x20second\x20order\x20with\x20a\x20second\x20full\x20escrow\x20and\x20a\x20second\x20stock\x20decrement','user_prompt':'The\x20request\x20failed\x20at\x20transport\x20level\x20but\x20may\x20have\x20already\x20been\x20committed\x20on-chain.\x20Verify\x20whether\x20the\x20expected\x20object\x20exists\x20(query\x20it)\x20before\x20any\x20retry\x20—\x20a\x20blind\x20retry\x20can\x20duplicate\x20the\x20operation\x20(double\x20escrow).\x20For\x20read\x20operations,\x20a\x20plain\x20retry\x20is\x20safe.'},'transaction_expired':{'error_code':'transaction_expired','strategy':'retry','max_attempts':0x3,'automation':'full','detail':'The\x20transaction\x20expired\x20before\x20execution\x20(epoch\x20boundary\x20or\x20validator/gateway\x20outage)\x20—\x20it\x20did\x20NOT\x20land\x20and\x20nothing\x20was\x20committed.\x20Bounded\x20backoff\x20retry:\x2010s\x20/\x2030s\x20/\x2060s,\x20resubmit\x20the\x20SAME\x20call\x20unchanged.\x20If\x20a\x20dry_run\x20passes\x20while\x20the\x20real\x20call\x20keeps\x20failing,\x20the\x20fault\x20is\x20chain-side\x20—\x20wait\x20it\x20out.\x20Verify\x20with\x20onchain_events\x20if\x20unsure.'},'submission_too_large':{'error_code':'submission_too_large','strategy':'adjust_params','max_attempts':0x1,'automation':'manual','detail':'The\x20guard\x20submission\x27s\x20BCS\x20size\x20exceeded\x20MAX_SUBMISSION_SIZE=4096\x20(the\x20guard\x20submission-size\x20ceiling,\x20abort\x203;\x20v140\x20raised\x20it\x20from\x20256\x20so\x20a\x20100-address\x20roster\x20witness\x20fits)\x20—\x20the\x20whole\x20submission\x20struct,\x20not\x20the\x20guard-table\x20candidate\x20vector.\x201.\x20Move\x20roster/candidate\x20lists\x20OUT\x20of\x20the\x20witness:\x20sum_where/count_where\x20\x27ids\x27\x20accept\x20a\x20guard-table\x20VecAddress\x20entry\x20(cap\x20100\x20ids).\x202.\x20Keep\x20only\x20per-call\x20attestation\x20inline\x20—\x20a\x20100-address\x20roster\x20(100×32B\x20=\x203200B)\x20already\x20consumes\x20most\x20of\x20the\x20budget\x20once\x20the\x20protocol\x20slots\x20254/255\x20ride\x20along.\x203.\x20Split\x20the\x20verification\x20into\x20multiple\x20guards\x20if\x20more\x20inline\x20evidence\x20is\x20unavoidable.\x204.\x20Resubmit\x20with\x20the\x20shrunken\x20submission.','user_prompt':'The\x20guard\x20submission\x20is\x20too\x20large\x20for\x20the\x20protocol\x27s\x204096-byte\x20witness\x20ceiling.\x20Roster-style\x20candidate\x20lists\x20(up\x20to\x20100)\x20belong\x20in\x20the\x20guard-table\x20id\x20vector;\x20the\x20inline\x20witness\x20should\x20carry\x20only\x20per-call\x20attestation.\x20Slim\x20the\x20submission\x20and\x20retry.'},'guard_rejected':{'error_code':'guard_rejected','strategy':'fill_submission','max_attempts':0x2,'automation':'semi','detail':'1.\x20Parse\x20Guard\x20table\x20structure\x202.\x20If\x20the\x20Guard\x20defines\x20submission\x20items,\x20fill\x20them\x20and\x20resubmit\x20with\x20call_with_submission\x203.\x20If\x20it\x20defines\x20none,\x20the\x20rule\x20evaluated\x20false\x20—\x20typical\x20causes:\x20a\x20TIME\x20WINDOW\x20(Clock\x20deadline/opening\x20comparison\x20—\x20this\x20call\x20may\x20sit\x20outside\x20the\x20window,\x20and\x20a\x20mis-oriented\x20comparison\x20inverts\x20it:\x20everything\x20inside\x20rejected,\x20everything\x20after\x20admitted),\x20an\x20IDENTITY\x20condition\x20(signer/state\x20checks\x20—\x20the\x20caller\x20may\x20not\x20be\x20the\x20address\x20the\x20rule\x20expects),\x20or\x20a\x20DATA-DEPENDENCY\x20ORDERING\x20(R-03,\x20nnd-tn-261025:\x20the\x20rule\x20reads\x20a\x20repository\x20row\x20/\x20workflow\x20state\x20that\x20does\x20not\x20hold\x20yet\x20—\x20e.g.\x20a\x20repository\x20data_add\x20whose\x20policy\x20write_guard\x20checks\x20progress.current\x20is\x20only\x20admitted\x20AFTER\x20the\x20machine\x20reaches\x20the\x20granting\x20node,\x20while\x20that\x20node\x27s\x20forward\x20may\x20read\x20this\x20very\x20row;\x20the\x20fix\x20is\x20ORDER,\x20not\x20parameters\x20—\x20find\x20the\x20reading\x20node\x20via\x20the\x20machine\x20node\x20table\x20(onchain_table_data)\x20or\x20analyze_guard_semantics,\x20advance\x20there\x20first,\x20then\x20re-run\x20the\x20SAME\x20write);\x20adjust\x20the\x20call\x27s\x20parameters\x20or\x20change\x20the\x20Guard\x20(docs#40)\x204.\x20When\x20the\x20failure\x20is\x20passport\x20E_VERIFY_FAILED\x20and\x20a\x20submission\x20was\x20supplied,\x20the\x20response\x20appends\x20a\x20\x27Guard\x20diagnosis\x20(dry-run)\x27\x20line\x20naming\x20the\x20first\x20failing\x20impact\x20guard\x20—\x20fix\x20that\x20guard\x20first\x205.\x20A\x20TIME-window\x20rejection\x20may\x20simply\x20be\x20EARLY:\x20re-run\x20the\x20SAME\x20call\x20with\x20env.dry_run=true\x20to\x20probe\x20the\x20window\x20for\x20free\x20(guard\x20rejections\x20do\x20NOT\x20consume\x20the\x20total\x20retry\x20budget;\x20only\x20the\x20per-code\x20cap\x20of\x202\x20applies)','user_prompt':'Guard\x20verification\x20rejected.\x20If\x20the\x20Guard\x20defines\x20submission\x20items,\x20fill\x20in\x20the\x20required\x20submission\x20data\x20and\x20resubmit;\x20if\x20it\x20defines\x20none,\x20the\x20Guard\x20rule\x20evaluated\x20false\x20—\x20the\x20usual\x20causes\x20are\x20a\x20time\x20window\x20(this\x20call\x20may\x20be\x20outside\x20the\x20Clock\x20deadline/opening\x20window),\x20an\x20identity\x20condition\x20(the\x20caller\x20is\x20not\x20the\x20address\x20the\x20rule\x20expects),\x20or\x20a\x20data-dependency\x20ordering\x20(the\x20rule\x20reads\x20a\x20row\x20/\x20workflow\x20state\x20that\x20does\x20not\x20hold\x20yet\x20—\x20advance\x20the\x20workflow\x20to\x20the\x20granting\x20node\x20first,\x20then\x20re-run\x20the\x20same\x20write);\x20adjust\x20this\x20call\x27s\x20parameters\x20or\x20change\x20the\x20Guard\x20rule.\x20When\x20the\x20response\x20includes\x20a\x20\x27Guard\x20diagnosis\x20(dry-run)\x27\x20line,\x20it\x20names\x20the\x20first\x20failing\x20impact\x20guard\x20—\x20address\x20that\x20guard\x20first.\x20A\x20time-window\x20rejection\x20may\x20simply\x20be\x20early:\x20probe\x20the\x20window\x20with\x20env.dry_run=true\x20(free\x20—\x20guard\x20rejections\x20do\x20not\x20consume\x20the\x20total\x20retry\x20budget).'},'time_lock_not_elapsed':{'error_code':'time_lock_not_elapsed','strategy':'wait_and_retry','max_attempts':0x1,'automation':'semi','detail':'1.\x20Verify\x20Service\x20is\x20paused\x20(bPaused=true).\x20If\x20not,\x20submit\x20pause=true\x20first.\x202.\x20Wait\x20until\x20paused_time\x20+\x20setting_lock_duration\x20<=\x20current\x20clock.\x203.\x20Retry\x20the\x20original\x20operation.\x20Do\x20NOT\x20recreate\x20the\x20object.','user_prompt':'Service\x20setting_lock_duration\x20has\x20not\x20elapsed\x20since\x20the\x20Service\x20was\x20paused.\x20Please\x20pause\x20the\x20Service\x20if\x20it\x20is\x20not\x20already\x20paused,\x20wait\x20for\x20the\x20lock\x20duration\x20to\x20elapse,\x20then\x20retry.'},'immutable_violation':{'error_code':'immutable_violation','strategy':'recreate','max_attempts':0x1,'automation':'semi','detail':'1.\x20Stop\x20modification\x20attempt\x202.\x20Evaluate\x20creating\x20a\x20new\x20object\x20as\x20replacement\x203.\x20Re-plan\x20affected\x20phases','user_prompt':'Cannot\x20modify\x20an\x20immutable\x20object.\x20A\x20new\x20object\x20must\x20be\x20created\x20as\x20a\x20replacement.\x20Confirm\x20to\x20proceed\x20with\x20recreation.'},'permission_denied':{'error_code':'permission_denied','strategy':'switch_account','max_attempts':0x2,'automation':'semi','detail':'1.\x20Query\x20object\x27s\x20permission_guard\x202.\x20List\x20accounts\x20with\x20permission\x203.\x20Switch\x20account\x20or\x20prompt\x20user\x20to\x20add\x20permission','user_prompt':'Current\x20account\x20lacks\x20permission\x20for\x20this\x20operation.\x20Switch\x20to\x20an\x20authorized\x20account\x20or\x20update\x20the\x20Permission\x20object.'},'object_not_found':{'error_code':'object_not_found','strategy':'query_and_retry','max_attempts':0x3,'automation':'semi','detail':'1.\x20Verify\x20the\x20referenced\x20name/ID\x20spelling\x20(local_mark_list)\x20and\x20that\x20the\x20object\x20exists\x20on\x20the\x20current\x20network\x202.\x20If\x20recently\x20created,\x20re-query\x20the\x20object\x20(may\x20be\x20sync\x20delay)\x203.\x20If\x20truly\x20absent,\x20search\x20for\x20similar\x20objects\x204.\x20Prompt\x20user\x20to\x20reselect','user_prompt':'Referenced\x20object\x20not\x20found.\x20First\x20verify\x20the\x20name/ID\x20spelling\x20and\x20that\x20the\x20object\x20exists\x20on\x20the\x20current\x20network;\x20if\x20it\x20was\x20created\x20recently,\x20this\x20may\x20be\x20a\x20synchronization\x20delay\x20—\x20retry.\x20If\x20the\x20issue\x20persists,\x20please\x20select\x20a\x20valid\x20object.'},'state_conflict':{'error_code':'state_conflict','strategy':'adjust_params','max_attempts':0x2,'automation':'full','detail':'1.\x20Query\x20object\x27s\x20current\x20true\x20state\x202.\x20Update\x20ODG\x20status\x20annotations\x203.\x20Adjust\x20subsequent\x20operations\x20(e.g.,\x20skip\x20completed\x20steps)'},'invalid_parameter':{'error_code':'invalid_parameter','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'1.\x20Query\x20the\x20relevant\x20schema\x202.\x20Auto-fix\x20obvious\x20errors\x20(e.g.,\x20BigInt\x20vs\x20string)\x203.\x20If\x20unfixable,\x20prompt\x20user','user_prompt':'Parameter\x20validation\x20failed.\x20Please\x20check\x20the\x20parameter\x20types\x20and\x20values\x20against\x20the\x20schema\x20and\x20retry.'},'move_abort_unmapped':{'error_code':'move_abort_unmapped','strategy':'stop','max_attempts':0x1,'automation':'manual','detail':'The\x20chain\x27s\x20business\x20logic\x20aborted\x20and\x20the\x20(module,\x20abort\x20code)\x20pair\x20has\x20no\x20local\x20mapping.\x20Read\x20the\x20module\x20and\x20abort\x20code\x20from\x20move_abort_info\x20/\x20the\x20message\x20(rendered\x20as\x20\x27abort\x20(N)\x27),\x20resolve\x20their\x20meaning\x20from\x20the\x20module\x27s\x20documentation\x20or\x20the\x20wowok-tools\x20Skill,\x20fix\x20the\x20business\x20cause,\x20and\x20issue\x20a\x20NEW\x20call.\x20Do\x20NOT\x20restart\x20the\x20server\x20and\x20do\x20NOT\x20retry\x20the\x20identical\x20call\x20—\x20it\x20aborts\x20deterministically.','user_prompt':'The\x20operation\x20was\x20rejected\x20by\x20the\x20chain\x27s\x20business\x20logic\x20and\x20its\x20abort\x20code\x20is\x20not\x20mapped\x20locally.\x20The\x20module\x20name\x20and\x20abort\x20code\x20in\x20the\x20error\x20are\x20authoritative\x20—\x20review\x20them\x20(and\x20the\x20object\x20state\x20via\x20query_toolkit)\x20before\x20adjusting\x20anything.'},'missing_data':{'error_code':'missing_data','strategy':'adjust_params','max_attempts':0x2,'automation':'semi','detail':'A\x20guard\x20rule\x20read\x20a\x20keyed\x20table\x20row\x20that\x20does\x20NOT\x20exist\x20(repository.data\x20/\x20oracle\x20entry)\x20and\x20the\x20verifier\x20surfaced\x20it\x20as\x20a\x20location-only\x20fault\x20inside\x20the\x20passport\x20module\x20—\x20no\x20abort\x20code,\x20because\x20the\x20framework\x20cannot\x20express\x20\x27row\x20absent\x27\x20as\x20an\x20abort.\x20This\x20is\x20a\x20DATA\x20problem:\x201.\x20Identify\x20the\x20repository\x20and\x20key\x20the\x20guard\x20rule\x20reads\x20(guard2file\x20/\x20analyze_guard_semantics\x20on\x20the\x20guard\x20source)\x202.\x20Have\x20the\x20row\x27s\x20producer\x20write\x20it\x20(e.g.\x20an\x20oracle\x20timestamp\x20like\x20checkin_ts),\x20or\x20add\x20it\x20with\x20repository\x20data_add\x20(data_add.name\x20must\x20match\x20a\x20policy\x20rule\x20name)\x203.\x20Retry\x20the\x20SAME\x20call\x20unchanged\x20—\x20a\x20dry_run\x20that\x20turns\x20clean\x20after\x20the\x20row\x20exists\x20confirms\x20the\x20diagnosis.\x20OR-BRANCH\x20NOTE\x20(alg26\x20261026\x20F-A26-13):\x20a\x20guard\x27s\x20OR\x20does\x20NOT\x20short-circuit\x20—\x20every\x20branch\x20is\x20evaluated,\x20so\x20a\x20row\x20read\x20by\x20ANY\x20branch\x20must\x20exist\x20even\x20when\x20the\x20taken\x20path\x20would\x20not\x20read\x20it;\x20seed\x20initial\x20rows\x20(e.g.\x20a\x20counter\x20at\x200)\x20for\x20every\x20OR\x20branch\x20before\x20first\x20use','user_prompt':'A\x20guard\x20rule\x20references\x20a\x20data\x20row\x20that\x20has\x20not\x20been\x20written\x20yet\x20(location-only\x20fault\x20inside\x20the\x20passport\x20module\x20—\x20NOT\x20a\x20network\x20problem).\x20Identify\x20the\x20repository\x20row\x20the\x20guard\x20expects\x20(guard2file\x20/\x20analyze_guard_semantics),\x20write\x20it\x20with\x20repository\x20data_add\x20(or\x20let\x20its\x20producer\x20write\x20it),\x20then\x20retry.'},'guard_data_missing':{'error_code':'guard_data_missing','strategy':'adjust_params','max_attempts':0x1,'automation':'semi','detail':'A\x20guard\x20rule\x20read\x20DATA\x20that\x20does\x20not\x20exist\x20—\x20a\x20keyed\x20(id,key)\x20repository/oracle\x20row\x20or\x20a\x20field\x20of\x20an\x20object\x20the\x20guard\x20references\x20—\x20and\x20the\x20passport\x20guard\x20verifier\x20panicked\x20at\x20execution\x20time\x20with\x20NO\x20abort\x20code.\x20This\x20is\x20a\x20GUARD-DATA\x20problem,\x20NOT\x20an\x20environment\x20fault\x20(do\x20not\x20restart\x20the\x20server,\x20do\x20not\x20look\x20for\x20a\x20routing\x20cause).\x201.\x20Export\x20the\x20guard\x20(guard2file\x20/\x20analyze_guard_semantics)\x20and\x20list\x20every\x20row/field\x20it\x20reads,\x20including\x20OR\x20branches\x20(an\x20OR\x20does\x20not\x20short-circuit\x20—\x20every\x20branch\x27s\x20row\x20must\x20exist).\x202.\x20Seed\x20the\x20missing\x20(id,key)\x20row\x20with\x20repository\x20data_add\x20(data_add.name\x20must\x20match\x20a\x20policy\x20rule\x20name),\x20or\x20point\x20the\x20guard\x20at\x20a\x20row/object\x20that\x20already\x20exists\x20—\x20a\x20history-time\x20anchor\x20(query_progress_history_time\x20id\x201280,\x20next_node,\x20find=last)\x20must\x20name\x20a\x20node\x20present\x20on\x20this\x20order\x27s\x20path/period.\x203.\x20Retry\x20the\x20SAME\x20call\x20unchanged;\x20a\x20dry_run\x20that\x20turns\x20clean\x20confirms\x20the\x20diagnosis.','user_prompt':'A\x20guard\x20reads\x20repository\x20data\x20that\x20has\x20not\x20been\x20written\x20yet\x20(not\x20a\x20network\x20or\x20server\x20problem).\x20Identify\x20the\x20(id,key)\x20row\x20the\x20guard\x20expects,\x20write\x20it\x20with\x20repository\x20data_add\x20or\x20use\x20an\x20existing\x20row,\x20then\x20retry.'},'state_not_visible':{'error_code':'state_not_visible','strategy':'wait_and_retry','max_attempts':0x3,'automation':'full','detail':'The\x20state\x20this\x20call\x20needs\x20was\x20JUST\x20written\x20and\x20is\x20not\x20yet\x20visible\x20to\x20reads\x20(write-to-visibility\x20window),\x20or\x20it\x20does\x20not\x20exist\x20at\x20all.\x201.\x20If\x20a\x20write\x20on\x20this\x20order/machine\x20committed\x20within\x20the\x20last\x20few\x20seconds,\x20wait\x20500ms\x20(doubling\x20each\x20attempt)\x20and\x20replay\x20the\x20SAME\x20call\x20UNCHANGED\x20—\x20NEVER\x20edit\x20parameters\x20to\x20\x27fix\x27\x20a\x20visibility\x20window;\x20an\x20aborted\x20call\x20never\x20landed,\x20so\x20the\x20replay\x20cannot\x20double-spend.\x202.\x20If\x20the\x20fault\x20persists\x20past\x20~3\x20attempts\x20(or\x20nothing\x20was\x20just\x20written),\x20the\x20state\x20is\x20deterministically\x20ABSENT\x20—\x20stop\x20retrying:\x20for\x20a\x20forward-info\x20miss\x20query\x20the\x20Machine\x27s\x20node\x20table\x20(onchain_table_data\x20onchain_table_item_machine_node)\x20and\x20use\x20an\x20existing\x20node/next_node/forward\x20triple\x20—\x20on\x20an\x20already-built\x20machine\x20check\x20TOPOLOGY\x20first\x20(alg26\x20261026\x20F-A26-14):\x20the\x20forward\x20may\x20simply\x20not\x20be\x20an\x20out-edge\x20of\x20the\x20order\x27s\x20CURRENT\x20node,\x20which\x20no\x20retry\x20can\x20fix;\x20for\x20a\x20guard-read\x20repository\x20row\x20follow\x20the\x20missing_data\x20path\x20(write\x20the\x20row).','user_prompt':'A\x20just-committed\x20write\x20is\x20not\x20visible\x20to\x20this\x20read\x20yet.\x20The\x20same\x20call\x20will\x20be\x20replayed\x20after\x20a\x20short\x20wait\x20—\x20no\x20parameter\x20change\x20is\x20needed.\x20If\x20it\x20keeps\x20failing,\x20the\x20required\x20state\x20is\x20genuinely\x20missing\x20and\x20must\x20be\x20created\x20first.'},'unreachable_transition':{'error_code':'unreachable_transition','strategy':'query_and_retry','max_attempts':0x1,'automation':'full','detail':'The\x20requested\x20forward\x20name\x20does\x20not\x20exist\x20on\x20the\x20(prev_node,\x20node)\x20pair\x20at\x20the\x20order\x27s\x20current\x20node\x20(on-chain\x20E_FORWARD_NOT_AT_NODE)\x20—\x20the\x20transition\x20is\x20not\x20in\x20the\x20Machine\x20graph.\x20Deterministic:\x20no\x20account\x20switch,\x20retry\x20or\x20gas\x20change\x20can\x20create\x20a\x20missing\x20edge,\x20and\x20a\x20published\x20Machine\x20is\x20immutable\x20(IMMUT-001).\x201.\x20Read\x20the\x20order\x27s\x20current\x20progress\x20node\x20(order\x20progress\x20with\x20convert_witness=\x27OrderProgress\x27).\x202.\x20Query\x20the\x20Machine\x20node\x20table\x20(onchain_table_item_machine_node)\x20and\x20list\x20the\x20pair\x27s\x20ACTUAL\x20forwards.\x203.\x20Re-issue\x20the\x20operation\x20with\x20an\x20existing\x20forward\x20name\x20that\x20leads\x20toward\x20the\x20goal.\x204.\x20If\x20no\x20existing\x20edge\x20reaches\x20the\x20intended\x20state\x20on\x20a\x20published\x20Machine,\x20the\x20path\x20is\x20impossible\x20—\x20redesign\x20requires\x20a\x20NEW\x20Machine\x20version\x20(pre-publish:\x20fix\x20the\x20graph\x20and\x20republish).','user_prompt':'The\x20requested\x20machine\x20transition\x20does\x20not\x20exist\x20at\x20the\x20order\x27s\x20current\x20node\x20—\x20retrying\x20or\x20switching\x20accounts\x20cannot\x20help.\x20The\x20available\x20forwards\x20must\x20be\x20read\x20from\x20the\x20machine\x27s\x20node\x20table\x20and\x20an\x20existing\x20one\x20used\x20instead;\x20if\x20none\x20fits,\x20the\x20machine\x20graph\x20itself\x20must\x20be\x20changed\x20before\x20publish.'},'forward_not_at_node':{'error_code':'forward_not_at_node','strategy':'query_and_retry','max_attempts':0x1,'automation':'full','detail':'The\x20order\x27s\x20CURRENT\x20Progress\x20node\x20carries\x20no\x20forward\x20with\x20the\x20requested\x20name\x20(on-chain\x20E_INFO_NOT_FOUND\x20=\x2013)\x20—\x20the\x20forward\x20is\x20not\x20an\x20out-edge\x20of\x20the\x20node\x20the\x20order\x20stands\x20on.\x20Deterministic\x20topology\x20mismatch:\x20retrying\x20the\x20same\x20triple,\x20waiting\x20or\x20switching\x20accounts\x20cannot\x20create\x20the\x20edge.\x201.\x20Read\x20the\x20order\x27s\x20CURRENT\x20node\x20(order\x20progress\x20with\x20convert_witness=\x27OrderProgress\x27).\x202.\x20Query\x20the\x20Machine\x20node\x20table\x20(onchain_table_item_machine_node)\x20and\x20list\x20the\x20pair\x27s\x20ACTUAL\x20forwards\x20at\x20that\x20node.\x203.\x20Re-issue\x20with\x20one\x20of\x20those\x20forward\x20names,\x20or\x20first\x20advance\x20through\x20the\x20intermediate\x20node\x20that\x20carries\x20the\x20intended\x20edge.\x204.\x20Always\x20surface\x20current_node\x20+\x20available_forwards,\x20never\x20the\x20same\x20triple\x20again.\x20Distinct\x20from\x20unreachable_transition\x20(machine:25)\x20where\x20the\x20pair\x20exists\x20at\x20this\x20node\x20and\x20only\x20the\x20name\x20is\x20missing.','user_prompt':'The\x20order\x20is\x20standing\x20on\x20a\x20node\x20that\x20has\x20no\x20such\x20forward.\x20The\x20current\x20node\x20and\x20its\x20actual\x20forward\x20names\x20must\x20be\x20read\x20from\x20the\x20machine\x20node\x20table\x20and\x20an\x20edge\x20sourced\x20there\x20used\x20instead\x20(or\x20the\x20order\x20advanced\x20to\x20the\x20right\x20node\x20first).\x20Retrying\x20cannot\x20help.'},'anchor_unavailable':{'error_code':'anchor_unavailable','strategy':'escalate_human','max_attempts':0x1,'automation':'manual','detail':'The\x20messenger\x20WTS\x20evidence\x20chain\x20is\x20unavailable:\x20the\x20server\x20key-book\x20anchor\x20could\x20not\x20be\x20confirmed\x20on\x20the\x20current\x20network\x20(signer\x20not\x20pinned\x20for\x20this\x20network,\x20anchor\x20repository\x20absent\x20on-chain\x20—\x20typical\x20after\x20a\x20chain\x20re-genesis\x20—\x20or\x20the\x20anchor\x20chain\x20read\x20failed).\x20This\x20is\x20an\x20INFRASTRUCTURE\x20configuration\x20gap,\x20NOT\x20a\x20guard\x20rejection,\x20a\x20network\x20fault,\x20or\x20a\x20parameter\x20problem\x20—\x20signing\x20and\x20anchoring\x20fail\x20closed\x20by\x20design\x20(an\x20unconfirmed\x20key\x20book\x20cannot\x20ground\x20evidence).\x20Remedy\x20(out\x20of\x20band,\x20no\x20retry\x20will\x20help):\x201.\x20Deploy\x20or\x20re-anchor\x20the\x20messenger\x20server\x20key\x20book\x20on\x20the\x20target\x20network\x202.\x20Pin\x20its\x20signer\x20for\x20that\x20network\x20in\x20the\x20SDK\x20keybook\x20table\x203.\x20Until\x20then,\x20treat\x20the\x20messenger\x20channel\x20as\x20private\x20communication\x20WITHOUT\x20third-party\x20provability\x20(verify_wts\x20still\x20returns\x20a\x20structured\x20valid:false\x20verdict\x20with\x20the\x20anchor\x20reason)','user_prompt':'The\x20WTS\x20evidence\x20chain\x20cannot\x20be\x20anchored\x20on\x20this\x20network:\x20the\x20messenger\x20server\x20key-book\x20anchor\x20is\x20missing\x20or\x20unconfirmed.\x20This\x20needs\x20an\x20out-of-band\x20keybook\x20deployment\x20plus\x20SDK\x20signer\x20pinning\x20for\x20the\x20network\x20—\x20retrying\x20the\x20call\x20will\x20fail\x20the\x20same\x20way.\x20Until\x20fixed,\x20messenger\x20communication\x20remains\x20private\x20but\x20cannot\x20be\x20turned\x20into\x20third-party-verifiable\x20evidence.'},'capability_unavailable':{'error_code':'capability_unavailable','strategy':'stop','max_attempts':0x1,'automation':'manual','detail':'The\x20connected\x20chain\x20package\x20does\x20not\x20carry\x20this\x20protocol\x20entry,\x20so\x20the\x20call\x20is\x20impossible\x20on\x20this\x20package\x20version.\x20Deterministic\x20—\x20retrying,\x20re-signing\x20or\x20editing\x20parameters\x20cannot\x20add\x20the\x20missing\x20entry.\x20Remedy\x20(no\x20retry\x20involved):\x201.\x20Apply\x20the\x20documented\x20downgrade\x20for\x20the\x20intent\x20(for\x20a\x20reward\x20evidence\x20pin:\x20drop\x20the\x20evidence\x20binding\x20and\x20keep\x20the\x20repository-floor\x20guard\x20leg,\x20disclosing\x20that\x20it\x20proves\x20only\x20\x27a\x20qualifying\x20repository\x20row\x20exists\x20for\x20this\x20order\x27\x20—\x20not\x20who\x20wrote\x20it)\x202.\x20Check\x20the\x20target\x20network\x27s\x20package\x20release\x20notes\x20for\x20the\x20version\x20that\x20ships\x20the\x20entry\x20before\x20re-enabling\x20it\x203.\x20Never\x20treat\x20the\x20missing\x20entry\x20name\x20as\x20a\x20fixable\x20parameter','user_prompt':'This\x20call\x20needs\x20a\x20chain\x20capability\x20the\x20connected\x20package\x20does\x20not\x20have\x20yet.\x20It\x20cannot\x20succeed\x20on\x20this\x20network\x20version\x20—\x20no\x20retry\x20or\x20parameter\x20change\x20will\x20help.\x20The\x20documented\x20downgrade\x20keeps\x20the\x20goal\x20achievable\x20with\x20a\x20weaker\x20guarantee\x20that\x20must\x20be\x20disclosed\x20(for\x20a\x20review\x20bounty:\x20the\x20repository-floor\x20leg\x20proves\x20a\x20qualifying\x20rating\x20row\x20exists\x20for\x20the\x20order,\x20not\x20that\x20the\x20buyer\x20wrote\x20a\x20real\x20review).'},'delivery_unknown':{'error_code':'delivery_unknown','strategy':'query_and_retry','max_attempts':0x1,'automation':'semi','detail':'The\x20messenger\x20send\x20failed\x20at\x20transport\x20level\x20AFTER\x20submission:\x20delivery\x20state\x20is\x20UNKNOWN\x20because\x20the\x20relay\x20may\x20have\x20already\x20committed\x20the\x20message\x20despite\x20the\x20client-side\x20failure.\x20A\x20blind\x20re-send\x20DOUBLE-DELIVERS\x20the\x20same\x20encrypted\x20payload,\x20so\x20the\x20retry\x20loop\x20is\x20verify-first:\x20read\x20the\x20conversation\x20(watch_conversations\x20/\x20message\x20list)\x20and\x20check\x20for\x20the\x20identical\x20payload;\x20re-send\x20only\x20after\x20confirming\x20it\x20never\x20arrived.\x20Note\x20the\x20message,\x20when\x20it\x20did\x20arrive,\x20is\x20fully\x20end-to-end\x20encrypted\x20—\x20only\x20delivery\x20is\x20uncertain','user_prompt':'The\x20send\x20failed\x20after\x20submission,\x20so\x20delivery\x20is\x20uncertain\x20(the\x20server\x20may\x20have\x20committed\x20it\x20anyway).\x20Do\x20NOT\x20resend\x20blindly:\x20first\x20check\x20the\x20conversation\x20for\x20the\x20same\x20message;\x20resend\x20only\x20if\x20it\x20never\x20arrived.'},'transport_unavailable':{'error_code':'transport_unavailable','strategy':'retry','max_attempts':0x3,'automation':'full','detail':'A\x20transport-level\x20object\x20FETCH\x20failed\x20(\x27Fetch\x20<Type>\x20object\x200x...\x20failed\x27)\x20—\x20a\x20READ-path\x20availability\x20problem\x20(fullnode/gateway),\x20NOT\x20a\x20guard\x20rejection\x20and\x20NOT\x20an\x20on-chain\x20abort.\x201.\x20READ\x20calls\x20are\x20idempotent:\x20retry\x20after\x20a\x20brief\x20backoff,\x20or\x20against\x20a\x20healthy\x20endpoint.\x202.\x20If\x20this\x20error\x20surfaced\x20on\x20a\x20WRITE\x20call,\x20the\x20write\x27s\x20submission\x20state\x20is\x20UNKNOWN\x20—\x20do\x20NOT\x20blindly\x20resend;\x20first\x20query\x20the\x20expected\x20object\x20on-chain\x20and\x20adopt\x20or\x20resubmit\x20per\x20the\x20submission_unknown\x20discipline\x20(ghost-order\x20hazard).\x203.\x20Never\x20re-interpret\x20this\x20as\x20a\x20guard\x20failure:\x20no\x20guard\x20was\x20evaluated,\x20nothing\x20reached\x20Move.\x204.\x20Persistent\x20failures\x20across\x20endpoints\x20→\x20check\x20network/fullnode\x20health\x20before\x20touching\x20business\x20logic'},'peer_not_registered':{'error_code':'peer_not_registered','strategy':'stop','max_attempts':0x1,'automation':'manual','detail':'The\x20message\x20RECIPIENT\x20is\x20not\x20registered\x20on\x20the\x20messenger\x20server\x20for\x20this\x20network\x20—\x20the\x20relay\x20has\x20no\x20keybook\x20entry\x20for\x20their\x20address,\x20so\x20delivery\x20is\x20impossible\x20until\x20THEY\x20enable\x20messenger.\x20Deterministic\x20recipient-side\x20gap:\x20retrying,\x20re-signing\x20or\x20switching\x20the\x20sender\x27s\x20account\x20cannot\x20fix\x20it.\x201.\x20Verify\x20the\x20recipient\x20address\x20spelling\x20and\x20that\x20both\x20sides\x20are\x20on\x20the\x20SAME\x20network\x20(a\x20foreign-network\x20address\x20reads\x20as\x20unregistered).\x202.\x20Ask\x20the\x20recipient\x20to\x20enable\x20messenger\x20once\x20from\x20their\x20own\x20account\x20(account_operation\x20with\x20messenger\x20registration)\x20on\x20this\x20network.\x203.\x20Re-send\x20AFTER\x20their\x20registration\x20—\x20until\x20then\x20the\x20thread\x20stays\x20undeliverable,\x20not\x20lost\x20(history\x20survives\x20on\x20the\x20sender\x27s\x20side).','user_prompt':'The\x20recipient\x20has\x20not\x20enabled\x20the\x20messenger\x20yet,\x20so\x20the\x20message\x20cannot\x20be\x20delivered.\x20Ask\x20them\x20to\x20enable\x20messenger\x20on\x20this\x20network\x20first,\x20then\x20re-send.\x20Retrying\x20on\x20your\x20side\x20will\x20not\x20help.'},'unknown':{'error_code':'unknown','strategy':'escalate_human','max_attempts':0x1,'automation':'manual','detail':'1.\x20Report\x20full\x20error\x20context\x20to\x20the\x20user\x202.\x20Escalate\x20to\x20human\x20intervention\x203.\x20Flag\x20for\x20error-classification\x20rule\x20addition','user_prompt':'An\x20unclassified\x20error\x20occurred.\x20Please\x20review\x20the\x20error\x20details\x20and\x20contact\x20support\x20if\x20needed.'}};const operationAttempts=new Map();function getAttemptCount(a,b){const c=operationAttempts['get'](a);if(!c)return 0x0;return c['get'](b)??0x0;}function incrementAttempt(a,b){!operationAttempts['has'](a)&&operationAttempts['set'](a,new Map());const c=operationAttempts['get'](a),d=(c['get'](b)??0x0)+0x1;return c['set'](b,d),d;}const BUDGET_EXEMPT_CODES=new Set(['guard_rejected']);function getBudgetAttempts(a){const b=operationAttempts['get'](a);if(!b)return 0x0;let c=0x0;for(const [d,e]of b){if(!BUDGET_EXEMPT_CODES['has'](d))c+=e;}return c;}export function resetAttempts(a){operationAttempts['delete'](a);}export function recover(a,b,c){let d=RECOVERY_RULES[a]??RECOVERY_RULES['unknown'];if(a==='time_lock_not_elapsed'){const j=String(c?.['operation_type']??''),k=c?.['data']??{},l=/arb/i['test'](j)||k['arb']!==undefined||k['arbitration']!==undefined;l&&(d={...d,'detail':'1.\x20Do\x20NOT\x20pause\x20the\x20Service\x20and\x20do\x20NOT\x20touch\x20store\x20settings\x20—\x20this\x20is\x20an\x20Arb\x20VOTING\x20WINDOW,\x20not\x20a\x20Service\x20setting\x20lock.\x20'+'2.\x20Query\x20the\x20Arb\x20case\x20and\x20echo\x20voting_deadline\x20(epoch\x20ms)\x20and\x20the\x20remaining\x20time.\x20'+'3.\x20Wait\x20until\x20voting_deadline\x20elapses\x20(arb:4\x20fires\x20only\x20when\x20EARLY).\x20'+'4.\x20Re-run\x20the\x20ruling\x20/\x20vote-tally\x20call\x20against\x20the\x20same\x20case.\x20Do\x20NOT\x20recreate\x20the\x20Arb.','user_prompt':'The\x20Arb\x20voting\x20window\x20has\x20not\x20elapsed\x20yet.\x20Wait\x20until\x20voting_deadline,\x20then\x20re-run\x20the\x20ruling/vote-tally\x20on\x20the\x20same\x20case.\x20Do\x20not\x20pause\x20the\x20Service.'});}const e=0x5,f=getBudgetAttempts(b),g=getAttemptCount(b,a);if(d['max_attempts']<=0x1||d['strategy']==='stop')return{'strategy':d['strategy'],'should_retry':![],'max_attempts':d['max_attempts'],'current_attempt':g,'adjusted_params':d['adjusted_params'],'user_prompt':d['user_prompt'],'detail':d['detail']};if(f>=e)return{'strategy':'stop','should_retry':![],'max_attempts':e,'current_attempt':f,'detail':'Total\x20retry\x20limit\x20('+e+')\x20reached\x20for\x20operation\x20'+b+'.\x20Escalating\x20to\x20human\x20intervention.\x20Attempts\x20recorded\x20for\x20this\x20operation\x20id:\x20'+([...(operationAttempts['get'](b)??new Map())['entries']()]['map'](([m,o])=>m+':'+o)['join'](',\x20')||'none')+'.','user_prompt':'Maximum\x20retry\x20attempts\x20reached.\x20Manual\x20intervention\x20required.'};if(g>=d['max_attempts'])return{'strategy':'escalate_human','should_retry':![],'max_attempts':d['max_attempts'],'current_attempt':g,'detail':'Per-error-code\x20retry\x20limit\x20('+d['max_attempts']+')\x20reached\x20for\x20'+a+'.\x20Escalating\x20to\x20human.','user_prompt':'Recovery\x20attempts\x20for\x20'+a+'\x20exhausted.\x20Manual\x20intervention\x20required.'};const h=incrementAttempt(b,a),i={'strategy':d['strategy'],'should_retry':d['automation']==='full'||h<d['max_attempts'],'max_attempts':d['max_attempts'],'current_attempt':h,'adjusted_params':d['adjusted_params'],'user_prompt':d['user_prompt'],'detail':d['detail']};return i['should_retry']&&c?.['retryable']===![]&&a!=='guard_rejected'&&d['strategy']!=='fill_submission'&&d['strategy']!=='query_and_retry'&&(i['should_retry']=![],i['detail']+='\x20NON-RETRYABLE\x20CLASSIFICATION:\x20retrying\x20the\x20IDENTICAL\x20call\x20fails\x20identically\x20—\x20apply\x20the\x20strategy\x20above\x20to\x20fix\x20the\x20cause,\x20then\x20submit\x20a\x20FRESH\x20call.'),i;}export function getBackoffDelay(a){return Math['pow'](0x2,a-0x1)*0x3e8;}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import{McpServer}from'@modelcontextprotocol/server';import{serveStdio}from'@modelcontextprotocol/server/stdio';import{readFileSync}from'fs';const packageJson=JSON['parse'](readFileSync(new URL('../package.json',import.meta.url),'utf-8'));import{OnchainOperationsSchema,WipOperationsSchema,WatchQueryOperationsSchema,AccountOperationSchema,LocalMarkOperationSchema,LocalInfoOperationSchema,LocalHistoryOperationSchema,ProtocolInfoQuerySchema,CallOutputSchema,MessengerOperationInputSchema,MessengerOperationOutputSchema,createServerConfig,createCapabilitiesConfig}from'./schema/index.js';import{areSchemasAvailable,getSchemaIndex}from'./schema-query-impl/index.js';import{listServices}from'./config/index.js';import{registerAllTools,SUB_TOOL_COUNT}from'./tools/index.js';import{computeSrcDistStaleness,getStartupUpgradeNotice,primeUpgradeLookup,upgradeEnforceEnabled}from'./tools/upgrade-check.js';import{monitorLoop}from'./monitor/MonitorLoop.js';import{scanDefaultIndustryPacks}from'./extensions/index.js';import{pinInstance}from'./runtime/instance-registry.js';import{fileURLToPath}from'url';process['on']('unhandledRejection',(a,b)=>{const c=a instanceof Error?a['name']+':\x20'+a['message']+'\x0a'+(a['stack']??''):String(a);console['error']('[unhandledRejection]\x20'+new Date()['toISOString']()),console['error']('\x20\x20reason:\x20'+c);}),process['on']('uncaughtException',a=>{console['error']('[uncaughtException]\x20'+new Date()['toISOString']()),console['error']('\x20\x20name:\x20'+a['name']),console['error']('\x20\x20message:\x20'+a['message']),console['error']('\x20\x20stack:\x20'+(a['stack']??''));}),process['on']('beforeExit',a=>{console['error']('[beforeExit]\x20'+new Date()['toISOString']()+'\x20code='+a+'\x20—\x20event\x20loop\x20empty,\x20process\x20would\x20exit'),console['error']('\x20\x20active\x20handles:\x20'+(process['_getActiveHandles']?.()?.['length']??'?')),console['error']('\x20\x20active\x20requests:\x20'+(process['_getActiveRequests']?.()?.['length']??'?'));}),process['on']('exit',a=>{console['error']('[exit]\x20'+new Date()['toISOString']()+'\x20code='+a+'\x20—\x20process\x20exiting');});let shuttingDown=![],serverHandle=null;async function shutdown(a){if(shuttingDown)return;shuttingDown=!![],console['error']('[shutdown]\x20'+new Date()['toISOString']()+'\x20—\x20'+a);keepaliveTimer&&(clearInterval(keepaliveTimer),keepaliveTimer=null);const b=(c,d,e)=>{if(!c)return Promise['resolve']();return Promise['race']([c['catch'](()=>undefined),new Promise(f=>setTimeout(()=>{console['error']('[shutdown]\x20'+e+'\x20timed\x20out\x20after\x20'+d+'ms\x20—\x20forcing\x20exit'),f();},d))]);};await b(monitorLoop['stop'](),0xbb8,'monitorLoop.stop()'),await b(serverHandle?.['close'](),0x1388,'handle.close()'),process['exit'](0x0);}process['stdin']['on']('end',()=>{void shutdown('stdin\x20end\x20—\x20MCP\x20client\x20closed\x20stdin\x20(host\x20exited\x20or\x20restarted)');}),process['stdin']['on']('close',()=>{void shutdown('stdin\x20close\x20—\x20stdin\x20stream\x20closed');});let keepaliveTimer=null;function startKeepalive(){if(keepaliveTimer)return;keepaliveTimer=setInterval(()=>{const a=process['memoryUsage'](),b=Math['round'](a['heapUsed']/0x400/0x400),c=Math['round'](a['heapTotal']/0x400/0x400),d=Math['round'](a['rss']/0x400/0x400),e=b>0x4b0?'WARNING':b>0x320?'INFO':'DEBUG';console['error']('[memory\x20'+e+']\x20heap='+b+'MB/'+c+'MB\x20rss='+d+'MB');},0xea60);}startKeepalive();const SERVER_DESCRIPTION='WoWok\x20MCP\x20Server\x20-\x20Making\x20It\x20Easy\x20for\x20AI\x20Agents\x20to\x20Communicate,\x20Collaborate,\x20Trade,\x20and\x20Trust.\x0a\x0a##\x20CRITICAL:\x20Unified\x20Single-Tool\x20Architecture\x0a\x0aThis\x20server\x20exposes\x20exactly\x20ONE\x20MCP\x20tool:\x20`wowok`.\x20All\x20'+SUB_TOOL_COUNT+'\x20sub-tools\x20are\x20dispatched\x20internally\x20by\x20the\x20`wowok`\x20handler.\x0a\x0a###\x20START\x20HERE:\x20WoWok\x20Skills\x20(recommended)\x0aRole-based\x20playbooks\x20(onboarding,\x20building,\x20buying,\x20fulfillment,\x20arbitration,\x20governance)\x20sit\x20ON\x20TOP\x20of\x20this\x20MCP\x20and\x20tell\x20you\x20WHEN\x20and\x20in\x20what\x20ORDER\x20to\x20use\x20its\x20'+SUB_TOOL_COUNT+'\x20sub-tools\x20—\x20they\x20materially\x20reduce\x20failed\x20calls.\x20One\x20command\x20installs\x20them\x20into\x20every\x20detected\x20AI\x20client\x20and\x20registers\x20this\x20MCP\x20server:\x20`npm\x20install\x20-g\x20@wowok/skills`\x20(verify\x20with\x20`wowok-skills\x20doctor`).\x20Fetch\x20machine-readable\x20orientation\x20plus\x20best-effort\x20detection\x20of\x20whether\x20skills\x20are\x20installed\x20on\x20this\x20machine\x20with\x20`wowok({\x20tool:\x20\x22wowok_buildin_info\x22,\x20data:\x20{\x20info:\x20\x22getting\x20started\x22\x20}\x20})`.\x0aCOLD\x20START:\x20the\x20FIRST\x20call\x20after\x20server\x20boot\x20can\x20take\x20~20\x20seconds\x20(server\x20bootstraps\x20via\x20npx).\x20Wait\x20for\x20it\x20—\x20a\x20timed-out\x20first\x20response\x20is\x20startup\x20latency,\x20not\x20a\x20failure;\x20never\x20retry\x20a\x20write\x20transaction\x20because\x20of\x20it.\x0a\x0a###\x20Call\x20Format\x0a```\x0awowok({\x20tool:\x20\x22<sub-tool-name>\x22,\x20data:\x20{<sub-tool\x20parameters>}\x20})\x0a```\x0a\x0aAccepted\x20aliases\x20(deprecated):\x20`tool_name`/`name`\x20for\x20`tool`,\x20`args`/`params`\x20for\x20`data`.\x20Inline\x20params\x20(e.g.\x20`{\x20tool:\x20\x22schema_query\x22,\x20action:\x20\x22list\x22\x20}`)\x20are\x20also\x20auto-wrapped\x20into\x20`data`.\x0a\x0a###\x20Schema-Gated\x20Execution\x20(Self-Correcting)\x0aIf\x20your\x20parameters\x20don\x27t\x20match\x20the\x20sub-tool\x27s\x20schema,\x20the\x20response\x20includes:\x0a-\x20`result.status\x20=\x20\x22schema_mismatch\x22`\x0a-\x20`result.errors`\x20=\x20specific\x20validation\x20errors\x0a-\x20`schema.input`\x20=\x20the\x20correct\x20JSON\x20schema\x20for\x20the\x20sub-tool\x0a-\x20`schema.tool`\x20=\x20which\x20sub-tool\x20this\x20schema\x20belongs\x20to\x0a\x0aRead\x20the\x20schema,\x20fix\x20your\x20params,\x20and\x20retry.\x20CACHE\x20the\x20schema\x20in\x20your\x20context\x20for\x20future\x20calls\x20to\x20the\x20SAME\x20sub-tool\x20—\x20you\x20should\x20only\x20need\x20to\x20see\x20each\x20sub-tool\x27s\x20schema\x20once\x20per\x20conversation.\x20No\x20separate\x20`schema_query`\x20call\x20is\x20needed\x20for\x20parameter\x20correction.\x0a\x0a###\x20Unified\x20Response\x20Envelope\x0a```\x0a{\x0a\x20\x20\x22result\x22:\x20{\x20\x22status\x22:\x20\x22success|error|schema_mismatch\x22,\x20\x22data\x22:\x20<sub-tool\x20output>,\x20\x22errors\x22:\x20[...]\x20},\x0a\x20\x20\x22schema\x22:\x20null\x20|\x20{\x20\x22input\x22:\x20<JSON\x20schema>,\x20\x22tool\x22:\x20\x22<sub-tool-name>\x22\x20}\x0a}\x0a```\x0a\x0a##\x20CRITICAL:\x20Schema\x20Discovery\x20Rule\x0a\x0aWhen\x20the\x20current\x20context\x20does\x20not\x20contain\x20a\x20sub-tool\x27s\x20input/output\x20schema,\x20or\x20when\x20you\x20are\x20uncertain\x20whether\x20the\x20schema\x20you\x20have\x20is\x20complete\x20and\x20up-to-date,\x20you\x20MUST\x20query\x20it\x20first\x20before\x20calling\x20the\x20sub-tool.\x20Use\x20`wowok({\x20tool:\x20\x22schema_query\x22,\x20data:\x20{\x20action:\x20\x22get\x22,\x20name:\x20\x22<sub-tool>\x22\x20}\x20})'+'`'+'\x20for\x20operational\x20sub-tool\x20schemas\x20or\x20`wowok({\x20tool:\x20\x22wowok_buildin_info\x22,\x20data:\x20{\x20info:\x20\x22...\x22\x20}\x20})`\x20for\x20protocol\x20constants\x20and\x20reference\x20data.\x20Never\x20guess\x20schema\x20parameters,\x20query\x20instruction\x20IDs,\x20or\x20type\x20codes\x20—\x20always\x20retrieve\x20them\x20from\x20the\x20live\x20server.\x0a\x0a##\x20CRITICAL:\x20Global\x20Unread\x20Messenger\x20Check\x20(every\x20conversation)\x0a\x0aAt\x20the\x20START\x20of\x20EVERY\x20conversation\x20—\x20before\x20answering\x20the\x20user\x27s\x20request,\x20regardless\x20of\x20what\x20it\x20is\x20about\x20—\x20check\x20for\x20unread\x20Messenger\x20messages\x20and\x20IMMEDIATELY\x20and\x20PROMINENTLY\x20remind\x20the\x20user\x20to\x20read\x20them:\x0a\x0a```\x0awowok({\x20tool:\x20\x22messenger_operation\x22,\x20data:\x20{\x20operation:\x20\x22watch_conversations\x22,\x20filter:\x20{\x20unreadOnly:\x20true,\x20previewMessageCount:\x200,\x20skipAutoMarkViewed:\x20true\x20}\x20}\x20})\x0a```\x0a\x0aIf\x20the\x20result\x20contains\x20any\x20conversation\x20with\x20`unreadCount\x20>\x200`,\x20surface\x20a\x20prominent\x20reminder\x20at\x20the\x20TOP\x20of\x20your\x20response\x20(do\x20not\x20wait\x20for\x20the\x20user\x20to\x20ask),\x20listing\x20each\x20peer\x20with\x20unread\x20messages\x20and\x20the\x20count.\x20Use\x20`skipAutoMarkViewed:\x20true`\x20so\x20merely\x20checking\x20does\x20not\x20mark\x20them\x20read.\x20If\x20there\x20are\x20none,\x20do\x20not\x20mention\x20the\x20check.\x0a\x0a##\x20CRITICAL:\x20Upgrade\x20&\x20Client\x20Install\x20Reminder\x20(every\x20conversation)\x0a\x0aThe\x20server\x20itself\x20compares\x20its\x20package\x20version\x20against\x20npm\x20latest\x20at\x20startup\x0aand\x20attaches\x20an\x20`upgrade_notice`\x20(plus\x20a\x20visible\x20text\x20line)\x20to\x20the\x20FIRST\x20tool\x0aresponse\x20of\x20this\x20process\x20whenever\x20the\x20local\x20MCP/SDK\x20is\x20behind.\x20ALWAYS\x20surface\x0athat\x20notice\x20to\x20the\x20user\x20immediately\x20—\x20once\x20per\x20conversation,\x20before\x20other\x0aresults.\x20Additionally,\x20at\x20the\x20START\x20of\x20EVERY\x20conversation\x20—\x20together\x20with\x20the\x0aunread\x20Messenger\x20check\x20—\x20call:\x0a\x0a```\x0awowok({\x20tool:\x20\x22wowok_buildin_info\x22,\x20data:\x20{\x20info:\x20\x22upgrade_check\x22\x20}\x20})\x0a```\x0a\x0aThen,\x20based\x20on\x20the\x20returned\x20`result.reminder`:\x0a-\x20If\x20`reminder.type\x20===\x20\x22upgrade\x22`\x20AND\x20`reminder.due\x20===\x20true`:\x20IMMEDIATELY\x20remind\x20the\x20user\x20to\x20upgrade\x20(do\x20not\x20wait\x20for\x20them\x20to\x20ask).\x20Use\x20the\x20benefit-focused\x20wording\x20below,\x20filling\x20in\x20the\x20current/latest\x20versions\x20from\x20`result.mcp`\x20/\x20`result.sdk`.\x0a-\x20If\x20`reminder.type\x20===\x20\x22install_client\x22`\x20AND\x20`reminder.due\x20===\x20true`:\x20remind\x20the\x20user\x20to\x20install\x20the\x20WoWok\x20desktop\x20client\x20(this\x20fires\x20at\x20most\x20once\x20per\x20week\x20—\x20the\x20reminder\x20state\x20is\x20persisted\x20automatically).\x0a-\x20If\x20`reminder.type\x20===\x20\x22none\x22`\x20or\x20`reminder.due\x20===\x20false`:\x20do\x20NOT\x20mention\x20upgrades\x20or\x20the\x20client.\x0a\x0aUpgrade\x20wording\x20(paraphrase\x20naturally,\x20keep\x20it\x20short\x20and\x20benefit-driven;\x20adapt\x20to\x20the\x20user\x27s\x20language):\x0a\x20\x20\x22A\x20newer\x20WoWok\x20version\x20is\x20available\x20(current\x20vX\x20→\x20latest\x20vY).\x20Upgrade\x20for\x20more\x20features\x20and\x20improvements.\x20Run:\x20npm\x20install\x20-g\x20@wowok/agent-mcp@latest\x22\x0a\x0aClient\x20install\x20wording:\x0a\x20\x20\x22The\x20WoWok\x20desktop\x20client\x20is\x20not\x20installed\x20yet.\x20It\x20provides\x20wallet\x20management,\x20encrypted\x20Messenger,\x20project\x20management\x20and\x20more.\x20Download\x20it\x20at\x20https://download.wowok.net\x20to\x20get\x20started.\x22\x0a\x0aIf\x20the\x20upgrade_check\x20itself\x20fails\x20(offline\x20/\x20registry\x20unreachable),\x20skip\x20the\x20reminder\x20—\x20never\x20fabricate\x20version\x20numbers.\x0a\x0a##\x20Token\x20System\x20Overview\x0a\x0a###\x20Default\x20Platform\x20Token:\x20WOW\x0a-\x20Token\x20Type:\x200x2::wow::WOW\x0a-\x20Precision:\x201_000_000_000\x20(9\x20decimal\x20places)\x0a-\x20This\x20is\x20the\x20default\x20token\x20for\x20all\x20operations\x20unless\x20specified\x20otherwise\x0a\x0a###\x20Multi-Token\x20Support\x0aThe\x20platform\x20supports\x20ANY\x20token\x20(e.g.,\x20USDT,\x20USDC,\x20custom\x20tokens).\x20To\x20use\x20non-WOW\x20tokens:\x0a1.\x20Use\x20query_toolkit\x20with\x20query_type=\x27token_list\x27\x20to\x20query\x20available\x20tokens\x20and\x20their\x20precision\x20info\x0a2.\x20Use\x20the\x20token\x27s\x20full\x20type\x20string\x20(e.g.,\x20\x270x2::usdt::USDT\x27)\x20in\x20token_type\x20parameter\x0a3.\x20Each\x20token\x20has\x20its\x20own\x20precision\x20-\x20always\x20verify\x20before\x20operations\x0a\x0a###\x20Token\x20Precision\x20Handling\x0aDifferent\x20tokens\x20have\x20different\x20precisions.\x20ALWAYS\x20query\x20to\x20verify:\x0a-\x20WOW\x20(default):\x201_000_000_000\x20(9\x20decimals)\x0a-\x20Other\x20tokens:\x20Use\x20query_toolkit\x20with\x20query_type=\x27token_list\x27\x20to\x20get\x20actual\x20precision\x0a-\x20Never\x20assume\x20a\x20token\x27s\x20decimal\x20places\x20-\x20always\x20query\x20first\x0a\x0a##\x20CRITICAL:\x20Token\x20Amount\x20Handling\x0a\x0a###\x20Amount\x20Input\x20Rules\x0a1.\x20WITH\x20currency\x20unit\x20(e.g.,\x20\x272WOW\x27,\x20\x2710.5WOW\x27,\x20\x27100USDT\x27):\x0a\x20\x20\x20-\x20Auto-converted\x20using\x20token\x27s\x20precision:\x202WOW\x20->\x202_000_000_000\x0a\x20\x20\x20-\x20Use\x20for:\x20All\x20on-chain\x20token\x20operations\x0a\x20\x20\x20-\x20MUST\x20match\x20the\x20token_type\x20parameter\x0a\x0a2.\x20WITHOUT\x20currency\x20unit\x20(e.g.,\x20\x272\x27,\x20\x27100\x27):\x0a\x20\x20\x20-\x20Used\x20as-is:\x202\x20->\x202\x0a\x20\x20\x20-\x20Use\x20for:\x20Regular\x20numeric\x20parameters\x20(counts,\x20indices,\x20etc.)\x0a\x0a###\x20Multi-Token\x20Operation\x20Examples\x0a-\x20Create\x20USDT-priced\x20Service:\x20token_type=\x270x2::usdt::USDT\x27,\x20amount=\x27100USDT\x27\x0a-\x20Allocate\x20USDC\x20rewards:\x20token_type=\x270x2::usdc::USDC\x27,\x20amount=\x27500USDC\x27\x0a-\x20WOW\x20remains\x20default:\x20omit\x20token_type\x20or\x20use\x20\x270x2::wow::WOW\x27\x0a\x0a###\x20Security\x20Warning\x0aToken\x20amounts\x20are\x20HIGHLY\x20SENSITIVE.\x20Always:\x0a-\x20Confirm\x20user\x27s\x20intent\x20before\x20executing\x20transfers\x0a-\x20Verify\x20token\x20type\x20and\x20amount\x20format\x20(with/without\x20unit)\x0a-\x20Query\x20token\x20precision\x20if\x20unsure\x0a-\x20Double-check\x20large\x20amount\x20transactions\x0a-\x20Never\x20assume\x20decimal\x20places\x20-\x20use\x20explicit\x20token\x20unit\x0a\x0a##\x20Sub-tool\x20Selection\x20Guide\x0a\x0aAll\x20sub-tools\x20are\x20called\x20via\x20`wowok({\x20tool:\x20\x22<sub-tool>\x22,\x20data:\x20{...}\x20})`.\x20The\x20table\x20below\x20helps\x20pick\x20the\x20correct\x20`tool`\x20value.\x0a\x0a|\x20User\x20Intent\x20|\x20Correct\x20Sub-tool\x20|\x20Wrong\x20Sub-tool\x20(Avoid)\x20|\x0a|------------|------------------|------------------------|\x0a|\x20Create\x20service\x20listing\x20|\x20onchain_operations\x20(service)\x20|\x20query_toolkit\x20|\x0a|\x20Send\x20coins\x20to\x20address\x20|\x20onchain_operations\x20(payment)\x20|\x20account_operation\x20|\x0a|\x20Check\x20my\x20balance\x20|\x20query_toolkit\x20(account_balance)\x20|\x20onchain_operations\x20|\x0a|\x20Manage\x20local\x20wallet\x20|\x20account_operation\x20|\x20onchain_operations\x20|\x0a|\x20Export\x20Guard\x20for\x20edit\x20|\x20guard2file\x20|\x20query_toolkit\x20|\x0a|\x20Send/Watch\x20encrypted\x20message\x20|\x20messenger_operation\x20|\x20onchain_operations\x20|\x0a|\x20Create\x20workflow\x20template\x20|\x20onchain_operations\x20(machine)\x20|\x20wip_file\x20|\x0a|\x20Store\x20my\x20phone\x20number\x20|\x20local_info_operation\x20|\x20onchain_operations\x20|\x0a|\x20Buy\x20service\x20(create\x20order)\x20|\x20onchain_operations\x20(order)\x20|\x20onchain_operations\x20(service)\x20|\x0a|\x20Manage\x20my\x20orders\x20|\x20onchain_operations\x20(order)\x20|\x20query_toolkit\x20|\x0a|\x20Apply\x20for\x20arbitration\x20|\x20onchain_operations\x20(order)\x20|\x20onchain_operations\x20(arbitration)\x20|\x0a|\x20Create\x20reward\x20pool\x20for\x20marketing\x20|\x20onchain_operations\x20(reward)\x20|\x20onchain_operations\x20(treasury)\x20|\x0a|\x20Claim\x20rewards\x20from\x20pool\x20|\x20onchain_operations\x20(reward)\x20|\x20query_toolkit\x20|\x0a|\x20Create\x20fund\x20allocation\x20plan\x20|\x20onchain_operations\x20(allocation)\x20|\x20onchain_operations\x20(treasury)\x20|\x0a|\x20Execute\x20fund\x20distribution\x20|\x20onchain_operations\x20(allocation)\x20|\x20onchain_operations\x20(payment)\x20|\x0a|\x20Post\x20service\x20demand\x20with\x20reward\x20|\x20onchain_operations\x20(demand)\x20|\x20onchain_operations\x20(service)\x20|\x0a|\x20Submit\x20solution\x20for\x20demand\x20|\x20onchain_operations\x20(demand)\x20|\x20onchain_operations\x20(order)\x20|\x0a|\x20Create\x20team\x20treasury\x20|\x20onchain_operations\x20(treasury)\x20|\x20onchain_operations\x20(allocation)\x20|\x0a|\x20Deposit/Withdraw\x20from\x20treasury\x20|\x20onchain_operations\x20(treasury)\x20|\x20onchain_operations\x20(payment)\x20|\x0a|\x20Create\x20access\x20control\x20rules\x20|\x20onchain_operations\x20(permission)\x20|\x20onchain_operations\x20(guard)\x20|\x0a|\x20Create\x20validation\x20rules\x20(Guard)\x20|\x20onchain_operations\x20(guard)\x20|\x20onchain_operations\x20(permission)\x20|\x0a|\x20Export\x20Guard\x20for\x20editing\x20|\x20guard2file\x20|\x20query_toolkit\x20|\x0a|\x20Export\x20Machine\x20nodes\x20for\x20editing\x20|\x20machineNode2file\x20|\x20query_toolkit\x20|\x0a|\x20Query\x20token\x20list\x20and\x20precision\x20|\x20query_toolkit\x20(token_list)\x20|\x20wowok_buildin_info\x20|\x0a|\x20Watch\x20on-chain\x20events\x20|\x20onchain_events\x20|\x20query_toolkit\x20|\x0a|\x20Generate\x20WIP\x20promise\x20file\x20|\x20wip_file\x20(generate)\x20|\x20messenger_operation\x20|\x0a|\x20Sign\x20WIP\x20file\x20|\x20wip_file\x20(sign)\x20|\x20account_operation\x20(signData)\x20|\x0a|\x20Verify\x20WIP\x20file\x20integrity\x20|\x20wip_file\x20(verify)\x20|\x20query_toolkit\x20|\x0a|\x20Send\x20encrypted\x20file\x20via\x20messenger\x20|\x20messenger_operation\x20(send_file)\x20|\x20wip_file\x20|\x0a|\x20Generate\x20Witness\x20Timestamped\x20Sequence\x20(WTS)\x20|\x20messenger_operation\x20(generate_wts)\x20|\x20wip_file\x20|\x0a|\x20Query\x20protocol\x20constants\x20|\x20wowok_buildin_info\x20|\x20query_toolkit\x20|\x0a|\x20Query\x20sub-tool\x20schemas\x20|\x20schema_query\x20|\x20wowok_buildin_info\x20|\x0a|\x20Cross-chain\x20bridge\x20(WOW<->EVM)\x20|\x20bridge_operation\x20|\x20onchain_operations\x20|\x0a|\x20On-chain\x20business\x20intelligence\x20(panoramas,\x20review\x20packs)\x20|\x20query_toolkit\x20|\x20onchain_operations\x20|\x0a|\x20Runtime\x20service\x20toggles\x20|\x20config_operation\x20|\x20—\x20|\x0a|\x20Query\x20dynamic\x20table\x20data\x20/\x20table\x20items\x20|\x20onchain_table_data\x20|\x20query_toolkit\x20|\x0a|\x20Business\x20evaluation\x20(match/game/evidence)\x20|\x20evaluation_operation\x20|\x20query_toolkit\x20|\x0a|\x20Set\x20user\x20persona\x20/\x20preferences\x20|\x20persona_operation\x20|\x20local_info_operation\x20|\x0a|\x20Match\x20business\x20intent\x20to\x20chain\x20events\x20|\x20intent_radar\x20|\x20onchain_events\x20|\x0a|\x20Manage\x20employee\x20KPI\x20/\x20liability\x20|\x20employee_operation\x20|\x20onchain_operations\x20|\x0a|\x20Scaffold\x20/\x20register\x20industry\x20pack\x20|\x20industry_pack_operation\x20|\x20persona_operation\x20|\x0a|\x20Read\x20/\x20write\x20local\x20workspace\x20files\x20|\x20workspace_operation\x20|\x20local_info_operation\x20|\x0a|\x20List\x20local-account\x20actionable\x20progress\x20/\x20advance\x20forward\x20|\x20workflow_operation\x20|\x20onchain_operations\x20|\x0a|\x20List\x20Permissions\x20related\x20to\x20local\x20accounts\x20|\x20permission_operation\x20|\x20query_toolkit\x20|\x0a|\x20Ask\x20the\x20user\x20to\x20choose\x20between\x20concrete\x20business\x20options\x20(plans/pricing/guard\x20strength/accounts)\x20|\x20ask_user\x20|\x20onchain_operations\x20/\x20prose\x20questions\x20|\x0a\x0a##\x20Sub-tool\x20Categories\x0a\x0a###\x20LOCAL\x20ONLY\x20(Never\x20touch\x20blockchain):\x0a-\x20account_operation\x0a-\x20local_mark_operation\x0a-\x20local_info_operation\x0a-\x20persona_operation\x0a-\x20employee_operation\x0a-\x20industry_pack_operation\x0a-\x20workspace_operation\x0a\x0a###\x20ON-CHAIN\x20(Blockchain\x20transactions):\x0a-\x20onchain_operations\x0a-\x20workflow_operation\x20(operate\x20advances/holds\x20progress\x20on-chain;\x20list\x20is\x20read-only)\x0a-\x20messenger_operation\x20(some\x20operations)\x0a-\x20wip_file\x20(sign\x20operation)\x0a-\x20bridge_operation\x0a\x0a###\x20QUERY\x20(Read-only):\x0a-\x20query_toolkit\x0a-\x20onchain_events\x0a-\x20onchain_table_data\x0a-\x20wowok_buildin_info\x0a-\x20schema_query\x0a-\x20guard2file\x0a-\x20machineNode2file\x0a-\x20evaluation_operation\x0a-\x20intent_radar\x0a-\x20permission_operation\x0a\x0a###\x20WORKFLOW\x20&\x20ANALYTICS:\x0a-\x20config_operation\x0a';function buildServer(){const a=new McpServer(createServerConfig(packageJson,SERVER_DESCRIPTION),createCapabilitiesConfig());return registerAllTools(a),a;}export{OnchainOperationsSchema,WipOperationsSchema,WatchQueryOperationsSchema,AccountOperationSchema,LocalMarkOperationSchema,LocalInfoOperationSchema,LocalHistoryOperationSchema,ProtocolInfoQuerySchema,CallOutputSchema,MessengerOperationInputSchema,MessengerOperationOutputSchema};async function main(){{const f=pinInstance(packageJson['version'],fileURLToPath(import.meta.url));console['error']('Instance\x20pinned:\x20pid='+process['pid']+'\x20v'+packageJson['version']+'\x20('+f['warnings']['length']+'\x20other\x20generation(s)\x20live)');for(const g of f['warnings'])console['error']('[version-reconcile]\x20'+g);f['selfIsStale']&&process['env']['WOWOK_ALLOW_MIXED_GENERATIONS']!=='1'&&(console['error']('[version-reconcile]\x20FATAL:\x20a\x20newer\x20generation\x20(v'+f['newer']?.['version']+',\x20pid\x20'+f['newer']?.['pid']+')\x20is\x20already\x20'+('live\x20—\x20this\x20instance\x20serves\x20v'+packageJson['version']+'\x20and\x20REFUSES\x20service\x20so\x20no\x20call\x20can\x20be\x20answered\x20')+'by\x20stale\x20code\x20(mtwv2\x20F-01).\x20Restart\x20this\x20client\x20connection\x20to\x20spawn\x20the\x20current\x20build,\x20or\x20set\x20'+'WOWOK_ALLOW_MIXED_GENERATIONS=1\x20to\x20opt\x20out.'),process['exit'](0x1));}if(areSchemasAvailable()){const h=getSchemaIndex();h&&console['error']('Schema\x20system\x20ready:\x20'+(h['tools']?.['length']||0x0)+'\x20tools,\x20'+(h['operations']?.['length']||0x0)+'\x20operations');}else console['error']('Schema\x20files\x20not\x20available.\x20Run\x20\x27npm\x20run\x20generate:schemas\x27\x20to\x20generate\x20them.');const a=process['env']['WOWOK_DIST_STALENESS']==='enforce';try{const i=await import('path'),j=i['dirname'](fileURLToPath(import.meta.url)),k=i['resolve'](j,'../../../ts-sdk/packages/wowok'),l=[{'label':'SDK','stale':computeSrcDistStaleness(i['join'](k,'src'),i['join'](k,'dist','esm')),'rebuild':'pnpm\x20build\x20(SDK\x20workspace)'},{'label':'MCP','stale':computeSrcDistStaleness(i['join'](j,'..','src'),i['join'](j,'..','dist'),{'srcExt':'.ts','distExt':'.js'}),'rebuild':'pnpm\x20build\x20(MCP\x20server\x20workspace)'}];for(const m of l){if(m['stale']===null)continue;if(m['stale']['stale']){const n='[dist-reconcile]\x20STALE\x20'+m['label']+'\x20DIST:\x20workspace\x20src\x20is\x20newer\x20than\x20dist\x20by\x20'+(m['stale']['lag_minutes']+'\x20min\x20—\x20the\x20runtime\x20may\x20lack\x20features\x20the\x20schemas/docs\x20')+('describe.\x20Rebuild:\x20'+m['rebuild']);a&&(console['error']('[dist-reconcile]\x20ENFORCE\x20MODE\x20(WOWOK_DIST_STALENESS=enforce):\x20'+n),process['exit'](0x1)),console['error'](n);}else console['error']('dist-reconcile:\x20'+m['label']+'\x20dist\x20is\x20current');}}catch(o){console['error']('[dist-reconcile]\x20check\x20failed\x20(non-fatal):\x20'+o['message']);}primeUpgradeLookup();if(upgradeEnforceEnabled()){const p=await getStartupUpgradeNotice(0x1f40);p&&(console['error']('[upgrade-check]\x20ENFORCED\x20(WOWOK_UPGRADE_ENFORCE=1):\x20'+p['message']),process['exit'](0x1));}const b=listServices()['filter'](q=>q['enabled'])['map'](q=>q['name']);console['error']('Phase\x202\x20active\x20services:\x20'+(b['join'](',\x20')||'none'));try{const q=scanDefaultIndustryPacks(),r=q['filter'](s=>s['ok'])['length'];console['error']('Industry\x20packs\x20ready:\x20'+r+'/'+q['length']+'\x20registered\x20at\x20startup');}catch(s){console['error']('[industry]\x20startup\x20bootstrap\x20failed:\x20'+s['message']);}if(process['env']['MONITOR_LOOP']==='1')try{const t=await monitorLoop['start']();console['error']('MonitorLoop\x20started\x20(MONITOR_LOOP=1):\x20'+t['join'](',\x20'));}catch(u){console['error']('[monitor]\x20MonitorLoop\x20start\x20failed:\x20'+(u?.['message']??u));}const d=serveStdio(()=>buildServer());serverHandle=d,process['on']('SIGINT',()=>{void shutdown('SIGINT\x20—\x20graceful\x20shutdown');}),process['on']('SIGTERM',()=>{void shutdown('SIGTERM\x20—\x20graceful\x20shutdown');});}main()['catch'](console['error']);
2
+ import{McpServer}from'@modelcontextprotocol/server';import{serveStdio}from'@modelcontextprotocol/server/stdio';import{readFileSync}from'fs';const packageJson=JSON['parse'](readFileSync(new URL('../package.json',import.meta.url),'utf-8'));import{OnchainOperationsSchema,WipOperationsSchema,WatchQueryOperationsSchema,AccountOperationSchema,LocalMarkOperationSchema,LocalInfoOperationSchema,LocalHistoryOperationSchema,ProtocolInfoQuerySchema,CallOutputSchema,MessengerOperationInputSchema,MessengerOperationOutputSchema,createServerConfig,createCapabilitiesConfig}from'./schema/index.js';import{areSchemasAvailable,getSchemaIndex}from'./schema-query-impl/index.js';import{listServices}from'./config/index.js';import{registerAllTools,SUB_TOOL_COUNT}from'./tools/index.js';import{computeSrcDistStaleness,getStartupUpgradeNotice,primeUpgradeLookup,upgradeEnforceEnabled}from'./tools/upgrade-check.js';import{monitorLoop}from'./monitor/MonitorLoop.js';import{scanDefaultIndustryPacks}from'./extensions/index.js';import{pinInstance}from'./runtime/instance-registry.js';import{fileURLToPath}from'url';process['on']('unhandledRejection',(a,b)=>{const c=a instanceof Error?a['name']+':\x20'+a['message']+'\x0a'+(a['stack']??''):String(a);console['error']('[unhandledRejection]\x20'+new Date()['toISOString']()),console['error']('\x20\x20reason:\x20'+c);}),process['on']('uncaughtException',a=>{console['error']('[uncaughtException]\x20'+new Date()['toISOString']()),console['error']('\x20\x20name:\x20'+a['name']),console['error']('\x20\x20message:\x20'+a['message']),console['error']('\x20\x20stack:\x20'+(a['stack']??''));}),process['on']('beforeExit',a=>{console['error']('[beforeExit]\x20'+new Date()['toISOString']()+'\x20code='+a+'\x20—\x20event\x20loop\x20empty,\x20process\x20would\x20exit'),console['error']('\x20\x20active\x20handles:\x20'+(process['_getActiveHandles']?.()?.['length']??'?')),console['error']('\x20\x20active\x20requests:\x20'+(process['_getActiveRequests']?.()?.['length']??'?'));}),process['on']('exit',a=>{console['error']('[exit]\x20'+new Date()['toISOString']()+'\x20code='+a+'\x20—\x20process\x20exiting');});let shuttingDown=![],serverHandle=null;async function shutdown(a){if(shuttingDown)return;shuttingDown=!![],console['error']('[shutdown]\x20'+new Date()['toISOString']()+'\x20—\x20'+a);keepaliveTimer&&(clearInterval(keepaliveTimer),keepaliveTimer=null);const b=(c,d,e)=>{if(!c)return Promise['resolve']();return Promise['race']([c['catch'](()=>undefined),new Promise(f=>setTimeout(()=>{console['error']('[shutdown]\x20'+e+'\x20timed\x20out\x20after\x20'+d+'ms\x20—\x20forcing\x20exit'),f();},d))]);};await b(monitorLoop['stop'](),0xbb8,'monitorLoop.stop()'),await b(serverHandle?.['close'](),0x1388,'handle.close()'),process['exit'](0x0);}process['stdin']['on']('end',()=>{void shutdown('stdin\x20end\x20—\x20MCP\x20client\x20closed\x20stdin\x20(host\x20exited\x20or\x20restarted)');}),process['stdin']['on']('close',()=>{void shutdown('stdin\x20close\x20—\x20stdin\x20stream\x20closed');});let keepaliveTimer=null;function startKeepalive(){if(keepaliveTimer)return;keepaliveTimer=setInterval(()=>{const a=process['memoryUsage'](),b=Math['round'](a['heapUsed']/0x400/0x400),c=Math['round'](a['heapTotal']/0x400/0x400),d=Math['round'](a['rss']/0x400/0x400),e=b>0x4b0?'WARNING':b>0x320?'INFO':'DEBUG';console['error']('[memory\x20'+e+']\x20heap='+b+'MB/'+c+'MB\x20rss='+d+'MB');},0xea60);}startKeepalive();const SERVER_DESCRIPTION='WoWok\x20MCP\x20Server\x20-\x20Making\x20It\x20Easy\x20for\x20AI\x20Agents\x20to\x20Communicate,\x20Collaborate,\x20Trade,\x20and\x20Trust.\x0a\x0a##\x20CRITICAL:\x20Unified\x20Single-Tool\x20Architecture\x0a\x0aThis\x20server\x20exposes\x20exactly\x20ONE\x20MCP\x20tool:\x20`wowok`.\x20All\x20'+SUB_TOOL_COUNT+'\x20sub-tools\x20are\x20dispatched\x20internally\x20by\x20the\x20`wowok`\x20handler.\x0a\x0a###\x20START\x20HERE:\x20WoWok\x20Skills\x20(recommended)\x0aRole-based\x20playbooks\x20(onboarding,\x20building,\x20buying,\x20fulfillment,\x20arbitration,\x20governance)\x20sit\x20ON\x20TOP\x20of\x20this\x20MCP\x20and\x20tell\x20you\x20WHEN\x20and\x20in\x20what\x20ORDER\x20to\x20use\x20its\x20'+SUB_TOOL_COUNT+'\x20sub-tools\x20—\x20they\x20materially\x20reduce\x20failed\x20calls.\x20One\x20command\x20installs\x20them\x20into\x20every\x20detected\x20AI\x20client\x20and\x20registers\x20this\x20MCP\x20server:\x20`npm\x20install\x20-g\x20@wowok/skills`\x20(verify\x20with\x20`wowok-skills\x20doctor`).\x20Fetch\x20machine-readable\x20orientation\x20plus\x20best-effort\x20detection\x20of\x20whether\x20skills\x20are\x20installed\x20on\x20this\x20machine\x20with\x20`wowok({\x20tool:\x20\x22wowok_buildin_info\x22,\x20data:\x20{\x20info:\x20\x22getting\x20started\x22\x20}\x20})`.\x0aCOLD\x20START:\x20the\x20FIRST\x20call\x20after\x20server\x20boot\x20can\x20take\x20~20\x20seconds\x20(server\x20bootstraps\x20via\x20npx).\x20Wait\x20for\x20it\x20—\x20a\x20timed-out\x20first\x20response\x20is\x20startup\x20latency,\x20not\x20a\x20failure;\x20never\x20retry\x20a\x20write\x20transaction\x20because\x20of\x20it.\x0a\x0a###\x20Call\x20Format\x0a```\x0awowok({\x20tool:\x20\x22<sub-tool-name>\x22,\x20data:\x20{<sub-tool\x20parameters>}\x20})\x0a```\x0a\x0aAccepted\x20aliases\x20(deprecated):\x20`tool_name`/`name`\x20for\x20`tool`,\x20`args`/`params`\x20for\x20`data`.\x20Inline\x20params\x20(e.g.\x20`{\x20tool:\x20\x22schema_query\x22,\x20action:\x20\x22list\x22\x20}`)\x20are\x20also\x20auto-wrapped\x20into\x20`data`.\x0a\x0a###\x20Schema-Gated\x20Execution\x20(Self-Correcting)\x0aIf\x20your\x20parameters\x20don\x27t\x20match\x20the\x20sub-tool\x27s\x20schema,\x20the\x20response\x20includes:\x0a-\x20`result.status\x20=\x20\x22schema_mismatch\x22`\x0a-\x20`result.errors`\x20=\x20specific\x20validation\x20errors\x0a-\x20`schema.input`\x20=\x20the\x20correct\x20JSON\x20schema\x20for\x20the\x20sub-tool\x0a-\x20`schema.tool`\x20=\x20which\x20sub-tool\x20this\x20schema\x20belongs\x20to\x0a\x0aRead\x20the\x20schema,\x20fix\x20your\x20params,\x20and\x20retry.\x20CACHE\x20the\x20schema\x20in\x20your\x20context\x20for\x20future\x20calls\x20to\x20the\x20SAME\x20sub-tool\x20—\x20you\x20should\x20only\x20need\x20to\x20see\x20each\x20sub-tool\x27s\x20schema\x20once\x20per\x20conversation.\x20No\x20separate\x20`schema_query`\x20call\x20is\x20needed\x20for\x20parameter\x20correction.\x0a\x0a###\x20Unified\x20Response\x20Envelope\x0a```\x0a{\x0a\x20\x20\x22result\x22:\x20{\x20\x22status\x22:\x20\x22success|error|schema_mismatch\x22,\x20\x22data\x22:\x20<sub-tool\x20output>,\x20\x22errors\x22:\x20[...]\x20},\x0a\x20\x20\x22schema\x22:\x20null\x20|\x20{\x20\x22input\x22:\x20<JSON\x20schema>,\x20\x22tool\x22:\x20\x22<sub-tool-name>\x22\x20}\x0a}\x0a```\x0a\x0a##\x20CRITICAL:\x20Schema\x20Discovery\x20Rule\x0a\x0aWhen\x20the\x20current\x20context\x20does\x20not\x20contain\x20a\x20sub-tool\x27s\x20input/output\x20schema,\x20or\x20when\x20you\x20are\x20uncertain\x20whether\x20the\x20schema\x20you\x20have\x20is\x20complete\x20and\x20up-to-date,\x20you\x20MUST\x20query\x20it\x20first\x20before\x20calling\x20the\x20sub-tool.\x20Use\x20`wowok({\x20tool:\x20\x22schema_query\x22,\x20data:\x20{\x20action:\x20\x22get\x22,\x20name:\x20\x22<sub-tool>\x22\x20}\x20})'+'`'+'\x20for\x20operational\x20sub-tool\x20schemas\x20or\x20`wowok({\x20tool:\x20\x22wowok_buildin_info\x22,\x20data:\x20{\x20info:\x20\x22...\x22\x20}\x20})`\x20for\x20protocol\x20constants\x20and\x20reference\x20data.\x20Never\x20guess\x20schema\x20parameters,\x20query\x20instruction\x20IDs,\x20or\x20type\x20codes\x20—\x20always\x20retrieve\x20them\x20from\x20the\x20live\x20server.\x0a\x0a##\x20CRITICAL:\x20Global\x20Unread\x20Messenger\x20Check\x20(every\x20conversation)\x0a\x0aAt\x20the\x20START\x20of\x20EVERY\x20conversation\x20—\x20before\x20answering\x20the\x20user\x27s\x20request,\x20regardless\x20of\x20what\x20it\x20is\x20about\x20—\x20check\x20for\x20unread\x20Messenger\x20messages\x20and\x20IMMEDIATELY\x20and\x20PROMINENTLY\x20remind\x20the\x20user\x20to\x20read\x20them:\x0a\x0a```\x0awowok({\x20tool:\x20\x22messenger_operation\x22,\x20data:\x20{\x20operation:\x20\x22watch_conversations\x22,\x20filter:\x20{\x20unreadOnly:\x20true,\x20previewMessageCount:\x200,\x20skipAutoMarkViewed:\x20true\x20}\x20}\x20})\x0a```\x0a\x0aIf\x20the\x20result\x20contains\x20any\x20conversation\x20with\x20`unreadCount\x20>\x200`,\x20surface\x20a\x20prominent\x20reminder\x20at\x20the\x20TOP\x20of\x20your\x20response\x20(do\x20not\x20wait\x20for\x20the\x20user\x20to\x20ask),\x20listing\x20each\x20peer\x20with\x20unread\x20messages\x20and\x20the\x20count.\x20Use\x20`skipAutoMarkViewed:\x20true`\x20so\x20merely\x20checking\x20does\x20not\x20mark\x20them\x20read.\x20If\x20there\x20are\x20none,\x20do\x20not\x20mention\x20the\x20check.\x0a\x0a##\x20CRITICAL:\x20Upgrade\x20&\x20Client\x20Install\x20Reminder\x20(every\x20conversation)\x0a\x0aThe\x20server\x20itself\x20compares\x20its\x20package\x20version\x20against\x20npm\x20latest\x20at\x20startup\x0aand\x20attaches\x20an\x20`upgrade_notice`\x20(plus\x20a\x20visible\x20text\x20line)\x20to\x20the\x20FIRST\x20tool\x0aresponse\x20of\x20this\x20process\x20whenever\x20the\x20local\x20MCP/SDK\x20is\x20behind.\x20ALWAYS\x20surface\x0athat\x20notice\x20to\x20the\x20user\x20immediately\x20—\x20once\x20per\x20conversation,\x20before\x20other\x0aresults.\x20Additionally,\x20at\x20the\x20START\x20of\x20EVERY\x20conversation\x20—\x20together\x20with\x20the\x0aunread\x20Messenger\x20check\x20—\x20call:\x0a\x0a```\x0awowok({\x20tool:\x20\x22wowok_buildin_info\x22,\x20data:\x20{\x20info:\x20\x22upgrade_check\x22\x20}\x20})\x0a```\x0a\x0aThen,\x20based\x20on\x20the\x20returned\x20`result.reminder`:\x0a-\x20If\x20`reminder.type\x20===\x20\x22upgrade\x22`\x20AND\x20`reminder.due\x20===\x20true`:\x20IMMEDIATELY\x20remind\x20the\x20user\x20to\x20upgrade\x20(do\x20not\x20wait\x20for\x20them\x20to\x20ask).\x20Use\x20the\x20benefit-focused\x20wording\x20below,\x20filling\x20in\x20the\x20current/latest\x20versions\x20from\x20`result.mcp`\x20/\x20`result.sdk`.\x0a-\x20If\x20`reminder.type\x20===\x20\x22install_client\x22`\x20AND\x20`reminder.due\x20===\x20true`:\x20remind\x20the\x20user\x20to\x20install\x20the\x20WoWok\x20desktop\x20client\x20(this\x20fires\x20at\x20most\x20once\x20per\x20week\x20—\x20the\x20reminder\x20state\x20is\x20persisted\x20automatically).\x0a-\x20If\x20`reminder.type\x20===\x20\x22none\x22`\x20or\x20`reminder.due\x20===\x20false`:\x20do\x20NOT\x20mention\x20upgrades\x20or\x20the\x20client.\x0a\x0aUpgrade\x20wording\x20(paraphrase\x20naturally,\x20keep\x20it\x20short\x20and\x20benefit-driven;\x20adapt\x20to\x20the\x20user\x27s\x20language):\x0a\x20\x20\x22A\x20newer\x20WoWok\x20version\x20is\x20available\x20(current\x20vX\x20→\x20latest\x20vY).\x20Upgrade\x20for\x20more\x20features\x20and\x20improvements.\x20Run:\x20npm\x20install\x20-g\x20@wowok/agent-mcp@latest\x22\x0a\x0aClient\x20install\x20wording:\x0a\x20\x20\x22The\x20WoWok\x20desktop\x20client\x20is\x20not\x20installed\x20yet.\x20It\x20provides\x20wallet\x20management,\x20encrypted\x20Messenger,\x20project\x20management\x20and\x20more.\x20Download\x20it\x20at\x20https://download.wowok.net\x20to\x20get\x20started.\x22\x0a\x0aIf\x20the\x20upgrade_check\x20itself\x20fails\x20(offline\x20/\x20registry\x20unreachable),\x20skip\x20the\x20reminder\x20—\x20never\x20fabricate\x20version\x20numbers.\x0a\x0a##\x20Token\x20System\x20Overview\x0a\x0a###\x20Default\x20Platform\x20Token:\x20WOW\x0a-\x20Token\x20Type:\x200x2::wow::WOW\x0a-\x20Precision:\x201_000_000_000\x20(9\x20decimal\x20places)\x0a-\x20This\x20is\x20the\x20default\x20token\x20for\x20all\x20operations\x20unless\x20specified\x20otherwise\x0a\x0a###\x20Multi-Token\x20Support\x0aThe\x20platform\x20supports\x20ANY\x20token\x20(e.g.,\x20USDT,\x20USDC,\x20custom\x20tokens).\x20To\x20use\x20non-WOW\x20tokens:\x0a1.\x20Use\x20query_toolkit\x20with\x20query_type=\x27token_list\x27\x20to\x20query\x20available\x20tokens\x20and\x20their\x20precision\x20info\x0a2.\x20Use\x20the\x20token\x27s\x20full\x20type\x20string\x20(e.g.,\x20\x270x2::usdt::USDT\x27)\x20in\x20token_type\x20parameter\x0a3.\x20Each\x20token\x20has\x20its\x20own\x20precision\x20-\x20always\x20verify\x20before\x20operations\x0a\x0a###\x20Token\x20Precision\x20Handling\x0aDifferent\x20tokens\x20have\x20different\x20precisions.\x20ALWAYS\x20query\x20to\x20verify:\x0a-\x20WOW\x20(default):\x201_000_000_000\x20(9\x20decimals)\x0a-\x20Other\x20tokens:\x20Use\x20query_toolkit\x20with\x20query_type=\x27token_list\x27\x20to\x20get\x20actual\x20precision\x0a-\x20Never\x20assume\x20a\x20token\x27s\x20decimal\x20places\x20-\x20always\x20query\x20first\x0a\x0a##\x20CRITICAL:\x20Token\x20Amount\x20Handling\x0a\x0a###\x20Amount\x20Input\x20Rules\x0a1.\x20WITH\x20currency\x20unit\x20(e.g.,\x20\x272WOW\x27,\x20\x2710.5WOW\x27,\x20\x27100USDT\x27):\x0a\x20\x20\x20-\x20Auto-converted\x20using\x20token\x27s\x20precision:\x202WOW\x20->\x202_000_000_000\x0a\x20\x20\x20-\x20Use\x20for:\x20All\x20on-chain\x20token\x20operations\x0a\x20\x20\x20-\x20MUST\x20match\x20the\x20token_type\x20parameter\x0a\x0a2.\x20WITHOUT\x20currency\x20unit\x20(e.g.,\x20\x272\x27,\x20\x27100\x27):\x0a\x20\x20\x20-\x20Used\x20as-is:\x202\x20->\x202\x0a\x20\x20\x20-\x20Use\x20for:\x20Regular\x20numeric\x20parameters\x20(counts,\x20indices,\x20etc.)\x0a\x0a###\x20Multi-Token\x20Operation\x20Examples\x0a-\x20Create\x20USDT-priced\x20Service:\x20token_type=\x270x2::usdt::USDT\x27,\x20amount=\x27100USDT\x27\x0a-\x20Allocate\x20USDC\x20rewards:\x20token_type=\x270x2::usdc::USDC\x27,\x20amount=\x27500USDC\x27\x0a-\x20WOW\x20remains\x20default:\x20omit\x20token_type\x20or\x20use\x20\x270x2::wow::WOW\x27\x0a\x0a###\x20Security\x20Warning\x0aToken\x20amounts\x20are\x20HIGHLY\x20SENSITIVE.\x20Always:\x0a-\x20Confirm\x20user\x27s\x20intent\x20before\x20executing\x20transfers\x0a-\x20Verify\x20token\x20type\x20and\x20amount\x20format\x20(with/without\x20unit)\x0a-\x20Query\x20token\x20precision\x20if\x20unsure\x0a-\x20Double-check\x20large\x20amount\x20transactions\x0a-\x20Never\x20assume\x20decimal\x20places\x20-\x20use\x20explicit\x20token\x20unit\x0a\x0a##\x20Sub-tool\x20Selection\x20Guide\x0a\x0aAll\x20sub-tools\x20are\x20called\x20via\x20`wowok({\x20tool:\x20\x22<sub-tool>\x22,\x20data:\x20{...}\x20})`.\x20The\x20table\x20below\x20helps\x20pick\x20the\x20correct\x20`tool`\x20value.\x0a\x0a|\x20User\x20Intent\x20|\x20Correct\x20Sub-tool\x20|\x20Wrong\x20Sub-tool\x20(Avoid)\x20|\x0a|------------|------------------|------------------------|\x0a|\x20Create\x20service\x20listing\x20|\x20onchain_operations\x20(service)\x20|\x20query_toolkit\x20|\x0a|\x20Send\x20coins\x20to\x20address\x20|\x20onchain_operations\x20(payment)\x20|\x20account_operation\x20|\x0a|\x20Check\x20my\x20balance\x20|\x20query_toolkit\x20(account_balance)\x20|\x20onchain_operations\x20|\x0a|\x20Manage\x20local\x20wallet\x20|\x20account_operation\x20|\x20onchain_operations\x20|\x0a|\x20Export\x20Guard\x20for\x20edit\x20|\x20guard2file\x20|\x20query_toolkit\x20|\x0a|\x20Send/Watch\x20encrypted\x20message\x20|\x20messenger_operation\x20|\x20onchain_operations\x20|\x0a|\x20Create\x20workflow\x20template\x20|\x20onchain_operations\x20(machine)\x20|\x20wip_file\x20|\x0a|\x20Store\x20my\x20phone\x20number\x20|\x20local_info_operation\x20|\x20onchain_operations\x20|\x0a|\x20Buy\x20service\x20(create\x20order)\x20|\x20onchain_operations\x20(order)\x20|\x20onchain_operations\x20(service)\x20|\x0a|\x20Manage\x20my\x20orders\x20|\x20onchain_operations\x20(order)\x20|\x20query_toolkit\x20|\x0a|\x20Apply\x20for\x20arbitration\x20|\x20onchain_operations\x20(order)\x20|\x20onchain_operations\x20(arbitration)\x20|\x0a|\x20Create\x20reward\x20pool\x20for\x20marketing\x20|\x20onchain_operations\x20(reward)\x20|\x20onchain_operations\x20(treasury)\x20|\x0a|\x20Claim\x20rewards\x20from\x20pool\x20|\x20onchain_operations\x20(reward)\x20|\x20query_toolkit\x20|\x0a|\x20Create\x20fund\x20allocation\x20plan\x20|\x20onchain_operations\x20(allocation)\x20|\x20onchain_operations\x20(treasury)\x20|\x0a|\x20Execute\x20fund\x20distribution\x20|\x20onchain_operations\x20(allocation)\x20|\x20onchain_operations\x20(payment)\x20|\x0a|\x20Post\x20service\x20demand\x20with\x20reward\x20|\x20onchain_operations\x20(demand)\x20|\x20onchain_operations\x20(service)\x20|\x0a|\x20Submit\x20solution\x20for\x20demand\x20|\x20onchain_operations\x20(demand)\x20|\x20onchain_operations\x20(order)\x20|\x0a|\x20Create\x20team\x20treasury\x20|\x20onchain_operations\x20(treasury)\x20|\x20onchain_operations\x20(allocation)\x20|\x0a|\x20Deposit/Withdraw\x20from\x20treasury\x20|\x20onchain_operations\x20(treasury)\x20|\x20onchain_operations\x20(payment)\x20|\x0a|\x20Create\x20access\x20control\x20rules\x20|\x20onchain_operations\x20(permission)\x20|\x20onchain_operations\x20(guard)\x20|\x0a|\x20Create\x20validation\x20rules\x20(Guard)\x20|\x20onchain_operations\x20(guard)\x20|\x20onchain_operations\x20(permission)\x20|\x0a|\x20Export\x20Guard\x20for\x20editing\x20|\x20guard2file\x20|\x20query_toolkit\x20|\x0a|\x20Export\x20Machine\x20nodes\x20for\x20editing\x20|\x20machineNode2file\x20|\x20query_toolkit\x20|\x0a|\x20Query\x20token\x20list\x20and\x20precision\x20|\x20query_toolkit\x20(token_list)\x20|\x20wowok_buildin_info\x20|\x0a|\x20Watch\x20on-chain\x20events\x20|\x20onchain_events\x20|\x20query_toolkit\x20|\x0a|\x20Generate\x20WIP\x20promise\x20file\x20|\x20wip_file\x20(generate)\x20|\x20messenger_operation\x20|\x0a|\x20Sign\x20WIP\x20file\x20|\x20wip_file\x20(sign)\x20|\x20account_operation\x20(signData)\x20|\x0a|\x20Verify\x20WIP\x20file\x20integrity\x20|\x20wip_file\x20(verify)\x20|\x20query_toolkit\x20|\x0a|\x20Send\x20encrypted\x20file\x20via\x20messenger\x20|\x20messenger_operation\x20(send_file)\x20|\x20wip_file\x20|\x0a|\x20Generate\x20Witness\x20Timestamped\x20Sequence\x20(WTS)\x20|\x20messenger_operation\x20(generate_wts)\x20|\x20wip_file\x20|\x0a|\x20Query\x20protocol\x20constants\x20|\x20wowok_buildin_info\x20|\x20query_toolkit\x20|\x0a|\x20Query\x20sub-tool\x20schemas\x20|\x20schema_query\x20|\x20wowok_buildin_info\x20|\x0a|\x20Cross-chain\x20bridge\x20(WOW<->EVM)\x20|\x20bridge_operation\x20|\x20onchain_operations\x20|\x0a|\x20On-chain\x20business\x20intelligence\x20(panoramas,\x20review\x20packs)\x20|\x20query_toolkit\x20|\x20onchain_operations\x20|\x0a|\x20Runtime\x20service\x20toggles\x20|\x20config_operation\x20|\x20—\x20|\x0a|\x20Query\x20dynamic\x20table\x20data\x20/\x20table\x20items\x20|\x20onchain_table_data\x20|\x20query_toolkit\x20|\x0a|\x20Business\x20evaluation\x20(match/game/evidence)\x20|\x20evaluation_operation\x20|\x20query_toolkit\x20|\x0a|\x20Set\x20user\x20persona\x20/\x20preferences\x20|\x20persona_operation\x20|\x20local_info_operation\x20|\x0a|\x20Match\x20business\x20intent\x20to\x20chain\x20events\x20|\x20intent_radar\x20|\x20onchain_events\x20|\x0a|\x20Manage\x20employee\x20KPI\x20/\x20liability\x20|\x20employee_operation\x20|\x20onchain_operations\x20|\x0a|\x20Scaffold\x20/\x20register\x20industry\x20pack\x20|\x20industry_pack_operation\x20|\x20persona_operation\x20|\x0a|\x20Read\x20/\x20write\x20local\x20workspace\x20files\x20|\x20workspace_operation\x20|\x20local_info_operation\x20|\x0a|\x20List\x20local-account\x20actionable\x20progress\x20/\x20advance\x20forward\x20|\x20workflow_operation\x20|\x20onchain_operations\x20|\x0a|\x20List\x20Permissions\x20related\x20to\x20local\x20accounts\x20|\x20permission_operation\x20|\x20query_toolkit\x20|\x0a|\x20Ask\x20the\x20user\x20to\x20choose\x20between\x20concrete\x20business\x20options\x20(plans/pricing/guard\x20strength/accounts)\x20|\x20ask_user\x20|\x20onchain_operations\x20/\x20prose\x20questions\x20|\x0a\x0a##\x20Sub-tool\x20Categories\x0a\x0a###\x20LOCAL\x20ONLY\x20(Never\x20touch\x20blockchain):\x0a-\x20account_operation\x0a-\x20local_mark_operation\x0a-\x20local_info_operation\x0a-\x20persona_operation\x0a-\x20employee_operation\x0a-\x20industry_pack_operation\x0a-\x20workspace_operation\x0a\x0a###\x20ON-CHAIN\x20(Blockchain\x20transactions):\x0a-\x20onchain_operations\x0a-\x20workflow_operation\x20(operate\x20advances/holds\x20progress\x20on-chain;\x20list\x20is\x20read-only)\x0a-\x20messenger_operation\x20(some\x20operations)\x0a-\x20wip_file\x20(sign\x20operation)\x0a-\x20bridge_operation\x0a\x0a###\x20QUERY\x20(Read-only):\x0a-\x20query_toolkit\x0a-\x20onchain_events\x0a-\x20onchain_table_data\x0a-\x20wowok_buildin_info\x0a-\x20schema_query\x0a-\x20guard2file\x0a-\x20machineNode2file\x0a-\x20evaluation_operation\x0a-\x20intent_radar\x0a-\x20permission_operation\x0a\x0a###\x20WORKFLOW\x20&\x20ANALYTICS:\x0a-\x20config_operation\x0a';function buildServer(){const a=new McpServer(createServerConfig(packageJson,SERVER_DESCRIPTION),createCapabilitiesConfig());return registerAllTools(a),a;}export{OnchainOperationsSchema,WipOperationsSchema,WatchQueryOperationsSchema,AccountOperationSchema,LocalMarkOperationSchema,LocalInfoOperationSchema,LocalHistoryOperationSchema,ProtocolInfoQuerySchema,CallOutputSchema,MessengerOperationInputSchema,MessengerOperationOutputSchema};async function main(){{const f=pinInstance(packageJson['version'],fileURLToPath(import.meta.url));console['error']('Instance\x20pinned:\x20pid='+process['pid']+'\x20v'+packageJson['version']+'\x20('+f['warnings']['length']+'\x20other\x20generation(s)\x20live)');for(const g of f['warnings'])console['error']('[version-reconcile]\x20'+g);f['selfIsStale']&&process['env']['WOWOK_ALLOW_MIXED_GENERATIONS']!=='1'&&(console['error']('[version-reconcile]\x20FATAL:\x20a\x20newer\x20generation\x20(v'+f['newer']?.['version']+',\x20pid\x20'+f['newer']?.['pid']+')\x20is\x20already\x20'+('live\x20—\x20this\x20instance\x20serves\x20v'+packageJson['version']+'\x20and\x20REFUSES\x20service\x20so\x20no\x20call\x20can\x20be\x20answered\x20')+'by\x20stale\x20code\x20(mtwv2\x20F-01).\x20Restart\x20this\x20client\x20connection\x20to\x20spawn\x20the\x20current\x20build,\x20or\x20set\x20'+'WOWOK_ALLOW_MIXED_GENERATIONS=1\x20to\x20opt\x20out.'),process['exit'](0x1));}if(areSchemasAvailable()){const h=getSchemaIndex();h&&console['error']('Schema\x20system\x20ready:\x20'+(h['tools']?.['length']||0x0)+'\x20tools,\x20'+(h['operations']?.['length']||0x0)+'\x20operations');}else console['error']('Schema\x20files\x20not\x20available.\x20Run\x20\x27npm\x20run\x20generate:schemas\x27\x20to\x20generate\x20them.');const a=process['env']['WOWOK_DIST_STALENESS']==='enforce';try{const i=await import('path'),j=i['dirname'](fileURLToPath(import.meta.url)),k=i['resolve'](j,'../../../ts-sdk/packages/wowok'),l=[{'label':'SDK','stale':computeSrcDistStaleness(i['join'](k,'src'),i['join'](k,'dist','esm')),'rebuild':'pnpm\x20build\x20(SDK\x20workspace)'},{'label':'MCP','stale':computeSrcDistStaleness(i['join'](j,'..','src'),i['join'](j,'..','dist'),{'srcExt':'.ts','distExt':'.js'}),'rebuild':'pnpm\x20build\x20(MCP\x20server\x20workspace)'}];for(const m of l){if(m['stale']===null)continue;if(m['stale']['stale']){const n=m['stale']['basis']==='content-hash'?'[dist-reconcile]\x20STALE\x20'+m['label']+'\x20DIST:\x20workspace\x20src\x20CONTENT\x20differs\x20from\x20the\x20dist\x20build\x20stamp\x20'+'(exact\x20hash\x20comparison,\x20mtime-independent)\x20—\x20the\x20runtime\x20may\x20lack\x20features\x20the\x20schemas/docs\x20'+('describe.\x20Rebuild:\x20'+m['rebuild']):'[dist-reconcile]\x20STALE\x20'+m['label']+'\x20DIST:\x20workspace\x20src\x20is\x20newer\x20than\x20dist\x20by\x20'+(m['stale']['lag_minutes']+'\x20min\x20—\x20the\x20runtime\x20may\x20lack\x20features\x20the\x20schemas/docs\x20')+('describe.\x20Rebuild:\x20'+m['rebuild']);a&&(console['error']('[dist-reconcile]\x20ENFORCE\x20MODE\x20(WOWOK_DIST_STALENESS=enforce):\x20'+n),process['exit'](0x1)),console['error'](n);}else console['error']('dist-reconcile:\x20'+m['label']+'\x20dist\x20is\x20current');}}catch(o){console['error']('[dist-reconcile]\x20check\x20failed\x20(non-fatal):\x20'+o['message']);}primeUpgradeLookup();if(upgradeEnforceEnabled()){const p=await getStartupUpgradeNotice(0x1f40);p&&(console['error']('[upgrade-check]\x20ENFORCED\x20(WOWOK_UPGRADE_ENFORCE=1):\x20'+p['message']),process['exit'](0x1));}const b=listServices()['filter'](q=>q['enabled'])['map'](q=>q['name']);console['error']('Phase\x202\x20active\x20services:\x20'+(b['join'](',\x20')||'none'));try{const q=scanDefaultIndustryPacks(),r=q['filter'](s=>s['ok'])['length'];console['error']('Industry\x20packs\x20ready:\x20'+r+'/'+q['length']+'\x20registered\x20at\x20startup');}catch(s){console['error']('[industry]\x20startup\x20bootstrap\x20failed:\x20'+s['message']);}if(process['env']['MONITOR_LOOP']==='1')try{const t=await monitorLoop['start']();console['error']('MonitorLoop\x20started\x20(MONITOR_LOOP=1):\x20'+t['join'](',\x20'));}catch(u){console['error']('[monitor]\x20MonitorLoop\x20start\x20failed:\x20'+(u?.['message']??u));}const d=serveStdio(()=>buildServer());serverHandle=d,process['on']('SIGINT',()=>{void shutdown('SIGINT\x20—\x20graceful\x20shutdown');}),process['on']('SIGTERM',()=>{void shutdown('SIGTERM\x20—\x20graceful\x20shutdown');});}main()['catch'](console['error']);