@teamso/teamso-mcp 0.0.0-stage → 1.2.1
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/CHANGELOG.md +136 -0
- package/LICENSE +21 -0
- package/README.md +506 -2
- package/dist/client.d.ts +215 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +797 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/index.d.ts +12 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +58 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/server.d.ts +28 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +58 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/account.d.ts +4 -0
- package/dist/tools/account.d.ts.map +1 -0
- package/dist/tools/account.js +34 -0
- package/dist/tools/account.js.map +1 -0
- package/dist/tools/api.d.ts +13 -0
- package/dist/tools/api.d.ts.map +1 -0
- package/dist/tools/api.js +982 -0
- package/dist/tools/api.js.map +1 -0
- package/dist/tools/approvals.d.ts +5 -0
- package/dist/tools/approvals.d.ts.map +1 -0
- package/dist/tools/approvals.js +120 -0
- package/dist/tools/approvals.js.map +1 -0
- package/dist/tools/communication.d.ts +4 -0
- package/dist/tools/communication.d.ts.map +1 -0
- package/dist/tools/communication.js +39 -0
- package/dist/tools/communication.js.map +1 -0
- package/dist/tools/employees.d.ts +5 -0
- package/dist/tools/employees.d.ts.map +1 -0
- package/dist/tools/employees.js +113 -0
- package/dist/tools/employees.js.map +1 -0
- package/dist/tools/help.d.ts +6 -0
- package/dist/tools/help.d.ts.map +1 -0
- package/dist/tools/help.js +171 -0
- package/dist/tools/help.js.map +1 -0
- package/dist/tools/index.d.ts +86 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +118 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/leave-support.d.ts +60 -0
- package/dist/tools/leave-support.d.ts.map +1 -0
- package/dist/tools/leave-support.js +185 -0
- package/dist/tools/leave-support.js.map +1 -0
- package/dist/tools/leave.d.ts +14 -0
- package/dist/tools/leave.d.ts.map +1 -0
- package/dist/tools/leave.js +388 -0
- package/dist/tools/leave.js.map +1 -0
- package/dist/tools/payroll.d.ts +5 -0
- package/dist/tools/payroll.d.ts.map +1 -0
- package/dist/tools/payroll.js +101 -0
- package/dist/tools/payroll.js.map +1 -0
- package/dist/tools/performance.d.ts +13 -0
- package/dist/tools/performance.d.ts.map +1 -0
- package/dist/tools/performance.js +592 -0
- package/dist/tools/performance.js.map +1 -0
- package/dist/tools/schemas.d.ts +2079 -0
- package/dist/tools/schemas.d.ts.map +1 -0
- package/dist/tools/schemas.js +460 -0
- package/dist/tools/schemas.js.map +1 -0
- package/dist/tools/shared.d.ts +20 -0
- package/dist/tools/shared.d.ts.map +1 -0
- package/dist/tools/shared.js +64 -0
- package/dist/tools/shared.js.map +1 -0
- package/dist/types.d.ts +545 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/api-endpoints.d.ts +130 -0
- package/dist/utils/api-endpoints.d.ts.map +1 -0
- package/dist/utils/api-endpoints.js +459 -0
- package/dist/utils/api-endpoints.js.map +1 -0
- package/dist/utils/dates.d.ts +27 -0
- package/dist/utils/dates.d.ts.map +1 -0
- package/dist/utils/dates.js +102 -0
- package/dist/utils/dates.js.map +1 -0
- package/dist/utils/format.d.ts +8 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +26 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/help-search.d.ts +25 -0
- package/dist/utils/help-search.d.ts.map +1 -0
- package/dist/utils/help-search.js +93 -0
- package/dist/utils/help-search.js.map +1 -0
- package/dist/utils/json-schema-dialect.d.ts +12 -0
- package/dist/utils/json-schema-dialect.d.ts.map +1 -0
- package/dist/utils/json-schema-dialect.js +146 -0
- package/dist/utils/json-schema-dialect.js.map +1 -0
- package/dist/utils/results.d.ts +27 -0
- package/dist/utils/results.d.ts.map +1 -0
- package/dist/utils/results.js +88 -0
- package/dist/utils/results.js.map +1 -0
- package/dist/utils/structured.d.ts +89 -0
- package/dist/utils/structured.d.ts.map +1 -0
- package/dist/utils/structured.js +307 -0
- package/dist/utils/structured.js.map +1 -0
- package/dist/utils/text.d.ts +12 -0
- package/dist/utils/text.d.ts.map +1 -0
- package/dist/utils/text.js +46 -0
- package/dist/utils/text.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +6 -0
- package/dist/version.js.map +1 -0
- package/package.json +86 -4
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TeamsoApiError } from '../client.js';
|
|
3
|
+
import { markdownTable } from '../utils/format.js';
|
|
4
|
+
import { ToolInputError, apiErrorResult, errorResult, toolResult, } from '../utils/results.js';
|
|
5
|
+
import { TARGETED_PERFORMANCE_KEY, toGoal, toPerformancePeriod, } from '../utils/structured.js';
|
|
6
|
+
import { normalizeSearchText } from '../utils/text.js';
|
|
7
|
+
import { evaluationApprovalOutputSchema, goalListOutputSchema, goalOutputSchema, goalsSentOutputSchema, performancePeriodsOutputSchema, } from './schemas.js';
|
|
8
|
+
import { ADDITIVE_WRITE, DESTRUCTIVE_WRITE, GOAL_STATUSES, READ_ONLY, SCALE_CRITERIA, idSchema, periodSchema, } from './shared.js';
|
|
9
|
+
const GOAL_PAGE_SIZE = 100;
|
|
10
|
+
const MAX_GOAL_PAGES = 5;
|
|
11
|
+
/** Permission that lets a user manage every employee's goals (`PerformanceConstants.PERMISSION_ADMIN`). */
|
|
12
|
+
const PERFORMANCE_ADMIN_PERMISSION = 'PERFORMANCE_MANAGEMENT_ADMIN';
|
|
13
|
+
/** Label the web app stores for the target score. */
|
|
14
|
+
const TARGETED_PERFORMANCE_TEXT = 'Hedeflenen Performans';
|
|
15
|
+
const GOAL_HINTS = {
|
|
16
|
+
byCode: {
|
|
17
|
+
GOAL_NOT_APPROVABLE: 'This goal is not waiting for approval.',
|
|
18
|
+
NOT_AUTHORIZED_TO_APPROVE: 'You are not the approver of this goal at its current step.',
|
|
19
|
+
NOT_AUTHORIZED: 'Only the goal owner (actual value) or their manager or an admin (manager value) can do this.',
|
|
20
|
+
NO_PENDING_GOALS: 'None of these goals is a draft (`PENDING`) goal of yours, so nothing was sent.',
|
|
21
|
+
GOAL_NOT_PENDING: 'Only draft (`PENDING`) goals can be sent for approval.',
|
|
22
|
+
NOT_YOUR_GOAL: 'You can only send your own goals for approval.',
|
|
23
|
+
GOAL_NOT_EVALUATING: 'Actual values can only be entered while the goal is being evaluated '
|
|
24
|
+
+ '(`EVALUATING` or `EVALUATED`), after the period\'s target entry window has closed.',
|
|
25
|
+
GOAL_NOT_IN_VALID_STATUS_FOR_MANAGER_VALUE: 'The manager value cannot be entered at this goal\'s current status.',
|
|
26
|
+
ACTUAL_VALUE_OR_TEXT_REQUIRED: 'Send either a numeric value or a text value.',
|
|
27
|
+
NO_GOALS_IN_APPROVAL_PROCESS: 'This employee has no goal evaluation waiting for approval in that period.',
|
|
28
|
+
USER_ID_REQUIRED: 'The goal owner (`user_id`) is required.',
|
|
29
|
+
INVALID_SCALE_CRITERION: `\`scale_criterion\` must be one of ${SCALE_CRITERIA.join(', ')}.`,
|
|
30
|
+
USER_NOT_FOUND: 'No such employee exists in your company. Find the id with `search_employees`.',
|
|
31
|
+
},
|
|
32
|
+
notFound: 'Teamso could not find that goal, or it is not visible to you.',
|
|
33
|
+
};
|
|
34
|
+
export function registerListPerformancePeriods(server, client) {
|
|
35
|
+
server.registerTool('list_performance_periods', {
|
|
36
|
+
title: 'List performance periods',
|
|
37
|
+
description: 'List the company\'s performance periods with their dates, target-entry window, who '
|
|
38
|
+
+ 'enters goals and the evaluation scale. The `title` is the `period` argument of the goal tools.',
|
|
39
|
+
inputSchema: {},
|
|
40
|
+
outputSchema: performancePeriodsOutputSchema,
|
|
41
|
+
annotations: READ_ONLY,
|
|
42
|
+
}, async (_args, extra) => {
|
|
43
|
+
try {
|
|
44
|
+
const settings = await client.getPerformanceSettings(extra.signal);
|
|
45
|
+
const periods = (settings?.periods ?? []).map(toPerformancePeriod);
|
|
46
|
+
if (periods.length === 0) {
|
|
47
|
+
return toolResult('No performance periods are defined yet.', { periods });
|
|
48
|
+
}
|
|
49
|
+
const table = markdownTable(['Period', 'Status', 'Dates', 'Target entry', 'Goals entered by'], periods.map(period => [
|
|
50
|
+
period.title,
|
|
51
|
+
period.status,
|
|
52
|
+
`${period.startDate ?? '?'} → ${period.endDate ?? '?'}`,
|
|
53
|
+
period.targetEntryOpen
|
|
54
|
+
? `open until ${period.targetEntryEndDate ?? '?'}`
|
|
55
|
+
: period.targetEntryLocked ? 'closed' : `opens ${period.targetEntryStartDate ?? '?'}`,
|
|
56
|
+
period.goalEntryBy,
|
|
57
|
+
]));
|
|
58
|
+
return toolResult(`## Performance periods\n\n${table}`, { periods });
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
return apiErrorResult(error);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
export function registerListMyGoals(server, client) {
|
|
66
|
+
server.registerTool('list_my_goals', {
|
|
67
|
+
title: 'List my goals',
|
|
68
|
+
description: 'List the caller\'s own goals in a performance period with status, weight, target '
|
|
69
|
+
+ 'and actual values, and what the caller can do next (`canEnterActualValue`). `canAddGoal` '
|
|
70
|
+
+ 'tells whether `create_user_goal` is allowed for the caller now.',
|
|
71
|
+
inputSchema: {
|
|
72
|
+
period: periodSchema,
|
|
73
|
+
},
|
|
74
|
+
outputSchema: goalListOutputSchema,
|
|
75
|
+
annotations: READ_ONLY,
|
|
76
|
+
}, async ({ period }, extra) => {
|
|
77
|
+
try {
|
|
78
|
+
const { title, pages } = await collectPeriodGoals(client, period, (periodName, page) => client.listMyGoals({ periodName, page, size: GOAL_PAGE_SIZE }, extra.signal), extra.signal);
|
|
79
|
+
const goals = pages.goals.map(toGoal);
|
|
80
|
+
const pending = goals.filter(goal => goal.status === 'PENDING');
|
|
81
|
+
return toolResult(goalListText(`My goals — ${title}`, goals, pages.canAddGoal), {
|
|
82
|
+
period: title,
|
|
83
|
+
canAddGoal: pages.canAddGoal,
|
|
84
|
+
goals,
|
|
85
|
+
total: goals.length,
|
|
86
|
+
...(pending.length
|
|
87
|
+
? {
|
|
88
|
+
nextAction: {
|
|
89
|
+
tool: 'send_goals_to_approval',
|
|
90
|
+
arguments: { goal_ids: pending.map(goal => goal.id) },
|
|
91
|
+
reason: 'Draft goals are not visible to the manager until they are sent for approval. Confirm with the user first.',
|
|
92
|
+
},
|
|
93
|
+
}
|
|
94
|
+
: {}),
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
return apiErrorResult(error, GOAL_HINTS);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
export function registerListTeamGoals(server, client) {
|
|
103
|
+
server.registerTool('list_team_goals', {
|
|
104
|
+
title: 'List my team\'s goals',
|
|
105
|
+
description: 'List the goals of the employees the caller manages or assigned goals to, in a '
|
|
106
|
+
+ 'performance period (drafts are not shown). Each goal tells what the caller can do: '
|
|
107
|
+
+ '`canApproveGoal` (`approve_goal`), `canReviseGoal` (`revise_and_approve_goal`) and '
|
|
108
|
+
+ '`canApproveEvaluation` (`approve_goal_evaluation`).',
|
|
109
|
+
inputSchema: {
|
|
110
|
+
period: periodSchema,
|
|
111
|
+
status: z.enum(GOAL_STATUSES).optional().describe('Only goals in this status.'),
|
|
112
|
+
},
|
|
113
|
+
outputSchema: goalListOutputSchema,
|
|
114
|
+
annotations: READ_ONLY,
|
|
115
|
+
}, async ({ period, status }, extra) => {
|
|
116
|
+
try {
|
|
117
|
+
const { title, pages } = await collectPeriodGoals(client, period, (periodName, page) => client.listAssignedGoals({ periodName, status, page, size: GOAL_PAGE_SIZE }, extra.signal), extra.signal);
|
|
118
|
+
const goals = pages.goals.map(toGoal);
|
|
119
|
+
const awaiting = goals.find(goal => goal.canApproveGoal);
|
|
120
|
+
return toolResult(goalListText(`Team goals — ${title}`, goals, pages.canAddGoal, true), {
|
|
121
|
+
period: title,
|
|
122
|
+
canAddGoal: pages.canAddGoal,
|
|
123
|
+
goals,
|
|
124
|
+
total: goals.length,
|
|
125
|
+
...(awaiting
|
|
126
|
+
? {
|
|
127
|
+
nextAction: {
|
|
128
|
+
tool: 'approve_goal',
|
|
129
|
+
arguments: { goal_id: awaiting.id },
|
|
130
|
+
reason: 'This goal is waiting for your approval. Confirm with the user, or use revise_and_approve_goal to change it first.',
|
|
131
|
+
},
|
|
132
|
+
}
|
|
133
|
+
: {}),
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
return apiErrorResult(error, GOAL_HINTS);
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
export function registerCreateUserGoal(server, client) {
|
|
142
|
+
server.registerTool('create_user_goal', {
|
|
143
|
+
title: 'Create a personal goal',
|
|
144
|
+
description: 'Create a personal goal in a performance period for the caller, or for a direct '
|
|
145
|
+
+ 'report (`user_id`; performance admins may set goals for anyone). The goal starts as a '
|
|
146
|
+
+ 'draft (`PENDING`); send it with '
|
|
147
|
+
+ '`send_goals_to_approval`. Check `canAddGoal` from `list_my_goals` / `list_team_goals` and '
|
|
148
|
+
+ 'keep the weights of a person\'s goals at 100 in total.',
|
|
149
|
+
inputSchema: {
|
|
150
|
+
period: periodSchema,
|
|
151
|
+
name: z.string().trim().min(1).max(255).describe('Goal title.'),
|
|
152
|
+
scale_criterion: z.enum(SCALE_CRITERIA)
|
|
153
|
+
.describe('How the goal is measured. `OTHER` is a free-text goal without weight or numeric target.'),
|
|
154
|
+
weight: z.number().gt(0).max(100).optional()
|
|
155
|
+
.describe('Weight in percent (required unless `scale_criterion` is `OTHER`).'),
|
|
156
|
+
target_value: z.number().optional()
|
|
157
|
+
.describe('Numeric target, e.g. 120 (required unless `scale_criterion` is `OTHER`).'),
|
|
158
|
+
currency: z.string().trim().regex(/^[A-Za-z]{3}$/).optional()
|
|
159
|
+
.describe('ISO currency code for `CURRENCY` goals, e.g. `TRY`.'),
|
|
160
|
+
other_text: z.string().trim().max(1000).optional()
|
|
161
|
+
.describe('Expected outcome, required for `OTHER` goals.'),
|
|
162
|
+
description: z.string().trim().max(2000).optional().describe('Details of the goal.'),
|
|
163
|
+
user_id: idSchema('Goal owner; defaults to the caller. Another employee must report to the caller '
|
|
164
|
+
+ 'directly. Use an id from `search_employees`.').optional(),
|
|
165
|
+
},
|
|
166
|
+
outputSchema: goalOutputSchema,
|
|
167
|
+
annotations: ADDITIVE_WRITE,
|
|
168
|
+
}, async (args, extra) => {
|
|
169
|
+
try {
|
|
170
|
+
const scale = args.scale_criterion;
|
|
171
|
+
if (scale === 'OTHER' && !args.other_text) {
|
|
172
|
+
throw new ToolInputError('`other_text` is required for `OTHER` goals.');
|
|
173
|
+
}
|
|
174
|
+
if (scale !== 'OTHER' && args.weight === undefined) {
|
|
175
|
+
throw new ToolInputError('`weight` is required unless `scale_criterion` is `OTHER`.');
|
|
176
|
+
}
|
|
177
|
+
if (scale !== 'OTHER' && (args.target_value === undefined || args.target_value === 0)) {
|
|
178
|
+
throw new ToolInputError('A non-zero `target_value` is required unless `scale_criterion` is `OTHER`.');
|
|
179
|
+
}
|
|
180
|
+
if (scale === 'CURRENCY' && !args.currency) {
|
|
181
|
+
throw new ToolInputError('`currency` is required for `CURRENCY` goals, e.g. `TRY`.');
|
|
182
|
+
}
|
|
183
|
+
const [me, settings] = await Promise.all([
|
|
184
|
+
client.getMe(extra.signal),
|
|
185
|
+
client.getPerformanceSettings(extra.signal),
|
|
186
|
+
]);
|
|
187
|
+
const period = resolvePeriod(settings?.periods ?? [], args.period);
|
|
188
|
+
const userId = args.user_id ?? me.id;
|
|
189
|
+
const forSelf = userId === me.id;
|
|
190
|
+
if (!forSelf)
|
|
191
|
+
await assertCanSetGoalsFor(client, me, userId, extra.signal);
|
|
192
|
+
const page = forSelf
|
|
193
|
+
? await client.listMyGoals({ periodName: period.title, size: 1 }, extra.signal)
|
|
194
|
+
: await client.listAssignedGoals({ periodName: period.title, size: 1 }, extra.signal);
|
|
195
|
+
if (page?.canAddGoal === false) {
|
|
196
|
+
return errorResult(forSelf
|
|
197
|
+
? `You cannot add goals for yourself in "${period.title}" (goal entry is closed, or goals are entered by managers).`
|
|
198
|
+
: `You cannot add goals for other employees in "${period.title}" (goal entry is closed, or you are not their manager).`);
|
|
199
|
+
}
|
|
200
|
+
const request = {
|
|
201
|
+
userId,
|
|
202
|
+
name: args.name,
|
|
203
|
+
...(args.description ? { description: args.description } : {}),
|
|
204
|
+
type: 'PERSONAL',
|
|
205
|
+
...(scale !== 'OTHER' ? { weight: args.weight } : {}),
|
|
206
|
+
periodName: period.title,
|
|
207
|
+
...periodDates(period),
|
|
208
|
+
targetValueDefinition: targetDefinition(period, scale, args),
|
|
209
|
+
};
|
|
210
|
+
const goal = toGoal(await client.createGoal(request, extra.signal));
|
|
211
|
+
const message = `Goal "${goal.name}" was created as ${goal.status}.`;
|
|
212
|
+
return toolResult(`## Goal created\n\n${goalLine(goal)}\n\n${message}`, {
|
|
213
|
+
goal,
|
|
214
|
+
message,
|
|
215
|
+
...(goal.status === 'PENDING' && forSelf
|
|
216
|
+
? {
|
|
217
|
+
nextAction: {
|
|
218
|
+
tool: 'send_goals_to_approval',
|
|
219
|
+
arguments: { goal_ids: [goal.id] },
|
|
220
|
+
reason: 'The goal is a draft until it is sent to the manager for approval.',
|
|
221
|
+
},
|
|
222
|
+
}
|
|
223
|
+
: {}),
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
catch (error) {
|
|
227
|
+
return apiErrorResult(error, GOAL_HINTS);
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
export function registerSendGoalsToApproval(server, client) {
|
|
232
|
+
server.registerTool('send_goals_to_approval', {
|
|
233
|
+
title: 'Send my goals for approval',
|
|
234
|
+
description: 'Send the caller\'s draft (`PENDING`) goals to their manager for approval. Other '
|
|
235
|
+
+ 'goals in the list are ignored.',
|
|
236
|
+
inputSchema: {
|
|
237
|
+
goal_ids: z.array(idSchema('Goal id.')).min(1).max(100)
|
|
238
|
+
.describe('Ids of the caller\'s draft goals, from `list_my_goals`.'),
|
|
239
|
+
},
|
|
240
|
+
outputSchema: goalsSentOutputSchema,
|
|
241
|
+
annotations: ADDITIVE_WRITE,
|
|
242
|
+
}, async ({ goal_ids }, extra) => {
|
|
243
|
+
try {
|
|
244
|
+
const response = await client.sendGoalsToApproval(goal_ids, extra.signal);
|
|
245
|
+
const goals = (Array.isArray(response.result) ? response.result : []).map(toGoal);
|
|
246
|
+
const message = `${goals.length || goal_ids.length} goal(s) sent for approval.`;
|
|
247
|
+
return toolResult(`## Goals sent for approval\n\n${goals.map(goalLine).join('\n') || message}\n\n${message}`, {
|
|
248
|
+
goals,
|
|
249
|
+
message,
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
catch (error) {
|
|
253
|
+
return apiErrorResult(error, GOAL_HINTS);
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
export function registerApproveGoal(server, client) {
|
|
258
|
+
server.registerTool('approve_goal', {
|
|
259
|
+
title: 'Approve a goal',
|
|
260
|
+
description: 'Approve a goal waiting for the caller\'s approval (`canApproveGoal` in '
|
|
261
|
+
+ '`list_team_goals`) without changes. Use `revise_and_approve_goal` to change it first.',
|
|
262
|
+
inputSchema: {
|
|
263
|
+
goal_id: idSchema('Goal id from `list_team_goals`.'),
|
|
264
|
+
},
|
|
265
|
+
outputSchema: goalOutputSchema,
|
|
266
|
+
annotations: ADDITIVE_WRITE,
|
|
267
|
+
}, async ({ goal_id }, extra) => {
|
|
268
|
+
try {
|
|
269
|
+
const response = await client.approveGoal(goal_id, extra.signal);
|
|
270
|
+
return goalMutationResult(response.result, goal_id, 'Goal approved', client, extra.signal);
|
|
271
|
+
}
|
|
272
|
+
catch (error) {
|
|
273
|
+
return apiErrorResult(error, GOAL_HINTS);
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
export function registerReviseAndApproveGoal(server, client) {
|
|
278
|
+
server.registerTool('revise_and_approve_goal', {
|
|
279
|
+
title: 'Revise and approve a goal',
|
|
280
|
+
description: 'Change a goal waiting for the caller\'s approval (`canReviseGoal`) and approve it '
|
|
281
|
+
+ 'in one step. Only the fields given are changed; the employee sees the revision.',
|
|
282
|
+
inputSchema: {
|
|
283
|
+
goal_id: idSchema('Goal id from `list_team_goals`.'),
|
|
284
|
+
name: z.string().trim().min(1).max(255).optional().describe('New goal title.'),
|
|
285
|
+
description: z.string().trim().max(2000).optional().describe('New details.'),
|
|
286
|
+
weight: z.number().gt(0).max(100).optional().describe('New weight in percent.'),
|
|
287
|
+
target_value: z.number().optional().describe('New numeric target.'),
|
|
288
|
+
},
|
|
289
|
+
outputSchema: goalOutputSchema,
|
|
290
|
+
annotations: DESTRUCTIVE_WRITE,
|
|
291
|
+
}, async ({ goal_id, name, description, weight, target_value }, extra) => {
|
|
292
|
+
try {
|
|
293
|
+
if (name === undefined && description === undefined && weight === undefined && target_value === undefined) {
|
|
294
|
+
throw new ToolInputError('Give at least one change (`name`, `description`, `weight` or `target_value`), '
|
|
295
|
+
+ 'or use `approve_goal` to approve without changes.');
|
|
296
|
+
}
|
|
297
|
+
const request = {
|
|
298
|
+
...(name !== undefined ? { name } : {}),
|
|
299
|
+
...(description !== undefined ? { description } : {}),
|
|
300
|
+
...(weight !== undefined ? { weight } : {}),
|
|
301
|
+
};
|
|
302
|
+
if (target_value !== undefined) {
|
|
303
|
+
const current = await client.getGoal(goal_id, extra.signal);
|
|
304
|
+
request.targetValueDefinition = withTargetValue(current.targetValueDefinition, target_value);
|
|
305
|
+
}
|
|
306
|
+
const response = await client.reviseAndApproveGoal(goal_id, request, extra.signal);
|
|
307
|
+
return goalMutationResult(response.result, goal_id, 'Goal revised and approved', client, extra.signal);
|
|
308
|
+
}
|
|
309
|
+
catch (error) {
|
|
310
|
+
return apiErrorResult(error, GOAL_HINTS);
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
export function registerUpdateGoalActualValue(server, client) {
|
|
315
|
+
server.registerTool('update_goal_actual_value', {
|
|
316
|
+
title: 'Enter my goal\'s actual value',
|
|
317
|
+
description: 'Enter or correct the achieved value of the caller\'s own goal during evaluation '
|
|
318
|
+
+ '(`canEnterActualValue`). Send `actual_value` for numeric goals or `actual_text` for '
|
|
319
|
+
+ '`OTHER` goals.',
|
|
320
|
+
inputSchema: {
|
|
321
|
+
goal_id: idSchema('Goal id from `list_my_goals`.'),
|
|
322
|
+
actual_value: z.number().optional().describe('Achieved numeric value.'),
|
|
323
|
+
actual_text: z.string().trim().min(1).max(2000).optional().describe('Achieved outcome for `OTHER` goals.'),
|
|
324
|
+
},
|
|
325
|
+
outputSchema: goalOutputSchema,
|
|
326
|
+
annotations: DESTRUCTIVE_WRITE,
|
|
327
|
+
}, async ({ goal_id, actual_value, actual_text }, extra) => {
|
|
328
|
+
try {
|
|
329
|
+
if ((actual_value === undefined) === (actual_text === undefined)) {
|
|
330
|
+
throw new ToolInputError('Send exactly one of `actual_value` or `actual_text`.');
|
|
331
|
+
}
|
|
332
|
+
await refreshPeriodStatuses(client, extra.signal);
|
|
333
|
+
const response = await client.updateGoalActualValue(goal_id, { actualValue: actual_value, actualText: actual_text }, extra.signal);
|
|
334
|
+
return goalMutationResult(response.result, goal_id, 'Actual value saved', client, extra.signal);
|
|
335
|
+
}
|
|
336
|
+
catch (error) {
|
|
337
|
+
return apiErrorResult(error, GOAL_HINTS);
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
export function registerUpdateManagerActualValue(server, client) {
|
|
342
|
+
server.registerTool('update_manager_actual_value', {
|
|
343
|
+
title: 'Enter the manager\'s actual value for a goal',
|
|
344
|
+
description: 'As the employee\'s direct manager or an admin, enter the achieved value you assess '
|
|
345
|
+
+ 'for the employee\'s goal during evaluation. Send `value` for numeric goals or `text` for '
|
|
346
|
+
+ '`OTHER` goals.',
|
|
347
|
+
inputSchema: {
|
|
348
|
+
goal_id: idSchema('Goal id from `list_team_goals`.'),
|
|
349
|
+
value: z.number().optional().describe('Achieved numeric value in the manager\'s assessment.'),
|
|
350
|
+
text: z.string().trim().min(1).max(2000).optional().describe('Assessment for `OTHER` goals.'),
|
|
351
|
+
},
|
|
352
|
+
outputSchema: goalOutputSchema,
|
|
353
|
+
annotations: DESTRUCTIVE_WRITE,
|
|
354
|
+
}, async ({ goal_id, value, text }, extra) => {
|
|
355
|
+
try {
|
|
356
|
+
if ((value === undefined) === (text === undefined)) {
|
|
357
|
+
throw new ToolInputError('Send exactly one of `value` or `text`.');
|
|
358
|
+
}
|
|
359
|
+
await refreshPeriodStatuses(client, extra.signal);
|
|
360
|
+
const response = await client.updateManagerActualValue(goal_id, { managerActualValue: value, managerActualText: text }, extra.signal);
|
|
361
|
+
return goalMutationResult(response.result, goal_id, 'Manager value saved', client, extra.signal);
|
|
362
|
+
}
|
|
363
|
+
catch (error) {
|
|
364
|
+
return apiErrorResult(error, GOAL_HINTS);
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
export function registerApproveGoalEvaluation(server, client) {
|
|
369
|
+
server.registerTool('approve_goal_evaluation', {
|
|
370
|
+
title: 'Approve an employee\'s goal evaluation',
|
|
371
|
+
description: 'Approve the goal evaluation of one employee for a period at the caller\'s approval '
|
|
372
|
+
+ 'step (`canApproveEvaluation` in `list_team_goals`). When it is the last step Teamso '
|
|
373
|
+
+ 'computes the final score.',
|
|
374
|
+
inputSchema: {
|
|
375
|
+
period: periodSchema,
|
|
376
|
+
user_id: idSchema('Employee id (the goal owner `userId` in `list_team_goals`).'),
|
|
377
|
+
},
|
|
378
|
+
outputSchema: evaluationApprovalOutputSchema,
|
|
379
|
+
annotations: ADDITIVE_WRITE,
|
|
380
|
+
}, async ({ period, user_id }, extra) => {
|
|
381
|
+
try {
|
|
382
|
+
const settings = await client.getPerformanceSettings(extra.signal);
|
|
383
|
+
const { title } = resolvePeriod(settings?.periods ?? [], period);
|
|
384
|
+
const response = await client.approveEvaluationProcess({ periodName: title, userId: user_id }, extra.signal);
|
|
385
|
+
const result = response.result ?? {};
|
|
386
|
+
const goals = (result.goals ?? []).map(toGoal);
|
|
387
|
+
const finalScore = typeof result.finalScore === 'number' ? result.finalScore : undefined;
|
|
388
|
+
const finalScoreText = result.finalScoreText || undefined;
|
|
389
|
+
const message = finalScore !== undefined
|
|
390
|
+
? `Evaluation approved. Final score: ${finalScore}${finalScoreText ? ` (${finalScoreText})` : ''}.`
|
|
391
|
+
: `Evaluation approved${result.newStatus ? `; goals are now ${result.newStatus}` : ''}.`;
|
|
392
|
+
return toolResult(`## Evaluation approved — ${title}\n\n${goals.map(goalLine).join('\n')}\n\n${message}`, {
|
|
393
|
+
period: title,
|
|
394
|
+
userId: user_id,
|
|
395
|
+
...(result.newStatus ? { newStatus: result.newStatus } : {}),
|
|
396
|
+
...(finalScore !== undefined ? { finalScore } : {}),
|
|
397
|
+
...(finalScoreText ? { finalScoreText } : {}),
|
|
398
|
+
goals,
|
|
399
|
+
message,
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
catch (error) {
|
|
403
|
+
return apiErrorResult(error, GOAL_HINTS);
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
async function collectGoals(load) {
|
|
408
|
+
const goals = [];
|
|
409
|
+
let canAddGoal = false;
|
|
410
|
+
for (let page = 0; page < MAX_GOAL_PAGES; page++) {
|
|
411
|
+
const result = await load(page);
|
|
412
|
+
if (page === 0)
|
|
413
|
+
canAddGoal = result?.canAddGoal === true;
|
|
414
|
+
goals.push(...(result?.goals ?? []));
|
|
415
|
+
if (!result?.pagination?.hasNext)
|
|
416
|
+
break;
|
|
417
|
+
}
|
|
418
|
+
return { goals, canAddGoal };
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Goals link to a period by its exact title, so a title that differs only in
|
|
422
|
+
* case or Turkish letters silently returns nothing. When the first query is
|
|
423
|
+
* empty, the title is resolved against the defined periods (an unknown title
|
|
424
|
+
* is an error) and the goals are loaded again under the exact title.
|
|
425
|
+
*/
|
|
426
|
+
async function collectPeriodGoals(client, period, load, signal) {
|
|
427
|
+
const pages = await collectGoals(page => load(period, page));
|
|
428
|
+
if (pages.goals.length > 0)
|
|
429
|
+
return { title: period, pages };
|
|
430
|
+
const settings = await client.getPerformanceSettings(signal);
|
|
431
|
+
const { title } = resolvePeriod(settings?.periods ?? [], period);
|
|
432
|
+
if (title === period)
|
|
433
|
+
return { title, pages };
|
|
434
|
+
return { title, pages: await collectGoals(page => load(title, page)) };
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* `POST /user-goal` does not check who the goal is for. Teamso's own rule
|
|
438
|
+
* (`/user-goal/assigned`, manager values) is: performance admins may set goals
|
|
439
|
+
* for anyone, other users only for their direct reports.
|
|
440
|
+
*/
|
|
441
|
+
async function assertCanSetGoalsFor(client, me, userId, signal) {
|
|
442
|
+
const isAdmin = (me.permissions ?? []).some(permission => permission.code === PERFORMANCE_ADMIN_PERMISSION);
|
|
443
|
+
if (isAdmin)
|
|
444
|
+
return;
|
|
445
|
+
let managerId;
|
|
446
|
+
try {
|
|
447
|
+
managerId = (await client.getUserSummary(userId, signal))?.managerId;
|
|
448
|
+
}
|
|
449
|
+
catch (error) {
|
|
450
|
+
if (error instanceof TeamsoApiError && (error.status === 403 || error.status === 404
|
|
451
|
+
|| error.messageCode === 'USER_NOT_FOUND' || error.messageCode === 'ITEM_NOT_FOUND')) {
|
|
452
|
+
managerId = undefined;
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
455
|
+
throw error;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
if (managerId !== me.id) {
|
|
459
|
+
throw new ToolInputError(`You can only create goals for yourself or your direct reports, and \`${userId}\` `
|
|
460
|
+
+ 'does not report to you. Ask a performance administrator, or check the id with `search_employees`.');
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
function resolvePeriod(periods, title) {
|
|
464
|
+
const exact = periods.find(period => period.title === title);
|
|
465
|
+
if (exact)
|
|
466
|
+
return exact;
|
|
467
|
+
const wanted = normalizeSearchText(title).trim();
|
|
468
|
+
const loose = periods.find(period => normalizeSearchText(period.title).trim() === wanted);
|
|
469
|
+
if (loose)
|
|
470
|
+
return loose;
|
|
471
|
+
const titles = periods.map(period => `"${period.title}"`).join(', ');
|
|
472
|
+
throw new ToolInputError(`No performance period is titled "${title}". `
|
|
473
|
+
+ `Available periods: ${titles || 'none'}. Use \`list_performance_periods\`.`);
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* The goal endpoints move goals into evaluation lazily when the performance
|
|
477
|
+
* settings are read after a target-entry window closes.
|
|
478
|
+
*/
|
|
479
|
+
async function refreshPeriodStatuses(client, signal) {
|
|
480
|
+
try {
|
|
481
|
+
await client.getPerformanceSettings(signal);
|
|
482
|
+
}
|
|
483
|
+
catch {
|
|
484
|
+
// Best effort: the update call reports the real problem.
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
function periodDates(period) {
|
|
488
|
+
const projected = toPerformancePeriod(period);
|
|
489
|
+
return {
|
|
490
|
+
...(projected.startDate ? { periodStartDate: projected.startDate } : {}),
|
|
491
|
+
...(projected.endDate ? { periodEndDate: projected.endDate } : {}),
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
/** Same shape the web app sends: the target score first, then the period's evaluation scale. */
|
|
495
|
+
function targetDefinition(period, scale, args) {
|
|
496
|
+
if (scale === 'OTHER') {
|
|
497
|
+
return { scaleCriterion: scale, otherText: args.other_text ?? '' };
|
|
498
|
+
}
|
|
499
|
+
const evaluationScale = toPerformancePeriod(period).evaluationScale;
|
|
500
|
+
const scores = [
|
|
501
|
+
{ text: TARGETED_PERFORMANCE_TEXT, value: args.target_value, key: TARGETED_PERFORMANCE_KEY },
|
|
502
|
+
...evaluationScale.map(item => ({ text: item.label, value: item.value ?? null })),
|
|
503
|
+
];
|
|
504
|
+
return {
|
|
505
|
+
scaleCriterion: scale,
|
|
506
|
+
...(scale === 'CURRENCY' && args.currency ? { currency: args.currency.toUpperCase() } : {}),
|
|
507
|
+
scores,
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
function withTargetValue(definition, targetValue) {
|
|
511
|
+
if (definition?.scaleCriterion === 'OTHER') {
|
|
512
|
+
throw new ToolInputError('`OTHER` goals have no numeric target; change `description` instead.');
|
|
513
|
+
}
|
|
514
|
+
const scores = [...(definition?.scores ?? [])];
|
|
515
|
+
const index = scores.findIndex(score => score.key === TARGETED_PERFORMANCE_KEY);
|
|
516
|
+
const target = { text: TARGETED_PERFORMANCE_TEXT, value: targetValue, key: TARGETED_PERFORMANCE_KEY };
|
|
517
|
+
if (index >= 0)
|
|
518
|
+
scores[index] = { ...scores[index], value: targetValue };
|
|
519
|
+
else
|
|
520
|
+
scores.unshift(target);
|
|
521
|
+
return { ...(definition ?? {}), scores };
|
|
522
|
+
}
|
|
523
|
+
async function goalMutationResult(result, goalId, heading, client, signal) {
|
|
524
|
+
const raw = result?.id ? result : await client.getGoal(goalId, signal);
|
|
525
|
+
const goal = toGoal(raw);
|
|
526
|
+
const message = `${heading}. The goal is now ${goal.status}.`;
|
|
527
|
+
return toolResult(`## ${heading}\n\n${goalLine(goal)}\n\n${message}`, { goal, message });
|
|
528
|
+
}
|
|
529
|
+
function goalLine(goal) {
|
|
530
|
+
const target = goal.targetValue !== undefined ? `target ${goal.targetValue}` : goal.otherText;
|
|
531
|
+
const parts = [
|
|
532
|
+
goal.status,
|
|
533
|
+
goal.weight !== undefined ? `weight ${goal.weight}%` : undefined,
|
|
534
|
+
target,
|
|
535
|
+
goal.actualValue !== undefined ? `actual ${goal.actualValue}` : goal.actualText,
|
|
536
|
+
goal.managerActualValue !== undefined
|
|
537
|
+
? `manager ${goal.managerActualValue}`
|
|
538
|
+
: goal.managerActualText ? `manager: ${goal.managerActualText}` : undefined,
|
|
539
|
+
goal.achievementPercentage !== undefined ? `achieved ${goal.achievementPercentage}%` : undefined,
|
|
540
|
+
goal.score !== undefined ? `score ${goal.score}` : undefined,
|
|
541
|
+
].filter(Boolean);
|
|
542
|
+
return `- **${goal.name}** (\`${goal.id}\`): ${parts.join(', ')}`;
|
|
543
|
+
}
|
|
544
|
+
function goalListText(heading, goals, canAddGoal, withOwner = false) {
|
|
545
|
+
if (goals.length === 0) {
|
|
546
|
+
return `## ${heading}\n\nNo goals yet.${canAddGoal ? ' You can add one with `create_user_goal`.' : ''}`;
|
|
547
|
+
}
|
|
548
|
+
const scored = goals.some(goal => goal.score !== undefined);
|
|
549
|
+
const headers = [
|
|
550
|
+
...(withOwner ? ['Employee'] : []),
|
|
551
|
+
'Goal', 'Id', 'Status', 'Weight', 'Target', 'Actual',
|
|
552
|
+
...(scored ? ['Score'] : []),
|
|
553
|
+
];
|
|
554
|
+
const rows = goals.map(goal => {
|
|
555
|
+
const row = [
|
|
556
|
+
goal.name,
|
|
557
|
+
`\`${goal.id}\``,
|
|
558
|
+
goal.status,
|
|
559
|
+
goal.weight !== undefined ? `${goal.weight}%` : undefined,
|
|
560
|
+
goal.targetValue ?? goal.otherText,
|
|
561
|
+
goal.actualValue ?? goal.actualText,
|
|
562
|
+
...(scored ? [goal.score] : []),
|
|
563
|
+
];
|
|
564
|
+
return withOwner ? [goal.userFullName, ...row] : row;
|
|
565
|
+
});
|
|
566
|
+
const notes = [];
|
|
567
|
+
if (!withOwner)
|
|
568
|
+
notes.push(`Total weight: ${goals.reduce((sum, goal) => sum + (goal.weight ?? 0), 0)}%`);
|
|
569
|
+
// Teamso writes the period score while the evaluation is still in approval (so the approver sees it);
|
|
570
|
+
// it is final only once every goal of that employee is COMPLETED.
|
|
571
|
+
const owners = new Map();
|
|
572
|
+
for (const goal of goals) {
|
|
573
|
+
const owner = goal.userFullName ?? goal.userId ?? '';
|
|
574
|
+
const entry = owners.get(owner) ?? { final: true };
|
|
575
|
+
entry.final = entry.final && goal.status === 'COMPLETED';
|
|
576
|
+
if (goal.finalScore !== undefined) {
|
|
577
|
+
entry.value = `${goal.finalScore}${goal.finalScoreText ? ` (${goal.finalScoreText})` : ''}`;
|
|
578
|
+
}
|
|
579
|
+
owners.set(owner, entry);
|
|
580
|
+
}
|
|
581
|
+
const periodScores = [...owners].filter(([, entry]) => entry.value !== undefined);
|
|
582
|
+
const scoreNote = (entry) => `${entry.value}${entry.final ? '' : ', pending approval'}`;
|
|
583
|
+
if (!withOwner && periodScores.length)
|
|
584
|
+
notes.push(`Period score: ${scoreNote(periodScores[0][1])}`);
|
|
585
|
+
if (withOwner && periodScores.length) {
|
|
586
|
+
notes.push(`Period scores: ${periodScores.map(([owner, entry]) => `${owner || 'employee'} ${scoreNote(entry)}`).join(', ')}`);
|
|
587
|
+
}
|
|
588
|
+
if (canAddGoal)
|
|
589
|
+
notes.push('New goals can be added.');
|
|
590
|
+
return `## ${heading}\n\n${markdownTable(headers, rows)}${notes.length ? `\n\n${notes.join(' · ')}` : ''}`;
|
|
591
|
+
}
|
|
592
|
+
//# sourceMappingURL=performance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance.js","sourceRoot":"","sources":["../../src/tools/performance.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAqB,MAAM,cAAc,CAAC;AAUjE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACL,cAAc,EACd,cAAc,EACd,WAAW,EACX,UAAU,GAEX,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EAC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