biaws-mcp 0.3.0 → 0.4.0

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/README.md CHANGED
@@ -213,6 +213,10 @@ conhecimento.
213
213
  - `issues_search`: busca issues com os mesmos filtros principais da
214
214
  `biaws-api`, inclusive por workspace, aplicação e componente afetado.
215
215
  - `issues_get`: obtém uma issue com comentários e metadados dos anexos.
216
+ - `issues_add_comment`: adiciona um comentário em Markdown a uma issue
217
+ existente; a autoria é atribuída pela identidade autenticada na API.
218
+ - `issues_update_comment`: atualiza o conteúdo e, opcionalmente, a data de um
219
+ comentário existente, preservando sua autoria original.
216
220
  - `issues_get_classification_catalog`: obtém a árvore taxonômica e os grupos de tags válidos; opcionalmente inclui listas achatadas de IDs e caminhos.
217
221
  - `issues_create_taxonomy_item`: inclui um item na raiz ou sob outro item,
218
222
  opcionalmente configurando seu escopo por aplicações.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "biaws-mcp",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Servidor MCP de domínio para o Bondia Workspaces",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -130,6 +130,34 @@ export async function getIssueDetails(args = {}) {
130
130
  return fetchJson(`/api/issues/${encodeURIComponent(args.issueId)}`);
131
131
  }
132
132
 
133
+ export async function addIssueComment(args = {}) {
134
+ const issueId = String(args.issueId || "").trim();
135
+ const text = String(args.text || "").trim();
136
+ if (!issueId) throw new Error("issueId is required");
137
+ if (!text) throw new Error("text is required");
138
+
139
+ return sendJson(
140
+ `/api/issues/${encodeURIComponent(issueId)}/comments`,
141
+ cleanParams({ text, date: args.date }),
142
+ {},
143
+ "POST",
144
+ );
145
+ }
146
+
147
+ export async function updateIssueComment(args = {}) {
148
+ const issueId = String(args.issueId || "").trim();
149
+ const commentId = String(args.commentId || "").trim();
150
+ const text = String(args.text || "").trim();
151
+ if (!issueId) throw new Error("issueId is required");
152
+ if (!commentId) throw new Error("commentId is required");
153
+ if (!text) throw new Error("text is required");
154
+
155
+ return sendJson(
156
+ `/api/issues/${encodeURIComponent(issueId)}/comments/${encodeURIComponent(commentId)}`,
157
+ cleanParams({ text, date: args.date }),
158
+ );
159
+ }
160
+
133
161
  export async function getIssueClassificationCatalog(args = {}) {
134
162
  const payload = await fetchJson(
135
163
  "/api/issues/taxonomy",
package/src/tools.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import {
2
+ addIssueComment,
2
3
  classifyIssue,
3
4
  createTaxonomyItem,
4
5
  createIssue,
@@ -10,6 +11,7 @@ import {
10
11
  summarizeIssuesForSupport,
11
12
  suggestTaxonomy,
12
13
  updateIssueState,
14
+ updateIssueComment,
13
15
  updateTaxonomyItem,
14
16
  } from "./domains/issues/service.js";
15
17
  import {
@@ -156,6 +158,58 @@ const tools = [
156
158
  },
157
159
  handler: getIssueDetails,
158
160
  },
161
+ {
162
+ name: "issues_add_comment",
163
+ description: "Adiciona um comentário em Markdown a uma issue existente.",
164
+ inputSchema: {
165
+ type: "object",
166
+ required: ["issueId", "text"],
167
+ additionalProperties: false,
168
+ properties: {
169
+ issueId: { type: "string", minLength: 1 },
170
+ text: {
171
+ type: "string",
172
+ minLength: 1,
173
+ description: "Conteúdo do comentário em Markdown.",
174
+ },
175
+ date: {
176
+ type: "string",
177
+ description:
178
+ "Data do comentário em formato aceito pela API; usa o momento atual quando omitida.",
179
+ },
180
+ },
181
+ },
182
+ handler: addIssueComment,
183
+ },
184
+ {
185
+ name: "issues_update_comment",
186
+ description:
187
+ "Atualiza o conteúdo e, opcionalmente, a data de um comentário de issue.",
188
+ inputSchema: {
189
+ type: "object",
190
+ required: ["issueId", "commentId", "text"],
191
+ additionalProperties: false,
192
+ properties: {
193
+ issueId: { type: "string", minLength: 1 },
194
+ commentId: {
195
+ type: "string",
196
+ minLength: 1,
197
+ description: "ID do comentário retornado por issues_get.",
198
+ },
199
+ text: {
200
+ type: "string",
201
+ minLength: 1,
202
+ description: "Novo conteúdo do comentário em Markdown.",
203
+ },
204
+ date: {
205
+ type: "string",
206
+ description:
207
+ "Nova data do comentário; usa o momento atual quando omitida.",
208
+ },
209
+ },
210
+ },
211
+ handler: updateIssueComment,
212
+ },
159
213
  {
160
214
  name: "issues_get_classification_catalog",
161
215
  description:
package/src/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  export const SERVER_NAME = "biaws-mcp";
2
- export const SERVER_VERSION = "0.3.0";
2
+ export const SERVER_VERSION = "0.4.0";