clawdentials-mcp 0.8.0 → 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/dist/tools/bounty.js +12 -5
- package/package.json +2 -1
package/dist/tools/bounty.js
CHANGED
|
@@ -160,6 +160,7 @@ export const bountyTools = {
|
|
|
160
160
|
}
|
|
161
161
|
const now = new Date();
|
|
162
162
|
const expiresAt = new Date(now.getTime() + (input.expiresInDays || 7) * 24 * 60 * 60 * 1000);
|
|
163
|
+
// Build bounty data, excluding undefined values
|
|
163
164
|
const bountyData = {
|
|
164
165
|
title: input.title,
|
|
165
166
|
summary: input.summary,
|
|
@@ -169,13 +170,8 @@ export const bountyTools = {
|
|
|
169
170
|
acceptanceCriteria: input.acceptanceCriteria,
|
|
170
171
|
amount: input.amount,
|
|
171
172
|
currency: input.currency || 'USDC',
|
|
172
|
-
repoUrl: input.repoUrl,
|
|
173
|
-
files: input.files,
|
|
174
173
|
submissionMethod: input.submissionMethod || 'pr',
|
|
175
|
-
targetBranch: input.targetBranch,
|
|
176
|
-
tags: input.tags,
|
|
177
174
|
posterAgentId: input.posterAgentId,
|
|
178
|
-
modAgentId: input.modAgentId,
|
|
179
175
|
status: input.fundNow ? 'open' : 'draft',
|
|
180
176
|
claims: [],
|
|
181
177
|
createdAt: Timestamp.fromDate(now),
|
|
@@ -183,6 +179,17 @@ export const bountyTools = {
|
|
|
183
179
|
viewCount: 0,
|
|
184
180
|
claimCount: 0,
|
|
185
181
|
};
|
|
182
|
+
// Only add optional fields if they have values
|
|
183
|
+
if (input.repoUrl)
|
|
184
|
+
bountyData.repoUrl = input.repoUrl;
|
|
185
|
+
if (input.files?.length)
|
|
186
|
+
bountyData.files = input.files;
|
|
187
|
+
if (input.targetBranch)
|
|
188
|
+
bountyData.targetBranch = input.targetBranch;
|
|
189
|
+
if (input.tags?.length)
|
|
190
|
+
bountyData.tags = input.tags;
|
|
191
|
+
if (input.modAgentId)
|
|
192
|
+
bountyData.modAgentId = input.modAgentId;
|
|
186
193
|
// Create bounty
|
|
187
194
|
const bountyRef = await bountiesCollection().add(bountyData);
|
|
188
195
|
const bountyId = bountyRef.id;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawdentials-mcp",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "MCP server for Clawdentials - escrow and reputation for AI agent commerce",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"dev": "tsc --watch",
|
|
17
17
|
"start": "node dist/index.js",
|
|
18
18
|
"test": "tsx scripts/test-tools.ts",
|
|
19
|
+
"test:bounty": "tsx scripts/test-bounty.ts",
|
|
19
20
|
"e2e": "tsx scripts/e2e-test.ts",
|
|
20
21
|
"e2e:real": "tsx scripts/e2e-test.ts --real",
|
|
21
22
|
"typecheck": "tsc --noEmit",
|