@wowok/agent-mcp 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/evaluation/arbitration-game.js +1 -1
  2. package/dist/evaluation/location-match.js +1 -1
  3. package/dist/goal/GoalClassifier.js +1 -1
  4. package/dist/graph/onchain/analyze.d.ts +3 -3
  5. package/dist/graph/onchain/analyze.js +1 -1
  6. package/dist/graph/onchain/analyze.spec.js +1 -1
  7. package/dist/graph/onchain/edge-schema.d.ts +1 -1
  8. package/dist/graph/onchain/edge-schema.js +1 -1
  9. package/dist/graph/onchain/interest.js +1 -1
  10. package/dist/graph/onchain/sdk-dataplane.js +1 -1
  11. package/dist/graph/onchain/types.d.ts +5 -5
  12. package/dist/harness/verify.js +1 -1
  13. package/dist/knowledge/allocation-ledger.d.ts +2 -0
  14. package/dist/knowledge/allocation-ledger.js +1 -1
  15. package/dist/knowledge/allocation-puzzle.js +1 -1
  16. package/dist/knowledge/allocation-risk.d.ts +2 -1
  17. package/dist/knowledge/allocation-risk.js +1 -1
  18. package/dist/knowledge/guard-design-patterns.js +1 -1
  19. package/dist/knowledge/guard-field-cognition.d.ts +48 -0
  20. package/dist/knowledge/guard-field-cognition.js +1 -0
  21. package/dist/knowledge/index.d.ts +1 -0
  22. package/dist/knowledge/index.js +1 -1
  23. package/dist/knowledge/industry-registry.js +1 -1
  24. package/dist/knowledge/industry-strategy.js +1 -1
  25. package/dist/knowledge/jsonrpc-enum.js +1 -1
  26. package/dist/knowledge/recipient-constraint.d.ts +6 -1
  27. package/dist/knowledge/recipient-constraint.js +1 -1
  28. package/dist/knowledge/service-allocator-audit-node.d.ts +3 -0
  29. package/dist/knowledge/service-allocator-audit-node.js +1 -0
  30. package/dist/knowledge/service-risk-node.js +1 -1
  31. package/dist/knowledge/template-registry.js +1 -1
  32. package/dist/knowledge/workflow-guidance.d.ts +2 -0
  33. package/dist/knowledge/workflow-guidance.js +1 -1
  34. package/dist/monitor/MonitorLoop.js +1 -1
  35. package/dist/persona/strategy-intent.js +1 -1
  36. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  37. package/dist/playbooks/service-build/intent-analyzer.js +1 -1
  38. package/dist/playbooks/service-build/object-panorama.js +1 -1
  39. package/dist/playbooks/service-build/risk-aggregator.js +1 -1
  40. package/dist/playbooks/service-build/topology-query.js +1 -1
  41. package/dist/safety/confirm-gate.js +1 -1
  42. package/dist/safety/preview.js +1 -1
  43. package/dist/schema/call/base.js +1 -1
  44. package/dist/schema/call/handler.js +1 -1
  45. package/dist/schema/call/semantic.js +1 -1
  46. package/dist/schema/common/index.js +1 -1
  47. package/dist/schema/evaluation/index.js +1 -1
  48. package/dist/schema/local/index.js +1 -1
  49. package/dist/schema/operations.d.ts +2 -0
  50. package/dist/schema/query/bi.d.ts +16 -14
  51. package/dist/schema/query/bi.js +1 -1
  52. package/dist/schema/query/index.js +1 -1
  53. package/dist/schema/schema-version.js +1 -1
  54. package/dist/schema-query-impl/index.js +1 -1
  55. package/dist/schemas/account_operation.output.json +9 -9
  56. package/dist/schemas/account_operation.schema.json +3 -3
  57. package/dist/schemas/bridge_operation.output.json +9 -9
  58. package/dist/schemas/evaluation_operation.output.json +6 -6
  59. package/dist/schemas/evaluation_operation.schema.json +5 -5
  60. package/dist/schemas/index.json +1 -1
  61. package/dist/schemas/keeper_operation.output.json +9 -9
  62. package/dist/schemas/local_history_operation.output.json +9 -9
  63. package/dist/schemas/local_info_operation.output.json +9 -9
  64. package/dist/schemas/local_mark_operation.output.json +9 -9
  65. package/dist/schemas/messenger_operation.output.json +9 -9
  66. package/dist/schemas/monitor_events.output.json +9 -9
  67. package/dist/schemas/monitor_subscription.output.json +9 -9
  68. package/dist/schemas/onchain_events.output.json +10 -10
  69. package/dist/schemas/onchain_operations.output.json +9 -9
  70. package/dist/schemas/onchain_operations.schema.json +46 -46
  71. package/dist/schemas/onchain_operations_allocation.schema.json +5 -5
  72. package/dist/schemas/onchain_operations_arbitration.schema.json +3 -3
  73. package/dist/schemas/onchain_operations_contact.schema.json +2 -2
  74. package/dist/schemas/onchain_operations_demand.schema.json +2 -2
  75. package/dist/schemas/onchain_operations_machine.schema.json +2 -2
  76. package/dist/schemas/onchain_operations_order.schema.json +2 -2
  77. package/dist/schemas/onchain_operations_payment.schema.json +2 -2
  78. package/dist/schemas/onchain_operations_permission.schema.json +2 -2
  79. package/dist/schemas/onchain_operations_progress.schema.json +2 -2
  80. package/dist/schemas/onchain_operations_repository.schema.json +2 -2
  81. package/dist/schemas/onchain_operations_reward.schema.json +6 -6
  82. package/dist/schemas/onchain_operations_service.schema.json +8 -8
  83. package/dist/schemas/onchain_operations_treasury.schema.json +8 -8
  84. package/dist/schemas/onchain_table_data.output.json +17 -13
  85. package/dist/schemas/query_toolkit.output.json +47 -47
  86. package/dist/schemas/query_toolkit.schema.json +6 -2
  87. package/dist/strategy/collectors.js +1 -1
  88. package/dist/task/playbook.js +1 -1
  89. package/dist/tools/handlers/config.js +1 -1
  90. package/dist/tools/handlers/evaluation.spec.js +1 -1
  91. package/dist/tools/handlers/onchain.js +1 -1
  92. package/dist/tools/registry/monitor.js +1 -1
  93. package/dist/tools/shared.js +1 -1
  94. package/dist/tools/wrap.js +1 -1
  95. package/package.json +2 -2
@@ -1127,7 +1127,7 @@
1127
1127
  "type": "boolean"
1128
1128
  },
1129
1129
  "favor": {
1130
- "description": "Whether favorited (收藏)",
1130
+ "description": "Whether favorited",
1131
1131
  "type": "boolean"
1132
1132
  },
1133
1133
  "time": {
@@ -2643,7 +2643,7 @@
2643
2643
  "type": "string"
2644
2644
  }
2645
2645
  ],
2646
- "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
2646
+ "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. WARNING — BARE INTEGER MEANS SMALLEST UNIT, NOT TOKENS: formats (2)/(3) are NEVER interpreted as display tokens. For example amount=\"5\" or 5 means 5 raw units = 0.000000005 WOW (9 decimals) — NOT 5 WOW. When the user asks for a token amount, you MUST use display format (\"5WOW\", \"2USDC\"); a bare integer is only correct for unitless counts (e.g. stock quantity) or when you computed exact raw units yourself. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
2647
2647
  },
2648
2648
  {
2649
2649
  "type": "null"
@@ -4915,7 +4915,7 @@
4915
4915
  "type": "string"
4916
4916
  }
4917
4917
  ],
4918
- "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
4918
+ "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. WARNING — BARE INTEGER MEANS SMALLEST UNIT, NOT TOKENS: formats (2)/(3) are NEVER interpreted as display tokens. For example amount=\"5\" or 5 means 5 raw units = 0.000000005 WOW (9 decimals) — NOT 5 WOW. When the user asks for a token amount, you MUST use display format (\"5WOW\", \"2USDC\"); a bare integer is only correct for unitless counts (e.g. stock quantity) or when you computed exact raw units yourself. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
4919
4919
  },
