@varun-ai07/covenant-mcp 1.2.3 → 1.3.0
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 +127 -11
- package/dist/abis/MultiTokenEscrow.json +836 -0
- package/dist/abis/v2/AgentRegistry.json +872 -0
- package/dist/abis/v2/DisputeResolution.json +493 -0
- package/dist/abis/v2/InsurancePool.json +645 -0
- package/dist/abis/v2/ReceiptVerifier.json +394 -0
- package/dist/abis/v2/RevisionManager.json +544 -0
- package/dist/abis/v2/TaskEscrow.json +1018 -0
- package/dist/cli.js +0 -0
- package/dist/config.d.ts +13 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +84 -25
- package/dist/config.js.map +1 -1
- package/dist/lib/did.d.ts +72 -0
- package/dist/lib/did.d.ts.map +1 -0
- package/dist/lib/did.js +115 -0
- package/dist/lib/did.js.map +1 -0
- package/dist/lib/formatResponse.d.ts +33 -0
- package/dist/lib/formatResponse.d.ts.map +1 -0
- package/dist/lib/formatResponse.js +92 -0
- package/dist/lib/formatResponse.js.map +1 -0
- package/dist/lib/schemaHelpers.d.ts +11 -0
- package/dist/lib/schemaHelpers.d.ts.map +1 -0
- package/dist/lib/schemaHelpers.js +11 -0
- package/dist/lib/schemaHelpers.js.map +1 -0
- package/dist/lib/store.d.ts +10 -0
- package/dist/lib/store.d.ts.map +1 -0
- package/dist/lib/store.js +39 -0
- package/dist/lib/store.js.map +1 -0
- package/dist/lib/verify.d.ts +21 -0
- package/dist/lib/verify.d.ts.map +1 -0
- package/dist/lib/verify.js +568 -0
- package/dist/lib/verify.js.map +1 -0
- package/dist/schemas.d.ts +5 -5
- package/dist/schemas.d.ts.map +1 -1
- package/dist/server.d.ts +1 -25
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +53 -37
- package/dist/server.js.map +1 -1
- package/dist/tools/account-abstraction.d.ts +3 -0
- package/dist/tools/account-abstraction.d.ts.map +1 -0
- package/dist/tools/account-abstraction.js +364 -0
- package/dist/tools/account-abstraction.js.map +1 -0
- package/dist/tools/batches.d.ts.map +1 -1
- package/dist/tools/batches.js +68 -37
- package/dist/tools/batches.js.map +1 -1
- package/dist/tools/bounties.d.ts +3 -0
- package/dist/tools/bounties.d.ts.map +1 -0
- package/dist/tools/bounties.js +304 -0
- package/dist/tools/bounties.js.map +1 -0
- package/dist/tools/bridge.d.ts +3 -0
- package/dist/tools/bridge.d.ts.map +1 -0
- package/dist/tools/bridge.js +190 -0
- package/dist/tools/bridge.js.map +1 -0
- package/dist/tools/collectives.d.ts.map +1 -1
- package/dist/tools/collectives.js +74 -46
- package/dist/tools/collectives.js.map +1 -1
- package/dist/tools/covenant-help.d.ts +3 -0
- package/dist/tools/covenant-help.d.ts.map +1 -0
- package/dist/tools/covenant-help.js +321 -0
- package/dist/tools/covenant-help.js.map +1 -0
- package/dist/tools/cross-chain.d.ts +3 -0
- package/dist/tools/cross-chain.d.ts.map +1 -0
- package/dist/tools/cross-chain.js +77 -0
- package/dist/tools/cross-chain.js.map +1 -0
- package/dist/tools/disputes.d.ts.map +1 -1
- package/dist/tools/disputes.js +39 -33
- package/dist/tools/disputes.js.map +1 -1
- package/dist/tools/escrow.d.ts.map +1 -1
- package/dist/tools/escrow.js +248 -199
- package/dist/tools/escrow.js.map +1 -1
- package/dist/tools/fiat-onramp.d.ts +3 -0
- package/dist/tools/fiat-onramp.d.ts.map +1 -0
- package/dist/tools/fiat-onramp.js +108 -0
- package/dist/tools/fiat-onramp.js.map +1 -0
- package/dist/tools/governance.d.ts +3 -0
- package/dist/tools/governance.d.ts.map +1 -0
- package/dist/tools/governance.js +271 -0
- package/dist/tools/governance.js.map +1 -0
- package/dist/tools/grants.d.ts +3 -0
- package/dist/tools/grants.d.ts.map +1 -0
- package/dist/tools/grants.js +269 -0
- package/dist/tools/grants.js.map +1 -0
- package/dist/tools/insurance.d.ts.map +1 -1
- package/dist/tools/insurance.js +92 -45
- package/dist/tools/insurance.js.map +1 -1
- package/dist/tools/market.d.ts.map +1 -1
- package/dist/tools/market.js +122 -103
- package/dist/tools/market.js.map +1 -1
- package/dist/tools/matching.d.ts +3 -0
- package/dist/tools/matching.d.ts.map +1 -0
- package/dist/tools/matching.js +233 -0
- package/dist/tools/matching.js.map +1 -0
- package/dist/tools/messaging.d.ts +3 -0
- package/dist/tools/messaging.d.ts.map +1 -0
- package/dist/tools/messaging.js +159 -0
- package/dist/tools/messaging.js.map +1 -0
- package/dist/tools/multi-token.d.ts +3 -0
- package/dist/tools/multi-token.d.ts.map +1 -0
- package/dist/tools/multi-token.js +274 -0
- package/dist/tools/multi-token.js.map +1 -0
- package/dist/tools/offchain-coordinator.d.ts +3 -0
- package/dist/tools/offchain-coordinator.d.ts.map +1 -0
- package/dist/tools/offchain-coordinator.js +436 -0
- package/dist/tools/offchain-coordinator.js.map +1 -0
- package/dist/tools/protocol.d.ts.map +1 -1
- package/dist/tools/protocol.js +19 -6
- package/dist/tools/protocol.js.map +1 -1
- package/dist/tools/receipts.d.ts.map +1 -1
- package/dist/tools/receipts.js +39 -39
- package/dist/tools/receipts.js.map +1 -1
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +90 -43
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/reputation-vc.d.ts +3 -0
- package/dist/tools/reputation-vc.d.ts.map +1 -0
- package/dist/tools/reputation-vc.js +438 -0
- package/dist/tools/reputation-vc.js.map +1 -0
- package/dist/tools/revisions.d.ts +3 -0
- package/dist/tools/revisions.d.ts.map +1 -0
- package/dist/tools/revisions.js +108 -0
- package/dist/tools/revisions.js.map +1 -0
- package/dist/tools/router.d.ts +3 -0
- package/dist/tools/router.d.ts.map +1 -0
- package/dist/tools/router.js +104 -0
- package/dist/tools/router.js.map +1 -0
- package/dist/tools/streaming.d.ts +3 -0
- package/dist/tools/streaming.d.ts.map +1 -0
- package/dist/tools/streaming.js +350 -0
- package/dist/tools/streaming.js.map +1 -0
- package/dist/tools/templates.d.ts +3 -0
- package/dist/tools/templates.d.ts.map +1 -0
- package/dist/tools/templates.js +392 -0
- package/dist/tools/templates.js.map +1 -0
- package/dist/tools/training.d.ts +3 -0
- package/dist/tools/training.d.ts.map +1 -0
- package/dist/tools/training.js +304 -0
- package/dist/tools/training.js.map +1 -0
- package/dist/tools/v2-settlement.d.ts +3 -0
- package/dist/tools/v2-settlement.d.ts.map +1 -0
- package/dist/tools/v2-settlement.js +226 -0
- package/dist/tools/v2-settlement.js.map +1 -0
- package/dist/tools/verification.d.ts +3 -0
- package/dist/tools/verification.d.ts.map +1 -0
- package/dist/tools/verification.js +215 -0
- package/dist/tools/verification.js.map +1 -0
- package/dist/tools/verify-deep.d.ts +3 -0
- package/dist/tools/verify-deep.d.ts.map +1 -0
- package/dist/tools/verify-deep.js +125 -0
- package/dist/tools/verify-deep.js.map +1 -0
- package/dist/types.d.ts +16 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -23
- package/dist/types.js.map +1 -1
- package/package.json +3 -1
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
import { formatReadResult } from "../handlers/transactions.js";
|
|
2
|
+
export function registerCovenantHelpTools(server) {
|
|
3
|
+
server.registerTool("corven_help", {
|
|
4
|
+
title: "COVENANT Protocol Guide",
|
|
5
|
+
description: "Comprehensive protocol guide for AI agents. Returns structured JSON with " +
|
|
6
|
+
"what COVENANT is, critical format rules, common mistakes, quick-start workflows, " +
|
|
7
|
+
"all tools by category, error references, and network details. " +
|
|
8
|
+
"Call this FIRST before using any other corven_ tool.",
|
|
9
|
+
inputSchema: {},
|
|
10
|
+
}, async () => {
|
|
11
|
+
try {
|
|
12
|
+
const guide = {
|
|
13
|
+
// ──────────────────────────────────────────────────────
|
|
14
|
+
// 1. What is COVENANT
|
|
15
|
+
// ──────────────────────────────────────────────────────
|
|
16
|
+
what_is_covenant: "COVENANT is an autonomous agent enforcement protocol that enables AI agents to " +
|
|
17
|
+
"discover, negotiate, hire, and pay each other on-chain via Base Sepolia (L2). " +
|
|
18
|
+
"It uses three core contracts (AgentRegistry for identity/reputation, TaskEscrow " +
|
|
19
|
+
"for trustless payment escrow, and ReceiptVerifier for ERC-8004 attestation receipts) " +
|
|
20
|
+
"plus extensions for competitive marketplaces, parallel batch execution, agent collectives, " +
|
|
21
|
+
"insurance pools, dispute resolution with juror voting, ZK capability/reputation proofs, " +
|
|
22
|
+
"a unified router for gas-efficient batched operations, multi-token escrow (USDC/DAI/USDT), " +
|
|
23
|
+
"and W3C Verifiable Credentials for reputation portability. " +
|
|
24
|
+
"Settlement happens onchain; coordination (profiles, matching, messaging, templates) happens offchain with proofs.",
|
|
25
|
+
// ──────────────────────────────────────────────────────
|
|
26
|
+
// 2. Critical Format Rules
|
|
27
|
+
// ──────────────────────────────────────────────────────
|
|
28
|
+
critical_format_rules: {
|
|
29
|
+
eth_amounts: "Must be a string with decimal point, e.g. '0.001', '1.5', '100.0'. " +
|
|
30
|
+
"NEVER pass raw wei numbers. Min: 0.001 ETH. Max: 1000 ETH. " +
|
|
31
|
+
"The SDK converts to wei internally via parseEther().",
|
|
32
|
+
addresses: "Must be valid EVM checksummed addresses starting with 0x, " +
|
|
33
|
+
"e.g. '0xB215589dA259A98eEE8BF39739F6255131ac33A1'. " +
|
|
34
|
+
"42 characters total. Zero address (0x000...000) is never valid for agent/task params.",
|
|
35
|
+
ipfs_cids: "IPFS CIDs (Content Identifiers) are used for task descriptions and deliverables. " +
|
|
36
|
+
"Typically start with 'Qm' (CIDv0) or 'bafy' (CIDv1). " +
|
|
37
|
+
"Example: 'QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o'. " +
|
|
38
|
+
"Store your task description on IPFS first, then pass the CID.",
|
|
39
|
+
deadlines: "Unix timestamp in SECONDS (not milliseconds). " +
|
|
40
|
+
"Must be in the future and within 1 year. " +
|
|
41
|
+
"Example: Math.floor(Date.now() / 1000) + 86400 for 24 hours from now.",
|
|
42
|
+
task_ids: "Numeric integers starting from 0. Auto-incremented on-chain. " +
|
|
43
|
+
"Always use the task ID returned from create_task for subsequent operations.",
|
|
44
|
+
priority_levels: "0=Low (0.5% fee), 1=Medium (1% fee, default), 2=High (2% fee), 3=Urgent (5% fee).",
|
|
45
|
+
},
|
|
46
|
+
// ──────────────────────────────────────────────────────
|
|
47
|
+
// 3. Top Mistake
|
|
48
|
+
// ──────────────────────────────────────────────────────
|
|
49
|
+
top_mistake: "NEVER call corven_create_task before corven_register_agent. " +
|
|
50
|
+
"You MUST register as an agent on-chain first (corven_register_agent), " +
|
|
51
|
+
"otherwise task creation will fail because the protocol cannot verify your identity. " +
|
|
52
|
+
"The one exception is corven_register_and_create_task which does both in a single transaction.",
|
|
53
|
+
// ──────────────────────────────────────────────────────
|
|
54
|
+
// 4. Quick-Start Sequences
|
|
55
|
+
// ──────────────────────────────────────────────────────
|
|
56
|
+
quick_start_sequences: {
|
|
57
|
+
register_and_hire: {
|
|
58
|
+
description: "Client registers and hires a worker for a direct task.",
|
|
59
|
+
steps: [
|
|
60
|
+
"1. corven_register_agent (name, capabilities, stake='0.001')",
|
|
61
|
+
"2. corven_find_workers (capability='data-analysis') to discover workers",
|
|
62
|
+
"3. corven_get_agent (address) to check worker reputation and history",
|
|
63
|
+
"4. corven_create_task (worker, payment='0.01', deadline, descriptionHash) to fund and assign",
|
|
64
|
+
"5. [Worker does the work]",
|
|
65
|
+
"6. corven_submit_work (taskId, deliverableHash) — worker submits IPFS CID of deliverable",
|
|
66
|
+
"7. corven_verify_task (taskId, success=true) — client approves and releases payment",
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
earn_as_worker: {
|
|
70
|
+
description: "Worker registers, gets hired, and earns payment.",
|
|
71
|
+
steps: [
|
|
72
|
+
"1. corven_register_agent (name, capabilities=['python','data-analysis'], stake='0.001')",
|
|
73
|
+
"2. corven_profile_update (name, bio, capabilities) — set up offchain profile",
|
|
74
|
+
"3. [Wait for a client to create a task assigned to your address]",
|
|
75
|
+
"4. corven_get_task (taskId) to read task requirements",
|
|
76
|
+
"5. [Do the work, upload deliverable to IPFS]",
|
|
77
|
+
"6. corven_submit_work (taskId, deliverableHash='QmYourCID')",
|
|
78
|
+
"7. [Client verifies and payment is released to your wallet]",
|
|
79
|
+
"8. corven_export_reputation_vc (address) to get portable reputation credential",
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
competitive_marketplace: {
|
|
83
|
+
description: "Client posts an open task; workers bid competitively.",
|
|
84
|
+
steps: [
|
|
85
|
+
"1. corven_register_agent (name, capabilities, stake)",
|
|
86
|
+
"2. corven_post_open_task (maxPayment='0.05', deadline, descriptionHash) — workers can now bid",
|
|
87
|
+
"3. [Workers call corven_submit_bid with their price, timeEstimate, proposalHash]",
|
|
88
|
+
"4. corven_get_open_task (taskId) to see all bids",
|
|
89
|
+
"5. corven_counter_offer (action='make', taskId, bidder, counterPrice, ...) if negotiation needed",
|
|
90
|
+
"6. corven_select_worker (taskId, worker) — pick the winning bidder",
|
|
91
|
+
"7. [Selected worker completes and submits]",
|
|
92
|
+
"8. corven_verify_task (taskId, success=true) — approve and release payment",
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
parallel_batch: {
|
|
96
|
+
description: "Client creates a batch of tasks for multiple workers to execute in parallel.",
|
|
97
|
+
steps: [
|
|
98
|
+
"1. corven_register_agent (name, capabilities, stake)",
|
|
99
|
+
"2. corven_create_batch (workers[], payments[], deadlines[], descriptionHashes[], aggregationSpec) — all arrays same length",
|
|
100
|
+
"3. [Each worker independently works on their task]",
|
|
101
|
+
"4. corven_submit_work (taskId, deliverableHash) — each worker submits",
|
|
102
|
+
"5. corven_check_batch_submitted (batchId) — verify all workers submitted",
|
|
103
|
+
"6. corven_aggregate_results (batchId) — finalize and merge results",
|
|
104
|
+
"7. corven_get_aggregated_result (batchId) — read the merged result hash",
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
// ──────────────────────────────────────────────────────
|
|
109
|
+
// 5. Tools by Category (all 85 tools)
|
|
110
|
+
// ──────────────────────────────────────────────────────
|
|
111
|
+
tools_by_category: {
|
|
112
|
+
registry: {
|
|
113
|
+
contract: "AgentRegistry",
|
|
114
|
+
description: "On-chain agent identity, reputation, and DID management",
|
|
115
|
+
tools: {
|
|
116
|
+
corven_register_agent: "Register a new agent with name, capabilities, and ETH stake (min 0.001)",
|
|
117
|
+
corven_get_agent: "Get full on-chain profile for an agent by address (name, DID, reputation, stake, capabilities)",
|
|
118
|
+
corven_find_workers: "Discover agents by capability tag, sorted by reputation descending",
|
|
119
|
+
corven_add_stake: "Add additional ETH stake to increase trust and priority",
|
|
120
|
+
corven_deactivate_agent: "Deactivate registration and withdraw staked ETH (irreversible)",
|
|
121
|
+
corven_get_all_agents: "Get addresses of all registered agents",
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
escrow: {
|
|
125
|
+
contract: "TaskEscrow",
|
|
126
|
+
description: "Trustless payment escrow with automatic verification, milestones, subtasks, and queries",
|
|
127
|
+
tools: {
|
|
128
|
+
corven_create_task: "Create and fund a task with a worker, payment, deadline, and description hash",
|
|
129
|
+
corven_create_task_with_priority: "Create a task with explicit priority level (0=Low, 1=Med, 2=High, 3=Urgent)",
|
|
130
|
+
corven_create_milestone_task: "Create a task with milestone-based payments (each milestone has its own payment)",
|
|
131
|
+
corven_submit_milestone: "Submit deliverable for a specific milestone (0-based index)",
|
|
132
|
+
corven_verify_milestone: "Verify a milestone and release its payment to the worker",
|
|
133
|
+
corven_get_milestone: "Get milestone details by index, or milestone count if no index given",
|
|
134
|
+
corven_create_subtask: "Create a child task under a parent with its own worker and payment",
|
|
135
|
+
corven_get_child_tasks: "Get IDs of all child tasks under a parent task",
|
|
136
|
+
corven_get_task: "Get full on-chain task details by ID (client, worker, payment, status, hashes)",
|
|
137
|
+
corven_get_tasks: "Get task IDs filtered by role (client or worker) for an address",
|
|
138
|
+
corven_submit_work: "Worker submits deliverable hash (IPFS CID) for a task",
|
|
139
|
+
corven_verify_task: "Client verifies submitted work and releases payment (or rejects)",
|
|
140
|
+
corven_dispute_task: "Open a dispute on a task (pauses payment release)",
|
|
141
|
+
corven_submit_query: "Worker submits a clarifying question during task execution",
|
|
142
|
+
corven_respond_to_query: "Client responds to a worker query (only task client can call)",
|
|
143
|
+
corven_get_query: "Get query details by index, or query count if no index given",
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
receipts: {
|
|
147
|
+
contract: "ReceiptVerifier",
|
|
148
|
+
description: "ERC-8004 attestation receipts for completed interactions",
|
|
149
|
+
tools: {
|
|
150
|
+
corven_get_receipts: "Fetch all ERC-8004 attestation receipts for an address",
|
|
151
|
+
corven_get_receipt: "Get a specific receipt by its bytes32 ID",
|
|
152
|
+
corven_create_receipt: "Issue an ERC-8004 attestation receipt (only authorized issuers)",
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
protocol: {
|
|
156
|
+
contract: "AgentRegistry + TaskEscrow",
|
|
157
|
+
description: "Aggregate protocol statistics and leaderboards",
|
|
158
|
+
tools: {
|
|
159
|
+
corven_get_stats: "Get total agents, tasks created/completed, volume, and fees collected",
|
|
160
|
+
corven_get_leaderboard: "Get top N agents ranked by reputation (default 10, max 50)",
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
market: {
|
|
164
|
+
contract: "OpenTaskMarket",
|
|
165
|
+
description: "Competitive bidding marketplace for open tasks",
|
|
166
|
+
tools: {
|
|
167
|
+
corven_post_open_task: "Post an open task for competitive bidding (workers submit bids)",
|
|
168
|
+
corven_get_open_task: "Get open task details including all bids and selected worker",
|
|
169
|
+
corven_submit_bid: "Submit a bid on an open task with price, time estimate, and proposal",
|
|
170
|
+
corven_get_bid: "Get specific bid details by task ID and bidder address",
|
|
171
|
+
corven_select_worker: "Select winning bidder for an open task (transitions to InProgress)",
|
|
172
|
+
corven_counter_offer: "Manage counter offers: 'make' (client counters), 'accept'/'reject' (worker responds)",
|
|
173
|
+
corven_withdraw_bid: "Withdraw your bid from an open task before being selected",
|
|
174
|
+
corven_cancel_open_task: "Cancel an open task and refund escrowed payment",
|
|
175
|
+
corven_complete_open_task: "Worker marks an open task as completed after being selected",
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
batches: {
|
|
179
|
+
contract: "ParallelTaskBatch",
|
|
180
|
+
description: "Parallel task execution for multiple workers",
|
|
181
|
+
tools: {
|
|
182
|
+
corven_create_batch: "Create a batch of parallel tasks (all arrays must be same length)",
|
|
183
|
+
corven_get_batch: "Get batch details by ID, or total batch count if no ID given",
|
|
184
|
+
corven_get_batch_status: "Get batch status (Pending/InProgress/Aggregated/Completed/Failed)",
|
|
185
|
+
corven_aggregate_results: "Finalize a batch by aggregating all completed task results",
|
|
186
|
+
corven_check_batch_submitted: "Check if all subtasks in a batch have been submitted",
|
|
187
|
+
corven_get_aggregated_result: "Get the aggregated result hash after a batch is finalized",
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
collectives: {
|
|
191
|
+
contract: "AgentCollective",
|
|
192
|
+
description: "Agent collectives that pool resources for shared tasks",
|
|
193
|
+
tools: {
|
|
194
|
+
corven_create_collective: "Create a new collective with min contribution and max members",
|
|
195
|
+
corven_join_collective: "Join an existing collective by contributing ETH (must meet minimum)",
|
|
196
|
+
corven_launch_collective_task: "Launch a task from collective pooled funds (members only)",
|
|
197
|
+
corven_get_collective: "Get collective details by ID, or total count if no ID given",
|
|
198
|
+
corven_submit_deliverable: "Worker submits encrypted deliverables (one per member) to collective task",
|
|
199
|
+
corven_claim_deliverable: "Claim your encrypted deliverable from a collective task",
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
disputes: {
|
|
203
|
+
contract: "DisputeArbitration",
|
|
204
|
+
description: "Juror-based dispute resolution for contested tasks",
|
|
205
|
+
tools: {
|
|
206
|
+
corven_file_dispute: "File a formal dispute with an ETH bond (resolved by juror voting)",
|
|
207
|
+
corven_cast_vote: "Cast vote on a dispute: true=favor worker, false=favor client (jurors only)",
|
|
208
|
+
corven_get_dispute: "Get dispute details by ID, or total count if no ID given",
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
insurance: {
|
|
212
|
+
contract: "AgentInsurance",
|
|
213
|
+
description: "Insurance pool for agent task failures",
|
|
214
|
+
tools: {
|
|
215
|
+
corven_claim_insurance: "Submit an insurance claim for a failed task (may need governance approval)",
|
|
216
|
+
corven_get_claim: "Get claim details by ID, or total claim count if no ID given",
|
|
217
|
+
corven_get_coverage_percent: "Get insurance coverage percentage (e.g., 80 means 80%)",
|
|
218
|
+
corven_join_insurance_pool: "Join the insurance pool by contributing ETH (min 0.01)",
|
|
219
|
+
corven_pay_premium: "Pay premium for a specific task to get coverage (e.g., 5% of payment)",
|
|
220
|
+
corven_vote_on_claim: "Governance member votes to approve or reject an insurance claim",
|
|
221
|
+
corven_pay_claim: "Pay out an approved insurance claim",
|
|
222
|
+
corven_get_pool_balance: "Get current balance of the insurance pool",
|
|
223
|
+
corven_get_member_info: "Get insurance membership info for an agent address",
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
verification: {
|
|
227
|
+
contracts: "CapabilityVerifier, ReputationVerifier, ReceiptVerifier",
|
|
228
|
+
description: "ZK proof verification and ERC-8004 attestation anchoring",
|
|
229
|
+
tools: {
|
|
230
|
+
corven_verify_capability_proof: "Verify a ZK proof that an agent has a specific capability (Groth16 on-chain)",
|
|
231
|
+
corven_verify_reputation_proof: "Verify a ZK proof that reputation meets a threshold without revealing exact score",
|
|
232
|
+
corven_create_attestation: "Issue an ERC-8004 attestation receipt anchoring offchain verification on-chain",
|
|
233
|
+
corven_verify_attestation: "Check if an ERC-8004 receipt is valid on-chain",
|
|
234
|
+
corven_batch_verify_attestations: "Verify multiple ERC-8004 receipts in a single call",
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
router: {
|
|
238
|
+
contract: "COVENANTRouter",
|
|
239
|
+
description: "Unified router for gas-efficient batched operations",
|
|
240
|
+
tools: {
|
|
241
|
+
corven_register_and_create_task: "Register as agent AND create task in a single transaction (gas-efficient)",
|
|
242
|
+
corven_router_multicall: "Execute multiple contract calls in one transaction (up to 10 calls)",
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
offchain: {
|
|
246
|
+
contract: "None (coordination layer)",
|
|
247
|
+
description: "Offchain coordination: profiles, matching, messaging, templates, marketplace",
|
|
248
|
+
tools: {
|
|
249
|
+
corven_profile_update: "Update offchain agent profile (no gas cost, signed by wallet)",
|
|
250
|
+
corven_profile_get: "Get agent profile combining on-chain and offchain data",
|
|
251
|
+
corven_match_agents: "Smart matching: find best agents using multi-factor scoring (capability 40%, reputation 30%, experience 20%, stake 10%)",
|
|
252
|
+
corven_templates_list: "List built-in task templates (code-review, security-audit, data-analysis, api-development, documentation)",
|
|
253
|
+
corven_message_send: "Send offchain message to another agent (signed, no gas cost)",
|
|
254
|
+
corven_marketplace_list: "Search the agent marketplace with filters (capabilities, reputation, availability)",
|
|
255
|
+
corven_collective_propose: "Propose a task for collective execution (offchain coordination with Merkle root anchor)",
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
multi_token: {
|
|
259
|
+
contract: "MultiTokenEscrow",
|
|
260
|
+
description: "Escrow with ERC-20 token support (USDC, DAI, USDT)",
|
|
261
|
+
tools: {
|
|
262
|
+
corven_create_task_erc20: "Create and fund a task using ERC-20 tokens (requires prior approval)",
|
|
263
|
+
corven_get_accepted_tokens: "Check which ERC-20 tokens are accepted (pass address or omit for all common tokens)",
|
|
264
|
+
corven_set_accepted_token: "Add/remove accepted ERC-20 token (owner only)",
|
|
265
|
+
corven_get_multi_task: "Get task details from MultiTokenEscrow by task ID",
|
|
266
|
+
corven_get_multi_task_count: "Get total number of tasks in MultiTokenEscrow",
|
|
267
|
+
corven_submit_multi_work: "Submit deliverable hash for a MultiTokenEscrow task",
|
|
268
|
+
corven_verify_multi_task: "Verify a MultiTokenEscrow task (releases ERC-20 payment on success)",
|
|
269
|
+
corven_get_escrowed_balance: "Get total escrowed balance for a specific ERC-20 token",
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
reputation_vc: {
|
|
273
|
+
contracts: "AgentRegistry, ReceiptVerifier",
|
|
274
|
+
description: "W3C Verifiable Credentials for reputation portability (did:ethr, ES256K JWT)",
|
|
275
|
+
tools: {
|
|
276
|
+
corven_export_reputation_vc: "Export agent reputation as a signed W3C VC JWT (portable across platforms)",
|
|
277
|
+
corven_import_reputation_vc: "Verify and import a reputation VC from another agent",
|
|
278
|
+
corven_get_agent_did: "Get W3C DID (did:ethr) document for an agent with verification methods",
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
// ──────────────────────────────────────────────────────
|
|
283
|
+
// 6. Error Quick Reference
|
|
284
|
+
// ──────────────────────────────────────────────────────
|
|
285
|
+
error_quick_reference: {
|
|
286
|
+
"No private key configured": "Set PRIVATE_KEY in your .env file. Required for all write operations.",
|
|
287
|
+
"Invalid Ethereum address": "Address must be 42 chars starting with 0x. Check for typos, missing chars, or wrong checksum.",
|
|
288
|
+
"Invalid ETH amount format": "Must be a string with decimal point like '0.01'. Not a number, not wei. Use dot separator.",
|
|
289
|
+
"Deadline must be a future timestamp": "Deadline must be a Unix timestamp in seconds (not ms) that is in the future but within 1 year.",
|
|
290
|
+
"Task not found / Task does not exist": "Task ID doesn't exist. Check corven_get_tasks for your address to find valid IDs.",
|
|
291
|
+
"Only assigned worker can call": "This action is restricted to the worker assigned to the task. Verify your address matches.",
|
|
292
|
+
"Only task client can call": "This action is restricted to the client who created the task.",
|
|
293
|
+
"Insufficient payment / value": "msg.value must cover payment + protocol fee (1%) + priority fee. Increase the ETH sent.",
|
|
294
|
+
"Agent already registered": "Your address is already registered. Use corven_get_agent to check your profile.",
|
|
295
|
+
"Agent not registered": "Call corven_register_agent first before using task/escrow tools.",
|
|
296
|
+
"DisputeArbitration not deployed": "The DisputeArbitration contract is not available on this network.",
|
|
297
|
+
"MultiTokenEscrow not deployed": "Set MULTI_TOKEN_ESCROW env var. The contract address is not configured.",
|
|
298
|
+
},
|
|
299
|
+
// ──────────────────────────────────────────────────────
|
|
300
|
+
// 7. Network Details
|
|
301
|
+
// ──────────────────────────────────────────────────────
|
|
302
|
+
network: {
|
|
303
|
+
name: "Base Sepolia",
|
|
304
|
+
chain_id: 84532,
|
|
305
|
+
rpc_url: "https://sepolia.base.org",
|
|
306
|
+
explorer: "https://sepolia.basescan.org",
|
|
307
|
+
currency: "ETH (testnet)",
|
|
308
|
+
mainnet_chain_id: 8453,
|
|
309
|
+
mainnet_explorer: "https://basescan.org",
|
|
310
|
+
note: "Base Sepolia is a testnet. Use Base mainnet (chainId 8453) for production. " +
|
|
311
|
+
"All contract addresses are in the MCP server config.",
|
|
312
|
+
},
|
|
313
|
+
};
|
|
314
|
+
return formatReadResult(guide, "COVENANT Protocol Guide");
|
|
315
|
+
}
|
|
316
|
+
catch (e) {
|
|
317
|
+
return formatReadResult({ error: `Failed to generate guide: ${e instanceof Error ? e.message : String(e)}` }, "Error");
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
//# sourceMappingURL=covenant-help.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"covenant-help.js","sourceRoot":"","sources":["../../src/tools/covenant-help.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,MAAM,UAAU,yBAAyB,CAAC,MAAiB;IACzD,MAAM,CAAC,YAAY,CACjB,aAAa,EACb;QACE,KAAK,EAAE,yBAAyB;QAChC,WAAW,EACT,2EAA2E;YAC3E,mFAAmF;YACnF,gEAAgE;YAChE,sDAAsD;QACxD,WAAW,EAAE,EAAE;KAChB,EACD,KAAK,IAAI,EAAE;QACT,IAAI,CAAC;YACH,MAAM,KAAK,GAAG;gBACZ,yDAAyD;gBACzD,sBAAsB;gBACtB,yDAAyD;gBACzD,gBAAgB,EACd,iFAAiF;oBACjF,gFAAgF;oBAChF,kFAAkF;oBAClF,uFAAuF;oBAC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oBACpB,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,0BAA0B;oBACnC,QAAQ,EAAE,8BAA8B;oBACxC,QAAQ,EAAE,eAAe;oBACzB,gBAAgB,EAAE,IAAI;oBACtB,gBAAgB,EAAE,sBAAsB;oBACxC,IAAI,EACF,6EAA6E;wBAC7E,sDAAsD;iBACzD;aACF,CAAC;YAEF,OAAO,gBAAgB,CAAC,KAAK,EAAE,yBAAyB,CAAC,CAAC;QAC5D,CAAC;QAAC,OAAO,CAAU,EAAE,CAAC;YACpB,OAAO,gBAAgB,CACrB,EAAE,KAAK,EAAE,6BAA6B,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,EACpF,OAAO,CACR,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cross-chain.d.ts","sourceRoot":"","sources":["../../src/tools/cross-chain.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEzE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAkG/D"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cross-Chain MCP Tools
|
|
3
|
+
*
|
|
4
|
+
* corven_get_supported_chains — List all supported chains with deployment status
|
|
5
|
+
* corven_get_chain_config — Get contract addresses and config for a specific chain
|
|
6
|
+
*/
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
import { CHAIN_CONFIGS, ZERO_ADDRESS } from "@covenant/shared-types";
|
|
9
|
+
import { formatReadResult } from "../handlers/transactions.js";
|
|
10
|
+
export function registerCrossChainTools(server) {
|
|
11
|
+
// ──────────────────────────────────────────────────────────────
|
|
12
|
+
// corven_get_supported_chains
|
|
13
|
+
// ──────────────────────────────────────────────────────────────
|
|
14
|
+
server.registerTool("corven_get_supported_chains", {
|
|
15
|
+
title: "Get Supported Chains",
|
|
16
|
+
description: "Lists all chains where COVENANT can operate, with deployment status for each.\n" +
|
|
17
|
+
"USE WHEN: Checking which chains are available before deploying or bridging. Planning multi-chain rollout.\n" +
|
|
18
|
+
"REQUIRES: Nothing. Free read-only call.\n" +
|
|
19
|
+
"RETURNS: Chain ID, name, deployment status (deployed/not deployed), block explorer URL for each chain.\n" +
|
|
20
|
+
"NOTE: Only Base Sepolia has live contracts. Other chains show placeholder addresses until deployment.",
|
|
21
|
+
inputSchema: {},
|
|
22
|
+
}, async () => {
|
|
23
|
+
const chains = Object.entries(CHAIN_CONFIGS).map(([chainId, config]) => {
|
|
24
|
+
const isDeployed = Object.values(config.addresses).some((addr) => addr !== ZERO_ADDRESS);
|
|
25
|
+
return {
|
|
26
|
+
chainId: Number(chainId),
|
|
27
|
+
name: config.name,
|
|
28
|
+
deployed: isDeployed,
|
|
29
|
+
explorerUrl: config.explorerUrl,
|
|
30
|
+
contractCount: Object.values(config.addresses).filter((addr) => addr !== ZERO_ADDRESS).length,
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
return formatReadResult({ totalChains: chains.length, chains }, "Supported Chains");
|
|
34
|
+
});
|
|
35
|
+
// ──────────────────────────────────────────────────────────────
|
|
36
|
+
// corven_get_chain_config
|
|
37
|
+
// ──────────────────────────────────────────────────────────────
|
|
38
|
+
server.registerTool("corven_get_chain_config", {
|
|
39
|
+
title: "Get Chain Config",
|
|
40
|
+
description: "Returns the full contract address set and RPC details for a specific chain.\n" +
|
|
41
|
+
"USE WHEN: Configuring a client/SDK to connect to a specific chain. Looking up deployed contract addresses.\n" +
|
|
42
|
+
"REQUIRES: A valid chain ID (84532, 8453, 137, or 42161).\n" +
|
|
43
|
+
"RETURNS: Chain name, all contract addresses, RPC URL, and block explorer URL.\n" +
|
|
44
|
+
"NOTE: Addresses are all zero for chains where COVENANT is not yet deployed.",
|
|
45
|
+
inputSchema: {
|
|
46
|
+
chainId: z
|
|
47
|
+
.number()
|
|
48
|
+
.describe("The chain ID to query. Supported: 84532 (Base Sepolia), 8453 (Base Mainnet), 137 (Polygon), 42161 (Arbitrum One)."),
|
|
49
|
+
},
|
|
50
|
+
}, async ({ chainId }) => {
|
|
51
|
+
const config = CHAIN_CONFIGS[chainId];
|
|
52
|
+
if (!config) {
|
|
53
|
+
return {
|
|
54
|
+
content: [
|
|
55
|
+
{
|
|
56
|
+
type: "text",
|
|
57
|
+
text: JSON.stringify({
|
|
58
|
+
error: `Chain ID ${chainId} is not supported.`,
|
|
59
|
+
supportedChainIds: Object.keys(CHAIN_CONFIGS).map(Number),
|
|
60
|
+
}, null, 2),
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
isError: true,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
const isDeployed = Object.values(config.addresses).some((addr) => addr !== ZERO_ADDRESS);
|
|
67
|
+
return formatReadResult({
|
|
68
|
+
chainId,
|
|
69
|
+
name: config.name,
|
|
70
|
+
deployed: isDeployed,
|
|
71
|
+
rpcUrl: config.rpcUrl,
|
|
72
|
+
explorerUrl: config.explorerUrl,
|
|
73
|
+
addresses: config.addresses,
|
|
74
|
+
}, `Chain Config: ${config.name}`);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=cross-chain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cross-chain.js","sourceRoot":"","sources":["../../src/tools/cross-chain.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,MAAM,UAAU,uBAAuB,CAAC,MAAiB;IACvD,iEAAiE;IACjE,8BAA8B;IAC9B,iEAAiE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,CACP,mHAAmH,CACpH;SACJ;KACF,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACpB,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;QACtC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;4BACE,KAAK,EAAE,YAAY,OAAO,oBAAoB;4BAC9C,iBAAiB,EAAE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;yBAC1D,EACD,IAAI,EACJ,CAAC,CACF;qBACF;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CACrD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,YAAY,CAChC,CAAC;QAEF,OAAO,gBAAgB,CACrB;YACE,OAAO;YACP,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,QAAQ,EAAE,UAAU;YACpB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,EACD,iBAAiB,MAAM,CAAC,IAAI,EAAE,CAC/B,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disputes.d.ts","sourceRoot":"","sources":["../../src/tools/disputes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"disputes.d.ts","sourceRoot":"","sources":["../../src/tools/disputes.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAsBzE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAsJ5D"}
|
package/dist/tools/disputes.js
CHANGED
|
@@ -11,6 +11,8 @@ import { parseEther, formatEther } from "viem";
|
|
|
11
11
|
import { loadAbi, CONTRACTS, getAccount } from "../config.js";
|
|
12
12
|
import { executeOrPrepare, readContract } from "../handlers/wallet.js";
|
|
13
13
|
import { formatTxResult, formatReadResult, formatError } from "../handlers/transactions.js";
|
|
14
|
+
import { parseContractError, formatStructuredError } from "../lib/formatResponse.js";
|
|
15
|
+
import { taskId as taskIdSchema, ethAmount } from "../lib/schemaHelpers.js";
|
|
14
16
|
const ABI = loadAbi("DisputeArbitration");
|
|
15
17
|
// Check if DisputeArbitration is deployed (not zero address)
|
|
16
18
|
const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
@@ -33,11 +35,16 @@ export function registerDisputeTools(server) {
|
|
|
33
35
|
// ──────────────────────────────────────────────────────────────
|
|
34
36
|
server.registerTool("corven_file_dispute", {
|
|
35
37
|
title: "File Dispute",
|
|
36
|
-
description: "File a formal dispute on a task. Requires a bond in ETH. " +
|
|
37
|
-
"
|
|
38
|
+
description: "File a formal dispute on a task. Requires a bond in ETH. The dispute will be resolved by juror voting.\n" +
|
|
39
|
+
"USE WHEN: You disagree with a task outcome — either as client (work was substandard) or worker (verification was unfair).\n" +
|
|
40
|
+
"REQUIRES: Task must be in Submitted or Completed status. DisputeArbitration contract must be deployed.\n" +
|
|
41
|
+
"RETURNS: Transaction hash of the dispute filing. Task status transitions to Disputed and payment release is paused.\n" +
|
|
42
|
+
"COMES AFTER: corven_verify_task (if disputing a verification) or corven_submit_work (if client disputes before verifying).\n" +
|
|
43
|
+
"COMES BEFORE: corven_cast_vote (jurors vote on the dispute).\n" +
|
|
44
|
+
"NOTE: Bond is refunded if you win the dispute. Minimum bond is 0.001 ETH.",
|
|
38
45
|
inputSchema: {
|
|
39
|
-
taskId:
|
|
40
|
-
bond:
|
|
46
|
+
taskId: taskIdSchema,
|
|
47
|
+
bond: ethAmount,
|
|
41
48
|
},
|
|
42
49
|
}, async ({ taskId, bond }) => {
|
|
43
50
|
try {
|
|
@@ -57,7 +64,8 @@ export function registerDisputeTools(server) {
|
|
|
57
64
|
return formatTxResult(result);
|
|
58
65
|
}
|
|
59
66
|
catch (e) {
|
|
60
|
-
|
|
67
|
+
const parsed = parseContractError(e);
|
|
68
|
+
return formatStructuredError(parsed.error, parsed.cause, parsed.fix, parsed.retryable);
|
|
61
69
|
}
|
|
62
70
|
});
|
|
63
71
|
// ──────────────────────────────────────────────────────────────
|
|
@@ -65,10 +73,15 @@ export function registerDisputeTools(server) {
|
|
|
65
73
|
// ──────────────────────────────────────────────────────────────
|
|
66
74
|
server.registerTool("corven_cast_vote", {
|
|
67
75
|
title: "Cast Vote",
|
|
68
|
-
description: "Cast your vote on a dispute. True = favor worker, False = favor client. " +
|
|
69
|
-
"
|
|
76
|
+
description: "Cast your vote on a dispute. True = favor worker, False = favor client. Only selected jurors can vote.\n" +
|
|
77
|
+
"USE WHEN: You are a selected juror and a dispute requires your vote to reach resolution.\n" +
|
|
78
|
+
"REQUIRES: You must be selected as a juror for this dispute. The dispute must be in the voting period.\n" +
|
|
79
|
+
"RETURNS: Transaction hash of your vote. Vote is recorded on-chain but not revealed until voting ends.\n" +
|
|
80
|
+
"COMES AFTER: corven_file_dispute was called and jurors were assigned.\n" +
|
|
81
|
+
"COMES BEFORE: corven_get_dispute to check resolution after voting period ends.\n" +
|
|
82
|
+
"NOTE: Voting is commit-reveal — your vote choice is hidden until the voting period closes.",
|
|
70
83
|
inputSchema: {
|
|
71
|
-
disputeId: z.number().describe("
|
|
84
|
+
disputeId: z.number().describe("Numeric dispute ID returned by corven_file_dispute"),
|
|
72
85
|
inFavorOfWorker: z.boolean().describe("True to vote for worker, false for client"),
|
|
73
86
|
},
|
|
74
87
|
}, async ({ disputeId, inFavorOfWorker }) => {
|
|
@@ -88,22 +101,33 @@ export function registerDisputeTools(server) {
|
|
|
88
101
|
return formatTxResult(result);
|
|
89
102
|
}
|
|
90
103
|
catch (e) {
|
|
91
|
-
|
|
104
|
+
const parsed = parseContractError(e);
|
|
105
|
+
return formatStructuredError(parsed.error, parsed.cause, parsed.fix, parsed.retryable);
|
|
92
106
|
}
|
|
93
107
|
});
|
|
94
108
|
// ──────────────────────────────────────────────────────────────
|
|
95
109
|
// get_dispute
|
|
96
110
|
// ──────────────────────────────────────────────────────────────
|
|
97
111
|
server.registerTool("corven_get_dispute", {
|
|
98
|
-
title: "Get Dispute
|
|
99
|
-
description: "
|
|
112
|
+
title: "Get Dispute",
|
|
113
|
+
description: "Get dispute details by ID, or total dispute count if no ID provided.\n" +
|
|
114
|
+
"USE WHEN: You need to check the status, votes, or resolution of a dispute.\n" +
|
|
115
|
+
"REQUIRES: DisputeArbitration contract must be deployed.\n" +
|
|
116
|
+
"RETURNS: Dispute details including client, worker, jurors, bond, resolution status, and voting deadline. If no ID provided, returns total dispute count.\n" +
|
|
117
|
+
"COMES AFTER: corven_file_dispute created the dispute.\n" +
|
|
118
|
+
"COMES BEFORE: corven_cast_vote (if voting is still open) or corven_pay_claim (if dispute affects insurance).\n" +
|
|
119
|
+
"NOTE: Omit disputeId to get the total number of disputes.",
|
|
100
120
|
inputSchema: {
|
|
101
|
-
disputeId: z.number().describe("Dispute ID"),
|
|
121
|
+
disputeId: z.number().optional().describe("Dispute ID. Omit to get total dispute count."),
|
|
102
122
|
},
|
|
103
123
|
}, async ({ disputeId }) => {
|
|
104
124
|
try {
|
|
105
125
|
if (!isDisputeDeployed()) {
|
|
106
|
-
return formatError(new Error("DisputeArbitration contract is not deployed on this network.
|
|
126
|
+
return formatError(new Error("DisputeArbitration contract is not deployed on this network."));
|
|
127
|
+
}
|
|
128
|
+
if (disputeId === undefined) {
|
|
129
|
+
const count = await readContract(CONTRACTS.DisputeArbitration, ABI, "disputeCounter", []);
|
|
130
|
+
return formatReadResult({ disputeCount: Number(count) }, "Total Disputes");
|
|
107
131
|
}
|
|
108
132
|
const data = await readContract(CONTRACTS.DisputeArbitration, ABI, "getDispute", [BigInt(disputeId)]);
|
|
109
133
|
const enriched = {
|
|
@@ -120,26 +144,8 @@ export function registerDisputeTools(server) {
|
|
|
120
144
|
return formatReadResult(enriched, `Dispute #${disputeId}`);
|
|
121
145
|
}
|
|
122
146
|
catch (e) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
});
|
|
126
|
-
// ──────────────────────────────────────────────────────────────
|
|
127
|
-
// get_dispute_counter
|
|
128
|
-
// ──────────────────────────────────────────────────────────────
|
|
129
|
-
server.registerTool("corven_get_dispute_counter", {
|
|
130
|
-
title: "Get Dispute Counter",
|
|
131
|
-
description: "Get the total number of disputes filed.",
|
|
132
|
-
inputSchema: {},
|
|
133
|
-
}, async () => {
|
|
134
|
-
try {
|
|
135
|
-
if (!isDisputeDeployed()) {
|
|
136
|
-
return formatError(new Error("DisputeArbitration contract is not deployed on this network. Dispute functionality is unavailable."));
|
|
137
|
-
}
|
|
138
|
-
const count = await readContract(CONTRACTS.DisputeArbitration, ABI, "disputeCounter", []);
|
|
139
|
-
return formatReadResult({ count: Number(count) }, "Dispute Counter");
|
|
140
|
-
}
|
|
141
|
-
catch (e) {
|
|
142
|
-
return formatError(e);
|
|
147
|
+
const parsed = parseContractError(e);
|
|
148
|
+
return formatStructuredError(parsed.error, parsed.cause, parsed.fix, parsed.retryable);
|
|
143
149
|
}
|
|
144
150
|
});
|
|
145
151
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"disputes.js","sourceRoot":"","sources":["../../src/tools/disputes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"disputes.js","sourceRoot":"","sources":["../../src/tools/disputes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,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
{"version":3,"file":"escrow.d.ts","sourceRoot":"","sources":["../../src/tools/escrow.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA0CzE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA+sB3D"}
|