@letpeoplework/lighthouse-mcp-core 0.7.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -148,6 +148,58 @@ var toolDefinitions = [
148
148
  additionalProperties: false
149
149
  }
150
150
  },
151
+ {
152
+ name: "lighthouse_team_metrics_workItemAge",
153
+ description: "Get per-item work item age over time for a team by ID. Returns daily snapshots with each in-progress item's age in days derived from its startedDate. Items without a startedDate are omitted.",
154
+ inputSchema: {
155
+ type: "object",
156
+ properties: {
157
+ ...idInputSchema.properties,
158
+ ...dateRangeProperties
159
+ },
160
+ required: ["id"],
161
+ additionalProperties: false
162
+ }
163
+ },
164
+ {
165
+ name: "lighthouse_team_metrics_totalWorkItemAge",
166
+ description: "Get the total (summed) work item age over time for a team by ID. Returns daily totals of all in-progress item ages derived from startedDate. Items without a startedDate are not counted.",
167
+ inputSchema: {
168
+ type: "object",
169
+ properties: {
170
+ ...idInputSchema.properties,
171
+ ...dateRangeProperties
172
+ },
173
+ required: ["id"],
174
+ additionalProperties: false
175
+ }
176
+ },
177
+ {
178
+ name: "lighthouse_portfolio_metrics_workItemAge",
179
+ description: "Get per-item work item age over time for a portfolio by ID. Returns daily snapshots with each in-progress item's age in days derived from its startedDate. Items without a startedDate are omitted.",
180
+ inputSchema: {
181
+ type: "object",
182
+ properties: {
183
+ ...idInputSchema.properties,
184
+ ...dateRangeProperties
185
+ },
186
+ required: ["id"],
187
+ additionalProperties: false
188
+ }
189
+ },
190
+ {
191
+ name: "lighthouse_portfolio_metrics_totalWorkItemAge",
192
+ description: "Get the total (summed) work item age over time for a portfolio by ID. Returns daily totals of all in-progress item ages derived from startedDate. Items without a startedDate are not counted.",
193
+ inputSchema: {
194
+ type: "object",
195
+ properties: {
196
+ ...idInputSchema.properties,
197
+ ...dateRangeProperties
198
+ },
199
+ required: ["id"],
200
+ additionalProperties: false
201
+ }
202
+ },
151
203
  {
152
204
  name: "lighthouse_feature_get",
153
205
  description: "Get feature details by numeric IDs or external reference IDs.",
@@ -308,11 +360,31 @@ var toolInputSchemas = {
308
360
  startDate: isoDateStringSchema.optional(),
309
361
  endDate: isoDateStringSchema.optional()
310
362
  }),
363
+ lighthouse_team_metrics_workItemAge: import_zod.z.object({
364
+ id: import_zod.z.number().int(),
365
+ startDate: isoDateStringSchema.optional(),
366
+ endDate: isoDateStringSchema.optional()
367
+ }),
368
+ lighthouse_team_metrics_totalWorkItemAge: import_zod.z.object({
369
+ id: import_zod.z.number().int(),
370
+ startDate: isoDateStringSchema.optional(),
371
+ endDate: isoDateStringSchema.optional()
372
+ }),
311
373
  lighthouse_portfolio_metrics_throughput: import_zod.z.object({
312
374
  id: import_zod.z.number().int(),
313
375
  startDate: isoDateStringSchema.optional(),
314
376
  endDate: isoDateStringSchema.optional()
315
377
  }),
