@wowok/agent-mcp 2.2.8
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/README.md +56 -0
- package/dist/index.d.ts +15800 -0
- package/dist/index.js +1479 -0
- package/dist/schema/call/allocation.d.ts +1430 -0
- package/dist/schema/call/allocation.js +24 -0
- package/dist/schema/call/arbitration.d.ts +1974 -0
- package/dist/schema/call/arbitration.js +92 -0
- package/dist/schema/call/base.d.ts +7325 -0
- package/dist/schema/call/base.js +138 -0
- package/dist/schema/call/contact.d.ts +970 -0
- package/dist/schema/call/contact.js +37 -0
- package/dist/schema/call/demand.d.ts +1265 -0
- package/dist/schema/call/demand.js +47 -0
- package/dist/schema/call/guard.d.ts +951 -0
- package/dist/schema/call/guard.js +58 -0
- package/dist/schema/call/handler.d.ts +38 -0
- package/dist/schema/call/handler.js +171 -0
- package/dist/schema/call/index.d.ts +18 -0
- package/dist/schema/call/index.js +18 -0
- package/dist/schema/call/machine.d.ts +3974 -0
- package/dist/schema/call/machine.js +152 -0
- package/dist/schema/call/order.d.ts +974 -0
- package/dist/schema/call/order.js +34 -0
- package/dist/schema/call/payment.d.ts +404 -0
- package/dist/schema/call/payment.js +17 -0
- package/dist/schema/call/permission.d.ts +3017 -0
- package/dist/schema/call/permission.js +105 -0
- package/dist/schema/call/personal.d.ts +1472 -0
- package/dist/schema/call/personal.js +68 -0
- package/dist/schema/call/progress.d.ts +725 -0
- package/dist/schema/call/progress.js +26 -0
- package/dist/schema/call/proof.d.ts +320 -0
- package/dist/schema/call/proof.js +27 -0
- package/dist/schema/call/repository.d.ts +2358 -0
- package/dist/schema/call/repository.js +76 -0
- package/dist/schema/call/reward.d.ts +1232 -0
- package/dist/schema/call/reward.js +30 -0
- package/dist/schema/call/service.d.ts +3494 -0
- package/dist/schema/call/service.js +82 -0
- package/dist/schema/call/treasury.d.ts +2345 -0
- package/dist/schema/call/treasury.js +71 -0
- package/dist/schema/common/index.d.ts +843 -0
- package/dist/schema/common/index.js +347 -0
- package/dist/schema/index.d.ts +7 -0
- package/dist/schema/index.js +7 -0
- package/dist/schema/local/index.d.ts +17522 -0
- package/dist/schema/local/index.js +855 -0
- package/dist/schema/local/wip.d.ts +784 -0
- package/dist/schema/local/wip.js +187 -0
- package/dist/schema/messenger/index.d.ts +4655 -0
- package/dist/schema/messenger/index.js +446 -0
- package/dist/schema/query/index.d.ts +73445 -0
- package/dist/schema/query/index.js +1324 -0
- package/dist/schema/utils/guard-parser.d.ts +20 -0
- package/dist/schema/utils/guard-parser.js +401 -0
- package/dist/schema/utils/guard-query-utils.d.ts +5 -0
- package/dist/schema/utils/guard-query-utils.js +22 -0
- package/dist/schema/utils/node-parser.d.ts +45 -0
- package/dist/schema/utils/node-parser.js +353 -0
- package/dist/schema/utils/permission-index-utils.d.ts +2 -0
- package/dist/schema/utils/permission-index-utils.js +7 -0
- package/package.json +48 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { TypedPermissionObjectSchema, CoinParamSchema, NamedObjectSchema, ObjectsSchema, CallEnvSchema, SubmissionCallSchema } from "./base.js";
|
|
3
|
+
import { AllocatorsSchema, DiscountTypeSchema, ServiceSaleSchema } from "../query/index.js";
|
|
4
|
+
import { AccountOrMark_AddressSchema, DescriptionSchema, LongNameSchema, ManyAccountOrMark_AddressSchema, NameOrAddressSchema, NotEmptyNameSchema, ReceivedBalanceOrRecentlySchema, ReceivedObjectsOrRecentlySchema } from "../common/index.js";
|
|
5
|
+
import { BalanceTypeSchema } from "../common/index.js";
|
|
6
|
+
export const ServiceBuyItemSchema = z.object({
|
|
7
|
+
name: LongNameSchema.describe("Name of the product or service to purchase"),
|
|
8
|
+
stock: BalanceTypeSchema.describe("Quantity of the product or service to purchase"),
|
|
9
|
+
wip_hash: z.string().describe("WIP file hash of the item"),
|
|
10
|
+
}).strict();
|
|
11
|
+
export const BuySchema = z.object({
|
|
12
|
+
items: z.array(ServiceBuyItemSchema).describe("List of products or services to purchase"),
|
|
13
|
+
total_pay: CoinParamSchema.describe("Actual payment amount"),
|
|
14
|
+
discount: z.string().optional().describe("Discount object ID or name"),
|
|
15
|
+
payment_remark: z.string().optional().describe("Payment remark"),
|
|
16
|
+
payment_index: z.number().optional().describe("Payment index"),
|
|
17
|
+
}).strict();
|
|
18
|
+
export const DiscountSchema = z.object({
|
|
19
|
+
name: z.string().describe("Discount name"),
|
|
20
|
+
discount_type: DiscountTypeSchema.describe("Discount type"),
|
|
21
|
+
discount_value: BalanceTypeSchema.describe("Discount value"),
|
|
22
|
+
benchmark: z.union([z.number(), z.string()]).optional().describe("Discount benchmark value. Discount is only applied if the amount exceeds this value"),
|
|
23
|
+
time_ms_start: z.number().optional().describe("Discount start time (milliseconds)"),
|
|
24
|
+
time_ms_end: z.number().optional().describe("Discount end time (milliseconds)"),
|
|
25
|
+
count: z.number().optional().describe("Discount usage count"),
|
|
26
|
+
recipient: ManyAccountOrMark_AddressSchema.describe("Discount recipient"),
|
|
27
|
+
transferable: z.boolean().optional().describe("Whether the discount object recipient can transfer the discount object"),
|
|
28
|
+
}).strict();
|
|
29
|
+
export const OrderNewSchema = z.object({
|
|
30
|
+
buy: BuySchema,
|
|
31
|
+
agents: ManyAccountOrMark_AddressSchema.optional().describe("Order agents. Agents can operate the order, such as canceling the order, modifying the order status, etc.; but cannot receive the funds received by the order."),
|
|
32
|
+
order_required_info: z.string().optional().describe("Contact object ID or WTS Proof object"),
|
|
33
|
+
transfer: AccountOrMark_AddressSchema.optional().describe("Set the new owner of the order. Requires order owner permission to set."),
|
|
34
|
+
namedNewOrder: NamedObjectSchema.optional().describe("Set the local name of the order object."),
|
|
35
|
+
namedNewAllocation: NamedObjectSchema.optional().describe("Set the local name of the order's Allocation object."),
|
|
36
|
+
namedNewProgress: NamedObjectSchema.optional().describe("Set the local name of the order's Progress object."),
|
|
37
|
+
}).strict();
|
|
38
|
+
export const SalesSchema = z.discriminatedUnion("op", [
|
|
39
|
+
z.object({
|
|
40
|
+
op: z.literal("add"),
|
|
41
|
+
sales: z.array(ServiceSaleSchema),
|
|
42
|
+
}).strict().describe("Add new sales products or services."),
|
|
43
|
+
z.object({
|
|
44
|
+
op: z.literal("set"),
|
|
45
|
+
sales: z.array(ServiceSaleSchema),
|
|
46
|
+
}).strict().describe("Set sales products or services."),
|
|
47
|
+
z.object({
|
|
48
|
+
op: z.literal("remove"),
|
|
49
|
+
sales_name: z.array(LongNameSchema.describe("Sales name")),
|
|
50
|
+
}).strict().describe("Remove existing sales products or services."),
|
|
51
|
+
z.object({
|
|
52
|
+
op: z.literal("clear"),
|
|
53
|
+
}).strict().describe("Clear all sales products or services."),
|
|
54
|
+
]);
|
|
55
|
+
export const CallService_DataSchema = z.object({
|
|
56
|
+
object: TypedPermissionObjectSchema,
|
|
57
|
+
order_new: OrderNewSchema.optional().describe("Create new order."),
|
|
58
|
+
description: DescriptionSchema.optional(),
|
|
59
|
+
location: LongNameSchema.optional().describe("Location of the Service"),
|
|
60
|
+
sales: SalesSchema.optional().describe("Service sales products or services list."),
|
|
61
|
+
repositories: ObjectsSchema.optional().describe("Service Repository object list."),
|
|
62
|
+
rewards: ObjectsSchema.optional().describe("Service Reward object list."),
|
|
63
|
+
arbitrations: ObjectsSchema.optional().describe("Service Arbitration object list."),
|
|
64
|
+
machine: z.union([NameOrAddressSchema, z.null()]).optional().describe("Service Machine object ID or name. The Machine object must be in published state."),
|
|
65
|
+
discount: DiscountSchema.optional().describe("Issue discount."),
|
|
66
|
+
discount_destroy: z.array(NameOrAddressSchema).optional().describe("Destroy existing discount object ID list."),
|
|
67
|
+
customer_required: z.array(NotEmptyNameSchema).optional().describe("Customer required information. Such as phone, email, etc."),
|
|
68
|
+
order_allocators: z.union([AllocatorsSchema, z.null()]).optional().describe("Order fund allocator."),
|
|
69
|
+
buy_guard: z.union([NameOrAddressSchema, z.null()]).optional().describe("Buy guard object ID or name."),
|
|
70
|
+
compensation_fund_add: CoinParamSchema.optional().describe("Compensation fund. Used to claim compensation based on the arbitration result of the Arb object when resolving order disputes."),
|
|
71
|
+
setting_locked_time_add: z.number().optional().describe("Additional lock duration (milliseconds) to extend the 'setting_lock_duration'. Initial value is 30 days, can only be increased, not decreased. Affects: rewards, arbitrations, and compensation_fund_receive."),
|
|
72
|
+
compensation_fund_receive: ReceivedBalanceOrRecentlySchema.optional().describe("Receive order compensation funds."),
|
|
73
|
+
owner_receive: ReceivedObjectsOrRecentlySchema.optional().describe("Unwrap CoinWrapper objects and other objects received by this object and send them to the owner of its Permission object."),
|
|
74
|
+
um: z.union([NameOrAddressSchema, z.null()]).optional().describe("Contact object ID or name."),
|
|
75
|
+
pause: z.boolean().optional().describe("Whether to pause accepting new orders."),
|
|
76
|
+
publish: z.boolean().optional().describe("Whether to publish the Service. After publishing, customers can place orders; at the same time, service commitments such as machine, order_allocators, arbitrations, etc. will be immutable."),
|
|
77
|
+
}).strict().describe("On-chain Service operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, type_parameter, permission, ...} to create a Service. NOTE: 'name' goes INSIDE 'object', NOT at the data root level. 'permission' can be a new Permission object or reference an existing one - check 'object' field description for details. (2) OPERATE EXISTING: Set 'object' field with STRING format (object ID or name). The 'object' field is CRITICAL and REQUIRED in both cases. STRING for existing, OBJECT for new creation.");
|
|
78
|
+
export const CallService_InputSchema = z.object({
|
|
79
|
+
data: CallService_DataSchema,
|
|
80
|
+
env: CallEnvSchema.optional(),
|
|
81
|
+
submission: SubmissionCallSchema.optional(),
|
|
82
|
+
}).strict();
|