@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,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* complete_checkpoint tool - Mark a checkpoint as completed
|
|
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
|
+
hil_expiry_seconds: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
required: string[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
interface CompleteCheckpointArgs {
|
|
27
|
+
milestone_id: string;
|
|
28
|
+
order: number;
|
|
29
|
+
hil_expiry_seconds?: number;
|
|
30
|
+
}
|
|
31
|
+
export declare function handler(args: CompleteCheckpointArgs): Promise<string>;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=complete_checkpoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complete_checkpoint.d.ts","sourceRoot":"","sources":["../../src/tools/complete_checkpoint.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CAqBtB,CAAC;AAEF,UAAU,sBAAsB;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC,CAsH3E"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* complete_checkpoint tool - Mark a checkpoint as completed
|
|
3
|
+
*/
|
|
4
|
+
import { completeCheckpoint } from '../client.js';
|
|
5
|
+
import { ClinkApiError, isHILRequired } from '../types.js';
|
|
6
|
+
export const definition = {
|
|
7
|
+
name: 'complete_checkpoint',
|
|
8
|
+
description: 'Mark a milestone checkpoint as completed. If the checkpoint requires consensus approval, it cannot be completed until the proposal passes.',
|
|
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
|
+
hil_expiry_seconds: {
|
|
21
|
+
type: 'number',
|
|
22
|
+
description: 'Optional: Custom expiry time for HIL verification email link in seconds (min 60, max 172800 = 48 hours). Default is 300 (5 minutes).',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
required: ['milestone_id', 'order'],
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
export async function handler(args) {
|
|
29
|
+
try {
|
|
30
|
+
const { milestone_id, order, hil_expiry_seconds } = args;
|
|
31
|
+
if (!milestone_id) {
|
|
32
|
+
return 'Please provide a milestone_id.';
|
|
33
|
+
}
|
|
34
|
+
if (!order || order < 1) {
|
|
35
|
+
return 'Please provide a valid checkpoint order (1 or greater).';
|
|
36
|
+
}
|
|
37
|
+
const response = await completeCheckpoint(milestone_id, order, hil_expiry_seconds);
|
|
38
|
+
// Check if HIL verification is required
|
|
39
|
+
if (isHILRequired(response)) {
|
|
40
|
+
const isPending = response.verification_status === 'pending';
|
|
41
|
+
const wasExpired = response.previous_verification_expired;
|
|
42
|
+
let output;
|
|
43
|
+
if (isPending) {
|
|
44
|
+
// Existing verification already in progress
|
|
45
|
+
output = `⏳ Human-in-the-Loop verification already pending.\n\n`;
|
|
46
|
+
output += `A verification email was already sent and is awaiting human approval.\n`;
|
|
47
|
+
output += `No new email was sent.\n\n`;
|
|
48
|
+
output += `Verification ID: ${response.verification_id}\n`;
|
|
49
|
+
if (response.expires_at) {
|
|
50
|
+
output += `Expires at: ${new Date(response.expires_at).toLocaleString()}\n`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
else if (wasExpired) {
|
|
54
|
+
// Previous verification expired, new one sent
|
|
55
|
+
output = `⏳ Previous verification expired - new email sent.\n\n`;
|
|
56
|
+
output += `The previous verification link expired without being used.\n`;
|
|
57
|
+
output += `A new verification email has been sent to the designated approver.\n\n`;
|
|
58
|
+
output += `Verification ID: ${response.verification_id}\n`;
|
|
59
|
+
if (response.expires_in_seconds) {
|
|
60
|
+
output += `Expires in: ${Math.floor(response.expires_in_seconds / 60)} minutes\n`;
|
|
61
|
+
}
|
|
62
|
+
if (response.sent_to && response.sent_to.length > 0) {
|
|
63
|
+
output += `Email sent to: ${response.sent_to.join(', ')}\n`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
// New verification created
|
|
68
|
+
output = `⏳ Human-in-the-Loop verification required.\n\n`;
|
|
69
|
+
output += `A verification email has been sent to the designated approver.\n`;
|
|
70
|
+
output += `The checkpoint will be marked complete once they verify via the email link.\n\n`;
|
|
71
|
+
output += `Verification ID: ${response.verification_id}\n`;
|
|
72
|
+
if (response.expires_in_seconds) {
|
|
73
|
+
output += `Expires in: ${Math.floor(response.expires_in_seconds / 60)} minutes\n`;
|
|
74
|
+
}
|
|
75
|
+
if (response.sent_to && response.sent_to.length > 0) {
|
|
76
|
+
output += `Email sent to: ${response.sent_to.join(', ')}\n`;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
output += `\nUse list_pending_verifications to see all pending HIL verifications.`;
|
|
80
|
+
return output;
|
|
81
|
+
}
|
|
82
|
+
// Normal completion - cast to milestone type
|
|
83
|
+
const milestone = response;
|
|
84
|
+
const completedCheckpoint = milestone.checkpoints?.find(cp => cp.order === order);
|
|
85
|
+
let output = `Checkpoint ${order} completed!\n\n`;
|
|
86
|
+
output += `Milestone: ${milestone.title}\n`;
|
|
87
|
+
output += `Progress: ${milestone.progress}\n`;
|
|
88
|
+
output += `Status: ${milestone.status}\n`;
|
|
89
|
+
if (completedCheckpoint) {
|
|
90
|
+
output += `\nCompleted checkpoint: ${completedCheckpoint.title}`;
|
|
91
|
+
if (completedCheckpoint.git_branch_url)
|
|
92
|
+
output += `\n Branch: ${completedCheckpoint.git_branch_url}`;
|
|
93
|
+
if (completedCheckpoint.git_pr_url)
|
|
94
|
+
output += `\n PR: ${completedCheckpoint.git_pr_url}`;
|
|
95
|
+
if (completedCheckpoint.git_commit_url)
|
|
96
|
+
output += `\n Commit: ${completedCheckpoint.git_commit_url}`;
|
|
97
|
+
}
|
|
98
|
+
if (milestone.status === 'closed') {
|
|
99
|
+
output += '\n\nAll checkpoints completed! Milestone is now closed.';
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
const remaining = (milestone.checkpoints || []).filter(cp => cp.status === 'pending');
|
|
103
|
+
if (remaining.length > 0) {
|
|
104
|
+
output += `\n\nRemaining checkpoints:\n`;
|
|
105
|
+
for (const cp of remaining) {
|
|
106
|
+
const blockers = [];
|
|
107
|
+
if (cp.requires_proposal_id && cp.proposal_status !== 'approved') {
|
|
108
|
+
blockers.push('waiting for consensus');
|
|
109
|
+
}
|
|
110
|
+
if (cp.depends_on && cp.depends_on.length > 0) {
|
|
111
|
+
const unmetDeps = cp.depends_on.filter(depOrder => {
|
|
112
|
+
const depCp = milestone.checkpoints?.find(c => c.order === depOrder);
|
|
113
|
+
return depCp?.status !== 'completed';
|
|
114
|
+
});
|
|
115
|
+
if (unmetDeps.length > 0) {
|
|
116
|
+
blockers.push(`depends on: ${unmetDeps.join(', ')}`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
const suffix = blockers.length > 0 ? ` [${blockers.join('; ')}]` : '';
|
|
120
|
+
output += ` ${cp.order}. ${cp.title}${suffix}\n`;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return output;
|
|
125
|
+
}
|
|
126
|
+
catch (error) {
|
|
127
|
+
if (error instanceof ClinkApiError) {
|
|
128
|
+
// Handle specific error cases
|
|
129
|
+
if (error.statusCode === 409) {
|
|
130
|
+
return `Error: This checkpoint has already been completed.`;
|
|
131
|
+
}
|
|
132
|
+
if (error.statusCode === 403 && error.message.includes('consensus')) {
|
|
133
|
+
return `Error: This checkpoint requires consensus approval before it can be completed. Vote on the associated proposal first.`;
|
|
134
|
+
}
|
|
135
|
+
if (error.statusCode === 403 && error.message.includes('depends on')) {
|
|
136
|
+
return `Error: ${error.message}. Complete the required checkpoint first.`;
|
|
137
|
+
}
|
|
138
|
+
return `Error: ${error.message}`;
|
|
139
|
+
}
|
|
140
|
+
throw error;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=complete_checkpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,KAAK,GAAG,MAAM,IAAI,CAAC;gBACpD,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACnC,8BAA8B;YAC9B,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;gBAC7B,OAAO,oDAAoD,CAAC;YAC9D,CAAC;YACD,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;gBACpE,OAAO,uHAAuH,CAAC;YACjI,CAAC;YACD,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;gBACrE,OAAO,UAAU,KAAK,CAAC,OAAO,2CAA2C,CAAC;YAC5E,CAAC;YACD,OAAO,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC;QACnC,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* complete_clink tool - Mark a claimed clink as completed
|
|
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
|
+
response: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
required: string[];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
interface CompleteClinkArgs {
|
|
23
|
+
clink_id: string;
|
|
24
|
+
response?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function handler(args: CompleteClinkArgs): Promise<string>;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=complete_clink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complete_clink.d.ts","sourceRoot":"","sources":["../../src/tools/complete_clink.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;CAiBtB,CAAC;AAEF,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CA6BtE"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* complete_clink tool - Mark a claimed clink as completed
|
|
3
|
+
*/
|
|
4
|
+
import { completeClink } from '../client.js';
|
|
5
|
+
import { ClinkApiError } from '../types.js';
|
|
6
|
+
export const definition = {
|
|
7
|
+
name: 'complete_clink',
|
|
8
|
+
description: 'Mark a claimed clink as completed. You must have claimed the clink first. Optionally send a reply to the original sender.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
clink_id: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'The clink ID to complete',
|
|
15
|
+
},
|
|
16
|
+
response: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'Optional reply clink to send to the original sender',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
required: ['clink_id'],
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
export async function handler(args) {
|
|
25
|
+
try {
|
|
26
|
+
const { clink_id, response } = args;
|
|
27
|
+
if (!clink_id) {
|
|
28
|
+
return 'Please provide a clink_id to complete.';
|
|
29
|
+
}
|
|
30
|
+
const result = await completeClink(clink_id, { response });
|
|
31
|
+
let output = `Clink completed successfully!\n\nClink ID: ${result.clink.clink_id}\nStatus: ${result.clink.status}`;
|
|
32
|
+
if (result.response_clink_id) {
|
|
33
|
+
output += `\n\nReply sent (ID: ${result.response_clink_id})`;
|
|
34
|
+
}
|
|
35
|
+
return output;
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
if (error instanceof ClinkApiError) {
|
|
39
|
+
if (error.statusCode === 403) {
|
|
40
|
+
return `Cannot complete: This clink is claimed by another user.`;
|
|
41
|
+
}
|
|
42
|
+
if (error.statusCode === 400) {
|
|
43
|
+
return `Cannot complete: ${error.message}. Make sure you have claimed the clink first.`;
|
|
44
|
+
}
|
|
45
|
+
return `Error: ${error.message}`;
|
|
46
|
+
}
|
|
47
|
+
throw error;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=complete_clink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complete_clink.js","sourceRoot":"","sources":["../../src/tools/complete_clink.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,2HAA2H;IACxI,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qDAAqD;aACnE;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,CAAC;KACvB;CACF,CAAC;AAOF,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAAuB;IACnD,IAAI,CAAC;QACH,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;QAEpC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,wCAAwC,CAAC;QAClD,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;QAE3D,IAAI,MAAM,GAAG,8CAA8C,MAAM,CAAC,KAAK,CAAC,QAAQ,aAAa,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAEnH,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC7B,MAAM,IAAI,uBAAuB,MAAM,CAAC,iBAAiB,GAAG,CAAC;QAC/D,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,aAAa,EAAE,CAAC;YACnC,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;gBAC7B,OAAO,yDAAyD,CAAC;YACnE,CAAC;YACD,IAAI,KAAK,CAAC,UAAU,KAAK,GAAG,EAAE,CAAC;gBAC7B,OAAO,oBAAoB,KAAK,CAAC,OAAO,+CAA+C,CAAC;YAC1F,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
|
+
* complete_project tool - Mark a project as completed
|
|
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 CompleteProjectArgs {
|
|
19
|
+
project_id: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function handler(args: CompleteProjectArgs): Promise<string>;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=complete_project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complete_project.d.ts","sourceRoot":"","sources":["../../src/tools/complete_project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,UAAU;;;;;;;;;;;;;CAatB,CAAC;AAEF,UAAU,mBAAmB;IAC3B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BxE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* complete_project tool - Mark a project as completed
|
|
3
|
+
*/
|
|
4
|
+
import { completeProject } from '../client.js';
|
|
5
|
+
import { ClinkApiError } from '../types.js';
|
|
6
|
+
export const definition = {
|
|
7
|
+
name: 'complete_project',
|
|
8
|
+
description: 'Mark a project as completed. Completed projects remain visible but indicate all work is done.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
project_id: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
description: 'The project ID',
|
|
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 completeProject(project_id);
|
|
27
|
+
let output = `Project marked as completed!\n\n`;
|
|
28
|
+
output += `Title: ${project.title}\n`;
|
|
29
|
+
output += `ID: ${project.project_id}\n`;
|
|
30
|
+
output += `Status: ${project.status}\n`;
|
|
31
|
+
if (project.completed_at) {
|
|
32
|
+
output += `Completed at: ${new Date(project.completed_at).toLocaleString()}\n`;
|
|
33
|
+
}
|
|
34
|
+
output += `\nUse reopen_project to re-open this project if needed.`;
|
|
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=complete_project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complete_project.js","sourceRoot":"","sources":["../../src/tools/complete_project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,+FAA+F;IAC5G,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gBAAgB;aAC9B;SACF;QACD,QAAQ,EAAE,CAAC,YAAY,CAAC;KACzB;CACF,CAAC;AAMF,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAAyB;IACrD,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,eAAe,CAAC,UAAU,CAAC,CAAC;QAElD,IAAI,MAAM,GAAG,kCAAkC,CAAC;QAChD,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,YAAY,EAAE,CAAC;YACzB,MAAM,IAAI,iBAAiB,IAAI,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC;QACjF,CAAC;QACD,MAAM,IAAI,yDAAyD,CAAC;QAEpE,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,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* create_milestone tool - Create a milestone with checkpoints
|
|
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
|
+
title: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
description: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
project_id: {
|
|
23
|
+
type: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
checkpoints: {
|
|
27
|
+
type: string;
|
|
28
|
+
description: string;
|
|
29
|
+
items: {
|
|
30
|
+
type: string;
|
|
31
|
+
properties: {
|
|
32
|
+
title: {
|
|
33
|
+
type: string;
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
description: {
|
|
37
|
+
type: string;
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
requires_consensus: {
|
|
41
|
+
type: string;
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
depends_on: {
|
|
45
|
+
type: string;
|
|
46
|
+
items: {
|
|
47
|
+
oneOf: {
|
|
48
|
+
type: string;
|
|
49
|
+
}[];
|
|
50
|
+
};
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
git_branch_url: {
|
|
54
|
+
type: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
git_pr_url: {
|
|
58
|
+
type: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
git_commit_url: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
required: string[];
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
required: string[];
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
interface CheckpointInput {
|
|
74
|
+
title: string;
|
|
75
|
+
description?: string;
|
|
76
|
+
requires_consensus?: boolean;
|
|
77
|
+
depends_on?: (number | string)[];
|
|
78
|
+
git_branch_url?: string;
|
|
79
|
+
git_pr_url?: string;
|
|
80
|
+
git_commit_url?: string;
|
|
81
|
+
}
|
|
82
|
+
interface CreateMilestoneArgs {
|
|
83
|
+
group: string;
|
|
84
|
+
title: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
project_id?: string;
|
|
87
|
+
checkpoints: CheckpointInput[];
|
|
88
|
+
}
|
|
89
|
+
export declare function handler(args: CreateMilestoneArgs): Promise<string>;
|
|
90
|
+
export {};
|
|
91
|
+
//# sourceMappingURL=create_milestone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_milestone.d.ts","sourceRoot":"","sources":["../../src/tools/create_milestone.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CtB,CAAC;AAEF,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,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,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,eAAe,EAAE,CAAC;CAChC;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CA+DxE"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* create_milestone tool - Create a milestone with checkpoints
|
|
3
|
+
*/
|
|
4
|
+
import { createMilestone, listGroups, resolveGroup } from '../client.js';
|
|
5
|
+
import { ClinkApiError } from '../types.js';
|
|
6
|
+
export const definition = {
|
|
7
|
+
name: 'create_milestone',
|
|
8
|
+
description: 'Create a milestone with checkpoints to track multi-step collaborative tasks. Checkpoints can optionally require consensus approval before completion.',
|
|
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
|
+
title: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'Milestone title',
|
|
19
|
+
},
|
|
20
|
+
description: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Milestone description (optional)',
|
|
23
|
+
},
|
|
24
|
+
project_id: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Project ID to assign this milestone to (optional). If not provided, uses the group\'s default "General" project.',
|
|
27
|
+
},
|
|
28
|
+
checkpoints: {
|
|
29
|
+
type: 'array',
|
|
30
|
+
description: 'List of checkpoints. Each checkpoint has: title (required), description, requires_consensus, depends_on, git_branch_url, git_pr_url, git_commit_url (all optional)',
|
|
31
|
+
items: {
|
|
32
|
+
type: 'object',
|
|
33
|
+
properties: {
|
|
34
|
+
title: { type: 'string', description: 'Checkpoint title' },
|
|
35
|
+
description: { type: 'string', description: 'Checkpoint description' },
|
|
36
|
+
requires_consensus: { type: 'boolean', description: 'If true, requires group vote before completion' },
|
|
37
|
+
depends_on: {
|
|
38
|
+
type: 'array',
|
|
39
|
+
items: { oneOf: [{ type: 'number' }, { type: 'string' }] },
|
|
40
|
+
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.',
|
|
41
|
+
},
|
|
42
|
+
git_branch_url: { type: 'string', description: 'Git branch URL (full URL, e.g., https://github.com/org/repo/tree/feature/auth)' },
|
|
43
|
+
git_pr_url: { type: 'string', description: 'Git pull request URL (full URL, e.g., https://github.com/org/repo/pull/123)' },
|
|
44
|
+
git_commit_url: { type: 'string', description: 'Git commit URL (full URL, e.g., https://github.com/org/repo/commit/abc123)' },
|
|
45
|
+
},
|
|
46
|
+
required: ['title'],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
required: ['group', 'title', 'checkpoints'],
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
export async function handler(args) {
|
|
54
|
+
try {
|
|
55
|
+
const { group, title, description, project_id, checkpoints } = args;
|
|
56
|
+
if (!group) {
|
|
57
|
+
const groups = await listGroups();
|
|
58
|
+
if (groups.length > 0) {
|
|
59
|
+
const groupList = groups.map((g) => `• ${g.slug} - "${g.name}"`).join('\n');
|
|
60
|
+
return `Please provide a group slug. Your groups:\n\n${groupList}`;
|
|
61
|
+
}
|
|
62
|
+
return 'Please provide a group slug. You are not a member of any groups.';
|
|
63
|
+
}
|
|
64
|
+
if (!title) {
|
|
65
|
+
return 'Please provide a milestone title.';
|
|
66
|
+
}
|
|
67
|
+
if (!checkpoints || checkpoints.length === 0) {
|
|
68
|
+
return 'Please provide at least one checkpoint.';
|
|
69
|
+
}
|
|
70
|
+
if (checkpoints.length > 50) {
|
|
71
|
+
return 'Maximum 50 checkpoints per milestone.';
|
|
72
|
+
}
|
|
73
|
+
// Resolve slug or ID to group ID
|
|
74
|
+
const groupId = await resolveGroup(group);
|
|
75
|
+
const milestone = await createMilestone(groupId, {
|
|
76
|
+
title,
|
|
77
|
+
description,
|
|
78
|
+
project_id,
|
|
79
|
+
checkpoints,
|
|
80
|
+
});
|
|
81
|
+
let output = `Milestone created successfully!\n\n`;
|
|
82
|
+
output += `Title: ${milestone.title}\n`;
|
|
83
|
+
output += `ID: ${milestone.milestone_id}\n`;
|
|
84
|
+
if (milestone.project_id) {
|
|
85
|
+
output += `Project ID: ${milestone.project_id}\n`;
|
|
86
|
+
}
|
|
87
|
+
output += `Status: ${milestone.status}\n`;
|
|
88
|
+
output += `Progress: ${milestone.progress}\n\n`;
|
|
89
|
+
output += `Checkpoints:\n`;
|
|
90
|
+
for (const cp of milestone.checkpoints || []) {
|
|
91
|
+
let annotations = [];
|
|
92
|
+
if (cp.requires_proposal_id)
|
|
93
|
+
annotations.push('requires consensus');
|
|
94
|
+
if (cp.depends_on && cp.depends_on.length > 0)
|
|
95
|
+
annotations.push(`depends on: ${cp.depends_on.join(', ')}`);
|
|
96
|
+
const annotationStr = annotations.length > 0 ? ` [${annotations.join('; ')}]` : '';
|
|
97
|
+
output += ` ${cp.order}. ${cp.title}${annotationStr} - ${cp.status}\n`;
|
|
98
|
+
if (cp.git_branch_url)
|
|
99
|
+
output += ` Branch: ${cp.git_branch_url}\n`;
|
|
100
|
+
if (cp.git_pr_url)
|
|
101
|
+
output += ` PR: ${cp.git_pr_url}\n`;
|
|
102
|
+
if (cp.git_commit_url)
|
|
103
|
+
output += ` Commit: ${cp.git_commit_url}\n`;
|
|
104
|
+
}
|
|
105
|
+
return output;
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
if (error instanceof ClinkApiError) {
|
|
109
|
+
return `Error: ${error.message}`;
|
|
110
|
+
}
|
|
111
|
+
throw error;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=create_milestone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_milestone.js","sourceRoot":"","sources":["../../src/tools/create_milestone.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,uJAAuJ;IACpK,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mDAAmD;aACjE;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iBAAiB;aAC/B;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kCAAkC;aAChD;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kHAAkH;aAChI;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,oKAAoK;gBACjL,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE;wBAC1D,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAA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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,GAAG,aAAa,MAAM,EAAE,CAAC,MAAM,IAAI,CAAC;YACxE,IAAI,EAAE,CAAC,cAAc;gBAAE,MAAM,IAAI,gBAAgB,EAAE,CAAC,cAAc,IAAI,CAAC;YACvE,IAAI,EAAE,CAAC,UAAU;gBAAE,MAAM,IAAI,YAAY,EAAE,CAAC,UAAU,IAAI,CAAC;YAC3D,IAAI,EAAE,CAAC,cAAc;gBAAE,MAAM,IAAI,gBAAgB,EAAE,CAAC,cAAc,IAAI,CAAC;QACzE,CAAC;QAED,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,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* create_project tool - Create a project in 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
|
+
title: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
description: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
slug: {
|
|
23
|
+
type: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
color: {
|
|
27
|
+
type: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
required: string[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
interface CreateProjectArgs {
|
|
35
|
+
group: string;
|
|
36
|
+
title: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
slug?: string;
|
|
39
|
+
color?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare function handler(args: CreateProjectArgs): Promise<string>;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=create_project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_project.d.ts","sourceRoot":"","sources":["../../src/tools/create_project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BtB,CAAC;AAEF,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CA6CtE"}
|