@lil2good/nubis-mcp-server 1.0.31 → 1.0.33

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/build/index.js CHANGED
@@ -95,6 +95,7 @@ server.tool("get_tasks", "Get tasks for a workspace, including subtasks, boltz,
95
95
  `**Path Type:** ${task.github_item_type ? task.github_item_type : "_No file path type_"}`,
96
96
  `**File Path:** ${task.github_file_path ? task.github_file_path : "_No file path_"}`,
97
97
  `**Repo Name:** ${task.github_repo_name ? task.github_repo_name : "_No repo name_"}`,
98
+ `**Blockers:** ${task.pm_task_blockers && task.pm_task_blockers.length > 0 ? task.pm_task_blockers.map(blocker => blocker.blocker_task_id).join(', ') : "_No blockers_"}`,
98
99
  task.images && task.images.length > 0
99
100
  ? task.images.map((image) => image.url).join('\n')
100
101
  : "_No images_",
@@ -154,14 +155,31 @@ server.tool("get_task_images", "Get/View images for a task", {
154
155
  server.tool("work_on_task", "Work on a task", {
155
156
  taskID: zod_1.z.string(),
156
157
  }, async ({ taskID }) => {
158
+ // Step 1: Fetch task details
159
+ const taskData = await getResultsFromMiddleware({
160
+ endpoint: 'get_task',
161
+ schema: { taskID }
162
+ });
163
+ if (!taskData)
164
+ throw new Error('No data returned from middleware');
165
+ // Step 2: Check for blockers
166
+ if (Array.isArray(taskData.pm_task_blockers) && taskData.pm_task_blockers.length > 0) {
167
+ return {
168
+ content: [
169
+ {
170
+ type: "text",
171
+ text: `Task ${taskID} cannot be worked on because it has blockers: ${taskData.pm_task_blockers.map((b) => b.blocker_task_id).join(', ')}. Please resolve all blockers before proceeding.`,
172
+ },
173
+ ],
174
+ };
175
+ }
176
+ ;
157
177
  const data = await getResultsFromMiddleware({
158
178
  endpoint: 'work_on_task',
159
179
  schema: {
160
180
  taskID
161
181
  }
162
182
  });
163
- if (!data)
164
- throw new Error('No data returned from middleware');
165
183
  return {
166
184
  content: [
167
185
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lil2good/nubis-mcp-server",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "description": "MCP server for Nubis task management",
5
5
  "main": "build/index.js",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -107,6 +107,7 @@ server.tool(
107
107
  readonly github_item_type?: string;
108
108
  readonly github_file_path?: string;
109
109
  readonly github_repo_name?: string;
110
+ readonly pm_task_blockers?: readonly { blocker_task_id: string }[];
110
111
  readonly images?: readonly { url: string }[];
111
112
  };
112
113
  return {
@@ -124,6 +125,7 @@ server.tool(
124
125
  `**Path Type:** ${task.github_item_type ? task.github_item_type : "_No file path type_"}`,
125
126
  `**File Path:** ${task.github_file_path ? task.github_file_path : "_No file path_"}`,
126
127
  `**Repo Name:** ${task.github_repo_name ? task.github_repo_name : "_No repo name_"}`,
128
+ `**Blockers:** ${task.pm_task_blockers && task.pm_task_blockers.length > 0 ? task.pm_task_blockers.map(blocker => blocker.blocker_task_id).join(', ') : "_No blockers_"}`,
127
129
  task.images && task.images.length > 0
128
130
  ? task.images.map((image) => image.url).join('\n')
129
131
  : "_No images_",
@@ -198,13 +200,31 @@ server.tool(
198
200
  taskID: z.string(),
199
201
  },
200
202
  async ({ taskID }) => {
203
+ // Step 1: Fetch task details
204
+ const taskData = await getResultsFromMiddleware({
205
+ endpoint: 'get_task',
206
+ schema: { taskID }
207
+ });
208
+ if (!taskData) throw new Error('No data returned from middleware');
209
+ // Step 2: Check for blockers
210
+ if (Array.isArray(taskData.pm_task_blockers) && taskData.pm_task_blockers.length > 0) {
211
+ return {
212
+ content: [
213
+ {
214
+ type: "text",
215
+ text: `Task ${taskID} cannot be worked on because it has blockers: ${taskData.pm_task_blockers.map((b: { blocker_task_id: string }) => b.blocker_task_id).join(', ')}. Please resolve all blockers before proceeding.`,
216
+ },
217
+ ],
218
+ };
219
+ };
220
+
201
221
  const data = await getResultsFromMiddleware({
202
222
  endpoint: 'work_on_task',
203
223
  schema: {
204
224
  taskID
205
225
  }
206
226
  });
207
- if (!data) throw new Error('No data returned from middleware');
227
+
208
228
  return {
209
229
  content: [
210
230
  {