@wowok/agent-mcp 3.1.6 → 3.2.0

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 (235) hide show
  1. package/dist/config/exposure.d.ts +10 -10
  2. package/dist/config/judgment.d.ts +25 -25
  3. package/dist/config/rule-engine.d.ts +25 -25
  4. package/dist/customer/user-preferences.d.ts +2 -2
  5. package/dist/evaluation/arbitration-game.js +1 -1
  6. package/dist/evaluation/capability.d.ts +1 -1
  7. package/dist/evaluation/extract.js +1 -1
  8. package/dist/evaluation/match-operation.js +1 -1
  9. package/dist/extensions/industry-pack.d.ts +3 -2
  10. package/dist/extensions/industry-pack.js +1 -1
  11. package/dist/extensions/modes.js +1 -1
  12. package/dist/extensions/registry.js +1 -1
  13. package/dist/extensions/types.d.ts +1 -0
  14. package/dist/graph/onchain/analyze.js +1 -1
  15. package/dist/graph/onchain/analyze.spec.js +1 -1
  16. package/dist/graph/onchain/edge-schema.js +1 -1
  17. package/dist/graph/onchain/extract.js +1 -1
  18. package/dist/graph/onchain/field-manifest.js +1 -1
  19. package/dist/graph/onchain/project-relationship.js +1 -1
  20. package/dist/graph/onchain/types.d.ts +1 -1
  21. package/dist/harness/recover.js +1 -1
  22. package/dist/keeper/KeeperScan.d.ts +2 -1
  23. package/dist/keeper/KeeperScan.js +1 -1
  24. package/dist/keeper/detectors.d.ts +9 -0
  25. package/dist/keeper/detectors.js +1 -1
  26. package/dist/keeper/keeper.spec.js +1 -1
  27. package/dist/keeper/types.d.ts +1 -1
  28. package/dist/keeper/types.js +1 -1
  29. package/dist/knowledge/allocation-ledger.d.ts +4 -1
  30. package/dist/knowledge/allocation-ledger.js +1 -1
  31. package/dist/knowledge/allocation-puzzle.d.ts +2 -0
  32. package/dist/knowledge/allocation-puzzle.js +1 -1
  33. package/dist/knowledge/allocation-risk.d.ts +1 -1
  34. package/dist/knowledge/allocation-risk.js +1 -1
  35. package/dist/knowledge/arb-risk.d.ts +3 -1
  36. package/dist/knowledge/arb-risk.js +1 -1
  37. package/dist/knowledge/arbitration-ledger.js +1 -1
  38. package/dist/knowledge/arbitration-risk.js +1 -1
  39. package/dist/knowledge/arbitration-templates.d.ts +1 -0
  40. package/dist/knowledge/arbitration-templates.js +1 -1
  41. package/dist/knowledge/audit-rules.d.ts +13 -2
  42. package/dist/knowledge/audit-rules.js +1 -1
  43. package/dist/knowledge/baselines/rules/allocation.json +50 -1
  44. package/dist/knowledge/baselines/rules/arb.json +20 -1
  45. package/dist/knowledge/baselines/rules/arbitration.json +27 -0
  46. package/dist/knowledge/baselines/rules/guard.json +75 -2
  47. package/dist/knowledge/baselines/rules/machine.json +38 -13
  48. package/dist/knowledge/baselines/rules/order.json +2 -2
  49. package/dist/knowledge/builtin-templates.d.ts +3 -1
  50. package/dist/knowledge/builtin-templates.js +1 -1
  51. package/dist/knowledge/event-semantics.js +1 -1
  52. package/dist/knowledge/fund-layer.js +1 -1
  53. package/dist/knowledge/getting-started.js +1 -1
  54. package/dist/knowledge/guard-anchor-reach.d.ts +19 -0
  55. package/dist/knowledge/guard-anchor-reach.js +1 -0
  56. package/dist/knowledge/guard-bindings.js +1 -1
  57. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  58. package/dist/knowledge/guard-design-patterns.js +1 -1
  59. package/dist/knowledge/guard-ledger.js +1 -1
  60. package/dist/knowledge/guard-lint.js +1 -1
  61. package/dist/knowledge/guard-render.d.ts +6 -0
  62. package/dist/knowledge/guard-render.js +1 -1
  63. package/dist/knowledge/guard-risk.js +1 -1
  64. package/dist/knowledge/guard-submission-prompt.d.ts +6 -0
  65. package/dist/knowledge/guard-submission-prompt.js +1 -1
  66. package/dist/knowledge/guard-templates.d.ts +1 -1
  67. package/dist/knowledge/guard-templates.js +1 -1
  68. package/dist/knowledge/index.d.ts +4 -4
  69. package/dist/knowledge/index.js +1 -1
  70. package/dist/knowledge/industry-generalizer.js +1 -1
  71. package/dist/knowledge/industry-registry.d.ts +1 -1
  72. package/dist/knowledge/industry-registry.js +1 -1
  73. package/dist/knowledge/jsonrpc-enum.js +1 -1
  74. package/dist/knowledge/machine-ledger.js +1 -1
  75. package/dist/knowledge/machine-risk.js +1 -1
  76. package/dist/knowledge/machine-templates.js +1 -1
  77. package/dist/knowledge/order-ledger.js +1 -1
  78. package/dist/knowledge/order-templates.js +1 -1
  79. package/dist/knowledge/permission-ledger.js +1 -1
  80. package/dist/knowledge/release-sentinel.d.ts +12 -0
  81. package/dist/knowledge/release-sentinel.js +1 -0
  82. package/dist/knowledge/repository-write-semantics.d.ts +27 -0
  83. package/dist/knowledge/repository-write-semantics.js +1 -0
  84. package/dist/knowledge/rule-node-analyzers.d.ts +6 -0
  85. package/dist/knowledge/rule-node-analyzers.js +1 -1
  86. package/dist/knowledge/safety-rules.d.ts +5 -1
  87. package/dist/knowledge/safety-rules.js +1 -1
  88. package/dist/knowledge/scenario-modes.d.ts +10 -1
  89. package/dist/knowledge/scenario-modes.js +1 -1
  90. package/dist/knowledge/service-allocation-semantics.d.ts +36 -0
  91. package/dist/knowledge/service-allocation-semantics.js +1 -0
  92. package/dist/knowledge/strategy-manuals.d.ts +3 -5
  93. package/dist/knowledge/strategy-manuals.js +1 -1
  94. package/dist/knowledge/template-loader.d.ts +28 -12
  95. package/dist/knowledge/template-loader.js +1 -1
  96. package/dist/knowledge/template-registry.js +1 -1
  97. package/dist/knowledge/template-scanner.js +1 -1
  98. package/dist/knowledge/tools-reference.js +1 -1
  99. package/dist/knowledge/workflow-guidance.d.ts +26 -0
  100. package/dist/knowledge/workflow-guidance.js +1 -1
  101. package/dist/monitor/MonitorLoop.js +1 -1
  102. package/dist/participation/allocation-advice.d.ts +38 -0
  103. package/dist/participation/allocation-advice.js +1 -0
  104. package/dist/participation/radar-core.d.ts +2 -0
  105. package/dist/persona/types.d.ts +3 -2
  106. package/dist/persona/types.js +1 -1
  107. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  108. package/dist/playbooks/service-build/intent-analyzer.js +1 -1
  109. package/dist/playbooks/service-build/merchant-guide.d.ts +70 -63
  110. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  111. package/dist/playbooks/service-build/migration-planner.js +1 -1
  112. package/dist/playbooks/service-build/mode-actions.d.ts +5 -0
  113. package/dist/playbooks/service-build/mode-actions.js +1 -1
  114. package/dist/playbooks/service-build/participation-radar.js +1 -1
  115. package/dist/playbooks/service-build/semantic-graph.d.ts +1 -0
  116. package/dist/playbooks/service-build/semantic-graph.js +1 -1
  117. package/dist/playbooks/service-build/service-quote.d.ts +2 -0
  118. package/dist/playbooks/service-build/service-quote.js +1 -0
  119. package/dist/relationship/derivation.d.ts +1 -1
  120. package/dist/safety/confirm-gate.js +1 -1
  121. package/dist/schema/benchmark-migration/index.d.ts +30 -8
  122. package/dist/schema/benchmark-migration/index.js +1 -1
  123. package/dist/schema/call/allocation.d.ts +6 -3
  124. package/dist/schema/call/arbitration.js +1 -1
  125. package/dist/schema/call/base.d.ts +4 -0
  126. package/dist/schema/call/base.js +1 -1
  127. package/dist/schema/call/bridge.d.ts +1 -0
  128. package/dist/schema/call/error-codes.d.ts +1 -1
  129. package/dist/schema/call/error-codes.js +1 -1
  130. package/dist/schema/call/guard.d.ts +8 -8
  131. package/dist/schema/call/machine.d.ts +56 -0
  132. package/dist/schema/call/machine.js +1 -1
  133. package/dist/schema/call/order.js +1 -1
  134. package/dist/schema/call/payment.js +1 -1
  135. package/dist/schema/call/semantic.js +1 -1
  136. package/dist/schema/call/service.d.ts +84 -22
  137. package/dist/schema/call/service.js +1 -1
  138. package/dist/schema/common/index.js +1 -1
  139. package/dist/schema/common/tokentype-short-probe.spec.js +1 -0
  140. package/dist/schema/evaluation/index.d.ts +8 -80
  141. package/dist/schema/evaluation/index.js +1 -1
  142. package/dist/schema/goal/index.d.ts +9 -42
  143. package/dist/schema/goal/planning.d.ts +25 -60
  144. package/dist/schema/goal/planning.js +1 -1
  145. package/dist/schema/intent-radar/index.d.ts +2 -20
  146. package/dist/schema/intent-radar/index.js +1 -1
  147. package/dist/schema/interaction/index.d.ts +1 -1
  148. package/dist/schema/keeper/index.d.ts +3 -0
  149. package/dist/schema/keeper/index.js +1 -1
  150. package/dist/schema/local/index.d.ts +8 -0
  151. package/dist/schema/local/index.js +1 -1
  152. package/dist/schema/local/wip.d.ts +73 -0
  153. package/dist/schema/local/wip.js +1 -1
  154. package/dist/schema/operations.d.ts +92 -14
  155. package/dist/schema/operations.js +1 -1
  156. package/dist/schema/persona/index.d.ts +279 -384
  157. package/dist/schema/persona/index.js +1 -1
  158. package/dist/schema/query/bi.d.ts +149 -10
  159. package/dist/schema/query/bi.js +1 -1
  160. package/dist/schema/query/index.d.ts +38 -19
  161. package/dist/schema/query/index.js +1 -1
  162. package/dist/schema/schema-query/index.d.ts +4 -4
  163. package/dist/schema/schema-version.js +1 -1
  164. package/dist/schema/watch/index.d.ts +2 -2
  165. package/dist/schema-query-impl/index.d.ts +1 -0
  166. package/dist/schema-query-impl/index.js +1 -1
  167. package/dist/schemas/account_operation.output.json +3 -2
  168. package/dist/schemas/benchmark_migration_operation.output.json +116 -2
  169. package/dist/schemas/benchmark_migration_operation.schema.json +2 -10
  170. package/dist/schemas/bridge_operation.output.json +3 -2
  171. package/dist/schemas/evaluation_operation.schema.json +7 -70
  172. package/dist/schemas/goal_operation.schema.json +6 -39
  173. package/dist/schemas/index.json +1 -1
  174. package/dist/schemas/intent_radar.output.json +4 -20
  175. package/dist/schemas/keeper_operation.output.json +2 -2
  176. package/dist/schemas/keeper_operation.schema.json +9 -4
  177. package/dist/schemas/local_history_operation.output.json +3 -2
  178. package/dist/schemas/local_info_operation.output.json +3 -2
  179. package/dist/schemas/local_mark_operation.output.json +3 -2
  180. package/dist/schemas/messenger_operation.output.json +2 -2
  181. package/dist/schemas/monitor_events.output.json +2 -2
  182. package/dist/schemas/monitor_subscription.output.json +2 -2
  183. package/dist/schemas/onchain_events.output.json +2 -2
  184. package/dist/schemas/onchain_operations.output.json +7 -6
  185. package/dist/schemas/onchain_operations.schema.json +227 -54
  186. package/dist/schemas/onchain_operations_allocation.schema.json +11 -10
  187. package/dist/schemas/onchain_operations_arbitration.schema.json +13 -13
  188. package/dist/schemas/onchain_operations_machine.schema.json +27 -5
  189. package/dist/schemas/onchain_operations_order.schema.json +1 -1
  190. package/dist/schemas/onchain_operations_payment.schema.json +2 -2
  191. package/dist/schemas/onchain_operations_reward.schema.json +1 -1
  192. package/dist/schemas/onchain_operations_service.schema.json +171 -21
  193. package/dist/schemas/onchain_operations_treasury.schema.json +1 -1
  194. package/dist/schemas/onchain_table_data.output.json +57 -4
  195. package/dist/schemas/persona_operation.output.json +11 -88
  196. package/dist/schemas/persona_operation.schema.json +4 -32
  197. package/dist/schemas/query_toolkit.output.json +320 -22
  198. package/dist/schemas/query_toolkit.schema.json +53 -0
  199. package/dist/schemas/wip_file.output.json +221 -0
  200. package/dist/schemas/wip_file.schema.json +125 -0
  201. package/dist/tools/handlers/benchmark-migration.js +1 -1
  202. package/dist/tools/handlers/config.js +1 -1
  203. package/dist/tools/handlers/dispatch-expectations.spec.js +1 -1
  204. package/dist/tools/handlers/keeper.d.ts +1 -1
  205. package/dist/tools/handlers/onchain.js +1 -1
  206. package/dist/tools/handlers/query.js +1 -1
  207. package/dist/tools/handlers/schema-query.js +1 -1
  208. package/dist/tools/handlers/wip-upload.d.ts +22 -0
  209. package/dist/tools/handlers/wip-upload.js +1 -0
  210. package/dist/tools/handlers/wip.js +1 -1
  211. package/dist/tools/index.js +1 -1
  212. package/dist/tools/move-fn-index.gen.js +1 -1
  213. package/dist/tools/registry/business.js +1 -1
  214. package/dist/tools/registry/files.js +1 -1
  215. package/dist/tools/wip-deploy-assist.js +1 -1
  216. package/dist/tools/wrap.js +1 -1
  217. package/package.json +2 -2
  218. package/dist/knowledge/alloc-audit-policy.spec.js +0 -1
  219. package/dist/knowledge/event-semantics.spec.d.ts +0 -1
  220. package/dist/knowledge/event-semantics.spec.js +0 -1
  221. package/dist/knowledge/facts-sync.spec.d.ts +0 -1
  222. package/dist/knowledge/facts-sync.spec.js +0 -1
  223. package/dist/knowledge/guard-design-patterns.spec.d.ts +0 -1
  224. package/dist/knowledge/guard-design-patterns.spec.js +0 -1
  225. package/dist/knowledge/guard-eval.spec.d.ts +0 -1
  226. package/dist/knowledge/guard-eval.spec.js +0 -1
  227. package/dist/knowledge/rule-node-analyzers.spec.d.ts +0 -1
  228. package/dist/knowledge/rule-node-analyzers.spec.js +0 -1
  229. package/dist/knowledge/safety-rules.extract-amount.spec.d.ts +0 -1
  230. package/dist/knowledge/safety-rules.extract-amount.spec.js +0 -1
  231. package/dist/knowledge/template-loader.spec.d.ts +0 -1
  232. package/dist/knowledge/template-loader.spec.js +0 -1
  233. package/dist/knowledge/template-scanner.spec.d.ts +0 -1
  234. package/dist/knowledge/template-scanner.spec.js +0 -1
  235. /package/dist/{knowledge/alloc-audit-policy.spec.d.ts → schema/common/tokentype-short-probe.spec.d.ts} +0 -0
