@wowok/agent-mcp 3.3.9 → 3.4.1

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 (480) 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/field-capability.js +1 -1
  6. package/dist/chain-semantics/freeze-map.js +1 -1
  7. package/dist/chain-semantics/fund-flow.js +1 -1
  8. package/dist/chain-semantics/guard-verbs.js +1 -1
  9. package/dist/chain-semantics/index.d.ts +1 -0
  10. package/dist/chain-semantics/index.js +1 -1
  11. package/dist/chain-semantics/object-graph.js +1 -1
  12. package/dist/composition/audit.js +1 -1
  13. package/dist/composition/blueprint-view.d.ts +3 -3
  14. package/dist/composition/blueprint-view.js +1 -1
  15. package/dist/composition/compile.d.ts +26 -4
  16. package/dist/composition/compile.js +1 -1
  17. package/dist/composition/emit-phases.d.ts +206 -0
  18. package/dist/composition/emit-phases.js +1 -0
  19. package/dist/composition/generate.d.ts +40 -0
  20. package/dist/composition/generate.js +1 -0
  21. package/dist/composition/guard-fill.d.ts +44 -0
  22. package/dist/composition/guard-fill.js +1 -0
  23. package/dist/composition/inflight.d.ts +26 -2
  24. package/dist/composition/inflight.js +1 -1
  25. package/dist/composition/input-normalize.d.ts +15 -0
  26. package/dist/composition/input-normalize.js +1 -0
  27. package/dist/composition/materialize.d.ts +22 -13
  28. package/dist/composition/materialize.js +1 -1
  29. package/dist/composition/mode-gates.d.ts +35 -0
  30. package/dist/composition/mode-gates.js +1 -0
  31. package/dist/composition/param-disclosure.d.ts +61 -0
  32. package/dist/composition/param-disclosure.js +1 -0
  33. package/dist/composition/plan-retry-ledger.d.ts +21 -0
  34. package/dist/composition/plan-retry-ledger.js +1 -0
  35. package/dist/composition/plan.d.ts +17 -2
  36. package/dist/composition/plan.js +1 -1
  37. package/dist/composition/product-card.d.ts +94 -0
  38. package/dist/composition/product-card.js +1 -0
  39. package/dist/composition/supply-chain-emit.d.ts +46 -0
  40. package/dist/composition/supply-chain-emit.js +1 -0
  41. package/dist/config/config-audit.spec.js +1 -1
  42. package/dist/config/config-warnings.d.ts +2 -0
  43. package/dist/config/config-warnings.js +1 -0
  44. package/dist/config/exposure.d.ts +2 -2
  45. package/dist/config/judgment.d.ts +31 -5
  46. package/dist/config/judgment.js +1 -1
  47. package/dist/config/judgment.spec.js +1 -1
  48. package/dist/config/match-policy-file.d.ts +34 -0
  49. package/dist/config/match-policy-file.js +1 -0
  50. package/dist/config/match-policy-file.spec.d.ts +1 -0
  51. package/dist/config/match-policy-file.spec.js +1 -0
  52. package/dist/config/rule-engine.d.ts +5 -5
  53. package/dist/config/rule-engine.js +1 -1
  54. package/dist/config/runtime.d.ts +0 -1
  55. package/dist/config/runtime.js +1 -1
  56. package/dist/config/severity.d.ts +0 -2
  57. package/dist/config/severity.js +1 -1
  58. package/dist/config/store-policy.spec.js +1 -1
  59. package/dist/config/template-params.d.ts +42 -0
  60. package/dist/config/template-params.js +1 -0
  61. package/dist/config/template-params.spec.d.ts +1 -0
  62. package/dist/config/template-params.spec.js +1 -0
  63. package/dist/customer/account-events.js +1 -1
  64. package/dist/data/api/api.spec.js +1 -1
  65. package/dist/data/api/cli.js +1 -1
  66. package/dist/data/api/server.d.ts +1 -0
  67. package/dist/data/api/server.js +1 -1
  68. package/dist/data/projection/store.d.ts +3 -1
  69. package/dist/data/projection/store.js +1 -1
  70. package/dist/data/projection/types.d.ts +32 -0
  71. package/dist/data/sync/cdc.d.ts +1 -2
  72. package/dist/data/sync/cdc.js +1 -1
  73. package/dist/data/sync/cdc.spec.js +1 -1
  74. package/dist/data/sync/store.d.ts +5 -0
  75. package/dist/data/sync/store.js +1 -1
  76. package/dist/data/sync/types.d.ts +2 -0
  77. package/dist/evaluation/acceptance.d.ts +8 -0
  78. package/dist/evaluation/acceptance.js +1 -1
  79. package/dist/evaluation/builtins/demand-match.js +1 -1
  80. package/dist/evaluation/builtins/graph-service.spec.js +1 -1
  81. package/dist/evaluation/capability.d.ts +2 -0
  82. package/dist/evaluation/category-match-rules.d.ts +0 -1
  83. package/dist/evaluation/category-match-rules.js +1 -1
  84. package/dist/evaluation/composer.d.ts +25 -0
  85. package/dist/evaluation/composer.js +1 -1
  86. package/dist/evaluation/engine.js +1 -1
  87. package/dist/evaluation/extract.d.ts +7 -0
  88. package/dist/evaluation/extract.js +1 -1
  89. package/dist/evaluation/game-strategy.d.ts +0 -3
  90. package/dist/evaluation/game-strategy.js +1 -1
  91. package/dist/evaluation/guard-scan.js +1 -1
  92. package/dist/evaluation/match-operation.d.ts +9 -0
  93. package/dist/evaluation/match-operation.js +1 -1
  94. package/dist/evaluation/match-policy-resolver.d.ts +9 -0
  95. package/dist/evaluation/match-policy-resolver.js +1 -0
  96. package/dist/evaluation/match-policy.d.ts +3 -1
  97. package/dist/evaluation/match-policy.js +1 -1
  98. package/dist/evaluation/region.d.ts +0 -6
  99. package/dist/evaluation/region.js +1 -1
  100. package/dist/evaluation/standards.d.ts +2 -1
  101. package/dist/evaluation/standards.js +1 -1
  102. package/dist/evaluation/structured-lines.d.ts +8 -0
  103. package/dist/evaluation/structured-lines.js +1 -0
  104. package/dist/evaluation/types.d.ts +6 -0
  105. package/dist/experience/realtime-feedback.js +1 -1
  106. package/dist/extensions/capability-manifest.d.ts +1 -0
  107. package/dist/extensions/capability-manifest.js +1 -1
  108. package/dist/extensions/capability.d.ts +91 -0
  109. package/dist/extensions/capability.js +1 -0
  110. package/dist/extensions/industry-audit.spec.js +1 -1
  111. package/dist/extensions/industry-pack.d.ts +13 -0
  112. package/dist/extensions/industry-pack.js +1 -1
  113. package/dist/extensions/modes.js +1 -1
  114. package/dist/extensions/registry.d.ts +0 -2
  115. package/dist/extensions/registry.js +1 -1
  116. package/dist/goal/GoalEngine.js +1 -1
  117. package/dist/graph/onchain/analyze.js +1 -1
  118. package/dist/graph/onchain/expand.js +1 -1
  119. package/dist/graph/onchain/exposure.js +1 -1
  120. package/dist/graph/onchain/facts.js +1 -1
  121. package/dist/graph/onchain/order-status.d.ts +0 -1
  122. package/dist/graph/onchain/order-status.js +1 -1
  123. package/dist/harness/recover.js +1 -1
  124. package/dist/harness/verify.d.ts +0 -3
  125. package/dist/harness/verify.js +1 -1
  126. package/dist/index.js +1 -1
  127. package/dist/intent/types.d.ts +0 -1
  128. package/dist/intent/types.js +1 -1
  129. package/dist/keeper/detectors.js +1 -1
  130. package/dist/keeper/types.d.ts +0 -1
  131. package/dist/keeper/types.js +1 -1
  132. package/dist/knowledge/allocation-risk.d.ts +1 -0
  133. package/dist/knowledge/allocation-risk.js +1 -1
  134. package/dist/knowledge/allocation-templates.js +1 -1
  135. package/dist/knowledge/allocator-rail-verifier.d.ts +6 -1
  136. package/dist/knowledge/allocator-rail-verifier.js +1 -1
  137. package/dist/knowledge/arb-fund-facts.d.ts +1 -0
  138. package/dist/knowledge/arb-fund-facts.js +1 -1
  139. package/dist/knowledge/arbitration-ledger.js +1 -1
  140. package/dist/knowledge/arbitration-puzzle.js +1 -1
  141. package/dist/knowledge/arbitration-risk.d.ts +1 -0
  142. package/dist/knowledge/arbitration-risk.js +1 -1
  143. package/dist/knowledge/audit-rules.d.ts +2 -2
  144. package/dist/knowledge/audit-rules.js +1 -1
  145. package/dist/knowledge/baselines/judgment-baselines.json +21 -2
  146. package/dist/knowledge/baselines/rules/allocation.json +6 -6
  147. package/dist/knowledge/baselines/rules/arb.json +2 -2
  148. package/dist/knowledge/baselines/rules/guard.json +11 -11
  149. package/dist/knowledge/baselines/rules/oracle.json +120 -0
  150. package/dist/knowledge/baselines/rules/order.json +1 -1
  151. package/dist/knowledge/baselines/rules/plan.json +385 -18
  152. package/dist/knowledge/baselines/rules/progress.json +20 -2
  153. package/dist/knowledge/baselines/semantic-facts.js +1 -1
  154. package/dist/knowledge/builtin-templates.d.ts +25 -1
  155. package/dist/knowledge/builtin-templates.js +1 -1
  156. package/dist/knowledge/catalog-facts.d.ts +4 -0
  157. package/dist/knowledge/catalog-facts.js +1 -0
  158. package/dist/knowledge/commission-landing.js +1 -1
  159. package/dist/knowledge/component-schema.d.ts +64 -0
  160. package/dist/knowledge/component-schema.js +1 -0
  161. package/dist/knowledge/contact-templates.d.ts +0 -1
  162. package/dist/knowledge/contact-templates.js +1 -1
  163. package/dist/knowledge/dynamic-pricing.js +1 -1
  164. package/dist/knowledge/entity-recipient-guard.js +1 -1
  165. package/dist/knowledge/event-semantics.js +1 -1
  166. package/dist/knowledge/fee-param-bindings.d.ts +26 -0
  167. package/dist/knowledge/fee-param-bindings.js +1 -0
  168. package/dist/knowledge/fund-layer.d.ts +1 -0
  169. package/dist/knowledge/fund-layer.js +1 -1
  170. package/dist/knowledge/game-scenarios.js +1 -1
  171. package/dist/knowledge/getting-started.d.ts +2 -2
  172. package/dist/knowledge/getting-started.js +1 -1
  173. package/dist/knowledge/guard-anchor-reach.js +1 -1
  174. package/dist/knowledge/guard-binding-table.d.ts +52 -0
  175. package/dist/knowledge/guard-binding-table.js +1 -0
  176. package/dist/knowledge/guard-binding-verifier.d.ts +30 -0
  177. package/dist/knowledge/guard-binding-verifier.js +1 -0
  178. package/dist/knowledge/guard-bindings.js +1 -1
  179. package/dist/knowledge/guard-blueprint.d.ts +68 -0
  180. package/dist/knowledge/guard-blueprint.js +1 -0
  181. package/dist/knowledge/guard-design-patterns.d.ts +1 -1
  182. package/dist/knowledge/guard-design-patterns.js +1 -1
  183. package/dist/knowledge/guard-field-cognition.js +1 -1
  184. package/dist/knowledge/guard-host-context.d.ts +24 -0
  185. package/dist/knowledge/guard-host-context.js +1 -0
  186. package/dist/knowledge/guard-ledger.js +1 -1
  187. package/dist/knowledge/guard-lint.d.ts +1 -0
  188. package/dist/knowledge/guard-lint.js +1 -1
  189. package/dist/knowledge/guard-node-gates.d.ts +3 -0
  190. package/dist/knowledge/guard-node-gates.js +1 -1
  191. package/dist/knowledge/guard-puzzle.js +1 -1
  192. package/dist/knowledge/guard-render.js +1 -1
  193. package/dist/knowledge/guard-risk.js +1 -1
  194. package/dist/knowledge/guard-submission-prompt.d.ts +11 -0
  195. package/dist/knowledge/guard-submission-prompt.js +1 -1
  196. package/dist/knowledge/guard-templates.d.ts +1 -1
  197. package/dist/knowledge/guard-templates.js +1 -1
  198. package/dist/knowledge/guard-translation.js +1 -1
  199. package/dist/knowledge/index.d.ts +1 -1
  200. package/dist/knowledge/index.js +1 -1
  201. package/dist/knowledge/industry-generalizer.d.ts +6 -1
  202. package/dist/knowledge/industry-generalizer.js +1 -1
  203. package/dist/knowledge/industry-registry.js +1 -1
  204. package/dist/knowledge/industry-strategy.js +1 -1
  205. package/dist/knowledge/jsonrpc-enum.d.ts +52 -3
  206. package/dist/knowledge/jsonrpc-enum.js +1 -1
  207. package/dist/knowledge/knob-docs.d.ts +5 -0
  208. package/dist/knowledge/knob-docs.js +1 -0
  209. package/dist/knowledge/machine-templates.js +1 -1
  210. package/dist/knowledge/machine-topology.js +1 -1
  211. package/dist/knowledge/machine-translation.js +1 -1
  212. package/dist/knowledge/object-dependency.d.ts +31 -0
  213. package/dist/knowledge/object-dependency.js +1 -0
  214. package/dist/knowledge/onchain-constants.d.ts +4 -0
  215. package/dist/knowledge/onchain-constants.js +1 -1
  216. package/dist/knowledge/order-ledger.js +1 -1
  217. package/dist/knowledge/param-schema.d.ts +93 -0
  218. package/dist/knowledge/param-schema.js +1 -0
  219. package/dist/knowledge/param-tiers.d.ts +25 -0
  220. package/dist/knowledge/param-tiers.js +1 -0
  221. package/dist/knowledge/passport-ledger.d.ts +1 -1
  222. package/dist/knowledge/passport-ledger.js +1 -1
  223. package/dist/knowledge/path-oracle/coverage.d.ts +16 -0
  224. package/dist/knowledge/path-oracle/coverage.js +1 -0
  225. package/dist/knowledge/path-oracle/index.d.ts +5 -0
  226. package/dist/knowledge/path-oracle/index.js +1 -0
  227. package/dist/knowledge/path-oracle/products/food-delivery.d.ts +2 -0
  228. package/dist/knowledge/path-oracle/products/food-delivery.js +1 -0
  229. package/dist/knowledge/path-oracle/schema.d.ts +188 -0
  230. package/dist/knowledge/path-oracle/schema.js +1 -0
  231. package/dist/knowledge/pattern-resolutions.d.ts +108 -0
  232. package/dist/knowledge/pattern-resolutions.js +1 -0
  233. package/dist/knowledge/progress-ledger.js +1 -1
  234. package/dist/knowledge/progress-risk.js +1 -1
  235. package/dist/knowledge/projection.spec.js +1 -1
  236. package/dist/knowledge/protocol-facts.js +1 -1
  237. package/dist/knowledge/requirement-families.d.ts +13 -0
  238. package/dist/knowledge/requirement-families.js +1 -0
  239. package/dist/knowledge/reward-ledger.js +1 -1
  240. package/dist/knowledge/safety-rules.js +1 -1
  241. package/dist/knowledge/scenario-modes.d.ts +2 -0
  242. package/dist/knowledge/scenario-modes.js +1 -1
  243. package/dist/knowledge/scenario-topology.js +1 -1
  244. package/dist/knowledge/semantic-ir.d.ts +4 -0
  245. package/dist/knowledge/semantic-ir.js +1 -1
  246. package/dist/knowledge/service-allocation-semantics.js +1 -1
  247. package/dist/knowledge/service-ledger.d.ts +1 -1
  248. package/dist/knowledge/service-ledger.js +1 -1
  249. package/dist/knowledge/service-templates.js +1 -1
  250. package/dist/knowledge/sku-name-gate.d.ts +17 -0
  251. package/dist/knowledge/sku-name-gate.js +1 -0
  252. package/dist/knowledge/strategy-manuals.d.ts +1 -1
  253. package/dist/knowledge/strategy-manuals.js +1 -1
  254. package/dist/knowledge/supply-chain.d.ts +9 -0
  255. package/dist/knowledge/supply-chain.js +1 -1
  256. package/dist/knowledge/template-loader.d.ts +114 -6
  257. package/dist/knowledge/template-loader.js +1 -1
  258. package/dist/knowledge/template-nav.d.ts +9 -0
  259. package/dist/knowledge/template-nav.js +1 -0
  260. package/dist/knowledge/template-prose.d.ts +1 -1
  261. package/dist/knowledge/template-registry.js +1 -1
  262. package/dist/knowledge/template-scanner.d.ts +95 -0
  263. package/dist/knowledge/template-scanner.js +1 -1
  264. package/dist/knowledge/template-test-profiles.d.ts +17 -0
  265. package/dist/knowledge/template-test-profiles.js +1 -0
  266. package/dist/knowledge/template-validation.d.ts +1 -0
  267. package/dist/knowledge/template-validation.js +1 -1
  268. package/dist/knowledge/tools-reference.js +1 -1
  269. package/dist/knowledge/treasury-templates.js +1 -1
  270. package/dist/knowledge/workflow-guidance.d.ts +5 -0
  271. package/dist/knowledge/workflow-guidance.js +1 -1
  272. package/dist/monitor/MonitorLoop.js +1 -1
  273. package/dist/participation/radar-core.js +1 -1
  274. package/dist/participation/time-window.d.ts +37 -0
  275. package/dist/participation/time-window.js +1 -0
  276. package/dist/persona/address-format.d.ts +0 -1
  277. package/dist/persona/address-format.js +1 -1
  278. package/dist/persona/bridge.js +1 -1
  279. package/dist/persona/index.d.ts +0 -2
  280. package/dist/persona/index.js +1 -1
  281. package/dist/persona/model.js +1 -1
  282. package/dist/persona/persona-audit.spec.js +1 -1
  283. package/dist/persona/types.d.ts +6 -0
  284. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  285. package/dist/playbooks/service-build/game-theory.d.ts +2 -2
  286. package/dist/playbooks/service-build/intent-analyzer.js +1 -1
  287. package/dist/playbooks/service-build/machine-panorama.d.ts +1 -0
  288. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  289. package/dist/playbooks/service-build/merchant-guide.d.ts +52 -22
  290. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  291. package/dist/playbooks/service-build/migration-planner.d.ts +2 -0
  292. package/dist/playbooks/service-build/migration-planner.js +1 -1
  293. package/dist/playbooks/service-build/mode-actions.js +1 -1
  294. package/dist/playbooks/service-build/object-panorama.d.ts +8 -0
  295. package/dist/playbooks/service-build/object-panorama.js +1 -1
  296. package/dist/playbooks/service-build/participation-radar.d.ts +1 -0
  297. package/dist/playbooks/service-build/participation-radar.js +1 -1
  298. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  299. package/dist/playbooks/service-build/reverse-mapping.d.ts +6 -0
  300. package/dist/playbooks/service-build/reverse-mapping.js +1 -1
  301. package/dist/playbooks/service-build/service-panorama.d.ts +2 -0
  302. package/dist/playbooks/service-build/service-panorama.js +1 -1
  303. package/dist/playbooks/service-build/service-quote.js +1 -1
  304. package/dist/playbooks/service-build/service-quote.spec.js +1 -1
  305. package/dist/playbooks/service-build/workflow-design-assessment.d.ts +10 -1
  306. package/dist/playbooks/service-build/workflow-design-assessment.js +1 -1
  307. package/dist/relationship/registry.js +1 -1
  308. package/dist/review/index.js +1 -1
  309. package/dist/review/repository.js +1 -1
  310. package/dist/runtime/instance-registry.d.ts +7 -1
  311. package/dist/runtime/instance-registry.js +1 -1
  312. package/dist/safety/confirm-gate.js +1 -1
  313. package/dist/schema/benchmark-migration/index.d.ts +106 -0
  314. package/dist/schema/benchmark-migration/index.js +1 -1
  315. package/dist/schema/call/allocation.d.ts +15 -6
  316. package/dist/schema/call/allocation.js +1 -1
  317. package/dist/schema/call/arbitration.js +1 -1
  318. package/dist/schema/call/base.d.ts +264 -0
  319. package/dist/schema/call/base.js +1 -1
  320. package/dist/schema/call/bridge.d.ts +34 -6
  321. package/dist/schema/call/demand.d.ts +15 -6
  322. package/dist/schema/call/demand.js +1 -1
  323. package/dist/schema/call/error-codes.d.ts +1 -1
  324. package/dist/schema/call/error-codes.js +1 -1
  325. package/dist/schema/call/guard.d.ts +8 -8
  326. package/dist/schema/call/guard.js +1 -1
  327. package/dist/schema/call/handler.d.ts +3 -0
  328. package/dist/schema/call/handler.js +1 -1
  329. package/dist/schema/call/machine.d.ts +32 -8
  330. package/dist/schema/call/machine.js +1 -1
  331. package/dist/schema/call/order.d.ts +26 -8
  332. package/dist/schema/call/order.js +1 -1
  333. package/dist/schema/call/payment.d.ts +20 -8
  334. package/dist/schema/call/payment.js +1 -1
  335. package/dist/schema/call/permission-handler.js +1 -1
  336. package/dist/schema/call/permission.d.ts +330 -114
  337. package/dist/schema/call/permission.js +1 -1
  338. package/dist/schema/call/personal.d.ts +10 -4
  339. package/dist/schema/call/personal.js +1 -1
  340. package/dist/schema/call/progress.d.ts +16 -4
  341. package/dist/schema/call/reward.d.ts +10 -4
  342. package/dist/schema/call/reward.js +1 -1
  343. package/dist/schema/call/semantic.d.ts +1 -0
  344. package/dist/schema/call/semantic.js +1 -1
  345. package/dist/schema/call/service.d.ts +131 -43
  346. package/dist/schema/call/service.js +1 -1
  347. package/dist/schema/call/treasury.d.ts +15 -6
  348. package/dist/schema/call/treasury.js +1 -1
  349. package/dist/schema/common/index.js +1 -1
  350. package/dist/schema/config/index.d.ts +61 -0
  351. package/dist/schema/config/index.js +1 -1
  352. package/dist/schema/envelope-unify.d.ts +4 -0
  353. package/dist/schema/envelope-unify.js +1 -0
  354. package/dist/schema/evaluation/index.d.ts +224 -19
  355. package/dist/schema/evaluation/index.js +1 -1
  356. package/dist/schema/goal/index.d.ts +47 -0
  357. package/dist/schema/goal/planning.d.ts +116 -1
  358. package/dist/schema/goal/planning.js +1 -1
  359. package/dist/schema/industry-pack/index.d.ts +166 -6
  360. package/dist/schema/industry-pack/index.js +1 -1
  361. package/dist/schema/industry-pack/modes.d.ts +6 -6
  362. package/dist/schema/keeper/index.d.ts +26 -0
  363. package/dist/schema/local/index.d.ts +157 -0
  364. package/dist/schema/local/index.js +1 -1
  365. package/dist/schema/local/wip.d.ts +6 -0
  366. package/dist/schema/local/wip.js +1 -1
  367. package/dist/schema/messenger/index.d.ts +28 -0
  368. package/dist/schema/messenger/index.js +1 -1
  369. package/dist/schema/operations.d.ts +343 -84
  370. package/dist/schema/operations.js +1 -1
  371. package/dist/schema/persona/index.d.ts +2907 -640
  372. package/dist/schema/persona/index.js +1 -1
  373. package/dist/schema/query/bi.d.ts +251 -4
  374. package/dist/schema/query/bi.js +1 -1
  375. package/dist/schema/query/index.d.ts +271 -78
  376. package/dist/schema/query/index.js +1 -1
  377. package/dist/schema/schema-query/index.d.ts +1 -1
  378. package/dist/schema/schema-query/index.js +1 -1
  379. package/dist/schema/schema-version.js +1 -1
  380. package/dist/schema/utils/permission-machine-check.d.ts +2 -0
  381. package/dist/schema/utils/permission-machine-check.js +1 -1
  382. package/dist/schema/watch/index.d.ts +16 -0
  383. package/dist/schema/watch/index.js +1 -1
  384. package/dist/schema/workflow/index.d.ts +2 -2
  385. package/dist/schema/workflow/index.js +1 -1
  386. package/dist/schema-query-impl/index.d.ts +1 -1
  387. package/dist/schema-query-impl/index.js +1 -1
  388. package/dist/schemas/account_operation.output.json +98 -2
  389. package/dist/schemas/benchmark_migration_operation.output.json +341 -12
  390. package/dist/schemas/benchmark_migration_operation.schema.json +42 -3
  391. package/dist/schemas/bridge_operation.output.json +98 -2
  392. package/dist/schemas/bridge_operation.schema.json +5 -5
  393. package/dist/schemas/config_operation.output.json +352 -0
  394. package/dist/schemas/config_operation.schema.json +20 -2
  395. package/dist/schemas/evaluation_operation.output.json +586 -4
  396. package/dist/schemas/evaluation_operation.schema.json +194 -3
  397. package/dist/schemas/goal_operation.schema.json +183 -0
  398. package/dist/schemas/guard2file.schema.json +1 -1
  399. package/dist/schemas/index.json +1 -1
  400. package/dist/schemas/industry_pack_operation.output.json +771 -1
  401. package/dist/schemas/industry_pack_operation.schema.json +28 -4
  402. package/dist/schemas/keeper_operation.output.json +96 -2
  403. package/dist/schemas/local_cache_operation.output.json +98 -2
  404. package/dist/schemas/local_history_operation.output.json +98 -2
  405. package/dist/schemas/local_info_operation.output.json +98 -2
  406. package/dist/schemas/local_mark_operation.output.json +98 -2
  407. package/dist/schemas/machineNode2file.schema.json +1 -1
  408. package/dist/schemas/messenger_operation.output.json +107 -2
  409. package/dist/schemas/messenger_operation.schema.json +41 -34
  410. package/dist/schemas/monitor_events.output.json +96 -2
  411. package/dist/schemas/monitor_subscription.output.json +96 -2
  412. package/dist/schemas/onchain_events.output.json +108 -14
  413. package/dist/schemas/onchain_operations.output.json +326 -11
  414. package/dist/schemas/onchain_operations.schema.json +1343 -734
  415. package/dist/schemas/onchain_operations_allocation.schema.json +35 -19
  416. package/dist/schemas/onchain_operations_arbitration.schema.json +16 -8
  417. package/dist/schemas/onchain_operations_contact.schema.json +12 -4
  418. package/dist/schemas/onchain_operations_demand.schema.json +33 -17
  419. package/dist/schemas/onchain_operations_gen_passport.schema.json +12 -4
  420. package/dist/schemas/onchain_operations_gen_proof.schema.json +1 -1
  421. package/dist/schemas/onchain_operations_guard.schema.json +297 -111
  422. package/dist/schemas/onchain_operations_machine.schema.json +56 -39
  423. package/dist/schemas/onchain_operations_order.schema.json +67 -42
  424. package/dist/schemas/onchain_operations_payment.schema.json +27 -12
  425. package/dist/schemas/onchain_operations_permission.schema.json +363 -232
  426. package/dist/schemas/onchain_operations_personal.schema.json +43 -28
  427. package/dist/schemas/onchain_operations_progress.schema.json +49 -32
  428. package/dist/schemas/onchain_operations_proof.schema.json +12 -4
  429. package/dist/schemas/onchain_operations_repository.schema.json +17 -8
  430. package/dist/schemas/onchain_operations_reward.schema.json +36 -20
  431. package/dist/schemas/onchain_operations_service.schema.json +230 -130
  432. package/dist/schemas/onchain_operations_treasury.schema.json +36 -20
  433. package/dist/schemas/onchain_table_data.output.json +276 -19
  434. package/dist/schemas/onchain_table_data.schema.json +104 -64
  435. package/dist/schemas/persona_operation.output.json +7752 -0
  436. package/dist/schemas/persona_operation.schema.json +1232 -4
  437. package/dist/schemas/query_toolkit.output.json +1054 -146
  438. package/dist/schemas/query_toolkit.schema.json +144 -13
  439. package/dist/schemas/schema_query.schema.json +1 -1
  440. package/dist/schemas/watch_operation.output.json +86 -3
  441. package/dist/schemas/wip_file.output.json +8 -0
  442. package/dist/schemas/workflow_operation.schema.json +5 -4
  443. package/dist/schemas/wowok_buildin_info.schema.json +1 -1
  444. package/dist/task/playbook.js +1 -1
  445. package/dist/tools/handlers/benchmark-migration.d.ts +12 -3
  446. package/dist/tools/handlers/benchmark-migration.js +1 -1
  447. package/dist/tools/handlers/config.js +1 -1
  448. package/dist/tools/handlers/evaluation.js +1 -1
  449. package/dist/tools/handlers/evaluation.spec.js +1 -1
  450. package/dist/tools/handlers/industry-pack.js +1 -1
  451. package/dist/tools/handlers/messenger.js +1 -1
  452. package/dist/tools/handlers/onchain.d.ts +24 -0
  453. package/dist/tools/handlers/onchain.js +1 -1
  454. package/dist/tools/handlers/persona.js +1 -1
  455. package/dist/tools/handlers/query.d.ts +8 -0
  456. package/dist/tools/handlers/query.js +1 -1
  457. package/dist/tools/handlers/winner-derivation.d.ts +20 -0
  458. package/dist/tools/handlers/winner-derivation.js +1 -0
  459. package/dist/tools/handlers/wip-upload.js +1 -1
  460. package/dist/tools/index.d.ts +1 -0
  461. package/dist/tools/index.js +1 -1
  462. package/dist/tools/registry/business.js +1 -1
  463. package/dist/tools/registry/config.js +1 -1
  464. package/dist/tools/registry/evaluation.js +1 -1
  465. package/dist/tools/registry/identity.js +1 -1
  466. package/dist/tools/registry/onchain.js +1 -1
  467. package/dist/tools/registry/query.js +1 -1
  468. package/dist/tools/sanitize-output.js +1 -1
  469. package/dist/tools/sanitize-output.spec.js +1 -1
  470. package/dist/tools/transport-integrity.d.ts +7 -0
  471. package/dist/tools/transport-integrity.js +1 -0
  472. package/dist/tools/types.d.ts +1 -0
  473. package/dist/tools/upgrade-check.d.ts +22 -0
  474. package/dist/tools/upgrade-check.js +1 -1
  475. package/dist/tools/wrap.d.ts +6 -1
  476. package/dist/tools/wrap.js +1 -1
  477. package/package.json +7 -6
  478. package/dist/extensions/business-modules.d.ts +0 -54
  479. package/dist/extensions/business-modules.js +0 -1
  480. package/dist/schemas/guard-templates.json +0 -379
