@wowok/agent-mcp 3.3.3 → 3.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/dist/chain-semantics/eval-order.d.ts +17 -0
  2. package/dist/chain-semantics/eval-order.js +1 -0
  3. package/dist/chain-semantics/freeze-map.js +1 -1
  4. package/dist/chain-semantics/fund-flow.js +1 -1
  5. package/dist/chain-semantics/index.d.ts +1 -0
  6. package/dist/chain-semantics/index.js +1 -1
  7. package/dist/chain-semantics/object-graph.js +1 -1
  8. package/dist/composition/audit.js +1 -1
  9. package/dist/composition/compile.d.ts +4 -1
  10. package/dist/composition/compile.js +1 -1
  11. package/dist/data/api/api.spec.d.ts +1 -0
  12. package/dist/data/api/api.spec.js +1 -0
  13. package/dist/data/api/cli.d.ts +1 -0
  14. package/dist/data/api/cli.js +1 -0
  15. package/dist/data/api/head.d.ts +16 -0
  16. package/dist/data/api/head.js +1 -0
  17. package/dist/data/api/head.spec.d.ts +1 -0
  18. package/dist/data/api/head.spec.js +1 -0
  19. package/dist/data/api/index.d.ts +2 -0
  20. package/dist/data/api/index.js +1 -0
  21. package/dist/data/api/match.d.ts +69 -0
  22. package/dist/data/api/match.js +1 -0
  23. package/dist/data/api/match.spec.d.ts +1 -0
  24. package/dist/data/api/match.spec.js +1 -0
  25. package/dist/data/api/server.d.ts +12 -0
  26. package/dist/data/api/server.js +1 -0
  27. package/dist/data/projection/cli.d.ts +1 -0
  28. package/dist/data/projection/cli.js +1 -0
  29. package/dist/data/projection/edges.d.ts +8 -0
  30. package/dist/data/projection/edges.js +1 -0
  31. package/dist/data/projection/edges.spec.d.ts +1 -0
  32. package/dist/data/projection/edges.spec.js +1 -0
  33. package/dist/data/projection/facets.d.ts +18 -0
  34. package/dist/data/projection/facets.js +1 -0
  35. package/dist/data/projection/facets.spec.d.ts +1 -0
  36. package/dist/data/projection/facets.spec.js +1 -0
  37. package/dist/data/projection/facts.d.ts +40 -0
  38. package/dist/data/projection/facts.js +1 -0
  39. package/dist/data/projection/index.d.ts +6 -0
  40. package/dist/data/projection/index.js +1 -0
  41. package/dist/data/projection/project.d.ts +10 -0
  42. package/dist/data/projection/project.js +1 -0
  43. package/dist/data/projection/projection.spec.d.ts +1 -0
  44. package/dist/data/projection/projection.spec.js +1 -0
  45. package/dist/data/projection/schema.d.ts +1 -0
  46. package/dist/data/projection/schema.js +1 -0
  47. package/dist/data/projection/store.d.ts +49 -0
  48. package/dist/data/projection/store.js +1 -0
  49. package/dist/data/projection/types.d.ts +137 -0
  50. package/dist/data/projection/types.js +1 -0
  51. package/dist/data/sync/cdc.d.ts +34 -0
  52. package/dist/data/sync/cdc.js +1 -0
  53. package/dist/data/sync/cdc.spec.d.ts +1 -0
  54. package/dist/data/sync/cdc.spec.js +1 -0
  55. package/dist/data/sync/graphql-source.d.ts +16 -0
  56. package/dist/data/sync/graphql-source.js +1 -0
  57. package/dist/data/sync/index.d.ts +5 -0
  58. package/dist/data/sync/index.js +1 -0
  59. package/dist/data/sync/reconciler.d.ts +14 -0
  60. package/dist/data/sync/reconciler.js +1 -0
  61. package/dist/data/sync/reconciler.spec.d.ts +1 -0
  62. package/dist/data/sync/reconciler.spec.js +1 -0
  63. package/dist/data/sync/schema.d.ts +1 -0
  64. package/dist/data/sync/schema.js +1 -0
  65. package/dist/data/sync/store.d.ts +19 -0
  66. package/dist/data/sync/store.js +1 -0
  67. package/dist/data/sync/sync.spec.d.ts +1 -0
  68. package/dist/data/sync/sync.spec.js +1 -0
  69. package/dist/data/sync/synchronizer.d.ts +10 -0
  70. package/dist/data/sync/synchronizer.js +1 -0
  71. package/dist/data/sync/types.d.ts +162 -0
  72. package/dist/data/sync/types.js +1 -0
  73. package/dist/evaluation/builtins/demand-match.js +1 -1
  74. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  75. package/dist/evaluation/capability.d.ts +1 -0
  76. package/dist/evaluation/engine.js +1 -1
  77. package/dist/evaluation/extract.d.ts +7 -1
  78. package/dist/evaluation/extract.js +1 -1
  79. package/dist/evaluation/match-policy.d.ts +118 -0
  80. package/dist/evaluation/match-policy.js +1 -0
  81. package/dist/evaluation/match-policy.spec.d.ts +1 -0
  82. package/dist/evaluation/match-policy.spec.js +1 -0
  83. package/dist/evaluation/node-game.d.ts +3 -0
  84. package/dist/evaluation/node-game.js +1 -1
  85. package/dist/experience/realtime-feedback.js +1 -1
  86. package/dist/graph/onchain/expand.js +1 -1
  87. package/dist/graph/onchain/exposure.js +1 -1
  88. package/dist/harness/recover.js +1 -1
  89. package/dist/knowledge/arbitration-ledger.js +1 -1
  90. package/dist/knowledge/baselines/rules/plan.json +16 -1
  91. package/dist/knowledge/builtin-templates.d.ts +1 -1
  92. package/dist/knowledge/builtin-templates.js +1 -1
  93. package/dist/knowledge/getting-started.js +1 -1
  94. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  95. package/dist/knowledge/guard-design-patterns.js +1 -1
  96. package/dist/knowledge/guard-ledger.js +1 -1
  97. package/dist/knowledge/guard-puzzle.js +1 -1
  98. package/dist/knowledge/guard-render.js +1 -1
  99. package/dist/knowledge/guard-risk.js +1 -1
  100. package/dist/knowledge/guard-templates.d.ts +1 -1
  101. package/dist/knowledge/guard-templates.js +1 -1
  102. package/dist/knowledge/guard-translation.js +1 -1
  103. package/dist/knowledge/index.js +1 -1
  104. package/dist/knowledge/industry-registry.js +1 -1
  105. package/dist/knowledge/jsonrpc-enum.d.ts +26 -10
  106. package/dist/knowledge/jsonrpc-enum.js +1 -1
  107. package/dist/knowledge/projection.d.ts +54 -0
  108. package/dist/knowledge/projection.js +1 -0
  109. package/dist/knowledge/projection.spec.d.ts +1 -0
  110. package/dist/knowledge/projection.spec.js +1 -0
  111. package/dist/knowledge/recipient-constraint.d.ts +9 -0
  112. package/dist/knowledge/recipient-constraint.js +1 -1
  113. package/dist/knowledge/scenario-modes.d.ts +1 -0
  114. package/dist/knowledge/service-ledger.d.ts +1 -1
  115. package/dist/knowledge/service-ledger.js +1 -1
  116. package/dist/knowledge/template-loader.d.ts +1 -0
  117. package/dist/knowledge/template-loader.js +1 -1
  118. package/dist/knowledge/template-registry.js +1 -1
  119. package/dist/knowledge/template-scanner.js +1 -1
  120. package/dist/monitor/MonitorLoop.js +1 -1
  121. package/dist/participation/node-action-advisor.js +1 -1
  122. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  123. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  124. package/dist/playbooks/service-build/object-panorama.js +1 -1
  125. package/dist/playbooks/service-build/participation-radar.js +1 -1
  126. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  127. package/dist/playbooks/service-build/service-panorama.js +1 -1
  128. package/dist/playbooks/service-build/service-quote.js +1 -1
  129. package/dist/playbooks/service-build/service-quote.spec.js +1 -1
  130. package/dist/review/index.js +1 -1
  131. package/dist/role/profiles.js +1 -1
  132. package/dist/safety/confirm-gate.js +1 -1
  133. package/dist/schema/call/allocation.js +1 -1
  134. package/dist/schema/call/base.d.ts +25 -0
  135. package/dist/schema/call/base.js +1 -1
  136. package/dist/schema/call/bridge.d.ts +1 -0
  137. package/dist/schema/call/error-codes.d.ts +1 -1
  138. package/dist/schema/call/error-codes.js +1 -1
  139. package/dist/schema/call/handler.js +1 -1
  140. package/dist/schema/call/order.d.ts +12 -0
  141. package/dist/schema/call/order.js +1 -1
  142. package/dist/schema/call/progress.js +1 -1
  143. package/dist/schema/call/proof.js +1 -1
  144. package/dist/schema/call/semantic.js +1 -1
  145. package/dist/schema/call/service.js +1 -1
  146. package/dist/schema/common/index.js +1 -1
  147. package/dist/schema/evaluation/index.d.ts +189 -0
  148. package/dist/schema/evaluation/index.js +1 -1
  149. package/dist/schema/local/index.d.ts +10 -0
  150. package/dist/schema/local/index.js +1 -1
  151. package/dist/schema/operations.d.ts +4 -0
  152. package/dist/schema/query/bi.d.ts +8 -0
  153. package/dist/schema/query/bi.js +1 -1
  154. package/dist/schema/query/index.d.ts +147 -0
  155. package/dist/schema/query/index.js +1 -1
  156. package/dist/schema/schema-version.js +1 -1
  157. package/dist/schema-query-impl/index.js +1 -1
  158. package/dist/schemas/account_operation.output.json +2 -1
  159. package/dist/schemas/bridge_operation.output.json +2 -1
  160. package/dist/schemas/evaluation_operation.output.json +384 -2
  161. package/dist/schemas/evaluation_operation.schema.json +202 -4
  162. package/dist/schemas/index.json +1 -1
  163. package/dist/schemas/keeper_operation.output.json +1 -1
  164. package/dist/schemas/local_cache_operation.output.json +2 -1
  165. package/dist/schemas/local_history_operation.output.json +2 -1
  166. package/dist/schemas/local_info_operation.output.json +2 -1
  167. package/dist/schemas/local_mark_operation.output.json +2 -1
  168. package/dist/schemas/messenger_operation.output.json +1 -1
  169. package/dist/schemas/monitor_events.output.json +1 -1
  170. package/dist/schemas/monitor_subscription.output.json +1 -1
  171. package/dist/schemas/onchain_events.output.json +1 -1
  172. package/dist/schemas/onchain_operations.output.json +35 -4
  173. package/dist/schemas/onchain_operations.schema.json +687 -103
  174. package/dist/schemas/onchain_operations_allocation.schema.json +1 -1
  175. package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
  176. package/dist/schemas/onchain_operations_guard.schema.json +660 -94
  177. package/dist/schemas/onchain_operations_order.schema.json +19 -1
  178. package/dist/schemas/onchain_operations_progress.schema.json +2 -2
  179. package/dist/schemas/onchain_operations_service.schema.json +4 -4
  180. package/dist/schemas/onchain_table_data.output.json +2 -2
  181. package/dist/schemas/query_toolkit.output.json +316 -1
  182. package/dist/schemas/query_toolkit.schema.json +1 -1
  183. package/dist/schemas/wowok_buildin_info.output.json +259 -0
  184. package/dist/schemas/wowok_buildin_info.schema.json +121 -0
  185. package/dist/tools/build-fingerprint.d.ts +28 -0
  186. package/dist/tools/build-fingerprint.js +1 -0
  187. package/dist/tools/handlers/benchmark-migration.d.ts +4 -2
  188. package/dist/tools/handlers/benchmark-migration.js +1 -1
  189. package/dist/tools/handlers/config.js +1 -1
  190. package/dist/tools/handlers/evaluation.js +1 -1
  191. package/dist/tools/handlers/evaluation.spec.js +1 -1
  192. package/dist/tools/handlers/onchain.d.ts +7 -0
  193. package/dist/tools/handlers/onchain.js +1 -1
  194. package/dist/tools/handlers/query.js +1 -1
  195. package/dist/tools/handlers/review-chain.d.ts +9 -13
  196. package/dist/tools/handlers/review-chain.js +1 -1
  197. package/dist/tools/index.js +1 -1
  198. package/dist/tools/registry/business.js +1 -1
  199. package/dist/tools/upgrade-check.d.ts +1 -0
  200. package/dist/tools/upgrade-check.js +1 -1
  201. package/dist/tools/wrap.js +1 -1
  202. package/package.json +7 -2
