@wowok/agent-mcp 3.4.0 → 3.4.2

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 (412) hide show
  1. package/README.md +8 -0
  2. package/dist/chain-semantics/composition-truth.d.ts +102 -0
  3. package/dist/chain-semantics/composition-truth.js +1 -0
  4. package/dist/chain-semantics/eval-order.js +1 -1
  5. package/dist/chain-semantics/fund-flow.js +1 -1
  6. package/dist/chain-semantics/index.d.ts +1 -0
  7. package/dist/chain-semantics/index.js +1 -1
  8. package/dist/composition/audit.js +1 -1
  9. package/dist/composition/blueprint-view.d.ts +3 -3
  10. package/dist/composition/blueprint-view.js +1 -1
  11. package/dist/composition/compile.d.ts +24 -3
  12. package/dist/composition/compile.js +1 -1
  13. package/dist/composition/emit-phases.d.ts +206 -0
  14. package/dist/composition/emit-phases.js +1 -0
  15. package/dist/composition/generate.d.ts +40 -0
  16. package/dist/composition/generate.js +1 -0
  17. package/dist/composition/guard-fill.d.ts +44 -0
  18. package/dist/composition/guard-fill.js +1 -0
  19. package/dist/composition/inflight.d.ts +20 -2
  20. package/dist/composition/inflight.js +1 -1
  21. package/dist/composition/input-normalize.d.ts +15 -0
  22. package/dist/composition/input-normalize.js +1 -0
  23. package/dist/composition/materialize.d.ts +18 -13
  24. package/dist/composition/materialize.js +1 -1
  25. package/dist/composition/mode-gates.d.ts +35 -0
  26. package/dist/composition/mode-gates.js +1 -0
  27. package/dist/composition/param-disclosure.js +1 -1
  28. package/dist/composition/plan-retry-ledger.d.ts +21 -0
  29. package/dist/composition/plan-retry-ledger.js +1 -0
  30. package/dist/composition/plan.d.ts +7 -2
  31. package/dist/composition/plan.js +1 -1
  32. package/dist/composition/product-card.d.ts +94 -0
  33. package/dist/composition/product-card.js +1 -0
  34. package/dist/composition/supply-chain-emit.d.ts +46 -0
  35. package/dist/composition/supply-chain-emit.js +1 -0
  36. package/dist/config/config-audit.spec.js +1 -1
  37. package/dist/config/config-warnings.d.ts +2 -0
  38. package/dist/config/config-warnings.js +1 -0
  39. package/dist/config/exposure.d.ts +2 -2
  40. package/dist/config/judgment.d.ts +31 -5
  41. package/dist/config/judgment.js +1 -1
  42. package/dist/config/judgment.spec.js +1 -1
  43. package/dist/config/match-policy-file.d.ts +34 -0
  44. package/dist/config/match-policy-file.js +1 -0
  45. package/dist/config/match-policy-file.spec.d.ts +1 -0
  46. package/dist/config/match-policy-file.spec.js +1 -0
  47. package/dist/config/rule-engine.d.ts +5 -5
  48. package/dist/config/rule-engine.js +1 -1
  49. package/dist/config/runtime.d.ts +0 -1
  50. package/dist/config/runtime.js +1 -1
  51. package/dist/config/severity.d.ts +0 -2
  52. package/dist/config/severity.js +1 -1
  53. package/dist/config/store-policy.spec.js +1 -1
  54. package/dist/config/template-params.d.ts +42 -0
  55. package/dist/config/template-params.js +1 -0
  56. package/dist/config/template-params.spec.d.ts +1 -0
  57. package/dist/config/template-params.spec.js +1 -0
  58. package/dist/data/api/api.spec.js +1 -1
  59. package/dist/data/api/server.js +1 -1
  60. package/dist/data/projection/store.d.ts +2 -1
  61. package/dist/data/projection/store.js +1 -1
  62. package/dist/data/projection/types.d.ts +22 -0
  63. package/dist/data/sync/cdc.d.ts +1 -2
  64. package/dist/data/sync/cdc.js +1 -1
  65. package/dist/evaluation/acceptance.d.ts +8 -0
  66. package/dist/evaluation/acceptance.js +1 -1
  67. package/dist/evaluation/builtins/demand-match.js +1 -1
  68. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  69. package/dist/evaluation/capability.d.ts +2 -0
  70. package/dist/evaluation/category-match-rules.d.ts +0 -1
  71. package/dist/evaluation/category-match-rules.js +1 -1
  72. package/dist/evaluation/composer.d.ts +25 -0
  73. package/dist/evaluation/composer.js +1 -1
  74. package/dist/evaluation/engine.js +1 -1
  75. package/dist/evaluation/extract.d.ts +7 -0
  76. package/dist/evaluation/extract.js +1 -1
  77. package/dist/evaluation/game-strategy.d.ts +0 -3
  78. package/dist/evaluation/game-strategy.js +1 -1
  79. package/dist/evaluation/match-operation.d.ts +9 -0
  80. package/dist/evaluation/match-operation.js +1 -1
  81. package/dist/evaluation/match-policy-resolver.d.ts +9 -0
  82. package/dist/evaluation/match-policy-resolver.js +1 -0
  83. package/dist/evaluation/match-policy.d.ts +3 -1
  84. package/dist/evaluation/match-policy.js +1 -1
  85. package/dist/evaluation/region.d.ts +0 -6
  86. package/dist/evaluation/region.js +1 -1
  87. package/dist/evaluation/standards.d.ts +2 -1
  88. package/dist/evaluation/standards.js +1 -1
  89. package/dist/evaluation/structured-lines.d.ts +8 -0
  90. package/dist/evaluation/structured-lines.js +1 -0
  91. package/dist/evaluation/types.d.ts +6 -0
  92. package/dist/experience/realtime-feedback.js +1 -1
  93. package/dist/extensions/capability-manifest.d.ts +1 -0
  94. package/dist/extensions/capability-manifest.js +1 -1
  95. package/dist/extensions/capability.d.ts +91 -0
  96. package/dist/extensions/capability.js +1 -0
  97. package/dist/extensions/industry-audit.spec.js +1 -1
  98. package/dist/extensions/industry-pack.d.ts +13 -0
  99. package/dist/extensions/industry-pack.js +1 -1
  100. package/dist/extensions/modes.js +1 -1
  101. package/dist/extensions/registry.d.ts +0 -2
  102. package/dist/extensions/registry.js +1 -1
  103. package/dist/goal/GoalEngine.js +1 -1
  104. package/dist/graph/onchain/analyze.js +1 -1
  105. package/dist/graph/onchain/expand.js +1 -1
  106. package/dist/graph/onchain/exposure.js +1 -1
  107. package/dist/graph/onchain/facts.js +1 -1
  108. package/dist/graph/onchain/order-status.d.ts +0 -1
  109. package/dist/graph/onchain/order-status.js +1 -1
  110. package/dist/harness/recover.js +1 -1
  111. package/dist/harness/verify.d.ts +0 -3
  112. package/dist/harness/verify.js +1 -1
  113. package/dist/intent/types.d.ts +0 -1
  114. package/dist/intent/types.js +1 -1
  115. package/dist/keeper/detectors.js +1 -1
  116. package/dist/keeper/types.d.ts +0 -1
  117. package/dist/keeper/types.js +1 -1
  118. package/dist/knowledge/allocation-risk.d.ts +1 -0
  119. package/dist/knowledge/allocation-risk.js +1 -1
  120. package/dist/knowledge/allocator-rail-verifier.d.ts +6 -1
  121. package/dist/knowledge/allocator-rail-verifier.js +1 -1
  122. package/dist/knowledge/arbitration-ledger.js +1 -1
  123. package/dist/knowledge/arbitration-puzzle.js +1 -1
  124. package/dist/knowledge/arbitration-templates.js +1 -1
  125. package/dist/knowledge/audit-rules.d.ts +4 -3
  126. package/dist/knowledge/audit-rules.js +1 -1
  127. package/dist/knowledge/baselines/judgment-baselines.json +21 -2
  128. package/dist/knowledge/baselines/rules/oracle.json +120 -0
  129. package/dist/knowledge/baselines/rules/plan.json +384 -17
  130. package/dist/knowledge/baselines/rules/progress.json +20 -2
  131. package/dist/knowledge/builtin-templates.d.ts +28 -1
  132. package/dist/knowledge/builtin-templates.js +1 -1
  133. package/dist/knowledge/component-schema.js +1 -1
  134. package/dist/knowledge/contact-templates.d.ts +0 -1
  135. package/dist/knowledge/contact-templates.js +1 -1
  136. package/dist/knowledge/dynamic-pricing.js +1 -1
  137. package/dist/knowledge/fee-param-bindings.js +1 -1
  138. package/dist/knowledge/fund-layer.d.ts +1 -0
  139. package/dist/knowledge/fund-layer.js +1 -1
  140. package/dist/knowledge/game-scenarios.js +1 -1
  141. package/dist/knowledge/getting-started.js +1 -1
  142. package/dist/knowledge/guard-binding-table.d.ts +52 -0
  143. package/dist/knowledge/guard-binding-table.js +1 -0
  144. package/dist/knowledge/guard-binding-verifier.d.ts +30 -0
  145. package/dist/knowledge/guard-binding-verifier.js +1 -0
  146. package/dist/knowledge/guard-bindings.js +1 -1
  147. package/dist/knowledge/guard-blueprint.d.ts +68 -0
  148. package/dist/knowledge/guard-blueprint.js +1 -0
  149. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  150. package/dist/knowledge/guard-design-patterns.js +1 -1
  151. package/dist/knowledge/guard-field-cognition.js +1 -1
  152. package/dist/knowledge/guard-host-context.d.ts +24 -0
  153. package/dist/knowledge/guard-host-context.js +1 -0
  154. package/dist/knowledge/guard-lint.js +1 -1
  155. package/dist/knowledge/guard-node-gates.d.ts +3 -0
  156. package/dist/knowledge/guard-node-gates.js +1 -1
  157. package/dist/knowledge/guard-puzzle.js +1 -1
  158. package/dist/knowledge/guard-render.js +1 -1
  159. package/dist/knowledge/guard-risk.js +1 -1
  160. package/dist/knowledge/guard-submission-prompt.d.ts +11 -0
  161. package/dist/knowledge/guard-submission-prompt.js +1 -1
  162. package/dist/knowledge/guard-templates.d.ts +1 -1
  163. package/dist/knowledge/guard-templates.js +1 -1
  164. package/dist/knowledge/guard-translation.js +1 -1
  165. package/dist/knowledge/index.d.ts +1 -1
  166. package/dist/knowledge/index.js +1 -1
  167. package/dist/knowledge/industry-generalizer.d.ts +6 -1
  168. package/dist/knowledge/industry-generalizer.js +1 -1
  169. package/dist/knowledge/industry-registry.js +1 -1
  170. package/dist/knowledge/jsonrpc-enum.d.ts +38 -0
  171. package/dist/knowledge/jsonrpc-enum.js +1 -1
  172. package/dist/knowledge/machine-topology.js +1 -1
  173. package/dist/knowledge/machine-translation.js +1 -1
  174. package/dist/knowledge/object-dependency.d.ts +31 -0
  175. package/dist/knowledge/object-dependency.js +1 -0
  176. package/dist/knowledge/onchain-constants.d.ts +2 -0
  177. package/dist/knowledge/onchain-constants.js +1 -1
  178. package/dist/knowledge/param-schema.d.ts +23 -0
  179. package/dist/knowledge/param-schema.js +1 -1
  180. package/dist/knowledge/param-tiers.js +1 -1
  181. package/dist/knowledge/passport-ledger.js +1 -1
  182. package/dist/knowledge/path-oracle/coverage.d.ts +16 -0
  183. package/dist/knowledge/path-oracle/coverage.js +1 -0
  184. package/dist/knowledge/path-oracle/index.d.ts +5 -0
  185. package/dist/knowledge/path-oracle/index.js +1 -0
  186. package/dist/knowledge/path-oracle/products/food-delivery.d.ts +2 -0
  187. package/dist/knowledge/path-oracle/products/food-delivery.js +1 -0
  188. package/dist/knowledge/path-oracle/schema.d.ts +188 -0
  189. package/dist/knowledge/path-oracle/schema.js +1 -0
  190. package/dist/knowledge/pattern-resolutions.d.ts +2 -0
  191. package/dist/knowledge/pattern-resolutions.js +1 -1
  192. package/dist/knowledge/progress-ledger.js +1 -1
  193. package/dist/knowledge/progress-risk.js +1 -1
  194. package/dist/knowledge/projection.spec.js +1 -1
  195. package/dist/knowledge/protocol-facts.js +1 -1
  196. package/dist/knowledge/requirement-families.d.ts +13 -0
  197. package/dist/knowledge/requirement-families.js +1 -0
  198. package/dist/knowledge/reward-ledger.js +1 -1
  199. package/dist/knowledge/scenario-modes.d.ts +1 -0
  200. package/dist/knowledge/scenario-modes.js +1 -1
  201. package/dist/knowledge/semantic-ir.d.ts +4 -0
  202. package/dist/knowledge/semantic-ir.js +1 -1
  203. package/dist/knowledge/service-ledger.d.ts +1 -1
  204. package/dist/knowledge/service-ledger.js +1 -1
  205. package/dist/knowledge/sku-name-gate.d.ts +17 -0
  206. package/dist/knowledge/sku-name-gate.js +1 -0
  207. package/dist/knowledge/supply-chain.d.ts +9 -0
  208. package/dist/knowledge/supply-chain.js +1 -1
  209. package/dist/knowledge/template-loader.d.ts +14 -6
  210. package/dist/knowledge/template-loader.js +1 -1
  211. package/dist/knowledge/template-nav.d.ts +3 -1
  212. package/dist/knowledge/template-nav.js +1 -1
  213. package/dist/knowledge/template-prose.d.ts +1 -1
  214. package/dist/knowledge/template-registry.js +1 -1
  215. package/dist/knowledge/template-scanner.d.ts +62 -0
  216. package/dist/knowledge/template-scanner.js +1 -1
  217. package/dist/knowledge/template-test-profiles.js +1 -1
  218. package/dist/knowledge/tools-reference.js +1 -1
  219. package/dist/knowledge/workflow-guidance.d.ts +5 -0
  220. package/dist/knowledge/workflow-guidance.js +1 -1
  221. package/dist/monitor/MonitorLoop.js +1 -1
  222. package/dist/participation/customer-interest.d.ts +4 -0
  223. package/dist/participation/customer-interest.js +1 -1
  224. package/dist/participation/node-action-advisor.d.ts +4 -0
  225. package/dist/participation/node-action-advisor.js +1 -1
  226. package/dist/participation/radar-core.js +1 -1
  227. package/dist/participation/time-window.d.ts +11 -0
  228. package/dist/participation/time-window.js +1 -1
  229. package/dist/persona/address-format.d.ts +0 -1
  230. package/dist/persona/address-format.js +1 -1
  231. package/dist/persona/bridge.js +1 -1
  232. package/dist/persona/index.d.ts +0 -2
  233. package/dist/persona/index.js +1 -1
  234. package/dist/persona/model.js +1 -1
  235. package/dist/persona/persona-audit.spec.js +1 -1
  236. package/dist/persona/types.d.ts +6 -0
  237. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  238. package/dist/playbooks/service-build/game-theory.d.ts +2 -2
  239. package/dist/playbooks/service-build/intent-analyzer.js +1 -1
  240. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  241. package/dist/playbooks/service-build/merchant-guide.d.ts +50 -23
  242. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  243. package/dist/playbooks/service-build/migration-planner.d.ts +2 -0
  244. package/dist/playbooks/service-build/migration-planner.js +1 -1
  245. package/dist/playbooks/service-build/mode-actions.js +1 -1
  246. package/dist/playbooks/service-build/object-panorama.d.ts +8 -0
  247. package/dist/playbooks/service-build/object-panorama.js +1 -1
  248. package/dist/playbooks/service-build/participation-radar.js +1 -1
  249. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  250. package/dist/playbooks/service-build/reverse-mapping.d.ts +6 -0
  251. package/dist/playbooks/service-build/reverse-mapping.js +1 -1
  252. package/dist/playbooks/service-build/service-panorama.d.ts +1 -0
  253. package/dist/playbooks/service-build/service-panorama.js +1 -1
  254. package/dist/playbooks/service-build/service-quote.js +1 -1
  255. package/dist/playbooks/service-build/service-quote.spec.js +1 -1
  256. package/dist/playbooks/service-build/workflow-design-assessment.d.ts +10 -1
  257. package/dist/playbooks/service-build/workflow-design-assessment.js +1 -1
  258. package/dist/review/index.js +1 -1
  259. package/dist/review/repository.js +1 -1
  260. package/dist/safety/confirm-gate.js +1 -1
  261. package/dist/schema/benchmark-migration/index.d.ts +104 -0
  262. package/dist/schema/benchmark-migration/index.js +1 -1
  263. package/dist/schema/call/allocation.d.ts +15 -6
  264. package/dist/schema/call/allocation.js +1 -1
  265. package/dist/schema/call/base.d.ts +256 -0
  266. package/dist/schema/call/base.js +1 -1
  267. package/dist/schema/call/bridge.d.ts +32 -6
  268. package/dist/schema/call/demand.d.ts +15 -6
  269. package/dist/schema/call/demand.js +1 -1
  270. package/dist/schema/call/guard.d.ts +8 -8
  271. package/dist/schema/call/guard.js +1 -1
  272. package/dist/schema/call/handler.d.ts +3 -0
  273. package/dist/schema/call/handler.js +1 -1
  274. package/dist/schema/call/machine.d.ts +32 -8
  275. package/dist/schema/call/machine.js +1 -1
  276. package/dist/schema/call/order.d.ts +26 -8
  277. package/dist/schema/call/order.js +1 -1
  278. package/dist/schema/call/payment.d.ts +20 -8
  279. package/dist/schema/call/payment.js +1 -1
  280. package/dist/schema/call/permission-handler.js +1 -1
  281. package/dist/schema/call/permission.d.ts +330 -114
  282. package/dist/schema/call/permission.js +1 -1
  283. package/dist/schema/call/personal.d.ts +10 -4
  284. package/dist/schema/call/personal.js +1 -1
  285. package/dist/schema/call/progress.d.ts +16 -4
  286. package/dist/schema/call/proof.js +1 -1
  287. package/dist/schema/call/reward.d.ts +10 -4
  288. package/dist/schema/call/reward.js +1 -1
  289. package/dist/schema/call/semantic.d.ts +1 -0
  290. package/dist/schema/call/semantic.js +1 -1
  291. package/dist/schema/call/service.d.ts +143 -45
  292. package/dist/schema/call/service.js +1 -1
  293. package/dist/schema/call/treasury.d.ts +15 -6
  294. package/dist/schema/call/treasury.js +1 -1
  295. package/dist/schema/common/index.js +1 -1
  296. package/dist/schema/config/index.d.ts +61 -0
  297. package/dist/schema/config/index.js +1 -1
  298. package/dist/schema/envelope-unify.d.ts +4 -0
  299. package/dist/schema/envelope-unify.js +1 -0
  300. package/dist/schema/evaluation/index.d.ts +216 -19
  301. package/dist/schema/evaluation/index.js +1 -1
  302. package/dist/schema/goal/index.d.ts +47 -0
  303. package/dist/schema/goal/planning.d.ts +115 -1
  304. package/dist/schema/goal/planning.js +1 -1
  305. package/dist/schema/industry-pack/index.d.ts +137 -6
  306. package/dist/schema/industry-pack/index.js +1 -1
  307. package/dist/schema/industry-pack/modes.d.ts +6 -6
  308. package/dist/schema/keeper/index.d.ts +26 -0
  309. package/dist/schema/local/index.d.ts +137 -0
  310. package/dist/schema/local/index.js +1 -1
  311. package/dist/schema/local/wip.d.ts +6 -0
  312. package/dist/schema/local/wip.js +1 -1
  313. package/dist/schema/messenger/index.d.ts +26 -0
  314. package/dist/schema/operations.d.ts +345 -84
  315. package/dist/schema/operations.js +1 -1
  316. package/dist/schema/persona/index.d.ts +2907 -640
  317. package/dist/schema/persona/index.js +1 -1
  318. package/dist/schema/query/bi.d.ts +145 -4
  319. package/dist/schema/query/bi.js +1 -1
  320. package/dist/schema/query/index.d.ts +266 -73
  321. package/dist/schema/query/index.js +1 -1
  322. package/dist/schema/schema-query/index.d.ts +1 -1
  323. package/dist/schema/schema-query/index.js +1 -1
  324. package/dist/schema/schema-version.js +1 -1
  325. package/dist/schema/utils/permission-machine-check.d.ts +2 -0
  326. package/dist/schema/utils/permission-machine-check.js +1 -1
  327. package/dist/schema/watch/index.d.ts +16 -0
  328. package/dist/schema/watch/index.js +1 -1
  329. package/dist/schema/workflow/index.d.ts +2 -2
  330. package/dist/schema/workflow/index.js +1 -1
  331. package/dist/schema-query-impl/index.d.ts +1 -1
  332. package/dist/schema-query-impl/index.js +1 -1
  333. package/dist/schemas/account_operation.output.json +94 -0
  334. package/dist/schemas/benchmark_migration_operation.output.json +338 -9
  335. package/dist/schemas/benchmark_migration_operation.schema.json +27 -2
  336. package/dist/schemas/bridge_operation.output.json +94 -0
  337. package/dist/schemas/config_operation.output.json +352 -0
  338. package/dist/schemas/config_operation.schema.json +20 -2
  339. package/dist/schemas/evaluation_operation.output.json +570 -4
  340. package/dist/schemas/evaluation_operation.schema.json +194 -3
  341. package/dist/schemas/goal_operation.schema.json +183 -0
  342. package/dist/schemas/index.json +1 -1
  343. package/dist/schemas/industry_pack_operation.output.json +621 -0
  344. package/dist/schemas/industry_pack_operation.schema.json +20 -2
  345. package/dist/schemas/keeper_operation.output.json +94 -0
  346. package/dist/schemas/local_cache_operation.output.json +94 -0
  347. package/dist/schemas/local_history_operation.output.json +94 -0
  348. package/dist/schemas/local_info_operation.output.json +94 -0
  349. package/dist/schemas/local_mark_operation.output.json +94 -0
  350. package/dist/schemas/messenger_operation.output.json +94 -0
  351. package/dist/schemas/monitor_events.output.json +94 -0
  352. package/dist/schemas/monitor_subscription.output.json +94 -0
  353. package/dist/schemas/onchain_events.output.json +94 -0
  354. package/dist/schemas/onchain_operations.output.json +313 -1
  355. package/dist/schemas/onchain_operations.schema.json +1265 -671
  356. package/dist/schemas/onchain_operations_allocation.schema.json +30 -15
  357. package/dist/schemas/onchain_operations_arbitration.schema.json +9 -2
  358. package/dist/schemas/onchain_operations_contact.schema.json +8 -1
  359. package/dist/schemas/onchain_operations_demand.schema.json +29 -14
  360. package/dist/schemas/onchain_operations_gen_passport.schema.json +8 -1
  361. package/dist/schemas/onchain_operations_guard.schema.json +290 -105
  362. package/dist/schemas/onchain_operations_machine.schema.json +49 -34
  363. package/dist/schemas/onchain_operations_order.schema.json +63 -40
  364. package/dist/schemas/onchain_operations_payment.schema.json +26 -11
  365. package/dist/schemas/onchain_operations_permission.schema.json +362 -235
  366. package/dist/schemas/onchain_operations_personal.schema.json +27 -15
  367. package/dist/schemas/onchain_operations_progress.schema.json +45 -30
  368. package/dist/schemas/onchain_operations_proof.schema.json +9 -2
  369. package/dist/schemas/onchain_operations_repository.schema.json +8 -1
  370. package/dist/schemas/onchain_operations_reward.schema.json +32 -17
  371. package/dist/schemas/onchain_operations_service.schema.json +232 -125
  372. package/dist/schemas/onchain_operations_treasury.schema.json +32 -17
  373. package/dist/schemas/onchain_table_data.output.json +258 -6
  374. package/dist/schemas/onchain_table_data.schema.json +92 -52
  375. package/dist/schemas/persona_operation.output.json +7752 -0
  376. package/dist/schemas/persona_operation.schema.json +1232 -4
  377. package/dist/schemas/query_toolkit.output.json +756 -116
  378. package/dist/schemas/query_toolkit.schema.json +138 -7
  379. package/dist/schemas/schema_query.schema.json +1 -1
  380. package/dist/schemas/watch_operation.output.json +83 -0
  381. package/dist/schemas/wip_file.output.json +8 -0
  382. package/dist/schemas/workflow_operation.schema.json +2 -2
  383. package/dist/tools/handlers/benchmark-migration.d.ts +20 -3
  384. package/dist/tools/handlers/benchmark-migration.js +1 -1
  385. package/dist/tools/handlers/config.js +1 -1
  386. package/dist/tools/handlers/evaluation.js +1 -1
  387. package/dist/tools/handlers/evaluation.spec.js +1 -1
  388. package/dist/tools/handlers/industry-pack.js +1 -1
  389. package/dist/tools/handlers/onchain.d.ts +30 -0
  390. package/dist/tools/handlers/onchain.js +1 -1
  391. package/dist/tools/handlers/persona.js +1 -1
  392. package/dist/tools/handlers/query.d.ts +8 -0
  393. package/dist/tools/handlers/query.js +1 -1
  394. package/dist/tools/handlers/winner-derivation.d.ts +20 -0
  395. package/dist/tools/handlers/winner-derivation.js +1 -0
  396. package/dist/tools/handlers/wip-upload.js +1 -1
  397. package/dist/tools/index.d.ts +1 -0
  398. package/dist/tools/index.js +1 -1
  399. package/dist/tools/registry/business.js +1 -1
  400. package/dist/tools/registry/config.js +1 -1
  401. package/dist/tools/registry/evaluation.js +1 -1
  402. package/dist/tools/registry/identity.js +1 -1
  403. package/dist/tools/registry/query.js +1 -1
  404. package/dist/tools/transport-integrity.d.ts +7 -0
  405. package/dist/tools/transport-integrity.js +1 -0
  406. package/dist/tools/upgrade-check.js +1 -1
  407. package/dist/tools/wrap.d.ts +5 -0
  408. package/dist/tools/wrap.js +1 -1
  409. package/package.json +2 -2
  410. package/dist/extensions/business-modules.d.ts +0 -54
  411. package/dist/extensions/business-modules.js +0 -1
  412. package/dist/schemas/guard-templates.json +0 -379
