@wowok/agent-mcp 3.1.0 → 3.1.3

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 (337) hide show
  1. package/dist/config/runtime.js +1 -1
  2. package/dist/customer/index.d.ts +3 -9
  3. package/dist/customer/index.js +1 -1
  4. package/dist/customer/industry-risks.d.ts +3 -17
  5. package/dist/customer/industry-risks.js +1 -1
  6. package/dist/customer/types.d.ts +1 -165
  7. package/dist/customer/types.js +1 -1
  8. package/dist/customer/user-preferences.d.ts +0 -49
  9. package/dist/customer/user-preferences.js +1 -1
  10. package/dist/evaluation/arbitration-game.js +1 -1
  11. package/dist/evaluation/architecture.spec.d.ts +1 -0
  12. package/dist/evaluation/architecture.spec.js +1 -0
  13. package/dist/evaluation/builtins/graph-service.d.ts +16 -0
  14. package/dist/evaluation/builtins/graph-service.js +1 -0
  15. package/dist/evaluation/builtins/graph-service.spec.d.ts +1 -0
  16. package/dist/evaluation/builtins/graph-service.spec.js +1 -0
  17. package/dist/evaluation/builtins/index.d.ts +1 -1
  18. package/dist/evaluation/builtins/index.js +1 -1
  19. package/dist/evaluation/builtins/purity.spec.d.ts +1 -0
  20. package/dist/evaluation/builtins/purity.spec.js +1 -0
  21. package/dist/evaluation/engine.js +1 -1
  22. package/dist/evaluation/facets/catalog.d.ts +19 -0
  23. package/dist/evaluation/facets/catalog.js +1 -0
  24. package/dist/evaluation/guard-scan.d.ts +10 -0
  25. package/dist/evaluation/guard-scan.js +1 -0
  26. package/dist/evaluation/location-match.js +1 -1
  27. package/dist/evaluation/standards.d.ts +31 -0
  28. package/dist/evaluation/standards.js +1 -0
  29. package/dist/evaluation/standards.spec.d.ts +1 -0
  30. package/dist/evaluation/standards.spec.js +1 -0
  31. package/dist/evaluation/types.d.ts +9 -0
  32. package/dist/experience/realtime-feedback.js +1 -1
  33. package/dist/extensions/index.d.ts +1 -1
  34. package/dist/extensions/index.js +1 -1
  35. package/dist/extensions/industry-layers.d.ts +6 -5
  36. package/dist/extensions/industry-layers.js +1 -1
  37. package/dist/extensions/industry-pack.js +1 -1
  38. package/dist/goal/GoalClassifier.js +1 -1
  39. package/dist/graph/onchain/analyze.d.ts +16 -3
  40. package/dist/graph/onchain/analyze.js +1 -1
  41. package/dist/graph/onchain/analyze.spec.js +1 -1
  42. package/dist/graph/onchain/dataplane.d.ts +1 -1
  43. package/dist/graph/onchain/dataplane.js +1 -1
  44. package/dist/graph/onchain/edge-batch.spec.d.ts +1 -0
  45. package/dist/graph/onchain/edge-batch.spec.js +1 -0
  46. package/dist/graph/onchain/edge-schema.d.ts +11 -3
  47. package/dist/graph/onchain/edge-schema.js +1 -1
  48. package/dist/graph/onchain/entity-profile.spec.d.ts +1 -0
  49. package/dist/graph/onchain/entity-profile.spec.js +1 -0
  50. package/dist/graph/onchain/event-history.spec.d.ts +1 -0
  51. package/dist/graph/onchain/event-history.spec.js +1 -0
  52. package/dist/graph/onchain/expand.js +1 -1
  53. package/dist/graph/onchain/extract-deep.spec.d.ts +1 -0
  54. package/dist/graph/onchain/extract-deep.spec.js +1 -0
  55. package/dist/graph/onchain/extract.d.ts +11 -3
  56. package/dist/graph/onchain/extract.js +1 -1
  57. package/dist/graph/onchain/facet-projection.d.ts +99 -0
  58. package/dist/graph/onchain/facet-projection.js +1 -0
  59. package/dist/graph/onchain/facet-projection.spec.d.ts +1 -0
  60. package/dist/graph/onchain/facet-projection.spec.js +1 -0
  61. package/dist/graph/onchain/facts.d.ts +103 -0
  62. package/dist/graph/onchain/facts.js +1 -0
  63. package/dist/graph/onchain/facts.spec.d.ts +1 -0
  64. package/dist/graph/onchain/facts.spec.js +1 -0
  65. package/dist/graph/onchain/field-manifest.d.ts +29 -0
  66. package/dist/graph/onchain/field-manifest.js +1 -0
  67. package/dist/graph/onchain/field-manifest.spec.d.ts +1 -0
  68. package/dist/graph/onchain/field-manifest.spec.js +1 -0
  69. package/dist/graph/onchain/fixtures.d.ts +80 -0
  70. package/dist/graph/onchain/fixtures.js +1 -0
  71. package/dist/graph/onchain/fixtures.spec.d.ts +1 -0
  72. package/dist/graph/onchain/fixtures.spec.js +1 -0
  73. package/dist/graph/onchain/index.d.ts +8 -2
  74. package/dist/graph/onchain/index.js +1 -1
  75. package/dist/graph/onchain/interest.js +1 -1
  76. package/dist/graph/onchain/label-lint.spec.d.ts +1 -0
  77. package/dist/graph/onchain/label-lint.spec.js +1 -0
  78. package/dist/graph/onchain/names.d.ts +23 -0
  79. package/dist/graph/onchain/names.js +1 -0
  80. package/dist/graph/onchain/names.spec.d.ts +1 -0
  81. package/dist/graph/onchain/names.spec.js +1 -0
  82. package/dist/graph/onchain/onchain.spec.js +1 -1
  83. package/dist/graph/onchain/proposal-graph.d.ts +11 -0
  84. package/dist/graph/onchain/proposal-graph.js +1 -0
  85. package/dist/graph/onchain/proposal-graph.spec.d.ts +1 -0
  86. package/dist/graph/onchain/proposal-graph.spec.js +1 -0
  87. package/dist/graph/onchain/sdk-batch.d.ts +5 -1
  88. package/dist/graph/onchain/sdk-batch.js +1 -1
  89. package/dist/graph/onchain/sdk-dataplane.js +1 -1
  90. package/dist/graph/onchain/strategy.d.ts +16 -0
  91. package/dist/graph/onchain/strategy.js +1 -1
  92. package/dist/graph/onchain/strategy.spec.js +1 -1
  93. package/dist/graph/onchain/table-ledger.spec.d.ts +1 -0
  94. package/dist/graph/onchain/table-ledger.spec.js +1 -0
  95. package/dist/graph/onchain/types.d.ts +51 -11
  96. package/dist/graph/onchain/viewport.d.ts +1 -0
  97. package/dist/graph/onchain/viewport.js +1 -1
  98. package/dist/harness/index.d.ts +1 -5
  99. package/dist/harness/index.js +1 -1
  100. package/dist/harness/verify.d.ts +6 -1
  101. package/dist/harness/verify.js +1 -1
  102. package/dist/index.js +1 -1
  103. package/dist/knowledge/allocation-ledger.d.ts +2 -0
  104. package/dist/knowledge/allocation-ledger.js +1 -1
  105. package/dist/knowledge/allocation-puzzle.js +1 -1
  106. package/dist/knowledge/allocation-risk.d.ts +2 -3
  107. package/dist/knowledge/allocation-risk.js +1 -1
  108. package/dist/knowledge/arb-risk.d.ts +0 -1
  109. package/dist/knowledge/arb-risk.js +1 -1
  110. package/dist/knowledge/arbitration-risk.d.ts +0 -2
  111. package/dist/knowledge/arbitration-risk.js +1 -1
  112. package/dist/knowledge/baselines/evaluation-baselines.json +79 -0
  113. package/dist/knowledge/baselines/guard-lint-baseline.spec.d.ts +1 -0
  114. package/dist/knowledge/baselines/guard-lint-baseline.spec.js +1 -0
  115. package/dist/knowledge/baselines/risk-baselines.spec.d.ts +1 -0
  116. package/dist/knowledge/baselines/risk-baselines.spec.js +1 -0
  117. package/dist/knowledge/baselines/risk-cases.d.ts +8 -0
  118. package/dist/knowledge/baselines/risk-cases.js +1 -0
  119. package/dist/knowledge/bridge-risk.d.ts +0 -1
  120. package/dist/knowledge/bridge-risk.js +1 -1
  121. package/dist/knowledge/contact-risk.d.ts +0 -1
  122. package/dist/knowledge/contact-risk.js +1 -1
  123. package/dist/knowledge/contract-invariants.d.ts +1 -0
  124. package/dist/knowledge/contract-invariants.js +1 -1
  125. package/dist/knowledge/demand-risk.d.ts +0 -1
  126. package/dist/knowledge/demand-risk.js +1 -1
  127. package/dist/knowledge/getting-started.js +1 -1
  128. package/dist/knowledge/guard-design-patterns.js +1 -1
  129. package/dist/knowledge/guard-eval.d.ts +15 -0
  130. package/dist/knowledge/guard-eval.js +1 -0
  131. package/dist/knowledge/guard-eval.spec.d.ts +1 -0
  132. package/dist/knowledge/guard-eval.spec.js +1 -0
  133. package/dist/knowledge/guard-field-cognition.d.ts +48 -0
  134. package/dist/knowledge/guard-field-cognition.js +1 -0
  135. package/dist/knowledge/guard-lint.d.ts +1 -1
  136. package/dist/knowledge/guard-lint.js +1 -1
  137. package/dist/knowledge/guard-risk.d.ts +4 -19
  138. package/dist/knowledge/guard-risk.js +1 -1
  139. package/dist/knowledge/index.d.ts +42 -43
  140. package/dist/knowledge/index.js +1 -1
  141. package/dist/knowledge/industry-registry.js +1 -1
  142. package/dist/knowledge/industry-rule-node.d.ts +7 -0
  143. package/dist/knowledge/industry-rule-node.js +1 -0
  144. package/dist/knowledge/industry-strategy.js +1 -1
  145. package/dist/knowledge/jsonrpc-enum.js +1 -1
  146. package/dist/knowledge/machine-risk.d.ts +0 -6
  147. package/dist/knowledge/machine-risk.js +1 -1
  148. package/dist/knowledge/order-risk.d.ts +1 -9
  149. package/dist/knowledge/order-risk.js +1 -1
  150. package/dist/knowledge/payment-risk.d.ts +0 -1
  151. package/dist/knowledge/payment-risk.js +1 -1
  152. package/dist/knowledge/permission-risk.d.ts +0 -3
  153. package/dist/knowledge/permission-risk.js +1 -1
  154. package/dist/knowledge/personal-risk.d.ts +0 -1
  155. package/dist/knowledge/personal-risk.js +1 -1
  156. package/dist/knowledge/progress-risk.d.ts +0 -2
  157. package/dist/knowledge/progress-risk.js +1 -1
  158. package/dist/knowledge/proof-risk.d.ts +0 -1
  159. package/dist/knowledge/proof-risk.js +1 -1
  160. package/dist/knowledge/puzzle-projections.d.ts +11 -0
  161. package/dist/knowledge/puzzle-projections.js +1 -0
  162. package/dist/knowledge/recipient-constraint.d.ts +6 -1
  163. package/dist/knowledge/recipient-constraint.js +1 -1
  164. package/dist/knowledge/registrar-risk.d.ts +0 -1
  165. package/dist/knowledge/registrar-risk.js +1 -1
  166. package/dist/knowledge/repository-risk.d.ts +0 -1
  167. package/dist/knowledge/repository-risk.js +1 -1
  168. package/dist/knowledge/resource-risk.d.ts +0 -1
  169. package/dist/knowledge/resource-risk.js +1 -1
  170. package/dist/knowledge/reward-risk.d.ts +1 -5
  171. package/dist/knowledge/reward-risk.js +1 -1
  172. package/dist/knowledge/rule-node-analyzers.d.ts +43 -0
  173. package/dist/knowledge/rule-node-analyzers.js +1 -0
  174. package/dist/knowledge/rule-node-analyzers.spec.d.ts +1 -0
  175. package/dist/knowledge/rule-node-analyzers.spec.js +1 -0
  176. package/dist/knowledge/rule-outcome.d.ts +5 -0
  177. package/dist/knowledge/rule-outcome.js +1 -0
  178. package/dist/knowledge/safety-rules.js +1 -1
  179. package/dist/knowledge/scenario-topology.js +1 -1
  180. package/dist/knowledge/service-allocator-audit-node.d.ts +3 -0
  181. package/dist/knowledge/service-allocator-audit-node.js +1 -0
  182. package/dist/knowledge/service-risk-node.js +1 -1
  183. package/dist/knowledge/service-risk.d.ts +0 -3
  184. package/dist/knowledge/service-risk.js +1 -1
  185. package/dist/knowledge/template-registry.js +1 -1
  186. package/dist/knowledge/tools-reference.js +1 -1
  187. package/dist/knowledge/treasury-risk.d.ts +2 -3
  188. package/dist/knowledge/treasury-risk.js +1 -1
  189. package/dist/knowledge/util-risk.d.ts +0 -1
  190. package/dist/knowledge/util-risk.js +1 -1
  191. package/dist/knowledge/workflow-guidance.d.ts +2 -0
  192. package/dist/knowledge/workflow-guidance.js +1 -1
  193. package/dist/monitor/MonitorLoop.js +1 -1
  194. package/dist/persona/bridge.js +1 -1
  195. package/dist/persona/facet-profile.d.ts +33 -0
  196. package/dist/persona/facet-profile.js +1 -0
  197. package/dist/persona/model.d.ts +2 -1
  198. package/dist/persona/model.js +1 -1
  199. package/dist/persona/strategy-intent.js +1 -1
  200. package/dist/persona/topology-focus.d.ts +2 -2
  201. package/dist/persona/topology-focus.js +1 -1
  202. package/dist/persona/types.d.ts +12 -0
  203. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  204. package/dist/playbooks/service-build/facet-money.d.ts +22 -0
  205. package/dist/playbooks/service-build/facet-money.js +1 -0
  206. package/dist/playbooks/service-build/facet-money.spec.d.ts +1 -0
  207. package/dist/playbooks/service-build/facet-money.spec.js +1 -0
  208. package/dist/playbooks/service-build/intent-analyzer.js +1 -1
  209. package/dist/playbooks/service-build/machine-panorama.d.ts +3 -0
  210. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  211. package/dist/playbooks/service-build/object-panorama.d.ts +27 -27
  212. package/dist/playbooks/service-build/object-panorama.js +1 -1
  213. package/dist/playbooks/service-build/pipeline-actions.d.ts +2 -2
  214. package/dist/playbooks/service-build/pipeline-actions.js +1 -1
  215. package/dist/playbooks/service-build/risk-aggregator.d.ts +2 -1
  216. package/dist/playbooks/service-build/risk-aggregator.js +1 -1
  217. package/dist/playbooks/service-build/service-panorama.d.ts +4 -9
  218. package/dist/playbooks/service-build/service-panorama.js +1 -1
  219. package/dist/playbooks/service-build/topology-evaluation.spec.d.ts +1 -0
  220. package/dist/playbooks/service-build/topology-evaluation.spec.js +1 -0
  221. package/dist/playbooks/service-build/topology-query.d.ts +13 -2
  222. package/dist/playbooks/service-build/topology-query.js +1 -1
  223. package/dist/review/arb.d.ts +0 -2
  224. package/dist/review/arb.js +1 -1
  225. package/dist/review/order.d.ts +0 -1
  226. package/dist/review/order.js +1 -1
  227. package/dist/role/profiles.js +1 -1
  228. package/dist/rules.d.ts +1 -2
  229. package/dist/rules.js +1 -1
  230. package/dist/safety/confirm-gate.js +1 -1
  231. package/dist/safety/preview.js +1 -1
  232. package/dist/schema/call/base.d.ts +3372 -668
  233. package/dist/schema/call/base.js +1 -1
  234. package/dist/schema/call/handler.js +1 -1
  235. package/dist/schema/call/receipt.d.ts +28 -0
  236. package/dist/schema/call/receipt.js +1 -0
  237. package/dist/schema/call/semantic-customer-advice.spec.d.ts +1 -0
  238. package/dist/schema/call/semantic-customer-advice.spec.js +1 -0
  239. package/dist/schema/call/semantic.d.ts +5 -2
  240. package/dist/schema/call/semantic.js +1 -1
  241. package/dist/schema/call/treasury.js +1 -1
  242. package/dist/schema/common/index.js +1 -1
  243. package/dist/schema/evaluation/index.d.ts +289 -211
  244. package/dist/schema/evaluation/index.js +1 -1
  245. package/dist/schema/goal/index.d.ts +1 -1
  246. package/dist/schema/goal/planning.d.ts +2 -2
  247. package/dist/schema/index.d.ts +0 -1
  248. package/dist/schema/index.js +1 -1
  249. package/dist/schema/industry-pack/index.d.ts +1 -1
  250. package/dist/schema/keeper/index.d.ts +1 -1
  251. package/dist/schema/local/index.js +1 -1
  252. package/dist/schema/operations.d.ts +28 -10
  253. package/dist/schema/operations.js +1 -1
  254. package/dist/schema/persona/index.d.ts +24 -24
  255. package/dist/schema/query/bi.d.ts +629 -14
  256. package/dist/schema/query/bi.js +1 -1
  257. package/dist/schema/query/index.d.ts +9 -9
  258. package/dist/schema/query/index.js +1 -1
  259. package/dist/schema/schema-version.js +1 -1
  260. package/dist/schema/workspace/index.d.ts +2 -2
  261. package/dist/schema-query-impl/index.js +1 -1
  262. package/dist/schemas/account_operation.output.json +10 -10
  263. package/dist/schemas/account_operation.schema.json +3 -3
  264. package/dist/schemas/bridge_operation.output.json +10 -10
  265. package/dist/schemas/evaluation_operation.output.json +697 -169
  266. package/dist/schemas/evaluation_operation.schema.json +5 -434
  267. package/dist/schemas/index.json +1 -7
  268. package/dist/schemas/keeper_operation.output.json +10 -10
  269. package/dist/schemas/local_history_operation.output.json +10 -10
  270. package/dist/schemas/local_info_operation.output.json +10 -10
  271. package/dist/schemas/local_mark_operation.output.json +10 -10
  272. package/dist/schemas/messenger_operation.output.json +10 -10
  273. package/dist/schemas/monitor_events.output.json +10 -10
  274. package/dist/schemas/monitor_subscription.output.json +10 -10
  275. package/dist/schemas/onchain_events.output.json +11 -11
  276. package/dist/schemas/onchain_operations.output.json +6369 -3736
  277. package/dist/schemas/onchain_operations.schema.json +48 -48
  278. package/dist/schemas/onchain_operations_allocation.schema.json +5 -5
  279. package/dist/schemas/onchain_operations_arbitration.schema.json +3 -3
  280. package/dist/schemas/onchain_operations_contact.schema.json +2 -2
  281. package/dist/schemas/onchain_operations_demand.schema.json +2 -2
  282. package/dist/schemas/onchain_operations_machine.schema.json +2 -2
  283. package/dist/schemas/onchain_operations_order.schema.json +2 -2
  284. package/dist/schemas/onchain_operations_payment.schema.json +2 -2
  285. package/dist/schemas/onchain_operations_permission.schema.json +2 -2
  286. package/dist/schemas/onchain_operations_progress.schema.json +2 -2
  287. package/dist/schemas/onchain_operations_repository.schema.json +2 -2
  288. package/dist/schemas/onchain_operations_reward.schema.json +6 -6
  289. package/dist/schemas/onchain_operations_service.schema.json +8 -8
  290. package/dist/schemas/onchain_operations_treasury.schema.json +10 -10
  291. package/dist/schemas/onchain_table_data.output.json +78 -84
  292. package/dist/schemas/query_toolkit.output.json +1087 -254
  293. package/dist/schemas/query_toolkit.schema.json +65 -3
  294. package/dist/strategy/collectors.js +1 -1
  295. package/dist/strategy/metrics.js +1 -1
  296. package/dist/task/playbook.js +1 -1
  297. package/dist/tools/handlers/bridge.js +1 -1
  298. package/dist/tools/handlers/config.js +1 -1
  299. package/dist/tools/handlers/dispatch-expectations.d.ts +3 -0
  300. package/dist/tools/handlers/dispatch-expectations.js +1 -0
  301. package/dist/tools/handlers/evaluation.js +1 -1
  302. package/dist/tools/handlers/evaluation.spec.js +1 -1
  303. package/dist/tools/handlers/onchain.js +1 -1
  304. package/dist/tools/handlers/query.js +1 -1
  305. package/dist/tools/index.js +1 -1
  306. package/dist/tools/registry/evaluation.d.ts +2 -0
  307. package/dist/tools/registry/evaluation.js +1 -0
  308. package/dist/tools/registry/monitor.js +1 -1
  309. package/dist/tools/registry/query.js +1 -1
  310. package/dist/tools/shared.d.ts +0 -1
  311. package/dist/tools/shared.js +1 -1
  312. package/dist/tools/wrap.js +1 -1
  313. package/package.json +4 -3
  314. package/dist/customer/customer-advice.d.ts +0 -32
  315. package/dist/customer/customer-advice.js +0 -1
  316. package/dist/customer/info-puzzle.d.ts +0 -146
  317. package/dist/customer/info-puzzle.js +0 -1
  318. package/dist/customer/order-strategy.d.ts +0 -17
  319. package/dist/customer/order-strategy.js +0 -1
  320. package/dist/customer/preorder-compare.d.ts +0 -24
  321. package/dist/customer/preorder-compare.js +0 -1
  322. package/dist/customer/reminder-system.d.ts +0 -42
  323. package/dist/customer/reminder-system.js +0 -1
  324. package/dist/customer/risk-assessment.d.ts +0 -13
  325. package/dist/customer/risk-assessment.js +0 -1
  326. package/dist/evaluation/builtins/service-risk.d.ts +0 -7
  327. package/dist/evaluation/builtins/service-risk.js +0 -1
  328. package/dist/knowledge/trust-metrics.d.ts +0 -66
  329. package/dist/knowledge/trust-metrics.js +0 -1
  330. package/dist/schema/trust/index.d.ts +0 -334
  331. package/dist/schema/trust/index.js +0 -1
  332. package/dist/schemas/trust_score.output.json +0 -847
  333. package/dist/schemas/trust_score.schema.json +0 -364
  334. package/dist/tools/handlers/trust.d.ts +0 -16
  335. package/dist/tools/handlers/trust.js +0 -1
  336. package/dist/tools/registry/trust.d.ts +0 -2
  337. package/dist/tools/registry/trust.js +0 -1
