Skip to content

Commit 834fbc3

Browse files
Merge pull request #458 from aignostics/feat/split-utils-requirements
Introduce SHR-UTILS-2 plugin system requirements and integration tests Replaces the monolithic SHR-UTILS-1 with a focused SHR-UTILS-2 umbrella covering SDK plugin extension, with four child SWRs for discovery, CLI, GUI navigation, and MCP integration. Adds integration tests verifying plugin CLI and navigation builder registration via entry-point auto-discovery, backed by an extended dummy plugin fixture.
2 parents 7dfaf52 + 1504e1d commit 834fbc3

21 files changed

Lines changed: 253 additions & 78 deletions

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ repos:
4141
exclude: "^tests/fixtures/|.json|^codegen"
4242
- id: mixed-line-ending
4343
- id: name-tests-test
44-
exclude: "^tests/main.py"
44+
exclude: "^(tests/main\\.py|tests/resources/)"
4545
- id: requirements-txt-fixer
4646
- id: trailing-whitespace
4747
exclude: "docs/source/_static|ATTRIBUTIONS.md||API_REFEREENCE"

requirements/SHR-UTILS-1.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

requirements/SHR-UTILS-2.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
itemId: SHR-UTILS-2
3+
itemTitle: SDK Plugin System
4+
itemType: Requirement
5+
Requirement type: ENVIRONMENT
6+
---
7+
8+
## Description
9+
10+
Developers shall be able to extend the SDK with custom plugins.

requirements/SWR-UTILS-1-1.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

requirements/SWR-UTILS-2-1.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
itemId: SWR-UTILS-2-1
3+
itemTitle: Plugin Module Discovery and Loading
4+
itemHasParent: SHR-UTILS-2
5+
itemType: Requirement
6+
Requirement type: FUNCTIONAL
7+
Layer: System (backend logic)
8+
---
9+
10+
System shall discover and load externally installed plugin modules at runtime, making their functionality available without requiring changes to the core SDK codebase.

requirements/SWR-UTILS-2-2.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
itemId: SWR-UTILS-2-2
3+
itemTitle: Plugin CLI Command Integration
4+
itemHasParent: SHR-UTILS-2
5+
itemType: Requirement
6+
Requirement type: FUNCTIONAL
7+
Layer: System (backend logic)
8+
---
9+
10+
System shall automatically register CLI commands contributed by plugin modules into the SDK command-line interface.

requirements/SWR-UTILS-2-3.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
itemId: SWR-UTILS-2-3
3+
itemTitle: Plugin GUI Navigation Integration
4+
itemHasParent: SHR-UTILS-2
5+
itemType: Requirement
6+
Requirement type: FUNCTIONAL
7+
Layer: System (backend logic)
8+
---
9+
10+
System shall automatically register GUI navigation entries contributed by plugin modules into the SDK graphical user interface.

requirements/SWR-UTILS-2-4.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
itemId: SWR-UTILS-2-4
3+
itemTitle: Plugin MCP Server Integration
4+
itemHasParent: SHR-UTILS-2
5+
itemType: Requirement
6+
Requirement type: FUNCTIONAL
7+
Layer: System (backend logic)
8+
---
9+
10+
System shall automatically register MCP servers contributed by plugin modules into the SDK MCP server.

