wowok_agent 2.1.36 → 2.1.38

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  # WoWok Agent (MCP Server)
2
- Making It Easy for AI-Agents to Communicate, Collaborate, Trade, and Trust.
2
+ Making It Easy for AI Agents to Communicate, Collaborate, Trade, and Trust.
3
3
 
4
4
  Docs: [https://github.com/wowok-ai/docs/](https://github.com/wowok-ai/docs/)
5
5
 
@@ -19,7 +19,7 @@ export const CallAllocation_OperateSchema = z.object({
19
19
  export const CallAllocation_DataSchema = z.union([
20
20
  CallAllocation_CreateSchema,
21
21
  CallAllocation_OperateSchema
22
- ]).describe("On-chain Allocation operations. USAGE: (1) CREATE NEW: Use CallAllocation_CreateSchema by setting 'object' with {name, type, ...}. (2) OPERATE EXISTING: Use CallAllocation_OperateSchema by setting 'object' with object ID or name. The 'object' field is CRITICAL and REQUIRED in both cases.");
22
+ ]).describe("On-chain Allocation operations. USAGE: (1) CREATE NEW: Use CallAllocation_CreateSchema by setting 'object' with OBJECT format {name, type_parameter, ...}. (2) OPERATE EXISTING: Use CallAllocation_OperateSchema by setting 'object' with STRING format (object ID or name). The 'object' field is CRITICAL and REQUIRED in both cases. ");
23
23
  export const CallAllocation_InputSchema = z.object({
24
24
  data: CallAllocation_DataSchema,
25
25
  env: CallEnvSchema.optional(),
@@ -97,7 +97,7 @@ export const CallArbitration_DataSchema = z.object({
97
97
  voting_guard: VotingGuardActionSchema.optional().describe("Set Guard for verification during arbitration voting; if Guard verification fails, arbitration voting will fail."),
98
98
  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."),
99
99
  um: z.union([NameOrAddressSchema, z.null()]).optional().describe("Contact object.")
100
- }).strict().describe("On-chain Arbitration operations. USAGE: (1) CREATE NEW: Set 'object' field with {name, type, permission, ...} to create an Arbitration. 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 object ID or name. The 'object' field is CRITICAL and REQUIRED in both cases.");
100
+ }).strict().describe("On-chain Arbitration operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, type_parameter, permission, ...} to create an Arbitration. 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.");
101
101
  // 定义输入schema
102
102
  export const CallArbitration_InputSchema = z.object({
103
103
  data: CallArbitration_DataSchema,
@@ -19,7 +19,7 @@ export function strictParse(schema, input, fieldName = "input") {
19
19
  export const NamedObjectSchema = z.object({
20
20
  name: NameSchema.optional().describe("The name of the object"),
21
21
  tags: z.array(z.string()).optional().describe("The tags of the object"),
22
- onChain: z.boolean().optional().describe("CRITICAL: Whether to sync the name to the blockchain. DEFAULT (undefined/false): The name is stored LOCALLY ONLY on your device (PRIVATE). If set to true: The name is published ON-CHAIN and becomes PUBLICLY VISIBLE to everyone. Only set to true for public identities you want to share."),
22
+ onChain: z.boolean().optional().describe("CRITICAL: Whether to sync the name to the blockchain. DEFAULT (undefined/false): The name is stored LOCALLY ONLY on your device (PRIVATE). If set to true: The name is published ON-CHAIN and becomes PUBLICLY VISIBLE to everyone. Only set to true for displaying the relationships you are willing to make public on the chain."),
23
23
  replaceExistName: z.boolean().optional().describe("FORCE CLAIM: Set to true ONLY when the user explicitly expresses a STRONG INTENTION to forcefully take over an existing name (e.g., 'I must use this name', 'force rename', 'replace the existing one'). " +
24
24
  "WARNING: This will UNBIND the name from its original object and rebind it to the new one, potentially breaking existing references. " +
25
25
  "If not specified or false: the operation will FAIL with an error when the name is already in use (safe default behavior)."),
@@ -29,18 +29,18 @@ export const NamedObjectSchema = z.object({
29
29
  "Only set 'replaceExistName: true' when the user EXPLICITLY demands to forcefully claim the name.");
30
30
  // 定义 NormalObject schema
31
31
  export const NormalObjectSchema = z.union([
32
- NameOrAddressSchema.describe("Object name or ID. Used to operate on an existing object."),
33
- NamedObjectSchema,
34
- ]).describe("Reference an existing object by name or ID, or create a new object by providing its name.");
32
+ NameOrAddressSchema.describe("String format: Reference an EXISTING object by its name (local mark) or on-chain object ID. Example: 'my-service' or '0x1234...'"),
33
+ NamedObjectSchema.describe("Object format: CREATE a NEW object with specified properties. See NamedObjectSchema for details including 'name' (optional), 'tags' (optional), 'onChain' (whether to make name public), and 'replaceExistName' (force claim existing name)."),
34
+ ]).describe("Two ways to specify an object: (1) STRING - Reference an EXISTING object by name or ID; (2) OBJECT - CREATE a NEW object using NamedObjectSchema structure with optional name, tags, and visibility settings.");
35
35
  // 定义 NamedObjectWithDescription schema
36
36
  export const NamedObjectWithDescriptionSchema = NamedObjectSchema.extend({
37
37
  description: z.string().optional().describe("The description of the object"),
38
38
  }).strict().describe("Create a new object with a name and optional description. The name helps identify the object, while the description provides additional details about its purpose or functionality.");
39
39
  // 定义 DescriptionObject schema
40
40
  export const DescriptionObjectSchema = z.union([
41
- NameOrAddressSchema.describe("Object name or ID. Used to operate on an existing object."),
42
- NamedObjectWithDescriptionSchema
43
- ]).describe("Reference an existing object by name or ID, or create a new object by specifying its name and description.");
41
+ NameOrAddressSchema.describe("String format: Reference an EXISTING object by its name (local mark) or on-chain object ID. Example: 'my-object' or '0x1234...'"),
42
+ NamedObjectWithDescriptionSchema.describe("Object format: CREATE a NEW object with name, optional description, and visibility settings. Extends NamedObjectSchema with an additional 'description' field for detailed object information.")
43
+ ]).describe("Two ways to specify an object: (1) STRING - Reference an EXISTING object by name or ID; (2) OBJECT - CREATE a NEW object with full configuration including optional name, tags, description, and visibility settings (local private by default, or public on-chain with onChain:true).");
44
44
  // 定义 TypeNamedObject schema
45
45
  export const TypeNamedObjectSchema = NamedObjectSchema.extend({
46
46
  type_parameter: TokenTypeWithDefaultSchema.describe("Token type of the on-chain object, e.g. '0x2::wow::WOW'. Defines what token this object can use for payments."),
@@ -59,7 +59,7 @@ export const CoinParamSchema = z.union([
59
59
  balance: BalanceTypeSchema,
60
60
  }).describe("Specify an amount value."),
61
61
  z.object({
62
- coin: z.string().describe("Coin object ID. Use a specified Coin object."),
62
+ coin: z.string().describe("Coin object ID or name(local mark). Use a specified Coin object."),
63
63
  }),
64
64
  ]).describe("Specify the amount to pay from the transaction account, or the Coin ID owned by the transaction account. Used for payment.");
65
65
  // 定义 CallEnv schema
@@ -105,19 +105,19 @@ export const SubmissionCallSchema = z.object({
105
105
  }).strict().describe("Guard verification submission data required to complete an operation. Contains: (1) 'guard' - array of Guard objects to verify, each with an object ID and an 'impack' flag indicating if its result affects the final outcome; (2) 'submission' - array of user data submissions matching the Guard's requirements. The operation proceeds only after all Guards with impack=true are successfully verified.");
106
106
  // 定义 TypedPermissionObject schema
107
107
  export const TypedPermissionObjectSchema = z.union([
108
- NameOrAddressSchema.describe("Object name or ID. Used to operate on an existing object."),
109
- TypeNamedObjectWithPermissionSchema,
110
- ]).describe("Reference an existing object by name or ID, or create a new object with full configuration: name (optional), tags (optional), description (optional), token type for payments, and Permission-based access control.");
108
+ NameOrAddressSchema.describe("String format: Reference an EXISTING object by its name (local mark) or on-chain object ID. Use this when the object already exists and you want to reference it."),
109
+ TypeNamedObjectWithPermissionSchema.describe("Object format: CREATE a NEW object with COMPLETE configuration including: optional name, tags, description, token type for payments (e.g., '0x2::wow::WOW'), AND Permission-based access control. Use this for creating sophisticated objects with both payment token specification and permission management."),
110
+ ]).describe("Two ways to specify an object: (1) STRING - Reference an EXISTING object by name or ID; (2) OBJECT - CREATE a NEW object with full configuration including name, tags, description, token type for payments, and Permission-based access control. The object format is used when you need both token specification AND permission management.");
111
111
  // 定义 WithPermissionObject schema
112
112
  export const WithPermissionObjectSchema = z.union([
113
- NameOrAddressSchema.describe("Object name or ID. Used to operate on an existing object."),
114
- NamedObjectWithPermissionSchema,
115
- ]).describe("Create a new object (which can be named and tagged) with a Permission object to manage its access control, or operate on an existing object by referencing its name or ID.");
113
+ NameOrAddressSchema.describe("String format: Reference an EXISTING object by its name (local mark) or on-chain object ID. Use when the Permission object already exists."),
114
+ NamedObjectWithPermissionSchema.describe("Object format: CREATE a NEW object with Permission-based access control. Includes optional name, tags, visibility settings, AND a Permission object (which itself can be referenced by string or created as a new object). Use this to create objects with managed access permissions."),
115
+ ]).describe("Two ways to specify a Permission-managed object: (1) STRING - Reference an EXISTING Permission object by name or ID; (2) OBJECT - CREATE a NEW object with Permission access control, where the Permission can also be either referenced (string) or newly created (object). This is used when you need permission management but don't need to specify a token type.");
116
116
  // 定义 TypedDescriptionObject schema