@@ -161,7 +161,25 @@
161
161
  "additionalProperties": false
162
162
  },
163
163
  "arb_claim_compensation": {
164
- "description": "Specify the adjudicated Arb object to obtain order compensation. ZERO-INDEMNITY GATE (BF-14, chain abort 11): when the ruling's indemnity is 0 (a dismissal) the claim is REFUSED on-chain — the case stays open, the dispute fee stays escrowed (withdrawable by the arbitrator only after the 30-day window closes with no objection, or blocked while an objection is pending), and `order.claimed_by` is NOT written. A claim that DOES pay (indemnity > 0) closes the case (state 5), pays the claimant, writes `order.claimed_by`, and releases the fee path. DIRECTION CAUTION: because only paying claims write `claimed_by`, a dismissal leaves it `none` — refund-style rails gated on `claimed_by == none` stay LIVE after a dismissal, while merchant-recovery rails gated on `claimed_by != none` can never fire (F-BS-54). Read ruling DIRECTION from `arb.indemnity.amount` (query 1641), never from `claimed_by`.",
164
+ "description": "Specify the adjudicated Arb object to obtain order compensation. ZERO-INDEMNITY GATE (BF-14, chain abort 11): when the ruling's indemnity is 0 (a dismissal) the claim is REFUSED on-chain — the case stays open, the dispute fee stays escrowed (withdrawable by the arbitrator only after the 30-day window closes with no objection, or blocked while an objection is pending), and `order.claimed_by` is NOT written. A claim that DOES pay (indemnity > 0) closes the case (state 5), pays the claimant, writes `order.claimed_by`, and releases the fee path. DIRECTION CAUTION: because only paying claims write `claimed_by`, a dismissal leaves it `none` — refund-style rails gated on `claimed_by == none` stay LIVE after a dismissal, while merchant-recovery rails gated on `claimed_by != none` can never fire (F-BS-54). Read ruling DIRECTION from `arb.indemnity.amount` (query 1641), never from `claimed_by`. F05 REVERSE GATE (yfd-ln-261024): when this order's escrow is ALREADY fully released (allocation balance 0 of a positive order amount), the claim is REFUSED unless acknowledge_dual_payout is true — pairing a paid compensation with a completed escrow track is a netting decision the operator must state (see acknowledge_dual_payout).",
165
+ "type": "object",
166
+ "properties": {
167
+ "arb": {
168
+ "type": "string",
169
+ "description": "Arb object ID or name."
170
+ }
171
+ },
172
+ "required": [
173
+ "arb"
174
+ ],
175
+ "additionalProperties": false
176
+ },
177
+ "acknowledge_dual_payout": {
178
+ "description": "Explicit opt-in for a KNOWN double payout on the compensation-claim direction: when this order's escrow is already FULLY released (allocation balance 0 of a positive order amount) and this call claims the arbitration compensation on top, the call is REFUSED unless this flag is true. The escrow track and the compensation track are independent by design — the chain will not stop the second payout, so the operator must state the netting decision deliberately. Leave unset for claims on orders whose escrow is intact or partially released.",
179
+ "type": "boolean"
180
+ },
181
+ "arb_case_conclude": {
182
+ "description": "DISMISSAL CONVERGER (F-BS-54/56, F-OF2-01): stamp a CONCLUDED, DEFENDANT-FAVORED ruling onto this order through the service's case-conclusion entry so the `claimed_by == none` refund rails close AT RULING TIME instead of staying live forever. PERMISSIONLESS: any keeper (merchant agent, watchdog, even the buyer) may drive it; it writes the claimed_by=case flag and MOVES NO FUNDS. The chain refuses anything but a concluded (Arbitrated/Withdrawn) case leaving NO indemnity (E_CASE_NOT_DISMISSAL_CONCLUSION, abort 48). TYPICAL KEEPER LOOP after a 0-indemnity ruling: arb_claim_compensation aborts 11 (BF-14 zero-indemnity gate) → call THIS to close the refund rails → the escrow can then only exit through the merchant-recovery rails.",
165
183
  "type": "object",
166
184
  "properties": {
167
185
  "arb": {
@@ -325,12 +325,12 @@
325
325
  ]
326
326
  },
327
327
  "review": {
328
- "description": "Structured review composite (REVIEW component): after this forward succeeds, write the structured reputation record into a Repository (+ optional reward claim), reusing this call's passport submission. Requires operate (the chain fires only after a successful forward).",
328
+ "description": "Structured review composite (REVIEW component): with a passport submission the structured-record write runs BEFORE this forward (the review-edge credential anchors the PRE node — F01), then the forward, then the optional reward claim. Requires operate. Steps are reported in semantic.review_steps.",
329
329
  "type": "object",
330
330
  "properties": {
331
331
  "repository": {
332
332
  "type": "string",
333
- "description": "Repository object ID or name that stores the structured reputation record. The matching policy key must accept a JSON payload {rating, tags?, orderRef?}. id_from options (C30): Signer = one record per BUYER (rewrite = own-record overwrite); None + a write_guard with id_from_submission = one record per bound OBJECT/ORDER (the row id is the raw bound Order address — the verified once-per-order review shape); Clock = append-only log. PREFERRED: the service's review repository EMITTED BY THE BUILD PLAN when review_mode was set (AR-1) — resolve it from the service's repositories list (service_panorama / onchain_objects, name suffix '_review') — never guess an address."
333
+ "description": "Repository object ID or name that stores the structured reputation record. The matching policy key must accept a JSON payload {rating, tags?, orderRef?}. id_from options (C30): None = one record per bound OBJECT/ORDER with a write_guard (row id = the order address — the compile-emitted default AND the verified once-per-order review shape, F09); Signer = one record per BUYER (rewrite = own-record overwrite; a repeat buyer can only ever hold ONE row across all their orders — do not use for per-order reviews); Clock = append-only log. PREFERRED: the service's review repository EMITTED BY THE BUILD PLAN when review_mode was set (AR-1) — resolve it from the service's repositories list (service_panorama / onchain_objects, name suffix '_review') — never guess an address."
334
334
  },
335
335
  "policy": {
336
336
  "description": "Policy RULE NAME to write under (the repository's PolicyRule whose value_type is String — the chain writes the structured record as a JSON string row). MUST match an existing policy of the target repository. Default 'review' (the compile-emitted review policy name). A mismatch aborts the write AFTER the forward — the review-edge credential is single-use, so the row can never be re-written; resolve the exact name from the build plan / service_panorama before calling.",
@@ -670,7 +670,7 @@
670
670
  ]
671
671
  },
672
672
  "restock": {
673
- "description": "Refund restocking (permission 305 SERVICE_SALES). op:'flag' opts ONE live product into restock-on-refund; op:'order' puts the units a REFUNDED order purchased back on shelf. The order path is all-or-nothing: every purchased line must be flagged and still live before any unit moves (otherwise the chain aborts 46/32), so half a restock is impossible. Do NOT fake a restock with stock_add when the order carries several lines — use op:'order' so quantities come from the order itself.",
673
+ "description": "Refund restocking (permission 305 SERVICE_SALES). op:'flag' opts ONE live product into restock-on-refund; op:'order' puts the units a REFUNDED order purchased back on shelf. The order path is all-or-nothing: every purchased line must be flagged and still live before any unit moves (otherwise the chain aborts 46/32), so half a restock is impossible. The order path is once-per-order (replay aborts 49) and bound to THIS service (foreign order aborts 26). Do NOT fake a restock with stock_add when the order carries several lines — use op:'order' so quantities come from the order itself.",
674
674
  "oneOf": [
675
675
  {
676
676
  "type": "object",
@@ -694,7 +694,7 @@
694
694
  "flagged"
695
695
  ],
696
696
  "additionalProperties": false,
697
- "description": "Opt ONE live product in/out of restock-on-refund. An unknown sale_name aborts on chain (code 32); delisting the product is the kill switch. Without the flag, the order-level restock op refuses that line (code 46)."
697
+ "description": "Opt ONE live product in/out of restock-on-refund. An unknown sale_name aborts on chain (code 32); delisting the product is the kill switch. Without the flag, the order-level restock op refuses that line (code 46). Flagging a SKU does not itself touch stock — the order-level op below does the restoration, and it is once-per-order per order (code 49) and bound to orders of THIS service (foreign orders abort code 26)."
698
698
  },
699
699
  {
700
700
  "type": "object",
@@ -706,7 +706,7 @@
706
706
  "order": {
707
707
  "type": "string",
708
708
  "minLength": 1,
709
- "description": "Address or local name of the REFUNDED order whose purchased units go back on shelf."
709
+ "description": "Address or local name of the REFUNDED order whose purchased units go back on shelf. Must be an order of THIS service (a foreign order aborts code 26), and each order can be restocked exactly once — a second call for the same order aborts code 49 (no retry succeeds; the restoration is already complete)."
710
710
  }
711
711
  },
712
712
  "required": [
@@ -714,7 +714,7 @@
714
714
  "order"
715
715
  ],
716
716
  "additionalProperties": false,
717
- "description": "Put back the units one refunded order purchased, read from the order's own purchase lines (the caller cannot add extra units). Two-pass all-or-nothing on chain: every line must be restock-flagged and still live before the first unit moves (unflagged → code 46, delisted → code 32), so a partial restock is impossible. Emits one stock-restocked event per line."
717
+ "description": "Put back the units one refunded order purchased, read from the order's own purchase lines (the caller cannot add extra units). Two-pass all-or-nothing on chain: every line must be restock-flagged and still live before the first unit moves (unflagged → code 46, delisted → code 32), so a partial restock is impossible. Once-per-order (code 49 on replay) and ownership-bound (a foreign order aborts code 26); the applied state is queryable via the restock_applied read. Emits one stock-restocked event per line."
718
718
  }
719
719
  ]
720
720
  },
