@wowok/agent-mcp 3.3.6 → 3.3.8

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 (220) hide show
  1. package/dist/chain-semantics/eval-order.js +1 -1
  2. package/dist/chain-semantics/field-capability.js +1 -1
  3. package/dist/chain-semantics/fund-flow.js +1 -1
  4. package/dist/chain-semantics/guard-verbs.js +1 -1
  5. package/dist/chain-semantics/object-graph.js +1 -1
  6. package/dist/communication/message-cursors.d.ts +35 -0
  7. package/dist/communication/message-cursors.js +1 -0
  8. package/dist/communication/wts-attestation.d.ts +5 -0
  9. package/dist/communication/wts-attestation.js +1 -1
  10. package/dist/composition/audit.js +1 -1
  11. package/dist/composition/compile.d.ts +3 -2
  12. package/dist/composition/compile.js +1 -1
  13. package/dist/composition/inflight.d.ts +7 -0
  14. package/dist/composition/inflight.js +1 -1
  15. package/dist/composition/materialize.d.ts +4 -1
  16. package/dist/composition/materialize.js +1 -1
  17. package/dist/config/index.d.ts +1 -0
  18. package/dist/config/index.js +1 -1
  19. package/dist/config/store-policy.d.ts +14 -0
  20. package/dist/config/store-policy.js +1 -0
  21. package/dist/config/store-policy.spec.d.ts +1 -0
  22. package/dist/config/store-policy.spec.js +1 -0
  23. package/dist/customer/industry-risks.js +1 -1
  24. package/dist/customer/user-preferences.js +1 -1
  25. package/dist/data/projection/facets.spec.js +1 -1
  26. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  27. package/dist/evaluation/engine.js +1 -1
  28. package/dist/evaluation/match-policy.d.ts +30 -6
  29. package/dist/evaluation/match-policy.js +1 -1
  30. package/dist/evaluation/match-policy.spec.js +1 -1
  31. package/dist/experience/realtime-feedback.js +1 -1
  32. package/dist/extensions/business-modules.d.ts +1 -1
  33. package/dist/extensions/business-modules.js +1 -1
  34. package/dist/extensions/industry-pack.js +1 -1
  35. package/dist/extensions/modes.js +1 -1
  36. package/dist/graph/onchain/analyze.js +1 -1
  37. package/dist/graph/onchain/expand.js +1 -1
  38. package/dist/graph/onchain/exposure.js +1 -1
  39. package/dist/graph/onchain/facts.d.ts +1 -0
  40. package/dist/graph/onchain/facts.js +1 -1
  41. package/dist/graph/onchain/facts.spec.js +1 -1
  42. package/dist/harness/recover.js +1 -1
  43. package/dist/intent/types.d.ts +1 -1
  44. package/dist/intent/types.js +1 -1
  45. package/dist/keeper/detectors.d.ts +3 -0
  46. package/dist/keeper/detectors.js +1 -1
  47. package/dist/keeper/keeper.spec.js +1 -1
  48. package/dist/knowledge/acquisition-flywheel.js +1 -1
  49. package/dist/knowledge/allocation-ledger.d.ts +1 -0
  50. package/dist/knowledge/allocation-ledger.js +1 -1
  51. package/dist/knowledge/allocator-rail-verifier.d.ts +6 -2
  52. package/dist/knowledge/allocator-rail-verifier.js +1 -1
  53. package/dist/knowledge/arbitration-ledger.js +1 -1
  54. package/dist/knowledge/audit-rules.d.ts +37 -0
  55. package/dist/knowledge/audit-rules.js +1 -1
  56. package/dist/knowledge/baselines/rules/plan.json +128 -3
  57. package/dist/knowledge/builtin-templates.d.ts +18 -1
  58. package/dist/knowledge/builtin-templates.js +1 -1
  59. package/dist/knowledge/commission-landing.d.ts +26 -0
  60. package/dist/knowledge/commission-landing.js +1 -0
  61. package/dist/knowledge/discount-threshold.js +1 -1
  62. package/dist/knowledge/event-semantics.js +1 -1
  63. package/dist/knowledge/fund-layer.d.ts +7 -0
  64. package/dist/knowledge/fund-layer.js +1 -1
  65. package/dist/knowledge/getting-started.js +1 -1
  66. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  67. package/dist/knowledge/guard-design-patterns.js +1 -1
  68. package/dist/knowledge/guard-puzzle.js +1 -1
  69. package/dist/knowledge/guard-render.d.ts +7 -0
  70. package/dist/knowledge/guard-render.js +1 -1
  71. package/dist/knowledge/guard-risk.js +1 -1
  72. package/dist/knowledge/guard-templates.d.ts +1 -1
  73. package/dist/knowledge/guard-templates.js +1 -1
  74. package/dist/knowledge/guard-translation.js +1 -1
  75. package/dist/knowledge/index.js +1 -1
  76. package/dist/knowledge/industry-generalizer.d.ts +4 -0
  77. package/dist/knowledge/industry-generalizer.js +1 -1
  78. package/dist/knowledge/industry-registry.d.ts +1 -1
  79. package/dist/knowledge/industry-registry.js +1 -1
  80. package/dist/knowledge/industry-strategy.js +1 -1
  81. package/dist/knowledge/jsonrpc-enum.js +1 -1
  82. package/dist/knowledge/machine-fork-watch.d.ts +9 -0
  83. package/dist/knowledge/machine-fork-watch.js +1 -0
  84. package/dist/knowledge/migration-preflight.js +1 -1
  85. package/dist/knowledge/projection.spec.js +1 -1
  86. package/dist/knowledge/scenario-modes.d.ts +8 -2
  87. package/dist/knowledge/scenario-modes.js +1 -1
  88. package/dist/knowledge/semantic-ir.d.ts +132 -0
  89. package/dist/knowledge/semantic-ir.js +1 -0
  90. package/dist/knowledge/service-ledger.js +1 -1
  91. package/dist/knowledge/strategy-manuals.js +1 -1
  92. package/dist/knowledge/template-index.js +1 -1
  93. package/dist/knowledge/template-loader.d.ts +45 -0
  94. package/dist/knowledge/template-loader.js +1 -1
  95. package/dist/knowledge/template-prose.d.ts +50 -0
  96. package/dist/knowledge/template-prose.js +1 -0
  97. package/dist/knowledge/template-registry.js +1 -1
  98. package/dist/knowledge/template-scanner.d.ts +5 -3
  99. package/dist/knowledge/template-scanner.js +1 -1
  100. package/dist/knowledge/template-validation.js +1 -1
  101. package/dist/knowledge/tools-reference.js +1 -1
  102. package/dist/monitor/MonitorLoop.js +1 -1
  103. package/dist/monitor/normalize.d.ts +1 -1
  104. package/dist/monitor/normalize.js +1 -1
  105. package/dist/monitor/types.js +1 -1
  106. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  107. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  108. package/dist/playbooks/service-build/merchant-guide.d.ts +16 -6
  109. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  110. package/dist/playbooks/service-build/migration-planner.d.ts +11 -2
  111. package/dist/playbooks/service-build/migration-planner.js +1 -1
  112. package/dist/playbooks/service-build/mode-actions.d.ts +8 -0
  113. package/dist/playbooks/service-build/mode-actions.js +1 -1
  114. package/dist/playbooks/service-build/object-panorama.d.ts +22 -1
  115. package/dist/playbooks/service-build/object-panorama.js +1 -1
  116. package/dist/playbooks/service-build/participation-radar.js +1 -1
  117. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  118. package/dist/playbooks/service-build/reverse-mapping-nk4.spec.js +1 -1
  119. package/dist/playbooks/service-build/reverse-mapping.d.ts +1 -0
  120. package/dist/playbooks/service-build/reverse-mapping.js +1 -1
  121. package/dist/playbooks/service-build/service-panorama.js +1 -1
  122. package/dist/playbooks/service-build/service-quote.js +1 -1
  123. package/dist/playbooks/service-build/service-quote.spec.js +1 -1
  124. package/dist/review/index.js +1 -1
  125. package/dist/safety/confirm-gate.js +1 -1
  126. package/dist/schema/benchmark-migration/index.d.ts +135 -10
  127. package/dist/schema/benchmark-migration/index.js +1 -1
  128. package/dist/schema/call/allocation.d.ts +3 -0
  129. package/dist/schema/call/allocation.js +1 -1
  130. package/dist/schema/call/arbitration.js +1 -1
  131. package/dist/schema/call/base.d.ts +32 -0
  132. package/dist/schema/call/bridge.d.ts +8 -0
  133. package/dist/schema/call/error-codes.d.ts +1 -1
  134. package/dist/schema/call/error-codes.js +1 -1
  135. package/dist/schema/call/order.js +1 -1
  136. package/dist/schema/call/reward.d.ts +10 -0
  137. package/dist/schema/call/reward.js +1 -1
  138. package/dist/schema/call/semantic.js +1 -1
  139. package/dist/schema/call/service.js +1 -1
  140. package/dist/schema/common/index.js +1 -1
  141. package/dist/schema/config/index.d.ts +24 -0
  142. package/dist/schema/config/index.js +1 -1
  143. package/dist/schema/evaluation/index.d.ts +152 -0
  144. package/dist/schema/evaluation/index.js +1 -1
  145. package/dist/schema/goal/index.d.ts +16 -0
  146. package/dist/schema/goal/planning.d.ts +29 -0
  147. package/dist/schema/goal/planning.js +1 -1
  148. package/dist/schema/industry-pack/index.d.ts +70 -0
  149. package/dist/schema/industry-pack/modes.d.ts +70 -0
  150. package/dist/schema/industry-pack/modes.js +1 -1
  151. package/dist/schema/intent-radar/index.d.ts +3 -0
  152. package/dist/schema/intent-radar/index.js +1 -1
  153. package/dist/schema/local/index.d.ts +80 -0
  154. package/dist/schema/local/index.js +1 -1
  155. package/dist/schema/messenger/index.d.ts +278 -1
  156. package/dist/schema/messenger/index.js +1 -1
  157. package/dist/schema/operations.d.ts +6 -0
  158. package/dist/schema/query/bi.d.ts +38 -0
  159. package/dist/schema/query/bi.js +1 -1
  160. package/dist/schema/query/index.d.ts +148 -47
  161. package/dist/schema/query/index.js +1 -1
  162. package/dist/schema/schema-version.js +1 -1
  163. package/dist/schema/service-clone/index.d.ts +17 -0
  164. package/dist/schema/service-clone/index.js +1 -1
  165. package/dist/schema-query-impl/index.js +1 -1
  166. package/dist/schemas/account_operation.output.json +8 -0
  167. package/dist/schemas/benchmark_migration_operation.output.json +296 -2
  168. package/dist/schemas/benchmark_migration_operation.schema.json +292 -7
  169. package/dist/schemas/bridge_operation.output.json +8 -0
  170. package/dist/schemas/config_operation.output.json +95 -0
  171. package/dist/schemas/config_operation.schema.json +16 -1
  172. package/dist/schemas/evaluation_operation.output.json +240 -0
  173. package/dist/schemas/evaluation_operation.schema.json +397 -1
  174. package/dist/schemas/goal_operation.schema.json +40 -10
  175. package/dist/schemas/index.json +1 -1
  176. package/dist/schemas/industry_pack_operation.output.json +90 -2
  177. package/dist/schemas/industry_pack_operation.schema.json +236 -0
  178. package/dist/schemas/intent_radar.output.json +2 -0
  179. package/dist/schemas/intent_radar.schema.json +1 -0
  180. package/dist/schemas/local_cache_operation.output.json +8 -0
  181. package/dist/schemas/local_history_operation.output.json +8 -0
  182. package/dist/schemas/local_info_operation.output.json +8 -0
  183. package/dist/schemas/local_mark_operation.output.json +8 -0
  184. package/dist/schemas/messenger_operation.output.json +609 -1
  185. package/dist/schemas/messenger_operation.schema.json +96 -1
  186. package/dist/schemas/onchain_events.output.json +281 -11
  187. package/dist/schemas/onchain_events.schema.json +5 -1
  188. package/dist/schemas/onchain_operations.output.json +8 -0
  189. package/dist/schemas/onchain_operations.schema.json +371 -10
  190. package/dist/schemas/onchain_operations_allocation.schema.json +10 -1
  191. package/dist/schemas/onchain_operations_arbitration.schema.json +1 -1
  192. package/dist/schemas/onchain_operations_guard.schema.json +318 -0
  193. package/dist/schemas/onchain_operations_order.schema.json +1 -1
  194. package/dist/schemas/onchain_operations_reward.schema.json +35 -1
  195. package/dist/schemas/onchain_operations_service.schema.json +6 -6
  196. package/dist/schemas/query_toolkit.output.json +305 -8
  197. package/dist/schemas/service_clone_operation.output.json +79 -0
  198. package/dist/tools/handlers/benchmark-migration.d.ts +15 -0
  199. package/dist/tools/handlers/benchmark-migration.js +1 -1
  200. package/dist/tools/handlers/config.js +1 -1
  201. package/dist/tools/handlers/evaluation.js +1 -1
  202. package/dist/tools/handlers/evaluation.spec.js +1 -1
  203. package/dist/tools/handlers/intent-radar.js +1 -1
  204. package/dist/tools/handlers/messenger.d.ts +1 -0
  205. package/dist/tools/handlers/messenger.js +1 -1
  206. package/dist/tools/handlers/onchain.d.ts +20 -1
  207. package/dist/tools/handlers/onchain.js +1 -1
  208. package/dist/tools/handlers/query.d.ts +1 -0
  209. package/dist/tools/handlers/query.js +1 -1
  210. package/dist/tools/handlers/service-clone.d.ts +18 -0
  211. package/dist/tools/handlers/service-clone.js +1 -1
  212. package/dist/tools/handlers/wip.js +1 -1
  213. package/dist/tools/registry/agent.js +1 -1
  214. package/dist/tools/registry/business.js +1 -1
  215. package/dist/tools/registry/query.js +1 -1
  216. package/dist/tools/wip-verify-ledger.d.ts +14 -0
  217. package/dist/tools/wip-verify-ledger.js +1 -0
  218. package/dist/tools/wrap.d.ts +4 -0
  219. package/dist/tools/wrap.js +1 -1
  220. package/package.json +2 -2
