@wowok/agent-mcp 2.2.15 → 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.d.ts CHANGED
@@ -15693,7 +15693,7 @@ declare const WatchQueryOperationsSchema: z.ZodEffects<z.ZodUnion<[z.ZodDiscrimi
15693
15693
  name_or_address?: string | undefined;
15694
15694
  local_mark_first?: boolean | undefined;
15695
15695
  }>]>;
15696
- all_type: z.ZodOptional<z.ZodBoolean>;
15696
+ type: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodLiteral<"CoinWrapper">, z.ZodNull]>>;
15697
15697
  cursor: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
15698
15698
  limit: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
15699
15699
  no_cache: z.ZodOptional<z.ZodBoolean>;
@@ -15704,9 +15704,9 @@ declare const WatchQueryOperationsSchema: z.ZodEffects<z.ZodUnion<[z.ZodDiscrimi
15704
15704
  local_mark_first?: boolean | undefined;
15705
15705
  };
15706
15706
  query_type: "onchain_received";
15707
+ type?: string | null | undefined;
15707
15708
  no_cache?: boolean | undefined;
15708
15709
  network?: import("@wowok/wowok").ENTRYPOINT | undefined;
15709
- all_type?: boolean | undefined;
15710
15710
  cursor?: string | null | undefined;
15711
15711
  limit?: number | null | undefined;
15712
15712
  }, {
@@ -15715,9 +15715,9 @@ declare const WatchQueryOperationsSchema: z.ZodEffects<z.ZodUnion<[z.ZodDiscrimi
15715
15715
  local_mark_first?: boolean | undefined;
15716
15716
  };
15717
15717
  query_type: "onchain_received";
15718
+ type?: string | null | undefined;
15718
15719
  no_cache?: boolean | undefined;
15719
15720
  network?: import("@wowok/wowok").ENTRYPOINT | undefined;
15720
- all_type?: boolean | undefined;
15721
15721
  cursor?: string | null | undefined;
15722
15722
  limit?: number | null | undefined;
15723
15723
  }>]>]>, {
@@ -15803,9 +15803,9 @@ declare const WatchQueryOperationsSchema: z.ZodEffects<z.ZodUnion<[z.ZodDiscrimi
15803
15803
  local_mark_first?: boolean | undefined;
15804
15804
  };
15805
15805
  query_type: "onchain_received";
15806
+ type?: string | null | undefined;
15806
15807
  no_cache?: boolean | undefined;
15807
15808
  network?: import("@wowok/wowok").ENTRYPOINT | undefined;
15808
- all_type?: boolean | undefined;
15809
15809
  cursor?: string | null | undefined;
15810
15810
  limit?: number | null | undefined;
15811
15811
  }, unknown>;
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
 
@@ -598,12 +602,15 @@ const WatchQueryOperationsSchema = z.preprocess((input) => {
598
602
  z.object({
599
603
  query_type: z.literal("onchain_received"),
600
604
  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"),
601
- all_type: z.boolean().optional().describe("Set to true to query all token types received; defaults to the object's Token type '0x2::payment::CoinWrapper<TOKEN>' (Coins wrapper sent via Payment object). If the object has no Token type, the call will fail."),
605
+ type: z.union([z.string(), z.literal("CoinWrapper"), z.null()]).optional().describe("Type filter for querying received objects. " +
606
+ "- If undefined or null: query all types (equivalent to the old all_type=true). " +
607
+ "- If 'CoinWrapper': query CoinWrapper type for the object's token (equivalent to the old all_type=false). " +
608
+ "- If string: query specific StructType (e.g., '0x2::payment::CoinWrapper<0x2::wow::WOW>')."),
602
609
  cursor: z.union([z.string(), z.null()]).optional().describe("Pagination cursor from previous page"),
603
610
  limit: z.union([z.number(), z.null()]).optional().describe("Max records per page"),
604
611
  no_cache: z.boolean().optional().describe("Set to true to bypass cache and fetch fresh on-chain data"),
605
612
  network: EntrypointSchema.optional(),
606
- }).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 all_type filter. Returns: ReceivedBalance | ReceivedNormal[]"),
613
+ }).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[]"),
607
614
  ]),
608
615
  ]));
