clawdentials-mcp 0.7.2 → 0.8.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 +145 -3
- package/dist/index.js +87 -3
- package/dist/schemas/index.d.ts +187 -0
- package/dist/schemas/index.js +65 -0
- package/dist/services/firestore.js +8 -1
- package/dist/services/moltbook.d.ts +45 -0
- package/dist/services/moltbook.js +90 -0
- package/dist/tools/agent.d.ts +17 -6
- package/dist/tools/agent.js +45 -4
- package/dist/tools/bounty.d.ts +361 -0
- package/dist/tools/bounty.js +608 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +1 -0
- package/dist/types/index.d.ts +59 -0
- package/package.json +2 -1
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Moltbook Identity Verification Service
|
|
3
|
+
*
|
|
4
|
+
* Verifies Moltbook identity tokens and retrieves agent profiles.
|
|
5
|
+
* See: https://www.moltbook.com/developers
|
|
6
|
+
*/
|
|
7
|
+
const MOLTBOOK_API_BASE = 'https://www.moltbook.com/api/v1';
|
|
8
|
+
// App key for verifying identity tokens (set via environment)
|
|
9
|
+
const MOLTBOOK_APP_KEY = process.env.MOLTBOOK_APP_KEY || '';
|
|
10
|
+
/**
|
|
11
|
+
* Verify a Moltbook identity token and retrieve the agent's profile.
|
|
12
|
+
*
|
|
13
|
+
* @param identityToken - The JWT identity token from the agent
|
|
14
|
+
* @returns The verified agent profile or an error
|
|
15
|
+
*/
|
|
16
|
+
export async function verifyMoltbookIdentity(identityToken) {
|
|
17
|
+
if (!MOLTBOOK_APP_KEY) {
|
|
18
|
+
return {
|
|
19
|
+
success: false,
|
|
20
|
+
error: 'Moltbook integration not configured (missing MOLTBOOK_APP_KEY)',
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
const response = await fetch(`${MOLTBOOK_API_BASE}/agents/verify-identity`, {
|
|
25
|
+
method: 'POST',
|
|
26
|
+
headers: {
|
|
27
|
+
'Content-Type': 'application/json',
|
|
28
|
+
'X-Moltbook-App-Key': MOLTBOOK_APP_KEY,
|
|
29
|
+
},
|
|
30
|
+
body: JSON.stringify({ token: identityToken }),
|
|
31
|
+
});
|
|
32
|
+
if (!response.ok) {
|
|
33
|
+
if (response.status === 401) {
|
|
34
|
+
return {
|
|
35
|
+
success: false,
|
|
36
|
+
error: 'Invalid or expired Moltbook identity token',
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
success: false,
|
|
41
|
+
error: `Moltbook verification failed: ${response.status}`,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
const data = await response.json();
|
|
45
|
+
return {
|
|
46
|
+
success: true,
|
|
47
|
+
agent: {
|
|
48
|
+
id: data.id,
|
|
49
|
+
name: data.name,
|
|
50
|
+
description: data.description,
|
|
51
|
+
karma: data.karma || 0,
|
|
52
|
+
avatar_url: data.avatar_url,
|
|
53
|
+
claimed: data.claimed || false,
|
|
54
|
+
created_at: data.created_at,
|
|
55
|
+
follower_count: data.follower_count || 0,
|
|
56
|
+
post_count: data.post_count || 0,
|
|
57
|
+
comment_count: data.comment_count || 0,
|
|
58
|
+
owner_x_handle: data.owner_x_handle,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
return {
|
|
64
|
+
success: false,
|
|
65
|
+
error: error instanceof Error ? error.message : 'Failed to verify Moltbook identity',
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Convert Moltbook karma to an initial Clawdentials reputation boost.
|
|
71
|
+
*
|
|
72
|
+
* Karma on Moltbook is unbounded, so we use a log scale to convert
|
|
73
|
+
* to a reasonable starting boost (0-20 points on the reputation score).
|
|
74
|
+
*
|
|
75
|
+
* @param karma - The agent's Moltbook karma
|
|
76
|
+
* @returns Initial reputation boost (0-20)
|
|
77
|
+
*/
|
|
78
|
+
export function karmaToReputationBoost(karma) {
|
|
79
|
+
if (karma <= 0)
|
|
80
|
+
return 0;
|
|
81
|
+
// Log scale: 1 karma = 0, 10 karma = ~7, 100 karma = ~14, 1000 karma = ~20
|
|
82
|
+
const boost = Math.log10(karma + 1) * 7;
|
|
83
|
+
return Math.min(20, Math.round(boost * 10) / 10);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Check if Moltbook integration is configured.
|
|
87
|
+
*/
|
|
88
|
+
export function isMoltbookConfigured() {
|
|
89
|
+
return !!MOLTBOOK_APP_KEY;
|
|
90
|
+
}
|
package/dist/tools/agent.d.ts
CHANGED
|
@@ -6,16 +6,25 @@ export declare const agentTools: {
|
|
|
6
6
|
name: import("zod").ZodString;
|
|
7
7
|
description: import("zod").ZodString;
|
|
8
8
|
skills: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
9
|
+
moltbookToken: import("zod").ZodOptional<import("zod").ZodString>;
|
|
9
10
|
}, "strip", import("zod").ZodTypeAny, {
|
|
10
11
|
name: string;
|
|
11
12
|
description: string;
|
|
12
13
|
skills: string[];
|
|
14
|
+
moltbookToken?: string | undefined;
|
|
13
15
|
}, {
|
|
14
16
|
name: string;
|
|
15
17
|
description: string;
|
|
16
18
|
skills: string[];
|
|
19
|
+
moltbookToken?: string | undefined;
|
|
17
20
|
}>;
|
|
18
21
|
handler: (input: AgentRegisterInput) => Promise<{
|
|
22
|
+
success: boolean;
|
|
23
|
+
error: string;
|
|
24
|
+
message?: undefined;
|
|
25
|
+
credentials?: undefined;
|
|
26
|
+
agent?: undefined;
|
|
27
|
+
} | {
|
|
19
28
|
success: boolean;
|
|
20
29
|
message: string;
|
|
21
30
|
credentials: {
|
|
@@ -35,17 +44,14 @@ export declare const agentTools: {
|
|
|
35
44
|
subscriptionTier: import("../types/index.js").SubscriptionTier;
|
|
36
45
|
balance: number;
|
|
37
46
|
nip05: string | undefined;
|
|
47
|
+
moltbookId: string | undefined;
|
|
48
|
+
moltbookKarma: number | undefined;
|
|
38
49
|
createdAt: string;
|
|
39
50
|
stats: import("../types/index.js").AgentStats;
|
|
40
51
|
reputationScore: number;
|
|
52
|
+
reputationBoost: number | undefined;
|
|
41
53
|
};
|
|
42
54
|
error?: undefined;
|
|
43
|
-
} | {
|
|
44
|
-
success: boolean;
|
|
45
|
-
error: string;
|
|
46
|
-
message?: undefined;
|
|
47
|
-
credentials?: undefined;
|
|
48
|
-
agent?: undefined;
|
|
49
55
|
}>;
|
|
50
56
|
};
|
|
51
57
|
agent_score: {
|
|
@@ -79,6 +85,11 @@ export declare const agentTools: {
|
|
|
79
85
|
avgCompletionTime: number;
|
|
80
86
|
};
|
|
81
87
|
accountAgeDays: number;
|
|
88
|
+
moltbook: {
|
|
89
|
+
id: string;
|
|
90
|
+
karma: number | undefined;
|
|
91
|
+
reputationBoost: number;
|
|
92
|
+
} | undefined;
|
|
82
93
|
};
|
|
83
94
|
error?: undefined;
|
|
84
95
|
}>;
|
package/dist/tools/agent.js
CHANGED
|
@@ -1,21 +1,49 @@
|
|
|
1
1
|
import { agentRegisterSchema, agentScoreSchema, agentSearchSchema, agentBalanceSchema, withdrawRequestSchema, } from '../schemas/index.js';
|
|
2
2
|
import { createAgent, getAgent, searchAgents, calculateReputationScore, validateApiKey, getBalance, createWithdrawal, } from '../services/firestore.js';
|
|
3
|
+
import { verifyMoltbookIdentity, karmaToReputationBoost, isMoltbookConfigured, } from '../services/moltbook.js';
|
|
3
4
|
export const agentTools = {
|
|
4
5
|
agent_register: {
|
|
5
|
-
description: 'Register as an agent on Clawdentials. Returns an API key and Nostr identity (NIP-05) - SAVE BOTH SECURELY, they cannot be recovered!',
|
|
6
|
+
description: 'Register as an agent on Clawdentials. Optionally link your Moltbook account to import karma. Returns an API key and Nostr identity (NIP-05) - SAVE BOTH SECURELY, they cannot be recovered!',
|
|
6
7
|
inputSchema: agentRegisterSchema,
|
|
7
8
|
handler: async (input) => {
|
|
8
9
|
try {
|
|
10
|
+
// Verify Moltbook identity if token provided
|
|
11
|
+
let moltbookData;
|
|
12
|
+
let reputationBoost = 0;
|
|
13
|
+
if (input.moltbookToken) {
|
|
14
|
+
if (!isMoltbookConfigured()) {
|
|
15
|
+
return {
|
|
16
|
+
success: false,
|
|
17
|
+
error: 'Moltbook integration is not configured on this server. Register without moltbookToken or contact admin.',
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const moltbookResult = await verifyMoltbookIdentity(input.moltbookToken);
|
|
21
|
+
if (!moltbookResult.success || !moltbookResult.agent) {
|
|
22
|
+
return {
|
|
23
|
+
success: false,
|
|
24
|
+
error: moltbookResult.error || 'Failed to verify Moltbook identity',
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
moltbookData = {
|
|
28
|
+
id: moltbookResult.agent.id,
|
|
29
|
+
karma: moltbookResult.agent.karma,
|
|
30
|
+
};
|
|
31
|
+
reputationBoost = karmaToReputationBoost(moltbookResult.agent.karma);
|
|
32
|
+
}
|
|
9
33
|
const { agent, apiKey, nostr } = await createAgent({
|
|
10
34
|
name: input.name,
|
|
11
35
|
description: input.description,
|
|
12
36
|
skills: input.skills,
|
|
13
37
|
verified: false,
|
|
14
38
|
subscriptionTier: 'free',
|
|
39
|
+
moltbookId: moltbookData?.id,
|
|
40
|
+
moltbookKarma: moltbookData?.karma,
|
|
15
41
|
});
|
|
42
|
+
const baseScore = calculateReputationScore(agent);
|
|
43
|
+
const finalScore = Math.min(100, baseScore + reputationBoost);
|
|
16
44
|
return {
|
|
17
45
|
success: true,
|
|
18
|
-
message: `Agent "${input.name}" registered successfully. SAVE YOUR CREDENTIALS - they cannot be recovered!`,
|
|
46
|
+
message: `Agent "${input.name}" registered successfully.${moltbookData ? ` Moltbook linked (karma: ${moltbookData.karma}, reputation boost: +${reputationBoost}).` : ''} SAVE YOUR CREDENTIALS - they cannot be recovered!`,
|
|
19
47
|
credentials: {
|
|
20
48
|
apiKey, // Only returned once!
|
|
21
49
|
nostr: {
|
|
@@ -33,9 +61,12 @@ export const agentTools = {
|
|
|
33
61
|
subscriptionTier: agent.subscriptionTier,
|
|
34
62
|
balance: agent.balance,
|
|
35
63
|
nip05: agent.nip05,
|
|
64
|
+
moltbookId: agent.moltbookId,
|
|
65
|
+
moltbookKarma: agent.moltbookKarma,
|
|
36
66
|
createdAt: agent.createdAt.toISOString(),
|
|
37
67
|
stats: agent.stats,
|
|
38
|
-
reputationScore:
|
|
68
|
+
reputationScore: finalScore,
|
|
69
|
+
reputationBoost: reputationBoost > 0 ? reputationBoost : undefined,
|
|
39
70
|
},
|
|
40
71
|
};
|
|
41
72
|
}
|
|
@@ -69,6 +100,8 @@ export const agentTools = {
|
|
|
69
100
|
const badges = [];
|
|
70
101
|
if (agent.verified)
|
|
71
102
|
badges.push('Verified');
|
|
103
|
+
if (agent.moltbookId)
|
|
104
|
+
badges.push('Moltbook Linked');
|
|
72
105
|
if (agent.stats.tasksCompleted >= 100)
|
|
73
106
|
badges.push('Experienced');
|
|
74
107
|
if (agent.stats.tasksCompleted >= 1000)
|
|
@@ -77,12 +110,15 @@ export const agentTools = {
|
|
|
77
110
|
badges.push('Reliable');
|
|
78
111
|
if (reputationScore >= 80)
|
|
79
112
|
badges.push('Top Performer');
|
|
113
|
+
// Calculate Moltbook reputation boost if applicable
|
|
114
|
+
const moltbookBoost = agent.moltbookKarma ? karmaToReputationBoost(agent.moltbookKarma) : 0;
|
|
115
|
+
const finalScore = Math.min(100, reputationScore + moltbookBoost);
|
|
80
116
|
return {
|
|
81
117
|
success: true,
|
|
82
118
|
agent: {
|
|
83
119
|
id: agent.id,
|
|
84
120
|
name: agent.name,
|
|
85
|
-
reputationScore,
|
|
121
|
+
reputationScore: finalScore,
|
|
86
122
|
badges,
|
|
87
123
|
verified: agent.verified,
|
|
88
124
|
subscriptionTier: agent.subscriptionTier,
|
|
@@ -95,6 +131,11 @@ export const agentTools = {
|
|
|
95
131
|
avgCompletionTime: agent.stats.avgCompletionTime,
|
|
96
132
|
},
|
|
97
133
|
accountAgeDays: Math.floor((Date.now() - agent.createdAt.getTime()) / (1000 * 60 * 60 * 24)),
|
|
134
|
+
moltbook: agent.moltbookId ? {
|
|
135
|
+
id: agent.moltbookId,
|
|
136
|
+
karma: agent.moltbookKarma,
|
|
137
|
+
reputationBoost: moltbookBoost,
|
|
138
|
+
} : undefined,
|
|
98
139
|
},
|
|
99
140
|
};
|
|
100
141
|
},
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import { type BountyCreateInput, type BountyFundInput, type BountyClaimInput, type BountySubmitInput, type BountyJudgeInput, type BountySearchInput, type BountyGetInput, type BountyExportMarkdownInput } from '../schemas/index.js';
|
|
2
|
+
import type { BountyListing } from '../types/index.js';
|
|
3
|
+
export declare const bountyTools: {
|
|
4
|
+
bounty_create: {
|
|
5
|
+
description: string;
|
|
6
|
+
inputSchema: import("zod").ZodObject<{
|
|
7
|
+
title: import("zod").ZodString;
|
|
8
|
+
summary: import("zod").ZodString;
|
|
9
|
+
description: import("zod").ZodString;
|
|
10
|
+
difficulty: import("zod").ZodEnum<["trivial", "easy", "medium", "hard", "expert"]>;
|
|
11
|
+
requiredSkills: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
12
|
+
acceptanceCriteria: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
13
|
+
amount: import("zod").ZodNumber;
|
|
14
|
+
currency: import("zod").ZodDefault<import("zod").ZodEnum<["USD", "USDC", "USDT", "BTC"]>>;
|
|
15
|
+
expiresInDays: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
16
|
+
repoUrl: import("zod").ZodOptional<import("zod").ZodString>;
|
|
17
|
+
files: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
18
|
+
path: import("zod").ZodString;
|
|
19
|
+
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
21
|
+
path: string;
|
|
22
|
+
description?: string | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
path: string;
|
|
25
|
+
description?: string | undefined;
|
|
26
|
+
}>, "many">>;
|
|
27
|
+
submissionMethod: import("zod").ZodDefault<import("zod").ZodEnum<["pr", "patch", "gist", "proof"]>>;
|
|
28
|
+
targetBranch: import("zod").ZodOptional<import("zod").ZodString>;
|
|
29
|
+
modAgentId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
30
|
+
tags: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
|
|
31
|
+
posterAgentId: import("zod").ZodString;
|
|
32
|
+
apiKey: import("zod").ZodString;
|
|
33
|
+
fundNow: import("zod").ZodDefault<import("zod").ZodBoolean>;
|
|
34
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
35
|
+
amount: number;
|
|
36
|
+
currency: "USD" | "USDC" | "BTC" | "USDT";
|
|
37
|
+
apiKey: string;
|
|
38
|
+
description: string;
|
|
39
|
+
title: string;
|
|
40
|
+
summary: string;
|
|
41
|
+
difficulty: "trivial" | "easy" | "medium" | "hard" | "expert";
|
|
42
|
+
requiredSkills: string[];
|
|
43
|
+
acceptanceCriteria: string[];
|
|
44
|
+
expiresInDays: number;
|
|
45
|
+
submissionMethod: "pr" | "patch" | "gist" | "proof";
|
|
46
|
+
posterAgentId: string;
|
|
47
|
+
fundNow: boolean;
|
|
48
|
+
repoUrl?: string | undefined;
|
|
49
|
+
files?: {
|
|
50
|
+
path: string;
|
|
51
|
+
description?: string | undefined;
|
|
52
|
+
}[] | undefined;
|
|
53
|
+
targetBranch?: string | undefined;
|
|
54
|
+
modAgentId?: string | undefined;
|
|
55
|
+
tags?: string[] | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
amount: number;
|
|
58
|
+
apiKey: string;
|
|
59
|
+
description: string;
|
|
60
|
+
title: string;
|
|
61
|
+
summary: string;
|
|
62
|
+
difficulty: "trivial" | "easy" | "medium" | "hard" | "expert";
|
|
63
|
+
requiredSkills: string[];
|
|
64
|
+
acceptanceCriteria: string[];
|
|
65
|
+
posterAgentId: string;
|
|
66
|
+
currency?: "USD" | "USDC" | "BTC" | "USDT" | undefined;
|
|
67
|
+
expiresInDays?: number | undefined;
|
|
68
|
+
repoUrl?: string | undefined;
|
|
69
|
+
files?: {
|
|
70
|
+
path: string;
|
|
71
|
+
description?: string | undefined;
|
|
72
|
+
}[] | undefined;
|
|
73
|
+
submissionMethod?: "pr" | "patch" | "gist" | "proof" | undefined;
|
|
74
|
+
targetBranch?: string | undefined;
|
|
75
|
+
modAgentId?: string | undefined;
|
|
76
|
+
tags?: string[] | undefined;
|
|
77
|
+
fundNow?: boolean | undefined;
|
|
78
|
+
}>;
|
|
79
|
+
handler: (input: BountyCreateInput) => Promise<{
|
|
80
|
+
success: boolean;
|
|
81
|
+
error: string;
|
|
82
|
+
message?: undefined;
|
|
83
|
+
bounty?: undefined;
|
|
84
|
+
} | {
|
|
85
|
+
success: boolean;
|
|
86
|
+
message: string;
|
|
87
|
+
bounty: {
|
|
88
|
+
id: string;
|
|
89
|
+
title: string;
|
|
90
|
+
amount: number;
|
|
91
|
+
currency: "USD" | "USDC" | "BTC" | "USDT";
|
|
92
|
+
status: string;
|
|
93
|
+
expiresAt: string;
|
|
94
|
+
};
|
|
95
|
+
error?: undefined;
|
|
96
|
+
}>;
|
|
97
|
+
};
|
|
98
|
+
bounty_fund: {
|
|
99
|
+
description: string;
|
|
100
|
+
inputSchema: import("zod").ZodObject<{
|
|
101
|
+
bountyId: import("zod").ZodString;
|
|
102
|
+
agentId: import("zod").ZodString;
|
|
103
|
+
apiKey: import("zod").ZodString;
|
|
104
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
105
|
+
apiKey: string;
|
|
106
|
+
agentId: string;
|
|
107
|
+
bountyId: string;
|
|
108
|
+
}, {
|
|
109
|
+
apiKey: string;
|
|
110
|
+
agentId: string;
|
|
111
|
+
bountyId: string;
|
|
112
|
+
}>;
|
|
113
|
+
handler: (input: BountyFundInput) => Promise<{
|
|
114
|
+
success: boolean;
|
|
115
|
+
error: string;
|
|
116
|
+
message?: undefined;
|
|
117
|
+
bounty?: undefined;
|
|
118
|
+
} | {
|
|
119
|
+
success: boolean;
|
|
120
|
+
message: string;
|
|
121
|
+
bounty: {
|
|
122
|
+
id: string;
|
|
123
|
+
title: string;
|
|
124
|
+
status: string;
|
|
125
|
+
};
|
|
126
|
+
error?: undefined;
|
|
127
|
+
}>;
|
|
128
|
+
};
|
|
129
|
+
bounty_claim: {
|
|
130
|
+
description: string;
|
|
131
|
+
inputSchema: import("zod").ZodObject<{
|
|
132
|
+
bountyId: import("zod").ZodString;
|
|
133
|
+
agentId: import("zod").ZodString;
|
|
134
|
+
apiKey: import("zod").ZodString;
|
|
135
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
136
|
+
apiKey: string;
|
|
137
|
+
agentId: string;
|
|
138
|
+
bountyId: string;
|
|
139
|
+
}, {
|
|
140
|
+
apiKey: string;
|
|
141
|
+
agentId: string;
|
|
142
|
+
bountyId: string;
|
|
143
|
+
}>;
|
|
144
|
+
handler: (input: BountyClaimInput) => Promise<{
|
|
145
|
+
success: boolean;
|
|
146
|
+
error: string;
|
|
147
|
+
message?: undefined;
|
|
148
|
+
claim?: undefined;
|
|
149
|
+
} | {
|
|
150
|
+
success: boolean;
|
|
151
|
+
message: string;
|
|
152
|
+
claim: {
|
|
153
|
+
bountyId: string;
|
|
154
|
+
title: string;
|
|
155
|
+
amount: number;
|
|
156
|
+
currency: import("../types/index.js").Currency;
|
|
157
|
+
claimedAt: string;
|
|
158
|
+
expiresAt: string;
|
|
159
|
+
submissionMethod: import("../types/index.js").SubmissionMethod;
|
|
160
|
+
targetBranch: string | undefined;
|
|
161
|
+
acceptanceCriteria: string[];
|
|
162
|
+
};
|
|
163
|
+
error?: undefined;
|
|
164
|
+
}>;
|
|
165
|
+
};
|
|
166
|
+
bounty_submit: {
|
|
167
|
+
description: string;
|
|
168
|
+
inputSchema: import("zod").ZodObject<{
|
|
169
|
+
bountyId: import("zod").ZodString;
|
|
170
|
+
submissionUrl: import("zod").ZodString;
|
|
171
|
+
notes: import("zod").ZodOptional<import("zod").ZodString>;
|
|
172
|
+
agentId: import("zod").ZodString;
|
|
173
|
+
apiKey: import("zod").ZodString;
|
|
174
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
175
|
+
apiKey: string;
|
|
176
|
+
agentId: string;
|
|
177
|
+
bountyId: string;
|
|
178
|
+
submissionUrl: string;
|
|
179
|
+
notes?: string | undefined;
|
|
180
|
+
}, {
|
|
181
|
+
apiKey: string;
|
|
182
|
+
agentId: string;
|
|
183
|
+
bountyId: string;
|
|
184
|
+
submissionUrl: string;
|
|
185
|
+
notes?: string | undefined;
|
|
186
|
+
}>;
|
|
187
|
+
handler: (input: BountySubmitInput) => Promise<{
|
|
188
|
+
success: boolean;
|
|
189
|
+
error: string;
|
|
190
|
+
message?: undefined;
|
|
191
|
+
submission?: undefined;
|
|
192
|
+
} | {
|
|
193
|
+
success: boolean;
|
|
194
|
+
message: string;
|
|
195
|
+
submission: {
|
|
196
|
+
bountyId: string;
|
|
197
|
+
title: string;
|
|
198
|
+
submissionUrl: string;
|
|
199
|
+
status: string;
|
|
200
|
+
modAgentId: string;
|
|
201
|
+
};
|
|
202
|
+
error?: undefined;
|
|
203
|
+
}>;
|
|
204
|
+
};
|
|
205
|
+
bounty_judge: {
|
|
206
|
+
description: string;
|
|
207
|
+
inputSchema: import("zod").ZodObject<{
|
|
208
|
+
bountyId: import("zod").ZodString;
|
|
209
|
+
winnerAgentId: import("zod").ZodString;
|
|
210
|
+
notes: import("zod").ZodOptional<import("zod").ZodString>;
|
|
211
|
+
judgeAgentId: import("zod").ZodString;
|
|
212
|
+
apiKey: import("zod").ZodString;
|
|
213
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
214
|
+
apiKey: string;
|
|
215
|
+
bountyId: string;
|
|
216
|
+
winnerAgentId: string;
|
|
217
|
+
judgeAgentId: string;
|
|
218
|
+
notes?: string | undefined;
|
|
219
|
+
}, {
|
|
220
|
+
apiKey: string;
|
|
221
|
+
bountyId: string;
|
|
222
|
+
winnerAgentId: string;
|
|
223
|
+
judgeAgentId: string;
|
|
224
|
+
notes?: string | undefined;
|
|
225
|
+
}>;
|
|
226
|
+
handler: (input: BountyJudgeInput) => Promise<{
|
|
227
|
+
success: boolean;
|
|
228
|
+
error: string;
|
|
229
|
+
message?: undefined;
|
|
230
|
+
result?: undefined;
|
|
231
|
+
} | {
|
|
232
|
+
success: boolean;
|
|
233
|
+
message: string;
|
|
234
|
+
result: {
|
|
235
|
+
bountyId: string;
|
|
236
|
+
title: string;
|
|
237
|
+
winnerAgentId: string;
|
|
238
|
+
winnerSubmissionUrl: string | undefined;
|
|
239
|
+
amount: number;
|
|
240
|
+
currency: import("../types/index.js").Currency;
|
|
241
|
+
judgingNotes: string | undefined;
|
|
242
|
+
};
|
|
243
|
+
error?: undefined;
|
|
244
|
+
}>;
|
|
245
|
+
};
|
|
246
|
+
bounty_search: {
|
|
247
|
+
description: string;
|
|
248
|
+
inputSchema: import("zod").ZodObject<{
|
|
249
|
+
skill: import("zod").ZodOptional<import("zod").ZodString>;
|
|
250
|
+
difficulty: import("zod").ZodOptional<import("zod").ZodEnum<["trivial", "easy", "medium", "hard", "expert"]>>;
|
|
251
|
+
status: import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodEnum<["open", "claimed", "in_review"]>>>;
|
|
252
|
+
minAmount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
253
|
+
maxAmount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
254
|
+
tag: import("zod").ZodOptional<import("zod").ZodString>;
|
|
255
|
+
limit: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
256
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
257
|
+
status: "open" | "claimed" | "in_review";
|
|
258
|
+
limit: number;
|
|
259
|
+
skill?: string | undefined;
|
|
260
|
+
difficulty?: "trivial" | "easy" | "medium" | "hard" | "expert" | undefined;
|
|
261
|
+
minAmount?: number | undefined;
|
|
262
|
+
maxAmount?: number | undefined;
|
|
263
|
+
tag?: string | undefined;
|
|
264
|
+
}, {
|
|
265
|
+
status?: "open" | "claimed" | "in_review" | undefined;
|
|
266
|
+
skill?: string | undefined;
|
|
267
|
+
limit?: number | undefined;
|
|
268
|
+
difficulty?: "trivial" | "easy" | "medium" | "hard" | "expert" | undefined;
|
|
269
|
+
minAmount?: number | undefined;
|
|
270
|
+
maxAmount?: number | undefined;
|
|
271
|
+
tag?: string | undefined;
|
|
272
|
+
}>;
|
|
273
|
+
handler: (input: BountySearchInput) => Promise<{
|
|
274
|
+
success: boolean;
|
|
275
|
+
bounties: BountyListing[];
|
|
276
|
+
count: number;
|
|
277
|
+
error?: undefined;
|
|
278
|
+
} | {
|
|
279
|
+
success: boolean;
|
|
280
|
+
error: string;
|
|
281
|
+
bounties: never[];
|
|
282
|
+
count: number;
|
|
283
|
+
}>;
|
|
284
|
+
};
|
|
285
|
+
bounty_get: {
|
|
286
|
+
description: string;
|
|
287
|
+
inputSchema: import("zod").ZodObject<{
|
|
288
|
+
bountyId: import("zod").ZodString;
|
|
289
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
290
|
+
bountyId: string;
|
|
291
|
+
}, {
|
|
292
|
+
bountyId: string;
|
|
293
|
+
}>;
|
|
294
|
+
handler: (input: BountyGetInput) => Promise<{
|
|
295
|
+
success: boolean;
|
|
296
|
+
error: string;
|
|
297
|
+
bounty?: undefined;
|
|
298
|
+
} | {
|
|
299
|
+
success: boolean;
|
|
300
|
+
bounty: {
|
|
301
|
+
createdAt: string;
|
|
302
|
+
expiresAt: string;
|
|
303
|
+
completedAt: string | undefined;
|
|
304
|
+
claims: {
|
|
305
|
+
agentId: string;
|
|
306
|
+
status: "expired" | "active" | "submitted" | "withdrawn";
|
|
307
|
+
submittedAt: string | undefined;
|
|
308
|
+
submissionUrl: string | undefined;
|
|
309
|
+
}[];
|
|
310
|
+
id: string;
|
|
311
|
+
title: string;
|
|
312
|
+
description: string;
|
|
313
|
+
summary: string;
|
|
314
|
+
difficulty: import("../types/index.js").BountyDifficulty;
|
|
315
|
+
requiredSkills: string[];
|
|
316
|
+
tags?: string[];
|
|
317
|
+
repoUrl?: string;
|
|
318
|
+
files?: import("../types/index.js").BountyFile[];
|
|
319
|
+
acceptanceCriteria: string[];
|
|
320
|
+
submissionMethod: import("../types/index.js").SubmissionMethod;
|
|
321
|
+
targetBranch?: string;
|
|
322
|
+
amount: number;
|
|
323
|
+
currency: import("../types/index.js").Currency;
|
|
324
|
+
escrowId?: string;
|
|
325
|
+
posterAgentId: string;
|
|
326
|
+
modAgentId?: string;
|
|
327
|
+
status: import("../types/index.js").BountyStatus;
|
|
328
|
+
winnerAgentId?: string;
|
|
329
|
+
winnerSubmissionUrl?: string;
|
|
330
|
+
viewCount: number;
|
|
331
|
+
claimCount: number;
|
|
332
|
+
};
|
|
333
|
+
error?: undefined;
|
|
334
|
+
}>;
|
|
335
|
+
};
|
|
336
|
+
bounty_export_markdown: {
|
|
337
|
+
description: string;
|
|
338
|
+
inputSchema: import("zod").ZodObject<{
|
|
339
|
+
bountyId: import("zod").ZodString;
|
|
340
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
341
|
+
bountyId: string;
|
|
342
|
+
}, {
|
|
343
|
+
bountyId: string;
|
|
344
|
+
}>;
|
|
345
|
+
handler: (input: BountyExportMarkdownInput) => Promise<{
|
|
346
|
+
success: boolean;
|
|
347
|
+
error: string;
|
|
348
|
+
bountyId?: undefined;
|
|
349
|
+
title?: undefined;
|
|
350
|
+
filename?: undefined;
|
|
351
|
+
markdown?: undefined;
|
|
352
|
+
} | {
|
|
353
|
+
success: boolean;
|
|
354
|
+
bountyId: string;
|
|
355
|
+
title: string;
|
|
356
|
+
filename: string;
|
|
357
|
+
markdown: string;
|
|
358
|
+
error?: undefined;
|
|
359
|
+
}>;
|
|
360
|
+
};
|
|
361
|
+
};
|