@@ -17,14 +17,7 @@
17
17
  },
18
18
  "industry": {
19
19
  "type": "string",
20
- "enum": [
21
- "freelance",
22
- "rental",
23
- "education",
24
- "travel",
25
- "subscription",
26
- "retail"
27
- ]
20
+ "pattern": "^[a-z][a-z0-9_]*$"
28
21
  },
29
22
  "role": {
30
23
  "type": "string",
@@ -92,14 +85,7 @@
92
85
  "type": "array",
93
86
  "items": {
94
87
  "type": "string",
95
- "enum": [
96
- "freelance",
97
- "rental",
98
- "education",
99
- "travel",
100
- "subscription",
101
- "retail"
102
- ]
88
+ "pattern": "^[a-z][a-z0-9_]*$"
103
89
  }
104
90
  },
105
91
  "long_term": {
@@ -5832,14 +5818,7 @@
5832
5818
  "type": "array",
5833
5819
  "items": {
5834
5820
  "type": "string",
5835
- "enum": [
5836
- "freelance",
5837
- "rental",
5838
- "education",
5839
- "travel",
5840
- "subscription",
5841
- "retail"
5842
- ]
5821
+ "pattern": "^[a-z][a-z0-9_]*$"
5843
5822
  }
5844
5823
  },