@@ -9339,7 +9339,7 @@
9339
9339
  "type": "boolean"
9340
9340
  },
9341
9341
  "radar_review_summary": {
9342
- "description": "Merchant-side review coverage summary (REVIEW-COMPONENT-PLAN batch 4): completed orders vs orders with a structured review record. Review rows live in a caller-named Repository — gather both counts via onchain_table_data (repository rows under the 'review' key, id_from=Signer → one row per buyer) and pass them in; the radar derives the merchant-side review-rate hint (high missing rate with a reward attached → reward lapsed or window too short). Omit when no review repository is bound.",
9342
+ "description": "Merchant-side review coverage summary (REVIEW-COMPONENT-PLAN batch 4): completed orders vs orders with a structured review record. Review rows live in a caller-named Repository — gather both counts via onchain_table_data (repository rows under the 'review' key, order-keyed → one row per order, F09) and pass them in; the radar derives the merchant-side review-rate hint (high missing rate with a reward attached → reward lapsed or window too short). Omit when no review repository is bound.",
9343
9343
  "type": "object",
9344
9344
  "properties": {
9345
9345
  "orders_completed": {
@@ -11068,7 +11068,7 @@
11068
11068
  "additionalProperties": false
11069
11069
  },
11070
11070
  "review_steps": {
11071
- "description": "Composite review submission report: the structured-reputation repository write (+ optional reward claim) chained after a successful progress forward via the data.review block, each reusing the forward's passport submission. Fail-isolated — a failed step never rolled back the forward. Relay failed steps to the user with the retry path (dedicated repository/reward tools).",
11071
+ "description": "Composite review submission report (F01 ordering): the structured-reputation repository write runs BEFORE the progress forward (its review-edge guard anchors the PRE node), the optional reward claim runs AFTER — one passport submission, fail-isolated steps. A failed step never rolled back the forward. Relay failed/unknown steps to the user with next_action (probe before retry; dedicated repository/reward tools).",
11072
11072
  "type": "array",
11073
11073
  "items": {
11074
11074
  "type": "object",
@@ -16496,6 +16496,20 @@
16496
16496
  }
16497
16497
  ]
16498
16498
  },
16499
+ "max_coverable_order": {
16500
+ "type": "string",
16501
+ "description": "Raw smallest units: fund / 3 — the LARGEST single order this fund can still cover (F-OF2-06). Orders above this ceiling are refused at buy (compensation_fund_below_order_ceiling), so this is the storefront's effective price cap; check it before promising a bigger basket."
16502
+ },
16503
+ "max_coverable_order_display": {
16504
+ "anyOf": [
16505
+ {
16506
+ "type": "string"
16507
+ },
16508
+ {
16509
+ "type": "null"
16510
+ }
16511
+ ]
16512
+ },
16499
16513
  "required_for_this_basket": {
16500
16514
  "type": "string",
16501
16515
  "description": "Raw smallest units: 3 x total_pay — the per-order payout requirement this basket must meet at order creation."
@@ -16510,6 +16524,20 @@
16510
16524
  }
16511
16525
  ]