specifications/SPEC-UTILS-SERVICE.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ itemId: SPEC-UTILS-SERVICE
33
itemTitle: Utils Module Specification
44
itemType: Software Item Spec
55
itemIsRelatedTo: SPEC-GUI-SERVICE, SPEC-BUCKET-SERVICE, SPEC-DATASET-SERVICE, SPEC-NOTEBOOK-SERVICE, SPEC-PLATFORM-SERVICE, SPEC-QUPATH-SERVICE, SPEC-SYSTEM-SERVICE, SPEC-WSI-SERVICE
6-
itemFulfills: SWR-APPLICATION-1-1, SWR-APPLICATION-1-2, SWR-APPLICATION-2-1, SWR-APPLICATION-2-2, SWR-APPLICATION-2-3, SWR-APPLICATION-2-4, SWR-APPLICATION-2-5, SWR-APPLICATION-2-6, SWR-APPLICATION-2-7, SWR-APPLICATION-2-8, SWR-APPLICATION-2-9, SWR-APPLICATION-2-10, SWR-APPLICATION-2-11, SWR-APPLICATION-2-12, SWR-APPLICATION-2-13, SWR-APPLICATION-2-14, SWR-APPLICATION-2-15, SWR-APPLICATION-2-16, SWR-APPLICATION-3-1, SWR-APPLICATION-3-2, SWR-APPLICATION-3-3, SWR-BUCKET-1-1, SWR-BUCKET-1-2, SWR-BUCKET-1-3, SWR-BUCKET-1-4, SWR-BUCKET-1-5, SWR-BUCKET-1-6, SWR-BUCKET-1-7, SWR-BUCKET-1-8, SWR-BUCKET-1-9, SWR-DATASET-1-1, SWR-DATASET-1-2, SWR-DATASET-1-3, SWR-NOTEBOOK-1-1, SWR-UTILS-1-1, SWR-VISUALIZATION-1-1, SWR-VISUALIZATION-1-2, SWR-VISUALIZATION-1-3, SWR-VISUALIZATION-1-4, SWR_SYSTEM_CLI_HEALTH_1, SWR_SYSTEM_GUI_HEALTH_1, SWR_SYSTEM_GUI_SETTINGS_1
6+
itemFulfills: SWR-APPLICATION-1-1, SWR-APPLICATION-1-2, SWR-APPLICATION-2-1, SWR-APPLICATION-2-2, SWR-APPLICATION-2-3, SWR-APPLICATION-2-4, SWR-APPLICATION-2-5, SWR-APPLICATION-2-6, SWR-APPLICATION-2-7, SWR-APPLICATION-2-8, SWR-APPLICATION-2-9, SWR-APPLICATION-2-10, SWR-APPLICATION-2-11, SWR-APPLICATION-2-12, SWR-APPLICATION-2-13, SWR-APPLICATION-2-14, SWR-APPLICATION-2-15, SWR-APPLICATION-2-16, SWR-APPLICATION-3-1, SWR-APPLICATION-3-2, SWR-APPLICATION-3-3, SWR-BUCKET-1-1, SWR-BUCKET-1-2, SWR-BUCKET-1-3, SWR-BUCKET-1-4, SWR-BUCKET-1-5, SWR-BUCKET-1-6, SWR-BUCKET-1-7, SWR-BUCKET-1-8, SWR-BUCKET-1-9, SWR-DATASET-1-1, SWR-DATASET-1-2, SWR-DATASET-1-3, SWR-NOTEBOOK-1-1, SWR-UTILS-2-1, SWR-UTILS-2-2, SWR-UTILS-2-3, SWR-UTILS-2-4, SWR-VISUALIZATION-1-1, SWR-VISUALIZATION-1-2, SWR-VISUALIZATION-1-3, SWR-VISUALIZATION-1-4, SWR_SYSTEM_CLI_HEALTH_1, SWR_SYSTEM_GUI_HEALTH_1, SWR_SYSTEM_GUI_SETTINGS_1
77
Layer: Infrastructure Service
88
Version: 1.0.0
99
Date: 2025-10-13
@@ -28,7 +28,10 @@ The Utils Module shall:
2828
- **[FR-07]** Implement settings management with validation, serialization, and sensitive data handling
2929
- **[FR-08]** Provide file system utilities for user data directory management and path sanitization
3030
- **[FR-09]** Support process information gathering and runtime environment detection
31-
- **[FR-10]** Provide a central MCP server with auto-discovery of plugin tools, namespace isolation, and CLI commands for running the server and listing available tools
31+
- **[FR-10]** Automatically register MCP servers contributed by plugin modules into the SDK MCP server
32+
- **[FR-11]** Discover and load externally installed plugin modules at runtime without requiring changes to the core SDK codebase
33+
- **[FR-12]** Automatically register CLI commands contributed by plugin modules into the SDK command-line interface
34+
- **[FR-13]** Automatically register GUI navigation entries contributed by plugin modules into the SDK graphical user interface
3235

3336
### 1.3 Non-Functional Requirements
3437

tests/aignostics/utils/TC-UTILS-MCP-01.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ Feature: MCP Server Plugin Auto-Discovery
44
points, mounts them with namespace isolation, and serves them to MCP clients.
55

66
@tests:SPEC-UTILS-SERVICE
7-
@tests:SWR-UTILS-1-1
7+
@tests:SWR-UTILS-2-4
88
@id:TC-UTILS-MCP-01
99
Scenario: Server discovers plugin tools via entry points and serves them to a client
1010
Given a plugin package registers an entry point under "aignostics.plugins"
1111
And the plugin exposes a FastMCP instance with tools "dummy_echo" and "dummy_add"
12-
When the MCP server is created via mcp_create_server()
13-
And a client connects and lists tools via client.list_tools()
12+
When the SDK MCP server is started
13+
And a client connects and lists available tools
1414
Then the returned tool list includes "dummy_plugin_dummy_echo" and "dummy_plugin_dummy_add"
1515
And calling "dummy_plugin_dummy_echo" with message "hello" returns "hello"

0 commit comments

Comments
 (0)