@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.
Files changed (139) hide show
  1. package/README.md +0 -2
  2. package/dist/customer/risk-assessment.d.ts +5 -1
  3. package/dist/customer/risk-assessment.js +4 -4
  4. package/dist/evaluation/arbitration-game.d.ts +16 -0
  5. package/dist/evaluation/arbitration-game.js +48 -0
  6. package/dist/evaluation/builtins/demand-match.d.ts +15 -0
  7. package/dist/evaluation/builtins/demand-match.js +153 -0
  8. package/dist/evaluation/builtins/index.d.ts +3 -0
  9. package/dist/evaluation/builtins/index.js +10 -0
  10. package/dist/evaluation/builtins/service-risk.d.ts +6 -0
  11. package/dist/evaluation/builtins/service-risk.js +55 -0
  12. package/dist/evaluation/capability.d.ts +50 -0
  13. package/dist/evaluation/capability.js +13 -0
  14. package/dist/evaluation/composer.d.ts +13 -0
  15. package/dist/evaluation/composer.js +40 -0
  16. package/dist/evaluation/engine.d.ts +18 -0
  17. package/dist/evaluation/engine.js +175 -0
  18. package/dist/evaluation/extract.d.ts +30 -0
  19. package/dist/evaluation/extract.js +115 -0
  20. package/dist/evaluation/gap.d.ts +2 -0
  21. package/dist/evaluation/gap.js +100 -0
  22. package/dist/evaluation/index.d.ts +11 -0
  23. package/dist/evaluation/index.js +11 -0
  24. package/dist/evaluation/node-game.d.ts +34 -0
  25. package/dist/evaluation/node-game.js +57 -0
  26. package/dist/evaluation/region.d.ts +10 -0
  27. package/dist/evaluation/region.js +36 -0
  28. package/dist/evaluation/types.d.ts +76 -0
  29. package/dist/evaluation/types.js +1 -0
  30. package/dist/evaluation/user-injection.d.ts +6 -0
  31. package/dist/evaluation/user-injection.js +27 -0
  32. package/dist/examples/education-contact-create.json +40 -0
  33. package/dist/examples/freelance-contact-create.json +40 -0
  34. package/dist/examples/insurance-machine-create.json +1 -1
  35. package/dist/examples/insurance-service-allocators.json +1 -1
  36. package/dist/examples/machine-publish.json +1 -1
  37. package/dist/examples/rental-ziroom-service-create.json +1 -1
  38. package/dist/examples/retail-adv-guard-messenger-proof-create.json +1 -1
  39. package/dist/examples/retail-myshop-service-create.json +1 -1
  40. package/dist/examples/retail-myshop-service-customer-required.json +1 -1
  41. package/dist/examples/subscription-contact-create.json +40 -0
  42. package/dist/examples/threebody-machine-create.json +1 -1
  43. package/dist/examples/travel-machine-create.json +1 -1
  44. package/dist/examples/travel-service-create.json +1 -1
  45. package/dist/harness/plan.js +42 -3
  46. package/dist/intent/enrich.d.ts +1 -0
  47. package/dist/intent/enrich.js +67 -0
  48. package/dist/intent/index.d.ts +23 -0
  49. package/dist/intent/index.js +60 -0
  50. package/dist/intent/matcher.d.ts +2 -0
  51. package/dist/intent/matcher.js +81 -0
  52. package/dist/intent/store.d.ts +19 -0
  53. package/dist/intent/store.js +55 -0
  54. package/dist/intent/types.d.ts +33 -0
  55. package/dist/intent/types.js +10 -0
  56. package/dist/knowledge/arbitration-risk.js +1 -11
  57. package/dist/knowledge/contact-templates.d.ts +27 -0
  58. package/dist/knowledge/contact-templates.js +60 -0
  59. package/dist/knowledge/examples-scanner.js +21 -3
  60. package/dist/knowledge/fund-layer.js +8 -4
  61. package/dist/knowledge/industry-generalizer.js +21 -21
  62. package/dist/knowledge/machine-risk.js +0 -1
  63. package/dist/knowledge/mcp-schema-audit.d.ts +1 -1
  64. package/dist/knowledge/mcp-schema-audit.js +8 -4
  65. package/dist/knowledge/service-risk.js +38 -2
  66. package/dist/knowledge/service-templates.js +1 -1
  67. package/dist/knowledge/service-translation.js +2 -2
  68. package/dist/knowledge/template-registry.d.ts +1 -1
  69. package/dist/knowledge/template-registry.js +13 -1
  70. package/dist/knowledge/tools-reference.js +23 -0
  71. package/dist/persona/analyzer.d.ts +16 -0
  72. package/dist/persona/analyzer.js +66 -0
  73. package/dist/persona/bridge.d.ts +5 -0
  74. package/dist/persona/bridge.js +86 -0
  75. package/dist/persona/defaults.d.ts +4 -0
  76. package/dist/persona/defaults.js +195 -0
  77. package/dist/persona/experience-bridge.d.ts +3 -0
  78. package/dist/persona/experience-bridge.js +23 -0
  79. package/dist/persona/index.d.ts +18 -0
  80. package/dist/persona/index.js +71 -0
  81. package/dist/persona/model.d.ts +7 -0
  82. package/dist/persona/model.js +111 -0
  83. package/dist/persona/store.d.ts +19 -0
  84. package/dist/persona/store.js +62 -0
  85. package/dist/persona/types.d.ts +43 -0
  86. package/dist/persona/types.js +5 -0
  87. package/dist/project/handlers.d.ts +5 -0
  88. package/dist/project/handlers.js +23 -1
  89. package/dist/project/semantic-graph.js +47 -0
  90. package/dist/rules.d.ts +2 -0
  91. package/dist/rules.js +43 -0
  92. package/dist/schema/call/semantic.js +23 -1
  93. package/dist/schema/call/service.js +7 -1
  94. package/dist/schema/evaluation/index.d.ts +4239 -0
  95. package/dist/schema/evaluation/index.js +356 -0
  96. package/dist/schema/index.d.ts +4 -0
  97. package/dist/schema/index.js +4 -0
  98. package/dist/schema/intent-radar/index.d.ts +284 -0
  99. package/dist/schema/intent-radar/index.js +89 -0
  100. package/dist/schema/messenger/index.d.ts +171 -0
  101. package/dist/schema/messenger/index.js +5 -0
  102. package/dist/schema/operations.js +1 -1
  103. package/dist/schema/persona/index.d.ts +1985 -0
  104. package/dist/schema/persona/index.js +148 -0
  105. package/dist/schema/project/index.d.ts +2 -2
  106. package/dist/schema/query/index.js +6 -0
  107. package/dist/schema/sync-layer4.d.ts +1 -1
  108. package/dist/schema/sync-layer4.js +9 -5
  109. package/dist/schema/task-status.d.ts +168 -0
  110. package/dist/schema/task-status.js +36 -0
  111. package/dist/schema/trust/index.js +1 -1
  112. package/dist/schemas/evaluation_operation.output.json +677 -0
  113. package/dist/schemas/evaluation_operation.schema.json +903 -0
  114. package/dist/schemas/index.json +25 -1
  115. package/dist/schemas/intent_radar.output.json +229 -0
  116. package/dist/schemas/intent_radar.schema.json +135 -0
  117. package/dist/schemas/messenger_operation.output.json +14 -0
  118. package/dist/schemas/messenger_operation.schema.json +18 -0
  119. package/dist/schemas/onchain_operations.schema.json +2 -2
  120. package/dist/schemas/onchain_operations_service.schema.json +2 -2
  121. package/dist/schemas/persona_operation.output.json +389 -0
  122. package/dist/schemas/persona_operation.schema.json +247 -0
  123. package/dist/schemas/query_task_status.output.json +115 -0
  124. package/dist/schemas/query_task_status.schema.json +24 -0
  125. package/dist/schemas/query_toolkit.output.json +1 -1
  126. package/dist/schemas/trust_score.schema.json +1 -1
  127. package/dist/tools/handlers/evaluation.d.ts +2 -0
  128. package/dist/tools/handlers/evaluation.js +123 -0
  129. package/dist/tools/handlers/intent-radar.d.ts +2 -0
  130. package/dist/tools/handlers/intent-radar.js +76 -0
  131. package/dist/tools/handlers/onchain.js +98 -0
  132. package/dist/tools/handlers/persona.d.ts +4 -0
  133. package/dist/tools/handlers/persona.js +89 -0
  134. package/dist/tools/handlers/task-status.d.ts +0 -168
  135. package/dist/tools/handlers/task-status.js +0 -29
  136. package/dist/tools/index.js +83 -7
  137. package/dist/tools/wip-deploy-assist.d.ts +1 -1
  138. package/dist/tools/wip-deploy-assist.js +33 -5
  139. package/package.json +2 -2
