@wowok/agent-mcp 2.3.16 → 2.3.18
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/dist/customer/index.d.ts +9 -0
- package/dist/customer/index.js +9 -0
- package/dist/customer/industry-risks.d.ts +4 -0
- package/dist/customer/industry-risks.js +14 -0
- package/dist/customer/user-preferences.d.ts +3 -0
- package/dist/customer/user-preferences.js +9 -0
- package/dist/experience/realtime-feedback.js +17 -0
- package/dist/index.js +360 -273
- package/dist/knowledge/acquisition-flywheel.d.ts +3 -0
- package/dist/knowledge/acquisition-flywheel.js +9 -0
- package/dist/knowledge/guard-ledger.d.ts +19 -0
- package/dist/knowledge/guard-ledger.js +219 -0
- package/dist/knowledge/guard-puzzle.d.ts +93 -0
- package/dist/knowledge/guard-puzzle.js +278 -0
- package/dist/knowledge/guard-risk.d.ts +60 -0
- package/dist/knowledge/guard-risk.js +474 -0
- package/dist/knowledge/guard-translation.d.ts +46 -0
- package/dist/knowledge/guard-translation.js +487 -0
- package/dist/knowledge/index.d.ts +13 -0
- package/dist/knowledge/index.js +13 -0
- package/dist/knowledge/industry-registry.d.ts +1 -2
- package/dist/knowledge/industry-registry.js +23 -3
- package/dist/knowledge/safety-rules.js +61 -0
- package/dist/knowledge/tool-constraints.js +12 -22
- package/dist/safety/confirm-gate.d.ts +4 -2
- package/dist/safety/confirm-gate.js +48 -4
- package/dist/schema/call/allocation.d.ts +24 -14
- package/dist/schema/call/arbitration.d.ts +142 -132
- package/dist/schema/call/base.d.ts +901 -43
- package/dist/schema/call/base.js +66 -2
- package/dist/schema/call/bridge-handler.js +15 -2
- package/dist/schema/call/bridge.d.ts +769 -1
- package/dist/schema/call/bridge.js +37 -0
- package/dist/schema/call/contact.d.ts +10 -0
- package/dist/schema/call/demand.d.ts +10 -0
- package/dist/schema/call/guard.d.ts +76 -46
- package/dist/schema/call/handler.js +46 -14
- package/dist/schema/call/machine.d.ts +158 -138
- package/dist/schema/call/order.d.ts +10 -0
- package/dist/schema/call/payment.d.ts +10 -0
- package/dist/schema/call/permission.d.ts +232 -222
- package/dist/schema/call/personal.d.ts +10 -0
- package/dist/schema/call/progress.d.ts +10 -0
- package/dist/schema/call/proof.d.ts +20 -0
- package/dist/schema/call/repository.d.ts +32 -22
- package/dist/schema/call/reward.d.ts +10 -0
- package/dist/schema/call/semantic.d.ts +9 -2
- package/dist/schema/call/semantic.js +409 -21
- package/dist/schema/call/service.d.ts +20 -10
- package/dist/schema/call/treasury.d.ts +10 -0
- package/dist/schema/config/index.d.ts +18 -0
- package/dist/schema/config/index.js +17 -0
- package/dist/schema/index.d.ts +6 -0
- package/dist/schema/index.js +5 -0
- package/dist/schema/local/index.d.ts +9 -9
- package/dist/schema/local/index.js +9 -0
- package/dist/schema/messenger/index.d.ts +350 -29
- package/dist/schema/messenger/index.js +17 -17
- package/dist/schema/operations.d.ts +1667 -545
- package/dist/schema/operations.js +91 -96
- package/dist/schema/project/index.d.ts +21 -0
- package/dist/schema/project/index.js +32 -0
- package/dist/schema/query/index.d.ts +1074 -168
- package/dist/schema/query/index.js +8 -8
- package/dist/schema/schema-query/index.d.ts +33 -0
- package/dist/schema/schema-query/index.js +36 -0
- package/dist/schema/schema-version.d.ts +25 -0
- package/dist/schema/schema-version.js +76 -0
- package/dist/schema/trust/index.d.ts +407 -0
- package/dist/schema/trust/index.js +113 -0
- package/dist/schemas/bridge_operation.output.json +224 -0
- package/dist/schemas/bridge_operation.schema.json +67 -8
- package/dist/schemas/config_operation.output.json +18 -0
- package/dist/schemas/config_operation.schema.json +34 -0
- package/dist/schemas/guard-node-schema.json +82 -0
- package/dist/schemas/guard2file.schema.json +8 -0
- package/dist/schemas/index.json +19 -1
- package/dist/schemas/machineNode2file.schema.json +8 -0
- package/dist/schemas/messenger_operation.output.json +224 -0
- package/dist/schemas/onchain_events.output.json +718 -0
- package/dist/schemas/onchain_operations.output.json +277 -2
- package/dist/schemas/onchain_operations.schema.json +19 -16
- package/dist/schemas/onchain_operations_allocation.schema.json +8 -0
- package/dist/schemas/onchain_operations_arbitration.schema.json +8 -0
- package/dist/schemas/onchain_operations_contact.schema.json +8 -0
- package/dist/schemas/onchain_operations_demand.schema.json +8 -0
- package/dist/schemas/onchain_operations_gen_passport.schema.json +16 -0
- package/dist/schemas/onchain_operations_guard.schema.json +11 -16
- package/dist/schemas/onchain_operations_machine.schema.json +8 -0
- package/dist/schemas/onchain_operations_order.schema.json +8 -0
- package/dist/schemas/onchain_operations_payment.schema.json +8 -0
- package/dist/schemas/onchain_operations_permission.schema.json +8 -0
- package/dist/schemas/onchain_operations_personal.schema.json +8 -0
- package/dist/schemas/onchain_operations_progress.schema.json +8 -0
- package/dist/schemas/onchain_operations_repository.schema.json +8 -0
- package/dist/schemas/onchain_operations_reward.schema.json +8 -0
- package/dist/schemas/onchain_operations_service.schema.json +8 -0
- package/dist/schemas/onchain_operations_treasury.schema.json +8 -0
- package/dist/schemas/onchain_table_data.output.json +718 -0
- package/dist/schemas/project_operation.output.json +18 -0
- package/dist/schemas/project_operation.schema.json +42 -0
- package/dist/schemas/query_toolkit.schema.json +360 -368
- package/dist/schemas/schema_query.schema.json +6 -3
- package/dist/schemas/trust_score.output.json +327 -0
- package/dist/schemas/trust_score.schema.json +46 -0
- package/package.json +2 -2
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { CallService_DataSchema, CallMachine_DataSchema, CallProgress_DataSchema, CallRepository_DataSchema, CallArbitration_DataSchema, CallContact_DataSchema, CallTreasury_DataSchema, CallReward_DataSchema, CallAllocation_DataSchema, CallPermission_DataSchema, CallGuard_DataSchema, CallPersonal_DataSchema, CallPayment_DataSchema, CallDemand_DataSchema, CallOrder_DataSchema, CallProof_DataSchema, CallGenProof_InputSchema, CallEnvSchema, SubmissionCallSchema, } from './call/index.js';
|
|
3
|
-
const SemanticSummarySchema = z.any();
|
|
2
|
+
import { CallService_DataSchema, CallMachine_DataSchema, CallProgress_DataSchema, CallRepository_DataSchema, CallArbitration_DataSchema, CallContact_DataSchema, CallTreasury_DataSchema, CallReward_DataSchema, CallAllocation_DataSchema, CallPermission_DataSchema, CallGuard_DataSchema, CallPersonal_DataSchema, CallPayment_DataSchema, CallDemand_DataSchema, CallOrder_DataSchema, CallProof_DataSchema, CallGenProof_InputSchema, CallEnvSchema, SubmissionCallSchema, SemanticSummarySchema, } from './call/index.js';
|
|
4
3
|
import { WipGenerationOptionsSchema, WipToHtmlOptionsSchema, LocalMarkFilterSchema, AccountFilterSchema, LocalInfoFilterSchema, TokenDataFilterSchema, } from './local/index.js';
|
|
5
4
|
import { NameOrAddressSchema, AccountOrMark_AddressSchema, AccountOrMark_AddressAISchema, EntrypointSchema, TokenTypeSchema, ObjectBaseSchema, } from './common/index.js';
|
|
6
5
|
import { TableAnswerSchema, TableItem_RepositoryDataSchema, TableItem_PermissionPermSchema, TableItem_EntityRegistrarSchema, TableItem_EntityLinkerSchema, TableItem_RewardRecordSchema, TableItem_DemandPresenterSchema, TableItem_TreasuryHistorySchema, TableItem_MachineNodeSchema, TableItem_ProgressHistorySchema, TableItem_AddressMarkSchema, } from './query/index.js';
|
|
@@ -49,102 +48,102 @@ export const OnchainOperationsSchema = z.preprocess((input) => {
|
|
|
49
48
|
data: CallService_DataSchema,
|
|
50
49
|
env: CallEnvSchema.optional(),
|
|
51
50
|
submission: SubmissionCallSchema.optional(),
|
|
52
|
-
}).describe("🏪 Service Object: Create and manage product/service listings with transparent promises, bind workflow templates to order processing, set pricing, issue discount coupons to customers, and establish quality standards, etc.."),
|
|
51
|
+
}).strict().describe("🏪 Service Object: Create and manage product/service listings with transparent promises, bind workflow templates to order processing, set pricing, issue discount coupons to customers, and establish quality standards, etc.."),
|
|
53
52
|
z.object({
|
|
54
53
|
operation_type: z.literal("machine"),
|
|
55
54
|
data: CallMachine_DataSchema,
|
|
56
55
|
env: CallEnvSchema.optional(),
|
|
57
56
|
submission: SubmissionCallSchema.optional(),
|
|
58
|
-
}).describe("⚙️ Machine Object: Design and deploy automated workflow templates (Machines) that define how services are delivered, etc.."),
|
|
57
|
+
}).strict().describe("⚙️ Machine Object: Design and deploy automated workflow templates (Machines) that define how services are delivered, etc.."),
|
|
59
58
|
z.object({
|
|
60
59
|
operation_type: z.literal("progress"),
|
|
61
60
|
data: CallProgress_DataSchema,
|
|
62
61
|
env: CallEnvSchema.optional(),
|
|
63
62
|
submission: SubmissionCallSchema.optional(),
|
|
64
|
-
}).describe("📊 Progress Object: Track and manage active workflows in real-time."),
|
|
63
|
+
}).strict().describe("📊 Progress Object: Track and manage active workflows in real-time."),
|
|
65
64
|
z.object({
|
|
66
65
|
operation_type: z.literal("repository"),
|
|
67
66
|
data: CallRepository_DataSchema,
|
|
68
67
|
env: CallEnvSchema.optional(),
|
|
69
68
|
submission: SubmissionCallSchema.optional(),
|
|
70
|
-
}).describe("📦 Repository Object: Read/write database with consensus field + address as key, strongly-typed data as value."),
|
|
69
|
+
}).strict().describe("📦 Repository Object: Read/write database with consensus field + address as key, strongly-typed data as value."),
|
|
71
70
|
z.object({
|
|
72
71
|
operation_type: z.literal("arbitration"),
|
|
73
72
|
data: CallArbitration_DataSchema,
|
|
74
73
|
env: CallEnvSchema.optional(),
|
|
75
74
|
submission: SubmissionCallSchema.optional(),
|
|
76
|
-
}).describe("⚖️ Arbitration Object: Access a transparent on-chain arbitration system for resolving order conflicts."),
|
|
75
|
+
}).strict().describe("⚖️ Arbitration Object: Access a transparent on-chain arbitration system for resolving order conflicts."),
|
|
77
76
|
z.object({
|
|
78
77
|
operation_type: z.literal("contact"),
|
|
79
78
|
data: CallContact_DataSchema,
|
|
80
79
|
env: CallEnvSchema.optional(),
|
|
81
80
|
submission: SubmissionCallSchema.optional(),
|
|
82
|
-
}).describe("💬 Contact Object: Manage on-chain instant messaging contact profiles."),
|
|
81
|
+
}).strict().describe("💬 Contact Object: Manage on-chain instant messaging contact profiles."),
|
|
83
82
|
z.object({
|
|
84
83
|
operation_type: z.literal("treasury"),
|
|
85
84
|
data: CallTreasury_DataSchema,
|
|
86
85
|
env: CallEnvSchema.optional(),
|
|
87
86
|
submission: SubmissionCallSchema.optional(),
|
|
88
|
-
}).describe("💰 Treasury Object: Create and manage treasury for team funds with deposit/withdrawal rules, etc.."),
|
|
87
|
+
}).strict().describe("💰 Treasury Object: Create and manage treasury for team funds with deposit/withdrawal rules, etc.."),
|
|
89
88
|
z.object({
|
|
90
89
|
operation_type: z.literal("reward"),
|
|
91
90
|
data: CallReward_DataSchema,
|
|
92
91
|
env: CallEnvSchema.optional(),
|
|
93
92
|
submission: SubmissionCallSchema.optional(),
|
|
94
|
-
}).describe("🎁 Reward Object: Create reward pools and set claim conditions by Guard verification."),
|
|
93
|
+
}).strict().describe("🎁 Reward Object: Create reward pools and set claim conditions by Guard verification."),
|
|
95
94
|
z.object({
|
|
96
95
|
operation_type: z.literal("allocation"),
|
|
97
96
|
data: CallAllocation_DataSchema,
|
|
98
97
|
env: CallEnvSchema.optional(),
|
|
99
98
|
submission: SubmissionCallSchema.optional(),
|
|
100
|
-
}).describe("📤 Allocation Object: Create distribution plans to auto-distribute funds to multiple recipients."),
|
|
99
|
+
}).strict().describe("📤 Allocation Object: Create distribution plans to auto-distribute funds to multiple recipients."),
|
|
101
100
|
z.object({
|
|
102
101
|
operation_type: z.literal("permission"),
|
|
103
102
|
data: CallPermission_DataSchema,
|
|
104
103
|
env: CallEnvSchema.optional(),
|
|
105
|
-
}).describe("🔐 Permission Object: Define who can perform which operations on WoWok objects. Important Note: If needed, you should first query 'guard instructions' through the 'wowok_buildin_info' tool."),
|
|
104
|
+
}).strict().describe("🔐 Permission Object: Define who can perform which operations on WoWok objects. Important Note: If needed, you should first query 'guard instructions' through the 'wowok_buildin_info' tool."),
|
|
106
105
|
z.object({
|
|
107
106
|
operation_type: z.literal("guard"),
|
|
108
107
|
data: CallGuard_DataSchema,
|
|
109
108
|
env: CallEnvSchema.optional(),
|
|
110
|
-
}).describe("🛡️ Guard Object: Create immutable programmable validation rules that return boolean results. Set 'namedNew' to name the new Guard. Use root.type='node' for direct node tree or root.type='file' to load from file. Use 'wowok_buildin_info' tool with query='guard instructions' for all available operations. NOTE for EntityLinker/EntityRegistrar queries: Add system addresses to the Guard table - ENTITY_LINKER_ADDRESS (0xaaa) for EntityLinker, ENTITY_REGISTRAR_ADDRESS (0xaab) for EntityRegistrar."),
|
|
109
|
+
}).strict().describe("🛡️ Guard Object: Create immutable programmable validation rules that return boolean results. Set 'namedNew' to name the new Guard. Use root.type='node' for direct node tree or root.type='file' to load from file. Use 'wowok_buildin_info' tool with query='guard instructions' for all available operations. NOTE for EntityLinker/EntityRegistrar queries: Add system addresses to the Guard table - ENTITY_LINKER_ADDRESS (0xaaa) for EntityLinker, ENTITY_REGISTRAR_ADDRESS (0xaab) for EntityRegistrar."),
|
|
111
110
|
z.object({
|
|
112
111
|
operation_type: z.literal("personal"),
|
|
113
112
|
data: CallPersonal_DataSchema,
|
|
114
113
|
env: CallEnvSchema.optional(),
|
|
115
|
-
}).describe("🆔 Public Identity Profile: Establish and manage your on-chain public identity. ⚠️ CRITICAL: Everything here is PERMANENTLY PUBLIC on the blockchain!"),
|
|
114
|
+
}).strict().describe("🆔 Public Identity Profile: Establish and manage your on-chain public identity. ⚠️ CRITICAL: Everything here is PERMANENTLY PUBLIC on the blockchain!"),
|
|
116
115
|
z.object({
|
|
117
116
|
operation_type: z.literal("payment"),
|
|
118
117
|
data: CallPayment_DataSchema,
|
|
119
118
|
env: CallEnvSchema.optional(),
|
|
120
|
-
}).describe("💰 Payment Object: Send instant, irreversible coin transfers to any wallet address."),
|
|
119
|
+
}).strict().describe("💰 Payment Object: Send instant, irreversible coin transfers to any wallet address."),
|
|
121
120
|
z.object({
|
|
122
121
|
operation_type: z.literal("demand"),
|
|
123
122
|
data: CallDemand_DataSchema,
|
|
124
123
|
env: CallEnvSchema.optional(),
|
|
125
124
|
submission: SubmissionCallSchema.optional(),
|
|
126
|
-
}).describe("🎯 Demand Object: Post service requests with reward pools on-chain."),
|
|
125
|
+
}).strict().describe("🎯 Demand Object: Post service requests with reward pools on-chain."),
|
|
127
126
|
z.object({
|
|
128
127
|
operation_type: z.literal("order"),
|
|
129
128
|
data: CallOrder_DataSchema,
|
|
130
129
|
env: CallEnvSchema.optional(),
|
|
131
130
|
submission: SubmissionCallSchema.optional(),
|
|
132
|
-
}).describe("📦 Order Object: Manage the order lifecycle, Including operating order arbitration (Arb Object associated with the order), advancing progress (Progress Object associated with the order), extracting order refunds/payments, setting agents, etc."),
|
|
131
|
+
}).strict().describe("📦 Order Object: Manage the order lifecycle, Including operating order arbitration (Arb Object associated with the order), advancing progress (Progress Object associated with the order), extracting order refunds/payments, setting agents, etc."),
|
|
133
132
|
z.object({
|
|
134
133
|
operation_type: z.literal("gen_passport"),
|
|
135
134
|
guard: z.union([z.string(), z.array(z.string())]).describe("Guard object ID(s) to verify and generate passport from. Can be a single guard (string) or multiple guards (array of strings). Supports guard names or addresses."),
|
|
136
135
|
info: SubmissionCallSchema.optional().describe("Optional submission data. If not provided, will attempt to get existing submissions from the guard."),
|
|
137
136
|
env: CallEnvSchema.optional(),
|
|
138
|
-
}).describe("🛂 Generate Verified Passport Object: Create immutable verified credentials after Guard validation passes. Supports verifying multiple guards at once."),
|
|
137
|
+
}).strict().describe("🛂 Generate Verified Passport Object: Create immutable verified credentials after Guard validation passes. Supports verifying multiple guards at once."),
|
|
139
138
|
z.object({
|
|
140
139
|
operation_type: z.literal("proof"),
|
|
141
140
|
data: CallProof_DataSchema,
|
|
142
141
|
env: CallEnvSchema.optional(),
|
|
143
142
|
submission: SubmissionCallSchema.optional(),
|
|
144
|
-
}).describe("📜 Proof Object: Create immutable on-chain proof objects with server signatures. Used for timestamped message proofs, Merkle tree root proofs, etc. Set 'namedNew' in data to name the new Proof."),
|
|
143
|
+
}).strict().describe("📜 Proof Object: Create immutable on-chain proof objects with server signatures. Used for timestamped message proofs, Merkle tree root proofs, etc. Set 'namedNew' in data to name the new Proof."),
|
|
145
144
|
CallGenProof_InputSchema.extend({
|
|
146
145
|
operation_type: z.literal("gen_proof"),
|
|
147
|
-
}).describe("Generate a new Proof object on-chain (convenience function without namedNew wrapper)"),
|
|
146
|
+
}).strict().describe("Generate a new Proof object on-chain (convenience function without namedNew wrapper)"),
|
|
148
147
|
]));
|
|
149
148
|
export const WipOperationsSchema = z.preprocess((input) => {
|
|
150
149
|
if (typeof input === 'object' && input !== null) {
|
|
@@ -172,24 +171,24 @@ export const WipOperationsSchema = z.preprocess((input) => {
|
|
|
172
171
|
type: z.literal("generate"),
|
|
173
172
|
options: WipGenerationOptionsSchema.describe("WIP generation options"),
|
|
174
173
|
outputPath: z.string().describe("Output file path (.wip file). If file exists, it will be overwritten"),
|
|
175
|
-
}).describe("Generate WIP file from markdown text and optional images"),
|
|
174
|
+
}).strict().describe("Generate WIP file from markdown text and optional images"),
|
|
176
175
|
z.object({
|
|
177
176
|
type: z.literal("verify"),
|
|
178
177
|
wipFilePath: z.string().describe("WIP file path to verify. Supports: 1) Local file path (e.g., '/path/to/file.wip', 'C:\\Users\\name\\doc.wip'), 2) Network URL (e.g., 'https://example.com/doc.wip', 'http://site.com/file.wip'), 3) Data URL (e.g., 'data:application/json;base64,eyJ3aXAiOi...')"),
|
|
179
178
|
hash_equal: z.string().optional().describe("Optional expected hash value. If provided, the function will first verify if the file's hash matches this value. If not matched, returns hash mismatch error."),
|
|
180
179
|
requireSignature: z.boolean().optional().describe("Optional flag to require digital signature. If true, verification will fail if WIP file has no signature"),
|
|
181
|
-
}).describe("Verify WIP file integrity and signatures"),
|
|
180
|
+
}).strict().describe("Verify WIP file integrity and signatures"),
|
|
182
181
|
z.object({
|
|
183
182
|
type: z.literal("sign"),
|
|
184
183
|
wipFilePath: z.string().describe("WIP file path to sign. Supports: 1) Local file path (e.g., '/path/to/file.wip'), 2) Network URL (e.g., 'https://example.com/doc.wip'). The file will be loaded, validated, and signed"),
|
|
185
184
|
account: z.string().optional().describe("Signing account (account name or address). If not specified, uses default account"),
|
|
186
185
|
outputPath: z.string().optional().describe("Output file path. If not specified, adds 'signed_' prefix to original file name (e.g., 'doc.wip' becomes 'signed_doc.wip')"),
|
|
187
|
-
}).describe("Sign WIP file with account"),
|
|
186
|
+
}).strict().describe("Sign WIP file with account"),
|
|
188
187
|
z.object({
|
|
189
188
|
type: z.literal("wip2html"),
|
|
190
189
|
wipPath: z.string().describe("WIP file path or directory path. Supports: 1) Single WIP file (e.g., '/path/to/file.wip'), 2) Directory containing .wip files (e.g., '/path/to/wips/'), 3) Network URL (e.g., 'https://example.com/doc.wip'). When directory is provided, all .wip files in the directory will be converted to HTML"),
|
|
191
190
|
options: WipToHtmlOptionsSchema.optional().describe("Conversion options"),
|
|
192
|
-
}).describe("Convert WIP file to HTML format"),
|
|
191
|
+
}).strict().describe("Convert WIP file to HTML format"),
|
|
193
192
|
]));
|
|
194
193
|
export const OnchainTableDataSchema = z.preprocess((input) => {
|
|
195
194
|
if (typeof input === 'object' && input !== null && !Array.isArray(input)) {
|
|
@@ -219,7 +218,7 @@ export const OnchainTableDataSchema = z.preprocess((input) => {
|
|
|
219
218
|
limit: z.union([z.number(), z.null()]).optional().describe("Max items per page"),
|
|
220
219
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
221
220
|
network: EntrypointSchema.optional(),
|
|
222
|
-
}).describe("Paginated query of an on-chain object's dynamic fields table — returns items with keys, types, and object IDs. Use to explore all entries (e.g., all orders in a Service, all records in a Repository). Returns: TableAnswer | undefined (items[], nextCursor, hasNextPage)"),
|
|
221
|
+
}).strict().describe("Paginated query of an on-chain object's dynamic fields table — returns items with keys, types, and object IDs. Use to explore all entries (e.g., all orders in a Service, all records in a Repository). Returns: TableAnswer | undefined (items[], nextCursor, hasNextPage)"),
|
|
223
222
|
z.object({
|
|
224
223
|
query_type: z.literal("onchain_table_item_repository_data"),
|
|
225
224
|
parent: NameOrAddressSchema.describe("Parent Repository object ID"),
|
|
@@ -227,33 +226,33 @@ export const OnchainTableDataSchema = z.preprocess((input) => {
|
|
|
227
226
|
entity: z.union([AccountOrMark_AddressSchema, z.number()]).describe("Entity ID or address that owns/identifies the record"),
|
|
228
227
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
229
228
|
network: EntrypointSchema.optional(),
|
|
230
|
-
}).describe("Query a specific record from a Repository's on-chain key-value database by name and entity. Use to read stored data records. Returns: TableItem_RepositoryData | undefined"),
|
|
229
|
+
}).strict().describe("Query a specific record from a Repository's on-chain key-value database by name and entity. Use to read stored data records. Returns: TableItem_RepositoryData | undefined"),
|
|
231
230
|
z.object({
|
|
232
231
|
query_type: z.literal("onchain_table_item_permission_perm"),
|
|
233
232
|
parent: NameOrAddressSchema.describe("Parent Permission object ID"),
|
|
234
233
|
address: z.union([AccountOrMark_AddressSchema, z.string()]).describe("User address or Guard ID whose permissions to check"),
|
|
235
234
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
236
235
|
network: EntrypointSchema.optional(),
|
|
237
|
-
}).describe("Query a permission entry from a Permission object's perm table — checks what operations a user/guard is allowed to perform. Use to verify access rights. Returns: TableItem_PermissionPerm | undefined"),
|
|
236
|
+
}).strict().describe("Query a permission entry from a Permission object's perm table — checks what operations a user/guard is allowed to perform. Use to verify access rights. Returns: TableItem_PermissionPerm | undefined"),
|
|
238
237
|
z.object({
|
|
239
238
|
query_type: z.literal("onchain_table_item_entity_registrar"),
|
|
240
239
|
address: z.union([AccountOrMark_AddressSchema, z.string()]).describe("User address to look up in the global EntityRegistrar"),
|
|
241
240
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
242
241
|
network: EntrypointSchema.optional(),
|
|
243
|
-
}).describe("Query an entity's registration record from the global EntityRegistrar — verifies if an address is registered on the blockchain. Use to check registration status and details. Returns: TableItem_EntityRegistrar | undefined"),
|
|
242
|
+
}).strict().describe("Query an entity's registration record from the global EntityRegistrar — verifies if an address is registered on the blockchain. Use to check registration status and details. Returns: TableItem_EntityRegistrar | undefined"),
|
|
244
243
|
z.object({
|
|
245
244
|
query_type: z.literal("onchain_table_item_entity_linker"),
|
|
246
245
|
address: z.union([AccountOrMark_AddressSchema, z.string()]).describe("Entity address whose community votes/endorsements to query"),
|
|
247
246
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
248
247
|
network: EntrypointSchema.optional(),
|
|
249
|
-
}).describe("Query community votes/endorsements for an entity from the global EntityLinker — shows how others have voted on this entity. Use to check reputation and community trust. Returns: TableItem_EntityLinker | undefined"),
|
|
248
|
+
}).strict().describe("Query community votes/endorsements for an entity from the global EntityLinker — shows how others have voted on this entity. Use to check reputation and community trust. Returns: TableItem_EntityLinker | undefined"),
|
|
250
249
|
z.object({
|
|
251
250
|
query_type: z.literal("onchain_table_item_reward_record"),
|
|
252
251
|
parent: NameOrAddressSchema.describe("Parent Reward object ID"),
|
|
253
252
|
address: AccountOrMark_AddressSchema.describe("User address that claimed the reward"),
|
|
254
253
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
255
254
|
network: EntrypointSchema.optional(),
|
|
256
|
-
}).describe("Query a reward claim record from a Reward object's table — checks if a user has claimed a specific incentive. Use to verify reward distribution status. Returns: TableItem_RewardRecord | undefined"),
|
|
255
|
+
}).strict().describe("Query a reward claim record from a Reward object's table — checks if a user has claimed a specific incentive. Use to verify reward distribution status. Returns: TableItem_RewardRecord | undefined"),
|
|
257
256
|
]),
|
|
258
257
|
z.discriminatedUnion("query_type", [
|
|
259
258
|
z.object({
|
|
@@ -262,35 +261,35 @@ export const OnchainTableDataSchema = z.preprocess((input) => {
|
|
|
262
261
|
address: AccountOrMark_AddressSchema.describe("Presenter address that submitted the demand"),
|
|
263
262
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
264
263
|
network: EntrypointSchema.optional(),
|
|
265
|
-
}).describe("Query a demand submission from a Demand object's table — Demands are service requests submitted by users. Use to check a specific demand's details. Returns: TableItem_DemandPresenter | undefined"),
|
|
264
|
+
}).strict().describe("Query a demand submission from a Demand object's table — Demands are service requests submitted by users. Use to check a specific demand's details. Returns: TableItem_DemandPresenter | undefined"),
|
|
266
265
|
z.object({
|
|
267
266
|
query_type: z.literal("onchain_table_item_treasury_history"),
|
|
268
267
|
parent: NameOrAddressSchema.describe("Parent Treasury object ID"),
|
|
269
268
|
address: AccountOrMark_AddressSchema.describe("Payment ID whose treasury record to look up"),
|
|
270
269
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
271
270
|
network: EntrypointSchema.optional(),
|
|
272
|
-
}).describe("Query a payment record from a Treasury's history table by payment ID — Treasury manages funds and payment tracking. Use to look up payment details and status. Returns: TableItem_TreasuryHistory | undefined"),
|
|
271
|
+
}).strict().describe("Query a payment record from a Treasury's history table by payment ID — Treasury manages funds and payment tracking. Use to look up payment details and status. Returns: TableItem_TreasuryHistory | undefined"),
|
|
273
272
|
z.object({
|
|
274
273
|
query_type: z.literal("onchain_table_item_machine_node"),
|
|
275
274
|
parent: NameOrAddressSchema.describe("Parent Machine object ID"),
|
|
276
275
|
key: z.string().describe("Node name (string key) to query in the Machine's workflow definition"),
|
|
277
276
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
278
277
|
network: EntrypointSchema.optional(),
|
|
279
|
-
}).describe("Query a workflow node definition from a Machine object's table by node name — Machines define workflow templates. Use to inspect a specific node's configuration and logic. Returns: TableItem_MachineNode | undefined"),
|
|
278
|
+
}).strict().describe("Query a workflow node definition from a Machine object's table by node name — Machines define workflow templates. Use to inspect a specific node's configuration and logic. Returns: TableItem_MachineNode | undefined"),
|
|
280
279
|
z.object({
|
|
281
280
|
query_type: z.literal("onchain_table_item_progress_history"),
|
|
282
281
|
parent: NameOrAddressSchema.describe("Parent Progress object ID"),
|
|
283
282
|
u64: z.union([z.number(), z.string()]).describe("Sequence number (u64) of the progress step to query"),
|
|
284
283
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
285
284
|
network: EntrypointSchema.optional(),
|
|
286
|
-
}).describe("Query a progress step record from a Progress object's table by sequence number — Progress tracks order/workflow execution. Use to check the status of a specific execution step. Returns: TableItem_ProgressHistory | undefined"),
|
|
285
|
+
}).strict().describe("Query a progress step record from a Progress object's table by sequence number — Progress tracks order/workflow execution. Use to check the status of a specific execution step. Returns: TableItem_ProgressHistory | undefined"),
|
|
287
286
|
z.object({
|
|
288
287
|
query_type: z.literal("onchain_table_item_address_mark"),
|
|
289
288
|
parent: NameOrAddressSchema.describe("Parent AddressMark object ID"),
|
|
290
289
|
address: AccountOrMark_AddressSchema.describe("Address whose PUBLIC on-chain name/tags to look up"),
|
|
291
290
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
292
291
|
network: EntrypointSchema.optional(),
|
|
293
|
-
}).describe("Query a PUBLIC on-chain name/tag mark for an address — unlike local marks, these are published on-chain. Use to look up public labels attached to any address. Returns: TableItem_AddressMark | undefined"),
|
|
292
|
+
}).strict().describe("Query a PUBLIC on-chain name/tag mark for an address — unlike local marks, these are published on-chain. Use to look up public labels attached to any address. Returns: TableItem_AddressMark | undefined"),
|
|
294
293
|
z.object({
|
|
295
294
|
query_type: z.literal("onchain_table_item_generic"),
|
|
296
295
|
parent: NameOrAddressSchema.describe("Parent object ID whose dynamic field to query"),
|
|
@@ -298,7 +297,7 @@ export const OnchainTableDataSchema = z.preprocess((input) => {
|
|
|
298
297
|
key_value: z.any().describe("Value of the key. Must match the key_type format (e.g., string for '0x1::string::String', address for '0x1::address::Address', number for '0x1::u64::U64')"),
|
|
299
298
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
300
299
|
network: EntrypointSchema.optional(),
|
|
301
|
-
}).describe("Query a generic table item from ANY object's dynamic fields — supports arbitrary key types and values for non-WoWok objects. Use for custom objects and general-purpose table lookups. Returns: ObjectBase | undefined"),
|
|
300
|
+
}).strict().describe("Query a generic table item from ANY object's dynamic fields — supports arbitrary key types and values for non-WoWok objects. Use for custom objects and general-purpose table lookups. Returns: ObjectBase | undefined"),
|
|
302
301
|
]),
|
|
303
302
|
]));
|
|
304
303
|
export const WatchQueryOperationsSchema = z.preprocess((input) => {
|
|
@@ -324,66 +323,62 @@ export const WatchQueryOperationsSchema = z.preprocess((input) => {
|
|
|
324
323
|
return obj;
|
|
325
324
|
}
|
|
326
325
|
return input;
|
|
327
|
-
}, z.
|
|
328
|
-
z.
|
|
329
|
-
z.
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
z.
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
z.
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
z.
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
z.
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
z.
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
z.
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
z.
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
z.
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
384
|
-
network: EntrypointSchema.optional(),
|
|
385
|
-
}).describe("Query objects (Payments, Tokens, NFTs) received by a specific object. Use to track incoming payments or items sent to an on-chain object. Supports pagination and type filter. Returns: ReceivedBalance | ReceivedNormal[]"),
|
|
386
|
-
]),
|
|
326
|
+
}, z.discriminatedUnion("query_type", [
|
|
327
|
+
z.object({
|
|
328
|
+
query_type: z.literal("local_mark_list"),
|
|
329
|
+
filter: LocalMarkFilterSchema.optional().describe("Local mark filter"),
|
|
330
|
+
}).strict().describe("Query your LOCAL address book — maps human-readable names to blockchain addresses with optional tags. Use to resolve names→addresses or find addresses by tag. Returns: MarkData[] (name, address, tags, timestamps)"),
|
|
331
|
+
z.object({
|
|
332
|
+
query_type: z.literal("account_list"),
|
|
333
|
+
filter: AccountFilterSchema.optional().describe("Account filter"),
|
|
334
|
+
}).strict().describe("Query your LOCAL accounts — view all accounts stored on this device (addresses, messenger status, suspension state). Use filter.includePubkey=true to also include public keys (~900 bytes each, omitted by default). Returns: AccountData[] (name, address, pubkey?, suspended, messenger, timestamps)"),
|
|
335
|
+
z.object({
|
|
336
|
+
query_type: z.literal("local_info_list"),
|
|
337
|
+
filter: LocalInfoFilterSchema.optional().describe("Local info filter"),
|
|
338
|
+
}).strict().describe("Query your LOCAL private info — sensitive data like delivery addresses, phone numbers, contacts stored ONLY on this device. Use to retrieve saved contact/delivery details. Returns: InfoData[] (name, default value, contents, timestamps)"),
|
|
339
|
+
z.object({
|
|
340
|
+
query_type: z.literal("token_list"),
|
|
341
|
+
filter: TokenDataFilterSchema.optional(),
|
|
342
|
+
}).strict().describe("Query cached token metadata — symbol, decimals, icon URL, description for tokens previously fetched from chain. Use to look up token info without an on-chain query. Returns: TokenTypeInfo[] (type, alias, name, symbol, decimals, iconUrl)"),
|
|
343
|
+
z.object({
|
|
344
|
+
query_type: z.literal("account_balance"),
|
|
345
|
+
name_or_address: NameOrAddressSchema.optional().describe("Account name or address. Use empty string '' for the default account. Defaults to '' if omitted."),
|
|
346
|
+
balance: z.boolean().optional().describe("Set to true to query total balance amount for the token type"),
|
|
347
|
+
coin: z.object({
|
|
348
|
+
cursor: z.union([z.string(), z.null()]).optional().describe("Pagination cursor for listing coin objects"),
|
|
349
|
+
limit: z.union([z.number(), z.null()]).optional().describe("Max coin objects per page"),
|
|
350
|
+
}).strict().optional().describe("Set to query paginated coin objects instead of balance. Use cursor/limit for pagination."),
|
|
351
|
+
token_type: TokenTypeSchema.optional().describe("Token type to query; defaults to 0x2::wow::WOW (platform token)"),
|
|
352
|
+
network: EntrypointSchema.optional(),
|
|
353
|
+
}).strict().describe("Query an account's coin balance OR paginated coin objects. Use balance=true for total amount, or coin={cursor,limit} to list individual coin objects. Returns: { address, balance? | coin? }"),
|
|
354
|
+
z.object({
|
|
355
|
+
query_type: z.literal("local_names"),
|
|
356
|
+
addresses: z.array(z.string()).describe("Array of addresses to look up local names for"),
|
|
357
|
+
}).strict().describe("Query local names (account name and local mark name) for a list of addresses. Returns array of: { account?: string, local_mark?: string, address: string }"),
|
|
358
|
+
z.object({
|
|
359
|
+
query_type: z.literal("onchain_personal_profile"),
|
|
360
|
+
account: NameOrAddressSchema.optional().describe("Account name or ID to query. Use empty string '' for the default account."),
|
|
361
|
+
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
362
|
+
network: EntrypointSchema.optional(),
|
|
363
|
+
}).strict().describe("Query any user's PUBLIC on-chain profile — social links, reputation (likes/dislikes), personal info records, voting history, referrer. Use to look up a user's public identity and reputation. Returns: ObjectPersonal | undefined"),
|
|
364
|
+
z.object({
|
|
365
|
+
query_type: z.literal("onchain_objects"),
|
|
366
|
+
objects: z.array(NameOrAddressSchema).describe("List of object IDs (names or addresses) to query in batch"),
|
|
367
|
+
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
368
|
+
network: EntrypointSchema.optional(),
|
|
369
|
+
}).strict().describe("Batch query on-chain WOWOK objects by ID or name — supports Service, Machine, Order, Treasury, Reward, Arb, Personal, Contact, and more. Use to inspect one or more objects in a single call. Returns: { objects: ObjectBase[] }"),
|
|
370
|
+
z.object({
|
|
371
|
+
query_type: z.literal("onchain_received"),
|
|
372
|
+
name_or_address: AccountOrMark_AddressAISchema.describe("Name or address of the object that received payments/items - can be a string (name/address) or full object"),
|
|
373
|
+
type: z.union([z.string(), z.literal("CoinWrapper"), z.null()]).optional().describe("Type filter for querying received objects. " +
|
|
374
|
+
"- If undefined or null: query all types (equivalent to the old all_type=true). " +
|
|
375
|
+
"- If 'CoinWrapper': query CoinWrapper type for the object's token (equivalent to the old all_type=false). " +
|
|
376
|
+
"- If string: query specific StructType (e.g., '0x2::payment::CoinWrapper<0x2::wow::WOW>')."),
|
|
377
|
+
cursor: z.union([z.string(), z.null()]).optional().describe("Pagination cursor from previous page"),
|
|
378
|
+
limit: z.union([z.number(), z.null()]).optional().describe("Max records per page"),
|
|
379
|
+
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
380
|
+
network: EntrypointSchema.optional(),
|
|
381
|
+
}).strict().describe("Query objects (Payments, Tokens, NFTs) received by a specific object. Use to track incoming payments or items sent to an on-chain object. Supports pagination and type filter. Returns: ReceivedBalance | ReceivedNormal[]"),
|
|
387
382
|
]));
|
|
388
383
|
export const OnchainTableDataResultSchema = z.object({
|
|
389
384
|
result: z.union([
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ProjectOperationInputSchema: z.ZodObject<{
|
|
3
|
+
action: z.ZodEnum<["list_projects", "list_objects", "shareable", "dependencies", "referenced_by", "pre_publish_check", "cross_project_refs", "graph_stats", "save_graph", "load_graph"]>;
|
|
4
|
+
project: z.ZodOptional<z.ZodString>;
|
|
5
|
+
object: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, "strict", z.ZodTypeAny, {
|
|
7
|
+
action: "dependencies" | "list_projects" | "list_objects" | "shareable" | "referenced_by" | "pre_publish_check" | "cross_project_refs" | "graph_stats" | "save_graph" | "load_graph";
|
|
8
|
+
object?: string | undefined;
|
|
9
|
+
project?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
action: "dependencies" | "list_projects" | "list_objects" | "shareable" | "referenced_by" | "pre_publish_check" | "cross_project_refs" | "graph_stats" | "save_graph" | "load_graph";
|
|
12
|
+
object?: string | undefined;
|
|
13
|
+
project?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const ProjectOperationOutputSchema: z.ZodObject<{
|
|
16
|
+
result: z.ZodAny;
|
|
17
|
+
}, "strict", z.ZodTypeAny, {
|
|
18
|
+
result?: any;
|
|
19
|
+
}, {
|
|
20
|
+
result?: any;
|
|
21
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const ProjectOperationInputSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
action: z
|
|
5
|
+
.enum([
|
|
6
|
+
"list_projects",
|
|
7
|
+
"list_objects",
|
|
8
|
+
"shareable",
|
|
9
|
+
"dependencies",
|
|
10
|
+
"referenced_by",
|
|
11
|
+
"pre_publish_check",
|
|
12
|
+
"cross_project_refs",
|
|
13
|
+
"graph_stats",
|
|
14
|
+
"save_graph",
|
|
15
|
+
"load_graph",
|
|
16
|
+
])
|
|
17
|
+
.describe("Query/action to perform"),
|
|
18
|
+
project: z
|
|
19
|
+
.string()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("Project prefix (for list_objects)"),
|
|
22
|
+
object: z
|
|
23
|
+
.string()
|
|
24
|
+
.optional()
|
|
25
|
+
.describe("Object name or address (for dependencies / referenced_by / pre_publish_check)"),
|
|
26
|
+
})
|
|
27
|
+
.strict();
|
|
28
|
+
export const ProjectOperationOutputSchema = z
|
|
29
|
+
.object({
|
|
30
|
+
result: z.any().describe("Query result — shape depends on action"),
|
|
31
|
+
})
|
|
32
|
+
.strict();
|