5845
5824
  "mode": {
@@ -5909,14 +5888,7 @@
5909
5888
  "type": "array",
5910
5889
  "items": {
5911
5890
  "type": "string",
5912
- "enum": [
5913
- "freelance",
5914
- "rental",
5915
- "education",
5916
- "travel",
5917
- "subscription",
5918
- "retail"
5919
- ]
5891
+ "pattern": "^[a-z][a-z0-9_]*$"
5920
5892
  }
5921
5893
  },
5922
5894
  "delta": {
@@ -2378,7 +2378,7 @@
2378
2378
  "type": "string"
2379
2379
  }
2380
2380
  ],
2381
- "description": "Current REMAINING stock of the product or service. Each order DECREMENTS it by the ordered quantity (a buy aborts when the remaining stock is lower than the ordered quantity). Writing this field SETS the remaining stock to the given value — it is NOT added to it. To top up one product's stock without resending the whole list, there is no per-item op in this tool; re-issue sales with op:\"set\" carrying the full list and the updated stock for that product."
2381
+ "description": "Current REMAINING stock of the product or service. Each order DECREMENTS it by the ordered quantity (a buy aborts when the remaining stock is lower than the ordered quantity). Writing this field SETS the remaining stock to the given value — it is NOT added to it. To change one product without resending the whole list, use the per-item sales ops on onchain_operations service: stock_add / stock_reduce (deltas), price_add / price_reduce (deltas), sale_suspension (suspend/resume one product)."
2382
2382
  },
2383
2383
  "suspension": {
2384
2384
  "type": "boolean",
@@ -2595,7 +2595,7 @@
2595
2595
  "type": "string"
2596
2596
  }
2597
2597
  ],
2598
- "description": "Allocation value. SEMANTICS DEPEND ON `mode`:\n• mode='Amount': absolute amount in smallest unit (e.g., '750000000' for 0.75 WOW, '250000000' for 0.25 WOW). Allocated first; sum of Amount items cached as `fix`.\n• mode='Rate': basis-points rate, 10000 = 100% (e.g., '7500' for 75%, '2500' for 25%). When no Surplus in same Allocator, sum MUST == 10000; when Surplus present, sum MUST <= 10000.\n• mode='Surplus': IGNORED (contract forces to 0). Set to '0' for clarity. Receives remaining balance after Amount + Rate allocations.\n⚠️ T1 LOSSY POINT (B-2): the value is PRE-CONFIGURED and STATIC. A continuous/conditional amount (e.g. 'pay exactly the assessed loss amount') CANNOT be expressed — there is no runtime formula field. Model variable payouts as (a) a fixed-tier Allocator list guarded by distinct Guards, or (b) an Amount with a `max` cap — both are finite configurations, not free-form formulas."
2598
+ "description": "Allocation value. SEMANTICS DEPEND ON `mode`:\n• mode='Amount': absolute amount in smallest unit (e.g., '750000000' for 0.75 WOW, '250000000' for 0.25 WOW). Allocated first; sum of Amount items cached as `fix`.\n• mode='Rate' (NET): basis-points rate off the post-fix base (balance - fix, or max - fix), 10000 = 100% (e.g., '7500' for 75%, '2500' for 25%). When no Surplus in same Allocator, sum MUST == 10000; when Surplus present, sum MUST <= 10000.\n• mode='RateGross': basis-points rate off the FULL pool (balance) or the `max` cap — the fixed Amount total is NOT subtracted, 10000 = 100%. sum MUST <= 10000 (and, with `max` set, fix×10000 + sum×max <= max×10000). Cannot be mixed with mode='Rate' in the same Allocator while a fixed Amount total is present.\n• mode='Surplus': IGNORED (contract forces to 0). Set to '0' for clarity. Receives remaining balance after Amount + Rate/RateGross allocations.\n⚠️ T1 LOSSY POINT (B-2): the value is PRE-CONFIGURED and STATIC. A continuous/conditional amount (e.g. 'pay exactly the assessed loss amount') CANNOT be expressed — there is no runtime formula field. Model variable payouts as (a) a fixed-tier Allocator list guarded by distinct Guards, or (b) an Amount with a `max` cap — both are finite configurations, not free-form formulas."
2599
2599
  },
2600
2600
  "mode": {
2601
2601
  "anyOf": [
@@ -2604,12 +2604,13 @@
2604
2604
  "enum": [
2605
2605
  "Amount",
2606
2606
  "Rate",
2607
- "Surplus"
2607
+ "Surplus",
2608
+ "RateGross"
2608
2609
  ]
2609
2610
  },
2610
2611
  {}
2611
2612
  ],
