@a2hmarket/a2hmarket 1.0.1 → 1.0.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.
- package/openclaw.plugin.json +1 -1
- package/package.json +4 -1
- package/src/tools/order.ts +4 -2
- package/src/tools/send.ts +6 -3
- package/src/tools/tempo-payment.ts +2 -1
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a2hmarket/a2hmarket",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"index.ts",
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
"extensions": [
|
|
28
28
|
"./index.ts"
|
|
29
29
|
],
|
|
30
|
+
"compat": {
|
|
31
|
+
"pluginApi": ">=2026.3.0"
|
|
32
|
+
},
|
|
30
33
|
"build": {
|
|
31
34
|
"openclawVersion": "2026.3.24"
|
|
32
35
|
},
|
package/src/tools/order.ts
CHANGED
|
@@ -6,7 +6,8 @@ export function registerOrderTools(api: OpenClawPluginApi, client: A2HApiClient)
|
|
|
6
6
|
api.registerTool({
|
|
7
7
|
name: "a2h_order_create",
|
|
8
8
|
description:
|
|
9
|
-
"Create a new order (seller side). order_type=2: seller takes buyer's demand task. order_type=3: buyer purchases seller's service."
|
|
9
|
+
"Create a new order (seller side). order_type=2: seller takes buyer's demand task. order_type=3: buyer purchases seller's service. " +
|
|
10
|
+
"REQUIRES human approval first — call a2h_create_approval(peer_id=customer_id) and wait for approval before calling this tool.",
|
|
10
11
|
parameters: {
|
|
11
12
|
type: "object",
|
|
12
13
|
properties: {
|
|
@@ -47,7 +48,8 @@ export function registerOrderTools(api: OpenClawPluginApi, client: A2HApiClient)
|
|
|
47
48
|
api.registerTool({
|
|
48
49
|
name: "a2h_order_action",
|
|
49
50
|
description:
|
|
50
|
-
"Perform an action on an order: confirm (buyer), reject (buyer), cancel (seller), confirm-received (seller confirms payment), confirm-service-completed (buyer confirms delivery)."
|
|
51
|
+
"Perform an action on an order: confirm (buyer), reject (buyer), cancel (seller), confirm-received (seller confirms payment), confirm-service-completed (buyer confirms delivery). " +
|
|
52
|
+
"All actions require human approval first — call a2h_create_approval before this tool.",
|
|
51
53
|
parameters: {
|
|
52
54
|
type: "object",
|
|
53
55
|
properties: {
|
package/src/tools/send.ts
CHANGED
|
@@ -10,9 +10,12 @@ export function registerSendTool(api: OpenClawPluginApi, creds: A2HCredentials)
|
|
|
10
10
|
api.registerTool({
|
|
11
11
|
name: "a2h_send",
|
|
12
12
|
description:
|
|
13
|
-
"Send an A2A message to another agent.
|
|
14
|
-
"
|
|
15
|
-
"
|
|
13
|
+
"Send an A2A message to another agent. Use this for ALL messages to other agents — " +
|
|
14
|
+
"both proactive outreach AND replies to inbound messages. " +
|
|
15
|
+
"Your text output only notifies the human; it does NOT reach the other agent. " +
|
|
16
|
+
"To actually send a reply, you MUST call a2h_send with target_agent_id from the message prefix. " +
|
|
17
|
+
"When discussing a specific service/demand post, include works_id. " +
|
|
18
|
+
"For order-related messages, include orderId in extra_payload so the recipient can match the order. " +
|
|
16
19
|
"Supports text, works_id, payment QR code, attachment, and arbitrary extra payload fields.",
|
|
17
20
|
parameters: {
|
|
18
21
|
type: "object",
|
|
@@ -158,7 +158,8 @@ export function registerTempoPaymentTools(
|
|
|
158
158
|
name: "a2h_tempo_transfer",
|
|
159
159
|
description:
|
|
160
160
|
"Send an on-chain AlphaUSD payment on Tempo blockchain. " +
|
|
161
|
-
"The tool
|
|
161
|
+
"The tool verifies you are the buyer (rejects if you are the seller). " +
|
|
162
|
+
"REQUIRES human approval first — call a2h_create_approval before this tool and wait for approval. " +
|
|
162
163
|
"Use the sellerAddress, amount_cents, and memo from the seller's checkout/payment info.",
|
|
163
164
|
parameters: {
|
|
164
165
|
type: "object",
|