117
117
  export const TypedDescriptionObjectSchema = z.union([
118
- NameOrAddressSchema.describe("Object name or ID. Used to operate on an existing object."),
119
- TypeNamedObjectSchema,
120
- ]).describe("Reference an existing object by name or ID, or create a new object with full configuration options: name (optional), tags (optional array), description (optional), token type for payments (e.g., '0x2::wow::WOW'), and visibility settings (local by default, or public on-chain).");
118
+ NameOrAddressSchema.describe("String format: Reference an EXISTING object by its name (local mark) or on-chain object ID. Use when the object already exists."),
119
+ TypeNamedObjectSchema.describe("Object format: CREATE a NEW object with token type specification for payments. Includes optional name, tags, visibility settings, AND a specific token type (e.g., '0x2::wow::WOW' or '0x2::usdt::USDT'). Use this when you need to specify what token the object will use for payments but don't need permission management."),
120
+ ]).describe("Two ways to specify an object: (1) STRING - Reference an EXISTING object by name or ID; (2) OBJECT - CREATE a NEW object with token type specification for payments. The object format includes name, tags, visibility settings, and a required token type. This is used when you need to specify the payment token but don't need permission management.");
121
121
  // 定义 CallResult schema
122
122
  export const CallResultSchema = z.discriminatedUnion("type", [
123
123
  SubmissionCallSchema,
@@ -32,7 +32,7 @@ export const CallContact_DataSchema = z.object({
32
32
  location: LongNameSchema.optional().describe("Physical or virtual location information for this contact"),
33
33
  ims: ImsOperationSchema.optional().describe("IM contact list operation: add, set, remove, or clear instant messaging contacts"),
34
34
  owner_receive: ReceivedObjectsOrRecentlySchema.optional().describe("Receive objects sent to this contact object and unwrap them to the permission owner"),
35
- }).strict().describe("On-chain Contact operations. USAGE: (1) CREATE NEW: Set 'object' field with {name, permission, ...} to create a Contact. 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 object ID or name. The 'object' field is CRITICAL and REQUIRED in both cases.");
35
+ }).strict().describe("On-chain Contact operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, permission, ...} to create a Contact. 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.");
36
36
  // CallContact_InputSchema - Complete input schema for Contact tool
