@wowok/agent-mcp 2.6.1 → 2.6.3
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/info-puzzle.d.ts +1 -1
- package/dist/customer/info-puzzle.js +4 -2
- package/dist/customer/risk-assessment.js +26 -4
- package/dist/customer/types.d.ts +2 -0
- package/dist/examples/guard-template-balance-check.json +38 -0
- package/dist/examples/guard-template-time-lock.json +39 -0
- package/dist/examples/machine-template-7node-rental.json +114 -0
- package/dist/examples/rental-ziroom-machine-create.json +137 -0
- package/dist/examples/rental-ziroom-permission-create.json +35 -0
- package/dist/examples/rental-ziroom-service-create.json +80 -0
- package/dist/examples/retail-myshop-service-create.json +88 -0
- package/dist/extensions/capability-manifest.js +24 -24
- package/dist/extensions/constraint-registry.js +18 -18
- package/dist/extensions/metric-registry.js +14 -14
- package/dist/extensions/mode-evaluator.js +16 -16
- package/dist/extensions/modes.js +131 -45
- package/dist/extensions/registry.d.ts +2 -0
- package/dist/extensions/registry.js +63 -30
- package/dist/extensions/types.d.ts +1 -0
- package/dist/index.js +50 -0
- package/dist/knowledge/deployment-scanner.js +1 -1
- package/dist/knowledge/fund-layer.d.ts +72 -0
- package/dist/knowledge/fund-layer.js +420 -0
- package/dist/knowledge/guard-render.d.ts +57 -0
- package/dist/knowledge/guard-render.js +700 -0
- package/dist/knowledge/guard-submission-prompt.d.ts +31 -0
- package/dist/knowledge/guard-submission-prompt.js +171 -0
- package/dist/knowledge/machine-ledger.js +1 -1
- package/dist/knowledge/machine-render.d.ts +41 -0
- package/dist/knowledge/machine-render.js +565 -0
- package/dist/knowledge/machine-templates.js +4 -4
- package/dist/knowledge/reward-confirm.js +2 -2
- package/dist/knowledge/reward-puzzle.js +1 -1
- package/dist/knowledge/reward-risk.js +9 -9
- package/dist/knowledge/reward-templates.js +2 -2
- package/dist/knowledge/service-confirm.d.ts +1 -1
- package/dist/knowledge/service-confirm.js +3 -3
- package/dist/knowledge/service-context.js +1 -1
- package/dist/knowledge/service-ledger.js +1 -1
- package/dist/knowledge/service-risk.d.ts +1 -1
- package/dist/knowledge/service-risk.js +3 -3
- package/dist/knowledge/service-templates.js +2 -2
- package/dist/knowledge/service-translation.d.ts +1 -1
- package/dist/knowledge/service-translation.js +7 -7
- package/dist/project/deployment-bridge.js +6 -5
- package/dist/project/deployment-doc.js +5 -5
- package/dist/project/edit-planner.d.ts +123 -0
- package/dist/project/edit-planner.js +1371 -0
- package/dist/project/evaluation.js +314 -14
- package/dist/project/graph-builder.js +6 -1
- package/dist/project/handlers.d.ts +99 -2
- package/dist/project/handlers.js +358 -16
- package/dist/project/stage-gate.js +4 -4
- package/dist/schema/call/allocation.js +2 -2
- package/dist/schema/call/arbitration.js +19 -6
- package/dist/schema/call/contact.js +2 -2
- package/dist/schema/call/demand.js +2 -2
- package/dist/schema/call/guard.js +1 -1
- package/dist/schema/call/machine.d.ts +1975 -777
- package/dist/schema/call/machine.js +50 -4
- package/dist/schema/call/order.js +3 -6
- package/dist/schema/call/permission.js +2 -2
- package/dist/schema/call/repository.js +2 -2
- package/dist/schema/call/reward.js +3 -3
- package/dist/schema/call/semantic.js +7 -1
- package/dist/schema/call/service.d.ts +180 -8
- package/dist/schema/call/service.js +82 -27
- package/dist/schema/call/treasury.js +3 -3
- package/dist/schema/common/index.d.ts +2 -0
- package/dist/schema/common/index.js +46 -10
- package/dist/schema/local/index.js +5 -1
- package/dist/schema/operations.d.ts +755 -176
- package/dist/schema/operations.js +43 -7
- package/dist/schema/project/index.d.ts +969 -6
- package/dist/schema/project/index.js +268 -4
- package/dist/schema/query/index.d.ts +217 -0
- package/dist/schema/query/index.js +63 -33
- package/dist/schema/schema-query/index.d.ts +53 -3
- package/dist/schema/schema-query/index.js +17 -2
- package/dist/schema/utils/node-parser.js +13 -0
- package/dist/schema/utils/object-type-utils.d.ts +12 -0
- package/dist/schema/utils/object-type-utils.js +35 -0
- package/dist/schema/utils/permission-machine-check.d.ts +49 -0
- package/dist/schema/utils/permission-machine-check.js +121 -0
- package/dist/schema/utils/skills-recommendation.d.ts +2 -0
- package/dist/schema/utils/skills-recommendation.js +76 -0
- package/dist/schema-query/index.d.ts +14 -1
- package/dist/schema-query/index.js +104 -2
- package/dist/schemas/account_operation.schema.json +1 -1
- package/dist/schemas/index.json +1 -1
- package/dist/schemas/onchain_events.output.json +1 -1
- package/dist/schemas/onchain_operations.output.json +2820 -0
- package/dist/schemas/onchain_operations.schema.json +115 -53
- package/dist/schemas/onchain_operations_allocation.schema.json +5 -5
- package/dist/schemas/onchain_operations_arbitration.schema.json +9 -7
- package/dist/schemas/onchain_operations_contact.schema.json +3 -3
- package/dist/schemas/onchain_operations_demand.schema.json +3 -3
- package/dist/schemas/onchain_operations_gen_passport.schema.json +2 -2
- package/dist/schemas/onchain_operations_guard.schema.json +1 -1
- package/dist/schemas/onchain_operations_machine.schema.json +4 -4
- package/dist/schemas/onchain_operations_order.schema.json +3 -3
- package/dist/schemas/onchain_operations_payment.schema.json +1 -1
- package/dist/schemas/onchain_operations_permission.schema.json +2 -2
- package/dist/schemas/onchain_operations_progress.schema.json +1 -1
- package/dist/schemas/onchain_operations_proof.schema.json +1 -1
- package/dist/schemas/onchain_operations_repository.schema.json +3 -3
- package/dist/schemas/onchain_operations_reward.schema.json +6 -6
- package/dist/schemas/onchain_operations_service.schema.json +77 -17
- package/dist/schemas/onchain_operations_treasury.schema.json +4 -4
- package/dist/schemas/onchain_table_data.output.json +1 -1
- package/dist/schemas/onchain_table_data.schema.json +10 -9
- package/dist/schemas/project_operation.output.json +1026 -7
- package/dist/schemas/project_operation.schema.json +46 -4
- package/dist/schemas/query_toolkit.output.json +15 -15
- package/dist/schemas/query_toolkit.schema.json +3 -3
- package/dist/schemas/schema_query.output.json +64 -1
- package/dist/schemas/schema_query.schema.json +3 -2
- package/dist/schemas/wowok_buildin_info.output.json +81 -8
- package/dist/schemas/wowok_buildin_info.schema.json +46 -2
- package/dist/tools/handlers/onchain.js +571 -6
- package/dist/tools/handlers/project.js +25 -2
- package/dist/tools/handlers/schema-query.js +24 -1
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.js +177 -6
- package/package.json +2 -2
|
@@ -61,6 +61,14 @@ export const OnchainOperationsSchema = z.preprocess((input) => {
|
|
|
61
61
|
catch { }
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
+
if (obj.operation_type === 'guard' && obj.data && typeof obj.data === 'object'
|
|
65
|
+
&& !Array.isArray(obj.data)) {
|
|
66
|
+
const guardData = obj.data;
|
|
67
|
+
if (guardData.object && !guardData.namedNew) {
|
|
68
|
+
guardData.namedNew = guardData.object;
|
|
69
|
+
delete guardData.object;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
64
72
|
return obj;
|
|
65
73
|
}
|
|
66
74
|
return input;
|
|
@@ -128,7 +136,7 @@ export const OnchainOperationsSchema = z.preprocess((input) => {
|
|
|
128
136
|
operation_type: z.literal("guard"),
|
|
129
137
|
data: CallGuard_DataSchema,
|
|
130
138
|
env: CallEnvSchema.optional(),
|
|
131
|
-
}).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."),
|
|
139
|
+
}).strict().describe("🛡️ Guard Object: Create immutable programmable validation rules that return boolean results. Set 'namedNew' to name the new Guard (you may also use 'object' as an alias — both work). 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."),
|
|
132
140
|
z.object({
|
|
133
141
|
operation_type: z.literal("personal"),
|
|
134
142
|
data: CallPersonal_DataSchema,
|
|
@@ -252,19 +260,19 @@ export const OnchainTableDataSchema = z.preprocess((input) => {
|
|
|
252
260
|
z.object({
|
|
253
261
|
query_type: z.literal("onchain_table_item_permission_perm"),
|
|
254
262
|
parent: NameOrAddressSchema.describe("Parent Permission object ID"),
|
|
255
|
-
address:
|
|
263
|
+
address: AccountOrMark_AddressAISchema.describe("User address or Guard ID whose permissions to check. Supports string (name/address) or object form. LocalMark names are resolved automatically."),
|
|
256
264
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
257
265
|
network: EntrypointSchema.optional(),
|
|
258
266
|
}).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"),
|
|
259
267
|
z.object({
|
|
260
268
|
query_type: z.literal("onchain_table_item_entity_registrar"),
|
|
261
|
-
address:
|
|
269
|
+
address: AccountOrMark_AddressAISchema.describe("User address to look up in the global EntityRegistrar. Supports string (name/address) or object form. LocalMark names are resolved automatically."),
|
|
262
270
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
263
271
|
network: EntrypointSchema.optional(),
|
|
264
272
|
}).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"),
|
|
265
273
|
z.object({
|
|
266
274
|
query_type: z.literal("onchain_table_item_entity_linker"),
|
|
267
|
-
address:
|
|
275
|
+
address: AccountOrMark_AddressAISchema.describe("Entity address whose community votes/endorsements to query. Supports string (name/address) or object form. LocalMark names are resolved automatically."),
|
|
268
276
|
no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
|
|
269
277
|
network: EntrypointSchema.optional(),
|
|
270
278
|
}).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"),
|
|
@@ -348,6 +356,24 @@ export const WatchQueryOperationsSchema = z.preprocess((input) => {
|
|
|
348
356
|
catch { }
|
|
349
357
|
}
|
|
350
358
|
}
|
|
359
|
+
if (obj.query_type === 'account_balance' && obj.filter && typeof obj.filter === 'object') {
|
|
360
|
+
const f = obj.filter;
|
|
361
|
+
if (!obj.name_or_address) {
|
|
362
|
+
if (typeof f.name_or_address === 'string') {
|
|
363
|
+
obj.name_or_address = f.name_or_address;
|
|
364
|
+
}
|
|
365
|
+
else if (typeof f.name === 'string') {
|
|
366
|
+
obj.name_or_address = f.name;
|
|
367
|
+
}
|
|
368
|
+
else if (typeof f.address === 'string') {
|
|
369
|
+
obj.name_or_address = f.address;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
if (!obj.token_type && typeof f.token_type === 'string') {
|
|
373
|
+
obj.token_type = f.token_type;
|
|
374
|
+
}
|
|
375
|
+
delete obj.filter;
|
|
376
|
+
}
|
|
351
377
|
return obj;
|
|
352
378
|
}
|
|
353
379
|
return input;
|
|
@@ -370,15 +396,25 @@ export const WatchQueryOperationsSchema = z.preprocess((input) => {
|
|
|
370
396
|
}).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)"),
|
|
371
397
|
z.object({
|
|
372
398
|
query_type: z.literal("account_balance"),
|
|
373
|
-
name_or_address: NameOrAddressSchema.optional().describe("Account name or address
|
|
399
|
+
name_or_address: NameOrAddressSchema.optional().describe("Account name or address to query. " +
|
|
400
|
+
"Examples: \"my_account\", \"0xabc123...\", or \"\" for the default account. " +
|
|
401
|
+
"NOTE: This field is NOT named 'filter' — use 'name_or_address' directly. " +
|
|
402
|
+
"Defaults to '' (default account) if omitted."),
|
|
374
403
|
balance: z.boolean().optional().describe("Set to true to query total balance amount for the token type"),
|
|
375
404
|
coin: z.object({
|
|
376
405
|
cursor: z.union([z.string(), z.null()]).optional().describe("Pagination cursor for listing coin objects"),
|
|
377
406
|
limit: z.union([z.number(), z.null()]).optional().describe("Max coin objects per page"),
|
|
378
407
|
}).strict().optional().describe("Set to query paginated coin objects instead of balance. Use cursor/limit for pagination."),
|
|
379
|
-
token_type: TokenTypeSchema.optional().describe("Token type
|
|
408
|
+
token_type: TokenTypeSchema.optional().describe("Token type in Move format: 0x<package>::<module>::<struct>. " +
|
|
409
|
+
"Examples: \"0x2::wow::WOW\" (default, 9 decimals), \"0x2::sui::SUI\" (9 decimals). " +
|
|
410
|
+
"For custom tokens, use the full type string from the token's coin metadata. " +
|
|
411
|
+
"The Fund Processing Layer resolves precision from the official registry → cache → on-chain."),
|
|
380
412
|
network: EntrypointSchema.optional(),
|
|
381
|
-
}).strict().describe("Query an account's coin balance OR paginated coin objects.
|
|
413
|
+
}).strict().describe("Query an account's coin balance OR paginated coin objects. " +
|
|
414
|
+
"PARAMETERS: Use 'name_or_address' to specify the account (NOT 'filter'). " +
|
|
415
|
+
"Use balance=true for total amount, or coin={cursor,limit} to list individual coin objects. " +
|
|
416
|
+
"Use token_type to query non-default tokens (format: 0x<package>::<module>::<struct>). " +
|
|
417
|
+
"Returns: { address, balance? | coin? }"),
|
|
382
418
|
z.object({
|
|
383
419
|
query_type: z.literal("local_names"),
|
|
384
420
|
addresses: z.array(z.string()).describe("Array of addresses to look up local names for"),
|