@agilemonster/mcp-server 1.0.11 → 1.0.12

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/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AgileMonsterProjectConfig, AutonomousStepResponse, Board, BoardAgentConfig, Card, ContextResponse, DiscoveredProject, PulseResponse } from './types.js';
2
- export declare const MCP_SERVER_VERSION = "1.0.11";
2
+ export declare const MCP_SERVER_VERSION = "1.0.12";
3
3
  export declare class AgileMonsterClient {
4
4
  private apiKey;
5
5
  private baseUrl;
package/dist/client.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { execSync } from 'node:child_process';
4
- export const MCP_SERVER_VERSION = '1.0.11';
4
+ export const MCP_SERVER_VERSION = '1.0.12';
5
5
  export class AgileMonsterClient {
6
6
  apiKey = '';
7
7
  baseUrl;
package/dist/server.js CHANGED
@@ -863,19 +863,24 @@ function collectProjectSourceFiles(projectPath, keywords) {
863
863
  }
864
864
  catch { }
865
865
  }
866
- // Bonus score for UI components / screens when task mentions UX or UI
866
+ // Bonus score for UI components / screens AND backend controllers / models
867
867
  if (ext === '.tsx' || ext === '.jsx' || ext === '.dart' || ext === '.vue') {
868
- if (lowerRel.includes('component') || lowerRel.includes('screen') || lowerRel.includes('widget') || lowerRel.includes('modal')) {
868
+ if (lowerRel.includes('component') || lowerRel.includes('screen') || lowerRel.includes('widget') || lowerRel.includes('modal') || lowerRel.includes('model')) {
869
869
  score += 8;
870
870
  }
871
871
  }
872
+ if (ext === '.php' || ext === '.py' || ext === '.ts') {
873
+ if (lowerRel.includes('controller') || lowerRel.includes('service') || lowerRel.includes('route')) {
874
+ score += 10;
875
+ }
876
+ }
872
877
  results.push({ rel, score });
873
878
  }
874
879
  }
875
880
  };
876
881
  walk(projectPath, 0);
877
882
  results.sort((a, b) => b.score - a.score || a.rel.localeCompare(b.rel));
878
- return results.slice(0, 220).map((r) => r.rel);
883
+ return results.slice(0, 250).map((r) => r.rel);
879
884
  }
880
885
  function getAgileMonsterLocksDir() {
881
886
  const dir = path.join(os.homedir(), '.agilemonster', 'locks');
@@ -975,14 +980,34 @@ export async function executeQueuedCardAutonomously(client, card, projectPath) {
975
980
  if (currentContent.includes(edit.search)) {
976
981
  const updatedContent = currentContent.replace(edit.search, edit.replace);
977
982
  if (updatedContent !== currentContent) {
978
- // Guard against unbalanced braces introduced by partial block replacement
983
+ // Guard against unbalanced braces/parens/brackets introduced by partial block replacement
979
984
  const countChar = (s, ch) => s.split(ch).length - 1;
980
985
  const searchBraceDelta = countChar(edit.search, '{') - countChar(edit.search, '}');
981
986
  const replaceBraceDelta = countChar(edit.replace, '{') - countChar(edit.replace, '}');
982
- if (searchBraceDelta !== replaceBraceDelta) {
987
+ const searchParenDelta = countChar(edit.search, '(') - countChar(edit.search, ')');
988
+ const replaceParenDelta = countChar(edit.replace, '(') - countChar(edit.replace, ')');
989
+ if (searchBraceDelta !== replaceBraceDelta || searchParenDelta !== replaceParenDelta) {
983
990
  continue;
984
991
  }
985
992
  fs.writeFileSync(fullPath, updatedContent, 'utf8');
993
+ // Pre-submit static analysis gate for Dart/Flutter files
994
+ if (relPath.endsWith('.dart')) {
995
+ try {
996
+ execSync(`dart analyze "${fullPath}"`, {
997
+ cwd: projectPath,
998
+ stdio: ['ignore', 'pipe', 'pipe'],
999
+ timeout: 25000,
1000
+ });
1001
+ }
1002
+ catch (analyzeErr) {
1003
+ const out = String(analyzeErr?.stdout || '') + String(analyzeErr?.stderr || '');
1004
+ if (/\berror\s+[•-]/i.test(out)) {
1005
+ // Revert broken Dart edit so it never breaks the build
1006
+ fs.writeFileSync(fullPath, currentContent, 'utf8');
1007
+ continue;
1008
+ }
1009
+ }
1010
+ }
986
1011
  if (!modifiedFiles.includes(relPath)) {
987
1012
  modifiedFiles.push(relPath);
988
1013
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilemonster/mcp-server",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "type": "module",
5
5
  "description": "Official Model Context Protocol (MCP) server & Orchestrator for Agile Monster (Cursor, Claude Code, Antigravity, Codex, Hermes, Windsurf)",
6
6
  "main": "dist/server.js",