4920
4920
  {
4921
4921
  "type": "null"
@@ -4948,7 +4948,7 @@
4948
4948
  "type": "object",
4949
4949
  "properties": {
4950
4950
  "for_object": {
4951
- "description": "Object this distribution belongs to (e.g. the order for a per-order allocation, recorded at creation). Auditors can query it to see the distribution's business context.",
4951
+ "description": "Binding anchor for this distribution. On an Allocation a SET for_object is ENFORCED at alloc(): every GuardIdentifier recipient submission must equal this address or the whole tx aborts (ERECIPIENT_NOT_FOR_OBJECT, code 15) — verify the anchor matches the intended recipient flow BEFORE create; payment_info is immutable afterwards. NULL/omitted = no anchor: nothing is enforced on-chain, recipient routing is entirely the creator's design. Also recorded at creation for auditors to query the distribution's business context.",
4952
4952
  "anyOf": [
4953
4953
  {
4954
4954
  "type": "string"
@@ -5332,7 +5332,7 @@
5332
5332
  "type": "string"
5333
5333
  }
5334
5334
  ],
5335
- "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
5335
+ "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. WARNING — BARE INTEGER MEANS SMALLEST UNIT, NOT TOKENS: formats (2)/(3) are NEVER interpreted as display tokens. For example amount=\"5\" or 5 means 5 raw units = 0.000000005 WOW (9 decimals) — NOT 5 WOW. When the user asks for a token amount, you MUST use display format (\"5WOW\", \"2USDC\"); a bare integer is only correct for unitless counts (e.g. stock quantity) or when you computed exact raw units yourself. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
5336
5336
  }
5337
5337
  },
5338
5338
  "required": [
@@ -7117,7 +7117,7 @@
7117
7117
  "type": "string"
7118
7118
  }
7119
7119
  ],
7120
- "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
7120
+ "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. WARNING — BARE INTEGER MEANS SMALLEST UNIT, NOT TOKENS: formats (2)/(3) are NEVER interpreted as display tokens. For example amount=\"5\" or 5 means 5 raw units = 0.000000005 WOW (9 decimals) — NOT 5 WOW. When the user asks for a token amount, you MUST use display format (\"5WOW\", \"2USDC\"); a bare integer is only correct for unitless counts (e.g. stock quantity) or when you computed exact raw units yourself. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
7121
7121
  }
7122
7122
  },
7123
7123
  "required": [
@@ -7169,7 +7169,7 @@
7169
7169
  "type": "object",
7170
7170
  "properties": {
7171
7171
  "for_object": {
7172
- "description": "Object this distribution belongs to (e.g. the order for a per-order allocation, recorded at creation). Auditors can query it to see the distribution's business context.",
7172
+ "description": "Binding anchor for this distribution. On an Allocation a SET for_object is ENFORCED at alloc(): every GuardIdentifier recipient submission must equal this address or the whole tx aborts (ERECIPIENT_NOT_FOR_OBJECT, code 15) — verify the anchor matches the intended recipient flow BEFORE create; payment_info is immutable afterwards. NULL/omitted = no anchor: nothing is enforced on-chain, recipient routing is entirely the creator's design. Also recorded at creation for auditors to query the distribution's business context.",
7173
7173
  "anyOf": [
7174
7174
  {
7175
7175
  "type": "string"
@@ -9259,7 +9259,7 @@
9259
9259
  "type": "string"
9260
9260
  }
9261
9261
  ],
9262
- "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
9262
+ "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. WARNING — BARE INTEGER MEANS SMALLEST UNIT, NOT TOKENS: formats (2)/(3) are NEVER interpreted as display tokens. For example amount=\"5\" or 5 means 5 raw units = 0.000000005 WOW (9 decimals) — NOT 5 WOW. When the user asks for a token amount, you MUST use display format (\"5WOW\", \"2USDC\"); a bare integer is only correct for unitless counts (e.g. stock quantity) or when you computed exact raw units yourself. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
9263
9263
  },
9264
9264
  {
9265
9265
  "type": "null"
@@ -10303,7 +10303,7 @@
10303
10303
  "type": "boolean"
10304
10304
  },
10305
10305
  "favor": {
10306
- "description": "Whether favorited (收藏)",
10306
+ "description": "Whether favorited",
10307
10307
  "type": "boolean"
10308
10308
  },
10309
10309
  "time": {
@@ -12951,7 +12951,7 @@
12951
12951
  "type": "boolean"
12952
12952
  },
12953
12953
  "favor": {
12954
- "description": "Whether favorited (收藏)",
12954
+ "description": "Whether favorited",
12955
12955
  "type": "boolean"
12956
12956
  },
12957
12957
  "time": {
@@ -15400,7 +15400,7 @@
15400
15400
  "type": "string"
15401
15401
  }
15402
15402
  ],
15403
- "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
15403
+ "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. WARNING — BARE INTEGER MEANS SMALLEST UNIT, NOT TOKENS: formats (2)/(3) are NEVER interpreted as display tokens. For example amount=\"5\" or 5 means 5 raw units = 0.000000005 WOW (9 decimals) — NOT 5 WOW. When the user asks for a token amount, you MUST use display format (\"5WOW\", \"2USDC\"); a bare integer is only correct for unitless counts (e.g. stock quantity) or when you computed exact raw units yourself. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
15404
15404
  },
15405
15405
  "token_type": {
15406
15406
  "type": "string",
@@ -15424,7 +15424,7 @@
15424
15424
  "type": "string"
15425
15425
  }
15426
15426
  ],
15427
- "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
15427
+ "description": "A coin/balance amount. Accepts three formats: (1) DISPLAY FORMAT with token symbol: \"2.5WOW\", \"10USDC\", \"0.05WOW\" — auto-converted to smallest units via the Fund Processing Layer (token precision resolved from official registry → cache → on-chain). The symbol MUST match the token's type_parameter. (2) SMALLEST UNIT (numeric string): \"10000000000\" — used as-is, no conversion. (3) SMALLEST UNIT (number): 10000000000 — used as-is only within the safe integer range (±2^53); numbers outside it are REJECTED, use a numeric string instead. PRECISION RULE: for values exceeding 2^53 (9007199254740991), ALWAYS use format (1) or (2) — JS numbers lose integer precision silently and such inputs are blocked. Raw amounts must be plain non-negative integers; a decimal value without a token symbol (e.g. \"2.5\") is rejected — append the symbol (\"2.5WOW\") so the Fund Processing Layer converts it. WARNING — BARE INTEGER MEANS SMALLEST UNIT, NOT TOKENS: formats (2)/(3) are NEVER interpreted as display tokens. For example amount=\"5\" or 5 means 5 raw units = 0.000000005 WOW (9 decimals) — NOT 5 WOW. When the user asks for a token amount, you MUST use display format (\"5WOW\", \"2USDC\"); a bare integer is only correct for unitless counts (e.g. stock quantity) or when you computed exact raw units yourself. Default token: WOW (9 decimals, 1 WOW = 10^9 MIST). For custom tokens: use display format with the token's symbol, or pass smallest units directly. MONEY CONFIRMATION: all monetary fields trigger user confirmation via the Fund Processing Layer, where the token's FULL type, decimals and raw amount are always visible. MULTIPLE ISSUERS: several on-chain tokens may legally share the same symbol (e.g. multiple \"USDT\" coins). When a bare symbol matches more than one token, the operation is BLOCKED and every candidate is listed with full details (type, name, decimals, verified tag) — present the list to the USER and let them choose (they may answer by number), then re-issue with the chosen token's FULL type string in type_parameter; never guess an issuer from the bare symbol. MISSING TOKEN INFO: when a token's precision cannot be resolved, the operation is REFUSED (raw u64 included — amount magnitude could not be verified). Recovery: provide the token's FULL type in package::module::Name form in type_parameter (a bare symbol like \"USDT\" cannot be resolved), and verify the WOW network is correct. Examples: \"2.5WOW\" (display → 2500000000), 10000000000 (number, smallest unit), \"50000000000\" (string, smallest unit). Used for: Service.sale.price, Service.compensation_fund_add balance, Treasury.deposit, Arbitration.fee, Reward.amount, stock quantities."
15428
15428
  },
15429
15429
  "payment": {
15430
15430
  "type": "string",
@@ -18646,9 +18646,9 @@
18646
18646
  "high"
18647
18647
  ]
18648
18648
  },
18649
- "titleZh": {
18649
+ "title": {
18650
18650
  "type": "string",
18651
- "description": "Chinese one-line finding title."
18651
+ "description": "One-line finding title (English in code; localized by the output layer)."
18652
18652
  },
18653
18653
  "path": {
18654
18654
  "type": "array",
@@ -18691,16 +18691,16 @@
18691
18691
  },
18692
18692
  "description": "Commercial roles this finding is relevant to."
18693
18693
  },
18694
- "detailZh": {
18694
+ "detail": {
18695
18695
  "type": "string",
18696
- "description": "Chinese objective detail (facts only)."
18696
+ "description": "Objective detail, facts only (English in code; localized by the output layer)."
18697
18697
  },
18698
- "suggestionZh": {
18698
+ "suggestion": {
18699
18699
  "type": "string",
18700
- "description": "Chinese structural suggestion (never a score)."
18700
+ "description": "Structural suggestion, never a score (English in code; localized by the output layer)."
18701
18701
  },
18702
18702
  "interest": {
18703
- "description": "G2 role-interest view payload — present only on IR:<role> findings (利益评估/操作路径/对手分析/风险提醒).",
18703
+ "description": "G2 role-interest view payload — present only on IR:<role> findings (stakes/actions/counterparties/risk reminders).",
18704
18704
  "type": "object",
18705
18705
  "properties": {
18706
18706
  "role": {
@@ -18773,7 +18773,7 @@
18773
18773
  ],
18774
18774
  "additionalProperties": false
18775
18775
  },
18776
- "description": "利益评估 — what the observer has at stake."
18776
+ "description": "Interest assessment — what the observer has at stake."
18777
18777
  },
18778
18778
  "actions": {
18779
18779
  "type": "array",
@@ -18949,7 +18949,7 @@
18949
18949
  ],
18950
18950
  "additionalProperties": false
18951
18951
  },
18952
- "description": "可行操作路径 — per in-flight order."
18952
+ "description": "Actionable paths — per in-flight order."
18953
18953
  },