@@ -1,66 +0,0 @@
1
- export interface ServiceTrustMetrics {
2
- arbitrationScore?: number;
3
- arbitrationCases?: number;
4
- arbitrationVotingGuardCount?: number;
5
- arbitrationFeeBalance?: bigint;
6
- arbitrationPaused?: boolean;
7
- reviewStats?: {
8
- likes: number;
9
- dislikes: number;
10
- verifiedReviews: number;
11
- totalReviews: number;
12
- };
13
- orderCount?: number;
14
- completedRate?: number;
15
- avgCompletionTime?: number;
16
- compensationFundBalance?: bigint;
17
- typicalOrderAmount?: bigint;
18
- hasPublishedEvents?: boolean;
19
- hasMachineBound?: boolean;
20
- hasBuyGuard?: boolean;
21
- hasReward?: boolean;
22
- }
23
- export interface TrustDimension {
24
- name: string;
25
- score: number;
26
- maxScore: number;
27
- description: string;
28
- humanReadable: string;
29
- weight?: number;
30
- }
31
- export interface TrustFinding {
32
- kind: string;
33
- severity: "critical" | "warning" | "info";
34
- message: string;
35
- deduction: number;
36
- }
37
- export interface ServiceTrustScore {
38
- score: number;
39
- level: "high_risk" | "caution" | "moderate" | "trusted";
40
- breakdown: TrustDimension[];
41
- summary: string;
42
- warnings: string[];
43
- findings: TrustFinding[];
44
- }
45
- export declare const TRUST_METRICS_VERSION = 2;
46
- export declare const TRUST_DIMENSION_WEIGHTS: {
47
- readonly trust_arbitration: 20;
48
- readonly trust_reviews: 35;
49
- readonly trust_fulfillment: 20;
50
- readonly trust_fund_safety: 15;
51
- readonly trust_transparency: 10;
52
- };
53
- export type TrustDimensionId = keyof typeof TRUST_DIMENSION_WEIGHTS;
54
- export interface TrustInjection {
55
- overrides?: {
56
- rules?: Record<string, {
57
- enabled?: boolean;
58
- weight?: number;
59
- }>;
60
- };
61
- }
62
- export declare function computeServiceTrustScore(metrics: ServiceTrustMetrics, injection?: TrustInjection): ServiceTrustScore;
63
- export declare function quickTrustCheck(metrics: ServiceTrustMetrics): {
64
- pass: boolean;
65
- reason: string;
66
- };
@@ -1 +0,0 @@
1
- export const TRUST_METRICS_VERSION=0x2;const TRUST_LEVELS=[{'min':0x4b,'level':'trusted','label':'High\x20trust'},{'min':0x32,'level':'moderate','label':'Moderate\x20trust'},{'min':0x19,'level':'caution','label':'Needs\x20attention'},{'min':0x0,'level':'high_risk','label':'High\x20risk'}];export const TRUST_DIMENSION_WEIGHTS={'trust_arbitration':0x14,'trust_reviews':0x23,'trust_fulfillment':0x14,'trust_fund_safety':0xf,'trust_transparency':0xa};function trustWeight(a,b){const c=b?.['overrides']?.['rules']?.[a];if(c?.['enabled']===![])return 0x0;if(c?.['weight']!==undefined)return Math['max'](0x0,c['weight']);return TRUST_DIMENSION_WEIGHTS[a];}export function computeServiceTrustScore(a,b){const c=[{'id':'trust_arbitration','dim':computeArbitrationDimension(a)},{'id':'trust_reviews','dim':computeReviewDimension(a)},{'id':'trust_fulfillment','dim':computeFulfillmentDimension(a)},{'id':'trust_fund_safety','dim':computeFundDimension(a)},{'id':'trust_transparency','dim':computeTransparencyDimension(a)}],d=[],e=[];let f=0x0,g=0x0;for(const {id:m,dim:n}of c){const o=trustWeight(m,b),p=n['maxScore']>0x0?n['score']/n['maxScore']*0x64:0x0;f+=p*o,g+=o,e['push']({...n,'weight':o}),o>0x0&&p<0x1e&&d['push'](n['name']+':\x20low\x20score\x20('+Math['round'](p)+'/100)');}const h=[];(a['compensationFundBalance']===undefined||a['compensationFundBalance']===0x0n)&&h['push']({'kind':'fund_safety_missing','severity':'warning','message':'No\x20compensation\x20fund;\x20insufficient\x20protection\x20of\x20customer\x20rights','deduction':0x5});const i=g>0x0?Math['round'](f/g):0x0,j=TRUST_LEVELS['find'](q=>i>=q['min'])?.['level']??'high_risk',k=TRUST_LEVELS['find'](q=>i>=q['min'])?.['label']??'High\x20risk',l=buildSummary(i,k,a,e);return{'score':i,'level':j,'breakdown':e,'summary':l,'warnings':d,'findings':h};}function computeArbitrationDimension(a){const b=0x14;if(a['arbitrationScore']===undefined&&a['arbitrationVotingGuardCount']===undefined)return{'name':'arbitration','score':b*0.25,'maxScore':b,'description':'Arbitration\x20trust\x20score\x20(no\x20data;\x20default\x20low\x20because\x20arbitration\x20is\x20critical)','humanReadable':'Arbitration:\x20no\x20data\x20(default\x20low\x20—\x20critical\x20missing)'};let c=0x0;const d=[];if(a['arbitrationScore']!==undefined){const e=Math['round'](a['arbitrationScore']/0x64*0x8);c+=e,d['push']('score\x20'+a['arbitrationScore']+'/100');}else c+=0x2;a['arbitrationVotingGuardCount']!==undefined&&a['arbitrationVotingGuardCount']>0x0&&(c+=0x3,d['push'](a['arbitrationVotingGuardCount']+'\x20voting_guard(s)'));a['arbitrationFeeBalance']!==undefined&&a['arbitrationFeeBalance']>0x0n&&(c+=0x3,d['push']('fee\x20funded'));if(a['arbitrationPaused']===![])c+=0x3,d['push']('active');else a['arbitrationPaused']===!![]&&d['push']('paused');return a['arbitrationCases']!==undefined&&a['arbitrationCases']>0x0&&(c+=0x3,d['push'](a['arbitrationCases']+'\x20case(s)')),c=Math['min'](b,c),{'name':'arbitration','score':c,'maxScore':b,'description':'Arbitration\x20config:\x20'+d['join'](',\x20'),'humanReadable':'Arbitration:\x20'+d['join'](',\x20')};}function computeReviewDimension(a){const b=0x23;if(!a['reviewStats']||a['reviewStats']['totalReviews']===0x0)return{'name':'reviews','score':b*0.5,'maxScore':b,'description':'Review\x20reputation\x20(no\x20review\x20data)','humanReadable':'Reviews:\x20no\x20data'};const {likes:c,dislikes:d,verifiedReviews:e,totalReviews:f}=a['reviewStats'],g=c/Math['max'](0x1,f),h=Math['min'](0x5,e),i=Math['round'](g*0x14+h),j=a['hasReward']?0xa:0x0;return{'name':'reviews','score':Math['min'](b,i+j),'maxScore':b,'description':'Like\x20rate\x20'+Math['round'](g*0x64)+'%\x20('+f+'\x20reviews,\x20'+e+'\x20verified)\x20+\x20reward\x20mechanism\x20'+(a['hasReward']?'✓':'✗'),'humanReadable':'Like\x20rate\x20'+Math['round'](g*0x64)+'%\x20('+f+'\x20reviews)'+(a['hasReward']?',\x20reward\x20✓':'')};}function computeFulfillmentDimension(a){const b=0x14;if(a['orderCount']===undefined)return{'name':'fulfillment','score':b*0.5,'maxScore':b,'description':'Fulfillment\x20record\x20(no\x20order\x20data)','humanReadable':'Fulfillment:\x20no\x20data'};let c=0x0;const d=Math['min'](0xa,Math['floor'](a['orderCount']/0x5));return c+=d,a['completedRate']!==undefined?c+=Math['round'](a['completedRate']*0xa):c+=0x5,{'name':'fulfillment','score':Math['min'](b,c),'maxScore':b,'description':'Completed\x20'+a['orderCount']+'\x20orders,\x20completion\x20rate\x20'+(a['completedRate']!==undefined?Math['round'](a['completedRate']*0x64)+'%':'unknown'),'humanReadable':'Fulfillment:\x20'+a['orderCount']+'\x20orders'+(a['avgCompletionTime']!==undefined?',\x20avg\x20'+a['avgCompletionTime']+'h':'')};}function computeFundDimension(a){const b=0xf;if(a['compensationFundBalance']===undefined||a['compensationFundBalance']===0x0n)return{'name':'fund_safety','score':0x0,'maxScore':b,'description':'No\x20compensation\x20fund','humanReadable':'Compensation\x20fund:\x20none'};const c=a['compensationFundBalance'];if(a['typicalOrderAmount']!==undefined&&a['typicalOrderAmount']>0x0n){const g=Number(c*0x64n/a['typicalOrderAmount'])/0x64;let h,i;if(g>=0xa)h=b,i='Compensation\x20fund:\x20'+g['toFixed'](0x1)+'x\x20order\x20amount\x20(excellent)';else g>=0x1?(h=0xa+Math['round']((g-0x1)/0x9*0x5),i='Compensation\x20fund:\x20'+g['toFixed'](0x1)+'x\x20order\x20amount\x20(covers\x20≥1\x20payout)'):(h=Math['round'](g*0xa),i='Compensation\x20fund:\x20'+g['toFixed'](0x1)+'x\x20order\x20amount\x20(insufficient)');return{'name':'fund_safety','score':Math['min'](b,h),'maxScore':b,'description':'Fund\x20'+c['toString']()+'\x20/\x20typical\x20order\x20'+a['typicalOrderAmount']['toString']()+'\x20=\x20'+g['toFixed'](0x2)+'x','humanReadable':i};}const d=0xe8d4a51000n,e=Number(a['compensationFundBalance']*0x64n/d)/0x64,f=Math['min'](b,Math['round'](e*b));return{'name':'fund_safety','score':f,'maxScore':b,'description':'Compensation\x20fund\x20'+a['compensationFundBalance']+'\x20smallest\x20unit\x20(absolute\x20threshold\x20fallback)','humanReadable':'Compensation\x20fund:\x20'+e['toFixed'](0x2)+'x\x20absolute\x20threshold'};}function computeTransparencyDimension(a){const b=0xa;let c=0x0;if(a['hasPublishedEvents'])c+=0x4;if(a['hasMachineBound'])c+=0x3;if(a['hasBuyGuard'])c+=0x3;return{'name':'transparency','score':Math['min'](b,c),'maxScore':b,'description':'On-chain\x20events\x20'+(a['hasPublishedEvents']?'✓':'✗')+',\x20Machine\x20'+(a['hasMachineBound']?'✓':'✗')+',\x20Guard\x20'+(a['hasBuyGuard']?'✓':'✗'),'humanReadable':'Transparency:\x20'+(['Events','Machine','Guard']['filter']((d,e)=>[a['hasPublishedEvents'],a['hasMachineBound'],a['hasBuyGuard']][e])['join']('+')||'none')};}function buildSummary(a,b,c,e){const f=['Trust\x20score\x20'+a+'/100\x20('+b+')'];for(const g of e){f['push'](''+g['humanReadable']);}return f['join'](';\x20');}export function quickTrustCheck(a){const b=computeServiceTrustScore(a);if(b['score']<0x19)return{'pass':![],'reason':'Trust\x20score\x20'+b['score']+'/100,\x20high\x20risk:\x20'+b['warnings']['join'](';\x20')};return{'pass':!![],'reason':'Trust\x20score\x20'+b['score']+'/100\x20('+b['level']+')'};}
@@ -1,334 +0,0 @@
1
- import { z } from "zod";
2
- export declare const TrustScoreInputSchema: z.ZodObject<{
3
- service: z.ZodString;
4
- order_amount: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
5
- depth: z.ZodOptional<z.ZodEnum<{
6
- browse: "browse";
7
- evaluate: "evaluate";
8
- preorder: "preorder";
9
- }>>;
10
- industry: z.ZodOptional<z.ZodEnum<{
11
- freelance: "freelance";
12
- rental: "rental";
13
- education: "education";
14
- travel: "travel";
15
- subscription: "subscription";
16
- retail: "retail";
17
- }>>;
18
- preferences: z.ZodOptional<z.ZodObject<{
19
- price_sensitivity: z.ZodOptional<z.ZodEnum<{
20
- low: "low";
21
- high: "high";
22
- medium: "medium";
23
- }>>;
24
- budget_range: z.ZodOptional<z.ZodObject<{
25
- min: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
26
- max: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
27
- }, z.core.$strict>>;
28
- value_orientation: z.ZodOptional<z.ZodEnum<{
29
- budget: "budget";
30
- balanced: "balanced";
31
- quality: "quality";
32
- }>>;
33
- discount_sensitivity: z.ZodOptional<z.ZodNumber>;
34
- delivery_speed_priority: z.ZodOptional<z.ZodEnum<{
35
- urgent: "urgent";
36
- normal: "normal";
37
- flexible: "flexible";
38
- }>>;
39
- max_acceptable_cycle: z.ZodOptional<z.ZodNumber>;
40
- response_time_expectation: z.ZodOptional<z.ZodNumber>;
41
- merchant_preference: z.ZodOptional<z.ZodEnum<{
42
- neutral: "neutral";
43
- established: "established";
44
- emerging: "emerging";
45
- }>>;
46
- min_order_history: z.ZodOptional<z.ZodNumber>;
47
- bargain_hunting: z.ZodOptional<z.ZodNumber>;
48
- reward_seeking: z.ZodOptional<z.ZodBoolean>;
49
- referral_participation: z.ZodOptional<z.ZodBoolean>;
50
- communication_style: z.ZodOptional<z.ZodEnum<{
51
- formal: "formal";
52
- casual: "casual";
53
- friendly: "friendly";
54
- }>>;
55
- transparency_demand: z.ZodOptional<z.ZodNumber>;
56
- after_sales_expectation: z.ZodOptional<z.ZodEnum<{
57
- full: "full";
58
- basic: "basic";
59
- minimal: "minimal";
60
- }>>;
61
- risk_appetite: z.ZodOptional<z.ZodEnum<{
62
- conservative: "conservative";
63
- balanced: "balanced";
64
- aggressive: "aggressive";
65
- }>>;
66
- min_trust_score: z.ZodOptional<z.ZodNumber>;
67
- require_arbitration: z.ZodOptional<z.ZodBoolean>;
68
- require_compensation_fund: z.ZodOptional<z.ZodBoolean>;
69
- preferred_industries: z.ZodOptional<z.ZodArray<z.ZodString>>;
70
- preferred_tokens: z.ZodOptional<z.ZodArray<z.ZodString>>;
71
- preferred_merchants: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
- }, z.core.$strict>>;
73
- user_metrics: z.ZodOptional<z.ZodObject<{
74
- metrics: z.ZodArray<z.ZodObject<{
75
- name: z.ZodString;
76
- label: z.ZodString;
77
- evaluator: z.ZodEnum<{
78
- boolean: "boolean";
79
- threshold: "threshold";
80
- ratio: "ratio";
81
- presence: "presence";
82
- regex_match: "regex_match";
83
- custom_query: "custom_query";
84
- }>;
85
- params: z.ZodObject<{
86
- path: z.ZodOptional<z.ZodString>;
87
- threshold: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
88
- invert: z.ZodOptional<z.ZodBoolean>;
89
- min: z.ZodOptional<z.ZodNumber>;
90
- max: z.ZodOptional<z.ZodNumber>;
91
- pattern: z.ZodOptional<z.ZodString>;
92
- query_key: z.ZodOptional<z.ZodString>;
93
- }, z.core.$strict>;
94
- weight: z.ZodNumber;
95
- advice_on_fail: z.ZodOptional<z.ZodString>;
96
- advice_on_pass: z.ZodOptional<z.ZodString>;
97
- }, z.core.$strict>>;
98
- adjustment_cap: z.ZodOptional<z.ZodNumber>;
99
- }, z.core.$strict>>;
100
- trust_weights: z.ZodOptional<z.ZodObject<{
101
- arbitration: z.ZodOptional<z.ZodNumber>;
102
- reviews: z.ZodOptional<z.ZodNumber>;
103
- fulfillment: z.ZodOptional<z.ZodNumber>;
104
- fund_safety: z.ZodOptional<z.ZodNumber>;
105
- transparency: z.ZodOptional<z.ZodNumber>;
106
- }, z.core.$strict>>;
107
- network: z.ZodOptional<z.ZodString>;
108
- no_cache: z.ZodOptional<z.ZodBoolean>;
109
- compare_with: z.ZodOptional<z.ZodArray<z.ZodString>>;
110
- }, z.core.$strict>;
111
- export declare const TrustScoreOutputSchema: z.ZodObject<{
112
- result: z.ZodObject<{
113
- service_id: z.ZodString;
114
- service_name: z.ZodString;
115
- service_basics: z.ZodObject<{
116
- bPublished: z.ZodBoolean;
117
- bPaused: z.ZodBoolean;
118
- sales_count: z.ZodNumber;
119
- has_machine: z.ZodBoolean;
120
- has_buy_guard: z.ZodBoolean;
121
- has_um_contact: z.ZodBoolean;
122
- arbitrations_count: z.ZodNumber;
123
- }, z.core.$strip>;
124
- trust_score: z.ZodObject<{
125
- score: z.ZodNumber;
126
- level: z.ZodEnum<{
127
- high_risk: "high_risk";
128
- caution: "caution";
129
- moderate: "moderate";
130
- trusted: "trusted";
131
- }>;
132
- summary: z.ZodString;
133
- warnings: z.ZodArray<z.ZodString>;
134
- findings: z.ZodArray<z.ZodObject<{
135
- kind: z.ZodString;
136
- severity: z.ZodEnum<{
137
- info: "info";
138
- critical: "critical";
139
- warning: "warning";
140
- }>;
141
- message: z.ZodString;
142
- deduction: z.ZodNumber;
143
- }, z.core.$strip>>;
144
- breakdown: z.ZodArray<z.ZodObject<{
145
- score: z.ZodNumber;
146
- maxScore: z.ZodNumber;
147
- description: z.ZodString;
148
- humanReadable: z.ZodString;
149
- }, z.core.$strip>>;
150
- }, z.core.$strip>;
151
- order_amount: z.ZodString;
152
- depth: z.ZodEnum<{
153
- browse: "browse";
154
- evaluate: "evaluate";
155
- preorder: "preorder";
156
- }>;
157
- risk_score: z.ZodOptional<z.ZodObject<{
158
- total: z.ZodNumber;
159
- level: z.ZodEnum<{
160
- low: "low";
161
- medium_low: "medium_low";
162
- medium_high: "medium_high";
163
- high: "high";
164
- }>;
165
- red_flags: z.ZodArray<z.ZodString>;
166
- advice: z.ZodArray<z.ZodString>;
167
- dimensions: z.ZodArray<z.ZodObject<{
168
- name: z.ZodEnum<{
169
- fund: "fund";
170
- workflow: "workflow";
171
- trust: "trust";
172
- behavior: "behavior";
173
- }>;
174
- score: z.ZodNumber;
175
- max_score: z.ZodNumber;
176
- checks: z.ZodArray<z.ZodObject<{
177
- id: z.ZodString;
178
- dimension: z.ZodEnum<{
179
- fund: "fund";
180
- workflow: "workflow";
181
- trust: "trust";
182
- behavior: "behavior";
183
- }>;
184
- description: z.ZodString;
185
- weight: z.ZodNumber;
186
- passed: z.ZodBoolean;
187
- advice: z.ZodOptional<z.ZodString>;
188
- }, z.core.$strip>>;
189
- }, z.core.$strip>>;
190
- }, z.core.$strip>>;
191
- info_puzzle: z.ZodOptional<z.ZodObject<{
192
- completeness: z.ZodNumber;
193
- gaps: z.ZodArray<z.ZodString>;
194
- assembled_at: z.ZodNumber;
195
- }, z.core.$strip>>;
196
- preorder_advice: z.ZodOptional<z.ZodObject<{
197
- confidence: z.ZodObject<{
198
- score: z.ZodNumber;
199
- base: z.ZodNumber;
200
- user_adjustment: z.ZodNumber;
201
- preference_nudge: z.ZodNumber;
202
- explanation: z.ZodString;
203
- }, z.core.$strip>;
204
- industry: z.ZodOptional<z.ZodEnum<{
205
- freelance: "freelance";
206
- rental: "rental";
207
- education: "education";
208
- travel: "travel";
209
- subscription: "subscription";
210
- retail: "retail";
211
- }>>;
212
- strategies: z.ZodArray<z.ZodObject<{
213
- scenario: z.ZodEnum<{
214
- fund_safety: "fund_safety";
215
- info_asymmetry: "info_asymmetry";
216
- refund_dispute: "refund_dispute";
217
- arbitration_fairness: "arbitration_fairness";
218
- pricing: "pricing";
219
- delivery_sla: "delivery_sla";
220
- quality_verification: "quality_verification";
221
- after_sales: "after_sales";
222
- }>;
223
- merchant_tactic: z.ZodString;
224
- user_strategy: z.ZodString;
225
- nash_equilibrium: z.ZodString;
226
- confidence: z.ZodNumber;
227
- fallback: z.ZodOptional<z.ZodString>;
228
- rationale: z.ZodString;
229
- }, z.core.$strip>>;
230
- preference_match: z.ZodOptional<z.ZodObject<{
231
- score: z.ZodNumber;
232
- matches: z.ZodArray<z.ZodString>;
233
- mismatches: z.ZodArray<z.ZodString>;
234
- warnings: z.ZodArray<z.ZodString>;
235
- }, z.core.$strip>>;
236
- preference_issues: z.ZodOptional<z.ZodArray<z.ZodString>>;
237
- industry_risks: z.ZodOptional<z.ZodObject<{
238
- score_adjustment: z.ZodNumber;
239
- summary: z.ZodString;
240
- checks: z.ZodArray<z.ZodObject<{
241
- id: z.ZodString;
242
- dimension: z.ZodEnum<{
243
- fund: "fund";
244
- workflow: "workflow";
245
- trust: "trust";
246
- behavior: "behavior";
247
- }>;
248
- description: z.ZodString;
249
- weight: z.ZodNumber;
250
- passed: z.ZodBoolean;
251
- advice: z.ZodOptional<z.ZodString>;
252
- }, z.core.$strip>>;
253
- unmet_needs: z.ZodArray<z.ZodObject<{
254
- id: z.ZodString;
255
- tier: z.ZodEnum<{
256
- common: "common";
257
- personalized: "personalized";
258
- advanced: "advanced";
259
- }>;
260
- description: z.ZodString;
261
- advice: z.ZodOptional<z.ZodString>;
262
- }, z.core.$strip>>;
263
- }, z.core.$strip>>;
264
- reminders: z.ZodArray<z.ZodObject<{
265
- id: z.ZodString;
266
- stage: z.ZodEnum<{
267
- browse: "browse";
268
- evaluate: "evaluate";
269
- preorder: "preorder";
270
- in_progress: "in_progress";
271
- complete: "complete";
272
- after_sale: "after_sale";
273
- }>;
274
- priority: z.ZodEnum<{
275
- required: "required";
276
- recommended: "recommended";
277
- info: "info";
278
- reminder: "reminder";
279
- }>;
280
- message: z.ZodString;
281
- action: z.ZodOptional<z.ZodString>;
282
- }, z.core.$strip>>;
283
- blocking_reminders: z.ZodArray<z.ZodObject<{
284
- id: z.ZodString;
285
- stage: z.ZodEnum<{
286
- browse: "browse";
287
- evaluate: "evaluate";
288
- preorder: "preorder";
289
- in_progress: "in_progress";
290
- complete: "complete";
291
- after_sale: "after_sale";
292
- }>;
293
- priority: z.ZodEnum<{
294
- required: "required";
295
- recommended: "recommended";
296
- info: "info";
297
- reminder: "reminder";
298
- }>;
299
- message: z.ZodString;
300
- action: z.ZodOptional<z.ZodString>;
301
- }, z.core.$strip>>;
302
- summary: z.ZodString;
303
- }, z.core.$strip>>;
304
- comparison: z.ZodOptional<z.ZodObject<{
305
- rows: z.ZodArray<z.ZodObject<{
306
- service_id: z.ZodString;
307
- service_name: z.ZodString;
308
- error: z.ZodOptional<z.ZodString>;
309
- industry: z.ZodOptional<z.ZodEnum<{
310
- freelance: "freelance";
311
- rental: "rental";
312
- education: "education";
313
- travel: "travel";
314
- subscription: "subscription";
315
- retail: "retail";
316
- }>>;
317
- confidence: z.ZodOptional<z.ZodNumber>;
318
- risk_total: z.ZodOptional<z.ZodNumber>;
319
- risk_level: z.ZodOptional<z.ZodString>;
320
- trust_score: z.ZodOptional<z.ZodNumber>;
321
- trust_level: z.ZodOptional<z.ZodString>;
322
- preference_match: z.ZodOptional<z.ZodNumber>;
323
- reputation_like_ratio: z.ZodOptional<z.ZodNumber>;
324
- reputation_votes: z.ZodOptional<z.ZodNumber>;
325
- red_flags_count: z.ZodOptional<z.ZodNumber>;
326
- blocking_reminders_count: z.ZodOptional<z.ZodNumber>;
327
- info_gaps_count: z.ZodOptional<z.ZodNumber>;
328
- }, z.core.$strict>>;
329
- best_per_metric: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
330
- evaluated_metrics: z.ZodArray<z.ZodString>;
331
- note: z.ZodString;
332
- }, z.core.$strict>>;
333
- }, z.core.$strip>;
334
- }, z.core.$strip>;
@@ -1 +0,0 @@
1
- import{z}from'zod';import{NameOrAddressSchema}from'../common/index.js';const RiskCheckOutputSchema=z['object']({'id':z['string']()['describe']('Check\x20identifier.'),'dimension':z['enum'](['workflow','fund','trust','behavior'])['describe']('Dimension\x20this\x20check\x20belongs\x20to.'),'description':z['string']()['describe']('Check\x20description.'),'weight':z['number']()['describe']('Check\x20weight\x20within\x20its\x20dimension\x20(percentage).'),'passed':z['boolean']()['describe']('Whether\x20the\x20check\x20passed.'),'advice':z['string']()['optional']()['describe']('Advice\x20when\x20the\x20check\x20failed.')}),ReminderOutputSchema=z['object']({'id':z['string']()['describe']('Reminder\x20rule\x20identifier.'),'stage':z['enum'](['browse','evaluate','preorder','in_progress','complete','after_sale'])['describe']('Workflow\x20stage\x20this\x20reminder\x20belongs\x20to.'),'priority':z['enum'](['required','recommended','info','reminder'])['describe']('Priority:\x20required\x20=\x20blocking,\x20recommended\x20=\x20strongly\x20suggested.'),'message':z['string']()['describe']('Human-readable\x20reminder\x20message.'),'action':z['string']()['optional']()['describe']('Suggested\x20follow-up\x20action,\x20if\x20any.')}),IndustryEnumSchema=z['enum'](['freelance','rental','education','travel','subscription','retail']),PreorderPreferencesInputSchema=z['object']({'price_sensitivity':z['enum'](['low','medium','high'])['optional'](),'budget_range':z['object']({'min':z['union']([z['string'](),z['number']()])['describe']('Budget\x20lower\x20bound\x20(smallest\x20token\x20unit).'),'max':z['union']([z['string'](),z['number']()])['describe']('Budget\x20upper\x20bound\x20(smallest\x20token\x20unit).')})['strict']()['optional'](),'value_orientation':z['enum'](['quality','balanced','budget'])['optional'](),'discount_sensitivity':z['number']()['min'](0x0)['max'](0x1)['optional'](),'delivery_speed_priority':z['enum'](['urgent','normal','flexible'])['optional'](),'max_acceptable_cycle':z['number']()['nonnegative']()['describe']('Max\x20acceptable\x20delivery\x20cycle\x20(days).')['optional'](),'response_time_expectation':z['number']()['nonnegative']()['describe']('Expected\x20merchant\x20response\x20time\x20(hours).')['optional'](),'merchant_preference':z['enum'](['established','emerging','neutral'])['optional'](),'min_order_history':z['number']()['int']()['nonnegative']()['optional'](),'bargain_hunting':z['number']()['min'](0x0)['max'](0x1)['optional'](),'reward_seeking':z['boolean']()['optional'](),'referral_participation':z['boolean']()['optional'](),'communication_style':z['enum'](['formal','casual','friendly'])['optional'](),'transparency_demand':z['number']()['min'](0x0)['max'](0x1)['optional'](),'after_sales_expectation':z['enum'](['full','basic','minimal'])['optional'](),'risk_appetite':z['enum'](['conservative','balanced','aggressive'])['optional'](),'min_trust_score':z['number']()['min'](0x0)['max'](0x64)['optional'](),'require_arbitration':z['boolean']()['optional'](),'require_compensation_fund':z['boolean']()['optional'](),'preferred_industries':z['array'](z['string']())['optional'](),'preferred_tokens':z['array'](z['string']())['optional'](),'preferred_merchants':z['array'](z['string']())['optional']()})['strict'](),UserMetricInputSchema=z['object']({'name':z['string']()['describe']('Stable\x20metric\x20identifier\x20(e.g.\x20\x27merchant_tenure_days\x27).'),'label':z['string']()['describe']('Human-readable\x20label\x20shown\x20to\x20the\x20user.'),'evaluator':z['enum'](['threshold','ratio','boolean','presence','regex_match','custom_query'])['describe']('How\x20the\x20metric\x20is\x20evaluated\x20against\x20the\x20puzzle\x20context.'),'params':z['object']({'path':z['string']()['optional']()['describe']('JSON\x20path\x20in\x20the\x20raw\x20data\x20context\x20(e.g.\x20\x27service.name\x27).'),'threshold':z['union']([z['string'](),z['number']()])['optional']()['describe']('Threshold\x20value\x20(threshold/presence\x20evaluators).'),'invert':z['boolean']()['optional']()['describe']('true:\x20pass\x20when\x20value\x20<=\x20threshold.'),'min':z['number']()['optional']()['describe']('Min\x20ratio\x20(ratio\x20evaluator).'),'max':z['number']()['optional']()['describe']('Max\x20ratio\x20(ratio\x20evaluator).'),'pattern':z['string']()['optional']()['describe']('Regex\x20pattern\x20(regex_match\x20evaluator).'),'query_key':z['string']()['optional']()['describe']('Custom\x20query\x20identifier\x20(custom_query\x20evaluator).')})['strict'](),'weight':z['number']()['min'](0x0)['max'](0x1)['describe']('Relative\x20weight\x20vs\x20other\x20user\x20metrics\x20(0-1).'),'advice_on_fail':z['string']()['optional'](),'advice_on_pass':z['string']()['optional']()})['strict'](),UserMetricsInputSchema=z['object']({'metrics':z['array'](UserMetricInputSchema)['min'](0x1)['describe']('User-defined\x20scoring\x20factors.'),'adjustment_cap':z['number']()['positive']()['optional']()['describe']('Global\x20cap\x20for\x20the\x20composite\x20confidence\x20adjustment\x20(default\x20±10\x20points).')})['strict']();export const TrustScoreInputSchema=z['object']({'service':NameOrAddressSchema['describe']('Service\x20object\x20ID\x20or\x20local_mark\x20name\x20to\x20evaluate.\x20'+'Must\x20reference\x20an\x20existing\x20Service\x20object\x20on-chain.'),'order_amount':z['union']([z['string'](),z['number']()])['optional']()['describe']('Optional\x20order\x20amount\x20(in\x20smallest\x20token\x20unit,\x20e.g.\x202000000000\x20for\x202\x20WOW).\x20'+'Used\x20for\x20fund-safety\x20dimension\x20risk\x20assessment.\x20'+'If\x20omitted,\x20the\x20first\x20active\x20sale\x20price\x20of\x20the\x20service\x20is\x20used.'),'depth':z['enum'](['browse','evaluate','preorder'])['optional']()['describe']('InfoPuzzle\x20collection\x20depth.\x20'+'browse:\x20only\x20Service\x20basics\x20+\x20trust\x20score;\x20'+'evaluate\x20(default):\x20+\x20workflow/fund/trust\x20dimensions\x20risk\x20assessment;\x20'+'preorder:\x20+\x20full\x20preorder\x20advice\x20(confidence,\x20game\x20strategies,\x20preference\x20match,\x20industry\x20risks,\x20blocking\x20reminders).'),'industry':IndustryEnumSchema['optional']()['describe']('Explicit\x20industry\x20override\x20for\x20industry-specific\x20risk\x20checks\x20and\x20needs\x20matrix.\x20'+'If\x20omitted\x20at\x20depth=preorder,\x20the\x20industry\x20is\x20inferred\x20from\x20the\x20puzzle.'),'preferences':PreorderPreferencesInputSchema['optional']()['describe']('Optional\x20user\x20preference\x20overrides\x20(partial;\x20merged\x20over\x20profile-derived\x20defaults).\x20'+'Only\x20used\x20at\x20depth=preorder\x20for\x20preference\x20matching\x20and\x20pref-aware\x20strategies.'),'user_metrics':UserMetricsInputSchema['optional']()['describe']('Optional\x20user-controllable\x20scoring\x20factors.\x20'+'Evaluated\x20at\x20depth=preorder;\x20the\x20composite\x20adjustment\x20(±cap)\x20nudges\x20the\x20order\x20confidence\x20score.'),'trust_weights':z['object']({'arbitration':z['number']()['min'](0x0)['optional']()['describe']('Weight\x20for\x20the\x20arbitration\x20dimension\x20(default\x2020).'),'reviews':z['number']()['min'](0x0)['optional']()['describe']('Weight\x20for\x20the\x20reviews\x20dimension\x20(default\x2035).'),'fulfillment':z['number']()['min'](0x0)['optional']()['describe']('Weight\x20for\x20the\x20fulfillment\x20dimension\x20(default\x2020).'),'fund_safety':z['number']()['min'](0x0)['optional']()['describe']('Weight\x20for\x20the\x20fund_safety\x20dimension\x20(default\x2015).'),'transparency':z['number']()['min'](0x0)['optional']()['describe']('Weight\x20for\x20the\x20transparency\x20dimension\x20(default\x2010).')})['strict']()['optional']()['describe']('Optional\x20per-dimension\x20weight\x20overrides\x20for\x20the\x20trust\x20score\x20(K3\x2022\x20§4.3).\x20'+'User-participatory:\x20re-weight\x20the\x205\x20trust\x20dimensions;\x20the\x20engine\x20renormalizes\x20to\x20100.\x20'+'Highest-priority\x20channel\x20for\x20a\x20user\x20to\x20shape\x20how\x20WoWok\x20evaluates\x20trust.'),'network':z['string']()['optional']()['describe']('Network\x20override\x20(e.g.\x20\x27mainnet\x27,\x20\x27testnet\x27).\x20If\x20omitted,\x20uses\x20default.'),'no_cache':z['boolean']()['optional']()['describe']('Skip\x20object\x20cache\x20and\x20force\x20a\x20fresh\x20on-chain\x20query.'),'compare_with':z['array'](z['string']())['min'](0x1)['max'](0x9)['optional']()['describe']('Optional\x20candidate\x20Service\x20addresses/LocalMark\x20names\x20(1-9)\x20for\x20deterministic\x20multi-service\x20comparison.\x20'+'Only\x20used\x20at\x20depth=preorder.\x20The\x20SAME\x20preferences/user_metrics/industry\x20are\x20applied\x20uniformly\x20to\x20all\x20'+'candidates;\x20output\x20gains\x20a\x20`comparison`\x20block\x20with\x20per-metric\x20bests\x20(NO\x20overall\x20ranking\x20—\x20the\x20buyer\x20decides).')})['strict']();export const TrustScoreOutputSchema=z['object']({'result':z['object']({'service_id':z['string']()['describe']('The\x20Service\x20object\x20ID\x20or\x20local_mark\x20that\x20was\x20evaluated.'),'service_name':z['string']()['describe']('Service\x20display\x20name\x20(falls\x20back\x20to\x20service_id\x20if\x20unnamed).'),'service_basics':z['object']({'bPublished':z['boolean']()['describe']('Whether\x20the\x20Service\x20is\x20published\x20(open\x20for\x20orders).'),'bPaused':z['boolean']()['describe']('Whether\x20the\x20Service\x20is\x20temporarily\x20paused.'),'sales_count':z['number']()['int']()['nonnegative']()['describe']('Number\x20of\x20active\x20(non-suspended)\x20sale\x20entries.'),'has_machine':z['boolean']()['describe']('Whether\x20a\x20Machine\x20workflow\x20is\x20attached.'),'has_buy_guard':z['boolean']()['describe']('Whether\x20a\x20buy-side\x20Guard\x20is\x20configured.'),'has_um_contact':z['boolean']()['describe']('Whether\x20a\x20Messenger\x20(um)\x20contact\x20is\x20configured.'),'arbitrations_count':z['number']()['int']()['nonnegative']()['describe']('Number\x20of\x20arbitration\x20entries\x20attached\x20to\x20the\x20Service.')})['describe']('Service\x20snapshot\x20—\x20basic\x20on-chain\x20state.'),'trust_score':z['object']({'score':z['number']()['min'](0x0)['max'](0x64)['describe']('Overall\x20trust\x20score\x20(0-100,\x20higher\x20=\x20more\x20trustworthy).'),'level':z['enum'](['high_risk','caution','moderate','trusted'])['describe']('Trust\x20level\x20label\x20derived\x20from\x20the\x20score.'),'summary':z['string']()['describe']('One-line\x20human-readable\x20trust\x20summary.'),'warnings':z['array'](z['string']())['describe']('Trust\x20warnings\x20(e.g.\x20low\x20arbitration\x20dimension\x20score).'),'findings':z['array'](z['object']({'kind':z['string']()['describe']('Finding\x20kind\x20(e.g.\x20fund_safety_missing,\x20shell_merchant).'),'severity':z['enum'](['critical','warning','info'])['describe']('Finding\x20severity.'),'message':z['string']()['describe']('Human-readable\x20finding\x20message.'),'deduction':z['number']()['describe']('Score\x20deduction\x20applied\x20to\x20the\x20additive\x20total\x20(0-100).')}))['describe']('Major-recognition\x20findings\x20(recent\x20arbitration\x20payouts,\x20verified\x20dislike,\x20shell\x20merchant,\x20…)\x20—\x20independent\x20of\x20the\x20additive\x20score.'),'breakdown':z['array'](z['object']({'score':z['number']()['describe']('Dimension\x20score\x20achieved.'),'maxScore':z['number']()['describe']('Dimension\x20max\x20possible\x20score.'),'description':z['string']()['describe']('Dimension\x20name\x20/\x20description.'),'humanReadable':z['string']()['describe']('Human-readable\x20dimension\x20explanation.')}))['describe']('5-dimension\x20breakdown:\x20arbitration\x20/\x20reviews\x20/\x20fulfillment\x20/\x20fund_safety\x20/\x20transparency.')})['describe']('ServiceTrustScore\x20—\x200-100\x20score\x20across\x205\x20trust\x20dimensions.'),'order_amount':z['string']()['describe']('Order\x20amount\x20used\x20for\x20fund-safety\x20assessment,\x20in\x20smallest\x20token\x20unit\x20(bigint\x20as\x20string).'),'depth':z['enum'](['browse','evaluate','preorder'])['describe']('Actual\x20InfoPuzzle\x20collection\x20depth\x20used\x20(defaults\x20to\x20\x27evaluate\x27).'),'risk_score':z['object']({'total':z['number']()['min'](0x0)['max'](0x64)['describe']('Overall\x20risk\x20score\x20(0-100,\x20higher\x20=\x20riskier).'),'level':z['enum'](['low','medium_low','medium_high','high'])['describe']('Risk\x20level\x20label\x20derived\x20from\x20the\x20total\x20score.'),'red_flags':z['array'](z['string']())['describe']('Critical\x20risk\x20red\x20flags\x20detected.'),'advice':z['array'](z['string']())['describe']('Risk\x20mitigation\x20advice.'),'dimensions':z['array'](z['object']({'name':z['enum'](['workflow','fund','trust','behavior'])['describe']('Risk\x20dimension\x20name.'),'score':z['number']()['describe']('Dimension\x20score\x20achieved.'),'max_score':z['number']()['describe']('Dimension\x20max\x20possible\x20score.'),'checks':z['array'](RiskCheckOutputSchema)['describe']('Individual\x20risk\x20checks\x20within\x20this\x20dimension.')}))['describe']('4-dimension\x20breakdown:\x20workflow\x20/\x20fund\x20/\x20trust\x20/\x20behavior.')})['optional']()['describe']('RiskScore\x20—\x20present\x20only\x20when\x20depth\x20>=\x20\x27evaluate\x27.'),'info_puzzle':z['object']({'completeness':z['number']()['min'](0x0)['max'](0x1)['describe']('InfoPuzzle\x20completeness\x20ratio\x20(0-1).'),'gaps':z['array'](z['string']())['describe']('Missing\x20key\x20puzzle\x20pieces.'),'assembled_at':z['number']()['describe']('Assembly\x20timestamp\x20(ms\x20since\x20epoch).')})['optional']()['describe']('InfoPuzzle\x20summary\x20—\x20present\x20only\x20when\x20depth\x20>=\x20\x27evaluate\x27.'),'preorder_advice':z['object']({'confidence':z['object']({'score':z['number']()['min'](0x0)['max'](0x64)['describe']('Composite\x20order\x20confidence\x20(0-100,\x20higher\x20=\x20safer\x20to\x20order).'),'base':z['number']()['describe']('Base\x20confidence\x20=\x20100\x20-\x20risk.total.'),'user_adjustment':z['number']()['describe']('User-controllable\x20adjustment\x20from\x20user_metrics\x20(±cap).'),'preference_nudge':z['number']()['describe']('Preference-match\x20nudge\x20(±5,\x20only\x20when\x20preferences\x20were\x20provided).'),'explanation':z['string']()['describe']('Transparent\x20breakdown\x20of\x20the\x20confidence\x20components.')})['describe']('ConfidenceScore\x20—\x20user-controllable\x20composite\x20order\x20confidence.'),'industry':IndustryEnumSchema['optional']()['describe']('Industry\x20used\x20for\x20the\x20industry-specific\x20risk\x20checks\x20(explicit\x20input\x20or\x20inferred).'),'strategies':z['array'](z['object']({'scenario':z['enum'](['info_asymmetry','fund_safety','refund_dispute','arbitration_fairness','pricing','delivery_sla','quality_verification','after_sales'])['describe']('Game\x20scenario\x20detected\x20from\x20the\x20puzzle.'),'merchant_tactic':z['string']()['describe']('Merchant\x27s\x20potential\x20tactic\x20in\x20this\x20scenario.'),'user_strategy':z['string']()['describe']('Recommended\x20user-side\x20strategy\x20(protection/mitigation).'),'nash_equilibrium':z['string']()['describe']('Win-win\x20equilibrium\x20the\x20strategy\x20pushes\x20toward.'),'confidence':z['number']()['min'](0x0)['max'](0x1)['describe']('Strategy\x20confidence\x20(0-1).'),'fallback':z['string']()['optional']()['describe']('Alternative\x20when\x20the\x20user\x20rejects\x20the\x20main\x20strategy.'),'rationale':z['string']()['describe']('Trigger-condition\x20explanation\x20from\x20puzzle\x20evidence.')}))['describe']('Top\x20merchant-vs-user\x20game\x20strategies\x20(user\x20side,\x20max\x203).'),'preference_match':z['object']({'score':z['number']()['min'](0x0)['max'](0x64)['describe']('Preference\x20match\x20score\x20(0-100).'),'matches':z['array'](z['string']())['describe']('Aspects\x20matching\x20the\x20user\x27s\x20preferences.'),'mismatches':z['array'](z['string']())['describe']('Aspects\x20mismatching\x20the\x20user\x27s\x20preferences.'),'warnings':z['array'](z['string']())['describe']('Match\x20warnings\x20(e.g.\x20budget\x20stretch).')})['optional']()['describe']('PreferenceMatchResult\x20—\x20present\x20when\x20preferences\x20(input\x20or\x20profile)\x20were\x20available.'),'preference_issues':z['array'](z['string']())['optional']()['describe']('Validation\x20issues\x20found\x20in\x20the\x20merged\x20preferences\x20(e.g.\x20budget\x20min\x20>\x20max).'),'industry_risks':z['object']({'score_adjustment':z['number']()['describe']('Industry\x20risk\x20adjustment\x20applied\x20to\x20the\x20base\x20risk\x20score\x20(-10\x20to\x20+10).'),'summary':z['string']()['describe']('Industry\x20risk\x20assessment\x20summary.'),'checks':z['array'](RiskCheckOutputSchema)['describe']('Industry-specific\x20risk\x20checks.'),'unmet_needs':z['array'](z['object']({'id':z['string']()['describe']('Need\x20identifier.'),'tier':z['enum'](['common','personalized','advanced'])['describe']('Need\x20tier.'),'description':z['string']()['describe']('Need\x20description.'),'advice':z['string']()['optional']()['describe']('Advice\x20for\x20fulfilling\x20the\x20need.')}))['describe']('Industry\x20needs\x20not\x20satisfied\x20by\x20this\x20Service.')})['optional']()['describe']('IndustryRiskResult\x20—\x20industry\x20pain-point\x20checks\x20(needs\x20met\x20/\x20risks\x20triggered).'),'reminders':z['array'](ReminderOutputSchema)['describe']('Transaction-safety\x20reminders\x20at\x20the\x20preorder\x20stage\x20(sorted,\x20capped).'),'blocking_reminders':z['array'](ReminderOutputSchema)['describe']('Blocking\x20(priority=required)\x20reminders\x20—\x20resolve\x20these\x20before\x20ordering.'),'summary':z['string']()['describe']('AI-ready\x20paragraph\x20summarizing\x20the\x20whole\x20preorder\x20report.')})['optional']()['describe']('PreorderAdvice\x20(GLM6/94\x20§3)\x20—\x20present\x20only\x20when\x20depth\x20=\x20\x27preorder\x27.\x20'+'AI\x20presents\x20evidence\x20and\x20options;\x20the\x20USER\x20decides\x20whether\x20to\x20order.'),'comparison':z['object']({'rows':z['array'](z['object']({'service_id':z['string'](),'service_name':z['string'](),'error':z['string']()['optional']()['describe']('Per-service\x20evaluation\x20failure\x20(row\x20excluded\x20from\x20best-per-metric).'),'industry':IndustryEnumSchema['optional'](),'confidence':z['number']()['optional']()['describe']('Order\x20confidence\x200-100\x20(higher\x20=\x20safer).'),'risk_total':z['number']()['optional']()['describe']('Risk\x20score\x200-100\x20(lower\x20=\x20safer).'),'risk_level':z['string']()['optional'](),'trust_score':z['number']()['optional']()['describe']('Trust\x20score\x200-100\x20(higher\x20=\x20more\x20trustworthy).'),'trust_level':z['string']()['optional'](),'preference_match':z['number']()['optional']()['describe']('Preference\x20match\x200-100\x20(higher\x20=\x20better\x20fit).'),'reputation_like_ratio':z['number']()['optional']()['describe']('likes/(likes+dislikes);\x201\x20when\x20no\x20votes.'),'reputation_votes':z['number']()['optional'](),'red_flags_count':z['number']()['optional'](),'blocking_reminders_count':z['number']()['optional'](),'info_gaps_count':z['number']()['optional']()})['strict']())['describe']('One\x20row\x20per\x20evaluated\x20service\x20(primary\x20first,\x20then\x20compare_with\x20candidates).'),'best_per_metric':z['record'](z['string'](),z['array'](z['string']()))['describe']('metric\x20name\x20→\x20service_ids\x20with\x20the\x20best\x20value\x20(ties\x20all\x20listed).\x20Per-metric\x20ONLY.'),'evaluated_metrics':z['array'](z['string']())['describe']('Metrics\x20actually\x20compared\x20(skipped\x20when\x20fewer\x20than\x202\x20rows\x20have\x20data).'),'note':z['string']()['describe']('Neutrality\x20note:\x20no\x20overall\x20ranking;\x20metric\x20weights\x20belong\x20to\x20the\x20buyer.')})['strict']()['optional']()['describe']('Deterministic\x20multi-service\x20comparison\x20(GLM6/94\x20L6)\x20—\x20present\x20only\x20when\x20depth=\x27preorder\x27\x20'+'and\x20compare_with\x20is\x20provided.\x20Per-metric\x20bests\x20ONLY,\x20no\x20overall\x20ranking\x20—\x20the\x20buyer\x20decides.')})['describe']('Trust\x20score\x20result.\x20Contains:\x20trust_score\x20(ServiceTrustScore),\x20'+'risk_score\x20(RiskScore,\x20when\x20depth\x20>=\x20evaluate),\x20info_puzzle\x20summary,\x20'+'preorder_advice\x20(PreorderAdvice,\x20when\x20depth\x20=\x20preorder),\x20'+'comparison\x20(PreorderComparison,\x20when\x20depth\x20=\x20preorder\x20and\x20compare_with\x20given),\x20'+'and\x20service_basics\x20snapshot.')});