37
37
  export const CallContact_InputSchema = z.object({
38
38
  data: CallContact_DataSchema.describe("Contact operation data containing object reference and operations to perform"),
@@ -43,7 +43,7 @@ export const CallDemand_DataSchema = z.object({
43
43
  guards: GuardsSchema.optional().describe('Validation Guard list for the Demand object. Used to verify whether the service recommended by the user meets the requirements'),
44
44
  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.'),
45
45
  um: z.union([NameOrAddressSchema, z.null()]).optional().describe('Contact object.'),
46
- }).strict().describe("On-chain Demand operations. USAGE: (1) CREATE NEW: Set 'object' field with {name, permission, ...} to create a Demand. 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 object ID or name. The 'object' field is CRITICAL and REQUIRED in both cases.");
46
+ }).strict().describe("On-chain Demand operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, permission, ...} to create a Demand. 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.");
47
47
  export const CallDemand_InputSchema = z.object({
48
48
  data: CallDemand_DataSchema,
49
49
  env: CallEnvSchema.optional(),
@@ -21,6 +21,22 @@ export function handleCallResult(result) {
21
21
  // Handle transaction result (contains digest field)
22
22
  if (result && "digest" in result) {
23
23
  const r = ResponseData(result);
24
+ const txStatus = result?.effects?.status?.status;
25
+ const txError = result?.effects?.status?.error;
26
+ const isSuccess = txStatus === "success";
27
+ if (!isSuccess) {
28
+ const output = {
29
+ message: `Transaction failed: ${txError || txStatus || "unknown error"}`,
30
+ result: { type: "error", error: txError || txStatus || "transaction failed" },
31
+ };
32
+ return {
33
+ content: [
34
+ { type: "text", text: output.message },
35
+ { type: "text", text: JSON.stringify(r) },
36
+ ],
37
+ structuredContent: output,
38
+ };
39
+ }
24
40
  const output = {
25
41
  message: "Transaction completed successfully",
26
42
  result: { type: "transaction", ...result },
@@ -129,7 +129,7 @@ If parsing fails, error includes line number and column information.`),
129
129
  publish: z.boolean().optional().describe('Whether to publish the object. After the object is published, new Progress objects can be generated; and node settings will no longer be changeable.'),
130
130
  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.'),
131
131
  um: z.union([z.string(), z.null()]).optional().describe('Contact object.'),
132
- }).strict().describe("On-chain Machine operations. USAGE: (1) CREATE NEW: Set 'object' field with {name, permission, ...} to create a Machine. 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 object ID or name. The 'object' field is CRITICAL and REQUIRED in both cases.");
132
+ }).strict().describe("On-chain Machine operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, permission, ...} to create a Machine. 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.");
133
133
  export const CallMachine_InputSchema = z.object({
134
134
  data: CallMachine_DataSchema,
135
135
  env: CallEnvSchema.optional(),
@@ -109,7 +109,7 @@ export const CallPermission_DataSchema = z.object({
109
109
  builder: AccountOrMark_AddressSchema.optional().describe("Set or transfer ownership of the Permission object to the specified user ID. The creator automatically becomes the builder; only the builder can transfer ownership to other users."),
110
110
  owner_receive: ReceivedObjectsOrRecentlySchema.optional().describe('Unwrap CoinWrapper objects and other objects received by this object and send them to the builder(owner).'),
111
111
  um: z.union([NameOrAddressSchema, z.null()]).optional().describe("Contact object."),
112
- }).strict().describe("On-chain Permission operations. USAGE: (1) CREATE NEW: Set 'object' field with {name, tag?, ...} to create a Permission. NOTE: 'name' goes INSIDE 'object', NOT at the data root level. (2) OPERATE EXISTING: Set 'object' field with object ID or name. The 'object' field is CRITICAL and REQUIRED in both cases.");
112
+ }).strict().describe("On-chain Permission operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, tags?, ...} to create a Permission. NOTE: 'name' goes INSIDE 'object', NOT at the data root level. (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.");
113
113
  // 定义输入schema
114
114
  export const CallPermission_InputSchema = z.object({
115
115
  data: CallPermission_DataSchema,
@@ -15,7 +15,7 @@ export const OperateSchema = z.object({
15
15
  message: z.string().optional().describe("Operation result message."),
16
16
  }).strict().describe("Advance Progress object: lock operation permission (hold=true) or submit operation result (hold=false or omitted).");
17
17
  export const CallProgress_DataSchema = z.object({
18
- object: NameOrAddressSchema.describe("Progress object ID or name"),
18
+ object: NameOrAddressSchema.describe("Progress object ID or name."),
19
19
  task: NameOrAddressSchema.optional().describe("Task ID. Cannot be changed after setting."),
20
20
  repository: ObjectsSchema.optional().describe("Consensus data Repository object list."),
21
21
  progress_namedOperator: ProgressNamedOperatorSchema.optional().describe("Manage operators for Progress permission namespace."),
@@ -77,7 +77,7 @@ export const CallRepository_DataSchema = z.object({
77
77
  rewards: ObjectsSchema.optional().describe("Reward object list. Used for data contribution incentives."),
78
78
  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."),
79
79
  um: z.union([NameOrAddressSchema, z.null()]).optional().describe("Contact object."),
80
- }).strict().describe("On-chain Repository operations. USAGE: (1) CREATE NEW: Set 'object' field with {name, permission, ...} to create a Repository. 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 object ID or name. The 'object' field is CRITICAL and REQUIRED in both cases.");
80
+ }).strict().describe("On-chain Repository operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, permission, ...} to create a Repository. 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.");
81
81
  export const CallRepository_InputSchema = z.object({
82
82
  data: CallRepository_DataSchema,
83
83
  env: CallEnvSchema.optional(),
@@ -38,7 +38,7 @@ export const CallReward_DataSchema = z.object({
38
38
  guard_expiration_time: z.union([z.number().int().min(1), z.null()]).optional().describe("Add expiration time(ms). Before this time expires, new Guard and fund allocation rules cannot be added."),
39
39
  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."),
40
40
  um: z.union([NameOrAddressSchema, z.null()]).optional().describe("Contact object."),
41
- }).strict().describe("On-chain Reward operations. USAGE: (1) CREATE NEW: Set 'object' field with {name, type, permission, ...} to create a Reward. 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 object ID or name. The 'object' field is CRITICAL and REQUIRED in both cases.");
41
+ }).strict().describe("On-chain Reward operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, type_parameter, permission, ...} to create a Reward. 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.");
42
42
  export const CallReward_InputSchema = z.object({
43
43
  data: CallReward_DataSchema,
44
44
  env: CallEnvSchema.optional(),
@@ -80,7 +80,7 @@ export const CallService_DataSchema = z.object({
80
80
  um: z.union([NameOrAddressSchema, z.null()]).optional().describe("Contact object ID or name."),
81
81
  pause: z.boolean().optional().describe("Whether to pause accepting new orders."),
82
82
  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."),
83
- }).strict().describe("On-chain Service operations. USAGE: (1) CREATE NEW: Set 'object' field with {name, type, 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 object ID or name. The 'object' field is CRITICAL and REQUIRED in both cases.");
83
+ }).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.");
84
84
  export const CallService_InputSchema = z.object({
85
85
  data: CallService_DataSchema,
86
86
  env: CallEnvSchema.optional(),
@@ -68,7 +68,7 @@ export const CallTreasury_DataSchema = z.object({
68
68
  external_withdraw_guard: ExternalWithdrawGuardSchema.optional().describe("Set external withdrawal Guard for Treasury object"),
69
69
  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."),
70
70
  um: z.union([NamedObjectSchema, z.null()]).optional().describe("Contact object."),
71
- }).strict().describe("On-chain Treasury operations. USAGE: (1) CREATE NEW: Set 'object' field with {name, type, permission, ...} to create a Treasury. 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 object ID or name. The 'object' field is CRITICAL and REQUIRED in both cases.");
71
+ }).strict().describe("On-chain Treasury operations. USAGE: (1) CREATE NEW: Set 'object' field with OBJECT format {name, type_parameter, permission, ...} to create a Treasury. 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.");
72
72
  export const CallTreasury_InputSchema = z.object({
73
73
  data: CallTreasury_DataSchema,
74
74
  env: CallEnvSchema.optional(),
@@ -2875,6 +2875,7 @@ export declare const ObjectProgressSchema: z.ZodObject<{
2875
2875
  threshold: number;
2876
2876
  }>, "many">;
2877
2877
  history_count: z.ZodNumber;
2878
+ current_time: z.ZodNumber;
2878
2879
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2879
2880
  object: z.ZodString;
2880
2881
  type: z.ZodOptional<z.ZodEnum<[import("wowok").ObjectType.Permission, import("wowok").ObjectType.Repository, import("wowok").ObjectType.Arb, import("wowok").ObjectType.Arbitration, import("wowok").ObjectType.Service, import("wowok").ObjectType.Machine, import("wowok").ObjectType.Order, import("wowok").ObjectType.Progress, import("wowok").ObjectType.Payment, import("wowok").ObjectType.Treasury, import("wowok").ObjectType.Guard, import("wowok").ObjectType.Demand, import("wowok").ObjectType.Passport, import("wowok").ObjectType.Allocation, import("wowok").ObjectType.Resource, import("wowok").ObjectType.Reward, import("wowok").ObjectType.Discount, import("wowok").ObjectType.EntityRegistrar, import("wowok").ObjectType.EntityLinker, import("wowok").ObjectType.Proof, import("wowok").ObjectType.WReceivedObject, import("wowok").ObjectType.Contact, import("wowok").ObjectType.TableItem_ProgressHistory, import("wowok").ObjectType.TableItem_PermissionPerm, import("wowok").ObjectType.TableItem_DemandPresenter, import("wowok").ObjectType.TableItem_MachineNode, import("wowok").ObjectType.TableItem_TreasuryHistory, import("wowok").ObjectType.TableItem_RepositoryData, import("wowok").ObjectType.TableItem_RewardRecord, import("wowok").ObjectType.TableItem_EntityLinker, import("wowok").ObjectType.TableItem_AddressMark, import("wowok").ObjectType.TableItem_EntityRegistrar]>>;
@@ -3071,6 +3072,7 @@ export declare const ObjectProgressSchema: z.ZodObject<{
3071
3072
  threshold: number;
3072
3073
  }>, "many">;
3073
3074
  history_count: z.ZodNumber;
3075
+ current_time: z.ZodNumber;
3074
3076
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
3075
3077
  object: z.ZodString;
3076
3078
  type: z.ZodOptional<z.ZodEnum<[import("wowok").ObjectType.Permission, import("wowok").ObjectType.Repository, import("wowok").ObjectType.Arb, import("wowok").ObjectType.Arbitration, import("wowok").ObjectType.Service, import("wowok").ObjectType.Machine, import("wowok").ObjectType.Order, import("wowok").ObjectType.Progress, import("wowok").ObjectType.Payment, import("wowok").ObjectType.Treasury, import("wowok").ObjectType.Guard, import("wowok").ObjectType.Demand, import("wowok").ObjectType.Passport, import("wowok").ObjectType.Allocation, import("wowok").ObjectType.Resource, import("wowok").ObjectType.Reward, import("wowok").ObjectType.Discount, import("wowok").ObjectType.EntityRegistrar, import("wowok").ObjectType.EntityLinker, import("wowok").ObjectType.Proof, import("wowok").ObjectType.WReceivedObject, import("wowok").ObjectType.Contact, import("wowok").ObjectType.TableItem_ProgressHistory, import("wowok").ObjectType.TableItem_PermissionPerm, import("wowok").ObjectType.TableItem_DemandPresenter, import("wowok").ObjectType.TableItem_MachineNode, import("wowok").ObjectType.TableItem_TreasuryHistory, import("wowok").ObjectType.TableItem_RepositoryData, import("wowok").ObjectType.TableItem_RewardRecord, import("wowok").ObjectType.TableItem_EntityLinker, import("wowok").ObjectType.TableItem_AddressMark, import("wowok").ObjectType.TableItem_EntityRegistrar]>>;
@@ -3267,6 +3269,7 @@ export declare const ObjectProgressSchema: z.ZodObject<{
3267
3269
  threshold: number;
3268
3270
  }>, "many">;
3269
3271
  history_count: z.ZodNumber;
3272
+ current_time: z.ZodNumber;
3270
3273
  }, z.ZodTypeAny, "passthrough">>;
3271
3274
  export declare const AmountSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3272
3275
  type: z.ZodLiteral<"GuardU64Identifier">;
@@ -14631,6 +14634,7 @@ export declare const ObjectUnionSchema: z.ZodUnion<[z.ZodObject<{
14631
14634
  threshold: number;
14632
14635
  }>, "many">;
14633
14636
  history_count: z.ZodNumber;
14637
+ current_time: z.ZodNumber;
14634
14638
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
14635
14639
  object: z.ZodString;
14636
14640
  type: z.ZodOptional<z.ZodEnum<[import("wowok").ObjectType.Permission, import("wowok").ObjectType.Repository, import("wowok").ObjectType.Arb, import("wowok").ObjectType.Arbitration, import("wowok").ObjectType.Service, import("wowok").ObjectType.Machine, import("wowok").ObjectType.Order, import("wowok").ObjectType.Progress, import("wowok").ObjectType.Payment, import("wowok").ObjectType.Treasury, import("wowok").ObjectType.Guard, import("wowok").ObjectType.Demand, import("wowok").ObjectType.Passport, import("wowok").ObjectType.Allocation, import("wowok").ObjectType.Resource, import("wowok").ObjectType.Reward, import("wowok").ObjectType.Discount, import("wowok").ObjectType.EntityRegistrar, import("wowok").ObjectType.EntityLinker, import("wowok").ObjectType.Proof, import("wowok").ObjectType.WReceivedObject, import("wowok").ObjectType.Contact, import("wowok").ObjectType.TableItem_ProgressHistory, import("wowok").ObjectType.TableItem_PermissionPerm, import("wowok").ObjectType.TableItem_DemandPresenter, import("wowok").ObjectType.TableItem_MachineNode, import("wowok").ObjectType.TableItem_TreasuryHistory, import("wowok").ObjectType.TableItem_RepositoryData, import("wowok").ObjectType.TableItem_RewardRecord, import("wowok").ObjectType.TableItem_EntityLinker, import("wowok").ObjectType.TableItem_AddressMark, import("wowok").ObjectType.TableItem_EntityRegistrar]>>;
@@ -14827,6 +14831,7 @@ export declare const ObjectUnionSchema: z.ZodUnion<[z.ZodObject<{
14827
14831
  threshold: number;
14828
14832
  }>, "many">;
14829
14833
  history_count: z.ZodNumber;
14834
+ current_time: z.ZodNumber;
14830
14835
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
14831
14836
  object: z.ZodString;
14832
14837
  type: z.ZodOptional<z.ZodEnum<[import("wowok").ObjectType.Permission, import("wowok").ObjectType.Repository, import("wowok").ObjectType.Arb, import("wowok").ObjectType.Arbitration, import("wowok").ObjectType.Service, import("wowok").ObjectType.Machine, import("wowok").ObjectType.Order, import("wowok").ObjectType.Progress, import("wowok").ObjectType.Payment, import("wowok").ObjectType.Treasury, import("wowok").ObjectType.Guard, import("wowok").ObjectType.Demand, import("wowok").ObjectType.Passport, import("wowok").ObjectType.Allocation, import("wowok").ObjectType.Resource, import("wowok").ObjectType.Reward, import("wowok").ObjectType.Discount, import("wowok").ObjectType.EntityRegistrar, import("wowok").ObjectType.EntityLinker, import("wowok").ObjectType.Proof, import("wowok").ObjectType.WReceivedObject, import("wowok").ObjectType.Contact, import("wowok").ObjectType.TableItem_ProgressHistory, import("wowok").ObjectType.TableItem_PermissionPerm, import("wowok").ObjectType.TableItem_DemandPresenter, import("wowok").ObjectType.TableItem_MachineNode, import("wowok").ObjectType.TableItem_TreasuryHistory, import("wowok").ObjectType.TableItem_RepositoryData, import("wowok").ObjectType.TableItem_RewardRecord, import("wowok").ObjectType.TableItem_EntityLinker, import("wowok").ObjectType.TableItem_AddressMark, import("wowok").ObjectType.TableItem_EntityRegistrar]>>;
@@ -15023,6 +15028,7 @@ export declare const ObjectUnionSchema: z.ZodUnion<[z.ZodObject<{
15023
15028
  threshold: number;
15024
15029
  }>, "many">;
15025
15030
  history_count: z.ZodNumber;
15031
+ current_time: z.ZodNumber;
15026
15032
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
15027
15033
  object: z.ZodString;
15028
15034
  type: z.ZodOptional<z.ZodEnum<[import("wowok").ObjectType.Permission, import("wowok").ObjectType.Repository, import("wowok").ObjectType.Arb, import("wowok").ObjectType.Arbitration, import("wowok").ObjectType.Service, import("wowok").ObjectType.Machine, import("wowok").ObjectType.Order, import("wowok").ObjectType.Progress, import("wowok").ObjectType.Payment, import("wowok").ObjectType.Treasury, import("wowok").ObjectType.Guard, import("wowok").ObjectType.Demand, import("wowok").ObjectType.Passport, import("wowok").ObjectType.Allocation, import("wowok").ObjectType.Resource, import("wowok").ObjectType.Reward, import("wowok").ObjectType.Discount, import("wowok").ObjectType.EntityRegistrar, import("wowok").ObjectType.EntityLinker, import("wowok").ObjectType.Proof, import("wowok").ObjectType.WReceivedObject, import("wowok").ObjectType.Contact, import("wowok").ObjectType.TableItem_ProgressHistory, import("wowok").ObjectType.TableItem_PermissionPerm, import("wowok").ObjectType.TableItem_DemandPresenter, import("wowok").ObjectType.TableItem_MachineNode, import("wowok").ObjectType.TableItem_TreasuryHistory, import("wowok").ObjectType.TableItem_RepositoryData, import("wowok").ObjectType.TableItem_RewardRecord, import("wowok").ObjectType.TableItem_EntityLinker, import("wowok").ObjectType.TableItem_AddressMark, import("wowok").ObjectType.TableItem_EntityRegistrar]>>;
@@ -22763,6 +22769,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
22763
22769
  threshold: number;
22764
22770
  }>, "many">;
22765
22771
  history_count: z.ZodNumber;
22772
+ current_time: z.ZodNumber;
22766
22773
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
22767
22774
  object: z.ZodString;
22768
22775
  type: z.ZodOptional<z.ZodEnum<[import("wowok").ObjectType.Permission, import("wowok").ObjectType.Repository, import("wowok").ObjectType.Arb, import("wowok").ObjectType.Arbitration, import("wowok").ObjectType.Service, import("wowok").ObjectType.Machine, import("wowok").ObjectType.Order, import("wowok").ObjectType.Progress, import("wowok").ObjectType.Payment, import("wowok").ObjectType.Treasury, import("wowok").ObjectType.Guard, import("wowok").ObjectType.Demand, import("wowok").ObjectType.Passport, import("wowok").ObjectType.Allocation, import("wowok").ObjectType.Resource, import("wowok").ObjectType.Reward, import("wowok").ObjectType.Discount, import("wowok").ObjectType.EntityRegistrar, import("wowok").ObjectType.EntityLinker, import("wowok").ObjectType.Proof, import("wowok").ObjectType.WReceivedObject, import("wowok").ObjectType.Contact, import("wowok").ObjectType.TableItem_ProgressHistory, import("wowok").ObjectType.TableItem_PermissionPerm, import("wowok").ObjectType.TableItem_DemandPresenter, import("wowok").ObjectType.TableItem_MachineNode, import("wowok").ObjectType.TableItem_TreasuryHistory, import("wowok").ObjectType.TableItem_RepositoryData, import("wowok").ObjectType.TableItem_RewardRecord, import("wowok").ObjectType.TableItem_EntityLinker, import("wowok").ObjectType.TableItem_AddressMark, import("wowok").ObjectType.TableItem_EntityRegistrar]>>;
@@ -22959,6 +22966,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
22959
22966
  threshold: number;
22960
22967
  }>, "many">;
22961
22968
  history_count: z.ZodNumber;
22969
+ current_time: z.ZodNumber;
22962
22970
  }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
22963
22971
  object: z.ZodString;
22964
22972
  type: z.ZodOptional<z.ZodEnum<[import("wowok").ObjectType.Permission, import("wowok").ObjectType.Repository, import("wowok").ObjectType.Arb, import("wowok").ObjectType.Arbitration, import("wowok").ObjectType.Service, import("wowok").ObjectType.Machine, import("wowok").ObjectType.Order, import("wowok").ObjectType.Progress, import("wowok").ObjectType.Payment, import("wowok").ObjectType.Treasury, import("wowok").ObjectType.Guard, import("wowok").ObjectType.Demand, import("wowok").ObjectType.Passport, import("wowok").ObjectType.Allocation, import("wowok").ObjectType.Resource, import("wowok").ObjectType.Reward, import("wowok").ObjectType.Discount, import("wowok").ObjectType.EntityRegistrar, import("wowok").ObjectType.EntityLinker, import("wowok").ObjectType.Proof, import("wowok").ObjectType.WReceivedObject, import("wowok").ObjectType.Contact, import("wowok").ObjectType.TableItem_ProgressHistory, import("wowok").ObjectType.TableItem_PermissionPerm, import("wowok").ObjectType.TableItem_DemandPresenter, import("wowok").ObjectType.TableItem_MachineNode, import("wowok").ObjectType.TableItem_TreasuryHistory, import("wowok").ObjectType.TableItem_RepositoryData, import("wowok").ObjectType.TableItem_RewardRecord, import("wowok").ObjectType.TableItem_EntityLinker, import("wowok").ObjectType.TableItem_AddressMark, import("wowok").ObjectType.TableItem_EntityRegistrar]>>;
@@ -23155,6 +23163,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
23155
23163
  threshold: number;
23156
23164
  }>, "many">;
23157
23165
  history_count: z.ZodNumber;
23166
+ current_time: z.ZodNumber;
23158
23167
  }, z.ZodTypeAny, "passthrough">>, z.ZodObject<{
23159
23168
  object: z.ZodString;
23160
23169
  type: z.ZodOptional<z.ZodEnum<[import("wowok").ObjectType.Permission, import("wowok").ObjectType.Repository, import("wowok").ObjectType.Arb, import("wowok").ObjectType.Arbitration, import("wowok").ObjectType.Service, import("wowok").ObjectType.Machine, import("wowok").ObjectType.Order, import("wowok").ObjectType.Progress, import("wowok").ObjectType.Payment, import("wowok").ObjectType.Treasury, import("wowok").ObjectType.Guard, import("wowok").ObjectType.Demand, import("wowok").ObjectType.Passport, import("wowok").ObjectType.Allocation, import("wowok").ObjectType.Resource, import("wowok").ObjectType.Reward, import("wowok").ObjectType.Discount, import("wowok").ObjectType.EntityRegistrar, import("wowok").ObjectType.EntityLinker, import("wowok").ObjectType.Proof, import("wowok").ObjectType.WReceivedObject, import("wowok").ObjectType.Contact, import("wowok").ObjectType.TableItem_ProgressHistory, import("wowok").ObjectType.TableItem_PermissionPerm, import("wowok").ObjectType.TableItem_DemandPresenter, import("wowok").ObjectType.TableItem_MachineNode, import("wowok").ObjectType.TableItem_TreasuryHistory, import("wowok").ObjectType.TableItem_RepositoryData, import("wowok").ObjectType.TableItem_RewardRecord, import("wowok").ObjectType.TableItem_EntityLinker, import("wowok").ObjectType.TableItem_AddressMark, import("wowok").ObjectType.TableItem_EntityRegistrar]>>;
@@ -29595,6 +29604,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
29595
29604
  threshold: number;
29596
29605
  }>, "many">;
29597
29606
  history_count: z.ZodNumber;
29607
+ current_time: z.ZodNumber;
29598
29608
  }, z.ZodTypeAny, "passthrough"> | z.objectOutputType<{
29599
29609
  object: z.ZodString;
29600
29610
  type: z.ZodOptional<z.ZodEnum<[import("wowok").ObjectType.Permission, import("wowok").ObjectType.Repository, import("wowok").ObjectType.Arb, import("wowok").ObjectType.Arbitration, import("wowok").ObjectType.Service, import("wowok").ObjectType.Machine, import("wowok").ObjectType.Order, import("wowok").ObjectType.Progress, import("wowok").ObjectType.Payment, import("wowok").ObjectType.Treasury, import("wowok").ObjectType.Guard, import("wowok").ObjectType.Demand, import("wowok").ObjectType.Passport, import("wowok").ObjectType.Allocation, import("wowok").ObjectType.Resource, import("wowok").ObjectType.Reward, import("wowok").ObjectType.Discount, import("wowok").ObjectType.EntityRegistrar, import("wowok").ObjectType.EntityLinker, import("wowok").ObjectType.Proof, import("wowok").ObjectType.WReceivedObject, import("wowok").ObjectType.Contact, import("wowok").ObjectType.TableItem_ProgressHistory, import("wowok").ObjectType.TableItem_PermissionPerm, import("wowok").ObjectType.TableItem_DemandPresenter, import("wowok").ObjectType.TableItem_MachineNode, import("wowok").ObjectType.TableItem_TreasuryHistory, import("wowok").ObjectType.TableItem_RepositoryData, import("wowok").ObjectType.TableItem_RewardRecord, import("wowok").ObjectType.TableItem_EntityLinker, import("wowok").ObjectType.TableItem_AddressMark, import("wowok").ObjectType.TableItem_EntityRegistrar]>>;
@@ -32307,6 +32317,7 @@ export declare const ObjectsAnswerSchema: z.ZodObject<{
32307
32317
  threshold: number;
32308
32318
  }>, "many">;
32309
32319
  history_count: z.ZodNumber;
32320
+ current_time: z.ZodNumber;
32310
32321
  }, z.ZodTypeAny, "passthrough"> | z.objectInputType<{
32311
32322
  object: z.ZodString;
32312
32323
  type: z.ZodOptional<z.ZodEnum<[import("wowok").ObjectType.Permission, import("wowok").ObjectType.Repository, import("wowok").ObjectType.Arb, import("wowok").ObjectType.Arbitration, import("wowok").ObjectType.Service, import("wowok").ObjectType.Machine, import("wowok").ObjectType.Order, import("wowok").ObjectType.Progress, import("wowok").ObjectType.Payment, import("wowok").ObjectType.Treasury, import("wowok").ObjectType.Guard, import("wowok").ObjectType.Demand, import("wowok").ObjectType.Passport, import("wowok").ObjectType.Allocation, import("wowok").ObjectType.Resource, import("wowok").ObjectType.Reward, import("wowok").ObjectType.Discount, import("wowok").ObjectType.EntityRegistrar, import("wowok").ObjectType.EntityLinker, import("wowok").ObjectType.Proof, import("wowok").ObjectType.WReceivedObject, import("wowok").ObjectType.Contact, import("wowok").ObjectType.TableItem_ProgressHistory, import("wowok").ObjectType.TableItem_PermissionPerm, import("wowok").ObjectType.TableItem_DemandPresenter, import("wowok").ObjectType.TableItem_MachineNode, import("wowok").ObjectType.TableItem_TreasuryHistory, import("wowok").ObjectType.TableItem_RepositoryData, import("wowok").ObjectType.TableItem_RewardRecord, import("wowok").ObjectType.TableItem_EntityLinker, import("wowok").ObjectType.TableItem_AddressMark, import("wowok").ObjectType.TableItem_EntityRegistrar]>>;
@@ -117,8 +117,8 @@ export const ServiceSaleSchema = z.object({
117
117
  price: BalanceTypeSchema.describe("Price of the product or service"), // BalanceType type
118
118
  stock: BalanceTypeSchema.describe("Stock of the product or service"), // BalanceType type
119
119
  suspension: z.boolean().describe("Whether sale is suspended"),
120
- wip: z.string().describe("URL of wip file"),
121
- wip_hash: z.string().describe("Hash of wip file"),
120
+ wip: z.string().describe("HTTP URL of wip file"),
121
+ wip_hash: z.string().describe(`Hash of WIP. If EMPTY string, the hash within wip will be automatically used; else, the consistency of the hash within wip will be verified with the provided hash.`),
122
122
  }).describe("Service sale");
123
123
  // 定义PurchasedItem schema
124
124
  export const PurchasedItemSchema = z.object({
@@ -173,6 +173,7 @@ export const ObjectProgressSchema = ObjectBaseSchema.extend({
173
173
  namedOperator: z.array(NamedOperatorSchema).describe("Namespace operator list. Each process can independently maintain operators for permissions represented by its namespace."),
174
174
  session: z.array(ProgressSessionSchema).describe("Progress session list"),
175
175
  history_count: z.number().describe("Number of historical sessions for completed nodes in Progress. Use 'query_table' or 'query_table_item' to get 'ProgressHistory' table items."),
176
+ current_time: z.number().describe("Current node entry timestamp"),
176
177
  }).describe("Progress object");
177
178
  // 定义Amount schema
178
179
  export const AmountSchema = z.discriminatedUnion("type", [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wowok_agent",
3
- "version": "2.1.36",
4
- "description": "Making It Easy for Agents to Communicate, Collaborate, Trade, and Trust.",
3
+ "version": "2.1.38",
4
+ "description": "Making It Easy for AI Agents to Communicate, Collaborate, Trade, and Trust.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "module": "node",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@modelcontextprotocol/sdk": "^1.29.0",
32
32
  "lodash": "^4.18.1",
33
- "wowok": "2.1.35",
33
+ "wowok": "2.1.38",
34
34
  "zod": "^3.25.76"
35
35
  },
36
36
  "devDependencies": {