@letpeoplework/lighthouse-mcp-core 1.6.0 → 1.7.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
@@ -25,6 +25,7 @@ __export(index_exports, {
25
25
  registerMcpTools: () => registerMcpTools
26
26
  });
27
27
  module.exports = __toCommonJS(index_exports);
28
+ var import_lighthouse_client = require("@letpeoplework/lighthouse-client");
28
29
  var import_toon = require("@toon-format/toon");
29
30
  var import_zod = require("zod");
30
31
  var getMcpCorePackageContract = () => ({
@@ -432,6 +433,23 @@ var toolDefinitions = [
432
433
  description: "List deliveries for a portfolio by portfolio ID.",
433
434
  inputSchema: idInputSchema
434
435
  },
436
+ {
437
+ name: "lighthouse_delivery_metrics",
438
+ description: `Get a delivery's recorded trend by delivery ID: one row per day with total, done and remaining work, the epic count and the likelihood. Set detail to "epics" for the per-epic breakdown and the forecast distribution, which are far larger. Forward-only, so it starts at the first recorded snapshot. Requires Lighthouse newer than v26.5.29.5.`,
439
+ inputSchema: {
440
+ type: "object",
441
+ properties: {
442
+ id: { type: "number", description: "Delivery ID." },
443
+ detail: {
444
+ type: "string",
445
+ enum: ["epics"],
446
+ description: 'Omit for one row per day. "epics" returns the whole recorded payload.'
447
+ }
448
+ },
449
+ required: ["id"],
450
+ additionalProperties: false
451
+ }
452
+ },
435
453
  {
436
454
  name: "lighthouse_blackout_list",
437
455
  description: "List the recurring blackout rules (recurring non-working days excluded from forecasts). Requires Lighthouse newer than v26.5.29.5.",
@@ -889,6 +907,10 @@ var toolInputSchemas = {
889
907
  }),
890
908
  lighthouse_feature_workitems: import_zod.z.object({ id: import_zod.z.number().int() }),
891
909
  lighthouse_delivery_list: import_zod.z.object({ id: import_zod.z.number().int() }),
910
+ lighthouse_delivery_metrics: import_zod.z.object({
911
+ id: import_zod.z.number().int(),
912
+ detail: import_zod.z.literal("epics").optional()
913
+ }),
892
914
  lighthouse_blackout_list: import_zod.z.object({}),
893
915
  lighthouse_blackout_create: recurringBlackoutRuleInputSchema,
894
916
  lighthouse_blackout_update: recurringBlackoutRuleInputSchema.extend({
@@ -1489,6 +1511,25 @@ var createMcpCoreRuntime = (dependencies) => ({
1489
1511
  `delivery: ${result.error.category} (${result.error.reason})`
1490
1512
  );
1491
1513
  }
1514
+ if (name === "lighthouse_delivery_metrics") {
1515
+ const id = getNumericId(argumentsPayload);
1516
+ if (id === null) {
1517
+ return getErrorToolResult(
1518
+ "delivery metrics: invalid id (delivery id required)"
1519
+ );
1520
+ }
1521
+ const wantsEpics = argumentsPayload?.detail === "epics";
1522
+ const result = await client.getDeliveryMetricsHistory(id);
1523
+ if (!result.ok) {
1524
+ return getErrorToolResult(
1525
+ `delivery metrics: ${result.error.category} (${result.error.reason})`
1526
+ );
1527
+ }
1528
+ const payload = wantsEpics ? result.value : (0, import_lighthouse_client.summariseDeliveryMetricsHistory)(result.value);
1529
+ return getSuccessToolResult(
1530
+ `delivery metrics: ${encodePayload(payload)}`
1531
+ );
1532
+ }
1492
1533
  if (name === "lighthouse_blackout_list") {
1493
1534
  const result = await client.getRecurringBlackoutRules();
1494
1535
  if (result.ok) {
package/dist/index.d.cts CHANGED
@@ -1,3 +1,4 @@
1
+ import { DeliveryMetricsHistory } from '@letpeoplework/lighthouse-client';
1
2
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
3
 
3
4
  type McpCorePackageContract = {
@@ -15,7 +16,7 @@ type McpToolResult = {
15
16
  readonly content: readonly McpToolContent[];
16
17
  };
17
18
  type McpToolDefinition = {
18
- readonly name: "lighthouse_health_check" | "lighthouse_version_get" | "lighthouse_worktracking_list" | "lighthouse_worktracking_get" | "lighthouse_team_list" | "lighthouse_team_get" | "lighthouse_team_refresh" | "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_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_blackout_list" | "lighthouse_blackout_create" | "lighthouse_blackout_update" | "lighthouse_blackout_delete" | "lighthouse_forecast_manual" | "lighthouse_forecast_backtest";
19
+ readonly name: "lighthouse_health_check" | "lighthouse_version_get" | "lighthouse_worktracking_list" | "lighthouse_worktracking_get" | "lighthouse_team_list" | "lighthouse_team_get" | "lighthouse_team_refresh" | "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_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";
19
20
  readonly description: string;
20
21
  readonly inputSchema: {
21
22
  readonly type: "object";
@@ -432,6 +433,16 @@ type McpRuntimeClient = {
432
433
  readonly reason: string;
433
434
  };
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
+ }>;
435
446
  readonly createDelivery: (portfolioId: number, payload: Readonly<Record<string, unknown>>) => Promise<{
436
447
  readonly ok: true;
437
448
  readonly value: unknown;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { DeliveryMetricsHistory } from '@letpeoplework/lighthouse-client';
1
2
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
3
 
3
4
  type McpCorePackageContract = {
@@ -15,7 +16,7 @@ type McpToolResult = {
15
16
  readonly content: readonly McpToolContent[];
16
17
  };
17
18
  type McpToolDefinition = {
18
- readonly name: "lighthouse_health_check" | "lighthouse_version_get" | "lighthouse_worktracking_list" | "lighthouse_worktracking_get" | "lighthouse_team_list" | "lighthouse_team_get" | "lighthouse_team_refresh" | "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_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_blackout_list" | "lighthouse_blackout_create" | "lighthouse_blackout_update" | "lighthouse_blackout_delete" | "lighthouse_forecast_manual" | "lighthouse_forecast_backtest";
19
+ readonly name: "lighthouse_health_check" | "lighthouse_version_get" | "lighthouse_worktracking_list" | "lighthouse_worktracking_get" | "lighthouse_team_list" | "lighthouse_team_get" | "lighthouse_team_refresh" | "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_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";
19
20
  readonly description: string;
20
21
  readonly inputSchema: {
21
22
  readonly type: "object";
@@ -432,6 +433,16 @@ type McpRuntimeClient = {
432
433
  readonly reason: string;
433
434
  };
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
+ }>;
435
446
  readonly createDelivery: (portfolioId: number, payload: Readonly<Record<string, unknown>>) => Promise<{
436
447
  readonly ok: true;
437
448
  readonly value: unknown;
package/dist/index.js CHANGED
@@ -1,4 +1,7 @@
1
1
  // src/index.ts
2
+ import {
3
+ summariseDeliveryMetricsHistory
4
+ } from "@letpeoplework/lighthouse-client";
2
5
  import { encode } from "@toon-format/toon";
3
6
  import { z } from "zod";
4
7
  var getMcpCorePackageContract = () => ({
@@ -406,6 +409,23 @@ var toolDefinitions = [
406
409
  description: "List deliveries for a portfolio by portfolio ID.",
407
410
  inputSchema: idInputSchema
408
411
  },
412
+ {
413
+ name: "lighthouse_delivery_metrics",
414
+ description: `Get a delivery's recorded trend by delivery ID: one row per day with total, done and remaining work, the epic count and the likelihood. Set detail to "epics" for the per-epic breakdown and the forecast distribution, which are far larger. Forward-only, so it starts at the first recorded snapshot. Requires Lighthouse newer than v26.5.29.5.`,
415
+ inputSchema: {
416
+ type: "object",
417
+ properties: {
418
+ id: { type: "number", description: "Delivery ID." },
419
+ detail: {
420
+ type: "string",
421
+ enum: ["epics"],
422
+ description: 'Omit for one row per day. "epics" returns the whole recorded payload.'
423
+ }
424
+ },
425
+ required: ["id"],
426
+ additionalProperties: false
427
+ }
428
+ },
409
429
  {
410
430
  name: "lighthouse_blackout_list",
411
431
  description: "List the recurring blackout rules (recurring non-working days excluded from forecasts). Requires Lighthouse newer than v26.5.29.5.",
@@ -863,6 +883,10 @@ var toolInputSchemas = {
863
883
  }),
864
884
  lighthouse_feature_workitems: z.object({ id: z.number().int() }),
865
885
  lighthouse_delivery_list: z.object({ id: z.number().int() }),
886
+ lighthouse_delivery_metrics: z.object({
887
+ id: z.number().int(),
888
+ detail: z.literal("epics").optional()
889
+ }),
866
890
  lighthouse_blackout_list: z.object({}),
867
891
  lighthouse_blackout_create: recurringBlackoutRuleInputSchema,
868
892
  lighthouse_blackout_update: recurringBlackoutRuleInputSchema.extend({
@@ -1463,6 +1487,25 @@ var createMcpCoreRuntime = (dependencies) => ({
1463
1487
  `delivery: ${result.error.category} (${result.error.reason})`
1464
1488
  );
1465
1489
  }
1490
+ if (name === "lighthouse_delivery_metrics") {
1491
+ const id = getNumericId(argumentsPayload);
1492
+ if (id === null) {
1493
+ return getErrorToolResult(
1494
+ "delivery metrics: invalid id (delivery id required)"
1495
+ );
1496
+ }
1497
+ const wantsEpics = argumentsPayload?.detail === "epics";
1498
+ const result = await client.getDeliveryMetricsHistory(id);
1499
+ if (!result.ok) {
1500
+ return getErrorToolResult(
1501
+ `delivery metrics: ${result.error.category} (${result.error.reason})`
1502
+ );
1503
+ }
1504
+ const payload = wantsEpics ? result.value : summariseDeliveryMetricsHistory(result.value);
1505
+ return getSuccessToolResult(
1506
+ `delivery metrics: ${encodePayload(payload)}`
1507
+ );
1508
+ }
1466
1509
  if (name === "lighthouse_blackout_list") {
1467
1510
  const result = await client.getRecurringBlackoutRules();
1468
1511
  if (result.ok) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letpeoplework/lighthouse-mcp-core",
3
- "version": "1.6.0",
3
+ "version": "1.7.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.7.0"
29
+ "@letpeoplework/lighthouse-client": "1.8.0"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsup src/index.ts --format esm,cjs --dts --clean",