18954
18954
  "arb_actions": {
18955
18955
  "type": "array",
@@ -19057,7 +19057,7 @@
19057
19057
  "neutral"
19058
19058
  ]
19059
19059
  },
19060
- "noteZh": {
19060
+ "note": {
19061
19061
  "type": "string"
19062
19062
  }
19063
19063
  },
@@ -19068,20 +19068,20 @@
19068
19068
  "their_prefer",
19069
19069
  "their_avoid",
19070
19070
  "alignment",
19071
- "noteZh"
19071
+ "note"
19072
19072
  ],
19073
19073
  "additionalProperties": false
19074
19074
  },
19075
- "description": "博弈对手分析 — structural tension from the single ROLE_INTERESTS table."
19075
+ "description": "Counterparty game analysis — structural tension from the single ROLE_INTERESTS table."
19076
19076
  },
19077
19077
  "risk_finding_ids": {
19078
19078
  "type": "array",
19079
19079
  "items": {
19080
19080
  "type": "string"
19081
19081
  },
19082
- "description": "风险提醒 — ids of role-relevant risk findings in the same result."
19082
+ "description": "Risk reminders — ids of role-relevant risk findings in the same result."
19083
19083
  },
19084
- "summaryZh": {
19084
+ "summary": {
19085
19085
  "type": "string"
19086
19086
  }
19087
19087
  },
@@ -19093,7 +19093,7 @@
19093
19093
  "arb_actions",
19094
19094
  "counterparties",
19095
19095
  "risk_finding_ids",
19096
- "summaryZh"
19096
+ "summary"
19097
19097
  ],
19098
19098
  "additionalProperties": false
19099
19099
  }
@@ -19102,12 +19102,12 @@
19102
19102
  "id",
19103
19103
  "kind",
19104
19104
  "severity",
19105
- "titleZh",
19105
+ "title",
19106
19106
  "path",
19107
19107
  "confidence",
19108
19108
  "roles",
19109
- "detailZh",
19110
- "suggestionZh"
19109
+ "detail",
19110
+ "suggestion"
19111
19111
  ],
19112
19112
  "additionalProperties": false
19113
19113
  },
@@ -19187,7 +19187,7 @@
19187
19187
  ],
19188
19188
  "additionalProperties": false
19189
19189
  },
19190
- "description": "利益评估 — what the observer has at stake."
19190
+ "description": "Interest assessment — what the observer has at stake."
19191
19191
  },
19192
19192
  "actions": {
19193
19193
  "type": "array",
@@ -19363,7 +19363,7 @@
19363
19363
  ],
19364
19364
  "additionalProperties": false
19365
19365
  },
19366
- "description": "可行操作路径 — per in-flight order."
19366
+ "description": "Actionable paths — per in-flight order."
19367
19367
  },
19368
19368
  "arb_actions": {
19369
19369
  "type": "array",
@@ -19471,7 +19471,7 @@
19471
19471
  "neutral"
19472
19472
  ]
19473
19473
  },
19474
- "noteZh": {
19474
+ "note": {
19475
19475
  "type": "string"
19476
19476
  }
19477
19477
  },
@@ -19482,20 +19482,20 @@
19482
19482
  "their_prefer",
19483
19483
  "their_avoid",
19484
19484
  "alignment",
19485
- "noteZh"
19485
+ "note"
19486
19486
  ],
19487
19487
  "additionalProperties": false
19488
19488
  },
19489
- "description": "博弈对手分析 — structural tension from the single ROLE_INTERESTS table."
19489
+ "description": "Counterparty game analysis — structural tension from the single ROLE_INTERESTS table."
19490
19490
  },
19491
19491
  "risk_finding_ids": {
19492
19492
  "type": "array",
19493
19493
  "items": {
19494
19494
  "type": "string"
19495
19495
  },
19496
- "description": "风险提醒 — ids of role-relevant risk findings in the same result."
19496
+ "description": "Risk reminders — ids of role-relevant risk findings in the same result."
19497
19497
  },
19498
- "summaryZh": {
19498
+ "summary": {
19499
19499
  "type": "string"
19500
19500
  }
19501
19501
  },
@@ -19507,7 +19507,7 @@
19507
19507
  "arb_actions",
19508
19508
  "counterparties",
19509
19509
  "risk_finding_ids",
19510
- "summaryZh"
19510
+ "summary"
19511
19511
  ],
19512
19512
  "additionalProperties": false
19513
19513
  },
@@ -20526,14 +20526,14 @@
20526
20526
  "description": "Business meaning of advancing to this node. Example: 'Guide starts the day service'"
20527
20527
  },
20528
20528
  "gains": {
20529
- "description": "Gains for the caller if this option is chosen (K3 Game G1 收益分离). Example: ['Settlement triggered — funds released to provider']",
20529
+ "description": "Gains for the caller if this option is chosen (K3 Game G1 gain separation). Example: ['Settlement triggered — funds released to provider']",
20530
20530
  "type": "array",
20531
20531
  "items": {
20532
20532
  "type": "string"
20533
20533
  }
20534
20534
  },
20535
20535
  "risks": {
20536
- "description": "Risks for the caller if this option is chosen (K3 Game G1 风险分离). Example: ['Refund leverage lost after confirmation']",
20536
+ "description": "Risks for the caller if this option is chosen (K3 Game G1 risk separation). Example: ['Refund leverage lost after confirmation']",
20537
20537
  "type": "array",
20538
20538
  "items": {
20539
20539
  "type": "string"
@@ -20563,7 +20563,7 @@
20563
20563
  "description": "ALL reachable next-node directions (every operator/permission/guard disclosed)."
20564
20564
  },
20565
20565
  "recommendation": {
20566
- "description": "Recommended option with rationale (K3 Game 意图/博弈/利益).",
20566
+ "description": "Recommended option with rationale (K3 Game intent/game/interests).",
20567
20567
  "type": "object",
20568
20568
  "properties": {
20569
20569
  "best": {
@@ -20575,7 +20575,7 @@
20575
20575
  "type": "string"
20576
20576
  },
20577
20577
  "caveat": {
20578
- "description": "Disclosed trade-off / opportunity cost of NOT taking another path (K3 Game G3 机会成本). Example: 'Choosing cancelled forfeits this order's settlement'",
20578
+ "description": "Disclosed trade-off / opportunity cost of NOT taking another path (K3 Game G3 opportunity cost). Example: 'Choosing cancelled forfeits this order's settlement'",
20579
20579
  "type": "string"
20580
20580
  }
20581
20581
  },
@@ -20695,7 +20695,7 @@
20695
20695
  "operator"
20696
20696
  ],
20697
20697
  "additionalProperties": false,
20698
- "description": "A forward still pending — who must act next (threshold cooperation, K3 Game G4 阈值配合)."
20698
+ "description": "A forward still pending — who must act next (threshold cooperation, K3 Game G4)."
20699
20699
  }
20700
20700
  },
20701
20701
  "next_guidance": {
@@ -20773,14 +20773,14 @@
20773
20773
  "description": "Business meaning of advancing to this node. Example: 'Guide starts the day service'"
20774
20774
  },
20775
20775
  "gains": {
20776
- "description": "Gains for the caller if this option is chosen (K3 Game G1 收益分离). Example: ['Settlement triggered — funds released to provider']",
20776
+ "description": "Gains for the caller if this option is chosen (K3 Game G1 gain separation). Example: ['Settlement triggered — funds released to provider']",
20777
20777
  "type": "array",
20778
20778
  "items": {
20779
20779
  "type": "string"
20780
20780
  }
20781
20781
  },
