@agentteams/cli 0.1.100 → 0.1.102
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/.eslintcache +1 -1
- package/README.md +0 -12
- package/dist/api/coaction.d.ts +1 -1
- package/dist/api/coaction.d.ts.map +1 -1
- package/dist/api/coaction.js +3 -1
- package/dist/api/coaction.js.map +1 -1
- package/dist/api/codeReview.d.ts +5 -4
- package/dist/api/codeReview.d.ts.map +1 -1
- package/dist/api/codeReview.js +14 -8
- package/dist/api/codeReview.js.map +1 -1
- package/dist/api/plan.d.ts +0 -5
- package/dist/api/plan.d.ts.map +1 -1
- package/dist/api/plan.js +0 -5
- package/dist/api/plan.js.map +1 -1
- package/dist/commands/codeReview.d.ts.map +1 -1
- package/dist/commands/codeReview.js +14 -1
- package/dist/commands/codeReview.js.map +1 -1
- package/dist/commands/convention.d.ts +6 -1
- package/dist/commands/convention.d.ts.map +1 -1
- package/dist/commands/convention.js +63 -23
- package/dist/commands/convention.js.map +1 -1
- package/dist/commands/plan.d.ts +0 -12
- package/dist/commands/plan.d.ts.map +1 -1
- package/dist/commands/plan.js +1 -103
- package/dist/commands/plan.js.map +1 -1
- package/dist/mcp/guides.d.ts +1 -1
- package/dist/mcp/guides.d.ts.map +1 -1
- package/dist/mcp/guides.js +4 -1
- package/dist/mcp/guides.js.map +1 -1
- package/dist/mcp/localTools.d.ts.map +1 -1
- package/dist/mcp/localTools.js +1 -1
- package/dist/mcp/localTools.js.map +1 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +5 -1
- package/dist/mcp/tools.js.map +1 -1
- package/dist/mcp/writeTools.d.ts.map +1 -1
- package/dist/mcp/writeTools.js +435 -0
- package/dist/mcp/writeTools.js.map +1 -1
- package/dist/program/codeReview.d.ts +1 -1
- package/dist/program/codeReview.d.ts.map +1 -1
- package/dist/program/codeReview.js +2 -1
- package/dist/program/codeReview.js.map +1 -1
- package/dist/program/plan.d.ts +1 -1
- package/dist/program/plan.d.ts.map +1 -1
- package/dist/program/plan.js +1 -12
- package/dist/program/plan.js.map +1 -1
- package/dist/program/shared.d.ts.map +1 -1
- package/dist/program/shared.js +5 -0
- package/dist/program/shared.js.map +1 -1
- package/package.json +2 -2
- package/dist/utils/planPreviewHtmlSafety.d.ts +0 -8
- package/dist/utils/planPreviewHtmlSafety.d.ts.map +0 -1
- package/dist/utils/planPreviewHtmlSafety.js +0 -40
- package/dist/utils/planPreviewHtmlSafety.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localTools.js","sourceRoot":"","sources":["../../src/mcp/localTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAA8B,MAAM,2BAA2B,CAAC;AACxH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAwB,MAAM,uBAAuB,CAAC;AAElG,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,oBAAoB,EAAwB,MAAM,aAAa,CAAC;AACvH,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AA8BzD,4FAA4F;AAC5F,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAuB,EAAmC,EAAE,CAC7F,OAAO,CAAC,cAAc,EAAE,EAAE,IAAI,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAEjE,MAAM,cAAc,GAAG,2BAA2B,CAAC;IACjD,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,CAAC,MAAM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,OAAO,CAAC;SACnD,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,oFAAoF;AACpF,MAAM,UAAU,iBAAiB;IAC/B,OAAO,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;AACrC,CAAC"}
|
package/dist/mcp/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAEhB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,gBAAgB,EAEhB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,2BAA2B,CAAC;AAkBnC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC;AAe1C;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,cAAc,GAAG,kBAAkB,CAwCvF;AAED,gEAAgE;AAChE,wBAAgB,YAAY,IAAI,WAAW,EAAE,CAE5C"}
|
package/dist/mcp/tools.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getContextToolSpecs, SEARCH_TOOL_NAME, } from '@agentteams/context-tools';
|
|
2
2
|
import { getCoAction, listCoActions } from '../api/coaction.js';
|
|
3
|
-
import { getCodeReview, getCodeReviewFinding, listCodeReviews } from '../api/codeReview.js';
|
|
3
|
+
import { getCodeReview, getCodeReviewFinding, listCodeReviewFindings, listCodeReviews } from '../api/codeReview.js';
|
|
4
4
|
import { getComment, getReply, listComments, listFindingComments, listReplies, listTaskComments, } from '../api/comment.js';
|
|
5
5
|
import { getConvention, listConventions } from '../api/convention.js';
|
|
6
6
|
import { getDocument, listDocumentComments, listDocuments } from '../api/document.js';
|
|
@@ -8,6 +8,7 @@ import { getPlanRunbook, listPlans } from '../api/plan.js';
|
|
|
8
8
|
import { getPostMortem, listPostMortems } from '../api/postmortem.js';
|
|
9
9
|
import { getReport, listReports } from '../api/report.js';
|
|
10
10
|
import { searchEntities } from '../api/search.js';
|
|
11
|
+
import { getSkill, listSkills } from '../api/skill.js';
|
|
11
12
|
export { SEARCH_TOOL_NAME };
|
|
12
13
|
function scalarListParams(params) {
|
|
13
14
|
return params;
|
|
@@ -41,8 +42,11 @@ export function createCliContextToolsClient(context) {
|
|
|
41
42
|
getDocument: async (id) => getDocument(apiUrl, projectId, await auth(), id),
|
|
42
43
|
listConventions: async (params) => listConventions(apiUrl, projectId, await auth(), scalarListParams(params)),
|
|
43
44
|
getConvention: async (id) => getConvention(apiUrl, projectId, await auth(), id),
|
|
45
|
+
listSkills: async (params) => listSkills(apiUrl, projectId, await auth(), scalarListParams(params)),
|
|
46
|
+
getSkill: async (id) => getSkill(apiUrl, projectId, await auth(), id),
|
|
44
47
|
listCodeReviews: async (params) => listCodeReviews(apiUrl, projectId, await auth(), scalarListParams(params)),
|
|
45
48
|
getCodeReview: async (id) => getCodeReview(apiUrl, projectId, await auth(), id),
|
|
49
|
+
listCodeReviewFindings: async (codeReviewId, params) => listCodeReviewFindings(apiUrl, projectId, await auth(), codeReviewId, scalarListParams(params)),
|
|
46
50
|
listComments: async (planId, params) => listComments(apiUrl, projectId, await auth(), planId, scalarListParams(params)),
|
|
47
51
|
listFindingComments: async (findingId, params) => listFindingComments(apiUrl, projectId, await auth(), findingId, scalarListParams(params)),
|
|
48
52
|
listTaskComments: async (taskId, params) => listTaskComments(apiUrl, projectId, await auth(), taskId, scalarListParams(params)),
|
package/dist/mcp/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"A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,CAAC,CAAC;QAC7F,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,CAAC;QACzE,kBAAkB,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAC9C,WAAW,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,IAAI,EAAE,EAAE,SAAS,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;QACnF,eAAe,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,IAAI,EAAE,EAAE,OAAO,CAAC;QACtF,oBAAoB,EAAE,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,CAC/C,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,EAAE,YAAY,CAAC;KAC1E,CAAC;AACJ,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,YAAY;IAC1B,OAAO,mBAAmB,EAAE,CAAC;AAC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"writeTools.d.ts","sourceRoot":"","sources":["../../src/mcp/writeTools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"writeTools.d.ts","sourceRoot":"","sources":["../../src/mcp/writeTools.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE5E;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AA2+BhD,0EAA0E;AAC1E,wBAAgB,iBAAiB,IAAI,gBAAgB,EAAE,CAoBtD"}
|
package/dist/mcp/writeTools.js
CHANGED
|
@@ -2,9 +2,16 @@ import { defineToolDiscoveryMetadata, omitDocumentEditorMirror, stripContextEnti
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { createComment, createFindingComment, createReply, createTaskComment, deleteComment, deleteReply, updateComment, updateReply, } from '../api/comment.js';
|
|
4
4
|
import { createDocumentComment, createDocument, deleteDocument, updateDocument } from '../api/document.js';
|
|
5
|
+
import { createCoAction, deleteCoAction, updateCoAction } from '../api/coaction.js';
|
|
6
|
+
import { createPostMortem, updatePostMortem } from '../api/postmortem.js';
|
|
7
|
+
import { cancelCodeReview, createCodeReview, dismissCodeReviewFinding, resolveCodeReviewFinding, undismissCodeReviewFinding, updateCodeReview, } from '../api/codeReview.js';
|
|
8
|
+
import { RUNNER_TYPE_VALUES } from '../utils/runnerTypes.js';
|
|
5
9
|
import { resolveToolHeaders } from './localTools.js';
|
|
6
10
|
const GUIDE_FIRST = 'Call agentteams_guide_get("document") first and follow that guide.';
|
|
7
11
|
const COMMENT_GUIDE_FIRST = 'Call agentteams_guide_get("comment") first and follow that guide.';
|
|
12
|
+
const CO_ACTION_GUIDE_FIRST = 'Call agentteams_guide_get("co-action") first and follow that guide.';
|
|
13
|
+
const POST_MORTEM_GUIDE_FIRST = 'Call agentteams_guide_get("post-mortem") first and follow that guide.';
|
|
14
|
+
const CODE_REVIEW_GUIDE_FIRST = 'Call agentteams_guide_get("code-review") first and follow that guide.';
|
|
8
15
|
const TAG_POLICY = 'You cannot set confirmed tags. Anything you pass in suggestedTags is a suggestion for a human to confirm.';
|
|
9
16
|
const PROJECT_SCOPE = 'Scoped to the single project this MCP server is bound to. There is no projectId argument — a different project cannot be reached from here.';
|
|
10
17
|
const guideHashField = z
|
|
@@ -38,10 +45,64 @@ const commentWriteDiscovery = defineToolDiscoveryMetadata({
|
|
|
38
45
|
domain: 'comments',
|
|
39
46
|
profiles: ['full', 'comments'],
|
|
40
47
|
});
|
|
48
|
+
const coActionWriteDiscovery = defineToolDiscoveryMetadata({
|
|
49
|
+
domain: 'coActions',
|
|
50
|
+
profiles: ['full'],
|
|
51
|
+
});
|
|
52
|
+
const postMortemWriteDiscovery = defineToolDiscoveryMetadata({
|
|
53
|
+
domain: 'postMortems',
|
|
54
|
+
profiles: ['full'],
|
|
55
|
+
});
|
|
56
|
+
const codeReviewWriteDiscovery = defineToolDiscoveryMetadata({
|
|
57
|
+
domain: 'codeReviews',
|
|
58
|
+
profiles: ['full'],
|
|
59
|
+
});
|
|
41
60
|
/** Credentials can expire mid-session, so headers are resolved per call, never captured. */
|
|
42
61
|
const auth = resolveToolHeaders;
|
|
43
62
|
/** Drop keys the caller omitted so an absent optional never reaches the server as `undefined`. */
|
|
44
63
|
const definedFields = (fields) => Object.fromEntries(Object.entries(fields).filter(([, value]) => value !== undefined));
|
|
64
|
+
const requireOneOf = (toolName, args, fieldNames) => {
|
|
65
|
+
if (!fieldNames.some((fieldName) => args[fieldName] !== undefined)) {
|
|
66
|
+
throw new Error(`${toolName} requires at least one of: ${fieldNames.join(', ')}.`);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const CODE_REVIEW_TARGET_TYPE_VALUES = [
|
|
70
|
+
'BRANCH_DIFF',
|
|
71
|
+
'GITHUB_PR',
|
|
72
|
+
'GITLAB_MR',
|
|
73
|
+
'BITBUCKET_PR',
|
|
74
|
+
'LOCAL_DIFF',
|
|
75
|
+
'UPLOADED_DIFF',
|
|
76
|
+
'COMMIT_RANGE',
|
|
77
|
+
];
|
|
78
|
+
const CODE_REVIEW_UPDATE_METADATA_FIELDS = [
|
|
79
|
+
'title',
|
|
80
|
+
'targetType',
|
|
81
|
+
'targetRef',
|
|
82
|
+
'sourceCommitStart',
|
|
83
|
+
'sourceCommitEnd',
|
|
84
|
+
'sourceBranchName',
|
|
85
|
+
'baseBranchName',
|
|
86
|
+
'diffSummary',
|
|
87
|
+
'testSummary',
|
|
88
|
+
'reviewerContext',
|
|
89
|
+
'recommendationReason',
|
|
90
|
+
'runnerType',
|
|
91
|
+
'model',
|
|
92
|
+
];
|
|
93
|
+
const validateInitialCodeReviewFindings = (args) => {
|
|
94
|
+
if (args.findings !== undefined && (args.runnerType === undefined || args.model === undefined)) {
|
|
95
|
+
throw new Error('agentteams_codereview_create requires runnerType and model when findings are provided.');
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
const validateCodeReviewCancellation = (args) => {
|
|
99
|
+
if (args.status !== 'CANCELLED')
|
|
100
|
+
return;
|
|
101
|
+
const incompatibleFields = [...CODE_REVIEW_UPDATE_METADATA_FIELDS, 'expectedUpdatedAt'].filter((fieldName) => args[fieldName] !== undefined);
|
|
102
|
+
if (incompatibleFields.length > 0) {
|
|
103
|
+
throw new Error(`agentteams_codereview_update with status CANCELLED cannot include: ${incompatibleFields.join(', ')}.`);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
45
106
|
const documentCreateSpec = {
|
|
46
107
|
name: 'agentteams_document_create',
|
|
47
108
|
title: 'Create AgentTeams Document',
|
|
@@ -143,6 +204,11 @@ const commentExpectedUpdatedAtField = z
|
|
|
143
204
|
.min(1)
|
|
144
205
|
.optional()
|
|
145
206
|
.describe("The comment's updatedAt as you last read it. The write is rejected if someone else changed it since.");
|
|
207
|
+
const expectedUpdatedAtFieldFor = (entity) => z
|
|
208
|
+
.string()
|
|
209
|
+
.min(1)
|
|
210
|
+
.optional()
|
|
211
|
+
.describe(`The ${entity}'s updatedAt as you last read it. The write is rejected if someone else changed it since.`);
|
|
146
212
|
const COMMENT_PARENT_KEYS = ['planId', 'taskId', 'documentId', 'findingId'];
|
|
147
213
|
// comment_list만 taskId + planId를 부모 제한 조합으로 허용한다. 생성은 부모를 하나만
|
|
148
214
|
// 받아야 하므로 같은 조합도 거부하며, 모델이 두 계약을 혼동하지 않도록 설명에도 명시한다.
|
|
@@ -401,6 +467,367 @@ const commentReplyDeleteSpec = {
|
|
|
401
467
|
return { deleted: true, id: replyId };
|
|
402
468
|
},
|
|
403
469
|
};
|
|
470
|
+
const coActionCreateSpec = {
|
|
471
|
+
name: 'agentteams_coaction_create',
|
|
472
|
+
title: 'Create AgentTeams Co-Action',
|
|
473
|
+
description: [
|
|
474
|
+
'Create a co-action (handoff record) in this project.',
|
|
475
|
+
CO_ACTION_GUIDE_FIRST,
|
|
476
|
+
PROJECT_SCOPE,
|
|
477
|
+
'Returns the created co-action id and webUrl.',
|
|
478
|
+
].join(' '),
|
|
479
|
+
discovery: coActionWriteDiscovery,
|
|
480
|
+
inputSchema: z.strictObject({
|
|
481
|
+
title: z.string().min(1).max(255).describe('Co-action title.'),
|
|
482
|
+
content: z.string().min(1).describe('Co-action body in Markdown.'),
|
|
483
|
+
planId: z.string().min(1).optional().describe('Related plan id (bare uuid or agentteams_pln_-prefixed).'),
|
|
484
|
+
completionReportId: z
|
|
485
|
+
.string()
|
|
486
|
+
.min(1)
|
|
487
|
+
.optional()
|
|
488
|
+
.describe('Related completion report id (bare uuid or agentteams_rpt_-prefixed).'),
|
|
489
|
+
postMortemId: z
|
|
490
|
+
.string()
|
|
491
|
+
.min(1)
|
|
492
|
+
.optional()
|
|
493
|
+
.describe('Related post-mortem id (bare uuid or agentteams_pmt_-prefixed).'),
|
|
494
|
+
status: z.enum(['OPEN', 'CLOSED']).optional().describe('OPEN (default) or CLOSED.'),
|
|
495
|
+
visibility: visibilityField,
|
|
496
|
+
guideHash: guideHashField,
|
|
497
|
+
idempotencyKey: idempotencyKeyField,
|
|
498
|
+
}),
|
|
499
|
+
handler: async (args, context) => {
|
|
500
|
+
requireOneOf('agentteams_coaction_create', args, ['planId', 'completionReportId', 'postMortemId']);
|
|
501
|
+
return createCoAction(context.apiUrl, context.projectId, await auth(context), definedFields({
|
|
502
|
+
title: args.title,
|
|
503
|
+
content: args.content,
|
|
504
|
+
planId: typeof args.planId === 'string' ? stripContextEntityIdPrefix(args.planId) : undefined,
|
|
505
|
+
completionReportId: typeof args.completionReportId === 'string'
|
|
506
|
+
? stripContextEntityIdPrefix(args.completionReportId)
|
|
507
|
+
: undefined,
|
|
508
|
+
postMortemId: typeof args.postMortemId === 'string' ? stripContextEntityIdPrefix(args.postMortemId) : undefined,
|
|
509
|
+
status: args.status,
|
|
510
|
+
visibility: args.visibility,
|
|
511
|
+
guideHash: args.guideHash,
|
|
512
|
+
idempotencyKey: args.idempotencyKey,
|
|
513
|
+
}));
|
|
514
|
+
},
|
|
515
|
+
};
|
|
516
|
+
const coActionUpdateSpec = {
|
|
517
|
+
name: 'agentteams_coaction_update',
|
|
518
|
+
title: 'Update AgentTeams Co-Action',
|
|
519
|
+
description: [
|
|
520
|
+
'Update an existing co-action, including status transitions such as OPEN → CLOSED.',
|
|
521
|
+
CO_ACTION_GUIDE_FIRST,
|
|
522
|
+
'Pass expectedUpdatedAt (from agentteams_coaction_get) so a concurrent edit is rejected rather than silently overwritten.',
|
|
523
|
+
PROJECT_SCOPE,
|
|
524
|
+
'Returns the updated co-action id, status, and webUrl.',
|
|
525
|
+
].join(' '),
|
|
526
|
+
discovery: coActionWriteDiscovery,
|
|
527
|
+
inputSchema: z.strictObject({
|
|
528
|
+
id: z.string().min(1).describe('Co-action id (bare uuid or agentteams_act_-prefixed).'),
|
|
529
|
+
title: z.string().min(1).max(255).optional().describe('New title.'),
|
|
530
|
+
content: z.string().min(1).optional().describe('New body in Markdown. Replaces the whole body.'),
|
|
531
|
+
status: z.enum(['OPEN', 'CLOSED']).optional().describe('Status transition. OPEN or CLOSED.'),
|
|
532
|
+
visibility: visibilityField,
|
|
533
|
+
expectedUpdatedAt: expectedUpdatedAtFieldFor('co-action'),
|
|
534
|
+
guideHash: guideHashField,
|
|
535
|
+
idempotencyKey: idempotencyKeyField,
|
|
536
|
+
}),
|
|
537
|
+
handler: async (args, context) => {
|
|
538
|
+
requireOneOf('agentteams_coaction_update', args, ['title', 'content', 'status', 'visibility']);
|
|
539
|
+
return updateCoAction(context.apiUrl, context.projectId, await auth(context), stripContextEntityIdPrefix(args.id), definedFields({
|
|
540
|
+
title: args.title,
|
|
541
|
+
content: args.content,
|
|
542
|
+
status: args.status,
|
|
543
|
+
visibility: args.visibility,
|
|
544
|
+
expectedUpdatedAt: args.expectedUpdatedAt,
|
|
545
|
+
guideHash: args.guideHash,
|
|
546
|
+
idempotencyKey: args.idempotencyKey,
|
|
547
|
+
}));
|
|
548
|
+
},
|
|
549
|
+
};
|
|
550
|
+
const coActionDeleteSpec = {
|
|
551
|
+
name: 'agentteams_coaction_delete',
|
|
552
|
+
title: 'Delete AgentTeams Co-Action',
|
|
553
|
+
description: [
|
|
554
|
+
'Delete a co-action from this project. This is destructive and cannot be undone.',
|
|
555
|
+
CO_ACTION_GUIDE_FIRST,
|
|
556
|
+
'Without expectedUpdatedAt this is an unconditional delete: it removes the co-action even if someone edited it after you last read it.',
|
|
557
|
+
'Pass expectedUpdatedAt (from agentteams_coaction_get) unless you intend that.',
|
|
558
|
+
'Confirm with the user before deleting anything you did not just create.',
|
|
559
|
+
PROJECT_SCOPE,
|
|
560
|
+
].join(' '),
|
|
561
|
+
discovery: coActionWriteDiscovery,
|
|
562
|
+
inputSchema: z.strictObject({
|
|
563
|
+
id: z.string().min(1).describe('Co-action id (bare uuid or agentteams_act_-prefixed).'),
|
|
564
|
+
expectedUpdatedAt: expectedUpdatedAtFieldFor('co-action'),
|
|
565
|
+
guideHash: guideHashField,
|
|
566
|
+
idempotencyKey: idempotencyKeyField,
|
|
567
|
+
}),
|
|
568
|
+
handler: async (args, context) => {
|
|
569
|
+
const coActionId = stripContextEntityIdPrefix(args.id);
|
|
570
|
+
await deleteCoAction(context.apiUrl, context.projectId, await auth(context), coActionId, definedFields({
|
|
571
|
+
expectedUpdatedAt: args.expectedUpdatedAt,
|
|
572
|
+
guideHash: args.guideHash,
|
|
573
|
+
idempotencyKey: args.idempotencyKey,
|
|
574
|
+
}));
|
|
575
|
+
return { deleted: true, id: coActionId };
|
|
576
|
+
},
|
|
577
|
+
};
|
|
578
|
+
const postMortemCreateSpec = {
|
|
579
|
+
name: 'agentteams_postmortem_create',
|
|
580
|
+
title: 'Create AgentTeams Post-Mortem',
|
|
581
|
+
description: [
|
|
582
|
+
'Create a plan-linked post-mortem or a standalone service-incident post-mortem. Create one only when a reproducible or systematic failure delayed or blocked the work and there is a preventable cause.',
|
|
583
|
+
POST_MORTEM_GUIDE_FIRST,
|
|
584
|
+
PROJECT_SCOPE,
|
|
585
|
+
'Returns the created post-mortem id and webUrl.',
|
|
586
|
+
].join(' '),
|
|
587
|
+
discovery: postMortemWriteDiscovery,
|
|
588
|
+
inputSchema: z.strictObject({
|
|
589
|
+
planId: z
|
|
590
|
+
.string()
|
|
591
|
+
.min(1)
|
|
592
|
+
.optional()
|
|
593
|
+
.describe('Optional related plan id (bare uuid or agentteams_pln_-prefixed). Omit for a service incident.'),
|
|
594
|
+
title: z.string().min(1).max(255).describe('Post-mortem title.'),
|
|
595
|
+
content: z.string().min(50).describe('Post-mortem body in Markdown. Must be at least 50 characters.'),
|
|
596
|
+
actionItems: z.array(z.string().min(1)).min(1).describe('Follow-up action items. At least one is required.'),
|
|
597
|
+
status: z
|
|
598
|
+
.enum(['OPEN', 'IN_PROGRESS', 'RESOLVED'])
|
|
599
|
+
.optional()
|
|
600
|
+
.describe('OPEN (default), IN_PROGRESS, or RESOLVED.'),
|
|
601
|
+
guideHash: guideHashField,
|
|
602
|
+
idempotencyKey: idempotencyKeyField,
|
|
603
|
+
}),
|
|
604
|
+
handler: async (args, context) => {
|
|
605
|
+
return createPostMortem(context.apiUrl, context.projectId, await auth(context), definedFields({
|
|
606
|
+
planId: typeof args.planId === 'string' ? stripContextEntityIdPrefix(args.planId) : undefined,
|
|
607
|
+
title: args.title,
|
|
608
|
+
content: args.content,
|
|
609
|
+
actionItems: args.actionItems,
|
|
610
|
+
status: args.status,
|
|
611
|
+
guideHash: args.guideHash,
|
|
612
|
+
idempotencyKey: args.idempotencyKey,
|
|
613
|
+
}));
|
|
614
|
+
},
|
|
615
|
+
};
|
|
616
|
+
const postMortemUpdateSpec = {
|
|
617
|
+
name: 'agentteams_postmortem_update',
|
|
618
|
+
title: 'Update AgentTeams Post-Mortem',
|
|
619
|
+
description: [
|
|
620
|
+
'Update an existing post-mortem. Only the fields you pass are changed.',
|
|
621
|
+
POST_MORTEM_GUIDE_FIRST,
|
|
622
|
+
'Pass expectedUpdatedAt (from agentteams_postmortem_get) so a concurrent edit is rejected rather than silently overwritten.',
|
|
623
|
+
PROJECT_SCOPE,
|
|
624
|
+
'Returns the updated post-mortem id and webUrl.',
|
|
625
|
+
].join(' '),
|
|
626
|
+
discovery: postMortemWriteDiscovery,
|
|
627
|
+
inputSchema: z.strictObject({
|
|
628
|
+
id: z.string().min(1).describe('Post-mortem id (bare uuid or agentteams_pmt_-prefixed).'),
|
|
629
|
+
title: z.string().min(1).max(255).optional().describe('New title.'),
|
|
630
|
+
content: z.string().min(50).optional().describe('New body in Markdown. Replaces the whole body.'),
|
|
631
|
+
actionItems: z.array(z.string().min(1)).min(1).optional().describe('Replacement follow-up action items.'),
|
|
632
|
+
status: z.enum(['OPEN', 'IN_PROGRESS', 'RESOLVED']).optional().describe('New status.'),
|
|
633
|
+
expectedUpdatedAt: expectedUpdatedAtFieldFor('post-mortem'),
|
|
634
|
+
guideHash: guideHashField,
|
|
635
|
+
idempotencyKey: idempotencyKeyField,
|
|
636
|
+
}),
|
|
637
|
+
handler: async (args, context) => {
|
|
638
|
+
requireOneOf('agentteams_postmortem_update', args, ['title', 'content', 'actionItems', 'status']);
|
|
639
|
+
return updatePostMortem(context.apiUrl, context.projectId, await auth(context), stripContextEntityIdPrefix(args.id), definedFields({
|
|
640
|
+
title: args.title,
|
|
641
|
+
content: args.content,
|
|
642
|
+
actionItems: args.actionItems,
|
|
643
|
+
status: args.status,
|
|
644
|
+
expectedUpdatedAt: args.expectedUpdatedAt,
|
|
645
|
+
guideHash: args.guideHash,
|
|
646
|
+
idempotencyKey: args.idempotencyKey,
|
|
647
|
+
}));
|
|
648
|
+
},
|
|
649
|
+
};
|
|
650
|
+
const codeReviewCreateSpec = {
|
|
651
|
+
name: 'agentteams_codereview_create',
|
|
652
|
+
title: 'Create AgentTeams Code Review',
|
|
653
|
+
description: [
|
|
654
|
+
'Create a code review for local diffs, git commit ranges, or pull requests. Findings can be supplied upfront when already known.',
|
|
655
|
+
CODE_REVIEW_GUIDE_FIRST,
|
|
656
|
+
PROJECT_SCOPE,
|
|
657
|
+
'Returns the created code review id, status, and webUrl.',
|
|
658
|
+
].join(' '),
|
|
659
|
+
discovery: codeReviewWriteDiscovery,
|
|
660
|
+
inputSchema: z.strictObject({
|
|
661
|
+
title: z.string().min(1).max(255).describe('Code review title.'),
|
|
662
|
+
targetType: z
|
|
663
|
+
.enum(CODE_REVIEW_TARGET_TYPE_VALUES)
|
|
664
|
+
.optional()
|
|
665
|
+
.describe('Target inspection type from the API CodeReviewTargetType contract.'),
|
|
666
|
+
targetRef: z.string().min(1).max(500).optional().describe('Target reference (commit range, PR number or URL).'),
|
|
667
|
+
repositoryRemoteUrl: z.string().min(1).optional().describe('Git remote repository URL.'),
|
|
668
|
+
sourcePlanId: z
|
|
669
|
+
.string()
|
|
670
|
+
.min(1)
|
|
671
|
+
.optional()
|
|
672
|
+
.describe('Optional source plan id (bare uuid or agentteams_pln_-prefixed).'),
|
|
673
|
+
sourceCompletionReportId: z
|
|
674
|
+
.string()
|
|
675
|
+
.min(1)
|
|
676
|
+
.optional()
|
|
677
|
+
.describe('Optional source completion report id (bare uuid or agentteams_rpt_-prefixed).'),
|
|
678
|
+
sourceCommitStart: z.string().min(1).optional().describe('Source starting commit hash.'),
|
|
679
|
+
sourceCommitEnd: z.string().min(1).optional().describe('Source ending commit hash.'),
|
|
680
|
+
sourceBranchName: z.string().min(1).optional().describe('Source branch name.'),
|
|
681
|
+
baseBranchName: z.string().min(1).optional().describe('Base branch name.'),
|
|
682
|
+
diffSummary: z.string().optional().describe('Summary of the diff inspected.'),
|
|
683
|
+
testSummary: z.string().optional().describe('Summary of test results.'),
|
|
684
|
+
reviewerContext: z.string().optional().describe('Reviewer instructions or context.'),
|
|
685
|
+
recommendationReason: z.string().optional().describe('Reason for recommending this code review.'),
|
|
686
|
+
runnerType: z.enum(RUNNER_TYPE_VALUES).optional().describe('Runner type performing or requesting the review.'),
|
|
687
|
+
model: z.string().min(1).optional().describe('Model snapshot used for the review.'),
|
|
688
|
+
findings: z
|
|
689
|
+
.array(z.strictObject({
|
|
690
|
+
severity: z.enum(['P0', 'P1', 'P2', 'P3']).describe('Severity level (P0, P1, P2, P3).'),
|
|
691
|
+
title: z.string().min(1).max(255).describe('Finding title.'),
|
|
692
|
+
filePath: z.string().min(1).describe('Relative file path.'),
|
|
693
|
+
lineStart: z.number().int().positive().optional().describe('Starting line number.'),
|
|
694
|
+
lineEnd: z.number().int().positive().optional().describe('Ending line number.'),
|
|
695
|
+
problem: z.string().min(1).describe('Problem description.'),
|
|
696
|
+
impact: z.string().min(1).describe('Impact of the problem.'),
|
|
697
|
+
suggestion: z.string().min(1).describe('Concrete suggestion to resolve.'),
|
|
698
|
+
}))
|
|
699
|
+
.optional()
|
|
700
|
+
.describe('Initial review findings.'),
|
|
701
|
+
guideHash: guideHashField,
|
|
702
|
+
idempotencyKey: idempotencyKeyField,
|
|
703
|
+
}),
|
|
704
|
+
handler: async (args, context) => {
|
|
705
|
+
validateInitialCodeReviewFindings(args);
|
|
706
|
+
return createCodeReview(context.apiUrl, context.projectId, await auth(context), definedFields({
|
|
707
|
+
title: args.title,
|
|
708
|
+
targetType: args.targetType,
|
|
709
|
+
targetRef: args.targetRef,
|
|
710
|
+
repositoryRemoteUrl: args.repositoryRemoteUrl,
|
|
711
|
+
sourcePlanId: typeof args.sourcePlanId === 'string' ? stripContextEntityIdPrefix(args.sourcePlanId) : undefined,
|
|
712
|
+
sourceCompletionReportId: typeof args.sourceCompletionReportId === 'string'
|
|
713
|
+
? stripContextEntityIdPrefix(args.sourceCompletionReportId)
|
|
714
|
+
: undefined,
|
|
715
|
+
sourceCommitStart: args.sourceCommitStart,
|
|
716
|
+
sourceCommitEnd: args.sourceCommitEnd,
|
|
717
|
+
sourceBranchName: args.sourceBranchName,
|
|
718
|
+
baseBranchName: args.baseBranchName,
|
|
719
|
+
diffSummary: args.diffSummary,
|
|
720
|
+
testSummary: args.testSummary,
|
|
721
|
+
reviewerContext: args.reviewerContext,
|
|
722
|
+
recommendationReason: args.recommendationReason,
|
|
723
|
+
runnerType: args.runnerType,
|
|
724
|
+
model: args.model,
|
|
725
|
+
findings: args.findings,
|
|
726
|
+
guideHash: args.guideHash,
|
|
727
|
+
idempotencyKey: args.idempotencyKey,
|
|
728
|
+
}));
|
|
729
|
+
},
|
|
730
|
+
};
|
|
731
|
+
const codeReviewUpdateSpec = {
|
|
732
|
+
name: 'agentteams_codereview_update',
|
|
733
|
+
title: 'Update AgentTeams Code Review',
|
|
734
|
+
description: [
|
|
735
|
+
'Update an existing code review metadata or cancel a pending code review.',
|
|
736
|
+
CODE_REVIEW_GUIDE_FIRST,
|
|
737
|
+
'Pass expectedUpdatedAt (from agentteams_codereview_get) so a concurrent edit is rejected rather than silently overwritten.',
|
|
738
|
+
PROJECT_SCOPE,
|
|
739
|
+
'Returns the updated code review id, status, and webUrl.',
|
|
740
|
+
].join(' '),
|
|
741
|
+
discovery: codeReviewWriteDiscovery,
|
|
742
|
+
inputSchema: z.strictObject({
|
|
743
|
+
id: z.string().min(1).describe('Code review id (bare uuid or agentteams_rev_-prefixed).'),
|
|
744
|
+
title: z.string().min(1).max(255).optional().describe('New title.'),
|
|
745
|
+
status: z.enum(['CANCELLED']).optional().describe('Status transition. CANCELLED cancels a pending code review.'),
|
|
746
|
+
targetType: z.enum(CODE_REVIEW_TARGET_TYPE_VALUES).optional().describe('New target inspection type.'),
|
|
747
|
+
targetRef: z.string().min(1).max(500).optional().describe('New target reference.'),
|
|
748
|
+
sourceCommitStart: z.string().min(1).optional().describe('New starting commit hash.'),
|
|
749
|
+
sourceCommitEnd: z.string().min(1).optional().describe('New ending commit hash.'),
|
|
750
|
+
sourceBranchName: z.string().min(1).optional().describe('New source branch name.'),
|
|
751
|
+
baseBranchName: z.string().min(1).optional().describe('New base branch name.'),
|
|
752
|
+
diffSummary: z.string().optional().describe('New summary of the diff.'),
|
|
753
|
+
testSummary: z.string().optional().describe('New summary of test results.'),
|
|
754
|
+
reviewerContext: z.string().optional().describe('New reviewer context.'),
|
|
755
|
+
recommendationReason: z.string().optional().describe('New recommendation reason.'),
|
|
756
|
+
runnerType: z.enum(RUNNER_TYPE_VALUES).optional().describe('New runner type.'),
|
|
757
|
+
model: z.string().min(1).optional().describe('New model snapshot.'),
|
|
758
|
+
expectedUpdatedAt: expectedUpdatedAtFieldFor('code review'),
|
|
759
|
+
guideHash: guideHashField,
|
|
760
|
+
idempotencyKey: idempotencyKeyField,
|
|
761
|
+
}),
|
|
762
|
+
handler: async (args, context) => {
|
|
763
|
+
requireOneOf('agentteams_codereview_update', args, ['status', ...CODE_REVIEW_UPDATE_METADATA_FIELDS]);
|
|
764
|
+
validateCodeReviewCancellation(args);
|
|
765
|
+
const reviewId = stripContextEntityIdPrefix(args.id);
|
|
766
|
+
if (args.status === 'CANCELLED') {
|
|
767
|
+
return cancelCodeReview(context.apiUrl, context.projectId, await auth(context), reviewId, definedFields({
|
|
768
|
+
guideHash: args.guideHash,
|
|
769
|
+
idempotencyKey: args.idempotencyKey,
|
|
770
|
+
}));
|
|
771
|
+
}
|
|
772
|
+
return updateCodeReview(context.apiUrl, context.projectId, await auth(context), reviewId, definedFields({
|
|
773
|
+
title: args.title,
|
|
774
|
+
targetType: args.targetType,
|
|
775
|
+
targetRef: args.targetRef,
|
|
776
|
+
sourceCommitStart: args.sourceCommitStart,
|
|
777
|
+
sourceCommitEnd: args.sourceCommitEnd,
|
|
778
|
+
sourceBranchName: args.sourceBranchName,
|
|
779
|
+
baseBranchName: args.baseBranchName,
|
|
780
|
+
diffSummary: args.diffSummary,
|
|
781
|
+
testSummary: args.testSummary,
|
|
782
|
+
reviewerContext: args.reviewerContext,
|
|
783
|
+
recommendationReason: args.recommendationReason,
|
|
784
|
+
runnerType: args.runnerType,
|
|
785
|
+
model: args.model,
|
|
786
|
+
expectedUpdatedAt: args.expectedUpdatedAt,
|
|
787
|
+
guideHash: args.guideHash,
|
|
788
|
+
idempotencyKey: args.idempotencyKey,
|
|
789
|
+
}));
|
|
790
|
+
},
|
|
791
|
+
};
|
|
792
|
+
const codeReviewFindingStatusSetSpec = {
|
|
793
|
+
name: 'agentteams_codereview_finding_status_set',
|
|
794
|
+
title: 'Set AgentTeams Code Review Finding Status',
|
|
795
|
+
description: [
|
|
796
|
+
'Change the status of a single code review finding (DISMISSED to dismiss, OPEN to undismiss, RESOLVED to mark resolved).',
|
|
797
|
+
CODE_REVIEW_GUIDE_FIRST,
|
|
798
|
+
'Pass expectedUpdatedAt (from agentteams_codereview_finding_get) so a concurrent transition is rejected rather than silently overwritten.',
|
|
799
|
+
PROJECT_SCOPE,
|
|
800
|
+
'Returns the updated code review.',
|
|
801
|
+
].join(' '),
|
|
802
|
+
discovery: codeReviewWriteDiscovery,
|
|
803
|
+
inputSchema: z.strictObject({
|
|
804
|
+
codeReviewId: z.string().min(1).describe('Parent code review id (bare uuid or agentteams_rev_-prefixed).'),
|
|
805
|
+
findingId: z.string().min(1).describe('Finding id (bare uuid or agentteams_rvf_-prefixed).'),
|
|
806
|
+
status: z
|
|
807
|
+
.enum(['OPEN', 'DISMISSED', 'RESOLVED'])
|
|
808
|
+
.describe('New status: DISMISSED to dismiss, OPEN to undismiss/reopen, RESOLVED to mark resolved.'),
|
|
809
|
+
expectedUpdatedAt: expectedUpdatedAtFieldFor('code review finding'),
|
|
810
|
+
guideHash: guideHashField,
|
|
811
|
+
idempotencyKey: idempotencyKeyField,
|
|
812
|
+
}),
|
|
813
|
+
handler: async (args, context) => {
|
|
814
|
+
const codeReviewId = stripContextEntityIdPrefix(args.codeReviewId);
|
|
815
|
+
const findingId = stripContextEntityIdPrefix(args.findingId);
|
|
816
|
+
const body = definedFields({
|
|
817
|
+
expectedUpdatedAt: args.expectedUpdatedAt,
|
|
818
|
+
guideHash: args.guideHash,
|
|
819
|
+
idempotencyKey: args.idempotencyKey,
|
|
820
|
+
});
|
|
821
|
+
const headers = await auth(context);
|
|
822
|
+
if (args.status === 'DISMISSED') {
|
|
823
|
+
return dismissCodeReviewFinding(context.apiUrl, context.projectId, headers, codeReviewId, findingId, body);
|
|
824
|
+
}
|
|
825
|
+
if (args.status === 'OPEN') {
|
|
826
|
+
return undismissCodeReviewFinding(context.apiUrl, context.projectId, headers, codeReviewId, findingId, body);
|
|
827
|
+
}
|
|
828
|
+
return resolveCodeReviewFinding(context.apiUrl, context.projectId, headers, codeReviewId, findingId, body);
|
|
829
|
+
},
|
|
830
|
+
};
|
|
404
831
|
/** Every write tool the CLI MCP server exposes, in registration order. */
|
|
405
832
|
export function getWriteToolSpecs() {
|
|
406
833
|
return [
|
|
@@ -413,6 +840,14 @@ export function getWriteToolSpecs() {
|
|
|
413
840
|
commentReplyCreateSpec,
|
|
414
841
|
commentReplyUpdateSpec,
|
|
415
842
|
commentReplyDeleteSpec,
|
|
843
|
+
coActionCreateSpec,
|
|
844
|
+
coActionUpdateSpec,
|
|
845
|
+
coActionDeleteSpec,
|
|
846
|
+
postMortemCreateSpec,
|
|
847
|
+
postMortemUpdateSpec,
|
|
848
|
+
codeReviewCreateSpec,
|
|
849
|
+
codeReviewUpdateSpec,
|
|
850
|
+
codeReviewFindingStatusSetSpec,
|
|
416
851
|
];
|
|
417
852
|
}
|
|
418
853
|
//# sourceMappingURL=writeTools.js.map
|