biaws-mcp 0.7.0 → 0.9.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 +5 -5
- package/package.json +1 -1
- package/src/domains/demands/service.js +9 -6
- package/src/tools.js +10 -2
- package/src/version.js +1 -1
package/README.md
CHANGED
|
@@ -65,13 +65,13 @@ O pacote público expõe o executável `biaws-mcp`. Clientes configurados pelo C
|
|
|
65
65
|
usam uma versão fixada por meio do cache local do npm:
|
|
66
66
|
|
|
67
67
|
```bash
|
|
68
|
-
npx --yes biaws-mcp@0.
|
|
68
|
+
npx --yes biaws-mcp@0.9.0
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
Também é possível instalá-lo explicitamente:
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
|
-
npm install --global biaws-mcp@0.
|
|
74
|
+
npm install --global biaws-mcp@0.9.0
|
|
75
75
|
biaws-mcp
|
|
76
76
|
```
|
|
77
77
|
|
|
@@ -90,15 +90,15 @@ npm start
|
|
|
90
90
|
Em um cliente MCP, configure o comando:
|
|
91
91
|
|
|
92
92
|
```bash
|
|
93
|
-
npx --yes biaws-mcp@0.
|
|
93
|
+
npx --yes biaws-mcp@0.9.0
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
O fluxo recomendado é gerar a configuração completa com:
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
99
|
BIAWS_ENV_FILE=/caminho/para/instances/minha-instancia/.env \
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
biaws workspace agent configure codex \
|
|
101
|
+
--project /caminho/do/projeto --workspace id-do-workspace
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
O processo de publicação e rollback está em
|
package/package.json
CHANGED
|
@@ -112,13 +112,16 @@ async function readAllDemands(args = {}) {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
async function readDemand(requestId) {
|
|
115
|
-
const
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
const isObjectId = /^[0-9a-f]{24}$/iu.test(requestId);
|
|
116
|
+
const payload = isObjectId
|
|
117
|
+
? await fetchJson(`/api/requests/${encodeURIComponent(requestId)}`)
|
|
118
|
+
: await fetchJson("/api/requests", { code: requestId });
|
|
119
|
+
const request = isObjectId
|
|
120
|
+
? payload.request
|
|
121
|
+
: payload.items?.find((item) => item.clientCode === requestId);
|
|
119
122
|
if (!request) throw new Error(`Demand not found: ${requestId}`);
|
|
120
123
|
return {
|
|
121
|
-
meta: payload.meta,
|
|
124
|
+
meta: payload.meta || {},
|
|
122
125
|
request,
|
|
123
126
|
};
|
|
124
127
|
}
|
|
@@ -396,7 +399,7 @@ export async function updateDemandTask(args = {}) {
|
|
|
396
399
|
export async function updateDemandTaskStatus(args = {}) {
|
|
397
400
|
if (!args.requestId) throw new Error("requestId is required");
|
|
398
401
|
if (!args.taskId) throw new Error("taskId is required");
|
|
399
|
-
validateTaskStatus(args.status);
|
|
402
|
+
await validateTaskStatus(args.status);
|
|
400
403
|
|
|
401
404
|
const { request, task } = await readDemandTask(args.requestId, args.taskId);
|
|
402
405
|
return sendJson(
|
package/src/tools.js
CHANGED
|
@@ -45,6 +45,13 @@ const DEMAND_TASK_STATUS_SCHEMA = {
|
|
|
45
45
|
"Status configurado em Configurações/Listas de Opções; a API valida o valor vigente.",
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
+
const DEMAND_TASK_UPDATE_STATUS_SCHEMA = {
|
|
49
|
+
type: "string",
|
|
50
|
+
enum: ["Pendente", "Andamento", "Aguardando Decisão", "Concluído"],
|
|
51
|
+
description:
|
|
52
|
+
"Status válido da tarefa. Use exatamente um dos valores declarados no enum.",
|
|
53
|
+
};
|
|
54
|
+
|
|
48
55
|
const DEMAND_TASK_FIELDS = {
|
|
49
56
|
code: { type: "string", description: "Código opcional da tarefa" },
|
|
50
57
|
title: { type: "string" },
|
|
@@ -710,7 +717,8 @@ const tools = [
|
|
|
710
717
|
},
|
|
711
718
|
{
|
|
712
719
|
name: "demands_update_task_status",
|
|
713
|
-
description:
|
|
720
|
+
description:
|
|
721
|
+
"Altera somente o status de uma tarefa da melhoria. Requer um status válido declarado no schema.",
|
|
714
722
|
inputSchema: {
|
|
715
723
|
type: "object",
|
|
716
724
|
required: ["requestId", "taskId", "status"],
|
|
@@ -718,7 +726,7 @@ const tools = [
|
|
|
718
726
|
properties: {
|
|
719
727
|
requestId: { type: "string", description: "ID ou código da melhoria" },
|
|
720
728
|
taskId: { type: "string" },
|
|
721
|
-
status:
|
|
729
|
+
status: DEMAND_TASK_UPDATE_STATUS_SCHEMA,
|
|
722
730
|
},
|
|
723
731
|
},
|
|
724
732
|
handler: updateDemandTaskStatus,
|
package/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const SERVER_NAME = "biaws-mcp";
|
|
2
|
-
export const SERVER_VERSION = "0.
|
|
2
|
+
export const SERVER_VERSION = "0.9.0";
|