@freelancercom/phabricator-mcp 2.0.10 → 2.0.11
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/tools/audit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export function registerAuditTools(server, client) {
|
|
3
3
|
// Query audits
|
|
4
|
-
server.tool('phabricator_audit_query', 'Search commit audit requests
|
|
4
|
+
server.tool('phabricator_audit_query', 'Search commit audit requests using the legacy audit.query endpoint. For most use cases, prefer phabricator_commit_search with the auditors attachment. This frozen endpoint provides audit-specific status filtering not available in the modern API.', {
|
|
5
5
|
auditorPHIDs: z.array(z.string()).optional().describe('Auditor user/project PHIDs'),
|
|
6
6
|
commitPHIDs: z.array(z.string()).optional().describe('Commit PHIDs to check audit status for'),
|
|
7
7
|
status: z.string().optional().describe('Audit status filter: "audit-status-any" (default), "audit-status-open", "audit-status-concern", "audit-status-accepted", "audit-status-partial"'),
|
|
@@ -34,12 +34,16 @@ export function registerConpherenceTools(server, client) {
|
|
|
34
34
|
// Create a new thread
|
|
35
35
|
server.tool('phabricator_conpherence_create', 'Create a new Conpherence chat room/thread', {
|
|
36
36
|
title: z.string().describe('Thread title'),
|
|
37
|
+
topic: z.string().optional().describe('Room topic/description'),
|
|
37
38
|
message: z.string().optional().describe('Initial message (supports Remarkup)'),
|
|
38
39
|
participantPHIDs: z.array(z.string()).optional().describe('Participant user PHIDs to add'),
|
|
39
40
|
}, async (params) => {
|
|
40
41
|
const transactions = [
|
|
41
42
|
{ type: 'name', value: params.title },
|
|
42
43
|
];
|
|
44
|
+
if (params.topic !== undefined) {
|
|
45
|
+
transactions.push({ type: 'topic', value: params.topic });
|
|
46
|
+
}
|
|
43
47
|
if (params.message !== undefined) {
|
|
44
48
|
transactions.push({ type: 'comment', value: params.message });
|
|
45
49
|
}
|
|
@@ -51,7 +55,7 @@ export function registerConpherenceTools(server, client) {
|
|
|
51
55
|
});
|
|
52
56
|
// Edit an existing thread
|
|
53
57
|
server.tool('phabricator_conpherence_edit', 'Edit a Conpherence chat room/thread. Rename it or manage participants.', {
|
|
54
|
-
objectIdentifier: z.string().describe('Room ID or PHID'),
|
|
58
|
+
objectIdentifier: z.string().describe('Room monogram (e.g., "Z123"), numeric ID, or PHID'),
|
|
55
59
|
title: z.string().optional().describe('New room title'),
|
|
56
60
|
topic: z.string().optional().describe('Room topic/description'),
|
|
57
61
|
addParticipantPHIDs: z.array(z.string()).optional().describe('Participant PHIDs to add'),
|
|
@@ -85,7 +89,7 @@ export function registerConpherenceTools(server, client) {
|
|
|
85
89
|
});
|
|
86
90
|
// Send a message
|
|
87
91
|
server.tool('phabricator_conpherence_send', 'Send a message to a Conpherence chat room/thread', {
|
|
88
|
-
objectIdentifier: z.string().describe('Room ID or PHID'),
|
|
92
|
+
objectIdentifier: z.string().describe('Room monogram (e.g., "Z123"), numeric ID, or PHID'),
|
|
89
93
|
message: z.string().describe('Message text (supports Remarkup)'),
|
|
90
94
|
}, async (params) => {
|
|
91
95
|
const result = await client.call('conpherence.edit', {
|
package/dist/tools/diffusion.js
CHANGED
|
@@ -63,9 +63,10 @@ export function registerDiffusionTools(server, client) {
|
|
|
63
63
|
});
|
|
64
64
|
// Browse repository file tree
|
|
65
65
|
server.tool('phabricator_repository_browse', 'Browse a repository directory tree at a given path and commit/branch', {
|
|
66
|
-
path: z.string().describe('Path to browse (
|
|
66
|
+
path: z.string().optional().describe('Path to browse (default: "/")'),
|
|
67
67
|
repository: z.string().optional().describe('Repository callsign, short name, or PHID'),
|
|
68
68
|
commit: z.string().optional().describe('Commit hash or branch name (default: HEAD)'),
|
|
69
|
+
branch: z.string().optional().describe('Branch name'),
|
|
69
70
|
needValidityOnly: z.boolean().optional().describe('Only check path validity without loading the full tree'),
|
|
70
71
|
limit: z.coerce.number().optional().describe('Maximum entries to return'),
|
|
71
72
|
offset: z.coerce.number().optional().describe('Result offset for pagination'),
|
|
@@ -77,12 +78,18 @@ export function registerDiffusionTools(server, client) {
|
|
|
77
78
|
server.tool('phabricator_repository_file_content', 'Read file contents from a Diffusion repository at a given path and commit/branch. Returns the file content as a base64-encoded blob. If the file is too large, returns tooHuge: true with no content.', {
|
|
78
79
|
path: z.string().describe('File path in the repository (e.g., "src/index.ts")'),
|
|
79
80
|
repository: z.string().optional().describe('Repository callsign, short name, or PHID'),
|
|
80
|
-
commit: z.string().
|
|
81
|
+
commit: z.string().describe('Commit hash or branch name'),
|
|
82
|
+
branch: z.string().optional().describe('Branch name'),
|
|
83
|
+
timeout: z.coerce.number().optional().describe('Query timeout in seconds'),
|
|
84
|
+
byteLimit: z.coerce.number().optional().describe('Maximum file size in bytes to return'),
|
|
81
85
|
}, async (params) => {
|
|
82
86
|
const result = await client.call('diffusion.filecontentquery', {
|
|
83
87
|
path: params.path,
|
|
84
88
|
repository: params.repository,
|
|
85
89
|
commit: params.commit,
|
|
90
|
+
branch: params.branch,
|
|
91
|
+
timeout: params.timeout,
|
|
92
|
+
byteLimit: params.byteLimit,
|
|
86
93
|
});
|
|
87
94
|
if (result.tooHuge || result.tooSlow) {
|
|
88
95
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
@@ -96,6 +103,7 @@ export function registerDiffusionTools(server, client) {
|
|
|
96
103
|
// List branches
|
|
97
104
|
server.tool('phabricator_branch_search', 'List branches in a Diffusion repository', {
|
|
98
105
|
repository: z.string().describe('Repository callsign, short name, or PHID'),
|
|
106
|
+
branch: z.string().optional().describe('Branch name'),
|
|
99
107
|
contains: z.string().optional().describe('Only branches containing this commit'),
|
|
100
108
|
patterns: z.array(z.string()).optional().describe('Filter branches by glob patterns'),
|
|
101
109
|
closed: z.boolean().optional().describe('Filter by open/closed status (Mercurial only)'),
|
|
@@ -108,6 +116,7 @@ export function registerDiffusionTools(server, client) {
|
|
|
108
116
|
// List tags
|
|
109
117
|
server.tool('phabricator_tag_search', 'List tags in a Diffusion repository', {
|
|
110
118
|
repository: z.string().describe('Repository callsign, short name, or PHID'),
|
|
119
|
+
branch: z.string().optional().describe('Branch name'),
|
|
111
120
|
names: z.array(z.string()).optional().describe('Filter to specific tag names'),
|
|
112
121
|
commit: z.string().optional().describe('Show tags reachable from this commit'),
|
|
113
122
|
needMessages: z.boolean().optional().describe('Include tag messages in results'),
|
|
@@ -118,17 +127,22 @@ export function registerDiffusionTools(server, client) {
|
|
|
118
127
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
119
128
|
});
|
|
120
129
|
// File commit history
|
|
121
|
-
server.tool('phabricator_repository_file_history', 'Get commit history for a file path in a Diffusion repository', {
|
|
122
|
-
path: z.string().describe('File path in the repository'),
|
|
130
|
+
server.tool('phabricator_repository_file_history', 'Get commit history for a file or directory path in a Diffusion repository', {
|
|
131
|
+
path: z.string().describe('File or directory path in the repository'),
|
|
123
132
|
repository: z.string().optional().describe('Repository callsign, short name, or PHID'),
|
|
124
|
-
commit: z.string().
|
|
133
|
+
commit: z.string().describe('Commit hash or branch to start from'),
|
|
134
|
+
branch: z.string().optional().describe('Branch name'),
|
|
125
135
|
against: z.string().optional().describe('Compare against another commit'),
|
|
126
136
|
needDirectChanges: z.boolean().optional().describe('Include direct change info per path entry'),
|
|
127
137
|
needChildChanges: z.boolean().optional().describe('Include child change info per path entry'),
|
|
128
|
-
limit: z.coerce.number().max(100).optional().describe('Maximum results (
|
|
129
|
-
offset: z.coerce.number().optional().describe('Result offset for pagination'),
|
|
138
|
+
limit: z.coerce.number().max(100).optional().describe('Maximum results (default: 100)'),
|
|
139
|
+
offset: z.coerce.number().optional().describe('Result offset for pagination (default: 0)'),
|
|
130
140
|
}, async (params) => {
|
|
131
|
-
const result = await client.call('diffusion.historyquery',
|
|
141
|
+
const result = await client.call('diffusion.historyquery', {
|
|
142
|
+
...params,
|
|
143
|
+
offset: params.offset ?? 0,
|
|
144
|
+
limit: params.limit ?? 100,
|
|
145
|
+
});
|
|
132
146
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
133
147
|
});
|
|
134
148
|
// Search file contents in repository
|
|
@@ -137,6 +151,7 @@ export function registerDiffusionTools(server, client) {
|
|
|
137
151
|
repository: z.string().describe('Repository callsign, short name, or PHID'),
|
|
138
152
|
query: z.string().describe('Search query / pattern'),
|
|
139
153
|
commit: z.string().optional().describe('Commit hash or branch (default: HEAD)'),
|
|
154
|
+
branch: z.string().optional().describe('Branch name'),
|
|
140
155
|
limit: z.coerce.number().max(100).optional().describe('Maximum results (max 100)'),
|
|
141
156
|
offset: z.coerce.number().optional().describe('Result offset for pagination'),
|
|
142
157
|
}, async (params) => {
|
|
@@ -145,6 +160,7 @@ export function registerDiffusionTools(server, client) {
|
|
|
145
160
|
repository: params.repository,
|
|
146
161
|
grep: params.query,
|
|
147
162
|
commit: params.commit,
|
|
163
|
+
branch: params.branch,
|
|
148
164
|
limit: params.limit,
|
|
149
165
|
offset: params.offset,
|
|
150
166
|
});
|
|
@@ -79,9 +79,9 @@ export function registerHarbormasterTools(server, client) {
|
|
|
79
79
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
80
80
|
});
|
|
81
81
|
// Send build command
|
|
82
|
-
server.tool('phabricator_build_command', '
|
|
83
|
-
|
|
84
|
-
type: z.enum(['pass', 'fail', 'work']).describe('Message type: "pass"
|
|
82
|
+
server.tool('phabricator_build_command', 'Send a command to Harbormaster. For build targets: report status (pass/fail/work) with optional unit/lint results. For builds/buildables: send control commands (pause/resume/abort/restart).', {
|
|
83
|
+
receiver: z.string().describe('PHID of build target, build, or buildable to send the message to'),
|
|
84
|
+
type: z.enum(['pass', 'fail', 'work', 'pause', 'resume', 'abort', 'restart']).describe('Message type: "pass"/"fail"/"work" for build targets; "pause"/"resume"/"abort"/"restart" for builds/buildables'),
|
|
85
85
|
unit: jsonCoerce(z.array(z.object({
|
|
86
86
|
name: z.string().describe('Test name'),
|
|
87
87
|
result: z.string().describe('Result: "pass", "fail", "skip", "broken", "unsound"'),
|
|
@@ -103,7 +103,7 @@ export function registerHarbormasterTools(server, client) {
|
|
|
103
103
|
}))).optional().describe('Lint results to report'),
|
|
104
104
|
}, async (params) => {
|
|
105
105
|
const apiParams = {
|
|
106
|
-
|
|
106
|
+
receiver: params.receiver,
|
|
107
107
|
type: params.type,
|
|
108
108
|
};
|
|
109
109
|
if (params.unit !== undefined) {
|
package/dist/tools/phame.js
CHANGED
|
@@ -139,6 +139,7 @@ export function registerPhameTools(server, client) {
|
|
|
139
139
|
blogPHID: z.string().optional().describe('Move post to a different blog (PHID)'),
|
|
140
140
|
addSubscriberPHIDs: z.array(z.string()).optional().describe('Subscriber PHIDs to add'),
|
|
141
141
|
removeSubscriberPHIDs: z.array(z.string()).optional().describe('Subscriber PHIDs to remove'),
|
|
142
|
+
comment: z.string().optional().describe('Add a comment alongside the edit (supports Remarkup)'),
|
|
142
143
|
}, async (params) => {
|
|
143
144
|
const transactions = [];
|
|
144
145
|
if (params.title !== undefined) {
|
|
@@ -162,6 +163,9 @@ export function registerPhameTools(server, client) {
|
|
|
162
163
|
if (params.removeSubscriberPHIDs !== undefined) {
|
|
163
164
|
transactions.push({ type: 'subscribers.remove', value: params.removeSubscriberPHIDs });
|
|
164
165
|
}
|
|
166
|
+
if (params.comment !== undefined) {
|
|
167
|
+
transactions.push({ type: 'comment', value: params.comment });
|
|
168
|
+
}
|
|
165
169
|
if (transactions.length === 0) {
|
|
166
170
|
return { content: [{ type: 'text', text: 'No changes specified' }] };
|
|
167
171
|
}
|
package/package.json
CHANGED