@@ -5374,6 +5374,40 @@
5374
5374
  "type": "null"
5375
5375
  }
5376
5376
  ]
5377
+ },
5378
+ "evidence": {
5379
+ "description": "ksk9d2-tn-261026 F-01 claim-time attestation pin (reward::evidence_bind). REQUIRES store_from_id on the SAME guard — the binding reads THE pinned store_from row, so the chain aborts 16 (E_EVIDENCE_NEEDS_STORE_FROM) at build time without it. At claim the chain counts repository rows under (repo, key) matching the predicate for the claim's OWN store_from value (the submitted order) via the native evidence_count and aborts 15 (E_EVIDENCE_NOT_OWNED) when none — a borrowed foreign row can never pay.",
5380
+ "type": "object",
5381
+ "properties": {
5382
+ "repo": {
5383
+ "type": "string",
5384
+ "description": "Repository object ID or name holding the attestation rows."
5385
+ },
5386
+ "key": {
5387
+ "type": "array",
5388
+ "items": {
5389
+ "type": "integer",
5390
+ "minimum": 0,
5391
+ "maximum": 255
5392
+ },
5393
+ "description": "Repository data key bytes (the policy name the rows live under, e.g. UTF-8 bytes of 'rating')."
5394
+ },
5395
+ "predicate": {
5396
+ "type": "array",
5397
+ "items": {
5398
+ "type": "integer",
5399
+ "minimum": 0,
5400
+ "maximum": 255
5401
+ },
5402
+ "description": "BCS-encoded RepositoryDataPredicateWire bytes — the same predicate blob the repository read channel uses."
5403
+ }
5404
+ },
5405
+ "required": [
5406
+ "repo",
5407
+ "key",
5408
+ "predicate"
5409
+ ],
5410
+ "additionalProperties": false
5377
5411
  }
