@letpeoplework/lighthouse-mcp-core 1.7.1 → 1.8.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/dist/index.cjs +1930 -1660
- package/dist/index.d.cts +684 -549
- package/dist/index.d.ts +684 -549
- package/dist/index.js +1919 -1635
- package/package.json +9 -6
package/dist/index.d.cts
CHANGED
|
@@ -1,557 +1,692 @@
|
|
|
1
|
-
import { DeliveryMetricsHistory } from
|
|
2
|
-
import { McpServer } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
readonly dependsOn: "@letpeoplework/lighthouse-client";
|
|
7
|
-
readonly transports: readonly ["stdio", "streamable-http"];
|
|
8
|
-
};
|
|
9
|
-
declare const getMcpCorePackageContract: () => McpCorePackageContract;
|
|
1
|
+
import { DeliveryMetricsHistory, LighthouseApiResult, LighthouseClient, LighthouseVoterKeyStore, RefinementMomentFacts, RefinementWordingSource, TeamRefinement, UsageDataOccurrence, UsageDataQuestionAnswer, UsageDataStep, VotedRow } from "@letpeoplework/lighthouse-client";
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import "zod";
|
|
4
|
+
import { ElicitRequestFormParams, ElicitResult } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
+
//#region src/toolResult.d.ts
|
|
10
6
|
type McpToolContent = {
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
readonly type: "text";
|
|
8
|
+
readonly text: string;
|
|
13
9
|
};
|
|
14
10
|
type McpToolResult = {
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
readonly isError: boolean;
|
|
12
|
+
readonly content: readonly McpToolContent[];
|
|
17
13
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/usageDataPort.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* Where a tool call's usage data goes once its result is in hand. The promise resolves when the result may
|
|
18
|
+
* be returned: after the question, when this call puts it, and never after a send.
|
|
19
|
+
*/
|
|
20
|
+
export type McpUsageDataPort = (step: UsageDataStep) => Promise<void>;
|
|
21
|
+
export declare const USAGE_DATA_ELICITATION_MESSAGE: string;
|
|
22
|
+
export declare const USAGE_DATA_QUESTION_TIMEOUT_MS = 50000;
|
|
23
|
+
/** Sends one elicitation to the assistant, as part of the tool call being answered. */
|
|
24
|
+
export type SendElicitation = (params: ElicitRequestFormParams, options: {
|
|
25
|
+
readonly timeout: number;
|
|
26
|
+
}) => Promise<Pick<ElicitResult, "action">>;
|
|
27
|
+
/**
|
|
28
|
+
* Puts the usage data question through the assistant. Accepting is a yes and declining a No; a cancel, a
|
|
29
|
+
* closed question, an error or no answer in time is no answer at all.
|
|
30
|
+
*/
|
|
31
|
+
export declare const askThroughTheAssistant: (send: SendElicitation) => () => Promise<UsageDataQuestionAnswer>;
|
|
32
|
+
export type AskingOnceDependencies = {
|
|
33
|
+
/** Whether a question could still be due: nothing kept for this Lighthouse and nothing forbids asking. */
|
|
34
|
+
readonly mightAsk: () => Promise<boolean>;
|
|
35
|
+
/** Settles one call's usage data; never expected to throw. */
|
|
36
|
+
readonly settle: (step: UsageDataStep) => Promise<unknown>;
|
|
37
|
+
readonly now?: () => Date;
|
|
27
38
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
readonly reason: string;
|
|
61
|
-
};
|
|
62
|
-
}>;
|
|
63
|
-
readonly listTeams: () => Promise<{
|
|
64
|
-
readonly ok: true;
|
|
65
|
-
readonly value: readonly unknown[];
|
|
66
|
-
} | {
|
|
67
|
-
readonly ok: false;
|
|
68
|
-
readonly error: {
|
|
69
|
-
readonly category: string;
|
|
70
|
-
readonly reason: string;
|
|
71
|
-
};
|
|
72
|
-
}>;
|
|
73
|
-
readonly getTeam: (id: number) => Promise<{
|
|
74
|
-
readonly ok: true;
|
|
75
|
-
readonly value: unknown;
|
|
76
|
-
} | {
|
|
77
|
-
readonly ok: false;
|
|
78
|
-
readonly error: {
|
|
79
|
-
readonly category: string;
|
|
80
|
-
readonly reason: string;
|
|
81
|
-
};
|
|
82
|
-
}>;
|
|
83
|
-
readonly refreshTeam: (id: number) => Promise<{
|
|
84
|
-
readonly ok: true;
|
|
85
|
-
readonly value: unknown;
|
|
86
|
-
} | {
|
|
87
|
-
readonly ok: false;
|
|
88
|
-
readonly error: {
|
|
89
|
-
readonly category: string;
|
|
90
|
-
readonly reason: string;
|
|
91
|
-
};
|
|
92
|
-
}>;
|
|
93
|
-
readonly listPortfolios: () => Promise<{
|
|
94
|
-
readonly ok: true;
|
|
95
|
-
readonly value: readonly unknown[];
|
|
96
|
-
} | {
|
|
97
|
-
readonly ok: false;
|
|
98
|
-
readonly error: {
|
|
99
|
-
readonly category: string;
|
|
100
|
-
readonly reason: string;
|
|
101
|
-
};
|
|
102
|
-
}>;
|
|
103
|
-
readonly getPortfolio: (id: number) => Promise<{
|
|
104
|
-
readonly ok: true;
|
|
105
|
-
readonly value: unknown;
|
|
106
|
-
} | {
|
|
107
|
-
readonly ok: false;
|
|
108
|
-
readonly error: {
|
|
109
|
-
readonly category: string;
|
|
110
|
-
readonly reason: string;
|
|
111
|
-
};
|
|
112
|
-
}>;
|
|
113
|
-
readonly refreshPortfolio: (id: number) => Promise<{
|
|
114
|
-
readonly ok: true;
|
|
115
|
-
readonly value: unknown;
|
|
116
|
-
} | {
|
|
117
|
-
readonly ok: false;
|
|
118
|
-
readonly error: {
|
|
119
|
-
readonly category: string;
|
|
120
|
-
readonly reason: string;
|
|
121
|
-
};
|
|
122
|
-
}>;
|
|
123
|
-
readonly getTeamThroughput: (id: number, range?: {
|
|
124
|
-
readonly startDate: string;
|
|
125
|
-
readonly endDate: string;
|
|
126
|
-
}, view?: "raw" | "filtered") => Promise<{
|
|
127
|
-
readonly ok: true;
|
|
128
|
-
readonly value: unknown;
|
|
129
|
-
} | {
|
|
130
|
-
readonly ok: false;
|
|
131
|
-
readonly error: {
|
|
132
|
-
readonly category: string;
|
|
133
|
-
readonly reason: string;
|
|
134
|
-
};
|
|
135
|
-
}>;
|
|
136
|
-
readonly getTeamCycleTimePercentiles: (id: number, range?: {
|
|
137
|
-
readonly startDate: string;
|
|
138
|
-
readonly endDate: string;
|
|
139
|
-
}, definitionId?: number) => Promise<{
|
|
140
|
-
readonly ok: true;
|
|
141
|
-
readonly value: readonly unknown[];
|
|
142
|
-
} | {
|
|
143
|
-
readonly ok: false;
|
|
144
|
-
readonly error: {
|
|
145
|
-
readonly category: string;
|
|
146
|
-
readonly reason: string;
|
|
147
|
-
};
|
|
148
|
-
}>;
|
|
149
|
-
readonly getTeamWorkItemAgePercentiles: (id: number, range?: {
|
|
150
|
-
readonly startDate: string;
|
|
151
|
-
readonly endDate: string;
|
|
152
|
-
}) => Promise<{
|
|
153
|
-
readonly ok: true;
|
|
154
|
-
readonly value: readonly unknown[];
|
|
155
|
-
} | {
|
|
156
|
-
readonly ok: false;
|
|
157
|
-
readonly error: {
|
|
158
|
-
readonly category: string;
|
|
159
|
-
readonly reason: string;
|
|
160
|
-
};
|
|
161
|
-
}>;
|
|
162
|
-
readonly getPortfolioWorkItemAgePercentiles: (id: number, range?: {
|
|
163
|
-
readonly startDate: string;
|
|
164
|
-
readonly endDate: string;
|
|
165
|
-
}) => Promise<{
|
|
166
|
-
readonly ok: true;
|
|
167
|
-
readonly value: readonly unknown[];
|
|
168
|
-
} | {
|
|
169
|
-
readonly ok: false;
|
|
170
|
-
readonly error: {
|
|
171
|
-
readonly category: string;
|
|
172
|
-
readonly reason: string;
|
|
173
|
-
};
|
|
174
|
-
}>;
|
|
175
|
-
readonly getPortfolioThroughput: (id: number, range?: {
|
|
176
|
-
readonly startDate: string;
|
|
177
|
-
readonly endDate: string;
|
|
178
|
-
}) => Promise<{
|
|
179
|
-
readonly ok: true;
|
|
180
|
-
readonly value: unknown;
|
|
181
|
-
} | {
|
|
182
|
-
readonly ok: false;
|
|
183
|
-
readonly error: {
|
|
184
|
-
readonly category: string;
|
|
185
|
-
readonly reason: string;
|
|
186
|
-
};
|
|
187
|
-
}>;
|
|
188
|
-
readonly getTeamWorkItemAgeOverTime: (id: number, range?: {
|
|
189
|
-
readonly startDate: string;
|
|
190
|
-
readonly endDate: string;
|
|
191
|
-
}) => Promise<{
|
|
192
|
-
readonly ok: true;
|
|
193
|
-
readonly value: unknown;
|
|
194
|
-
} | {
|
|
195
|
-
readonly ok: false;
|
|
196
|
-
readonly error: {
|
|
197
|
-
readonly category: string;
|
|
198
|
-
readonly reason: string;
|
|
199
|
-
};
|
|
200
|
-
}>;
|
|
201
|
-
readonly getTeamTotalWorkItemAgeOverTime: (id: number, range?: {
|
|
202
|
-
readonly startDate: string;
|
|
203
|
-
readonly endDate: string;
|
|
204
|
-
}) => Promise<{
|
|
205
|
-
readonly ok: true;
|
|
206
|
-
readonly value: unknown;
|
|
207
|
-
} | {
|
|
208
|
-
readonly ok: false;
|
|
209
|
-
readonly error: {
|
|
210
|
-
readonly category: string;
|
|
211
|
-
readonly reason: string;
|
|
212
|
-
};
|
|
213
|
-
}>;
|
|
214
|
-
readonly getPortfolioWorkItemAgeOverTime: (id: number, range?: {
|
|
215
|
-
readonly startDate: string;
|
|
216
|
-
readonly endDate: string;
|
|
217
|
-
}) => Promise<{
|
|
218
|
-
readonly ok: true;
|
|
219
|
-
readonly value: unknown;
|
|
220
|
-
} | {
|
|
221
|
-
readonly ok: false;
|
|
222
|
-
readonly error: {
|
|
223
|
-
readonly category: string;
|
|
224
|
-
readonly reason: string;
|
|
225
|
-
};
|
|
226
|
-
}>;
|
|
227
|
-
readonly getPortfolioTotalWorkItemAgeOverTime: (id: number, range?: {
|
|
228
|
-
readonly startDate: string;
|
|
229
|
-
readonly endDate: string;
|
|
230
|
-
}) => Promise<{
|
|
231
|
-
readonly ok: true;
|
|
232
|
-
readonly value: unknown;
|
|
233
|
-
} | {
|
|
234
|
-
readonly ok: false;
|
|
235
|
-
readonly error: {
|
|
236
|
-
readonly category: string;
|
|
237
|
-
readonly reason: string;
|
|
238
|
-
};
|
|
239
|
-
}>;
|
|
240
|
-
readonly getTeamBlockedCountHistory: (id: number, range?: {
|
|
241
|
-
readonly startDate: string;
|
|
242
|
-
readonly endDate: string;
|
|
243
|
-
}) => Promise<{
|
|
244
|
-
readonly ok: true;
|
|
245
|
-
readonly value: readonly unknown[];
|
|
246
|
-
} | {
|
|
247
|
-
readonly ok: false;
|
|
248
|
-
readonly error: {
|
|
249
|
-
readonly category: string;
|
|
250
|
-
readonly reason: string;
|
|
251
|
-
};
|
|
252
|
-
}>;
|
|
253
|
-
readonly getPortfolioBlockedCountHistory: (id: number, range?: {
|
|
254
|
-
readonly startDate: string;
|
|
255
|
-
readonly endDate: string;
|
|
256
|
-
}) => Promise<{
|
|
257
|
-
readonly ok: true;
|
|
258
|
-
readonly value: readonly unknown[];
|
|
259
|
-
} | {
|
|
260
|
-
readonly ok: false;
|
|
261
|
-
readonly error: {
|
|
262
|
-
readonly category: string;
|
|
263
|
-
readonly reason: string;
|
|
264
|
-
};
|
|
265
|
-
}>;
|
|
266
|
-
readonly getTeamPercentilesOverTime: (id: number, range?: {
|
|
267
|
-
readonly startDate: string;
|
|
268
|
-
readonly endDate: string;
|
|
269
|
-
}, metricType?: "CycleTime" | "WorkItemAge", horizon?: number) => Promise<{
|
|
270
|
-
readonly ok: true;
|
|
271
|
-
readonly value: readonly unknown[];
|
|
272
|
-
} | {
|
|
273
|
-
readonly ok: false;
|
|
274
|
-
readonly error: {
|
|
275
|
-
readonly category: string;
|
|
276
|
-
readonly reason: string;
|
|
277
|
-
};
|
|
278
|
-
}>;
|
|
279
|
-
readonly getPortfolioPercentilesOverTime: (id: number, range?: {
|
|
280
|
-
readonly startDate: string;
|
|
281
|
-
readonly endDate: string;
|
|
282
|
-
}, metricType?: "CycleTime" | "WorkItemAge", horizon?: number) => Promise<{
|
|
283
|
-
readonly ok: true;
|
|
284
|
-
readonly value: readonly unknown[];
|
|
285
|
-
} | {
|
|
286
|
-
readonly ok: false;
|
|
287
|
-
readonly error: {
|
|
288
|
-
readonly category: string;
|
|
289
|
-
readonly reason: string;
|
|
290
|
-
};
|
|
291
|
-
}>;
|
|
292
|
-
readonly getTeamProcessBehaviorOverTime: (id: number, range?: {
|
|
293
|
-
readonly startDate: string;
|
|
294
|
-
readonly endDate: string;
|
|
295
|
-
}, metricType?: "Throughput" | "WorkItemAge" | "Wip" | "CycleTime" | "Arrivals" | "FeatureSize") => Promise<{
|
|
296
|
-
readonly ok: true;
|
|
297
|
-
readonly value: readonly unknown[];
|
|
298
|
-
} | {
|
|
299
|
-
readonly ok: false;
|
|
300
|
-
readonly error: {
|
|
301
|
-
readonly category: string;
|
|
302
|
-
readonly reason: string;
|
|
303
|
-
};
|
|
304
|
-
}>;
|
|
305
|
-
readonly getPortfolioProcessBehaviorOverTime: (id: number, range?: {
|
|
306
|
-
readonly startDate: string;
|
|
307
|
-
readonly endDate: string;
|
|
308
|
-
}, metricType?: "Throughput" | "WorkItemAge" | "Wip" | "CycleTime" | "Arrivals" | "FeatureSize") => Promise<{
|
|
309
|
-
readonly ok: true;
|
|
310
|
-
readonly value: readonly unknown[];
|
|
311
|
-
} | {
|
|
312
|
-
readonly ok: false;
|
|
313
|
-
readonly error: {
|
|
314
|
-
readonly category: string;
|
|
315
|
-
readonly reason: string;
|
|
316
|
-
};
|
|
317
|
-
}>;
|
|
318
|
-
readonly getTeamCumulativeStateTime: (id: number, range?: {
|
|
319
|
-
readonly startDate: string;
|
|
320
|
-
readonly endDate: string;
|
|
321
|
-
}, itemIds?: readonly number[]) => Promise<{
|
|
322
|
-
readonly ok: true;
|
|
323
|
-
readonly value: unknown;
|
|
324
|
-
} | {
|
|
325
|
-
readonly ok: false;
|
|
326
|
-
readonly error: {
|
|
327
|
-
readonly category: string;
|
|
328
|
-
readonly reason: string;
|
|
329
|
-
};
|
|
330
|
-
}>;
|
|
331
|
-
readonly getTeamCumulativeStateTimeItems: (id: number, state: string, range?: {
|
|
332
|
-
readonly startDate: string;
|
|
333
|
-
readonly endDate: string;
|
|
334
|
-
}, itemIds?: readonly number[]) => Promise<{
|
|
335
|
-
readonly ok: true;
|
|
336
|
-
readonly value: unknown;
|
|
337
|
-
} | {
|
|
338
|
-
readonly ok: false;
|
|
339
|
-
readonly error: {
|
|
340
|
-
readonly category: string;
|
|
341
|
-
readonly reason: string;
|
|
342
|
-
};
|
|
343
|
-
}>;
|
|
344
|
-
readonly getTeamCumulativeStateTimeCandidates: (id: number, range?: {
|
|
345
|
-
readonly startDate: string;
|
|
346
|
-
readonly endDate: string;
|
|
347
|
-
}) => Promise<{
|
|
348
|
-
readonly ok: true;
|
|
349
|
-
readonly value: unknown;
|
|
350
|
-
} | {
|
|
351
|
-
readonly ok: false;
|
|
352
|
-
readonly error: {
|
|
353
|
-
readonly category: string;
|
|
354
|
-
readonly reason: string;
|
|
355
|
-
};
|
|
356
|
-
}>;
|
|
357
|
-
readonly getPortfolioCumulativeStateTime: (id: number, range?: {
|
|
358
|
-
readonly startDate: string;
|
|
359
|
-
readonly endDate: string;
|
|
360
|
-
}, itemIds?: readonly number[]) => Promise<{
|
|
361
|
-
readonly ok: true;
|
|
362
|
-
readonly value: unknown;
|
|
363
|
-
} | {
|
|
364
|
-
readonly ok: false;
|
|
365
|
-
readonly error: {
|
|
366
|
-
readonly category: string;
|
|
367
|
-
readonly reason: string;
|
|
368
|
-
};
|
|
369
|
-
}>;
|
|
370
|
-
readonly getPortfolioCumulativeStateTimeItems: (id: number, state: string, range?: {
|
|
371
|
-
readonly startDate: string;
|
|
372
|
-
readonly endDate: string;
|
|
373
|
-
}, itemIds?: readonly number[]) => Promise<{
|
|
374
|
-
readonly ok: true;
|
|
375
|
-
readonly value: unknown;
|
|
376
|
-
} | {
|
|
377
|
-
readonly ok: false;
|
|
378
|
-
readonly error: {
|
|
379
|
-
readonly category: string;
|
|
380
|
-
readonly reason: string;
|
|
381
|
-
};
|
|
382
|
-
}>;
|
|
383
|
-
readonly getPortfolioCumulativeStateTimeCandidates: (id: number, range?: {
|
|
384
|
-
readonly startDate: string;
|
|
385
|
-
readonly endDate: string;
|
|
386
|
-
}) => Promise<{
|
|
387
|
-
readonly ok: true;
|
|
388
|
-
readonly value: unknown;
|
|
389
|
-
} | {
|
|
390
|
-
readonly ok: false;
|
|
391
|
-
readonly error: {
|
|
392
|
-
readonly category: string;
|
|
393
|
-
readonly reason: string;
|
|
394
|
-
};
|
|
395
|
-
}>;
|
|
396
|
-
readonly getFeaturesByIds: (ids: readonly number[]) => Promise<{
|
|
397
|
-
readonly ok: true;
|
|
398
|
-
readonly value: readonly unknown[];
|
|
399
|
-
} | {
|
|
400
|
-
readonly ok: false;
|
|
401
|
-
readonly error: {
|
|
402
|
-
readonly category: string;
|
|
403
|
-
readonly reason: string;
|
|
404
|
-
};
|
|
405
|
-
}>;
|
|
406
|
-
readonly getFeaturesByReferences: (refs: readonly string[]) => Promise<{
|
|
407
|
-
readonly ok: true;
|
|
408
|
-
readonly value: readonly unknown[];
|
|
409
|
-
} | {
|
|
410
|
-
readonly ok: false;
|
|
411
|
-
readonly error: {
|
|
412
|
-
readonly category: string;
|
|
413
|
-
readonly reason: string;
|
|
414
|
-
};
|
|
415
|
-
}>;
|
|
416
|
-
readonly getFeatureWorkItems: (featureId: number) => Promise<{
|
|
417
|
-
readonly ok: true;
|
|
418
|
-
readonly value: readonly unknown[];
|
|
419
|
-
} | {
|
|
420
|
-
readonly ok: false;
|
|
421
|
-
readonly error: {
|
|
422
|
-
readonly category: string;
|
|
423
|
-
readonly reason: string;
|
|
424
|
-
};
|
|
425
|
-
}>;
|
|
426
|
-
readonly listDeliveries: (portfolioId: number) => Promise<{
|
|
427
|
-
readonly ok: true;
|
|
428
|
-
readonly value: readonly unknown[];
|
|
429
|
-
} | {
|
|
430
|
-
readonly ok: false;
|
|
431
|
-
readonly error: {
|
|
432
|
-
readonly category: string;
|
|
433
|
-
readonly reason: string;
|
|
434
|
-
};
|
|
435
|
-
}>;
|
|
436
|
-
readonly getDeliveryMetricsHistory: (deliveryId: number) => Promise<{
|
|
437
|
-
readonly ok: true;
|
|
438
|
-
readonly value: DeliveryMetricsHistory;
|
|
439
|
-
} | {
|
|
440
|
-
readonly ok: false;
|
|
441
|
-
readonly error: {
|
|
442
|
-
readonly category: string;
|
|
443
|
-
readonly reason: string;
|
|
444
|
-
};
|
|
445
|
-
}>;
|
|
446
|
-
readonly createDelivery: (portfolioId: number, payload: Readonly<Record<string, unknown>>) => Promise<{
|
|
447
|
-
readonly ok: true;
|
|
448
|
-
readonly value: unknown;
|
|
449
|
-
} | {
|
|
450
|
-
readonly ok: false;
|
|
451
|
-
readonly error: {
|
|
452
|
-
readonly category: string;
|
|
453
|
-
readonly reason: string;
|
|
454
|
-
};
|
|
455
|
-
}>;
|
|
456
|
-
readonly updateDelivery: (deliveryId: number, payload: Readonly<Record<string, unknown>>) => Promise<{
|
|
457
|
-
readonly ok: true;
|
|
458
|
-
readonly value: unknown;
|
|
459
|
-
} | {
|
|
460
|
-
readonly ok: false;
|
|
461
|
-
readonly error: {
|
|
462
|
-
readonly category: string;
|
|
463
|
-
readonly reason: string;
|
|
464
|
-
};
|
|
465
|
-
}>;
|
|
466
|
-
readonly deleteDelivery: (deliveryId: number) => Promise<{
|
|
467
|
-
readonly ok: true;
|
|
468
|
-
readonly value: undefined;
|
|
469
|
-
} | {
|
|
470
|
-
readonly ok: false;
|
|
471
|
-
readonly error: {
|
|
472
|
-
readonly category: string;
|
|
473
|
-
readonly reason: string;
|
|
474
|
-
};
|
|
475
|
-
}>;
|
|
476
|
-
readonly getRecurringBlackoutRules: () => Promise<{
|
|
477
|
-
readonly ok: true;
|
|
478
|
-
readonly value: readonly unknown[];
|
|
479
|
-
} | {
|
|
480
|
-
readonly ok: false;
|
|
481
|
-
readonly error: {
|
|
482
|
-
readonly category: string;
|
|
483
|
-
readonly reason: string;
|
|
484
|
-
};
|
|
485
|
-
}>;
|
|
486
|
-
readonly createRecurringBlackoutRule: (payload: Readonly<Record<string, unknown>>) => Promise<{
|
|
487
|
-
readonly ok: true;
|
|
488
|
-
readonly value: unknown;
|
|
489
|
-
} | {
|
|
490
|
-
readonly ok: false;
|
|
491
|
-
readonly error: {
|
|
492
|
-
readonly category: string;
|
|
493
|
-
readonly reason: string;
|
|
494
|
-
};
|
|
495
|
-
}>;
|
|
496
|
-
readonly updateRecurringBlackoutRule: (id: number, payload: Readonly<Record<string, unknown>>) => Promise<{
|
|
497
|
-
readonly ok: true;
|
|
498
|
-
readonly value: unknown;
|
|
499
|
-
} | {
|
|
500
|
-
readonly ok: false;
|
|
501
|
-
readonly error: {
|
|
502
|
-
readonly category: string;
|
|
503
|
-
readonly reason: string;
|
|
504
|
-
};
|
|
505
|
-
}>;
|
|
506
|
-
readonly deleteRecurringBlackoutRule: (id: number) => Promise<{
|
|
507
|
-
readonly ok: true;
|
|
508
|
-
readonly value: undefined;
|
|
509
|
-
} | {
|
|
510
|
-
readonly ok: false;
|
|
511
|
-
readonly error: {
|
|
512
|
-
readonly category: string;
|
|
513
|
-
readonly reason: string;
|
|
514
|
-
};
|
|
515
|
-
}>;
|
|
516
|
-
readonly runManualForecast: (teamId: number, payload: {
|
|
517
|
-
readonly remainingItems?: number;
|
|
518
|
-
readonly targetDate?: string;
|
|
519
|
-
readonly applyFilterOverride?: boolean;
|
|
520
|
-
}) => Promise<{
|
|
521
|
-
readonly ok: true;
|
|
522
|
-
readonly value: unknown;
|
|
523
|
-
} | {
|
|
524
|
-
readonly ok: false;
|
|
525
|
-
readonly error: {
|
|
526
|
-
readonly category: string;
|
|
527
|
-
readonly reason: string;
|
|
528
|
-
};
|
|
529
|
-
}>;
|
|
530
|
-
readonly runBacktest: (teamId: number, payload: {
|
|
531
|
-
readonly startDate: string;
|
|
532
|
-
readonly endDate: string;
|
|
533
|
-
readonly historicalStartDate: string;
|
|
534
|
-
readonly historicalEndDate: string;
|
|
535
|
-
readonly applyFilterOverride?: boolean;
|
|
536
|
-
}) => Promise<{
|
|
537
|
-
readonly ok: true;
|
|
538
|
-
readonly value: unknown;
|
|
539
|
-
} | {
|
|
540
|
-
readonly ok: false;
|
|
541
|
-
readonly error: {
|
|
542
|
-
readonly category: string;
|
|
543
|
-
readonly reason: string;
|
|
544
|
-
};
|
|
545
|
-
}>;
|
|
39
|
+
/**
|
|
40
|
+
* A port that puts the question at most once in this process. Only a call that might ask waits for its
|
|
41
|
+
* step; every other call, and every call once the question has been put, hands its step over and returns.
|
|
42
|
+
* Calls that reach the question while it is being put get no answer at once rather than a second question.
|
|
43
|
+
*/
|
|
44
|
+
export declare const askingOnceInThisProcess: (dependencies: AskingOnceDependencies) => McpUsageDataPort;
|
|
45
|
+
/** What a tool call that succeeded did that the web counts too. */
|
|
46
|
+
export declare const usageDataOccurrencesOf: (toolName: string) => readonly UsageDataOccurrence[];
|
|
47
|
+
/** A tool's result with what it did that the web counts too; a result that is an error counts nothing. */
|
|
48
|
+
export type CountedToolResult = {
|
|
49
|
+
readonly result: McpToolResult;
|
|
50
|
+
readonly occurrences: readonly UsageDataOccurrence[];
|
|
51
|
+
};
|
|
52
|
+
export declare const countedToolResult: (result: McpToolResult, occurrences: readonly UsageDataOccurrence[]) => CountedToolResult;
|
|
53
|
+
/**
|
|
54
|
+
* A vote Lighthouse took, at the moment the Refinement read before it says, and the Work Item becoming
|
|
55
|
+
* Ready when only Lighthouse's answer can say this vote made it so.
|
|
56
|
+
*/
|
|
57
|
+
export declare const usageDataOccurrencesOfAVote: (readBeforeTheVote: RefinementMomentFacts, answered: LighthouseApiResult<Pick<VotedRow, "madeReady">>) => readonly UsageDataOccurrence[];
|
|
58
|
+
/** The verdict a Refinement Lighthouse answered shows, when it is a Refinement day's. */
|
|
59
|
+
export declare const usageDataOccurrencesOfARead: (answered: LighthouseApiResult<Pick<TeamRefinement, "isRefinementDay" | "workItems" | "need">>) => readonly UsageDataOccurrence[];
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/refinementTools.d.ts
|
|
62
|
+
/** The voter key one MCP server keeps for the one Lighthouse it talks to. */
|
|
63
|
+
type McpVoterKeyStore = LighthouseVoterKeyStore;
|
|
64
|
+
type RefinementToolDependencies = {
|
|
65
|
+
/** Where a local server keeps its voter key; a server shared by many people keeps none. */
|
|
66
|
+
readonly voterKeyStore?: McpVoterKeyStore;
|
|
67
|
+
/** Why this server may not vote, comment or take back right now, or null when it may. */
|
|
68
|
+
readonly refuseVoting?: () => Promise<string | null>;
|
|
69
|
+
/** What to say when Lighthouse asks for a voter key, on a server that keeps none to send. */
|
|
70
|
+
readonly voterKeyRequired?: string;
|
|
546
71
|
};
|
|
547
|
-
type
|
|
548
|
-
|
|
72
|
+
type ToolError = {
|
|
73
|
+
readonly category: string;
|
|
74
|
+
readonly reason: string;
|
|
75
|
+
};
|
|
76
|
+
type RefinementToolClient = RefinementWordingSource<ToolError> & Pick<LighthouseClient, "getTeamRefinement" | "castRefinementVote" | "addRefinementComment" | "takeBackRefinementVote" | "getRefinementLog" | "getTerminology">;
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/index.d.ts
|
|
79
|
+
export type McpCorePackageContract = {
|
|
80
|
+
readonly name: "@letpeoplework/lighthouse-mcp-core";
|
|
81
|
+
readonly dependsOn: "@letpeoplework/lighthouse-client";
|
|
82
|
+
readonly transports: readonly ["stdio", "streamable-http"];
|
|
83
|
+
};
|
|
84
|
+
export declare const getMcpCorePackageContract: () => McpCorePackageContract;
|
|
85
|
+
export type McpToolDefinition = {
|
|
86
|
+
readonly name: "lighthouse_health_check" | "lighthouse_version_get" | "lighthouse_worktracking_list" | "lighthouse_worktracking_get" | "lighthouse_team_list" | "lighthouse_team_get" | "lighthouse_team_refresh" | "lighthouse_team_refinement_get" | "lighthouse_team_refinement_vote" | "lighthouse_team_refinement_comment" | "lighthouse_team_refinement_voteTakeBack" | "lighthouse_portfolio_list" | "lighthouse_portfolio_get" | "lighthouse_portfolio_refresh" | "lighthouse_team_metrics_throughput" | "lighthouse_team_metrics_cycleTimePercentiles" | "lighthouse_team_metrics_workItemAgePercentiles" | "lighthouse_portfolio_metrics_workItemAgePercentiles" | "lighthouse_team_metrics_workItemAge" | "lighthouse_team_metrics_totalWorkItemAge" | "lighthouse_portfolio_metrics_throughput" | "lighthouse_portfolio_metrics_workItemAge" | "lighthouse_portfolio_metrics_totalWorkItemAge" | "lighthouse_team_metrics_blockedCountHistory" | "lighthouse_portfolio_metrics_blockedCountHistory" | "lighthouse_team_metrics_wip" | "lighthouse_team_metrics_sleRisk" | "lighthouse_team_metrics_processBehaviorChart" | "lighthouse_portfolio_metrics_processBehaviorChart" | "lighthouse_team_metrics_percentilesOverTime" | "lighthouse_portfolio_metrics_percentilesOverTime" | "lighthouse_team_metrics_processBehaviorOverTime" | "lighthouse_portfolio_metrics_processBehaviorOverTime" | "lighthouse_team_metrics_cumulativeStateTime" | "lighthouse_team_metrics_cumulativeStateTimeItems" | "lighthouse_team_metrics_cumulativeStateTimeCandidates" | "lighthouse_portfolio_metrics_cumulativeStateTime" | "lighthouse_portfolio_metrics_cumulativeStateTimeItems" | "lighthouse_portfolio_metrics_cumulativeStateTimeCandidates" | "lighthouse_feature_get" | "lighthouse_feature_workitems" | "lighthouse_delivery_list" | "lighthouse_delivery_metrics" | "lighthouse_blackout_list" | "lighthouse_blackout_create" | "lighthouse_blackout_update" | "lighthouse_blackout_delete" | "lighthouse_forecast_manual" | "lighthouse_forecast_backtest";
|
|
87
|
+
readonly description: string;
|
|
88
|
+
readonly inputSchema: {
|
|
89
|
+
readonly type: "object";
|
|
90
|
+
readonly properties: Record<string, unknown>;
|
|
91
|
+
readonly required?: readonly string[];
|
|
92
|
+
readonly additionalProperties: false;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
declare const processBehaviorMetricTypes: readonly ["Throughput", "WorkItemAge", "Wip", "CycleTime", "Arrivals", "FeatureSize"];
|
|
96
|
+
declare const TEAM_CHART_TYPES: readonly ["Throughput", "WorkItemAge", "Wip", "CycleTime", "Arrivals"];
|
|
97
|
+
type TeamChartType = (typeof TEAM_CHART_TYPES)[number];
|
|
98
|
+
type McpRuntimeClient = {
|
|
99
|
+
readonly checkConnectivity: () => Promise<{
|
|
100
|
+
readonly category: "success" | "unreachable" | "misconfigured" | "unauthorized" | "dependency-failure" | "concurrency-conflict" | "unexpected";
|
|
101
|
+
readonly reason?: string;
|
|
102
|
+
}>;
|
|
103
|
+
readonly getVersion: () => Promise<{
|
|
104
|
+
readonly ok: true;
|
|
105
|
+
readonly value: string;
|
|
106
|
+
} | {
|
|
107
|
+
readonly ok: false;
|
|
108
|
+
readonly error: {
|
|
109
|
+
readonly category: string;
|
|
110
|
+
readonly reason: string;
|
|
111
|
+
};
|
|
112
|
+
}>;
|
|
113
|
+
readonly listWorkTrackingConnections: () => Promise<{
|
|
114
|
+
readonly ok: true;
|
|
115
|
+
readonly value: readonly unknown[];
|
|
116
|
+
} | {
|
|
117
|
+
readonly ok: false;
|
|
118
|
+
readonly error: {
|
|
119
|
+
readonly category: string;
|
|
120
|
+
readonly reason: string;
|
|
121
|
+
};
|
|
122
|
+
}>;
|
|
123
|
+
readonly getWorkTrackingConnection: (id: number) => Promise<{
|
|
124
|
+
readonly ok: true;
|
|
125
|
+
readonly value: unknown;
|
|
126
|
+
} | {
|
|
127
|
+
readonly ok: false;
|
|
128
|
+
readonly error: {
|
|
129
|
+
readonly category: string;
|
|
130
|
+
readonly reason: string;
|
|
131
|
+
};
|
|
132
|
+
}>;
|
|
133
|
+
readonly listTeams: () => Promise<{
|
|
134
|
+
readonly ok: true;
|
|
135
|
+
readonly value: readonly unknown[];
|
|
136
|
+
} | {
|
|
137
|
+
readonly ok: false;
|
|
138
|
+
readonly error: {
|
|
139
|
+
readonly category: string;
|
|
140
|
+
readonly reason: string;
|
|
141
|
+
};
|
|
142
|
+
}>;
|
|
143
|
+
readonly getTeamSettings: (id: number) => Promise<{
|
|
144
|
+
readonly ok: true;
|
|
145
|
+
readonly value: unknown;
|
|
146
|
+
} | {
|
|
147
|
+
readonly ok: false;
|
|
148
|
+
readonly error: {
|
|
149
|
+
readonly category: string;
|
|
150
|
+
readonly reason: string;
|
|
151
|
+
};
|
|
152
|
+
}>;
|
|
153
|
+
readonly getTeam: (id: number) => Promise<{
|
|
154
|
+
readonly ok: true;
|
|
155
|
+
readonly value: unknown;
|
|
156
|
+
} | {
|
|
157
|
+
readonly ok: false;
|
|
158
|
+
readonly error: {
|
|
159
|
+
readonly category: string;
|
|
160
|
+
readonly reason: string;
|
|
161
|
+
};
|
|
162
|
+
}>;
|
|
163
|
+
readonly refreshTeam: (id: number) => Promise<{
|
|
164
|
+
readonly ok: true;
|
|
165
|
+
readonly value: unknown;
|
|
166
|
+
} | {
|
|
167
|
+
readonly ok: false;
|
|
168
|
+
readonly error: {
|
|
169
|
+
readonly category: string;
|
|
170
|
+
readonly reason: string;
|
|
171
|
+
};
|
|
172
|
+
}>;
|
|
173
|
+
readonly listPortfolios: () => Promise<{
|
|
174
|
+
readonly ok: true;
|
|
175
|
+
readonly value: readonly unknown[];
|
|
176
|
+
} | {
|
|
177
|
+
readonly ok: false;
|
|
178
|
+
readonly error: {
|
|
179
|
+
readonly category: string;
|
|
180
|
+
readonly reason: string;
|
|
181
|
+
};
|
|
182
|
+
}>;
|
|
183
|
+
readonly getPortfolio: (id: number) => Promise<{
|
|
184
|
+
readonly ok: true;
|
|
185
|
+
readonly value: unknown;
|
|
186
|
+
} | {
|
|
187
|
+
readonly ok: false;
|
|
188
|
+
readonly error: {
|
|
189
|
+
readonly category: string;
|
|
190
|
+
readonly reason: string;
|
|
191
|
+
};
|
|
192
|
+
}>;
|
|
193
|
+
readonly refreshPortfolio: (id: number) => Promise<{
|
|
194
|
+
readonly ok: true;
|
|
195
|
+
readonly value: unknown;
|
|
196
|
+
} | {
|
|
197
|
+
readonly ok: false;
|
|
198
|
+
readonly error: {
|
|
199
|
+
readonly category: string;
|
|
200
|
+
readonly reason: string;
|
|
201
|
+
};
|
|
202
|
+
}>;
|
|
203
|
+
readonly getTeamThroughput: (id: number, range?: {
|
|
204
|
+
readonly startDate: string;
|
|
205
|
+
readonly endDate: string;
|
|
206
|
+
}, view?: "raw" | "filtered") => Promise<{
|
|
207
|
+
readonly ok: true;
|
|
208
|
+
readonly value: unknown;
|
|
209
|
+
} | {
|
|
210
|
+
readonly ok: false;
|
|
211
|
+
readonly error: {
|
|
212
|
+
readonly category: string;
|
|
213
|
+
readonly reason: string;
|
|
214
|
+
};
|
|
215
|
+
}>;
|
|
216
|
+
readonly getTeamCycleTimePercentiles: (id: number, range?: {
|
|
217
|
+
readonly startDate: string;
|
|
218
|
+
readonly endDate: string;
|
|
219
|
+
}, definitionId?: number) => Promise<{
|
|
220
|
+
readonly ok: true;
|
|
221
|
+
readonly value: readonly unknown[];
|
|
222
|
+
} | {
|
|
223
|
+
readonly ok: false;
|
|
224
|
+
readonly error: {
|
|
225
|
+
readonly category: string;
|
|
226
|
+
readonly reason: string;
|
|
227
|
+
};
|
|
228
|
+
}>;
|
|
229
|
+
readonly getTeamWorkItemAgePercentiles: (id: number, range?: {
|
|
230
|
+
readonly startDate: string;
|
|
231
|
+
readonly endDate: string;
|
|
232
|
+
}) => Promise<{
|
|
233
|
+
readonly ok: true;
|
|
234
|
+
readonly value: readonly unknown[];
|
|
235
|
+
} | {
|
|
236
|
+
readonly ok: false;
|
|
237
|
+
readonly error: {
|
|
238
|
+
readonly category: string;
|
|
239
|
+
readonly reason: string;
|
|
240
|
+
};
|
|
241
|
+
}>;
|
|
242
|
+
readonly getPortfolioWorkItemAgePercentiles: (id: number, range?: {
|
|
243
|
+
readonly startDate: string;
|
|
244
|
+
readonly endDate: string;
|
|
245
|
+
}) => Promise<{
|
|
246
|
+
readonly ok: true;
|
|
247
|
+
readonly value: readonly unknown[];
|
|
248
|
+
} | {
|
|
249
|
+
readonly ok: false;
|
|
250
|
+
readonly error: {
|
|
251
|
+
readonly category: string;
|
|
252
|
+
readonly reason: string;
|
|
253
|
+
};
|
|
254
|
+
}>;
|
|
255
|
+
readonly getPortfolioThroughput: (id: number, range?: {
|
|
256
|
+
readonly startDate: string;
|
|
257
|
+
readonly endDate: string;
|
|
258
|
+
}) => Promise<{
|
|
259
|
+
readonly ok: true;
|
|
260
|
+
readonly value: unknown;
|
|
261
|
+
} | {
|
|
262
|
+
readonly ok: false;
|
|
263
|
+
readonly error: {
|
|
264
|
+
readonly category: string;
|
|
265
|
+
readonly reason: string;
|
|
266
|
+
};
|
|
267
|
+
}>;
|
|
268
|
+
readonly getTeamWorkItemAgeOverTime: (id: number, range?: {
|
|
269
|
+
readonly startDate: string;
|
|
270
|
+
readonly endDate: string;
|
|
271
|
+
}) => Promise<{
|
|
272
|
+
readonly ok: true;
|
|
273
|
+
readonly value: unknown;
|
|
274
|
+
} | {
|
|
275
|
+
readonly ok: false;
|
|
276
|
+
readonly error: {
|
|
277
|
+
readonly category: string;
|
|
278
|
+
readonly reason: string;
|
|
279
|
+
};
|
|
280
|
+
}>;
|
|
281
|
+
readonly getTeamTotalWorkItemAgeOverTime: (id: number, range?: {
|
|
282
|
+
readonly startDate: string;
|
|
283
|
+
readonly endDate: string;
|
|
284
|
+
}) => Promise<{
|
|
285
|
+
readonly ok: true;
|
|
286
|
+
readonly value: unknown;
|
|
287
|
+
} | {
|
|
288
|
+
readonly ok: false;
|
|
289
|
+
readonly error: {
|
|
290
|
+
readonly category: string;
|
|
291
|
+
readonly reason: string;
|
|
292
|
+
};
|
|
293
|
+
}>;
|
|
294
|
+
readonly getPortfolioWorkItemAgeOverTime: (id: number, range?: {
|
|
295
|
+
readonly startDate: string;
|
|
296
|
+
readonly endDate: string;
|
|
297
|
+
}) => Promise<{
|
|
298
|
+
readonly ok: true;
|
|
299
|
+
readonly value: unknown;
|
|
300
|
+
} | {
|
|
301
|
+
readonly ok: false;
|
|
302
|
+
readonly error: {
|
|
303
|
+
readonly category: string;
|
|
304
|
+
readonly reason: string;
|
|
305
|
+
};
|
|
306
|
+
}>;
|
|
307
|
+
readonly getPortfolioTotalWorkItemAgeOverTime: (id: number, range?: {
|
|
308
|
+
readonly startDate: string;
|
|
309
|
+
readonly endDate: string;
|
|
310
|
+
}) => Promise<{
|
|
311
|
+
readonly ok: true;
|
|
312
|
+
readonly value: unknown;
|
|
313
|
+
} | {
|
|
314
|
+
readonly ok: false;
|
|
315
|
+
readonly error: {
|
|
316
|
+
readonly category: string;
|
|
317
|
+
readonly reason: string;
|
|
318
|
+
};
|
|
319
|
+
}>;
|
|
320
|
+
readonly getTeamBlockedCountHistory: (id: number, range?: {
|
|
321
|
+
readonly startDate: string;
|
|
322
|
+
readonly endDate: string;
|
|
323
|
+
}) => Promise<{
|
|
324
|
+
readonly ok: true;
|
|
325
|
+
readonly value: readonly unknown[];
|
|
326
|
+
} | {
|
|
327
|
+
readonly ok: false;
|
|
328
|
+
readonly error: {
|
|
329
|
+
readonly category: string;
|
|
330
|
+
readonly reason: string;
|
|
331
|
+
};
|
|
332
|
+
}>;
|
|
333
|
+
readonly getTeamWip: (id: number, asOfDate: string) => Promise<{
|
|
334
|
+
readonly ok: true;
|
|
335
|
+
readonly value: readonly unknown[];
|
|
336
|
+
} | {
|
|
337
|
+
readonly ok: false;
|
|
338
|
+
readonly error: {
|
|
339
|
+
readonly category: string;
|
|
340
|
+
readonly reason: string;
|
|
341
|
+
};
|
|
342
|
+
}>;
|
|
343
|
+
readonly getTeamProcessBehaviorChart: (id: number, range: {
|
|
344
|
+
readonly startDate: string;
|
|
345
|
+
readonly endDate: string;
|
|
346
|
+
}, metricType: TeamChartType) => Promise<{
|
|
347
|
+
readonly ok: true;
|
|
348
|
+
readonly value: unknown;
|
|
349
|
+
} | {
|
|
350
|
+
readonly ok: false;
|
|
351
|
+
readonly error: {
|
|
352
|
+
readonly category: string;
|
|
353
|
+
readonly reason: string;
|
|
354
|
+
};
|
|
355
|
+
}>;
|
|
356
|
+
readonly getPortfolioProcessBehaviorChart: (id: number, range: {
|
|
357
|
+
readonly startDate: string;
|
|
358
|
+
readonly endDate: string;
|
|
359
|
+
}, metricType: ProcessBehaviorMetricTypeArgument) => Promise<{
|
|
360
|
+
readonly ok: true;
|
|
361
|
+
readonly value: unknown;
|
|
362
|
+
} | {
|
|
363
|
+
readonly ok: false;
|
|
364
|
+
readonly error: {
|
|
365
|
+
readonly category: string;
|
|
366
|
+
readonly reason: string;
|
|
367
|
+
};
|
|
368
|
+
}>;
|
|
369
|
+
readonly getTeamSleRisk: (id: number) => Promise<{
|
|
370
|
+
readonly ok: true;
|
|
371
|
+
readonly value: readonly unknown[];
|
|
372
|
+
} | {
|
|
373
|
+
readonly ok: false;
|
|
374
|
+
readonly error: {
|
|
375
|
+
readonly category: string;
|
|
376
|
+
readonly reason: string;
|
|
377
|
+
};
|
|
378
|
+
}>;
|
|
379
|
+
readonly getPortfolioBlockedCountHistory: (id: number, range?: {
|
|
380
|
+
readonly startDate: string;
|
|
381
|
+
readonly endDate: string;
|
|
382
|
+
}) => Promise<{
|
|
383
|
+
readonly ok: true;
|
|
384
|
+
readonly value: readonly unknown[];
|
|
385
|
+
} | {
|
|
386
|
+
readonly ok: false;
|
|
387
|
+
readonly error: {
|
|
388
|
+
readonly category: string;
|
|
389
|
+
readonly reason: string;
|
|
390
|
+
};
|
|
391
|
+
}>;
|
|
392
|
+
readonly getTeamPercentilesOverTime: (id: number, range?: {
|
|
393
|
+
readonly startDate: string;
|
|
394
|
+
readonly endDate: string;
|
|
395
|
+
}, metricType?: "CycleTime" | "WorkItemAge", horizon?: number) => Promise<{
|
|
396
|
+
readonly ok: true;
|
|
397
|
+
readonly value: readonly unknown[];
|
|
398
|
+
} | {
|
|
399
|
+
readonly ok: false;
|
|
400
|
+
readonly error: {
|
|
401
|
+
readonly category: string;
|
|
402
|
+
readonly reason: string;
|
|
403
|
+
};
|
|
404
|
+
}>;
|
|
405
|
+
readonly getPortfolioPercentilesOverTime: (id: number, range?: {
|
|
406
|
+
readonly startDate: string;
|
|
407
|
+
readonly endDate: string;
|
|
408
|
+
}, metricType?: "CycleTime" | "WorkItemAge", horizon?: number) => Promise<{
|
|
409
|
+
readonly ok: true;
|
|
410
|
+
readonly value: readonly unknown[];
|
|
411
|
+
} | {
|
|
412
|
+
readonly ok: false;
|
|
413
|
+
readonly error: {
|
|
414
|
+
readonly category: string;
|
|
415
|
+
readonly reason: string;
|
|
416
|
+
};
|
|
417
|
+
}>;
|
|
418
|
+
readonly getTeamProcessBehaviorOverTime: (id: number, range?: {
|
|
419
|
+
readonly startDate: string;
|
|
420
|
+
readonly endDate: string;
|
|
421
|
+
}, metricType?: "Throughput" | "WorkItemAge" | "Wip" | "CycleTime" | "Arrivals" | "FeatureSize") => Promise<{
|
|
422
|
+
readonly ok: true;
|
|
423
|
+
readonly value: readonly unknown[];
|
|
424
|
+
} | {
|
|
425
|
+
readonly ok: false;
|
|
426
|
+
readonly error: {
|
|
427
|
+
readonly category: string;
|
|
428
|
+
readonly reason: string;
|
|
429
|
+
};
|
|
430
|
+
}>;
|
|
431
|
+
readonly getPortfolioProcessBehaviorOverTime: (id: number, range?: {
|
|
432
|
+
readonly startDate: string;
|
|
433
|
+
readonly endDate: string;
|
|
434
|
+
}, metricType?: "Throughput" | "WorkItemAge" | "Wip" | "CycleTime" | "Arrivals" | "FeatureSize") => Promise<{
|
|
435
|
+
readonly ok: true;
|
|
436
|
+
readonly value: readonly unknown[];
|
|
437
|
+
} | {
|
|
438
|
+
readonly ok: false;
|
|
439
|
+
readonly error: {
|
|
440
|
+
readonly category: string;
|
|
441
|
+
readonly reason: string;
|
|
442
|
+
};
|
|
443
|
+
}>;
|
|
444
|
+
readonly getTeamCumulativeStateTime: (id: number, range?: {
|
|
445
|
+
readonly startDate: string;
|
|
446
|
+
readonly endDate: string;
|
|
447
|
+
}, itemIds?: readonly number[]) => Promise<{
|
|
448
|
+
readonly ok: true;
|
|
449
|
+
readonly value: unknown;
|
|
450
|
+
} | {
|
|
451
|
+
readonly ok: false;
|
|
452
|
+
readonly error: {
|
|
453
|
+
readonly category: string;
|
|
454
|
+
readonly reason: string;
|
|
455
|
+
};
|
|
456
|
+
}>;
|
|
457
|
+
readonly getTeamCumulativeStateTimeItems: (id: number, state: string, range?: {
|
|
458
|
+
readonly startDate: string;
|
|
459
|
+
readonly endDate: string;
|
|
460
|
+
}, itemIds?: readonly number[]) => Promise<{
|
|
461
|
+
readonly ok: true;
|
|
462
|
+
readonly value: unknown;
|
|
463
|
+
} | {
|
|
464
|
+
readonly ok: false;
|
|
465
|
+
readonly error: {
|
|
466
|
+
readonly category: string;
|
|
467
|
+
readonly reason: string;
|
|
468
|
+
};
|
|
469
|
+
}>;
|
|
470
|
+
readonly getTeamCumulativeStateTimeCandidates: (id: number, range?: {
|
|
471
|
+
readonly startDate: string;
|
|
472
|
+
readonly endDate: string;
|
|
473
|
+
}) => Promise<{
|
|
474
|
+
readonly ok: true;
|
|
475
|
+
readonly value: unknown;
|
|
476
|
+
} | {
|
|
477
|
+
readonly ok: false;
|
|
478
|
+
readonly error: {
|
|
479
|
+
readonly category: string;
|
|
480
|
+
readonly reason: string;
|
|
481
|
+
};
|
|
482
|
+
}>;
|
|
483
|
+
readonly getPortfolioCumulativeStateTime: (id: number, range?: {
|
|
484
|
+
readonly startDate: string;
|
|
485
|
+
readonly endDate: string;
|
|
486
|
+
}, itemIds?: readonly number[]) => Promise<{
|
|
487
|
+
readonly ok: true;
|
|
488
|
+
readonly value: unknown;
|
|
489
|
+
} | {
|
|
490
|
+
readonly ok: false;
|
|
491
|
+
readonly error: {
|
|
492
|
+
readonly category: string;
|
|
493
|
+
readonly reason: string;
|
|
494
|
+
};
|
|
495
|
+
}>;
|
|
496
|
+
readonly getPortfolioCumulativeStateTimeItems: (id: number, state: string, range?: {
|
|
497
|
+
readonly startDate: string;
|
|
498
|
+
readonly endDate: string;
|
|
499
|
+
}, itemIds?: readonly number[]) => Promise<{
|
|
500
|
+
readonly ok: true;
|
|
501
|
+
readonly value: unknown;
|
|
502
|
+
} | {
|
|
503
|
+
readonly ok: false;
|
|
504
|
+
readonly error: {
|
|
505
|
+
readonly category: string;
|
|
506
|
+
readonly reason: string;
|
|
507
|
+
};
|
|
508
|
+
}>;
|
|
509
|
+
readonly getPortfolioCumulativeStateTimeCandidates: (id: number, range?: {
|
|
510
|
+
readonly startDate: string;
|
|
511
|
+
readonly endDate: string;
|
|
512
|
+
}) => Promise<{
|
|
513
|
+
readonly ok: true;
|
|
514
|
+
readonly value: unknown;
|
|
515
|
+
} | {
|
|
516
|
+
readonly ok: false;
|
|
517
|
+
readonly error: {
|
|
518
|
+
readonly category: string;
|
|
519
|
+
readonly reason: string;
|
|
520
|
+
};
|
|
521
|
+
}>;
|
|
522
|
+
readonly getFeaturesByIds: (ids: readonly number[]) => Promise<{
|
|
523
|
+
readonly ok: true;
|
|
524
|
+
readonly value: readonly unknown[];
|
|
525
|
+
} | {
|
|
526
|
+
readonly ok: false;
|
|
527
|
+
readonly error: {
|
|
528
|
+
readonly category: string;
|
|
529
|
+
readonly reason: string;
|
|
530
|
+
};
|
|
531
|
+
}>;
|
|
532
|
+
readonly getFeaturesByReferences: (refs: readonly string[]) => Promise<{
|
|
533
|
+
readonly ok: true;
|
|
534
|
+
readonly value: readonly unknown[];
|
|
535
|
+
} | {
|
|
536
|
+
readonly ok: false;
|
|
537
|
+
readonly error: {
|
|
538
|
+
readonly category: string;
|
|
539
|
+
readonly reason: string;
|
|
540
|
+
};
|
|
541
|
+
}>;
|
|
542
|
+
readonly getFeatureWorkItems: (featureId: number) => Promise<{
|
|
543
|
+
readonly ok: true;
|
|
544
|
+
readonly value: readonly unknown[];
|
|
545
|
+
} | {
|
|
546
|
+
readonly ok: false;
|
|
547
|
+
readonly error: {
|
|
548
|
+
readonly category: string;
|
|
549
|
+
readonly reason: string;
|
|
550
|
+
};
|
|
551
|
+
}>;
|
|
552
|
+
readonly listDeliveries: (portfolioId: number) => Promise<{
|
|
553
|
+
readonly ok: true;
|
|
554
|
+
readonly value: readonly unknown[];
|
|
555
|
+
} | {
|
|
556
|
+
readonly ok: false;
|
|
557
|
+
readonly error: {
|
|
558
|
+
readonly category: string;
|
|
559
|
+
readonly reason: string;
|
|
560
|
+
};
|
|
561
|
+
}>;
|
|
562
|
+
readonly getDeliveryMetricsHistory: (deliveryId: number) => Promise<{
|
|
563
|
+
readonly ok: true;
|
|
564
|
+
readonly value: DeliveryMetricsHistory;
|
|
565
|
+
} | {
|
|
566
|
+
readonly ok: false;
|
|
567
|
+
readonly error: {
|
|
568
|
+
readonly category: string;
|
|
569
|
+
readonly reason: string;
|
|
570
|
+
};
|
|
571
|
+
}>;
|
|
572
|
+
readonly createDelivery: (portfolioId: number, payload: Readonly<Record<string, unknown>>) => Promise<{
|
|
573
|
+
readonly ok: true;
|
|
574
|
+
readonly value: unknown;
|
|
575
|
+
} | {
|
|
576
|
+
readonly ok: false;
|
|
577
|
+
readonly error: {
|
|
578
|
+
readonly category: string;
|
|
579
|
+
readonly reason: string;
|
|
580
|
+
};
|
|
581
|
+
}>;
|
|
582
|
+
readonly updateDelivery: (deliveryId: number, payload: Readonly<Record<string, unknown>>) => Promise<{
|
|
583
|
+
readonly ok: true;
|
|
584
|
+
readonly value: unknown;
|
|
585
|
+
} | {
|
|
586
|
+
readonly ok: false;
|
|
587
|
+
readonly error: {
|
|
588
|
+
readonly category: string;
|
|
589
|
+
readonly reason: string;
|
|
590
|
+
};
|
|
591
|
+
}>;
|
|
592
|
+
readonly deleteDelivery: (deliveryId: number) => Promise<{
|
|
593
|
+
readonly ok: true;
|
|
594
|
+
readonly value: undefined;
|
|
595
|
+
} | {
|
|
596
|
+
readonly ok: false;
|
|
597
|
+
readonly error: {
|
|
598
|
+
readonly category: string;
|
|
599
|
+
readonly reason: string;
|
|
600
|
+
};
|
|
601
|
+
}>;
|
|
602
|
+
readonly getRecurringBlackoutRules: () => Promise<{
|
|
603
|
+
readonly ok: true;
|
|
604
|
+
readonly value: readonly unknown[];
|
|
605
|
+
} | {
|
|
606
|
+
readonly ok: false;
|
|
607
|
+
readonly error: {
|
|
608
|
+
readonly category: string;
|
|
609
|
+
readonly reason: string;
|
|
610
|
+
};
|
|
611
|
+
}>;
|
|
612
|
+
readonly createRecurringBlackoutRule: (payload: Readonly<Record<string, unknown>>) => Promise<{
|
|
613
|
+
readonly ok: true;
|
|
614
|
+
readonly value: unknown;
|
|
615
|
+
} | {
|
|
616
|
+
readonly ok: false;
|
|
617
|
+
readonly error: {
|
|
618
|
+
readonly category: string;
|
|
619
|
+
readonly reason: string;
|
|
620
|
+
};
|
|
621
|
+
}>;
|
|
622
|
+
readonly updateRecurringBlackoutRule: (id: number, payload: Readonly<Record<string, unknown>>) => Promise<{
|
|
623
|
+
readonly ok: true;
|
|
624
|
+
readonly value: unknown;
|
|
625
|
+
} | {
|
|
626
|
+
readonly ok: false;
|
|
627
|
+
readonly error: {
|
|
628
|
+
readonly category: string;
|
|
629
|
+
readonly reason: string;
|
|
630
|
+
};
|
|
631
|
+
}>;
|
|
632
|
+
readonly deleteRecurringBlackoutRule: (id: number) => Promise<{
|
|
633
|
+
readonly ok: true;
|
|
634
|
+
readonly value: undefined;
|
|
635
|
+
} | {
|
|
636
|
+
readonly ok: false;
|
|
637
|
+
readonly error: {
|
|
638
|
+
readonly category: string;
|
|
639
|
+
readonly reason: string;
|
|
640
|
+
};
|
|
641
|
+
}>;
|
|
642
|
+
readonly runManualForecast: (teamId: number, payload: {
|
|
643
|
+
readonly remainingItems?: number;
|
|
644
|
+
readonly targetDate?: string;
|
|
645
|
+
readonly applyFilterOverride?: boolean;
|
|
646
|
+
}) => Promise<{
|
|
647
|
+
readonly ok: true;
|
|
648
|
+
readonly value: unknown;
|
|
649
|
+
} | {
|
|
650
|
+
readonly ok: false;
|
|
651
|
+
readonly error: {
|
|
652
|
+
readonly category: string;
|
|
653
|
+
readonly reason: string;
|
|
654
|
+
};
|
|
655
|
+
}>;
|
|
656
|
+
readonly runBacktest: (teamId: number, payload: {
|
|
657
|
+
readonly startDate: string;
|
|
658
|
+
readonly endDate: string;
|
|
659
|
+
readonly historicalStartDate: string;
|
|
660
|
+
readonly historicalEndDate: string;
|
|
661
|
+
readonly applyFilterOverride?: boolean;
|
|
662
|
+
}) => Promise<{
|
|
663
|
+
readonly ok: true;
|
|
664
|
+
readonly value: unknown;
|
|
665
|
+
} | {
|
|
666
|
+
readonly ok: false;
|
|
667
|
+
readonly error: {
|
|
668
|
+
readonly category: string;
|
|
669
|
+
readonly reason: string;
|
|
670
|
+
};
|
|
671
|
+
}>;
|
|
672
|
+
} & Omit<RefinementToolClient, "getTeam">;
|
|
673
|
+
export type McpCoreRuntimeDependencies = {
|
|
674
|
+
readonly createClient: () => McpRuntimeClient;
|
|
675
|
+
/** Where usage data goes; without it a tool call does exactly what it always did. */
|
|
676
|
+
readonly usageData?: McpUsageDataPort;
|
|
677
|
+
} & RefinementToolDependencies;
|
|
678
|
+
export type McpCoreRuntime = {
|
|
679
|
+
readonly listTools: () => readonly McpToolDefinition[];
|
|
680
|
+
readonly callTool: (name: string, argumentsPayload: unknown) => Promise<McpToolResult>;
|
|
681
|
+
/** The tool's result with what it did that the web counts too. */
|
|
682
|
+
readonly callCountedTool: (name: string, argumentsPayload: unknown) => Promise<CountedToolResult>;
|
|
549
683
|
};
|
|
550
|
-
type
|
|
551
|
-
|
|
552
|
-
|
|
684
|
+
type ProcessBehaviorMetricTypeArgument = (typeof processBehaviorMetricTypes)[number];
|
|
685
|
+
export declare const createMcpCoreRuntime: (dependencies: McpCoreRuntimeDependencies) => McpCoreRuntime;
|
|
686
|
+
/** The server, and through it what the assistant said it can do once it connected. */
|
|
687
|
+
type McpToolServer = Pick<McpServer, "registerTool"> & {
|
|
688
|
+
readonly server?: Pick<McpServer["server"], "getClientCapabilities">;
|
|
553
689
|
};
|
|
554
|
-
declare const
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
export { type McpCorePackageContract, type McpCoreRuntime, type McpCoreRuntimeDependencies, type McpToolDefinition, type McpToolResult, createMcpCoreRuntime, getMcpCorePackageContract, registerMcpTools };
|
|
690
|
+
export declare const registerMcpTools: (server: McpToolServer, dependencies: McpCoreRuntimeDependencies) => void;
|
|
691
|
+
//#endregion
|
|
692
|
+
export type { McpToolResult, McpVoterKeyStore };
|