@letpeoplework/lighthouse-mcp-core 1.0.1 → 1.1.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 CHANGED
@@ -58,6 +58,19 @@ var dateRangeProperties = {
58
58
  description: "Inclusive end date in ISO format (YYYY-MM-DD)."
59
59
  }
60
60
  };
61
+ var throughputFilterViewProperty = {
62
+ view: {
63
+ type: "string",
64
+ enum: ["raw", "filtered"],
65
+ description: `Forecast-filter view (Lighthouse v26.5.24.10+). "filtered" applies the team's exclusion rule to throughput. Omit or "raw" returns unfiltered data.`
66
+ }
67
+ };
68
+ var forecastFilterOverrideProperty = {
69
+ applyFilterOverride: {
70
+ type: "boolean",
71
+ description: "Override the team's forecast-filter setting (Lighthouse v26.5.24.10+). true = apply the team filter; false = skip the filter (raw); omit = respect the team setting."
72
+ }
73
+ };
61
74
  var toolDefinitions = [
62
75
  {
63
76
  name: "lighthouse_health_check",
@@ -111,12 +124,13 @@ var toolDefinitions = [
111
124
  },
112
125
  {
113
126
  name: "lighthouse_team_metrics_throughput",
114
- description: "Get throughput run-chart data for a team by ID, optionally filtered by start and end dates.",
127
+ description: `Get throughput run-chart data for a team by ID, optionally filtered by start and end dates. Pass view="filtered" to apply the team's forecast-exclusion rule (Lighthouse v26.5.24.10+); omit or "raw" returns unfiltered data.`,
115
128
  inputSchema: {
116
129
  type: "object",
117
130
  properties: {
118
131
  ...idInputSchema.properties,
119
- ...dateRangeProperties
132
+ ...dateRangeProperties,
133
+ ...throughputFilterViewProperty
120
134
  },
121
135
  required: ["id"],
122
136
  additionalProperties: false
@@ -236,7 +250,7 @@ var toolDefinitions = [
236
250
  },
237
251
  {
238
252
  name: "lighthouse_forecast_manual",
239
- description: "Run a manual forecast for a team by ID with optional remaining items and target date.",
253
+ description: "Run a manual forecast for a team by ID with optional remaining items and target date. Pass applyFilterOverride=true to apply the team's forecast filter, false to skip it, or omit to respect the team setting (Lighthouse v26.5.24.10+). The response includes filterApplied (boolean) and excludedSummary (string) when a filter was applied.",
240
254
  inputSchema: {
241
255
  type: "object",
242
256
  properties: {
@@ -248,7 +262,8 @@ var toolDefinitions = [
248
262
  targetDate: {
249
263
  type: "string",
250
264
  description: "Optional target date in ISO format (YYYY-MM-DD)."
251
- }
265
+ },
266
+ ...forecastFilterOverrideProperty
252
267
  },
253
268
  required: ["id"],
254
269
  additionalProperties: false
@@ -256,7 +271,7 @@ var toolDefinitions = [
256
271
  },
257
272
  {
258
273
  name: "lighthouse_forecast_backtest",
259
- description: "Run a forecast backtest for a team by ID using forecast and historical date ranges.",
274
+ description: "Run a forecast backtest for a team by ID using forecast and historical date ranges. Pass applyFilterOverride=true to apply the team's forecast filter, false to skip it, or omit to respect the team setting (Lighthouse v26.5.24.10+). The response includes filterApplied (boolean) and excludedSummary (string) when a filter was applied.",
260
275
  inputSchema: {
261
276
  type: "object",
262
277
  properties: {
@@ -276,7 +291,8 @@ var toolDefinitions = [
276
291
  historicalEndDate: {
277
292
  type: "string",
278
293
  description: "Historical sample end date in ISO format (YYYY-MM-DD)."
279
- }
294
+ },
295
+ ...forecastFilterOverrideProperty
280
296
  },
281
297
  required: [
282
298
  "id",
@@ -338,6 +354,20 @@ var getDateRange = (argumentsPayload) => {
338
354
  }
339
355
  return void 0;
340
356
  };
357
+ var getThroughputFilterView = (argumentsPayload) => {
358
+ if (!isObjectRecord(argumentsPayload)) {
359
+ return void 0;
360
+ }
361
+ const view = argumentsPayload.view;
362
+ return view === "raw" || view === "filtered" ? view : void 0;
363
+ };
364
+ var getApplyFilterOverride = (argumentsPayload) => {
365
+ if (!isObjectRecord(argumentsPayload)) {
366
+ return void 0;
367
+ }
368
+ const value = argumentsPayload.applyFilterOverride;
369
+ return typeof value === "boolean" ? value : void 0;
370
+ };
341
371
  var isoDateStringSchema = import_zod.z.string().regex(/^\d{4}-\d{2}-\d{2}$/u, "Expected ISO date in YYYY-MM-DD format.");
342
372
  var toolInputSchemas = {
343
373
  lighthouse_health_check: import_zod.z.object({}),
@@ -353,7 +383,8 @@ var toolInputSchemas = {
353
383
  lighthouse_team_metrics_throughput: import_zod.z.object({
354
384
  id: import_zod.z.number().int(),
355
385
  startDate: isoDateStringSchema.optional(),
356
- endDate: isoDateStringSchema.optional()
386
+ endDate: isoDateStringSchema.optional(),
387
+ view: import_zod.z.enum(["raw", "filtered"]).optional()
357
388
  }),
358
389
  lighthouse_team_metrics_cycleTimePercentiles: import_zod.z.object({
359
390
  id: import_zod.z.number().int(),
@@ -394,14 +425,16 @@ var toolInputSchemas = {
394
425
  lighthouse_forecast_manual: import_zod.z.object({
395
426
  id: import_zod.z.number().int(),
396
427
  remainingItems: import_zod.z.number().int().optional(),
397
- targetDate: isoDateStringSchema.optional()
428
+ targetDate: isoDateStringSchema.optional(),
429
+ applyFilterOverride: import_zod.z.boolean().optional()
398
430
  }),
399
431
  lighthouse_forecast_backtest: import_zod.z.object({
400
432
  id: import_zod.z.number().int(),
401
433
  startDate: isoDateStringSchema,
402
434
  endDate: isoDateStringSchema,
403
435
  historicalStartDate: isoDateStringSchema,
404
- historicalEndDate: isoDateStringSchema
436
+ historicalEndDate: isoDateStringSchema,
437
+ applyFilterOverride: import_zod.z.boolean().optional()
405
438
  })
406
439
  };
407
440
  var isReadOnlyTool = (toolName) => !toolName.endsWith("_refresh");
@@ -534,7 +567,8 @@ var createMcpCoreRuntime = (dependencies) => ({
534
567
  return getErrorToolResult("team metrics: invalid id");
535
568
  }
536
569
  const range = getDateRange(argumentsPayload);
537
- const result = await client.getTeamThroughput(id, range);
570
+ const view = getThroughputFilterView(argumentsPayload);
571
+ const result = await client.getTeamThroughput(id, range, view);
538
572
  if (result.ok) {
539
573
  return getSuccessToolResult(
540
574
  `team throughput: ${encodePayload(result.value)}`
@@ -717,9 +751,11 @@ var createMcpCoreRuntime = (dependencies) => ({
717
751
  const payload = isObjectRecord(argumentsPayload) ? argumentsPayload : {};
718
752
  const remainingItems = typeof payload.remainingItems === "number" ? payload.remainingItems : void 0;
719
753
  const targetDate = typeof payload.targetDate === "string" ? payload.targetDate : void 0;
754
+ const applyFilterOverride = getApplyFilterOverride(argumentsPayload);
720
755
  const result = await client.runManualForecast(id, {
721
756
  remainingItems,
722
- targetDate
757
+ targetDate,
758
+ applyFilterOverride
723
759
  });
724
760
  if (result.ok) {
725
761
  return getSuccessToolResult(`forecast: ${encodePayload(result.value)}`);
@@ -743,11 +779,13 @@ var createMcpCoreRuntime = (dependencies) => ({
743
779
  "backtest: startDate, endDate, historicalStartDate, and historicalEndDate are required"
744
780
  );
745
781
  }
782
+ const applyFilterOverride = getApplyFilterOverride(argumentsPayload);
746
783
  const result = await client.runBacktest(id, {
747
784
  startDate,
748
785
  endDate,
749
786
  historicalStartDate,
750
- historicalEndDate
787
+ historicalEndDate,
788
+ applyFilterOverride
751
789
  });
752
790
  if (result.ok) {
753
791
  return getSuccessToolResult(`backtest: ${encodePayload(result.value)}`);
package/dist/index.d.cts CHANGED
@@ -122,7 +122,7 @@ type McpRuntimeClient = {
122
122
  readonly getTeamThroughput: (id: number, range?: {
123
123
  readonly startDate: string;
124
124
  readonly endDate: string;
125
- }) => Promise<{
125
+ }, view?: "raw" | "filtered") => Promise<{
126
126
  readonly ok: true;
127
127
  readonly value: unknown;
128
128
  } | {
@@ -283,6 +283,7 @@ type McpRuntimeClient = {
283
283
  readonly runManualForecast: (teamId: number, payload: {
284
284
  readonly remainingItems?: number;
285
285
  readonly targetDate?: string;
286
+ readonly applyFilterOverride?: boolean;
286
287
  }) => Promise<{
287
288
  readonly ok: true;
288
289
  readonly value: unknown;
@@ -298,6 +299,7 @@ type McpRuntimeClient = {
298
299
  readonly endDate: string;
299
300
  readonly historicalStartDate: string;
300
301
  readonly historicalEndDate: string;
302
+ readonly applyFilterOverride?: boolean;
301
303
  }) => Promise<{
302
304
  readonly ok: true;
303
305
  readonly value: unknown;
package/dist/index.d.ts CHANGED
@@ -122,7 +122,7 @@ type McpRuntimeClient = {
122
122
  readonly getTeamThroughput: (id: number, range?: {
123
123
  readonly startDate: string;
124
124
  readonly endDate: string;
125
- }) => Promise<{
125
+ }, view?: "raw" | "filtered") => Promise<{
126
126
  readonly ok: true;
127
127
  readonly value: unknown;
128
128
  } | {
@@ -283,6 +283,7 @@ type McpRuntimeClient = {
283
283
  readonly runManualForecast: (teamId: number, payload: {
284
284
  readonly remainingItems?: number;
285
285
  readonly targetDate?: string;
286
+ readonly applyFilterOverride?: boolean;
286
287
  }) => Promise<{
287
288
  readonly ok: true;
288
289
  readonly value: unknown;
@@ -298,6 +299,7 @@ type McpRuntimeClient = {
298
299
  readonly endDate: string;
299
300
  readonly historicalStartDate: string;
300
301
  readonly historicalEndDate: string;
302
+ readonly applyFilterOverride?: boolean;
301
303
  }) => Promise<{
302
304
  readonly ok: true;
303
305
  readonly value: unknown;
package/dist/index.js CHANGED
@@ -32,6 +32,19 @@ var dateRangeProperties = {
32
32
  description: "Inclusive end date in ISO format (YYYY-MM-DD)."
33
33
  }
34
34
  };
35
+ var throughputFilterViewProperty = {
36
+ view: {
37
+ type: "string",
38
+ enum: ["raw", "filtered"],
39
+ description: `Forecast-filter view (Lighthouse v26.5.24.10+). "filtered" applies the team's exclusion rule to throughput. Omit or "raw" returns unfiltered data.`
40
+ }
41
+ };
42
+ var forecastFilterOverrideProperty = {
43
+ applyFilterOverride: {
44
+ type: "boolean",
45
+ description: "Override the team's forecast-filter setting (Lighthouse v26.5.24.10+). true = apply the team filter; false = skip the filter (raw); omit = respect the team setting."
46
+ }
47
+ };
35
48
  var toolDefinitions = [
36
49
  {
37
50
  name: "lighthouse_health_check",
@@ -85,12 +98,13 @@ var toolDefinitions = [
85
98
  },
86
99
  {
87
100
  name: "lighthouse_team_metrics_throughput",
88
- description: "Get throughput run-chart data for a team by ID, optionally filtered by start and end dates.",
101
+ description: `Get throughput run-chart data for a team by ID, optionally filtered by start and end dates. Pass view="filtered" to apply the team's forecast-exclusion rule (Lighthouse v26.5.24.10+); omit or "raw" returns unfiltered data.`,
89
102
  inputSchema: {
90
103
  type: "object",
91
104
  properties: {
92
105
  ...idInputSchema.properties,
93
- ...dateRangeProperties
106
+ ...dateRangeProperties,
107
+ ...throughputFilterViewProperty
94
108
  },
95
109
  required: ["id"],
96
110
  additionalProperties: false
@@ -210,7 +224,7 @@ var toolDefinitions = [
210
224
  },
211
225
  {
212
226
  name: "lighthouse_forecast_manual",
213
- description: "Run a manual forecast for a team by ID with optional remaining items and target date.",
227
+ description: "Run a manual forecast for a team by ID with optional remaining items and target date. Pass applyFilterOverride=true to apply the team's forecast filter, false to skip it, or omit to respect the team setting (Lighthouse v26.5.24.10+). The response includes filterApplied (boolean) and excludedSummary (string) when a filter was applied.",
214
228
  inputSchema: {
215
229
  type: "object",
216
230
  properties: {
@@ -222,7 +236,8 @@ var toolDefinitions = [
222
236
  targetDate: {
223
237
  type: "string",
224
238
  description: "Optional target date in ISO format (YYYY-MM-DD)."
225
- }
239
+ },
240
+ ...forecastFilterOverrideProperty
226
241
  },
227
242
  required: ["id"],
228
243
  additionalProperties: false
@@ -230,7 +245,7 @@ var toolDefinitions = [
230
245
  },
231
246
  {
232
247
  name: "lighthouse_forecast_backtest",
233
- description: "Run a forecast backtest for a team by ID using forecast and historical date ranges.",
248
+ description: "Run a forecast backtest for a team by ID using forecast and historical date ranges. Pass applyFilterOverride=true to apply the team's forecast filter, false to skip it, or omit to respect the team setting (Lighthouse v26.5.24.10+). The response includes filterApplied (boolean) and excludedSummary (string) when a filter was applied.",
234
249
  inputSchema: {
235
250
  type: "object",
236
251
  properties: {
@@ -250,7 +265,8 @@ var toolDefinitions = [
250
265
  historicalEndDate: {
251
266
  type: "string",
252
267
  description: "Historical sample end date in ISO format (YYYY-MM-DD)."
253
- }
268
+ },
269
+ ...forecastFilterOverrideProperty
254
270
  },
255
271
  required: [
256
272
  "id",
@@ -312,6 +328,20 @@ var getDateRange = (argumentsPayload) => {
312
328
  }
313
329
  return void 0;
314
330
  };
331
+ var getThroughputFilterView = (argumentsPayload) => {
332
+ if (!isObjectRecord(argumentsPayload)) {
333
+ return void 0;
334
+ }
335
+ const view = argumentsPayload.view;
336
+ return view === "raw" || view === "filtered" ? view : void 0;
337
+ };
338
+ var getApplyFilterOverride = (argumentsPayload) => {
339
+ if (!isObjectRecord(argumentsPayload)) {
340
+ return void 0;
341
+ }
342
+ const value = argumentsPayload.applyFilterOverride;
343
+ return typeof value === "boolean" ? value : void 0;
344
+ };
315
345
  var isoDateStringSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}$/u, "Expected ISO date in YYYY-MM-DD format.");
316
346
  var toolInputSchemas = {
317
347
  lighthouse_health_check: z.object({}),
@@ -327,7 +357,8 @@ var toolInputSchemas = {
327
357
  lighthouse_team_metrics_throughput: z.object({
328
358
  id: z.number().int(),
329
359
  startDate: isoDateStringSchema.optional(),
330
- endDate: isoDateStringSchema.optional()
360
+ endDate: isoDateStringSchema.optional(),
361
+ view: z.enum(["raw", "filtered"]).optional()
331
362
  }),
332
363
  lighthouse_team_metrics_cycleTimePercentiles: z.object({
333
364
  id: z.number().int(),
@@ -368,14 +399,16 @@ var toolInputSchemas = {
368
399
  lighthouse_forecast_manual: z.object({
369
400
  id: z.number().int(),
370
401
  remainingItems: z.number().int().optional(),
371
- targetDate: isoDateStringSchema.optional()
402
+ targetDate: isoDateStringSchema.optional(),
403
+ applyFilterOverride: z.boolean().optional()
372
404
  }),
373
405
  lighthouse_forecast_backtest: z.object({
374
406
  id: z.number().int(),
375
407
  startDate: isoDateStringSchema,
376
408
  endDate: isoDateStringSchema,
377
409
  historicalStartDate: isoDateStringSchema,
378
- historicalEndDate: isoDateStringSchema
410
+ historicalEndDate: isoDateStringSchema,
411
+ applyFilterOverride: z.boolean().optional()
379
412
  })
380
413
  };
381
414
  var isReadOnlyTool = (toolName) => !toolName.endsWith("_refresh");
@@ -508,7 +541,8 @@ var createMcpCoreRuntime = (dependencies) => ({
508
541
  return getErrorToolResult("team metrics: invalid id");
509
542
  }
510
543
  const range = getDateRange(argumentsPayload);
511
- const result = await client.getTeamThroughput(id, range);
544
+ const view = getThroughputFilterView(argumentsPayload);
545
+ const result = await client.getTeamThroughput(id, range, view);
512
546
  if (result.ok) {
513
547
  return getSuccessToolResult(
514
548
  `team throughput: ${encodePayload(result.value)}`
@@ -691,9 +725,11 @@ var createMcpCoreRuntime = (dependencies) => ({
691
725
  const payload = isObjectRecord(argumentsPayload) ? argumentsPayload : {};
692
726
  const remainingItems = typeof payload.remainingItems === "number" ? payload.remainingItems : void 0;
693
727
  const targetDate = typeof payload.targetDate === "string" ? payload.targetDate : void 0;
728
+ const applyFilterOverride = getApplyFilterOverride(argumentsPayload);
694
729
  const result = await client.runManualForecast(id, {
695
730
  remainingItems,
696
- targetDate
731
+ targetDate,
732
+ applyFilterOverride
697
733
  });
698
734
  if (result.ok) {
699
735
  return getSuccessToolResult(`forecast: ${encodePayload(result.value)}`);
@@ -717,11 +753,13 @@ var createMcpCoreRuntime = (dependencies) => ({
717
753
  "backtest: startDate, endDate, historicalStartDate, and historicalEndDate are required"
718
754
  );
719
755
  }
756
+ const applyFilterOverride = getApplyFilterOverride(argumentsPayload);
720
757
  const result = await client.runBacktest(id, {
721
758
  startDate,
722
759
  endDate,
723
760
  historicalStartDate,
724
- historicalEndDate
761
+ historicalEndDate,
762
+ applyFilterOverride
725
763
  });
726
764
  if (result.ok) {
727
765
  return getSuccessToolResult(`backtest: ${encodePayload(result.value)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letpeoplework/lighthouse-mcp-core",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Shared MCP semantics for Lighthouse",
5
5
  "repository": "https://github.com/LetPeopleWork/lighthouse-clients",
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "@modelcontextprotocol/sdk": "^1.26.0",
27
27
  "@toon-format/toon": "^2.1.0",
28
28
  "zod": "^3.24.1",
29
- "@letpeoplework/lighthouse-client": "1.0.1"
29
+ "@letpeoplework/lighthouse-client": "1.1.0"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsup src/index.ts --format esm,cjs --dts --clean",