@taskhunt/mcp-server 0.2.2 → 0.2.3

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.
@@ -6,8 +6,9 @@ export declare const submitResultTool: {
6
6
  properties: {
7
7
  taskId: {
8
8
  type: string;
9
+ description: string;
9
10
  };
10
- deliverables: {
11
+ outputs: {
11
12
  type: string;
12
13
  items: {
13
14
  type: string;
@@ -16,11 +17,12 @@ export declare const submitResultTool: {
16
17
  type: string;
17
18
  description: string;
18
19
  };
19
- content: {
20
+ type: {
20
21
  type: string;
22
+ enum: string[];
21
23
  description: string;
22
24
  };
23
- fileUrl: {
25
+ value: {
24
26
  type: string;
25
27
  description: string;
26
28
  };
@@ -29,30 +31,15 @@ export declare const submitResultTool: {
29
31
  };
30
32
  description: string;
31
33
  };
32
- proofs: {
34
+ summary: {
33
35
  type: string;
34
- items: {
35
- type: string;
36
- properties: {
37
- type: {
38
- type: string;
39
- description: string;
40
- };
41
- verificationId: {
42
- type: string;
43
- description: string;
44
- };
45
- evidence: {
46
- type: string;
47
- description: string;
48
- };
49
- };
50
- required: string[];
51
- };
52
36
  description: string;
53
37
  };
54
- summary: {
38
+ toolsUsed: {
55
39
  type: string;
40
+ items: {
41
+ type: string;
42
+ };
56
43
  description: string;
57
44
  };
58
45
  };
@@ -1 +1 @@
1
- {"version":3,"file":"submit-result.d.ts","sourceRoot":"","sources":["../../src/tools/submit-result.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwC5B,CAAC;AAEF,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;GAWrE"}
1
+ {"version":3,"file":"submit-result.d.ts","sourceRoot":"","sources":["../../src/tools/submit-result.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC5B,CAAC;AAQF,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;GAoBrE"}
@@ -1,53 +1,53 @@
1
1
  import { client } from '../api-client.js';
2
2
  export const submitResultTool = {
3
3
  name: 'taskhunt_submit_result',
4
- description: "Submit your completed work for a task. Include ALL required deliverables listed in the task's outputContract. For JSON/text data, put it in the 'content' field. For files, put the URL from taskhunt_upload_file in the 'fileUrl' field. Include proofs if the task requires them. This is final — make sure everything is complete.",
4
+ description: "Submit your completed work for a task. Include ALL required outputs listed in the task's spec.outputs. Each output name must exactly match the name in spec.outputs. This is final — make sure everything is complete.",
5
5
  inputSchema: {
6
6
  type: 'object',
7
7
  properties: {
8
- taskId: { type: 'string' },
9
- deliverables: {
8
+ taskId: { type: 'string', description: 'Task UUID' },
9
+ outputs: {
10
10
  type: 'array',
11
11
  items: {
12
12
  type: 'object',
13
13
  properties: {
14
- name: { type: 'string', description: 'Must match a name in outputContract.deliverables' },
15
- content: { type: 'string', description: 'Text or JSON string content (for small outputs)' },
16
- fileUrl: { type: 'string', description: 'URL from taskhunt_upload_file (for file outputs)' },
14
+ name: { type: 'string', description: 'Must exactly match a name in spec.outputs' },
15
+ type: { type: 'string', enum: ['TEXT', 'JSON', 'FILE', 'URL'], description: 'Output type (default: TEXT)' },
16
+ value: { type: 'string', description: 'The output content or file URL' },
17
17
  },
18
- required: ['name'],
18
+ required: ['name', 'value'],
19
19
  },
20
- description: 'All deliverables required by the task',
21
- },
22
- proofs: {
23
- type: 'array',
24
- items: {
25
- type: 'object',
26
- properties: {
27
- type: { type: 'string', description: 'e.g. LOCATION_VERIFICATION, API_ACCESS, BROWSER_EXECUTION' },
28
- verificationId: { type: 'string', description: 'ID from taskhunt_verify_location' },
29
- evidence: { type: 'string', description: 'Additional evidence description or file URL' },
30
- },
31
- required: ['type'],
32
- },
33
- description: 'Execution proofs required by the task',
20
+ description: 'All outputs required by the task spec',
34
21
  },
35
22
  summary: {
36
23
  type: 'string',
37
- description: 'Brief summary of what you did and key findings. This is shown to the poster.',
24
+ description: 'Brief summary of what you did and key findings. Shown to the poster.',
25
+ },
26
+ toolsUsed: {
27
+ type: 'array',
28
+ items: { type: 'string' },
29
+ description: 'Tools you used, e.g. ["web_search", "web_fetch"]',
38
30
  },
39
31
  },
40
- required: ['taskId', 'deliverables', 'summary'],
32
+ required: ['taskId', 'outputs', 'summary'],
41
33
  },
42
34
  };
43
35
  export async function handleSubmitResult(args) {
44
36
  const taskId = String(args.taskId);
37
+ // Normalize outputs: ensure each has type field
38
+ const rawOutputs = args.outputs ?? [];
39
+ const outputs = rawOutputs.map(o => ({
40
+ name: o.name,
41
+ type: o.type ?? 'TEXT',
42
+ value: o.value,
43
+ }));
45
44
  const body = {
46
- content: args.summary,
47
- deliverables: args.deliverables,
48
- proofs: args.proofs,
49
- summary: args.summary,
45
+ content: String(args.summary),
46
+ summary: String(args.summary),
47
+ outputs,
50
48
  };
49
+ if (args.toolsUsed)
50
+ body.toolsUsed = args.toolsUsed;
51
51
  const result = await client.post(`/tasks/${taskId}/submissions`, body);
52
52
  return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
53
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"submit-result.js","sourceRoot":"","sources":["../../src/tools/submit-result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE,uUAAuU;IACpV,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC1B,YAAY,EAAE;gBACZ,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,UAAU,EA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AAI,EAAE,QAAQ,EAAE;gBACzB,WAAW,EAAE,kDAAkD;aAChE;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;KAC3C;CACF,CAAC;AAQF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAA6B;IACpE,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAEnC,gDAAgD;IAChD,MAAM,UAAU,GAAI,IAAI,CAAC,OAAoC,IAAI,EAAE,CAAC;IACpE,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACnC,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,MAAM;QACtB,KAAK,EAAE,CAAC,CAAC,KAAK;KACf,CAAC,CAAC,CAAC;IAEJ,MAAM,IAAI,GAA4B;QACpC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QAC7B,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QAC7B,OAAO;KACR,CAAC;IACF,IAAI,IAAI,CAAC,SAAS;QAAE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;IAEpD,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,UAAU,MAAM,cAAc,EAAE,IAAI,CAAC,CAAC;IACvE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;AACzF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taskhunt/mcp-server",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "TaskHunt MCP Server - OpenClaw Skill for AI agents to find and complete paid tasks",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -2,54 +2,61 @@ import { client } from '../api-client.js';
2
2
 
3
3
  export const submitResultTool = {
4
4
  name: 'taskhunt_submit_result',
5
- description: "Submit your completed work for a task. Include ALL required deliverables listed in the task's outputContract. For JSON/text data, put it in the 'content' field. For files, put the URL from taskhunt_upload_file in the 'fileUrl' field. Include proofs if the task requires them. This is final — make sure everything is complete.",
5
+ description: "Submit your completed work for a task. Include ALL required outputs listed in the task's spec.outputs. Each output name must exactly match the name in spec.outputs. This is final — make sure everything is complete.",
6
6
  inputSchema: {
7
7
  type: 'object' as const,
8
8
  properties: {
9
- taskId: { type: 'string' },
10
- deliverables: {
9
+ taskId: { type: 'string', description: 'Task UUID' },
10
+ outputs: {
11
11
  type: 'array',
12
12
  items: {
13
13
  type: 'object',
14
14
  properties: {
15
- name: { type: 'string', description: 'Must match a name in outputContract.deliverables' },
16
- content: { type: 'string', description: 'Text or JSON string content (for small outputs)' },
17
- fileUrl: { type: 'string', description: 'URL from taskhunt_upload_file (for file outputs)' },
15
+ name: { type: 'string', description: 'Must exactly match a name in spec.outputs' },
16
+ type: { type: 'string', enum: ['TEXT', 'JSON', 'FILE', 'URL'], description: 'Output type (default: TEXT)' },
17
+ value: { type: 'string', description: 'The output content or file URL' },
18
18
  },
19
- required: ['name'],
19
+ required: ['name', 'value'],
20
20
  },
21
- description: 'All deliverables required by the task',
22
- },
23
- proofs: {
24
- type: 'array',
25
- items: {
26
- type: 'object',
27
- properties: {
28
- type: { type: 'string', description: 'e.g. LOCATION_VERIFICATION, API_ACCESS, BROWSER_EXECUTION' },
29
- verificationId: { type: 'string', description: 'ID from taskhunt_verify_location' },
30
- evidence: { type: 'string', description: 'Additional evidence description or file URL' },
31
- },
32
- required: ['type'],
33
- },
34
- description: 'Execution proofs required by the task',
21
+ description: 'All outputs required by the task spec',
35
22
  },
36
23
  summary: {
37
24
  type: 'string',
38
- description: 'Brief summary of what you did and key findings. This is shown to the poster.',
25
+ description: 'Brief summary of what you did and key findings. Shown to the poster.',
26
+ },
27
+ toolsUsed: {
28
+ type: 'array',
29
+ items: { type: 'string' },
30
+ description: 'Tools you used, e.g. ["web_search", "web_fetch"]',
39
31
  },
40
32
  },
41
- required: ['taskId', 'deliverables', 'summary'],
33
+ required: ['taskId', 'outputs', 'summary'],
42
34
  },
43
35
  };
44
36
 
37
+ interface OutputItem {
38
+ name: string;
39
+ type?: string;
40
+ value: string;
41
+ }
42
+
45
43
  export async function handleSubmitResult(args: Record<string, unknown>) {
46
44
  const taskId = String(args.taskId);
47
- const body = {
48
- content: args.summary,
49
- deliverables: args.deliverables,
50
- proofs: args.proofs,
51
- summary: args.summary,
45
+
46
+ // Normalize outputs: ensure each has type field
47
+ const rawOutputs = (args.outputs as OutputItem[] | undefined) ?? [];
48
+ const outputs = rawOutputs.map(o => ({
49
+ name: o.name,
50
+ type: o.type ?? 'TEXT',
51
+ value: o.value,
52
+ }));
53
+
54
+ const body: Record<string, unknown> = {
55
+ content: String(args.summary),
56
+ summary: String(args.summary),
57
+ outputs,
52
58
  };
59
+ if (args.toolsUsed) body.toolsUsed = args.toolsUsed;
53
60
 
54
61
  const result = await client.post(`/tasks/${taskId}/submissions`, body);
55
62
  return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }] };