@wowok/agent-mcp 2.2.16 → 2.2.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/README.md CHANGED
@@ -48,6 +48,8 @@ Skills provide structured guidance for AI assistants:
48
48
  | `wowok-machine` | 🏪 Provider | Workflow design — state machines, node definitions, progress tracking |
49
49
  | `wowok-arbitrator` | ⚖️ Arbitrator | Arbitration service — dispute resolution, voting organization, fee management |
50
50
  | `wowok-guard` | 🛠️ Shared | Guard design mastery — programmable trust rules, multi-signature authorization |
51
+ | `wowok-messenger` | 🛠️ Shared | Encrypted messaging — E2E communication, WTS evidence, conversation management |
52
+ | `wowok-output` | 🛠️ Shared | Output processing — post-process responses for human-readable presentation |
51
53
  | `wowok-tools` | 🛠️ Shared | MCP tool usage mastery — 13+ tools, parameter formats, schema references |
52
54
  | `wowok-safety` | 🛠️ Shared | Safety protocol — dry-run validation, user confirmation checkpoints |
53
55
 
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 witness timestamp (WTS) | messenger_operation (generate_wts) | wip_file |
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 Information Promise File Operations",
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({
@@ -1444,7 +1448,14 @@ async function main() {
1444
1448
  }, handleWowokInfo);
1445
1449
  server.registerTool("schema_query", {
1446
1450
  title: "📋 Schema Query",
1447
- description: "Query JSON schemas for all WoWok MCP tools and operations. Use this tool to understand the exact structure required for calling other tools. Returns complete JSON Schema definitions with all properties, types, and descriptions. This is the authoritative source for tool schemas.",
1451
+ description: "Look up JSON Schemas for WoWok MCP tools and on-chain operations. " +
1452
+ "This is the authoritative reference for exact parameter structures, types, and required fields. " +
1453
+ "Always check the schema before calling an unfamiliar tool.\n\n" +
1454
+ "Actions:\n" +
1455
+ " 'list' - Show all available schemas (tools + on-chain operations). Start here to discover what exists.\n" +
1456
+ " 'get' - Fetch the full JSON Schema by name (e.g. 'onchain_operations'). Use with the 'name' param.\n" +
1457
+ " 'search' - Find schemas by keyword, matching name/title/description. Use with the 'query' param.\n" +
1458
+ " 'list_operations' - Show only on-chain operation schemas (prefixed 'onchain_operations_'). Narrower than 'list'.",
1448
1459
  inputSchema: z.object({
1449
1460
  action: z.enum(["list", "get", "search", "list_operations"])
1450
1461
  .describe("Action to perform: 'list' to see all available schemas, 'get' to retrieve a specific schema, 'search' to find schemas by keyword, 'list_operations' to list all on-chain operations"),
@@ -1472,9 +1483,23 @@ async function main() {
1472
1483
  if (response.success && data) {
1473
1484
  switch (args.action) {
1474
1485
  case "list":
1486
+ if (Array.isArray(data) && data.length > 0) {
1487
+ textContent += "\n\nAll available schemas:\n";
1488
+ for (const item of data) {
1489
+ textContent += `\n • ${item.name}`;
1490
+ if (item.title) {
1491
+ textContent += ` - ${item.title}`;
1492
+ }
1493
+ if (item.description) {
1494
+ textContent += `\n ${item.description.slice(0, 100)}...`;
1495
+ }
1496
+ textContent += "\n";
1497
+ }
1498
+ }
1499
+ break;
1475
1500
  case "list_operations":
1476
1501
  if (Array.isArray(data) && data.length > 0) {
1477
- textContent += "\n\nAvailable schemas:\n";
1502
+ textContent += "\n\nOn-chain operation schemas:\n";
1478
1503
  for (const item of data) {
1479
1504
  textContent += `\n • ${item.name}`;
1480
1505
  if (item.title) {
@@ -1503,9 +1528,15 @@ async function main() {
1503
1528
  if (item.title) {
1504
1529
  textContent += ` - ${item.title}`;
1505
1530
  }
1531
+ if (item.description) {
1532
+ textContent += `\n ${item.description.slice(0, 100)}...`;
1533
+ }
1506
1534
  textContent += "\n";
1507
1535
  }
1508
1536
  }
1537
+ else {
1538
+ textContent += "\n\nNo schemas found. Try 'list' to browse all available schemas, or use a broader search term.";
1539
+ }
1509
1540
  break;
1510
1541
  }
1511
1542
  }
@@ -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().describe("Optional. When specified, the query retrieves data from the associated object instead of the object itself. For example, querying an order with convert_witness=TypeOrderProgress retrieves the associated Progress object data."),
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("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 (0xaaa) for EntityLinker queries, ENTITY_REGISTRAR_ADDRESS (0xaab) for EntityRegistrar queries."),
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),
@@ -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-20T13:29:28.773Z",
5
+ "generatedAt": "2026-05-22T02:20:38.513Z",
6
6
  "tools": [
7
7
  {
8
8
  "name": "onchain_operations",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wowok/agent-mcp",
3
- "version": "2.2.16",
3
+ "version": "2.2.18",
4
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",