@limeadelabs/launchpad-mcp 1.2.2 → 1.2.4

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.
Files changed (2) hide show
  1. package/dist/index.js +45 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -402,7 +402,7 @@ function registerPageTools(server2, client2) {
402
402
  try {
403
403
  const result = await client2.listPages(params.project_id);
404
404
  const pages = result.pages ?? result;
405
- const summary = Array.isArray(pages) ? pages.map(({ id, title, author, created_at, updated_at }) => ({ id, title, author, created_at, updated_at })) : pages;
405
+ const summary = Array.isArray(pages) ? pages.map(({ id, title, project, author, created_at, updated_at }) => ({ id, title, project_id: project?.id, project_name: project?.name, author, created_at, updated_at })) : pages;
406
406
  return { content: [{ type: "text", text: JSON.stringify(summary, null, 2) }] };
407
407
  } catch (error) {
408
408
  return handleError(error, client2.timeoutMs);
@@ -411,9 +411,9 @@ function registerPageTools(server2, client2) {
411
411
  );
412
412
  server2.tool(
413
413
  "lp_get_page",
414
- "Get a page's full content by project_id and page_id (also accepts id as alias for page_id)",
414
+ "Get a page's full content. Accepts page_id or id. project_id is optional \u2014 if omitted, it will be inferred automatically.",
415
415
  {
416
- project_id: z7.coerce.number().describe("Project ID"),
416
+ project_id: z7.coerce.number().optional().describe("Project ID (optional \u2014 inferred if omitted)"),
417
417
  page_id: z7.coerce.number().optional().describe("Page ID"),
418
418
  id: z7.coerce.number().optional().describe("Page ID (alias for page_id)")
419
419
  },
@@ -421,8 +421,20 @@ function registerPageTools(server2, client2) {
421
421
  try {
422
422
  const pageId = params.page_id ?? params.id;
423
423
  if (!pageId) throw new Error("page_id or id is required");
424
- const result = await client2.getPage(params.project_id, pageId);
425
- return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
424
+ if (params.project_id) {
425
+ const result = await client2.getPage(params.project_id, pageId);
426
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
427
+ }
428
+ const projectsResult = await client2.listProjects();
429
+ const projects = projectsResult.projects ?? projectsResult;
430
+ for (const proj of Array.isArray(projects) ? projects : []) {
431
+ try {
432
+ const result = await client2.getPage(proj.id, pageId);
433
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
434
+ } catch {
435
+ }
436
+ }
437
+ throw new Error(`Page ${pageId} not found in any accessible project`);
426
438
  } catch (error) {
427
439
  return handleError(error, client2.timeoutMs);
428
440
  }
@@ -609,14 +621,19 @@ function registerSessionTools(server2, client2) {
609
621
  );
610
622
  server2.tool(
611
623
  "lp_session_progress",
612
- 'Report progress on an active session. Sends an activity update with action "progress".',
624
+ "Report progress on an active session. Provide session_id directly or task_id to look up session from disk.",
613
625
  {
614
- session_id: z9.coerce.number().describe("Session ID"),
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"),
615
628
  detail: z9.string().describe("Description of progress made")
616
629
  },
617
- async ({ session_id, detail }) => {
630
+ async ({ session_id, task_id, detail }) => {
618
631
  try {
619
- const result = await client2.updateSession(session_id, {
632
+ const resolvedId = session_id ?? (task_id !== void 0 ? getSessionId(task_id) : null);
633
+ if (resolvedId === null) {
634
+ return { content: [{ type: "text", text: "No active session found. Provide session_id or task_id." }] };
635
+ }
636
+ const result = await client2.updateSession(resolvedId, {
620
637
  activity: { action: "progress", detail }
621
638
  });
622
639
  return {
@@ -629,15 +646,20 @@ function registerSessionTools(server2, client2) {
629
646
  );
630
647
  server2.tool(
631
648
  "lp_session_event",
632
- "Log a discrete event for a session (commit, ci_pass, ci_fail, pr_opened, blocker, cost_update).",
649
+ "Log a discrete event for a session (commit, ci_pass, ci_fail, pr_opened, blocker, cost_update). Provide session_id or task_id.",
633
650
  {
634
- session_id: z9.coerce.number().describe("Session ID"),
651
+ session_id: z9.coerce.number().optional().describe("Session ID"),
652
+ task_id: z9.coerce.number().optional().describe("Task ID to look up session from disk"),
635
653
  event_type: z9.enum(["commit", "ci_pass", "ci_fail", "pr_opened", "blocker", "cost_update"]).describe("Type of event"),
636
654
  payload: z9.record(z9.unknown()).describe("Event payload data")
637
655
  },
638
- async ({ session_id, event_type, payload }) => {
656
+ async ({ session_id, task_id, event_type, payload }) => {
639
657
  try {
640
- const result = await client2.createSessionEvent(session_id, event_type, payload);
658
+ const resolvedId = session_id ?? (task_id !== void 0 ? getSessionId(task_id) : null);
659
+ if (resolvedId === null) {
660
+ return { content: [{ type: "text", text: "No active session found. Provide session_id or task_id." }] };
661
+ }
662
+ const result = await client2.createSessionEvent(resolvedId, event_type, payload);
641
663
  return {
642
664
  content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
643
665
  };
@@ -648,16 +670,21 @@ function registerSessionTools(server2, client2) {
648
670
  );
649
671
  server2.tool(
650
672
  "lp_session_blocked",
651
- 'Mark a session as blocked. Updates status to "blocked" and logs a blocker event.',
673
+ 'Mark a session as blocked. Updates status to "blocked" and logs a blocker event. Provide session_id or task_id.',
652
674
  {
653
- session_id: z9.coerce.number().describe("Session ID"),
675
+ session_id: z9.coerce.number().optional().describe("Session ID"),
676
+ task_id: z9.coerce.number().optional().describe("Task ID to look up session from disk"),
654
677
  reason: z9.string().describe("Reason the session is blocked")
655
678
  },
656
- async ({ session_id, reason }) => {
679
+ async ({ session_id, task_id, reason }) => {
657
680
  try {
681
+ const resolvedId = session_id ?? (task_id !== void 0 ? getSessionId(task_id) : null);
682
+ if (resolvedId === null) {
683
+ return { content: [{ type: "text", text: "No active session found. Provide session_id or task_id." }] };
684
+ }
658
685
  const [sessionResult, eventResult] = await Promise.all([
659
- client2.updateSession(session_id, { status: "blocked" }),
660
- client2.createSessionEvent(session_id, "blocker", { reason })
686
+ client2.updateSession(resolvedId, { status: "blocked" }),
687
+ client2.createSessionEvent(resolvedId, "blocker", { reason })
661
688
  ]);
662
689
  return {
663
690
  content: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limeadelabs/launchpad-mcp",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "LaunchPad MCP server for Claude Code — AI-native project management integration",
5
5
  "type": "module",
6
6
  "exports": {