@wowok/agent-mcp 2.6.9 → 2.7.1
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 +0 -2
- package/dist/customer/risk-assessment.d.ts +5 -1
- package/dist/customer/risk-assessment.js +4 -4
- package/dist/evaluation/arbitration-game.d.ts +16 -0
- package/dist/evaluation/arbitration-game.js +48 -0
- package/dist/evaluation/builtins/demand-match.d.ts +15 -0
- package/dist/evaluation/builtins/demand-match.js +153 -0
- package/dist/evaluation/builtins/index.d.ts +3 -0
- package/dist/evaluation/builtins/index.js +10 -0
- package/dist/evaluation/builtins/service-risk.d.ts +6 -0
- package/dist/evaluation/builtins/service-risk.js +55 -0
- package/dist/evaluation/capability.d.ts +50 -0
- package/dist/evaluation/capability.js +13 -0
- package/dist/evaluation/composer.d.ts +13 -0
- package/dist/evaluation/composer.js +40 -0
- package/dist/evaluation/engine.d.ts +18 -0
- package/dist/evaluation/engine.js +175 -0
- package/dist/evaluation/extract.d.ts +30 -0
- package/dist/evaluation/extract.js +115 -0
- package/dist/evaluation/gap.d.ts +2 -0
- package/dist/evaluation/gap.js +100 -0
- package/dist/evaluation/index.d.ts +11 -0
- package/dist/evaluation/index.js +11 -0
- package/dist/evaluation/node-game.d.ts +34 -0
- package/dist/evaluation/node-game.js +57 -0
- package/dist/evaluation/region.d.ts +10 -0
- package/dist/evaluation/region.js +36 -0
- package/dist/evaluation/types.d.ts +76 -0
- package/dist/evaluation/types.js +1 -0
- package/dist/evaluation/user-injection.d.ts +6 -0
- package/dist/evaluation/user-injection.js +27 -0
- package/dist/examples/education-contact-create.json +40 -0
- package/dist/examples/freelance-contact-create.json +40 -0
- package/dist/examples/insurance-machine-create.json +1 -1
- package/dist/examples/insurance-service-allocators.json +1 -1
- package/dist/examples/machine-publish.json +1 -1
- package/dist/examples/rental-ziroom-service-create.json +1 -1
- package/dist/examples/retail-adv-guard-messenger-proof-create.json +1 -1
- package/dist/examples/retail-myshop-service-create.json +1 -1
- package/dist/examples/retail-myshop-service-customer-required.json +1 -1
- package/dist/examples/subscription-contact-create.json +40 -0
- package/dist/examples/threebody-machine-create.json +1 -1
- package/dist/examples/travel-machine-create.json +1 -1
- package/dist/examples/travel-service-create.json +1 -1
- package/dist/harness/plan.js +42 -3
- package/dist/intent/enrich.d.ts +1 -0
- package/dist/intent/enrich.js +67 -0
- package/dist/intent/index.d.ts +23 -0
- package/dist/intent/index.js +60 -0
- package/dist/intent/matcher.d.ts +2 -0
- package/dist/intent/matcher.js +81 -0
- package/dist/intent/store.d.ts +19 -0
- package/dist/intent/store.js +55 -0
- package/dist/intent/types.d.ts +33 -0
- package/dist/intent/types.js +10 -0
- package/dist/knowledge/arbitration-risk.js +1 -11
- package/dist/knowledge/contact-templates.d.ts +27 -0
- package/dist/knowledge/contact-templates.js +60 -0
- package/dist/knowledge/examples-scanner.js +21 -3
- package/dist/knowledge/fund-layer.js +8 -4
- package/dist/knowledge/industry-generalizer.js +21 -21
- package/dist/knowledge/machine-risk.js +0 -1
- package/dist/knowledge/mcp-schema-audit.d.ts +1 -1
- package/dist/knowledge/mcp-schema-audit.js +8 -4
- package/dist/knowledge/service-risk.js +38 -2
- package/dist/knowledge/service-templates.js +1 -1
- package/dist/knowledge/service-translation.js +2 -2
- package/dist/knowledge/template-registry.d.ts +1 -1
- package/dist/knowledge/template-registry.js +13 -1
- package/dist/knowledge/tools-reference.js +23 -0
- package/dist/persona/analyzer.d.ts +16 -0
- package/dist/persona/analyzer.js +66 -0
- package/dist/persona/bridge.d.ts +5 -0
- package/dist/persona/bridge.js +86 -0
- package/dist/persona/defaults.d.ts +4 -0
- package/dist/persona/defaults.js +195 -0
- package/dist/persona/experience-bridge.d.ts +3 -0
- package/dist/persona/experience-bridge.js +23 -0
- package/dist/persona/index.d.ts +18 -0
- package/dist/persona/index.js +71 -0
- package/dist/persona/model.d.ts +7 -0
- package/dist/persona/model.js +111 -0
- package/dist/persona/store.d.ts +19 -0
- package/dist/persona/store.js +62 -0
- package/dist/persona/types.d.ts +43 -0
- package/dist/persona/types.js +5 -0
- package/dist/project/handlers.d.ts +5 -0
- package/dist/project/handlers.js +23 -1
- package/dist/project/semantic-graph.js +47 -0
- package/dist/rules.d.ts +2 -0
- package/dist/rules.js +43 -0
- package/dist/schema/call/semantic.js +23 -1
- package/dist/schema/call/service.js +7 -1
- package/dist/schema/evaluation/index.d.ts +4239 -0
- package/dist/schema/evaluation/index.js +356 -0
- package/dist/schema/index.d.ts +4 -0
- package/dist/schema/index.js +4 -0
- package/dist/schema/intent-radar/index.d.ts +284 -0
- package/dist/schema/intent-radar/index.js +89 -0
- package/dist/schema/messenger/index.d.ts +171 -0
- package/dist/schema/messenger/index.js +5 -0
- package/dist/schema/operations.js +1 -1
- package/dist/schema/persona/index.d.ts +1985 -0
- package/dist/schema/persona/index.js +148 -0
- package/dist/schema/project/index.d.ts +2 -2
- package/dist/schema/query/index.js +6 -0
- package/dist/schema/sync-layer4.d.ts +1 -1
- package/dist/schema/sync-layer4.js +9 -5
- package/dist/schema/task-status.d.ts +168 -0
- package/dist/schema/task-status.js +36 -0
- package/dist/schema/trust/index.js +1 -1
- package/dist/schemas/evaluation_operation.output.json +677 -0
- package/dist/schemas/evaluation_operation.schema.json +903 -0
- package/dist/schemas/index.json +25 -1
- package/dist/schemas/intent_radar.output.json +229 -0
- package/dist/schemas/intent_radar.schema.json +135 -0
- package/dist/schemas/messenger_operation.output.json +14 -0
- package/dist/schemas/messenger_operation.schema.json +18 -0
- package/dist/schemas/onchain_operations.schema.json +2 -2
- package/dist/schemas/onchain_operations_service.schema.json +2 -2
- package/dist/schemas/persona_operation.output.json +389 -0
- package/dist/schemas/persona_operation.schema.json +247 -0
- package/dist/schemas/query_task_status.output.json +115 -0
- package/dist/schemas/query_task_status.schema.json +24 -0
- package/dist/schemas/query_toolkit.output.json +1 -1
- package/dist/schemas/trust_score.schema.json +1 -1
- package/dist/tools/handlers/evaluation.d.ts +2 -0
- package/dist/tools/handlers/evaluation.js +123 -0
- package/dist/tools/handlers/intent-radar.d.ts +2 -0
- package/dist/tools/handlers/intent-radar.js +76 -0
- package/dist/tools/handlers/onchain.js +98 -0
- package/dist/tools/handlers/persona.d.ts +4 -0
- package/dist/tools/handlers/persona.js +89 -0
- package/dist/tools/handlers/task-status.d.ts +0 -168
- package/dist/tools/handlers/task-status.js +0 -29
- package/dist/tools/index.js +83 -7
- package/dist/tools/wip-deploy-assist.d.ts +1 -1
- package/dist/tools/wip-deploy-assist.js +33 -5
- package/package.json +2 -2
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
const RoleEnum = z.enum(["merchant", "user", "arbitrator"]);
|
|
3
|
+
const IndustryScenarioEnum = z.enum([
|
|
4
|
+
"freelance", "rental", "education", "travel", "subscription", "retail", "general", "custom",
|
|
5
|
+
]);
|
|
6
|
+
const TargetTypeEnum = z.enum([
|
|
7
|
+
"NewOrderEvent",
|
|
8
|
+
"ProgressEvent",
|
|
9
|
+
"DemandPresentEvent",
|
|
10
|
+
"DemandFeedbackEvent",
|
|
11
|
+
"NewEntityEvent",
|
|
12
|
+
"ArbEvent",
|
|
13
|
+
]);
|
|
14
|
+
const IntentRecordSchema = z
|
|
15
|
+
.object({
|
|
16
|
+
id: z.string(),
|
|
17
|
+
intent: z.string(),
|
|
18
|
+
account: z.string().optional(),
|
|
19
|
+
role: RoleEnum.optional(),
|
|
20
|
+
industries: z.array(IndustryScenarioEnum),
|
|
21
|
+
keywords: z.array(z.string()),
|
|
22
|
+
target_types: z.array(TargetTypeEnum),
|
|
23
|
+
created_at: z.number(),
|
|
24
|
+
updated_at: z.number(),
|
|
25
|
+
})
|
|
26
|
+
.strict();
|
|
27
|
+
const IntentEventHitSchema = z
|
|
28
|
+
.object({
|
|
29
|
+
event_type: z.string(),
|
|
30
|
+
event_id: z.string(),
|
|
31
|
+
related_objects: z.array(z.string()),
|
|
32
|
+
business_meaning: z.string(),
|
|
33
|
+
score: z.number(),
|
|
34
|
+
matched_industries: z.array(z.string()),
|
|
35
|
+
matched_keywords: z.array(z.string()),
|
|
36
|
+
event: z.record(z.unknown()),
|
|
37
|
+
})
|
|
38
|
+
.strict();
|
|
39
|
+
const IntentMatchResultSchema = z
|
|
40
|
+
.object({
|
|
41
|
+
intent_id: z.string(),
|
|
42
|
+
intent: z.string(),
|
|
43
|
+
hits: z.array(IntentEventHitSchema),
|
|
44
|
+
scanned: z.number(),
|
|
45
|
+
})
|
|
46
|
+
.strict();
|
|
47
|
+
export const IntentRadarInputSchema = z.discriminatedUnion("action", [
|
|
48
|
+
z.object({
|
|
49
|
+
action: z.literal("save"),
|
|
50
|
+
intent: z.string().describe("Free-form business intent, e.g. 'find subscription services in Shanghai'."),
|
|
51
|
+
account: z.string().optional().describe("Bound account; omit for a system-level intent."),
|
|
52
|
+
role: RoleEnum.optional(),
|
|
53
|
+
target_types: z.array(TargetTypeEnum).optional().describe("Event types to watch; empty = all."),
|
|
54
|
+
}).strict(),
|
|
55
|
+
z.object({
|
|
56
|
+
action: z.literal("list"),
|
|
57
|
+
account: z.string().optional().describe("Filter by bound account; omit for all."),
|
|
58
|
+
}).strict(),
|
|
59
|
+
z.object({
|
|
60
|
+
action: z.literal("remove"),
|
|
61
|
+
id: z.string().describe("Intent id to delete."),
|
|
62
|
+
}).strict(),
|
|
63
|
+
z.object({
|
|
64
|
+
action: z.literal("match"),
|
|
65
|
+
intent_id: z.string().optional().describe("Match a single intent; omit to match all intents."),
|
|
66
|
+
account: z.string().optional().describe("Filter intents by account."),
|
|
67
|
+
events: z.array(z.record(z.unknown())).optional().describe("Events to score (from onchain_events). Omit to auto-pull recent events."),
|
|
68
|
+
network: z.enum(["mainnet", "testnet"]).optional(),
|
|
69
|
+
limit: z.number().int().min(1).max(100).optional().describe("Max events to auto-pull when `events` is omitted."),
|
|
70
|
+
}).strict(),
|
|
71
|
+
]);
|
|
72
|
+
export const IntentRadarOutputSchema = z.discriminatedUnion("action", [
|
|
73
|
+
z.object({
|
|
74
|
+
action: z.literal("save"),
|
|
75
|
+
intent: IntentRecordSchema,
|
|
76
|
+
}).strict(),
|
|
77
|
+
z.object({
|
|
78
|
+
action: z.literal("list"),
|
|
79
|
+
intents: z.array(IntentRecordSchema),
|
|
80
|
+
}).strict(),
|
|
81
|
+
z.object({
|
|
82
|
+
action: z.literal("remove"),
|
|
83
|
+
removed: z.boolean(),
|
|
84
|
+
}).strict(),
|
|
85
|
+
z.object({
|
|
86
|
+
action: z.literal("match"),
|
|
87
|
+
results: z.array(IntentMatchResultSchema),
|
|
88
|
+
}).strict(),
|
|
89
|
+
]);
|
|
@@ -27,12 +27,26 @@ export declare const ZipMetadataSchema: z.ZodObject<{
|
|
|
27
27
|
localCachePath?: string | undefined;
|
|
28
28
|
downloadedAt?: number | undefined;
|
|
29
29
|
}>;
|
|
30
|
+
export declare const ReplyToSchema: z.ZodObject<{
|
|
31
|
+
messageId: z.ZodString;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
messageId: string;
|
|
34
|
+
}, {
|
|
35
|
+
messageId: string;
|
|
36
|
+
}>;
|
|
30
37
|
export declare const MessageSchema: z.ZodObject<{
|
|
31
38
|
messageId: z.ZodString;
|
|
32
39
|
fromAddress: z.ZodString;
|
|
33
40
|
toAddress: z.ZodString;
|
|
34
41
|
plaintextHash: z.ZodString;
|
|
35
42
|
plaintext: z.ZodOptional<z.ZodString>;
|
|
43
|
+
replyTo: z.ZodOptional<z.ZodObject<{
|
|
44
|
+
messageId: z.ZodString;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
messageId: string;
|
|
47
|
+
}, {
|
|
48
|
+
messageId: string;
|
|
49
|
+
}>>;
|
|
36
50
|
guardAddress: z.ZodOptional<z.ZodString>;
|
|
37
51
|
passportAddress: z.ZodOptional<z.ZodString>;
|
|
38
52
|
lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
|
|
@@ -103,6 +117,9 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
103
117
|
receivedAt?: number | undefined;
|
|
104
118
|
serverTimestamp?: number | undefined;
|
|
105
119
|
plaintext?: string | undefined;
|
|
120
|
+
replyTo?: {
|
|
121
|
+
messageId: string;
|
|
122
|
+
} | undefined;
|
|
106
123
|
guardAddress?: string | undefined;
|
|
107
124
|
passportAddress?: string | undefined;
|
|
108
125
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -142,6 +159,9 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
142
159
|
receivedAt?: number | undefined;
|
|
143
160
|
serverTimestamp?: number | undefined;
|
|
144
161
|
plaintext?: string | undefined;
|
|
162
|
+
replyTo?: {
|
|
163
|
+
messageId: string;
|
|
164
|
+
} | undefined;
|
|
145
165
|
guardAddress?: string | undefined;
|
|
146
166
|
passportAddress?: string | undefined;
|
|
147
167
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -181,6 +201,13 @@ export declare const ConversationInfoSchema: z.ZodObject<{
|
|
|
181
201
|
toAddress: z.ZodString;
|
|
182
202
|
plaintextHash: z.ZodString;
|
|
183
203
|
plaintext: z.ZodOptional<z.ZodString>;
|
|
204
|
+
replyTo: z.ZodOptional<z.ZodObject<{
|
|
205
|
+
messageId: z.ZodString;
|
|
206
|
+
}, "strip", z.ZodTypeAny, {
|
|
207
|
+
messageId: string;
|
|
208
|
+
}, {
|
|
209
|
+
messageId: string;
|
|
210
|
+
}>>;
|
|
184
211
|
guardAddress: z.ZodOptional<z.ZodString>;
|
|
185
212
|
passportAddress: z.ZodOptional<z.ZodString>;
|
|
186
213
|
lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
|
|
@@ -251,6 +278,9 @@ export declare const ConversationInfoSchema: z.ZodObject<{
|
|
|
251
278
|
receivedAt?: number | undefined;
|
|
252
279
|
serverTimestamp?: number | undefined;
|
|
253
280
|
plaintext?: string | undefined;
|
|
281
|
+
replyTo?: {
|
|
282
|
+
messageId: string;
|
|
283
|
+
} | undefined;
|
|
254
284
|
guardAddress?: string | undefined;
|
|
255
285
|
passportAddress?: string | undefined;
|
|
256
286
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -290,6 +320,9 @@ export declare const ConversationInfoSchema: z.ZodObject<{
|
|
|
290
320
|
receivedAt?: number | undefined;
|
|
291
321
|
serverTimestamp?: number | undefined;
|
|
292
322
|
plaintext?: string | undefined;
|
|
323
|
+
replyTo?: {
|
|
324
|
+
messageId: string;
|
|
325
|
+
} | undefined;
|
|
293
326
|
guardAddress?: string | undefined;
|
|
294
327
|
passportAddress?: string | undefined;
|
|
295
328
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -336,6 +369,9 @@ export declare const ConversationInfoSchema: z.ZodObject<{
|
|
|
336
369
|
receivedAt?: number | undefined;
|
|
337
370
|
serverTimestamp?: number | undefined;
|
|
338
371
|
plaintext?: string | undefined;
|
|
372
|
+
replyTo?: {
|
|
373
|
+
messageId: string;
|
|
374
|
+
} | undefined;
|
|
339
375
|
guardAddress?: string | undefined;
|
|
340
376
|
passportAddress?: string | undefined;
|
|
341
377
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -382,6 +418,9 @@ export declare const ConversationInfoSchema: z.ZodObject<{
|
|
|
382
418
|
receivedAt?: number | undefined;
|
|
383
419
|
serverTimestamp?: number | undefined;
|
|
384
420
|
plaintext?: string | undefined;
|
|
421
|
+
replyTo?: {
|
|
422
|
+
messageId: string;
|
|
423
|
+
} | undefined;
|
|
385
424
|
guardAddress?: string | undefined;
|
|
386
425
|
passportAddress?: string | undefined;
|
|
387
426
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -591,14 +630,27 @@ export declare const SendMessageOptionsSchema: z.ZodObject<{
|
|
|
591
630
|
force: z.ZodOptional<z.ZodBoolean>;
|
|
592
631
|
enable_messenger: z.ZodOptional<z.ZodBoolean>;
|
|
593
632
|
network: z.ZodOptional<z.ZodEnum<[import("@wowok/wowok").ENTRYPOINT.Localnet, import("@wowok/wowok").ENTRYPOINT.Testnet, import("@wowok/wowok").ENTRYPOINT.Mainnet]>>;
|
|
633
|
+
replyTo: z.ZodOptional<z.ZodObject<{
|
|
634
|
+
messageId: z.ZodString;
|
|
635
|
+
}, "strip", z.ZodTypeAny, {
|
|
636
|
+
messageId: string;
|
|
637
|
+
}, {
|
|
638
|
+
messageId: string;
|
|
639
|
+
}>>;
|
|
594
640
|
}, "strip", z.ZodTypeAny, {
|
|
595
641
|
network?: import("@wowok/wowok").ENTRYPOINT | undefined;
|
|
642
|
+
replyTo?: {
|
|
643
|
+
messageId: string;
|
|
644
|
+
} | undefined;
|
|
596
645
|
guardAddress?: string | undefined;
|
|
597
646
|
passportAddress?: string | undefined;
|
|
598
647
|
force?: boolean | undefined;
|
|
599
648
|
enable_messenger?: boolean | undefined;
|
|
600
649
|
}, {
|
|
601
650
|
network?: import("@wowok/wowok").ENTRYPOINT | undefined;
|
|
651
|
+
replyTo?: {
|
|
652
|
+
messageId: string;
|
|
653
|
+
} | undefined;
|
|
602
654
|
guardAddress?: string | undefined;
|
|
603
655
|
passportAddress?: string | undefined;
|
|
604
656
|
force?: boolean | undefined;
|
|
@@ -1572,14 +1624,27 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1572
1624
|
force: z.ZodOptional<z.ZodBoolean>;
|
|
1573
1625
|
enable_messenger: z.ZodOptional<z.ZodBoolean>;
|
|
1574
1626
|
network: z.ZodOptional<z.ZodEnum<[import("@wowok/wowok").ENTRYPOINT.Localnet, import("@wowok/wowok").ENTRYPOINT.Testnet, import("@wowok/wowok").ENTRYPOINT.Mainnet]>>;
|
|
1627
|
+
replyTo: z.ZodOptional<z.ZodObject<{
|
|
1628
|
+
messageId: z.ZodString;
|
|
1629
|
+
}, "strip", z.ZodTypeAny, {
|
|
1630
|
+
messageId: string;
|
|
1631
|
+
}, {
|
|
1632
|
+
messageId: string;
|
|
1633
|
+
}>>;
|
|
1575
1634
|
}, "strip", z.ZodTypeAny, {
|
|
1576
1635
|
network?: import("@wowok/wowok").ENTRYPOINT | undefined;
|
|
1636
|
+
replyTo?: {
|
|
1637
|
+
messageId: string;
|
|
1638
|
+
} | undefined;
|
|
1577
1639
|
guardAddress?: string | undefined;
|
|
1578
1640
|
passportAddress?: string | undefined;
|
|
1579
1641
|
force?: boolean | undefined;
|
|
1580
1642
|
enable_messenger?: boolean | undefined;
|
|
1581
1643
|
}, {
|
|
1582
1644
|
network?: import("@wowok/wowok").ENTRYPOINT | undefined;
|
|
1645
|
+
replyTo?: {
|
|
1646
|
+
messageId: string;
|
|
1647
|
+
} | undefined;
|
|
1583
1648
|
guardAddress?: string | undefined;
|
|
1584
1649
|
passportAddress?: string | undefined;
|
|
1585
1650
|
force?: boolean | undefined;
|
|
@@ -1597,6 +1662,9 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1597
1662
|
operation: "send_message";
|
|
1598
1663
|
options?: {
|
|
1599
1664
|
network?: import("@wowok/wowok").ENTRYPOINT | undefined;
|
|
1665
|
+
replyTo?: {
|
|
1666
|
+
messageId: string;
|
|
1667
|
+
} | undefined;
|
|
1600
1668
|
guardAddress?: string | undefined;
|
|
1601
1669
|
passportAddress?: string | undefined;
|
|
1602
1670
|
force?: boolean | undefined;
|
|
@@ -1612,6 +1680,9 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1612
1680
|
operation: "send_message";
|
|
1613
1681
|
options?: {
|
|
1614
1682
|
network?: import("@wowok/wowok").ENTRYPOINT | undefined;
|
|
1683
|
+
replyTo?: {
|
|
1684
|
+
messageId: string;
|
|
1685
|
+
} | undefined;
|
|
1615
1686
|
guardAddress?: string | undefined;
|
|
1616
1687
|
passportAddress?: string | undefined;
|
|
1617
1688
|
force?: boolean | undefined;
|
|
@@ -1948,6 +2019,13 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
1948
2019
|
toAddress: z.ZodString;
|
|
1949
2020
|
plaintextHash: z.ZodString;
|
|
1950
2021
|
plaintext: z.ZodOptional<z.ZodString>;
|
|
2022
|
+
replyTo: z.ZodOptional<z.ZodObject<{
|
|
2023
|
+
messageId: z.ZodString;
|
|
2024
|
+
}, "strip", z.ZodTypeAny, {
|
|
2025
|
+
messageId: string;
|
|
2026
|
+
}, {
|
|
2027
|
+
messageId: string;
|
|
2028
|
+
}>>;
|
|
1951
2029
|
guardAddress: z.ZodOptional<z.ZodString>;
|
|
1952
2030
|
passportAddress: z.ZodOptional<z.ZodString>;
|
|
1953
2031
|
lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2018,6 +2096,9 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
2018
2096
|
receivedAt?: number | undefined;
|
|
2019
2097
|
serverTimestamp?: number | undefined;
|
|
2020
2098
|
plaintext?: string | undefined;
|
|
2099
|
+
replyTo?: {
|
|
2100
|
+
messageId: string;
|
|
2101
|
+
} | undefined;
|
|
2021
2102
|
guardAddress?: string | undefined;
|
|
2022
2103
|
passportAddress?: string | undefined;
|
|
2023
2104
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -2057,6 +2138,9 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
2057
2138
|
receivedAt?: number | undefined;
|
|
2058
2139
|
serverTimestamp?: number | undefined;
|
|
2059
2140
|
plaintext?: string | undefined;
|
|
2141
|
+
replyTo?: {
|
|
2142
|
+
messageId: string;
|
|
2143
|
+
} | undefined;
|
|
2060
2144
|
guardAddress?: string | undefined;
|
|
2061
2145
|
passportAddress?: string | undefined;
|
|
2062
2146
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -2101,6 +2185,9 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
2101
2185
|
receivedAt?: number | undefined;
|
|
2102
2186
|
serverTimestamp?: number | undefined;
|
|
2103
2187
|
plaintext?: string | undefined;
|
|
2188
|
+
replyTo?: {
|
|
2189
|
+
messageId: string;
|
|
2190
|
+
} | undefined;
|
|
2104
2191
|
guardAddress?: string | undefined;
|
|
2105
2192
|
passportAddress?: string | undefined;
|
|
2106
2193
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -2145,6 +2232,9 @@ export declare const MessengerOperationInputSchema: z.ZodDiscriminatedUnion<"ope
|
|
|
2145
2232
|
receivedAt?: number | undefined;
|
|
2146
2233
|
serverTimestamp?: number | undefined;
|
|
2147
2234
|
plaintext?: string | undefined;
|
|
2235
|
+
replyTo?: {
|
|
2236
|
+
messageId: string;
|
|
2237
|
+
} | undefined;
|
|
2148
2238
|
guardAddress?: string | undefined;
|
|
2149
2239
|
passportAddress?: string | undefined;
|
|
2150
2240
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -3135,6 +3225,13 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3135
3225
|
toAddress: z.ZodString;
|
|
3136
3226
|
plaintextHash: z.ZodString;
|
|
3137
3227
|
plaintext: z.ZodOptional<z.ZodString>;
|
|
3228
|
+
replyTo: z.ZodOptional<z.ZodObject<{
|
|
3229
|
+
messageId: z.ZodString;
|
|
3230
|
+
}, "strip", z.ZodTypeAny, {
|
|
3231
|
+
messageId: string;
|
|
3232
|
+
}, {
|
|
3233
|
+
messageId: string;
|
|
3234
|
+
}>>;
|
|
3138
3235
|
guardAddress: z.ZodOptional<z.ZodString>;
|
|
3139
3236
|
passportAddress: z.ZodOptional<z.ZodString>;
|
|
3140
3237
|
lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3205,6 +3302,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3205
3302
|
receivedAt?: number | undefined;
|
|
3206
3303
|
serverTimestamp?: number | undefined;
|
|
3207
3304
|
plaintext?: string | undefined;
|
|
3305
|
+
replyTo?: {
|
|
3306
|
+
messageId: string;
|
|
3307
|
+
} | undefined;
|
|
3208
3308
|
guardAddress?: string | undefined;
|
|
3209
3309
|
passportAddress?: string | undefined;
|
|
3210
3310
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -3244,6 +3344,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3244
3344
|
receivedAt?: number | undefined;
|
|
3245
3345
|
serverTimestamp?: number | undefined;
|
|
3246
3346
|
plaintext?: string | undefined;
|
|
3347
|
+
replyTo?: {
|
|
3348
|
+
messageId: string;
|
|
3349
|
+
} | undefined;
|
|
3247
3350
|
guardAddress?: string | undefined;
|
|
3248
3351
|
passportAddress?: string | undefined;
|
|
3249
3352
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -3290,6 +3393,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3290
3393
|
receivedAt?: number | undefined;
|
|
3291
3394
|
serverTimestamp?: number | undefined;
|
|
3292
3395
|
plaintext?: string | undefined;
|
|
3396
|
+
replyTo?: {
|
|
3397
|
+
messageId: string;
|
|
3398
|
+
} | undefined;
|
|
3293
3399
|
guardAddress?: string | undefined;
|
|
3294
3400
|
passportAddress?: string | undefined;
|
|
3295
3401
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -3336,6 +3442,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3336
3442
|
receivedAt?: number | undefined;
|
|
3337
3443
|
serverTimestamp?: number | undefined;
|
|
3338
3444
|
plaintext?: string | undefined;
|
|
3445
|
+
replyTo?: {
|
|
3446
|
+
messageId: string;
|
|
3447
|
+
} | undefined;
|
|
3339
3448
|
guardAddress?: string | undefined;
|
|
3340
3449
|
passportAddress?: string | undefined;
|
|
3341
3450
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -3384,6 +3493,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3384
3493
|
receivedAt?: number | undefined;
|
|
3385
3494
|
serverTimestamp?: number | undefined;
|
|
3386
3495
|
plaintext?: string | undefined;
|
|
3496
|
+
replyTo?: {
|
|
3497
|
+
messageId: string;
|
|
3498
|
+
} | undefined;
|
|
3387
3499
|
guardAddress?: string | undefined;
|
|
3388
3500
|
passportAddress?: string | undefined;
|
|
3389
3501
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -3433,6 +3545,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3433
3545
|
receivedAt?: number | undefined;
|
|
3434
3546
|
serverTimestamp?: number | undefined;
|
|
3435
3547
|
plaintext?: string | undefined;
|
|
3548
|
+
replyTo?: {
|
|
3549
|
+
messageId: string;
|
|
3550
|
+
} | undefined;
|
|
3436
3551
|
guardAddress?: string | undefined;
|
|
3437
3552
|
passportAddress?: string | undefined;
|
|
3438
3553
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -3646,6 +3761,13 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3646
3761
|
toAddress: z.ZodString;
|
|
3647
3762
|
plaintextHash: z.ZodString;
|
|
3648
3763
|
plaintext: z.ZodOptional<z.ZodString>;
|
|
3764
|
+
replyTo: z.ZodOptional<z.ZodObject<{
|
|
3765
|
+
messageId: z.ZodString;
|
|
3766
|
+
}, "strip", z.ZodTypeAny, {
|
|
3767
|
+
messageId: string;
|
|
3768
|
+
}, {
|
|
3769
|
+
messageId: string;
|
|
3770
|
+
}>>;
|
|
3649
3771
|
guardAddress: z.ZodOptional<z.ZodString>;
|
|
3650
3772
|
passportAddress: z.ZodOptional<z.ZodString>;
|
|
3651
3773
|
lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
|
|
@@ -3716,6 +3838,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3716
3838
|
receivedAt?: number | undefined;
|
|
3717
3839
|
serverTimestamp?: number | undefined;
|
|
3718
3840
|
plaintext?: string | undefined;
|
|
3841
|
+
replyTo?: {
|
|
3842
|
+
messageId: string;
|
|
3843
|
+
} | undefined;
|
|
3719
3844
|
guardAddress?: string | undefined;
|
|
3720
3845
|
passportAddress?: string | undefined;
|
|
3721
3846
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -3755,6 +3880,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3755
3880
|
receivedAt?: number | undefined;
|
|
3756
3881
|
serverTimestamp?: number | undefined;
|
|
3757
3882
|
plaintext?: string | undefined;
|
|
3883
|
+
replyTo?: {
|
|
3884
|
+
messageId: string;
|
|
3885
|
+
} | undefined;
|
|
3758
3886
|
guardAddress?: string | undefined;
|
|
3759
3887
|
passportAddress?: string | undefined;
|
|
3760
3888
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -3796,6 +3924,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3796
3924
|
receivedAt?: number | undefined;
|
|
3797
3925
|
serverTimestamp?: number | undefined;
|
|
3798
3926
|
plaintext?: string | undefined;
|
|
3927
|
+
replyTo?: {
|
|
3928
|
+
messageId: string;
|
|
3929
|
+
} | undefined;
|
|
3799
3930
|
guardAddress?: string | undefined;
|
|
3800
3931
|
passportAddress?: string | undefined;
|
|
3801
3932
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -3838,6 +3969,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
3838
3969
|
receivedAt?: number | undefined;
|
|
3839
3970
|
serverTimestamp?: number | undefined;
|
|
3840
3971
|
plaintext?: string | undefined;
|
|
3972
|
+
replyTo?: {
|
|
3973
|
+
messageId: string;
|
|
3974
|
+
} | undefined;
|
|
3841
3975
|
guardAddress?: string | undefined;
|
|
3842
3976
|
passportAddress?: string | undefined;
|
|
3843
3977
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -4429,6 +4563,13 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
4429
4563
|
toAddress: z.ZodString;
|
|
4430
4564
|
plaintextHash: z.ZodString;
|
|
4431
4565
|
plaintext: z.ZodOptional<z.ZodString>;
|
|
4566
|
+
replyTo: z.ZodOptional<z.ZodObject<{
|
|
4567
|
+
messageId: z.ZodString;
|
|
4568
|
+
}, "strip", z.ZodTypeAny, {
|
|
4569
|
+
messageId: string;
|
|
4570
|
+
}, {
|
|
4571
|
+
messageId: string;
|
|
4572
|
+
}>>;
|
|
4432
4573
|
guardAddress: z.ZodOptional<z.ZodString>;
|
|
4433
4574
|
passportAddress: z.ZodOptional<z.ZodString>;
|
|
4434
4575
|
lastReceivedLeafIndex: z.ZodOptional<z.ZodNumber>;
|
|
@@ -4499,6 +4640,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
4499
4640
|
receivedAt?: number | undefined;
|
|
4500
4641
|
serverTimestamp?: number | undefined;
|
|
4501
4642
|
plaintext?: string | undefined;
|
|
4643
|
+
replyTo?: {
|
|
4644
|
+
messageId: string;
|
|
4645
|
+
} | undefined;
|
|
4502
4646
|
guardAddress?: string | undefined;
|
|
4503
4647
|
passportAddress?: string | undefined;
|
|
4504
4648
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -4538,6 +4682,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
4538
4682
|
receivedAt?: number | undefined;
|
|
4539
4683
|
serverTimestamp?: number | undefined;
|
|
4540
4684
|
plaintext?: string | undefined;
|
|
4685
|
+
replyTo?: {
|
|
4686
|
+
messageId: string;
|
|
4687
|
+
} | undefined;
|
|
4541
4688
|
guardAddress?: string | undefined;
|
|
4542
4689
|
passportAddress?: string | undefined;
|
|
4543
4690
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -4579,6 +4726,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
4579
4726
|
receivedAt?: number | undefined;
|
|
4580
4727
|
serverTimestamp?: number | undefined;
|
|
4581
4728
|
plaintext?: string | undefined;
|
|
4729
|
+
replyTo?: {
|
|
4730
|
+
messageId: string;
|
|
4731
|
+
} | undefined;
|
|
4582
4732
|
guardAddress?: string | undefined;
|
|
4583
4733
|
passportAddress?: string | undefined;
|
|
4584
4734
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -4621,6 +4771,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
4621
4771
|
receivedAt?: number | undefined;
|
|
4622
4772
|
serverTimestamp?: number | undefined;
|
|
4623
4773
|
plaintext?: string | undefined;
|
|
4774
|
+
replyTo?: {
|
|
4775
|
+
messageId: string;
|
|
4776
|
+
} | undefined;
|
|
4624
4777
|
guardAddress?: string | undefined;
|
|
4625
4778
|
passportAddress?: string | undefined;
|
|
4626
4779
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -5352,6 +5505,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
5352
5505
|
receivedAt?: number | undefined;
|
|
5353
5506
|
serverTimestamp?: number | undefined;
|
|
5354
5507
|
plaintext?: string | undefined;
|
|
5508
|
+
replyTo?: {
|
|
5509
|
+
messageId: string;
|
|
5510
|
+
} | undefined;
|
|
5355
5511
|
guardAddress?: string | undefined;
|
|
5356
5512
|
passportAddress?: string | undefined;
|
|
5357
5513
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -5427,6 +5583,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
5427
5583
|
receivedAt?: number | undefined;
|
|
5428
5584
|
serverTimestamp?: number | undefined;
|
|
5429
5585
|
plaintext?: string | undefined;
|
|
5586
|
+
replyTo?: {
|
|
5587
|
+
messageId: string;
|
|
5588
|
+
} | undefined;
|
|
5430
5589
|
guardAddress?: string | undefined;
|
|
5431
5590
|
passportAddress?: string | undefined;
|
|
5432
5591
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -5586,6 +5745,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
5586
5745
|
receivedAt?: number | undefined;
|
|
5587
5746
|
serverTimestamp?: number | undefined;
|
|
5588
5747
|
plaintext?: string | undefined;
|
|
5748
|
+
replyTo?: {
|
|
5749
|
+
messageId: string;
|
|
5750
|
+
} | undefined;
|
|
5589
5751
|
guardAddress?: string | undefined;
|
|
5590
5752
|
passportAddress?: string | undefined;
|
|
5591
5753
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -5765,6 +5927,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
5765
5927
|
receivedAt?: number | undefined;
|
|
5766
5928
|
serverTimestamp?: number | undefined;
|
|
5767
5929
|
plaintext?: string | undefined;
|
|
5930
|
+
replyTo?: {
|
|
5931
|
+
messageId: string;
|
|
5932
|
+
} | undefined;
|
|
5768
5933
|
guardAddress?: string | undefined;
|
|
5769
5934
|
passportAddress?: string | undefined;
|
|
5770
5935
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -5840,6 +6005,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
5840
6005
|
receivedAt?: number | undefined;
|
|
5841
6006
|
serverTimestamp?: number | undefined;
|
|
5842
6007
|
plaintext?: string | undefined;
|
|
6008
|
+
replyTo?: {
|
|
6009
|
+
messageId: string;
|
|
6010
|
+
} | undefined;
|
|
5843
6011
|
guardAddress?: string | undefined;
|
|
5844
6012
|
passportAddress?: string | undefined;
|
|
5845
6013
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -5999,6 +6167,9 @@ export declare const MessengerOperationOutputSchema: z.ZodObject<{
|
|
|
5999
6167
|
receivedAt?: number | undefined;
|
|
6000
6168
|
serverTimestamp?: number | undefined;
|
|
6001
6169
|
plaintext?: string | undefined;
|
|
6170
|
+
replyTo?: {
|
|
6171
|
+
messageId: string;
|
|
6172
|
+
} | undefined;
|
|
6002
6173
|
guardAddress?: string | undefined;
|
|
6003
6174
|
passportAddress?: string | undefined;
|
|
6004
6175
|
lastReceivedLeafIndex?: number | undefined;
|
|
@@ -16,12 +16,16 @@ export const ZipMetadataSchema = z.object({
|
|
|
16
16
|
localCachePath: z.string().optional().describe("Local cache path"),
|
|
17
17
|
downloadedAt: z.number().optional().describe("Download timestamp"),
|
|
18
18
|
}).describe("ZIP file metadata");
|
|
19
|
+
export const ReplyToSchema = z.object({
|
|
20
|
+
messageId: z.string().describe("Replied-to message ID (unique within the conversation)"),
|
|
21
|
+
}).describe("Reply (quote) relationship — references a previous message in the same conversation. The referenced message's sender/preview are resolved locally by messageId");
|
|
19
22
|
export const MessageSchema = z.object({
|
|
20
23
|
messageId: z.string().describe("Message ID"),
|
|
21
24
|
fromAddress: z.string().describe("Sender address"),
|
|
22
25
|
toAddress: z.string().describe("Recipient address"),
|
|
23
26
|
plaintextHash: z.string().describe("Plaintext hash"),
|
|
24
27
|
plaintext: z.string().optional().describe("Decrypted plaintext (optional)"),
|
|
28
|
+
replyTo: ReplyToSchema.optional().describe("Quoted (replied-to) message reference, if this message replies to a previous one"),
|
|
25
29
|
guardAddress: z.string().optional().describe("Guard address"),
|
|
26
30
|
passportAddress: z.string().optional().describe("Passport address"),
|
|
27
31
|
lastReceivedLeafIndex: z.number().optional().describe("Last received leaf index"),
|
|
@@ -113,6 +117,7 @@ export const SendMessageOptionsSchema = z.object({
|
|
|
113
117
|
force: z.boolean().optional().describe("Force send even if there are pending Guard messages"),
|
|
114
118
|
enable_messenger: z.boolean().optional().describe("Auto-enable messenger for the sender account if not already enabled"),
|
|
115
119
|
network: EntrypointSchema.optional().describe("Target network for Guard verification (e.g., testnet, mainnet). REQUIRED when guardAddress and passportAddress are provided — Guard messages and regular messages are independent data systems on different networks"),
|
|
120
|
+
replyTo: ReplyToSchema.optional().describe("Quote/reply to a previous message in the SAME conversation. The messageId MUST exist in local storage for the current conversation, otherwise sending fails"),
|
|
116
121
|
}).describe("Send message options. When guardAddress + passportAddress are provided, the message enters Guard verification flow and network MUST be specified");
|
|
117
122
|
export const SendFileOptionsSchema = z.object({
|
|
118
123
|
fileName: z.string().optional().describe("Custom file name"),
|
|
@@ -188,7 +188,7 @@ export const OnchainOperationsSchema = z.preprocess((input) => {
|
|
|
188
188
|
}).strict().describe("📜 Proof Object: Create immutable on-chain proof objects with server signatures. Used for timestamped message proofs, Merkle tree root proofs, etc. Set 'namedNew' in data to name the new Proof."),
|
|
189
189
|
CallGenProof_InputSchema.extend({
|
|
190
190
|
operation_type: z.literal("gen_proof"),
|
|
191
|
-
}).strict().describe("Generate a new
|
|
191
|
+
}).strict().describe("⚡ Generate Proof (shortcut): Create a new on-chain Proof object WITHOUT the namedNew wrapper (no custom name). Prefer `proof` (operation_type='proof') when you need a NAMED Proof that other objects can reference by name; use gen_proof only for a quick unnamed Proof."),
|
|
192
192
|
]));
|
|
193
193
|
export const WipOperationsSchema = z.preprocess((input) => {
|
|
194
194
|
if (typeof input === 'object' && input !== null) {
|