@wowok/agent-mcp 2.7.0 → 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 (133) hide show
  1. package/dist/customer/risk-assessment.d.ts +5 -1
  2. package/dist/customer/risk-assessment.js +4 -4
  3. package/dist/evaluation/arbitration-game.d.ts +16 -0
  4. package/dist/evaluation/arbitration-game.js +48 -0
  5. package/dist/evaluation/builtins/demand-match.d.ts +15 -0
  6. package/dist/evaluation/builtins/demand-match.js +153 -0
  7. package/dist/evaluation/builtins/index.d.ts +3 -0
  8. package/dist/evaluation/builtins/index.js +10 -0
  9. package/dist/evaluation/builtins/service-risk.d.ts +6 -0
  10. package/dist/evaluation/builtins/service-risk.js +55 -0
  11. package/dist/evaluation/capability.d.ts +50 -0
  12. package/dist/evaluation/capability.js +13 -0
  13. package/dist/evaluation/composer.d.ts +13 -0
  14. package/dist/evaluation/composer.js +40 -0
  15. package/dist/evaluation/engine.d.ts +18 -0
  16. package/dist/evaluation/engine.js +175 -0
  17. package/dist/evaluation/extract.d.ts +30 -0
  18. package/dist/evaluation/extract.js +115 -0
  19. package/dist/evaluation/gap.d.ts +2 -0
  20. package/dist/evaluation/gap.js +100 -0
  21. package/dist/evaluation/index.d.ts +11 -0
  22. package/dist/evaluation/index.js +11 -0
  23. package/dist/evaluation/node-game.d.ts +34 -0
  24. package/dist/evaluation/node-game.js +57 -0
  25. package/dist/evaluation/region.d.ts +10 -0
  26. package/dist/evaluation/region.js +36 -0
  27. package/dist/evaluation/types.d.ts +76 -0
  28. package/dist/evaluation/types.js +1 -0
  29. package/dist/evaluation/user-injection.d.ts +6 -0
  30. package/dist/evaluation/user-injection.js +27 -0
  31. package/dist/examples/education-contact-create.json +40 -0
  32. package/dist/examples/freelance-contact-create.json +40 -0
  33. package/dist/examples/insurance-machine-create.json +1 -1
  34. package/dist/examples/insurance-service-allocators.json +1 -1
  35. package/dist/examples/machine-publish.json +1 -1
  36. package/dist/examples/rental-ziroom-service-create.json +1 -1
  37. package/dist/examples/retail-adv-guard-messenger-proof-create.json +1 -1
  38. package/dist/examples/retail-myshop-service-create.json +1 -1
  39. package/dist/examples/retail-myshop-service-customer-required.json +1 -1
  40. package/dist/examples/subscription-contact-create.json +40 -0
  41. package/dist/examples/threebody-machine-create.json +1 -1
  42. package/dist/examples/travel-machine-create.json +1 -1
  43. package/dist/examples/travel-service-create.json +1 -1
  44. package/dist/harness/plan.js +42 -3
  45. package/dist/intent/enrich.d.ts +1 -0
  46. package/dist/intent/enrich.js +67 -0
  47. package/dist/intent/index.d.ts +23 -0
  48. package/dist/intent/index.js +60 -0
  49. package/dist/intent/matcher.d.ts +2 -0
  50. package/dist/intent/matcher.js +81 -0
  51. package/dist/intent/store.d.ts +19 -0
  52. package/dist/intent/store.js +55 -0
  53. package/dist/intent/types.d.ts +33 -0
  54. package/dist/intent/types.js +10 -0
  55. package/dist/knowledge/arbitration-risk.js +1 -11
  56. package/dist/knowledge/contact-templates.d.ts +27 -0
  57. package/dist/knowledge/contact-templates.js +60 -0
  58. package/dist/knowledge/examples-scanner.js +21 -3
  59. package/dist/knowledge/industry-generalizer.js +21 -21
  60. package/dist/knowledge/machine-risk.js +0 -1
  61. package/dist/knowledge/mcp-schema-audit.d.ts +1 -1
  62. package/dist/knowledge/mcp-schema-audit.js +8 -4
  63. package/dist/knowledge/service-risk.js +38 -2
  64. package/dist/knowledge/service-templates.js +1 -1
  65. package/dist/knowledge/service-translation.js +2 -2
  66. package/dist/knowledge/template-registry.d.ts +1 -1
  67. package/dist/knowledge/template-registry.js +13 -1
  68. package/dist/knowledge/tools-reference.js +23 -0
  69. package/dist/persona/analyzer.d.ts +16 -0
  70. package/dist/persona/analyzer.js +66 -0
  71. package/dist/persona/bridge.d.ts +5 -0
  72. package/dist/persona/bridge.js +86 -0
  73. package/dist/persona/defaults.d.ts +4 -0
  74. package/dist/persona/defaults.js +195 -0
  75. package/dist/persona/experience-bridge.d.ts +3 -0
  76. package/dist/persona/experience-bridge.js +23 -0
  77. package/dist/persona/index.d.ts +18 -0
  78. package/dist/persona/index.js +71 -0
  79. package/dist/persona/model.d.ts +7 -0
  80. package/dist/persona/model.js +111 -0
  81. package/dist/persona/store.d.ts +19 -0
  82. package/dist/persona/store.js +62 -0
  83. package/dist/persona/types.d.ts +43 -0
  84. package/dist/persona/types.js +5 -0
  85. package/dist/project/handlers.d.ts +5 -0
  86. package/dist/project/handlers.js +23 -1
  87. package/dist/project/semantic-graph.js +47 -0
  88. package/dist/rules.d.ts +2 -0
  89. package/dist/rules.js +43 -0
  90. package/dist/schema/call/semantic.js +23 -1
  91. package/dist/schema/call/service.js +7 -1
  92. package/dist/schema/evaluation/index.d.ts +4239 -0
  93. package/dist/schema/evaluation/index.js +356 -0
  94. package/dist/schema/index.d.ts +4 -0
  95. package/dist/schema/index.js +4 -0
  96. package/dist/schema/intent-radar/index.d.ts +284 -0
  97. package/dist/schema/intent-radar/index.js +89 -0
  98. package/dist/schema/operations.js +1 -1
  99. package/dist/schema/persona/index.d.ts +1985 -0
  100. package/dist/schema/persona/index.js +148 -0
  101. package/dist/schema/project/index.d.ts +2 -2
  102. package/dist/schema/query/index.js +6 -0
  103. package/dist/schema/sync-layer4.d.ts +1 -1
  104. package/dist/schema/sync-layer4.js +9 -5
  105. package/dist/schema/task-status.d.ts +168 -0
  106. package/dist/schema/task-status.js +36 -0
  107. package/dist/schema/trust/index.js +1 -1
  108. package/dist/schemas/evaluation_operation.output.json +677 -0
  109. package/dist/schemas/evaluation_operation.schema.json +903 -0
  110. package/dist/schemas/index.json +25 -1
  111. package/dist/schemas/intent_radar.output.json +229 -0
  112. package/dist/schemas/intent_radar.schema.json +135 -0
  113. package/dist/schemas/onchain_operations.schema.json +2 -2
  114. package/dist/schemas/onchain_operations_service.schema.json +2 -2
  115. package/dist/schemas/persona_operation.output.json +389 -0
  116. package/dist/schemas/persona_operation.schema.json +247 -0
  117. package/dist/schemas/query_task_status.output.json +115 -0
  118. package/dist/schemas/query_task_status.schema.json +24 -0
  119. package/dist/schemas/query_toolkit.output.json +1 -1
  120. package/dist/schemas/trust_score.schema.json +1 -1
  121. package/dist/tools/handlers/evaluation.d.ts +2 -0
  122. package/dist/tools/handlers/evaluation.js +123 -0
  123. package/dist/tools/handlers/intent-radar.d.ts +2 -0
  124. package/dist/tools/handlers/intent-radar.js +76 -0
  125. package/dist/tools/handlers/onchain.js +98 -0
  126. package/dist/tools/handlers/persona.d.ts +4 -0
  127. package/dist/tools/handlers/persona.js +89 -0
  128. package/dist/tools/handlers/task-status.d.ts +0 -168
  129. package/dist/tools/handlers/task-status.js +0 -29
  130. package/dist/tools/index.js +83 -7
  131. package/dist/tools/wip-deploy-assist.d.ts +1 -1
  132. package/dist/tools/wip-deploy-assist.js +33 -5
  133. 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
+ ]);
@@ -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 Proof object on-chain (convenience function without namedNew wrapper)"),
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) {