@freelancercom/phabricator-mcp 2.0.15 → 2.0.16
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.
|
@@ -12,7 +12,6 @@ export function registerDifferentialTools(server, client) {
|
|
|
12
12
|
repositoryPHIDs: z.array(z.string()).optional().describe('Repository PHIDs'),
|
|
13
13
|
statuses: z.array(z.string()).optional().describe('Statuses: needs-review, needs-revision, accepted, published, abandoned, changes-planned, draft'),
|
|
14
14
|
responsiblePHIDs: z.array(z.string()).optional().describe('User PHIDs who are responsible (as author or reviewer)'),
|
|
15
|
-
affectedPaths: z.array(z.string()).optional().describe('File paths affected by the revision'),
|
|
16
15
|
createdStart: z.coerce.number().optional().describe('Created after (epoch timestamp)'),
|
|
17
16
|
createdEnd: z.coerce.number().optional().describe('Created before (epoch timestamp)'),
|
|
18
17
|
modifiedStart: z.coerce.number().optional().describe('Modified after (epoch timestamp)'),
|
package/dist/tools/diffusion.js
CHANGED
|
@@ -11,8 +11,6 @@ export function registerDiffusionTools(server, client) {
|
|
|
11
11
|
shortNames: z.array(z.string()).optional().describe('Repository short names'),
|
|
12
12
|
types: z.array(z.string()).optional().describe('VCS types: git, hg, svn'),
|
|
13
13
|
uris: z.array(z.string()).optional().describe('Repository URIs'),
|
|
14
|
-
status: z.string().optional().describe('Repository status: "open" (active) or "closed" (inactive)'),
|
|
15
|
-
hosted: z.string().optional().describe('Hosting: "phabricator" (hosted) or "remote"'),
|
|
16
14
|
projects: z.array(z.string()).optional().describe('Project PHIDs'),
|
|
17
15
|
spaces: z.array(z.string()).optional().describe('Space PHIDs (for multi-space installations)'),
|
|
18
16
|
query: z.string().optional().describe('Full-text search query'),
|
|
@@ -53,7 +51,6 @@ export function registerDiffusionTools(server, client) {
|
|
|
53
51
|
attachments: jsonCoerce(z.object({
|
|
54
52
|
projects: z.boolean().optional().describe('Include projects'),
|
|
55
53
|
subscribers: z.boolean().optional().describe('Include subscribers'),
|
|
56
|
-
auditors: z.boolean().optional().describe('Include auditor info'),
|
|
57
54
|
})).optional().describe('Data attachments'),
|
|
58
55
|
order: z.string().optional().describe('Result order'),
|
|
59
56
|
limit: z.coerce.number().max(100).optional().describe('Maximum results (max 100)'),
|
|
@@ -64,11 +61,10 @@ export function registerDiffusionTools(server, client) {
|
|
|
64
61
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
65
62
|
});
|
|
66
63
|
// Browse repository file tree
|
|
67
|
-
server.tool('phabricator_repository_browse', 'Browse a repository directory tree at a given path and commit/branch', {
|
|
64
|
+
server.tool('phabricator_repository_browse', 'Browse a repository directory tree at a given path and commit/branch. Pass a branch name via the commit parameter.', {
|
|
68
65
|
path: z.string().optional().describe('Path to browse (default: "/")'),
|
|
69
66
|
repository: z.string().optional().describe('Repository callsign, short name, or PHID'),
|
|
70
|
-
commit: z.string().optional().describe('Commit hash or branch name (default: HEAD)'),
|
|
71
|
-
branch: z.string().optional().describe('Branch name'),
|
|
67
|
+
commit: z.string().optional().describe('Commit hash or branch name (default: HEAD). Pass branch names here.'),
|
|
72
68
|
needValidityOnly: z.boolean().optional().describe('Only check path validity without loading the full tree'),
|
|
73
69
|
limit: z.coerce.number().optional().describe('Maximum entries to return'),
|
|
74
70
|
offset: z.coerce.number().optional().describe('Result offset for pagination'),
|
|
@@ -158,7 +154,7 @@ export function registerDiffusionTools(server, client) {
|
|
|
158
154
|
offset: z.coerce.number().optional().describe('Result offset for pagination'),
|
|
159
155
|
}, async (params) => {
|
|
160
156
|
const result = await client.call('diffusion.searchquery', {
|
|
161
|
-
path: params.path ?? '
|
|
157
|
+
path: params.path ?? '',
|
|
162
158
|
repository: params.repository,
|
|
163
159
|
grep: params.query,
|
|
164
160
|
commit: params.commit,
|
|
@@ -49,13 +49,6 @@ export function registerHarbormasterTools(server, client) {
|
|
|
49
49
|
ids: z.array(z.coerce.number()).optional().describe('Target IDs'),
|
|
50
50
|
phids: z.array(z.string()).optional().describe('Target PHIDs'),
|
|
51
51
|
buildPHIDs: z.array(z.string()).optional().describe('Build PHIDs'),
|
|
52
|
-
statuses: z.array(z.string()).optional().describe('Target statuses'),
|
|
53
|
-
createdStart: z.coerce.number().optional().describe('Created after (epoch timestamp)'),
|
|
54
|
-
createdEnd: z.coerce.number().optional().describe('Created before (epoch timestamp)'),
|
|
55
|
-
startedStart: z.coerce.number().optional().describe('Started executing after (epoch timestamp)'),
|
|
56
|
-
startedEnd: z.coerce.number().optional().describe('Started executing before (epoch timestamp)'),
|
|
57
|
-
completedStart: z.coerce.number().optional().describe('Completed after (epoch timestamp)'),
|
|
58
|
-
completedEnd: z.coerce.number().optional().describe('Completed before (epoch timestamp)'),
|
|
59
52
|
})).optional().describe('Search constraints'),
|
|
60
53
|
order: z.string().optional().describe('Result order'),
|
|
61
54
|
limit: z.coerce.number().max(100).optional().describe('Maximum results (max 100)'),
|
|
@@ -82,9 +75,9 @@ export function registerHarbormasterTools(server, client) {
|
|
|
82
75
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
83
76
|
});
|
|
84
77
|
// Send build command
|
|
85
|
-
server.tool('phabricator_build_command', 'Send a command to Harbormaster.
|
|
86
|
-
|
|
87
|
-
type: z.enum(['pass', 'fail', 'work'
|
|
78
|
+
server.tool('phabricator_build_command', 'Send a command to a Harbormaster build target. Report build status (pass/fail/work) with optional unit test and lint results.', {
|
|
79
|
+
buildTargetPHID: z.string().describe('PHID of the build target (PHID-HMBT-...) to send the message to'),
|
|
80
|
+
type: z.enum(['pass', 'fail', 'work']).describe('Message type: "pass" (target passed), "fail" (target failed), "work" (target still working, resets timeout)'),
|
|
88
81
|
unit: jsonCoerce(z.array(z.object({
|
|
89
82
|
name: z.string().describe('Test name'),
|
|
90
83
|
result: z.string().describe('Result: "pass", "fail", "skip", "broken", "unsound"'),
|
|
@@ -107,7 +100,7 @@ export function registerHarbormasterTools(server, client) {
|
|
|
107
100
|
}))).optional().describe('Lint results to report'),
|
|
108
101
|
}, async (params) => {
|
|
109
102
|
const apiParams = {
|
|
110
|
-
|
|
103
|
+
buildTargetPHID: params.buildTargetPHID,
|
|
111
104
|
type: params.type,
|
|
112
105
|
};
|
|
113
106
|
if (params.unit !== undefined) {
|
package/dist/tools/maniphest.js
CHANGED
|
@@ -51,6 +51,7 @@ export function registerManiphestTools(server, client) {
|
|
|
51
51
|
projectPHIDs: z.array(z.string()).optional().describe('Project PHIDs to tag'),
|
|
52
52
|
subscriberPHIDs: z.array(z.string()).optional().describe('Subscriber PHIDs'),
|
|
53
53
|
status: z.string().optional().describe('Initial status'),
|
|
54
|
+
subtype: z.string().optional().describe('Task subtype (e.g. "default", "incident")'),
|
|
54
55
|
parentPHIDs: z.array(z.string()).optional().describe('Parent task PHIDs'),
|
|
55
56
|
subtaskPHIDs: z.array(z.string()).optional().describe('Subtask PHIDs'),
|
|
56
57
|
commitPHIDs: z.array(z.string()).optional().describe('Commit PHIDs to associate'),
|
|
@@ -80,6 +81,9 @@ export function registerManiphestTools(server, client) {
|
|
|
80
81
|
if (params.status !== undefined) {
|
|
81
82
|
transactions.push({ type: 'status', value: params.status });
|
|
82
83
|
}
|
|
84
|
+
if (params.subtype !== undefined) {
|
|
85
|
+
transactions.push({ type: 'subtype', value: params.subtype });
|
|
86
|
+
}
|
|
83
87
|
if (params.parentPHIDs !== undefined) {
|
|
84
88
|
transactions.push({ type: 'parents.set', value: params.parentPHIDs });
|
|
85
89
|
}
|
|
@@ -114,6 +118,7 @@ export function registerManiphestTools(server, client) {
|
|
|
114
118
|
ownerPHID: z.string().nullable().optional().describe('New owner PHID (null to unassign)'),
|
|
115
119
|
priority: z.string().optional().describe('New priority'),
|
|
116
120
|
status: z.string().optional().describe('New status: open, resolved, wontfix, invalid, spite, duplicate'),
|
|
121
|
+
subtype: z.string().optional().describe('Task subtype (e.g. "default", "incident")'),
|
|
117
122
|
addProjectPHIDs: z.array(z.string()).optional().describe('Project PHIDs to add'),
|
|
118
123
|
removeProjectPHIDs: z.array(z.string()).optional().describe('Project PHIDs to remove'),
|
|
119
124
|
addSubscriberPHIDs: z.array(z.string()).optional().describe('Subscriber PHIDs to add'),
|
|
@@ -146,6 +151,9 @@ export function registerManiphestTools(server, client) {
|
|
|
146
151
|
if (params.status !== undefined) {
|
|
147
152
|
transactions.push({ type: 'status', value: params.status });
|
|
148
153
|
}
|
|
154
|
+
if (params.subtype !== undefined) {
|
|
155
|
+
transactions.push({ type: 'subtype', value: params.subtype });
|
|
156
|
+
}
|
|
149
157
|
if (params.addProjectPHIDs !== undefined) {
|
|
150
158
|
transactions.push({ type: 'projects.add', value: params.addProjectPHIDs });
|
|
151
159
|
}
|
package/dist/tools/phame.js
CHANGED
|
@@ -7,7 +7,6 @@ export function registerPhameTools(server, client) {
|
|
|
7
7
|
constraints: jsonCoerce(z.object({
|
|
8
8
|
ids: z.array(z.coerce.number()).optional().describe('Blog IDs'),
|
|
9
9
|
phids: z.array(z.string()).optional().describe('Blog PHIDs'),
|
|
10
|
-
statuses: z.string().optional().describe('Blog status: "active" or "archived"'),
|
|
11
10
|
subscribers: z.array(z.string()).optional().describe('Subscriber user/project PHIDs'),
|
|
12
11
|
projects: z.array(z.string()).optional().describe('Project PHIDs'),
|
|
13
12
|
query: z.string().optional().describe('Full-text search query'),
|
|
@@ -36,7 +35,6 @@ export function registerPhameTools(server, client) {
|
|
|
36
35
|
status: z.string().optional().describe('Blog status'),
|
|
37
36
|
addSubscriberPHIDs: z.array(z.string()).optional().describe('Subscriber PHIDs to add'),
|
|
38
37
|
removeSubscriberPHIDs: z.array(z.string()).optional().describe('Subscriber PHIDs to remove'),
|
|
39
|
-
comment: z.string().optional().describe('Add a comment alongside the edit (supports Remarkup)'),
|
|
40
38
|
}, async (params) => {
|
|
41
39
|
const transactions = [];
|
|
42
40
|
if (params.name !== undefined) {
|
|
@@ -66,9 +64,6 @@ export function registerPhameTools(server, client) {
|
|
|
66
64
|
if (params.removeSubscriberPHIDs !== undefined) {
|
|
67
65
|
transactions.push({ type: 'subscribers.remove', value: params.removeSubscriberPHIDs });
|
|
68
66
|
}
|
|
69
|
-
if (params.comment !== undefined) {
|
|
70
|
-
transactions.push({ type: 'comment', value: params.comment });
|
|
71
|
-
}
|
|
72
67
|
if (transactions.length === 0) {
|
|
73
68
|
return { content: [{ type: 'text', text: 'No changes specified' }] };
|
|
74
69
|
}
|
package/dist/tools/project.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsonCoerce } from './coerce.js';
|
|
|
3
3
|
export function registerProjectTools(server, client) {
|
|
4
4
|
// Search projects
|
|
5
5
|
server.tool('phabricator_project_search', 'Search Phabricator projects', {
|
|
6
|
-
queryKey: z.string().optional().describe('Built-in query: "all", "active", "joined", "watching"'),
|
|
6
|
+
queryKey: z.string().optional().describe('Built-in query: "all", "active" (non-archived), "joined", "watching"'),
|
|
7
7
|
constraints: jsonCoerce(z.object({
|
|
8
8
|
ids: z.array(z.coerce.number()).optional().describe('Project IDs'),
|
|
9
9
|
phids: z.array(z.string()).optional().describe('Project PHIDs'),
|
|
@@ -13,7 +13,6 @@ export function registerProjectTools(server, client) {
|
|
|
13
13
|
watchers: z.array(z.string()).optional().describe('Watcher user PHIDs'),
|
|
14
14
|
ancestors: z.array(z.string()).optional().describe('Ancestor project PHIDs'),
|
|
15
15
|
parents: z.array(z.string()).optional().describe('Parent project PHIDs (find subprojects)'),
|
|
16
|
-
status: z.string().optional().describe('Project status: "active" (default), "archived"'),
|
|
17
16
|
icons: z.array(z.string()).optional().describe('Filter by project icon'),
|
|
18
17
|
isMilestone: z.boolean().optional().describe('Filter milestones'),
|
|
19
18
|
isRoot: z.boolean().optional().describe('Filter root projects'),
|
|
@@ -41,6 +40,7 @@ export function registerProjectTools(server, client) {
|
|
|
41
40
|
server.tool('phabricator_project_edit', 'Create or edit a Phabricator project. Omit objectIdentifier to create a new project (name is required for creation).', {
|
|
42
41
|
objectIdentifier: z.string().optional().describe('Project PHID or ID. Omit to create a new project.'),
|
|
43
42
|
name: z.string().optional().describe('New name'),
|
|
43
|
+
description: z.string().optional().describe('Project description (supports Remarkup)'),
|
|
44
44
|
icon: z.string().optional().describe('New icon'),
|
|
45
45
|
color: z.string().optional().describe('New color'),
|
|
46
46
|
addMemberPHIDs: z.array(z.string()).optional().describe('Add members'),
|
|
@@ -49,12 +49,14 @@ export function registerProjectTools(server, client) {
|
|
|
49
49
|
parent: z.string().optional().describe('Parent project PHID (to create as a subproject)'),
|
|
50
50
|
milestone: z.string().optional().describe('Parent project PHID (to create as a milestone of that project)'),
|
|
51
51
|
slug: z.string().optional().describe('Project URL slug (replaces ALL existing slugs with this one)'),
|
|
52
|
-
comment: z.string().optional().describe('Add a comment alongside the edit (supports Remarkup)'),
|
|
53
52
|
}, async (params) => {
|
|
54
53
|
const transactions = [];
|
|
55
54
|
if (params.name !== undefined) {
|
|
56
55
|
transactions.push({ type: 'name', value: params.name });
|
|
57
56
|
}
|
|
57
|
+
if (params.description !== undefined) {
|
|
58
|
+
transactions.push({ type: 'description', value: params.description });
|
|
59
|
+
}
|
|
58
60
|
if (params.space !== undefined) {
|
|
59
61
|
transactions.push({ type: 'space', value: params.space });
|
|
60
62
|
}
|
|
@@ -79,9 +81,6 @@ export function registerProjectTools(server, client) {
|
|
|
79
81
|
if (params.removeMemberPHIDs !== undefined) {
|
|
80
82
|
transactions.push({ type: 'members.remove', value: params.removeMemberPHIDs });
|
|
81
83
|
}
|
|
82
|
-
if (params.comment !== undefined) {
|
|
83
|
-
transactions.push({ type: 'comment', value: params.comment });
|
|
84
|
-
}
|
|
85
84
|
if (transactions.length === 0) {
|
|
86
85
|
return { content: [{ type: 'text', text: 'No changes specified' }] };
|
|
87
86
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { jsonCoerce } from './coerce.js';
|
|
3
3
|
export function registerTransactionTools(server, client) {
|
|
4
|
-
server.tool('phabricator_transaction_search', 'Search transactions (comments, status changes, etc.) on
|
|
5
|
-
objectIdentifier: z.string().
|
|
6
|
-
objectType: z.string().optional().describe('Object type group to query (e.g., "TASK", "DREV", "CMIT"). Queries all transactions of that type. Provide this or objectIdentifier, not both.'),
|
|
4
|
+
server.tool('phabricator_transaction_search', 'Search transactions (comments, status changes, etc.) on a Phabricator object (e.g., "D123", "T456")', {
|
|
5
|
+
objectIdentifier: z.string().describe('Object ID (e.g., "D123", "T456") or PHID to get transactions for'),
|
|
7
6
|
constraints: jsonCoerce(z.object({
|
|
8
7
|
phids: z.array(z.string()).optional().describe('Transaction PHIDs'),
|
|
9
8
|
authorPHIDs: z.array(z.string()).optional().describe('Author PHIDs'),
|
|
@@ -12,12 +11,7 @@ export function registerTransactionTools(server, client) {
|
|
|
12
11
|
after: z.string().optional().describe('Cursor for next-page pagination'),
|
|
13
12
|
before: z.string().optional().describe('Cursor for previous-page pagination'),
|
|
14
13
|
}, async (params) => {
|
|
15
|
-
const
|
|
16
|
-
const result = await client.call('transaction.search', {
|
|
17
|
-
objectIdentifier,
|
|
18
|
-
objectType,
|
|
19
|
-
...searchParams,
|
|
20
|
-
});
|
|
14
|
+
const result = await client.call('transaction.search', params);
|
|
21
15
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
22
16
|
});
|
|
23
17
|
}
|
package/package.json
CHANGED