@wowok/agent-mcp 2.2.16 → 2.2.17
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/index.js +6 -2
- package/dist/schema/query/index.js +4 -4
- package/dist/schemas/index.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10,6 +10,10 @@ import { CallService, CallMachine, CallProgress, CallPermission, CallGuard, Call
|
|
|
10
10
|
import { areSchemasAvailable, getSchemaIndex, processSchemaQuery, } from "./schema-query/index.js";
|
|
11
11
|
const SERVER_DESCRIPTION = `WoWok MCP Server - Making It Easy for AI Agents to Communicate, Collaborate, Trade, and Trust.
|
|
12
12
|
|
|
13
|
+
## CRITICAL: Schema Discovery Rule
|
|
14
|
+
|
|
15
|
+
When the current context does not contain a tool's input/output schema, or when you are uncertain whether the schema you have is complete and up-to-date, you MUST query it first before calling the tool. Use schema_query for operational tool schemas or wowok_buildin_info for protocol constants and reference data. Never guess schema parameters, query instruction IDs, or type codes — always retrieve them from the live server.
|
|
16
|
+
|
|
13
17
|
## Token System Overview
|
|
14
18
|
|
|
15
19
|
### Default Platform Token: WOW
|
|
@@ -87,7 +91,7 @@ Token amounts are HIGHLY SENSITIVE. Always:
|
|
|
87
91
|
| Sign WIP file | wip_file (sign) | account_operation (signData) |
|
|
88
92
|
| Verify WIP file integrity | wip_file (verify) | query_toolkit |
|
|
89
93
|
| Send encrypted file via messenger | messenger_operation (send_file) | wip_file |
|
|
90
|
-
| Generate
|
|
94
|
+
| Generate Witness Timestamped Sequence (WTS) | messenger_operation (generate_wts) | wip_file |
|
|
91
95
|
| Query protocol constants | wowok_buildin_info | query_toolkit |
|
|
92
96
|
| Query tool schemas | schema_query | wowok_buildin_info |
|
|
93
97
|
|
|
@@ -1351,7 +1355,7 @@ async function main() {
|
|
|
1351
1355
|
_meta: createToolMeta("operation", ["info", "local", "private", "data-management", "off-chain"]),
|
|
1352
1356
|
}, handleInfoOperation);
|
|
1353
1357
|
server.registerTool("wip_file", {
|
|
1354
|
-
title: "🤝 Witness
|
|
1358
|
+
title: "🤝 Witness Immutable Promise File Operations",
|
|
1355
1359
|
description: "generate (create WIP files from markdown and images), verify (integrity check), sign (add signatures), or wip2html (convert to HTML).",
|
|
1356
1360
|
inputSchema: WipOperationsSchema,
|
|
1357
1361
|
outputSchema: z.object({
|
|
@@ -3,7 +3,7 @@ import { TokenTypeInfoSchema, QueryLocalMarkListResultSchema, QueryAccountListRe
|
|
|
3
3
|
import { AccountOrMark_AddressSchema, BalanceTypeSchema, EntrypointSchema, GuardIdentifierSchema, GuardTableItemSchema, NameOrAddressSchema, ObjectBaseSchema, ObjectTypeSchema, QueryIdSchema, SupportedValueSchema, ValueTypeSchema, QueryReceivedResultSchema, LongNameSchema, DescriptionSchema } from "../common/index.js";
|
|
4
4
|
import { isValidPermissionIndex } from '../utils/permission-index-utils.js';
|
|
5
5
|
import { isValidGuardQueryId, isValidGuardQueryIdOrName } from '../utils/guard-query-utils.js';
|
|
6
|
-
import { isWitnessType, } from "@wowok/wowok";
|
|
6
|
+
import { ENTITY_LINKER_ADDRESS, ENTITY_REGISTRAR_ADDRESS, isWitnessType, } from "@wowok/wowok";
|
|
7
7
|
import { DiscountType as WDiscountType } from "@wowok/wowok";
|
|
8
8
|
import { QueryEnvSchema } from "../common/index.js";
|
|
9
9
|
const MAX_MULTI_OPERANDS = 8;
|
|
@@ -402,7 +402,7 @@ export const WitnessTypeSchema = z.number()
|
|
|
402
402
|
.int()
|
|
403
403
|
.refine(isWitnessType, {
|
|
404
404
|
message: 'Invalid WitnessType value',
|
|
405
|
-
});
|
|
405
|
+
}).describe("When specified, the query retrieves data from the associated (witness) object instead of the queried object itself. This enables cross-object queries within Guard validation logic. Available WitnessTypes and their use cases:\n\n- TypeOrderProgress (100): Query an Order's associated Progress object. Use case: Check if order has reached a specific workflow node (e.g., 'complete') before allowing reward claims.\n- TypeOrderMachine (101): Query an Order's associated Machine (workflow definition). Use case: Verify the workflow structure or check node configurations.\n- TypeOrderService (102): Query an Order's parent Service object. Use case: Validate the service offering details or check service-level configurations.\n- TypeProgressMachine (103): Query a Progress's associated Machine. Use case: Access workflow definition from a Progress context.\n- TypeArbOrder (104): Query an Arb's associated Order. Use case: In arbitration voting guards, verify order details like payment amount or service ID.\n- TypeArbArbitration (105): Query an Arb's parent Arbitration service. Use case: Access arbitration configuration or fee settings from within an Arb case.\n- TypeArbProgress (106): Query an Arb's associated Progress. Use case: Check order workflow state during arbitration validation.\n- TypeArbMachine (107): Query an Arb's associated Machine. Use case: Access workflow definition for dispute context analysis.\n- TypeArbService (108): Query an Arb's associated Service. Use case: Verify service terms or compensation fund status during arbitration.\n\nExample: To validate that an order has reached the 'complete' node, query the Order with convert_witness=TypeOrderProgress and check the Progress's current_node field.");
|
|
406
406
|
export const GuardQueryIdSchema = z.number().int().min(0).refine((id) => isValidGuardQueryId(id), { message: "Invalid guard query ID. ID not found in GUARDQUERY array." }).describe("ID of the data query instruction for the Object.");
|
|
407
407
|
export const GuardNodeSchema = z.lazy(() => z.discriminatedUnion('type', [
|
|
408
408
|
z.object({
|
|
@@ -417,10 +417,10 @@ export const GuardNodeSchema = z.lazy(() => z.discriminatedUnion('type', [
|
|
|
417
417
|
]).describe("ID or name of the wowok object data query instruction. Can be a numeric ID (e.g., 1001) or a name string (e.g., 'permission.description'). Name matching is case-insensitive."),
|
|
418
418
|
object: z.object({
|
|
419
419
|
identifier: GuardIdentifierSchema,
|
|
420
|
-
convert_witness: WitnessTypeSchema.optional()
|
|
420
|
+
convert_witness: WitnessTypeSchema.optional(),
|
|
421
421
|
}).strict().describe("The object to query from the Guard table."),
|
|
422
422
|
parameters: z.array(GuardNodeSchema).describe("Parameters required by the query (must match the query's expected parameters type)."),
|
|
423
|
-
}).strict().describe(
|
|
423
|
+
}).strict().describe(`Returns the result of executing a data query instruction on the specified object. The return type depends on the query being executed. SPECIAL NOTE for EntityLinker/EntityRegistrar queries: Use system addresses in the Guard table -${ENTITY_LINKER_ADDRESS} for EntityLinker queries, ${ENTITY_REGISTRAR_ADDRESS} for EntityRegistrar queries.`),
|
|
424
424
|
z.object({
|
|
425
425
|
type: z.literal('logic_as_u256_greater_or_equal'),
|
|
426
426
|
nodes: z.array(GuardNodeSchema),
|
package/dist/schemas/index.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"title": "WoWok MCP Schema Index",
|
|
4
4
|
"description": "Index of all available JSON schemas for WoWok MCP tools",
|
|
5
|
-
"generatedAt": "2026-05-
|
|
5
|
+
"generatedAt": "2026-05-21T08:51:01.877Z",
|
|
6
6
|
"tools": [
|
|
7
7
|
{
|
|
8
8
|
"name": "onchain_operations",
|