2612
- "description": "Allocation mode — determines how the `sharing` field is interpreted. Three modes can be used individually OR combined within a single Allocator; when combined, allocation order is strictly: Amount first, then Rate, then Surplus. Understanding these modes allows modeling almost any fund distribution pattern.\n• Amount (0): `sharing` is a FIXED amount in smallest unit (e.g., '750000000' = 0.75 WOW). Allocated FIRST; sum of all Amount items is cached as `fix` by the contract. Validation: when no Rate and no Surplus items exist, sum of Amount items must be >= allocators.threshold (EAMOUNT_BELOW_THRESHOLD=12); when `max` is set, sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13).\n• Rate (1): `sharing` is a basis-points rate (10000 = 100%). Allocated AFTER Amount; formula: allocated = (sharing × total_rates) / 10000, where total_rates = balance - fix (or max - fix if `max` is set). Validation: when no Surplus items exist, sum of all Rate items must be EXACTLY 10000 (ERATE_NOT_10000=4); when Surplus items exist, sum of all Rate items must be <= 10000 (ERATE_EXCEEDS_10000=6).\n• Surplus (2): `sharing` is IGNORED (contract forces it to 0). Allocated LAST; receives the remaining balance after Amount + Rate allocations. Validation: MAX ONE Surplus item per Allocator (EMULTIPLE_SURPLUS=5). When Surplus exists, Rate sum constraint relaxes from == 10000 to <= 10000.\nALLOCATION ORDER (strict): Amount items (fixed, cached as fix) → Rate items (proportional to balance-fix) → Surplus item (remaining).\nRECOMMENDATION: Use Amount mode for known fixed amounts (clearer, no sum constraint). Use Rate mode for proportional splits (requires sum == 10000 unless Surplus present). Use Surplus to capture remainder (e.g., platform fee + host gets rest). Accepts string ('Amount'/'Rate'/'Surplus', recommended) or number (0/1/2)."
2613
+ "description": "Allocation mode — determines how the `sharing` field is interpreted. Four modes can be used individually OR combined within a single Allocator; when combined, allocation order is strictly: Amount first, then Rate/RateGross, then Surplus. Understanding these modes allows modeling almost any fund distribution pattern.\n• Amount (0): `sharing` is a FIXED amount in smallest unit (e.g., '750000000' = 0.75 WOW). Allocated FIRST; sum of all Amount items is cached as `fix` by the contract. Validation: when no Rate and no Surplus items exist, sum of Amount items must be >= allocators.threshold (EAMOUNT_BELOW_THRESHOLD=12); when `max` is set, sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13).\n• Rate (1): `sharing` is a NET basis-points rate (10000 = 100%). Allocated AFTER Amount; formula: allocated = (sharing × total_rates) / 10000, where total_rates = balance - fix (or max - fix if `max` is set) — the cached fixed Amount total IS subtracted. Validation: when no Surplus items exist, sum of all Rate items must be EXACTLY 10000 (ERATE_NOT_10000=4); when Surplus items exist, sum of all Rate items must be <= 10000 (ERATE_EXCEEDS_10000=6).\n• RateGross (3): `sharing` is a GROSS basis-points rate (10000 = 100%). Allocated AFTER Amount; formula: allocated = (sharing × total_rates) / 10000, where total_rates = balance (the full pool) or the `max` cap when set — the fixed Amount total is NOT subtracted, so fixed Amount entries and percentage-of-total rates coexist exactly. Validation: sum of all RateGross items must be <= 10000 (ERATE_EXCEEDS_10000=6); when `max` is set, fix×10000 + sum(rate)×max <= max×10000 must hold (6); with no `max` and a fixed total > 0, sum of RateGross items must be < 10000 (6). RateGross cannot be mixed with NET Rate entries in the same Allocator while a fixed Amount total is present (EMIXED_RATE_BASES=17).\n• Surplus (2): `sharing` is IGNORED (contract forces it to 0). Allocated LAST; receives the remaining balance after Amount + Rate allocations. Validation: MAX ONE Surplus item per Allocator (EMULTIPLE_SURPLUS=5). When Surplus exists, Rate sum constraint relaxes from == 10000 to <= 10000.\nALLOCATION ORDER (strict): Amount items (fixed, cached as fix) → Rate/RateGross items → Surplus item (remaining).\nRECOMMENDATION: Use Amount mode for known fixed amounts (clearer, no sum constraint). Use Rate mode for proportional splits off the post-fix remainder (requires sum == 10000 unless Surplus present). Use RateGross mode for a percentage of the FULL pool/`max` that must coexist with fixed Amount entries. Use Surplus to capture remainder (e.g., platform fee + host gets rest). Accepts string ('Amount'/'Rate'/'Surplus'/'RateGross', recommended) or number (0/1/2/3)."
2613
2614
  }
2614
2615
  },
2615
2616
  "required": [
@@ -2618,12 +2619,12 @@
2618
2619
  "mode"
2619
2620
  ],
2620
2621
  "additionalProperties": false,
2621
- "description": "Fund allocation item — one recipient's share of the Allocation balance. The `sharing` value's meaning depends on `mode` (see AllocationModeSchema). Multiple items in the same Allocator are evaluated together: Amount items first, Rate items second, Surplus last."
2622
+ "description": "Fund allocation item — one recipient's share of the Allocation balance. The `sharing` value's meaning depends on `mode` (see AllocationModeSchema). Multiple items in the same Allocator are evaluated together: Amount items first, Rate/RateGross items second, Surplus last."
2622
2623
  },
2623
- "description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. RECIPIENT SEMANTICS: the Guard constrains what each submission slot may be; a recipient's safety follows from the sufficiency of those constraints (run the recipient constraint audit). Canonical order pattern: recipient = the single submitted Order — funds land at that object and are receivable only by its owner. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
2624
+ "description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate/RateGross + Surplus) within the same Allocator. RECIPIENT SEMANTICS: the Guard constrains what each submission slot may be; a recipient's safety follows from the sufficiency of those constraints (run the recipient constraint audit). Canonical order pattern: recipient = the single submitted Order — funds land at that object and are receivable only by its owner. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix; RateGross proportional to the full pool) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; NET Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); RateGross sum must <= 10000 (never mixed with NET Rate while a fixed total is present); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
2624
2625
  },
