@limeadelabs/launchpad-mcp 1.2.3 → 1.2.5
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.js +33 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -621,15 +621,23 @@ function registerSessionTools(server2, client2) {
|
|
|
621
621
|
);
|
|
622
622
|
server2.tool(
|
|
623
623
|
"lp_session_progress",
|
|
624
|
-
|
|
624
|
+
"Report progress on an active session. Provide session_id directly or task_id to look up session from disk.",
|
|
625
625
|
{
|
|
626
|
-
session_id: z9.coerce.number().describe("Session ID"),
|
|
627
|
-
|
|
626
|
+
session_id: z9.coerce.number().optional().describe("Session ID"),
|
|
627
|
+
task_id: z9.coerce.number().optional().describe("Task ID to look up session from disk"),
|
|
628
|
+
message: z9.string().optional().describe("Progress message (use this)"),
|
|
629
|
+
detail: z9.string().optional().describe("Progress message (alias for message)")
|
|
628
630
|
},
|
|
629
|
-
async ({ session_id, detail }) => {
|
|
631
|
+
async ({ session_id, task_id, message, detail }) => {
|
|
630
632
|
try {
|
|
631
|
-
const
|
|
632
|
-
|
|
633
|
+
const resolvedId = session_id ?? (task_id !== void 0 ? getSessionId(task_id) : null);
|
|
634
|
+
if (resolvedId === null) {
|
|
635
|
+
return { content: [{ type: "text", text: "No active session found. Provide session_id or task_id." }] };
|
|
636
|
+
}
|
|
637
|
+
const text = message ?? detail;
|
|
638
|
+
if (!text) return { content: [{ type: "text", text: "message or detail is required" }] };
|
|
639
|
+
const result = await client2.updateSession(resolvedId, {
|
|
640
|
+
activity: { action: "progress", detail: text }
|
|
633
641
|
});
|
|
634
642
|
return {
|
|
635
643
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
|
|
@@ -641,15 +649,20 @@ function registerSessionTools(server2, client2) {
|
|
|
641
649
|
);
|
|
642
650
|
server2.tool(
|
|
643
651
|
"lp_session_event",
|
|
644
|
-
"Log a discrete event for a session (commit, ci_pass, ci_fail, pr_opened, blocker, cost_update).",
|
|
652
|
+
"Log a discrete event for a session (commit, ci_pass, ci_fail, pr_opened, blocker, cost_update). Provide session_id or task_id.",
|
|
645
653
|
{
|
|
646
|
-
session_id: z9.coerce.number().describe("Session ID"),
|
|
654
|
+
session_id: z9.coerce.number().optional().describe("Session ID"),
|
|
655
|
+
task_id: z9.coerce.number().optional().describe("Task ID to look up session from disk"),
|
|
647
656
|
event_type: z9.enum(["commit", "ci_pass", "ci_fail", "pr_opened", "blocker", "cost_update"]).describe("Type of event"),
|
|
648
657
|
payload: z9.record(z9.unknown()).describe("Event payload data")
|
|
649
658
|
},
|
|
650
|
-
async ({ session_id, event_type, payload }) => {
|
|
659
|
+
async ({ session_id, task_id, event_type, payload }) => {
|
|
651
660
|
try {
|
|
652
|
-
const
|
|
661
|
+
const resolvedId = session_id ?? (task_id !== void 0 ? getSessionId(task_id) : null);
|
|
662
|
+
if (resolvedId === null) {
|
|
663
|
+
return { content: [{ type: "text", text: "No active session found. Provide session_id or task_id." }] };
|
|
664
|
+
}
|
|
665
|
+
const result = await client2.createSessionEvent(resolvedId, event_type, payload);
|
|
653
666
|
return {
|
|
654
667
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
|
|
655
668
|
};
|
|
@@ -660,16 +673,21 @@ function registerSessionTools(server2, client2) {
|
|
|
660
673
|
);
|
|
661
674
|
server2.tool(
|
|
662
675
|
"lp_session_blocked",
|
|
663
|
-
'Mark a session as blocked. Updates status to "blocked" and logs a blocker event.',
|
|
676
|
+
'Mark a session as blocked. Updates status to "blocked" and logs a blocker event. Provide session_id or task_id.',
|
|
664
677
|
{
|
|
665
|
-
session_id: z9.coerce.number().describe("Session ID"),
|
|
678
|
+
session_id: z9.coerce.number().optional().describe("Session ID"),
|
|
679
|
+
task_id: z9.coerce.number().optional().describe("Task ID to look up session from disk"),
|
|
666
680
|
reason: z9.string().describe("Reason the session is blocked")
|
|
667
681
|
},
|
|
668
|
-
async ({ session_id, reason }) => {
|
|
682
|
+
async ({ session_id, task_id, reason }) => {
|
|
669
683
|
try {
|
|
684
|
+
const resolvedId = session_id ?? (task_id !== void 0 ? getSessionId(task_id) : null);
|
|
685
|
+
if (resolvedId === null) {
|
|
686
|
+
return { content: [{ type: "text", text: "No active session found. Provide session_id or task_id." }] };
|
|
687
|
+
}
|
|
670
688
|
const [sessionResult, eventResult] = await Promise.all([
|
|
671
|
-
client2.updateSession(
|
|
672
|
-
client2.createSessionEvent(
|
|
689
|
+
client2.updateSession(resolvedId, { status: "blocked" }),
|
|
690
|
+
client2.createSessionEvent(resolvedId, "blocker", { reason })
|
|
673
691
|
]);
|
|
674
692
|
return {
|
|
675
693
|
content: [{
|