@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
|
@@ -1,170 +1,2 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
1
|
import type { ToolDispatchResult } from "../types.js";
|
|
3
|
-
export declare const QueryTaskStatusInputSchema: z.ZodObject<{
|
|
4
|
-
task_id: z.ZodOptional<z.ZodString>;
|
|
5
|
-
project_id: z.ZodOptional<z.ZodString>;
|
|
6
|
-
}, "strict", z.ZodTypeAny, {
|
|
7
|
-
project_id?: string | undefined;
|
|
8
|
-
task_id?: string | undefined;
|
|
9
|
-
}, {
|
|
10
|
-
project_id?: string | undefined;
|
|
11
|
-
task_id?: string | undefined;
|
|
12
|
-
}>;
|
|
13
|
-
export declare const TaskStateSchema: z.ZodObject<{
|
|
14
|
-
task_id: z.ZodString;
|
|
15
|
-
operation: z.ZodString;
|
|
16
|
-
status: z.ZodEnum<["pending", "running", "completed", "failed", "cancelled"]>;
|
|
17
|
-
progress: z.ZodNumber;
|
|
18
|
-
message: z.ZodString;
|
|
19
|
-
result: z.ZodNullable<z.ZodUnknown>;
|
|
20
|
-
error: z.ZodNullable<z.ZodString>;
|
|
21
|
-
started_at: z.ZodNumber;
|
|
22
|
-
completed_at: z.ZodNullable<z.ZodNumber>;
|
|
23
|
-
project_id: z.ZodNullable<z.ZodString>;
|
|
24
|
-
}, "strict", z.ZodTypeAny, {
|
|
25
|
-
message: string;
|
|
26
|
-
status: "failed" | "completed" | "pending" | "cancelled" | "running";
|
|
27
|
-
error: string | null;
|
|
28
|
-
operation: string;
|
|
29
|
-
progress: number;
|
|
30
|
-
completed_at: number | null;
|
|
31
|
-
project_id: string | null;
|
|
32
|
-
task_id: string;
|
|
33
|
-
started_at: number;
|
|
34
|
-
result?: unknown;
|
|
35
|
-
}, {
|
|
36
|
-
message: string;
|
|
37
|
-
status: "failed" | "completed" | "pending" | "cancelled" | "running";
|
|
38
|
-
error: string | null;
|
|
39
|
-
operation: string;
|
|
40
|
-
progress: number;
|
|
41
|
-
completed_at: number | null;
|
|
42
|
-
project_id: string | null;
|
|
43
|
-
task_id: string;
|
|
44
|
-
started_at: number;
|
|
45
|
-
result?: unknown;
|
|
46
|
-
}>;
|
|
47
|
-
export declare const QueryTaskStatusOutputSchema: z.ZodObject<{
|
|
48
|
-
task_id: z.ZodOptional<z.ZodString>;
|
|
49
|
-
task: z.ZodNullable<z.ZodObject<{
|
|
50
|
-
task_id: z.ZodString;
|
|
51
|
-
operation: z.ZodString;
|
|
52
|
-
status: z.ZodEnum<["pending", "running", "completed", "failed", "cancelled"]>;
|
|
53
|
-
progress: z.ZodNumber;
|
|
54
|
-
message: z.ZodString;
|
|
55
|
-
result: z.ZodNullable<z.ZodUnknown>;
|
|
56
|
-
error: z.ZodNullable<z.ZodString>;
|
|
57
|
-
started_at: z.ZodNumber;
|
|
58
|
-
completed_at: z.ZodNullable<z.ZodNumber>;
|
|
59
|
-
project_id: z.ZodNullable<z.ZodString>;
|
|
60
|
-
}, "strict", z.ZodTypeAny, {
|
|
61
|
-
message: string;
|
|
62
|
-
status: "failed" | "completed" | "pending" | "cancelled" | "running";
|
|
63
|
-
error: string | null;
|
|
64
|
-
operation: string;
|
|
65
|
-
progress: number;
|
|
66
|
-
completed_at: number | null;
|
|
67
|
-
project_id: string | null;
|
|
68
|
-
task_id: string;
|
|
69
|
-
started_at: number;
|
|
70
|
-
result?: unknown;
|
|
71
|
-
}, {
|
|
72
|
-
message: string;
|
|
73
|
-
status: "failed" | "completed" | "pending" | "cancelled" | "running";
|
|
74
|
-
error: string | null;
|
|
75
|
-
operation: string;
|
|
76
|
-
progress: number;
|
|
77
|
-
completed_at: number | null;
|
|
78
|
-
project_id: string | null;
|
|
79
|
-
task_id: string;
|
|
80
|
-
started_at: number;
|
|
81
|
-
result?: unknown;
|
|
82
|
-
}>>;
|
|
83
|
-
tasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
84
|
-
task_id: z.ZodString;
|
|
85
|
-
operation: z.ZodString;
|
|
86
|
-
status: z.ZodEnum<["pending", "running", "completed", "failed", "cancelled"]>;
|
|
87
|
-
progress: z.ZodNumber;
|
|
88
|
-
message: z.ZodString;
|
|
89
|
-
result: z.ZodNullable<z.ZodUnknown>;
|
|
90
|
-
error: z.ZodNullable<z.ZodString>;
|
|
91
|
-
started_at: z.ZodNumber;
|
|
92
|
-
completed_at: z.ZodNullable<z.ZodNumber>;
|
|
93
|
-
project_id: z.ZodNullable<z.ZodString>;
|
|
94
|
-
}, "strict", z.ZodTypeAny, {
|
|
95
|
-
message: string;
|
|
96
|
-
status: "failed" | "completed" | "pending" | "cancelled" | "running";
|
|
97
|
-
error: string | null;
|
|
98
|
-
operation: string;
|
|
99
|
-
progress: number;
|
|
100
|
-
completed_at: number | null;
|
|
101
|
-
project_id: string | null;
|
|
102
|
-
task_id: string;
|
|
103
|
-
started_at: number;
|
|
104
|
-
result?: unknown;
|
|
105
|
-
}, {
|
|
106
|
-
message: string;
|
|
107
|
-
status: "failed" | "completed" | "pending" | "cancelled" | "running";
|
|
108
|
-
error: string | null;
|
|
109
|
-
operation: string;
|
|
110
|
-
progress: number;
|
|
111
|
-
completed_at: number | null;
|
|
112
|
-
project_id: string | null;
|
|
113
|
-
task_id: string;
|
|
114
|
-
started_at: number;
|
|
115
|
-
result?: unknown;
|
|
116
|
-
}>, "many">>;
|
|
117
|
-
}, "strict", z.ZodTypeAny, {
|
|
118
|
-
task: {
|
|
119
|
-
message: string;
|
|
120
|
-
status: "failed" | "completed" | "pending" | "cancelled" | "running";
|
|
121
|
-
error: string | null;
|
|
122
|
-
operation: string;
|
|
123
|
-
progress: number;
|
|
124
|
-
completed_at: number | null;
|
|
125
|
-
project_id: string | null;
|
|
126
|
-
task_id: string;
|
|
127
|
-
started_at: number;
|
|
128
|
-
result?: unknown;
|
|
129
|
-
} | null;
|
|
130
|
-
task_id?: string | undefined;
|
|
131
|
-
tasks?: {
|
|
132
|
-
message: string;
|
|
133
|
-
status: "failed" | "completed" | "pending" | "cancelled" | "running";
|
|
134
|
-
error: string | null;
|
|
135
|
-
operation: string;
|
|
136
|
-
progress: number;
|
|
137
|
-
completed_at: number | null;
|
|
138
|
-
project_id: string | null;
|
|
139
|
-
task_id: string;
|
|
140
|
-
started_at: number;
|
|
141
|
-
result?: unknown;
|
|
142
|
-
}[] | undefined;
|
|
143
|
-
}, {
|
|
144
|
-
task: {
|
|
145
|
-
message: string;
|
|
146
|
-
status: "failed" | "completed" | "pending" | "cancelled" | "running";
|
|
147
|
-
error: string | null;
|
|
148
|
-
operation: string;
|
|
149
|
-
progress: number;
|
|
150
|
-
completed_at: number | null;
|
|
151
|
-
project_id: string | null;
|
|
152
|
-
task_id: string;
|
|
153
|
-
started_at: number;
|
|
154
|
-
result?: unknown;
|
|
155
|
-
} | null;
|
|
156
|
-
task_id?: string | undefined;
|
|
157
|
-
tasks?: {
|
|
158
|
-
message: string;
|
|
159
|
-
status: "failed" | "completed" | "pending" | "cancelled" | "running";
|
|
160
|
-
error: string | null;
|
|
161
|
-
operation: string;
|
|
162
|
-
progress: number;
|
|
163
|
-
completed_at: number | null;
|
|
164
|
-
project_id: string | null;
|
|
165
|
-
task_id: string;
|
|
166
|
-
started_at: number;
|
|
167
|
-
result?: unknown;
|
|
168
|
-
}[] | undefined;
|
|
169
|
-
}>;
|
|
170
2
|
export declare function handleQueryTaskStatus(args: unknown): Promise<ToolDispatchResult>;
|
|
@@ -1,33 +1,4 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
1
|
import { TaskTracker } from "../../project/task-tracker.js";
|
|
3
|
-
export const QueryTaskStatusInputSchema = z.object({
|
|
4
|
-
task_id: z
|
|
5
|
-
.string()
|
|
6
|
-
.optional()
|
|
7
|
-
.describe("The task ID to query (returned by a prior async operation). " +
|
|
8
|
-
"If omitted, lists all recent tasks (most recent first, max 50)."),
|
|
9
|
-
project_id: z
|
|
10
|
-
.string()
|
|
11
|
-
.optional()
|
|
12
|
-
.describe("Optional filter — when listing tasks (task_id omitted), only return tasks for this project."),
|
|
13
|
-
}).strict().describe("Query the status of an async task, or list all recent tasks when task_id is omitted.");
|
|
14
|
-
export const TaskStateSchema = z.object({
|
|
15
|
-
task_id: z.string().describe("Unique task identifier."),
|
|
16
|
-
operation: z.string().describe("Operation type that created this task (e.g. 'build_graph')."),
|
|
17
|
-
status: z.enum(["pending", "running", "completed", "failed", "cancelled"]).describe("Current task status."),
|
|
18
|
-
progress: z.number().describe("Progress percentage 0-100."),
|
|
19
|
-
message: z.string().describe("Human-readable progress message."),
|
|
20
|
-
result: z.unknown().nullable().describe("Result payload (set when status='completed'). null otherwise."),
|
|
21
|
-
error: z.string().nullable().describe("Error message (set when status='failed'). null otherwise."),
|
|
22
|
-
started_at: z.number().describe("Timestamp (ms) when the task was created."),
|
|
23
|
-
completed_at: z.number().nullable().describe("Timestamp (ms) when the task reached a terminal state. null if still running."),
|
|
24
|
-
project_id: z.string().nullable().describe("Project ID associated with this task, if any."),
|
|
25
|
-
}).strict();
|
|
26
|
-
export const QueryTaskStatusOutputSchema = z.object({
|
|
27
|
-
task_id: z.string().optional().describe("The queried task ID (present when a single task was queried)."),
|
|
28
|
-
task: TaskStateSchema.nullable().describe("The task state. null if task_id not found or when listing."),
|
|
29
|
-
tasks: z.array(TaskStateSchema).optional().describe("List of tasks (present when task_id was omitted)."),
|
|
30
|
-
}).strict();
|
|
31
2
|
export async function handleQueryTaskStatus(args) {
|
|
32
3
|
const validated = (args && typeof args === "object" ? args : {});
|
|
33
4
|
if (validated.task_id) {
|
package/dist/tools/index.js
CHANGED
|
@@ -24,9 +24,12 @@ import { handleBridgeOperations } from "./handlers/bridge.js";
|
|
|
24
24
|
import { handleProjectOperation } from "./handlers/project.js";
|
|
25
25
|
import { handleConfigOperation } from "./handlers/config.js";
|
|
26
26
|
import { handleTrustScore } from "./handlers/trust.js";
|
|
27
|
-
import {
|
|
27
|
+
import { handleEvaluationOperation } from "./handlers/evaluation.js";
|
|
28
|
+
import { handlePersonaOperation } from "./handlers/persona.js";
|
|
29
|
+
import { handleIntentRadar } from "./handlers/intent-radar.js";
|
|
30
|
+
import { handleQueryTaskStatus } from "./handlers/task-status.js";
|
|
28
31
|
import { applyOnchainRules } from "./rules-hook.js";
|
|
29
|
-
import { createToolMeta, OnchainOperationsSchema, AccountOperationSchema, LocalMarkOperationSchema, LocalInfoOperationSchema, WipOperationsSchema, MessengerOperationInputSchema, Guard2File_InputSchema, MachineNode2File_InputSchema, WatchQueryOperationsSchema, WatchQueryOperationsResultSchema, OnchainTableDataSchema, OnchainEventsInputSchema, ProtocolInfoQuerySchema, SchemaQueryInputSchema, BridgeOperationsSchema, ProjectOperationInputSchema, ConfigOperationInputSchema, TrustScoreInputSchema, CallOutputSchema, AccountOperationOutputWrappedSchema, LocalMarkOperationOutputWrappedSchema, LocalInfoOperationOutputWrappedSchema, WipOperationOutputSchema, MessengerOperationOutputSchema, Guard2File_OutputWrappedSchema, MachineNode2File_OutputWrappedSchema, OnchainTableDataResultSchema, OnchainEventsResultSchema, ProtocolInfoResultSchema, SchemaQueryOutputSchema, BridgeCallOutputSchema, ProjectOperationOutputSchema, ConfigOperationOutputSchema, TrustScoreOutputSchema, } from "../schema/index.js";
|
|
32
|
+
import { createToolMeta, OnchainOperationsSchema, AccountOperationSchema, LocalMarkOperationSchema, LocalInfoOperationSchema, WipOperationsSchema, MessengerOperationInputSchema, Guard2File_InputSchema, MachineNode2File_InputSchema, WatchQueryOperationsSchema, WatchQueryOperationsResultSchema, OnchainTableDataSchema, OnchainEventsInputSchema, ProtocolInfoQuerySchema, SchemaQueryInputSchema, BridgeOperationsSchema, ProjectOperationInputSchema, ConfigOperationInputSchema, TrustScoreInputSchema, CallOutputSchema, AccountOperationOutputWrappedSchema, LocalMarkOperationOutputWrappedSchema, LocalInfoOperationOutputWrappedSchema, WipOperationOutputSchema, MessengerOperationOutputSchema, Guard2File_OutputWrappedSchema, MachineNode2File_OutputWrappedSchema, OnchainTableDataResultSchema, OnchainEventsResultSchema, ProtocolInfoResultSchema, SchemaQueryOutputSchema, BridgeCallOutputSchema, ProjectOperationOutputSchema, ConfigOperationOutputSchema, TrustScoreOutputSchema, EvaluationOperationInputSchema, EvaluationOperationOutputSchema, PersonaOperationInputSchema, PersonaOperationOutputSchema, IntentRadarInputSchema, IntentRadarOutputSchema, QueryTaskStatusInputSchema, QueryTaskStatusOutputSchema, } from "../schema/index.js";
|
|
30
33
|
export const TOOL_REGISTRY = [
|
|
31
34
|
{
|
|
32
35
|
name: "onchain_operations",
|
|
@@ -155,7 +158,7 @@ export const TOOL_REGISTRY = [
|
|
|
155
158
|
+ "11. onchain_object_history — FORENSICS: all transactions that touched an object (auditing only — prefer assemble_context for AI context building).\n"
|
|
156
159
|
+ "12. onchain_address_activity — FORENSICS: all transactions sent by an address (auditing only).\n"
|
|
157
160
|
+ "13. token_value_convert — Convert between raw on-chain smallest units (u64) and human unit values in EITHER direction (e.g. \"2200000000\" ↔ \"2.2\" WOW). Unit→raw is REFUSED when token precision cannot be resolved (never guesses decimals).\n\n"
|
|
158
|
-
+ "For dynamic table data queries (pagination, table items), use the 'onchain_table_data' tool.\n\n"
|
|
161
|
+
+ "For dynamic table data queries (pagination, table items), use the 'onchain_table_data' tool. For state-transition events, use the 'onchain_events' tool.\n\n"
|
|
159
162
|
+ "💡 Schema hint: Use schema_query with action='get' and name='query_toolkit' to retrieve the exact parameter schema with all query types and field definitions.",
|
|
160
163
|
inputSchema: WatchQueryOperationsSchema,
|
|
161
164
|
outputSchema: WatchQueryOperationsResultSchema,
|
|
@@ -167,8 +170,8 @@ export const TOOL_REGISTRY = [
|
|
|
167
170
|
name: "onchain_table_data",
|
|
168
171
|
handler: handleOnchainTableData,
|
|
169
172
|
config: {
|
|
170
|
-
title: "📊
|
|
171
|
-
description: "Query dynamic table data of on-chain objects —
|
|
173
|
+
title: "📊 Query WoWok On-chain Table Data",
|
|
174
|
+
description: "Query the dynamic table data of on-chain objects (ONE-TIME query — NOT a realtime subscription). Supports paginated table queries and specific table item lookups. Each table item belongs to a parent object type and has a specific meaning:\n\n"
|
|
172
175
|
+ "1. onchain_table — Paginated query of ANY object's dynamic fields table (Parent: any object). Returns all entries with keys, types, and object IDs. Use to explore all sub-items of an object.\n"
|
|
173
176
|
+ "2. onchain_table_item_repository_data — Query a record from a Repository's on-chain key-value database (Parent: Repository). Key: name + entity (address or number). Returns the stored data record with typed value.\n"
|
|
174
177
|
+ "3. onchain_table_item_permission_perm — Query a permission entry from a Permission object's access control table (Parent: Permission). Key: user address or Guard ID. Returns the permission list (perm[]) granted to that user/guard.\n"
|
|
@@ -181,6 +184,7 @@ export const TOOL_REGISTRY = [
|
|
|
181
184
|
+ "10. onchain_table_item_progress_history — Query a progress step record from a Progress object's history table (Parent: Progress). Key: sequence number (u64). Returns step details: node, next_node, session state, time.\n"
|
|
182
185
|
+ "11. onchain_table_item_address_mark — Query a PUBLIC on-chain name/tag mark from an AddressMark object's table (Parent: AddressMark). Key: address. Returns public labels: entity, name, tags[]. Unlike local marks, these are published on-chain.\n"
|
|
183
186
|
+ "12. onchain_table_item_generic — Query a generic table item from ANY object's dynamic fields (Parent: any object). Supports arbitrary key types (address, u64, string, object ID, etc.). Use for custom objects and general-purpose table lookups. Returns: ObjectBase | undefined.\n\n"
|
|
187
|
+
+ "🧭 Tool selection (avoid confusion): use query_toolkit to query a WHOLE object/balance/profile; use onchain_events to query state-transition events; use onchain_table_data (this tool) to paginate over ONE object's dynamic table fields or read a single table item.\n\n"
|
|
184
188
|
+ "💡 Schema hint: Use schema_query with action='get' and name='onchain_table_data' to retrieve the exact parameter schema with all table item types and field definitions.",
|
|
185
189
|
inputSchema: OnchainTableDataSchema,
|
|
186
190
|
outputSchema: OnchainTableDataResultSchema,
|
|
@@ -192,8 +196,8 @@ export const TOOL_REGISTRY = [
|
|
|
192
196
|
name: "onchain_events",
|
|
193
197
|
handler: handleOnchainEvents,
|
|
194
198
|
config: {
|
|
195
|
-
title: "📅
|
|
196
|
-
description: "
|
|
199
|
+
title: "📅 Query WoWok On-chain Events",
|
|
200
|
+
description: "Query on-chain WoWok state-transition events by type (a ONE-TIME paginated query — NOT a realtime subscription). Supports arbitration events, new order events, progress events, demand presentation events, demand feedback events, and new entity registration events. Use pagination cursor for fetching large result sets. NewOrderEvent.amount includes `_money_display` annotation (unit-converted via the order's Service generic token type; raw-only with retry hint when precision is unavailable).\n\n🧭 Tool selection (avoid confusion): use query_toolkit to query whole objects/balances/profiles; use onchain_table_data to query ONE object's dynamic table fields; use onchain_events (this tool) to query state-transition EVENTS by type.\n\n💡 Schema hint: Use schema_query with action='get' and name='onchain_events' to retrieve the exact parameter schema with all event types and field definitions.",
|
|
197
201
|
inputSchema: OnchainEventsInputSchema,
|
|
198
202
|
outputSchema: OnchainEventsResultSchema,
|
|
199
203
|
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
@@ -391,6 +395,9 @@ export const TOOL_REGISTRY = [
|
|
|
391
395
|
" • service_basics snapshot (published/paused/sales/guards/arbitrations)\n\n" +
|
|
392
396
|
"Use this tool when the user asks 'is this service trustworthy?', 'should I buy from this merchant?', " +
|
|
393
397
|
"'what's the risk of ordering this service?', or any explicit trust/risk inquiry about a Service.\n\n" +
|
|
398
|
+
"🧭 Tool selection (avoid confusion): trust_score = trust/risk of ONE Service; " +
|
|
399
|
+
"evaluation_operation = game-theory best-move advice at an Arb/Progress state; " +
|
|
400
|
+
"project_operation.evaluate_project = multi-object project-level evaluation.\n\n" +
|
|
394
401
|
"Parameters:\n" +
|
|
395
402
|
" • service (required) — Service object ID or local_mark name.\n" +
|
|
396
403
|
" • order_amount (optional) — Order amount in smallest token unit (e.g. 2000000000 for 2 WOW). " +
|
|
@@ -426,6 +433,75 @@ export const TOOL_REGISTRY = [
|
|
|
426
433
|
_meta: createToolMeta("task", ["task", "status", "async", "progress", "background", "tracker"]),
|
|
427
434
|
},
|
|
428
435
|
},
|
|
436
|
+
{
|
|
437
|
+
name: "evaluation_operation",
|
|
438
|
+
handler: handleEvaluationOperation,
|
|
439
|
+
config: {
|
|
440
|
+
title: "🧠 Evaluation - Pluggable Business Intelligence",
|
|
441
|
+
description: "Run pluggable business evaluations (data sources + rules + user injection). " +
|
|
442
|
+
"Each evaluation returns ranked best-move recommendations with payoff notes and risks.\n\n" +
|
|
443
|
+
"Actions:\n" +
|
|
444
|
+
" • arb_game — advise the best move at an Arb state (7-state lifecycle) for a perspective (disputant/arbitrator/voter).\n" +
|
|
445
|
+
" • node_game — advise the best move at a Progress node for a perspective (customer/operator).\n\n" +
|
|
446
|
+
"Read-only: computes recommendations from pure data; never mutates chain state. " +
|
|
447
|
+
"The caller decides and acts via onchain_operations / messenger_operation.\n\n" +
|
|
448
|
+
"🧭 Tool selection (avoid confusion): evaluation_operation = best-move advice at an Arb/Progress state (game theory); " +
|
|
449
|
+
"trust_score = trust/risk of ONE Service; project_operation = project-level evaluation.\n\n" +
|
|
450
|
+
"💡 Schema hint: Use schema_query with action='get' and name='evaluation_operation' to retrieve the exact parameter schema.",
|
|
451
|
+
inputSchema: EvaluationOperationInputSchema,
|
|
452
|
+
outputSchema: EvaluationOperationOutputSchema,
|
|
453
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
454
|
+
_meta: createToolMeta("evaluation", ["evaluate", "risk", "match", "game", "score", "arb", "node", "compose", "gap"]),
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
name: "persona_operation",
|
|
459
|
+
handler: handlePersonaOperation,
|
|
460
|
+
config: {
|
|
461
|
+
title: "👤 Persona - User Identity Setting",
|
|
462
|
+
description: "Read/write the user's systematic identity setting (persona): preferences, " +
|
|
463
|
+
"competitive strategy, experience rules, self profile, and spec.\n\n" +
|
|
464
|
+
"LAYERS: long_term = STABLE identity (USER-DRIVEN only — never auto-rewrite). " +
|
|
465
|
+
"current = transient context (SMART-UPDATABLE — AI may merge/replace from " +
|
|
466
|
+
"conversation experience or account behavior). Scope: system (all accounts, " +
|
|
467
|
+
"be conservative) or account (one chain address, higher priority).\n\n" +
|
|
468
|
+
"Actions:\n" +
|
|
469
|
+
" • get — resolve the priority-merged effective persona (+ injection + context text).\n" +
|
|
470
|
+
" • list — list stored personas and built-in industry defaults.\n" +
|
|
471
|
+
" • set — user-driven write/update of any layer (≤300 lines enforced).\n" +
|
|
472
|
+
" • analyze — extract identity signals from free-form context (website / experience summary).\n" +
|
|
473
|
+
" • apply — merge/replace analyzed signals into the CURRENT layer only.\n" +
|
|
474
|
+
" • sync — merge account behavior (experience layer) into the CURRENT layer.\n" +
|
|
475
|
+
" • remove — delete a persona (fall back to defaults).\n\n" +
|
|
476
|
+
"Read/write local state only; never mutates chain state.\n\n" +
|
|
477
|
+
"💡 Schema hint: Use schema_query with action='get' and name='persona_operation' to retrieve the exact parameter schema.",
|
|
478
|
+
inputSchema: PersonaOperationInputSchema,
|
|
479
|
+
outputSchema: PersonaOperationOutputSchema,
|
|
480
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
481
|
+
_meta: createToolMeta("persona", ["persona", "profile", "identity", "preference", "strategy", "spec", "portrait"]),
|
|
482
|
+
},
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
name: "intent_radar",
|
|
486
|
+
handler: handleIntentRadar,
|
|
487
|
+
config: {
|
|
488
|
+
title: "📡 Intent Radar - User Intent × Chain Event Matching",
|
|
489
|
+
description: "Persist the user's standing business intents and match them against on-chain events/data. " +
|
|
490
|
+
"This closes the loop: user records an intent (e.g. 'find subscription services'), " +
|
|
491
|
+
"the system pulls recent chain events and returns ranked hits.\n\n" +
|
|
492
|
+
"Actions:\n" +
|
|
493
|
+
" • save — record an intent (industry/keywords resolved once; optionally bound to an account).\n" +
|
|
494
|
+
" • list — list persisted intents (optionally filtered by account).\n" +
|
|
495
|
+
" • remove — delete an intent.\n" +
|
|
496
|
+
" • match — score events against intents (pass `events` from onchain_events, or auto-pull recent events).\n\n" +
|
|
497
|
+
"Read-only w.r.t. chain state (reads events + local intent store only).\n\n" +
|
|
498
|
+
"💡 Schema hint: Use schema_query with action='get' and name='intent_radar' to retrieve the exact parameter schema.",
|
|
499
|
+
inputSchema: IntentRadarInputSchema,
|
|
500
|
+
outputSchema: IntentRadarOutputSchema,
|
|
501
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
502
|
+
_meta: createToolMeta("intent", ["intent", "radar", "match", "event", "watch", "business", "intelligence"]),
|
|
503
|
+
},
|
|
504
|
+
},
|
|
429
505
|
];
|
|
430
506
|
export const TOOL_REGISTRY_MAP = new Map(TOOL_REGISTRY.map(t => [t.name, t]));
|
|
431
507
|
const SUB_TOOL_NAMES = TOOL_REGISTRY.map(t => t.name);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type WipPathType = "local_unix" | "local_windows" | "local_relative" | "http_url" | "ipfs" | "data_url" | "unknown";
|
|
1
|
+
export type WipPathType = "local_unix" | "local_windows" | "local_relative" | "local_http" | "http_url" | "ipfs" | "data_url" | "unknown";
|
|
2
2
|
export interface WipPathClassification {
|
|
3
3
|
type: WipPathType;
|
|
4
4
|
is_local: boolean;
|
|
@@ -38,6 +38,23 @@ export function classifyWipPath(path) {
|
|
|
38
38
|
description: "IPFS HTTP gateway URL — globally reachable",
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
+
if (/^https?:\/\/(localhost|127\.0\.0\.1|\[::1\]|0\.0\.0\.0)([:/]|$)/i.test(path)) {
|
|
42
|
+
return {
|
|
43
|
+
type: "local_http",
|
|
44
|
+
is_local: true,
|
|
45
|
+
is_network: false,
|
|
46
|
+
description: "Local HTTP URL (localhost/loopback) — reachable only on this machine, NOT by customers",
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
const privateIpRe = /^https?:\/\/(10\.\d{1,3}\.\d{1,3}\.\d{1,3}|172\.(1[6-9]|2\d|3[01])\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3})([:/]|$)/i;
|
|
50
|
+
if (privateIpRe.test(path)) {
|
|
51
|
+
return {
|
|
52
|
+
type: "local_http",
|
|
53
|
+
is_local: true,
|
|
54
|
+
is_network: false,
|
|
55
|
+
description: "LAN HTTP URL (private IP) — reachable only on the local network, NOT by customers",
|
|
56
|
+
};
|
|
57
|
+
}
|
|
41
58
|
if (/^https?:\/\//i.test(path)) {
|
|
42
59
|
return {
|
|
43
60
|
type: "http_url",
|
|
@@ -199,11 +216,22 @@ export function analyzeWipDeployment(path) {
|
|
|
199
216
|
let reason;
|
|
200
217
|
let options = [];
|
|
201
218
|
if (needsDeployment) {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
219
|
+
if (classification.type === "local_http") {
|
|
220
|
+
reason =
|
|
221
|
+
`The WIP URL '${path}' is a ${classification.description}. ` +
|
|
222
|
+
"It is reachable only from the merchant's own machine/LAN — customers and " +
|
|
223
|
+
"on-chain verifiers on other machines CANNOT fetch it. Storing it on-chain " +
|
|
224
|
+
"makes every customer order fail. " +
|
|
225
|
+
"Deploy the .wip file to a public host (GitHub Pages, IPFS, or your own website) " +
|
|
226
|
+
"and update the Service's wip_url with the public URL.";
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
reason =
|
|
230
|
+
`The WIP path '${path}' is a LOCAL ${classification.type} path. ` +
|
|
231
|
+
"Local paths stored on-chain are unreachable by customers and verifiers. " +
|
|
232
|
+
"Deploy the .wip file to a public host (GitHub Pages, IPFS, or your own website) " +
|
|
233
|
+
"and update the Service's wip_url with the public URL.";
|
|
234
|
+
}
|
|
207
235
|
options = getDeployOptions(path);
|
|
208
236
|
}
|
|
209
237
|
else if (classification.type === "http_url") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wowok/agent-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
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",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"license": "Apache-2.0",
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
53
|
-
"@wowok/wowok": "2.
|
|
53
|
+
"@wowok/wowok": "2.7.1",
|
|
54
54
|
"lodash": "^4.18.1",
|
|
55
55
|
"zod": "^3.25.76",
|
|
56
56
|
"zod-to-json-schema": "^3.25.2"
|