20782
20782
  "risks": {
20783
- "description": "Risks for the caller if this option is chosen (K3 Game G1 风险分离). Example: ['Refund leverage lost after confirmation']",
20783
+ "description": "Risks for the caller if this option is chosen (K3 Game G1 risk separation). Example: ['Refund leverage lost after confirmation']",
20784
20784
  "type": "array",
20785
20785
  "items": {
20786
20786
  "type": "string"
@@ -20810,7 +20810,7 @@
20810
20810
  "description": "ALL reachable next-node directions (every operator/permission/guard disclosed)."
20811
20811
  },
20812
20812
  "recommendation": {
20813
- "description": "Recommended option with rationale (K3 Game 意图/博弈/利益).",
20813
+ "description": "Recommended option with rationale (K3 Game intent/game/interests).",
20814
20814
  "type": "object",
20815
20815
  "properties": {
20816
20816
  "best": {
@@ -20822,7 +20822,7 @@
20822
20822
  "type": "string"
20823
20823
  },
20824
20824
  "caveat": {
20825
- "description": "Disclosed trade-off / opportunity cost of NOT taking another path (K3 Game G3 机会成本). Example: 'Choosing cancelled forfeits this order's settlement'",
20825
+ "description": "Disclosed trade-off / opportunity cost of NOT taking another path (K3 Game G3 opportunity cost). Example: 'Choosing cancelled forfeits this order's settlement'",
20826
20826
  "type": "string"
20827
20827
  }
20828
20828
  },
@@ -1012,6 +1012,10 @@
1012
1012
  "description": "On-chain object address (0x followed by 32-64 hex chars) for object_panorama. Also accepts a LocalMark NAME (resolved automatically). H-06 fix: invalid formats are rejected at the handler level with a descriptive error.",
1013
1013
  "type": "string"
1014
1014
  },
1015
+ "filter": {
1016
+ "description": "DEPRECATED alias of object_address (accepted for call compatibility; must be a plain address or LocalMark NAME string, not an object). Prefer object_address. Example: {\"query_type\": \"object_panorama\", \"object_address\": \"0xabc...\"}.",
1017
+ "type": "string"
1018
+ },
1015
1019
  "context_network": {
1016
1020
  "type": "string",
1017
1021
  "enum": [
@@ -1272,7 +1276,7 @@
1272
1276
  "query_type"
1273
1277
  ],
1274
1278
  "additionalProperties": false,
1275
- "description": "Business Relationship Graph (K3/19): derive ONE account's full relationship web from on-chain power carriers (Permission memberships, Machine forwards, Orders, Demand presenters, Allocation sharing, Arbitration bindings, Contact ims). Each edge carries the three dimensions — 权属 power (what each side CAN do, and where that power lives on-chain), 利益 interest (gains/exposures, with registry-declared goal tensions like principal-agent divergence), and 价值交互 value flows (escrow → allocation → payment chains). Read-only; roles are DERIVED from chain data, never asserted."
1279
+ "description": "Business Relationship Graph (K3/19): derive ONE account's full relationship web from on-chain power carriers (Permission memberships, Machine forwards, Orders, Demand presenters, Allocation sharing, Arbitration bindings, Contact ims). Each edge carries the three dimensions — power (what each side CAN do, and where that power lives on-chain), interest (gains/exposures, with registry-declared goal tensions like principal-agent divergence), and value flows (escrow → allocation → payment chains). Read-only; roles are DERIVED from chain data, never asserted."
1276
1280
  },
1277
1281
  {
1278
1282
  "type": "object",
@@ -1461,7 +1465,7 @@
1461
1465
  "type": "string"
1462
1466
  },
1463
1467
  "interest_role": {
1464
- "description": "G2 role interest view — project THIS CommercialRole's complete interest view (利益评估 stakes + 可行操作路径 node-game actions + 博弈对手分析 + 风险提醒) for context_account (or the seed when it is an EOA) over the same expanded graph. The view is returned as result.role_interest and as one IR:<role> finding carrying the same structured payload. Scoring comes exclusively from the evaluation game modules; when omitted, defaults to the persona 'role' lens if provided.",
1468
+ "description": "G2 role interest view — project THIS CommercialRole's complete interest view (interest-assessment stakes + node-game actions + counterparties + risk reminders) for context_account (or the seed when it is an EOA) over the same expanded graph. The view is returned as result.role_interest and as one IR:<role> finding carrying the same structured payload. Scoring comes exclusively from the evaluation game modules; when omitted, defaults to the persona 'role' lens if provided.",
1465
1469
  "type": "string",
1466
1470
  "enum": [
1467
1471
  "merchant",
@@ -1 +1 @@
1
- import{Config}from'@wowok/wowok/w/local';import{SdkDataPlane,expandTopology,orderCompletionInGraph}from'../graph/onchain/index.js';import{computeOrderFlow,computeMarketMetrics}from'../knowledge/market-metrics.js';import{computeJourneyFunnel,buildCustomerRelationships}from'../knowledge/market-operations.js';import{enumerateServices}from'../knowledge/jsonrpc-enum.js';import{assessArbitration}from'../evaluation/builtins/arbitration-score.js';import{runAccountEventWatchers}from'../customer/account-events.js';import{STRATEGY_METRIC_CATALOG}from'./metrics.js';const COMPLETED_RE=/completed|closed|finished|done/i;function toCustomerOrders(a){return a['map'](b=>({'id':b['id'],'customer':b['customer'],'time':b['time'],'disputed':b['disputed']??![]}));}const INDUSTRY_DISCOVERY_TERMS={'education':['education','tutor','course','class','learning','培训','课'],'rental':['rental','rent','lease','租'],'freelance':['freelance','agency','studio','consulting','design'],'subscription':['subscription','membership','member','订阅'],'travel':['travel','tour','trip','游'],'retail':['shop','store','retail','boutique','商城','店']};function discoveryTermsFor(a){const b=a['discovery_terms']??INDUSTRY_DISCOVERY_TERMS[a['industry']]??[a['industry']];return b['length']?b:[a['industry']];}const SHOP_ORDER_WINDOW_DEFAULT=0x64,MAX_PERMISSIONS_RESOLVED=0xa,MAX_SERVICES_RESOLVED=0x14,MAX_MACHINE_NODES=0xc8;export async function resolveShopOrderEvidence(a){const b=a['network']??await Config['Instance']()['network_get'](),c=Math['max'](0x1,a['limit']??SHOP_ORDER_WINDOW_DEFAULT),d=new SdkDataPlane(b,{'noCache':a['no_cache']}),f=await expandTopology(d,{'network':b,'seed':a['account'],'budget':{'maxDepth':0x4,'maxNodes':0x4b0,'maxFanoutPerNode':c,'maxRpcs':0x64,'perKindCaps':{'eoa.permission':MAX_PERMISSIONS_RESOLVED,'permission.core_binding':MAX_SERVICES_RESOLVED,'service.order':c,'machine.node':MAX_MACHINE_NODES}},'edges':{'schemas':['eoa.permission','permission.core_binding','service.order','order.machine','order.progress'],'tableEdges':['machine.node']}}),g=new Set();for(const i of f['edges']){if(i['schema']!=='permission.core_binding')continue;if(f['nodes']['get'](i['to']['toLowerCase']())?.['objectType']==='Service')g['add'](i['to']['toLowerCase']());}if(g['size']===0x0&&f['gaps']['length']>0x0)throw new Error('shop\x20topology\x20unreadable\x20for\x20'+a['account']+':\x20'+f['gaps']['slice'](0x0,0x3)['join'](';\x20'));const h=[];for(const j of f['edges']){if(j['schema']!=='service.order'||!g['has'](j['from']['toLowerCase']()))continue;const k=f['nodes']['get'](j['to']['toLowerCase']());if(k?.['objectType']!=='Order'||!k['raw'])continue;const l=k['raw']['data']??k['raw'];h['push']({'id':j['to'],'customer':String(l['builder']??''),'time':Number(BigInt(l['time']??0x0)),'disputed':Array['isArray'](l['dispute'])&&l['dispute']['length']>0x0,'status':orderCompletionInGraph(f,j['to'])['status']});}return h['sort']((m,n)=>n['time']-m['time']),{'orders':h['slice'](0x0,c),'service_count':g['size'],'observed_total':h['length'],'truncated':h['length']>c,'unknown_workflow':h['filter'](m=>m['status']==='unknown')['length']};}const marketOperationsFetcher={'id':'market_operations',async 'fetch'(a){const b={},c=a['orders']??[];if(c['length']===0x0)return b;const d=c['filter'](i=>i['status']?COMPLETED_RE['test'](i['status']):![])['length'],e=computeJourneyFunnel({'due_diligence':a['due_diligence']??0x0,'orders':c['length'],'completed':d,'reviews':a['reviews_count']??0x0});b['order_count']=e['orders'],b['completed_count']=e['completed'],b['completion_rate']=e['order_completion_rate'];if(e['due_diligence']>0x0)b['dd_to_order_rate']=e['dd_to_order_rate'];const f=buildCustomerRelationships(toCustomerOrders(c)),g=f['filter'](i=>i['order_count']>=0x2)['length'];b['repeat_customer_rate']=f['length']>0x0?g/f['length']:0x0;const h=c['filter'](i=>i['disputed'])['length'];return b['dispute_rate']=h/c['length'],b;}},orderFlowFetcher={'id':'order_flow',async 'fetch'(a){const b=a['network']??await Config['Instance']()['network_get'](),c=await computeOrderFlow(b,{'noCache':a['no_cache'],'maxPages':Math['max'](0x1,Math['ceil']((a['limit']??0x64)/0x32))}),d=c['gmv_by_coin']['filter'](f=>f['coin']!=='unknown');let e;if(d['length']===0x1&&c['unclassified_orders']===0x0){const f=BigInt(d[0x0]['amount']);e=f<=BigInt(Number['MAX_SAFE_INTEGER'])?Number(f):{'note':'exact\x20'+d[0x0]['coin']+'\x20GMV\x20'+d[0x0]['amount']+'\x20base\x20units\x20exceeds\x202^53'};}else{const g=c['gmv_by_coin']['map'](h=>h['coin']+'='+h['amount']+'\x20('+h['orders']+'\x20orders)')['join'](';\x20');e={'note':'order\x20volume\x20spans\x20multiple/unresolved\x20coin\x20types\x20and\x20cannot\x20be\x20summed\x20into\x20one\x20GMV\x20'+('('+c['window']+');\x20per-coin\x20base-unit\x20volume:\x20'+(g||'none'))};}return{'market_recent_orders':c['order_count'],'market_recent_gmv':e};}},marketMetricsFetcher={'id':'market_metrics',async 'fetch'(a){const b=a['network']??await Config['Instance']()['network_get'](),c=await computeMarketMetrics(b,a['no_cache']),d={'market_active_services':c['active_services']};if(c['supply_demand_ratio']!==null)d['supply_demand_ratio']=c['supply_demand_ratio'];return d;}},discoverServicesFetcher={'id':'discover_services',async 'fetch'(a){const b=discoveryTermsFor(a)['map'](g=>g['toLowerCase']()),c=a['network']??await Config['Instance']()['network_get'](),d=await enumerateServices(c,{'max_objects':a['limit']??0xc8,'no_cache':a['no_cache']}),e=d['services']['filter'](g=>{const h=((g['name']??'')+'\x20'+(g['json']?.['description']??'')+'\x20'+(g['json']?.['category']??''))['toLowerCase']();return b['some'](i=>h['includes'](i));}),f={'category_enumerated_count':d['total_enumerated']};return f['competitor_count']=e['length']>0x0?e['length']:{'note':'no\x20enumerated\x20service\x20matched\x20the\x20discovery\x20terms;\x20category\x20density\x20reported\x20as\x20category_enumerated_count'},f;}},arbitrationScoreFetcher={'id':'arbitration_score',async 'fetch'(a){const b={};if(!a['arbitration_object'])return b;const c=await assessArbitration({'arbitration':{'object':a['arbitration_object']}});return b['arbitration_trust_score']=c['combined'],b;}},accountEventsFetcher={'id':'account_events',async 'fetch'(a){const b=await runAccountEventWatchers({'account':a['account'],'network':a['network']??await Config['Instance']()['network_get'](),'order_history':(a['orders']??[])['map'](c=>({'id':c['id'],'status':c['status']??''}))});return{'open_attention_count':b['length']};}};export const DEFAULT_METRIC_FETCHERS=[marketOperationsFetcher,orderFlowFetcher,marketMetricsFetcher,discoverServicesFetcher,arbitrationScoreFetcher,accountEventsFetcher];export async function collectScorecard(a,b={}){const c=b['fetchers']??DEFAULT_METRIC_FETCHERS,d=new Set(b['metricIds']??STRATEGY_METRIC_CATALOG['map'](n=>n['id'])),e=Date['now'](),f=[],g=[],h=[],i=new Map();for(const m of STRATEGY_METRIC_CATALOG){if(!d['has'](m['id']))continue;const n=i['get'](m['source'])??[];n['push']({'id':m['id']}),i['set'](m['source'],n);}let j=a;const k=['market_operations','account_events'];if(!a['orders']&&k['some'](o=>i['has'](o)))try{const o=b['resolveOrders']??(q=>resolveShopOrderEvidence(q)['then'](s=>s['orders'])),p=await o(a);p['length']>0x0&&(j={...a,'orders':p});}catch{}await Promise['all']([...i['entries']()]['map'](async([q,r])=>{const s=c['find'](v=>v['id']===q);let t={},u=null;if(!s)u='no\x20fetcher\x20registered\x20for\x20source\x20\x27'+q+'\x27';else try{t=await s['fetch'](j);}catch(v){u=v['message'];}for(const w of r){const x=t[w['id']],y=typeof x==='number'?x:x?.['value'],z=typeof x==='number'?undefined:x?.['note'];if(u)f['push']({'id':w['id'],'source':q,'status':'error','note':u,'collected_at':e}),h['push']({'id':w['id'],'error':u});else typeof y==='number'&&Number['isFinite'](y)?f['push']({'id':w['id'],'source':q,'status':'ok','value':y,'note':z,'collected_at':e}):(f['push']({'id':w['id'],'source':q,'status':'unavailable','note':z,'collected_at':e}),g['push'](w['id']));}}));const l=new Map(STRATEGY_METRIC_CATALOG['map']((q,r)=>[q['id'],r]));return f['sort']((q,r)=>(l['get'](q['id'])??0x0)-(l['get'](r['id'])??0x0)),{'account':a['account'],'industry':a['industry'],'network':a['network']??await Config['Instance']()['network_get'](),'collected_at':e,'metrics':f,'unavailable':g,'errors':h};}
1
+ import{Config}from'@wowok/wowok/w/local';import{SdkDataPlane,expandTopology,orderCompletionInGraph}from'../graph/onchain/index.js';import{computeOrderFlow,computeMarketMetrics}from'../knowledge/market-metrics.js';import{computeJourneyFunnel,buildCustomerRelationships}from'../knowledge/market-operations.js';import{enumerateServices}from'../knowledge/jsonrpc-enum.js';import{assessArbitration}from'../evaluation/builtins/arbitration-score.js';import{runAccountEventWatchers}from'../customer/account-events.js';import{STRATEGY_METRIC_CATALOG}from'./metrics.js';const COMPLETED_RE=/completed|closed|finished|done/i;function toCustomerOrders(a){return a['map'](b=>({'id':b['id'],'customer':b['customer'],'time':b['time'],'disputed':b['disputed']??![]}));}const INDUSTRY_DISCOVERY_TERMS={'education':['education','tutor','course','class','learning','training'],'rental':['rental','rent','lease'],'freelance':['freelance','agency','studio','consulting','design'],'subscription':['subscription','membership','member'],'travel':['travel','tour','trip'],'retail':['shop','store','retail','boutique','mall']};function discoveryTermsFor(a){const b=a['discovery_terms']??INDUSTRY_DISCOVERY_TERMS[a['industry']]??[a['industry']];return b['length']?b:[a['industry']];}const SHOP_ORDER_WINDOW_DEFAULT=0x64,MAX_PERMISSIONS_RESOLVED=0xa,MAX_SERVICES_RESOLVED=0x14,MAX_MACHINE_NODES=0xc8;export async function resolveShopOrderEvidence(a){const b=a['network']??await Config['Instance']()['network_get'](),c=Math['max'](0x1,a['limit']??SHOP_ORDER_WINDOW_DEFAULT),d=new SdkDataPlane(b,{'noCache':a['no_cache']}),f=await expandTopology(d,{'network':b,'seed':a['account'],'budget':{'maxDepth':0x4,'maxNodes':0x4b0,'maxFanoutPerNode':c,'maxRpcs':0x64,'perKindCaps':{'eoa.permission':MAX_PERMISSIONS_RESOLVED,'permission.core_binding':MAX_SERVICES_RESOLVED,'service.order':c,'machine.node':MAX_MACHINE_NODES}},'edges':{'schemas':['eoa.permission','permission.core_binding','service.order','order.machine','order.progress'],'tableEdges':['machine.node']}}),g=new Set();for(const i of f['edges']){if(i['schema']!=='permission.core_binding')continue;if(f['nodes']['get'](i['to']['toLowerCase']())?.['objectType']==='Service')g['add'](i['to']['toLowerCase']());}if(g['size']===0x0&&f['gaps']['length']>0x0)throw new Error('shop\x20topology\x20unreadable\x20for\x20'+a['account']+':\x20'+f['gaps']['slice'](0x0,0x3)['join'](';\x20'));const h=[];for(const j of f['edges']){if(j['schema']!=='service.order'||!g['has'](j['from']['toLowerCase']()))continue;const k=f['nodes']['get'](j['to']['toLowerCase']());if(k?.['objectType']!=='Order'||!k['raw'])continue;const l=k['raw']['data']??k['raw'];h['push']({'id':j['to'],'customer':String(l['builder']??''),'time':Number(BigInt(l['time']??0x0)),'disputed':Array['isArray'](l['dispute'])&&l['dispute']['length']>0x0,'status':orderCompletionInGraph(f,j['to'])['status']});}return h['sort']((m,n)=>n['time']-m['time']),{'orders':h['slice'](0x0,c),'service_count':g['size'],'observed_total':h['length'],'truncated':h['length']>c,'unknown_workflow':h['filter'](m=>m['status']==='unknown')['length']};}const marketOperationsFetcher={'id':'market_operations',async 'fetch'(a){const b={},c=a['orders']??[];if(c['length']===0x0)return b;const d=c['filter'](i=>i['status']?COMPLETED_RE['test'](i['status']):![])['length'],e=computeJourneyFunnel({'due_diligence':a['due_diligence']??0x0,'orders':c['length'],'completed':d,'reviews':a['reviews_count']??0x0});b['order_count']=e['orders'],b['completed_count']=e['completed'],b['completion_rate']=e['order_completion_rate'];if(e['due_diligence']>0x0)b['dd_to_order_rate']=e['dd_to_order_rate'];const f=buildCustomerRelationships(toCustomerOrders(c)),g=f['filter'](i=>i['order_count']>=0x2)['length'];b['repeat_customer_rate']=f['length']>0x0?g/f['length']:0x0;const h=c['filter'](i=>i['disputed'])['length'];return b['dispute_rate']=h/c['length'],b;}},orderFlowFetcher={'id':'order_flow',async 'fetch'(a){const b=a['network']??await Config['Instance']()['network_get'](),c=await computeOrderFlow(b,{'noCache':a['no_cache'],'maxPages':Math['max'](0x1,Math['ceil']((a['limit']??0x64)/0x32))}),d=c['gmv_by_coin']['filter'](f=>f['coin']!=='unknown');let e;if(d['length']===0x1&&c['unclassified_orders']===0x0){const f=BigInt(d[0x0]['amount']);e=f<=BigInt(Number['MAX_SAFE_INTEGER'])?Number(f):{'note':'exact\x20'+d[0x0]['coin']+'\x20GMV\x20'+d[0x0]['amount']+'\x20base\x20units\x20exceeds\x202^53'};}else{const g=c['gmv_by_coin']['map'](h=>h['coin']+'='+h['amount']+'\x20('+h['orders']+'\x20orders)')['join'](';\x20');e={'note':'order\x20volume\x20spans\x20multiple/unresolved\x20coin\x20types\x20and\x20cannot\x20be\x20summed\x20into\x20one\x20GMV\x20'+('('+c['window']+');\x20per-coin\x20base-unit\x20volume:\x20'+(g||'none'))};}return{'market_recent_orders':c['order_count'],'market_recent_gmv':e};}},marketMetricsFetcher={'id':'market_metrics',async 'fetch'(a){const b=a['network']??await Config['Instance']()['network_get'](),c=await computeMarketMetrics(b,a['no_cache']),d={'market_active_services':c['active_services']};if(c['supply_demand_ratio']!==null)d['supply_demand_ratio']=c['supply_demand_ratio'];return d;}},discoverServicesFetcher={'id':'discover_services',async 'fetch'(a){const b=discoveryTermsFor(a)['map'](g=>g['toLowerCase']()),c=a['network']??await Config['Instance']()['network_get'](),d=await enumerateServices(c,{'max_objects':a['limit']??0xc8,'no_cache':a['no_cache']}),e=d['services']['filter'](g=>{const h=((g['name']??'')+'\x20'+(g['json']?.['description']??'')+'\x20'+(g['json']?.['category']??''))['toLowerCase']();return b['some'](i=>h['includes'](i));}),f={'category_enumerated_count':d['total_enumerated']};return f['competitor_count']=e['length']>0x0?e['length']:{'note':'no\x20enumerated\x20service\x20matched\x20the\x20discovery\x20terms;\x20category\x20density\x20reported\x20as\x20category_enumerated_count'},f;}},arbitrationScoreFetcher={'id':'arbitration_score',async 'fetch'(a){const b={};if(!a['arbitration_object'])return b;const c=await assessArbitration({'arbitration':{'object':a['arbitration_object']}});return b['arbitration_trust_score']=c['combined'],b;}},accountEventsFetcher={'id':'account_events',async 'fetch'(a){const b=await runAccountEventWatchers({'account':a['account'],'network':a['network']??await Config['Instance']()['network_get'](),'order_history':(a['orders']??[])['map'](c=>({'id':c['id'],'status':c['status']??''}))});return{'open_attention_count':b['length']};}};export const DEFAULT_METRIC_FETCHERS=[marketOperationsFetcher,orderFlowFetcher,marketMetricsFetcher,discoverServicesFetcher,arbitrationScoreFetcher,accountEventsFetcher];export async function collectScorecard(a,b={}){const c=b['fetchers']??DEFAULT_METRIC_FETCHERS,d=new Set(b['metricIds']??STRATEGY_METRIC_CATALOG['map'](n=>n['id'])),e=Date['now'](),f=[],g=[],h=[],i=new Map();for(const m of STRATEGY_METRIC_CATALOG){if(!d['has'](m['id']))continue;const n=i['get'](m['source'])??[];n['push']({'id':m['id']}),i['set'](m['source'],n);}let j=a;const k=['market_operations','account_events'];if(!a['orders']&&k['some'](o=>i['has'](o)))try{const o=b['resolveOrders']??(q=>resolveShopOrderEvidence(q)['then'](s=>s['orders'])),p=await o(a);p['length']>0x0&&(j={...a,'orders':p});}catch{}await Promise['all']([...i['entries']()]['map'](async([q,r])=>{const s=c['find'](v=>v['id']===q);let t={},u=null;if(!s)u='no\x20fetcher\x20registered\x20for\x20source\x20\x27'+q+'\x27';else try{t=await s['fetch'](j);}catch(v){u=v['message'];}for(const w of r){const x=t[w['id']],y=typeof x==='number'?x:x?.['value'],z=typeof x==='number'?undefined:x?.['note'];if(u)f['push']({'id':w['id'],'source':q,'status':'error','note':u,'collected_at':e}),h['push']({'id':w['id'],'error':u});else typeof y==='number'&&Number['isFinite'](y)?f['push']({'id':w['id'],'source':q,'status':'ok','value':y,'note':z,'collected_at':e}):(f['push']({'id':w['id'],'source':q,'status':'unavailable','note':z,'collected_at':e}),g['push'](w['id']));}}));const l=new Map(STRATEGY_METRIC_CATALOG['map']((q,r)=>[q['id'],r]));return f['sort']((q,r)=>(l['get'](q['id'])??0x0)-(l['get'](r['id'])??0x0)),{'account':a['account'],'industry':a['industry'],'network':a['network']??await Config['Instance']()['network_get'](),'collected_at':e,'metrics':f,'unavailable':g,'errors':h};}
@@ -1 +1 @@
1
- const registry=new Map();export function registerPlaybook(a){if(!a['name'])throw new Error('playbook\x20requires\x20a\x20name');if(a['stages']['length']===0x0)throw new Error('playbook\x20\x27'+a['name']+'\x27\x20requires\x20stages');registry['set'](a['name'],{...a,'stages':[...a['stages']]});}export function getPlaybook(a){return registry['get'](a);}export function listPlaybooks(){return[...registry['values']()];}export function hasPlaybook(a){return registry['has'](a);}export const GENERIC_PLAYBOOK='generic';export function playbookForGoalType(a){switch(a){case'publish_service':return registry['get']('service-build');case'fulfill_order':return registry['get']('order-fulfillment');case'capture_demand':return registry['get']('demand-capture');case'publish_demand':return registry['get']('demand-publish');case'purchase_service':return registry['get']('purchase');case'manage_assets':return registry['get']('governance');default:return registry['get'](GENERIC_PLAYBOOK);}}registerPlaybook({'name':GENERIC_PLAYBOOK,'stages':['prepare','execute','verify','close'],'description':'Fallback\x20stage\x20sequence\x20for\x20goals\x20without\x20a\x20dedicated\x20playbook.'}),registerPlaybook({'name':'service-build','stages':['namespace','puzzle','risk','doc','substeps'],'description':'Design\x20&\x20publish\x20a\x20commercial\x20service\x20(content:\x20src/playbooks/service-build/).'}),registerPlaybook({'name':'order-fulfillment','stages':['confirm','deliver','accept','settle'],'description':'Merchant-side\x20order\x20fulfillment.'}),registerPlaybook({'name':'demand-capture','stages':['discover','evaluate','engage','close'],'description':'Discover\x20and\x20capture\x20demand\x20opportunities.'}),registerPlaybook({'name':'demand-publish','stages':['draft','fund','publish','close'],'description':'Publish\x20a\x20funded\x20demand.'}),registerPlaybook({'name':'purchase','stages':['select','order','monitor','review'],'description':'Purchase\x20a\x20service\x20and\x20see\x20it\x20delivered.'}),registerPlaybook({'name':'governance','stages':['inventory','decide','execute','audit'],'description':'On-chain\x20permission/data/financial\x20governance\x20loop\x20(08\x20§七\x20N-4;\x20skill:\x20wowok-governance).'});
1
+ const registry=new Map();export function registerPlaybook(a){if(!a['name'])throw new Error('playbook\x20requires\x20a\x20name');if(a['stages']['length']===0x0)throw new Error('playbook\x20\x27'+a['name']+'\x27\x20requires\x20stages');registry['set'](a['name'],{...a,'stages':[...a['stages']]});}export function getPlaybook(a){return registry['get'](a);}export function listPlaybooks(){return[...registry['values']()];}export function hasPlaybook(a){return registry['has'](a);}export const GENERIC_PLAYBOOK='generic';export function playbookForGoalType(a){switch(a){case'publish_service':return registry['get']('service-build');case'fulfill_order':return registry['get']('order-fulfillment');case'capture_demand':return registry['get']('demand-capture');case'publish_demand':return registry['get']('demand-publish');case'purchase_service':return registry['get']('purchase');case'manage_assets':return registry['get']('governance');default:return registry['get'](GENERIC_PLAYBOOK);}}registerPlaybook({'name':GENERIC_PLAYBOOK,'stages':['prepare','execute','verify','close'],'description':'Fallback\x20stage\x20sequence\x20for\x20goals\x20without\x20a\x20dedicated\x20playbook.'}),registerPlaybook({'name':'service-build','stages':['namespace','puzzle','risk','doc','substeps'],'description':'Design\x20&\x20publish\x20a\x20commercial\x20service\x20(content:\x20src/playbooks/service-build/).'}),registerPlaybook({'name':'order-fulfillment','stages':['confirm','deliver','accept','settle'],'description':'Merchant-side\x20order\x20fulfillment.'}),registerPlaybook({'name':'demand-capture','stages':['discover','evaluate','engage','close'],'description':'Discover\x20and\x20capture\x20demand\x20opportunities.'}),registerPlaybook({'name':'demand-publish','stages':['draft','fund','publish','close'],'description':'Publish\x20a\x20funded\x20demand.'}),registerPlaybook({'name':'purchase','stages':['select','order','monitor','review'],'description':'Purchase\x20a\x20service\x20and\x20see\x20it\x20delivered.'}),registerPlaybook({'name':'governance','stages':['inventory','decide','execute','audit'],'description':'On-chain\x20permission/data/financial\x20governance\x20loop\x20(08\x20§7\x20N-4;\x20skill:\x20wowok-governance).'});
@@ -1 +1 @@
1
- import{listServices,getServiceInfo,toggle as a358a,setEnabled as a358b,reset as a358c}from'../../config/index.js';import{strictParse}from'../../schema/index.js';import{ConfigOperationInputSchema}from'../../schema/config/index.js';export async function handleConfigOperation(a){const b=strictParse(ConfigOperationInputSchema,a,'config_operation\x20input'),{action:c,service:d}=b;let e;switch(c){case'list':e={'action':'list','services':listServices()};break;case'toggle':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20toggle');const f=d,g=getServiceInfo(f);if(!g)throw new Error('Unknown\x20service:\x20'+f+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');if(f==='confirm_gate'&&g['enabled'])throw new Error('confirm_gate\x20cannot\x20be\x20disabled\x20at\x20runtime.\x20'+'Set\x20WOWOK_CONFIRM_GATE=0\x20in\x20the\x20server\x20environment\x20and\x20restart\x20if\x20you\x20really\x20want\x20it\x20off.');const h=a358a(f);e={'action':'toggle','service':f,'enabled':h,'reminder':g['reminder']};break;}case'disable':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20disable');const i=d,j=getServiceInfo(i);if(!j)throw new Error('Unknown\x20service:\x20'+i+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');if(i==='confirm_gate')throw new Error('confirm_gate\x20cannot\x20be\x20disabled\x20at\x20runtime.\x20'+'Set\x20WOWOK_CONFIRM_GATE=0\x20in\x20the\x20server\x20environment\x20and\x20restart\x20if\x20you\x20really\x20want\x20it\x20off.');a358b(i,![]),e={'action':'disable','service':i,'enabled':![],'reminder':j['reminder']};break;}case'enable':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20enable');const k=d,l=getServiceInfo(k);if(!l)throw new Error('Unknown\x20service:\x20'+k+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');a358b(k,!![]),e={'action':'enable','service':k,'enabled':!![],'reminder':l['reminder']};break;}case'reset':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20reset');const m=d,n=getServiceInfo(m);if(!n)throw new Error('Unknown\x20service:\x20'+m+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');a358c(m),e={'action':'reset','service':m,'enabled':getServiceInfo(m)?.['enabled'],'reminder':n['reminder'],'reset':!![]};break;}case'info':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20info');const o=d,p=getServiceInfo(o);if(!p)throw new Error('Unknown\x20service:\x20'+o+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');e={'action':'info',...p};break;}default:throw new Error('Unknown\x20config_operation\x20action:\x20'+String(c));}return{'content':[{'type':'text','text':JSON['stringify']({'result':e})}],'structuredContent':{'result':e}};}
1
+ import{listServices,getServiceInfo,toggle as a360a,setEnabled as a360b,reset as a360c}from'../../config/index.js';import{strictParse}from'../../schema/index.js';import{ConfigOperationInputSchema}from'../../schema/config/index.js';export async function handleConfigOperation(a){const b=strictParse(ConfigOperationInputSchema,a,'config_operation\x20input'),{action:c,service:d}=b;let e;switch(c){case'list':e={'action':'list','services':listServices()};break;case'toggle':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20toggle');const f=d,g=getServiceInfo(f);if(!g)throw new Error('Unknown\x20service:\x20'+f+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');if(f==='confirm_gate'&&g['enabled'])throw new Error('confirm_gate\x20cannot\x20be\x20disabled\x20at\x20runtime.\x20'+'Set\x20WOWOK_CONFIRM_GATE=0\x20in\x20the\x20server\x20environment\x20and\x20restart\x20if\x20you\x20really\x20want\x20it\x20off.');const h=a360a(f);e={'action':'toggle','service':f,'enabled':h,'reminder':g['reminder']};break;}case'disable':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20disable');const i=d,j=getServiceInfo(i);if(!j)throw new Error('Unknown\x20service:\x20'+i+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');if(i==='confirm_gate')throw new Error('confirm_gate\x20cannot\x20be\x20disabled\x20at\x20runtime.\x20'+'Set\x20WOWOK_CONFIRM_GATE=0\x20in\x20the\x20server\x20environment\x20and\x20restart\x20if\x20you\x20really\x20want\x20it\x20off.');a360b(i,![]),e={'action':'disable','service':i,'enabled':![],'reminder':j['reminder']};break;}case'enable':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20enable');const k=d,l=getServiceInfo(k);if(!l)throw new Error('Unknown\x20service:\x20'+k+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');a360b(k,!![]),e={'action':'enable','service':k,'enabled':!![],'reminder':l['reminder']};break;}case'reset':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20reset');const m=d,n=getServiceInfo(m);if(!n)throw new Error('Unknown\x20service:\x20'+m+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');a360c(m),e={'action':'reset','service':m,'enabled':getServiceInfo(m)?.['enabled'],'reminder':n['reminder'],'reset':!![]};break;}case'info':{if(!d)throw new Error('\x27service\x27\x20param\x20is\x20required\x20for\x20info');const o=d,p=getServiceInfo(o);if(!p)throw new Error('Unknown\x20service:\x20'+o+'.\x20Use\x20action=\x27list\x27\x20to\x20see\x20all\x20valid\x20services.');e={'action':'info',...p};break;}default:throw new Error('Unknown\x20config_operation\x20action:\x20'+String(c));}return{'content':[{'type':'text','text':JSON['stringify']({'result':e})}],'structuredContent':{'result':e}};}
@@ -1 +1 @@
1
- import{describe,expect,it}from'vitest';import{handleEvaluationOperation}from'./evaluation.js';function resultOf(a){return a['structuredContent']['result'];}const demandCap={'id':'0xdemand1','kind':'demand','industry':'freelance','region':{'mode':'physical','city':'Shanghai','raw':'Shanghai'},'keywords':['design'],'capabilities':{'has_arbitration':![],'has_refund_path':![],'has_milestone_nodes':![],'has_compensation_fund':![],'has_wip_verification':![],'has_messenger':![],'has_buy_guard':![],'has_dynamic_pricing':![],'is_published':!![],'is_paused':![]}},service={'object':'0xsvc1','description':'freelance\x20logo\x20design','location':'Shanghai','sales':[{'price':'100','wip_hash':'abc'}],'bPublished':!![],'bPaused':![]};describe('evaluation_operation\x20demand_match\x20presenter_history\x20(P2-2)',()=>{it('acceptance\x20rule\x20scores\x20the\x20rated\x20history\x20in\x20the\x20breakdown',async()=>{const a=await handleEvaluationOperation({'action':'demand_match','demand_cap':demandCap,'services':[service],'presenter_history':[{'acceptance_score':0x50},{'acceptance_score':0x5a}]}),c=resultOf(a);expect(c['action'])['toBe']('demand_match');const d=c['matches'][0x0]['result']['breakdown']['find'](e=>e['rule_id']==='acceptance');expect(d)['toBeDefined'](),expect(d['score'])['toBe'](0x55);}),it('omitted\x20history\x20→\x20acceptance\x20stays\x20neutral',async()=>{const a=await handleEvaluationOperation({'action':'demand_match','demand_cap':demandCap,'services':[service]}),c=resultOf(a)['matches'][0x0]['result']['breakdown']['find'](d=>d['rule_id']==='acceptance');expect(c)['toBeDefined'](),expect(c['score'])['toBe'](0x32),expect(c['reason'])['toContain']('neutral');}),it('schema\x20rejects\x20a\x20malformed\x20presenter_history\x20entry',async()=>{await expect(handleEvaluationOperation({'action':'demand_match','demand_cap':demandCap,'services':[service],'presenter_history':[{'acceptance_score':0x50,'bogus':!![]}]}))['rejects']['toThrow']();});}),describe('evaluation_operation\x20demand_match\x20order\x20bridge\x20(N-2\x20/\x2008\x20§七)',()=>{it('each\x20match\x20carries\x20the\x20service.order_new\x20transaction-formation\x20bridge',async()=>{const a=await handleEvaluationOperation({'action':'demand_match','demand_cap':demandCap,'services':[service]}),b=resultOf(a)['matches'][0x0];expect(b['order'])['toBeDefined'](),expect(b['order']['operation'])['toBe']('service.order_new'),expect(b['order']['operation_type'])['toBe']('service'),expect(b['order']['preconditions']['some'](c=>c['includes']('acceptance_score')))['toBe'](!![]),expect(b['order']['rationale'])['toContain']('0xsvc1'),expect(b['next']['operation'])['toBe']('demand.publish'),expect(b['next']['operation_type'])['toBe']('demand'),expect(b['next']['rationale'])['toContain']('service.order_new');});}),describe('evaluation_operation\x20evidence_review\x20list\x20mode\x20(P2-3)',()=>{it('items\x20mode\x20→\x20structured\x20usable/manual/rejected\x20+\x20proof\x20candidates',async()=>{const a=await handleEvaluationOperation({'action':'evidence_review','items':[{'id':'chat.wts','kind':'signature_photo','hash_committed':!![],'digital_check_passed':!![],'proof_ref':'0xproof1'},{'id':'waybill.jpg','kind':'delivery_proof','hash_committed':!![]},{'id':'voice.mp3','kind':'voice_recording','hash_committed':![]}]}),b=resultOf(a);expect(b['action'])['toBe']('evidence_review'),expect(b['list']['items'])['toHaveLength'](0x3),expect(b['list']['usable'])['toHaveLength'](0x1),expect(b['list']['manual'])['toHaveLength'](0x1),expect(b['list']['rejected'])['toHaveLength'](0x1),expect(b['list']['proof_candidates'])['toHaveLength'](0x1),expect(b['list']['proof_candidates'][0x0]['proof_ref'])['toBe']('0xproof1'),expect(b['list']['dispute_hint'])['toContain']('1\x20Proof\x20reference\x20candidate(s)\x20ready');}),it('single-item\x20mode\x20still\x20works\x20(backwards\x20compatible)',async()=>{const a=await handleEvaluationOperation({'action':'evidence_review','kind':'signature_photo','hash_committed':!![],'digital_check_passed':!![]});expect(resultOf(a)['review']['status'])['toBe']('auto_pass');}),it('schema\x20refinement:\x20neither\x20items\x20nor\x20kind+hash_committed\x20→\x20error',async()=>{await expect(handleEvaluationOperation({'action':'evidence_review'}))['rejects']['toThrow']();});});
1
+ import{describe,expect,it}from'vitest';import{handleEvaluationOperation}from'./evaluation.js';function resultOf(a){return a['structuredContent']['result'];}const demandCap={'id':'0xdemand1','kind':'demand','industry':'freelance','region':{'mode':'physical','city':'Shanghai','raw':'Shanghai'},'keywords':['design'],'capabilities':{'has_arbitration':![],'has_refund_path':![],'has_milestone_nodes':![],'has_compensation_fund':![],'has_wip_verification':![],'has_messenger':![],'has_buy_guard':![],'has_dynamic_pricing':![],'is_published':!![],'is_paused':![]}},service={'object':'0xsvc1','description':'freelance\x20logo\x20design','location':'Shanghai','sales':[{'price':'100','wip_hash':'abc'}],'bPublished':!![],'bPaused':![]};describe('evaluation_operation\x20demand_match\x20presenter_history\x20(P2-2)',()=>{it('acceptance\x20rule\x20scores\x20the\x20rated\x20history\x20in\x20the\x20breakdown',async()=>{const a=await handleEvaluationOperation({'action':'demand_match','demand_cap':demandCap,'services':[service],'presenter_history':[{'acceptance_score':0x50},{'acceptance_score':0x5a}]}),c=resultOf(a);expect(c['action'])['toBe']('demand_match');const d=c['matches'][0x0]['result']['breakdown']['find'](e=>e['rule_id']==='acceptance');expect(d)['toBeDefined'](),expect(d['score'])['toBe'](0x55);}),it('omitted\x20history\x20→\x20acceptance\x20stays\x20neutral',async()=>{const a=await handleEvaluationOperation({'action':'demand_match','demand_cap':demandCap,'services':[service]}),c=resultOf(a)['matches'][0x0]['result']['breakdown']['find'](d=>d['rule_id']==='acceptance');expect(c)['toBeDefined'](),expect(c['score'])['toBe'](0x32),expect(c['reason'])['toContain']('neutral');}),it('schema\x20rejects\x20a\x20malformed\x20presenter_history\x20entry',async()=>{await expect(handleEvaluationOperation({'action':'demand_match','demand_cap':demandCap,'services':[service],'presenter_history':[{'acceptance_score':0x50,'bogus':!![]}]}))['rejects']['toThrow']();});}),describe('evaluation_operation\x20demand_match\x20order\x20bridge\x20(N-2\x20/\x2008\x20§7)',()=>{it('each\x20match\x20carries\x20the\x20service.order_new\x20transaction-formation\x20bridge',async()=>{const a=await handleEvaluationOperation({'action':'demand_match','demand_cap':demandCap,'services':[service]}),b=resultOf(a)['matches'][0x0];expect(b['order'])['toBeDefined'](),expect(b['order']['operation'])['toBe']('service.order_new'),expect(b['order']['operation_type'])['toBe']('service'),expect(b['order']['preconditions']['some'](c=>c['includes']('acceptance_score')))['toBe'](!![]),expect(b['order']['rationale'])['toContain']('0xsvc1'),expect(b['next']['operation'])['toBe']('demand.publish'),expect(b['next']['operation_type'])['toBe']('demand'),expect(b['next']['rationale'])['toContain']('service.order_new');});}),describe('evaluation_operation\x20evidence_review\x20list\x20mode\x20(P2-3)',()=>{it('items\x20mode\x20→\x20structured\x20usable/manual/rejected\x20+\x20proof\x20candidates',async()=>{const a=await handleEvaluationOperation({'action':'evidence_review','items':[{'id':'chat.wts','kind':'signature_photo','hash_committed':!![],'digital_check_passed':!![],'proof_ref':'0xproof1'},{'id':'waybill.jpg','kind':'delivery_proof','hash_committed':!![]},{'id':'voice.mp3','kind':'voice_recording','hash_committed':![]}]}),b=resultOf(a);expect(b['action'])['toBe']('evidence_review'),expect(b['list']['items'])['toHaveLength'](0x3),expect(b['list']['usable'])['toHaveLength'](0x1),expect(b['list']['manual'])['toHaveLength'](0x1),expect(b['list']['rejected'])['toHaveLength'](0x1),expect(b['list']['proof_candidates'])['toHaveLength'](0x1),expect(b['list']['proof_candidates'][0x0]['proof_ref'])['toBe']('0xproof1'),expect(b['list']['dispute_hint'])['toContain']('1\x20Proof\x20reference\x20candidate(s)\x20ready');}),it('single-item\x20mode\x20still\x20works\x20(backwards\x20compatible)',async()=>{const a=await handleEvaluationOperation({'action':'evidence_review','kind':'signature_photo','hash_committed':!![],'digital_check_passed':!![]});expect(resultOf(a)['review']['status'])['toBe']('auto_pass');}),it('schema\x20refinement:\x20neither\x20items\x20nor\x20kind+hash_committed\x20→\x20error',async()=>{await expect(handleEvaluationOperation({'action':'evidence_review'}))['rejects']['toThrow']();});});