5378
5412
  },
5379
5413
  "required": [
@@ -15626,6 +15660,10 @@
15626
15660
  "digest": {
15627
15661
  "description": "Transaction digest that caused this change",
15628
15662
  "type": "string"
15663
+ },
15664
+ "synthesized": {
15665
+ "description": "C-F31 (5R-10): true when this removal entry (deleted/wrapped/unwrapped) was reconstructed from the transaction effects because the node's objectChanges omitted the consumed object. Effect refs are typeless, so object_type is unavailable on synthesized entries — resolve the type via the object id's history if needed. Never ignore a synthesized removal in a fund audit: it is the money's exit door.",
15666
+ "type": "boolean"
15629
15667
  }
15630
15668
  },
15631
15669
  "required": [
@@ -16250,6 +16288,10 @@
16250
16288
  ],
16251
16289
  "additionalProperties": false
16252
16290
  },
16291
+ "paused": {
16292
+ "type": "boolean",
16293
+ "description": "bs29 R-16 (O18): True when the Service is paused — the quote still computes prices, but EVERY buy is refused while the pause stands (client pre-buy gate, then the on-chain E_PAUSED assert). There is no on-chain scheduled resume: the merchant must submit pause:false. Do not budget against a paused quote."
16294
+ },
16253
16295
  "payment_token": {
16254
16296
  "type": "object",
16255
16297
  "properties": {
@@ -16326,7 +16368,7 @@
16326
16368
  },
16327
16369
  "note": {
16328
16370
  "type": "string",
16329
- "description": "order_new.buy.total_pay.balance must equal this exactly when passed explicitly — the on-chain buy aborts on any drift. Without a discount you may omit total_pay entirely: the buy auto-derives this exact total (M-K17)."
16371
+ "description": "FLOOR semantics (bs29 R-17, service.move:480-481): total_pay is a MINIMUM — an under-funded total aborts (E_COIN_NOT_ENOUGH); an over-funded one succeeds but the ORDER still escrows exactly Σ(unit_price × quantity) − discount (the excess is split back, never escrowed). Pass exactly this balance; without a discount you may omit total_pay entirely (the buy auto-derives this exact total, M-K17). Prefixed with the paused warning when the Service is paused (R-16)."
16330
16372
  }
16331
16373
  },
