@letpeoplework/lighthouse-mcp-core 1.2.0 → 1.3.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 +145 -1
- package/dist/index.d.cts +42 -2
- package/dist/index.d.ts +42 -2
- package/dist/index.js +145 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -84,6 +84,40 @@ var forecastFilterOverrideProperty = {
|
|
|
84
84
|
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."
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
|
+
var recurringBlackoutRuleProperties = {
|
|
88
|
+
weekdays: {
|
|
89
|
+
type: "array",
|
|
90
|
+
items: {
|
|
91
|
+
type: "string",
|
|
92
|
+
enum: [
|
|
93
|
+
"Sunday",
|
|
94
|
+
"Monday",
|
|
95
|
+
"Tuesday",
|
|
96
|
+
"Wednesday",
|
|
97
|
+
"Thursday",
|
|
98
|
+
"Friday",
|
|
99
|
+
"Saturday"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
description: "Weekdays the rule applies to."
|
|
103
|
+
},
|
|
104
|
+
intervalWeeks: {
|
|
105
|
+
type: "integer",
|
|
106
|
+
description: "Repeat every N weeks (1 = every week)."
|
|
107
|
+
},
|
|
108
|
+
start: {
|
|
109
|
+
type: "string",
|
|
110
|
+
description: "Rule start date in ISO format (YYYY-MM-DD)."
|
|
111
|
+
},
|
|
112
|
+
end: {
|
|
113
|
+
type: ["string", "null"],
|
|
114
|
+
description: "Optional end date in ISO format (YYYY-MM-DD), or null for an open end."
|
|
115
|
+
},
|
|
116
|
+
description: {
|
|
117
|
+
type: "string",
|
|
118
|
+
description: "Human-readable description of the rule."
|
|
119
|
+
}
|
|
120
|
+
};
|
|
87
121
|
var toolDefinitions = [
|
|
88
122
|
{
|
|
89
123
|
name: "lighthouse_health_check",
|
|
@@ -261,6 +295,41 @@ var toolDefinitions = [
|
|
|
261
295
|
description: "List deliveries for a portfolio by portfolio ID.",
|
|
262
296
|
inputSchema: idInputSchema
|
|
263
297
|
},
|
|
298
|
+
{
|
|
299
|
+
name: "lighthouse_blackout_list",
|
|
300
|
+
description: "List the recurring blackout rules (recurring non-working days excluded from forecasts). Requires Lighthouse newer than v26.5.29.5.",
|
|
301
|
+
inputSchema: emptyInputSchema
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
name: "lighthouse_blackout_create",
|
|
305
|
+
description: "Create a recurring blackout rule (weekdays + every-N-weeks interval + start date + optional open end). Premium, system-admin only. Requires Lighthouse newer than v26.5.29.5.",
|
|
306
|
+
inputSchema: {
|
|
307
|
+
type: "object",
|
|
308
|
+
properties: {
|
|
309
|
+
...recurringBlackoutRuleProperties
|
|
310
|
+
},
|
|
311
|
+
required: ["weekdays", "intervalWeeks", "start", "description"],
|
|
312
|
+
additionalProperties: false
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: "lighthouse_blackout_update",
|
|
317
|
+
description: "Update a recurring blackout rule by ID. Premium, system-admin only. Requires Lighthouse newer than v26.5.29.5.",
|
|
318
|
+
inputSchema: {
|
|
319
|
+
type: "object",
|
|
320
|
+
properties: {
|
|
321
|
+
...idInputSchema.properties,
|
|
322
|
+
...recurringBlackoutRuleProperties
|
|
323
|
+
},
|
|
324
|
+
required: ["id", "weekdays", "intervalWeeks", "start", "description"],
|
|
325
|
+
additionalProperties: false
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
name: "lighthouse_blackout_delete",
|
|
330
|
+
description: "Delete a recurring blackout rule by ID. Premium, system-admin only. Requires Lighthouse newer than v26.5.29.5.",
|
|
331
|
+
inputSchema: idInputSchema
|
|
332
|
+
},
|
|
264
333
|
{
|
|
265
334
|
name: "lighthouse_forecast_manual",
|
|
266
335
|
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.",
|
|
@@ -486,6 +555,22 @@ var getApplyFilterOverride = (argumentsPayload) => {
|
|
|
486
555
|
return typeof value === "boolean" ? value : void 0;
|
|
487
556
|
};
|
|
488
557
|
var isoDateStringSchema = import_zod.z.string().regex(/^\d{4}-\d{2}-\d{2}$/u, "Expected ISO date in YYYY-MM-DD format.");
|
|
558
|
+
var weekdaySchema = import_zod.z.enum([
|
|
559
|
+
"Sunday",
|
|
560
|
+
"Monday",
|
|
561
|
+
"Tuesday",
|
|
562
|
+
"Wednesday",
|
|
563
|
+
"Thursday",
|
|
564
|
+
"Friday",
|
|
565
|
+
"Saturday"
|
|
566
|
+
]);
|
|
567
|
+
var recurringBlackoutRuleInputSchema = import_zod.z.object({
|
|
568
|
+
weekdays: import_zod.z.array(weekdaySchema),
|
|
569
|
+
intervalWeeks: import_zod.z.number().int(),
|
|
570
|
+
start: isoDateStringSchema,
|
|
571
|
+
end: isoDateStringSchema.nullable().optional(),
|
|
572
|
+
description: import_zod.z.string()
|
|
573
|
+
});
|
|
489
574
|
var toolInputSchemas = {
|
|
490
575
|
lighthouse_health_check: import_zod.z.object({}),
|
|
491
576
|
lighthouse_version_get: import_zod.z.object({}),
|
|
@@ -575,6 +660,12 @@ var toolInputSchemas = {
|
|
|
575
660
|
}),
|
|
576
661
|
lighthouse_feature_workitems: import_zod.z.object({ id: import_zod.z.number().int() }),
|
|
577
662
|
lighthouse_delivery_list: import_zod.z.object({ id: import_zod.z.number().int() }),
|
|
663
|
+
lighthouse_blackout_list: import_zod.z.object({}),
|
|
664
|
+
lighthouse_blackout_create: recurringBlackoutRuleInputSchema,
|
|
665
|
+
lighthouse_blackout_update: recurringBlackoutRuleInputSchema.extend({
|
|
666
|
+
id: import_zod.z.number().int()
|
|
667
|
+
}),
|
|
668
|
+
lighthouse_blackout_delete: import_zod.z.object({ id: import_zod.z.number().int() }),
|
|
578
669
|
lighthouse_forecast_manual: import_zod.z.object({
|
|
579
670
|
id: import_zod.z.number().int(),
|
|
580
671
|
remainingItems: import_zod.z.number().int().optional(),
|
|
@@ -590,7 +681,7 @@ var toolInputSchemas = {
|
|
|
590
681
|
applyFilterOverride: import_zod.z.boolean().optional()
|
|
591
682
|
})
|
|
592
683
|
};
|
|
593
|
-
var isReadOnlyTool = (toolName) => !toolName.endsWith("_refresh");
|
|
684
|
+
var isReadOnlyTool = (toolName) => !(toolName.endsWith("_refresh") || toolName.endsWith("_create") || toolName.endsWith("_update") || toolName.endsWith("_delete"));
|
|
594
685
|
var createMcpCoreRuntime = (dependencies) => ({
|
|
595
686
|
listTools: () => toolDefinitions,
|
|
596
687
|
callTool: async (name, argumentsPayload) => {
|
|
@@ -1018,6 +1109,59 @@ var createMcpCoreRuntime = (dependencies) => ({
|
|
|
1018
1109
|
`delivery: ${result.error.category} (${result.error.reason})`
|
|
1019
1110
|
);
|
|
1020
1111
|
}
|
|
1112
|
+
if (name === "lighthouse_blackout_list") {
|
|
1113
|
+
const result = await client.getRecurringBlackoutRules();
|
|
1114
|
+
if (result.ok) {
|
|
1115
|
+
return getSuccessToolResult(
|
|
1116
|
+
`recurringBlackoutRules: ${encodePayload(result.value)}`
|
|
1117
|
+
);
|
|
1118
|
+
}
|
|
1119
|
+
return getErrorToolResult(
|
|
1120
|
+
`blackout: ${result.error.category} (${result.error.reason})`
|
|
1121
|
+
);
|
|
1122
|
+
}
|
|
1123
|
+
if (name === "lighthouse_blackout_create") {
|
|
1124
|
+
const payload = isObjectRecord(argumentsPayload) ? argumentsPayload : {};
|
|
1125
|
+
const result = await client.createRecurringBlackoutRule(payload);
|
|
1126
|
+
if (result.ok) {
|
|
1127
|
+
return getSuccessToolResult(
|
|
1128
|
+
`recurringBlackoutRule: ${encodePayload(result.value)}`
|
|
1129
|
+
);
|
|
1130
|
+
}
|
|
1131
|
+
return getErrorToolResult(
|
|
1132
|
+
`blackout: ${result.error.category} (${result.error.reason})`
|
|
1133
|
+
);
|
|
1134
|
+
}
|
|
1135
|
+
if (name === "lighthouse_blackout_update") {
|
|
1136
|
+
const id = getNumericId(argumentsPayload);
|
|
1137
|
+
if (id === null) {
|
|
1138
|
+
return getErrorToolResult("blackout: invalid id (rule id required)");
|
|
1139
|
+
}
|
|
1140
|
+
const payload = isObjectRecord(argumentsPayload) ? argumentsPayload : {};
|
|
1141
|
+
const { id: _ignoredId, ...rulePayload } = payload;
|
|
1142
|
+
const result = await client.updateRecurringBlackoutRule(id, rulePayload);
|
|
1143
|
+
if (result.ok) {
|
|
1144
|
+
return getSuccessToolResult(
|
|
1145
|
+
`recurringBlackoutRule: ${encodePayload(result.value)}`
|
|
1146
|
+
);
|
|
1147
|
+
}
|
|
1148
|
+
return getErrorToolResult(
|
|
1149
|
+
`blackout: ${result.error.category} (${result.error.reason})`
|
|
1150
|
+
);
|
|
1151
|
+
}
|
|
1152
|
+
if (name === "lighthouse_blackout_delete") {
|
|
1153
|
+
const id = getNumericId(argumentsPayload);
|
|
1154
|
+
if (id === null) {
|
|
1155
|
+
return getErrorToolResult("blackout: invalid id (rule id required)");
|
|
1156
|
+
}
|
|
1157
|
+
const result = await client.deleteRecurringBlackoutRule(id);
|
|
1158
|
+
if (result.ok) {
|
|
1159
|
+
return getSuccessToolResult(`recurringBlackoutRule deleted: ${id}`);
|
|
1160
|
+
}
|
|
1161
|
+
return getErrorToolResult(
|
|
1162
|
+
`blackout: ${result.error.category} (${result.error.reason})`
|
|
1163
|
+
);
|
|
1164
|
+
}
|
|
1021
1165
|
if (name === "lighthouse_forecast_manual") {
|
|
1022
1166
|
const id = getNumericId(argumentsPayload);
|
|
1023
1167
|
if (id === null) {
|
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_team_metrics_workItemAge" | "lighthouse_team_metrics_totalWorkItemAge" | "lighthouse_portfolio_metrics_throughput" | "lighthouse_portfolio_metrics_workItemAge" | "lighthouse_portfolio_metrics_totalWorkItemAge" | "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_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_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
19
|
readonly description: string;
|
|
20
20
|
readonly inputSchema: {
|
|
21
21
|
readonly type: "object";
|
|
@@ -26,7 +26,7 @@ type McpToolDefinition = {
|
|
|
26
26
|
};
|
|
27
27
|
type McpRuntimeClient = {
|
|
28
28
|
readonly checkConnectivity: () => Promise<{
|
|
29
|
-
readonly category: "success" | "unreachable" | "misconfigured" | "unauthorized" | "dependency-failure" | "unexpected";
|
|
29
|
+
readonly category: "success" | "unreachable" | "misconfigured" | "unauthorized" | "dependency-failure" | "concurrency-conflict" | "unexpected";
|
|
30
30
|
readonly reason?: string;
|
|
31
31
|
}>;
|
|
32
32
|
readonly getVersion: () => Promise<{
|
|
@@ -358,6 +358,46 @@ type McpRuntimeClient = {
|
|
|
358
358
|
readonly reason: string;
|
|
359
359
|
};
|
|
360
360
|
}>;
|
|
361
|
+
readonly getRecurringBlackoutRules: () => Promise<{
|
|
362
|
+
readonly ok: true;
|
|
363
|
+
readonly value: readonly unknown[];
|
|
364
|
+
} | {
|
|
365
|
+
readonly ok: false;
|
|
366
|
+
readonly error: {
|
|
367
|
+
readonly category: string;
|
|
368
|
+
readonly reason: string;
|
|
369
|
+
};
|
|
370
|
+
}>;
|
|
371
|
+
readonly createRecurringBlackoutRule: (payload: Readonly<Record<string, unknown>>) => Promise<{
|
|
372
|
+
readonly ok: true;
|
|
373
|
+
readonly value: unknown;
|
|
374
|
+
} | {
|
|
375
|
+
readonly ok: false;
|
|
376
|
+
readonly error: {
|
|
377
|
+
readonly category: string;
|
|
378
|
+
readonly reason: string;
|
|
379
|
+
};
|
|
380
|
+
}>;
|
|
381
|
+
readonly updateRecurringBlackoutRule: (id: number, payload: Readonly<Record<string, unknown>>) => Promise<{
|
|
382
|
+
readonly ok: true;
|
|
383
|
+
readonly value: unknown;
|
|
384
|
+
} | {
|
|
385
|
+
readonly ok: false;
|
|
386
|
+
readonly error: {
|
|
387
|
+
readonly category: string;
|
|
388
|
+
readonly reason: string;
|
|
389
|
+
};
|
|
390
|
+
}>;
|
|
391
|
+
readonly deleteRecurringBlackoutRule: (id: number) => Promise<{
|
|
392
|
+
readonly ok: true;
|
|
393
|
+
readonly value: undefined;
|
|
394
|
+
} | {
|
|
395
|
+
readonly ok: false;
|
|
396
|
+
readonly error: {
|
|
397
|
+
readonly category: string;
|
|
398
|
+
readonly reason: string;
|
|
399
|
+
};
|
|
400
|
+
}>;
|
|
361
401
|
readonly runManualForecast: (teamId: number, payload: {
|
|
362
402
|
readonly remainingItems?: number;
|
|
363
403
|
readonly targetDate?: string;
|
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_team_metrics_workItemAge" | "lighthouse_team_metrics_totalWorkItemAge" | "lighthouse_portfolio_metrics_throughput" | "lighthouse_portfolio_metrics_workItemAge" | "lighthouse_portfolio_metrics_totalWorkItemAge" | "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_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_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
19
|
readonly description: string;
|
|
20
20
|
readonly inputSchema: {
|
|
21
21
|
readonly type: "object";
|
|
@@ -26,7 +26,7 @@ type McpToolDefinition = {
|
|
|
26
26
|
};
|
|
27
27
|
type McpRuntimeClient = {
|
|
28
28
|
readonly checkConnectivity: () => Promise<{
|
|
29
|
-
readonly category: "success" | "unreachable" | "misconfigured" | "unauthorized" | "dependency-failure" | "unexpected";
|
|
29
|
+
readonly category: "success" | "unreachable" | "misconfigured" | "unauthorized" | "dependency-failure" | "concurrency-conflict" | "unexpected";
|
|
30
30
|
readonly reason?: string;
|
|
31
31
|
}>;
|
|
32
32
|
readonly getVersion: () => Promise<{
|
|
@@ -358,6 +358,46 @@ type McpRuntimeClient = {
|
|
|
358
358
|
readonly reason: string;
|
|
359
359
|
};
|
|
360
360
|
}>;
|
|
361
|
+
readonly getRecurringBlackoutRules: () => Promise<{
|
|
362
|
+
readonly ok: true;
|
|
363
|
+
readonly value: readonly unknown[];
|
|
364
|
+
} | {
|
|
365
|
+
readonly ok: false;
|
|
366
|
+
readonly error: {
|
|
367
|
+
readonly category: string;
|
|
368
|
+
readonly reason: string;
|
|
369
|
+
};
|
|
370
|
+
}>;
|
|
371
|
+
readonly createRecurringBlackoutRule: (payload: Readonly<Record<string, unknown>>) => Promise<{
|
|
372
|
+
readonly ok: true;
|
|
373
|
+
readonly value: unknown;
|
|
374
|
+
} | {
|
|
375
|
+
readonly ok: false;
|
|
376
|
+
readonly error: {
|
|
377
|
+
readonly category: string;
|
|
378
|
+
readonly reason: string;
|
|
379
|
+
};
|
|
380
|
+
}>;
|
|
381
|
+
readonly updateRecurringBlackoutRule: (id: number, payload: Readonly<Record<string, unknown>>) => Promise<{
|
|
382
|
+
readonly ok: true;
|
|
383
|
+
readonly value: unknown;
|
|
384
|
+
} | {
|
|
385
|
+
readonly ok: false;
|
|
386
|
+
readonly error: {
|
|
387
|
+
readonly category: string;
|
|
388
|
+
readonly reason: string;
|
|
389
|
+
};
|
|
390
|
+
}>;
|
|
391
|
+
readonly deleteRecurringBlackoutRule: (id: number) => Promise<{
|
|
392
|
+
readonly ok: true;
|
|
393
|
+
readonly value: undefined;
|
|
394
|
+
} | {
|
|
395
|
+
readonly ok: false;
|
|
396
|
+
readonly error: {
|
|
397
|
+
readonly category: string;
|
|
398
|
+
readonly reason: string;
|
|
399
|
+
};
|
|
400
|
+
}>;
|
|
361
401
|
readonly runManualForecast: (teamId: number, payload: {
|
|
362
402
|
readonly remainingItems?: number;
|
|
363
403
|
readonly targetDate?: string;
|
package/dist/index.js
CHANGED
|
@@ -58,6 +58,40 @@ var forecastFilterOverrideProperty = {
|
|
|
58
58
|
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."
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
+
var recurringBlackoutRuleProperties = {
|
|
62
|
+
weekdays: {
|
|
63
|
+
type: "array",
|
|
64
|
+
items: {
|
|
65
|
+
type: "string",
|
|
66
|
+
enum: [
|
|
67
|
+
"Sunday",
|
|
68
|
+
"Monday",
|
|
69
|
+
"Tuesday",
|
|
70
|
+
"Wednesday",
|
|
71
|
+
"Thursday",
|
|
72
|
+
"Friday",
|
|
73
|
+
"Saturday"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
description: "Weekdays the rule applies to."
|
|
77
|
+
},
|
|
78
|
+
intervalWeeks: {
|
|
79
|
+
type: "integer",
|
|
80
|
+
description: "Repeat every N weeks (1 = every week)."
|
|
81
|
+
},
|
|
82
|
+
start: {
|
|
83
|
+
type: "string",
|
|
84
|
+
description: "Rule start date in ISO format (YYYY-MM-DD)."
|
|
85
|
+
},
|
|
86
|
+
end: {
|
|
87
|
+
type: ["string", "null"],
|
|
88
|
+
description: "Optional end date in ISO format (YYYY-MM-DD), or null for an open end."
|
|
89
|
+
},
|
|
90
|
+
description: {
|
|
91
|
+
type: "string",
|
|
92
|
+
description: "Human-readable description of the rule."
|
|
93
|
+
}
|
|
94
|
+
};
|
|
61
95
|
var toolDefinitions = [
|
|
62
96
|
{
|
|
63
97
|
name: "lighthouse_health_check",
|
|
@@ -235,6 +269,41 @@ var toolDefinitions = [
|
|
|
235
269
|
description: "List deliveries for a portfolio by portfolio ID.",
|
|
236
270
|
inputSchema: idInputSchema
|
|
237
271
|
},
|
|
272
|
+
{
|
|
273
|
+
name: "lighthouse_blackout_list",
|
|
274
|
+
description: "List the recurring blackout rules (recurring non-working days excluded from forecasts). Requires Lighthouse newer than v26.5.29.5.",
|
|
275
|
+
inputSchema: emptyInputSchema
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
name: "lighthouse_blackout_create",
|
|
279
|
+
description: "Create a recurring blackout rule (weekdays + every-N-weeks interval + start date + optional open end). Premium, system-admin only. Requires Lighthouse newer than v26.5.29.5.",
|
|
280
|
+
inputSchema: {
|
|
281
|
+
type: "object",
|
|
282
|
+
properties: {
|
|
283
|
+
...recurringBlackoutRuleProperties
|
|
284
|
+
},
|
|
285
|
+
required: ["weekdays", "intervalWeeks", "start", "description"],
|
|
286
|
+
additionalProperties: false
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: "lighthouse_blackout_update",
|
|
291
|
+
description: "Update a recurring blackout rule by ID. Premium, system-admin only. Requires Lighthouse newer than v26.5.29.5.",
|
|
292
|
+
inputSchema: {
|
|
293
|
+
type: "object",
|
|
294
|
+
properties: {
|
|
295
|
+
...idInputSchema.properties,
|
|
296
|
+
...recurringBlackoutRuleProperties
|
|
297
|
+
},
|
|
298
|
+
required: ["id", "weekdays", "intervalWeeks", "start", "description"],
|
|
299
|
+
additionalProperties: false
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
name: "lighthouse_blackout_delete",
|
|
304
|
+
description: "Delete a recurring blackout rule by ID. Premium, system-admin only. Requires Lighthouse newer than v26.5.29.5.",
|
|
305
|
+
inputSchema: idInputSchema
|
|
306
|
+
},
|
|
238
307
|
{
|
|
239
308
|
name: "lighthouse_forecast_manual",
|
|
240
309
|
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.",
|
|
@@ -460,6 +529,22 @@ var getApplyFilterOverride = (argumentsPayload) => {
|
|
|
460
529
|
return typeof value === "boolean" ? value : void 0;
|
|
461
530
|
};
|
|
462
531
|
var isoDateStringSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}$/u, "Expected ISO date in YYYY-MM-DD format.");
|
|
532
|
+
var weekdaySchema = z.enum([
|
|
533
|
+
"Sunday",
|
|
534
|
+
"Monday",
|
|
535
|
+
"Tuesday",
|
|
536
|
+
"Wednesday",
|
|
537
|
+
"Thursday",
|
|
538
|
+
"Friday",
|
|
539
|
+
"Saturday"
|
|
540
|
+
]);
|
|
541
|
+
var recurringBlackoutRuleInputSchema = z.object({
|
|
542
|
+
weekdays: z.array(weekdaySchema),
|
|
543
|
+
intervalWeeks: z.number().int(),
|
|
544
|
+
start: isoDateStringSchema,
|
|
545
|
+
end: isoDateStringSchema.nullable().optional(),
|
|
546
|
+
description: z.string()
|
|
547
|
+
});
|
|
463
548
|
var toolInputSchemas = {
|
|
464
549
|
lighthouse_health_check: z.object({}),
|
|
465
550
|
lighthouse_version_get: z.object({}),
|
|
@@ -549,6 +634,12 @@ var toolInputSchemas = {
|
|
|
549
634
|
}),
|
|
550
635
|
lighthouse_feature_workitems: z.object({ id: z.number().int() }),
|
|
551
636
|
lighthouse_delivery_list: z.object({ id: z.number().int() }),
|
|
637
|
+
lighthouse_blackout_list: z.object({}),
|
|
638
|
+
lighthouse_blackout_create: recurringBlackoutRuleInputSchema,
|
|
639
|
+
lighthouse_blackout_update: recurringBlackoutRuleInputSchema.extend({
|
|
640
|
+
id: z.number().int()
|
|
641
|
+
}),
|
|
642
|
+
lighthouse_blackout_delete: z.object({ id: z.number().int() }),
|
|
552
643
|
lighthouse_forecast_manual: z.object({
|
|
553
644
|
id: z.number().int(),
|
|
554
645
|
remainingItems: z.number().int().optional(),
|
|
@@ -564,7 +655,7 @@ var toolInputSchemas = {
|
|
|
564
655
|
applyFilterOverride: z.boolean().optional()
|
|
565
656
|
})
|
|
566
657
|
};
|
|
567
|
-
var isReadOnlyTool = (toolName) => !toolName.endsWith("_refresh");
|
|
658
|
+
var isReadOnlyTool = (toolName) => !(toolName.endsWith("_refresh") || toolName.endsWith("_create") || toolName.endsWith("_update") || toolName.endsWith("_delete"));
|
|
568
659
|
var createMcpCoreRuntime = (dependencies) => ({
|
|
569
660
|
listTools: () => toolDefinitions,
|
|
570
661
|
callTool: async (name, argumentsPayload) => {
|
|
@@ -992,6 +1083,59 @@ var createMcpCoreRuntime = (dependencies) => ({
|
|
|
992
1083
|
`delivery: ${result.error.category} (${result.error.reason})`
|
|
993
1084
|
);
|
|
994
1085
|
}
|
|
1086
|
+
if (name === "lighthouse_blackout_list") {
|
|
1087
|
+
const result = await client.getRecurringBlackoutRules();
|
|
1088
|
+
if (result.ok) {
|
|
1089
|
+
return getSuccessToolResult(
|
|
1090
|
+
`recurringBlackoutRules: ${encodePayload(result.value)}`
|
|
1091
|
+
);
|
|
1092
|
+
}
|
|
1093
|
+
return getErrorToolResult(
|
|
1094
|
+
`blackout: ${result.error.category} (${result.error.reason})`
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1097
|
+
if (name === "lighthouse_blackout_create") {
|
|
1098
|
+
const payload = isObjectRecord(argumentsPayload) ? argumentsPayload : {};
|
|
1099
|
+
const result = await client.createRecurringBlackoutRule(payload);
|
|
1100
|
+
if (result.ok) {
|
|
1101
|
+
return getSuccessToolResult(
|
|
1102
|
+
`recurringBlackoutRule: ${encodePayload(result.value)}`
|
|
1103
|
+
);
|
|
1104
|
+
}
|
|
1105
|
+
return getErrorToolResult(
|
|
1106
|
+
`blackout: ${result.error.category} (${result.error.reason})`
|
|
1107
|
+
);
|
|
1108
|
+
}
|
|
1109
|
+
if (name === "lighthouse_blackout_update") {
|
|
1110
|
+
const id = getNumericId(argumentsPayload);
|
|
1111
|
+
if (id === null) {
|
|
1112
|
+
return getErrorToolResult("blackout: invalid id (rule id required)");
|
|
1113
|
+
}
|
|
1114
|
+
const payload = isObjectRecord(argumentsPayload) ? argumentsPayload : {};
|
|
1115
|
+
const { id: _ignoredId, ...rulePayload } = payload;
|
|
1116
|
+
const result = await client.updateRecurringBlackoutRule(id, rulePayload);
|
|
1117
|
+
if (result.ok) {
|
|
1118
|
+
return getSuccessToolResult(
|
|
1119
|
+
`recurringBlackoutRule: ${encodePayload(result.value)}`
|
|
1120
|
+
);
|
|
1121
|
+
}
|
|
1122
|
+
return getErrorToolResult(
|
|
1123
|
+
`blackout: ${result.error.category} (${result.error.reason})`
|
|
1124
|
+
);
|
|
1125
|
+
}
|
|
1126
|
+
if (name === "lighthouse_blackout_delete") {
|
|
1127
|
+
const id = getNumericId(argumentsPayload);
|
|
1128
|
+
if (id === null) {
|
|
1129
|
+
return getErrorToolResult("blackout: invalid id (rule id required)");
|
|
1130
|
+
}
|
|
1131
|
+
const result = await client.deleteRecurringBlackoutRule(id);
|
|
1132
|
+
if (result.ok) {
|
|
1133
|
+
return getSuccessToolResult(`recurringBlackoutRule deleted: ${id}`);
|
|
1134
|
+
}
|
|
1135
|
+
return getErrorToolResult(
|
|
1136
|
+
`blackout: ${result.error.category} (${result.error.reason})`
|
|
1137
|
+
);
|
|
1138
|
+
}
|
|
995
1139
|
if (name === "lighthouse_forecast_manual") {
|
|
996
1140
|
const id = getNumericId(argumentsPayload);
|
|
997
1141
|
if (id === null) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letpeoplework/lighthouse-mcp-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.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.
|
|
29
|
+
"@letpeoplework/lighthouse-client": "1.3.0"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "tsup src/index.ts --format esm,cjs --dts --clean",
|