378
+ lighthouse_portfolio_metrics_workItemAge: import_zod.z.object({
379
+ id: import_zod.z.number().int(),
380
+ startDate: isoDateStringSchema.optional(),
381
+ endDate: isoDateStringSchema.optional()
382
+ }),
383
+ lighthouse_portfolio_metrics_totalWorkItemAge: import_zod.z.object({
384
+ id: import_zod.z.number().int(),
385
+ startDate: isoDateStringSchema.optional(),
386
+ endDate: isoDateStringSchema.optional()
387
+ }),
316
388
  lighthouse_feature_get: import_zod.z.object({
317
389
  ids: import_zod.z.array(import_zod.z.number().int()).optional(),
318
390
  refs: import_zod.z.array(import_zod.z.string()).optional()
@@ -504,6 +576,73 @@ var createMcpCoreRuntime = (dependencies) => ({
504
576
  `portfolio metrics: ${result.error.category} (${result.error.reason})`
505
577
  );
506
578
  }
579
+ if (name === "lighthouse_team_metrics_workItemAge") {
580
+ const id = getNumericId(argumentsPayload);
581
+ if (id === null) {
582
+ return getErrorToolResult("team metrics: invalid id");
583
+ }
584
+ const range = getDateRange(argumentsPayload);
585
+ const result = await client.getTeamWorkItemAgeOverTime(id, range);
586
+ if (result.ok) {
587
+ return getSuccessToolResult(
588
+ `team workItemAge: ${encodePayload(result.value)}`
589
+ );
590
+ }
591
+ return getErrorToolResult(
592
+ `team metrics: ${result.error.category} (${result.error.reason})`
593
+ );
594
+ }
595
+ if (name === "lighthouse_team_metrics_totalWorkItemAge") {
596
+ const id = getNumericId(argumentsPayload);
597
+ if (id === null) {
598
+ return getErrorToolResult("team metrics: invalid id");
599
+ }
600
+ const range = getDateRange(argumentsPayload);
601
+ const result = await client.getTeamTotalWorkItemAgeOverTime(id, range);
602
+ if (result.ok) {
603
+ return getSuccessToolResult(
604
+ `team totalWorkItemAge: ${encodePayload(result.value)}`
605
+ );
606
+ }
607
+ return getErrorToolResult(
608
+ `team metrics: ${result.error.category} (${result.error.reason})`
609
+ );
610
+ }
611
+ if (name === "lighthouse_portfolio_metrics_workItemAge") {
612
+ const id = getNumericId(argumentsPayload);
613
+ if (id === null) {
614
+ return getErrorToolResult("portfolio metrics: invalid id");
615
+ }
616
+ const range = getDateRange(argumentsPayload);
617
+ const result = await client.getPortfolioWorkItemAgeOverTime(id, range);
618
+ if (result.ok) {
619
+ return getSuccessToolResult(
620
+ `portfolio workItemAge: ${encodePayload(result.value)}`
621
+ );
622
+ }
623
+ return getErrorToolResult(
624
+ `portfolio metrics: ${result.error.category} (${result.error.reason})`
625
+ );
626
+ }
627
+ if (name === "lighthouse_portfolio_metrics_totalWorkItemAge") {
628
+ const id = getNumericId(argumentsPayload);
629
+ if (id === null) {
630
+ return getErrorToolResult("portfolio metrics: invalid id");
631
+ }
632
+ const range = getDateRange(argumentsPayload);
633
+ const result = await client.getPortfolioTotalWorkItemAgeOverTime(
634
+ id,
635
+ range
636
+ );
637
+ if (result.ok) {
638
+ return getSuccessToolResult(
639
+ `portfolio totalWorkItemAge: ${encodePayload(result.value)}`
640
+ );
641
+ }
642
+ return getErrorToolResult(
643
+ `portfolio metrics: ${result.error.category} (${result.error.reason})`
644
+ );
645
+ }
507
646
  if (name === "lighthouse_feature_get") {
508
647
  const payload = isObjectRecord(argumentsPayload) ? argumentsPayload : {};
509
648
  const idsValue = payload.ids;
package/dist/index.d.cts CHANGED
@@ -15,7 +15,7 @@ type McpToolResult = {
15
15
  readonly content: readonly McpToolContent[];
16
16
  };
17
17
  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_portfolio_metrics_throughput" | "lighthouse_feature_get" | "lighthouse_feature_workitems" | "lighthouse_delivery_list" | "lighthouse_forecast_manual" | "lighthouse_forecast_backtest";
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_workItemAge" | "lighthouse_team_metrics_totalWorkItemAge" | "lighthouse_portfolio_metrics_throughput" | "lighthouse_portfolio_metrics_workItemAge" | "lighthouse_portfolio_metrics_totalWorkItemAge" | "lighthouse_feature_get" | "lighthouse_feature_workitems" | "lighthouse_delivery_list" | "lighthouse_forecast_manual" | "lighthouse_forecast_backtest";
19
19
  readonly description: string;
20
20
  readonly inputSchema: {
21
21
  readonly type: "object";
@@ -158,6 +158,58 @@ type McpRuntimeClient = {
158
158
  readonly reason: string;
159
159
  };
160
160
  }>;
161
+ readonly getTeamWorkItemAgeOverTime: (id: number, range?: {
162
+ readonly startDate: string;
163
+ readonly endDate: string;
164
+ }) => Promise<{
165
+ readonly ok: true;
166
+ readonly value: unknown;
167
+ } | {
168
+ readonly ok: false;
169
+ readonly error: {
170
+ readonly category: string;
171
+ readonly reason: string;
172
+ };
173
+ }>;
174
+ readonly getTeamTotalWorkItemAgeOverTime: (id: number, range?: {
175
+ readonly startDate: string;
176
+ readonly endDate: string;
177
+ }) => Promise<{
178
+ readonly ok: true;
179
+ readonly value: unknown;
180
+ } | {
181
+ readonly ok: false;
182
+ readonly error: {
183
+ readonly category: string;
184
+ readonly reason: string;
185
+ };
186
+ }>;
187
+ readonly getPortfolioWorkItemAgeOverTime: (id: number, range?: {
188
+ readonly startDate: string;
189
+ readonly endDate: string;
190
+ }) => Promise<{
191
+ readonly ok: true;
192
+ readonly value: unknown;
193
+ } | {
194
+ readonly ok: false;
195
+ readonly error: {
196
+ readonly category: string;
197
+ readonly reason: string;
198
+ };
199
+ }>;
200
+ readonly getPortfolioTotalWorkItemAgeOverTime: (id: number, range?: {
201
+ readonly startDate: string;
202
+ readonly endDate: string;
203
+ }) => Promise<{
204
+ readonly ok: true;
205
+ readonly value: unknown;
206
+ } | {
207
+ readonly ok: false;
208
+ readonly error: {
209
+ readonly category: string;
210
+ readonly reason: string;
211
+ };
212
+ }>;
161
213
  readonly getFeaturesByIds: (ids: readonly number[]) => Promise<{
162
214
  readonly ok: true;
163
215
  readonly value: readonly unknown[];
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ type McpToolResult = {
15
15
  readonly content: readonly McpToolContent[];
16
16
  };
17
17
  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_portfolio_metrics_throughput" | "lighthouse_feature_get" | "lighthouse_feature_workitems" | "lighthouse_delivery_list" | "lighthouse_forecast_manual" | "lighthouse_forecast_backtest";
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_workItemAge" | "lighthouse_team_metrics_totalWorkItemAge" | "lighthouse_portfolio_metrics_throughput" | "lighthouse_portfolio_metrics_workItemAge" | "lighthouse_portfolio_metrics_totalWorkItemAge" | "lighthouse_feature_get" | "lighthouse_feature_workitems" | "lighthouse_delivery_list" | "lighthouse_forecast_manual" | "lighthouse_forecast_backtest";
19
19
  readonly description: string;
20
20
  readonly inputSchema: {
21
21
  readonly type: "object";
@@ -158,6 +158,58 @@ type McpRuntimeClient = {
158
158
  readonly reason: string;
159
159
  };
160
160
  }>;
161
+ readonly getTeamWorkItemAgeOverTime: (id: number, range?: {
162
+ readonly startDate: string;
163
+ readonly endDate: string;
164
+ }) => Promise<{
165
+ readonly ok: true;
166
+ readonly value: unknown;
167
+ } | {
168
+ readonly ok: false;
169
+ readonly error: {
170
+ readonly category: string;
171
+ readonly reason: string;
172
+ };
173
+ }>;
174
+ readonly getTeamTotalWorkItemAgeOverTime: (id: number, range?: {
175
+ readonly startDate: string;
176
+ readonly endDate: string;
177
+ }) => Promise<{
178
+ readonly ok: true;
179
+ readonly value: unknown;
180
+ } | {
181
+ readonly ok: false;
182
+ readonly error: {
183
+ readonly category: string;
184
+ readonly reason: string;
185
+ };
186
+ }>;
187
+ readonly getPortfolioWorkItemAgeOverTime: (id: number, range?: {
188
+ readonly startDate: string;
189
+ readonly endDate: string;
190
+ }) => Promise<{
191
+ readonly ok: true;
192
+ readonly value: unknown;
193
+ } | {
194
+ readonly ok: false;
195
+ readonly error: {
196
+ readonly category: string;
197
+ readonly reason: string;
198
+ };
199
+ }>;
200
+ readonly getPortfolioTotalWorkItemAgeOverTime: (id: number, range?: {
201
+ readonly startDate: string;
202
+ readonly endDate: string;
203
+ }) => Promise<{
204
+ readonly ok: true;
205
+ readonly value: unknown;
206
+ } | {
207
+ readonly ok: false;
208
+ readonly error: {
209
+ readonly category: string;
210
+ readonly reason: string;
211
+ };
212
+ }>;
161
213
  readonly getFeaturesByIds: (ids: readonly number[]) => Promise<{
162
214
  readonly ok: true;
163
215
  readonly value: readonly unknown[];
package/dist/index.js CHANGED
@@ -122,6 +122,58 @@ var toolDefinitions = [
122
122
  additionalProperties: false
123
123
  }
124
124
  },
125
+ {
126
+ name: "lighthouse_team_metrics_workItemAge",
127
+ description: "Get per-item work item age over time for a team by ID. Returns daily snapshots with each in-progress item's age in days derived from its startedDate. Items without a startedDate are omitted.",
128
+ inputSchema: {
129
+ type: "object",
130
+ properties: {
131
+ ...idInputSchema.properties,
132
+ ...dateRangeProperties
133
+ },
134
+ required: ["id"],
135
+ additionalProperties: false
136
+ }
137
+ },
138
+ {
139
+ name: "lighthouse_team_metrics_totalWorkItemAge",
140
+ description: "Get the total (summed) work item age over time for a team by ID. Returns daily totals of all in-progress item ages derived from startedDate. Items without a startedDate are not counted.",
141
+ inputSchema: {
142
+ type: "object",
143
+ properties: {
144
+ ...idInputSchema.properties,
145
+ ...dateRangeProperties
146
+ },
147
+ required: ["id"],
148
+ additionalProperties: false
149
+ }
150
+ },
151
+ {
152
+ name: "lighthouse_portfolio_metrics_workItemAge",
153
+ description: "Get per-item work item age over time for a portfolio by ID. Returns daily snapshots with each in-progress item's age in days derived from its startedDate. Items without a startedDate are omitted.",
154
+ inputSchema: {
155
+ type: "object",
156
+ properties: {
157
+ ...idInputSchema.properties,
158
+ ...dateRangeProperties
159
+ },
160
+ required: ["id"],
161
+ additionalProperties: false
162
+ }
163
+ },
164
+ {
165
+ name: "lighthouse_portfolio_metrics_totalWorkItemAge",
166
+ description: "Get the total (summed) work item age over time for a portfolio by ID. Returns daily totals of all in-progress item ages derived from startedDate. Items without a startedDate are not counted.",
167
+ inputSchema: {
168
+ type: "object",
169
+ properties: {
170
+ ...idInputSchema.properties,
171
+ ...dateRangeProperties
172
+ },
173
+ required: ["id"],
174
+ additionalProperties: false
175
+ }
176
+ },
125
177
  {
126
178
  name: "lighthouse_feature_get",
127
179
  description: "Get feature details by numeric IDs or external reference IDs.",
@@ -282,11 +334,31 @@ var toolInputSchemas = {
282
334
  startDate: isoDateStringSchema.optional(),
283
335
  endDate: isoDateStringSchema.optional()
284
336
  }),
337
+ lighthouse_team_metrics_workItemAge: z.object({
338
+ id: z.number().int(),
339
+ startDate: isoDateStringSchema.optional(),
340
+ endDate: isoDateStringSchema.optional()
341
+ }),
342
+ lighthouse_team_metrics_totalWorkItemAge: z.object({
343
+ id: z.number().int(),
344
+ startDate: isoDateStringSchema.optional(),
345
+ endDate: isoDateStringSchema.optional()
346
+ }),
285
347
  lighthouse_portfolio_metrics_throughput: z.object({
286
348
  id: z.number().int(),
287
349
  startDate: isoDateStringSchema.optional(),
288
350
  endDate: isoDateStringSchema.optional()
289
351
  }),
352
+ lighthouse_portfolio_metrics_workItemAge: z.object({
353
+ id: z.number().int(),
354
+ startDate: isoDateStringSchema.optional(),
355
+ endDate: isoDateStringSchema.optional()
356
+ }),
357
+ lighthouse_portfolio_metrics_totalWorkItemAge: z.object({
358
+ id: z.number().int(),
359
+ startDate: isoDateStringSchema.optional(),
360
+ endDate: isoDateStringSchema.optional()
361
+ }),
290
362
  lighthouse_feature_get: z.object({
291
363
  ids: z.array(z.number().int()).optional(),
292
364
  refs: z.array(z.string()).optional()
@@ -478,6 +550,73 @@ var createMcpCoreRuntime = (dependencies) => ({
478
550
  `portfolio metrics: ${result.error.category} (${result.error.reason})`
479
551
  );
480
552
  }
553
+ if (name === "lighthouse_team_metrics_workItemAge") {
554
+ const id = getNumericId(argumentsPayload);
555
+ if (id === null) {
556
+ return getErrorToolResult("team metrics: invalid id");
557
+ }
558
+ const range = getDateRange(argumentsPayload);
559
+ const result = await client.getTeamWorkItemAgeOverTime(id, range);
560
+ if (result.ok) {
561
+ return getSuccessToolResult(
562
+ `team workItemAge: ${encodePayload(result.value)}`
563
+ );
564
+ }
565
+ return getErrorToolResult(
566
+ `team metrics: ${result.error.category} (${result.error.reason})`
567
+ );
568
+ }
569
+ if (name === "lighthouse_team_metrics_totalWorkItemAge") {
570
+ const id = getNumericId(argumentsPayload);
571
+ if (id === null) {
572
+ return getErrorToolResult("team metrics: invalid id");
573
+ }
574
+ const range = getDateRange(argumentsPayload);
575
+ const result = await client.getTeamTotalWorkItemAgeOverTime(id, range);
576
+ if (result.ok) {
577
+ return getSuccessToolResult(
578
+ `team totalWorkItemAge: ${encodePayload(result.value)}`
579
+ );
580
+ }
581
+ return getErrorToolResult(
582
+ `team metrics: ${result.error.category} (${result.error.reason})`
583
+ );
584
+ }
585
+ if (name === "lighthouse_portfolio_metrics_workItemAge") {
586
+ const id = getNumericId(argumentsPayload);
587
+ if (id === null) {
588
+ return getErrorToolResult("portfolio metrics: invalid id");
589
+ }
590
+ const range = getDateRange(argumentsPayload);
591
+ const result = await client.getPortfolioWorkItemAgeOverTime(id, range);
592
+ if (result.ok) {
593
+ return getSuccessToolResult(
594
+ `portfolio workItemAge: ${encodePayload(result.value)}`
595
+ );
596
+ }
597
+ return getErrorToolResult(
598
+ `portfolio metrics: ${result.error.category} (${result.error.reason})`
599
+ );
600
+ }
601
+ if (name === "lighthouse_portfolio_metrics_totalWorkItemAge") {
602
+ const id = getNumericId(argumentsPayload);
603
+ if (id === null) {
604
+ return getErrorToolResult("portfolio metrics: invalid id");
605
+ }
606
+ const range = getDateRange(argumentsPayload);
607
+ const result = await client.getPortfolioTotalWorkItemAgeOverTime(
608
+ id,
609
+ range
610
+ );
611
+ if (result.ok) {
612
+ return getSuccessToolResult(
613
+ `portfolio totalWorkItemAge: ${encodePayload(result.value)}`
614
+ );
615
+ }
616
+ return getErrorToolResult(
617
+ `portfolio metrics: ${result.error.category} (${result.error.reason})`
618
+ );
619
+ }
481
620
  if (name === "lighthouse_feature_get") {
482
621
  const payload = isObjectRecord(argumentsPayload) ? argumentsPayload : {};
483
622
  const idsValue = payload.ids;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letpeoplework/lighthouse-mcp-core",
3
- "version": "0.7.0",
3
+ "version": "1.0.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": "0.8.0"
29
+ "@letpeoplework/lighthouse-client": "1.0.0"
30
30
  },
31
31
  "scripts": {
32
32
  "build": "tsup src/index.ts --format esm,cjs --dts --clean",