16332
16374
  "required": [
@@ -16355,6 +16397,21 @@
16355
16397
  }
16356
16398
  ]
16357
16399
  },
16400
+ "owned_by": {
16401
+ "anyOf": [
16402
+ {
16403
+ "type": "string"
16404
+ },
16405
+ {
16406
+ "type": "null"
16407
+ }
16408
+ ],
16409
+ "description": "KB-02 attribution: the coupon's current HOLDER address (unwrapped from the on-chain owner field); null when the chain read could not resolve it. The coupon is a holder object — this address is its only valid spender."
16410
+ },
16411
+ "ownership_note": {
16412
+ "type": "string",
16413
+ "description": "KB-02 attribution disclosure: the coupon is owned by <holder>; only the holder can redeem — a coupon held by another address cannot be applied to your order, have the owner transfer it first (discount_send); refunds settle the post-coupon amount only. When owned_by is null the note says the holder is UNVERIFIED and must be checked before checkout."
16414
+ },
16358
16415
  "type": {
16359
16416
  "type": "string",
16360
16417
  "description": "'rates' (off is bps of the list total) or 'minus' (off is a fixed smallest-units amount)."
@@ -16376,7 +16433,7 @@
16376
16433
  },
16377
16434
  "benchmark_met": {
16378
16435
  "type": "boolean",
16379
- "description": "False when the list total is below benchmark — on chain the buy still succeeds at FULL price and DESTROYS the coupon."
16436
+ "description": "False when the list total is below benchmark — the chain quote is then issued at FULL price WITHOUT stamping the coupon (service.move:436-442), so attaching the coupon at buy aborts (E_DISCOUNT_COUPON_UNEXPECTED, full rollback, nothing paid, coupon PRESERVED). Drop the coupon to buy at full price and keep it; raise the basket to actually use it."
16380
16437
  },
16381
16438
  "applied": {
16382
16439
  "type": "boolean",
@@ -16395,12 +16452,14 @@
16395
16452
  },