2625
2626
  "fix": {
2626
- "description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract when the allocator is added — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for Rate allocation.",
2627
+ "description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract when the allocator is added — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for NET Rate allocation (RateGross ignores fix and uses the full pool/`max`).",
2627
2628
  "anyOf": [
2628
2629
  {
2629
2630
  "type": "number"
@@ -2634,7 +2635,7 @@
2634
2635
  ]
2635
2636
  },
2636
2637
  "max": {
2637
- "description": "Maximum allocation cap (OPTIONAL — omit the field or set to null to disable the cap; do NOT set to 0 as that means a cap of zero). Passed through to the contract as Option<u64> when the allocator is added: when null/omitted the contract treats it as `none` (no cap); when set, the contract enforces it. Has THREE effects when set:\n1. Construction: sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13)\n2. Rate execution: total_rates = max - fix (instead of balance - fix)\n3. Surplus execution: surplus_amount = max - alloced_amount (instead of balance - alloced_amount)\nUse when you want to cap total allocation regardless of Order balance (e.g., cap payout to declared amount). SDK pre-validates Amount sum <= max at build time to give actionable error messages before on-chain abort.",
2638
+ "description": "Maximum allocation cap (OPTIONAL — omit the field or set to null to disable the cap; do NOT set to 0 as that means a cap of zero). Passed through to the contract as Option<u64> when the allocator is added: when null/omitted the contract treats it as `none` (no cap); when set, the contract enforces it. Has THREE effects when set:\n1. Construction: sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13)\n2. Rate execution: NET Rate total_rates = max - fix; RateGross total_rates = max (fix NOT subtracted)\n3. Surplus execution: surplus_amount = max - alloced_amount (instead of balance - alloced_amount)\nUse when you want to cap total allocation regardless of Order balance (e.g., cap payout to declared amount). SDK pre-validates Amount sum <= max at build time to give actionable error messages before on-chain abort.",
2638
2639
  "anyOf": [
2639
2640
  {
2640
2641
  "anyOf": [
@@ -2658,7 +2659,7 @@
2658
2659
  "sharing"
2659
2660
  ],
2660
2661
  "additionalProperties": false,
2661
- "description": "Fund allocator — a complete allocation strategy triggered by a Guard. Contains a sharing[] array where items can mix Amount/Rate/Surplus modes. When the Guard passes, the contract allocates funds in strict order: Amount → Rate → Surplus."
2662
+ "description": "Fund allocator — a complete allocation strategy triggered by a Guard. Contains a sharing[] array where items can mix Amount/Rate/RateGross/Surplus modes. When the Guard passes, the contract allocates funds in strict order: Amount → Rate/RateGross → Surplus."
2662
2663
  },
2663
2664
  "description": "Fund allocator list. Each allocator is evaluated in order; the FIRST allocator whose Guard passes wins. This enables mutually exclusive allocation paths (e.g., 3 allocators for 3 forward paths: refund / damage-deduct / arbitrate)."
2664
2665
  }
@@ -2669,7 +2670,7 @@
2669
2670
  "allocators"
2670
2671
  ],
2671
2672
  "additionalProperties": false,
2672
- "description": "Fund allocator list — the top-level allocation configuration attached to an Order. Contains a threshold and a list of Allocators. When funds arrive at the Order, the first Allocator whose Guard passes executes its sharing[] in strict order: Amount → Rate → Surplus. MULTI-TIER ALLOCATION (DOC-04): Each Order binds ONE Allocators template (set on Service.order_allocators before publish). For multi-tier distribution (e.g., customer→agency→suppliers), use a two-phase approach: (1) Tier-1 Allocators on the customer's Order (allocates to agency + refund fund); (2) Tier-2 Allocators on a NEW Order created by the agency (allocates agency's received funds to suppliers). Each tier's Rate-mode sharing[] must independently sum to 10000 (or <= 10000 with Surplus)."
2673
+ "description": "Fund allocator list — the top-level allocation configuration attached to an Order. Contains a threshold and a list of Allocators. When funds arrive at the Order, the first Allocator whose Guard passes executes its sharing[] in strict order: Amount → Rate/RateGross → Surplus. MULTI-TIER ALLOCATION (DOC-04): Each Order binds ONE Allocators template (set on Service.order_allocators before publish). For multi-tier distribution (e.g., customer→agency→suppliers), use a two-phase approach: (1) Tier-1 Allocators on the customer's Order (allocates to agency + refund fund); (2) Tier-2 Allocators on a NEW Order created by the agency (allocates agency's received funds to suppliers). Each tier's NET Rate-mode sharing[] must independently sum to 10000 (or <= 10000 with Surplus); RateGross-mode sharing[] must sum to <= 10000."
2673
2674
  },
2674
2675
  {
2675
2676
  "type": "null"
@@ -3077,7 +3078,7 @@
3077
3078
  "type": "null"
3078
3079
  }
3079
3080
  ],
3080
- "description": "Contact object ID (recipient) or WTS Proof object (delivery proof) that information has been delivered via Wowok Messenger."
3081
+ "description": "Buyer-recorded credential that the required information was delivered via Wowok Messenger: the merchant's IM user address (resolved from the Service's Contact) or a WTS Proof object id (on-chain delivery proof embedding that IM address and timestamp)."
3081
3082
  },
3082
3083
  "time": {
3083
3084
  "anyOf": [
@@ -4869,7 +4870,7 @@
4869
4870
  "type": "string"
4870
4871
  }
4871
4872
  ],
4872
- "description": "Allocation value. SEMANTICS DEPEND ON `mode`:\n• mode='Amount': absolute amount in smallest unit (e.g., '750000000' for 0.75 WOW, '250000000' for 0.25 WOW). Allocated first; sum of Amount items cached as `fix`.\n• mode='Rate': basis-points rate, 10000 = 100% (e.g., '7500' for 75%, '2500' for 25%). When no Surplus in same Allocator, sum MUST == 10000; when Surplus present, sum MUST <= 10000.\n• mode='Surplus': IGNORED (contract forces to 0). Set to '0' for clarity. Receives remaining balance after Amount + Rate allocations.\n⚠️ T1 LOSSY POINT (B-2): the value is PRE-CONFIGURED and STATIC. A continuous/conditional amount (e.g. 'pay exactly the assessed loss amount') CANNOT be expressed — there is no runtime formula field. Model variable payouts as (a) a fixed-tier Allocator list guarded by distinct Guards, or (b) an Amount with a `max` cap — both are finite configurations, not free-form formulas."
4873
+ "description": "Allocation value. SEMANTICS DEPEND ON `mode`:\n• mode='Amount': absolute amount in smallest unit (e.g., '750000000' for 0.75 WOW, '250000000' for 0.25 WOW). Allocated first; sum of Amount items cached as `fix`.\n• mode='Rate' (NET): basis-points rate off the post-fix base (balance - fix, or max - fix), 10000 = 100% (e.g., '7500' for 75%, '2500' for 25%). When no Surplus in same Allocator, sum MUST == 10000; when Surplus present, sum MUST <= 10000.\n• mode='RateGross': basis-points rate off the FULL pool (balance) or the `max` cap — the fixed Amount total is NOT subtracted, 10000 = 100%. sum MUST <= 10000 (and, with `max` set, fix×10000 + sum×max <= max×10000). Cannot be mixed with mode='Rate' in the same Allocator while a fixed Amount total is present.\n• mode='Surplus': IGNORED (contract forces to 0). Set to '0' for clarity. Receives remaining balance after Amount + Rate/RateGross allocations.\n⚠️ T1 LOSSY POINT (B-2): the value is PRE-CONFIGURED and STATIC. A continuous/conditional amount (e.g. 'pay exactly the assessed loss amount') CANNOT be expressed — there is no runtime formula field. Model variable payouts as (a) a fixed-tier Allocator list guarded by distinct Guards, or (b) an Amount with a `max` cap — both are finite configurations, not free-form formulas."
4873
4874
  },
4874
4875
  "mode": {
4875
4876
  "anyOf": [
@@ -4878,12 +4879,13 @@
4878
4879
  "enum": [
4879
4880
  "Amount",
4880
4881
  "Rate",
4881
- "Surplus"
4882
+ "Surplus",
4883
+ "RateGross"
4882
4884
  ]
4883
4885
  },
4884
4886
  {}
4885
4887
  ],
