sad-mcp 1.1.5 → 1.1.7

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/tools.js CHANGED
@@ -10,6 +10,7 @@ import { trackToolCall } from "./tracking.js";
10
10
  import { renderBPMN, parseAndValidate, formatIssues, } from "./bpmn/index.js";
11
11
  const __tools_filename = fileURLToPath(import.meta.url);
12
12
  const __tools_dirname = dirname(__tools_filename);
13
+ const PKG = JSON.parse(readFileSync(join(__tools_dirname, "..", "package.json"), "utf-8"));
13
14
  function loadSharedContent(skillsDir) {
14
15
  const sharedDir = join(skillsDir, "_shared");
15
16
  const files = ["layout-recipes.md", "model-shape.md", "export-buttons.md"];
@@ -354,6 +355,14 @@ export function registerToolHandlers(server) {
354
355
  required: ["html_content", "filename"],
355
356
  },
356
357
  },
358
+ {
359
+ name: "version",
360
+ description: "Return the version of the sad-mcp server currently running. Use this to verify which version is loaded when skills behave unexpectedly (npx can serve a stale cached version).",
361
+ inputSchema: {
362
+ type: "object",
363
+ properties: {},
364
+ },
365
+ },
357
366
  ],
358
367
  }));
359
368
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
@@ -675,6 +684,11 @@ export function registerToolHandlers(server) {
675
684
  trackToolCall(name, toolArgs, { success: true, responseChars: summary.length }, Date.now() - startTime);
676
685
  return { content: [{ type: "text", text: summary }] };
677
686
  }
687
+ if (name === "version") {
688
+ const text = `${PKG.name}@${PKG.version}`;
689
+ trackToolCall(name, toolArgs, { success: true, responseChars: text.length }, Date.now() - startTime);
690
+ return { content: [{ type: "text", text }] };
691
+ }
678
692
  throw new Error(`Unknown tool: ${name}`);
679
693
  });
680
694
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sad-mcp",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "MCP server for Software Analysis and Design course materials at BGU",
5
5
  "type": "module",
6
6
  "bin": {
@@ -603,7 +603,7 @@ Fonts: 'Noto Sans Hebrew' + 'IBM Plex Mono' from Google Fonts
603
603
  </html>
604
604
  ```
605
605
 
606
- For a single-tab diagram, drop the tab bar, the split-rationale line, and the second `.diagram-part`; keep `diagramLayouts` as a one-element array so `showDiagram` / `fixLayout` wiring stays uniform.
606
+ **Single-tab diagrams still define the full script.** Always emit `diagramLayouts` (one-element array), `activeTab`, `currentLayout()`, **and `showDiagram(index)`**. Only the HTML-level tab bar and the second `.diagram-part` are conditional on splitting. Omitting `showDiagram` is a silent bug: a future edit that adds tabs will have dead onclick handlers with no console error pointing at the cause.
607
607
 
608
608
  ---
609
609
 
@@ -629,6 +629,7 @@ For a single-tab diagram, drop the tab bar, the split-rationale line, and the se
629
629
  - [ ] Every UC label describes an action WITH the information system (data entry, query, state change) — no bare physical verbs (`הכנת X`, `ספירת X`, `מסירת X`, `תשלום במזומן`). Physical verbs are wrapped with a system verb (`רישום`, `הזנה`, `עדכון`, `סימון`, etc.).
630
630
  - [ ] Every system-time / cron actor association has a `timing` field (and the rendered diagram shows a visible label at the line midpoint) — no unlabeled cron connections.
631
631
  - [ ] No "send-only" UCs (no bare `שליחת X` / `הודעה ל-X`); message-sends are folded into the UC that decided to send.
632
+ - [ ] `showDiagram(index)` is defined in every generated file, even single-tab diagrams (so tab switching is wired if splitting is ever added).
632
633
  - [ ] `fixLayout` uses adaptive column X (widens boundary if needed so left/center/right ellipses never overlap horizontally) AND expands viewBox width so right-side actors are not clipped.
633
634
  - [ ] If split: each tab has a split-rationale line citing the actual trigger that fired (count > 8, or 2+ disjoint actor groups); `showDiagram` and per-tab `fixLayout` wired per §11.
634
635
  - [ ] `diagramModel` defined per `model-shape.md`; VP export button present and wired to `exportXMI()`.