16396
16453
  "note": {
16397
16454
  "type": "string",
16398
- "description": "Burn warning when benchmark is unmet; guidance to use final_total when applied."
16455
+ "description": "Benchmark-unmet guidance (threshold + refusal semantics) when benchmark is unmet; burn-on-use and refund-basis guidance when applied."
16399
16456
  }
16400
16457
  },
16401
16458
  "required": [
16402
16459
  "coupon",
16403
16460
  "name",
16461
+ "owned_by",
16462
+ "ownership_note",
16404
16463
  "type",
16405
16464
  "off",
16406
16465
  "benchmark",
@@ -16417,7 +16476,7 @@
16417
16476
  "type": "null"
16418
16477
  }
16419
16478
  ],
16420
- "description": "Discount pricing block, mirroring the on-chain discounted-quote validation and price-reduction rules (service.move:282-302, 357-365). null when no discount was requested. Wrong-service or expired coupons REJECT the quote (the chain aborts the same way); an unmet benchmark returns applied:false with a burn warning (the only non-aborting failure). Read-only — quoting never consumes the coupon."
16479
+ "description": "Discount pricing block, mirroring the on-chain discounted-quote validation and price-reduction rules (the service module's discounted quote and its buy-time price-reduction twin). null when no discount was requested. Wrong-service or expired coupons REJECT the quote (the chain aborts the same way); an unmet benchmark returns applied:false with a benchmark-unmet warning — the buy with the coupon attached is refused (F-21 ptrn3: the threshold is disclosed HERE so the storefront can grey the coupon instead of failing at checkout). Read-only — quoting never consumes the coupon."
16421
16480
  },
16422
16481
  "allocation_preview": {
16423
16482
  "anyOf": [
@@ -16498,7 +16557,7 @@
16498
16557
  },
16499
16558
  "max_coverable_order": {
16500
16559
  "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."
16560
+ "description": "Raw smallest units: fund / 3 — the LARGEST single order this fund can fully cover (F-OF2-06). Orders above this ceiling proceed with a buy-time warning (compensation_fund_below_order_ceiling, demoted to warning by 拍板⑤ dm-mtw-261027), so treat this as the storefront's fully-covered cap; check it before promising a bigger basket."
16502
16561
  },
16503
16562
  "max_coverable_order_display": {
16504
16563
  "anyOf": [
@@ -16526,7 +16585,7 @@
16526
16585
  },
16527
16586
  "shortfall": {
16528
16587
  "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."
16588
+ "description": "Raw smallest units the merchant should add via service.compensation_fund_add to fully cover THIS basket: max(0, required_for_this_basket - fund_balance). 0 when already covered. The basket can still be ordered with a warning while the shortfall stands (拍板⑤ dm-mtw-261027)."
16530
16589
  },
16531
16590
  "shortfall_display": {
16532
16591
  "anyOf": [
@@ -16564,7 +16623,7 @@
16564
16623
  "type": "null"
16565
16624
  }
16566
16625
  ],
16567
- "description": "Per-order compensation-fund coverage for THIS basket (b6-11): the enforcement moved off the publish gate to the buy path — a fund-carrying Service below 3x the ORDER amount blocks order creation (compensation_fund_below_order_ceiling, no money moves), so the quote surfaces the same arithmetic BEFORE ordering. fund = 0 is a disclosed no-protection choice, never blocked. The chain-side claim-time gate remains the backstop: a zero fund aborts the payout (code 27, claim NOT consumed); a fund below the award pays it capped at the fund balance (tiered payout)."
16626
+ "description": "Per-order compensation-fund coverage for THIS basket (b6-11, demoted to warning by 拍板⑤ dm-mtw-261027): the buy path WARNS when a fund-carrying Service is below 3x the ORDER amount (compensation_fund_below_order_ceiling) but the order still proceeds — the quote surfaces the same arithmetic BEFORE ordering so the buyer can opt out or the merchant can top up first. fund = 0 is a disclosed no-protection choice, never blocked. The chain-side claim-time gate remains the backstop: a zero fund aborts the payout (code 27, claim NOT consumed); a fund below the award pays it capped at the fund balance (tiered payout)."
16568
16627
  },
16569
16628
  "reward_terms": {
16570
16629
  "anyOf": [
@@ -16679,6 +16738,51 @@
16679
16738
  }
16680
16739
  ],
16681
16740
  "description": "Rating condition detected in the claim guard (F-AOF-4): 'like' or 'dislike' = the claim ONLY pays for that rating (any other rating aborts the claim); '>= N' / '> N' / '== N' = a numeric rating floor decoded from the claim guard's structured root (F-AOF-4 v2, bkg15 F17 / klk15 C-05 — the claim only pays at or above N stars); 'unknown' = a rating condition EXISTS but its shape could not be parsed — check the guard before promising the incentive; null = no rating condition detected."
16741
+ },
16742
+ "claim_window": {
16743
+ "anyOf": [
16744
+ {
16745
+ "type": "object",
16746
+ "properties": {
16747
+ "opens_after_s": {
16748
+ "anyOf": [
16749
+ {
16750
+ "type": "number"
16751
+ },
16752
+ {
16753
+ "type": "null"
16754
+ }
16755
+ ],
16756
+ "description": "Seconds after the anchor event before the claim window opens (the guard's time lower bound); null = no lower bound decoded."
16757
+ },
16758
+ "closes_after_s": {
16759
+ "anyOf": [
16760
+ {
16761
+ "type": "number"
16762
+ },
16763
+ {
16764
+ "type": "null"
16765
+ }
16766
+ ],
16767
+ "description": "Seconds after the anchor event until the claim window closes (the guard's time upper bound — claims abort E_GUARD_EXPIRED past it); null = no upper bound decoded."
16768
+ },
16769
+ "anchor": {
16770
+ "type": "string",
16771
+ "description": "The clock anchor the window counts from ('order.time' = the order's creation/grant time)."
16772
+ }
16773
+ },
16774
+ "required": [
16775
+ "opens_after_s",
16776
+ "closes_after_s",
16777
+ "anchor"
16778
+ ],
16779
+ "additionalProperties": false
16780
+ },
16781
+ {
16782
+ "type": "null"
16783
+ }
16784
+ ],
16785
+ "description": "R-09 (bs29): the claim window decoded from the claim guard's time constants — the object-level expiration_time above is usually null, the REAL '60–600s after grant'-style window lives HERE. null = the guard's raw payload was unreadable or carries no Clock comparison (fail-honest: window NOT decoded; check the claim guard before promising a timing to the buyer)."
16682
16786
  }
