@specforge/mcp 2.0.1 → 2.0.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.
- package/dist/tools/core/admin.d.ts +7 -0
- package/dist/tools/core/admin.d.ts.map +1 -0
- package/dist/tools/core/admin.js +77 -0
- package/dist/tools/core/admin.js.map +1 -0
- package/dist/tools/core/bulk.d.ts +7 -0
- package/dist/tools/core/bulk.d.ts.map +1 -0
- package/dist/tools/core/bulk.js +125 -0
- package/dist/tools/core/bulk.js.map +1 -0
- package/dist/tools/core/context.d.ts +7 -0
- package/dist/tools/core/context.d.ts.map +1 -0
- package/dist/tools/core/context.js +75 -0
- package/dist/tools/core/context.js.map +1 -0
- package/dist/tools/core/dependency.d.ts +7 -0
- package/dist/tools/core/dependency.d.ts.map +1 -0
- package/dist/tools/core/dependency.js +74 -0
- package/dist/tools/core/dependency.js.map +1 -0
- package/dist/tools/core/epic.d.ts +7 -0
- package/dist/tools/core/epic.d.ts.map +1 -0
- package/dist/tools/core/epic.js +158 -0
- package/dist/tools/core/epic.js.map +1 -0
- package/dist/tools/core/help.d.ts +6 -0
- package/dist/tools/core/help.d.ts.map +1 -0
- package/dist/tools/core/help.js +112 -0
- package/dist/tools/core/help.js.map +1 -0
- package/dist/tools/core/index.d.ts +18 -0
- package/dist/tools/core/index.d.ts.map +1 -0
- package/dist/tools/core/index.js +20 -0
- package/dist/tools/core/index.js.map +1 -0
- package/dist/tools/core/job.d.ts +7 -0
- package/dist/tools/core/job.d.ts.map +1 -0
- package/dist/tools/core/job.js +50 -0
- package/dist/tools/core/job.js.map +1 -0
- package/dist/tools/core/link.d.ts +7 -0
- package/dist/tools/core/link.d.ts.map +1 -0
- package/dist/tools/core/link.js +76 -0
- package/dist/tools/core/link.js.map +1 -0
- package/dist/tools/core/lookup.d.ts +7 -0
- package/dist/tools/core/lookup.d.ts.map +1 -0
- package/dist/tools/core/lookup.js +107 -0
- package/dist/tools/core/lookup.js.map +1 -0
- package/dist/tools/core/pattern.d.ts +7 -0
- package/dist/tools/core/pattern.d.ts.map +1 -0
- package/dist/tools/core/pattern.js +61 -0
- package/dist/tools/core/pattern.js.map +1 -0
- package/dist/tools/core/project.d.ts +7 -0
- package/dist/tools/core/project.d.ts.map +1 -0
- package/dist/tools/core/project.js +60 -0
- package/dist/tools/core/project.js.map +1 -0
- package/dist/tools/core/router.d.ts +3 -0
- package/dist/tools/core/router.d.ts.map +1 -0
- package/dist/tools/core/router.js +16 -0
- package/dist/tools/core/router.js.map +1 -0
- package/dist/tools/core/session.d.ts +7 -0
- package/dist/tools/core/session.d.ts.map +1 -0
- package/dist/tools/core/session.js +117 -0
- package/dist/tools/core/session.js.map +1 -0
- package/dist/tools/core/specification.d.ts +7 -0
- package/dist/tools/core/specification.d.ts.map +1 -0
- package/dist/tools/core/specification.js +107 -0
- package/dist/tools/core/specification.js.map +1 -0
- package/dist/tools/core/ticket.d.ts +7 -0
- package/dist/tools/core/ticket.d.ts.map +1 -0
- package/dist/tools/core/ticket.js +213 -0
- package/dist/tools/core/ticket.js.map +1 -0
- package/dist/tools/core/types.d.ts +13 -0
- package/dist/tools/core/types.d.ts.map +1 -0
- package/dist/tools/core/types.js +3 -0
- package/dist/tools/core/types.js.map +1 -0
- package/dist/tools/core/workflow.d.ts +7 -0
- package/dist/tools/core/workflow.d.ts.map +1 -0
- package/dist/tools/core/workflow.js +63 -0
- package/dist/tools/core/workflow.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +49 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/types/index.d.ts +38 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +20 -0
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { ConsolidatedToolArgs, OperationHandler } from './types.js';
|
|
3
|
+
import { ApiClient } from '../../client/api-client.js';
|
|
4
|
+
export declare const adminTool: Tool;
|
|
5
|
+
export declare function createAdminOperations(apiClient: ApiClient): Record<string, OperationHandler>;
|
|
6
|
+
export declare function createAdminHandler(apiClient: ApiClient): (args: ConsolidatedToolArgs, userId: string) => Promise<unknown>;
|
|
7
|
+
//# sourceMappingURL=admin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../src/tools/core/admin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,eAAO,MAAM,SAAS,EAAE,IA+BvB,CAAC;AAUF,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CA+B5F;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,oEAGtD"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// mcp/src/tools/core/admin.ts
|
|
2
|
+
import { createOperationRouter } from './router.js';
|
|
3
|
+
export const adminTool = {
|
|
4
|
+
name: 'admin',
|
|
5
|
+
description: `Administrative utilities. Operations:
|
|
6
|
+
- reset_tickets: Reset ticket statuses
|
|
7
|
+
- validate_counts: Validate and fix count aggregations`,
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
operation: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
enum: ['reset_tickets', 'validate_counts'],
|
|
14
|
+
description: 'The operation to perform',
|
|
15
|
+
},
|
|
16
|
+
// For reset_tickets
|
|
17
|
+
specificationId: { type: 'string', description: 'Specification ID' },
|
|
18
|
+
epicId: { type: 'string', description: 'Epic ID' },
|
|
19
|
+
ticketIds: { type: 'array', items: { type: 'string' } },
|
|
20
|
+
fromTicketId: { type: 'string' },
|
|
21
|
+
allTickets: { type: 'boolean' },
|
|
22
|
+
targetStatus: { type: 'string' },
|
|
23
|
+
resetDependents: { type: 'boolean' },
|
|
24
|
+
includeCompleted: { type: 'boolean' },
|
|
25
|
+
preserveNotes: { type: 'boolean' },
|
|
26
|
+
clearTestResults: { type: 'boolean' },
|
|
27
|
+
// For validate_counts
|
|
28
|
+
projectId: { type: 'string', description: 'Project ID' },
|
|
29
|
+
repair: { type: 'boolean', description: 'Auto-repair issues' },
|
|
30
|
+
verbose: { type: 'boolean', description: 'Verbose output' },
|
|
31
|
+
},
|
|
32
|
+
required: ['operation'],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
function validateRequired(args, ...fields) {
|
|
36
|
+
for (const field of fields) {
|
|
37
|
+
if (args[field] === undefined || args[field] === null || args[field] === '') {
|
|
38
|
+
throw new Error(`${field} is required`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export function createAdminOperations(apiClient) {
|
|
43
|
+
return {
|
|
44
|
+
reset_tickets: async (args, _userId) => {
|
|
45
|
+
validateRequired(args, 'specificationId');
|
|
46
|
+
return await apiClient.call('reset_tickets', {
|
|
47
|
+
specificationId: args.specificationId,
|
|
48
|
+
ticketIds: args.ticketIds,
|
|
49
|
+
fromTicketId: args.fromTicketId,
|
|
50
|
+
epicId: args.epicId,
|
|
51
|
+
allTickets: args.allTickets,
|
|
52
|
+
targetStatus: args.targetStatus,
|
|
53
|
+
resetDependents: args.resetDependents,
|
|
54
|
+
includeCompleted: args.includeCompleted,
|
|
55
|
+
preserveNotes: args.preserveNotes,
|
|
56
|
+
clearTestResults: args.clearTestResults,
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
validate_counts: async (args, _userId) => {
|
|
60
|
+
if (!args.projectId && !args.specificationId && !args.epicId) {
|
|
61
|
+
throw new Error('Must specify projectId, specificationId, or epicId');
|
|
62
|
+
}
|
|
63
|
+
return await apiClient.call('validate_counts', {
|
|
64
|
+
projectId: args.projectId,
|
|
65
|
+
specificationId: args.specificationId,
|
|
66
|
+
epicId: args.epicId,
|
|
67
|
+
repair: args.repair,
|
|
68
|
+
verbose: args.verbose,
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export function createAdminHandler(apiClient) {
|
|
74
|
+
const operations = createAdminOperations(apiClient);
|
|
75
|
+
return createOperationRouter('admin', operations);
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=admin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.js","sourceRoot":"","sources":["../../../src/tools/core/admin.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAG9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAIpD,MAAM,CAAC,MAAM,SAAS,GAAS;IAC7B,IAAI,EAAE,OAAO;IACb,WAAW,EAAE;;uDAEwC;IACrD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,eAAe,EAAE,iBAAiB,CAAC;gBAC1C,WAAW,EAAE,0BAA0B;aACxC;YACD,oBAAoB;YACpB,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE;YACpE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE;YAClD,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;YACvD,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAChC,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;YAC/B,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAChC,eAAe,EAA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BAC3B,YAAY,EAAE,IAAI,CAAC,YAAY;gBAC/B,eAAe,EAAE,IAAI,CAAC,eAAe;gBACrC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;gBACvC,aAAa,EAAE,IAAI,CAAC,aAAa;gBACjC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;aACxC,CAAC,CAAC;QACL,CAAC;QAED,eAAe,EAAE,KAAK,EAAE,IAA0B,EAAE,OAAe,EAAE,EAAE;YACrE,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;gBAC7D,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;YACxE,CAAC;YACD,OAAO,MAAM,SAAS,CAAC,IAAI,CAAC,iBAAiB,EAAE;gBAC7C,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,eAAe,EAAE,IAAI,CAAC,eAAe;gBACrC,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,SAAoB;IACrD,MAAM,UAAU,GAAG,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACpD,OAAO,qBAAqB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { ConsolidatedToolArgs, OperationHandler } from './types.js';
|
|
3
|
+
import { ApiClient } from '../../client/api-client.js';
|
|
4
|
+
export declare const bulkTool: Tool;
|
|
5
|
+
export declare function createBulkOperations(apiClient: ApiClient): Record<string, OperationHandler>;
|
|
6
|
+
export declare function createBulkHandler(apiClient: ApiClient): (args: ConsolidatedToolArgs, userId: string) => Promise<unknown>;
|
|
7
|
+
//# sourceMappingURL=bulk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk.d.ts","sourceRoot":"","sources":["../../../src/tools/core/bulk.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,eAAO,MAAM,QAAQ,EAAE,IAqDtB,CAAC;AAUF,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CA0D3F;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,oEAGrD"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// mcp/src/tools/core/bulk.ts
|
|
2
|
+
import { createOperationRouter } from './router.js';
|
|
3
|
+
export const bulkTool = {
|
|
4
|
+
name: 'bulk',
|
|
5
|
+
description: `Bulk operations on multiple items. Operations:
|
|
6
|
+
- create_tickets: Create multiple tickets at once
|
|
7
|
+
- update_tickets: Update multiple tickets
|
|
8
|
+
- add_dependencies: Add multiple dependencies`,
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
operation: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
enum: ['create_tickets', 'update_tickets', 'add_dependencies'],
|
|
15
|
+
description: 'The operation to perform',
|
|
16
|
+
},
|
|
17
|
+
// For create_tickets
|
|
18
|
+
epicId: { type: 'string', description: 'Epic ID for create_tickets' },
|
|
19
|
+
tickets: {
|
|
20
|
+
type: 'array',
|
|
21
|
+
items: { type: 'object' },
|
|
22
|
+
description: 'Ticket data for create_tickets',
|
|
23
|
+
},
|
|
24
|
+
// For update_tickets
|
|
25
|
+
updates: {
|
|
26
|
+
type: 'array',
|
|
27
|
+
items: { type: 'object' },
|
|
28
|
+
description: 'Updates for update_tickets',
|
|
29
|
+
},
|
|
30
|
+
// For add_dependencies
|
|
31
|
+
dependencies: {
|
|
32
|
+
type: 'array',
|
|
33
|
+
items: {
|
|
34
|
+
type: 'object',
|
|
35
|
+
properties: {
|
|
36
|
+
ticketId: { type: 'string' },
|
|
37
|
+
dependsOnId: { type: 'string' },
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
description: 'Dependencies to add',
|
|
41
|
+
},
|
|
42
|
+
// Options
|
|
43
|
+
onError: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
enum: ['stop', 'continue', 'rollback'],
|
|
46
|
+
description: 'Error handling strategy',
|
|
47
|
+
},
|
|
48
|
+
skipCircularCheck: { type: 'boolean' },
|
|
49
|
+
validateDependencies: { type: 'boolean' },
|
|
50
|
+
atomic: { type: 'boolean' },
|
|
51
|
+
// Response options
|
|
52
|
+
responseMode: { type: 'string', enum: ['full', 'id-only', 'summary'] },
|
|
53
|
+
},
|
|
54
|
+
required: ['operation'],
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
function validateRequired(args, ...fields) {
|
|
58
|
+
for (const field of fields) {
|
|
59
|
+
if (args[field] === undefined || args[field] === null || args[field] === '') {
|
|
60
|
+
throw new Error(`${field} is required`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
export function createBulkOperations(apiClient) {
|
|
65
|
+
return {
|
|
66
|
+
create_tickets: async (args, _userId) => {
|
|
67
|
+
validateRequired(args, 'epicId', 'tickets');
|
|
68
|
+
if (!Array.isArray(args.tickets) || args.tickets.length === 0) {
|
|
69
|
+
throw new Error('tickets array is required and must not be empty');
|
|
70
|
+
}
|
|
71
|
+
// Validate each ticket has a title
|
|
72
|
+
const tickets = args.tickets;
|
|
73
|
+
for (let i = 0; i < tickets.length; i++) {
|
|
74
|
+
if (!tickets[i].title || typeof tickets[i].title !== 'string') {
|
|
75
|
+
throw new Error(`tickets[${i}].title is required and must be a string`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
return await apiClient.call('bulk_create_tickets', {
|
|
79
|
+
epicId: args.epicId,
|
|
80
|
+
tickets: args.tickets,
|
|
81
|
+
dependencies: args.dependencies,
|
|
82
|
+
onError: args.onError,
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
update_tickets: async (args, _userId) => {
|
|
86
|
+
if (!args.updates || !Array.isArray(args.updates) || args.updates.length === 0) {
|
|
87
|
+
throw new Error('updates array is required and must not be empty');
|
|
88
|
+
}
|
|
89
|
+
return await apiClient.call('bulk_update_tickets', {
|
|
90
|
+
updates: args.updates,
|
|
91
|
+
validateDependencies: args.validateDependencies,
|
|
92
|
+
atomic: args.atomic,
|
|
93
|
+
});
|
|
94
|
+
},
|
|
95
|
+
add_dependencies: async (args, _userId) => {
|
|
96
|
+
validateRequired(args, 'dependencies');
|
|
97
|
+
if (!Array.isArray(args.dependencies) || args.dependencies.length === 0) {
|
|
98
|
+
throw new Error('dependencies array is required and must not be empty');
|
|
99
|
+
}
|
|
100
|
+
// Validate each dependency has required fields
|
|
101
|
+
const deps = args.dependencies;
|
|
102
|
+
for (let i = 0; i < deps.length; i++) {
|
|
103
|
+
if (!deps[i].ticketId || typeof deps[i].ticketId !== 'string') {
|
|
104
|
+
throw new Error(`dependencies[${i}].ticketId is required`);
|
|
105
|
+
}
|
|
106
|
+
if (!deps[i].dependsOnId || typeof deps[i].dependsOnId !== 'string') {
|
|
107
|
+
throw new Error(`dependencies[${i}].dependsOnId is required`);
|
|
108
|
+
}
|
|
109
|
+
if (deps[i].ticketId === deps[i].dependsOnId) {
|
|
110
|
+
throw new Error(`dependencies[${i}]: ticket cannot depend on itself`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return await apiClient.call('bulk_add_dependencies', {
|
|
114
|
+
dependencies: args.dependencies,
|
|
115
|
+
skipCircularCheck: args.skipCircularCheck,
|
|
116
|
+
onError: args.onError,
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
export function createBulkHandler(apiClient) {
|
|
122
|
+
const operations = createBulkOperations(apiClient);
|
|
123
|
+
return createOperationRouter('bulk', operations);
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=bulk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk.js","sourceRoot":"","sources":["../../../src/tools/core/bulk.ts"],"names":[],"mappings":"AAAA,6BAA6B;AAG7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAIpD,MAAM,CAAC,MAAM,QAAQ,GAAS;IAC5B,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE;;;8CAG+B;IAC5C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,CAAC;gBAC9D,WAAW,EAAE,0BAA0B;aACxC;YACD,qBAAqB;YACrB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4BAA4B,EAAE;YACrE,OAAO,EAAE;gBACP,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,WAAW,EAAE,gCAAgC;aAC9C;YACD,qBAAqB;YACrB,OAAO,EAAE;gBACP,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,WAAW,EAAE,4BAA4B;aAC1C;YACD,uBAAuB;YACvB,YAAY,EAAE;gBACZ,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC5B,WAAW,EAAE,EAAE,I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,CAAC,SAAoB;IACpD,MAAM,UAAU,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;IACnD,OAAO,qBAAqB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { ConsolidatedToolArgs, OperationHandler } from './types.js';
|
|
3
|
+
import { ApiClient } from '../../client/api-client.js';
|
|
4
|
+
export declare const contextTool: Tool;
|
|
5
|
+
export declare function createContextOperations(apiClient: ApiClient): Record<string, OperationHandler>;
|
|
6
|
+
export declare function createContextHandler(apiClient: ApiClient): (args: ConsolidatedToolArgs, userId: string) => Promise<unknown>;
|
|
7
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/tools/core/context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,eAAO,MAAM,WAAW,EAAE,IA+BzB,CAAC;AAUF,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAgC9F;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,oEAGxD"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// mcp/src/tools/core/context.ts
|
|
2
|
+
import { createOperationRouter } from './router.js';
|
|
3
|
+
export const contextTool = {
|
|
4
|
+
name: 'context',
|
|
5
|
+
description: `Get and manage context. Operations:
|
|
6
|
+
- working: Get current working context (project scope)
|
|
7
|
+
- implementation: Get implementation context for a ticket
|
|
8
|
+
- set: Set/update current working context`,
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
operation: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
enum: ['working', 'implementation', 'set'],
|
|
15
|
+
description: 'The operation to perform',
|
|
16
|
+
},
|
|
17
|
+
// For set working context
|
|
18
|
+
projectId: { type: 'string', description: 'Project ID' },
|
|
19
|
+
specificationId: { type: 'string', description: 'Specification ID' },
|
|
20
|
+
epicId: { type: 'string', description: 'Epic ID' },
|
|
21
|
+
// For implementation context
|
|
22
|
+
ticketId: { type: 'string', description: 'Ticket ID for implementation context' },
|
|
23
|
+
depth: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
enum: ['minimal', 'standard', 'full'],
|
|
26
|
+
description: 'Context depth level',
|
|
27
|
+
},
|
|
28
|
+
// Response options
|
|
29
|
+
format: { type: 'string', enum: ['json', 'toon'] },
|
|
30
|
+
responseMode: { type: 'string', enum: ['full', 'minimal', 'summary', 'id-only'] },
|
|
31
|
+
},
|
|
32
|
+
required: ['operation'],
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
function validateRequired(args, ...fields) {
|
|
36
|
+
for (const field of fields) {
|
|
37
|
+
if (args[field] === undefined || args[field] === null || args[field] === '') {
|
|
38
|
+
throw new Error(`${field} is required`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export function createContextOperations(apiClient) {
|
|
43
|
+
return {
|
|
44
|
+
working: async (_args, _userId) => {
|
|
45
|
+
// Note: In actual implementation, this uses client.getSessionId()
|
|
46
|
+
// For the consolidated tool, we pass through to the API
|
|
47
|
+
return await apiClient.call('get_working_context', {});
|
|
48
|
+
},
|
|
49
|
+
implementation: async (args, _userId) => {
|
|
50
|
+
validateRequired(args, 'ticketId');
|
|
51
|
+
const depth = args.depth || 'standard';
|
|
52
|
+
return await apiClient.call('get_implementation_context', {
|
|
53
|
+
ticketId: args.ticketId,
|
|
54
|
+
depth,
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
set: async (args, _userId) => {
|
|
58
|
+
// At least one context field should be provided
|
|
59
|
+
if (!args.projectId && !args.specificationId && !args.epicId && !args.ticketId) {
|
|
60
|
+
throw new Error('At least one of projectId, specificationId, epicId, or ticketId is required');
|
|
61
|
+
}
|
|
62
|
+
return await apiClient.call('set_working_context', {
|
|
63
|
+
projectId: args.projectId,
|
|
64
|
+
specificationId: args.specificationId,
|
|
65
|
+
epicId: args.epicId,
|
|
66
|
+
ticketId: args.ticketId,
|
|
67
|
+
});
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export function createContextHandler(apiClient) {
|
|
72
|
+
const operations = createContextOperations(apiClient);
|
|
73
|
+
return createOperationRouter('context', operations);
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/tools/core/context.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAGhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAIpD,MAAM,CAAC,MAAM,WAAW,GAAS;IAC/B,IAAI,EAAE,SAAS;IACf,WAAW,EAAE;;;0CAG2B;IACxC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,gBAAgB,EAAE,KAAK,CAAC;gBAC1C,WAAW,EAAE,0BAA0B;aACxC;YACD,0BAA0B;YAC1B,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE;YACxD,eAAe,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE;YACpE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE;YAClD,6BAA6B;YAC7B,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AAU,CAAC;YACnD,OAAO,MAAM,SAAS,CAAC,IAAI,CAAC,4BAA4B,EAAE;gBACxD,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,KAAK;aACN,CAAC,CAAC;QACL,CAAC;QAED,GAAG,EAAE,KAAK,EAAE,IAA0B,EAAE,OAAe,EAAE,EAAE;YACzD,gDAAgD;YAChD,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAC/E,MAAM,IAAI,KAAK,CACb,6EAA6E,CAC9E,CAAC;YACJ,CAAC;YACD,OAAO,MAAM,SAAS,CAAC,IAAI,CAAC,qBAAqB,EAAE;gBACjD,SAAS,EAAE,IAAI,CAAC,SAAS;gBACzB,eAAe,EAAE,IAAI,CAAC,eAAe;gBACrC,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;aACxB,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,SAAoB;IACvD,MAAM,UAAU,GAAG,uBAAuB,CAAC,SAAS,CAAC,CAAC;IACtD,OAAO,qBAAqB,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { ConsolidatedToolArgs, OperationHandler } from './types.js';
|
|
3
|
+
import { ApiClient } from '../../client/api-client.js';
|
|
4
|
+
export declare const dependencyTool: Tool;
|
|
5
|
+
export declare function createDependencyOperations(apiClient: ApiClient): Record<string, OperationHandler>;
|
|
6
|
+
export declare function createDependencyHandler(apiClient: ApiClient): (args: ConsolidatedToolArgs, userId: string) => Promise<unknown>;
|
|
7
|
+
//# sourceMappingURL=dependency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependency.d.ts","sourceRoot":"","sources":["../../../src/tools/core/dependency.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,eAAO,MAAM,cAAc,EAAE,IA8B5B,CAAC;AAUF,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CA8BjG;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,SAAS,oEAG3D"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// mcp/src/tools/core/dependency.ts
|
|
2
|
+
import { createOperationRouter } from './router.js';
|
|
3
|
+
export const dependencyTool = {
|
|
4
|
+
name: 'dependency',
|
|
5
|
+
description: `Manage ticket dependencies. Operations:
|
|
6
|
+
- add: Add a dependency between tickets
|
|
7
|
+
- remove: Remove a dependency
|
|
8
|
+
- tree: Get dependency tree for a specification`,
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
operation: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
enum: ['add', 'remove', 'tree'],
|
|
15
|
+
description: 'The operation to perform',
|
|
16
|
+
},
|
|
17
|
+
// For add/remove
|
|
18
|
+
ticketId: { type: 'string', description: 'Ticket ID' },
|
|
19
|
+
dependsOnId: { type: 'string', description: 'Ticket that must complete first' },
|
|
20
|
+
dependencyId: { type: 'string', description: 'Dependency ID for remove' },
|
|
21
|
+
type: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
enum: ['blocks', 'requires', 'related'],
|
|
24
|
+
description: 'Dependency type',
|
|
25
|
+
},
|
|
26
|
+
// For tree
|
|
27
|
+
specificationId: { type: 'string', description: 'Specification ID for tree' },
|
|
28
|
+
// Response options
|
|
29
|
+
format: { type: 'string', enum: ['json', 'toon'] },
|
|
30
|
+
},
|
|
31
|
+
required: ['operation'],
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
function validateRequired(args, ...fields) {
|
|
35
|
+
for (const field of fields) {
|
|
36
|
+
if (args[field] === undefined || args[field] === null || args[field] === '') {
|
|
37
|
+
throw new Error(`${field} is required`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export function createDependencyOperations(apiClient) {
|
|
42
|
+
return {
|
|
43
|
+
add: async (args, _userId) => {
|
|
44
|
+
validateRequired(args, 'ticketId', 'dependsOnId');
|
|
45
|
+
return await apiClient.call('add_dependency', {
|
|
46
|
+
ticketId: args.ticketId,
|
|
47
|
+
dependsOnId: args.dependsOnId,
|
|
48
|
+
type: args.type,
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
remove: async (args, _userId) => {
|
|
52
|
+
// Either dependencyId or (ticketId + dependsOnId) required
|
|
53
|
+
if (!args.dependencyId && !args.ticketId) {
|
|
54
|
+
throw new Error('Either dependencyId or ticketId is required');
|
|
55
|
+
}
|
|
56
|
+
return await apiClient.call('remove_dependency', {
|
|
57
|
+
ticketId: args.ticketId,
|
|
58
|
+
dependsOnId: args.dependsOnId,
|
|
59
|
+
dependencyId: args.dependencyId,
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
tree: async (args, _userId) => {
|
|
63
|
+
validateRequired(args, 'specificationId');
|
|
64
|
+
return await apiClient.call('get_dependency_tree', {
|
|
65
|
+
specificationId: args.specificationId,
|
|
66
|
+
});
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export function createDependencyHandler(apiClient) {
|
|
71
|
+
const operations = createDependencyOperations(apiClient);
|
|
72
|
+
return createOperationRouter('dependency', operations);
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=dependency.js.map
|
|
@@ -0,0 +1 @@
|
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;AACJ,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,SAAoB;IAC1D,MAAM,UAAU,GAAG,0BAA0B,CAAC,SAAS,CAAC,CAAC;IACzD,OAAO,qBAAqB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { ConsolidatedToolArgs, OperationHandler } from './types.js';
|
|
3
|
+
import { ApiClient } from '../../client/api-client.js';
|
|
4
|
+
export declare const epicTool: Tool;
|
|
5
|
+
export declare function createEpicOperations(apiClient: ApiClient): Record<string, OperationHandler>;
|
|
6
|
+
export declare function createEpicHandler(apiClient: ApiClient): (args: ConsolidatedToolArgs, userId: string) => Promise<unknown>;
|
|
7
|
+
//# sourceMappingURL=epic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"epic.d.ts","sourceRoot":"","sources":["../../../src/tools/core/epic.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,eAAO,MAAM,QAAQ,EAAE,IAsFtB,CAAC;AAUF,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CA4D3F;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,oEAGrD"}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
// mcp/src/tools/core/epic.ts
|
|
2
|
+
import { createOperationRouter } from './router.js';
|
|
3
|
+
export const epicTool = {
|
|
4
|
+
name: 'epic',
|
|
5
|
+
description: `Manage epics. Operations:
|
|
6
|
+
- create: Create a new epic in a specification
|
|
7
|
+
- get: Get epic by ID
|
|
8
|
+
- update: Update epic fields
|
|
9
|
+
- list: List epics with filters
|
|
10
|
+
- lookup: Find epic by title or number`,
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
operation: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
enum: ['create', 'get', 'update', 'list', 'lookup'],
|
|
17
|
+
description: 'The operation to perform',
|
|
18
|
+
},
|
|
19
|
+
// For get/update
|
|
20
|
+
epicId: { type: 'string', description: 'Epic ID' },
|
|
21
|
+
// For create/list/lookup
|
|
22
|
+
specificationId: { type: 'string', description: 'Specification ID' },
|
|
23
|
+
// For create/update
|
|
24
|
+
title: { type: 'string' },
|
|
25
|
+
description: { type: 'string' },
|
|
26
|
+
objective: { type: 'string' },
|
|
27
|
+
status: { type: 'string', enum: ['pending', 'active', 'done', 'archived'] },
|
|
28
|
+
priority: { type: 'string', enum: ['critical', 'high', 'medium', 'low'] },
|
|
29
|
+
tags: { type: 'array', items: { type: 'string' } },
|
|
30
|
+
estimatedHours: { type: 'number' },
|
|
31
|
+
// For create - inline tickets
|
|
32
|
+
tickets: {
|
|
33
|
+
type: 'array',
|
|
34
|
+
description: 'Inline tickets to create with the epic',
|
|
35
|
+
items: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: {
|
|
38
|
+
title: { type: 'string', description: 'Ticket title (required)' },
|
|
39
|
+
description: { type: 'string', description: 'Ticket description' },
|
|
40
|
+
complexity: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
enum: ['small', 'medium', 'large', 'xlarge'],
|
|
43
|
+
description: 'Ticket complexity',
|
|
44
|
+
},
|
|
45
|
+
priority: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
enum: ['critical', 'high', 'medium', 'low'],
|
|
48
|
+
description: 'Ticket priority',
|
|
49
|
+
},
|
|
50
|
+
tags: {
|
|
51
|
+
type: 'array',
|
|
52
|
+
items: { type: 'string' },
|
|
53
|
+
description: 'Tags for the ticket',
|
|
54
|
+
},
|
|
55
|
+
estimatedHours: {
|
|
56
|
+
type: 'number',
|
|
57
|
+
description: 'Estimated hours to complete',
|
|
58
|
+
},
|
|
59
|
+
acceptanceCriteria: {
|
|
60
|
+
type: 'array',
|
|
61
|
+
items: { type: 'object' },
|
|
62
|
+
description: 'Acceptance criteria objects',
|
|
63
|
+
},
|
|
64
|
+
dependsOn: {
|
|
65
|
+
type: 'array',
|
|
66
|
+
items: { type: 'number' },
|
|
67
|
+
description: 'Array of ticket indexes this ticket depends on (0-indexed)',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
required: ['title'],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
// For lookup
|
|
74
|
+
number: { type: 'number', description: 'Epic number for lookup' },
|
|
75
|
+
// For list
|
|
76
|
+
filter: {
|
|
77
|
+
type: 'object',
|
|
78
|
+
properties: {
|
|
79
|
+
status: { type: 'string' },
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
// Response options
|
|
83
|
+
format: { type: 'string', enum: ['json', 'toon'] },
|
|
84
|
+
responseMode: { type: 'string', enum: ['full', 'minimal', 'summary', 'id-only'] },
|
|
85
|
+
include: { type: 'array', items: { type: 'string' } },
|
|
86
|
+
},
|
|
87
|
+
required: ['operation'],
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
function validateRequired(args, ...fields) {
|
|
91
|
+
for (const field of fields) {
|
|
92
|
+
if (args[field] === undefined || args[field] === null || args[field] === '') {
|
|
93
|
+
throw new Error(`${field} is required`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export function createEpicOperations(apiClient) {
|
|
98
|
+
return {
|
|
99
|
+
create: async (args, _userId) => {
|
|
100
|
+
validateRequired(args, 'specificationId', 'title', 'description', 'objective');
|
|
101
|
+
return await apiClient.call('create_epic', {
|
|
102
|
+
specificationId: args.specificationId,
|
|
103
|
+
title: args.title,
|
|
104
|
+
description: args.description,
|
|
105
|
+
objective: args.objective,
|
|
106
|
+
priority: args.priority,
|
|
107
|
+
tags: args.tags,
|
|
108
|
+
estimatedHours: args.estimatedHours,
|
|
109
|
+
tickets: args.tickets,
|
|
110
|
+
});
|
|
111
|
+
},
|
|
112
|
+
get: async (args, _userId) => {
|
|
113
|
+
validateRequired(args, 'epicId');
|
|
114
|
+
return await apiClient.call('get_epic', {
|
|
115
|
+
epicId: args.epicId,
|
|
116
|
+
include: args.include,
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
update: async (args, _userId) => {
|
|
120
|
+
validateRequired(args, 'epicId');
|
|
121
|
+
return await apiClient.call('update_epic', {
|
|
122
|
+
epicId: args.epicId,
|
|
123
|
+
title: args.title,
|
|
124
|
+
description: args.description,
|
|
125
|
+
objective: args.objective,
|
|
126
|
+
status: args.status,
|
|
127
|
+
priority: args.priority,
|
|
128
|
+
tags: args.tags,
|
|
129
|
+
estimatedHours: args.estimatedHours,
|
|
130
|
+
});
|
|
131
|
+
},
|
|
132
|
+
list: async (args, _userId) => {
|
|
133
|
+
validateRequired(args, 'specificationId');
|
|
134
|
+
const filter = args.filter;
|
|
135
|
+
return await apiClient.call('list_epics', {
|
|
136
|
+
specificationId: args.specificationId,
|
|
137
|
+
status: filter?.status || args.status,
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
lookup: async (args, _userId) => {
|
|
141
|
+
validateRequired(args, 'specificationId');
|
|
142
|
+
if (!args.title && args.number === undefined) {
|
|
143
|
+
throw new Error("Must provide either 'title' or 'number'");
|
|
144
|
+
}
|
|
145
|
+
return await apiClient.call('lookup_epic', {
|
|
146
|
+
specificationId: args.specificationId,
|
|
147
|
+
title: args.title,
|
|
148
|
+
number: args.number,
|
|
149
|
+
format: args.format,
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
export function createEpicHandler(apiClient) {
|
|
155
|
+
const operations = createEpicOperations(apiClient);
|
|
156
|
+
return createOperationRouter('epic', operations);
|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xC,eAAe,EAAE,IAAI,CAAC,eAAe;gBACrC,MAAM,EAAE,MAAM,EAAE,MAAM,IAAI,IAAI,CAAC,MAAM;aACtC,CAAC,CAAC;QACL,CAAC;QAED,MAAM,EAAE,KAAK,EAAE,IAA0B,EAAE,OAAe,EAAE,EAAE;YAC5D,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;YAC1C,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;gBAC7C,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;YAC7D,CAAC;YACD,OAAO,MAAM,SAAS,CAAC,IAAI,CAAC,aAAa,EAAE;gBACzC,eAAe,EAAE,IAAI,CAAC,eAAe;gBACrC,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,SAAoB;IACpD,MAAM,UAAU,GAAG,oBAAoB,CAAC,SAAS,CAAC,CAAC;IACnD,OAAO,qBAAqB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { ConsolidatedToolArgs, OperationHandler } from './types.js';
|
|
3
|
+
export declare const helpTool: Tool;
|
|
4
|
+
export declare function createHelpOperations(): Record<string, OperationHandler>;
|
|
5
|
+
export declare function createHelpHandler(): (args: ConsolidatedToolArgs, userId: string) => Promise<unknown>;
|
|
6
|
+
//# sourceMappingURL=help.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../../src/tools/core/help.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AA2CpE,eAAO,MAAM,QAAQ,EAAE,IAkBtB,CAAC;AAUF,wBAAgB,oBAAoB,IAAI,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAyCvE;AAED,wBAAgB,iBAAiB,qEAGhC"}
|