agent-feedbacker 0.2.0 → 0.3.1

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/src/mcp.mjs CHANGED
@@ -15,7 +15,8 @@ const TOOL = {
15
15
  'Open a merge-request-style review page in the user\'s browser with the diffs of the given git repos ' +
16
16
  '(working tree, including untracked files, against a base). The user comments on lines, answers your ' +
17
17
  'questions and submits. Blocks until they do, then returns their feedback as markdown: a verdict ' +
18
- '(approved / changes requested), a general comment, answers, and line comments with the code they refer to. ' +
18
+ '(approved / changes requested), a general comment, line comments with the code they refer to, and questions the ' +
19
+ 'user asks about the code, which you must answer in your reply. ' +
19
20
  'Pass every repo and worktree you changed in this session, as absolute paths.',
20
21
  inputSchema: {
21
22
  type: 'object',
@@ -36,8 +37,23 @@ const TOOL = {
36
37
  required: ['path'],
37
38
  },
38
39
  },
39
- summary: { type: 'string', description: 'Short summary of what you changed and why, shown at the top of the page.' },
40
- questions: { type: 'array', items: { type: 'string' }, description: 'Questions for the user to answer next to the diff.' },
40
+ summary: { type: 'string', description: 'What you changed and why, shown at the top of the page. Markdown: paragraphs, "- " lists, `code`, **bold**, "### " subheadings. Lead with one or two sentences; put details in a list.' },
41
+ focus: {
42
+ type: 'array',
43
+ description: 'Where the user should look first: the main logic, risky or non-obvious changes. Two to six entries; leave out tests, docs and config unless they are the point.',
44
+ items: {
45
+ type: 'object',
46
+ properties: {
47
+ path: { type: 'string', description: 'File path, relative to its repo (or absolute).' },
48
+ repo: { type: 'string', description: 'Repo path or folder name, when the same path exists in several repos.' },
49
+ startLine: { type: 'integer', description: 'First line (new side) of the part to look at.' },
50
+ endLine: { type: 'integer', description: 'Last line (new side).' },
51
+ note: { type: 'string', description: 'Why it matters, in one sentence.' },
52
+ },
53
+ required: ['path', 'note'],
54
+ },
55
+ },
56
+ questions: { type: 'array', items: { type: 'string' }, description: 'Only for a decision you cannot make without the user. Usually leave this out: the user asks you questions on the page instead.' },
41
57
  },
42
58
  required: ['repos'],
43
59
  },
@@ -65,6 +81,7 @@ async function callTool(id, params) {
65
81
  repos: args.repos.map((r) => (typeof r === 'string' ? r : { path: r.path, base: r.base, worktrees: r.worktrees, exact: r.exact, session: r.session })),
66
82
  summary: args.summary || '',
67
83
  questions: Array.isArray(args.questions) ? args.questions.map(String) : [],
84
+ focus: Array.isArray(args.focus) ? args.focus : [],
68
85
  });
69
86
  const errors = review.repos.filter((r) => r.error).map((r) => `${r.path}: ${r.error}`);
70
87
  if (!hasChanges(review) && !review.questions.length) {