@wowok/agent-mcp 2.3.13 → 2.3.16
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.
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +1 -0
- package/dist/config/runtime.d.ts +26 -0
- package/dist/config/runtime.js +217 -0
- package/dist/customer/industry-risks.d.ts +36 -0
- package/dist/customer/industry-risks.js +424 -0
- package/dist/customer/info-puzzle.d.ts +102 -0
- package/dist/customer/info-puzzle.js +312 -0
- package/dist/customer/order-monitor.d.ts +75 -0
- package/dist/customer/order-monitor.js +327 -0
- package/dist/customer/order-strategy.d.ts +36 -0
- package/dist/customer/order-strategy.js +373 -0
- package/dist/customer/post-purchase.d.ts +42 -0
- package/dist/customer/post-purchase.js +350 -0
- package/dist/customer/reminder-system.d.ts +42 -0
- package/dist/customer/reminder-system.js +295 -0
- package/dist/customer/risk-assessment.d.ts +8 -0
- package/dist/customer/risk-assessment.js +337 -0
- package/dist/customer/types.d.ts +193 -0
- package/dist/customer/types.js +13 -0
- package/dist/customer/user-preferences.d.ts +67 -0
- package/dist/customer/user-preferences.js +451 -0
- package/dist/experience/experience-reuse.d.ts +10 -0
- package/dist/experience/experience-reuse.js +103 -0
- package/dist/experience/index.d.ts +6 -0
- package/dist/experience/index.js +5 -0
- package/dist/experience/intent-distill.d.ts +3 -0
- package/dist/experience/intent-distill.js +83 -0
- package/dist/experience/realtime-feedback.d.ts +5 -0
- package/dist/experience/realtime-feedback.js +77 -0
- package/dist/experience/types.d.ts +50 -0
- package/dist/experience/types.js +1 -0
- package/dist/experience/user-profile.d.ts +25 -0
- package/dist/experience/user-profile.js +171 -0
- package/dist/harness/checkpoint.d.ts +8 -0
- package/dist/harness/checkpoint.js +129 -0
- package/dist/harness/index.d.ts +33 -0
- package/dist/harness/index.js +75 -0
- package/dist/harness/plan.d.ts +18 -0
- package/dist/harness/plan.js +252 -0
- package/dist/harness/recover.d.ts +17 -0
- package/dist/harness/recover.js +139 -0
- package/dist/harness/types.d.ts +137 -0
- package/dist/harness/types.js +1 -0
- package/dist/harness/verify.d.ts +42 -0
- package/dist/harness/verify.js +237 -0
- package/dist/index.js +667 -201
- package/dist/knowledge/acquisition-flywheel.d.ts +50 -0
- package/dist/knowledge/acquisition-flywheel.js +183 -0
- package/dist/knowledge/arbitration-trust.d.ts +24 -0
- package/dist/knowledge/arbitration-trust.js +117 -0
- package/dist/knowledge/audit-rules.d.ts +28 -0
- package/dist/knowledge/audit-rules.js +141 -0
- package/dist/knowledge/demand-matching.d.ts +29 -0
- package/dist/knowledge/demand-matching.js +132 -0
- package/dist/knowledge/dynamic-pricing.d.ts +31 -0
- package/dist/knowledge/dynamic-pricing.js +87 -0
- package/dist/knowledge/flywheel-loop.d.ts +87 -0
- package/dist/knowledge/flywheel-loop.js +378 -0
- package/dist/knowledge/glossary.d.ts +18 -0
- package/dist/knowledge/glossary.js +209 -0
- package/dist/knowledge/index.d.ts +64 -0
- package/dist/knowledge/index.js +66 -0
- package/dist/knowledge/industry-evolution.d.ts +82 -0
- package/dist/knowledge/industry-evolution.js +323 -0
- package/dist/knowledge/industry-generalizer.d.ts +17 -0
- package/dist/knowledge/industry-generalizer.js +381 -0
- package/dist/knowledge/industry-registry.d.ts +49 -0
- package/dist/knowledge/industry-registry.js +167 -0
- package/dist/knowledge/intent-metrics.d.ts +42 -0
- package/dist/knowledge/intent-metrics.js +566 -0
- package/dist/knowledge/process-model.d.ts +24 -0
- package/dist/knowledge/process-model.js +160 -0
- package/dist/knowledge/reputation-rules.d.ts +42 -0
- package/dist/knowledge/reputation-rules.js +99 -0
- package/dist/knowledge/reward-templates.d.ts +25 -0
- package/dist/knowledge/reward-templates.js +125 -0
- package/dist/knowledge/safety-rules.d.ts +36 -0
- package/dist/knowledge/safety-rules.js +171 -0
- package/dist/knowledge/tool-constraints.d.ts +30 -0
- package/dist/knowledge/tool-constraints.js +185 -0
- package/dist/knowledge/trust-metrics.d.ts +37 -0
- package/dist/knowledge/trust-metrics.js +138 -0
- package/dist/loop-engineering/aggregate.d.ts +50 -0
- package/dist/loop-engineering/aggregate.js +132 -0
- package/dist/loop-engineering/diagnose.d.ts +22 -0
- package/dist/loop-engineering/diagnose.js +273 -0
- package/dist/loop-engineering/improve.d.ts +26 -0
- package/dist/loop-engineering/improve.js +229 -0
- package/dist/loop-engineering/index.d.ts +4 -0
- package/dist/loop-engineering/index.js +4 -0
- package/dist/loop-engineering/pipeline.d.ts +17 -0
- package/dist/loop-engineering/pipeline.js +56 -0
- package/dist/mode-market/index.d.ts +3 -0
- package/dist/mode-market/index.js +3 -0
- package/dist/mode-market/registry.d.ts +53 -0
- package/dist/mode-market/registry.js +124 -0
- package/dist/mode-market/review.d.ts +27 -0
- package/dist/mode-market/review.js +214 -0
- package/dist/mode-market/submission.d.ts +25 -0
- package/dist/mode-market/submission.js +85 -0
- package/dist/project/graph.d.ts +71 -0
- package/dist/project/graph.js +314 -0
- package/dist/project/index.d.ts +62 -0
- package/dist/project/index.js +167 -0
- package/dist/project/namespace.d.ts +62 -0
- package/dist/project/namespace.js +181 -0
- package/dist/project/query.d.ts +40 -0
- package/dist/project/query.js +110 -0
- package/dist/safety/confirm-gate.d.ts +15 -0
- package/dist/safety/confirm-gate.js +44 -0
- package/dist/safety/index.d.ts +3 -0
- package/dist/safety/index.js +3 -0
- package/dist/safety/preview.d.ts +2 -0
- package/dist/safety/preview.js +36 -0
- package/dist/schema/call/allocation.d.ts +55 -40
- package/dist/schema/call/arbitration.d.ts +201 -186
- package/dist/schema/call/base.d.ts +2104 -24
- package/dist/schema/call/base.js +168 -22
- package/dist/schema/call/bridge-handler.js +36 -18
- package/dist/schema/call/bridge.d.ts +777 -120
- package/dist/schema/call/bridge.js +13 -2
- package/dist/schema/call/contact.d.ts +15 -0
- package/dist/schema/call/demand.d.ts +69 -54
- package/dist/schema/call/guard.d.ts +125 -80
- package/dist/schema/call/handler.d.ts +5 -1
- package/dist/schema/call/handler.js +108 -3
- package/dist/schema/call/index.d.ts +1 -0
- package/dist/schema/call/index.js +1 -0
- package/dist/schema/call/machine.d.ts +830 -800
- package/dist/schema/call/order.d.ts +27 -12
- package/dist/schema/call/payment.d.ts +15 -0
- package/dist/schema/call/permission.d.ts +15 -0
- package/dist/schema/call/personal.d.ts +15 -0
- package/dist/schema/call/progress.d.ts +21 -6
- package/dist/schema/call/proof.d.ts +42 -12
- package/dist/schema/call/proof.js +3 -3
- package/dist/schema/call/repository.d.ts +91 -76
- package/dist/schema/call/reward.d.ts +51 -36
- package/dist/schema/call/semantic.d.ts +24 -0
- package/dist/schema/call/semantic.js +981 -0
- package/dist/schema/call/service.d.ts +444 -429
- package/dist/schema/call/treasury.d.ts +219 -204
- package/dist/schema/common/index.js +3 -3
- package/dist/schema/local/index.d.ts +341 -74
- package/dist/schema/local/index.js +44 -7
- package/dist/schema/messenger/index.d.ts +1034 -92
- package/dist/schema/messenger/index.js +18 -0
- package/dist/schema/operations.d.ts +2634 -1817
- package/dist/schema/operations.js +16 -5
- package/dist/schema/query/index.d.ts +2293 -2289
- package/dist/schema/query/index.js +34 -28
- package/dist/schemas/account_operation.output.json +28 -16
- package/dist/schemas/account_operation.schema.json +2 -2
- package/dist/schemas/bridge_operation.output.json +520 -0
- package/dist/schemas/bridge_operation.schema.json +15 -0
- package/dist/schemas/guard2file.schema.json +15 -0
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/local_info_operation.output.json +26 -0
- package/dist/schemas/local_info_operation.schema.json +1 -1
- package/dist/schemas/local_mark_operation.output.json +27 -1
- package/dist/schemas/local_mark_operation.schema.json +4 -4
- package/dist/schemas/machineNode2file.schema.json +15 -0
- package/dist/schemas/messenger_operation.output.json +549 -0
- package/dist/schemas/messenger_operation.schema.json +21 -0
- package/dist/schemas/onchain_events.output.json +3 -0
- package/dist/schemas/onchain_operations.output.json +814 -37
- package/dist/schemas/onchain_operations.schema.json +117 -40
- package/dist/schemas/onchain_operations_allocation.schema.json +26 -9
- package/dist/schemas/onchain_operations_arbitration.schema.json +26 -9
- package/dist/schemas/onchain_operations_contact.schema.json +26 -9
- package/dist/schemas/onchain_operations_demand.schema.json +26 -9
- package/dist/schemas/onchain_operations_gen_passport.schema.json +51 -17
- package/dist/schemas/onchain_operations_guard.schema.json +26 -9
- package/dist/schemas/onchain_operations_machine.schema.json +92 -32
- package/dist/schemas/onchain_operations_order.schema.json +26 -9
- package/dist/schemas/onchain_operations_payment.schema.json +26 -9
- package/dist/schemas/onchain_operations_permission.schema.json +26 -9
- package/dist/schemas/onchain_operations_personal.schema.json +26 -9
- package/dist/schemas/onchain_operations_progress.schema.json +26 -9
- package/dist/schemas/onchain_operations_repository.schema.json +26 -9
- package/dist/schemas/onchain_operations_reward.schema.json +26 -9
- package/dist/schemas/onchain_operations_service.schema.json +26 -9
- package/dist/schemas/onchain_operations_treasury.schema.json +26 -9
- package/dist/schemas/onchain_table_data.output.json +224 -69
- package/dist/schemas/onchain_table_data.schema.json +2 -2
- package/dist/schemas/query_toolkit.schema.json +5 -1
- package/dist/telemetry/index.d.ts +19 -0
- package/dist/telemetry/index.js +112 -0
- package/dist/telemetry/redact.d.ts +2 -0
- package/dist/telemetry/redact.js +23 -0
- package/dist/telemetry/storage.d.ts +8 -0
- package/dist/telemetry/storage.js +80 -0
- package/package.json +6 -3
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"type": {
|
|
17
17
|
"type": "string",
|
|
18
18
|
"const": "submission",
|
|
19
|
-
"description": "
|
|
19
|
+
"description": "Discriminator for this result variant. Constraint: always 'submission'. Example: 'submission'"
|
|
20
20
|
},
|
|
21
21
|
"guard": {
|
|
22
22
|
"type": "array",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"properties": {
|
|
26
26
|
"object": {
|
|
27
27
|
"type": "string",
|
|
28
|
-
"description": "Guard object name or ID."
|
|
28
|
+
"description": "Guard object name or ID to verify against. Example: 'my-delivery-guard' or '0x123...'"
|
|
29
29
|
},
|
|
30
30
|
"impack": {
|
|
31
31
|
"type": "boolean",
|
|
32
|
-
"description": "Whether
|
|
32
|
+
"description": "Whether this Guard's verification result participates in the final logic. Constraint: if false, the Guard is checked but does not block the operation. Example: true"
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"required": [
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
"impack"
|
|
38
38
|
],
|
|
39
39
|
"additionalProperties": false
|
|
40
|
-
}
|
|
40
|
+
},
|
|
41
|
+
"description": "Array of Guard objects to verify. Relation: each entry corresponds to a Guard bound to the operation."
|
|
41
42
|
},
|
|
42
43
|
"submission": {
|
|
43
44
|
"type": "array",
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
"properties": {
|
|
47
48
|
"guard": {
|
|
48
49
|
"$ref": "#/definitions/onchain_operations/properties/result/anyOf/0/properties/guard/items/properties/object",
|
|
49
|
-
"description": "Guard object name or ID."
|
|
50
|
+
"description": "Guard object name or ID that requires submission data. Example: 'my-delivery-guard'"
|
|
50
51
|
},
|
|
51
52
|
"submission": {
|
|
52
53
|
"type": "array",
|
|
@@ -498,7 +499,7 @@
|
|
|
498
499
|
"additionalProperties": false,
|
|
499
500
|
"description": "Guard table item"
|
|
500
501
|
},
|
|
501
|
-
"description": "User-submitted data required
|
|
502
|
+
"description": "User-submitted data matching the Guard's required fields. Relation: structure must match the Guard table's column definitions. Example: [{field:'delivery_proof', value:'Qm...'}]"
|
|
502
503
|
}
|
|
503
504
|
},
|
|
504
505
|
"required": [
|
|
@@ -506,8 +507,9 @@
|
|
|
506
507
|
"submission"
|
|
507
508
|
],
|
|
508
509
|
"additionalProperties": false,
|
|
509
|
-
"description": "
|
|
510
|
-
}
|
|
510
|
+
"description": "One Guard's submission data: the Guard to verify plus the user-provided data that satisfies its requirements."
|
|
511
|
+
},
|
|
512
|
+
"description": "User-submitted data for each Guard. Relation: one entry per Guard in the guard array; fill submission fields and resubmit via call_with_submission."
|
|
511
513
|
}
|
|
512
514
|
},
|
|
513
515
|
"required": [
|
|
@@ -516,7 +518,7 @@
|
|
|
516
518
|
"submission"
|
|
517
519
|
],
|
|
518
520
|
"additionalProperties": false,
|
|
519
|
-
"description": "Guard verification
|
|
521
|
+
"description": "Guard verification required. The operation was blocked because one or more Guards require user-submitted data. Fill the submission array and resubmit. Semantic status is 'pending_input'."
|
|
520
522
|
},
|
|
521
523
|
{
|
|
522
524
|
"type": "object",
|
|
@@ -1018,14 +1020,7 @@
|
|
|
1018
1020
|
},
|
|
1019
1021
|
"parsedJson": {
|
|
1020
1022
|
"type": "object",
|
|
1021
|
-
"additionalProperties": {
|
|
1022
|
-
"type": [
|
|
1023
|
-
"string",
|
|
1024
|
-
"number",
|
|
1025
|
-
"boolean",
|
|
1026
|
-
"null"
|
|
1027
|
-
]
|
|
1028
|
-
},
|
|
1023
|
+
"additionalProperties": {},
|
|
1029
1024
|
"description": "Parsed JSON value of the event"
|
|
1030
1025
|
},
|
|
1031
1026
|
"sender": {
|
|
@@ -1095,14 +1090,7 @@
|
|
|
1095
1090
|
},
|
|
1096
1091
|
"parsedJson": {
|
|
1097
1092
|
"type": "object",
|
|
1098
|
-
"additionalProperties": {
|
|
1099
|
-
"type": [
|
|
1100
|
-
"string",
|
|
1101
|
-
"number",
|
|
1102
|
-
"boolean",
|
|
1103
|
-
"null"
|
|
1104
|
-
]
|
|
1105
|
-
},
|
|
1093
|
+
"additionalProperties": {},
|
|
1106
1094
|
"description": "Parsed JSON value of the event"
|
|
1107
1095
|
},
|
|
1108
1096
|
"sender": {
|
|
@@ -1590,7 +1578,8 @@
|
|
|
1590
1578
|
},
|
|
1591
1579
|
"type": {
|
|
1592
1580
|
"type": "string",
|
|
1593
|
-
"const": "transaction"
|
|
1581
|
+
"const": "transaction",
|
|
1582
|
+
"description": "Discriminator for this result variant. Constraint: always 'transaction'. Example: 'transaction'"
|
|
1594
1583
|
}
|
|
1595
1584
|
},
|
|
1596
1585
|
"required": [
|
|
@@ -1606,10 +1595,38 @@
|
|
|
1606
1595
|
"type": {
|
|
1607
1596
|
"type": "string",
|
|
1608
1597
|
"const": "error",
|
|
1609
|
-
"description": "
|
|
1598
|
+
"description": "Discriminator for this result variant. Constraint: always 'error'. Example: 'error'"
|
|
1610
1599
|
},
|
|
1611
1600
|
"error": {
|
|
1612
|
-
"type": "string"
|
|
1601
|
+
"type": "string",
|
|
1602
|
+
"description": "Human-readable error message from the chain or SDK. Relation: enriched via enrichMoveError before classification. Example: 'Insufficient balance for gas'"
|
|
1603
|
+
},
|
|
1604
|
+
"error_code": {
|
|
1605
|
+
"type": "string",
|
|
1606
|
+
"enum": [
|
|
1607
|
+
"invalid_parameter",
|
|
1608
|
+
"guard_rejected",
|
|
1609
|
+
"state_conflict",
|
|
1610
|
+
"insufficient_balance",
|
|
1611
|
+
"object_not_found",
|
|
1612
|
+
"permission_denied",
|
|
1613
|
+
"immutable_violation",
|
|
1614
|
+
"network_error",
|
|
1615
|
+
"unknown"
|
|
1616
|
+
],
|
|
1617
|
+
"description": "Error classification for programmatic recovery. Constraint: enum of 9 values. Relation: drives Recover Loop strategy selection. Example: 'insufficient_balance'"
|
|
1618
|
+
},
|
|
1619
|
+
"retryable": {
|
|
1620
|
+
"type": "boolean",
|
|
1621
|
+
"description": "Whether the same call can be retried as-is. Constraint: true only for network_error and insufficient_balance. Example: true"
|
|
1622
|
+
},
|
|
1623
|
+
"recovery_hint": {
|
|
1624
|
+
"type": "string",
|
|
1625
|
+
"description": "Recovery suggestion for AI or user. Relation: paired with error_code to guide Recover Loop. Example: 'Claim faucet tokens then retry'"
|
|
1626
|
+
},
|
|
1627
|
+
"related_object": {
|
|
1628
|
+
"type": "string",
|
|
1629
|
+
"description": "Object ID related to the error, if any. Example: '0x123...'"
|
|
1613
1630
|
}
|
|
1614
1631
|
},
|
|
1615
1632
|
"required": [
|
|
@@ -1617,14 +1634,15 @@
|
|
|
1617
1634
|
"error"
|
|
1618
1635
|
],
|
|
1619
1636
|
"additionalProperties": false,
|
|
1620
|
-
"description": "
|
|
1637
|
+
"description": "Error result. Contains the raw error message plus structured classification (error_code/retryable/recovery_hint) so AI can choose a recovery strategy without parsing the error string."
|
|
1621
1638
|
},
|
|
1622
1639
|
{
|
|
1623
1640
|
"type": "object",
|
|
1624
1641
|
"properties": {
|
|
1625
1642
|
"type": {
|
|
1626
1643
|
"type": "string",
|
|
1627
|
-
"const": "data"
|
|
1644
|
+
"const": "data",
|
|
1645
|
+
"description": "Discriminator for this result variant. Constraint: always 'data'. Example: 'data'"
|
|
1628
1646
|
},
|
|
1629
1647
|
"data": {
|
|
1630
1648
|
"type": "array",
|
|
@@ -1717,7 +1735,8 @@
|
|
|
1717
1735
|
{
|
|
1718
1736
|
"type": "string"
|
|
1719
1737
|
}
|
|
1720
|
-
]
|
|
1738
|
+
],
|
|
1739
|
+
"description": "What happened to this object in the operation. Constraint: 'created' | 'mutated' | custom string. Example: 'created'"
|
|
1721
1740
|
}
|
|
1722
1741
|
},
|
|
1723
1742
|
"required": [
|
|
@@ -1725,8 +1744,9 @@
|
|
|
1725
1744
|
"change"
|
|
1726
1745
|
],
|
|
1727
1746
|
"additionalProperties": true,
|
|
1728
|
-
"description": "
|
|
1729
|
-
}
|
|
1747
|
+
"description": "One object record in a query result. Contains the object's basic info plus how it changed in this operation."
|
|
1748
|
+
},
|
|
1749
|
+
"description": "Array of object records returned by a query operation. Example: [{id:'0x...', change:'created'}]"
|
|
1730
1750
|
}
|
|
1731
1751
|
},
|
|
1732
1752
|
"required": [
|
|
@@ -1740,27 +1760,784 @@
|
|
|
1740
1760
|
"properties": {
|
|
1741
1761
|
"type": {
|
|
1742
1762
|
"type": "string",
|
|
1743
|
-
"const": "null"
|
|
1763
|
+
"const": "null",
|
|
1764
|
+
"description": "Discriminator for this result variant. Constraint: always 'null'. Example: 'null'"
|
|
1744
1765
|
}
|
|
1745
1766
|
},
|
|
1746
1767
|
"required": [
|
|
1747
1768
|
"type"
|
|
1748
1769
|
],
|
|
1749
1770
|
"additionalProperties": false
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
"type": "object",
|
|
1774
|
+
"properties": {
|
|
1775
|
+
"type": {
|
|
1776
|
+
"type": "string",
|
|
1777
|
+
"const": "pending_confirmation",
|
|
1778
|
+
"description": "Discriminator. The operation was NOT executed; it is blocked pending user confirmation. Re-call with env.confirmed=true to proceed, or modify/cancel."
|
|
1779
|
+
},
|
|
1780
|
+
"preview": {
|
|
1781
|
+
"type": "object",
|
|
1782
|
+
"properties": {
|
|
1783
|
+
"level": {
|
|
1784
|
+
"type": "string",
|
|
1785
|
+
"enum": [
|
|
1786
|
+
"none",
|
|
1787
|
+
"standard",
|
|
1788
|
+
"amount",
|
|
1789
|
+
"publish",
|
|
1790
|
+
"irreversible"
|
|
1791
|
+
],
|
|
1792
|
+
"description": "Confirmation level. 'irreversible' = cannot be undone (arb verdict, payment). 'publish' = locks immutable fields. 'amount' = amount-sensitive. 'standard' = default-value warnings."
|
|
1793
|
+
},
|
|
1794
|
+
"operation": {
|
|
1795
|
+
"type": "string",
|
|
1796
|
+
"description": "operation_type that triggered the gate. Example: 'payment'"
|
|
1797
|
+
},
|
|
1798
|
+
"object": {
|
|
1799
|
+
"anyOf": [
|
|
1800
|
+
{
|
|
1801
|
+
"type": "string"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"type": "object",
|
|
1805
|
+
"additionalProperties": {}
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
"type": "null"
|
|
1809
|
+
}
|
|
1810
|
+
],
|
|
1811
|
+
"description": "Object name/id involved (string for existing, object for new creation). Example: 'myshop_service' or {name: 'myshop_service'}"
|
|
1812
|
+
},
|
|
1813
|
+
"network": {
|
|
1814
|
+
"type": "string",
|
|
1815
|
+
"description": "Network in use. Example: 'mainnet'"
|
|
1816
|
+
},
|
|
1817
|
+
"account": {
|
|
1818
|
+
"type": "string",
|
|
1819
|
+
"description": "Signing account ('' = default). Example: '' or '0xabc...'"
|
|
1820
|
+
},
|
|
1821
|
+
"amount": {
|
|
1822
|
+
"type": "object",
|
|
1823
|
+
"properties": {
|
|
1824
|
+
"value": {
|
|
1825
|
+
"type": "string",
|
|
1826
|
+
"description": "Smallest-unit value as string. Example: '2500000000'"
|
|
1827
|
+
},
|
|
1828
|
+
"token": {
|
|
1829
|
+
"type": "string",
|
|
1830
|
+
"description": "Coin type tag. Example: '0x2::wow::WOW'"
|
|
1831
|
+
},
|
|
1832
|
+
"human_readable": {
|
|
1833
|
+
"type": "string",
|
|
1834
|
+
"description": "Human-readable amount. Example: '2.5 WOW'"
|
|
1835
|
+
},
|
|
1836
|
+
"recipient": {
|
|
1837
|
+
"type": "string",
|
|
1838
|
+
"description": "Recipient address if known. Example: '0xdef...'"
|
|
1839
|
+
}
|
|
1840
|
+
},
|
|
1841
|
+
"required": [
|
|
1842
|
+
"value",
|
|
1843
|
+
"token",
|
|
1844
|
+
"human_readable"
|
|
1845
|
+
],
|
|
1846
|
+
"additionalProperties": false,
|
|
1847
|
+
"description": "Amount info for amount-level confirmations."
|
|
1848
|
+
},
|
|
1849
|
+
"immutable_after": {
|
|
1850
|
+
"type": "array",
|
|
1851
|
+
"items": {
|
|
1852
|
+
"type": "string"
|
|
1853
|
+
},
|
|
1854
|
+
"description": "Fields that become immutable after this op (for publish). Example: ['machine','order_allocators']"
|
|
1855
|
+
},
|
|
1856
|
+
"warnings": {
|
|
1857
|
+
"type": "array",
|
|
1858
|
+
"items": {
|
|
1859
|
+
"type": "string"
|
|
1860
|
+
},
|
|
1861
|
+
"description": "Default-value warnings. Example: ['Using default account (env.account=\"\")']"
|
|
1862
|
+
},
|
|
1863
|
+
"irreversible": {
|
|
1864
|
+
"type": "boolean",
|
|
1865
|
+
"description": "True when the operation cannot be reverted. Example: true"
|
|
1866
|
+
}
|
|
1867
|
+
},
|
|
1868
|
+
"required": [
|
|
1869
|
+
"level",
|
|
1870
|
+
"operation"
|
|
1871
|
+
],
|
|
1872
|
+
"additionalProperties": false,
|
|
1873
|
+
"description": "Preview of the operation awaiting confirmation."
|
|
1874
|
+
},
|
|
1875
|
+
"rule_id": {
|
|
1876
|
+
"type": "string",
|
|
1877
|
+
"description": "Id of the confirmation rule that matched. Example: 'publish_immutable'"
|
|
1878
|
+
}
|
|
1879
|
+
},
|
|
1880
|
+
"required": [
|
|
1881
|
+
"type",
|
|
1882
|
+
"preview"
|
|
1883
|
+
],
|
|
1884
|
+
"additionalProperties": false,
|
|
1885
|
+
"description": "Pending confirmation. The ConfirmGate blocked the operation. Read preview first; if user consents, re-invoke the SAME call with env.confirmed=true."
|
|
1750
1886
|
}
|
|
1751
1887
|
],
|
|
1752
|
-
"description": "
|
|
1888
|
+
"description": "Discriminated result. Check result.type first: 'transaction'|'submission'|'error'|'data'|'null'. Each variant has different fields."
|
|
1753
1889
|
},
|
|
1754
1890
|
"message": {
|
|
1755
1891
|
"type": "string",
|
|
1756
|
-
"description": "
|
|
1892
|
+
"description": "Human-readable summary or hint. Constraint: always present for error/transaction results; may be omitted for data/null. Example: 'Transaction completed successfully'"
|
|
1893
|
+
},
|
|
1894
|
+
"semantic": {
|
|
1895
|
+
"type": "object",
|
|
1896
|
+
"properties": {
|
|
1897
|
+
"intent": {
|
|
1898
|
+
"type": "string",
|
|
1899
|
+
"description": "Inferred user intent / operation goal. Constraint: snake_case string. Relation: derived from operation_type + data signals. Example: 'publish_service'"
|
|
1900
|
+
},
|
|
1901
|
+
"status": {
|
|
1902
|
+
"type": "string",
|
|
1903
|
+
"enum": [
|
|
1904
|
+
"success",
|
|
1905
|
+
"partial",
|
|
1906
|
+
"failed",
|
|
1907
|
+
"pending_input"
|
|
1908
|
+
],
|
|
1909
|
+
"description": "Business-level status (not raw tx status). 'pending_input' = needs Guard submission. Example: 'success'"
|
|
1910
|
+
},
|
|
1911
|
+
"summary": {
|
|
1912
|
+
"type": "string",
|
|
1913
|
+
"description": "One-sentence human-readable summary of what happened. AI should read this first. Example: 'Successfully published Service my-shop with Machine bound'"
|
|
1914
|
+
},
|
|
1915
|
+
"created": {
|
|
1916
|
+
"type": "array",
|
|
1917
|
+
"items": {
|
|
1918
|
+
"type": "object",
|
|
1919
|
+
"properties": {
|
|
1920
|
+
"id": {
|
|
1921
|
+
"type": "string",
|
|
1922
|
+
"description": "Object ID (64-hex with 0x prefix). Identifies the on-chain object. Example: '0xa1d4...'"
|
|
1923
|
+
},
|
|
1924
|
+
"name": {
|
|
1925
|
+
"type": [
|
|
1926
|
+
"string",
|
|
1927
|
+
"null"
|
|
1928
|
+
],
|
|
1929
|
+
"description": "Local mark name if assigned, else null. Relation: resolved via local_mark_operation. Example: 'my-shop' or null"
|
|
1930
|
+
},
|
|
1931
|
+
"role": {
|
|
1932
|
+
"type": "string",
|
|
1933
|
+
"enum": [
|
|
1934
|
+
"Permission",
|
|
1935
|
+
"Guard",
|
|
1936
|
+
"Machine",
|
|
1937
|
+
"Progress",
|
|
1938
|
+
"Service",
|
|
1939
|
+
"Order",
|
|
1940
|
+
"Allocation",
|
|
1941
|
+
"Arbitration",
|
|
1942
|
+
"ArbCase",
|
|
1943
|
+
"Messenger",
|
|
1944
|
+
"Contact",
|
|
1945
|
+
"Demand",
|
|
1946
|
+
"Reward",
|
|
1947
|
+
"Personal",
|
|
1948
|
+
"Repository",
|
|
1949
|
+
"Treasury",
|
|
1950
|
+
"Discount",
|
|
1951
|
+
"Other"
|
|
1952
|
+
],
|
|
1953
|
+
"description": "Business role of the object in the dependency graph. Constraint: enum of 18 values. Relation: derived from objectType last segment; drives Plan/Verify Loop positioning. Example: 'Service'"
|
|
1954
|
+
},
|
|
1955
|
+
"relation": {
|
|
1956
|
+
"type": "object",
|
|
1957
|
+
"properties": {
|
|
1958
|
+
"parent": {
|
|
1959
|
+
"type": [
|
|
1960
|
+
"string",
|
|
1961
|
+
"null"
|
|
1962
|
+
],
|
|
1963
|
+
"description": "Parent object ID, if this object belongs to another (e.g. Machine belongs to Service). Example: '0x123...' or null"
|
|
1964
|
+
},
|
|
1965
|
+
"relation_type": {
|
|
1966
|
+
"type": "string",
|
|
1967
|
+
"enum": [
|
|
1968
|
+
"machine_of",
|
|
1969
|
+
"guard_of",
|
|
1970
|
+
"allocator_of",
|
|
1971
|
+
"permission_of",
|
|
1972
|
+
"progress_of",
|
|
1973
|
+
"allocation_of",
|
|
1974
|
+
"arb_of",
|
|
1975
|
+
"other"
|
|
1976
|
+
],
|
|
1977
|
+
"description": "How this object relates to its parent. Example: 'machine_of'"
|
|
1978
|
+
}
|
|
1979
|
+
},
|
|
1980
|
+
"additionalProperties": false,
|
|
1981
|
+
"description": "Relationship to another object in the dependency graph"
|
|
1982
|
+
},
|
|
1983
|
+
"immutable": {
|
|
1984
|
+
"type": "boolean",
|
|
1985
|
+
"description": "Whether the object has entered an immutable state (e.g. Service published). Constraint: true after publish. Example: true"
|
|
1986
|
+
}
|
|
1987
|
+
},
|
|
1988
|
+
"required": [
|
|
1989
|
+
"id",
|
|
1990
|
+
"role"
|
|
1991
|
+
],
|
|
1992
|
+
"additionalProperties": false,
|
|
1993
|
+
"description": "An object tagged with its business role and relationship within the object dependency graph"
|
|
1994
|
+
},
|
|
1995
|
+
"description": "Objects newly created in this operation, tagged with roles"
|
|
1996
|
+
},
|
|
1997
|
+
"modified": {
|
|
1998
|
+
"type": "array",
|
|
1999
|
+
"items": {
|
|
2000
|
+
"$ref": "#/definitions/onchain_operations/properties/semantic/properties/created/items"
|
|
2001
|
+
},
|
|
2002
|
+
"description": "Objects mutated in this operation, tagged with roles"
|
|
2003
|
+
},
|
|
2004
|
+
"released": {
|
|
2005
|
+
"type": "array",
|
|
2006
|
+
"items": {
|
|
2007
|
+
"type": "object",
|
|
2008
|
+
"properties": {
|
|
2009
|
+
"amount": {
|
|
2010
|
+
"type": "string",
|
|
2011
|
+
"description": "Amount change as stringified integer (smallest unit). Negative=spend, positive=receive. Example: '-10000000000'"
|
|
2012
|
+
},
|
|
2013
|
+
"coinType": {
|
|
2014
|
+
"type": "string",
|
|
2015
|
+
"description": "Coin type tag (format: {address}::{module}::{struct}). Example: '0x2::wow::WOW'"
|
|
2016
|
+
},
|
|
2017
|
+
"role": {
|
|
2018
|
+
"type": "string",
|
|
2019
|
+
"enum": [
|
|
2020
|
+
"payment",
|
|
2021
|
+
"refund",
|
|
2022
|
+
"change",
|
|
2023
|
+
"compensation",
|
|
2024
|
+
"reward",
|
|
2025
|
+
"gas",
|
|
2026
|
+
"deposit",
|
|
2027
|
+
"release",
|
|
2028
|
+
"other"
|
|
2029
|
+
],
|
|
2030
|
+
"description": "Business role of this fund movement. Constraint: enum of 9 values. Relation: derived from operation context. Example: 'payment'"
|
|
2031
|
+
},
|
|
2032
|
+
"from": {
|
|
2033
|
+
"type": [
|
|
2034
|
+
"string",
|
|
2035
|
+
"null"
|
|
2036
|
+
],
|
|
2037
|
+
"description": "Sender address if known. Example: '0xabc...' or null"
|
|
2038
|
+
},
|
|
2039
|
+
"to": {
|
|
2040
|
+
"type": [
|
|
2041
|
+
"string",
|
|
2042
|
+
"null"
|
|
2043
|
+
],
|
|
2044
|
+
"description": "Recipient address if known. Example: '0xdef...' or null"
|
|
2045
|
+
}
|
|
2046
|
+
},
|
|
2047
|
+
"required": [
|
|
2048
|
+
"amount",
|
|
2049
|
+
"coinType",
|
|
2050
|
+
"role"
|
|
2051
|
+
],
|
|
2052
|
+
"additionalProperties": false,
|
|
2053
|
+
"description": "A fund movement tagged with its business role"
|
|
2054
|
+
},
|
|
2055
|
+
"description": "Fund movements in this operation, tagged with roles"
|
|
2056
|
+
},
|
|
2057
|
+
"events": {
|
|
2058
|
+
"type": "array",
|
|
2059
|
+
"items": {
|
|
2060
|
+
"type": "object",
|
|
2061
|
+
"properties": {
|
|
2062
|
+
"event_type": {
|
|
2063
|
+
"type": "string",
|
|
2064
|
+
"description": "Raw on-chain event type tag. Example: '0x2::service::ServicePublishedEvent'"
|
|
2065
|
+
},
|
|
2066
|
+
"business_meaning": {
|
|
2067
|
+
"type": "string",
|
|
2068
|
+
"description": "Human-readable business meaning. Example: 'Service has been published and is now immutable'"
|
|
2069
|
+
},
|
|
2070
|
+
"category": {
|
|
2071
|
+
"type": "string",
|
|
2072
|
+
"enum": [
|
|
2073
|
+
"lifecycle",
|
|
2074
|
+
"state_change",
|
|
2075
|
+
"fund_flow",
|
|
2076
|
+
"permission",
|
|
2077
|
+
"guard",
|
|
2078
|
+
"other"
|
|
2079
|
+
],
|
|
2080
|
+
"description": "Business category. Constraint: enum of 6 values. Example: 'lifecycle'"
|
|
2081
|
+
},
|
|
2082
|
+
"related_object": {
|
|
2083
|
+
"type": "string",
|
|
2084
|
+
"description": "Object ID the event relates to, if extractable. Example: '0x123...'"
|
|
2085
|
+
},
|
|
2086
|
+
"side_effect": {
|
|
2087
|
+
"type": "string",
|
|
2088
|
+
"description": "Side effect description for AI. Example: 'Customers can now place orders against this Service'"
|
|
2089
|
+
}
|
|
2090
|
+
},
|
|
2091
|
+
"required": [
|
|
2092
|
+
"event_type",
|
|
2093
|
+
"business_meaning",
|
|
2094
|
+
"category"
|
|
2095
|
+
],
|
|
2096
|
+
"additionalProperties": false,
|
|
2097
|
+
"description": "An on-chain event annotated with business semantics"
|
|
2098
|
+
},
|
|
2099
|
+
"description": "On-chain events annotated with business semantics (S-8)"
|
|
2100
|
+
},
|
|
2101
|
+
"next_actions": {
|
|
2102
|
+
"type": "array",
|
|
2103
|
+
"items": {
|
|
2104
|
+
"type": "object",
|
|
2105
|
+
"properties": {
|
|
2106
|
+
"action": {
|
|
2107
|
+
"type": "string",
|
|
2108
|
+
"description": "Recommended next action. Example: 'add sales products'"
|
|
2109
|
+
},
|
|
2110
|
+
"reason": {
|
|
2111
|
+
"type": "string",
|
|
2112
|
+
"description": "Why this action is recommended. Example: 'Service has no products; customers cannot order'"
|
|
2113
|
+
},
|
|
2114
|
+
"tool": {
|
|
2115
|
+
"type": "string",
|
|
2116
|
+
"description": "MCP tool to use, if applicable. Example: 'onchain_operations'"
|
|
2117
|
+
},
|
|
2118
|
+
"prerequisite": {
|
|
2119
|
+
"type": "string",
|
|
2120
|
+
"description": "Condition that must hold before this action. Example: 'Service must be created first'"
|
|
2121
|
+
},
|
|
2122
|
+
"priority": {
|
|
2123
|
+
"type": "string",
|
|
2124
|
+
"enum": [
|
|
2125
|
+
"required",
|
|
2126
|
+
"recommended",
|
|
2127
|
+
"optional"
|
|
2128
|
+
],
|
|
2129
|
+
"description": "Priority. Constraint: enum. Example: 'required'"
|
|
2130
|
+
}
|
|
2131
|
+
},
|
|
2132
|
+
"required": [
|
|
2133
|
+
"action",
|
|
2134
|
+
"reason",
|
|
2135
|
+
"priority"
|
|
2136
|
+
],
|
|
2137
|
+
"additionalProperties": false,
|
|
2138
|
+
"description": "A recommended next action with priority and rationale"
|
|
2139
|
+
},
|
|
2140
|
+
"description": "Recommended next actions to drive the workflow forward"
|
|
2141
|
+
},
|
|
2142
|
+
"warnings": {
|
|
2143
|
+
"type": "array",
|
|
2144
|
+
"items": {
|
|
2145
|
+
"type": "string"
|
|
2146
|
+
},
|
|
2147
|
+
"description": "Business-level warnings. Example: 'order_allocators not configured; order funds cannot be distributed'"
|
|
2148
|
+
},
|
|
2149
|
+
"experience": {
|
|
2150
|
+
"type": "object",
|
|
2151
|
+
"properties": {
|
|
2152
|
+
"advice": {
|
|
2153
|
+
"type": "string",
|
|
2154
|
+
"description": "Advice from past experience. Example: 'Last time you forgot to set buy_guard; add it before publishing'"
|
|
2155
|
+
},
|
|
2156
|
+
"avoid": {
|
|
2157
|
+
"type": "array",
|
|
2158
|
+
"items": {
|
|
2159
|
+
"type": "string"
|
|
2160
|
+
},
|
|
2161
|
+
"description": "Pitfalls to avoid based on history. Example: ['Guard rejection on delivery_proof']"
|
|
2162
|
+
},
|
|
2163
|
+
"relevance": {
|
|
2164
|
+
"type": "number",
|
|
2165
|
+
"minimum": 0,
|
|
2166
|
+
"maximum": 1,
|
|
2167
|
+
"description": "Relevance score 0-1 of the matched experience. Example: 0.85"
|
|
2168
|
+
},
|
|
2169
|
+
"matched_scenario": {
|
|
2170
|
+
"type": "string",
|
|
2171
|
+
"description": "Matched historical scenario. Example: 'publish_service_freelance'"
|
|
2172
|
+
}
|
|
2173
|
+
},
|
|
2174
|
+
"additionalProperties": false,
|
|
2175
|
+
"description": "Experience layer feedback from past operations (Phase 2 议题 2)"
|
|
2176
|
+
},
|
|
2177
|
+
"service_status": {
|
|
2178
|
+
"type": "object",
|
|
2179
|
+
"properties": {
|
|
2180
|
+
"active": {
|
|
2181
|
+
"type": "array",
|
|
2182
|
+
"items": {
|
|
2183
|
+
"type": "string"
|
|
2184
|
+
},
|
|
2185
|
+
"description": "Phase 2 services currently active (enabled). Example: ['confirm_gate','project_service','experience_layer']"
|
|
2186
|
+
},
|
|
2187
|
+
"inactive": {
|
|
2188
|
+
"type": "array",
|
|
2189
|
+
"items": {
|
|
2190
|
+
"type": "string"
|
|
2191
|
+
},
|
|
2192
|
+
"description": "Phase 2 services currently inactive (can be toggled via config_operation). Example: ['harness','graph_persist']"
|
|
2193
|
+
}
|
|
2194
|
+
},
|
|
2195
|
+
"required": [
|
|
2196
|
+
"active"
|
|
2197
|
+
],
|
|
2198
|
+
"additionalProperties": false,
|
|
2199
|
+
"description": "Phase 2 runtime service status (populated when semantic_rich is enabled). Lets AI see active services in each response."
|
|
2200
|
+
},
|
|
2201
|
+
"customer_advice": {
|
|
2202
|
+
"type": "object",
|
|
2203
|
+
"properties": {
|
|
2204
|
+
"risk_score": {
|
|
2205
|
+
"type": "number",
|
|
2206
|
+
"minimum": 0,
|
|
2207
|
+
"maximum": 100,
|
|
2208
|
+
"description": "Composite risk score 0-100 (higher = safer). Relation: from risk-assessment.ts 4-dimension scoring. Example: 75"
|
|
2209
|
+
},
|
|
2210
|
+
"risk_level": {
|
|
2211
|
+
"type": "string",
|
|
2212
|
+
"enum": [
|
|
2213
|
+
"low",
|
|
2214
|
+
"medium_low",
|
|
2215
|
+
"medium_high",
|
|
2216
|
+
"high"
|
|
2217
|
+
],
|
|
2218
|
+
"description": "Risk level bucket. 'high' = strongly discourage purchase. Example: 'medium_high'"
|
|
2219
|
+
},
|
|
2220
|
+
"recommendations": {
|
|
2221
|
+
"type": "array",
|
|
2222
|
+
"items": {
|
|
2223
|
+
"type": "string"
|
|
2224
|
+
},
|
|
2225
|
+
"description": "Actionable recommendations for the buyer. Example: ['要求商家配置仲裁','通过 Messenger 协商退款条款']"
|
|
2226
|
+
},
|
|
2227
|
+
"reminders": {
|
|
2228
|
+
"type": "array",
|
|
2229
|
+
"items": {
|
|
2230
|
+
"type": "object",
|
|
2231
|
+
"properties": {
|
|
2232
|
+
"id": {
|
|
2233
|
+
"type": "string",
|
|
2234
|
+
"description": "Reminder rule id. Example: 'high_risk_score'"
|
|
2235
|
+
},
|
|
2236
|
+
"stage": {
|
|
2237
|
+
"type": "string",
|
|
2238
|
+
"enum": [
|
|
2239
|
+
"browse",
|
|
2240
|
+
"evaluate",
|
|
2241
|
+
"preorder",
|
|
2242
|
+
"in_progress",
|
|
2243
|
+
"complete",
|
|
2244
|
+
"after_sale"
|
|
2245
|
+
],
|
|
2246
|
+
"description": "Order lifecycle stage when this reminder fires. Example: 'evaluate'"
|
|
2247
|
+
},
|
|
2248
|
+
"priority": {
|
|
2249
|
+
"type": "string",
|
|
2250
|
+
"enum": [
|
|
2251
|
+
"required",
|
|
2252
|
+
"recommended",
|
|
2253
|
+
"info",
|
|
2254
|
+
"reminder"
|
|
2255
|
+
],
|
|
2256
|
+
"description": "Priority. 'required' = blocks purchase; 'recommended' = strong caution. Example: 'required'"
|
|
2257
|
+
},
|
|
2258
|
+
"message": {
|
|
2259
|
+
"type": "string",
|
|
2260
|
+
"description": "Human-readable reminder message. Example: '🔴 综合风险分 25/100,强烈建议不购买'"
|
|
2261
|
+
},
|
|
2262
|
+
"action": {
|
|
2263
|
+
"type": "string",
|
|
2264
|
+
"description": "Suggested next action. Example: 'require merchant to bind Arbitration before ordering'"
|
|
2265
|
+
}
|
|
2266
|
+
},
|
|
2267
|
+
"required": [
|
|
2268
|
+
"id",
|
|
2269
|
+
"stage",
|
|
2270
|
+
"priority",
|
|
2271
|
+
"message"
|
|
2272
|
+
],
|
|
2273
|
+
"additionalProperties": false,
|
|
2274
|
+
"description": "A buyer-side reminder triggered at a specific order lifecycle stage (Phase 3 C-3)."
|
|
2275
|
+
},
|
|
2276
|
+
"description": "Stage-specific reminders (deduped, sorted by priority, capped to 3 high-risk). Example: [{priority:'required', message:'🔴 模糊 Guard 必须人工审查'}]"
|
|
2277
|
+
},
|
|
2278
|
+
"preference_match": {
|
|
2279
|
+
"type": "object",
|
|
2280
|
+
"properties": {
|
|
2281
|
+
"score": {
|
|
2282
|
+
"type": "number",
|
|
2283
|
+
"minimum": 0,
|
|
2284
|
+
"maximum": 100,
|
|
2285
|
+
"description": "Match score 0-100 (higher = better fit). Example: 75"
|
|
2286
|
+
},
|
|
2287
|
+
"matches": {
|
|
2288
|
+
"type": "array",
|
|
2289
|
+
"items": {
|
|
2290
|
+
"type": "string"
|
|
2291
|
+
},
|
|
2292
|
+
"description": "Aspects that match user preferences. Example: ['价格低于均价 10%','有仲裁']"
|
|
2293
|
+
},
|
|
2294
|
+
"mismatches": {
|
|
2295
|
+
"type": "array",
|
|
2296
|
+
"items": {
|
|
2297
|
+
"type": "string"
|
|
2298
|
+
},
|
|
2299
|
+
"description": "Aspects that mismatch user preferences. Example: ['交付周期超出期望']"
|
|
2300
|
+
}
|
|
2301
|
+
},
|
|
2302
|
+
"required": [
|
|
2303
|
+
"score",
|
|
2304
|
+
"matches",
|
|
2305
|
+
"mismatches"
|
|
2306
|
+
],
|
|
2307
|
+
"additionalProperties": false,
|
|
2308
|
+
"description": "Service-to-preference match (populated when user preferences exist). Example: {score:75, matches:[...], mismatches:[...]}"
|
|
2309
|
+
}
|
|
2310
|
+
},
|
|
2311
|
+
"required": [
|
|
2312
|
+
"recommendations",
|
|
2313
|
+
"reminders"
|
|
2314
|
+
],
|
|
2315
|
+
"additionalProperties": false,
|
|
2316
|
+
"description": "Buyer-side advice (Phase 3 C-3.3). Populated when customer_intelligence service is enabled AND operation is order/query on a Service. Contains risk_score, recommendations, reminders, and preference_match."
|
|
2317
|
+
},
|
|
2318
|
+
"evolution_context": {
|
|
2319
|
+
"type": "object",
|
|
2320
|
+
"properties": {
|
|
2321
|
+
"industry_signal": {
|
|
2322
|
+
"type": "string",
|
|
2323
|
+
"description": "Industry evolution signal summary. Example: '行业健康度 82/100(healthy);累积 25 个行业信号'"
|
|
2324
|
+
},
|
|
2325
|
+
"evolution_advice": {
|
|
2326
|
+
"type": "string",
|
|
2327
|
+
"description": "Evolution advice for the current operation. Example: '建议强制配置仲裁 + 赔偿金 + 交付 Guard'"
|
|
2328
|
+
},
|
|
2329
|
+
"confidence": {
|
|
2330
|
+
"type": "number",
|
|
2331
|
+
"minimum": 0,
|
|
2332
|
+
"maximum": 1,
|
|
2333
|
+
"description": "Confidence of the evolution context 0-1. <0.5 means no data yet. Example: 0.75"
|
|
2334
|
+
},
|
|
2335
|
+
"health_score": {
|
|
2336
|
+
"type": "number",
|
|
2337
|
+
"minimum": 0,
|
|
2338
|
+
"maximum": 100,
|
|
2339
|
+
"description": "Industry health score 0-100 if available. Example: 82"
|
|
2340
|
+
},
|
|
2341
|
+
"pending_suggestions": {
|
|
2342
|
+
"type": "integer",
|
|
2343
|
+
"minimum": 0,
|
|
2344
|
+
"description": "Count of pending industry update suggestions (filtered by role if role is set). Example: 3"
|
|
2345
|
+
},
|
|
2346
|
+
"intent": {
|
|
2347
|
+
"type": "string",
|
|
2348
|
+
"enum": [
|
|
2349
|
+
"default",
|
|
2350
|
+
"growth",
|
|
2351
|
+
"retention",
|
|
2352
|
+
"compliance",
|
|
2353
|
+
"efficiency",
|
|
2354
|
+
"trust_building",
|
|
2355
|
+
"custom"
|
|
2356
|
+
],
|
|
2357
|
+
"description": "Phase 4 P4-6.C: Current business intent driving the scoring model. Absent = 'default'. Example: 'growth'"
|
|
2358
|
+
},
|
|
2359
|
+
"role_advice": {
|
|
2360
|
+
"type": "array",
|
|
2361
|
+
"items": {
|
|
2362
|
+
"type": "string"
|
|
2363
|
+
},
|
|
2364
|
+
"description": "Phase 4 P4-6.C: Role-targeted advice strings (user/merchant/arbitrator). Example: ['强化忠诚度飞轮','优化首单转化']"
|
|
2365
|
+
},
|
|
2366
|
+
"role": {
|
|
2367
|
+
"type": "string",
|
|
2368
|
+
"enum": [
|
|
2369
|
+
"user",
|
|
2370
|
+
"merchant",
|
|
2371
|
+
"arbitrator"
|
|
2372
|
+
],
|
|
2373
|
+
"description": "Phase 4 P4-6.C: Role used for advice routing. Example: 'merchant'"
|
|
2374
|
+
}
|
|
2375
|
+
},
|
|
2376
|
+
"required": [
|
|
2377
|
+
"confidence"
|
|
2378
|
+
],
|
|
2379
|
+
"additionalProperties": false,
|
|
2380
|
+
"description": "Phase 4 industry evolution context (populated when industry_evolution service is enabled). Provides AI with industry health signals and evolution advice."
|
|
2381
|
+
}
|
|
2382
|
+
},
|
|
2383
|
+
"required": [
|
|
2384
|
+
"intent",
|
|
2385
|
+
"status",
|
|
2386
|
+
"summary"
|
|
2387
|
+
],
|
|
2388
|
+
"additionalProperties": false,
|
|
2389
|
+
"description": "Business semantic summary. AI should read semantic first; fall back to parsing result only when semantic is absent. Relation: populated by MCP server from operation context; undefined when intent cannot be confidently inferred or for non-transaction tools. Example: {intent:'publish_service', status:'success', summary:'...'}"
|
|
2390
|
+
},
|
|
2391
|
+
"harness_report": {
|
|
2392
|
+
"type": "object",
|
|
2393
|
+
"properties": {
|
|
2394
|
+
"verify": {
|
|
2395
|
+
"type": "object",
|
|
2396
|
+
"properties": {
|
|
2397
|
+
"status": {
|
|
2398
|
+
"type": "string",
|
|
2399
|
+
"enum": [
|
|
2400
|
+
"pass",
|
|
2401
|
+
"warn",
|
|
2402
|
+
"fail"
|
|
2403
|
+
],
|
|
2404
|
+
"description": "Overall verify status. Constraint: 'fail' if any mismatch has severity 'fail'; 'warn' if only warns; 'pass' if no mismatches. Example: 'fail'"
|
|
2405
|
+
},
|
|
2406
|
+
"mismatches": {
|
|
2407
|
+
"type": "array",
|
|
2408
|
+
"items": {
|
|
2409
|
+
"type": "object",
|
|
2410
|
+
"properties": {
|
|
2411
|
+
"dimension": {
|
|
2412
|
+
"type": "string",
|
|
2413
|
+
"enum": [
|
|
2414
|
+
"created",
|
|
2415
|
+
"modified",
|
|
2416
|
+
"released",
|
|
2417
|
+
"state",
|
|
2418
|
+
"event"
|
|
2419
|
+
],
|
|
2420
|
+
"description": "Verify dimension that mismatched. Example: 'created'"
|
|
2421
|
+
},
|
|
2422
|
+
"expected": {
|
|
2423
|
+
"type": "string",
|
|
2424
|
+
"description": "What the Expect Loop declared. Example: 'Service object created'"
|
|
2425
|
+
},
|
|
2426
|
+
"actual": {
|
|
2427
|
+
"type": "string",
|
|
2428
|
+
"description": "What actually happened. Example: 'No object created'"
|
|
2429
|
+
},
|
|
2430
|
+
"severity": {
|
|
2431
|
+
"type": "string",
|
|
2432
|
+
"enum": [
|
|
2433
|
+
"pass",
|
|
2434
|
+
"warn",
|
|
2435
|
+
"fail"
|
|
2436
|
+
],
|
|
2437
|
+
"description": "Severity: 'fail' blocks progress, 'warn' is advisory, 'pass' never appears here. Example: 'fail'"
|
|
2438
|
+
},
|
|
2439
|
+
"detail": {
|
|
2440
|
+
"type": "string",
|
|
2441
|
+
"description": "Human-readable explanation of the mismatch. Example: 'Expected Service creation but transaction succeeded without object change'"
|
|
2442
|
+
}
|
|
2443
|
+
},
|
|
2444
|
+
"required": [
|
|
2445
|
+
"dimension",
|
|
2446
|
+
"expected",
|
|
2447
|
+
"actual",
|
|
2448
|
+
"severity",
|
|
2449
|
+
"detail"
|
|
2450
|
+
],
|
|
2451
|
+
"additionalProperties": false,
|
|
2452
|
+
"description": "One mismatch between expected and actual result. AI should read severity first to decide whether to halt."
|
|
2453
|
+
},
|
|
2454
|
+
"description": "List of mismatches found. Empty array when status is 'pass'. Example: [{dimension:'created', expected:'...', actual:'...', severity:'fail', detail:'...'}]"
|
|
2455
|
+
},
|
|
2456
|
+
"summary": {
|
|
2457
|
+
"type": "string",
|
|
2458
|
+
"description": "Human-readable summary of the verify result. Example: '2 mismatches found: created dimension failed, event dimension warned'"
|
|
2459
|
+
},
|
|
2460
|
+
"timestamp": {
|
|
2461
|
+
"type": "string",
|
|
2462
|
+
"description": "ISO 8601 timestamp when verify ran. Example: '2026-07-14T10:30:00.000Z'"
|
|
2463
|
+
}
|
|
2464
|
+
},
|
|
2465
|
+
"required": [
|
|
2466
|
+
"status",
|
|
2467
|
+
"mismatches",
|
|
2468
|
+
"summary",
|
|
2469
|
+
"timestamp"
|
|
2470
|
+
],
|
|
2471
|
+
"additionalProperties": false,
|
|
2472
|
+
"description": "Verify Loop report comparing expected vs actual."
|
|
2473
|
+
},
|
|
2474
|
+
"recovery": {
|
|
2475
|
+
"type": "object",
|
|
2476
|
+
"properties": {
|
|
2477
|
+
"strategy": {
|
|
2478
|
+
"type": "string",
|
|
2479
|
+
"enum": [
|
|
2480
|
+
"retry",
|
|
2481
|
+
"claim_faucet",
|
|
2482
|
+
"fill_submission",
|
|
2483
|
+
"recreate",
|
|
2484
|
+
"switch_account",
|
|
2485
|
+
"query_and_retry",
|
|
2486
|
+
"adjust_params",
|
|
2487
|
+
"escalate_human",
|
|
2488
|
+
"stop"
|
|
2489
|
+
],
|
|
2490
|
+
"description": "Recovery strategy chosen by the Recover Loop. Constraint: 9 strategies matching error_code table. Example: 'claim_faucet'"
|
|
2491
|
+
},
|
|
2492
|
+
"should_retry": {
|
|
2493
|
+
"type": "boolean",
|
|
2494
|
+
"description": "Whether AI should retry the original operation after applying the strategy. Constraint: false for 'stop' and 'escalate_human'. Example: true"
|
|
2495
|
+
},
|
|
2496
|
+
"adjusted_params": {
|
|
2497
|
+
"type": "object",
|
|
2498
|
+
"additionalProperties": {},
|
|
2499
|
+
"description": "Suggested parameter adjustments for 'adjust_params' strategy. Example: {amount: '100000000'}"
|
|
2500
|
+
},
|
|
2501
|
+
"user_prompt": {
|
|
2502
|
+
"type": "string",
|
|
2503
|
+
"description": "Prompt to show the user when recovery is semi-automatic or manual. Example: 'Please switch to an account with provider permission'"
|
|
2504
|
+
},
|
|
2505
|
+
"max_attempts": {
|
|
2506
|
+
"type": "integer",
|
|
2507
|
+
"description": "Maximum attempts for this error_code type. Example: 3"
|
|
2508
|
+
},
|
|
2509
|
+
"current_attempt": {
|
|
2510
|
+
"type": "integer",
|
|
2511
|
+
"description": "Current attempt count (1-indexed). Example: 1"
|
|
2512
|
+
},
|
|
2513
|
+
"detail": {
|
|
2514
|
+
"type": "string",
|
|
2515
|
+
"description": "Human-readable explanation of the recovery decision. Example: 'Insufficient balance detected; claim faucet tokens then retry'"
|
|
2516
|
+
}
|
|
2517
|
+
},
|
|
2518
|
+
"required": [
|
|
2519
|
+
"strategy",
|
|
2520
|
+
"should_retry",
|
|
2521
|
+
"max_attempts",
|
|
2522
|
+
"current_attempt",
|
|
2523
|
+
"detail"
|
|
2524
|
+
],
|
|
2525
|
+
"additionalProperties": false,
|
|
2526
|
+
"description": "Recover Loop action. Present only when verify.status is 'fail' or 'warn', or when an error occurred."
|
|
2527
|
+
}
|
|
2528
|
+
},
|
|
2529
|
+
"required": [
|
|
2530
|
+
"verify"
|
|
2531
|
+
],
|
|
2532
|
+
"additionalProperties": false,
|
|
2533
|
+
"description": "L4 Harness report (Verify + Recover). Present only when the Harness is injected and an Expected Result was declared for this operation. Relation: produced by handler.ts calling harness.verify() and harness.recover(). Example: {verify:{status:'fail', mismatches:[...]}, recovery:{strategy:'recreate'}}"
|
|
1757
2534
|
}
|
|
1758
2535
|
},
|
|
1759
2536
|
"required": [
|
|
1760
2537
|
"result"
|
|
1761
2538
|
],
|
|
1762
2539
|
"additionalProperties": false,
|
|
1763
|
-
"description": "
|
|
2540
|
+
"description": "Unified MCP tool output. result.type discriminates 5 outcomes: 'transaction' (raw Sui response), 'submission' (needs Guard data), 'error' (failed with error_code), 'data' (query result), 'null' (no-op). When semantic is present, prefer it over raw result parsing. When harness_report is present, check verify.status first and follow recovery.strategy if status is 'fail'."
|
|
1764
2541
|
}
|
|
1765
2542
|
}
|
|
1766
2543
|
}
|