16512
16526
  },
16527
+ "shortfall": {
16528
+ "type": "string",
16529
+ "description": "Raw smallest units the merchant must add via service.compensation_fund_add before THIS basket can be ordered: max(0, required_for_this_basket - fund_balance). 0 when already covered."
16530
+ },
16531
+ "shortfall_display": {
16532
+ "anyOf": [
16533
+ {
16534
+ "type": "string"
16535
+ },
16536
+ {
16537
+ "type": "null"
16538
+ }
16539
+ ]
16540
+ },
16513
16541
  "covered": {
16514
16542
  "type": "boolean",
16515
16543
  "description": "True when the fund covers the per-order requirement; false means no fund (a disclosed merchant choice) or an under-funded Service."
@@ -16521,8 +16549,12 @@
16521
16549
  "required": [
16522
16550
  "fund_balance",
16523
16551
  "fund_balance_display",
16552
+ "max_coverable_order",
16553
+ "max_coverable_order_display",
16524
16554
  "required_for_this_basket",
16525
16555
  "required_display",
16556
+ "shortfall",
16557
+ "shortfall_display",
16526
16558
  "covered",
16527
16559
  "note"
16528
16560
  ],
@@ -22625,7 +22657,7 @@
22625
22657
  "additionalProperties": false
22626
22658
  },