4886
- "description": "Allocation mode — determines how the `sharing` field is interpreted. Three modes can be used individually OR combined within a single Allocator; when combined, allocation order is strictly: Amount first, then Rate, then Surplus. Understanding these modes allows modeling almost any fund distribution pattern.\n• Amount (0): `sharing` is a FIXED amount in smallest unit (e.g., '750000000' = 0.75 WOW). Allocated FIRST; sum of all Amount items is cached as `fix` by the contract. Validation: when no Rate and no Surplus items exist, sum of Amount items must be >= allocators.threshold (EAMOUNT_BELOW_THRESHOLD=12); when `max` is set, sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13).\n• Rate (1): `sharing` is a basis-points rate (10000 = 100%). Allocated AFTER Amount; formula: allocated = (sharing × total_rates) / 10000, where total_rates = balance - fix (or max - fix if `max` is set). Validation: when no Surplus items exist, sum of all Rate items must be EXACTLY 10000 (ERATE_NOT_10000=4); when Surplus items exist, sum of all Rate items must be <= 10000 (ERATE_EXCEEDS_10000=6).\n• Surplus (2): `sharing` is IGNORED (contract forces it to 0). Allocated LAST; receives the remaining balance after Amount + Rate allocations. Validation: MAX ONE Surplus item per Allocator (EMULTIPLE_SURPLUS=5). When Surplus exists, Rate sum constraint relaxes from == 10000 to <= 10000.\nALLOCATION ORDER (strict): Amount items (fixed, cached as fix) → Rate items (proportional to balance-fix) → Surplus item (remaining).\nRECOMMENDATION: Use Amount mode for known fixed amounts (clearer, no sum constraint). Use Rate mode for proportional splits (requires sum == 10000 unless Surplus present). Use Surplus to capture remainder (e.g., platform fee + host gets rest). Accepts string ('Amount'/'Rate'/'Surplus', recommended) or number (0/1/2)."
4888
+ "description": "Allocation mode — determines how the `sharing` field is interpreted. Four modes can be used individually OR combined within a single Allocator; when combined, allocation order is strictly: Amount first, then Rate/RateGross, then Surplus. Understanding these modes allows modeling almost any fund distribution pattern.\n• Amount (0): `sharing` is a FIXED amount in smallest unit (e.g., '750000000' = 0.75 WOW). Allocated FIRST; sum of all Amount items is cached as `fix` by the contract. Validation: when no Rate and no Surplus items exist, sum of Amount items must be >= allocators.threshold (EAMOUNT_BELOW_THRESHOLD=12); when `max` is set, sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13).\n• Rate (1): `sharing` is a NET basis-points rate (10000 = 100%). Allocated AFTER Amount; formula: allocated = (sharing × total_rates) / 10000, where total_rates = balance - fix (or max - fix if `max` is set) — the cached fixed Amount total IS subtracted. Validation: when no Surplus items exist, sum of all Rate items must be EXACTLY 10000 (ERATE_NOT_10000=4); when Surplus items exist, sum of all Rate items must be <= 10000 (ERATE_EXCEEDS_10000=6).\n• RateGross (3): `sharing` is a GROSS basis-points rate (10000 = 100%). Allocated AFTER Amount; formula: allocated = (sharing × total_rates) / 10000, where total_rates = balance (the full pool) or the `max` cap when set — the fixed Amount total is NOT subtracted, so fixed Amount entries and percentage-of-total rates coexist exactly. Validation: sum of all RateGross items must be <= 10000 (ERATE_EXCEEDS_10000=6); when `max` is set, fix×10000 + sum(rate)×max <= max×10000 must hold (6); with no `max` and a fixed total > 0, sum of RateGross items must be < 10000 (6). RateGross cannot be mixed with NET Rate entries in the same Allocator while a fixed Amount total is present (EMIXED_RATE_BASES=17).\n• Surplus (2): `sharing` is IGNORED (contract forces it to 0). Allocated LAST; receives the remaining balance after Amount + Rate allocations. Validation: MAX ONE Surplus item per Allocator (EMULTIPLE_SURPLUS=5). When Surplus exists, Rate sum constraint relaxes from == 10000 to <= 10000.\nALLOCATION ORDER (strict): Amount items (fixed, cached as fix) → Rate/RateGross items → Surplus item (remaining).\nRECOMMENDATION: Use Amount mode for known fixed amounts (clearer, no sum constraint). Use Rate mode for proportional splits off the post-fix remainder (requires sum == 10000 unless Surplus present). Use RateGross mode for a percentage of the FULL pool/`max` that must coexist with fixed Amount entries. Use Surplus to capture remainder (e.g., platform fee + host gets rest). Accepts string ('Amount'/'Rate'/'Surplus'/'RateGross', recommended) or number (0/1/2/3)."
4887
4889
  }
4888
4890
  },
4889
4891
  "required": [
@@ -4892,12 +4894,12 @@
4892
4894
  "mode"
4893
4895
  ],
4894
4896
  "additionalProperties": false,
4895
- "description": "Fund allocation item — one recipient's share of the Allocation balance. The `sharing` value's meaning depends on `mode` (see AllocationModeSchema). Multiple items in the same Allocator are evaluated together: Amount items first, Rate items second, Surplus last."
4897
+ "description": "Fund allocation item — one recipient's share of the Allocation balance. The `sharing` value's meaning depends on `mode` (see AllocationModeSchema). Multiple items in the same Allocator are evaluated together: Amount items first, Rate/RateGross items second, Surplus last."
4896
4898
  },
4897
- "description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate + Surplus) within the same Allocator. RECIPIENT SEMANTICS: the Guard constrains what each submission slot may be; a recipient's safety follows from the sufficiency of those constraints (run the recipient constraint audit). Canonical order pattern: recipient = the single submitted Order — funds land at that object and are receivable only by its owner. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
4899
+ "description": "Fund allocation item list. Each item specifies a recipient (who), a value (sharing), and a mode. Items can mix modes (Amount + Rate/RateGross + Surplus) within the same Allocator. RECIPIENT SEMANTICS: the Guard constrains what each submission slot may be; a recipient's safety follows from the sufficiency of those constraints (run the recipient constraint audit). Canonical order pattern: recipient = the single submitted Order — funds land at that object and are receivable only by its owner. ALLOCATION ORDER: Amount items first (cached as fix) → Rate items (proportional to balance - fix; RateGross proportional to the full pool) → Surplus item (remaining). CONSTRAINTS: max ONE Surplus item per Allocator; NET Rate sum must == 10000 (no Surplus) or <= 10000 (with Surplus); RateGross sum must <= 10000 (never mixed with NET Rate while a fixed total is present); Amount sum must >= threshold (no Rate and no Surplus) and <= max (if max set)."
4898
4900
  },