16683
16787
  },
16684
16788
  "required": [
@@ -16689,11 +16793,43 @@
16689
16793
  "expiration_time",
16690
16794
  "expiration_display",
16691
16795
  "expired",
16692
- "min_rating"
16796
+ "min_rating",
16797
+ "claim_window"
16693
16798
  ],
16694
16799
  "additionalProperties": false
16695
16800
  }
16696
16801
  },
16802
+ "replay_scope": {
16803
+ "type": "object",
16804
+ "properties": {
16805
+ "scope": {
16806
+ "type": "string",
16807
+ "enum": [
16808
+ "once_per_order",
16809
+ "once_per_stamp",
16810
+ "once_per_recipient_guard",
16811
+ "mixed",
16812
+ "unknown"
16813
+ ],
16814
+ "description": "R2-06(b): what is once-scoped on the reward PULL rail, derived from the mounted guard entries' store_from_id. 'once_per_order' = every claim entry stamps the conventional Order slot 0; 'once_per_stamp' = stamped, but not the conventional Order slot; 'once_per_recipient_guard' = EMPTY store_from slot, i.e. one claim per (recipient, guard) FOR LIFE (the buyer's second order aborts 13, E_CLAIM_ALREADY_MADE); 'mixed' = some entries stamped; 'unknown' = mounted guards unreadable."
16815
+ },
16816
+ "detail": {
16817
+ "type": "string",
16818
+ "description": "Human-readable statement of the claim key actually in force (RewardClaimKey{recipient, guard, store_from})."
16819
+ },
16820
+ "per_order_note": {
16821
+ "type": "string",
16822
+ "description": "What a per-order replay would require: a guard_add store_from_id stamp on the submitted-Order slot PLUS an order-scoped where:{storeFromId} record gate (SV-2); a chain-enforced per-order once needs an Allocation leg declaring protocol slot 254."
16823
+ }
16824
+ },
16825
+ "required": [
16826
+ "scope",
16827
+ "detail",
16828
+ "per_order_note"
16829
+ ],
16830
+ "additionalProperties": false,
16831
+ "description": "R2-06(b) once-scope disclosure (gf27 P0-03): do not promise a per-order bounty unless scope is once_per_order."
16832
+ },
16697
16833
  "coverage": {
16698
16834
  "anyOf": [
16699
16835
  {
@@ -16713,6 +16849,7 @@
16713
16849
  "pool_balance_display",
16714
16850
  "record_count",
16715
16851
  "claims",
16852
+ "replay_scope",
16716
16853
  "coverage"
16717
16854
  ],
16718
16855
  "additionalProperties": false
@@ -16744,6 +16881,7 @@
16744
16881
  "action",
16745
16882
  "network",
16746
16883
  "service",
16884
+ "paused",
16747
16885
  "payment_token",
16748
16886
  "items",
16749
16887
  "total_pay",
@@ -26787,6 +26925,165 @@
26787
26925
  ],
26788
26926
  "additionalProperties": false,
26789
26927
  "description": "Returns VecString. Lists ALL policy key names of the Repository (max 50). Use vec_length to bound per-key composite queries or vec_contains_string to assert a key exists."
26928
+ },
26929
+ {
26930
+ "type": "object",
26931
+ "properties": {
26932
+ "type": {
26933
+ "type": "string",
26934
+ "const": "query_order_named_operator_member"
26935
+ },
26936
+ "object": {
26937
+ "type": "object",
26938
+ "properties": {
26939
+ "identifier": {
26940
+ "type": "integer",
26941
+ "minimum": 0,
26942
+ "maximum": 255,
26943
+ "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)."
26944
+ }
26945
+ },
26946
+ "required": [
26947
+ "identifier"
26948
+ ],
26949
+ "additionalProperties": false,
26950
+ "description": "Reference to the Order object in the Guard table (must be Address type)."
26951
+ }
26952
+ },
26953
+ "required": [
26954
+ "type",
26955
+ "object"
26956
+ ],
26957
+ "additionalProperties": false,
26958
+ "description": "Returns Bool. Whether the transaction signer is on the order's named-operator roster (DM-P1 rider-roster exclusive admission): reads the namedOperator roster of the order's Progress and checks tx-signer membership. Parameterless — the signer comes from the transaction context. Gated by protocol v138 (feature flag enable_order_named_operator_member); on a chain without the flag the guard evaluation aborts. Typical use: AND it into the forward-edge guard on courier handover edges (e.g. PickupOrder/DeliverOrder) so only roster members can advance — the on-chain namedOperator rail alone only AUTHORIZES, it never DENIES (R-19)."
26959
+ },
26960
+ {
26961
+ "type": "object",
26962
+ "properties": {
26963
+ "type": {
26964
+ "type": "string",
26965
+ "const": "query_repository_data_has"
26966
+ },
26967
+ "object": {
26968
+ "type": "object",
26969
+ "properties": {
26970
+ "identifier": {
26971
+ "type": "integer",
26972
+ "minimum": 0,
26973
+ "maximum": 255,
26974
+ "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)."
26975
+ }
26976
+ },
26977
+ "required": [
26978
+ "identifier"
26979
+ ],
26980
+ "additionalProperties": false,
26981
+ "description": "Reference to the Repository object in the Guard table (must be Address type)."
26982
+ },
26983
+ "id": {
26984
+ "type": "object",
26985
+ "properties": {
26986
+ "identifier": {
26987
+ "type": "integer",
26988
+ "minimum": 0,
26989
+ "maximum": 255,
26990
+ "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)."
26991
+ }
26992
+ },
26993
+ "required": [
26994
+ "identifier"
26995
+ ],
26996
+ "additionalProperties": false,
26997
+ "description": "Reference to the row's principal address (Address type table entry) — the row id the data was written under."
26998
+ },
26999
+ "key": {
27000
+ "type": "string",
27001
+ "minLength": 1,
27002
+ "description": "Row name — the policy key string of the data row to probe."
27003
+ }
27004
+ },
27005
+ "required": [
27006
+ "type",
27007
+ "object",
27008
+ "id",
27009
+ "key"
27010
+ ],
27011
+ "additionalProperties": false,
27012
+ "description": "Returns Bool. Whether the Repository holds a data row for (key, id) — single-row exact read by (key, id), the primitive for per-value mutual-consent attestation (e.g. a settlement keeper asserting the buyer acceptance row exists before executing a refund allocator). NOT protocol-gated (legacy query, works on every chain version)."
27013
+ },
27014
+ {
27015
+ "type": "object",
27016
+ "properties": {
27017
+ "type": {
27018
+ "type": "string",
27019
+ "const": "query_repository_data"
27020
+ },
27021
+ "object": {
27022
+ "type": "object",
27023
+ "properties": {
27024
+ "identifier": {
27025
+ "type": "integer",
27026
+ "minimum": 0,
27027
+ "maximum": 255,
27028
+ "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)."
27029
+ }
27030
+ },
27031
+ "required": [
27032
+ "identifier"
27033
+ ],
27034
+ "additionalProperties": false,
27035
+ "description": "Reference to the Repository object in the Guard table (must be Address type)."
27036
+ },
27037
+ "id": {
27038
+ "type": "object",
27039
+ "properties": {
27040
+ "identifier": {
27041
+ "type": "integer",
27042
+ "minimum": 0,
27043
+ "maximum": 255,
27044
+ "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)."
27045
+ }
27046
+ },
27047
+ "required": [
27048
+ "identifier"
27049
+ ],
27050
+ "additionalProperties": false,
27051
+ "description": "Reference to the row's principal address (Address type table entry) — the row id the data was written under."
27052
+ },
27053
+ "key": {
27054
+ "type": "string",
27055
+ "minLength": 1,
27056
+ "description": "Row name — the policy key string of the data row to read."
27057
+ },
27058
+ "conditions": {
27059
+ "description": "Optional equality conditions compared against the read row bytes; when non-empty the node emits ONE on-chain logic_equal over the read plus all conditions and returns Bool instead of VecU8.",
27060
+ "type": "array",
27061
+ "items": {
27062
+ "type": "object",
27063
+ "properties": {
27064
+ "identifier": {
27065
+ "type": "integer",
27066
+ "minimum": 0,
27067
+ "maximum": 255,
27068
+ "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)."
27069
+ }
27070
+ },
27071
+ "required": [
27072
+ "identifier"
27073
+ ],
27074
+ "additionalProperties": false,
27075
+ "description": "Reference to a VecU8-type table entry whose value must equal the read row — a b_submission slot (the submitted acceptance value) is the typical leg."
27076
+ }
27077
+ }
27078
+ },
27079
+ "required": [
27080
+ "type",
27081
+ "object",
27082
+ "id",
27083
+ "key"
27084
+ ],
27085
+ "additionalProperties": false,
27086
+ "description": "Returns VecU8 (the row bytes [type_byte, ...bcs_payload]) — single-row exact read by (key, id), the primitive for per-value mutual-consent attestation. With conditions, returns Bool: the kernel-enforced 'stored value == submitted value' check (b_submission condition entries make the comparison read the passport submission slot) — this turns a self-attested policy write into kernel-verified mutual consent. NOT protocol-gated (legacy query). Absent row: empty blob under the v136 sentinel flag (never equals a non-empty acceptance value — fail-closed), guard abort on older chains."
26790
27087
  }
