@devstroupe/devkit-mcp 1.2.0-beta.5 → 1.2.0-beta.6

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/index.js CHANGED
@@ -121,6 +121,11 @@ function handleRequest(request) {
121
121
  case 'tools/list':
122
122
  sendResult(id, {
123
123
  tools: [
124
+ {
125
+ name: 'ds_health',
126
+ description: 'Verifica se o MCP DevKit está ativo, identifica o projeto atual e informa se config, UI e AI workflow estão disponíveis. Use como primeira chamada de toda skill DevsTroupe.',
127
+ inputSchema: { type: 'object', properties: {} }
128
+ },
124
129
  {
125
130
  name: 'ds_list_entities',
126
131
  description: 'Lista todas as entidades e propriedades configuradas no devstroupe.config.ts do projeto.',
@@ -229,8 +234,25 @@ function handleRequest(request) {
229
234
  function handleToolCall(id, toolName, args) {
230
235
  const configPath = path.join(process.cwd(), 'devstroupe.config.ts');
231
236
  const cliPath = resolveCliPath();
232
- // ── ds_list_entities ──────────────────────────────────────────────────────
233
- if (toolName === 'ds_list_entities') {
237
+ // ── ds_health ─────────────────────────────────────────────────────────────
238
+ if (toolName === 'ds_health') {
239
+ const frontendRoot = path.join(process.cwd(), 'frontend');
240
+ return sendResult(id, {
241
+ content: [{
242
+ type: 'text',
243
+ text: JSON.stringify({
244
+ status: 'ready',
245
+ server: 'devkit-mcp',
246
+ projectRoot: process.cwd(),
247
+ configFound: fs.existsSync(configPath),
248
+ workflowInstalled: fs.existsSync(path.join(process.cwd(), '.devstroupe', 'ai-workflow.json')),
249
+ uiInitialized: fs.existsSync(path.join(frontendRoot, 'libs', 'ui')) || fs.existsSync(path.join(frontendRoot, 'components.json')),
250
+ }, null, 2),
251
+ }]
252
+ });
253
+ // ── ds_list_entities ──────────────────────────────────────────────────────
254
+ }
255
+ else if (toolName === 'ds_list_entities') {
234
256
  if (!fs.existsSync(configPath)) {
235
257
  return sendResult(id, {
236
258
  content: [{ type: 'text', text: 'devstroupe.config.ts não encontrado. Rode "devstroupe init" primeiro.' }],
@@ -31,6 +31,7 @@ const index_1 = require("./index");
31
31
  await t.test('tools/list exposes generation and governance', async () => {
32
32
  const response = await (0, index_1.dispatchRequest)({ jsonrpc: '2.0', id: 2, method: 'tools/list' });
33
33
  const names = response.result.tools.map((tool) => tool.name);
34
+ strict_1.default.ok(names.includes('ds_health'));
34
35
  strict_1.default.ok(names.includes('ds_list_entities'));
35
36
  strict_1.default.ok(names.includes('ds_generate_crud'));
36
37
  strict_1.default.ok(names.includes('ds_check_architecture'));
@@ -43,6 +44,15 @@ const index_1 = require("./index");
43
44
  const entities = JSON.parse(response.result.content[0].text);
44
45
  strict_1.default.deepEqual(entities, [{ name: 'cabin', module: 'booking', properties: [] }]);
45
46
  });
47
+ await t.test('ds_health reports the active DevKit workspace', async () => {
48
+ const response = await (0, index_1.dispatchRequest)({
49
+ jsonrpc: '2.0', id: 5, method: 'tools/call', params: { name: 'ds_health' },
50
+ });
51
+ const health = JSON.parse(response.result.content[0].text);
52
+ strict_1.default.equal(health.status, 'ready');
53
+ strict_1.default.equal(health.configFound, true);
54
+ strict_1.default.equal(health.projectRoot, sandbox);
55
+ });
46
56
  await t.test('unknown methods return JSON-RPC errors', async () => {
47
57
  const response = await (0, index_1.dispatchRequest)({ jsonrpc: '2.0', id: 4, method: 'unknown' });
48
58
  strict_1.default.equal(response.error.code, -32601);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devstroupe/devkit-mcp",
3
- "version": "1.2.0-beta.5",
3
+ "version": "1.2.0-beta.6",
4
4
  "description": "DevsTroupe Development Kit MCP Server — exposes CLI automation as native AI tools via Model Context Protocol",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -34,7 +34,7 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "fs-extra": "^11.2.0",
37
- "@devstroupe/devkit-cli": "1.2.0-beta.5"
37
+ "@devstroupe/devkit-cli": "1.2.0-beta.6"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/fs-extra": "^11.0.4",