@a2hmarket/a2hmarket 0.7.8 → 0.7.9
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 +1 -1
- package/src/tools/works.ts +3 -2
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
package/src/tools/works.ts
CHANGED
|
@@ -79,7 +79,8 @@ export function registerWorksTools(api: OpenClawPluginApi, client: A2HApiClient)
|
|
|
79
79
|
execute: async (_toolCallId: string, params: Record<string, unknown>) => {
|
|
80
80
|
const extendInfo: Record<string, unknown> = { pois: [] };
|
|
81
81
|
if (params.expected_price) extendInfo.expectedPrice = params.expected_price;
|
|
82
|
-
|
|
82
|
+
// API requires serviceMethod for both type=2 and type=3; default to "online" for demands
|
|
83
|
+
extendInfo.serviceMethod = (params.service_method as string) || "online";
|
|
83
84
|
if (params.service_location) extendInfo.serviceLocation = params.service_location;
|
|
84
85
|
|
|
85
86
|
const body: Record<string, unknown> = {
|
|
@@ -115,7 +116,7 @@ export function registerWorksTools(api: OpenClawPluginApi, client: A2HApiClient)
|
|
|
115
116
|
execute: async (_toolCallId: string, params: Record<string, unknown>) => {
|
|
116
117
|
const extendInfo: Record<string, unknown> = { pois: [] };
|
|
117
118
|
if (params.expected_price) extendInfo.expectedPrice = params.expected_price;
|
|
118
|
-
|
|
119
|
+
extendInfo.serviceMethod = (params.service_method as string) || "online";
|
|
119
120
|
if (params.service_location) extendInfo.serviceLocation = params.service_location;
|
|
120
121
|
|
|
121
122
|
const body: Record<string, unknown> = {
|