26791
27088
  ]
26792
27089
  }
@@ -145,6 +145,84 @@
145
145
  "additionalProperties": false
146
146
  }
147
147
  },
148
+ "superseded_consumers": {
149
+ "type": "object",
150
+ "properties": {
151
+ "findings": {
152
+ "type": "array",
153
+ "items": {
154
+ "type": "object",
155
+ "properties": {
156
+ "level": {
157
+ "type": "string",
158
+ "const": "warning",
159
+ "description": "4R-06②: always warning level — never blocks the gate."
160
+ },
161
+ "consumer_kind": {
162
+ "type": "string",
163
+ "enum": [
164
+ "allocation",
165
+ "service_binding",
166
+ "repository_binding"
167
+ ],
168
+ "description": "Live-tested silent-staleness class (h1q F-WO-03)."
169
+ },
170
+ "op_step": {
171
+ "type": "number",
172
+ "description": "Operation step carrying the stale reference."
173
+ },
174
+ "op_type": {
175
+ "type": "string"
176
+ },
177
+ "field": {
178
+ "type": "string",
179
+ "description": "JSON path inside the op payload, e.g. order_allocators.allocators[2].guard."
180
+ },
181
+ "superseded_address": {
182
+ "type": "string",
183
+ "description": "Address this rebuild supersedes (source Service/Machine or a source-bound guard)."
184
+ },
185
+ "replacement": {
186
+ "anyOf": [
187
+ {
188
+ "type": "string"
189
+ },
190
+ {
191
+ "type": "null"
192
+ }
193
+ ],
194
+ "description": "LocalMark name to rebind to; null when no replacement was emitted (e.g. guard_mode='reuse_all')."
195
+ },
196
+ "remediation": {
197
+ "type": "string",
198
+ "description": "Precise op + field to rebind the consumer."
199
+ }
200
+ },
201
+ "required": [
202
+ "level",
203
+ "consumer_kind",
204
+ "op_step",
205
+ "op_type",
206
+ "field",
207
+ "superseded_address",
208
+ "replacement",
209
+ "remediation"
210
+ ],
211
+ "additionalProperties": false
212
+ }
213
+ },
214
+ "note": {
215
+ "type": "string",
216
+ "description": "Scope + residual: consumers outside this rebuild payload are not scanned (no address-level consumer index)."
217
+ }
218
+ },
219
+ "required": [
220
+ "findings",
221
+ "note"
222
+ ],
223
+ "additionalProperties": false,
224
+ "description": "Post-rebuild consumer self-check over the emitted operations."
225
+ },
148
226
  "next_step": {
149
227
  "type": "string"
150
228
  }
