eassist-mcp 1.0.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.
@@ -0,0 +1,200 @@
1
+ export declare const actionToolSchemas: ({
2
+ name: string;
3
+ description: string;
4
+ inputSchema: {
5
+ type: "object";
6
+ properties: {
7
+ title: {
8
+ type: string;
9
+ description: string;
10
+ };
11
+ description: {
12
+ type: string;
13
+ description: string;
14
+ };
15
+ initiative: {
16
+ type: string;
17
+ description: string;
18
+ };
19
+ assignees: {
20
+ type: string;
21
+ items: {
22
+ type: string;
23
+ };
24
+ description: string;
25
+ };
26
+ priority: {
27
+ type: string;
28
+ enum: string[];
29
+ description: string;
30
+ };
31
+ due_date: {
32
+ type: string;
33
+ description: string;
34
+ };
35
+ action_id?: undefined;
36
+ status?: undefined;
37
+ action_ids?: undefined;
38
+ content?: undefined;
39
+ };
40
+ required: string[];
41
+ };
42
+ } | {
43
+ name: string;
44
+ description: string;
45
+ inputSchema: {
46
+ type: "object";
47
+ properties: {
48
+ action_id: {
49
+ type: string;
50
+ description: string;
51
+ };
52
+ title: {
53
+ type: string;
54
+ description?: undefined;
55
+ };
56
+ description: {
57
+ type: string;
58
+ description?: undefined;
59
+ };
60
+ status: {
61
+ type: string;
62
+ description: string;
63
+ };
64
+ priority: {
65
+ type: string;
66
+ enum: string[];
67
+ description?: undefined;
68
+ };
69
+ due_date: {
70
+ type: string;
71
+ description: string;
72
+ };
73
+ assignees: {
74
+ type: string;
75
+ items: {
76
+ type: string;
77
+ };
78
+ description: string;
79
+ };
80
+ initiative?: undefined;
81
+ action_ids?: undefined;
82
+ content?: undefined;
83
+ };
84
+ required: string[];
85
+ };
86
+ } | {
87
+ name: string;
88
+ description: string;
89
+ inputSchema: {
90
+ type: "object";
91
+ properties: {
92
+ action_id: {
93
+ type: string;
94
+ description: string;
95
+ };
96
+ title?: undefined;
97
+ description?: undefined;
98
+ initiative?: undefined;
99
+ assignees?: undefined;
100
+ priority?: undefined;
101
+ due_date?: undefined;
102
+ status?: undefined;
103
+ action_ids?: undefined;
104
+ content?: undefined;
105
+ };
106
+ required: string[];
107
+ };
108
+ } | {
109
+ name: string;
110
+ description: string;
111
+ inputSchema: {
112
+ type: "object";
113
+ properties: {
114
+ action_id: {
115
+ type: string;
116
+ description: string;
117
+ };
118
+ assignees: {
119
+ type: string;
120
+ items: {
121
+ type: string;
122
+ };
123
+ description: string;
124
+ };
125
+ title?: undefined;
126
+ description?: undefined;
127
+ initiative?: undefined;
128
+ priority?: undefined;
129
+ due_date?: undefined;
130
+ status?: undefined;
131
+ action_ids?: undefined;
132
+ content?: undefined;
133
+ };
134
+ required: string[];
135
+ };
136
+ } | {
137
+ name: string;
138
+ description: string;
139
+ inputSchema: {
140
+ type: "object";
141
+ properties: {
142
+ action_ids: {
143
+ type: string;
144
+ items: {
145
+ type: string;
146
+ };
147
+ description: string;
148
+ };
149
+ status: {
150
+ type: string;
151
+ description: string;
152
+ };
153
+ priority: {
154
+ type: string;
155
+ enum: string[];
156
+ description?: undefined;
157
+ };
158
+ assignees: {
159
+ type: string;
160
+ items: {
161
+ type: string;
162
+ };
163
+ description: string;
164
+ };
165
+ title?: undefined;
166
+ description?: undefined;
167
+ initiative?: undefined;
168
+ due_date?: undefined;
169
+ action_id?: undefined;
170
+ content?: undefined;
171
+ };
172
+ required: string[];
173
+ };
174
+ } | {
175
+ name: string;
176
+ description: string;
177
+ inputSchema: {
178
+ type: "object";
179
+ properties: {
180
+ action_id: {
181
+ type: string;
182
+ description: string;
183
+ };
184
+ content: {
185
+ type: string;
186
+ description: string;
187
+ };
188
+ title?: undefined;
189
+ description?: undefined;
190
+ initiative?: undefined;
191
+ assignees?: undefined;
192
+ priority?: undefined;
193
+ due_date?: undefined;
194
+ status?: undefined;
195
+ action_ids?: undefined;
196
+ };
197
+ required: string[];
198
+ };
199
+ })[];
200
+ export declare function handleActionTool(name: string, args: Record<string, unknown>): Promise<string>;
@@ -0,0 +1,207 @@
1
+ import { apiPost, apiPatch, apiDelete } from '../client.js';
2
+ import { fmtAction, fmtActionTable } from '../format.js';
3
+ import { resolveUser, resolveInitiative, clearCache } from '../resolve.js';
4
+ export const actionToolSchemas = [
5
+ {
6
+ name: 'create_action',
7
+ description: 'Create a new action. Can be linked to an initiative or standalone. Assignees are resolved by name/email.',
8
+ inputSchema: {
9
+ type: 'object',
10
+ properties: {
11
+ title: { type: 'string', description: 'Action title' },
12
+ description: { type: 'string', description: 'Optional description' },
13
+ initiative: { type: 'string', description: 'Initiative name or ID to link this action to (optional)' },
14
+ assignees: {
15
+ type: 'array',
16
+ items: { type: 'string' },
17
+ description: 'List of assignee names or emails (fuzzy matched)',
18
+ },
19
+ priority: { type: 'string', enum: ['urgent', 'high', 'medium', 'low'], description: 'Priority (default: medium)' },
20
+ due_date: { type: 'string', description: 'Due date in ISO format (e.g. 2025-06-01)' },
21
+ },
22
+ required: ['title'],
23
+ },
24
+ },
25
+ {
26
+ name: 'update_action',
27
+ description: 'Update an existing action — change title, description, status, priority, due date, or assignees.',
28
+ inputSchema: {
29
+ type: 'object',
30
+ properties: {
31
+ action_id: { type: 'string', description: 'Action ID' },
32
+ title: { type: 'string' },
33
+ description: { type: 'string' },
34
+ status: { type: 'string', description: 'open, in_progress, completed, cancelled' },
35
+ priority: { type: 'string', enum: ['urgent', 'high', 'medium', 'low'] },
36
+ due_date: { type: 'string', description: 'ISO date string' },
37
+ assignees: { type: 'array', items: { type: 'string' }, description: 'New list of assignees (replaces existing)' },
38
+ },
39
+ required: ['action_id'],
40
+ },
41
+ },
42
+ {
43
+ name: 'complete_action',
44
+ description: 'Mark an action as completed.',
45
+ inputSchema: {
46
+ type: 'object',
47
+ properties: {
48
+ action_id: { type: 'string', description: 'Action ID to mark complete' },
49
+ },
50
+ required: ['action_id'],
51
+ },
52
+ },
53
+ {
54
+ name: 'assign_action',
55
+ description: 'Assign (or reassign) an action to one or more people by name or email.',
56
+ inputSchema: {
57
+ type: 'object',
58
+ properties: {
59
+ action_id: { type: 'string', description: 'Action ID' },
60
+ assignees: {
61
+ type: 'array',
62
+ items: { type: 'string' },
63
+ description: 'Names or emails of assignees (fuzzy matched)',
64
+ },
65
+ },
66
+ required: ['action_id', 'assignees'],
67
+ },
68
+ },
69
+ {
70
+ name: 'delete_action',
71
+ description: 'Delete an action permanently. Use with care.',
72
+ inputSchema: {
73
+ type: 'object',
74
+ properties: {
75
+ action_id: { type: 'string', description: 'Action ID to delete' },
76
+ },
77
+ required: ['action_id'],
78
+ },
79
+ },
80
+ {
81
+ name: 'bulk_update_actions',
82
+ description: 'Update status or assignees on multiple actions at once.',
83
+ inputSchema: {
84
+ type: 'object',
85
+ properties: {
86
+ action_ids: { type: 'array', items: { type: 'string' }, description: 'List of action IDs' },
87
+ status: { type: 'string', description: 'New status for all actions' },
88
+ priority: { type: 'string', enum: ['urgent', 'high', 'medium', 'low'] },
89
+ assignees: { type: 'array', items: { type: 'string' }, description: 'New assignees (replaces existing on all)' },
90
+ },
91
+ required: ['action_ids'],
92
+ },
93
+ },
94
+ {
95
+ name: 'add_comment',
96
+ description: 'Add a comment/update to an action.',
97
+ inputSchema: {
98
+ type: 'object',
99
+ properties: {
100
+ action_id: { type: 'string', description: 'Action ID' },
101
+ content: { type: 'string', description: 'Comment text' },
102
+ },
103
+ required: ['action_id', 'content'],
104
+ },
105
+ },
106
+ ];
107
+ async function resolveAssignees(names) {
108
+ const ids = [];
109
+ const errors = [];
110
+ for (const name of names) {
111
+ const r = await resolveUser(name);
112
+ if ('error' in r)
113
+ errors.push(r.error);
114
+ else
115
+ ids.push(r.id);
116
+ }
117
+ return { ids, errors };
118
+ }
119
+ export async function handleActionTool(name, args) {
120
+ switch (name) {
121
+ case 'create_action': {
122
+ let initiativeId;
123
+ if (args.initiative) {
124
+ const resolved = await resolveInitiative(args.initiative);
125
+ if ('error' in resolved)
126
+ return resolved.error;
127
+ initiativeId = resolved.id;
128
+ }
129
+ const assigneeIds = [];
130
+ if (Array.isArray(args.assignees) && args.assignees.length) {
131
+ const { ids, errors } = await resolveAssignees(args.assignees);
132
+ if (errors.length)
133
+ return errors.join('\n');
134
+ assigneeIds.push(...ids);
135
+ }
136
+ const body = {
137
+ title: args.title,
138
+ description: args.description ?? null,
139
+ priority: args.priority ?? 'medium',
140
+ dueDate: args.due_date ?? null,
141
+ assigneeIds,
142
+ };
143
+ const url = initiativeId ? `/initiatives/${initiativeId}/actions` : '/actions';
144
+ const action = await apiPost(url, body);
145
+ clearCache();
146
+ return `Action created successfully.\n\n${fmtAction(action)}`;
147
+ }
148
+ case 'update_action': {
149
+ const body = {};
150
+ if (args.title !== undefined)
151
+ body.title = args.title;
152
+ if (args.description !== undefined)
153
+ body.description = args.description;
154
+ if (args.status !== undefined)
155
+ body.status = args.status;
156
+ if (args.priority !== undefined)
157
+ body.priority = args.priority;
158
+ if (args.due_date !== undefined)
159
+ body.dueDate = args.due_date;
160
+ if (Array.isArray(args.assignees) && args.assignees.length) {
161
+ const { ids, errors } = await resolveAssignees(args.assignees);
162
+ if (errors.length)
163
+ return errors.join('\n');
164
+ body.assigneeIds = ids;
165
+ }
166
+ const action = await apiPatch(`/actions/${args.action_id}`, body);
167
+ return `Action updated.\n\n${fmtAction(action)}`;
168
+ }
169
+ case 'complete_action': {
170
+ const action = await apiPatch(`/actions/${args.action_id}`, { status: 'completed' });
171
+ return `Marked as completed: **${action.title}**`;
172
+ }
173
+ case 'assign_action': {
174
+ const { ids, errors } = await resolveAssignees(args.assignees);
175
+ if (errors.length)
176
+ return errors.join('\n');
177
+ const action = await apiPatch(`/actions/${args.action_id}`, { assigneeIds: ids });
178
+ return `Assigned **${action.title}** to ${action.assignees.map(u => u.name).join(', ')}.`;
179
+ }
180
+ case 'delete_action': {
181
+ await apiDelete(`/actions/${args.action_id}`);
182
+ return `Action ${args.action_id} deleted.`;
183
+ }
184
+ case 'bulk_update_actions': {
185
+ const ids = args.action_ids;
186
+ const body = { actionIds: ids };
187
+ if (args.status)
188
+ body.status = args.status;
189
+ if (args.priority)
190
+ body.priority = args.priority;
191
+ if (Array.isArray(args.assignees) && args.assignees.length) {
192
+ const { ids: assigneeIds, errors } = await resolveAssignees(args.assignees);
193
+ if (errors.length)
194
+ return errors.join('\n');
195
+ body.assigneeIds = assigneeIds;
196
+ }
197
+ const result = await apiPatch('/actions/bulk', body);
198
+ return `Updated ${result.updated ?? ids.length} actions.\n\n${fmtActionTable(result.actions ?? [])}`;
199
+ }
200
+ case 'add_comment': {
201
+ await apiPost(`/actions/${args.action_id}/updates`, { content: args.content });
202
+ return `Comment added to action ${args.action_id}.`;
203
+ }
204
+ default:
205
+ return `Unknown tool: ${name}`;
206
+ }
207
+ }
@@ -0,0 +1,41 @@
1
+ export declare const initiativeToolSchemas: ({
2
+ name: string;
3
+ description: string;
4
+ inputSchema: {
5
+ type: "object";
6
+ properties: {
7
+ title: {
8
+ type: string;
9
+ description: string;
10
+ };
11
+ description: {
12
+ type: string;
13
+ description: string;
14
+ };
15
+ priority: {
16
+ type: string;
17
+ enum: string[];
18
+ description: string;
19
+ };
20
+ due_date: {
21
+ type: string;
22
+ description: string;
23
+ };
24
+ };
25
+ required: string[];
26
+ };
27
+ } | {
28
+ name: string;
29
+ description: string;
30
+ inputSchema: {
31
+ type: "object";
32
+ properties: {
33
+ title?: undefined;
34
+ description?: undefined;
35
+ priority?: undefined;
36
+ due_date?: undefined;
37
+ };
38
+ required?: undefined;
39
+ };
40
+ })[];
41
+ export declare function handleInitiativeTool(name: string, args: Record<string, unknown>): Promise<string>;
@@ -0,0 +1,68 @@
1
+ import { apiGet, apiPost } from '../client.js';
2
+ import { clearCache } from '../resolve.js';
3
+ export const initiativeToolSchemas = [
4
+ {
5
+ name: 'create_initiative',
6
+ description: 'Create a new initiative.',
7
+ inputSchema: {
8
+ type: 'object',
9
+ properties: {
10
+ title: { type: 'string', description: 'Initiative title' },
11
+ description: { type: 'string', description: 'Optional description' },
12
+ priority: { type: 'string', enum: ['urgent', 'high', 'medium', 'low'], description: 'Priority (default: medium)' },
13
+ due_date: { type: 'string', description: 'Due date in ISO format (e.g. 2025-12-31)' },
14
+ },
15
+ required: ['title'],
16
+ },
17
+ },
18
+ {
19
+ name: 'list_members',
20
+ description: 'List all members across all initiatives. Useful to look up names and emails before assigning actions.',
21
+ inputSchema: { type: 'object', properties: {} },
22
+ },
23
+ ];
24
+ export async function handleInitiativeTool(name, args) {
25
+ switch (name) {
26
+ case 'create_initiative': {
27
+ const body = {
28
+ title: args.title,
29
+ description: args.description ?? null,
30
+ priority: args.priority ?? 'medium',
31
+ dueDate: args.due_date ?? null,
32
+ };
33
+ const init = await apiPost('/initiatives', body);
34
+ clearCache();
35
+ return `Initiative created: **${init.title}** (ID: ${init.id})`;
36
+ }
37
+ case 'list_members': {
38
+ const data = await apiGet('/initiatives');
39
+ const seen = new Set();
40
+ const members = [];
41
+ for (const init of data.initiatives) {
42
+ try {
43
+ const m = await apiGet(`/initiatives/${init.id}/members`);
44
+ for (const member of m.members) {
45
+ if (!seen.has(member.user.id)) {
46
+ seen.add(member.user.id);
47
+ members.push({
48
+ id: member.user.id,
49
+ name: member.user.name,
50
+ email: member.user.email,
51
+ department: member.department,
52
+ });
53
+ }
54
+ }
55
+ }
56
+ catch { /* skip inaccessible */ }
57
+ }
58
+ if (members.length === 0)
59
+ return '_No members found._';
60
+ const header = '| Name | Email | Department |';
61
+ const sep = '|------|-------|------------|';
62
+ const rows = members.map(m => `| ${m.name} | ${m.email} | ${m.department ?? '—'} |`);
63
+ return `## Members (${members.length})\n\n${[header, sep, ...rows].join('\n')}`;
64
+ }
65
+ default:
66
+ return `Unknown tool: ${name}`;
67
+ }
68
+ }
@@ -0,0 +1,144 @@
1
+ export declare const reportingToolSchemas: ({
2
+ name: string;
3
+ description: string;
4
+ inputSchema: {
5
+ type: "object";
6
+ properties: {
7
+ limit: {
8
+ type: string;
9
+ description: string;
10
+ };
11
+ user?: undefined;
12
+ status?: undefined;
13
+ query?: undefined;
14
+ priority?: undefined;
15
+ action_id?: undefined;
16
+ initiative?: undefined;
17
+ };
18
+ required?: undefined;
19
+ };
20
+ } | {
21
+ name: string;
22
+ description: string;
23
+ inputSchema: {
24
+ type: "object";
25
+ properties: {
26
+ user: {
27
+ type: string;
28
+ description: string;
29
+ };
30
+ status: {
31
+ type: string;
32
+ description: string;
33
+ };
34
+ limit?: undefined;
35
+ query?: undefined;
36
+ priority?: undefined;
37
+ action_id?: undefined;
38
+ initiative?: undefined;
39
+ };
40
+ required: string[];
41
+ };
42
+ } | {
43
+ name: string;
44
+ description: string;
45
+ inputSchema: {
46
+ type: "object";
47
+ properties: {
48
+ limit?: undefined;
49
+ user?: undefined;
50
+ status?: undefined;
51
+ query?: undefined;
52
+ priority?: undefined;
53
+ action_id?: undefined;
54
+ initiative?: undefined;
55
+ };
56
+ required?: undefined;
57
+ };
58
+ } | {
59
+ name: string;
60
+ description: string;
61
+ inputSchema: {
62
+ type: "object";
63
+ properties: {
64
+ query: {
65
+ type: string;
66
+ description: string;
67
+ };
68
+ status: {
69
+ type: string;
70
+ description: string;
71
+ };
72
+ priority: {
73
+ type: string;
74
+ description: string;
75
+ };
76
+ limit: {
77
+ type: string;
78
+ description: string;
79
+ };
80
+ user?: undefined;
81
+ action_id?: undefined;
82
+ initiative?: undefined;
83
+ };
84
+ required: string[];
85
+ };
86
+ } | {
87
+ name: string;
88
+ description: string;
89
+ inputSchema: {
90
+ type: "object";
91
+ properties: {
92
+ action_id: {
93
+ type: string;
94
+ description: string;
95
+ };
96
+ limit?: undefined;
97
+ user?: undefined;
98
+ status?: undefined;
99
+ query?: undefined;
100
+ priority?: undefined;
101
+ initiative?: undefined;
102
+ };
103
+ required: string[];
104
+ };
105
+ } | {
106
+ name: string;
107
+ description: string;
108
+ inputSchema: {
109
+ type: "object";
110
+ properties: {
111
+ status: {
112
+ type: string;
113
+ description: string;
114
+ };
115
+ limit?: undefined;
116
+ user?: undefined;
117
+ query?: undefined;
118
+ priority?: undefined;
119
+ action_id?: undefined;
120
+ initiative?: undefined;
121
+ };
122
+ required?: undefined;
123
+ };
124
+ } | {
125
+ name: string;
126
+ description: string;
127
+ inputSchema: {
128
+ type: "object";
129
+ properties: {
130
+ initiative: {
131
+ type: string;
132
+ description: string;
133
+ };
134
+ limit?: undefined;
135
+ user?: undefined;
136
+ status?: undefined;
137
+ query?: undefined;
138
+ priority?: undefined;
139
+ action_id?: undefined;
140
+ };
141
+ required: string[];
142
+ };
143
+ })[];
144
+ export declare function handleReportingTool(name: string, args: Record<string, unknown>): Promise<string>;