@@ -0,0 +1 @@
1
+ export const CAPABILITIES=[{'id':'milestone_escrow','name':'Milestone\x20Escrow','group':'fund_safety','description':'Funds\x20held\x20in\x20Order\x20and\x20released\x20per\x20milestone\x20completion.\x20Protects\x20both\x20merchant\x20and\x20user.','objectTypes':['service','machine','order','allocation'],'intent':['pattern.allocation_staged_release','pattern.progress_state_check'],'binds':[],'requires':[],'excludes':[],'provides':['has_milestone_nodes'],'params':[],'risks':['A\x20milestone\x20forward\x20without\x20a\x20guard\x20lets\x20anyone\x20advance\x20the\x20stage\x20and\x20release\x20funds'],'disclosures':[],'cost':{'gas_objects':0x4,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'order_allocators_bound','description':'Order\x20must\x20have\x20allocators\x20bound\x20before\x20publish','level':'hard','blocking':!![]},{'constraint_id':'machine_published','description':'Machine\x20must\x20be\x20published\x20and\x20bound\x20to\x20Service','level':'hard','blocking':!![]},{'constraint_id':'milestone_forward_guarded','description':'Each\x20milestone\x20forward\x20must\x20have\x20a\x20guard','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'boost','description':'Escrow\x20ensures\x20funds\x20not\x20released\x20until\x20verification'},{'dimension':'escrow_quality','effect':'required','description':'Module\x20requires\x20proper\x20escrow\x20configuration'},{'dimension':'operational_risk','effect':'boost','description':'Milestones\x20reduce\x20single-point\x20delivery\x20risk'}],'industryFit':{'freelance':0x5f,'education':0x50,'rental':0x3c,'retail':0x28,'subscription':0x1e,'travel':0x32,'licensing':0x55,'crowdfunding':0x55,'general':0x46},'addressesPainPoints':['Client\x20never\x20approves\x20deliverables','Merchant\x20delivers\x20but\x20cannot\x20get\x20paid','Full\x20upfront\x20payment\x20with\x20no\x20delivery\x20guarantee'],'intentSignals':[/milestone/i,/escrow/i,/pay(ment)? (per|on|at|upon) (each )?(milestone|stage|delivery|approval)/i,/staged? (payment|release)/i,/progress payment/i,/hold funds until/i],'userProtections':['Funds\x20held\x20in\x20escrow\x20until\x20milestone\x20verified','Can\x20reject\x20substandard\x20deliverables','Refund\x20for\x20unstarted\x20milestones'],'merchantObligations':['Must\x20deliver\x20each\x20milestone\x20to\x20defined\x20acceptance\x20criteria','Must\x20configure\x20Machine\x20with\x20proper\x20forward\x20guards'],'requiresKeeper':!![],'keeperHint':'Keeper\x20must\x20monitor\x20Machine\x20node\x20timeouts\x20and\x20trigger\x20adminUnhold\x20if\x20user\x20does\x20not\x20respond','source':'core'},{'id':'independent_arbitration','name':'Independent\x20Arbitration','group':'governance','description':'Third-party\x20arbitration\x20with\x20Guard-weighted\x20voting.\x20Arbitration\x20Permission\x20MUST\x20differ\x20from\x20Service\x20Permission\x20(contract-enforced).','objectTypes':['arb','permission','guard'],'intent':['pattern.arbitration_voting_weight','pattern.arb_status_escrow_holdback','pattern.arbitration_membership_check'],'binds':[],'requires':[],'excludes':[],'provides':['has_arbitration'],'params':[],'risks':['An\x20arbitration\x20Permission\x20that\x20equals\x20the\x20Service\x20Permission\x20is\x20contract-rejected\x20—\x20neutrality\x20is\x20a\x20chain\x20invariant,\x20not\x20a\x20preference'],'disclosures':[],'cost':{'gas_objects':0x3,'fund':'compensation_fund','bearer':'merchant'},'requiredConstraints':[{'constraint_id':'arbitration_permission_independent','description':'Arbitration.permission\x20!=\x20Service.permission','level':'hard','blocking':!![]},{'constraint_id':'voting_guard_configured','description':'At\x20least\x20one\x20voting_guard\x20must\x20be\x20configured','level':'soft','blocking':![]},{'constraint_id':'arbitration_bound_to_service','description':'Arbitration\x20must\x20be\x20in\x20Service.arbitrations\x20list','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'arbitration_coverage','effect':'required','description':'Module\x20requires\x20arbitration\x20configuration'},{'dimension':'arbitration_fairness','effect':'required','description':'Independent\x20permission\x20ensures\x20neutrality'},{'dimension':'governance_risk','effect':'boost','description':'Reduces\x20platform-as-judge\x20risk'}],'industryFit':{'freelance':0x5a,'education':0x4b,'rental':0x55,'retail':0x4b,'subscription':0x3c,'travel':0x50,'licensing':0x5a,'crowdfunding':0x50,'general':0x46},'addressesPainPoints':['Platform\x20acts\x20as\x20both\x20judge\x20and\x20party','Arbitration\x20fees\x20too\x20high\x20for\x20small\x20claims','No\x20binding\x20dispute\x20resolution'],'intentSignals':[/arbitrat/i,/dispute/i,/mediat/i,/third[ -]?party (resolution|judgement|judgment|venue)/i,/voting/i,/ruling/i,/appeal/i],'userProtections':['Independent\x20arbitrators\x20(not\x20merchant\x20or\x20platform)','Guard-weighted\x20voting\x20prevents\x20Sybil\x20attacks','Micro-arbitration:\x20no\x20per-case\x20fees'],'merchantObligations':['Must\x20accept\x20arbitration\x20verdict','Must\x20maintain\x20compensation_fund\x20for\x20indemnities'],'requiresKeeper':![],'source':'core'},{'id':'wip_provenance','name':'WIP\x20Provenance','group':'trust_evidence','description':'Work-in-progress\x20hash\x20commitments\x20on-chain\x20via\x20Repository.\x20Prevents\x20tampering\x20of\x20delivery\x20evidence.','objectTypes':['repository','guard','proof'],'intent':['pattern.repository_data_check','pattern.repository_write_authorization','pattern.verifier_evidence_philosophy'],'binds':[],'requires':[],'excludes':[],'provides':['has_wip_verification'],'params':[],'risks':[],'disclosures':[],'cost':{'gas_objects':0x3,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'repository_published','description':'Repository\x20must\x20be\x20published','level':'hard','blocking':!![]},{'constraint_id':'wip_hash_before_delivery','description':'WIP\x20hash\x20must\x20be\x20committed\x20before\x20delivery','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'proof_integrity','effect':'required','description':'WIP\x20hash\x20provides\x20tamper-proof\x20evidence'},{'dimension':'transparency','effect':'boost','description':'On-chain\x20commitment\x20is\x20publicly\x20verifiable'}],'industryFit':{'freelance':0x5a,'education':0x55,'rental':0x5f,'retail':0x46,'subscription':0x3c,'travel':0x46,'licensing':0x5f,'crowdfunding':0x55,'general':0x4b},'addressesPainPoints':['Evidence\x20stored\x20on\x20platform\x20servers\x20can\x20be\x20tampered','No\x20proof\x20of\x20pre-delivery\x20state\x20(e.g.\x20rental\x20condition)','Dispute\x20resolution\x20relies\x20on\x20trust\x20in\x20platform'],'intentSignals':[/\bwip\b/i,/work[ -]?in[ -]?progress/i,/\bhash\b/i,/evidence/i,/tamper/i,/proof of (work|progress|delivery)/i],'userProtections':['WIP\x20hash\x20commitment\x20is\x20immutable\x20on-chain','Guard\x20automatically\x20verifies\x20hash\x20match','Repository\x20history\x20is\x20auditable'],'merchantObligations':['Must\x20commit\x20WIP\x20hash\x20at\x20defined\x20checkpoints','Must\x20use\x20Repository\x20for\x20evidence\x20storage'],'requiresKeeper':![],'source':'core'},{'id':'multi_tier_allocation','name':'Multi-Tier\x20Allocation','group':'fund_safety','description':'Order\x20funds\x20automatically\x20split\x20among\x20multiple\x20recipients.\x20Fully\x20transparent\x20on-chain.','objectTypes':['allocation','treasury','payment'],'intent':['pattern.scene_allocator_entity_recipient','pattern.tiered_amount_ladder'],'binds':[],'requires':[],'excludes':[],'provides':[],'params':[],'risks':['Percentages\x20that\x20do\x20not\x20sum\x20to\x20100\x20make\x20the\x20split\x20unfundable\x20—\x20declare\x20recipients\x20up\x20front'],'disclosures':[],'cost':{'gas_objects':0x3,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'allocators_configured','description':'Allocators\x20must\x20be\x20configured\x20with\x20recipients','level':'hard','blocking':!![]},{'constraint_id':'sharing_sum_100','description':'Allocation\x20percentages\x20must\x20sum\x20to\x20100%','level':'hard','blocking':!![]},{'constraint_id':'platform_fee_zero','description':'Platform\x20fee\x20should\x20be\x200\x20or\x20user-defined','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fee_transparency','effect':'required','description':'All\x20allocations\x20visible\x20on-chain'},{'dimension':'supplier_visibility','effect':'boost','description':'Supplier\x20payments\x20are\x20auditable'}],'industryFit':{'freelance':0x3c,'education':0x32,'rental':0x28,'retail':0x50,'subscription':0x46,'travel':0x5f,'licensing':0x62,'crowdfunding':0x50,'general':0x46},'addressesPainPoints':['Multi-layer\x20commission\x20hidden\x20from\x20users','Suppliers\x20paid\x20opaquely','Platform\x20takes\x20undisclosed\x20FX\x20spread'],'intentSignals':[/multi[ -]?tier/i,/waterfall/i,/\bsplit/i,/divide/i,/distribut/i,/tiered payout/i],'userProtections':['Full\x20allocation\x20waterfall\x20visible\x20on-chain','No\x20hidden\x20fees','Can\x20verify\x20supplier\x20payments'],'merchantObligations':['Must\x20declare\x20all\x20allocation\x20recipients\x20upfront','Cannot\x20change\x20allocation\x20after\x20publish'],'requiresKeeper':![],'source':'core'},{'id':'subscription_with_proof','name':'Subscription\x20with\x20Delivery\x20Proof','group':'trust_evidence','description':'Each\x20billing\x20cycle\x20requires\x20proof\x20of\x20content\x20delivery\x20before\x20charging.\x20Prevents\x20creator\x20abandonment.','objectTypes':['service','guard','repository','progress'],'intent':['pattern.repository_data_check','pattern.progress_state_check','pattern.deadline_window'],'binds':[],'requires':[],'excludes':[],'provides':[],'params':[],'risks':['A\x20cycle\x20without\x20a\x20delivery\x20guard\x20charges\x20the\x20subscriber\x20with\x20nothing\x20delivered'],'disclosures':[],'cost':{'gas_objects':0x4,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'delivery_guard_per_cycle','description':'Each\x20cycle\x20must\x20have\x20a\x20delivery\x20guard','level':'hard','blocking':!![]},{'constraint_id':'repository_updated','description':'Repository\x20must\x20be\x20updated\x20with\x20cycle\x20content\x20hash','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'content_commitment','effect':'required','description':'Delivery\x20proof\x20required\x20before\x20each\x20charge'},{'dimension':'timeout_protection','effect':'boost','description':'Cycles\x20enforce\x20regular\x20delivery'}],'industryFit':{'freelance':0x28,'education':0x55,'rental':0x1e,'retail':0x14,'subscription':0x62,'travel':0x1e,'licensing':0x28,'crowdfunding':0x19,'general':0x32},'addressesPainPoints':['Creator\x20abandons\x20after\x20collecting\x20subscriptions','Silent\x20auto-renewal\x20with\x20no\x20delivery\x20proof','No\x20mechanism\x20to\x20hold\x20creators\x20accountable'],'intentSignals':[/subscri/i,/recurring/i,/billing cycle/i,/auto[ -]?renew/i,/renewal/i,/membership/i],'userProtections':['Payment\x20only\x20after\x20delivery\x20proof\x20verified','Can\x20cancel\x20if\x20delivery\x20guard\x20fails','Cycle\x20history\x20on-chain'],'merchantObligations':['Must\x20deliver\x20content\x20and\x20commit\x20hash\x20each\x20cycle','Must\x20configure\x20delivery_guard\x20per\x20cycle'],'requiresKeeper':!![],'keeperHint':'Keeper\x20triggers\x20cycle\x20transitions\x20and\x20verifies\x20delivery_guard\x20conditions','source':'core'},{'id':'accept_timeout_protection','name':'Accept\x20Timeout\x20Protection','group':'fund_safety','description':'If\x20user\x20does\x20not\x20accept/reject\x20within\x20N\x20days,\x20auto-accept\x20advances\x20the\x20Machine.\x20Protects\x20merchant\x20from\x20indefinite\x20stalls.','objectTypes':['machine','guard'],'intent':['pattern.time_lock_progress','pattern.deadline_window'],'binds':[],'requires':[],'excludes':[],'provides':[],'params':[],'risks':['There\x20is\x20no\x20on-chain\x20cron\x20—\x20a\x20time_guard\x20without\x20an\x20off-chain\x20keeper\x20means\x20nothing\x20ever\x20fires'],'disclosures':[],'cost':{'gas_objects':0x2,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'time_guard_configured','description':'time_guard\x20must\x20be\x20set\x20on\x20accept\x20forward','level':'hard','blocking':!![]},{'constraint_id':'adminUnhold_permission','description':'Admin\x20must\x20have\x20PROGRESS_UNHOLD\x20(224)\x20permission','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'timeout_protection','effect':'required','description':'Auto-advance\x20prevents\x20indefinite\x20user\x20stalls'},{'dimension':'operational_risk','effect':'boost','description':'Reduces\x20delivery\x20timeline\x20uncertainty'}],'industryFit':{'freelance':0x5f,'education':0x46,'rental':0x50,'retail':0x3c,'subscription':0x28,'travel':0x3c,'licensing':0x55,'crowdfunding':0x46,'general':0x4b},'addressesPainPoints':['Buyer\x20never\x20approves\x20deliverables\x20(common\x20on\x20incumbent\x20talent\x20marketplaces)','Merchant\x20cash\x20flow\x20blocked\x20by\x20inactive\x20buyer','Infinite\x20revision\x20loops\x20without\x20resolution'],'intentSignals':[/timeout/i,/time[ -]?out/i,/auto[ -]?accept/i,/never (approves?|responds?|accepts?)/i,/unresponsive/i,/inactive (buyer|client)/i,/\bstall/i,/\bdeadline\b/i],'userProtections':['Still\x20has\x20full\x20N\x20days\x20to\x20review\x20and\x20reject','Rejection\x20triggers\x20arbitration\x20if\x20configured'],'merchantObligations':['Must\x20configure\x20time_guard\x20on\x20forward','Timeout\x20value\x20comes\x20from\x20the\x20template\x27s\x20window\x20fee_params\x20(e.g.\x20escrow_release_days;\x20override\x20per\x20build\x20via\x20fee_overrides)\x20—\x20never\x20a\x20hardcoded\x20number'],'requiresKeeper':!![],'keeperHint':'Keeper\x20monitors\x20time_guard\x20deadlines\x20and\x20advances\x20the\x20timeout\x20forward\x20when\x20the\x20window\x20elapses\x20(adminUnhold\x20is\x20only\x20the\x20hold-release\x20escape\x20hatch,\x20never\x20the\x20timeout\x20path)','source':'core'},{'id':'refund_guarantee','name':'Refund\x20Guarantee','group':'fund_safety','description':'Service\x20maintains\x20compensation_fund\x20for\x20refunds.\x20Refund_guard\x20validates\x20eligibility\x20and\x20transfers\x20funds\x20back\x20to\x20Order.','objectTypes':['service','guard','order'],'intent':['pattern.payment_exception_compensation','pattern.fund_flow_refund_freeform'],'binds':[],'requires':[],'excludes':[],'provides':['has_refund_path','has_compensation_fund'],'params':[],'risks':['A\x20refund\x20promise\x20with\x20compensation_fund_add\x20=\x200\x20is\x20unfunded\x20prose'],'disclosures':[],'cost':{'gas_objects':0x3,'fund':'compensation_fund','bearer':'merchant'},'requiredConstraints':[{'constraint_id':'compensation_fund_positive','description':'compensation_fund_add\x20>\x200','level':'hard','blocking':!![]},{'constraint_id':'refund_guard_configured','description':'Service\x20must\x20have\x20refund_guard','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'boost','description':'Compensation\x20fund\x20backs\x20refund\x20promise'},{'dimension':'consumer_diligence','effect':'boost','description':'Shows\x20merchant\x20confidence\x20in\x20service\x20quality'}],'industryFit':{'freelance':0x46,'education':0x55,'rental':0x5a,'retail':0x5f,'subscription':0x50,'travel':0x55,'licensing':0x4b,'crowdfunding':0x5f,'general':0x50},'addressesPainPoints':['Refund\x20trapped\x20in\x20incumbent\x20platform\x20balance','No\x20refund\x20mechanism\x20for\x20service\x20failure','Refund\x20decision\x20centralized\x20at\x20platform'],'intentSignals':[/refund/i,/money[ -]?back/i,/guarantee/i],'userProtections':['Refund\x20goes\x20back\x20to\x20Order\x20(not\x20platform\x20balance)','Guard\x20validates\x20eligibility\x20(not\x20platform\x20discretion)','Compensation\x20fund\x20guarantees\x20liquidity'],'merchantObligations':['Must\x20maintain\x20compensation_fund\x20>\x200','Must\x20configure\x20refund_guard\x20rules'],'requiresKeeper':![],'source':'core'},{'id':'reputation_on_chain','name':'On-Chain\x20Reputation','group':'trust_evidence','description':'Merchant\x20and\x20user\x20behavior\x20permanently\x20recorded\x20on\x20Registrar.\x20Evaluations,\x20completions,\x20and\x20disputes\x20contribute\x20to\x20reputation\x20score.','objectTypes':['service','order','arb'],'intent':['pattern.repository_data_check'],'binds':[],'requires':[],'excludes':[],'provides':[],'params':[],'risks':[],'disclosures':[],'cost':{'gas_objects':0x3,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'service_published','description':'Service\x20must\x20be\x20published\x20to\x20accumulate\x20reputation','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'reputation_verifiability','effect':'required','description':'On-chain\x20history\x20is\x20tamper-proof'},{'dimension':'trust','effect':'boost','description':'Reputation\x20signals\x20reduce\x20information\x20asymmetry'}],'industryFit':{'freelance':0x5a,'education':0x50,'rental':0x55,'retail':0x5a,'subscription':0x55,'travel':0x50,'licensing':0x50,'crowdfunding':0x41,'general':0x55},'addressesPainPoints':['Fake\x20reviews\x20and\x20rating\x20manipulation','No\x20cross-platform\x20reputation\x20portability','Platform\x20can\x20delete\x20negative\x20reviews'],'intentSignals':[/reputation/i,/\breviews?\b/i,/\brating/i,/track record/i,/feedback/i],'userProtections':['Reputation\x20is\x20on-chain\x20and\x20immutable','Can\x20verify\x20merchant\x27s\x20complete\x20transaction\x20history','Dispute\x20outcomes\x20affect\x20reputation\x20permanently'],'merchantObligations':['All\x20service\x20interactions\x20become\x20part\x20of\x20permanent\x20record','Cannot\x20hide\x20negative\x20outcomes'],'requiresKeeper':![],'source':'core'},{'id':'supplier_collaboration','name':'Supplier\x20Collaboration','group':'composition','description':'Enable\x20merchant\x20to\x20delegate\x20sub-services\x20to\x20suppliers\x20with\x20transparent\x20payment\x20splitting.\x20No\x20platform\x20intermediary.','objectTypes':['service','allocation','demand'],'intent':['pattern.supply_chain_suborder_verification','pattern.fund_flow_profit_share_freeform'],'binds':[],'requires':[],'excludes':[],'provides':[],'params':[],'risks':['An\x20undeclared\x20supplier\x20breaks\x20the\x20accountability\x20chain\x20—\x20the\x20merchant\x20stays\x20liable\x20for\x20supplier\x20quality'],'disclosures':[],'cost':{'gas_objects':0x3,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'demand_configured','description':'Demand\x20must\x20reference\x20main\x20Service','level':'soft','blocking':![]},{'constraint_id':'allocation_sharing_configured','description':'Allocation\x20sharing\x20must\x20include\x20suppliers','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'supplier_visibility','effect':'required','description':'Supplier\x20payments\x20transparent\x20on-chain'},{'dimension':'governance_risk','effect':'boost','description':'No\x20platform\x20controls\x20supplier\x20relationships'}],'industryFit':{'freelance':0x3c,'education':0x46,'rental':0x28,'retail':0x55,'subscription':0x32,'travel':0x5a,'licensing':0x41,'crowdfunding':0x1e,'general':0x3c},'addressesPainPoints':['Supplier\x20payments\x20opaque\x20to\x20end\x20user','Platform\x20controls\x20supplier\x20relationships','No\x20direct\x20merchant-supplier\x20collaboration'],'intentSignals':[/supplier/i,/subcontract/i,/outsourc/i,/vendor/i,/sub[ -]?service/i,/delegate to/i],'userProtections':['Can\x20see\x20all\x20suppliers\x20involved\x20in\x20service','Supplier\x20payments\x20are\x20on-chain\x20auditable','Merchant\x20remains\x20accountable\x20for\x20supplier\x20quality'],'merchantObligations':['Must\x20declare\x20all\x20suppliers\x20upfront','Must\x20ensure\x20supplier\x20deliverables\x20meet\x20criteria'],'requiresKeeper':![],'source':'core'},{'id':'damage_attestation','name':'Damage\x20Attestation','group':'trust_evidence','description':'Rental-specific:\x20pre/post\x20condition\x20photos\x20hashed\x20to\x20Repository.\x20Guard\x20compares\x20hashes\x20to\x20automatically\x20enforce\x20damage\x20deductions.','objectTypes':['repository','guard','service'],'intent':['pattern.repository_data_check','pattern.repository_write_authorization','pattern.mutual_consent_attestation'],'binds':[],'requires':[],'excludes':[],'provides':['has_wip_verification'],'params':[],'risks':['A\x20missing\x20pre-rental\x20hash\x20leaves\x20the\x20baseline\x20condition\x20unprovable\x20—\x20every\x20later\x20claim\x20becomes\x20opinion'],'disclosures':[],'cost':{'gas_objects':0x3,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'pre_rental_hash','description':'Pre-rental\x20condition\x20hash\x20must\x20be\x20committed','level':'hard','blocking':!![]},{'constraint_id':'post_rental_hash','description':'Post-rental\x20condition\x20hash\x20must\x20be\x20committed','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'proof_integrity','effect':'required','description':'Condition\x20hashes\x20prevent\x20tampering'},{'dimension':'arbitration_fairness','effect':'boost','description':'Objective\x20evidence\x20reduces\x20dispute\x20bias'}],'industryFit':{'freelance':0x14,'education':0x1e,'rental':0x62,'retail':0x28,'subscription':0x14,'travel':0x3c,'licensing':0x19,'crowdfunding':0x14,'general':0x28},'addressesPainPoints':['Landlord\x20claims\x20damage\x20without\x20proof\x20(common\x20on\x20incumbent\x20short-stay\x20platforms)','No\x20mandatory\x20pre-rental\x20photo\x20(vehicle-rental\x20damage\x20claims\x20denied)','Platform\x20arbitrates\x20damage\x20disputes\x20opaquely'],'intentSignals':[/damage/i,/condition (photo|report|check|record)/i,/pre[ -]?rental/i,/post[ -]?rental/i,/attest/i,/wear and tear/i],'userProtections':['Pre-rental\x20hash\x20commits\x20baseline\x20condition','Guard\x20automatically\x20compares\x20post-rental\x20state','Cannot\x20be\x20charged\x20for\x20pre-existing\x20damage'],'merchantObligations':['Must\x20commit\x20pre-rental\x20condition\x20hash','Must\x20commit\x20post-rental\x20condition\x20hash','Must\x20use\x20Repository\x20for\x20evidence\x20storage'],'requiresKeeper':!![],'keeperHint':'Keeper\x20triggers\x20post-rental\x20hash\x20collection\x20and\x20initiates\x20damage\x20Guard\x20comparison','source':'core'},{'id':'discount_lifecycle','name':'Discount\x20Lifecycle','group':'promotion','description':'Coupon\x20promotions\x20bound\x20to\x20a\x20Service\x20(percentage\x20or\x20fixed-amount\x20off):\x20minted\x20to\x20recipients,\x20redeemed\x20automatically\x20at\x20buy,\x20burned\x20on\x20use.\x20Chain\x20truth:\x20a\x20redeemed\x20coupon\x27s\x20balance\x20decrements\x20PERMANENTLY\x20(no\x20restock,\x20no\x20revert),\x20and\x20standing\x20renewal\x20discounts\x20are\x20NOT\x20constructible\x20(the\x20renew\x20path\x20has\x20no\x20discount\x20hook\x20—\x20every\x20renewal\x20re-prices\x20from\x20the\x20SKU\x20price).','objectTypes':['service'],'intent':[],'binds':[],'requires':[],'excludes':[],'provides':[],'params':[],'risks':['The\x20burn\x20is\x20irreversible\x20—\x20an\x20unplanned\x20budget\x20(max_uses\x20x\x20value)\x20cannot\x20be\x20clawed\x20back'],'disclosures':[],'cost':{'gas_objects':0x1,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'discount_budget_planned','description':'Total\x20discount\x20budget\x20(max_uses\x20x\x20discount_value)\x20planned\x20before\x20minting\x20—\x20the\x20burn\x20is\x20irreversible','level':'hard','blocking':!![]},{'constraint_id':'discount_burn_disclosed','description':'Burn-on-use\x20semantics\x20(permanent\x20decrement,\x20no\x20revert)\x20disclosed\x20in\x20the\x20promotion\x20terms','level':'hard','blocking':!![]},{'constraint_id':'discount_renewal_disclosed','description':'\x27First\x20period\x20X%\x20off,\x20then\x20standard\x27\x20disclosed\x20in\x20the\x20listing/WIP\x20BEFORE\x20purchase\x20(renewals\x20re-price\x20from\x20the\x20SKU\x20price\x20—\x20anti-dark-pattern)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'promotion_integrity','effect':'required','description':'Coupon\x20budget\x20and\x20burn\x20semantics\x20are\x20planned\x20and\x20disclosed,\x20never\x20improvised'},{'dimension':'fee_transparency','effect':'boost','description':'The\x20discounted\x20price\x20at\x20redemption\x20is\x20computed\x20by\x20the\x20chain,\x20not\x20asserted\x20by\x20prose'}],'industryFit':{'freelance':0x2d,'education':0x46,'rental':0x32,'retail':0x5f,'subscription':0x55,'travel':0x50,'licensing':0x3c,'crowdfunding':0x37,'general':0x46},'addressesPainPoints':['Coupon\x20systems\x20locked\x20inside\x20incumbent\x20platforms','Promotions\x20improvised\x20after\x20publish\x20with\x20no\x20budget\x20plan','Discount\x20promises\x20that\x20silently\x20change\x20at\x20renewal'],'intentSignals':[/coupon/i,/discount/i,/\bpromo/i,/voucher/i,/percentage off/i,/first[ -]?period off/i],'userProtections':['Redemption\x20is\x20computed\x20on-chain\x20at\x20buy\x20(no\x20manual\x20discount\x20approval)','Renewal\x20price\x20is\x20the\x20SKU\x20price\x20—\x20a\x20first-period\x20coupon\x20cannot\x20silently\x20renew\x20at\x20the\x20discounted\x20price','Expired\x20coupons\x20cannot\x20redeem'],'merchantObligations':['Plan\x20the\x20total\x20discount\x20budget\x20(max_uses\x20x\x20value)\x20before\x20minting','Disclose\x20burn-on-use\x20and\x20renewal\x20re-pricing\x20in\x20the\x20promotion\x20terms','Never\x20promise\x20a\x20standing\x20renewal\x20discount\x20(not\x20constructible\x20on-chain)'],'requiresKeeper':![],'source':'core'},{'id':'praise_incentive','name':'Review\x20Praise\x20Incentive','group':'promotion','description':'Sale-time-planned\x20claim\x20Reward\x20for\x20buyer\x20reviews\x20(template\x20review_mode\x20\x27review_reward\x27):\x20the\x20build\x20emits\x20the\x20Reward\x20object,\x20attaches\x20the\x20replay-armed\x20claim\x20guard,\x20binds\x20it\x20to\x20the\x20Service,\x20and\x20funds\x20it\x20via\x20the\x20reward_funding\x20input\x20—\x20so\x20the\x20incentive\x20is\x20perceivable\x20by\x20the\x20buyer\x20BEFORE\x20ordering,\x20and\x20an\x20unfunded\x20or\x20unguarded\x20incentive\x20promise\x20must\x20not\x20publish.','objectTypes':['service','reward','guard'],'intent':['pattern.reward_one_time_claim','pattern.reward_refund_mutual_exclusion'],'binds':[],'requires':[],'excludes':[],'provides':[],'params':[],'risks':['An\x20unfunded\x20or\x20replay-drainable\x20claim\x20pool\x20turns\x20the\x20incentive\x20into\x20an\x20unfunded\x20promise\x20(must\x20not\x20publish)'],'disclosures':[],'cost':{'gas_objects':0x3,'fund':'reward_pool','bearer':'merchant'},'requiredConstraints':[{'constraint_id':'reward_pool_funded','description':'reward_funding\x20input\x20present\x20at\x20build\x20(an\x20unfunded\x20incentive\x20promise\x20must\x20not\x20publish)','level':'hard','blocking':!![]},{'constraint_id':'reward_claim_replay_armed','description':'Claim\x20guard\x20carries\x20the\x20record-gate\x20idempotency\x20leg\x20(replay-drain\x20target\x20otherwise)','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'trust','effect':'boost','description':'Funded,\x20perceivable\x20review\x20incentives\x20raise\x20honest\x20review\x20volume'},{'dimension':'promotion_integrity','effect':'required','description':'Incentive\x20terms\x20are\x20chain-enforced\x20(funded\x20pool\x20+\x20guarded\x20claim),\x20not\x20prose\x20promises'}],'industryFit':{'freelance':0x4b,'education':0x41,'rental':0x2d,'retail':0x55,'subscription':0x4b,'travel':0x41,'licensing':0x2d,'crowdfunding':0x2d,'general':0x41},'addressesPainPoints':['No\x20mechanism\x20to\x20incentivize\x20honest\x20buyer\x20reviews','Review\x20rewards\x20locked\x20inside\x20incumbent\x20platforms','Incentive\x20promises\x20that\x20evaporate\x20after\x20purchase'],'intentSignals':[/incentive/i,/reward/i,/cashback/i,/rebate/i,/bonus/i,/\btips?\b/i],'userProtections':['Incentive\x20perceivable\x20BEFORE\x20ordering\x20(funded\x20at\x20build,\x20not\x20after)','Claim\x20terms\x20chain-enforced\x20with\x20replay\x20protection','Rating\x20polarity\x20recorded\x20as\x20range-queryable\x20on-chain\x20rows\x20(1-5\x20rating\x20column)'],'merchantObligations':['Fund\x20the\x20reward\x20pool\x20at\x20build\x20time\x20(reward_funding)','Keep\x20the\x20claim\x20guard\x20replay-armed\x20(record-gate\x20leg)','Disclose\x20claim\x20terms\x20in\x20the\x20listing/WIP\x20promise'],'requiresKeeper':![],'source':'core'},{'id':'after_sales_guarantee','name':'After-Sales\x20Guarantee','group':'fund_safety','description':'Declared\x20buyer\x20after-sales\x20remedy\x20(template\x20after_sales_mode\x20\x27return\x27\x20|\x20\x27exchange\x27\x20|\x20\x27warranty\x27):\x20the\x20machine_shape\x20ships\x20the\x20backing\x20rail\x20(e.g.\x20return_requested\x20->\x20returned)\x20as\x20a\x20NODE-GATED\x20fund\x20rail\x20—\x20it\x20fires\x20on\x20order\x20node\x20state\x20and\x20NEVER\x20reads\x20order.claimed_by\x20(decision\x2011:\x20the\x20arbitration\x20award\x20is\x20the\x20indemnity\x20track\x27s\x20separate\x20commercial\x20payout,\x20so\x20double\x20collection\x20is\x20legal\x20and\x20disclosed\x20at\x20the\x20dual-payout\x20confirmation\x20gate)\x20—\x20with\x20the\x20remedy\x20window\x20anchored\x20on\x20the\x20delivered\x20ENTRY\x20time\x20so\x20a\x20buyer\x20cannot\x20stall\x20the\x20merchant.','objectTypes':['machine','guard','allocation','order'],'intent':['pattern.time_window_upper_bound','pattern.progress_state_check','pattern.fund_flow_refund_freeform'],'binds':[],'requires':[],'excludes':[],'provides':['has_refund_path'],'params':[],'risks':['A\x20remedy\x20window\x20anchored\x20on\x20a\x20drifting\x20current_time\x20lets\x20a\x20stalled\x20order\x20age\x20out\x20of\x20its\x20own\x20remedy'],'disclosures':[],'cost':{'gas_objects':0x4,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'after_sales_rail_present','description':'machine_shape\x20carries\x20a\x20node\x20backing\x20the\x20declared\x20after_sales_mode\x20(compile\x20AFTER_SALES_RAIL_MISSING\x20/\x20scanner\x20R-AFTER-SALES-RAIL)','level':'hard','blocking':!![]},{'constraint_id':'after_sales_rail_node_gated','description':'the\x20after-sales\x20fund\x20rail\x20is\x20node-gated\x20and\x20carries\x20NO\x20claimed_by\x20leg\x20(decision\x2011;\x20R-FUND-RAIL-CLAIMED-BY\x20/\x20RAIL_CLAIMED_BY_LEG\x20critical\x20backstop)','level':'hard','blocking':!![]},{'constraint_id':'after_sales_window_anchored','description':'remedy\x20window\x20anchored\x20on\x20the\x20delivered\x20ENTRY\x20time,\x20not\x20a\x20drifting\x20current_time\x20(INV-C2,\x20TIME-ANCHOR-01)','level':'hard','blocking':!![]},{'constraint_id':'after_sales_no_double_remedy','description':'refund\x20and\x20arbitration\x20award\x20are\x20INDEPENDENT\x20tracks\x20(decision\x2011):\x20a\x20buyer\x20may\x20collect\x20both\x20—\x20legal\x20and\x20disclosed\x20at\x20the\x20MCP\x20dual-payout\x20confirmation\x20gate\x20(DUAL-RAIL-01)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'The\x20fund\x20rail\x20pays\x20strictly\x20from\x20node\x20state\x20—\x20no\x20claimed_by\x20coupling\x20(decision\x2011),\x20so\x20the\x20arbitration\x20award\x20never\x20silences\x20a\x20due\x20refund'},{'dimension':'consumer_diligence','effect':'boost','description':'A\x20declared,\x20structurally-backed\x20remedy\x20window\x20is\x20verifiable\x20before\x20purchase'}],'industryFit':{'freelance':0x28,'education':0x2d,'rental':0x46,'retail':0x62,'subscription':0x23,'travel':0x37,'licensing':0x41,'crowdfunding':0x37,'general':0x3c},'addressesPainPoints':['Return/refund\x20policy\x20locked\x20inside\x20incumbent\x20platforms','No\x20enforced\x20return\x20window\x20—\x20buyer\x20stalls\x20or\x20merchant\x20refuses','Refund\x20and\x20award\x20overlap\x20left\x20undisclosed\x20(decision\x2011:\x20legal,\x20but\x20must\x20be\x20surfaced\x20at\x20the\x20dual-payout\x20gate)','Exchange/warranty\x20promised\x20in\x20prose\x20with\x20no\x20on-chain\x20rail'],'intentSignals':[/after[ -]?sales/i,/\breturn/i,/exchange/i,/warranty/i,/remedy/i],'userProtections':['Remedy\x20window\x20is\x20chain-anchored\x20on\x20delivery\x20entry\x20(verifiable,\x20not\x20merchant\x20discretion)','Refund\x20returns\x20to\x20the\x20Order\x20(not\x20a\x20platform\x20balance)','Refund\x20and\x20award\x20are\x20independent\x20tracks\x20—\x20a\x20due\x20refund\x20cannot\x20be\x20blocked\x20by\x20a\x20ruling,\x20and\x20any\x20overlap\x20is\x20disclosed\x20at\x20the\x20dual-payout\x20confirmation\x20gate'],'merchantObligations':['Ship\x20the\x20backing\x20rail\x20for\x20the\x20declared\x20after_sales_mode','Anchor\x20the\x20remedy\x20window\x20on\x20the\x20delivered\x20entry\x20time','Keep\x20the\x20fund\x20rail\x20node-gated\x20—\x20NEVER\x20add\x20a\x20claimed_by\x20leg\x20(R-FUND-RAIL-CLAIMED-BY\x20critical)'],'requiresKeeper':![],'source':'core'},{'id':'acceptance_judging','name':'Acceptance\x20&\x20Judging','group':'governance','description':'Declared\x20acceptance_mode\x20(\x27milestone\x27\x20|\x20\x27contest\x27\x20|\x20\x27bounty\x27\x20|\x20\x27agent\x27):\x20who\x20decides\x20the\x20escrow\x20releases\x20and\x20how\x20many\x20redelivery\x20rounds\x20are\x20allowed.\x20A\x20judge-decided\x20mode\x20routes\x20the\x20release\x20decision\x20to\x20an\x20independent\x20venue\x20(arbitration_mode\x20\x27third_party\x27)\x20so\x20the\x20payout-owing\x20party\x20never\x20self-adjudicates;\x20a\x20finite\x20revision_rounds_max\x20is\x20backed\x20by\x20a\x20counter\x20Repository\x20guard\x20because\x20the\x20chain\x20bounds\x20edges,\x20not\x20visits;\x20the\x20acceptance\x20and\x20timeout\x20siblings\x20are\x20distinct\x20forwards\x20so\x20the\x20buyer\x27s\x20approval\x20and\x20the\x20auto-accept\x20deadline\x20never\x20race\x20into\x20one\x20node.','objectTypes':['machine','guard','allocation','arb','repository'],'intent':['pattern.arbitration_voting_weight','pattern.progress_state_check','pattern.enum_variant_branch'],'binds':[],'requires':[],'excludes':[],'provides':[],'params':[],'risks':['The\x20chain\x20bounds\x20EDGES,\x20not\x20visits\x20—\x20a\x20prose-only\x20revision\x20cap\x20is\x20unbounded\x20on-chain\x20without\x20a\x20counter\x20guard'],'disclosures':[],'cost':{'gas_objects':0x5,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'acceptance_judge_independent','description':'a\x20judge-decided\x20acceptance_mode\x20(contest/bounty/agent)\x20declares\x20arbitration_mode\x20\x27third_party\x27\x20(INV-A3,\x20compile\x20ACCEPTANCE_JUDGE_NOT_INDEPENDENT\x20/\x20scanner\x20R-ACCEPTANCE-JUDGE)','level':'hard','blocking':!![]},{'constraint_id':'acceptance_revision_bounded','description':'a\x20finite\x20revision_rounds_max\x20is\x20backed\x20by\x20a\x20counter\x20Repository\x20guard,\x20or\x20declared\x20\x27unlimited\x27\x20(INV-A1,\x20compile\x20ACCEPTANCE_REVISION_UNBOUNDED\x20/\x20scanner\x20R-ACCEPTANCE-REVISION)','level':'hard','blocking':!![]},{'constraint_id':'acceptance_race_free','description':'the\x20acceptance\x20forward\x20and\x20its\x20timeout\x20complement\x20are\x20distinct\x20siblings,\x20never\x20a\x20dual-prev\x20race\x20into\x20one\x20node\x20(INV-A2,\x20widened\x20R-REVIEW-NORACE)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'arbitration_fairness','effect':'required','description':'A\x20judge-decided\x20release\x20routes\x20through\x20an\x20independent\x20venue,\x20not\x20the\x20payout-owing\x20party'},{'dimension':'fund_safety','effect':'boost','description':'A\x20finite\x20revision\x20cap\x20the\x20chain\x20can\x20actually\x20enforce\x20(counter-backed)\x20prevents\x20an\x20unbounded\x20redelivery\x20drain'},{'dimension':'operational_risk','effect':'boost','description':'Distinct\x20accept/timeout\x20siblings\x20keep\x20the\x20buyer\x27s\x20decision\x20and\x20the\x20auto-accept\x20deadline\x20from\x20deadlocking\x20the\x20node'}],'industryFit':{'freelance':0x60,'education':0x37,'rental':0x1e,'retail':0x23,'subscription':0x1e,'travel':0x28,'licensing':0x4b,'crowdfunding':0x23,'general':0x3c},'addressesPainPoints':['Contest/bounty\x20winner\x20picked\x20by\x20the\x20party\x20holding\x20the\x20escrow\x20(self-adjudication)','Revision\x20rounds\x20promised\x20as\x20finite\x20in\x20prose\x20but\x20unbounded\x20on-chain\x20(the\x20on-chain\x20Progress\x20caps\x20edges,\x20not\x20visits)','Buyer\x20approval\x20and\x20auto-accept\x20timeout\x20racing\x20into\x20one\x20node\x20(deadlock\x20or\x20double-advance)','Agent-task\x20evaluator\x20not\x20identity-bound\x20to\x20the\x20delivery'],'intentSignals':[/acceptance/i,/judg(e|ing)/i,/contest/i,/bounty/i,/revision/i,/redeliver/i,/deliverable approv/i,/who decides/i],'userProtections':['A\x20judge-decided\x20release\x20is\x20ruled\x20by\x20an\x20independent\x20venue,\x20verifiable\x20before\x20purchase','A\x20finite\x20revision\x20cap\x20is\x20genuinely\x20enforceable\x20(counter\x20guard),\x20not\x20a\x20prose\x20promise','Auto-accept\x20only\x20fires\x20on\x20its\x20own\x20distinct\x20timeout\x20forward,\x20never\x20by\x20racing\x20the\x20buyer\x27s\x20decision'],'merchantObligations':['Declare\x20arbitration_mode\x20\x27third_party\x27\x20for\x20any\x20judge-decided\x20acceptance_mode','Back\x20a\x20finite\x20revision_rounds_max\x20with\x20a\x20counter\x20Repository\x20guard,\x20or\x20declare\x20it\x20\x27unlimited\x27\x20honestly','Keep\x20the\x20acceptance\x20and\x20timeout\x20forwards\x20distinct\x20siblings\x20(distinct\x20forward\x20names)'],'requiresKeeper':!![],'keeperHint':'A\x20judge-decided\x20acceptance\x20needs\x20a\x20keeper\x20to\x20push\x20the\x20ruling/placement\x20terminal\x20forward\x20once\x20the\x20independent\x20venue\x20decides;\x20the\x20accept-timeout\x20forward\x20also\x20needs\x20a\x20keeper\x20at\x20the\x20window\x20deadline','source':'core'},{'id':'installment_deposit','name':'Installment\x20&\x20Deposit','group':'fund_safety','description':'Declared\x20installment_mode\x20(\x27deposit_balance\x27\x20|\x20\x27milestone_n\x27):\x20the\x20buyer\x20pays\x20in\x20stages\x20—\x20a\x20deposit\x20now\x20and\x20the\x20balance\x20later,\x20or\x20N\x20milestone\x20captures.\x20Each\x20later\x20capture\x20rides\x20the\x20one-PTB\x20order_renew\x20call\x20(fund\x20+\x20record\x20+\x20advance).\x20PRE-STATE\x20CONSTRAINT\x20(esound-mn-261021\x20B-1,\x20mainnet-verified):\x20a\x20guard\x20reading\x20allocation.balance\x20sees\x20only\x20the\x20COMMITTED\x20pre-transaction\x20balance\x20—\x20the\x20same-PTB\x20payment\x20is\x20INVISIBLE\x20to\x20it,\x20so\x20a\x20balance-gated\x20capture\x20forward\x20ALWAYS\x20aborts\x20when\x20advanced\x20by\x20order_renew.\x20A\x20capture\x20forward\x20therefore\x20EITHER\x20binds\x20the\x20fund\x20gate\x20and\x20draws\x20on\x20funds\x20committed\x20in\x20a\x20prior\x20transaction\x20(prepaid-full\x20at\x20buy\x20—\x20staged-release\x20semantics),\x20OR\x20is\x20gate-less\x20and\x20relies\x20on\x20this\x20capability\x27s\x20order_renew\x20routing\x20to\x20land\x20the\x20funds;\x20every\x20deposit-held\x20state\x20carries\x20a\x20refund/cancel\x20exit\x20rail\x20(a\x20full\x20refund\x20or\x20a\x20declared\x20kill\x20fee)\x20because\x20the\x20chain\x20imposes\x20no\x20obligation\x20to\x20pay\x20the\x20balance,\x20so\x20a\x20buyer\x20who\x20walks\x20away\x20never\x20strands\x20the\x20paid\x20portion.','objectTypes':['machine','guard','allocation','order','payment'],'intent':['pattern.allocation_staged_release','pattern.allocator_order_anchor','pattern.deadline_window'],'binds':[],'requires':[],'excludes':[],'provides':[],'params':[],'risks':['A\x20balance\x20fund\x20gate\x20plus\x20same-PTB\x20order_renew\x20ALWAYS\x20aborts\x20(mainnet-verified)\x20—\x20the\x20funding\x20story\x20must\x20be\x20declared,\x20not\x20assumed'],'disclosures':[],'cost':{'gas_objects':0x5,'bearer':'buyer'},'requiredConstraints':[{'constraint_id':'installment_funding_gated','description':'every\x20capture\x20forward\x20(a\x20due\x20state\x20advancing\x20into\x20a\x20paid\x20state)\x20either\x20binds\x20a\x20fund-gate\x20Guard\x20reading\x20allocation.balance\x20(satisfiable\x20only\x20against\x20funds\x20committed\x20in\x20a\x20PRIOR\x20transaction\x20—\x20prepaid\x20shape,\x20INV-B1,\x20compile\x20INSTALLMENT_FUNDING_UNGATED\x20/\x20scanner\x20R-INSTALLMENT-FUNDING)\x20or\x20is\x20gate-less\x20and\x20relies\x20on\x20the\x20order_renew\x20routing\x20to\x20land\x20the\x20funds\x20same-PTB\x20(a\x20balance\x20gate\x20+\x20same-PTB\x20order_renew\x20ALWAYS\x20aborts\x20—\x20esound-mn-261021\x20B-1)','level':'soft','blocking':![]},{'constraint_id':'installment_deposit_exit','description':'every\x20deposit-held\x20state\x20carries\x20a\x20refund/cancel/forfeit\x20exit\x20rail\x20so\x20the\x20paid\x20portion\x20is\x20never\x20stranded\x20(INV-B2,\x20compile\x20INSTALLMENT_DEPOSIT_STRANDED\x20/\x20scanner\x20R-INSTALLMENT-DEPOSIT)','level':'soft','blocking':![]},{'constraint_id':'installment_release_once','description':'the\x20release\x20allocator\x20is\x20once_per_order\x20and\x20order-anchored\x20so\x20a\x20replay\x20cannot\x20re-capture\x20(INV-B3,\x20rides\x20the\x20existing\x20E-2\x20/\x20once-slot\x20/\x20order-anchor\x20audit)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'The\x20capture\x20cannot\x20zero-value-advance:\x20gate-less\x20captures\x20land\x20funds\x20via\x20the\x20order_renew\x20routing;\x20balance-gated\x20captures\x20draw\x20on\x20prior-transaction\x20funds\x20(PRE-STATE\x20CONSTRAINT\x20—\x20same-PTB\x20funding\x20is\x20invisible\x20to\x20guards,\x20esound-mn-261021\x20B-1)'},{'dimension':'consumer_diligence','effect':'boost','description':'A\x20declared\x20deposit-exit\x20policy\x20(full\x20refund\x20vs\x20kill\x20fee)\x20is\x20verifiable\x20before\x20the\x20buyer\x20commits\x20the\x20deposit'},{'dimension':'operational_risk','effect':'boost','description':'once_per_order\x20+\x20order\x20anchor\x20on\x20the\x20release\x20keeps\x20a\x20replay\x20from\x20re-capturing\x20or\x20double-releasing'}],'industryFit':{'freelance':0x46,'education':0x2d,'rental':0x37,'retail':0x5a,'subscription':0x28,'travel':0x32,'licensing':0x1e,'crowdfunding':0x37,'general':0x3c},'addressesPainPoints':['Pre-order\x20/\x20deposit-then-balance\x20sales\x20locked\x20inside\x20incumbent\x20platforms','A\x20later\x20payment\x20recorded\x20without\x20the\x20funds\x20actually\x20landing\x20(zero-value\x20advance)','A\x20buyer\x20who\x20walks\x20away\x20strands\x20the\x20deposit\x20with\x20no\x20on-chain\x20exit','Milestone\x20billing\x20where\x20a\x20replay\x20re-charges\x20or\x20double-releases'],'intentSignals':[/installment/i,/deposit/i,/pay in stages/i,/down[ -]?payment/i,/balance (later|afterwards?)/i,/part(ial)? payment/i,/staged? payment/i],'userProtections':['A\x20capture\x20forward\x20cannot\x20zero-value-advance\x20(gate-less\x20captures\x20land\x20funds\x20via\x20the\x20order_renew\x20routing;\x20balance-gated\x20captures\x20require\x20prior-transaction\x20funds)','The\x20deposit-exit\x20policy\x20is\x20declared\x20and\x20structurally\x20backed\x20before\x20purchase','The\x20release\x20is\x20once-per-order\x20and\x20order-anchored,\x20so\x20no\x20replay\x20double-charges'],'merchantObligations':['Give\x20every\x20capture\x20forward\x20a\x20funding\x20story:\x20gate-less\x20+\x20order_renew\x20routing,\x20or\x20a\x20balance\x20fund\x20gate\x20fed\x20by\x20PRIOR-transaction\x20funds\x20(prepaid\x20shape\x20—\x20a\x20gate\x20plus\x20same-PTB\x20order_renew\x20always\x20aborts,\x20esound-mn-261021\x20B-1)','Ship\x20a\x20deposit-exit\x20rail\x20(refund\x20or\x20declared\x20kill\x20fee)\x20from\x20every\x20deposit-held\x20state','Make\x20the\x20release\x20allocator\x20once_per_order\x20and\x20order-anchored','Disclose\x20the\x20deposit\x20amount,\x20balance\x20window,\x20and\x20exit\x20policy\x20in\x20the\x20listing/WIP\x20promise'],'requiresKeeper':!![],'keeperHint':'The\x20balance-window\x20deadline\x20(a\x20buyer\x20who\x20never\x20pays\x20the\x20balance)\x20needs\x20a\x20keeper\x20to\x20drive\x20the\x20deposit-exit\x20rail\x20at\x20the\x20window\x20close;\x20a\x20milestone\x20capture\x20timeout\x20likewise','source':'core'},{'id':'affiliate_commission','name':'Affiliate\x20Commission','group':'promotion','description':'Declared\x20affiliate_mode\x20(\x27commission\x27):\x20the\x20merchant\x20sells\x20through\x20referral/affiliate\x20partners\x20and\x20owes\x20the\x20referring\x20partner\x20an\x20independent\x20commission\x20leg.\x20The\x20commission\x20is\x20window-anchored\x20—\x20it\x20accrues\x20at\x20attribution\x20but\x20is\x20claimable\x20only\x20after\x20the\x20attribution/refund\x20window\x20closes,\x20so\x20an\x20in-window\x20refund\x20never\x20has\x20to\x20reverse\x20an\x20already-paid\x20partner\x20(the\x20chain\x20has\x20no\x20debit/clawback\x20primitive,\x20so\x20a\x20released\x20commission\x20is\x20unrecoverable\x20and\x20the\x20template\x20must\x20disclose\x20that\x20honestly).\x20The\x20commission\x20leg\x20is\x20an\x20INDEPENDENT\x20allocation\x20off\x20a\x20dedicated\x20pool,\x20never\x20a\x20drain\x20of\x20the\x20buyer\x27s\x20goods\x20escrow.','objectTypes':['machine','guard','allocation','repository'],'intent':['pattern.commission_holdback','pattern.time_window_upper_bound','pattern.referral_anti_self_purchase'],'binds':[],'requires':[],'excludes':[],'provides':[],'params':[],'risks':['The\x20chain\x20has\x20NO\x20debit/clawback\x20primitive\x20—\x20a\x20released\x20commission\x20is\x20unrecoverable;\x20the\x20window\x20anchor\x20minimizes\x20that\x20surface'],'disclosures':[],'cost':{'gas_objects':0x4,'fund':'commission_pool','bearer':'merchant'},'requiredConstraints':[{'constraint_id':'affiliate_rail_present','description':'a\x20declared\x20commission\x20overlay\x20has\x20a\x20commission-family\x20machine\x20node\x20or\x20a\x20commission\x20allocator\x20row,\x20and\x20the\x20leg\x20is\x20INDEPENDENT\x20of\x20the\x20goods\x20escrow\x20(INV-D3,\x20compile\x20AFFILIATE_RAIL_MISSING\x20/\x20scanner\x20R-AFFILIATE-RAIL)','level':'soft','blocking':![]},{'constraint_id':'affiliate_clawback_disclosed','description':'a\x20build_note\x20discloses\x20the\x20post-lock\x20no-clawback\x20truth\x20—\x20a\x20released\x20commission\x20cannot\x20be\x20reversed\x20on\x20chain\x20(INV-D2,\x20compile\x20AFFILIATE_CLAWBACK_UNDISCLOSED\x20/\x20scanner\x20R-AFFILIATE-DISCLOSURE)','level':'soft','blocking':![]},{'constraint_id':'affiliate_window_anchored','description':'the\x20commission\x20claim\x20is\x20gated\x20by\x20a\x20window-anchored\x20guard\x20so\x20it\x20is\x20claimable\x20only\x20after\x20the\x20attribution/refund\x20window\x20closes\x20(INV-D1,\x20rides\x20the\x20generic\x20TIME-ANCHOR-01\x20audit)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'The\x20commission\x20leg\x20is\x20an\x20independent\x20allocation\x20off\x20its\x20own\x20pool,\x20never\x20a\x20Surplus/Rate\x20drain\x20of\x20the\x20buyer\x27s\x20goods\x20escrow\x20(anti-grab-pool)'},{'dimension':'consumer_diligence','effect':'boost','description':'The\x20post-lock\x20no-clawback\x20truth\x20is\x20disclosed\x20before\x20purchase,\x20so\x20a\x20buyer/merchant\x20never\x20assumes\x20a\x20reversal\x20the\x20chain\x20cannot\x20do'},{'dimension':'operational_risk','effect':'boost','description':'The\x20window\x20anchor\x20means\x20an\x20in-window\x20refund\x20never\x20has\x20to\x20reverse\x20an\x20already-paid\x20partner\x20—\x20the\x20unrecoverable\x20surface\x20is\x20minimized\x20by\x20construction'}],'industryFit':{'freelance':0x3c,'education':0x37,'rental':0x23,'retail':0x50,'subscription':0x41,'travel':0x3c,'licensing':0x46,'crowdfunding':0x3c,'general':0x3c},'addressesPainPoints':['Referral/affiliate\x20payouts\x20locked\x20inside\x20incumbent\x20affiliate\x20networks\x20with\x20opaque\x20attribution','A\x20commission\x20drained\x20from\x20the\x20buyer\x27s\x20goods\x20escrow\x20instead\x20of\x20an\x20independent\x20pool\x20(pool-grabbing)','A\x20refund\x20after\x20commission\x20release\x20falsely\x20assumed\x20to\x20claw\x20back\x20the\x20partner\x20payout\x20(no\x20on-chain\x20debit\x20exists)','Attribution\x20claimed\x20instantly,\x20before\x20the\x20refund\x20window,\x20then\x20unrecoverable\x20when\x20the\x20order\x20refunds'],'intentSignals':[/affiliate/i,/referral/i,/referr/i,/commission/i,/revenue[ -]?shar/i,/partner[ -]?payout/i],'userProtections':['The\x20commission\x20is\x20paid\x20from\x20a\x20dedicated\x20pool,\x20so\x20the\x20buyer\x27s\x20goods\x20escrow\x20is\x20never\x20drained\x20by\x20the\x20partner\x20leg','The\x20post-lock\x20no-clawback\x20reality\x20is\x20disclosed\x20before\x20purchase,\x20not\x20discovered\x20at\x20refund\x20time','The\x20commission\x20is\x20only\x20claimable\x20after\x20the\x20attribution/refund\x20window\x20closes,\x20so\x20an\x20in-window\x20refund\x20is\x20clean'],'merchantObligations':['Route\x20the\x20commission\x20through\x20an\x20INDEPENDENT\x20allocation\x20leg\x20to\x20an\x20explicit\x20non-empty\x20partner\x20Entity','Gate\x20the\x20claim\x20with\x20a\x20window-anchored\x20guard\x20(claimable\x20only\x20after\x20the\x20attribution/refund\x20window)','Disclose\x20the\x20post-lock\x20no-clawback\x20truth\x20in\x20a\x20build_note\x20and\x20the\x20listing\x20promise','Declare\x20the\x20commission\x20rate/bps\x20and\x20the\x20attribution\x20window\x20in\x20the\x20listing\x20so\x20a\x20partner\x20can\x20price\x20it\x20before\x20referral'],'requiresKeeper':!![],'keeperHint':'The\x20attribution/refund\x20window\x20deadline\x20needs\x20a\x20keeper\x20to\x20open\x20the\x20commission\x20claim\x20once\x20the\x20window\x20closes\x20(the\x20claim\x20guard\x27s\x20time\x20gate\x20arms\x20at\x20entry_time\x20+\x20window)','source':'core'},{'id':'crowdfunding','name':'Crowdfunding\x20Campaign','group':'fund_safety','description':'Declared\x20crowdfunding_mode\x20(\x27threshold\x27\x20all-or-nothing\x20/\x20\x27flexible\x27\x20keep-it-all):\x20backers\x20each\x20escrow\x20a\x20contribution\x20in\x20its\x20OWN\x20unpooled\x20Allocation\x20(for_object\x20=\x20their\x20order,\x20never\x20balance-joined,\x20so\x20attribution\x20survives).\x20A\x20shared\x20campaign\x20Repository\x20records\x20one\x20writer-bound\x20numeric\x20row\x20per\x20contribution\x20(id_from\x20signer,\x20value\x20=\x20amount).\x20At\x20an\x20ABSOLUTE\x20campaign\x20deadline\x20a\x20settlement\x20guard\x20reads\x20the\x20on-chain\x20aggregate\x20(repository.data\x20sum-where,\x20query\x201174\x20→\x20U256)\x20and\x20decides:\x20aggregate\x20>=\x20goal\x20→\x20release\x20every\x20contribution\x20to\x20the\x20project\x20Entity;\x20aggregate\x20<\x20goal\x20(threshold\x20model)\x20→\x20refund\x20each\x20backer\x20their\x20own\x20contribution\x20(slot\x200\x20—\x20the\x20submitted\x20Order,\x20extracted\x20by\x20owner_receive;\x20NEVER\x20slot\x20254\x20on\x20a\x20refund\x20rail).\x20The\x20flexible\x20model\x20has\x20no\x20goal\x20and\x20no\x20refund\x20leg\x20—\x20contributions\x20release\x20at\x20the\x20deadline\x20and\x20are\x20non-refundable\x20(disclosed).\x20The\x20aggregate\x20is\x20attested-roster\x20evidence,\x20not\x20a\x20chain-verified\x20custody\x20proof;\x20a\x20raise\x20is\x20never\x20an\x20investment.','objectTypes':['machine','guard','allocation','repository'],'intent':['pattern.time_lock_absolute','pattern.repository_data_check','pattern.fund_flow_stop_node_coverage'],'binds':[],'requires':[],'excludes':[],'provides':[],'params':[],'risks':['The\x20aggregate\x20is\x20a\x20keeper-attested\x20Repository\x20sum\x20—\x20arbitration\x20evidence,\x20NOT\x20a\x20chain-verified\x20custody\x20oracle;\x20a\x20flexible\x20keep-it-all\x20raise\x20has\x20NO\x20refund\x20leg'],'disclosures':['A\x20raise\x20is\x20never\x20an\x20investment\x20(L-01);\x20KYC/AML\x20+\x20cross-border\x20intensity\x20is\x20HIGH\x20(L-05);\x20the\x20L-04\x20aggregate\x20trust\x20boundary\x20must\x20be\x20in\x20build_notes'],'cost':{'gas_objects':0x4,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'crowdfunding_exit_rail_present','description':'a\x20declared\x20campaign\x20has\x20a\x20release/settlement\x20rail,\x20and\x20a\x20threshold\x20campaign\x20additionally\x20has\x20a\x20refund\x20rail\x20—\x20the\x20two-leg\x20escrow-exit\x20(release\x20XOR\x20refund,\x20D-BUG-2)\x20so\x20contributions\x20never\x20strand\x20at\x20the\x20deadline\x20(INV-E1,\x20compile\x20CROWDFUNDING_THRESHOLD_GATE_MISSING\x20/\x20scanner\x20R-CROWDFUNDING-RAIL)','level':'soft','blocking':![]},{'constraint_id':'crowdfunding_aggregate_writer_bound','description':'a\x20threshold\x20aggregate\x20reads\x20the\x20ESCROW-BOUND\x20sum\x20(query\x201179,\x20per-row\x20min(row,\x20order.amount,\x20LIVE\x20allocation.balance\x20of\x20the\x20row\x27s\x20Order\x20—\x20v140\x20live\x20cap))\x20over\x20ORDER-KEYED\x20rows\x20(policy\x20id_from\x20unset,\x20row\x20id\x20=\x20the\x20funder\x27s\x20Order\x20address\x20+\x20an\x20identity\x20write_guard\x20order.owner==Signer),\x20never\x20a\x20self-reported\x20free-form\x20sum\x20over\x20wallet-keyed\x20rows\x20(INV-E2\x20/\x20R-X1-17,\x20compile\x20CROWDFUNDING_AGGREGATE_UNBOUND\x20/\x20CROWDFUNDING_SIGNER_KEYED_ROWS\x20/\x20scanner\x20R-CROWDFUNDING-AGGREGATE)','level':'soft','blocking':![]},{'constraint_id':'crowdfunding_disclosure_present','description':'build_notes\x20disclose\x20the\x20L-04\x20aggregate\x20trust\x20boundary\x20(threshold),\x20the\x20L-01\x20non-investment\x20statement,\x20the\x20L-05\x20KYC/AML\x20caution,\x20and\x20—\x20for\x20a\x20flexible\x20build\x20—\x20the\x20NO-REFUND\x20keep-it-all\x20posture\x20(INV-E3,\x20compile\x20CROWDFUNDING_DISCLOSURE_MISSING\x20/\x20scanner\x20R-CROWDFUNDING-DISCLOSURE)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'Each\x20contribution\x20is\x20escrowed\x20UNPOOLED\x20(for_object\x20=\x20its\x20own\x20order,\x20never\x20balance::join)\x20so\x20a\x20missed\x20campaign\x20refunds\x20every\x20backer\x20their\x20OWN\x20money;\x20the\x20release/refund\x20legs\x20are\x20mutually\x20exclusive\x20(D-BUG-2)'},{'dimension':'consumer_diligence','effect':'boost','description':'The\x20aggregate-trust\x20boundary,\x20the\x20non-investment\x20posture\x20and\x20(flexible)\x20the\x20no-refund\x20reality\x20are\x20disclosed\x20before\x20contribution,\x20so\x20a\x20backer\x20never\x20assumes\x20a\x20chain-verified\x20custody\x20proof\x20or\x20a\x20refund\x20the\x20model\x20does\x20not\x20have'},{'dimension':'operational_risk','effect':'boost','description':'One\x20ABSOLUTE\x20shared\x20deadline\x20(not\x20per-order\x20entry+duration)\x20means\x20every\x20backer\x20settles\x20at\x20the\x20same\x20cutoff;\x20the\x20writer-bound\x20ledger\x20makes\x20the\x20raise\x20total\x20attributable\x20and\x20honest'}],'industryFit':{'freelance':0x1e,'education':0x28,'rental':0x14,'retail':0x3c,'subscription':0x23,'travel':0x19,'licensing':0x2d,'crowdfunding':0x64,'general':0x37},'addressesPainPoints':['An\x20all-or-nothing\x20raise\x20where\x20a\x20missed\x20goal\x20must\x20refund\x20every\x20backer,\x20but\x20pooled\x20custody\x20loses\x20per-backer\x20attribution','A\x20funding\x20total\x20presented\x20as\x20a\x20chain-verified\x20custody\x20proof\x20when\x20it\x20is\x20only\x20an\x20attested\x20sum\x20over\x20keeper-supplied\x20rows','A\x20backer\x20mistaking\x20a\x20flexible\x20keep-it-all\x20raise\x20for\x20a\x20refundable\x20all-or-nothing\x20campaign','Pooled\x20cross-border\x20fundraising\x20treated\x20as\x20a\x20casual\x20purchase\x20despite\x20HIGH\x20securities\x20/\x20money-transmission\x20/\x20KYC-AML\x20exposure'],'intentSignals':[/crowdfund/i,/\bbackers?\b/i,/campaign/i,/all[ -]?or[ -]?nothing/i,/fundrais/i,/\bpledge/i,/raise (funds|money)/i,/keep[ -]?it[ -]?all/i],'userProtections':['Each\x20contribution\x20is\x20escrowed\x20to\x20the\x20backer\x27s\x20OWN\x20order\x20(unpooled),\x20so\x20a\x20missed\x20threshold\x20refunds\x20exactly\x20their\x20money','The\x20aggregate-trust\x20boundary\x20and\x20the\x20non-investment\x20posture\x20are\x20disclosed\x20before\x20contribution','A\x20flexible\x20raise\x20states\x20the\x20NO-REFUND\x20keep-it-all\x20posture\x20up\x20front,\x20never\x20blurred\x20with\x20all-or-nothing','Delivery\x20after\x20a\x20successful\x20raise\x20is\x20backed\x20by\x20the\x20compensation\x20fund\x20+\x20third-party\x20arbitration'],'merchantObligations':['Escrow\x20each\x20contribution\x20UNPOOLED\x20(for_object\x20=\x20the\x20funder\x27s\x20order),\x20never\x20balance-joined\x20into\x20a\x20shared\x20pot','Bind\x20the\x20campaign\x20Repository\x20write_guard\x20to\x20the\x20contributing\x20backer\x20(id_from\x20signer,\x20order.owner==Signer)\x20so\x20the\x20aggregate\x20cannot\x20be\x20forged','Gate\x20release\x20on\x20the\x20sum-where\x20aggregate\x20ANDed\x20with\x20an\x20ABSOLUTE\x20shared\x20campaign\x20deadline;\x20pair\x20the\x20refund\x20leg\x20with\x20a\x20recover_gate\x20rail\x20(D-BUG-2)','Disclose\x20the\x20L-04\x20aggregate\x20trust\x20boundary,\x20the\x20L-01\x20non-investment\x20statement,\x20the\x20L-05\x20KYC/AML\x20caution,\x20and\x20(flexible)\x20the\x20no-refund\x20posture\x20in\x20build_notes\x20and\x20the\x20listing'],'requiresKeeper':!![],'keeperHint':'The\x20ABSOLUTE\x20campaign\x20deadline\x20needs\x20a\x20keeper\x20to\x20drive\x20settlement\x20once\x20Clock\x20>=\x20deadline:\x20on\x20a\x20met\x20goal\x20advance\x20each\x20order\x20to\x20the\x20release\x20terminal;\x20on\x20a\x20missed\x20threshold\x20enumerate\x20contributor\x20ids\x20via\x20find-where\x20(1176)\x20/\x20keys-where\x20(1177,\x20max\x20100\x20per\x20batch)\x20and\x20advance\x20each\x20refund\x20leg.\x20WITNESS\x20BOUNDARY\x20(S12-③,\x20v140):\x20the\x20inline\x20witness\x20ceiling\x20is\x204096\x20BCS\x20bytes\x20—\x20a\x20100-address\x20roster\x20now\x20fits\x20inline,\x20but\x20keep\x20roster\x20enumeration\x20in\x20the\x20guard-table\x20id\x20vector\x20(cap\x20100)\x20so\x20the\x20witness\x20carries\x20only\x20per-call\x20attestation','source':'core'},{'id':'logistics_fulfillment','name':'Logistics\x20&\x20Fulfillment','group':'fulfillment','description':'Declared\x20logistics_mode\x20(\x27carrier\x27\x20|\x20\x27merchant_managed\x27\x20|\x20\x27courier\x27\x20|\x20\x27pickup_point\x27):\x20how\x20the\x20physical\x20good\x20reaches\x20the\x20buyer.\x20carrier\x20=\x20third-party\x20carrier\x20with\x20mandatory\x20tracking\x20evidence;\x20merchant_managed\x20=\x20the\x20merchant\x27s\x20own\x20staff\x20(handover/inspection);\x20courier\x20=\x20per-order\x20dispatched\x20riders\x20riding\x20namedOperator\x20roster\x20rails\x20(the\x20ONLY\x20forward\x20a\x20third-party\x20rider\x20can\x20pass\x20—\x20no\x20permission\x20entity,\x20no\x20buyer\x20identity);\x20pickup_point\x20=\x20batch\x20consolidation\x20anchored\x20on\x20an\x20ABSOLUTE\x20shared\x20cutoff\x20with\x20a\x20bounded\x20unclaimed-goods\x20exit.\x20Every\x20physical\x20mode\x20carries\x20a\x20transit-loss\x20story\x20(an\x20express\x20loss\x20rail\x20or\x20a\x20disclosed\x20arbitration->refund\x20remedy).\x20The\x20delivery\x20fee\x20is\x20known\x20at\x20order\x20time\x20and\x20must\x20be\x20an\x20INDEPENDENT\x20leg\x20—\x20never\x20a\x20Surplus/Rate\x20drain\x20of\x20the\x20buyer\x27s\x20goods\x20escrow.','objectTypes':['machine','guard','allocation','repository'],'intent':['pattern.named_operator_roster_admission','pattern.time_lock_absolute','pattern.supply_chain_suborder_verification'],'binds':[],'requires':[],'excludes':[],'provides':[],'params':[],'risks':['No\x20on-chain\x20dispatch\x20scheduler\x20and\x20no\x20distance/weight/weather\x20oracle\x20exist\x20—\x20ETA\x20and\x20pricing\x20promises\x20must\x20never\x20masquerade\x20as\x20chain\x20guarantees'],'disclosures':['Courier/pickup_point\x20dispatch\x20is\x20an\x20off-chain\x20keeper\x20duty\x20(roster\x20via\x20permission\x20index\x20221)\x20and\x20must\x20be\x20disclosed\x20as\x20such'],'cost':{'gas_objects':0x4,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'logistics_rail_present','description':'the\x20declared\x20topology\x20is\x20structurally\x20expressed:\x20courier\x20builds\x20bind\x20namedOperator\x20handover\x20rails\x20(compile\x20LOGISTICS_COURIER_RAIL_MISSING)\x20with\x20exclusive\x20admission\x20via\x20kernel\x20query\x201575\x20(order.named_operator\x20member,\x20protocol\x20v138\x20—\x20the\x20rail\x20alone\x20AUTHORIZES\x20members\x20and\x20never\x20bars\x20non-members;\x20template\x20tpl_forward_roster_member_gate),\x20pickup_point\x20builds\x20carry\x20the\x20absolute\x20batch\x20cutoff\x20+\x20the\x20unclaimed-goods\x20exit\x20window\x20(LOGISTICS_PICKUP_CUTOFF_MISSING),\x20carrier\x20builds\x20bind\x20tracking\x20evidence\x20(LOGISTICS_CARRIER_EVIDENCE_MISSING)','level':'soft','blocking':![]},{'constraint_id':'logistics_loss_covered','description':'every\x20physical\x20mode\x20carries\x20a\x20transit-loss\x20story\x20—\x20an\x20express\x20loss\x20rail\x20or\x20a\x20disclosed\x20arbitration->refund\x20remedy\x20(compile\x20LOGISTICS_TRANSIT_LOSS_UNCOVERED\x20/\x20scanner\x20R-LOGISTICS-TRANSIT)','level':'soft','blocking':![]},{'constraint_id':'logistics_fee_independent','description':'the\x20delivery\x20fee\x20is\x20an\x20INDEPENDENT\x20Amount/Rate\x20leg\x20off\x20its\x20own\x20pool\x20—\x20never\x20a\x20Surplus\x20drain\x20of\x20the\x20buyer\x27s\x20goods\x20escrow\x20(compile\x20LOGISTICS_COURIER_FEE_POOLED;\x20the\x20anti-grab-pool\x20family)','level':'soft','blocking':![]},{'constraint_id':'logistics_dispatch_disclosed','description':'courier/pickup_point\x20builds\x20disclose\x20the\x20two\x20dispatch\x20SOLE-TRUTHs:\x20no\x20on-chain\x20dispatch\x20scheduler\x20(off-chain\x20keeper,\x20roster\x20via\x20permission\x20index\x20221)\x20and\x20no\x20distance/weight/weather\x20oracle\x20(compile\x20LOGISTICS_DISPATCH_UNDISCLOSED\x20/\x20scanner\x20R-LOGISTICS-DISCLOSURE)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'consumer_diligence','effect':'required','description':'The\x20fulfillment\x20topology\x20is\x20declared\x20and\x20enforced\x20before\x20purchase\x20—\x20the\x20buyer\x20knows\x20whether\x20goods\x20ride\x20a\x20carrier\x20(with\x20tracking\x20evidence),\x20the\x20merchant\x27s\x20own\x20staff,\x20a\x20dispatched\x20rider,\x20or\x20a\x20pickup\x20batch'},{'dimension':'fund_safety','effect':'boost','description':'The\x20delivery\x20fee\x20never\x20drains\x20the\x20goods\x20escrow\x20(independent\x20leg)\x20and\x20every\x20physical\x20mode\x20carries\x20a\x20transit-loss\x20route,\x20so\x20an\x20undeliverable\x20order\x20never\x20strands\x20the\x20buyer\x27s\x20funds\x20silently'},{'dimension':'operational_risk','effect':'boost','description':'Dispatch\x20is\x20honestly\x20disclosed\x20as\x20an\x20off-chain\x20keeper\x20duty\x20(no\x20on-chain\x20scheduler/oracle\x20exists),\x20so\x20ETA\x20and\x20pricing\x20promises\x20never\x20masquerade\x20as\x20chain\x20guarantees'}],'industryFit':{'freelance':0x1e,'education':0x19,'rental':0x37,'retail':0x46,'subscription':0x23,'travel':0x1e,'licensing':0x14,'crowdfunding':0x28,'general':0x28},'addressesPainPoints':['Fulfillment\x20topology\x20correctness\x20audited\x20by\x20prose\x20instead\x20of\x20structure\x20(a\x20courier\x20build\x20with\x20no\x20rider\x20rail,\x20a\x20pickup\x20batch\x20with\x20no\x20cutoff)','A\x20delivery\x20fee\x20drained\x20from\x20the\x20buyer\x27s\x20goods\x20escrow\x20instead\x20of\x20an\x20independent\x20leg\x20(pool-grabbing)','Goods\x20lost\x20in\x20transit\x20with\x20no\x20taught\x20remedy\x20route,\x20silently\x20stranding\x20the\x20buyer\x27s\x20funds','Builders\x20assuming\x20an\x20on-chain\x20dispatch\x20scheduler\x20or\x20distance\x20oracle\x20the\x20chain\x20does\x20not\x20have'],'intentSignals':[/deliver(y|ies)?/i,/\bshipping\b/i,/courier/i,/\brider\b/i,/dispatch/i,/pickup point/i,/self[- ]pick/i,/fulfillment/i,/\blogistics\b/i],'userProtections':['The\x20fulfillment\x20mode\x20is\x20declared\x20and\x20structurally\x20enforced,\x20not\x20a\x20prose\x20promise','A\x20lost-in-transit\x20order\x20has\x20a\x20disclosed\x20remedy\x20route\x20(arbitration\x20->\x20refund),\x20never\x20silence','The\x20delivery\x20fee\x20comes\x20out\x20of\x20its\x20own\x20pool,\x20never\x20out\x20of\x20the\x20buyer\x27s\x20goods\x20escrow','Dispatch\x20and\x20ETA\x20claims\x20are\x20disclosed\x20as\x20off-chain\x20keeper\x20operations,\x20not\x20chain\x20guarantees','Courier\x20handovers\x20are\x20roster-exclusive:\x20a\x20rider\x20not\x20on\x20the\x20order\x27s\x20named-operator\x20roster\x20is\x20kernel-barred\x20from\x20advancing\x20(query\x201575)'],'merchantObligations':['Declare\x20logistics_mode\x20and\x20honor\x20its\x20semantics\x20(rails,\x20evidence,\x20cutoffs)\x20—\x20compile\x20blocks\x20a\x20declared\x20topology\x20the\x20shape\x20cannot\x20express','Keep\x20the\x20delivery\x20fee\x20on\x20an\x20independent\x20leg\x20off\x20its\x20own\x20pool','Give\x20every\x20physical\x20build\x20a\x20transit-loss\x20story\x20(loss\x20rail\x20or\x20disclosed\x20arbitration->refund\x20remedy)','For\x20courier/pickup_point:\x20run\x20the\x20dispatch\x20keeper\x20(roster\x20writes\x20via\x20permission\x20index\x20221)\x20and\x20disclose\x20that\x20ETA/pricing\x20live\x20off-chain'],'requiresKeeper':!![],'keeperHint':'Dynamic\x20modes\x20(courier/pickup_point)\x20need\x20the\x20dispatch\x20keeper:\x20fill\x20the\x20namedOperator\x20roster\x20per\x20order/shift\x20via\x20permission\x20index\x20221\x20(miss\x20=\x20the\x20order\x20waits\x20at\x20the\x20handover\x20state);\x20pickup\x20batches\x20need\x20the\x20keeper\x20to\x20drive\x20the\x20cutoff\x20release\x20and\x20the\x20unclaimed-goods\x20exit\x20at\x20the\x20window\x20deadline','source':'core'}];export const COMPOSITION_CAPABILITIES=[{'id':'fulfillment_self','name':'Self\x20Fulfillment\x20(merchant-managed)','group':'fulfillment','description':'Variant\x20V1:\x20the\x20merchant\x20fulfills\x20with\x20its\x20OWN\x20staff\x20inside\x20the\x20order\x27s\x20flow\x20—\x20permission-entity\x20legs\x20(staff\x20hold\x20the\x20Service\x20Permission\x20and\x20pass\x20identity-gated\x20forwards)\x20or\x20namedOperator\x20roster\x20legs\x20for\x20per-order\x20hands\x20(the\x20only\x20forward\x20a\x20non-permission\x20third\x20party\x20can\x20pass).\x20Dispatch\x20itself\x20has\x20NO\x20on-chain\x20primitive:\x20it\x20is\x20an\x20off-chain\x20keeper\x20duty\x20whose\x20only\x20chain\x20footprint\x20is\x20the\x20roster\x20write\x20(permission\x20index\x20221).','objectTypes':['permission','machine','guard'],'intent':['pattern.named_operator_roster_admission','pattern.scene_machine_forward_operator'],'binds':[{'surface':'permission'},{'surface':'machine'},{'surface':'guard'}],'requires':[],'excludes':['fulfillment_procured','fulfillment_user_procured'],'provides':[],'params':[],'risks':['No\x20on-chain\x20dispatch\x20scheduler\x20or\x20distance\x20oracle\x20exists\x20—\x20ETA\x20promises\x20are\x20off-chain\x20and\x20must\x20be\x20disclosed'],'disclosures':['Dispatch\x20is\x20an\x20off-chain\x20keeper\x20duty;\x20the\x20roster\x20write\x20(permission\x20index\x20221)\x20is\x20its\x20only\x20chain\x20footprint'],'cost':{'gas_objects':0x2,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'fulfillment_self_rail_present','description':'staff\x20forwards\x20are\x20identity-gated\x20(permission\x20entity\x20or\x20namedOperator\x20roster)\x20—\x20an\x20unguarded\x20staff\x20handover\x20lets\x20anyone\x20advance\x20the\x20delivery\x20stage','level':'hard','blocking':!![]},{'constraint_id':'fulfillment_dispatch_disclosed','description':'ETA/dispatch\x20claims\x20disclosed\x20as\x20off-chain\x20keeper\x20operations,\x20never\x20implied\x20as\x20on-chain\x20guarantees','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'consumer_diligence','effect':'required','description':'The\x20buyer\x20knows\x20the\x20merchant\x27s\x20own\x20staff\x20fulfill,\x20and\x20every\x20handover\x20is\x20identity-gated'},{'dimension':'operational_risk','effect':'boost','description':'One\x20accountable\x20party\x20end-to-end\x20—\x20no\x20cross-provider\x20blame\x20boundary'}],'industryFit':{'freelance':0x46,'education':0x3c,'rental':0x4b,'retail':0x3c,'subscription':0x2d,'travel':0x37,'licensing':0x28,'crowdfunding':0x1e,'general':0x3c},'addressesPainPoints':['Merchant\x20has\x20its\x20own\x20delivery\x20capability\x20but\x20no\x20structural\x20way\x20to\x20express\x20who\x20may\x20advance\x20the\x20handover','Staff\x20handovers\x20advanced\x20by\x20anyone\x20(no\x20identity\x20gate\x20on\x20the\x20delivery\x20stage)','Dispatch\x20promises\x20implied\x20to\x20be\x20chain-enforced\x20when\x20nothing\x20on-chain\x20schedules\x20them'],'intentSignals':[/self[ -]?(deliver|fulfill)/i,/(our|my|in-house) (staff|team|rider|courier)/i,/merchant[ -]managed/i,/own (staff|riders|fleet)/i],'userProtections':['Every\x20handover\x20forward\x20is\x20identity-gated\x20(permission\x20entity\x20or\x20roster\x20member)','A\x20stranger\x20cannot\x20advance\x20the\x20delivery\x20stage','The\x20merchant\x20is\x20the\x20single\x20accountable\x20party\x20end-to-end'],'merchantObligations':['Gate\x20every\x20staff\x20handover\x20forward\x20(permissionIndex\x20or\x20namedOperator\x20roster)','Run\x20the\x20dispatch\x20keeper\x20(roster\x20writes\x20via\x20permission\x20index\x20221)','Disclose\x20ETA/route\x20as\x20off-chain\x20operations'],'requiresKeeper':!![],'keeperHint':'Fill\x20the\x20namedOperator\x20roster\x20per\x20order/shift\x20via\x20permission\x20index\x20221\x20(miss\x20=\x20the\x20order\x20waits\x20at\x20the\x20handover\x20state)','source':'composition'},{'id':'fulfillment_procured','name':'Procured\x20Fulfillment\x20(merchant-bought)','group':'fulfillment','description':'Variants\x20V2/V4:\x20the\x20merchant\x20buys\x20an\x20EXTERNAL\x20fulfillment\x20service\x20and\x20resells\x20the\x20bundle.\x20The\x20build\x20carries\x20the\x20P3\x20sub-procurement\x20commitment\x20(a\x20constant\x20sub-Service\x20address\x20slot\x20in\x20the\x20machine\x20shape),\x20the\x20P1\x20shared\x20Repository\x20pairing\x20(main\x20order\x20and\x20sub\x20order\x20both\x20write\x20evidence\x20the\x20other\x27s\x20guards\x20read),\x20and\x20the\x20P4\x20staged\x20release\x20(the\x20fulfillment\x20share\x20releases\x20only\x20after\x20the\x20sub-order\x27s\x20own\x20terminal\x20advances).\x20The\x20merchant\x20owes\x20the\x20buyer\x20the\x20FULL\x20remedy:\x20a\x20sub-provider\x20failure\x20is\x20the\x20merchant\x27s\x20liability\x20to\x20its\x20buyer,\x20settled\x20through\x20the\x20main\x20order\x27s\x20rails.','objectTypes':['machine','allocation','repository','service'],'intent':['pattern.supply_chain_suborder_verification','pattern.allocation_staged_release','pattern.fund_flow_stop_node_coverage'],'binds':[{'surface':'allocation'},{'surface':'repository'},{'surface':'machine'}],'requires':[],'excludes':['fulfillment_self','fulfillment_user_procured'],'provides':[],'params':[],'risks':['A\x20sub-provider\x20failure\x20strands\x20the\x20main\x20order\x27s\x20delivery\x20stage\x20—\x20the\x20staged\x20release\x20must\x20keep\x20the\x20fulfillment\x20share\x20unspent\x20until\x20the\x20sub\x20terminal\x20advances','The\x20merchant\x20bears\x20the\x20buyer-side\x20remedy\x20even\x20when\x20the\x20failure\x20is\x20the\x20sub-provider\x27s'],'disclosures':['The\x20sub-Service\x20address\x20is\x20a\x20constant\x20slot\x20pinned\x20at\x20build\x20—\x20naming\x20it\x20in\x20the\x20listing\x20lets\x20the\x20buyer\x20verify\x20the\x20counterparty\x20before\x20ordering','The\x20fulfillment\x20share\x20releases\x20on\x20the\x20SUB\x20order\x27s\x20terminal,\x20not\x20the\x20main\x20order\x27s\x20delivery\x20claim\x20alone'],'cost':{'gas_objects':0x4,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'procured_commitment_present','description':'the\x20machine\x20shape\x20pins\x20the\x20sub-Service\x20address\x20slot\x20and\x20the\x20fulfillment\x20share\x20rides\x20a\x20staged\x20release\x20gated\x20on\x20the\x20sub-order\x20terminal\x20(P3\x20+\x20P4)','level':'hard','blocking':!![]},{'constraint_id':'procured_pairing_present','description':'a\x20shared\x20Repository\x20pairs\x20main-order\x20and\x20sub-order\x20evidence\x20(P1)\x20so\x20either\x20side\x27s\x20guards\x20can\x20verify\x20the\x20other','level':'soft','blocking':![]},{'constraint_id':'procured_remedy_disclosed','description':'the\x20listing\x20states\x20the\x20merchant\x20holds\x20the\x20full\x20buyer\x20remedy\x20for\x20sub-provider\x20failure','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'The\x20fulfillment\x20share\x20cannot\x20be\x20drained\x20before\x20the\x20sub-order\x20proves\x20delivery\x20(staged\x20release,\x20P4)'},{'dimension':'supplier_visibility','effect':'boost','description':'The\x20sub-provider\x20and\x20its\x20share\x20are\x20on-chain\x20visible\x20—\x20the\x20buyer\x20prices\x20the\x20bundle,\x20not\x20a\x20black\x20box'}],'industryFit':{'freelance':0x28,'education':0x23,'rental':0x32,'retail':0x50,'subscription':0x28,'travel':0x46,'licensing':0x23,'crowdfunding':0x1e,'general':0x37},'addressesPainPoints':['A\x20restaurant\x20without\x20rider\x20management\x20resells\x20delivery\x20as\x20if\x20it\x20owned\x20the\x20capability,\x20with\x20no\x20structural\x20commitment\x20to\x20the\x20external\x20provider','Fulfillment\x20shares\x20paid\x20before\x20the\x20sub-order\x20proves\x20anything','Sub-provider\x20failures\x20with\x20no\x20disclosed\x20buyer\x20remedy\x20route'],'intentSignals':[/(partner|third[ -]?party) (delivery|fulfillment|logistics)/i,/procure[dm]?\b/i,/subcontract/i,/(bundle|include).{0,20}(deliver|shipping)/i,/arrange.{0,20}(courier|carrier|rider)/i],'userProtections':['The\x20sub-provider\x20is\x20pinned\x20on-chain\x20and\x20verifiable\x20before\x20ordering','The\x20fulfillment\x20share\x20releases\x20only\x20on\x20sub-order\x20proof','A\x20sub-provider\x20failure\x20is\x20the\x20merchant\x27s\x20liability,\x20not\x20the\x20buyer\x27s'],'merchantObligations':['Pin\x20the\x20sub-Service\x20address\x20slot\x20at\x20build\x20and\x20disclose\x20it','Gate\x20the\x20fulfillment\x20share\x20on\x20the\x20sub-order\x20terminal\x20(staged\x20release)','Hold\x20the\x20full\x20buyer\x20remedy\x20for\x20sub-provider\x20failures','Disclose\x20the\x20bundle\x27s\x20two-party\x20structure\x20in\x20the\x20listing'],'requiresKeeper':!![],'keeperHint':'The\x20sub-order\x20terminal\x20advance\x20and\x20the\x20staged-release\x20trigger\x20both\x20need\x20keeper\x20coverage;\x20a\x20stalled\x20sub-order\x20needs\x20an\x20exit\x20rail\x20at\x20the\x20window\x20deadline','source':'composition'},{'id':'fulfillment_user_procured','name':'User-Procured\x20Fulfillment\x20(buyer-bought)','group':'fulfillment','description':'Variant\x20V3:\x20the\x20BUYER\x20buys\x20fulfillment\x20separately\x20(its\x20own\x20order\x20with\x20the\x20fulfillment\x20provider),\x20the\x20merchant\x20sells\x20only\x20the\x20goods.\x20The\x20merchant\x27s\x20service\x20declares\x20the\x20topology:\x20its\x20buy_guard\x20accepts\x20a\x20buyer-supplied\x20fulfillment\x20reference\x20(the\x20sub-order\x20address\x20rides\x20the\x20buy\x20call\x27s\x20required_info\x20inputs),\x20and\x20the\x20machine\x20gates\x20the\x20goods\x20release\x20on\x20the\x20sub-order\x27s\x20terminal\x20proof\x20instead\x20of\x20a\x20merchant-arranged\x20handover.\x20THREE\x20inherent\x20risks\x20transfer\x20to\x20the\x20user\x20by\x20construction\x20and\x20MUST\x20be\x20disclosed\x20before\x20purchase:\x20provider\x20qualification\x20(the\x20merchant\x20does\x20not\x20vet\x20the\x20buyer\x27s\x20chosen\x20provider),\x20fulfillment\x20quality\x20(the\x20merchant\x20cannot\x20enforce\x20the\x20provider\x27s\x20SLA),\x20and\x20the\x20liability\x20boundary\x20(a\x20delivery\x20failure\x20is\x20between\x20buyer\x20and\x20provider,\x20NOT\x20a\x20main-order\x20refund\x20event).','objectTypes':['machine','guard','service'],'intent':['pattern.supply_chain_suborder_verification','pattern.required_info_evidence_gate'],'binds':[{'surface':'machine'},{'surface':'guard'}],'requires':[],'excludes':['fulfillment_self','fulfillment_procured'],'provides':[],'params':[],'risks':['Provider\x20qualification,\x20fulfillment\x20quality,\x20and\x20the\x20liability\x20boundary\x20ALL\x20sit\x20with\x20the\x20buyer\x20—\x20a\x20delivery\x20failure\x20is\x20not\x20a\x20main-order\x20refund\x20event'],'disclosures':['The\x20listing\x20MUST\x20state\x20all\x20three\x20transferred\x20risks\x20before\x20purchase\x20(anti-dark-pattern):\x20who\x20vets\x20the\x20provider,\x20who\x20enforces\x20quality,\x20who\x20eats\x20a\x20delivery\x20failure','Privacy\x20note:\x20the\x20buyer\x27s\x20contact/address\x20details\x20flow\x20to\x20the\x20provider\x20through\x20ITS\x20order\x20and\x20Messenger\x20—\x20never\x20through\x20the\x20merchant\x27s\x20listing'],'cost':{'gas_objects':0x3,'bearer':'buyer'},'requiredConstraints':[{'constraint_id':'user_procured_disclosure','description':'the\x20three\x20inherent\x20risks\x20(provider\x20qualification\x20/\x20quality\x20/\x20liability\x20boundary)\x20are\x20disclosed\x20in\x20the\x20listing\x20BEFORE\x20purchase','level':'hard','blocking':!![]},{'constraint_id':'user_procured_linkage','description':'the\x20buy_guard\x20accepts\x20the\x20buyer\x27s\x20sub-order\x20reference\x20and\x20the\x20goods\x20release\x20gates\x20on\x20the\x20sub-order\x20terminal\x20proof\x20(not\x20a\x20merchant\x20handover)','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'consumer_diligence','effect':'required','description':'The\x20buyer\x20sees,\x20before\x20purchase,\x20that\x20fulfillment\x20is\x20theirs\x20—\x20with\x20the\x20three\x20risks\x20spelled\x20out,\x20not\x20buried'},{'dimension':'operational_risk','effect':'boost','description':'Clean\x20liability\x20boundary:\x20the\x20merchant\x20never\x20claims\x20a\x20delivery\x20capability\x20it\x20does\x20not\x20control'}],'industryFit':{'freelance':0x1e,'education':0x19,'rental':0x2d,'retail':0x4b,'subscription':0x1e,'travel':0x37,'licensing':0x19,'crowdfunding':0x19,'general':0x32},'addressesPainPoints':['A\x20merchant\x20forced\x20to\x20fake\x20a\x20fulfillment\x20capability\x20it\x20does\x20not\x20have','Buyers\x20wanting\x20to\x20use\x20their\x20own\x20logistics\x20account/contract','Bundled\x20delivery\x20fees\x20hiding\x20a\x20margin\x20the\x20buyer\x20would\x20rather\x20spend\x20on\x20its\x20own\x20provider'],'intentSignals':[/(i|i'll|my own) (arrange|book|buy).{0,20}(deliver|shipping|courier)/i,/self[ -]?pick ?up/i,/(use|bring) (my|my own).{0,20}(courier|rider|carrier)/i,/pickup by (buyer|customer|me)/i],'userProtections':['The\x20three\x20transferred\x20risks\x20are\x20disclosed\x20BEFORE\x20purchase','The\x20goods\x20release\x20is\x20gated\x20on\x20the\x20sub-order\x20proof,\x20so\x20the\x20merchant\x20cannot\x20ship-and-forget\x20the\x20handover\x20claim','The\x20liability\x20boundary\x20is\x20structural,\x20not\x20prose'],'merchantObligations':['Disclose\x20the\x20three\x20inherent\x20risks\x20in\x20the\x20listing','Accept\x20the\x20buyer\x27s\x20sub-order\x20reference\x20in\x20the\x20buy\x20guard','Gate\x20the\x20goods\x20release\x20on\x20the\x20sub-order\x20terminal\x20proof','Never\x20represent\x20fulfillment\x20as\x20merchant-managed'],'requiresKeeper':![],'source':'composition'},{'id':'cross_order_gate','name':'Cross-Order\x20Gate','group':'composition','description':'Generic\x20two-order\x20pairing\x20gate:\x20an\x20order\x27s\x20stage\x20accepts\x20an\x20EXTERNAL\x20order\x20as\x20evidence\x20via\x20an\x20external-order\x20submission\x20slot\x20plus\x20inline\x20witness.\x20Three\x20kernel-proven\x20leg\x20families\x20back\x20it\x20—\x20COMPOSE-PROVIDER-PIN-01\x20(the\x20referenced\x20sub-Service\x20is\x20the\x20pinned\x20constant,\x20not\x20a\x20lookalike),\x20OWNER-CROSS-01\x20(the\x20submitting\x20signer\x20is\x20party\x20to\x20BOTH\x20orders\x20—\x20no\x20third\x20party\x20can\x20fuse\x20two\x20stranger\x20orders),\x20and\x20PAIR-01\x20(one\x20order\x20references\x20the\x20other\x20at\x20most\x20once\x20—\x20no\x20self-referential\x20or\x20cyclic\x20pair).\x20This\x20is\x20the\x20primitive\x20fulfillment_procured\x20and\x20fulfillment_user_procured\x20both\x20stand\x20on.','objectTypes':['guard','repository','machine'],'intent':['pattern.supply_chain_suborder_verification','pattern.identity_check_single'],'binds':[{'surface':'guard'}],'requires':[],'excludes':[],'provides':[],'params':[],'risks':['Without\x20the\x20provider-pin\x20leg\x20a\x20lookalike\x20sub-Service\x20satisfies\x20the\x20gate;\x20without\x20the\x20owner-cross\x20leg\x20strangers\x20can\x20fuse\x20orders;\x20without\x20the\x20pair\x20leg\x20a\x20cyclic\x20reference\x20deadlocks\x20both'],'disclosures':[],'cost':{'gas_objects':0x2,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'cross_order_pair_legs','description':'the\x20external-order\x20slot\x20carries\x20the\x20witness\x20and\x20all\x20three\x20legs\x20(provider\x20pin\x20/\x20owner-cross\x20/\x20pair-once)\x20are\x20expressed\x20in\x20the\x20gate\x20guard\x20family','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'A\x20stage\x20that\x20reads\x20another\x20order\x20as\x20evidence\x20cannot\x20be\x20satisfied\x20by\x20a\x20lookalike,\x20a\x20stranger,\x20or\x20a\x20cycle'},{'dimension':'proof_integrity','effect':'boost','description':'Cross-order\x20evidence\x20rides\x20kernel-verified\x20legs,\x20not\x20prose\x20claims\x20of\x20\x27linked\x20order\x27'}],'industryFit':{'freelance':0x2d,'education':0x1e,'rental':0x32,'retail':0x46,'subscription':0x23,'travel':0x32,'licensing':0x1e,'crowdfunding':0x19,'general':0x32},'addressesPainPoints':['Two\x20orders\x20that\x20must\x20prove\x20each\x20other\x20with\x20no\x20structural\x20link\x20(a\x20delivery\x20order\x20and\x20the\x20goods\x20order\x20it\x20fulfills)','A\x20lookalike\x20provider\x20object\x20satisfying\x20a\x20supply-chain\x20guard','Self-referential\x20order\x20pairs\x20that\x20deadlock\x20both\x20orders\x27\x20stages'],'intentSignals':[/cross[ -]?order/i,/linked orders?/i,/pair(ed)? orders?/i,/two[ -]?order/i,/external order/i],'userProtections':['The\x20referenced\x20counter-order\x20is\x20pinned\x20and\x20owner-bound\x20—\x20no\x20lookalike,\x20no\x20stranger\x20fusion,\x20no\x20cycle','Cross-order\x20claims\x20are\x20kernel-verified,\x20not\x20asserted'],'merchantObligations':['Express\x20all\x20three\x20legs\x20(provider\x20pin\x20/\x20owner-cross\x20/\x20pair-once)\x20in\x20the\x20gate\x20family','Disclose\x20which\x20order\x20references\x20which\x20before\x20publish'],'requiresKeeper':![],'source':'composition'},{'id':'third_party_compensation','name':'Third-Party\x20Compensation','group':'fund_safety','description':'A\x20compensation\x20channel\x20for\x20parties\x20OUTSIDE\x20the\x20two-order\x20pair\x20—\x20the\x20fulfillment\x20provider\x27s\x20loss,\x20a\x20bystander\x27s\x20damage,\x20a\x20supplier\x27s\x20forfeiture.\x20Exactly\x20ONE\x20of\x20two\x20shapes,\x20chosen\x20at\x20build\x20and\x20never\x20both:\x20an\x20arb-triggered\x20Entity\x20leg\x20(a\x20ruling\x20moves\x20compensation\x20from\x20the\x20fund\x20to\x20the\x20third\x20party\x27s\x20Entity),\x20or\x20a\x20dedicated\x20Reward\x20pool\x20the\x20third\x20party\x20claims\x20against\x20evidence.\x20Absence\x20of\x20BOTH\x20shapes\x20is\x20a\x20blocker\x20—\x20a\x20promise\x20of\x20third-party\x20compensation\x20with\x20no\x20channel\x20is\x20unfunded\x20prose.','objectTypes':['arb','allocation','reward'],'intent':['pattern.deposit_arb_reimbursement','pattern.multi_party_recourse'],'binds':[{'surface':'arbitration'},{'surface':'allocation'}],'requires':['independent_arbitration'],'excludes':[],'provides':['has_arbitration','has_compensation_fund'],'params':[],'risks':['The\x20channel\x20needs\x20a\x20FUNDED\x20source\x20(compensation\x20fund\x20or\x20reward\x20pool)\x20—\x20an\x20unfunded\x20channel\x20pays\x20nothing;\x20arb-triggered\x20legs\x20wait\x20on\x20a\x20ruling,\x20so\x20speed\x20is\x20the\x20venue\x27s'],'disclosures':['Which\x20of\x20the\x20two\x20shapes\x20(arb-triggered\x20Entity\x20leg\x20vs\x20Reward\x20pool)\x20backs\x20the\x20promise,\x20and\x20who\x20funds\x20it'],'cost':{'gas_objects':0x3,'fund':'compensation_fund','bearer':'merchant'},'requiredConstraints':[{'constraint_id':'compensation_channel_present','description':'exactly\x20one\x20backing\x20shape\x20exists\x20—\x20an\x20arb-triggered\x20Entity\x20leg\x20OR\x20a\x20dedicated\x20Reward\x20pool\x20—\x20and\x20its\x20source\x20pool\x20is\x20funded\x20(missing\x20both\x20is\x20a\x20blocker)','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'Third-party\x20remedies\x20have\x20a\x20real,\x20funded,\x20rule-bound\x20channel\x20—\x20not\x20a\x20discretionary\x20promise'},{'dimension':'arbitration_fairness','effect':'boost','description':'An\x20arb-triggered\x20leg\x20pays\x20only\x20on\x20an\x20independent\x20ruling,\x20never\x20on\x20the\x20merchant\x27s\x20discretion'}],'industryFit':{'freelance':0x23,'education':0x19,'rental':0x3c,'retail':0x3c,'subscription':0x19,'travel':0x37,'licensing':0x1e,'crowdfunding':0x23,'general':0x2d},'addressesPainPoints':['A\x20rider\x27s\x20traffic\x20accident\x20with\x20no\x20structural\x20way\x20to\x20compensate\x20them\x20from\x20the\x20order\x27s\x20funds','A\x20bystander\x20damage\x20claim\x20with\x20no\x20channel\x20outside\x20the\x20buyer/merchant\x20pair','Third-party\x20compensation\x20promised\x20in\x20prose\x20with\x20no\x20funded\x20rail'],'intentSignals':[/third[ -]?party compensation/i,/(rider|courier|driver) (insurance|coverage|compensation)/i,/bystander/i,/damage.{0,20}(third|other)/i],'userProtections':['A\x20funded,\x20rule-bound\x20channel\x20exists\x20for\x20third-party\x20remedies\x20before\x20anything\x20goes\x20wrong','An\x20arb-triggered\x20leg\x20pays\x20only\x20on\x20an\x20independent\x20ruling'],'merchantObligations':['Choose\x20and\x20fund\x20exactly\x20one\x20backing\x20shape\x20(Entity\x20leg\x20or\x20Reward\x20pool)','Disclose\x20the\x20shape\x20and\x20its\x20funding\x20source\x20in\x20the\x20listing','Accept\x20arbitration\x20rulings\x20on\x20third-party\x20claims'],'requiresKeeper':!![],'keeperHint':'The\x20arb-ruling\x20trigger\x20and\x20(for\x20Reward\x20pools)\x20the\x20claim\x20window\x20both\x20need\x20keeper\x20coverage','source':'composition'},{'id':'privacy_minimal_disclosure','name':'Privacy-Minimal\x20Disclosure','group':'trust_evidence','description':'Buyer\x20contact/address\x20details\x20reach\x20ONLY\x20the\x20parties\x20who\x20must\x20act\x20on\x20them.\x20The\x20required_info\x20gate\x20collects\x20the\x20fulfillment\x20details\x20as\x20order\x20evidence\x20(presence-gated,\x20kernel\x20queries\x201572\x20before\x201573\x20—\x20the\x20reader\x20proves\x20entitlement\x20BEFORE\x20reading),\x20the\x20public\x20face\x20(listing/WIP/Service\x20name)\x20carries\x20none\x20of\x20it\x20(PRIV-PUBLICFACE-01\x20wiring),\x20and\x20the\x20channel\x20rule\x20is\x20declared\x20per\x20topology:\x20V1\x20self\x20—\x20details\x20ride\x20the\x20order\x20to\x20the\x20merchant\x27s\x20staff;\x20V2/V4\x20procured\x20—\x20the\x20merchant\x27s\x20provider\x20sees\x20them\x20through\x20the\x20MERCHANT\x27s\x20channels,\x20never\x20the\x20listing;\x20V3\x20user-procured\x20—\x20the\x20buyer\x20gives\x20them\x20to\x20the\x20provider\x20through\x20ITS\x20order\x20and\x20Messenger,\x20never\x20through\x20the\x20merchant\x27s\x20service.','objectTypes':['guard','repository'],'intent':['pattern.required_info_evidence_gate','pattern.permission_guard_entity_time_window'],'binds':[{'surface':'guard'}],'requires':[],'excludes':[],'provides':[],'params':[],'risks':['Contact/address\x20details\x20written\x20to\x20the\x20PUBLIC\x20face\x20(listing,\x20WIP,\x20Service\x20name)\x20are\x20permanently\x20on-chain\x20—\x20nothing\x20rewrites\x20history','A\x20required_info\x20gate\x20that\x20reads\x20(1573)\x20without\x20the\x20presence\x20order\x20(1572\x20first)\x20leaks\x20to\x20unproven\x20readers'],'disclosures':['The\x20channel\x20rule:\x20which\x20party\x20sees\x20the\x20details,\x20through\x20which\x20object,\x20and\x20that\x20the\x20public\x20face\x20carries\x20none\x20of\x20them'],'cost':{'gas_objects':0x2,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'privacy_channel_declared','description':'the\x20required_info\x20gate\x20presence-orders\x20its\x20reads\x20(1572\x20before\x201573)\x20and\x20the\x20listing/WIP\x20public\x20face\x20carries\x20no\x20contact/address\x20data\x20(PRIV-PUBLICFACE-01)','level':'hard','blocking':!![]},{'constraint_id':'privacy_channel_per_topology','description':'the\x20declared\x20fulfillment\x20topology\x20names\x20its\x20channel\x20rule\x20(V1\x20staff\x20/\x20V2-V4\x20merchant\x20channels\x20/\x20V3\x20provider\x20order\x20+\x20Messenger)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'proof_integrity','effect':'required','description':'Fulfillment\x20details\x20are\x20order\x20evidence\x20with\x20entitlement-ordered\x20reads,\x20not\x20public\x20strings'},{'dimension':'consumer_diligence','effect':'boost','description':'The\x20buyer\x20can\x20verify\x20BEFORE\x20ordering\x20who\x20will\x20see\x20their\x20address\x20and\x20through\x20what\x20channel'}],'industryFit':{'freelance':0x28,'education':0x23,'rental':0x3c,'retail':0x50,'subscription':0x28,'travel':0x41,'licensing':0x1e,'crowdfunding':0x23,'general':0x37},'addressesPainPoints':['Delivery\x20addresses\x20pasted\x20into\x20listings\x20or\x20WIP\x20prose\x20—\x20permanent\x20public\x20leaks','Fulfillment\x20details\x20readable\x20by\x20anyone\x20instead\x20of\x20entitlement-proven\x20readers','V3\x20buyers\x20unsure\x20whether\x20the\x20merchant\x20or\x20the\x20provider\x20sees\x20their\x20address'],'intentSignals':[/privacy/i,/personal (info|data|details)/i,/(shipping|delivery|contact) address/i,/keep.{0,20}(private|confidential)/i,/do not (publish|share)/i],'userProtections':['Contact/address\x20data\x20never\x20reaches\x20the\x20public\x20face','Only\x20entitlement-proven\x20readers\x20(1572\x20before\x201573)\x20can\x20read\x20the\x20details','The\x20channel\x20rule\x20is\x20declared\x20and\x20verifiable\x20before\x20ordering'],'merchantObligations':['Wire\x20the\x20required_info\x20gate\x20presence-first\x20(1572\x20before\x201573)','Keep\x20the\x20public\x20face\x20clean\x20of\x20contact/address\x20data','Declare\x20the\x20per-topology\x20channel\x20rule\x20in\x20the\x20listing'],'requiresKeeper':![],'source':'composition'},{'id':'dynamic_pricing_formula','name':'Dynamic\x20Pricing\x20Formula','group':'fund_safety','description':'Price\x20computed\x20per\x20fulfillment\x20from\x20a\x20Formula\x20leg\x20(COUNT\x20/\x20SUM\x20/\x20SUM_BOUND)\x20reading\x20on-chain\x20rows\x20—\x20per-kilometer,\x20per-unit,\x20per-batch\x20pricing\x20instead\x20of\x20one\x20flat\x20price.\x20The\x20formula\x20reads\x20ONLY\x20chain-verifiable\x20inputs\x20(repository\x20rows,\x20order\x20counts);\x20any\x20off-chain\x20input\x20(distance\x20maps,\x20weather,\x20traffic)\x20is\x20NOT\x20chain-computable\x20and\x20must\x20stay\x20disclosed\x20as\x20an\x20off-chain\x20adjustment.\x20The\x20formula\x20expression\x20and\x20its\x20bounds\x20are\x20fixed\x20at\x20build\x20—\x20a\x20later\x20\x27re-pricing\x27\x20is\x20a\x20new\x20build,\x20never\x20a\x20mutation.','objectTypes':['allocation','repository'],'intent':[],'binds':[{'surface':'allocation'}],'requires':[],'excludes':[],'provides':['has_dynamic_pricing'],'params':[],'risks':['Distance/weather/traffic\x20inputs\x20are\x20NOT\x20chain-verifiable\x20—\x20a\x20formula\x20that\x20implies\x20them\x20is\x20lying\x20about\x20its\x20own\x20determinism','An\x20unbounded\x20formula\x20(no\x20SUM_BOUND)\x20can\x20price\x20an\x20order\x20arbitrarily\x20high'],'disclosures':['The\x20formula\x20expression\x20and\x20bounds\x20are\x20fixed\x20at\x20build;\x20off-chain\x20adjustments\x20(if\x20any)\x20are\x20disclosed\x20as\x20such'],'cost':{'gas_objects':0x3,'bearer':'merchant'},'requiredConstraints':[{'constraint_id':'formula_leg_declared','description':'the\x20Formula\x20leg\x20(COUNT/SUM/SUM_BOUND)\x20is\x20declared\x20with\x20its\x20row\x20source\x20and\x20bounds;\x20inputs\x20are\x20chain-verifiable\x20only','level':'hard','blocking':!![]},{'constraint_id':'formula_offchain_disclosed','description':'any\x20off-chain\x20pricing\x20input\x20is\x20disclosed\x20as\x20an\x20off-chain\x20adjustment,\x20never\x20embedded\x20in\x20the\x20formula','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fee_transparency','effect':'required','description':'The\x20per-order\x20price\x20is\x20computed\x20by\x20the\x20chain\x20from\x20declared\x20rows\x20—\x20the\x20buyer\x20can\x20recompute\x20it,\x20not\x20trust\x20it'},{'dimension':'operational_risk','effect':'boost','description':'Bounds\x20keep\x20the\x20formula\x20from\x20pricing\x20arbitrarily;\x20a\x20bounded\x20formula\x20is\x20auditable\x20at\x20build'}],'industryFit':{'freelance':0x28,'education':0x1e,'rental':0x37,'retail':0x46,'subscription':0x1e,'travel':0x3c,'licensing':0x19,'crowdfunding':0x14,'general':0x2d},'addressesPainPoints':['Flat\x20delivery\x20prices\x20that\x20ignore\x20distance/quantity\x20—\x20merchant\x20eats\x20the\x20variance\x20or\x20overcharges\x20everyone','Opaque\x20per-order\x20surcharges\x20computed\x20off-chain\x20with\x20no\x20recomputable\x20rule','Dynamic\x20pricing\x20implied\x20to\x20be\x20chain-computed\x20when\x20the\x20inputs\x20are\x20not\x20on-chain'],'intentSignals':[/dynamic pricing/i,/per[ -]?(km|kilometer|mile|unit|item|batch)/i,/distance[- ]based/i,/usage[- ]based/i,/formula/i],'userProtections':['The\x20price\x20is\x20recomputable\x20from\x20on-chain\x20rows\x20—\x20no\x20black-box\x20surcharge','Bounds\x20cap\x20the\x20formula;\x20the\x20expression\x20is\x20fixed\x20at\x20build','Off-chain\x20inputs,\x20if\x20any,\x20are\x20labeled\x20as\x20such'],'merchantObligations':['Declare\x20the\x20formula\x20expression,\x20row\x20source,\x20and\x20bounds\x20at\x20build','Keep\x20off-chain\x20pricing\x20inputs\x20out\x20of\x20the\x20formula\x20and\x20disclosed','Never\x20mutate\x20the\x20formula\x20post-publish\x20(a\x20new\x20build\x20replaces\x20it)'],'requiresKeeper':![],'source':'composition'}];export const ALL_CAPABILITIES=[...CAPABILITIES,...COMPOSITION_CAPABILITIES];export function getCapability(a){return ALL_CAPABILITIES['find'](b=>b['id']===a);}export function recommendCapabilities(a,b,c){const d=c?.['minFit']??0x32,e=c?.['maxCapabilities']??0x5,f=CAPABILITIES['map'](g=>{let h=g['industryFit'][a]??0x32;const i=b['toLowerCase']();for(const j of g['addressesPainPoints']){const k=j['toLowerCase']()['split'](/\s+/),l=k['filter'](n=>i['includes'](n))['length'];h+=l*0x5;}return{'capability':g,'score':Math['min'](h,0x64)};});return f['filter'](g=>g['score']>=d)['sort']((g,h)=>h['score']-g['score'])['slice'](0x0,e)['map'](g=>g['capability']);}const STRUCTURED_EVIDENCE_CHECKS={'milestone_escrow':a=>a['paymentModel']==='milestone'||a['paymentModel']==='escrow'?'payment.model='+a['paymentModel']:undefined,'subscription_with_proof':a=>a['paymentModel']==='subscription'?'payment.model=subscription':undefined,'refund_guarantee':a=>a['trustRefundPolicy']?'trust.refundPolicy='+a['trustRefundPolicy']:undefined,'independent_arbitration':a=>a['trustArbitration']&&a['trustArbitration']!=='none'?'trust.arbitration='+a['trustArbitration']:undefined,'wip_provenance':a=>a['proofsOfDelivery']?.['some'](b=>b==='wip_hash'||b==='third_party_attestation')?'deliverables.proofOfDelivery':undefined,'multi_tier_allocation':a=>(a['allocationCount']??0x0)>0x1?'payment.allocation='+a['allocationCount']+'\x20tiers':undefined},CJK_RE=/[\u3040-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff\uac00-\ud7af]/;export function capabilityIntentEvidence(a,b,c){const d=a['intentSignals']??[],e=[];for(const g of d){if(g['test'](b))e['push'](g['source']);}const f=STRUCTURED_EVIDENCE_CHECKS[a['id']]?.(c??{});if(f)e['push']('structured:\x20'+f);return{'matched':e['length']>0x0,'tested':d['length'],'hits':e,...e['length']===0x0&&d['length']>0x0&&CJK_RE['test'](b)?{'cjkIntent':!![]}:{}};}export function capabilityHasIntentEvidence(a,b){return capabilityIntentEvidence(a,b)['matched'];}export function checkCapabilityConstraints(a,b,c){const d=a['requiredConstraints']['filter'](i=>i['blocking']&&!b['has'](i['constraint_id']))['map'](i=>i['constraint_id']),e=c?.['evidenceMatched']===![],f=d['length']===0x0&&!e,g=[];let h;d['length']>0x0&&(h='Missing\x20required\x20constraints:\x20'+d['join'](',\x20'),g['push']({'rule':'MODULE-CONSTRAINTS-MISSING','severity':'high','detail':h}));if(e){const i=c?.['evidence'],j=i===undefined?'evidence\x20scan\x20not\x20run':i['tested']===0x0?'the\x20module\x20declares\x20NO\x20intent\x20signals,\x20so\x20the\x20intent\x20text\x20cannot\x20evidence\x20it\x20automatically\x20—\x20confirm\x20deliberately':i['cjkIntent']?'evidence\x20scan:\x20'+i['tested']+'\x20intent\x20signal(s)\x20tested,\x200\x20matched\x20—\x20BUT\x20the\x20intent\x20text\x20is\x20non-English\x20and\x20the\x20signal\x20table\x20is\x20English-patterned,\x20so\x20this\x20is\x20NOT\x20evidence\x20of\x20absence:\x20answer\x20the\x20structured\x20payment/trust\x20questions\x20or\x20pass\x20guide_state.adopted_module_ids':'evidence\x20scan:\x20'+i['tested']+'\x20intent\x20signal(s)\x20tested\x20against\x20the\x20intent\x20text,\x200\x20matched',k='UNEVIDENCED\x20(auto-kept):\x20auto-recommended\x20by\x20score\x20—\x20the\x20module\x27s\x20objects\x20ARE\x20in\x20this\x20build,\x20but\x20the\x20merchant\x27s\x20words\x20never\x20evidenced\x20it.\x20'+j+'.\x20'+'Confirm\x20it\x20via\x20guide_state.adopted_module_ids,\x20answer\x20the\x20structured\x20payment/trust\x20questions,\x20or\x20rebuild\x20with\x20an\x20adoption\x20list\x20that\x20omits\x20it.'+(h?'\x20Also:\x20'+h['toLowerCase']():'');h=k,g['push']({'rule':'MODULE-EVIDENCE-MISSING','severity':'medium','detail':k});}return{'capability':a['id'],'adopted':f,'reason':h,'missingConstraints':d['length']>0x0?d:undefined,'findings':g,'evidence_matched':c?.['evidenceMatched']};}
@@ -1 +1 @@
1
- import{afterEach,beforeEach,describe,expect,it}from'vitest';import{existsSync,mkdirSync,mkdtempSync,readFileSync,rmSync,writeFileSync}from'node:fs';import{tmpdir}from'node:os';import{join}from'node:path';import{buildPristineMergedPack,getRegisteredPack,industryReadmeContent,packKind,registerIndustryPack,scaffoldIndustryPack,scanPacks}from'./industry-pack.js';import{evaluateIndustryCondition,mergedBaselinesOverlay,resolveComplianceRules,resolveDisputeRules,resolveIndustryBaselines,resolveIndustryPlaybook,resolveIndustryRules,resolveSupplyRules}from'./industry-layers.js';import{applyHardConstraints,resolveCategoryMatchRules}from'../evaluation/category-match-rules.js';import{setJudgmentIndustryOverlay,getJudgmentDoc,clearJudgmentLayers}from'../config/judgment.js';import{PERSONA_ROLES}from'../persona/types.js';let root;beforeEach(()=>{root=mkdtempSync(join(tmpdir(),'wowok-industry-audit-'));}),afterEach(()=>{if(existsSync(root))rmSync(root,{'recursive':!![],'force':!![]});clearJudgmentLayers();});function manifest(a,b){return{'pack':'industry-pack','name':a,'display_name':a,'version':'1.0.0','layers':b};}describe('industry\x20audit\x20—\x20scaffold\x20shape',()=>{it('14.\x20scaffold\x20writes\x20pack.json\x20(all\x20sections;\x20baselines/mode\x20null)\x20+\x20template\x20playbook.md',()=>{const a=scaffoldIndustryPack('audit_scaffold',root);expect(a['ok'])['toBe'](!![]),expect(a['files'])['toEqual'](['pack.json','playbook.md']);const b=JSON['parse'](readFileSync(join(a['dir'],'pack.json'),'utf-8'));expect(b['manifest']['pack'])['toBe']('industry-pack'),expect(b['manifest']['layers'])['toContain']('playbook');for(const d of['match','personae','dispute','compliance','supply','rules']){expect(b[d])['not']['toBeNull']();}expect(b['match']?.['category'])['toBe']('audit_scaffold'),expect(b['baselines'])['toBeNull'](),expect(b['mode'])['toBeNull'](),expect(b['compliance']?.['refund_window'])['toEqual']({'not_applicable':!![]}),expect(b['personae'])['toHaveLength'](PERSONA_ROLES['length']);const c=readFileSync(join(a['dir'],'playbook.md'),'utf-8');expect(c)['toContain']('Industry\x20Playbook'),expect(c)['toContain']('(Example)');}),it('14b.\x20industry\x20README\x20documents\x20the\x20baselines\x20layer\x20and\x20legal\x20layer\x20names',()=>{const a=industryReadmeContent();expect(a)['toContain']('##\x20baselines\x20—\x20judgment\x20baselines\x20overlay'),expect(a)['toContain']('factory\x20<\x20pack\x20baselines\x20<\x20persona\x20fragment\x20<\x20user\x20document\x20<\x20session\x20overrides'),expect(a)['toContain']('\x22severity_deduction\x22:\x20{\x20\x22critical\x22:\x2040\x20}'),expect(a)['toContain']('\x22rule_id\x22:\x20\x22R-UTIL-03\x22,\x20\x22enabled\x22:\x20false'),expect(a)['toContain']('Legal'),expect(a)['toContain']('`baselines`,\x20`playbook`');});}),describe('industry\x20audit\x20—\x20meaningful-content\x20gates',()=>{it('15.\x20a\x20pristine\x20(placeholder-only)\x20pack\x20registers\x20NOTHING:\x20every\x20resolve*\x20stays\x20undefined',()=>{const a=buildPristineMergedPack('audit_pristine');a['manifest']['layers']=['match','personae','dispute','compliance','supply','rules'];const b=registerIndustryPack(a);expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual']([]),expect(resolveCategoryMatchRules('audit_pristine'))['toBeUndefined'](),expect(resolveDisputeRules('audit_pristine'))['toBeUndefined'](),expect(resolveComplianceRules('audit_pristine'))['toBeUndefined'](),expect(resolveSupplyRules('audit_pristine'))['toBeUndefined'](),expect(resolveIndustryRules('audit_pristine'))['toBeUndefined'](),expect(resolveIndustryBaselines('audit_pristine'))['toBeUndefined']();const c=buildPristineMergedPack('audit_pristine2');c['manifest']['layers']=['compliance'],c['compliance']={'category':'audit_pristine2','refund_window':{'days':0xe}},expect(registerIndustryPack(c)['registered'])['toEqual'](['compliance']),expect(resolveComplianceRules('audit_pristine2')?.['refund_window']?.['days'])['toBe'](0xe);}),it('15b.\x20the\x20registry\x20record\x20lists\x20REGISTERED\x20layers,\x20not\x20declared\x20ones\x20(no\x20empty-shell\x20\x27full\x27)',()=>{const a=buildPristineMergedPack('audit_shell');a['manifest']['layers']=['match','personae','dispute','compliance','supply','rules'],expect(registerIndustryPack(a)['ok'])['toBe'](!![]);const b=getRegisteredPack('audit_shell');expect(b?.['layers'])['toEqual']([]),expect(packKind(b?.['layers']??[]))['toBe']('stub');const c=buildPristineMergedPack('audit_mixed');c['manifest']['layers']=['dispute','compliance','supply','rules'],c['compliance']={'category':'audit_mixed','refund_window':{'days':0x7}};const d=registerIndustryPack(c);expect(d['ok'])['toBe'](!![]),expect(d['registered'])['toEqual'](['compliance']);const e=getRegisteredPack('audit_mixed');expect(e?.['layers'])['toEqual'](['compliance']),expect(packKind(e?.['layers']??[]))['toBe']('partial');}),it('15c.\x20packKind\x20is\x20three-valued:\x20\x27full\x27\x20only\x20when\x20EVERY\x20business\x20layer\x20is\x20registered\x20(G-05)',()=>{expect(packKind([]))['toBe']('stub'),expect(packKind(['mode','match']))['toBe']('stub'),expect(packKind(['dispute']))['toBe']('partial'),expect(packKind(['mode','match','rules','playbook']))['toBe']('partial'),expect(packKind(['template','dispute','supply']))['toBe']('partial'),expect(packKind(['dispute','compliance','supply','rules','playbook']))['toBe']('full'),expect(packKind(['mode','match','dispute','compliance','supply','rules','playbook']))['toBe']('full');});}),describe('industry\x20audit\x20—\x20data\x20layers\x20(dispute/compliance/supply/rules)',()=>{it('16.\x20meaningful\x20dispute/compliance/supply/rules\x20register\x20and\x20resolve;\x20structured\x20conditions\x20evaluate',()=>{const a='audit_data',b=registerIndustryPack({'manifest':manifest(a,['dispute','compliance','supply','rules']),'dispute':{'category':a,'sla_tiers':[{'level':'L1','timeout':'72h','description':'standard\x20tier'}],'fault_rules':['late\x20delivery\x20without\x20evidence\x20->\x20merchant']},'compliance':{'category':a,'refund_window':{'days':0xe},'qualification':['Trade\x20License']},'supply':{'category':a,'supplier_qualification':['ISO-9001'],'first_order_policy':'sample-only','redundancy_required':!![]},'rules':{'category':a,'rules':[{'rule_id':'audit_r1','dimension':'risk','description':'must\x20have\x20arbitration','severity':'hard','red_flag':!![],'condition':{'field':'has_arbitration','op':'eq','value':!![]}},{'rule_id':'audit_r2','description':'counterfeit\x20suspicion','condition_hint':'buyer\x20reports\x20counterfeit'}]}});expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual'](['dispute','compliance','supply','rules']),expect(resolveDisputeRules(a)?.['sla_tiers']?.[0x0]?.['level'])['toBe']('L1'),expect(resolveComplianceRules(a)?.['refund_window']?.['days'])['toBe'](0xe),expect(resolveSupplyRules(a)?.['first_order_policy'])['toBe']('sample-only');const c=resolveIndustryRules(a)?.['rules']??[];expect(c)['toHaveLength'](0x2),expect(c[0x1]?.['condition'])['toBeUndefined'](),expect(evaluateIndustryCondition(c[0x0]['condition'],{'facts':{'has_arbitration':!![]},'entities':{}}))['toBe'](!![]),expect(evaluateIndustryCondition(c[0x0]['condition'],{'facts':{'has_arbitration':![]},'entities':{}}))['toBe'](![]);}),it('17.\x20a\x20meaningful\x20match\x20layer\x20is\x20queryable:\x20constraints\x20apply,\x20modes/weights\x20visible',()=>{const a='audit_match',b=registerIndustryPack({'manifest':manifest(a,['match']),'match':{'category':a,'hard_constraints':[{'field':'bPublished','kind':'truthy','description':'service\x20must\x20be\x20published'}],'soft_weights':{'trust':0x28,'price':0xa},'highlight_fields':['wip_hash'],'calendar_mode':'slot','geo_mode':'near','pricing_rules':['time_slot']}});expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual'](['match']);const c=resolveCategoryMatchRules(a);expect(c?.['geo_mode'])['toBe']('near'),expect(c?.['calendar_mode'])['toBe']('slot'),expect(c?.['soft_weights'])['toEqual']({'trust':0x28,'price':0xa});const d=applyHardConstraints(c,[{'bPublished':![]},{'bPublished':!![]}]);expect(d['passed'])['toHaveLength'](0x1),expect(d['dropped'][0x0]?.['candidate'])['toEqual']({'bPublished':![]});}),it('18a.\x20a\x20legal\x20baselines\x20fragment\x20registers\x20and\x20drives\x20mergedBaselinesOverlay\x20into\x20the\x20judgment\x20chain',()=>{const a='audit_base_ok',b={'monitor':{'thresholds':{'messenger_timeout_hours':0x3}}},c=registerIndustryPack({'manifest':manifest(a,['baselines']),'baselines':b});expect(c['ok'])['toBe'](!![]),expect(c['registered'])['toEqual'](['baselines']),expect(resolveIndustryBaselines(a)?.['fragment'])['toEqual'](b);const d=mergedBaselinesOverlay([a]);expect(d)['toEqual'](b),expect(setJudgmentIndustryOverlay(d)['ok'])['toBe'](!![]),expect(getJudgmentDoc()['monitor']['thresholds']['messenger_timeout_hours'])['toBe'](0x3);}),it('18b.\x20a\x20misspelled-dimension\x20baselines\x20fragment\x20is\x20rejected\x20with\x20a\x20visible\x20error\x20(register\x20+\x20scan)',()=>{const a={'evaluation':{'weights':{'trust_revews':0x32}}},b=registerIndustryPack({'manifest':manifest('audit_base_bad',['baselines']),'baselines':a});expect(b['ok'])['toBe'](![]),expect(b['errors']['join']('\x20'))['toContain']('unknown\x20dimension\x20\x27trust_revews\x27'),expect(resolveIndustryBaselines('audit_base_bad'))['toBeUndefined']();const c=join(root,'audit_base_scan');mkdirSync(c,{'recursive':!![]}),writeFileSync(join(c,'pack.json'),JSON['stringify']({'manifest':manifest('audit_base_scan',['baselines']),'baselines':a}),'utf-8');const [d]=scanPacks(root);expect(d['ok'])['toBe'](![]),expect(d['errors']['join']('\x20'))['toContain']('trust_revews');});}),describe('industry\x20audit\x20—\x20playbook\x20layer',()=>{it('19a.\x20real\x20playbook\x20content\x20registers\x20and\x20resolves',()=>{const a='audit_play',b=join(root,a);mkdirSync(b,{'recursive':!![]}),writeFileSync(join(b,'pack.json'),JSON['stringify']({'manifest':manifest(a,['playbook'])}),'utf-8'),writeFileSync(join(b,'playbook.md'),'#\x20audit_play\x20playbook\x0a\x0aAUDIT-REAL:\x20always\x20answer\x20complaint\x20threads\x20within\x204\x20hours.\x0a','utf-8');const [c]=scanPacks(root);expect(c['ok'])['toBe'](!![]),expect(c['registered'])['toContain']('playbook'),expect(resolveIndustryPlaybook(a)?.['content'])['toContain']('AUDIT-REAL');}),it('19b.\x20the\x20scaffolded\x20TEMPLATE\x20playbook\x20is\x20SKIPPED\x20(placeholder\x20bullets\x20carry\x20no\x20registerable\x20content)',()=>{scaffoldIndustryPack('audit_play_tmpl',root);const [a]=scanPacks(root);expect(a['ok'])['toBe'](!![]),expect(a['registered'])['toEqual']([]),expect(resolveIndustryPlaybook('audit_play_tmpl'))['toBeUndefined']();}),it('19c.\x20template\x20+\x20ONE\x20real\x20user\x20line\x20IS\x20meaningful\x20(no\x20false\x20negative\x20on\x20real\x20content)',()=>{scaffoldIndustryPack('audit_play_mix',root);const a=join(root,'audit_play_mix','playbook.md');writeFileSync(a,readFileSync(a,'utf-8')+'\x0a-\x20AUDIT-REAL:\x20answer\x20complaint\x20threads\x20within\x204\x20hours.\x0a','utf-8');const [b]=scanPacks(root);expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toContain']('playbook'),expect(resolveIndustryPlaybook('audit_play_mix')?.['content'])['toContain']('AUDIT-REAL');});}),describe('industry\x20audit\x20—\x20manifest.layers\x20enable\x20flags',()=>{it('20.\x20a\x20layer\x20removed\x20from\x20manifest.layers\x20is\x20ignored\x20even\x20when\x20its\x20section\x20carries\x20real\x20content',()=>{const a='audit_off',b=registerIndustryPack({'manifest':manifest(a,['compliance']),'dispute':{'category':a,'sla_tiers':[{'level':'L1','timeout':'1h'}]},'compliance':{'category':a,'refund_window':{'days':0x7}}});expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual'](['compliance']),expect(resolveComplianceRules(a)?.['refund_window']?.['days'])['toBe'](0x7),expect(resolveDisputeRules(a))['toBeUndefined']();});});
1
+ import{afterEach,beforeEach,describe,expect,it}from'vitest';import{existsSync,mkdirSync,mkdtempSync,readFileSync,rmSync,writeFileSync}from'node:fs';import{tmpdir}from'node:os';import{join}from'node:path';import{buildPristineMergedPack,getRegisteredPack,industryReadmeContent,packKind,registerIndustryPack,scaffoldIndustryPack,scanPacks}from'./industry-pack.js';import{evaluateIndustryCondition,mergedBaselinesOverlay,resolveComplianceRules,resolveDisputeRules,resolveIndustryBaselines,resolveIndustryPlaybook,resolveIndustryRules,resolveSupplyRules}from'./industry-layers.js';import{applyHardConstraints,resolveCategoryMatchRules}from'../evaluation/category-match-rules.js';import{setJudgmentIndustryOverlay,getJudgmentDoc,clearJudgmentLayers}from'../config/judgment.js';import{PERSONA_ROLES}from'../persona/types.js';let root;beforeEach(()=>{root=mkdtempSync(join(tmpdir(),'wowok-industry-audit-'));}),afterEach(()=>{if(existsSync(root))rmSync(root,{'recursive':!![],'force':!![]});clearJudgmentLayers();});function manifest(a,b){return{'pack':'industry-pack','name':a,'display_name':a,'version':'1.0.0','layers':b};}describe('industry\x20audit\x20—\x20scaffold\x20shape',()=>{it('14.\x20scaffold\x20writes\x20pack.json\x20(all\x20sections;\x20baselines/mode\x20null)\x20+\x20template\x20playbook.md',()=>{const a=scaffoldIndustryPack('audit_scaffold',root);expect(a['ok'])['toBe'](!![]),expect(a['files'])['toEqual'](['pack.json','playbook.md']);const b=JSON['parse'](readFileSync(join(a['dir'],'pack.json'),'utf-8'));expect(b['manifest']['pack'])['toBe']('industry-pack'),expect(b['manifest']['layers'])['toContain']('playbook');for(const d of['match','personae','dispute','compliance','supply','rules']){expect(b[d])['not']['toBeNull']();}expect(b['match']?.['category'])['toBe']('audit_scaffold'),expect(b['baselines'])['toBeNull'](),expect(b['mode'])['toBeNull'](),expect(b['compliance']?.['refund_window'])['toEqual']({'not_applicable':!![]}),expect(b['personae'])['toHaveLength'](PERSONA_ROLES['length']);const c=readFileSync(join(a['dir'],'playbook.md'),'utf-8');expect(c)['toContain']('Industry\x20Playbook'),expect(c)['toContain']('(Example)');}),it('14b.\x20industry\x20README\x20documents\x20the\x20baselines\x20layer\x20and\x20legal\x20layer\x20names',()=>{const a=industryReadmeContent();expect(a)['toContain']('##\x20baselines\x20—\x20judgment\x20baselines\x20overlay'),expect(a)['toContain']('factory\x20<\x20pack\x20baselines\x20<\x20user\x20document\x20<\x20persona\x20fragment\x20<\x20session\x20overrides'),expect(a)['toContain']('\x22severity_deduction\x22:\x20{\x20\x22critical\x22:\x2040\x20}'),expect(a)['toContain']('\x22rule_id\x22:\x20\x22R-UTIL-03\x22,\x20\x22enabled\x22:\x20false'),expect(a)['toContain']('Legal'),expect(a)['toContain']('`baselines`,\x20`playbook`');});}),describe('industry\x20audit\x20—\x20meaningful-content\x20gates',()=>{it('15.\x20a\x20pristine\x20(placeholder-only)\x20pack\x20registers\x20NOTHING:\x20every\x20resolve*\x20stays\x20undefined',()=>{const a=buildPristineMergedPack('audit_pristine');a['manifest']['layers']=['match','personae','dispute','compliance','supply','rules'];const b=registerIndustryPack(a);expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual']([]),expect(resolveCategoryMatchRules('audit_pristine'))['toBeUndefined'](),expect(resolveDisputeRules('audit_pristine'))['toBeUndefined'](),expect(resolveComplianceRules('audit_pristine'))['toBeUndefined'](),expect(resolveSupplyRules('audit_pristine'))['toBeUndefined'](),expect(resolveIndustryRules('audit_pristine'))['toBeUndefined'](),expect(resolveIndustryBaselines('audit_pristine'))['toBeUndefined']();const c=buildPristineMergedPack('audit_pristine2');c['manifest']['layers']=['compliance'],c['compliance']={'category':'audit_pristine2','refund_window':{'days':0xe}},expect(registerIndustryPack(c)['registered'])['toEqual'](['compliance']),expect(resolveComplianceRules('audit_pristine2')?.['refund_window']?.['days'])['toBe'](0xe);}),it('15b.\x20the\x20registry\x20record\x20lists\x20REGISTERED\x20layers,\x20not\x20declared\x20ones\x20(no\x20empty-shell\x20\x27full\x27)',()=>{const a=buildPristineMergedPack('audit_shell');a['manifest']['layers']=['match','personae','dispute','compliance','supply','rules'],expect(registerIndustryPack(a)['ok'])['toBe'](!![]);const b=getRegisteredPack('audit_shell');expect(b?.['layers'])['toEqual']([]),expect(packKind(b?.['layers']??[]))['toBe']('stub');const c=buildPristineMergedPack('audit_mixed');c['manifest']['layers']=['dispute','compliance','supply','rules'],c['compliance']={'category':'audit_mixed','refund_window':{'days':0x7}};const d=registerIndustryPack(c);expect(d['ok'])['toBe'](!![]),expect(d['registered'])['toEqual'](['compliance']);const e=getRegisteredPack('audit_mixed');expect(e?.['layers'])['toEqual'](['compliance']),expect(packKind(e?.['layers']??[]))['toBe']('partial');}),it('15c.\x20packKind\x20is\x20three-valued:\x20\x27full\x27\x20only\x20when\x20EVERY\x20business\x20layer\x20is\x20registered\x20(G-05)',()=>{expect(packKind([]))['toBe']('stub'),expect(packKind(['mode','match']))['toBe']('stub'),expect(packKind(['dispute']))['toBe']('partial'),expect(packKind(['mode','match','rules','playbook']))['toBe']('partial'),expect(packKind(['template','dispute','supply']))['toBe']('partial'),expect(packKind(['dispute','compliance','supply','rules','playbook']))['toBe']('full'),expect(packKind(['mode','match','dispute','compliance','supply','rules','playbook']))['toBe']('full');});}),describe('industry\x20audit\x20—\x20data\x20layers\x20(dispute/compliance/supply/rules)',()=>{it('16.\x20meaningful\x20dispute/compliance/supply/rules\x20register\x20and\x20resolve;\x20structured\x20conditions\x20evaluate',()=>{const a='audit_data',b=registerIndustryPack({'manifest':manifest(a,['dispute','compliance','supply','rules']),'dispute':{'category':a,'sla_tiers':[{'level':'L1','timeout':'72h','description':'standard\x20tier'}],'fault_rules':['late\x20delivery\x20without\x20evidence\x20->\x20merchant']},'compliance':{'category':a,'refund_window':{'days':0xe},'qualification':['Trade\x20License']},'supply':{'category':a,'supplier_qualification':['ISO-9001'],'first_order_policy':'sample-only','redundancy_required':!![]},'rules':{'category':a,'rules':[{'rule_id':'audit_r1','dimension':'risk','description':'must\x20have\x20arbitration','severity':'hard','red_flag':!![],'condition':{'field':'has_arbitration','op':'eq','value':!![]}},{'rule_id':'audit_r2','description':'counterfeit\x20suspicion','condition_hint':'buyer\x20reports\x20counterfeit'}]}});expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual'](['dispute','compliance','supply','rules']),expect(resolveDisputeRules(a)?.['sla_tiers']?.[0x0]?.['level'])['toBe']('L1'),expect(resolveComplianceRules(a)?.['refund_window']?.['days'])['toBe'](0xe),expect(resolveSupplyRules(a)?.['first_order_policy'])['toBe']('sample-only');const c=resolveIndustryRules(a)?.['rules']??[];expect(c)['toHaveLength'](0x2),expect(c[0x1]?.['condition'])['toBeUndefined'](),expect(evaluateIndustryCondition(c[0x0]['condition'],{'facts':{'has_arbitration':!![]},'entities':{}}))['toBe'](!![]),expect(evaluateIndustryCondition(c[0x0]['condition'],{'facts':{'has_arbitration':![]},'entities':{}}))['toBe'](![]);}),it('17.\x20a\x20meaningful\x20match\x20layer\x20is\x20queryable:\x20constraints\x20apply,\x20modes/weights\x20visible',()=>{const a='audit_match',b=registerIndustryPack({'manifest':manifest(a,['match']),'match':{'category':a,'hard_constraints':[{'field':'bPublished','kind':'truthy','description':'service\x20must\x20be\x20published'}],'soft_weights':{'trust':0x28,'price':0xa},'highlight_fields':['wip_hash'],'calendar_mode':'slot','geo_mode':'near','pricing_rules':['time_slot']}});expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual'](['match']);const c=resolveCategoryMatchRules(a);expect(c?.['geo_mode'])['toBe']('near'),expect(c?.['calendar_mode'])['toBe']('slot'),expect(c?.['soft_weights'])['toEqual']({'trust':0x28,'price':0xa});const d=applyHardConstraints(c,[{'bPublished':![]},{'bPublished':!![]}]);expect(d['passed'])['toHaveLength'](0x1),expect(d['dropped'][0x0]?.['candidate'])['toEqual']({'bPublished':![]});}),it('18a.\x20a\x20legal\x20baselines\x20fragment\x20registers\x20and\x20drives\x20mergedBaselinesOverlay\x20into\x20the\x20judgment\x20chain',()=>{const a='audit_base_ok',b={'monitor':{'thresholds':{'messenger_timeout_hours':0x3}}},c=registerIndustryPack({'manifest':manifest(a,['baselines']),'baselines':b});expect(c['ok'])['toBe'](!![]),expect(c['registered'])['toEqual'](['baselines']),expect(resolveIndustryBaselines(a)?.['fragment'])['toEqual'](b);const d=mergedBaselinesOverlay([a]);expect(d)['toEqual'](b),expect(setJudgmentIndustryOverlay(d)['ok'])['toBe'](!![]),expect(getJudgmentDoc()['monitor']['thresholds']['messenger_timeout_hours'])['toBe'](0x3);}),it('18b.\x20a\x20misspelled-dimension\x20baselines\x20fragment\x20is\x20rejected\x20with\x20a\x20visible\x20error\x20(register\x20+\x20scan)',()=>{const a={'evaluation':{'weights':{'trust_revews':0x32}}},b=registerIndustryPack({'manifest':manifest('audit_base_bad',['baselines']),'baselines':a});expect(b['ok'])['toBe'](![]),expect(b['errors']['join']('\x20'))['toContain']('unknown\x20dimension\x20\x27trust_revews\x27'),expect(resolveIndustryBaselines('audit_base_bad'))['toBeUndefined']();const c=join(root,'audit_base_scan');mkdirSync(c,{'recursive':!![]}),writeFileSync(join(c,'pack.json'),JSON['stringify']({'manifest':manifest('audit_base_scan',['baselines']),'baselines':a}),'utf-8');const [d]=scanPacks(root);expect(d['ok'])['toBe'](![]),expect(d['errors']['join']('\x20'))['toContain']('trust_revews');});}),describe('industry\x20audit\x20—\x20playbook\x20layer',()=>{it('19a.\x20real\x20playbook\x20content\x20registers\x20and\x20resolves',()=>{const a='audit_play',b=join(root,a);mkdirSync(b,{'recursive':!![]}),writeFileSync(join(b,'pack.json'),JSON['stringify']({'manifest':manifest(a,['playbook'])}),'utf-8'),writeFileSync(join(b,'playbook.md'),'#\x20audit_play\x20playbook\x0a\x0aAUDIT-REAL:\x20always\x20answer\x20complaint\x20threads\x20within\x204\x20hours.\x0a','utf-8');const [c]=scanPacks(root);expect(c['ok'])['toBe'](!![]),expect(c['registered'])['toContain']('playbook'),expect(resolveIndustryPlaybook(a)?.['content'])['toContain']('AUDIT-REAL');}),it('19b.\x20the\x20scaffolded\x20TEMPLATE\x20playbook\x20is\x20SKIPPED\x20(placeholder\x20bullets\x20carry\x20no\x20registerable\x20content)',()=>{scaffoldIndustryPack('audit_play_tmpl',root);const [a]=scanPacks(root);expect(a['ok'])['toBe'](!![]),expect(a['registered'])['toEqual']([]),expect(resolveIndustryPlaybook('audit_play_tmpl'))['toBeUndefined']();}),it('19c.\x20template\x20+\x20ONE\x20real\x20user\x20line\x20IS\x20meaningful\x20(no\x20false\x20negative\x20on\x20real\x20content)',()=>{scaffoldIndustryPack('audit_play_mix',root);const a=join(root,'audit_play_mix','playbook.md');writeFileSync(a,readFileSync(a,'utf-8')+'\x0a-\x20AUDIT-REAL:\x20answer\x20complaint\x20threads\x20within\x204\x20hours.\x0a','utf-8');const [b]=scanPacks(root);expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toContain']('playbook'),expect(resolveIndustryPlaybook('audit_play_mix')?.['content'])['toContain']('AUDIT-REAL');});}),describe('industry\x20audit\x20—\x20manifest.layers\x20enable\x20flags',()=>{it('20.\x20a\x20layer\x20removed\x20from\x20manifest.layers\x20is\x20ignored\x20even\x20when\x20its\x20section\x20carries\x20real\x20content',()=>{const a='audit_off',b=registerIndustryPack({'manifest':manifest(a,['compliance']),'dispute':{'category':a,'sla_tiers':[{'level':'L1','timeout':'1h'}]},'compliance':{'category':a,'refund_window':{'days':0x7}}});expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual'](['compliance']),expect(resolveComplianceRules(a)?.['refund_window']?.['days'])['toBe'](0x7),expect(resolveDisputeRules(a))['toBeUndefined']();});});
@@ -95,6 +95,19 @@ export interface StrategyManualSeedResult {
95
95
  detail?: string;
96
96
  }
97
97
  export declare function seedBuiltinStrategyManuals(names?: readonly string[]): StrategyManualSeedResult[];
98
+ export interface PlaybookSeedResult {
99
+ industry: string;
100
+ status: "written" | "updated" | "current" | "skipped_user_file" | "skipped_user_modified" | "error";
101
+ path: string;
102
+ detail?: string;
103
+ }
104
+ export declare const PLAYBOOK_SENTINEL_KIND = "industry-playbook";
105
+ export declare const PLAYBOOK_VERSION = 1;
106
+ export declare function playbookCanonicalBody(name: string): string;
107
+ export declare function renderPackPlaybook(name: string): string;
108
+ export type PlaybookReleaseState = "current" | "outdated" | "user_modified" | "user_file";
109
+ export declare function classifyPackPlaybook(name: string, raw: string): PlaybookReleaseState;
110
+ export declare function seedReleasedPackPlaybooks(names?: readonly string[]): PlaybookSeedResult[];
98
111
  export interface ScaffoldResult {
99
112
  ok: boolean;
100
113
  dir: string;