@@ -154,6 +232,7 @@
154
232
  "source",
155
233
  "gate",
156
234
  "operations",
235
+ "superseded_consumers",
157
236
  "next_step"
158
237
  ],
159
238
  "additionalProperties": false
@@ -3,6 +3,13 @@ import { type TemplateScanResult } from "../../knowledge/template-scanner.js";
3
3
  import type { DeliverableDefinition } from "../../playbooks/service-build/intent-analyzer.js";
4
4
  import type { IndustryMode } from "../../extensions/index.js";
5
5
  import type { ToolDispatchResult } from "../types.js";
6
+ export interface StaleBuildDisclosure {
7
+ stale: boolean;
8
+ known: boolean;
9
+ lag_minutes: number | null;
10
+ detail: string;
11
+ }
12
+ export declare function staleBuildFace(srcDir?: string, distDir?: string): StaleBuildDisclosure;
6
13
  declare function driftFace(templateId: string): {
7
14
  template: string;
8
15
  state: "current";
@@ -68,8 +75,16 @@ export declare function planNextAction(plan: Record<string, unknown>, retryActio
68
75
  export interface RewardPoolPrefill {
69
76
  fee_key: "review_reward_pool";
70
77
  value: number;
78
+ claim_source?: "semantic_ir";
71
79
  }
72
80
  export declare function extractRewardPoolCandidate(description: string | undefined): number | undefined;
81
+ export interface NumericFeePrefill {
82
+ fee_key: string;
83
+ value: number;
84
+ claim_source?: "semantic_ir";
85
+ }
86
+ export declare function extractFundingThresholdCandidate(description: string | undefined): number | undefined;
87
+ export declare function extractMinOrderCandidate(description: string | undefined): number | undefined;
73
88
  export { validateAllocatorRows };
74
89
  export declare function variantPaymentModel(t: IndustryTemplate): "milestone" | "subscription" | "escrow";
75
90
  export declare function variantDeliverables(t: IndustryTemplate, traits: IndustryMode["traits"] | undefined): DeliverableDefinition[];