@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,76 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { WithPermissionObjectSchema, ObjectsSchema, CallEnvSchema, SubmissionCallSchema, } from "./base.js";
|
|
3
|
+
import { AccountOrMark_AddressSchema, DescriptionSchema, NameOrAddressSchema, NameSchema, ReceivedObjectsOrRecentlySchema } from "../common/index.js";
|
|
4
|
+
import { PolicyRuleSchema } from "../query/index.js";
|
|
5
|
+
import { SupportedValueSchema } from "../common/index.js";
|
|
6
|
+
export const RepositoryIdSchema = z.union([
|
|
7
|
+
AccountOrMark_AddressSchema,
|
|
8
|
+
z.number().int(),
|
|
9
|
+
]).describe("Data item ID. If a number (such as time) is specified, it will be automatically converted to an address or ID type.");
|
|
10
|
+
export const KeyDataSchema = z.object({
|
|
11
|
+
id: RepositoryIdSchema,
|
|
12
|
+
data: SupportedValueSchema,
|
|
13
|
+
}).strict().describe("Data ID and value.");
|
|
14
|
+
export const RepDataItemSchema = z.object({
|
|
15
|
+
data: z.array(KeyDataSchema).describe("Data item list."),
|
|
16
|
+
write_guard: NameOrAddressSchema.optional().describe("Guard ID or name. Used to specify the policy write permissions and rules corresponding to this Guard."),
|
|
17
|
+
}).strict().describe("List of data items to write.");
|
|
18
|
+
export const SignerOrClockBaseSchema = z.object({
|
|
19
|
+
name: NameSchema.describe("Data item name."),
|
|
20
|
+
write_guard: NameOrAddressSchema.optional().describe("Guard ID or name. Used to specify the policy write permissions and rules corresponding to this Guard."),
|
|
21
|
+
}).strict().describe("Specify data items by name and ID. ID is the on-chain timestamp or signer ID (depending on how write_guard specifies the ID source).");
|
|
22
|
+
export const SignerOrClockSchema = z.object({
|
|
23
|
+
name: NameSchema.describe("Data item name."),
|
|
24
|
+
write_guard: NameOrAddressSchema.optional().describe("Guard ID or name. Used to specify the policy write permissions and rules corresponding to this Guard."),
|
|
25
|
+
data: SupportedValueSchema,
|
|
26
|
+
}).strict().describe("Specify data items by name and data. ID is the on-chain timestamp or signer ID (depending on how write_guard specifies the ID source).");
|
|
27
|
+
export const DataRemoveItemSchema = z.object({
|
|
28
|
+
id: z.array(RepositoryIdSchema).describe("Data item ID list."),
|
|
29
|
+
write_guard: NameOrAddressSchema.optional().describe("Guard ID or name. Used to verify permission to delete data."),
|
|
30
|
+
}).strict().describe("Delete data items by name and ID list.");
|
|
31
|
+
export const PoliciesAddSetSchema = z.object({
|
|
32
|
+
op: z.enum(["add", "set"]),
|
|
33
|
+
policy: z.array(PolicyRuleSchema).describe("Policy rule list."),
|
|
34
|
+
}).strict().describe("Add or set policy rules.");
|
|
35
|
+
export const PoliciesRemoveSchema = z.object({
|
|
36
|
+
op: z.literal("remove"),
|
|
37
|
+
policy: z.array(NameSchema).describe("Policy rule name list."),
|
|
38
|
+
}).strict().describe("Remove policy rules.");
|
|
39
|
+
export const PoliciesClearSchema = z.object({
|
|
40
|
+
op: z.literal("clear"),
|
|
41
|
+
}).strict().describe("Clear policy rules.");
|
|
42
|
+
export const PoliciesSchema = z.discriminatedUnion("op", [
|
|
43
|
+
PoliciesAddSetSchema,
|
|
44
|
+
PoliciesRemoveSchema,
|
|
45
|
+
PoliciesClearSchema,
|
|
46
|
+
]);
|
|
47
|
+
export const DataAddWithItemsSchema = z.object({
|
|
48
|
+
name: NameSchema.describe("Data item name. Must match the name in PolicyRule."),
|
|
49
|
+
items: z.array(RepDataItemSchema).describe("List of data items to add. Each data item contains name, ID, and data parts, where name and ID together form the unique key for the data."),
|
|
50
|
+
}).strict().describe("Add data by name and data item list. Each data item contains name, ID, and data parts, where name and ID together form the unique key for the data.");
|
|
51
|
+
export const DataAddSchema = z.union([
|
|
52
|
+
SignerOrClockSchema,
|
|
53
|
+
DataAddWithItemsSchema,
|
|
54
|
+
]);
|
|
55
|
+
export const DataRemoveSchema = z.union([
|
|
56
|
+
SignerOrClockBaseSchema,
|
|
57
|
+
z.object({
|
|
58
|
+
name: NameSchema.describe("Data item name. Must match the name in PolicyRule."),
|
|
59
|
+
items: z.array(DataRemoveItemSchema).describe("List of data items to delete."),
|
|
60
|
+
}).strict(),
|
|
61
|
+
]);
|
|
62
|
+
export const CallRepository_DataSchema = z.object({
|
|
63
|
+
object: WithPermissionObjectSchema,
|
|
64
|
+
description: DescriptionSchema.optional(),
|
|
65
|
+
policies: PoliciesSchema.optional().describe("Policy list. Used to define data item write permissions and rules, as well as data item read permissions."),
|
|
66
|
+
data_add: DataAddSchema.optional().describe("Add data items"),
|
|
67
|
+
data_remove: DataRemoveSchema.optional().describe("Delete data items"),
|
|
68
|
+
rewards: ObjectsSchema.optional().describe("Reward object list. Used for data contribution incentives."),
|
|
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
|
+
um: z.union([NameOrAddressSchema, z.null()]).optional().describe("Contact object."),
|
|
71
|
+
}).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.");
|
|
72
|
+
export const CallRepository_InputSchema = z.object({
|
|
73
|
+
data: CallRepository_DataSchema,
|
|
74
|
+
env: CallEnvSchema.optional(),
|
|
75
|
+
submission: SubmissionCallSchema.optional(),
|
|
76
|
+
}).strict();
|