@voxos-ai/clink-mcp-server 0.4.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/LICENSE +21 -0
- package/README.md +382 -0
- package/dist/client.d.ts +285 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +414 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +95 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/add_checkpoint.d.ts +68 -0
- package/dist/tools/add_checkpoint.d.ts.map +1 -0
- package/dist/tools/add_checkpoint.js +108 -0
- package/dist/tools/add_checkpoint.js.map +1 -0
- package/dist/tools/archive_project.d.ts +23 -0
- package/dist/tools/archive_project.d.ts.map +1 -0
- package/dist/tools/archive_project.js +44 -0
- package/dist/tools/archive_project.js.map +1 -0
- package/dist/tools/cast_vote.d.ts +38 -0
- package/dist/tools/cast_vote.d.ts.map +1 -0
- package/dist/tools/cast_vote.js +148 -0
- package/dist/tools/cast_vote.js.map +1 -0
- package/dist/tools/check_inbox.d.ts +39 -0
- package/dist/tools/check_inbox.d.ts.map +1 -0
- package/dist/tools/check_inbox.js +99 -0
- package/dist/tools/check_inbox.js.map +1 -0
- package/dist/tools/claim_clink.d.ts +28 -0
- package/dist/tools/claim_clink.d.ts.map +1 -0
- package/dist/tools/claim_clink.js +51 -0
- package/dist/tools/claim_clink.js.map +1 -0
- package/dist/tools/complete_checkpoint.d.ts +33 -0
- package/dist/tools/complete_checkpoint.d.ts.map +1 -0
- package/dist/tools/complete_checkpoint.js +143 -0
- package/dist/tools/complete_checkpoint.js.map +1 -0
- package/dist/tools/complete_clink.d.ts +28 -0
- package/dist/tools/complete_clink.d.ts.map +1 -0
- package/dist/tools/complete_clink.js +50 -0
- package/dist/tools/complete_clink.js.map +1 -0
- package/dist/tools/complete_project.d.ts +23 -0
- package/dist/tools/complete_project.d.ts.map +1 -0
- package/dist/tools/complete_project.js +44 -0
- package/dist/tools/complete_project.js.map +1 -0
- package/dist/tools/create_milestone.d.ts +91 -0
- package/dist/tools/create_milestone.d.ts.map +1 -0
- package/dist/tools/create_milestone.js +114 -0
- package/dist/tools/create_milestone.js.map +1 -0
- package/dist/tools/create_project.d.ts +43 -0
- package/dist/tools/create_project.d.ts.map +1 -0
- package/dist/tools/create_project.js +77 -0
- package/dist/tools/create_project.js.map +1 -0
- package/dist/tools/create_proposal.d.ts +58 -0
- package/dist/tools/create_proposal.d.ts.map +1 -0
- package/dist/tools/create_proposal.js +102 -0
- package/dist/tools/create_proposal.js.map +1 -0
- package/dist/tools/delete_checkpoint.d.ts +28 -0
- package/dist/tools/delete_checkpoint.d.ts.map +1 -0
- package/dist/tools/delete_checkpoint.js +66 -0
- package/dist/tools/delete_checkpoint.js.map +1 -0
- package/dist/tools/finalize_proposal.d.ts +28 -0
- package/dist/tools/finalize_proposal.d.ts.map +1 -0
- package/dist/tools/finalize_proposal.js +86 -0
- package/dist/tools/finalize_proposal.js.map +1 -0
- package/dist/tools/get_clinks.d.ts +43 -0
- package/dist/tools/get_clinks.d.ts.map +1 -0
- package/dist/tools/get_clinks.js +110 -0
- package/dist/tools/get_clinks.js.map +1 -0
- package/dist/tools/get_milestone.d.ts +23 -0
- package/dist/tools/get_milestone.d.ts.map +1 -0
- package/dist/tools/get_milestone.js +77 -0
- package/dist/tools/get_milestone.js.map +1 -0
- package/dist/tools/get_my_permissions.d.ts +14 -0
- package/dist/tools/get_my_permissions.d.ts.map +1 -0
- package/dist/tools/get_my_permissions.js +80 -0
- package/dist/tools/get_my_permissions.js.map +1 -0
- package/dist/tools/get_project.d.ts +23 -0
- package/dist/tools/get_project.d.ts.map +1 -0
- package/dist/tools/get_project.js +88 -0
- package/dist/tools/get_project.js.map +1 -0
- package/dist/tools/get_proposal.d.ts +23 -0
- package/dist/tools/get_proposal.d.ts.map +1 -0
- package/dist/tools/get_proposal.js +102 -0
- package/dist/tools/get_proposal.js.map +1 -0
- package/dist/tools/index.d.ts +17 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +89 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/list_groups.d.ts +14 -0
- package/dist/tools/list_groups.d.ts.map +1 -0
- package/dist/tools/list_groups.js +35 -0
- package/dist/tools/list_groups.js.map +1 -0
- package/dist/tools/list_members.d.ts +23 -0
- package/dist/tools/list_members.d.ts.map +1 -0
- package/dist/tools/list_members.js +52 -0
- package/dist/tools/list_members.js.map +1 -0
- package/dist/tools/list_milestones.d.ts +34 -0
- package/dist/tools/list_milestones.d.ts.map +1 -0
- package/dist/tools/list_milestones.js +78 -0
- package/dist/tools/list_milestones.js.map +1 -0
- package/dist/tools/list_pending_verifications.d.ts +28 -0
- package/dist/tools/list_pending_verifications.d.ts.map +1 -0
- package/dist/tools/list_pending_verifications.js +83 -0
- package/dist/tools/list_pending_verifications.js.map +1 -0
- package/dist/tools/list_projects.d.ts +34 -0
- package/dist/tools/list_projects.d.ts.map +1 -0
- package/dist/tools/list_projects.js +92 -0
- package/dist/tools/list_projects.js.map +1 -0
- package/dist/tools/list_proposals.d.ts +34 -0
- package/dist/tools/list_proposals.d.ts.map +1 -0
- package/dist/tools/list_proposals.js +86 -0
- package/dist/tools/list_proposals.js.map +1 -0
- package/dist/tools/release_clink.d.ts +23 -0
- package/dist/tools/release_clink.d.ts.map +1 -0
- package/dist/tools/release_clink.js +42 -0
- package/dist/tools/release_clink.js.map +1 -0
- package/dist/tools/reopen_milestone.d.ts +23 -0
- package/dist/tools/reopen_milestone.d.ts.map +1 -0
- package/dist/tools/reopen_milestone.js +54 -0
- package/dist/tools/reopen_milestone.js.map +1 -0
- package/dist/tools/reopen_project.d.ts +23 -0
- package/dist/tools/reopen_project.d.ts.map +1 -0
- package/dist/tools/reopen_project.js +44 -0
- package/dist/tools/reopen_project.js.map +1 -0
- package/dist/tools/send_clink.d.ts +33 -0
- package/dist/tools/send_clink.d.ts.map +1 -0
- package/dist/tools/send_clink.js +64 -0
- package/dist/tools/send_clink.js.map +1 -0
- package/dist/tools/submit_feedback.d.ts +38 -0
- package/dist/tools/submit_feedback.d.ts.map +1 -0
- package/dist/tools/submit_feedback.js +93 -0
- package/dist/tools/submit_feedback.js.map +1 -0
- package/dist/tools/update_checkpoint.d.ts +63 -0
- package/dist/tools/update_checkpoint.d.ts.map +1 -0
- package/dist/tools/update_checkpoint.js +105 -0
- package/dist/tools/update_checkpoint.js.map +1 -0
- package/dist/tools/update_milestone.d.ts +33 -0
- package/dist/tools/update_milestone.d.ts.map +1 -0
- package/dist/tools/update_milestone.js +62 -0
- package/dist/tools/update_milestone.js.map +1 -0
- package/dist/tools/update_project.d.ts +43 -0
- package/dist/tools/update_project.d.ts.map +1 -0
- package/dist/tools/update_project.js +74 -0
- package/dist/tools/update_project.js.map +1 -0
- package/dist/types.d.ts +236 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +24 -0
- package/dist/types.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* release_clink tool - Release a claimed clink without completing
|
|
3
|
+
*/
|
|
4
|
+
export declare const definition: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: "object";
|
|
9
|
+
properties: {
|
|
10
|
+
clink_id: {
|
|
11
|
+
type: string;
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
required: string[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
interface ReleaseClinkArgs {
|
|
19
|
+
clink_id: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function handler(args: ReleaseClinkArgs): Promise<string>;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=release_clink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release_clink.d.ts","sourceRoot":"","sources":["../../src/tools/release_clink.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,UAAU;;;;;;;;;;;;;CAatB,CAAC;AAEF,UAAU,gBAAgB;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAuBrE"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* release_clink tool - Release a claimed clink without completing
|
|
3
|
+
*/
|
|
4
|
+
import { releaseClink } from '../client.js';
|
|
5
|
+
import { ClinkApiError } from '../types.js';
|
|
6
|
+
export const definition = {
|
|
7
|
+
name: 'release_clink',
|
|
8
|
+
description: 'Release a claimed clink without completing it. The clink returns to the pending queue for another worker to process. Use this when you cannot complete the task.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
clink_id: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'The clink ID to release',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
required: ['clink_id'],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export async function handler(args) {
|
|
21
|
+
try {
|
|
22
|
+
const { clink_id } = args;
|
|
23
|
+
if (!clink_id) {
|
|
24
|
+
return 'Please provide a clink_id to release.';
|
|
25
|
+
}
|
|
26
|
+
const clink = await releaseClink(clink_id);
|
|
27
|
+
return `Clink released successfully!\n\nClink ID: ${clink.clink_id}\nStatus: ${clink.status}\n\nThe clink is now available for other workers to claim.`;
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
if (error instanceof ClinkApiError) {
|
|
31
|
+
if (error.statusCode === 403) {
|
|
32
|
+
return `Cannot release: This clink is claimed by another user.`;
|
|
33
|
+
}
|
|
34
|
+
if (error.statusCode === 400) {
|
|
35
|
+
return `Cannot release: ${error.message}`;
|
|
36
|
+
}
|
|
37
|
+
return `Error: ${error.message}`;
|
|
38
|
+
}
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=release_clink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"release_clink.js","sourceRoot":"","sources":["../../src/tools/release_clink.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,kKAAkK;IAC/K,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yBAAyB;aACvC;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,CAAC;KACvB;CACF,CAAC;AAMF,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAAsB;IAClD,IAAI,CAAC;QACH,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QAE1B,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,uCAAuC,CAAC;QACjD,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,YAAY,CAAC,QAAQ,CAAC,CAAC;QAE3C,OAAO,6CAA6C,KAAK,CAAC,QAAQ,aAAa,KAAK,CAAC,MAAM,4DAA4D,CAAC;IAC1J,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACnC,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;gBAC7B,OAAO,wDAAwD,CAAC;YAClE,CAAC;YACD,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;gBAC7B,OAAO,mBAAmB,KAAK,CAAC,OAAO,EAAE,CAAC;YAC5C,CAAC;YACD,OAAO,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC;QACnC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* reopen_milestone tool - Re-open a closed milestone
|
|
3
|
+
*/
|
|
4
|
+
export declare const definition: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: "object";
|
|
9
|
+
properties: {
|
|
10
|
+
milestone_id: {
|
|
11
|
+
type: string;
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
required: string[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
interface ReopenMilestoneArgs {
|
|
19
|
+
milestone_id: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function handler(args: ReopenMilestoneArgs): Promise<string>;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=reopen_milestone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reopen_milestone.d.ts","sourceRoot":"","sources":["../../src/tools/reopen_milestone.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,UAAU;;;;;;;;;;;;;CAatB,CAAC;AAEF,UAAU,mBAAmB;IAC3B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAmCxE"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* reopen_milestone tool - Re-open a closed milestone
|
|
3
|
+
*/
|
|
4
|
+
import { reopenMilestone } from '../client.js';
|
|
5
|
+
import { ClinkApiError } from '../types.js';
|
|
6
|
+
export const definition = {
|
|
7
|
+
name: 'reopen_milestone',
|
|
8
|
+
description: 'Re-open a closed milestone. This allows adding new checkpoints or completing remaining ones.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
milestone_id: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'The milestone ID to reopen',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
required: ['milestone_id'],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export async function handler(args) {
|
|
21
|
+
try {
|
|
22
|
+
const { milestone_id } = args;
|
|
23
|
+
if (!milestone_id) {
|
|
24
|
+
return 'Please provide a milestone_id.';
|
|
25
|
+
}
|
|
26
|
+
const milestone = await reopenMilestone(milestone_id);
|
|
27
|
+
let output = `Milestone reopened!\n\n`;
|
|
28
|
+
output += `Title: ${milestone.title}\n`;
|
|
29
|
+
output += `Status: ${milestone.status}\n`;
|
|
30
|
+
output += `Progress: ${milestone.progress}\n\n`;
|
|
31
|
+
output += `Checkpoints:\n`;
|
|
32
|
+
for (const cp of milestone.checkpoints || []) {
|
|
33
|
+
const statusIcon = cp.status === 'completed' ? '[done]' : '[pending]';
|
|
34
|
+
let annotations = [];
|
|
35
|
+
if (cp.requires_proposal_id)
|
|
36
|
+
annotations.push('requires consensus');
|
|
37
|
+
if (cp.depends_on && cp.depends_on.length > 0)
|
|
38
|
+
annotations.push(`depends on: ${cp.depends_on.join(', ')}`);
|
|
39
|
+
const annotationStr = annotations.length > 0 ? ` [${annotations.join('; ')}]` : '';
|
|
40
|
+
output += ` ${cp.order}. ${cp.title} ${statusIcon}${annotationStr}\n`;
|
|
41
|
+
}
|
|
42
|
+
return output;
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (error instanceof ClinkApiError) {
|
|
46
|
+
if (error.message.includes('not closed')) {
|
|
47
|
+
return `Error: This milestone is not closed. Only closed milestones can be reopened.`;
|
|
48
|
+
}
|
|
49
|
+
return `Error: ${error.message}`;
|
|
50
|
+
}
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=reopen_milestone.js.map
|
|
@@ -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,oBAAoB;gBAAE,WAAW,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;YACpE,IAAI,EAAE,CAAC,UAAU,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;gBAAE,WAAW,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC3G,MAAM,aAAa,GAAG,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YACnF,MAAM,IAAI,KAAK,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,KAAK,IAAI,UAAU,GAAG,aAAa,IAAI,CAAC;QACzE,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACnC,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;gBACzC,OAAO,8EAA8E,CAAC;YACxF,CAAC;YACD,OAAO,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC;QACnC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* reopen_project tool - Reopen a completed or archived project
|
|
3
|
+
*/
|
|
4
|
+
export declare const definition: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: "object";
|
|
9
|
+
properties: {
|
|
10
|
+
project_id: {
|
|
11
|
+
type: string;
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
required: string[];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
interface ReopenProjectArgs {
|
|
19
|
+
project_id: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function handler(args: ReopenProjectArgs): Promise<string>;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=reopen_project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reopen_project.d.ts","sourceRoot":"","sources":["../../src/tools/reopen_project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,UAAU;;;;;;;;;;;;;CAatB,CAAC;AAEF,UAAU,iBAAiB;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BtE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* reopen_project tool - Reopen a completed or archived project
|
|
3
|
+
*/
|
|
4
|
+
import { reopenProject } from '../client.js';
|
|
5
|
+
import { ClinkApiError } from '../types.js';
|
|
6
|
+
export const definition = {
|
|
7
|
+
name: 'reopen_project',
|
|
8
|
+
description: 'Re-open a completed or archived project. This allows adding new milestones or continuing work.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
project_id: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'The project ID to reopen',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
required: ['project_id'],
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export async function handler(args) {
|
|
21
|
+
try {
|
|
22
|
+
const { project_id } = args;
|
|
23
|
+
if (!project_id) {
|
|
24
|
+
return 'Please provide a project_id.';
|
|
25
|
+
}
|
|
26
|
+
const project = await reopenProject(project_id);
|
|
27
|
+
let output = `Project reopened!\n\n`;
|
|
28
|
+
output += `Title: ${project.title}\n`;
|
|
29
|
+
output += `ID: ${project.project_id}\n`;
|
|
30
|
+
output += `Status: ${project.status}\n`;
|
|
31
|
+
if (project.reopened_at) {
|
|
32
|
+
output += `Reopened at: ${new Date(project.reopened_at).toLocaleString()}\n`;
|
|
33
|
+
}
|
|
34
|
+
output += `\nYou can now add milestones or continue work on this project.`;
|
|
35
|
+
return output;
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
if (error instanceof ClinkApiError) {
|
|
39
|
+
return `Error: ${error.message}`;
|
|
40
|
+
}
|
|
41
|
+
throw error;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=reopen_project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reopen_project.js","sourceRoot":"","sources":["../../src/tools/reopen_project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gGAAgG;IAC7G,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;SACF;QACD,QAAQ,EAAE,CAAC,YAAY,CAAC;KACzB;CACF,CAAC;AAMF,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAAuB;IACnD,IAAI,CAAC;QACH,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAE5B,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO,8BAA8B,CAAC;QACxC,CAAC;QAED,MAAM,OAAO,GAAG,MAAM,aAAa,CAAC,UAAU,CAAC,CAAC;QAEhD,IAAI,MAAM,GAAG,uBAAuB,CAAC;QACrC,MAAM,IAAI,UAAU,OAAO,CAAC,KAAK,IAAI,CAAC;QACtC,MAAM,IAAI,OAAO,OAAO,CAAC,UAAU,IAAI,CAAC;QACxC,MAAM,IAAI,WAAW,OAAO,CAAC,MAAM,IAAI,CAAC;QACxC,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;YACxB,MAAM,IAAI,gBAAgB,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC;QAC/E,CAAC;QACD,MAAM,IAAI,gEAAgE,CAAC;QAE3E,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACnC,OAAO,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC;QACnC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* send_clink tool - Send a clink to a group
|
|
3
|
+
*/
|
|
4
|
+
export declare const definition: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: "object";
|
|
9
|
+
properties: {
|
|
10
|
+
group: {
|
|
11
|
+
type: string;
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
content: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
for: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
required: string[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
interface SendClinkArgs {
|
|
27
|
+
group: string;
|
|
28
|
+
content: string;
|
|
29
|
+
for?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare function handler(args: SendClinkArgs): Promise<string>;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=send_clink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send_clink.d.ts","sourceRoot":"","sources":["../../src/tools/send_clink.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CAqBtB,CAAC;AAEF,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAyClE"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* send_clink tool - Send a clink to a group
|
|
3
|
+
*/
|
|
4
|
+
import { sendClink, resolveGroup } from '../client.js';
|
|
5
|
+
import { ClinkApiError } from '../types.js';
|
|
6
|
+
export const definition = {
|
|
7
|
+
name: 'send_clink',
|
|
8
|
+
description: 'Send a clink to a Clink group. Clinks are visible to all group members. Optionally address the clink to a specific recipient.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
group: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'The group slug (e.g., "backend-team") or group ID',
|
|
15
|
+
},
|
|
16
|
+
content: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'The clink content (max 4096 characters)',
|
|
19
|
+
},
|
|
20
|
+
for: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Optional: specific recipient (user_id or agent_profile_id). If set, only they see it in their inbox.',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
required: ['group', 'content'],
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
export async function handler(args) {
|
|
29
|
+
try {
|
|
30
|
+
const { group, content } = args;
|
|
31
|
+
if (!group || !content) {
|
|
32
|
+
return 'Please provide both a group and content for the clink.';
|
|
33
|
+
}
|
|
34
|
+
if (content.length > 4096) {
|
|
35
|
+
return `Clink too long (${content.length} chars). Maximum is 4096 characters.`;
|
|
36
|
+
}
|
|
37
|
+
// Resolve group slug to ID if needed
|
|
38
|
+
const groupId = await resolveGroup(group);
|
|
39
|
+
const clink = await sendClink(groupId, content, {
|
|
40
|
+
forRecipient: args.for,
|
|
41
|
+
});
|
|
42
|
+
const timestamp = new Date(clink.created_at).toLocaleString();
|
|
43
|
+
let output = `Clink sent successfully!\n\nSent at: ${timestamp}\nTo group: ${group}`;
|
|
44
|
+
if (args.for) {
|
|
45
|
+
output += `\nFor: ${args.for}`;
|
|
46
|
+
}
|
|
47
|
+
output += `\nStatus: ${clink.status}`;
|
|
48
|
+
output += `\nContent: ${content.substring(0, 200)}${content.length > 200 ? '...' : ''}`;
|
|
49
|
+
return output;
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
if (error instanceof ClinkApiError) {
|
|
53
|
+
if (error.statusCode === 403) {
|
|
54
|
+
return `You don't have permission to send clinks to this group. Make sure you're a member.`;
|
|
55
|
+
}
|
|
56
|
+
if (error.statusCode === 404) {
|
|
57
|
+
return `Group not found: "${args.group}". Use list_groups to see available groups.`;
|
|
58
|
+
}
|
|
59
|
+
return `Error: ${error.message}`;
|
|
60
|
+
}
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=send_clink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send_clink.js","sourceRoot":"","sources":["../../src/tools/send_clink.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,+HAA+H;IAC5I,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mDAAmD;aACjE;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;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;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACnC,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;gBAC7B,OAAO,oFAAoF,CAAC;YAC9F,CAAC;YACD,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;gBAC7B,OAAO,qBAAqB,IAAI,CAAC,KAAK,6CAA6C,CAAC;YACtF,CAAC;YACD,OAAO,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC;QACnC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* submit_feedback tool - Submit feedback to help improve Clink
|
|
3
|
+
*
|
|
4
|
+
* This tool allows agents to submit feedback directly to Voxos to help
|
|
5
|
+
* improve Clink services. Requires an API key with feedback permission enabled.
|
|
6
|
+
*/
|
|
7
|
+
import { FeedbackCategory } from '../types.js';
|
|
8
|
+
export declare const definition: {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: "object";
|
|
13
|
+
properties: {
|
|
14
|
+
category: {
|
|
15
|
+
type: string;
|
|
16
|
+
enum: FeedbackCategory[];
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
content: {
|
|
20
|
+
type: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
tool: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
required: string[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
interface SubmitFeedbackArgs {
|
|
32
|
+
category: string;
|
|
33
|
+
content: string;
|
|
34
|
+
tool?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare function handler(args: SubmitFeedbackArgs): Promise<string>;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=submit_feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submit_feedback.d.ts","sourceRoot":"","sources":["../../src/tools/submit_feedback.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAiB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI9D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;CA8BtB,CAAC;AAEF,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,CAyDvE"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* submit_feedback tool - Submit feedback to help improve Clink
|
|
3
|
+
*
|
|
4
|
+
* This tool allows agents to submit feedback directly to Voxos to help
|
|
5
|
+
* improve Clink services. Requires an API key with feedback permission enabled.
|
|
6
|
+
*/
|
|
7
|
+
import { submitFeedback } from '../client.js';
|
|
8
|
+
import { ClinkApiError } from '../types.js';
|
|
9
|
+
const VALID_CATEGORIES = ['bug', 'feature', 'improvement', 'other'];
|
|
10
|
+
export const definition = {
|
|
11
|
+
name: 'submit_feedback',
|
|
12
|
+
description: `Submit feedback to help improve Clink. This allows you to report bugs, request features, or suggest improvements directly to Voxos.
|
|
13
|
+
|
|
14
|
+
**Important:** Requires an API key with feedback permission enabled. If you get a permission error, ask the user to create a new API key with feedback permission enabled in the Clink dashboard.
|
|
15
|
+
|
|
16
|
+
Categories:
|
|
17
|
+
- bug: Report something that isn't working correctly
|
|
18
|
+
- feature: Request a new capability or feature
|
|
19
|
+
- improvement: Suggest enhancements to existing features
|
|
20
|
+
- other: General feedback that doesn't fit other categories`,
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
category: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
enum: VALID_CATEGORIES,
|
|
27
|
+
description: 'The type of feedback: bug, feature, improvement, or other',
|
|
28
|
+
},
|
|
29
|
+
content: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'The feedback content. Be specific and include relevant context (max 8192 characters)',
|
|
32
|
+
},
|
|
33
|
+
tool: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'Optional: The tool or feature this feedback relates to',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
required: ['category', 'content'],
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
export async function handler(args) {
|
|
42
|
+
try {
|
|
43
|
+
const { category, content, tool } = args;
|
|
44
|
+
// Validate category
|
|
45
|
+
if (!category || !VALID_CATEGORIES.includes(category)) {
|
|
46
|
+
return `Invalid category "${category}". Must be one of: ${VALID_CATEGORIES.join(', ')}`;
|
|
47
|
+
}
|
|
48
|
+
// Validate content
|
|
49
|
+
if (!content || content.trim().length === 0) {
|
|
50
|
+
return 'Please provide feedback content.';
|
|
51
|
+
}
|
|
52
|
+
if (content.length > 8192) {
|
|
53
|
+
return `Feedback too long (${content.length} characters). Maximum is 8192 characters.`;
|
|
54
|
+
}
|
|
55
|
+
// Build context
|
|
56
|
+
const context = {};
|
|
57
|
+
if (tool) {
|
|
58
|
+
context.tool = tool;
|
|
59
|
+
}
|
|
60
|
+
// Submit feedback
|
|
61
|
+
const result = await submitFeedback({
|
|
62
|
+
category: category,
|
|
63
|
+
content: content.trim(),
|
|
64
|
+
context: Object.keys(context).length > 0 ? context : undefined,
|
|
65
|
+
});
|
|
66
|
+
const time = new Date(result.submitted_at).toLocaleString();
|
|
67
|
+
return `Feedback submitted successfully!
|
|
68
|
+
|
|
69
|
+
ID: ${result.feedback_id}
|
|
70
|
+
Category: ${result.category}
|
|
71
|
+
Submitted: ${time}
|
|
72
|
+
|
|
73
|
+
Thank you for helping improve Clink! Your feedback will be reviewed by the Voxos team.`;
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
if (error instanceof ClinkApiError) {
|
|
77
|
+
if (error.statusCode === 403) {
|
|
78
|
+
return `Permission denied: ${error.message}
|
|
79
|
+
|
|
80
|
+
To submit feedback, you need an API key with feedback permission enabled. Ask the user to:
|
|
81
|
+
1. Go to the Clink dashboard (https://app.clink.voxos.ai)
|
|
82
|
+
2. Create a new API key with "Allow feedback submission" enabled
|
|
83
|
+
3. Update the CLINK_API_KEY environment variable`;
|
|
84
|
+
}
|
|
85
|
+
if (error.statusCode === 429) {
|
|
86
|
+
return `Rate limit reached: ${error.message}`;
|
|
87
|
+
}
|
|
88
|
+
return `Error: ${error.message}`;
|
|
89
|
+
}
|
|
90
|
+
throw error;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=submit_feedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submit_feedback.js","sourceRoot":"","sources":["../../src/tools/submit_feedback.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAoB,MAAM,aAAa,CAAC;AAE9D,MAAM,gBAAgB,GAAuB,CAAC,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;AAExF,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE;;;;;;;;4DAQ6C;IAC1D,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,gBAAgB;gBACtB,WAAW,EAAE,2DAA2D;aACzE;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sFAAsF;aACpG;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd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C,WAAW;YACZ,MAAM,CAAC,QAAQ;aACd,IAAI;;uFAEsE,CAAC;IACtF,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACnC,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;gBAC7B,OAAO,sBAAsB,KAAK,CAAC,OAAO;;;;;iDAKD,CAAC;YAC5C,CAAC;YACD,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;gBAC7B,OAAO,uBAAuB,KAAK,CAAC,OAAO,EAAE,CAAC;YAChD,CAAC;YACD,OAAO,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC;QACnC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* update_checkpoint tool - Update a checkpoint's metadata
|
|
3
|
+
*/
|
|
4
|
+
export declare const definition: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: "object";
|
|
9
|
+
properties: {
|
|
10
|
+
milestone_id: {
|
|
11
|
+
type: string;
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
order: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
title: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
description: {
|
|
23
|
+
type: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
depends_on: {
|
|
27
|
+
type: string;
|
|
28
|
+
items: {
|
|
29
|
+
oneOf: {
|
|
30
|
+
type: string;
|
|
31
|
+
}[];
|
|
32
|
+
};
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
git_branch_url: {
|
|
36
|
+
type: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
git_pr_url: {
|
|
40
|
+
type: string;
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
git_commit_url: {
|
|
44
|
+
type: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
required: string[];
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
interface UpdateCheckpointArgs {
|
|
52
|
+
milestone_id: string;
|
|
53
|
+
order: number;
|
|
54
|
+
title?: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
depends_on?: (number | string)[];
|
|
57
|
+
git_branch_url?: string;
|
|
58
|
+
git_pr_url?: string;
|
|
59
|
+
git_commit_url?: string;
|
|
60
|
+
}
|
|
61
|
+
export declare function handler(args: UpdateCheckpointArgs): Promise<string>;
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=update_checkpoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update_checkpoint.d.ts","sourceRoot":"","sources":["../../src/tools/update_checkpoint.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CtB,CAAC;AAEF,UAAU,oBAAoB;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAoDzE"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* update_checkpoint tool - Update a checkpoint's metadata
|
|
3
|
+
*/
|
|
4
|
+
import { updateCheckpoint } from '../client.js';
|
|
5
|
+
import { ClinkApiError } from '../types.js';
|
|
6
|
+
export const definition = {
|
|
7
|
+
name: 'update_checkpoint',
|
|
8
|
+
description: 'Update a checkpoint\'s title, description, dependencies, or git references (branch URL, PR URL, commit URL).',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
milestone_id: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'The milestone ID',
|
|
15
|
+
},
|
|
16
|
+
order: {
|
|
17
|
+
type: 'number',
|
|
18
|
+
description: 'The checkpoint order number (1-based)',
|
|
19
|
+
},
|
|
20
|
+
title: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'New checkpoint title (optional)',
|
|
23
|
+
},
|
|
24
|
+
description: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'New checkpoint description (optional)',
|
|
27
|
+
},
|
|
28
|
+
depends_on: {
|
|
29
|
+
type: 'array',
|
|
30
|
+
items: {
|
|
31
|
+
oneOf: [{ type: 'number' }, { type: 'string' }],
|
|
32
|
+
},
|
|
33
|
+
description: 'Dependencies. Use number for same-milestone (e.g., 1), or "milestone_id:order" for cross-milestone (e.g., "ms_abc123:4"). Same-milestone deps must reference earlier checkpoints. Cross-milestone deps are validated for cycles.',
|
|
34
|
+
},
|
|
35
|
+
git_branch_url: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: 'Git branch URL (full URL, e.g., https://github.com/org/repo/tree/feature/auth)',
|
|
38
|
+
},
|
|
39
|
+
git_pr_url: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'Git pull request URL (full URL, e.g., https://github.com/org/repo/pull/123)',
|
|
42
|
+
},
|
|
43
|
+
git_commit_url: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description: 'Git commit URL (full URL, e.g., https://github.com/org/repo/commit/abc123)',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
required: ['milestone_id', 'order'],
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
export async function handler(args) {
|
|
52
|
+
try {
|
|
53
|
+
const { milestone_id, order, title, description, depends_on, git_branch_url, git_pr_url, git_commit_url } = args;
|
|
54
|
+
if (!milestone_id) {
|
|
55
|
+
return 'Please provide a milestone_id.';
|
|
56
|
+
}
|
|
57
|
+
if (!order || order < 1) {
|
|
58
|
+
return 'Please provide a valid checkpoint order (1 or greater).';
|
|
59
|
+
}
|
|
60
|
+
// Build updates object
|
|
61
|
+
const updates = {};
|
|
62
|
+
if (title !== undefined)
|
|
63
|
+
updates.title = title;
|
|
64
|
+
if (description !== undefined)
|
|
65
|
+
updates.description = description;
|
|
66
|
+
if (depends_on !== undefined)
|
|
67
|
+
updates.depends_on = depends_on;
|
|
68
|
+
if (git_branch_url !== undefined)
|
|
69
|
+
updates.git_branch_url = git_branch_url;
|
|
70
|
+
if (git_pr_url !== undefined)
|
|
71
|
+
updates.git_pr_url = git_pr_url;
|
|
72
|
+
if (git_commit_url !== undefined)
|
|
73
|
+
updates.git_commit_url = git_commit_url;
|
|
74
|
+
if (Object.keys(updates).length === 0) {
|
|
75
|
+
return 'Please provide at least one field to update (title, description, depends_on, git_branch_url, git_pr_url, git_commit_url).';
|
|
76
|
+
}
|
|
77
|
+
const milestone = await updateCheckpoint(milestone_id, order, updates);
|
|
78
|
+
const updatedCheckpoint = milestone.checkpoints?.find(cp => cp.order === order);
|
|
79
|
+
let output = `Checkpoint ${order} updated!\n\n`;
|
|
80
|
+
output += `Milestone: ${milestone.title}\n`;
|
|
81
|
+
output += `Progress: ${milestone.progress}\n\n`;
|
|
82
|
+
if (updatedCheckpoint) {
|
|
83
|
+
output += `Updated checkpoint:\n`;
|
|
84
|
+
output += ` Title: ${updatedCheckpoint.title}\n`;
|
|
85
|
+
output += ` Description: ${updatedCheckpoint.description || '(none)'}\n`;
|
|
86
|
+
if (updatedCheckpoint.depends_on && updatedCheckpoint.depends_on.length > 0) {
|
|
87
|
+
output += ` Dependencies: ${updatedCheckpoint.depends_on.join(', ')}\n`;
|
|
88
|
+
}
|
|
89
|
+
if (updatedCheckpoint.git_branch_url)
|
|
90
|
+
output += ` Branch: ${updatedCheckpoint.git_branch_url}\n`;
|
|
91
|
+
if (updatedCheckpoint.git_pr_url)
|
|
92
|
+
output += ` PR: ${updatedCheckpoint.git_pr_url}\n`;
|
|
93
|
+
if (updatedCheckpoint.git_commit_url)
|
|
94
|
+
output += ` Commit: ${updatedCheckpoint.git_commit_url}\n`;
|
|
95
|
+
}
|
|
96
|
+
return output;
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
if (error instanceof ClinkApiError) {
|
|
100
|
+
return `Error: ${error.message}`;
|
|
101
|
+
}
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=update_checkpoint.js.map
|