@@ -1 +1 @@
1
- import{buildWorkflowGuidance,buildWorkflowReceipt,enrichWorkflowGuidance,mergeGuidanceIntoOutput,resolvePermissionRole,resolveLocalNamesFor,listLocalAccounts,accountCanExecuteForward,enumerateActionableForwards,forwardOperatorKind}from'./workflow-guidance.js';import{CONFIRMATION_RULES,SAFETY_RULES_VERSION,OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,classifyTool,NAMING_CONVENTIONS,checkObjectReuseRules,checkImmutabilityRules}from'./safety-rules.js';import{TOOL_CONSTRAINTS,TOOL_CONSTRAINTS_VERSION,validateOperation,hasBlockingViolations,getWarningViolations}from'./tool-constraints.js';import{REWARD_TEMPLATES,REWARD_TEMPLATES_VERSION,getRewardTemplate,listRewardTemplates,suggestRewardTemplate}from'./reward-templates.js';import{AUDIT_RULES,AUDIT_RULES_VERSION,auditService,hasBlockingErrors,getErrors,getWarnings,summarizeFindings}from'./audit-rules.js';import{suggestPricing,MUTABLE_FIELDS,DYNAMIC_PRICING_VERSION}from'./dynamic-pricing.js';import{computeReviewStats,isVerifiedReview,filterVerifiedReviews,detectReviewManipulation,REPUTATION_RULES_VERSION}from'./reputation-rules.js';import{INDUSTRY_FLYWHEELS,getFlywheelForIndustry,listIndustries,suggestAcquisitionActions,generateTrustDescription,buildAcquisitionDashboard,ACQUISITION_FLYWHEEL_VERSION}from'./acquisition-flywheel.js';import{INDUSTRY_REGISTRY_VERSION,getIndustryProfile,registerIndustry,getIndustryTraits,resolveIndustryName,isRegisteredIndustry,getRegistrySize,listBuiltinIndustryNames}from'./industry-registry.js';import{DEFAULT_TRAITS,inferTraitsFromDescription,synthesizeProfile,findSimilarIndustries,composeIndustries,INDUSTRY_REQUIRED_TRAITS,DOMAIN_PRIORS,detectDomainPriors,traitContradictions,filterConsistentIndustries}from'./industry-generalizer.js';import{INDUSTRY_EVOLUTION_THRESHOLDS,aggregateIndustryMetrics,evaluateIndustryHealth,suggestIndustryUpdate,applyIndustryUpdate,runIndustryHealthPipeline}from'./industry-evolution.js';import{FLYWHEEL_LOOP_VERSION,FLYWHEEL_LOOP_MIN_SIGNALS,recordIndustrySignal,updateIndustryCognition,injectEvolutionContext}from'./flywheel-loop.js';import{BUILTIN_INTENT_SPECS,registerIntentProfile,getIntentProfile,listIntents,evaluateIndustryHealthByIntent,suggestIndustryUpdateByIntent,evaluateIndustryHealthMultiIntent,getRoleAdvice,filterSuggestionsByRole}from'./intent-metrics.js';import{GUARD_SCENES,findScene,inferSceneFromAction,getImmutableScenes,getNumericIdentifierScenes}from'./guard-ledger.js';import{SEMANTIC_TO_SCHEMA_RULES,SCHEMA_TO_SEMANTIC_RULES,GUARD_CONSTRAINT_RULES,matchSemanticPattern,explainNode,explainWitness,getConstraintsByCategory}from'./guard-translation.js';import{checkPuzzleCompleteness,generateConfirmationText,initPuzzleFromIntent,inferBindingFromAction,emptyDataSources,getWitnessInfo,WITNESS_NAME_MAP}from'./guard-puzzle.js';import{runGuardRulePack,assembleGuardAssessment,getRiskRulesCount}from'./guard-risk.js';import{evaluateGuardDraft}from'./guard-eval.js';import{GUARD_BINDING_REGISTRY,GUARD_BINDINGS_VERSION,OWNER_RECEIVE_COGNITION,getGuardBindingsByObject,getGuardBinding,summarizeGuardBinding}from'./guard-bindings.js';import{SCENARIO_BRIDGE_REGISTRY,SCENARIO_CHAINS,SCENARIO_TOPOLOGY_VERSION,getBridgeById,getBridgeByCode,getBridgesByObject,getBridgesForEdge,detectBridgesForEdges,getChainById,summarizeBridge,detectBridgesForObjects}from'./scenario-topology.js';import{GUARD_TEMPLATES,GUARD_TEMPLATES_VERSION,GUARD_TEMPLATES_COUNT,getTemplatesByScene,getTemplateById,getTemplatesByIndustry,getTemplatesByPattern,listGuardTemplates,suggestTemplateForScene,getTemplateParameters,validateTemplateParams}from'./guard-templates.js';import{lintGuard,autoFixGuard,isGuardReady,getGuardErrors,formatLintResult}from'./guard-lint.js';import{MACHINE_SCENES,MACHINE_LEDGER_VERSION,MACHINE_SCENES_COUNT,findScene as a245a,getScenesByIndustry as a245b,getScenesByPattern,inferSceneFromFlow}from'./machine-ledger.js';import{MACHINE_TEMPLATES,MACHINE_TEMPLATES_VERSION,MACHINE_TEMPLATES_COUNT,getAllTemplates as a245c,getTemplateById as a245d,getTemplatesByScene as a245e,getTemplatesByIndustry as a245f,suggestTemplateForIntent,walkDecisionTree,fillTemplate as a245g,forkTemplate as a245h,verifyTemplateSceneReferences,getReferencedGuardTemplateIds,getReferencedRiskIds}from'./machine-templates.js';import{SEMANTIC_TO_MACHINE_RULES,MACHINE_CONSTRAINT_RULES,MACHINE_TRANSLATION_VERSION,MACHINE_PATTERNS_COUNT,MACHINE_CONSTRAINTS_COUNT,matchSemanticPattern as a245i,identifyExecutionMode,identifyTopology,explainForwardPermission,getConstraintsByCategory as a245j,getConstraintById,getOnChainConstraints as a245k,getOffChainConstraints as a245l}from'./machine-translation.js';import{MACHINE_RISK_RULES,MACHINE_RISK_VERSION,assessMachineRisks}from'./machine-risk.js';import{analyzeTopology,identifyTopologyPattern,formatTopologySummary,MACHINE_TOPOLOGY_VERSION,MAX_NODE_COUNT,MAX_NODE_PAIR_COUNT,MAX_FORWARD_COUNT}from'./machine-topology.js';import{initPuzzleFromIntent as a245m,initPuzzleFromTemplate,checkPuzzleCompleteness as a245n,recommendNextStep as a245o,derivePuzzleFromMachineJson,generateConfirmationText as a245p,MACHINE_PUZZLE_VERSION}from'./machine-puzzle.js';import{SERVICE_SCENES,SERVICE_LEDGER_VERSION,SERVICE_PERMISSIONS,SERVICE_ORDER_FLOW_STAGES,SERVICE_CROSS_OBJECT_BINDINGS,getScenesByCategory as a245q,findSceneById as a245r,getServicePermissionByIndex,isServicePermission,getPermissionsByMutability,getImmutablePostPublishPermissions,getLockedByDurationPermissions,inferSceneFromIntent as a245s,getAllServiceScenes,getServiceScenesCount,getServicePermissionsCount,getOrderFlowStage,getCrossObjectBindings as a245t}from'./service-ledger.js';import{initPuzzleFromIntent as a245u,checkPuzzleCompleteness as a245v,validateConstraints as a245w,generateConfirmationText as a245x,initOrderFlowPuzzle,checkOrderFlowCompleteness}from'./service-puzzle.js';import{SERVICE_RISK_VERSION,assessServiceRisks,getAllServiceRiskRules}from'./service-risk.js';import{SERVICE_TEMPLATES,SERVICE_TEMPLATES_VERSION,getServiceTemplateById,getServiceTemplatesByScene,getServiceTemplatesByIndustry,suggestServiceTemplateForScene,listServiceTemplates,fillServiceTemplate,getAllServiceTemplates}from'./service-templates.js';import{ALLOCATION_SCENES,ALLOCATION_LEDGER_VERSION,MAX_ALLOCATOR_COUNT,ALLOCATION_MAX_SHARING_COUNT,ALLOCATION_MODE_AMOUNT,ALLOCATION_MODE_RATE,ALLOCATION_MODE_SURPLUS,RATE_TOTAL_FULL,ALLOCATION_ERROR_CODES,getScenesByTriggerSource as a245y,getScenesByMode as a245z,getScenesByStrategy as a245A,findSceneById as a245B,inferSceneFromIntent as a245C,getAllScenes as a245D,getScenesCount as a245E,allocationModeToNumber,allocationModeFromNumber,getRecipientType,isSignerRecipient,isEntityRecipient,isGuardIdentifierRecipient,getErrorName as a245F,getErrorDescription as a245G}from'./allocation-ledger.js';import{initPuzzleFromIntent as a245H,checkPuzzleCompleteness as a245I,validateConstraints as a245J,generateConfirmationText as a245K,buildDefaultAllocFlow,buildDefaultRecipientRules,buildDefaultLogicPuzzle,ALLOCATION_PUZZLE_VERSION}from'./allocation-puzzle.js';import{ALLOCATION_RISK_VERSION,assessAllocationRisks,getAllRiskRules as a245L}from'./allocation-risk.js';import{ALLOCATION_TEMPLATES,ALLOCATION_TEMPLATES_VERSION,getAllTemplates as a245M,getTemplateById as a245N,getTemplatesByScene as a245O,getTemplatesByIndustry as a245P,suggestTemplateForScene as a245Q,listTemplates as a245R,fillTemplate as a245S}from'./allocation-templates.js';import{RECIPIENT_CONSTRAINT_VERSION,classifyRecipient,analyzeRecipientConstraints,isUnboundSignerTheft,canonicalDoctrine,recipientDesignGuidance,derivePayoffFromSharing,OBJECT_DRIVEABILITY,driveabilityOf,RECIPIENT_DESIGN_OPTIONS}from'./recipient-constraint.js';import{paymentRelations,scanRecentPaymentEvents,resolveBeneficialOwners,extractionPlanForHolder,pendingWrappersAt,trackAccountPayments}from'./payment-tracker.js';import{TREASURY_LEDGER_VERSION,TREASURY_SCENES,TREASURY_PERMISSIONS as a245T,getScenesByHostObject as a245U,findSceneById as a245V,findSceneByPermissionIndex as a245W,getBuiltinPermissionByIndex as a245X,isBuiltinTreasuryPermission,getActiveBuiltinPermissions as a245Y,getReservedBuiltinPermissions as a245Z,inferSceneFromIntent as a245a0,getTreasuryScenesCount,getGovernedOperationsForPermissionIndex as a245a1}from'./treasury-ledger.js';import{initPuzzleFromIntent as a245a2,checkPuzzleCompleteness as a245a3,validateConstraints as a245a4,generateConfirmationText as a245a5,MAX_EXTERNAL_DEPOSIT_GUARD_COUNT,MAX_EXTERNAL_WITHDRAW_GUARD_COUNT,MAX_DESCRIPTION_LENGTH as a245a6}from'./treasury-puzzle.js';import{TREASURY_TEMPLATES,TREASURY_TEMPLATES_VERSION,getAllTreasuryTemplates,getTemplateById as a245a7,getTemplatesByScene as a245a8,getTemplatesByIndustry as a245a9,suggestTemplateForScene as a245aa,listTemplates as a245ab,fillTemplate as a245ac}from'./treasury-templates.js';import{TREASURY_RISK_VERSION,assessTreasuryRisks,getAllTreasuryRiskRules}from'./treasury-risk.js';import{ORDER_LEDGER_VERSION,ORDER_SCENES,ORDER_FIELDS,ORDER_STATES,ORDER_STATE_TRANSITIONS,ORDER_LIFECYCLE_EVENTS,ORDER_PERMISSION_MATRIX,ORDER_AUDIT_FORMULAS,getScenesByOperationField as a245ad,findSceneById as a245ae,findSceneByMoveEntry as a245af,getScenesByPermissionLayer as a245ag,getScenesByReversibility as a245ah,getFieldDef as a245ai,getMutableFields as a245aj,getImmutableFields as a245ak,getFrozenAfterProgressFields as a245al,getOneTimeSetFields as a245am,inferSceneFromIntent as a245an,getEmittedEvents as a245ao,getInferredEvents as a245ap,getOrderScenesCount,sdkToMoveField as a245aq,moveToSdkField as a245ar}from'./order-ledger.js';import{initPuzzleFromIntent as a245as,checkPuzzleCompleteness as a245at,validateConstraints as a245au,generateConfirmationText as a245av,verifySnapshotMechanism as a245aw,inferLifecyclePhase as a245ax,matchSceneFromPuzzle as a245ay,listAllScenes as a245az,lookupScene as a245aA}from'./order-puzzle.js';import{ORDER_TEMPLATES,ORDER_TEMPLATES_VERSION,ORDER_TEMPLATES_COUNT,getAllOrderTemplates,getTemplateById as a245aB,getTemplatesByScene as a245aC,getTemplatesByIndustry as a245aD,getTemplatesByPermissionLayer as a245aE,getIrreversibleTemplates as a245aF,suggestTemplateForScene as a245aG,listOrderTemplates,fillTemplate as a245aH,suggestTemplateFromIntent as a245aI,getTemplateParameters as a245aJ,validateTemplateParams as a245aK}from'./order-templates.js';import{ORDER_RISK_VERSION,assessOrderRisks,getAllOrderRiskRules}from'./order-risk.js';import{PROGRESS_LEDGER_VERSION,PROGRESS_SCENES,PROGRESS_PERMISSIONS as a245aL,PROGRESS_NEW,PROGRESS_NAMED_OPERATOR,PROGRESS_TASK,PROGRESS_CONTEXT_REPOSITORY,PROGRESS_UNHOLD,PROGRESS_OWNER_RECEIVE,PROGRESS_CROSS_OBJECT_REFS,getScenesByPhase as a245aM,findSceneById as a245aN,getScenesByIndustry as a245aO,getBuiltinPermissionByIndex as a245aP,isProgressBuiltinPermission,inferSceneFromIntent as a245aQ,getAllBuiltinPermissions as a245aR,getProgressScenesCount,validateNamedOperatorAddressList,validateNamedOperatorCount,validateContextRepositoryCount}from'./progress-ledger.js';import{initPuzzleFromIntent as a245aS,checkPuzzleCompleteness as a245aT,validateConstraints as a245aU,generateConfirmationText as a245aV,resolveBuiltinPermission as a245aW,isOrderHolderForward,getRelevantDimensions as a245aX}from'./progress-puzzle.js';import{PROGRESS_TEMPLATES,PROGRESS_TEMPLATES_VERSION,getAllProgressTemplates,getProgressTemplateById,getProgressTemplatesByScene,getProgressTemplatesByIndustry,suggestProgressTemplateForScene,listProgressTemplates,fillProgressTemplate}from'./progress-templates.js';import{PROGRESS_RISK_VERSION,assessProgressRisks,getAllProgressRiskRules}from'./progress-risk.js';import{ARBITRATION_LEDGER_VERSION,ARBITRATION_SCENES,ARBITRATION_PERMISSIONS as a245aY,ARB_STATUS_CODE,ARB_TERMINAL_STATUSES,ARB_STATUS_ALIASES,DUAL_GUARD_MATRIX,getScenesByCategory as a245aZ,findSceneById as a245b0,findSceneByPermissionIndex as a245b1,getPermissionByIndex as a245b2,getPermissionByName as a245b3,isReservedIndex as a245b4,isUsedPermissionIndex as a245b5,getActivePermissionCount as a245b6,inferSceneFromIntent as a245b7,getDualGuardMatrixEntry,isValidArbStatusTransition,isTerminalArbStatus,getScenesProducingStatus as a245b8,getScenesRequiringStatus as a245b9,getArbitrationScenesCount,getAllArbitrationPermissions,getActiveArbitrationPermissions}from'./arbitration-ledger.js';import{initPuzzleFromIntent as a245ba,checkPuzzleCompleteness as a245bb,validateConstraints as a245bc,generateConfirmationText as a245bd}from'./arbitration-puzzle.js';import{ARBITRATION_TEMPLATES,ARBITRATION_TEMPLATES_VERSION,getAllTemplates as a245be,getTemplateById as a245bf,getTemplatesByScene as a245bg,getTemplatesByIndustry as a245bh,suggestTemplateForScene as a245bi,listTemplates as a245bj,fillTemplate as a245bk}from'./arbitration-templates.js';import{ARBITRATION_RISK_VERSION,assessArbitrationRisks,getAllRiskRules as a245bl}from'./arbitration-risk.js';import{REWARD_LEDGER_VERSION,REWARD_SCENES,REWARD_PERMISSIONS,REWARD_FIELDS,REWARD_GUARD_CONSTRUCTORS,REWARD_ERROR_CODES,REWARD_CROSS_OBJECT_REFS,MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD,getScenesByPhase as a245bm,findSceneById as a245bn,getScenesByIndustry as a245bo,getBuiltinPermissionByIndex as a245bp,isRewardBuiltinPermission,getAllBuiltinPermissions as a245bq,getRewardScenesCount,getGuardConstructorSpec as a245br,resolveGuardConstructor as a245bs,getRewardErrorByCode,getRewardErrorByName,validateGuardCount as a245bt,validateRecordCount as a245bu,inferSceneFromIntent as a245bv}from'./reward-ledger.js';import{REWARD_FIELD_MUTABILITY,initPuzzleFromIntent as a245bw,checkPuzzleCompleteness as a245bx,validateConstraints as a245by,generateConfirmationText as a245bz,resolveBuiltinPermission as a245bA,requiresGuardConfig as a245bB,requiresPassport as a245bC,getRelevantDimensions as a245bD,getFieldMutability as a245bE,isAdminMutableField as a245bF,getFieldPermissionIndex as a245bG}from'./reward-puzzle.js';import{REWARD_RISK_VERSION,assessRewardRisks,getAllRewardRiskRules}from'./reward-risk.js';import{PASSPORT_LEDGER_VERSION,PASSPORT_ERROR_CODES,PASSPORT_SCENARIOS,MAX_GUARD_COUNT_PASSPORT,MAX_SUBMISSION_SIZE_PASSPORT,getAllScenarios as a245bH,getScenariosCount as a245bI,findScenarioById as a245bJ,getScenariosByConsumer as a245bK,getScenariosUsingRelies as a245bL,inferScenarioFromIntent as a245bM,impackRoleFromBoolean,impackRoleToBoolean,reliesLogicFromBoolean,reliesLogicToBoolean,getErrorName as a245bN,getErrorDescription as a245bO}from'./passport-ledger.js';import{PASSPORT_TEMPLATES,PASSPORT_TEMPLATES_VERSION,getAllTemplates as a245bP,getTemplateById as a245bQ,getTemplatesByScenario as a245bR,getTemplatesByIndustry as a245bS,suggestTemplateForScenario as a245bT,listTemplates as a245bU,fillTemplate as a245bV}from'./passport-templates.js';import{PROOF_RISK_RULES,checkProofRisks}from'./proof-risk.js';import{REPOSITORY_RISK_RULES,checkRepositoryRisks,parseIdFromForRiskCheck}from'./repository-risk.js';import{DEMAND_RISK_RULES,checkDemandRisks}from'./demand-risk.js';import{CONTACT_RISK_RULES,CONTACT_RISK_VERSION,checkContactRisks}from'./contact-risk.js';import{RESOURCE_RISK_RULES,RESOURCE_RISK_VERSION,checkResourceRisks}from'./resource-risk.js';import{PAYMENT_RISK_RULES,PAYMENT_RISK_VERSION,checkPaymentRisks}from'./payment-risk.js';import{ARB_RISK_RULES,ARB_RISK_VERSION,checkArbRisks}from'./arb-risk.js';import{PERSONAL_RISK_RULES,PERSONAL_RISK_VERSION,checkPersonalRisks}from'./personal-risk.js';import{UTIL_RISK_RULES,UTIL_RISK_VERSION,checkUtilRisks}from'./util-risk.js';import{REGISTRAR_RISK_RULES,REGISTRAR_RISK_VERSION,checkRegistrarRisks}from'./registrar-risk.js';import{BRIDGE_RISK_RULES,BRIDGE_RISK_VERSION,checkBridgeRisks}from'./bridge-risk.js';import{TOOLS_REFERENCE,getToolReference,searchToolReference,getToolSequence}from'./tools-reference.js';import{SCENARIO_MODES,SCENARIO_MODES_VERSION,MODE_COMPOSITIONS,matchScenarioMode,inferScenarioTraits,getScenarioMode,listScenarioModes,getShippedModes,getModeCompositions}from'./scenario-modes.js';import{BUILTIN_TEMPLATES,BUILTIN_TEMPLATES_VERSION,getBuiltinTemplate,listBuiltinTemplates,TEMPLATE_KEYWORDS}from'./builtin-templates.js';import{resolveTemplatesDir,seedBuiltinTemplates,reloadTemplates,listTemplates,getTemplate,getTemplatesByIndustry as a245bW,parseTemplateFile,renderTemplateFile,loadAndValidate,TemplateFrontmatterSchema}from'./template-loader.js';import{scanTemplate}from'./template-scanner.js';import{GUARD_DESIGN_PATTERNS,GUARD_DESIGN_PATTERNS_VERSION,VERIFIER_LEVEL_GUIDANCE,getGuardDesignPattern,searchGuardDesignPatterns,getPatternsByHost,getPatternsByIndustry,getPatternsByDataSourceClass,getVerifierLevelGuidance,suggestPatternForRequirement}from'./guard-design-patterns.js';export{CONFIRMATION_RULES,SAFETY_RULES_VERSION,OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,classifyTool,NAMING_CONVENTIONS,checkObjectReuseRules,checkImmutabilityRules};export{TOOL_CONSTRAINTS,TOOL_CONSTRAINTS_VERSION,validateOperation,hasBlockingViolations,getWarningViolations};export{REWARD_TEMPLATES,REWARD_TEMPLATES_VERSION,getRewardTemplate,listRewardTemplates,suggestRewardTemplate};export{AUDIT_RULES,AUDIT_RULES_VERSION,auditService,hasBlockingErrors,getErrors,getWarnings,summarizeFindings};export{suggestPricing,MUTABLE_FIELDS,DYNAMIC_PRICING_VERSION};export{computeReviewStats,isVerifiedReview,filterVerifiedReviews,detectReviewManipulation,REPUTATION_RULES_VERSION};export{INDUSTRY_FLYWHEELS,getFlywheelForIndustry,listIndustries,suggestAcquisitionActions,generateTrustDescription,buildAcquisitionDashboard,ACQUISITION_FLYWHEEL_VERSION};export{STRATEGY_MANUAL_FILENAME,STRATEGY_MANUAL_VERSION,renderStrategyManual,parseManualSentinel,classifyManualFile,getBuiltinStrategyManual,listBuiltinStrategyManualIndustries}from'./strategy-manuals.js';export{INDUSTRY_STRATEGIES,getIndustryStrategy,listIndustryStrategies,registerIndustryStrategy,unregisterIndustryStrategy,recommendStrategy,stageFromOrderCount,validateStrategyLevers}from'./industry-strategy.js';export{INDUSTRY_REGISTRY_VERSION,getIndustryProfile,listIndustries as listRegistryIndustries,registerIndustry,getIndustryTraits,resolveIndustryName,isRegisteredIndustry,getRegistrySize,listBuiltinIndustryNames};export{DEFAULT_TRAITS,inferTraitsFromDescription,synthesizeProfile,findSimilarIndustries,composeIndustries,INDUSTRY_REQUIRED_TRAITS,DOMAIN_PRIORS,detectDomainPriors,traitContradictions,filterConsistentIndustries};export{INDUSTRY_EVOLUTION_THRESHOLDS,aggregateIndustryMetrics,evaluateIndustryHealth,suggestIndustryUpdate,applyIndustryUpdate,runIndustryHealthPipeline};export{FLYWHEEL_LOOP_VERSION,FLYWHEEL_LOOP_MIN_SIGNALS,recordIndustrySignal,updateIndustryCognition,injectEvolutionContext};export{BUILTIN_INTENT_SPECS,registerIntentProfile,getIntentProfile,listIntents,evaluateIndustryHealthByIntent,suggestIndustryUpdateByIntent,evaluateIndustryHealthMultiIntent,getRoleAdvice,filterSuggestionsByRole};export{GUARD_SCENES,findScene,inferSceneFromAction,getImmutableScenes,getNumericIdentifierScenes};export{SEMANTIC_TO_SCHEMA_RULES,SCHEMA_TO_SEMANTIC_RULES,GUARD_CONSTRAINT_RULES,matchSemanticPattern,explainNode,explainWitness,getConstraintsByCategory};export{checkPuzzleCompleteness,generateConfirmationText,initPuzzleFromIntent,inferBindingFromAction,emptyDataSources,getWitnessInfo,WITNESS_NAME_MAP};export{runGuardRulePack,assembleGuardAssessment,evaluateGuardDraft,getRiskRulesCount,GUARD_TEMPLATES,GUARD_TEMPLATES_VERSION,GUARD_TEMPLATES_COUNT,getTemplatesByScene,getTemplateById,getTemplatesByIndustry,getTemplatesByPattern,listGuardTemplates,suggestTemplateForScene,getTemplateParameters,validateTemplateParams,GUARD_BINDING_REGISTRY,GUARD_BINDINGS_VERSION,OWNER_RECEIVE_COGNITION,getGuardBindingsByObject,getGuardBinding,summarizeGuardBinding,SCENARIO_BRIDGE_REGISTRY,SCENARIO_CHAINS,SCENARIO_TOPOLOGY_VERSION,getBridgeById,getBridgeByCode,getBridgesByObject,getBridgesForEdge,detectBridgesForEdges,getChainById,summarizeBridge,detectBridgesForObjects,lintGuard,autoFixGuard,isGuardReady,getGuardErrors,formatLintResult};export{MACHINE_SCENES,MACHINE_LEDGER_VERSION,MACHINE_SCENES_COUNT,a245a as findMachineScene,a245b as getMachineScenesByIndustry,getScenesByPattern,inferSceneFromFlow};export{MACHINE_TEMPLATES,MACHINE_TEMPLATES_VERSION,MACHINE_TEMPLATES_COUNT,a245c as getAllMachineTemplates,a245d as getMachineTemplateById,a245e as getMachineTemplatesByScene,a245f as getMachineTemplatesByIndustry,suggestTemplateForIntent,walkDecisionTree,a245g as fillMachineTemplate,a245h as forkMachineTemplate,verifyTemplateSceneReferences,getReferencedGuardTemplateIds,getReferencedRiskIds};export{SEMANTIC_TO_MACHINE_RULES,MACHINE_CONSTRAINT_RULES,MACHINE_TRANSLATION_VERSION,MACHINE_PATTERNS_COUNT,MACHINE_CONSTRAINTS_COUNT,a245i as matchMachinePattern,identifyExecutionMode,identifyTopology,explainForwardPermission,a245j as getMachineConstraintsByCategory,getConstraintById,a245k as getOnChainMachineConstraints,a245l as getOffChainMachineConstraints};export{MACHINE_RISK_RULES,MACHINE_RISK_VERSION,assessMachineRisks};export{analyzeTopology,identifyTopologyPattern,formatTopologySummary,MACHINE_TOPOLOGY_VERSION,MAX_NODE_COUNT,MAX_NODE_PAIR_COUNT,MAX_FORWARD_COUNT};export{a245m as initMachinePuzzleFromIntent,initPuzzleFromTemplate,a245n as checkMachinePuzzleCompleteness,a245o as recommendMachineNextStep,derivePuzzleFromMachineJson,a245p as generateMachineConfirmationText,MACHINE_PUZZLE_VERSION};export{SERVICE_SCENES,SERVICE_LEDGER_VERSION,SERVICE_PERMISSIONS,SERVICE_ORDER_FLOW_STAGES,SERVICE_CROSS_OBJECT_BINDINGS,a245q as getServiceScenesByCategory,a245r as findServiceSceneById,getServicePermissionByIndex,isServicePermission,getPermissionsByMutability,getImmutablePostPublishPermissions,getLockedByDurationPermissions,a245s as inferServiceSceneFromIntent,getAllServiceScenes,getServiceScenesCount,getServicePermissionsCount,getOrderFlowStage,a245t as getServiceCrossObjectBindings};export{a245u as initServicePuzzleFromIntent,a245v as checkServicePuzzleCompleteness,a245w as validateServiceConstraints,a245x as generateServicePuzzleConfirmationText,initOrderFlowPuzzle,checkOrderFlowCompleteness};export{SERVICE_RISK_VERSION,assessServiceRisks,getAllServiceRiskRules};export{SERVICE_TEMPLATES,SERVICE_TEMPLATES_VERSION,getServiceTemplateById,getServiceTemplatesByScene,getServiceTemplatesByIndustry,suggestServiceTemplateForScene,listServiceTemplates,fillServiceTemplate,getAllServiceTemplates};export{ALLOCATION_SCENES,ALLOCATION_LEDGER_VERSION,MAX_ALLOCATOR_COUNT,ALLOCATION_MAX_SHARING_COUNT,ALLOCATION_MODE_AMOUNT,ALLOCATION_MODE_RATE,ALLOCATION_MODE_SURPLUS,RATE_TOTAL_FULL,ALLOCATION_ERROR_CODES,a245y as getAllocationScenesByTriggerSource,a245z as getAllocationScenesByMode,a245A as getAllocationScenesByStrategy,a245B as findAllocationSceneById,a245C as inferAllocationSceneFromIntent,a245D as getAllAllocationScenes,a245E as getAllocationScenesCount,allocationModeToNumber,allocationModeFromNumber,getRecipientType,isSignerRecipient,isEntityRecipient,isGuardIdentifierRecipient,a245F as getAllocationErrorName,a245G as getAllocationErrorDescription};export{a245H as initAllocationPuzzleFromIntent,a245I as checkAllocationPuzzleCompleteness,a245J as validateAllocationConstraints,a245K as generateAllocationPuzzleConfirmationText,buildDefaultAllocFlow,buildDefaultRecipientRules,buildDefaultLogicPuzzle,ALLOCATION_PUZZLE_VERSION};export{ALLOCATION_RISK_VERSION,assessAllocationRisks,a245L as getAllAllocationRiskRules};export{ALLOCATION_TEMPLATES,ALLOCATION_TEMPLATES_VERSION,a245M as getAllAllocationTemplates,a245N as getAllocationTemplateById,a245O as getAllocationTemplatesByScene,a245P as getAllocationTemplatesByIndustry,a245Q as suggestAllocationTemplateForScene,a245R as listAllocationTemplates,a245S as fillAllocationTemplate};export{RECIPIENT_CONSTRAINT_VERSION,classifyRecipient,analyzeRecipientConstraints,isUnboundSignerTheft,canonicalDoctrine,recipientDesignGuidance,derivePayoffFromSharing,OBJECT_DRIVEABILITY,driveabilityOf,RECIPIENT_DESIGN_OPTIONS};export{paymentRelations,scanRecentPaymentEvents,resolveBeneficialOwners,extractionPlanForHolder,pendingWrappersAt,trackAccountPayments};export{TREASURY_LEDGER_VERSION,TREASURY_SCENES,a245T as TREASURY_BUILTIN_PERMISSIONS,a245U as getTreasuryScenesByHostObject,a245V as findTreasurySceneById,a245W as findTreasurySceneByPermissionIndex,a245X as getTreasuryBuiltinPermissionByIndex,isBuiltinTreasuryPermission,a245Y as getActiveTreasuryBuiltinPermissions,a245Z as getReservedTreasuryBuiltinPermissions,a245a0 as inferTreasurySceneFromIntent,getTreasuryScenesCount,a245a1 as getTreasuryGovernedOperationsForPermissionIndex};export{a245a2 as initTreasuryPuzzleFromIntent,a245a3 as checkTreasuryPuzzleCompleteness,a245a4 as validateTreasuryConstraints,a245a5 as generateTreasuryPuzzleConfirmationText,MAX_EXTERNAL_DEPOSIT_GUARD_COUNT,MAX_EXTERNAL_WITHDRAW_GUARD_COUNT,a245a6 as TREASURY_MAX_DESCRIPTION_LENGTH};export{TREASURY_TEMPLATES,TREASURY_TEMPLATES_VERSION,getAllTreasuryTemplates,a245a7 as getTreasuryTemplateById,a245a8 as getTreasuryTemplatesByScene,a245a9 as getTreasuryTemplatesByIndustry,a245aa as suggestTreasuryTemplateForScene,a245ab as listTreasuryTemplates,a245ac as fillTreasuryTemplate};export{TREASURY_RISK_VERSION,assessTreasuryRisks,getAllTreasuryRiskRules};export{ORDER_LEDGER_VERSION,ORDER_SCENES,ORDER_FIELDS,ORDER_STATES,ORDER_STATE_TRANSITIONS,ORDER_LIFECYCLE_EVENTS,ORDER_PERMISSION_MATRIX,ORDER_AUDIT_FORMULAS,a245ad as getOrderScenesByOperationField,a245ae as findOrderSceneById,a245af as findOrderSceneByMoveEntry,a245ag as getOrderScenesByPermissionLayer,a245ah as getOrderScenesByReversibility,a245ai as getOrderFieldDef,a245aj as getOrderMutableFields,a245ak as getOrderImmutableFields,a245al as getOrderFrozenAfterProgressFields,a245am as getOrderOneTimeSetFields,a245an as inferOrderSceneFromIntent,a245ao as getOrderEmittedEvents,a245ap as getOrderInferredEvents,getOrderScenesCount,a245aq as sdkToMoveOrderField,a245ar as moveToSdkOrderField};export{a245as as initOrderPuzzleFromIntent,a245at as checkOrderPuzzleCompleteness,a245au as validateOrderConstraints,a245av as generateOrderPuzzleConfirmationText,a245aw as verifyOrderSnapshotMechanism,a245ax as inferOrderLifecyclePhase,a245ay as matchOrderSceneFromPuzzle,a245az as listAllOrderScenes,a245aA as lookupOrderScene};export{ORDER_TEMPLATES,ORDER_TEMPLATES_VERSION,ORDER_TEMPLATES_COUNT,getAllOrderTemplates,a245aB as getOrderTemplateById,a245aC as getOrderTemplatesByScene,a245aD as getOrderTemplatesByIndustry,a245aE as getOrderTemplatesByPermissionLayer,a245aF as getIrreversibleOrderTemplates,a245aG as suggestOrderTemplateForScene,listOrderTemplates,a245aH as fillOrderTemplate,a245aI as suggestOrderTemplateFromIntent,a245aJ as getOrderTemplateParameters,a245aK as validateOrderTemplateParams};export{ORDER_RISK_VERSION,assessOrderRisks,getAllOrderRiskRules};export{PROGRESS_LEDGER_VERSION,PROGRESS_SCENES,a245aL as PROGRESS_BUILTIN_PERMISSIONS,PROGRESS_NEW,PROGRESS_NAMED_OPERATOR,PROGRESS_TASK,PROGRESS_CONTEXT_REPOSITORY,PROGRESS_UNHOLD,PROGRESS_OWNER_RECEIVE,PROGRESS_CROSS_OBJECT_REFS,a245aM as getProgressScenesByPhase,a245aN as findProgressSceneById,a245aO as getProgressScenesByIndustry,a245aP as getProgressBuiltinPermissionByIndex,isProgressBuiltinPermission,a245aQ as inferProgressSceneFromIntent,a245aR as getAllProgressBuiltinPermissions,getProgressScenesCount,validateNamedOperatorAddressList,validateNamedOperatorCount,validateContextRepositoryCount};export{a245aS as initProgressPuzzleFromIntent,a245aT as checkProgressPuzzleCompleteness,a245aU as validateProgressConstraints,a245aV as generateProgressPuzzleConfirmationText,a245aW as resolveProgressBuiltinPermission,isOrderHolderForward,a245aX as getProgressRelevantDimensions};export{PROGRESS_TEMPLATES,PROGRESS_TEMPLATES_VERSION,getAllProgressTemplates,getProgressTemplateById,getProgressTemplatesByScene,getProgressTemplatesByIndustry,suggestProgressTemplateForScene,listProgressTemplates,fillProgressTemplate};export{PROGRESS_RISK_VERSION,assessProgressRisks,getAllProgressRiskRules};export{ARBITRATION_LEDGER_VERSION,ARBITRATION_SCENES,a245aY as ARBITRATION_BUILTIN_PERMISSIONS,ARB_STATUS_CODE,ARB_TERMINAL_STATUSES,ARB_STATUS_ALIASES,DUAL_GUARD_MATRIX,a245aZ as getArbitrationScenesByCategory,a245b0 as findArbitrationSceneById,a245b1 as findArbitrationSceneByPermissionIndex,a245b2 as getArbitrationPermissionByIndex,a245b3 as getArbitrationPermissionByName,a245b4 as isArbitrationReservedIndex,a245b5 as isArbitrationUsedPermissionIndex,a245b6 as getArbitrationActivePermissionCount,a245b7 as inferArbitrationSceneFromIntent,getDualGuardMatrixEntry,isValidArbStatusTransition,isTerminalArbStatus,a245b8 as getArbitrationScenesProducingStatus,a245b9 as getArbitrationScenesRequiringStatus,getArbitrationScenesCount,getAllArbitrationPermissions,getActiveArbitrationPermissions};export{a245ba as initArbitrationPuzzleFromIntent,a245bb as checkArbitrationPuzzleCompleteness,a245bc as validateArbitrationConstraints,a245bd as generateArbitrationPuzzleConfirmationText};export{ARBITRATION_TEMPLATES,ARBITRATION_TEMPLATES_VERSION,a245be as getAllArbitrationTemplates,a245bf as getArbitrationTemplateById,a245bg as getArbitrationTemplatesByScene,a245bh as getArbitrationTemplatesByIndustry,a245bi as suggestArbitrationTemplateForScene,a245bj as listArbitrationTemplates,a245bk as fillArbitrationTemplate};export{ARBITRATION_RISK_VERSION,assessArbitrationRisks,a245bl as getAllArbitrationRiskRules};export{REWARD_LEDGER_VERSION,REWARD_SCENES,REWARD_PERMISSIONS,REWARD_FIELDS,REWARD_GUARD_CONSTRUCTORS,REWARD_ERROR_CODES,REWARD_CROSS_OBJECT_REFS,MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD,a245bm as getRewardScenesByPhase,a245bn as findRewardSceneById,a245bo as getRewardScenesByIndustry,a245bp as getRewardBuiltinPermissionByIndex,isRewardBuiltinPermission,a245bq as getAllRewardBuiltinPermissions,getRewardScenesCount,a245br as getRewardGuardConstructorSpec,a245bs as resolveRewardGuardConstructor,getRewardErrorByCode,getRewardErrorByName,a245bt as validateRewardGuardCount,a245bu as validateRewardRecordCount,a245bv as inferRewardSceneFromIntent};export{REWARD_FIELD_MUTABILITY,a245bw as initRewardPuzzleFromIntent,a245bx as checkRewardPuzzleCompleteness,a245by as validateRewardConstraints,a245bz as generateRewardPuzzleConfirmationText,a245bA as resolveRewardBuiltinPermission,a245bB as requiresRewardGuardConfig,a245bC as requiresRewardPassport,a245bD as getRewardRelevantDimensions,a245bE as getRewardFieldMutability,a245bF as isRewardAdminMutableField,a245bG as getRewardFieldPermissionIndex};export{REWARD_RISK_VERSION,assessRewardRisks,getAllRewardRiskRules};export{PASSPORT_LEDGER_VERSION,PASSPORT_ERROR_CODES,PASSPORT_SCENARIOS,MAX_GUARD_COUNT_PASSPORT,MAX_SUBMISSION_SIZE_PASSPORT,a245bH as getAllPassportScenarios,a245bI as getPassportScenesCount,a245bJ as findPassportScenarioById,a245bK as getPassportScenariosByConsumer,a245bL as getPassportScenariosUsingRelies,a245bM as inferPassportScenarioFromIntent,impackRoleFromBoolean,impackRoleToBoolean,reliesLogicFromBoolean,reliesLogicToBoolean,a245bN as getPassportErrorName,a245bO as getPassportErrorDescription};export{PASSPORT_TEMPLATES,PASSPORT_TEMPLATES_VERSION,a245bP as getAllPassportTemplates,a245bQ as getPassportTemplateById,a245bR as getPassportTemplatesByScenario,a245bS as getPassportTemplatesByIndustry,a245bT as suggestPassportTemplateForScenario,a245bU as listPassportTemplates,a245bV as fillPassportTemplate};export{PROOF_RISK_RULES,checkProofRisks};export{REPOSITORY_RISK_RULES,checkRepositoryRisks,parseIdFromForRiskCheck};export{assessEvidenceReview,reviewEvidenceList}from'./evidence-review.js';export{DEMAND_RISK_RULES,checkDemandRisks};export{CONTACT_RISK_RULES,CONTACT_RISK_VERSION,checkContactRisks};export{RESOURCE_RISK_RULES,RESOURCE_RISK_VERSION,checkResourceRisks};export{PAYMENT_RISK_RULES,PAYMENT_RISK_VERSION,checkPaymentRisks};export{ARB_RISK_RULES,ARB_RISK_VERSION,checkArbRisks};export{PERSONAL_RISK_RULES,PERSONAL_RISK_VERSION,checkPersonalRisks};export{UTIL_RISK_RULES,UTIL_RISK_VERSION,checkUtilRisks};export{REGISTRAR_RISK_RULES,REGISTRAR_RISK_VERSION,checkRegistrarRisks};export{BRIDGE_RISK_RULES,BRIDGE_RISK_VERSION,checkBridgeRisks};export{TOOLS_REFERENCE,getToolReference,searchToolReference,getToolSequence};export{SCENARIO_MODES,SCENARIO_MODES_VERSION,MODE_COMPOSITIONS,matchScenarioMode,inferScenarioTraits,getScenarioMode,listScenarioModes,getShippedModes,getModeCompositions};export{BUILTIN_TEMPLATES,BUILTIN_TEMPLATES_VERSION,getBuiltinTemplate,listBuiltinTemplates,TEMPLATE_KEYWORDS};export{resolveTemplatesDir,seedBuiltinTemplates,reloadTemplates,listTemplates,getTemplate,a245bW as getIndustryTemplates,parseTemplateFile,renderTemplateFile,loadAndValidate,TemplateFrontmatterSchema};export{scanTemplate};export{GUARD_DESIGN_PATTERNS,GUARD_DESIGN_PATTERNS_VERSION,VERIFIER_LEVEL_GUIDANCE,getGuardDesignPattern,searchGuardDesignPatterns,getPatternsByHost,getPatternsByIndustry,getPatternsByDataSourceClass,getVerifierLevelGuidance,suggestPatternForRequirement};export function getKnowledgeBase(){return{'version':{'safety':SAFETY_RULES_VERSION,'tool_constraints':TOOL_CONSTRAINTS_VERSION,'reward_templates':REWARD_TEMPLATES_VERSION,'audit_rules':AUDIT_RULES_VERSION,'dynamic_pricing':DYNAMIC_PRICING_VERSION,'reputation_rules':REPUTATION_RULES_VERSION,'acquisition_flywheel':ACQUISITION_FLYWHEEL_VERSION,'industry_registry':INDUSTRY_REGISTRY_VERSION,'flywheel_loop':FLYWHEEL_LOOP_VERSION,'machine_ledger':MACHINE_LEDGER_VERSION,'machine_templates':MACHINE_TEMPLATES_VERSION,'machine_translation':MACHINE_TRANSLATION_VERSION,'machine_risk':MACHINE_RISK_VERSION,'machine_topology':MACHINE_TOPOLOGY_VERSION,'machine_puzzle':MACHINE_PUZZLE_VERSION,'service_ledger':SERVICE_LEDGER_VERSION,'service_risk':SERVICE_RISK_VERSION,'service_templates':SERVICE_TEMPLATES_VERSION,'allocation_ledger':ALLOCATION_LEDGER_VERSION,'allocation_puzzle':ALLOCATION_PUZZLE_VERSION,'allocation_risk':ALLOCATION_RISK_VERSION,'allocation_templates':ALLOCATION_TEMPLATES_VERSION,'treasury_ledger':TREASURY_LEDGER_VERSION,'treasury_templates':TREASURY_TEMPLATES_VERSION,'treasury_risk':TREASURY_RISK_VERSION,'order_ledger':ORDER_LEDGER_VERSION,'order_templates':ORDER_TEMPLATES_VERSION,'order_risk':ORDER_RISK_VERSION,'progress_ledger':PROGRESS_LEDGER_VERSION,'progress_templates':PROGRESS_TEMPLATES_VERSION,'progress_risk':PROGRESS_RISK_VERSION,'arbitration_ledger':ARBITRATION_LEDGER_VERSION,'arbitration_templates':ARBITRATION_TEMPLATES_VERSION,'arbitration_risk':ARBITRATION_RISK_VERSION,'reward_ledger':REWARD_LEDGER_VERSION,'reward_risk':REWARD_RISK_VERSION,'passport_ledger':PASSPORT_LEDGER_VERSION,'passport_templates':PASSPORT_TEMPLATES_VERSION,'contact_risk':CONTACT_RISK_VERSION,'resource_risk':RESOURCE_RISK_VERSION,'payment_risk':PAYMENT_RISK_VERSION,'arb_risk':ARB_RISK_VERSION,'personal_risk':PERSONAL_RISK_VERSION,'util_risk':UTIL_RISK_VERSION,'registrar_risk':REGISTRAR_RISK_VERSION,'bridge_risk':BRIDGE_RISK_VERSION,'scenario_modes':SCENARIO_MODES_VERSION,'guard_design_patterns':GUARD_DESIGN_PATTERNS_VERSION,'builtin_templates':BUILTIN_TEMPLATES_VERSION},'confirmation_rules':CONFIRMATION_RULES['length'],'confirmation_rule_ids':CONFIRMATION_RULES['map'](a=>a['id']),'tool_constraints_count':TOOL_CONSTRAINTS['length'],'reward_templates_count':REWARD_TEMPLATES['length'],'audit_rules_count':AUDIT_RULES['length'],'mutable_fields_count':MUTABLE_FIELDS['length'],'industry_flywheels_count':INDUSTRY_FLYWHEELS['length'],'industry_registry_count':getRegistrySize(),'intent_count':listIntents()['length'],'guard_scenes_count':GUARD_SCENES['length'],'guard_semantic_rules_count':SEMANTIC_TO_SCHEMA_RULES['length'],'guard_schema_rules_count':SCHEMA_TO_SEMANTIC_RULES['length'],'guard_constraint_rules_count':GUARD_CONSTRAINT_RULES['length'],'guard_risk_rules_count':getRiskRulesCount(),'guard_templates_count':GUARD_TEMPLATES_COUNT,'guard_lint_enabled':!![],'machine_scenes_count':MACHINE_SCENES_COUNT,'machine_templates_count':MACHINE_TEMPLATES['length'],'machine_patterns_count':SEMANTIC_TO_MACHINE_RULES['length'],'machine_constraint_rules_count':MACHINE_CONSTRAINT_RULES['length'],'machine_risk_rules_count':MACHINE_RISK_RULES['length'],'machine_on_chain_limits':{'max_node_count':MAX_NODE_COUNT,'max_node_pair_count':MAX_NODE_PAIR_COUNT,'max_forward_count':MAX_FORWARD_COUNT},'service_scenes_count':SERVICE_SCENES['length'],'service_permissions_count':SERVICE_PERMISSIONS['length'],'service_order_flow_stages_count':SERVICE_ORDER_FLOW_STAGES['length'],'service_cross_object_bindings_count':SERVICE_CROSS_OBJECT_BINDINGS['length'],'service_risk_rules_count':getAllServiceRiskRules()['length'],'service_templates_count':SERVICE_TEMPLATES['length'],'service_context_enabled':!![],'allocation_scenes_count':ALLOCATION_SCENES['length'],'allocation_risk_rules_count':a245L()['length'],'allocation_templates_count':ALLOCATION_TEMPLATES['length'],'allocation_context_enabled':!![],'treasury_scenes_count':TREASURY_SCENES['length'],'treasury_builtin_permissions_count':a245T['length'],'treasury_risk_rules_count':getAllTreasuryRiskRules()['length'],'treasury_templates_count':TREASURY_TEMPLATES['length'],'treasury_context_enabled':!![],'order_scenes_count':ORDER_SCENES['length'],'order_fields_count':ORDER_FIELDS['length'],'order_states_count':ORDER_STATES['length'],'order_lifecycle_events_count':ORDER_LIFECYCLE_EVENTS['length'],'order_risk_rules_count':getAllOrderRiskRules()['length'],'order_templates_count':ORDER_TEMPLATES['length'],'order_context_enabled':!![],'progress_scenes_count':PROGRESS_SCENES['length'],'progress_builtin_permissions_count':a245aL['length'],'progress_risk_rules_count':getAllProgressRiskRules()['length'],'progress_templates_count':PROGRESS_TEMPLATES['length'],'progress_context_enabled':!![],'arbitration_scenes_count':ARBITRATION_SCENES['length'],'arbitration_builtin_permissions_count':a245aY['length'],'arbitration_risk_rules_count':a245bl()['length'],'arbitration_templates_count':ARBITRATION_TEMPLATES['length'],'arbitration_context_enabled':!![],'reward_scenes_count':REWARD_SCENES['length'],'reward_builtin_permissions_count':REWARD_PERMISSIONS['length'],'reward_fields_count':REWARD_FIELDS['length'],'reward_guard_constructors_count':REWARD_GUARD_CONSTRUCTORS['length'],'reward_error_codes_count':REWARD_ERROR_CODES['length'],'reward_risk_rules_count':getAllRewardRiskRules()['length'],'reward_context_enabled':!![],'passport_scenarios_count':PASSPORT_SCENARIOS['length'],'passport_max_guard_count':MAX_GUARD_COUNT_PASSPORT,'passport_max_submission_size':MAX_SUBMISSION_SIZE_PASSPORT,'passport_templates_count':PASSPORT_TEMPLATES['length'],'passport_context_enabled':!![],'proof_risk_rules_count':PROOF_RISK_RULES['length'],'repository_risk_rules_count':REPOSITORY_RISK_RULES['length'],'demand_risk_rules_count':DEMAND_RISK_RULES['length'],'contact_risk_rules_count':CONTACT_RISK_RULES['length'],'resource_risk_rules_count':RESOURCE_RISK_RULES['length'],'payment_risk_rules_count':PAYMENT_RISK_RULES['length'],'arb_risk_rules_count':ARB_RISK_RULES['length'],'personal_risk_rules_count':PERSONAL_RISK_RULES['length'],'util_risk_rules_count':UTIL_RISK_RULES['length'],'registrar_risk_rules_count':REGISTRAR_RISK_RULES['length'],'bridge_risk_rules_count':BRIDGE_RISK_RULES['length'],'tools_reference_count':TOOLS_REFERENCE['length'],'scenario_modes_count':SCENARIO_MODES['length'],'scenario_mode_compositions_count':MODE_COMPOSITIONS['length'],'builtin_templates_count':BUILTIN_TEMPLATES['length'],'guard_design_patterns_count':GUARD_DESIGN_PATTERNS['length'],'verifier_level_guidance_count':VERIFIER_LEVEL_GUIDANCE['length']};}export{buildWorkflowGuidance,buildWorkflowReceipt,enrichWorkflowGuidance,mergeGuidanceIntoOutput,resolvePermissionRole,resolveLocalNamesFor,listLocalAccounts,accountCanExecuteForward,enumerateActionableForwards,forwardOperatorKind};export{buildWorkspaceLists}from'./workspace-lists.js';export{resolveSupplyChainGraph}from'./supply-chain.js';export{enumerateObjectOperations,operationCategoryOf,operationComplexityOf,isPermissionIndexType}from'./operation-dictionary.js';export{enumerateServices,enumerateDemands,enumerateArbs}from'./jsonrpc-enum.js';export{FIELD_MUTABILITY_RULES,LOCK_CONSTRAINTS,IRREVERSIBLE_OPERATIONS,STATE_MACHINE_TERMINALS,NUMERIC_LIMIT_CONSTRAINTS,EXTERNAL_ACCESS_MECHANISMS,fieldMutabilityOf,isActionForbidden,lockConstraintOf,numericLimitOf,externalAccessOf}from'./contract-invariants.js';export{GUARD_FIELD_COGNITION_VERSION,GUARD_FIELD_SITES,VALUE_ORIGIN_SEMANTICS,GUARD_PASSPORT_DOCTRINE,guardSitesFor,guardCognitionDoctrine,REPOSITORY_WRITE_ROUTE_MATRIX,repositoryRouteSlotConflicts}from'./guard-field-cognition.js';
1
+ import{buildWorkflowGuidance,buildWorkflowReceipt,enrichWorkflowGuidance,mergeGuidanceIntoOutput,resolvePermissionRole,resolveLocalNamesFor,listLocalAccounts,accountCanExecuteForward,enumerateActionableForwards,forwardOperatorKind}from'./workflow-guidance.js';import{CONFIRMATION_RULES,SAFETY_RULES_VERSION,OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,classifyTool,NAMING_CONVENTIONS,checkObjectReuseRules,checkImmutabilityRules}from'./safety-rules.js';import{TOOL_CONSTRAINTS,TOOL_CONSTRAINTS_VERSION,validateOperation,hasBlockingViolations,getWarningViolations}from'./tool-constraints.js';import{REWARD_TEMPLATES,REWARD_TEMPLATES_VERSION,getRewardTemplate,listRewardTemplates,suggestRewardTemplate}from'./reward-templates.js';import{AUDIT_RULES,AUDIT_RULES_VERSION,auditService,hasBlockingErrors,getErrors,getWarnings,summarizeFindings}from'./audit-rules.js';import{suggestPricing,MUTABLE_FIELDS,DYNAMIC_PRICING_VERSION}from'./dynamic-pricing.js';import{computeReviewStats,isVerifiedReview,filterVerifiedReviews,detectReviewManipulation,REPUTATION_RULES_VERSION}from'./reputation-rules.js';import{INDUSTRY_FLYWHEELS,getFlywheelForIndustry,listIndustries,suggestAcquisitionActions,generateTrustDescription,buildAcquisitionDashboard,ACQUISITION_FLYWHEEL_VERSION}from'./acquisition-flywheel.js';import{INDUSTRY_REGISTRY_VERSION,getIndustryProfile,registerIndustry,getIndustryTraits,resolveIndustryName,isRegisteredIndustry,getRegistrySize,listBuiltinIndustryNames}from'./industry-registry.js';import{DEFAULT_TRAITS,inferTraitsFromDescription,synthesizeProfile,findSimilarIndustries,composeIndustries,INDUSTRY_REQUIRED_TRAITS,DOMAIN_PRIORS,detectDomainPriors,traitContradictions,filterConsistentIndustries}from'./industry-generalizer.js';import{INDUSTRY_EVOLUTION_THRESHOLDS,aggregateIndustryMetrics,evaluateIndustryHealth,suggestIndustryUpdate,applyIndustryUpdate,runIndustryHealthPipeline}from'./industry-evolution.js';import{FLYWHEEL_LOOP_VERSION,FLYWHEEL_LOOP_MIN_SIGNALS,recordIndustrySignal,updateIndustryCognition,injectEvolutionContext}from'./flywheel-loop.js';import{BUILTIN_INTENT_SPECS,registerIntentProfile,getIntentProfile,listIntents,evaluateIndustryHealthByIntent,suggestIndustryUpdateByIntent,evaluateIndustryHealthMultiIntent,getRoleAdvice,filterSuggestionsByRole}from'./intent-metrics.js';import{GUARD_SCENES,findScene,inferSceneFromAction,getImmutableScenes,getNumericIdentifierScenes}from'./guard-ledger.js';import{SEMANTIC_TO_SCHEMA_RULES,SCHEMA_TO_SEMANTIC_RULES,GUARD_CONSTRAINT_RULES,matchSemanticPattern,explainNode,explainWitness,getConstraintsByCategory}from'./guard-translation.js';import{checkPuzzleCompleteness,generateConfirmationText,initPuzzleFromIntent,inferBindingFromAction,emptyDataSources,getWitnessInfo,WITNESS_NAME_MAP}from'./guard-puzzle.js';import{runGuardRulePack,assembleGuardAssessment,getRiskRulesCount}from'./guard-risk.js';import{evaluateGuardDraft}from'./guard-eval.js';import{GUARD_BINDING_REGISTRY,GUARD_BINDINGS_VERSION,OWNER_RECEIVE_COGNITION,getGuardBindingsByObject,getGuardBinding,summarizeGuardBinding}from'./guard-bindings.js';import{SCENARIO_BRIDGE_REGISTRY,SCENARIO_CHAINS,SCENARIO_TOPOLOGY_VERSION,getBridgeById,getBridgeByCode,getBridgesByObject,getBridgesForEdge,detectBridgesForEdges,getChainById,summarizeBridge,detectBridgesForObjects}from'./scenario-topology.js';import{GUARD_TEMPLATES,GUARD_TEMPLATES_VERSION,GUARD_TEMPLATES_COUNT,getTemplatesByScene,getTemplateById,getTemplatesByIndustry,getTemplatesByPattern,listGuardTemplates,suggestTemplateForScene,getTemplateParameters,validateTemplateParams}from'./guard-templates.js';import{lintGuard,autoFixGuard,isGuardReady,getGuardErrors,formatLintResult}from'./guard-lint.js';import{MACHINE_SCENES,MACHINE_LEDGER_VERSION,MACHINE_SCENES_COUNT,findScene as a269a,getScenesByIndustry as a269b,getScenesByPattern,inferSceneFromFlow}from'./machine-ledger.js';import{MACHINE_TEMPLATES,MACHINE_TEMPLATES_VERSION,MACHINE_TEMPLATES_COUNT,getAllTemplates as a269c,getTemplateById as a269d,getTemplatesByScene as a269e,getTemplatesByIndustry as a269f,suggestTemplateForIntent,walkDecisionTree,fillTemplate as a269g,forkTemplate as a269h,verifyTemplateSceneReferences,getReferencedGuardTemplateIds,getReferencedRiskIds}from'./machine-templates.js';import{SEMANTIC_TO_MACHINE_RULES,MACHINE_CONSTRAINT_RULES,MACHINE_TRANSLATION_VERSION,MACHINE_PATTERNS_COUNT,MACHINE_CONSTRAINTS_COUNT,matchSemanticPattern as a269i,identifyExecutionMode,identifyTopology,explainForwardPermission,getConstraintsByCategory as a269j,getConstraintById,getOnChainConstraints as a269k,getOffChainConstraints as a269l}from'./machine-translation.js';import{MACHINE_RISK_RULES,MACHINE_RISK_VERSION,assessMachineRisks}from'./machine-risk.js';import{analyzeTopology,identifyTopologyPattern,formatTopologySummary,MACHINE_TOPOLOGY_VERSION,MAX_NODE_COUNT,MAX_NODE_PAIR_COUNT,MAX_FORWARD_COUNT}from'./machine-topology.js';import{initPuzzleFromIntent as a269m,initPuzzleFromTemplate,checkPuzzleCompleteness as a269n,recommendNextStep as a269o,derivePuzzleFromMachineJson,generateConfirmationText as a269p,MACHINE_PUZZLE_VERSION}from'./machine-puzzle.js';import{SERVICE_SCENES,SERVICE_LEDGER_VERSION,SERVICE_PERMISSIONS,SERVICE_ORDER_FLOW_STAGES,SERVICE_CROSS_OBJECT_BINDINGS,getScenesByCategory as a269q,findSceneById as a269r,getServicePermissionByIndex,isServicePermission,getPermissionsByMutability,getImmutablePostPublishPermissions,getLockedByDurationPermissions,inferSceneFromIntent as a269s,getAllServiceScenes,getServiceScenesCount,getServicePermissionsCount,getOrderFlowStage,getCrossObjectBindings as a269t}from'./service-ledger.js';import{initPuzzleFromIntent as a269u,checkPuzzleCompleteness as a269v,validateConstraints as a269w,generateConfirmationText as a269x,initOrderFlowPuzzle,checkOrderFlowCompleteness}from'./service-puzzle.js';import{SERVICE_RISK_VERSION,assessServiceRisks,getAllServiceRiskRules}from'./service-risk.js';import{SERVICE_TEMPLATES,SERVICE_TEMPLATES_VERSION,getServiceTemplateById,getServiceTemplatesByScene,getServiceTemplatesByIndustry,suggestServiceTemplateForScene,listServiceTemplates,fillServiceTemplate,getAllServiceTemplates}from'./service-templates.js';import{ALLOCATION_SCENES,ALLOCATION_LEDGER_VERSION,MAX_ALLOCATOR_COUNT,ALLOCATION_MAX_SHARING_COUNT,ALLOCATION_MODE_AMOUNT,ALLOCATION_MODE_RATE,ALLOCATION_MODE_SURPLUS,RATE_TOTAL_FULL,ALLOCATION_ERROR_CODES,getScenesByTriggerSource as a269y,getScenesByMode as a269z,getScenesByStrategy as a269A,findSceneById as a269B,inferSceneFromIntent as a269C,getAllScenes as a269D,getScenesCount as a269E,allocationModeToNumber,allocationModeFromNumber,getRecipientType,isSignerRecipient,isEntityRecipient,isGuardIdentifierRecipient,getErrorName as a269F,getErrorDescription as a269G}from'./allocation-ledger.js';import{initPuzzleFromIntent as a269H,checkPuzzleCompleteness as a269I,validateConstraints as a269J,generateConfirmationText as a269K,buildDefaultAllocFlow,buildDefaultRecipientRules,buildDefaultLogicPuzzle,ALLOCATION_PUZZLE_VERSION}from'./allocation-puzzle.js';import{ALLOCATION_RISK_VERSION,assessAllocationRisks,getAllRiskRules as a269L}from'./allocation-risk.js';import{ALLOCATION_TEMPLATES,ALLOCATION_TEMPLATES_VERSION,getAllTemplates as a269M,getTemplateById as a269N,getTemplatesByScene as a269O,getTemplatesByIndustry as a269P,suggestTemplateForScene as a269Q,listTemplates as a269R,fillTemplate as a269S}from'./allocation-templates.js';import{RECIPIENT_CONSTRAINT_VERSION,classifyRecipient,analyzeRecipientConstraints,isUnboundSignerTheft,canonicalDoctrine,recipientDesignGuidance,derivePayoffFromSharing,OBJECT_DRIVEABILITY,driveabilityOf,RECIPIENT_DESIGN_OPTIONS}from'./recipient-constraint.js';import{paymentRelations,scanRecentPaymentEvents,resolveBeneficialOwners,extractionPlanForHolder,pendingWrappersAt,trackAccountPayments}from'./payment-tracker.js';import{TREASURY_LEDGER_VERSION,TREASURY_SCENES,TREASURY_PERMISSIONS as a269T,getScenesByHostObject as a269U,findSceneById as a269V,findSceneByPermissionIndex as a269W,getBuiltinPermissionByIndex as a269X,isBuiltinTreasuryPermission,getActiveBuiltinPermissions as a269Y,getReservedBuiltinPermissions as a269Z,inferSceneFromIntent as a269a0,getTreasuryScenesCount,getGovernedOperationsForPermissionIndex as a269a1}from'./treasury-ledger.js';import{initPuzzleFromIntent as a269a2,checkPuzzleCompleteness as a269a3,validateConstraints as a269a4,generateConfirmationText as a269a5,MAX_EXTERNAL_DEPOSIT_GUARD_COUNT,MAX_EXTERNAL_WITHDRAW_GUARD_COUNT,MAX_DESCRIPTION_LENGTH as a269a6}from'./treasury-puzzle.js';import{TREASURY_TEMPLATES,TREASURY_TEMPLATES_VERSION,getAllTreasuryTemplates,getTemplateById as a269a7,getTemplatesByScene as a269a8,getTemplatesByIndustry as a269a9,suggestTemplateForScene as a269aa,listTemplates as a269ab,fillTemplate as a269ac}from'./treasury-templates.js';import{TREASURY_RISK_VERSION,assessTreasuryRisks,getAllTreasuryRiskRules}from'./treasury-risk.js';import{ORDER_LEDGER_VERSION,ORDER_SCENES,ORDER_FIELDS,ORDER_STATES,ORDER_STATE_TRANSITIONS,ORDER_LIFECYCLE_EVENTS,ORDER_PERMISSION_MATRIX,ORDER_AUDIT_FORMULAS,getScenesByOperationField as a269ad,findSceneById as a269ae,findSceneByMoveEntry as a269af,getScenesByPermissionLayer as a269ag,getScenesByReversibility as a269ah,getFieldDef as a269ai,getMutableFields as a269aj,getImmutableFields as a269ak,getFrozenAfterProgressFields as a269al,getOneTimeSetFields as a269am,inferSceneFromIntent as a269an,getEmittedEvents as a269ao,getInferredEvents as a269ap,getOrderScenesCount,sdkToMoveField as a269aq,moveToSdkField as a269ar}from'./order-ledger.js';import{initPuzzleFromIntent as a269as,checkPuzzleCompleteness as a269at,validateConstraints as a269au,generateConfirmationText as a269av,verifySnapshotMechanism as a269aw,inferLifecyclePhase as a269ax,matchSceneFromPuzzle as a269ay,listAllScenes as a269az,lookupScene as a269aA}from'./order-puzzle.js';import{ORDER_TEMPLATES,ORDER_TEMPLATES_VERSION,ORDER_TEMPLATES_COUNT,getAllOrderTemplates,getTemplateById as a269aB,getTemplatesByScene as a269aC,getTemplatesByIndustry as a269aD,getTemplatesByPermissionLayer as a269aE,getIrreversibleTemplates as a269aF,suggestTemplateForScene as a269aG,listOrderTemplates,fillTemplate as a269aH,suggestTemplateFromIntent as a269aI,getTemplateParameters as a269aJ,validateTemplateParams as a269aK}from'./order-templates.js';import{ORDER_RISK_VERSION,assessOrderRisks,getAllOrderRiskRules}from'./order-risk.js';import{PROGRESS_LEDGER_VERSION,PROGRESS_SCENES,PROGRESS_PERMISSIONS as a269aL,PROGRESS_NEW,PROGRESS_NAMED_OPERATOR,PROGRESS_TASK,PROGRESS_CONTEXT_REPOSITORY,PROGRESS_UNHOLD,PROGRESS_OWNER_RECEIVE,PROGRESS_CROSS_OBJECT_REFS,getScenesByPhase as a269aM,findSceneById as a269aN,getScenesByIndustry as a269aO,getBuiltinPermissionByIndex as a269aP,isProgressBuiltinPermission,inferSceneFromIntent as a269aQ,getAllBuiltinPermissions as a269aR,getProgressScenesCount,validateNamedOperatorAddressList,validateNamedOperatorCount,validateContextRepositoryCount}from'./progress-ledger.js';import{initPuzzleFromIntent as a269aS,checkPuzzleCompleteness as a269aT,validateConstraints as a269aU,generateConfirmationText as a269aV,resolveBuiltinPermission as a269aW,isOrderHolderForward,getRelevantDimensions as a269aX}from'./progress-puzzle.js';import{PROGRESS_TEMPLATES,PROGRESS_TEMPLATES_VERSION,getAllProgressTemplates,getProgressTemplateById,getProgressTemplatesByScene,getProgressTemplatesByIndustry,suggestProgressTemplateForScene,listProgressTemplates,fillProgressTemplate}from'./progress-templates.js';import{PROGRESS_RISK_VERSION,assessProgressRisks,getAllProgressRiskRules}from'./progress-risk.js';import{ARBITRATION_LEDGER_VERSION,ARBITRATION_SCENES,ARBITRATION_PERMISSIONS as a269aY,ARB_STATUS_CODE,ARB_TERMINAL_STATUSES,ARB_STATUS_ALIASES,DUAL_GUARD_MATRIX,getScenesByCategory as a269aZ,findSceneById as a269b0,findSceneByPermissionIndex as a269b1,getPermissionByIndex as a269b2,getPermissionByName as a269b3,isReservedIndex as a269b4,isUsedPermissionIndex as a269b5,getActivePermissionCount as a269b6,inferSceneFromIntent as a269b7,getDualGuardMatrixEntry,isValidArbStatusTransition,isTerminalArbStatus,getScenesProducingStatus as a269b8,getScenesRequiringStatus as a269b9,getArbitrationScenesCount,getAllArbitrationPermissions,getActiveArbitrationPermissions}from'./arbitration-ledger.js';import{initPuzzleFromIntent as a269ba,checkPuzzleCompleteness as a269bb,validateConstraints as a269bc,generateConfirmationText as a269bd}from'./arbitration-puzzle.js';import{ARBITRATION_TEMPLATES,ARBITRATION_TEMPLATES_VERSION,getAllTemplates as a269be,getTemplateById as a269bf,getTemplatesByScene as a269bg,getTemplatesByIndustry as a269bh,suggestTemplateForScene as a269bi,listTemplates as a269bj,fillTemplate as a269bk}from'./arbitration-templates.js';import{ARBITRATION_RISK_VERSION,assessArbitrationRisks,getAllRiskRules as a269bl}from'./arbitration-risk.js';import{REWARD_LEDGER_VERSION,REWARD_SCENES,REWARD_PERMISSIONS,REWARD_FIELDS,REWARD_GUARD_CONSTRUCTORS,REWARD_ERROR_CODES,REWARD_CROSS_OBJECT_REFS,MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD,getScenesByPhase as a269bm,findSceneById as a269bn,getScenesByIndustry as a269bo,getBuiltinPermissionByIndex as a269bp,isRewardBuiltinPermission,getAllBuiltinPermissions as a269bq,getRewardScenesCount,getGuardConstructorSpec as a269br,resolveGuardConstructor as a269bs,getRewardErrorByCode,getRewardErrorByName,validateGuardCount as a269bt,validateRecordCount as a269bu,inferSceneFromIntent as a269bv}from'./reward-ledger.js';import{REWARD_FIELD_MUTABILITY,initPuzzleFromIntent as a269bw,checkPuzzleCompleteness as a269bx,validateConstraints as a269by,generateConfirmationText as a269bz,resolveBuiltinPermission as a269bA,requiresGuardConfig as a269bB,requiresPassport as a269bC,getRelevantDimensions as a269bD,getFieldMutability as a269bE,isAdminMutableField as a269bF,getFieldPermissionIndex as a269bG}from'./reward-puzzle.js';import{REWARD_RISK_VERSION,assessRewardRisks,getAllRewardRiskRules}from'./reward-risk.js';import{PASSPORT_LEDGER_VERSION,PASSPORT_ERROR_CODES,PASSPORT_SCENARIOS,MAX_GUARD_COUNT_PASSPORT,MAX_SUBMISSION_SIZE_PASSPORT,getAllScenarios as a269bH,getScenariosCount as a269bI,findScenarioById as a269bJ,getScenariosByConsumer as a269bK,getScenariosUsingRelies as a269bL,inferScenarioFromIntent as a269bM,impackRoleFromBoolean,impackRoleToBoolean,reliesLogicFromBoolean,reliesLogicToBoolean,getErrorName as a269bN,getErrorDescription as a269bO}from'./passport-ledger.js';import{PASSPORT_TEMPLATES,PASSPORT_TEMPLATES_VERSION,getAllTemplates as a269bP,getTemplateById as a269bQ,getTemplatesByScenario as a269bR,getTemplatesByIndustry as a269bS,suggestTemplateForScenario as a269bT,listTemplates as a269bU,fillTemplate as a269bV}from'./passport-templates.js';import{PROOF_RISK_RULES,checkProofRisks}from'./proof-risk.js';import{REPOSITORY_RISK_RULES,checkRepositoryRisks,parseIdFromForRiskCheck}from'./repository-risk.js';import{DEMAND_RISK_RULES,checkDemandRisks}from'./demand-risk.js';import{CONTACT_RISK_RULES,CONTACT_RISK_VERSION,checkContactRisks}from'./contact-risk.js';import{RESOURCE_RISK_RULES,RESOURCE_RISK_VERSION,checkResourceRisks}from'./resource-risk.js';import{PAYMENT_RISK_RULES,PAYMENT_RISK_VERSION,checkPaymentRisks}from'./payment-risk.js';import{ARB_RISK_RULES,ARB_RISK_VERSION,checkArbRisks}from'./arb-risk.js';import{PERSONAL_RISK_RULES,PERSONAL_RISK_VERSION,checkPersonalRisks}from'./personal-risk.js';import{UTIL_RISK_RULES,UTIL_RISK_VERSION,checkUtilRisks}from'./util-risk.js';import{REGISTRAR_RISK_RULES,REGISTRAR_RISK_VERSION,checkRegistrarRisks}from'./registrar-risk.js';import{BRIDGE_RISK_RULES,BRIDGE_RISK_VERSION,checkBridgeRisks}from'./bridge-risk.js';import{TOOLS_REFERENCE,getToolReference,searchToolReference,getToolSequence}from'./tools-reference.js';import{SCENARIO_MODES,SCENARIO_MODES_VERSION,MODE_COMPOSITIONS,matchScenarioMode,inferScenarioTraits,getScenarioMode,listScenarioModes,getShippedModes,getModeCompositions}from'./scenario-modes.js';import{BUILTIN_TEMPLATES,BUILTIN_TEMPLATES_VERSION,getBuiltinTemplate,listBuiltinTemplates,TEMPLATE_KEYWORDS}from'./builtin-templates.js';import{resolveTemplatesDir,seedBuiltinTemplates,reloadTemplates,listTemplates,getTemplate,getTemplatesByIndustry as a269bW,parseTemplateFile,renderTemplateFile,loadAndValidate,TemplateFrontmatterSchema}from'./template-loader.js';import{scanTemplate}from'./template-scanner.js';import{GUARD_DESIGN_PATTERNS,GUARD_DESIGN_PATTERNS_VERSION,VERIFIER_LEVEL_GUIDANCE,getGuardDesignPattern,searchGuardDesignPatterns,getPatternsByHost,getPatternsByIndustry,getPatternsByDataSourceClass,getVerifierLevelGuidance,suggestPatternForRequirement}from'./guard-design-patterns.js';export{CONFIRMATION_RULES,SAFETY_RULES_VERSION,OBJECT_REUSE_RULES,CREATE_VS_MODIFY_PATTERN,IMMUTABILITY_RULES,OPERATION_TYPE_CLASSIFICATION,OPERATION_CLASS_META,classifyTool,NAMING_CONVENTIONS,checkObjectReuseRules,checkImmutabilityRules};export{TOOL_CONSTRAINTS,TOOL_CONSTRAINTS_VERSION,validateOperation,hasBlockingViolations,getWarningViolations};export{REWARD_TEMPLATES,REWARD_TEMPLATES_VERSION,getRewardTemplate,listRewardTemplates,suggestRewardTemplate};export{AUDIT_RULES,AUDIT_RULES_VERSION,auditService,hasBlockingErrors,getErrors,getWarnings,summarizeFindings};export{suggestPricing,MUTABLE_FIELDS,DYNAMIC_PRICING_VERSION};export{computeReviewStats,isVerifiedReview,filterVerifiedReviews,detectReviewManipulation,REPUTATION_RULES_VERSION};export{INDUSTRY_FLYWHEELS,getFlywheelForIndustry,listIndustries,suggestAcquisitionActions,generateTrustDescription,buildAcquisitionDashboard,ACQUISITION_FLYWHEEL_VERSION};export{STRATEGY_MANUAL_FILENAME,STRATEGY_MANUAL_VERSION,renderStrategyManual,parseManualSentinel,classifyManualFile,getBuiltinStrategyManual,listBuiltinStrategyManualIndustries}from'./strategy-manuals.js';export{INDUSTRY_STRATEGIES,getIndustryStrategy,listIndustryStrategies,registerIndustryStrategy,unregisterIndustryStrategy,recommendStrategy,stageFromOrderCount,validateStrategyLevers}from'./industry-strategy.js';export{INDUSTRY_REGISTRY_VERSION,getIndustryProfile,listIndustries as listRegistryIndustries,registerIndustry,getIndustryTraits,resolveIndustryName,isRegisteredIndustry,getRegistrySize,listBuiltinIndustryNames};export{DEFAULT_TRAITS,inferTraitsFromDescription,synthesizeProfile,findSimilarIndustries,composeIndustries,INDUSTRY_REQUIRED_TRAITS,DOMAIN_PRIORS,detectDomainPriors,traitContradictions,filterConsistentIndustries};export{INDUSTRY_EVOLUTION_THRESHOLDS,aggregateIndustryMetrics,evaluateIndustryHealth,suggestIndustryUpdate,applyIndustryUpdate,runIndustryHealthPipeline};export{FLYWHEEL_LOOP_VERSION,FLYWHEEL_LOOP_MIN_SIGNALS,recordIndustrySignal,updateIndustryCognition,injectEvolutionContext};export{BUILTIN_INTENT_SPECS,registerIntentProfile,getIntentProfile,listIntents,evaluateIndustryHealthByIntent,suggestIndustryUpdateByIntent,evaluateIndustryHealthMultiIntent,getRoleAdvice,filterSuggestionsByRole};export{GUARD_SCENES,findScene,inferSceneFromAction,getImmutableScenes,getNumericIdentifierScenes};export{SEMANTIC_TO_SCHEMA_RULES,SCHEMA_TO_SEMANTIC_RULES,GUARD_CONSTRAINT_RULES,matchSemanticPattern,explainNode,explainWitness,getConstraintsByCategory};export{checkPuzzleCompleteness,generateConfirmationText,initPuzzleFromIntent,inferBindingFromAction,emptyDataSources,getWitnessInfo,WITNESS_NAME_MAP};export{runGuardRulePack,assembleGuardAssessment,evaluateGuardDraft,getRiskRulesCount,GUARD_TEMPLATES,GUARD_TEMPLATES_VERSION,GUARD_TEMPLATES_COUNT,getTemplatesByScene,getTemplateById,getTemplatesByIndustry,getTemplatesByPattern,listGuardTemplates,suggestTemplateForScene,getTemplateParameters,validateTemplateParams,GUARD_BINDING_REGISTRY,GUARD_BINDINGS_VERSION,OWNER_RECEIVE_COGNITION,getGuardBindingsByObject,getGuardBinding,summarizeGuardBinding,SCENARIO_BRIDGE_REGISTRY,SCENARIO_CHAINS,SCENARIO_TOPOLOGY_VERSION,getBridgeById,getBridgeByCode,getBridgesByObject,getBridgesForEdge,detectBridgesForEdges,getChainById,summarizeBridge,detectBridgesForObjects,lintGuard,autoFixGuard,isGuardReady,getGuardErrors,formatLintResult};export{MACHINE_SCENES,MACHINE_LEDGER_VERSION,MACHINE_SCENES_COUNT,a269a as findMachineScene,a269b as getMachineScenesByIndustry,getScenesByPattern,inferSceneFromFlow};export{MACHINE_TEMPLATES,MACHINE_TEMPLATES_VERSION,MACHINE_TEMPLATES_COUNT,a269c as getAllMachineTemplates,a269d as getMachineTemplateById,a269e as getMachineTemplatesByScene,a269f as getMachineTemplatesByIndustry,suggestTemplateForIntent,walkDecisionTree,a269g as fillMachineTemplate,a269h as forkMachineTemplate,verifyTemplateSceneReferences,getReferencedGuardTemplateIds,getReferencedRiskIds};export{SEMANTIC_TO_MACHINE_RULES,MACHINE_CONSTRAINT_RULES,MACHINE_TRANSLATION_VERSION,MACHINE_PATTERNS_COUNT,MACHINE_CONSTRAINTS_COUNT,a269i as matchMachinePattern,identifyExecutionMode,identifyTopology,explainForwardPermission,a269j as getMachineConstraintsByCategory,getConstraintById,a269k as getOnChainMachineConstraints,a269l as getOffChainMachineConstraints};export{MACHINE_RISK_RULES,MACHINE_RISK_VERSION,assessMachineRisks};export{analyzeTopology,identifyTopologyPattern,formatTopologySummary,MACHINE_TOPOLOGY_VERSION,MAX_NODE_COUNT,MAX_NODE_PAIR_COUNT,MAX_FORWARD_COUNT};export{a269m as initMachinePuzzleFromIntent,initPuzzleFromTemplate,a269n as checkMachinePuzzleCompleteness,a269o as recommendMachineNextStep,derivePuzzleFromMachineJson,a269p as generateMachineConfirmationText,MACHINE_PUZZLE_VERSION};export{SERVICE_SCENES,SERVICE_LEDGER_VERSION,SERVICE_PERMISSIONS,SERVICE_ORDER_FLOW_STAGES,SERVICE_CROSS_OBJECT_BINDINGS,a269q as getServiceScenesByCategory,a269r as findServiceSceneById,getServicePermissionByIndex,isServicePermission,getPermissionsByMutability,getImmutablePostPublishPermissions,getLockedByDurationPermissions,a269s as inferServiceSceneFromIntent,getAllServiceScenes,getServiceScenesCount,getServicePermissionsCount,getOrderFlowStage,a269t as getServiceCrossObjectBindings};export{a269u as initServicePuzzleFromIntent,a269v as checkServicePuzzleCompleteness,a269w as validateServiceConstraints,a269x as generateServicePuzzleConfirmationText,initOrderFlowPuzzle,checkOrderFlowCompleteness};export{SERVICE_RISK_VERSION,assessServiceRisks,getAllServiceRiskRules};export{SERVICE_TEMPLATES,SERVICE_TEMPLATES_VERSION,getServiceTemplateById,getServiceTemplatesByScene,getServiceTemplatesByIndustry,suggestServiceTemplateForScene,listServiceTemplates,fillServiceTemplate,getAllServiceTemplates};export{ALLOCATION_SCENES,ALLOCATION_LEDGER_VERSION,MAX_ALLOCATOR_COUNT,ALLOCATION_MAX_SHARING_COUNT,ALLOCATION_MODE_AMOUNT,ALLOCATION_MODE_RATE,ALLOCATION_MODE_SURPLUS,RATE_TOTAL_FULL,ALLOCATION_ERROR_CODES,a269y as getAllocationScenesByTriggerSource,a269z as getAllocationScenesByMode,a269A as getAllocationScenesByStrategy,a269B as findAllocationSceneById,a269C as inferAllocationSceneFromIntent,a269D as getAllAllocationScenes,a269E as getAllocationScenesCount,allocationModeToNumber,allocationModeFromNumber,getRecipientType,isSignerRecipient,isEntityRecipient,isGuardIdentifierRecipient,a269F as getAllocationErrorName,a269G as getAllocationErrorDescription};export{a269H as initAllocationPuzzleFromIntent,a269I as checkAllocationPuzzleCompleteness,a269J as validateAllocationConstraints,a269K as generateAllocationPuzzleConfirmationText,buildDefaultAllocFlow,buildDefaultRecipientRules,buildDefaultLogicPuzzle,ALLOCATION_PUZZLE_VERSION};export{ALLOCATION_RISK_VERSION,assessAllocationRisks,a269L as getAllAllocationRiskRules};export{ALLOCATION_TEMPLATES,ALLOCATION_TEMPLATES_VERSION,a269M as getAllAllocationTemplates,a269N as getAllocationTemplateById,a269O as getAllocationTemplatesByScene,a269P as getAllocationTemplatesByIndustry,a269Q as suggestAllocationTemplateForScene,a269R as listAllocationTemplates,a269S as fillAllocationTemplate};export{RECIPIENT_CONSTRAINT_VERSION,classifyRecipient,analyzeRecipientConstraints,isUnboundSignerTheft,canonicalDoctrine,recipientDesignGuidance,derivePayoffFromSharing,OBJECT_DRIVEABILITY,driveabilityOf,RECIPIENT_DESIGN_OPTIONS};export{paymentRelations,scanRecentPaymentEvents,resolveBeneficialOwners,extractionPlanForHolder,pendingWrappersAt,trackAccountPayments};export{TREASURY_LEDGER_VERSION,TREASURY_SCENES,a269T as TREASURY_BUILTIN_PERMISSIONS,a269U as getTreasuryScenesByHostObject,a269V as findTreasurySceneById,a269W as findTreasurySceneByPermissionIndex,a269X as getTreasuryBuiltinPermissionByIndex,isBuiltinTreasuryPermission,a269Y as getActiveTreasuryBuiltinPermissions,a269Z as getReservedTreasuryBuiltinPermissions,a269a0 as inferTreasurySceneFromIntent,getTreasuryScenesCount,a269a1 as getTreasuryGovernedOperationsForPermissionIndex};export{a269a2 as initTreasuryPuzzleFromIntent,a269a3 as checkTreasuryPuzzleCompleteness,a269a4 as validateTreasuryConstraints,a269a5 as generateTreasuryPuzzleConfirmationText,MAX_EXTERNAL_DEPOSIT_GUARD_COUNT,MAX_EXTERNAL_WITHDRAW_GUARD_COUNT,a269a6 as TREASURY_MAX_DESCRIPTION_LENGTH};export{TREASURY_TEMPLATES,TREASURY_TEMPLATES_VERSION,getAllTreasuryTemplates,a269a7 as getTreasuryTemplateById,a269a8 as getTreasuryTemplatesByScene,a269a9 as getTreasuryTemplatesByIndustry,a269aa as suggestTreasuryTemplateForScene,a269ab as listTreasuryTemplates,a269ac as fillTreasuryTemplate};export{TREASURY_RISK_VERSION,assessTreasuryRisks,getAllTreasuryRiskRules};export{ORDER_LEDGER_VERSION,ORDER_SCENES,ORDER_FIELDS,ORDER_STATES,ORDER_STATE_TRANSITIONS,ORDER_LIFECYCLE_EVENTS,ORDER_PERMISSION_MATRIX,ORDER_AUDIT_FORMULAS,a269ad as getOrderScenesByOperationField,a269ae as findOrderSceneById,a269af as findOrderSceneByMoveEntry,a269ag as getOrderScenesByPermissionLayer,a269ah as getOrderScenesByReversibility,a269ai as getOrderFieldDef,a269aj as getOrderMutableFields,a269ak as getOrderImmutableFields,a269al as getOrderFrozenAfterProgressFields,a269am as getOrderOneTimeSetFields,a269an as inferOrderSceneFromIntent,a269ao as getOrderEmittedEvents,a269ap as getOrderInferredEvents,getOrderScenesCount,a269aq as sdkToMoveOrderField,a269ar as moveToSdkOrderField};export{a269as as initOrderPuzzleFromIntent,a269at as checkOrderPuzzleCompleteness,a269au as validateOrderConstraints,a269av as generateOrderPuzzleConfirmationText,a269aw as verifyOrderSnapshotMechanism,a269ax as inferOrderLifecyclePhase,a269ay as matchOrderSceneFromPuzzle,a269az as listAllOrderScenes,a269aA as lookupOrderScene};export{ORDER_TEMPLATES,ORDER_TEMPLATES_VERSION,ORDER_TEMPLATES_COUNT,getAllOrderTemplates,a269aB as getOrderTemplateById,a269aC as getOrderTemplatesByScene,a269aD as getOrderTemplatesByIndustry,a269aE as getOrderTemplatesByPermissionLayer,a269aF as getIrreversibleOrderTemplates,a269aG as suggestOrderTemplateForScene,listOrderTemplates,a269aH as fillOrderTemplate,a269aI as suggestOrderTemplateFromIntent,a269aJ as getOrderTemplateParameters,a269aK as validateOrderTemplateParams};export{ORDER_RISK_VERSION,assessOrderRisks,getAllOrderRiskRules};export{PROGRESS_LEDGER_VERSION,PROGRESS_SCENES,a269aL as PROGRESS_BUILTIN_PERMISSIONS,PROGRESS_NEW,PROGRESS_NAMED_OPERATOR,PROGRESS_TASK,PROGRESS_CONTEXT_REPOSITORY,PROGRESS_UNHOLD,PROGRESS_OWNER_RECEIVE,PROGRESS_CROSS_OBJECT_REFS,a269aM as getProgressScenesByPhase,a269aN as findProgressSceneById,a269aO as getProgressScenesByIndustry,a269aP as getProgressBuiltinPermissionByIndex,isProgressBuiltinPermission,a269aQ as inferProgressSceneFromIntent,a269aR as getAllProgressBuiltinPermissions,getProgressScenesCount,validateNamedOperatorAddressList,validateNamedOperatorCount,validateContextRepositoryCount};export{a269aS as initProgressPuzzleFromIntent,a269aT as checkProgressPuzzleCompleteness,a269aU as validateProgressConstraints,a269aV as generateProgressPuzzleConfirmationText,a269aW as resolveProgressBuiltinPermission,isOrderHolderForward,a269aX as getProgressRelevantDimensions};export{PROGRESS_TEMPLATES,PROGRESS_TEMPLATES_VERSION,getAllProgressTemplates,getProgressTemplateById,getProgressTemplatesByScene,getProgressTemplatesByIndustry,suggestProgressTemplateForScene,listProgressTemplates,fillProgressTemplate};export{PROGRESS_RISK_VERSION,assessProgressRisks,getAllProgressRiskRules};export{ARBITRATION_LEDGER_VERSION,ARBITRATION_SCENES,a269aY as ARBITRATION_BUILTIN_PERMISSIONS,ARB_STATUS_CODE,ARB_TERMINAL_STATUSES,ARB_STATUS_ALIASES,DUAL_GUARD_MATRIX,a269aZ as getArbitrationScenesByCategory,a269b0 as findArbitrationSceneById,a269b1 as findArbitrationSceneByPermissionIndex,a269b2 as getArbitrationPermissionByIndex,a269b3 as getArbitrationPermissionByName,a269b4 as isArbitrationReservedIndex,a269b5 as isArbitrationUsedPermissionIndex,a269b6 as getArbitrationActivePermissionCount,a269b7 as inferArbitrationSceneFromIntent,getDualGuardMatrixEntry,isValidArbStatusTransition,isTerminalArbStatus,a269b8 as getArbitrationScenesProducingStatus,a269b9 as getArbitrationScenesRequiringStatus,getArbitrationScenesCount,getAllArbitrationPermissions,getActiveArbitrationPermissions};export{a269ba as initArbitrationPuzzleFromIntent,a269bb as checkArbitrationPuzzleCompleteness,a269bc as validateArbitrationConstraints,a269bd as generateArbitrationPuzzleConfirmationText};export{ARBITRATION_TEMPLATES,ARBITRATION_TEMPLATES_VERSION,a269be as getAllArbitrationTemplates,a269bf as getArbitrationTemplateById,a269bg as getArbitrationTemplatesByScene,a269bh as getArbitrationTemplatesByIndustry,a269bi as suggestArbitrationTemplateForScene,a269bj as listArbitrationTemplates,a269bk as fillArbitrationTemplate};export{ARBITRATION_RISK_VERSION,assessArbitrationRisks,a269bl as getAllArbitrationRiskRules};export{REWARD_LEDGER_VERSION,REWARD_SCENES,REWARD_PERMISSIONS,REWARD_FIELDS,REWARD_GUARD_CONSTRUCTORS,REWARD_ERROR_CODES,REWARD_CROSS_OBJECT_REFS,MAX_GUARD_COUNT_REWARD,MAX_RECORD_COUNT_REWARD,a269bm as getRewardScenesByPhase,a269bn as findRewardSceneById,a269bo as getRewardScenesByIndustry,a269bp as getRewardBuiltinPermissionByIndex,isRewardBuiltinPermission,a269bq as getAllRewardBuiltinPermissions,getRewardScenesCount,a269br as getRewardGuardConstructorSpec,a269bs as resolveRewardGuardConstructor,getRewardErrorByCode,getRewardErrorByName,a269bt as validateRewardGuardCount,a269bu as validateRewardRecordCount,a269bv as inferRewardSceneFromIntent};export{REWARD_FIELD_MUTABILITY,a269bw as initRewardPuzzleFromIntent,a269bx as checkRewardPuzzleCompleteness,a269by as validateRewardConstraints,a269bz as generateRewardPuzzleConfirmationText,a269bA as resolveRewardBuiltinPermission,a269bB as requiresRewardGuardConfig,a269bC as requiresRewardPassport,a269bD as getRewardRelevantDimensions,a269bE as getRewardFieldMutability,a269bF as isRewardAdminMutableField,a269bG as getRewardFieldPermissionIndex};export{REWARD_RISK_VERSION,assessRewardRisks,getAllRewardRiskRules};export{PASSPORT_LEDGER_VERSION,PASSPORT_ERROR_CODES,PASSPORT_SCENARIOS,MAX_GUARD_COUNT_PASSPORT,MAX_SUBMISSION_SIZE_PASSPORT,a269bH as getAllPassportScenarios,a269bI as getPassportScenesCount,a269bJ as findPassportScenarioById,a269bK as getPassportScenariosByConsumer,a269bL as getPassportScenariosUsingRelies,a269bM as inferPassportScenarioFromIntent,impackRoleFromBoolean,impackRoleToBoolean,reliesLogicFromBoolean,reliesLogicToBoolean,a269bN as getPassportErrorName,a269bO as getPassportErrorDescription};export{PASSPORT_TEMPLATES,PASSPORT_TEMPLATES_VERSION,a269bP as getAllPassportTemplates,a269bQ as getPassportTemplateById,a269bR as getPassportTemplatesByScenario,a269bS as getPassportTemplatesByIndustry,a269bT as suggestPassportTemplateForScenario,a269bU as listPassportTemplates,a269bV as fillPassportTemplate};export{PROOF_RISK_RULES,checkProofRisks};export{REPOSITORY_RISK_RULES,checkRepositoryRisks,parseIdFromForRiskCheck};export{assessEvidenceReview,reviewEvidenceList}from'./evidence-review.js';export{DEMAND_RISK_RULES,checkDemandRisks};export{CONTACT_RISK_RULES,CONTACT_RISK_VERSION,checkContactRisks};export{RESOURCE_RISK_RULES,RESOURCE_RISK_VERSION,checkResourceRisks};export{PAYMENT_RISK_RULES,PAYMENT_RISK_VERSION,checkPaymentRisks};export{ARB_RISK_RULES,ARB_RISK_VERSION,checkArbRisks};export{PERSONAL_RISK_RULES,PERSONAL_RISK_VERSION,checkPersonalRisks};export{UTIL_RISK_RULES,UTIL_RISK_VERSION,checkUtilRisks};export{REGISTRAR_RISK_RULES,REGISTRAR_RISK_VERSION,checkRegistrarRisks};export{BRIDGE_RISK_RULES,BRIDGE_RISK_VERSION,checkBridgeRisks};export{TOOLS_REFERENCE,getToolReference,searchToolReference,getToolSequence};export{SCENARIO_MODES,SCENARIO_MODES_VERSION,MODE_COMPOSITIONS,matchScenarioMode,inferScenarioTraits,getScenarioMode,listScenarioModes,getShippedModes,getModeCompositions};export{BUILTIN_TEMPLATES,BUILTIN_TEMPLATES_VERSION,getBuiltinTemplate,listBuiltinTemplates,TEMPLATE_KEYWORDS};export{resolveTemplatesDir,seedBuiltinTemplates,reloadTemplates,listTemplates,getTemplate,a269bW as getIndustryTemplates,parseTemplateFile,renderTemplateFile,loadAndValidate,TemplateFrontmatterSchema};export{scanTemplate};export{GUARD_DESIGN_PATTERNS,GUARD_DESIGN_PATTERNS_VERSION,VERIFIER_LEVEL_GUIDANCE,getGuardDesignPattern,searchGuardDesignPatterns,getPatternsByHost,getPatternsByIndustry,getPatternsByDataSourceClass,getVerifierLevelGuidance,suggestPatternForRequirement};export function getKnowledgeBase(){return{'version':{'safety':SAFETY_RULES_VERSION,'tool_constraints':TOOL_CONSTRAINTS_VERSION,'reward_templates':REWARD_TEMPLATES_VERSION,'audit_rules':AUDIT_RULES_VERSION,'dynamic_pricing':DYNAMIC_PRICING_VERSION,'reputation_rules':REPUTATION_RULES_VERSION,'acquisition_flywheel':ACQUISITION_FLYWHEEL_VERSION,'industry_registry':INDUSTRY_REGISTRY_VERSION,'flywheel_loop':FLYWHEEL_LOOP_VERSION,'machine_ledger':MACHINE_LEDGER_VERSION,'machine_templates':MACHINE_TEMPLATES_VERSION,'machine_translation':MACHINE_TRANSLATION_VERSION,'machine_risk':MACHINE_RISK_VERSION,'machine_topology':MACHINE_TOPOLOGY_VERSION,'machine_puzzle':MACHINE_PUZZLE_VERSION,'service_ledger':SERVICE_LEDGER_VERSION,'service_risk':SERVICE_RISK_VERSION,'service_templates':SERVICE_TEMPLATES_VERSION,'allocation_ledger':ALLOCATION_LEDGER_VERSION,'allocation_puzzle':ALLOCATION_PUZZLE_VERSION,'allocation_risk':ALLOCATION_RISK_VERSION,'allocation_templates':ALLOCATION_TEMPLATES_VERSION,'treasury_ledger':TREASURY_LEDGER_VERSION,'treasury_templates':TREASURY_TEMPLATES_VERSION,'treasury_risk':TREASURY_RISK_VERSION,'order_ledger':ORDER_LEDGER_VERSION,'order_templates':ORDER_TEMPLATES_VERSION,'order_risk':ORDER_RISK_VERSION,'progress_ledger':PROGRESS_LEDGER_VERSION,'progress_templates':PROGRESS_TEMPLATES_VERSION,'progress_risk':PROGRESS_RISK_VERSION,'arbitration_ledger':ARBITRATION_LEDGER_VERSION,'arbitration_templates':ARBITRATION_TEMPLATES_VERSION,'arbitration_risk':ARBITRATION_RISK_VERSION,'reward_ledger':REWARD_LEDGER_VERSION,'reward_risk':REWARD_RISK_VERSION,'passport_ledger':PASSPORT_LEDGER_VERSION,'passport_templates':PASSPORT_TEMPLATES_VERSION,'contact_risk':CONTACT_RISK_VERSION,'resource_risk':RESOURCE_RISK_VERSION,'payment_risk':PAYMENT_RISK_VERSION,'arb_risk':ARB_RISK_VERSION,'personal_risk':PERSONAL_RISK_VERSION,'util_risk':UTIL_RISK_VERSION,'registrar_risk':REGISTRAR_RISK_VERSION,'bridge_risk':BRIDGE_RISK_VERSION,'scenario_modes':SCENARIO_MODES_VERSION,'guard_design_patterns':GUARD_DESIGN_PATTERNS_VERSION,'builtin_templates':BUILTIN_TEMPLATES_VERSION},'confirmation_rules':CONFIRMATION_RULES['length'],'confirmation_rule_ids':CONFIRMATION_RULES['map'](a=>a['id']),'tool_constraints_count':TOOL_CONSTRAINTS['length'],'reward_templates_count':REWARD_TEMPLATES['length'],'audit_rules_count':AUDIT_RULES['length'],'mutable_fields_count':MUTABLE_FIELDS['length'],'industry_flywheels_count':INDUSTRY_FLYWHEELS['length'],'industry_registry_count':getRegistrySize(),'intent_count':listIntents()['length'],'guard_scenes_count':GUARD_SCENES['length'],'guard_semantic_rules_count':SEMANTIC_TO_SCHEMA_RULES['length'],'guard_schema_rules_count':SCHEMA_TO_SEMANTIC_RULES['length'],'guard_constraint_rules_count':GUARD_CONSTRAINT_RULES['length'],'guard_risk_rules_count':getRiskRulesCount(),'guard_templates_count':GUARD_TEMPLATES_COUNT,'guard_lint_enabled':!![],'machine_scenes_count':MACHINE_SCENES_COUNT,'machine_templates_count':MACHINE_TEMPLATES['length'],'machine_patterns_count':SEMANTIC_TO_MACHINE_RULES['length'],'machine_constraint_rules_count':MACHINE_CONSTRAINT_RULES['length'],'machine_risk_rules_count':MACHINE_RISK_RULES['length'],'machine_on_chain_limits':{'max_node_count':MAX_NODE_COUNT,'max_node_pair_count':MAX_NODE_PAIR_COUNT,'max_forward_count':MAX_FORWARD_COUNT},'service_scenes_count':SERVICE_SCENES['length'],'service_permissions_count':SERVICE_PERMISSIONS['length'],'service_order_flow_stages_count':SERVICE_ORDER_FLOW_STAGES['length'],'service_cross_object_bindings_count':SERVICE_CROSS_OBJECT_BINDINGS['length'],'service_risk_rules_count':getAllServiceRiskRules()['length'],'service_templates_count':SERVICE_TEMPLATES['length'],'service_context_enabled':!![],'allocation_scenes_count':ALLOCATION_SCENES['length'],'allocation_risk_rules_count':a269L()['length'],'allocation_templates_count':ALLOCATION_TEMPLATES['length'],'allocation_context_enabled':!![],'treasury_scenes_count':TREASURY_SCENES['length'],'treasury_builtin_permissions_count':a269T['length'],'treasury_risk_rules_count':getAllTreasuryRiskRules()['length'],'treasury_templates_count':TREASURY_TEMPLATES['length'],'treasury_context_enabled':!![],'order_scenes_count':ORDER_SCENES['length'],'order_fields_count':ORDER_FIELDS['length'],'order_states_count':ORDER_STATES['length'],'order_lifecycle_events_count':ORDER_LIFECYCLE_EVENTS['length'],'order_risk_rules_count':getAllOrderRiskRules()['length'],'order_templates_count':ORDER_TEMPLATES['length'],'order_context_enabled':!![],'progress_scenes_count':PROGRESS_SCENES['length'],'progress_builtin_permissions_count':a269aL['length'],'progress_risk_rules_count':getAllProgressRiskRules()['length'],'progress_templates_count':PROGRESS_TEMPLATES['length'],'progress_context_enabled':!![],'arbitration_scenes_count':ARBITRATION_SCENES['length'],'arbitration_builtin_permissions_count':a269aY['length'],'arbitration_risk_rules_count':a269bl()['length'],'arbitration_templates_count':ARBITRATION_TEMPLATES['length'],'arbitration_context_enabled':!![],'reward_scenes_count':REWARD_SCENES['length'],'reward_builtin_permissions_count':REWARD_PERMISSIONS['length'],'reward_fields_count':REWARD_FIELDS['length'],'reward_guard_constructors_count':REWARD_GUARD_CONSTRUCTORS['length'],'reward_error_codes_count':REWARD_ERROR_CODES['length'],'reward_risk_rules_count':getAllRewardRiskRules()['length'],'reward_context_enabled':!![],'passport_scenarios_count':PASSPORT_SCENARIOS['length'],'passport_max_guard_count':MAX_GUARD_COUNT_PASSPORT,'passport_max_submission_size':MAX_SUBMISSION_SIZE_PASSPORT,'passport_templates_count':PASSPORT_TEMPLATES['length'],'passport_context_enabled':!![],'proof_risk_rules_count':PROOF_RISK_RULES['length'],'repository_risk_rules_count':REPOSITORY_RISK_RULES['length'],'demand_risk_rules_count':DEMAND_RISK_RULES['length'],'contact_risk_rules_count':CONTACT_RISK_RULES['length'],'resource_risk_rules_count':RESOURCE_RISK_RULES['length'],'payment_risk_rules_count':PAYMENT_RISK_RULES['length'],'arb_risk_rules_count':ARB_RISK_RULES['length'],'personal_risk_rules_count':PERSONAL_RISK_RULES['length'],'util_risk_rules_count':UTIL_RISK_RULES['length'],'registrar_risk_rules_count':REGISTRAR_RISK_RULES['length'],'bridge_risk_rules_count':BRIDGE_RISK_RULES['length'],'tools_reference_count':TOOLS_REFERENCE['length'],'scenario_modes_count':SCENARIO_MODES['length'],'scenario_mode_compositions_count':MODE_COMPOSITIONS['length'],'builtin_templates_count':BUILTIN_TEMPLATES['length'],'guard_design_patterns_count':GUARD_DESIGN_PATTERNS['length'],'verifier_level_guidance_count':VERIFIER_LEVEL_GUIDANCE['length']};}export{buildWorkflowGuidance,buildWorkflowReceipt,enrichWorkflowGuidance,mergeGuidanceIntoOutput,resolvePermissionRole,resolveLocalNamesFor,listLocalAccounts,accountCanExecuteForward,enumerateActionableForwards,forwardOperatorKind};export{buildWorkspaceLists}from'./workspace-lists.js';export{resolveSupplyChainGraph}from'./supply-chain.js';export{enumerateObjectOperations,operationCategoryOf,operationComplexityOf,isPermissionIndexType}from'./operation-dictionary.js';export{enumerateServices,enumerateDemands,enumerateArbs}from'./jsonrpc-enum.js';export{FIELD_MUTABILITY_RULES,LOCK_CONSTRAINTS,IRREVERSIBLE_OPERATIONS,STATE_MACHINE_TERMINALS,NUMERIC_LIMIT_CONSTRAINTS,EXTERNAL_ACCESS_MECHANISMS,fieldMutabilityOf,isActionForbidden,lockConstraintOf,numericLimitOf,externalAccessOf}from'./contract-invariants.js';export{GUARD_FIELD_COGNITION_VERSION,GUARD_FIELD_SITES,VALUE_ORIGIN_SEMANTICS,GUARD_PASSPORT_DOCTRINE,guardSitesFor,guardCognitionDoctrine,REPOSITORY_WRITE_ROUTE_MATRIX,repositoryRouteSlotConflicts}from'./guard-field-cognition.js';
@@ -1,4 +1,7 @@
1
1
  import { type IndustryTraits, type IndustryProfile } from "./industry-registry.js";