@@ -0,0 +1,356 @@
1
+ import { z } from "zod";
2
+ const RiskLevelEnum = z.enum(["low", "medium", "high"]);
3
+ const PerspectiveEnum = z.enum(["customer", "operator", "observer"]);
4
+ const ArbStatusEnum = z.enum([
5
+ "Principal_confirming",
6
+ "Arbitrator_confirming",
7
+ "Voting",
8
+ "Arbitrated",
9
+ "Objectionable",
10
+ "Finished",
11
+ "Withdrawn",
12
+ ]);
13
+ const ArbPerspectiveEnum = z.enum(["disputant", "arbitrator", "voter", "both"]);
14
+ const ExecutionPathEnum = z.enum(["order_holder", "permission", "named_operator", "not_available"]);
15
+ const EvaluationLevelEnum = z.enum(["low", "medium_low", "medium_high", "high"]);
16
+ const IndustryEnum = z.enum([
17
+ "freelance", "rental", "education", "travel", "subscription", "retail", "general", "custom",
18
+ ]);
19
+ const RegionSchema = z
20
+ .object({
21
+ mode: z.enum(["remote", "physical"]),
22
+ country: z.string().optional(),
23
+ province: z.string().optional(),
24
+ city: z.string().optional(),
25
+ raw: z.string().describe("Original location string (for traceability)."),
26
+ })
27
+ .strict();
28
+ const WorkflowCapabilitiesSchema = z
29
+ .object({
30
+ has_arbitration: z.boolean(),
31
+ has_refund_path: z.boolean(),
32
+ has_milestone_nodes: z.boolean(),
33
+ has_compensation_fund: z.boolean(),
34
+ has_wip_verification: z.boolean(),
35
+ has_messenger: z.boolean(),
36
+ has_buy_guard: z.boolean(),
37
+ has_dynamic_pricing: z.boolean(),
38
+ is_published: z.boolean(),
39
+ is_paused: z.boolean(),
40
+ })
41
+ .strict();
42
+ export const CapabilityVectorSchema = z
43
+ .object({
44
+ id: z.string().describe("Service/Demand address."),
45
+ kind: z.enum(["service", "demand"]).describe("Whether this is a service or demand."),
46
+ owner: z.string().optional(),
47
+ industry: IndustryEnum.describe("Industry scenario."),
48
+ industry_confidence: z.number().min(0).max(1).optional(),
49
+ region: RegionSchema,
50
+ price_min: z.string().optional().describe("Smallest-unit amount (string to avoid JSON bigint loss)."),
51
+ price_max: z.string().optional().describe("Smallest-unit amount (string to avoid JSON bigint loss)."),
52
+ token_type: z.string().optional(),
53
+ ticket_size: z.enum(["micro", "small", "medium", "large"]).optional(),
54
+ trust_score: z.number().min(0).max(100).optional(),
55
+ reputation_like_ratio: z.number().min(0).max(1).optional(),
56
+ arbitration_independent: z.boolean().optional(),
57
+ merchant_history_count: z.number().int().min(0).optional(),
58
+ capabilities: WorkflowCapabilitiesSchema,
59
+ tags: z.array(z.string()).optional(),
60
+ keywords: z.array(z.string()).optional(),
61
+ })
62
+ .strict();
63
+ const ServiceExtractInputSchema = z
64
+ .object({
65
+ object: z.string().describe("Service object address."),
66
+ description: z.string(),
67
+ location: z.string(),
68
+ sales: z
69
+ .array(z.object({
70
+ name: z.string().optional(),
71
+ price: z.string().describe("Smallest-unit amount (string)."),
72
+ wip_hash: z.string().optional(),
73
+ }).strict())
74
+ .optional(),
75
+ arbitrations: z.array(z.string()).optional(),
76
+ compensation_fund: z.string().optional().describe("Smallest-unit amount (string)."),
77
+ buy_guard: z.string().nullable().optional(),
78
+ machine: z.string().nullable().optional(),
79
+ um: z.string().nullable().optional(),
80
+ bPublished: z.boolean().optional(),
81
+ bPaused: z.boolean().optional(),
82
+ owner: z.string().optional(),
83
+ })
84
+ .strict();
85
+ const DemandExtractInputSchema = z
86
+ .object({
87
+ object: z.string().describe("Demand object address."),
88
+ description: z.string(),
89
+ location: z.string(),
90
+ rewards: z.array(z.string()).optional(),
91
+ um: z.string().nullable().optional(),
92
+ owner: z.string().optional(),
93
+ })
94
+ .strict();
95
+ const UserInjectionSchema = z
96
+ .object({
97
+ intent: z.string().optional().describe("Free-text intent."),
98
+ preferences: z.record(z.unknown()).optional(),
99
+ requirements: z
100
+ .array(z.object({
101
+ rule_id: z.string(),
102
+ condition: z.enum(["require", "forbid"]),
103
+ note: z.string().optional(),
104
+ }).strict())
105
+ .optional()
106
+ .describe("Hard red lines (block when violated)."),
107
+ overrides: z
108
+ .object({
109
+ rules: z.record(z.object({ enabled: z.boolean().optional(), weight: z.number().optional() }).strict()).optional(),
110
+ data_sources: z.record(z.object({ enabled: z.boolean().optional() }).strict()).optional(),
111
+ })
112
+ .strict()
113
+ .optional()
114
+ .describe("Enable/disable/reweight rules and data sources."),
115
+ })
116
+ .strict();
117
+ const ArbGameActionSchema = z
118
+ .object({
119
+ action: z.string().describe("Recommended move (e.g. 'confirm', 'vote', 'objection', 'arb_withdraw')."),
120
+ favorability: z.number().int().min(0).max(100).describe("Favorability 0-100 for the perspective."),
121
+ is_optimal: z.boolean().describe("True when this is the top recommended move."),
122
+ payoff_note: z.string().describe("What the move achieves."),
123
+ risk: RiskLevelEnum.describe("Risk of the move."),
124
+ })
125
+ .strict();
126
+ const NodeForwardSchema = z
127
+ .object({
128
+ name: z.string().describe("Forward (operation) name."),
129
+ to_node: z.string().describe("Target node after execution."),
130
+ execution_path: ExecutionPathEnum.describe("How the account may execute it."),
131
+ guard: z.string().optional().describe("Guard address gating this forward."),
132
+ consequence: z.string().optional().describe("Consequence hint (completion/refund path)."),
133
+ })
134
+ .strict();
135
+ const NodeGameActionSchema = z
136
+ .object({
137
+ forward: z.string().describe("Forward (operation) name."),
138
+ to_node: z.string().describe("Target node after execution."),
139
+ execution_path: ExecutionPathEnum.describe("How the account may execute it."),
140
+ guard: z.string().optional().describe("Guard address gating this forward."),
141
+ favorability: z.number().int().min(0).max(100).describe("Favorability 0-100 for the perspective."),
142
+ is_optimal: z.boolean().describe("True when this is the top recommended move."),
143
+ payoff_note: z.string().describe("What the move achieves."),
144
+ risk: RiskLevelEnum.describe("Risk of the move."),
145
+ })
146
+ .strict();
147
+ const CapabilityGapSchema = z
148
+ .object({
149
+ dimension: z.string().describe("Capability dimension (has_arbitration / region / price / ...)."),
150
+ requirement: z.string().describe("What the demand requires."),
151
+ provided: z.string().describe("What the service provides."),
152
+ status: z.enum(["satisfied", "partial", "missing"]),
153
+ impact: z.enum(["critical", "major", "minor"]),
154
+ suggestion: z.string().describe("Actionable suggestion."),
155
+ })
156
+ .strict();
157
+ const CapabilityGapReportSchema = z
158
+ .object({
159
+ entity_id: z.string(),
160
+ satisfied: z.array(CapabilityGapSchema),
161
+ missing: z.array(CapabilityGapSchema),
162
+ coverage_score: z.number().int().min(0).max(100),
163
+ summary: z.string(),
164
+ })
165
+ .strict();
166
+ const CompositePlanSchema = z
167
+ .object({
168
+ demand: z.string(),
169
+ services: z.array(z.object({ id: z.string(), covered: z.array(z.string()) }).strict()),
170
+ coverage_score: z.number().int().min(0).max(100),
171
+ remaining_missing: z.array(z.string()),
172
+ feasibility: z.enum(["ready", "needs_supply_chain", "infeasible"]),
173
+ summary: z.string(),
174
+ })
175
+ .strict();
176
+ const EvaluationResultSchema = z
177
+ .object({
178
+ evaluation_id: z.string(),
179
+ total: z.number().int().min(0).max(100),
180
+ level: EvaluationLevelEnum,
181
+ breakdown: z.array(z.object({
182
+ rule_id: z.string(),
183
+ dimension: z.string(),
184
+ score: z.number(),
185
+ weight: z.number(),
186
+ reason: z.string().optional(),
187
+ matched: z.array(z.string()).optional(),
188
+ mismatched: z.array(z.string()).optional(),
189
+ red_flag: z.boolean().optional(),
190
+ }).strict()),
191
+ red_flags: z.array(z.string()),
192
+ blocked: z.boolean(),
193
+ trace: z.array(z.object({
194
+ kind: z.enum(["data_source", "rule", "override"]),
195
+ id: z.string(),
196
+ detail: z.string(),
197
+ }).strict()),
198
+ summary: z.string(),
199
+ })
200
+ .strict();
201
+ const ServiceRawDataSchema = z
202
+ .object({
203
+ name: z.string().optional(),
204
+ bPublished: z.boolean().optional(),
205
+ bPaused: z.boolean().optional(),
206
+ price: z.string().optional(),
207
+ priceRaw: z.string().optional().describe("Smallest-unit amount (string)."),
208
+ token_type: z.string().optional(),
209
+ sales: z.array(z.object({
210
+ suspension: z.boolean().optional(),
211
+ wip_url: z.string().optional(),
212
+ wip_hash: z.string().optional(),
213
+ }).strict()).optional(),
214
+ machine: z.string().optional(),
215
+ buy_guard: z.string().optional(),
216
+ customer_required: z.array(z.unknown()).optional(),
217
+ arbitrations: z.array(z.string()).optional(),
218
+ compensation_fund: z.object({
219
+ balance: z.string().optional().describe("Smallest-unit amount (string)."),
220
+ }).strict().optional(),
221
+ compensation_lock_duration: z.number().optional(),
222
+ um: z.string().optional(),
223
+ })
224
+ .strict();
225
+ const MachineNodeRawSchema = z
226
+ .object({
227
+ name: z.string(),
228
+ forwards: z.array(z.object({
229
+ name: z.string().optional(),
230
+ weight: z.number().optional(),
231
+ namedOperator: z.string().nullable().optional(),
232
+ guard: z.string().nullable().optional(),
233
+ to: z.string().optional(),
234
+ }).strict()).optional(),
235
+ is_pair_done: z.boolean().optional(),
236
+ })
237
+ .strict();
238
+ const ReviewRawSchema = z
239
+ .object({
240
+ rating: z.string().optional(),
241
+ reviewer: z.string().optional(),
242
+ verified: z.boolean().optional(),
243
+ has_evidence: z.boolean().optional(),
244
+ timestamp: z.number().optional(),
245
+ })
246
+ .strict();
247
+ const EventRawSchema = z
248
+ .object({
249
+ type: z.string(),
250
+ timestamp: z.number().optional(),
251
+ address: z.string().optional(),
252
+ data: z.record(z.unknown()).optional(),
253
+ })
254
+ .strict();
255
+ export const PuzzleRawDataSchema = z
256
+ .object({
257
+ service: ServiceRawDataSchema,
258
+ machine_nodes: z.array(MachineNodeRawSchema).optional(),
259
+ machine_published: z.boolean().optional(),
260
+ machine_paused: z.boolean().optional(),
261
+ reviews: z.array(ReviewRawSchema).optional(),
262
+ events: z.array(EventRawSchema).optional(),
263
+ similar_services: z.array(z.object({ price: z.string() }).strict()).optional(),
264
+ order_amount: z.string().optional().describe("Smallest-unit amount (string)."),
265
+ trust_score: z.object({ score: z.number(), level: z.string() }).strict().optional(),
266
+ arbitration_owner: z.string().optional(),
267
+ service_owner: z.string().optional(),
268
+ wip_verified: z.boolean().optional(),
269
+ order_history: z.array(z.object({ status: z.string(), has_dispute: z.boolean(), is_repeat: z.boolean() }).strict()).optional(),
270
+ merchant_reputation: z.object({ likes: z.number(), dislikes: z.number() }).strict().optional(),
271
+ })
272
+ .strict();
273
+ export const EvaluationOperationInputSchema = z.discriminatedUnion("action", [
274
+ z.object({ action: z.literal("arb_game"), status: ArbStatusEnum, perspective: ArbPerspectiveEnum }).strict(),
275
+ z.object({
276
+ action: z.literal("node_game"),
277
+ current_node: z.string(),
278
+ perspective: PerspectiveEnum,
279
+ operable: z.array(NodeForwardSchema),
280
+ waiting_on: z.array(z.object({ role: z.string(), forwards: z.array(z.string()) }).strict()).optional(),
281
+ }).strict(),
282
+ z.object({
283
+ action: z.literal("capability_gap"),
284
+ demand: CapabilityVectorSchema,
285
+ service: CapabilityVectorSchema,
286
+ }).strict(),
287
+ z.object({
288
+ action: z.literal("compose_service"),
289
+ demand: CapabilityVectorSchema,
290
+ services: z.array(CapabilityVectorSchema),
291
+ }).strict(),
292
+ z.object({
293
+ action: z.literal("demand_match"),
294
+ demand_cap: CapabilityVectorSchema,
295
+ services: z.array(ServiceExtractInputSchema),
296
+ injection: UserInjectionSchema.optional(),
297
+ account: z.string().optional().describe("Account address; its persona is auto-applied as the base injection (explicit injection overrides)."),
298
+ }).strict(),
299
+ z.object({
300
+ action: z.literal("service_match"),
301
+ service_cap: CapabilityVectorSchema,
302
+ demands: z.array(DemandExtractInputSchema),
303
+ injection: UserInjectionSchema.optional(),
304
+ account: z.string().optional().describe("Account address; its persona is auto-applied as the base injection."),
305
+ }).strict(),
306
+ z.object({
307
+ action: z.literal("service_risk"),
308
+ service_id: z.string().describe("Service object address or LocalMark name."),
309
+ puzzle_raw: PuzzleRawDataSchema,
310
+ injection: UserInjectionSchema.optional(),
311
+ depth: z.enum(["browse", "evaluate", "preorder", "monitor"]).optional(),
312
+ account: z.string().optional().describe("Account address; its persona is auto-applied as the base injection."),
313
+ }).strict(),
314
+ ]);
315
+ export const EvaluationOperationOutputSchema = z
316
+ .object({
317
+ result: z
318
+ .discriminatedUnion("action", [
319
+ z.object({
320
+ action: z.literal("arb_game"),
321
+ status: ArbStatusEnum,
322
+ perspective: ArbPerspectiveEnum,
323
+ actions: z.array(ArbGameActionSchema),
324
+ summary: z.string(),
325
+ }).strict(),
326
+ z.object({
327
+ action: z.literal("node_game"),
328
+ current_node: z.string(),
329
+ perspective: PerspectiveEnum,
330
+ actions: z.array(NodeGameActionSchema),
331
+ summary: z.string(),
332
+ }).strict(),
333
+ z.object({
334
+ action: z.literal("capability_gap"),
335
+ report: CapabilityGapReportSchema,
336
+ }).strict(),
337
+ z.object({
338
+ action: z.literal("compose_service"),
339
+ plan: CompositePlanSchema,
340
+ }).strict(),
341
+ z.object({
342
+ action: z.literal("demand_match"),
343
+ matches: z.array(z.object({ service: ServiceExtractInputSchema, result: EvaluationResultSchema }).strict()),
344
+ }).strict(),
345
+ z.object({
346
+ action: z.literal("service_match"),
347
+ matches: z.array(z.object({ demand: DemandExtractInputSchema, result: EvaluationResultSchema }).strict()),
348
+ }).strict(),
349
+ z.object({
350
+ action: z.literal("service_risk"),
351
+ result: EvaluationResultSchema,
352
+ }).strict(),
353
+ ])
354
+ .describe("Evaluation result — shape depends on action"),
355
+ })
356
+ .strict();
@@ -9,6 +9,10 @@ export * from './utils/node-parser.js';
9
9
  export * from './project/index.js';