22627
22659
  "review_steps": {
22628
- "description": "Composite review submission report: the structured-reputation repository write (+ optional reward claim) chained after a successful progress forward via the data.review block, each reusing the forward's passport submission. Fail-isolated — a failed step never rolled back the forward. Relay failed steps to the user with the retry path (dedicated repository/reward tools).",
22660
+ "description": "Composite review submission report (F01 ordering): the structured-reputation repository write runs BEFORE the progress forward (its review-edge guard anchors the PRE node), the optional reward claim runs AFTER — one passport submission, fail-isolated steps. A failed step never rolled back the forward. Relay failed/unknown steps to the user with next_action (probe before retry; dedicated repository/reward tools).",
22629
22661
  "type": "array",
22630
22662
  "items": {
22631
22663
  "type": "object",
@@ -25893,6 +25925,289 @@
25893
25925
  "additionalProperties": false,
25894
25926
  "description": "Returns U256. Sums the numeric payloads of candidates whose stored value matches the predicate (on-chain checked add, overflow aborts). Non-numeric or mismatching entries contribute 0. Use logic_as_u256_* to compare the sum."
25895
25927
  },
25928
+ {
25929
+ "type": "object",
25930
+ "properties": {
25931
+ "type": {
25932
+ "type": "string",
25933
+ "const": "query_repository_data_sum_where_bound"
25934
+ },
25935
+ "object": {
25936
+ "type": "object",
25937
+ "properties": {
25938
+ "identifier": {
25939
+ "type": "integer",
25940
+ "minimum": 0,
25941
+ "maximum": 255,
25942
+ "description": "Identifier (0-255) for data lookup in Guard table. Slot consensus (enforced on-chain at guard table construction): 0-220 = user slots (free for business guards); 221-253 = PROTOCOL-RESERVED (rejected on-chain — reserved so future protocol features get fixed slots without colliding with published guards); 255 = ONCE replay-protection slot on Allocation (byte-keyed, the submitted bytes are the once-key — use for per-period keys like period-<N>); 254 = ONCE-FOR-OBJECT slot on Allocation (chain-derived key = bcs(the Allocation's payment_info.for_object); the submitted bytes are ignored and the submission only arms the slot — use for one-shot per-order rails such as full refunds). SLOT 0 SEMANTICS: slot 0 carries the transacted Order address by convention. As a submission slot it is legal on order/allocation/machine rails (the order exists when those verify), but FORBIDDEN on a Service buy_guard — the order does not exist when the buy-time passport is verified, so the mount is refused (service abort 43)."
25943
+ }
25944
+ },
25945
+ "required": [
25946
+ "identifier"
25947
+ ],
25948
+ "additionalProperties": false,
25949
+ "description": "Reference to the Repository object in the Guard table (must be Address type)."
25950
+ },
25951
+ "key": {
25952
+ "type": "object",
25953
+ "properties": {
25954
+ "identifier": {
25955
+ "type": "integer",
25956
+ "minimum": 0,
25957
+ "maximum": 255,
25958
+ "description": "Identifier (0-255) for data lookup in Guard table. Slot consensus (enforced on-chain at guard table construction): 0-220 = user slots (free for business guards); 221-253 = PROTOCOL-RESERVED (rejected on-chain — reserved so future protocol features get fixed slots without colliding with published guards); 255 = ONCE replay-protection slot on Allocation (byte-keyed, the submitted bytes are the once-key — use for per-period keys like period-<N>); 254 = ONCE-FOR-OBJECT slot on Allocation (chain-derived key = bcs(the Allocation's payment_info.for_object); the submitted bytes are ignored and the submission only arms the slot — use for one-shot per-order rails such as full refunds). SLOT 0 SEMANTICS: slot 0 carries the transacted Order address by convention. As a submission slot it is legal on order/allocation/machine rails (the order exists when those verify), but FORBIDDEN on a Service buy_guard — the order does not exist when the buy-time passport is verified, so the mount is refused (service abort 43)."
25959
+ }
25960
+ },
25961
+ "required": [
25962
+ "identifier"
25963
+ ],
25964
+ "additionalProperties": false,
25965
+ "description": "Reference to the policy key (String type table entry) whose data table is scanned."
25966
+ },
25967
+ "ids": {
25968
+ "type": "object",
25969
+ "properties": {
25970
+ "identifier": {
25971
+ "type": "integer",
25972
+ "minimum": 0,
25973
+ "maximum": 255,
25974
+ "description": "Identifier (0-255) for data lookup in Guard table. Slot consensus (enforced on-chain at guard table construction): 0-220 = user slots (free for business guards); 221-253 = PROTOCOL-RESERVED (rejected on-chain — reserved so future protocol features get fixed slots without colliding with published guards); 255 = ONCE replay-protection slot on Allocation (byte-keyed, the submitted bytes are the once-key — use for per-period keys like period-<N>); 254 = ONCE-FOR-OBJECT slot on Allocation (chain-derived key = bcs(the Allocation's payment_info.for_object); the submitted bytes are ignored and the submission only arms the slot — use for one-shot per-order rails such as full refunds). SLOT 0 SEMANTICS: slot 0 carries the transacted Order address by convention. As a submission slot it is legal on order/allocation/machine rails (the order exists when those verify), but FORBIDDEN on a Service buy_guard — the order does not exist when the buy-time passport is verified, so the mount is refused (service abort 43)."
25975
+ }
25976
+ },
25977
+ "required": [
25978
+ "identifier"
25979
+ ],
25980
+ "additionalProperties": false,
25981
+ "description": "Reference to the candidate ID list (VecAddress type table entry). Each id should be an ORDER address (e.g. order-keyed contribution rows). Duplicates are deduped; max 100 candidates."
25982
+ },
25983
+ "where": {
25984
+ "oneOf": [
25985
+ {
25986
+ "type": "object",
25987
+ "properties": {
25988
+ "kind": {
25989
+ "type": "string",
25990
+ "const": "range"
25991
+ },
25992
+ "valueMin": {
25993
+ "description": "Optional lower bound (inclusive unless minInclusive=false). Plain number string (U256 semantics).",
25994
+ "type": "string"
25995
+ },
25996
+ "valueMax": {
25997
+ "description": "Optional upper bound (inclusive unless maxInclusive=false). Plain number string (U256 semantics).",
25998
+ "type": "string"
25999
+ },
26000
+ "minInclusive": {
26001
+ "description": "Default true. false makes the lower bound exclusive.",
26002
+ "type": "boolean"
26003
+ },
26004
+ "maxInclusive": {
26005
+ "description": "Default true. false makes the upper bound exclusive.",
26006
+ "type": "boolean"
26007
+ }
26008
+ },
26009
+ "required": [
26010
+ "kind"
26011
+ ],
26012
+ "additionalProperties": false,
26013
+ "description": "Numeric closed/open range. min=max inclusive is an equality match. At least one bound required."
26014
+ },
26015
+ {
26016
+ "type": "object",
26017
+ "properties": {
26018
+ "kind": {
26019
+ "type": "string",
26020
+ "const": "numEq"
26021
+ },
26022
+ "value": {
26023
+ "type": "string",
26024
+ "description": "Exact numeric match. Plain number string (U256 semantics)."
26025
+ }
26026
+ },
26027
+ "required": [
26028
+ "kind",
26029
+ "value"
26030
+ ],
26031
+ "additionalProperties": false
26032
+ },
26033
+ {
26034
+ "type": "object",
26035
+ "properties": {
26036
+ "kind": {
26037
+ "type": "string",
26038
+ "const": "gt"
26039
+ },
26040
+ "value": {
26041
+ "type": "string",
26042
+ "description": "Greater than. Plain number string (U256 semantics)."
26043
+ }
26044
+ },
26045
+ "required": [
26046
+ "kind",
26047
+ "value"
26048
+ ],
26049
+ "additionalProperties": false
26050
+ },
26051
+ {
26052
+ "type": "object",
26053
+ "properties": {
26054
+ "kind": {
26055
+ "type": "string",
26056
+ "const": "gte"
26057
+ },
26058
+ "value": {
26059
+ "type": "string",
26060
+ "description": "Greater than or equal. Plain number string (U256 semantics)."
26061
+ }
26062
+ },
26063
+ "required": [
26064
+ "kind",
26065
+ "value"
26066
+ ],
26067
+ "additionalProperties": false
26068
+ },
26069
+ {
26070
+ "type": "object",
26071
+ "properties": {
26072
+ "kind": {
26073
+ "type": "string",
26074
+ "const": "lt"
26075
+ },
26076
+ "value": {
26077
+ "type": "string",
26078
+ "description": "Less than. Plain number string (U256 semantics)."
26079
+ }
26080
+ },
26081
+ "required": [
26082
+ "kind",
26083
+ "value"
26084
+ ],
26085
+ "additionalProperties": false
26086
+ },
26087
+ {
26088
+ "type": "object",
26089
+ "properties": {
26090
+ "kind": {
26091
+ "type": "string",
26092
+ "const": "lte"
26093
+ },
26094
+ "value": {
26095
+ "type": "string",
26096
+ "description": "Less than or equal. Plain number string (U256 semantics)."
26097
+ }
26098
+ },
26099
+ "required": [
26100
+ "kind",
26101
+ "value"
26102
+ ],
26103
+ "additionalProperties": false
26104
+ },
26105
+ {
26106
+ "type": "object",
26107
+ "properties": {
26108
+ "kind": {
26109
+ "type": "string",
26110
+ "const": "addressEq"
26111
+ },
26112
+ "identifier": {
26113
+ "type": "integer",
26114
+ "minimum": 0,
26115
+ "maximum": 255,
26116
+ "description": "Identifier of the Address-type table entry to compare against."
26117
+ }
26118
+ },
26119
+ "required": [
26120
+ "kind",
26121
+ "identifier"
26122
+ ],
26123
+ "additionalProperties": false
26124
+ },
26125
+ {
26126
+ "type": "object",
26127
+ "properties": {
26128
+ "kind": {
26129
+ "type": "string",
26130
+ "const": "stringEq"
26131
+ },
26132
+ "value": {
26133
+ "type": "string",
26134
+ "description": "Exact string match (byte equality, UTF-8)."
26135
+ }
26136
+ },
26137
+ "required": [
26138
+ "kind",
26139
+ "value"
26140
+ ],
26141
+ "additionalProperties": false
26142
+ },
26143
+ {
26144
+ "type": "object",
26145
+ "properties": {
26146
+ "kind": {
26147
+ "type": "string",
26148
+ "const": "stringContains"
26149
+ },
26150
+ "value": {
26151
+ "type": "string",
26152
+ "description": "Substring match, case-sensitive."
26153
+ }
26154
+ },
26155
+ "required": [
26156
+ "kind",
26157
+ "value"
26158
+ ],
26159
+ "additionalProperties": false
26160
+ },
26161
+ {
26162
+ "type": "object",
26163
+ "properties": {
26164
+ "kind": {
26165
+ "type": "string",
26166
+ "const": "stringNoCaseContains"
26167
+ },
26168
+ "value": {
26169
+ "type": "string",
26170
+ "description": "Substring match, case-insensitive."
26171
+ }
26172
+ },
26173
+ "required": [
26174
+ "kind",
26175
+ "value"
26176
+ ],
26177
+ "additionalProperties": false
26178
+ },
26179
+ {
26180
+ "type": "object",
26181
+ "properties": {
26182
+ "kind": {
26183
+ "type": "string",
26184
+ "const": "boolEq"
26185
+ },
26186
+ "value": {
26187
+ "type": "boolean",
26188
+ "description": "Boolean equality."
26189
+ }
26190
+ },
26191
+ "required": [
26192
+ "kind",
26193
+ "value"
26194
+ ],
26195
+ "additionalProperties": false
26196
+ }
26197
+ ],
26198
+ "description": "Predicate filter applied to each candidate's data value."
26199
+ }
26200
+ },
26201
+ "required": [
26202
+ "type",
26203
+ "object",
26204
+ "key",
26205
+ "ids",
26206
+ "where"
26207
+ ],
26208
+ "additionalProperties": false,
26209
+ "description": "Returns U256. ESCROW-BOUND sum (query 1179): per-row min(row_value, order.amount of the Order the row id names); a row keyed by anything that is not an Order contributes 0 (fail-closed). Unlike query_repository_data_sum_where (self-reported row values), a record cannot claim more than the Order actually escrowed — the forgery-proof aggregate for threshold gates and Formula pricing. Use logic_as_u256_* to compare the sum."
26210
+ },
25896
26211
  {
25897
26212
  "type": "object",
25898
26213
  "properties": {
@@ -1255,7 +1255,7 @@
1255
1255
  "type": "boolean"
1256
1256
  },
1257
1257
  "radar_review_summary": {
1258
- "description": "Merchant-side review coverage summary (REVIEW-COMPONENT-PLAN batch 4): completed orders vs orders with a structured review record. Review rows live in a caller-named Repository — gather both counts via onchain_table_data (repository rows under the 'review' key, id_from=Signer → one row per buyer) and pass them in; the radar derives the merchant-side review-rate hint (high missing rate with a reward attached → reward lapsed or window too short). Omit when no review repository is bound.",
1258
+ "description": "Merchant-side review coverage summary (REVIEW-COMPONENT-PLAN batch 4): completed orders vs orders with a structured review record. Review rows live in a caller-named Repository — gather both counts via onchain_table_data (repository rows under the 'review' key, order-keyed → one row per order, F09) and pass them in; the radar derives the merchant-side review-rate hint (high missing rate with a reward attached → reward lapsed or window too short). Omit when no review repository is bound.",
1259
1259
  "type": "object",
1260
1260
  "properties": {
1261
1261
  "orders_completed": {