wowok_agent 2.2.3 → 2.2.5
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 +65 -319
- package/dist/index.js +318 -157
- package/dist/schema/query/index.d.ts +25170 -4
- package/dist/schema/query/index.js +69 -4
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { TokenTypeInfoSchema, QueryLocalMarkListResultSchema, QueryAccountListResultSchema, QueryLocalInfoListResultSchema, QueryLocalTokenListResultSchema, QueryAccountResultSchema } from "../local/index.js";
|
|
3
|
-
import { AccountOrMark_AddressSchema, BalanceTypeSchema, EntrypointSchema, GuardIdentifierSchema, GuardTableItemSchema, NameOrAddressSchema, ObjectBaseSchema, ObjectTypeSchema, QueryIdSchema, SupportedValueSchema, ValueTypeSchema, LongNameSchema, DescriptionSchema } from "../common/index.js";
|
|
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
6
|
import { isWitnessType, } from "wowok";
|
|
@@ -420,7 +420,7 @@ export const GuardNodeSchema = z.lazy(() => z.discriminatedUnion('type', [
|
|
|
420
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."),
|
|
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."),
|
|
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."),
|
|
424
424
|
z.object({
|
|
425
425
|
type: z.literal('logic_as_u256_greater_or_equal'),
|
|
426
426
|
nodes: z.array(GuardNodeSchema),
|
|
@@ -1260,6 +1260,71 @@ export const LocalQueryResultSchema = z.union([
|
|
|
1260
1260
|
result: QueryAccountResultSchema,
|
|
1261
1261
|
}),
|
|
1262
1262
|
]);
|
|
1263
|
+
export const OnchainQueryResultSchema_Part1 = z.union([
|
|
1264
|
+
z.object({
|
|
1265
|
+
query_type: z.literal("onchain_personal_profile"),
|
|
1266
|
+
result: z.union([ObjectPersonalSchema, z.undefined()]),
|
|
1267
|
+
}),
|
|
1268
|
+
z.object({
|
|
1269
|
+
query_type: z.literal("onchain_objects"),
|
|
1270
|
+
result: ObjectsAnswerSchema,
|
|
1271
|
+
}),
|
|
1272
|
+
z.object({
|
|
1273
|
+
query_type: z.literal("onchain_table"),
|
|
1274
|
+
result: z.union([TableAnswerSchema, z.undefined()]),
|
|
1275
|
+
}),
|
|
1276
|
+
z.object({
|
|
1277
|
+
query_type: z.literal("onchain_table_item_repository_data"),
|
|
1278
|
+
result: z.union([TableItem_RepositoryDataSchema, z.undefined()]),
|
|
1279
|
+
}),
|
|
1280
|
+
z.object({
|
|
1281
|
+
query_type: z.literal("onchain_table_item_permission_perm"),
|
|
1282
|
+
result: z.union([TableItem_PermissionPermSchema, z.undefined()]),
|
|
1283
|
+
}),
|
|
1284
|
+
z.object({
|
|
1285
|
+
query_type: z.literal("onchain_table_item_entity_registrar"),
|
|
1286
|
+
result: z.union([TableItem_EntityRegistrarSchema, z.undefined()]),
|
|
1287
|
+
}),
|
|
1288
|
+
z.object({
|
|
1289
|
+
query_type: z.literal("onchain_table_item_entity_linker"),
|
|
1290
|
+
result: z.union([TableItem_EntityLinkerSchema, z.undefined()]),
|
|
1291
|
+
}),
|
|
1292
|
+
]);
|
|
1293
|
+
export const OnchainQueryResultSchema_Part2 = z.union([
|
|
1294
|
+
z.object({
|
|
1295
|
+
query_type: z.literal("onchain_table_item_reward_record"),
|
|
1296
|
+
result: z.union([TableItem_RewardRecordSchema, z.undefined()]),
|
|
1297
|
+
}),
|
|
1298
|
+
z.object({
|
|
1299
|
+
query_type: z.literal("onchain_table_item_demand_presenter"),
|
|
1300
|
+
result: z.union([TableItem_DemandPresenterSchema, z.undefined()]),
|
|
1301
|
+
}),
|
|
1302
|
+
z.object({
|
|
1303
|
+
query_type: z.literal("onchain_table_item_treasury_history"),
|
|
1304
|
+
result: z.union([TableItem_TreasuryHistorySchema, z.undefined()]),
|
|
1305
|
+
}),
|
|
1306
|
+
z.object({
|
|
1307
|
+
query_type: z.literal("onchain_table_item_machine_node"),
|
|
1308
|
+
result: z.union([TableItem_MachineNodeSchema, z.undefined()]),
|
|
1309
|
+
}),
|
|
1310
|
+
z.object({
|
|
1311
|
+
query_type: z.literal("onchain_table_item_progress_history"),
|
|
1312
|
+
result: z.union([TableItem_ProgressHistorySchema, z.undefined()]),
|
|
1313
|
+
}),
|
|
1314
|
+
z.object({
|
|
1315
|
+
query_type: z.literal("onchain_table_item_address_mark"),
|
|
1316
|
+
result: z.union([TableItem_AddressMarkSchema, z.undefined()]),
|
|
1317
|
+
}),
|
|
1318
|
+
z.object({
|
|
1319
|
+
query_type: z.literal("onchain_received"),
|
|
1320
|
+
result: QueryReceivedResultSchema.shape.result,
|
|
1321
|
+
}),
|
|
1322
|
+
]);
|
|
1323
|
+
export const AllQueryResultsSchema = z.union([
|
|
1324
|
+
LocalQueryResultSchema,
|
|
1325
|
+
OnchainQueryResultSchema_Part1,
|
|
1326
|
+
OnchainQueryResultSchema_Part2,
|
|
1327
|
+
]);
|
|
1263
1328
|
export const WatchQueryOperationsResultSchema = z.object({
|
|
1264
|
-
result:
|
|
1265
|
-
}).describe("Watch query operations result schema
|
|
1329
|
+
result: AllQueryResultsSchema
|
|
1330
|
+
}).describe("Watch query operations result schema");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wowok_agent",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
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",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
32
32
|
"lodash": "^4.18.1",
|
|
33
|
-
"wowok": "2.2.
|
|
33
|
+
"wowok": "2.2.7",
|
|
34
34
|
"zod": "^3.25.76"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|