609
616
  async function handleOnchainOperations(args) {
@@ -1040,7 +1047,7 @@ async function handleWatchQueryOperations(args) {
1040
1047
  case "onchain_received": {
1041
1048
  const queryResult = await query_received({
1042
1049
  name_or_address: normalizeAccountOrMark(validated.name_or_address),
1043
- all_type: validated.all_type,
1050
+ type: validated.type,
1044
1051
  cursor: validated.cursor,
1045
1052
  limit: validated.limit,
1046
1053
  no_cache: validated.no_cache,
@@ -1348,7 +1355,7 @@ async function main() {
1348
1355
  _meta: createToolMeta("operation", ["info", "local", "private", "data-management", "off-chain"]),
1349
1356
  }, handleInfoOperation);
1350
1357
  server.registerTool("wip_file", {
1351
- title: "🤝 Witness Information Promise File Operations",
1358
+ title: "🤝 Witness Immutable Promise File Operations",
1352
1359
  description: "generate (create WIP files from markdown and images), verify (integrity check), sign (add signatures), or wip2html (convert to HTML).",
1353
1360
  inputSchema: WipOperationsSchema,
1354
1361
  outputSchema: z.object({
@@ -1394,7 +1401,7 @@ async function main() {
1394
1401
  + "ONCHAIN (blockchain):\n"
1395
1402
  + "7. onchain_personal_profile — Query any user's PUBLIC on-chain profile: social links, reputation (likes/dislikes), personal info records, voting history, referrer.\n"
1396
1403
  + "8. onchain_objects — Batch query on-chain WOWOK objects by ID or name: supports Service, Machine, Order, Treasury, Reward, Arb, Personal, Contact, and more.\n"
1397
- + "9. onchain_received — Query objects (Payments, Tokens, NFTs) received by a specific object. Supports pagination and all_type filter.\n\n"
1404
+ + "9. onchain_received — Query objects (Payments, Tokens, NFTs) received by a specific object. Supports pagination and type filter.\n\n"
1398
1405
  + "For dynamic table data queries (pagination, table items), use the 'onchain_table_data' tool.",
1399
1406
  inputSchema: WatchQueryOperationsSchema,
1400
1407
  outputSchema: z.object({
@@ -568,44 +568,6 @@ export declare const QueryEnvSchema: z.ZodObject<{
568
568
  no_cache?: boolean | undefined;
569
569
  network?: ENTRYPOINT | undefined;
570
570
  }>;
571
- export declare const QueryReceivedSchema: z.ZodObject<{
572
- no_cache: z.ZodOptional<z.ZodBoolean>;
573
- network: z.ZodOptional<z.ZodEnum<[ENTRYPOINT.Localnet, ENTRYPOINT.Testnet]>>;
574
- } & {
575
- name_or_address: z.ZodUnion<[z.ZodString, z.ZodObject<{
576
- name_or_address: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
577
- local_mark_first: z.ZodOptional<z.ZodBoolean>;
578
- }, "strict", z.ZodTypeAny, {
579
- name_or_address?: string | undefined;
580
- local_mark_first?: boolean | undefined;
581
- }, {
582
- name_or_address?: string | undefined;
583
- local_mark_first?: boolean | undefined;
584
- }>]>;
585
- all_type: z.ZodOptional<z.ZodBoolean>;
586
- cursor: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNull]>>;
587
- limit: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodNull]>>;
588
- }, "strict", z.ZodTypeAny, {
589
- name_or_address: string | {
590
- name_or_address?: string | undefined;
591
- local_mark_first?: boolean | undefined;
592
- };
593
- no_cache?: boolean | undefined;
594
- network?: ENTRYPOINT | undefined;
595
- all_type?: boolean | undefined;
596
- cursor?: string | null | undefined;
597
- limit?: number | null | undefined;
598
- }, {
599
- name_or_address: string | {
600
- name_or_address?: string | undefined;
601
- local_mark_first?: boolean | undefined;
602
- };
603
- no_cache?: boolean | undefined;
604
- network?: ENTRYPOINT | undefined;
605
- all_type?: boolean | undefined;
606
- cursor?: string | null | undefined;
607
- limit?: number | null | undefined;
608
- }>;
609
571
  export declare const ReceivedBalanceObjectSchema: z.ZodObject<{
610
572
  id: z.ZodString;
611
573
  balance: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
@@ -837,7 +799,6 @@ export type GuardTableItem = z.infer<typeof GuardTableItemSchema>;
837
799
  export type Entrypoint = z.infer<typeof EntrypointSchema>;
838
800
  export type ObjectBase = z.infer<typeof ObjectBaseSchema>;
839
801
  export type QueryEnv = z.infer<typeof QueryEnvSchema>;
840
- export type QueryReceived = z.infer<typeof QueryReceivedSchema>;
841
802
  export type ReceivedBalance = z.infer<typeof ReceivedBalanceSchema>;
842
803
  export type ReceivedNormal = z.infer<typeof ReceivedNormalSchema>;
843
804
  export type QueryReceivedResult = z.infer<typeof QueryReceivedResultSchema>;
@@ -272,12 +272,6 @@ export const QueryEnvSchema = z.object({
272
272
  no_cache: z.boolean().optional().describe("Whether to disable cache"),
273
273
  network: EntrypointSchema.optional(),
274
274
  }).strict().describe("Query environment parameters");
275
- export const QueryReceivedSchema = QueryEnvSchema.extend({
276
- name_or_address: AccountOrMark_AddressAISchema,
277
- all_type: z.boolean().optional().describe("Whether to query all types of received objects"),
278
- cursor: z.union([z.string(), z.null()]).optional().describe("Pagination cursor"),
279
- limit: z.union([z.number(), z.null()]).optional().describe("Number of records returned per page"),
280
- }).strict().describe("Request parameters for querying object's received objects");
281
275
  export const ReceivedBalanceObjectSchema = z.object({
282
276
  id: z.string().describe("Received CoinWrapper object ID"),
283
277
  balance: BalanceTypeSchema,
@@ -496,8 +496,8 @@ export declare const MessageFilterSchema: z.ZodObject<{
496
496
  skipAutoMarkViewed: z.ZodOptional<z.ZodBoolean>;
497
497
  }, "strip", z.ZodTypeAny, {
498
498
  status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
499
- limit?: number | undefined;
500
499
  account?: string | undefined;
500
+ limit?: number | undefined;
501
501
  contentType?: "text" | "wip" | "zip" | "wts" | undefined;
502
502
  direction?: "received" | "sent" | undefined;
503
503
  msgType?: 1 | 3 | undefined;
@@ -538,8 +538,8 @@ export declare const MessageFilterSchema: z.ZodObject<{
538
538
  viewedAtEnd?: number | undefined;
539
539
  }, {
540
540
  status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
541
- limit?: number | undefined;
542
541
  account?: string | undefined;
542
+ limit?: number | undefined;
543
543
  contentType?: "text" | "wip" | "zip" | "wts" | undefined;
544
544
  direction?: "received" | "sent" | undefined;
545
545
  msgType?: 1 | 3 | undefined;
@@ -1645,8 +1645,8 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
1645
1645
  skipAutoMarkViewed: z.ZodOptional<z.ZodBoolean>;
1646
1646
  }, "strip", z.ZodTypeAny, {
1647
1647
  status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
1648
- limit?: number | undefined;
1649
1648
  account?: string | undefined;
1649
+ limit?: number | undefined;
1650
1650
  contentType?: "text" | "wip" | "zip" | "wts" | undefined;
1651
1651
  direction?: "received" | "sent" | undefined;
1652
1652
  msgType?: 1 | 3 | undefined;
@@ -1687,8 +1687,8 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
1687
1687
  viewedAtEnd?: number | undefined;
1688
1688
  }, {
1689
1689
  status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
1690
- limit?: number | undefined;
1691
1690
  account?: string | undefined;
1691
+ limit?: number | undefined;
1692
1692
  contentType?: "text" | "wip" | "zip" | "wts" | undefined;
1693
1693
  direction?: "received" | "sent" | undefined;
1694
1694
  msgType?: 1 | 3 | undefined;
@@ -1732,8 +1732,8 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
1732
1732
  operation: "watch_messages";
1733
1733
  filter?: {
1734
1734
  status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
1735
- limit?: number | undefined;
1736
1735
  account?: string | undefined;
1736
+ limit?: number | undefined;
1737
1737
  contentType?: "text" | "wip" | "zip" | "wts" | undefined;
1738
1738
  direction?: "received" | "sent" | undefined;
1739
1739
  msgType?: 1 | 3 | undefined;
@@ -1777,8 +1777,8 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
1777
1777
  operation: "watch_messages";
1778
1778
  filter?: {
1779
1779
  status?: "pending" | "confirmed" | "read" | "failed" | "rejected" | "decrypted" | "decrypt_failed" | undefined;
1780
- limit?: number | undefined;
1781
1780
  account?: string | undefined;
1781
+ limit?: number | undefined;
1782
1782
  contentType?: "text" | "wip" | "zip" | "wts" | undefined;
1783
1783
  direction?: "received" | "sent" | undefined;
1784
1784
  msgType?: 1 | 3 | undefined;
@@ -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-20T11:48:42.252Z",
5
+ "generatedAt": "2026-05-21T08:51:01.877Z",
6
6
  "tools": [
7
7
  {
8
8
  "name": "onchain_operations",
package/package.json CHANGED
@@ -1,11 +1,16 @@
1
1
  {
2
2
  "name": "@wowok/agent-mcp",
3
- "version": "2.2.15",
3
+ "version": "2.2.17",
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",
7
7
  "module": "node",
8
8
  "type": "module",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/wowok-ai/agent.git"
12
+ },
13
+ "homepage": "https://wowok.net",
9
14
  "files": [
10
15
  "dist",
11
16
  "docs",
@@ -31,7 +36,7 @@
31
36
  "license": "Apache-2.0",
32
37
  "dependencies": {
33
38
  "@modelcontextprotocol/sdk": "^1.29.0",
34
- "@wowok/wowok": "2.2.13",
39
+ "@wowok/wowok": "2.2.14",
35
40
  "lodash": "^4.18.1",
36
41
  "zod": "^3.25.76"
37
42
  },