4899
4901
  "fix": {
4900
- "description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract when the allocator is added — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for Rate allocation.",
4902
+ "description": "OUTPUT-ONLY (query result). Cached sum of all Amount-mode `sharing` values in this Allocator. Computed by the contract when the allocator is added — DO NOT set this field at creation. Used internally to compute `total_rates = balance - fix` for NET Rate allocation (RateGross ignores fix and uses the full pool/`max`).",
4901
4903
  "anyOf": [
4902
4904
  {
4903
4905
  "type": "number"
@@ -4908,7 +4910,7 @@
4908
4910
  ]
4909
4911
  },
4910
4912
  "max": {
4911
- "description": "Maximum allocation cap (OPTIONAL — omit the field or set to null to disable the cap; do NOT set to 0 as that means a cap of zero). Passed through to the contract as Option<u64> when the allocator is added: when null/omitted the contract treats it as `none` (no cap); when set, the contract enforces it. Has THREE effects when set:\n1. Construction: sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13)\n2. Rate execution: total_rates = max - fix (instead of balance - fix)\n3. Surplus execution: surplus_amount = max - alloced_amount (instead of balance - alloced_amount)\nUse when you want to cap total allocation regardless of Order balance (e.g., cap payout to declared amount). SDK pre-validates Amount sum <= max at build time to give actionable error messages before on-chain abort.",
4913
+ "description": "Maximum allocation cap (OPTIONAL — omit the field or set to null to disable the cap; do NOT set to 0 as that means a cap of zero). Passed through to the contract as Option<u64> when the allocator is added: when null/omitted the contract treats it as `none` (no cap); when set, the contract enforces it. Has THREE effects when set:\n1. Construction: sum of Amount items must be <= max (EAMOUNT_EXCEEDS_MAX=13)\n2. Rate execution: NET Rate total_rates = max - fix; RateGross total_rates = max (fix NOT subtracted)\n3. Surplus execution: surplus_amount = max - alloced_amount (instead of balance - alloced_amount)\nUse when you want to cap total allocation regardless of Order balance (e.g., cap payout to declared amount). SDK pre-validates Amount sum <= max at build time to give actionable error messages before on-chain abort.",
4912
4914
  "anyOf": [
4913
4915
  {
4914
4916
  "anyOf": [
@@ -4932,7 +4934,7 @@
4932
4934
  "sharing"
4933
4935
  ],
4934
4936
  "additionalProperties": false,
4935
- "description": "Fund allocator — a complete allocation strategy triggered by a Guard. Contains a sharing[] array where items can mix Amount/Rate/Surplus modes. When the Guard passes, the contract allocates funds in strict order: Amount → Rate → Surplus."
4937
+ "description": "Fund allocator — a complete allocation strategy triggered by a Guard. Contains a sharing[] array where items can mix Amount/Rate/RateGross/Surplus modes. When the Guard passes, the contract allocates funds in strict order: Amount → Rate/RateGross → Surplus."
4936
4938
  },
4937
4939
  "description": "Fund allocation object allocator list"
4938
4940
  },
@@ -14197,7 +14199,7 @@
14197
14199
  "description": "Forward name"
14198
14200
  },
14199
14201
  "namedOperator": {
14200
- "description": "Forward operation permission 1: Namespace (one of the two must be specified); recommended if Progress object operators are different (e.g., different delivery personnel for different orders).",
14202
+ "description": "Forward operation permission 1: Namespace (one of the two must be specified); recommended if Progress object operators are different (e.g., different delivery personnel for different orders). SPECIAL CASE: an EMPTY string ('') on an order-bound forward resolves to the ORDER PAYER — the buyer of the order can advance it (progress::IsNamedOperator treats an empty name + order as the order's own operator). Use '' for buyer-side actions (delivery confirmation, review, return request, pre-ship cancel) instead of binding a merchant-only permission index, which aborts E_PERMISSION_DENIED for the buyer.",
14201
14203
  "anyOf": [
14202
14204
  {
14203
14205
  "type": "string"
@@ -16197,6 +16199,211 @@
16197
16199
  ],
16198
16200
  "additionalProperties": false
16199
16201
  },
16202
+ {
16203
+ "type": "object",
16204
+ "properties": {
16205
+ "query_type": {
16206
+ "type": "string",
16207
+ "const": "service_quote"
16208
+ },
16209
+ "result": {
16210
+ "type": "object",
16211
+ "properties": {
16212
+ "action": {
16213
+ "type": "string",
16214
+ "const": "service_quote"
16215
+ },
16216
+ "network": {
16217
+ "type": "string",
16218
+ "description": "Resolved network the Service was read from."
16219
+ },
16220
+ "service": {
16221
+ "type": "object",
16222
+ "properties": {
16223
+ "address": {
16224
+ "type": "string"
16225
+ },
16226
+ "name": {
16227
+ "anyOf": [
16228
+ {
16229
+ "type": "string"
16230
+ },
16231
+ {
16232
+ "type": "null"
16233
+ }
16234
+ ]
16235
+ }
16236
+ },
16237
+ "required": [
16238
+ "address",
16239
+ "name"
16240
+ ],
16241
+ "additionalProperties": false
16242
+ },
16243
+ "payment_token": {
16244
+ "type": "object",
16245
+ "properties": {
16246
+ "coin_type": {
16247
+ "anyOf": [
16248
+ {
16249
+ "type": "string"
16250
+ },
16251
+ {
16252
+ "type": "null"
16253
+ }
16254
+ ]
16255
+ },
16256
+ "display_note": {
16257
+ "type": "string"
16258
+ }
16259
+ },
16260
+ "required": [
16261
+ "coin_type",
16262
+ "display_note"
16263
+ ],
16264
+ "additionalProperties": false
16265
+ },
16266
+ "items": {
16267
+ "type": "array",
16268
+ "items": {
16269
+ "type": "object",
16270
+ "properties": {
16271
+ "name": {
16272
+ "type": "string"
16273
+ },
16274
+ "quantity": {
16275
+ "type": "integer",
16276
+ "exclusiveMinimum": 0,
16277
+ "maximum": 9007199254740991
16278
+ },
16279
+ "unit_price": {
16280
+ "type": "string",
16281
+ "description": "Raw smallest units per unit."
16282
+ },
16283
+ "unit_price_display": {
16284
+ "type": "string",
16285
+ "description": "Human display (raw-only when precision is unknown)."
16286
+ },
16287
+ "line_total": {
16288
+ "type": "string",
16289
+ "description": "Raw smallest units: unit_price × quantity."
16290
+ },
16291
+ "suspended": {
16292
+ "type": "boolean",
16293
+ "description": "True when the sale is suspended — a suspended item cannot be bought."
16294
+ }
16295
+ },
16296
+ "required": [
16297
+ "name",
16298
+ "quantity",
16299
+ "unit_price",
16300
+ "unit_price_display",
16301
+ "line_total",
16302
+ "suspended"
16303
+ ],
16304
+ "additionalProperties": false
16305
+ }
16306
+ },
16307
+ "total_pay": {
16308
+ "type": "object",
16309
+ "properties": {
16310
+ "balance": {
16311
+ "type": "string",
16312
+ "description": "Raw smallest units: Σ(unit_price × quantity)."
16313
+ },
16314
+ "display": {
16315
+ "type": "string"
16316
+ },
16317
+ "note": {
16318
+ "type": "string",
16319
+ "description": "order_new.buy.total_pay.balance must equal this exactly — the on-chain buy aborts on any drift."
16320
+ }
16321
+ },
16322
+ "required": [
16323
+ "balance",
16324
+ "display",
16325
+ "note"
16326
+ ],
16327
+ "additionalProperties": false
16328
+ },
16329
+ "allocation_preview": {
16330
+ "anyOf": [
16331
+ {
16332
+ "type": "object",
16333
+ "properties": {
16334
+ "allocator_index": {
16335
+ "type": "integer",
16336
+ "minimum": -9007199254740991,
16337
+ "maximum": 9007199254740991
16338
+ },
16339
+ "note": {
16340
+ "type": "string"
16341
+ },
16342
+ "sharing": {
16343
+ "type": "array",
16344
+ "items": {
16345
+ "type": "object",
16346
+ "properties": {
16347
+ "recipient": {
16348
+ "type": "string"
16349
+ },
16350
+ "mode": {
16351
+ "anyOf": [
16352
+ {
16353
+ "type": "string"
16354
+ },
16355
+ {
16356
+ "type": "null"
16357
+ }
16358
+ ],
16359
+ "description": "rate (bps, 10000=100%) / amount (smallest units) / surplus."
16360
+ },
16361
+ "value": {
16362
+ "type": "string"
16363
+ }
16364
+ },
16365
+ "required": [
16366
+ "recipient",
16367
+ "mode",
16368
+ "value"
16369
+ ],
16370
+ "additionalProperties": false
16371
+ }
16372
+ }
16373
+ },
16374
+ "required": [
16375
+ "allocator_index",
16376
+ "note",
16377
+ "sharing"
16378
+ ],
16379
+ "additionalProperties": false
16380
+ },
16381
+ {
16382
+ "type": "null"
16383
+ }
16384
+ ],
16385
+ "description": "FIRST allocator's sharing rows — the normal payout path. null when no allocators are configured."
16386
+ }
16387
+ },
16388
+ "required": [
16389
+ "action",
16390
+ "network",
16391
+ "service",
16392
+ "payment_token",
16393
+ "items",
16394
+ "total_pay",
16395
+ "allocation_preview"
16396
+ ],
16397
+ "additionalProperties": false,
16398
+ "description": "ServiceQuote (basket prices, total_pay and the allocator fee-split preview)."
16399
+ }
16400
+ },
16401
+ "required": [
16402
+ "query_type",
16403
+ "result"
16404
+ ],
16405
+ "additionalProperties": false
16406
+ },
16200
16407
  {
16201
16408
  "type": "object",
16202
16409
  "properties": {
@@ -16846,6 +17053,43 @@
16846
17053
  "type": "string",
16847
17054
  "description": "One-paragraph AI-ready summary."
16848
17055
  },
17056
+ "fund_advice": {
17057
+ "description": "Fund-state advice from the order's anchored Allocation instance (pool balance/settlement state + the perspective's most favorable action). Present when the pool object was readable.",
17058
+ "type": "object",
17059
+ "properties": {
17060
+ "pool": {
17061
+ "description": "Order-anchored Allocation pool address.",
17062
+ "type": "string"
17063
+ },
17064
+ "funded": {
17065
+ "description": "Pool still holds a distributable balance.",
17066
+ "type": "boolean"
17067
+ },
17068
+ "settled": {
17069
+ "description": "Pool has produced at least one Payment.",
17070
+ "type": "boolean"
17071
+ },
17072
+ "decision_advice": {
17073
+ "type": "array",
17074
+ "items": {
17075
+ "type": "string"
17076
+ },
17077
+ "description": "Perspective-specific most-favorable-action lines (settle-now for the merchant side at terminals; dispute-is-the-only-redirect for the customer while funded; compensation_fund routing once drained; G-1: verdicts never re-split allocator ratios)."
17078
+ },
17079
+ "risk_notes": {
17080
+ "type": "array",
17081
+ "items": {
17082
+ "type": "string"
17083
+ },
17084
+ "description": "Instance-level structural notes (unanchored guard-submitted recipient, Surplus-before-Rate drain ordering, below-threshold balance)."
17085
+ }
17086
+ },
17087
+ "required": [
17088
+ "decision_advice",
17089
+ "risk_notes"
17090
+ ],
17091
+ "additionalProperties": false
17092
+ },
16849
17093
  "attached_alerts": {
16850
17094
  "description": "Order-monitor alerts (stall/compensation/review-window) when radar_include_alerts=true.",
16851
17095
  "type": "array",
@@ -17252,6 +17496,43 @@
17252
17496
  "type": "string",
17253
17497
  "description": "One-paragraph AI-ready summary."
17254
17498
  },
17499
+ "fund_advice": {
17500
+ "description": "Fund-state advice from the order's anchored Allocation instance (pool balance/settlement state + the perspective's most favorable action). Present when the pool object was readable.",
17501
+ "type": "object",
17502
+ "properties": {
17503
+ "pool": {
17504
+ "description": "Order-anchored Allocation pool address.",
17505
+ "type": "string"
17506
+ },
17507
+ "funded": {
17508
+ "description": "Pool still holds a distributable balance.",
17509
+ "type": "boolean"
17510
+ },
17511
+ "settled": {
17512
+ "description": "Pool has produced at least one Payment.",
17513
+ "type": "boolean"
17514
+ },
17515
+ "decision_advice": {
17516
+ "type": "array",
17517
+ "items": {
17518
+ "type": "string"
17519
+ },
17520
+ "description": "Perspective-specific most-favorable-action lines (settle-now for the merchant side at terminals; dispute-is-the-only-redirect for the customer while funded; compensation_fund routing once drained; G-1: verdicts never re-split allocator ratios)."
17521
+ },
17522
+ "risk_notes": {
17523
+ "type": "array",
17524
+ "items": {
17525
+ "type": "string"
17526
+ },
17527
+ "description": "Instance-level structural notes (unanchored guard-submitted recipient, Surplus-before-Rate drain ordering, below-threshold balance)."
17528
+ }
17529
+ },
17530
+ "required": [
17531
+ "decision_advice",
17532
+ "risk_notes"
17533
+ ],
17534
+ "additionalProperties": false
17535
+ },
17255
17536
  "attached_alerts": {
17256
17537
  "description": "Order-monitor alerts (stall/compensation/review-window) when radar_include_alerts=true.",
17257
17538
  "type": "array",
@@ -19256,6 +19537,23 @@
19256
19537
  "summary"
19257
19538
  ],
19258
19539
  "additionalProperties": false
19540
+ },
19541
+ "ruleId": {
19542
+ "description": "Canonical write-side risk rule id (e.g. \"R-S-4-05\", \"R-REP-W-02\") — present on rule-pack analyzer findings; aggregation reads it back as risk_rule_id.",
19543
+ "type": "string"
19544
+ },
19545
+ "evidence": {
19546
+ "description": "Raw rule evidence (a dotted puzzle path or a joined evidence list) carried by rule-pack analyzers.",
19547
+ "type": "string"
19548
+ },
19549
+ "source": {
19550
+ "description": "Fact source: absent = derived from on-chain topology facts; proposal = pre-submit business-puzzle intent; external = facts captured outside the wow chain.",
19551
+ "type": "string",
19552
+ "enum": [
19553
+ "onchain",
19554
+ "proposal",
19555
+ "external"
19556
+ ]
19259
19557
  }
19260
19558
  },
19261
19559
  "required": [
@@ -21660,7 +21958,7 @@
21660
21958
  "description": "Business meaning of advancing to this node. Example: 'Guide starts the day service'"
21661
21959
  },
21662
21960
  "gains": {
21663
- "description": "Gains for the caller if this option is chosen (K3 Game G1 gain separation). Example: ['Settlement triggered — funds released to provider']",
21961
+ "description": "Gains for the caller if this option is chosen (K3 Game G1 gain separation). Example: ['Settlement unlocked — funds releasable to provider via an explicit allocation step']",
21664
21962
  "type": "array",
21665
21963
  "items": {
21666
21964
  "type": "string"
@@ -21907,7 +22205,7 @@
21907
22205
  "description": "Business meaning of advancing to this node. Example: 'Guide starts the day service'"
21908
22206
  },
21909
22207
  "gains": {
21910
- "description": "Gains for the caller if this option is chosen (K3 Game G1 gain separation). Example: ['Settlement triggered — funds released to provider']",
22208
+ "description": "Gains for the caller if this option is chosen (K3 Game G1 gain separation). Example: ['Settlement unlocked — funds releasable to provider via an explicit allocation step']",
21911
22209
  "type": "array",
21912
22210
  "items": {
21913
22211
  "type": "string"