wolfpack-mcp 1.0.95 → 1.0.96

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/client.js CHANGED
@@ -490,6 +490,9 @@ export class WolfpackClient {
490
490
  async createWorkItemComment(workItemId, data, teamSlug) {
491
491
  return this.api.post(this.withTeamSlug(`/work-items/${workItemId}/comments`, teamSlug), data);
492
492
  }
493
+ async askWorkItemQuestion(workItemId, question, teamSlug) {
494
+ return this.api.post(this.withTeamSlug(`/work-items/${workItemId}/question`, teamSlug), { question });
495
+ }
493
496
  async createIssueComment(issueId, data, teamSlug) {
494
497
  return this.api.post(this.withTeamSlug(`/issues/${issueId}/comments`, teamSlug), data);
495
498
  }
package/dist/index.js CHANGED
@@ -538,6 +538,14 @@ const CreateWorkItemCommentSchema = z.object({
538
538
  .optional()
539
539
  .describe('Project slug (required for multi-project users, use list_projects to get slugs)'),
540
540
  });
541
+ const AskWorkItemQuestionSchema = z.object({
542
+ work_item_id: refIdString().describe('The work item refId (number)'),
543
+ question: z.string().describe('The question (markdown)'),
544
+ project_slug: z
545
+ .string()
546
+ .optional()
547
+ .describe('Project slug (required for multi-project users, use list_projects to get slugs)'),
548
+ });
541
549
  const CreateIssueCommentSchema = z.object({
542
550
  issue_id: refIdString().describe('The issue refId (number)'),
543
551
  content: z.string().describe('Comment content (markdown)'),
@@ -1814,6 +1822,8 @@ class WolfpackMCPServer {
1814
1822
  '2) Completion summaries when moving to "review" (what was done, files changed, testing notes). ' +
1815
1823
  '3) Important observations or decisions that should be visible in the activity history. ' +
1816
1824
  'USE DESCRIPTION (update_work_progress) FOR: Plans, checklists, and progress tracking that need to be updated over time. ' +
1825
+ 'NOT FOR QUESTIONS you need answered before you can continue the item you are working: a reply cannot reach a ' +
1826
+ 'running session, so a question asked here is one you keep working past. Use ask_work_item_question, which pauses the work. ' +
1817
1827
  'Comments are typically not used in personal projects. ' +
1818
1828
  CONTENT_LINKING_HELP,
1819
1829
  inputSchema: {
@@ -1832,6 +1842,35 @@ class WolfpackMCPServer {
1832
1842
  required: ['work_item_id', 'content'],
1833
1843
  },
1834
1844
  },
1845
+ {
1846
+ name: 'ask_work_item_question',
1847
+ description: 'Ask a question about the work item you are working on and PAUSE until it is answered. ' +
1848
+ 'For when you cannot sensibly continue without an answer from a person — an ambiguous requirement, a decision ' +
1849
+ 'that is theirs to make, something only they know. The question is posted as a comment addressed to the ' +
1850
+ 'item\'s creator, and the item is marked as waiting: it stays in "doing" with you, your schedule does not ' +
1851
+ 'wake you for it until someone else comments (that comment is the answer), and the session ending on it is ' +
1852
+ 'not counted as an abandonment. AFTER CALLING THIS, STOP: commit and push anything worth keeping, make sure ' +
1853
+ 'the plan in the description records where you got to, and end your session without taking other work — ' +
1854
+ 'a reply cannot reach a running session, and pull_work_item refuses while the item waits. When you are ' +
1855
+ "woken again, get_work_item shows the question and its answer. Only the item's leading user may ask, and " +
1856
+ 'only while the item is in "doing". In a chat session ask in your reply instead — the next message is the answer. ' +
1857
+ 'Requires mcp:work_items:update permission.',
1858
+ inputSchema: {
1859
+ type: 'object',
1860
+ properties: {
1861
+ work_item_id: { type: 'string', description: 'The work item refId (number)' },
1862
+ question: {
1863
+ type: 'string',
1864
+ description: 'The question (markdown). Give the context a reader needs to answer it in one reply: what you found, the options you see, what you would do by default.',
1865
+ },
1866
+ project_slug: {
1867
+ type: 'string',
1868
+ description: 'Project slug (required for multi-project users, use list_projects to get slugs)',
1869
+ },
1870
+ },
1871
+ required: ['work_item_id', 'question'],
1872
+ },
1873
+ },
1835
1874
  {
1836
1875
  name: 'create_issue_comment',
1837
1876
  description: 'Add a comment to an issue. Requires mcp:comments:create permission. ' +
@@ -2512,7 +2551,7 @@ class WolfpackMCPServer {
2512
2551
  const workItem = await this.client.getWorkItem(parsed.work_item_id, parsed.project_slug || this.client.getProjectSlug() || undefined);
2513
2552
  if (workItem) {
2514
2553
  let text = JSON.stringify(stripUuids(workItem), null, 2);
2515
- const reminders = getWorkItemReminders(workItem.status, workItem.description, workItem.approved);
2554
+ const reminders = getWorkItemReminders(workItem.status, workItem.description, workItem.approved, workItem.question);
2516
2555
  if (reminders.length > 0) {
2517
2556
  text = `${reminders.join('\n\n')}\n\n${text}`;
2518
2557
  }
@@ -3089,6 +3128,19 @@ class WolfpackMCPServer {
3089
3128
  ],
3090
3129
  };
3091
3130
  }
3131
+ case 'ask_work_item_question': {
3132
+ const parsed = AskWorkItemQuestionSchema.parse(args);
3133
+ const teamSlug = parsed.project_slug || this.client.getProjectSlug() || undefined;
3134
+ const result = await this.client.askWorkItemQuestion(parsed.work_item_id, parsed.question, teamSlug);
3135
+ return {
3136
+ content: [
3137
+ {
3138
+ type: 'text',
3139
+ text: `${result.notice}\n\n${JSON.stringify(stripUuids(result.comment), null, 2)}`,
3140
+ },
3141
+ ],
3142
+ };
3143
+ }
3092
3144
  case 'create_issue_comment': {
3093
3145
  const parsed = CreateIssueCommentSchema.parse(args);
3094
3146
  const teamSlug = parsed.project_slug || this.client.getProjectSlug() || undefined;
@@ -30,9 +30,23 @@ const STATUS_REMINDERS = {
30
30
  'starting, so the board shows the work is under way again. If you are reviewing it, leave it where it is.',
31
31
  };
32
32
  // Reminders to prepend to a get_work_item response, most urgent first.
33
- export function getWorkItemReminders(status, description, approved) {
33
+ export function getWorkItemReminders(status, description, approved, question) {
34
34
  const reminders = [];
35
- if (status === 'pending' && approved === false) {
35
+ // A question replaces the status reminder: "doing" would say to finish the work,
36
+ // and the work is paused until someone answers (#2289)
37
+ if (status === 'doing' && question) {
38
+ if (question.answer === null) {
39
+ reminders.push('REMINDER: This work item is waiting for an answer to the question its leading agent asked ' +
40
+ '(see "question" below). Nobody has answered yet. If you are that agent, do not work on it ' +
41
+ 'and do not take other work: end your session, and your schedule wakes you once the answer is in.');
42
+ }
43
+ else {
44
+ reminders.push('REMINDER: The question asked on this work item has been answered — the answer is in ' +
45
+ '"question.answer" below, and the comments carry any discussion since. Resume the work with ' +
46
+ 'that answer; the plan in the description says where it got to.');
47
+ }
48
+ }
49
+ else if (status === 'pending' && approved === false) {
36
50
  // Overrides the generic pending reminder: approval only gates unassigned items
37
51
  reminders.push('REMINDER: This backlog item has NOT been approved. If it is assigned to you, that assignment ' +
38
52
  'overrides approval — pull it with pull_work_item and start work. If it is not assigned to you, ' +
@@ -55,6 +55,17 @@ describe('getWorkItemReminders', () => {
55
55
  expect(reminders).toEqual([expect.stringContaining('set status to "doing"')]);
56
56
  expect(reminders[0]).toContain('If you are reviewing it, leave it where it is');
57
57
  });
58
+ // #2289: a question outranks the "doing" reminder — the work is paused until answered
59
+ it('tells an agent whose question is unanswered to stop and wait', () => {
60
+ const reminders = getWorkItemReminders('doing', PLAN, undefined, { answer: null });
61
+ expect(reminders).toEqual([expect.stringContaining('waiting for an answer')]);
62
+ expect(reminders[0]).toContain('end your session');
63
+ });
64
+ it('points an agent whose question was answered at the answer', () => {
65
+ const reminders = getWorkItemReminders('doing', PLAN, undefined, { answer: 'Option B.' });
66
+ expect(reminders).toEqual([expect.stringContaining('has been answered')]);
67
+ expect(reminders[0]).toContain('"question.answer"');
68
+ });
58
69
  it('adds the no-plan reminder when the description has no plan', () => {
59
70
  const reminders = getWorkItemReminders('new', 'Just a description');
60
71
  expect(reminders).toHaveLength(2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wolfpack-mcp",
3
- "version": "1.0.95",
3
+ "version": "1.0.96",
4
4
  "description": "MCP server for Wolfpack AI-enhanced software delivery tools",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",