2
+ export declare function keywordBoundaryHits(text: string, keywords: string[], opts?: {
3
+ allowCjkSubstring?: boolean;
4
+ }): string[];
2
5
  export declare const DEFAULT_TRAITS: IndustryTraits;
3
6
  export interface TraitInferenceResult {
4
7
  traits: IndustryTraits;
@@ -6,7 +9,9 @@ export interface TraitInferenceResult {
6
9
  matched_keywords: string[];
7
10
  trait_confidence: Partial<Record<keyof IndustryTraits, number>>;
8
11
  }
9
- export declare function inferTraitsFromDescription(description: string): TraitInferenceResult;
12
+ export declare function inferTraitsFromDescription(description: string, opts?: {
13
+ localeNeutralLexicon?: boolean;
14
+ }): TraitInferenceResult;
10
15
  export interface SimilarIndustryMatch {
11
16
  industry: string;
12
17
  similarity: number;
@@ -1 +1 @@
1
- import{getIndustryProfile,listIndustries,registerIndustry}from'./industry-registry.js';const TRAIT_INFERENCE_RULES=[{'keywords':['logistics','shipping','delivery','express','shipment','ship'],'trait':'has_logistics','value':!![],'weight':0.85},{'keywords':['digital','online','cloud','virtual'],'trait':'has_logistics','value':![],'weight':0.7},{'keywords':['consulting','communication','requirement-confirmation','revision-rounds','negotiate','consult'],'trait':'communication_heavy','value':!![],'weight':0.8},{'keywords':['standard-product','in-stock','one-click-order','standard','instant'],'trait':'communication_heavy','value':![],'weight':0.7},{'keywords':['digital','file','code','design-draft','electronic','online','software','source'],'trait':'pure_digital','value':!![],'weight':0.8},{'keywords':['physical','hardware','equipment'],'trait':'pure_digital','value':![],'weight':0.75},{'keywords':['course','semester','long-cycle','long-term','project-based','project'],'trait':'long_cycle','value':!![],'weight':0.75},{'keywords':['instant','in-stock','same-day','immediate'],'trait':'long_cycle','value':![],'weight':0.8},{'keywords':['rental','rent','deposit','lease','shortstay','short-stay','short\x20stay','bnb','homestay'],'trait':'deposit_required','value':!![],'weight':0.9},{'keywords':['purchase','buyout','buy'],'trait':'deposit_required','value':![],'weight':0.6},{'keywords':['multi-party','segmented','multi-stage','multi-vendor','itinerary','segment'],'trait':'multi_tier_allocation','value':!![],'weight':0.75},{'keywords':['medical','legal','financial','insurance','pharmaceutical','pharma'],'trait':'regulatory_intensity','value':'high','weight':0.9},{'keywords':['education','food','construction'],'trait':'regulatory_intensity','value':'medium','weight':0.7},{'keywords':['entertainment','gaming','digital','game'],'trait':'regulatory_intensity','value':'low','weight':0.6},{'keywords':['custom','high-value','customized','bespoke'],'trait':'trust_sensitivity','value':'high','weight':0.8},{'keywords':['standard-product','small-ticket','standard','low-value'],'trait':'trust_sensitivity','value':'low','weight':0.7},{'keywords':['subscription','membership','recurring'],'trait':'consumption_frequency','value':'frequent','weight':0.85},{'keywords':['course','semester','education'],'trait':'consumption_frequency','value':'one_time','weight':0.75},{'keywords':['daily','frequent','common'],'trait':'consumption_frequency','value':'frequent','weight':0.75},{'keywords':['small-ticket','daily','convenience-store','micro'],'trait':'avg_ticket_size','value':'micro','weight':0.7},{'keywords':['retail','commodity','standard-product'],'trait':'avg_ticket_size','value':'small','weight':0.7},{'keywords':['custom','project','outsourcing'],'trait':'avg_ticket_size','value':'medium','weight':0.7},{'keywords':['real-estate','automobile','high-value','luxury','realestate','car'],'trait':'avg_ticket_size','value':'large','weight':0.85},{'keywords':['hotel','hostel','apartment','resort','stay','room','property','accommodation','lodging','bnb','homestay','shortstay','flight','itinerary','tourism','travel','trip','vacation'],'trait':'has_logistics','value':!![],'weight':0.8},{'keywords':['booking','reservation','check-in','checkin','checkout','check-out','itinerary','flight','ticket','vacation','travel','trip'],'trait':'multi_tier_allocation','value':!![],'weight':0.75},{'keywords':['hospitality','tourism','visa','lodging'],'trait':'regulatory_intensity','value':'medium','weight':0.8},{'keywords':['hotel','hostel','resort','flight','accommodation','lodging'],'trait':'avg_ticket_size','value':'large','weight':0.85},{'keywords':['messenger'],'trait':'communication_heavy','value':!![],'weight':0.8}];export const DEFAULT_TRAITS={'has_logistics':![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'occasional','avg_ticket_size':'small'};export function inferTraitsFromDescription(a){const b=(a??'')['toLowerCase'](),c=[],d=new Map(),e=new Map();for(const i of TRAIT_INFERENCE_RULES){const j=i['keywords']['find'](l=>b['includes'](l['toLowerCase']()));if(j){c['push'](j);const l=d['get'](i['trait'])??0x0;i['weight']>l&&(d['set'](i['trait'],i['weight']),e['set'](i['trait'],i['value']));}}const f={...DEFAULT_TRAITS};for(const [m,n]of e['entries']()){f[m]=n;}const g=d['size'],h=Math['min'](0x1,g/0xa);return{'traits':f,'confidence':h,'matched_keywords':Array['from'](new Set(c)),'trait_confidence':Object['fromEntries'](d)};}export const ENUM_TRAIT_SCALES={'regulatory_intensity':['low','medium','high'],'trust_sensitivity':['low','medium','high'],'consumption_frequency':['one_time','occasional','frequent'],'avg_ticket_size':['micro','small','medium','large']};export const BOOLEAN_TRAIT_KEYS=['has_logistics','communication_heavy','pure_digital','long_cycle','deposit_required','multi_tier_allocation'];const ENUM_TRAIT_KEYS=['regulatory_intensity','trust_sensitivity','consumption_frequency','avg_ticket_size'];export const EVIDENCE_THRESHOLD=0.5;export const INDUSTRY_REQUIRED_TRAITS={'subscription':[{'trait':'pure_digital','value':!![],'reason':'subscription\x20build\x20notes:\x20\x27Pure\x20digital\x20—\x20native\x20WoWok\x20soil\x27'}],'retail':[{'trait':'has_logistics','value':!![],'reason':'retail\x20fulfilment\x20is\x20physical\x20shipping'}],'retail_d2c':[{'trait':'has_logistics','value':!![],'reason':'retail_d2c\x20fulfilment\x20is\x20physical\x20shipping'}],'rental':[{'trait':'deposit_required','value':!![],'reason':'rental\x20without\x20a\x20deposit\x20is\x20not\x20the\x20rental\x20model'}],'travel':[{'trait':'has_logistics','value':!![],'reason':'travel\x20fulfilment\x20happens\x20at\x20a\x20physical\x20destination'},{'trait':'multi_tier_allocation','value':!![],'reason':'travel\x20splits\x20guest\x20/\x20property\x20/\x20payment\x20legs'}],'education':[{'trait':'long_cycle','value':!![],'reason':'education\x20delivers\x20over\x20a\x20course/term\x20cycle'}],'freelance':[{'trait':'communication_heavy','value':!![],'reason':'freelance\x20is\x20requirement-confirmation\x20driven'}],'licensing':[{'trait':'pure_digital','value':!![],'reason':'a\x20license\x20grant\x20is\x20a\x20digital\x20right,\x20no\x20physical\x20fulfilment\x20leg'},{'trait':'multi_tier_allocation','value':!![],'reason':'licensing\x20splits\x20proceeds\x20across\x20rights-holders\x20—\x20the\x20royalty\x20waterfall\x20is\x20the\x20defining\x20structure'}],'crowdfunding':[{'trait':'deposit_required','value':!![],'reason':'each\x20contribution\x20is\x20escrowed\x20and\x20locked\x20until\x20the\x20deadline\x20—\x20funds-in-escrow\x20is\x20the\x20defining\x20structure'},{'trait':'multi_tier_allocation','value':!![],'reason':'settlement\x20is\x20a\x20two-leg\x20allocation\x20(release-to-project\x20XOR\x20per-contributor\x20refund)\x20—\x20the\x20split\x20decision\x20is\x20the\x20defining\x20structure'}],'general':[]};export function traitContradictions(a,b,c){const d=INDUSTRY_REQUIRED_TRAITS[a];if(!d||d['length']===0x0)return[];const e=[];for(const f of d){const g=b[f['trait']],h=typeof f['value']==='boolean'?g!==f['value']:g!==f['value'];if(!h)continue;const i=c?.[f['trait']];if(c&&(i===undefined||i<EVIDENCE_THRESHOLD))continue;e['push'](f);}return e;}export function filterConsistentIndustries(a,b,c){const d=[],e=[];for(const f of a){const g=traitContradictions(f['industry'],b,c);if(g['length']>0x0)e['push']({'industry':f['industry'],'contradictions':g});else d['push'](f);}return{'consistent':d,'inconsistent':e};}export const DOMAIN_PRIORS=[{'domain':'travel_accommodation','keywords':['hotel','hostel','apartment','resort','flight','ticket','itinerary','reservation','booking','check-in','checkin','checkout','check-out','stay','room','property','vacation','travel','trip','ota','accommodation','lodging','bnb','homestay','shortstay','short-stay'],'industries':['travel','rental'],'boost':0.15},{'domain':'local_life_delivery','keywords':['food\x20delivery','takeout','meal\x20delivery','restaurant\x20delivery','rider','courier','errand','buy\x20for\x20me','queue\x20service','pickup\x20point','group\x20buy','group-buy','community\x20group-buy','grocery\x20delivery','on-demand\x20delivery','essen\x20bestellen','lebensmittel\x20lieferung','lieferdienst','besorgung','abholpunkt','gruppeneinkauf','gemeinsame\x20bestellung','livraison\x20de\x20repas','livraison\x20de\x20courses','comida\x20a\x20domicilio','mandados','punto\x20de\x20recogida','compra\x20comunitaria'],'industries':['delivery','group_buy','retail'],'boost':0.15}];export function detectDomainPriors(a){const b=(a??'')['toLowerCase'](),c=[];for(const d of DOMAIN_PRIORS){const e=d['keywords']['filter'](f=>b['includes'](f['toLowerCase']()));if(e['length']===0x0)continue;c['push']({'domain':d['domain'],'matched_keywords':Array['from'](new Set(e)),'industries':[...d['industries']],'boost':d['boost']});}return c;}function dimAffinity(c,d,e){if(d===e)return 0x1;const f=ENUM_TRAIT_SCALES[c];if(!f)return 0x0;const g=f['indexOf'](String(d)),h=f['indexOf'](String(e));if(g<0x0||h<0x0)return 0x0;const i=f['length']-0x1;return Math['max'](0x0,0x1-Math['abs'](g-h)/ i);}const REQUIREMENT_SUPPORT_WEIGHT=0.25;export function requirementSupport(a,b,c){const d=INDUSTRY_REQUIRED_TRAITS[a];if(!d||d['length']===0x0)return undefined;let e=0x0;for(const f of d){const g=c?.[f['trait']];if(c&&(g===undefined||g<EVIDENCE_THRESHOLD)){e+=0.5;continue;}e+=b[f['trait']]===f['value']?0x1:0x0;}return e/d['length'];}export function findSimilarIndustries(a,b,d){const e=listIndustries(),f=[],g=d?.['trait_confidence'],h=[...BOOLEAN_TRAIT_KEYS,...ENUM_TRAIT_KEYS];for(const i of e){const j=i['traits'];let l=0x0;const m=[],n=[],o=[];for(const s of h){const t=dimAffinity(s,a[s],j[s]),u=g?.[s],v=g===undefined||u!==undefined&&u>=EVIDENCE_THRESHOLD;if(v){o['push'](s);if(t===0x1)m['push'](s);else n['push'](s);}l+=v?t:0.5;}const p=l/h['length'],q=requirementSupport(i['name'],a,d?.['trait_confidence']),r=q===undefined?p:p+REQUIREMENT_SUPPORT_WEIGHT*q;f['push']({'industry':i['name'],'similarity':r,'matched_traits':m,'contradicted_traits':n,'evidenced_traits':o,'trait_distance':Number((0x1-r)['toFixed'](0x4)),...q===undefined?{}:{'requirement_support':Number(q['toFixed'](0x4))}});}return f['sort']((w,x)=>x['similarity']-w['similarity']),typeof b==='number'?f['slice'](0x0,Math['max'](0x0,b)):f;}const FALLBACK_RISK_CHECK_RULES=[{'trait_key':'deposit_required','trait_value':!![],'check':{'id':'fb_deposit_lock','description':'Deposit\x20lock-period\x20safety\x20(deposit\x20cannot\x20be\x20withdrawn\x20by\x20merchant\x20at\x20any\x20time)','weight':0x1e,'passed':a=>a?.['fund_safety']?.['lock_duration_safe']??![],'advice':'⚠️\x20Lock\x20period\x20unsafe:\x20deposit\x20may\x20be\x20withdrawn\x20at\x20any\x20time;\x20recommend\x20requiring\x20a\x20lock\x20period\x20≥\x207\x20days.'},'need':{'id':'need_deposit_lock','tier':'personalized','description':'Deposit\x20lock-period\x20safety','satisfied':a=>a?.['fund_safety']?.['lock_duration_safe']??![],'advice':'Deposit\x20lock-period\x20unsafe.'}},{'trait_key':'has_logistics','trait_value':!![],'check':{'id':'fb_logistics_track','description':'Logistics\x20Guard\x20configuration\x20(shipping/receipt\x20verification)','weight':0x19,'passed':a=>a?.['workflow_analysis']?.['has_milestone_nodes']??![],'advice':'⚠️\x20No\x20logistics\x20Guard:\x20shipping\x20and\x20receipt\x20status\x20are\x20not\x20verified\x20by\x20a\x20third\x20party.'}},{'trait_key':'pure_digital','trait_value':!![],'check':{'id':'fb_wip_verified','description':'WIP\x20hash\x20verification\x20(digital\x20deliverables\x20traceable)','weight':0x19,'passed':a=>a?.['service_basics']?.['wip_verified']===!![],'advice':'⚠️\x20WIP\x20not\x20verified:\x20digital\x20deliverables\x20cannot\x20be\x20traced.'}},{'trait_key':'long_cycle','trait_value':!![],'check':{'id':'fb_milestone','description':'Milestone\x20nodes\x20(phased\x20acceptance)','weight':0x19,'passed':a=>a?.['workflow_analysis']?.['has_milestone_nodes']??![],'advice':'⚠️\x20No\x20milestone\x20nodes:\x20long-cycle\x20projects\x20lack\x20phased\x20acceptance.'}},{'trait_key':'regulatory_intensity','trait_value':'high','check':{'id':'fb_compliance','description':'Compliance\x20configuration\x20(arbitration\x20+\x20compensation\x20fund)','weight':0x1e,'passed':a=>(a?.['workflow_analysis']?.['has_arbitration_path']??![])&&(a?.['service_basics']?.['compensation_fund_balance']??0x0n)>0x0n,'advice':'🔴\x20Compliance\x20requirement\x20not\x20met:\x20highly\x20regulated\x20industries\x20must\x20configure\x20arbitration\x20and\x20a\x20compensation\x20fund.'}},{'trait_key':'multi_tier_allocation','trait_value':!![],'check':{'id':'fb_multi_tier_fair','description':'Multi-tier\x20allocation\x20fairness\x20(each\x20segment\x20has\x20a\x20corresponding\x20Allocator)','weight':0x14,'passed':a=>(a?.['workflow_analysis']?.['total_nodes']??0x0)>=0x3,'advice':'⚠️\x20Multi-tier\x20allocation\x20requires\x20corresponding\x20nodes\x20and\x20Allocators,\x20otherwise\x20fund\x20distribution\x20is\x20opaque.'}}];function buildFallbackFlywheel(a,b){const c=['Fund\x20escrow\x20+\x20process\x20transparency'];if(b['deposit_required'])c['push']('Deposit\x20escrow\x20+\x20lock-period\x20guarantee');if(b['has_logistics'])c['push']('Logistics\x20Guard\x20verification');if(b['pure_digital'])c['push']('WIP\x20digital\x20deliverable\x20traceability');if(b['regulatory_intensity']==='high')c['push']('Compliant\x20arbitration\x20+\x20compensation\x20fund\x20guarantee');const d=[{'action':'Set\x20first-order\x20Reward','purpose':'Attract\x20new\x20customers','mutableField':'rewards','metricToWatch':'New\x20customer\x20order\x20rate'},{'action':'Configure\x20compensation_fund','purpose':'Improve\x20trust\x20score','mutableField':'compensation_fund','metricToWatch':'Trust\x20score'}];return b['long_cycle']&&d['push']({'action':'Milestone\x20Reward','purpose':'Incentivize\x20completion\x20of\x20long-cycle\x20projects','mutableField':'rewards','metricToWatch':'Completion\x20rate'}),b['consumption_frequency']==='frequent'&&d['push']({'action':'Loyalty\x20Reward','purpose':'Improve\x20repurchase','mutableField':'rewards','metricToWatch':'Repurchase\x20rate'}),{'industry':a,'trustSellingPoints':c,'keyActions':d,'rewardStrategy':'First-order\x20reward\x20+\x20referral\x20cashback'+(b['consumption_frequency']==='frequent'?'\x20+\x20loyalty\x20reward':''),'discountStrategy':b['long_cycle']?'Long-term\x20cooperation\x20discount\x20+\x20tiered\x20discount':'First-order\x20discount\x20+\x20spend-threshold\x20discount','trustDescription':c['join']('\x20+\x20')};}function buildFallbackPreferenceTemplate(a){return{'max_acceptable_cycle':a['long_cycle']?0x5a:0xe,'response_time_expectation':a['communication_heavy']?0x4:0xc,'require_arbitration':a['regulatory_intensity']!=='low'||a['trust_sensitivity']==='high','require_compensation_fund':a['trust_sensitivity']==='high'||a['deposit_required'],'risk_appetite':a['trust_sensitivity']==='high'?'conservative':'balanced','delivery_speed_priority':a['has_logistics']&&a['consumption_frequency']==='frequent'?'urgent':'normal','after_sales_expectation':a['trust_sensitivity']==='high'?'full':'basic'};}export function synthesizeProfile(a,b){const c=findSimilarIndustries(a,0x1),d=c[0x0],e=d&&d['similarity']>=0.6?getIndustryProfile(d['industry']):undefined,f=b??'custom_'+Date['now']()['toString'](0x24),g=b??'Custom\x20Industry',h=e?{...e['flywheel'],'industry':f}:buildFallbackFlywheel(f,a),i=e?{...e['preference_template'],'max_acceptable_cycle':a['long_cycle']?Math['max'](e['preference_template']['max_acceptable_cycle'],0x5a):e['preference_template']['max_acceptable_cycle'],'require_compensation_fund':a['trust_sensitivity']==='high'?!![]:e['preference_template']['require_compensation_fund']}:buildFallbackPreferenceTemplate(a),j=[],k=[];for(const l of FALLBACK_RISK_CHECK_RULES){a[l['trait_key']]===l['trait_value']&&(j['push']({...l['check'],'industry':f}),l['need']&&k['push']({...l['need']}));}return j['length']===0x0&&j['push']({'id':'fb_basic_arbitration','industry':f,'description':'Configure\x20arbitration\x20(basic\x20dispute\x20resolution)','weight':0x64,'passed':m=>m?.['workflow_analysis']?.['has_arbitration_path']??![],'advice':'⚠️\x20No\x20arbitration\x20configured:\x20basic\x20disputes\x20have\x20no\x20resolution\x20channel.'}),{'name':f,'display_name':g,'traits':a,'source':'inferred','version':'v1','flywheel':h,'risk_checks':j,'preference_template':i,'needs':k,'confidence':d?.['similarity']??0.3,'evolution':{'version':0x1,'last_updated':Date['now'](),'signal_count':0x0,'pending_suggestions':0x0}};}export function composeIndustries(a,b){if(!a||a['length']===0x0)return undefined;const d=[];for(const o of a){const q=getIndustryProfile(o);if(!q)return undefined;d['push'](q);}const e={'has_logistics':d['some'](r=>r['traits']['has_logistics']),'communication_heavy':d['some'](r=>r['traits']['communication_heavy']),'pure_digital':d['every'](r=>r['traits']['pure_digital']),'long_cycle':d['some'](r=>r['traits']['long_cycle']),'deposit_required':d['some'](r=>r['traits']['deposit_required']),'multi_tier_allocation':d['some'](r=>r['traits']['multi_tier_allocation']),'regulatory_intensity':pickStrictest(d['map'](r=>r['traits']['regulatory_intensity']),['low','medium','high']),'trust_sensitivity':pickStrictest(d['map'](r=>r['traits']['trust_sensitivity']),['low','medium','high']),'consumption_frequency':pickStrictest(d['map'](r=>r['traits']['consumption_frequency']),['one_time','occasional','frequent']),'avg_ticket_size':pickStrictest(d['map'](r=>r['traits']['avg_ticket_size']),['micro','small','medium','large'])},f=b??'composed_'+a['join']('_and_'),g=Array['from'](new Set(d['flatMap'](r=>r['flywheel']['trustSellingPoints']))),h=Array['from'](new Set(d['flatMap'](r=>r['flywheel']['keyActions']))),i={'industry':f,'trustSellingPoints':g,'keyActions':h,'rewardStrategy':d['map'](r=>r['flywheel']['rewardStrategy'])['join']('\x20+\x20'),'discountStrategy':d['map'](r=>r['flywheel']['discountStrategy'])['join']('\x20+\x20'),'trustDescription':d['map'](r=>r['flywheel']['trustDescription'])['join']('\x20+\x20')},j=new Map();for(const r of d){for(const s of r['risk_checks']){!j['has'](s['id'])&&j['set'](s['id'],{...s,'industry':f});}}const k=new Map();for(const t of d){for(const u of t['needs']){!k['has'](u['id'])&&k['set'](u['id'],{...u});}}const l={'max_acceptable_cycle':Math['max'](...d['map'](v=>v['preference_template']['max_acceptable_cycle'])),'response_time_expectation':Math['min'](...d['map'](v=>v['preference_template']['response_time_expectation'])),'require_arbitration':d['some'](v=>v['preference_template']['require_arbitration']),'require_compensation_fund':d['some'](v=>v['preference_template']['require_compensation_fund']),'risk_appetite':pickStrictest(d['map'](v=>v['preference_template']['risk_appetite']),['aggressive','balanced','conservative']),'delivery_speed_priority':pickStrictest(d['map'](v=>v['preference_template']['delivery_speed_priority']),['flexible','normal','urgent']),'after_sales_expectation':pickStrictest(d['map'](v=>v['preference_template']['after_sales_expectation']),['minimal','basic','full'])},m={'name':f,'display_name':b??'Composed\x20Industry\x20('+a['join']('+')+')','traits':e,'source':'composed','version':'v1','flywheel':i,'risk_checks':Array['from'](j['values']()),'preference_template':l,'needs':Array['from'](k['values']()),'parent_industries':[...a],'evolution':{'version':0x1,'last_updated':Date['now'](),'signal_count':0x0,'pending_suggestions':0x0}};return registerIndustry(m),m;}function pickStrictest(a,b){let c=0x0,d=a[0x0]??b[0x0];for(const e of a){const f=b['indexOf'](e);f>=0x0&&f>c&&(c=f,d=e);}return d;}
1
+ import{getIndustryProfile,listIndustries,registerIndustry}from'./industry-registry.js';const TRAIT_INFERENCE_RULES=[{'keywords':['logistics','shipping','delivery','express','shipment','ship'],'trait':'has_logistics','value':!![],'weight':0.85},{'keywords':['digital','online','cloud','virtual'],'trait':'has_logistics','value':![],'weight':0.7},{'keywords':['consulting','communication','requirement-confirmation','revision-rounds','negotiate','consult'],'trait':'communication_heavy','value':!![],'weight':0.8},{'keywords':['standard-product','in-stock','one-click-order','standard','instant'],'trait':'communication_heavy','value':![],'weight':0.7},{'keywords':['digital','file','code','design-draft','electronic','online','software','source'],'trait':'pure_digital','value':!![],'weight':0.8},{'keywords':['physical','hardware','equipment'],'trait':'pure_digital','value':![],'weight':0.75},{'keywords':['course','semester','long-cycle','long-term','project-based','project'],'trait':'long_cycle','value':!![],'weight':0.75},{'keywords':['instant','in-stock','same-day','immediate'],'trait':'long_cycle','value':![],'weight':0.8},{'keywords':['rental','rent','deposit','lease','shortstay','short-stay','short\x20stay','bnb','homestay'],'trait':'deposit_required','value':!![],'weight':0.9},{'keywords':['purchase','buyout','buy'],'trait':'deposit_required','value':![],'weight':0.6},{'keywords':['multi-party','segmented','multi-stage','multi-vendor','itinerary','segment'],'trait':'multi_tier_allocation','value':!![],'weight':0.75},{'keywords':['medical','legal','financial','insurance','pharmaceutical','pharma'],'trait':'regulatory_intensity','value':'high','weight':0.9},{'keywords':['education','food','construction'],'trait':'regulatory_intensity','value':'medium','weight':0.7},{'keywords':['entertainment','gaming','digital','game'],'trait':'regulatory_intensity','value':'low','weight':0.6},{'keywords':['custom','high-value','customized','bespoke'],'trait':'trust_sensitivity','value':'high','weight':0.8},{'keywords':['standard-product','small-ticket','standard','low-value'],'trait':'trust_sensitivity','value':'low','weight':0.7},{'keywords':['subscription','membership','recurring'],'trait':'consumption_frequency','value':'frequent','weight':0.85},{'keywords':['course','semester','education'],'trait':'consumption_frequency','value':'one_time','weight':0.75},{'keywords':['daily','frequent','common'],'trait':'consumption_frequency','value':'frequent','weight':0.75},{'keywords':['small-ticket','daily','convenience-store','micro'],'trait':'avg_ticket_size','value':'micro','weight':0.7},{'keywords':['retail','commodity','standard-product'],'trait':'avg_ticket_size','value':'small','weight':0.7},{'keywords':['custom','project','outsourcing'],'trait':'avg_ticket_size','value':'medium','weight':0.7},{'keywords':['real-estate','automobile','high-value','luxury','realestate','car'],'trait':'avg_ticket_size','value':'large','weight':0.85},{'keywords':['hotel','hostel','apartment','resort','stay','room','property','accommodation','lodging','bnb','homestay','shortstay','flight','itinerary','tourism','travel','trip','vacation','tour','safari','excursion','sightseeing','guided\x20tour','driver-guide'],'trait':'has_logistics','value':!![],'weight':0.8},{'keywords':['booking','reservation','check-in','checkin','checkout','check-out','itinerary','flight','ticket','vacation','travel','trip','tour','safari','excursion','sightseeing','guided\x20tour','driver-guide'],'trait':'multi_tier_allocation','value':!![],'weight':0.75},{'keywords':['hospitality','tourism','visa','lodging'],'trait':'regulatory_intensity','value':'medium','weight':0.8},{'keywords':['hotel','hostel','resort','flight','accommodation','lodging'],'trait':'avg_ticket_size','value':'large','weight':0.85},{'keywords':['messenger'],'trait':'communication_heavy','value':!![],'weight':0.8},{'keywords':['photoshoot','photography','photo\x20session','photographer','portrait','headshot','pre-wedding','wedding\x20photo','proposal','surprise\x20proposal','elopement','experience','workshop','photos','摄影','拍摄','写真','旅拍','跟拍','求婚','婚庆','体验'],'trait':'has_logistics','value':!![],'weight':0.8},{'keywords':['photoshoot','photography','photo\x20session','photographer','portrait','headshot','体验','摄影'],'trait':'avg_ticket_size','value':'medium','weight':0.7}];export function keywordBoundaryHits(a,b,c){try{const d=(a??'')['toLowerCase'](),e=[];for(const f of b??[]){const g=String(f)['toLowerCase']()['trim']();if(g==='')continue;if(/\p{Script=Han}|\p{Script=Hiragana}|\p{Script=Katakana}|\p{Script=Hangul}/u['test'](g)){if(c?.['allowCjkSubstring']!==![]&&d['includes'](g))e['push'](f);continue;}let h=g['replace'](/[.*+?^${}()|[\]\\]/g,'\x5c$&')['replace'](/[\s\-]+/g,'[\x5cs\x5c-]+');if(/[a-z0-9]$/['test'](h)&&!h['endsWith']('s'))h+='s?';const i=new RegExp('(^|[^\x5cp{L}\x5cp{N}])'+h+'(?=$|[^\x5cp{L}\x5cp{N}])','u');if(i['test'](d))e['push'](f);}return e;}catch{return[];}}export const DEFAULT_TRAITS={'has_logistics':![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'occasional','avg_ticket_size':'small'};export function inferTraitsFromDescription(a,b){const c=(a??'')['toLowerCase'](),d=[],e=new Map(),f=new Map();for(const j of TRAIT_INFERENCE_RULES){const l=keywordBoundaryHits(c,j['keywords'],{'allowCjkSubstring':!b?.['localeNeutralLexicon']})[0x0];if(l){d['push'](l);const m=e['get'](j['trait'])??0x0;j['weight']>m&&(e['set'](j['trait'],j['weight']),f['set'](j['trait'],j['value']));}}const g={...DEFAULT_TRAITS};for(const [n,o]of f['entries']()){g[n]=o;}const h=e['size'],i=Math['min'](0x1,h/0xa);return{'traits':g,'confidence':i,'matched_keywords':Array['from'](new Set(d)),'trait_confidence':Object['fromEntries'](e)};}export const ENUM_TRAIT_SCALES={'regulatory_intensity':['low','medium','high'],'trust_sensitivity':['low','medium','high'],'consumption_frequency':['one_time','occasional','frequent'],'avg_ticket_size':['micro','small','medium','large']};export const BOOLEAN_TRAIT_KEYS=['has_logistics','communication_heavy','pure_digital','long_cycle','deposit_required','multi_tier_allocation'];const ENUM_TRAIT_KEYS=['regulatory_intensity','trust_sensitivity','consumption_frequency','avg_ticket_size'];export const EVIDENCE_THRESHOLD=0.5;export const INDUSTRY_REQUIRED_TRAITS={'subscription':[{'trait':'pure_digital','value':!![],'reason':'subscription\x20build\x20notes:\x20\x27Pure\x20digital\x20—\x20native\x20WoWok\x20soil\x27'}],'retail':[{'trait':'has_logistics','value':!![],'reason':'retail\x20fulfilment\x20is\x20physical\x20shipping'}],'retail_d2c':[{'trait':'has_logistics','value':!![],'reason':'retail_d2c\x20fulfilment\x20is\x20physical\x20shipping'}],'rental':[{'trait':'deposit_required','value':!![],'reason':'rental\x20without\x20a\x20deposit\x20is\x20not\x20the\x20rental\x20model'}],'travel':[{'trait':'has_logistics','value':!![],'reason':'travel\x20fulfilment\x20happens\x20at\x20a\x20physical\x20destination'},{'trait':'multi_tier_allocation','value':!![],'reason':'travel\x20splits\x20guest\x20/\x20property\x20/\x20payment\x20legs'}],'education':[{'trait':'long_cycle','value':!![],'reason':'education\x20delivers\x20over\x20a\x20course/term\x20cycle'}],'freelance':[{'trait':'communication_heavy','value':!![],'reason':'freelance\x20is\x20requirement-confirmation\x20driven'}],'licensing':[{'trait':'pure_digital','value':!![],'reason':'a\x20license\x20grant\x20is\x20a\x20digital\x20right,\x20no\x20physical\x20fulfilment\x20leg'},{'trait':'multi_tier_allocation','value':!![],'reason':'licensing\x20splits\x20proceeds\x20across\x20rights-holders\x20—\x20the\x20royalty\x20waterfall\x20is\x20the\x20defining\x20structure'}],'crowdfunding':[{'trait':'deposit_required','value':!![],'reason':'each\x20contribution\x20is\x20escrowed\x20and\x20locked\x20until\x20the\x20deadline\x20—\x20funds-in-escrow\x20is\x20the\x20defining\x20structure'},{'trait':'multi_tier_allocation','value':!![],'reason':'settlement\x20is\x20a\x20two-leg\x20allocation\x20(release-to-project\x20XOR\x20per-contributor\x20refund)\x20—\x20the\x20split\x20decision\x20is\x20the\x20defining\x20structure'}],'general':[]};export function traitContradictions(a,b,c){const d=INDUSTRY_REQUIRED_TRAITS[a];if(!d||d['length']===0x0)return[];const e=[];for(const f of d){const g=b[f['trait']],h=typeof f['value']==='boolean'?g!==f['value']:g!==f['value'];if(!h)continue;const i=c?.[f['trait']];if(c&&(i===undefined||i<EVIDENCE_THRESHOLD))continue;e['push'](f);}return e;}export function filterConsistentIndustries(a,b,c){const d=[],e=[];for(const f of a){const g=traitContradictions(f['industry'],b,c);if(g['length']>0x0)e['push']({'industry':f['industry'],'contradictions':g});else d['push'](f);}return{'consistent':d,'inconsistent':e};}export const DOMAIN_PRIORS=[{'domain':'travel_accommodation','keywords':['hotel','hostel','apartment','resort','flight','ticket','itinerary','reservation','booking','check-in','checkin','checkout','check-out','stay','room','property','vacation','travel','trip','ota','accommodation','lodging','bnb','homestay','shortstay','short-stay','tour','safari','excursion','sightseeing','guided\x20tour','driver-guide'],'industries':['travel','rental'],'boost':0.15},{'domain':'local_life_delivery','keywords':['food\x20delivery','takeout','meal\x20delivery','restaurant\x20delivery','rider','courier','errand','buy\x20for\x20me','queue\x20service','pickup\x20point','group\x20buy','group-buy','community\x20group-buy','grocery\x20delivery','on-demand\x20delivery','essen\x20bestellen','lebensmittel\x20lieferung','lieferdienst','besorgung','abholpunkt','gruppeneinkauf','gemeinsame\x20bestellung','livraison\x20de\x20repas','livraison\x20de\x20courses','comida\x20a\x20domicilio','mandados','punto\x20de\x20recogida','compra\x20comunitaria'],'industries':['delivery','group_buy','retail'],'boost':0.15}];export function detectDomainPriors(a){const b=(a??'')['toLowerCase'](),c=[];for(const d of DOMAIN_PRIORS){const e=keywordBoundaryHits(b,d['keywords']);if(e['length']===0x0)continue;c['push']({'domain':d['domain'],'matched_keywords':Array['from'](new Set(e)),'industries':[...d['industries']],'boost':d['boost']});}return c;}function dimAffinity(c,d,e){if(d===e)return 0x1;const f=ENUM_TRAIT_SCALES[c];if(!f)return 0x0;const g=f['indexOf'](String(d)),h=f['indexOf'](String(e));if(g<0x0||h<0x0)return 0x0;const i=f['length']-0x1;return Math['max'](0x0,0x1-Math['abs'](g-h)/ i);}const REQUIREMENT_SUPPORT_WEIGHT=0.25;export function requirementSupport(a,b,c){const d=INDUSTRY_REQUIRED_TRAITS[a];if(!d||d['length']===0x0)return undefined;let e=0x0;for(const f of d){const g=c?.[f['trait']];if(c&&(g===undefined||g<EVIDENCE_THRESHOLD)){e+=0.5;continue;}e+=b[f['trait']]===f['value']?0x1:0x0;}return e/d['length'];}export function findSimilarIndustries(a,b,d){const e=listIndustries(),f=[],g=d?.['trait_confidence'],h=[...BOOLEAN_TRAIT_KEYS,...ENUM_TRAIT_KEYS];for(const i of e){const j=i['traits'];let l=0x0;const m=[],n=[],o=[];for(const s of h){const t=dimAffinity(s,a[s],j[s]),u=g?.[s],v=g===undefined||u!==undefined&&u>=EVIDENCE_THRESHOLD;if(v){o['push'](s);if(t===0x1)m['push'](s);else n['push'](s);}l+=v?t:0.5;}const p=l/h['length'],q=requirementSupport(i['name'],a,d?.['trait_confidence']),r=q===undefined?p:p+REQUIREMENT_SUPPORT_WEIGHT*q;f['push']({'industry':i['name'],'similarity':r,'matched_traits':m,'contradicted_traits':n,'evidenced_traits':o,'trait_distance':Number((0x1-r)['toFixed'](0x4)),...q===undefined?{}:{'requirement_support':Number(q['toFixed'](0x4))}});}return f['sort']((w,x)=>x['similarity']-w['similarity']),typeof b==='number'?f['slice'](0x0,Math['max'](0x0,b)):f;}const FALLBACK_RISK_CHECK_RULES=[{'trait_key':'deposit_required','trait_value':!![],'check':{'id':'fb_deposit_lock','description':'Deposit\x20lock-period\x20safety\x20(deposit\x20cannot\x20be\x20withdrawn\x20by\x20merchant\x20at\x20any\x20time)','weight':0x1e,'passed':a=>a?.['fund_safety']?.['lock_duration_safe']??![],'advice':'⚠️\x20Lock\x20period\x20unsafe:\x20deposit\x20may\x20be\x20withdrawn\x20at\x20any\x20time;\x20recommend\x20requiring\x20a\x20lock\x20period\x20≥\x207\x20days.'},'need':{'id':'need_deposit_lock','tier':'personalized','description':'Deposit\x20lock-period\x20safety','satisfied':a=>a?.['fund_safety']?.['lock_duration_safe']??![],'advice':'Deposit\x20lock-period\x20unsafe.'}},{'trait_key':'has_logistics','trait_value':!![],'check':{'id':'fb_logistics_track','description':'Logistics\x20Guard\x20configuration\x20(shipping/receipt\x20verification)','weight':0x19,'passed':a=>a?.['workflow_analysis']?.['has_milestone_nodes']??![],'advice':'⚠️\x20No\x20logistics\x20Guard:\x20shipping\x20and\x20receipt\x20status\x20are\x20not\x20verified\x20by\x20a\x20third\x20party.'}},{'trait_key':'pure_digital','trait_value':!![],'check':{'id':'fb_wip_verified','description':'WIP\x20hash\x20verification\x20(digital\x20deliverables\x20traceable)','weight':0x19,'passed':a=>a?.['service_basics']?.['wip_verified']===!![],'advice':'⚠️\x20WIP\x20not\x20verified:\x20digital\x20deliverables\x20cannot\x20be\x20traced.'}},{'trait_key':'long_cycle','trait_value':!![],'check':{'id':'fb_milestone','description':'Milestone\x20nodes\x20(phased\x20acceptance)','weight':0x19,'passed':a=>a?.['workflow_analysis']?.['has_milestone_nodes']??![],'advice':'⚠️\x20No\x20milestone\x20nodes:\x20long-cycle\x20projects\x20lack\x20phased\x20acceptance.'}},{'trait_key':'regulatory_intensity','trait_value':'high','check':{'id':'fb_compliance','description':'Compliance\x20configuration\x20(arbitration\x20+\x20compensation\x20fund)','weight':0x1e,'passed':a=>(a?.['workflow_analysis']?.['has_arbitration_path']??![])&&(a?.['service_basics']?.['compensation_fund_balance']??0x0n)>0x0n,'advice':'🔴\x20Compliance\x20requirement\x20not\x20met:\x20highly\x20regulated\x20industries\x20must\x20configure\x20arbitration\x20and\x20a\x20compensation\x20fund.'}},{'trait_key':'multi_tier_allocation','trait_value':!![],'check':{'id':'fb_multi_tier_fair','description':'Multi-tier\x20allocation\x20fairness\x20(each\x20segment\x20has\x20a\x20corresponding\x20Allocator)','weight':0x14,'passed':a=>(a?.['workflow_analysis']?.['total_nodes']??0x0)>=0x3,'advice':'⚠️\x20Multi-tier\x20allocation\x20requires\x20corresponding\x20nodes\x20and\x20Allocators,\x20otherwise\x20fund\x20distribution\x20is\x20opaque.'}}];function buildFallbackFlywheel(a,b){const c=['Fund\x20escrow\x20+\x20process\x20transparency'];if(b['deposit_required'])c['push']('Deposit\x20escrow\x20+\x20lock-period\x20guarantee');if(b['has_logistics'])c['push']('Logistics\x20Guard\x20verification');if(b['pure_digital'])c['push']('WIP\x20digital\x20deliverable\x20traceability');if(b['regulatory_intensity']==='high')c['push']('Compliant\x20arbitration\x20+\x20compensation\x20fund\x20guarantee');const d=[{'action':'Set\x20first-order\x20Reward','purpose':'Attract\x20new\x20customers','mutableField':'rewards','metricToWatch':'New\x20customer\x20order\x20rate'},{'action':'Configure\x20compensation_fund','purpose':'Improve\x20trust\x20score','mutableField':'compensation_fund','metricToWatch':'Trust\x20score'}];return b['long_cycle']&&d['push']({'action':'Milestone\x20Reward','purpose':'Incentivize\x20completion\x20of\x20long-cycle\x20projects','mutableField':'rewards','metricToWatch':'Completion\x20rate'}),b['consumption_frequency']==='frequent'&&d['push']({'action':'Loyalty\x20Reward','purpose':'Improve\x20repurchase','mutableField':'rewards','metricToWatch':'Repurchase\x20rate'}),{'industry':a,'trustSellingPoints':c,'keyActions':d,'rewardStrategy':'First-order\x20reward\x20+\x20referral\x20cashback'+(b['consumption_frequency']==='frequent'?'\x20+\x20loyalty\x20reward':''),'discountStrategy':b['long_cycle']?'Long-term\x20cooperation\x20discount\x20+\x20tiered\x20discount':'First-order\x20discount\x20+\x20spend-threshold\x20discount','trustDescription':c['join']('\x20+\x20')};}function buildFallbackPreferenceTemplate(a){return{'max_acceptable_cycle':a['long_cycle']?0x5a:0xe,'response_time_expectation':a['communication_heavy']?0x4:0xc,'require_arbitration':a['regulatory_intensity']!=='low'||a['trust_sensitivity']==='high','require_compensation_fund':a['trust_sensitivity']==='high'||a['deposit_required'],'risk_appetite':a['trust_sensitivity']==='high'?'conservative':'balanced','delivery_speed_priority':a['has_logistics']&&a['consumption_frequency']==='frequent'?'urgent':'normal','after_sales_expectation':a['trust_sensitivity']==='high'?'full':'basic'};}export function synthesizeProfile(a,b){const c=findSimilarIndustries(a,0x1),d=c[0x0],e=d&&d['similarity']>=0.6?getIndustryProfile(d['industry']):undefined,f=b??'custom_'+Date['now']()['toString'](0x24),g=b??'Custom\x20Industry',h=e?{...e['flywheel'],'industry':f}:buildFallbackFlywheel(f,a),i=e?{...e['preference_template'],'max_acceptable_cycle':a['long_cycle']?Math['max'](e['preference_template']['max_acceptable_cycle'],0x5a):e['preference_template']['max_acceptable_cycle'],'require_compensation_fund':a['trust_sensitivity']==='high'?!![]:e['preference_template']['require_compensation_fund']}:buildFallbackPreferenceTemplate(a),j=[],k=[];for(const l of FALLBACK_RISK_CHECK_RULES){a[l['trait_key']]===l['trait_value']&&(j['push']({...l['check'],'industry':f}),l['need']&&k['push']({...l['need']}));}return j['length']===0x0&&j['push']({'id':'fb_basic_arbitration','industry':f,'description':'Configure\x20arbitration\x20(basic\x20dispute\x20resolution)','weight':0x64,'passed':m=>m?.['workflow_analysis']?.['has_arbitration_path']??![],'advice':'⚠️\x20No\x20arbitration\x20configured:\x20basic\x20disputes\x20have\x20no\x20resolution\x20channel.'}),{'name':f,'display_name':g,'traits':a,'source':'inferred','version':'v1','flywheel':h,'risk_checks':j,'preference_template':i,'needs':k,'confidence':d?.['similarity']??0.3,'evolution':{'version':0x1,'last_updated':Date['now'](),'signal_count':0x0,'pending_suggestions':0x0}};}export function composeIndustries(a,b){if(!a||a['length']===0x0)return undefined;const d=[];for(const o of a){const q=getIndustryProfile(o);if(!q)return undefined;d['push'](q);}const e={'has_logistics':d['some'](r=>r['traits']['has_logistics']),'communication_heavy':d['some'](r=>r['traits']['communication_heavy']),'pure_digital':d['every'](r=>r['traits']['pure_digital']),'long_cycle':d['some'](r=>r['traits']['long_cycle']),'deposit_required':d['some'](r=>r['traits']['deposit_required']),'multi_tier_allocation':d['some'](r=>r['traits']['multi_tier_allocation']),'regulatory_intensity':pickStrictest(d['map'](r=>r['traits']['regulatory_intensity']),['low','medium','high']),'trust_sensitivity':pickStrictest(d['map'](r=>r['traits']['trust_sensitivity']),['low','medium','high']),'consumption_frequency':pickStrictest(d['map'](r=>r['traits']['consumption_frequency']),['one_time','occasional','frequent']),'avg_ticket_size':pickStrictest(d['map'](r=>r['traits']['avg_ticket_size']),['micro','small','medium','large'])},f=b??'composed_'+a['join']('_and_'),g=Array['from'](new Set(d['flatMap'](r=>r['flywheel']['trustSellingPoints']))),h=Array['from'](new Set(d['flatMap'](r=>r['flywheel']['keyActions']))),i={'industry':f,'trustSellingPoints':g,'keyActions':h,'rewardStrategy':d['map'](r=>r['flywheel']['rewardStrategy'])['join']('\x20+\x20'),'discountStrategy':d['map'](r=>r['flywheel']['discountStrategy'])['join']('\x20+\x20'),'trustDescription':d['map'](r=>r['flywheel']['trustDescription'])['join']('\x20+\x20')},j=new Map();for(const r of d){for(const s of r['risk_checks']){!j['has'](s['id'])&&j['set'](s['id'],{...s,'industry':f});}}const k=new Map();for(const t of d){for(const u of t['needs']){!k['has'](u['id'])&&k['set'](u['id'],{...u});}}const l={'max_acceptable_cycle':Math['max'](...d['map'](v=>v['preference_template']['max_acceptable_cycle'])),'response_time_expectation':Math['min'](...d['map'](v=>v['preference_template']['response_time_expectation'])),'require_arbitration':d['some'](v=>v['preference_template']['require_arbitration']),'require_compensation_fund':d['some'](v=>v['preference_template']['require_compensation_fund']),'risk_appetite':pickStrictest(d['map'](v=>v['preference_template']['risk_appetite']),['aggressive','balanced','conservative']),'delivery_speed_priority':pickStrictest(d['map'](v=>v['preference_template']['delivery_speed_priority']),['flexible','normal','urgent']),'after_sales_expectation':pickStrictest(d['map'](v=>v['preference_template']['after_sales_expectation']),['minimal','basic','full'])},m={'name':f,'display_name':b??'Composed\x20Industry\x20('+a['join']('+')+')','traits':e,'source':'composed','version':'v1','flywheel':i,'risk_checks':Array['from'](j['values']()),'preference_template':l,'needs':Array['from'](k['values']()),'parent_industries':[...a],'evolution':{'version':0x1,'last_updated':Date['now'](),'signal_count':0x0,'pending_suggestions':0x0}};return registerIndustry(m),m;}function pickStrictest(a,b){let c=0x0,d=a[0x0]??b[0x0];for(const e of a){const f=b['indexOf'](e);f>=0x0&&f>c&&(c=f,d=e);}return d;}
@@ -1 +1 @@
1
- import{getFlywheelForIndustry,listIndustries as a248a,_setRegistryLookup as a248b}from'./acquisition-flywheel.js';import{getIndustryRiskChecks,getIndustryNeeds,getIndustryTemplate,SUPPORTED_INDUSTRIES}from'../customer/index.js';import{_setRegistryLookup as a248c}from'../customer/industry-risks.js';import{_setRegistryLookup as a248d}from'../customer/user-preferences.js';export function isRegisteredIndustry(a){if(!a)return![];const b=resolveIndustryName(a)??a['toLowerCase']();return b==='general'||registry['has'](b);}const BUILTIN_TRAITS={'freelance':{'has_logistics':![],'communication_heavy':!![],'pure_digital':!![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'high','consumption_frequency':'occasional','avg_ticket_size':'medium'},'rental':{'has_logistics':!![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':!![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'high','consumption_frequency':'occasional','avg_ticket_size':'medium'},'education':{'has_logistics':![],'communication_heavy':!![],'pure_digital':![],'long_cycle':!![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'medium','trust_sensitivity':'high','consumption_frequency':'one_time','avg_ticket_size':'large'},'travel':{'has_logistics':!![],'communication_heavy':!![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':!![],'regulatory_intensity':'medium','trust_sensitivity':'high','consumption_frequency':'one_time','avg_ticket_size':'large'},'subscription':{'has_logistics':![],'communication_heavy':![],'pure_digital':!![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'frequent','avg_ticket_size':'small'},'retail':{'has_logistics':!![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'frequent','avg_ticket_size':'small'},'licensing':{'has_logistics':![],'communication_heavy':![],'pure_digital':!![],'long_cycle':!![],'deposit_required':![],'multi_tier_allocation':!![],'regulatory_intensity':'medium','trust_sensitivity':'high','consumption_frequency':'occasional','avg_ticket_size':'medium'},'crowdfunding':{'has_logistics':!![],'communication_heavy':!![],'pure_digital':![],'long_cycle':!![],'deposit_required':!![],'multi_tier_allocation':!![],'regulatory_intensity':'high','trust_sensitivity':'high','consumption_frequency':'one_time','avg_ticket_size':'medium'},'delivery':{'has_logistics':!![],'communication_heavy':!![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'high','trust_sensitivity':'medium','consumption_frequency':'frequent','avg_ticket_size':'small'},'group_buy':{'has_logistics':!![],'communication_heavy':!![],'pure_digital':![],'long_cycle':![],'deposit_required':!![],'multi_tier_allocation':!![],'regulatory_intensity':'medium','trust_sensitivity':'high','consumption_frequency':'frequent','avg_ticket_size':'small'}},BUILTIN_DISPLAY_NAMES={'freelance':'Freelance','rental':'Rental','education':'Education','travel':'Travel','subscription':'Subscription','retail':'Retail','licensing':'Licensing','crowdfunding':'Crowdfunding','delivery':'Local\x20Delivery','group_buy':'Community\x20Group-Buy','general':'General','custom':'Custom'},INDUSTRY_ALIASES={'outsourcing':'freelance','design':'freelance','development':'freelance','consulting':'freelance','rent':'rental','lease':'rental','course':'education','training':'education','tourism':'travel','itinerary':'travel','membership':'subscription','ecommerce':'retail','goods':'retail','license':'licensing','licensing':'licensing','licence':'licensing','royalty':'licensing','royalties':'licensing','ip-licensing':'licensing','intellectual-property':'licensing','music-rights':'licensing','sync-licensing':'licensing','beat-licensing':'licensing','crowdfunding':'crowdfunding','crowdfund':'crowdfunding','crowd-funding':'crowdfunding','fundraising':'crowdfunding','pledge':'crowdfunding','all-or-nothing':'crowdfunding','threshold-campaign':'crowdfunding','backer':'crowdfunding','freelancer':'freelance','gig':'freelance','edu':'education','trip':'travel','tour':'travel','subscribe':'subscription','shop':'retail','general_industry':'general','amazon':'retail','etsy':'retail','upwork':'freelance','fiverr':'freelance','contra':'freelance','airbnb':'rental','ziroom':'rental','turo':'rental','getaround':'rental','coursera':'education','udemy':'education','yuanfudao':'education','booking':'travel','klook':'travel','patreon':'subscription','onlyfans':'subscription','substack':'subscription','royalty-exchange':'licensing','royaltyexchange':'licensing','beatstars':'licensing','kickstarter':'crowdfunding','indiegogo':'crowdfunding','gofundme':'crowdfunding','meituan-waimai':'delivery','meituan':'delivery','shansong':'delivery','eleme':'delivery','doordash':'delivery','ubereats':'delivery','duoduo-maicai':'group_buy','pinduoduo':'group_buy','kuaituantuan':'group_buy','meituan-youxuan':'group_buy','bnb':'rental','homestay':'rental','shortstay':'rental','short-stay':'rental','short-term-rental':'rental','delivery':'delivery','food-delivery':'delivery','takeout':'delivery','takeaway':'delivery','errand':'delivery','on-demand':'delivery','courier':'delivery','rideshare-delivery':'delivery','group-buy':'group_buy','groupbuy':'group_buy','community-group-buy':'group_buy','team-purchase':'group_buy','neighborhood-buy':'group_buy'};export const INDUSTRY_REGISTRY_VERSION=0x2;const registry=new Map();function seedBuiltinProfile(a){const b=BUILTIN_TRAITS[a];if(!b)return undefined;const c=getFlywheelForIndustry(a);if(!c)return undefined;const d=getIndustryRiskChecks(a),e=getIndustryNeeds(a),f=getIndustryTemplate(a);return{'name':a,'display_name':BUILTIN_DISPLAY_NAMES[a]??a,'traits':b,'source':'builtin','version':'v1','flywheel':c,'risk_checks':d,'preference_template':f,'needs':e};}function seedBuiltinIndustries(){for(const a of SUPPORTED_INDUSTRIES){const b=seedBuiltinProfile(a);b&&registry['set'](a,b);}}seedBuiltinIndustries(),injectRegistryLookup();function injectRegistryLookup(){a248b(a=>{const b=registry['get'](a);return b?{'flywheel':b['flywheel']}:undefined;}),a248c(a=>{const b=registry['get'](a);return b?{'risk_checks':b['risk_checks'],'needs':b['needs']}:undefined;}),a248d(a=>{const b=registry['get'](a);return b?{'preference_template':b['preference_template']}:undefined;});}export function getIndustryProfile(a){const b=registry['get'](a);return b?JSON['parse'](JSON['stringify'](b)):undefined;}export function listIndustries(a){const b=Array['from'](registry['values']());if(a?.['source'])return b['filter'](c=>c['source']===a['source']);return b;}export function registerIndustry(a){if(!a['name']||!a['traits']||!a['flywheel'])return![];return registry['set'](a['name'],a),!![];}export function getIndustryTraits(a){return registry['get'](a)?.['traits'];}export function resolveIndustryName(a){if(!a||typeof a!=='string')return undefined;const b=a['trim']();if(!b)return undefined;const c=b['toLowerCase']();if(INDUSTRY_ALIASES[b])return INDUSTRY_ALIASES[b];if(INDUSTRY_ALIASES[c])return INDUSTRY_ALIASES[c];if(registry['has'](b))return b;if(registry['has'](c))return c;return undefined;}export function getRegistrySize(){return registry['size'];}export function _resetRegistryForTest(){registry['clear'](),a248b(null),a248c(null),a248d(null),seedBuiltinIndustries(),injectRegistryLookup();}export function listBuiltinIndustryNames(){return a248a();}
1
+ import{getFlywheelForIndustry,listIndustries as a272a,_setRegistryLookup as a272b}from'./acquisition-flywheel.js';import{getIndustryRiskChecks,getIndustryNeeds,getIndustryTemplate,SUPPORTED_INDUSTRIES}from'../customer/index.js';import{_setRegistryLookup as a272c}from'../customer/industry-risks.js';import{_setRegistryLookup as a272d}from'../customer/user-preferences.js';export function isRegisteredIndustry(a){if(!a)return![];const b=resolveIndustryName(a)??a['toLowerCase']();return b==='general'||registry['has'](b);}const BUILTIN_TRAITS={'freelance':{'has_logistics':![],'communication_heavy':!![],'pure_digital':!![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'high','consumption_frequency':'occasional','avg_ticket_size':'medium'},'rental':{'has_logistics':!![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':!![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'high','consumption_frequency':'occasional','avg_ticket_size':'medium'},'education':{'has_logistics':![],'communication_heavy':!![],'pure_digital':![],'long_cycle':!![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'medium','trust_sensitivity':'high','consumption_frequency':'one_time','avg_ticket_size':'large'},'travel':{'has_logistics':!![],'communication_heavy':!![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':!![],'regulatory_intensity':'medium','trust_sensitivity':'high','consumption_frequency':'one_time','avg_ticket_size':'large'},'subscription':{'has_logistics':![],'communication_heavy':![],'pure_digital':!![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'frequent','avg_ticket_size':'small'},'retail':{'has_logistics':!![],'communication_heavy':![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'low','trust_sensitivity':'medium','consumption_frequency':'frequent','avg_ticket_size':'small'},'licensing':{'has_logistics':![],'communication_heavy':![],'pure_digital':!![],'long_cycle':!![],'deposit_required':![],'multi_tier_allocation':!![],'regulatory_intensity':'medium','trust_sensitivity':'high','consumption_frequency':'occasional','avg_ticket_size':'medium'},'crowdfunding':{'has_logistics':!![],'communication_heavy':!![],'pure_digital':![],'long_cycle':!![],'deposit_required':!![],'multi_tier_allocation':!![],'regulatory_intensity':'high','trust_sensitivity':'high','consumption_frequency':'one_time','avg_ticket_size':'medium'},'delivery':{'has_logistics':!![],'communication_heavy':!![],'pure_digital':![],'long_cycle':![],'deposit_required':![],'multi_tier_allocation':![],'regulatory_intensity':'high','trust_sensitivity':'medium','consumption_frequency':'frequent','avg_ticket_size':'small'},'group_buy':{'has_logistics':!![],'communication_heavy':!![],'pure_digital':![],'long_cycle':![],'deposit_required':!![],'multi_tier_allocation':!![],'regulatory_intensity':'medium','trust_sensitivity':'high','consumption_frequency':'frequent','avg_ticket_size':'small'}},BUILTIN_DISPLAY_NAMES={'freelance':'Freelance','rental':'Rental','education':'Education','travel':'Travel','subscription':'Subscription','retail':'Retail','licensing':'Licensing','crowdfunding':'Crowdfunding','delivery':'Local\x20Delivery','group_buy':'Community\x20Group-Buy','general':'General','custom':'Custom'},INDUSTRY_ALIASES={'outsourcing':'freelance','design':'freelance','development':'freelance','consulting':'freelance','rent':'rental','lease':'rental','course':'education','training':'education','tourism':'travel','itinerary':'travel','membership':'subscription','ecommerce':'retail','goods':'retail','license':'licensing','licensing':'licensing','licence':'licensing','royalty':'licensing','royalties':'licensing','ip-licensing':'licensing','intellectual-property':'licensing','music-rights':'licensing','sync-licensing':'licensing','beat-licensing':'licensing','crowdfunding':'crowdfunding','crowdfund':'crowdfunding','crowd-funding':'crowdfunding','fundraising':'crowdfunding','pledge':'crowdfunding','all-or-nothing':'crowdfunding','threshold-campaign':'crowdfunding','backer':'crowdfunding','freelancer':'freelance','gig':'freelance','edu':'education','trip':'travel','tour':'travel','subscribe':'subscription','shop':'retail','general_industry':'general','amazon':'retail','etsy':'retail','upwork':'freelance','fiverr':'freelance','contra':'freelance','airbnb':'rental','ziroom':'rental','turo':'rental','getaround':'rental','coursera':'education','udemy':'education','yuanfudao':'education','booking':'travel','klook':'travel','patreon':'subscription','onlyfans':'subscription','substack':'subscription','royalty-exchange':'licensing','royaltyexchange':'licensing','beatstars':'licensing','kickstarter':'crowdfunding','indiegogo':'crowdfunding','gofundme':'crowdfunding','meituan-waimai':'delivery','meituan':'delivery','shansong':'delivery','eleme':'delivery','doordash':'delivery','ubereats':'delivery','duoduo-maicai':'group_buy','pinduoduo':'group_buy','kuaituantuan':'group_buy','meituan-youxuan':'group_buy','bnb':'rental','homestay':'rental','shortstay':'rental','short-stay':'rental','short-term-rental':'rental','delivery':'delivery','food-delivery':'delivery','takeout':'delivery','takeaway':'delivery','errand':'delivery','on-demand':'delivery','courier':'delivery','rideshare-delivery':'delivery','group-buy':'group_buy','groupbuy':'group_buy','community-group-buy':'group_buy','team-purchase':'group_buy','neighborhood-buy':'group_buy'};export const INDUSTRY_REGISTRY_VERSION=0x2;const registry=new Map();function seedBuiltinProfile(a){const b=BUILTIN_TRAITS[a];if(!b)return undefined;const c=getFlywheelForIndustry(a);if(!c)return undefined;const d=getIndustryRiskChecks(a),e=getIndustryNeeds(a),f=getIndustryTemplate(a);return{'name':a,'display_name':BUILTIN_DISPLAY_NAMES[a]??a,'traits':b,'source':'builtin','version':'v1','flywheel':c,'risk_checks':d,'preference_template':f,'needs':e};}function seedBuiltinIndustries(){for(const a of SUPPORTED_INDUSTRIES){const b=seedBuiltinProfile(a);b&&registry['set'](a,b);}}seedBuiltinIndustries(),injectRegistryLookup();function injectRegistryLookup(){a272b(a=>{const b=registry['get'](a);return b?{'flywheel':b['flywheel']}:undefined;}),a272c(a=>{const b=registry['get'](a);return b?{'risk_checks':b['risk_checks'],'needs':b['needs']}:undefined;}),a272d(a=>{const b=registry['get'](a);return b?{'preference_template':b['preference_template']}:undefined;});}export function getIndustryProfile(a){const b=registry['get'](a);return b?JSON['parse'](JSON['stringify'](b)):undefined;}export function listIndustries(a){const b=Array['from'](registry['values']());if(a?.['source'])return b['filter'](c=>c['source']===a['source']);return b;}export function registerIndustry(a){if(!a['name']||!a['traits']||!a['flywheel'])return![];return registry['set'](a['name'],a),!![];}export function getIndustryTraits(a){return registry['get'](a)?.['traits'];}export function resolveIndustryName(a){if(!a||typeof a!=='string')return undefined;const b=a['trim']();if(!b)return undefined;const c=b['toLowerCase']();if(INDUSTRY_ALIASES[b])return INDUSTRY_ALIASES[b];if(INDUSTRY_ALIASES[c])return INDUSTRY_ALIASES[c];if(registry['has'](b))return b;if(registry['has'](c))return c;return undefined;}export function getRegistrySize(){return registry['size'];}export function _resetRegistryForTest(){registry['clear'](),a272b(null),a272c(null),a272d(null),seedBuiltinIndustries(),injectRegistryLookup();}export function listBuiltinIndustryNames(){return a272a();}