10
10
  export * from './config/index.js';
11
11
  export * from './trust/index.js';
12
+ export * from './evaluation/index.js';
13
+ export * from './task-status.js';
14
+ export * from './persona/index.js';
15
+ export * from './intent-radar/index.js';
12
16
  export * from './schema-query/index.js';
13
17
  export { MCP_SCHEMA_VERSION, getSchemaVersions, checkClientSchemaCompatibility, attachSchemaWarning, } from './schema-version.js';
14
18
  export type { SchemaVersions, SchemaCompatibilityMode, SchemaCheckOptions, SchemaCheckResult, } from './schema-version.js';
@@ -9,5 +9,9 @@ export * from './utils/node-parser.js';
9
9
  export * from './project/index.js';
10
10
  export * from './config/index.js';
11
11
  export * from './trust/index.js';
12
+ export * from './evaluation/index.js';
13
+ export * from './task-status.js';
14
+ export * from './persona/index.js';
15
+ export * from './intent-radar/index.js';
12
16
  export * from './schema-query/index.js';
13
17
  export { MCP_SCHEMA_VERSION, getSchemaVersions, checkClientSchemaCompatibility, attachSchemaWarning, } from './schema-version.js';
@@ -0,0 +1,284 @@
1
+ import { z } from "zod";
2
+ export declare const IntentRadarInputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
3
+ action: z.ZodLiteral<"save">;
4
+ intent: z.ZodString;
5
+ account: z.ZodOptional<z.ZodString>;
6
+ role: z.ZodOptional<z.ZodEnum<["merchant", "user", "arbitrator"]>>;
7
+ target_types: z.ZodOptional<z.ZodArray<z.ZodEnum<["NewOrderEvent", "ProgressEvent", "DemandPresentEvent", "DemandFeedbackEvent", "NewEntityEvent", "ArbEvent"]>, "many">>;
8
+ }, "strict", z.ZodTypeAny, {
9
+ intent: string;
10
+ action: "save";
11
+ account?: string | undefined;
12
+ role?: "user" | "merchant" | "arbitrator" | undefined;
13
+ target_types?: ("NewOrderEvent" | "ArbEvent" | "ProgressEvent" | "DemandPresentEvent" | "DemandFeedbackEvent" | "NewEntityEvent")[] | undefined;
14
+ }, {
15
+ intent: string;
16
+ action: "save";
17
+ account?: string | undefined;
18
+ role?: "user" | "merchant" | "arbitrator" | undefined;
19
+ target_types?: ("NewOrderEvent" | "ArbEvent" | "ProgressEvent" | "DemandPresentEvent" | "DemandFeedbackEvent" | "NewEntityEvent")[] | undefined;
20
+ }>, z.ZodObject<{
21
+ action: z.ZodLiteral<"list">;
22
+ account: z.ZodOptional<z.ZodString>;
23
+ }, "strict", z.ZodTypeAny, {
24
+ action: "list";
25
+ account?: string | undefined;
26
+ }, {
27
+ action: "list";
28
+ account?: string | undefined;
29
+ }>, z.ZodObject<{
30
+ action: z.ZodLiteral<"remove">;
31
+ id: z.ZodString;
32
+ }, "strict", z.ZodTypeAny, {
33
+ id: string;
34
+ action: "remove";
35
+ }, {
36
+ id: string;
37
+ action: "remove";
38
+ }>, z.ZodObject<{
39
+ action: z.ZodLiteral<"match">;
40
+ intent_id: z.ZodOptional<z.ZodString>;
41
+ account: z.ZodOptional<z.ZodString>;
42
+ events: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
43
+ network: z.ZodOptional<z.ZodEnum<["mainnet", "testnet"]>>;
44
+ limit: z.ZodOptional<z.ZodNumber>;
45
+ }, "strict", z.ZodTypeAny, {
46
+ action: "match";
47
+ network?: "testnet" | "mainnet" | undefined;
48
+ account?: string | undefined;
49
+ events?: Record<string, unknown>[] | undefined;
50
+ limit?: number | undefined;
51
+ intent_id?: string | undefined;
52
+ }, {
53
+ action: "match";
54
+ network?: "testnet" | "mainnet" | undefined;
55
+ account?: string | undefined;
56
+ events?: Record<string, unknown>[] | undefined;
57
+ limit?: number | undefined;
58
+ intent_id?: string | undefined;
59
+ }>]>;
60
+ export declare const IntentRadarOutputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
61
+ action: z.ZodLiteral<"save">;
62
+ intent: z.ZodObject<{
63
+ id: z.ZodString;
64
+ intent: z.ZodString;
65
+ account: z.ZodOptional<z.ZodString>;
66
+ role: z.ZodOptional<z.ZodEnum<["merchant", "user", "arbitrator"]>>;
67
+ industries: z.ZodArray<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail", "general", "custom"]>, "many">;
68
+ keywords: z.ZodArray<z.ZodString, "many">;
69
+ target_types: z.ZodArray<z.ZodEnum<["NewOrderEvent", "ProgressEvent", "DemandPresentEvent", "DemandFeedbackEvent", "NewEntityEvent", "ArbEvent"]>, "many">;
70
+ created_at: z.ZodNumber;
71
+ updated_at: z.ZodNumber;
72
+ }, "strict", z.ZodTypeAny, {
73
+ id: string;
74
+ intent: string;
75
+ keywords: string[];
76
+ industries: ("custom" | "freelance" | "rental" | "education" | "travel" | "subscription" | "retail" | "general")[];
77
+ updated_at: number;
78
+ target_types: ("NewOrderEvent" | "ArbEvent" | "ProgressEvent" | "DemandPresentEvent" | "DemandFeedbackEvent" | "NewEntityEvent")[];
79
+ created_at: number;
80
+ account?: string | undefined;
81
+ role?: "user" | "merchant" | "arbitrator" | undefined;
82
+ }, {
83
+ id: string;
84
+ intent: string;
85
+ keywords: string[];
86
+ industries: ("custom" | "freelance" | "rental" | "education" | "travel" | "subscription" | "retail" | "general")[];
87
+ updated_at: number;
88
+ target_types: ("NewOrderEvent" | "ArbEvent" | "ProgressEvent" | "DemandPresentEvent" | "DemandFeedbackEvent" | "NewEntityEvent")[];
89
+ created_at: number;
90
+ account?: string | undefined;
91
+ role?: "user" | "merchant" | "arbitrator" | undefined;
92
+ }>;
93
+ }, "strict", z.ZodTypeAny, {
94
+ intent: {
95
+ id: string;
96
+ intent: string;
97
+ keywords: string[];
98
+ industries: ("custom" | "freelance" | "rental" | "education" | "travel" | "subscription" | "retail" | "general")[];
99
+ updated_at: number;
100
+ target_types: ("NewOrderEvent" | "ArbEvent" | "ProgressEvent" | "DemandPresentEvent" | "DemandFeedbackEvent" | "NewEntityEvent")[];
101
+ created_at: number;
102
+ account?: string | undefined;
103
+ role?: "user" | "merchant" | "arbitrator" | undefined;
104
+ };
105
+ action: "save";
106
+ }, {
107
+ intent: {
108
+ id: string;
109
+ intent: string;
110
+ keywords: string[];
111
+ industries: ("custom" | "freelance" | "rental" | "education" | "travel" | "subscription" | "retail" | "general")[];
112
+ updated_at: number;
113
+ target_types: ("NewOrderEvent" | "ArbEvent" | "ProgressEvent" | "DemandPresentEvent" | "DemandFeedbackEvent" | "NewEntityEvent")[];
114
+ created_at: number;
115
+ account?: string | undefined;
116
+ role?: "user" | "merchant" | "arbitrator" | undefined;
117
+ };
118
+ action: "save";
119
+ }>, z.ZodObject<{
120
+ action: z.ZodLiteral<"list">;
121
+ intents: z.ZodArray<z.ZodObject<{
122
+ id: z.ZodString;
123
+ intent: z.ZodString;
124
+ account: z.ZodOptional<z.ZodString>;
125
+ role: z.ZodOptional<z.ZodEnum<["merchant", "user", "arbitrator"]>>;
126
+ industries: z.ZodArray<z.ZodEnum<["freelance", "rental", "education", "travel", "subscription", "retail", "general", "custom"]>, "many">;
127
+ keywords: z.ZodArray<z.ZodString, "many">;
128
+ target_types: z.ZodArray<z.ZodEnum<["NewOrderEvent", "ProgressEvent", "DemandPresentEvent", "DemandFeedbackEvent", "NewEntityEvent", "ArbEvent"]>, "many">;
129
+ created_at: z.ZodNumber;
130
+ updated_at: z.ZodNumber;
131
+ }, "strict", z.ZodTypeAny, {
132
+ id: string;
133
+ intent: string;
134
+ keywords: string[];
135
+ industries: ("custom" | "freelance" | "rental" | "education" | "travel" | "subscription" | "retail" | "general")[];
136
+ updated_at: number;
137
+ target_types: ("NewOrderEvent" | "ArbEvent" | "ProgressEvent" | "DemandPresentEvent" | "DemandFeedbackEvent" | "NewEntityEvent")[];
138
+ created_at: number;
139
+ account?: string | undefined;
140
+ role?: "user" | "merchant" | "arbitrator" | undefined;
141
+ }, {
142
+ id: string;
143
+ intent: string;
144
+ keywords: string[];
145
+ industries: ("custom" | "freelance" | "rental" | "education" | "travel" | "subscription" | "retail" | "general")[];
146
+ updated_at: number;
147
+ target_types: ("NewOrderEvent" | "ArbEvent" | "ProgressEvent" | "DemandPresentEvent" | "DemandFeedbackEvent" | "NewEntityEvent")[];
148
+ created_at: number;
149
+ account?: string | undefined;
150
+ role?: "user" | "merchant" | "arbitrator" | undefined;
151
+ }>, "many">;
152
+ }, "strict", z.ZodTypeAny, {
153
+ action: "list";
154
+ intents: {
155
+ id: string;
156
+ intent: string;
157
+ keywords: string[];
158
+ industries: ("custom" | "freelance" | "rental" | "education" | "travel" | "subscription" | "retail" | "general")[];
159
+ updated_at: number;
160
+ target_types: ("NewOrderEvent" | "ArbEvent" | "ProgressEvent" | "DemandPresentEvent" | "DemandFeedbackEvent" | "NewEntityEvent")[];
161
+ created_at: number;
162
+ account?: string | undefined;
163
+ role?: "user" | "merchant" | "arbitrator" | undefined;
164
+ }[];
165
+ }, {
166
+ action: "list";
167
+ intents: {
168
+ id: string;
169
+ intent: string;
170
+ keywords: string[];
171
+ industries: ("custom" | "freelance" | "rental" | "education" | "travel" | "subscription" | "retail" | "general")[];
172
+ updated_at: number;
173
+ target_types: ("NewOrderEvent" | "ArbEvent" | "ProgressEvent" | "DemandPresentEvent" | "DemandFeedbackEvent" | "NewEntityEvent")[];
174
+ created_at: number;
175
+ account?: string | undefined;
176
+ role?: "user" | "merchant" | "arbitrator" | undefined;
177
+ }[];
178
+ }>, z.ZodObject<{
179
+ action: z.ZodLiteral<"remove">;
180
+ removed: z.ZodBoolean;
181
+ }, "strict", z.ZodTypeAny, {
182
+ action: "remove";
183
+ removed: boolean;
184
+ }, {
185
+ action: "remove";
186
+ removed: boolean;
187
+ }>, z.ZodObject<{
188
+ action: z.ZodLiteral<"match">;
189
+ results: z.ZodArray<z.ZodObject<{
190
+ intent_id: z.ZodString;
191
+ intent: z.ZodString;
192
+ hits: z.ZodArray<z.ZodObject<{
193
+ event_type: z.ZodString;
194
+ event_id: z.ZodString;
195
+ related_objects: z.ZodArray<z.ZodString, "many">;
196
+ business_meaning: z.ZodString;
197
+ score: z.ZodNumber;
198
+ matched_industries: z.ZodArray<z.ZodString, "many">;
199
+ matched_keywords: z.ZodArray<z.ZodString, "many">;
200
+ event: z.ZodRecord<z.ZodString, z.ZodUnknown>;
201
+ }, "strict", z.ZodTypeAny, {
202
+ event_type: string;
203
+ business_meaning: string;
204
+ score: number;
205
+ event: Record<string, unknown>;
206
+ matched_keywords: string[];
207
+ event_id: string;
208
+ related_objects: string[];
209
+ matched_industries: string[];
210
+ }, {
211
+ event_type: string;
212
+ business_meaning: string;
213
+ score: number;
214
+ event: Record<string, unknown>;
215
+ matched_keywords: string[];
216
+ event_id: string;
217
+ related_objects: string[];
218
+ matched_industries: string[];
219
+ }>, "many">;
220
+ scanned: z.ZodNumber;
221
+ }, "strict", z.ZodTypeAny, {
222
+ intent: string;
223
+ intent_id: string;
224
+ hits: {
225
+ event_type: string;
226
+ business_meaning: string;
227
+ score: number;
228
+ event: Record<string, unknown>;
229
+ matched_keywords: string[];
230
+ event_id: string;
231
+ related_objects: string[];
232
+ matched_industries: string[];
233
+ }[];
234
+ scanned: number;
235
+ }, {
236
+ intent: string;
237
+ intent_id: string;
238
+ hits: {
239
+ event_type: string;
240
+ business_meaning: string;
241
+ score: number;
242
+ event: Record<string, unknown>;
243
+ matched_keywords: string[];
244
+ event_id: string;
245
+ related_objects: string[];
246
+ matched_industries: string[];
247
+ }[];
248
+ scanned: number;
249
+ }>, "many">;
250
+ }, "strict", z.ZodTypeAny, {
251
+ action: "match";
252
+ results: {
253
+ intent: string;
254
+ intent_id: string;
255
+ hits: {
256
+ event_type: string;
257
+ business_meaning: string;
258
+ score: number;
259
+ event: Record<string, unknown>;
260
+ matched_keywords: string[];
261
+ event_id: string;
262
+ related_objects: string[];
263
+ matched_industries: string[];
264
+ }[];
265
+ scanned: number;
266
+ }[];
267
+ }, {
268
+ action: "match";
269
+ results: {
270
+ intent: string;
271
+ intent_id: string;
272
+ hits: {
273
+ event_type: string;
274
+ business_meaning: string;
275
+ score: number;
276
+ event: Record<string, unknown>;
277
+ matched_keywords: string[];
278
+ event_id: string;
279
+ related_objects: string[];
280
+ matched_industries: string[];
281
+ }[];
282
+ scanned: number;
283
+ }[];
284
+ }>]>;