Update: consolidate recent changes

This commit is contained in:
jade
2026-08-07 09:04:04 +09:00
parent 1c0ceaef15
commit 867f2efabe
141 changed files with 2392 additions and 3464 deletions

View File

@@ -1,62 +0,0 @@
# Current WAS README Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Replace the README's removed Gateway-era documentation with an accurate guide to the current independent Tool WAS modules.
**Architecture:** The README becomes the single user-facing reference for the Gradle modules, the two Tool Pods, direct REST and Streamable HTTP MCP access, schema resolution, local configuration, and Docker Compose. Every statement must be traceable to the current checked-in source or configuration; stale Dockerfile jar paths and the missing SMS `@McpFunction` are documented as explicit limitations.
**Tech Stack:** Java 21, Spring Boot 4.0.5, Gradle 8.14.3, Spring AI MCP Server WebMVC, Redis, Docker Compose.
## Global Constraints
- Modify only `README.md` for the requested deliverable; do not restore or alter Java source, Gradle, Docker, or CI files.
- Describe only current Tool WAS behavior; exclude the removed `dap-gateway`, Chat API, SSE transport, and external registry/heartbeat workflow.
- Use exact module names `dap-was-lib`, `dap-was-oth`, and `dap-was-sms`.
- Label stale Dockerfile jar paths and the missing SMS `@McpFunction` as known implementation limitations, not supported behavior.
---
### Task 1: Replace the obsolete README content
**Files:**
- Modify: `README.md`
**Interfaces:**
- Consumes: Gradle module declarations in `settings.gradle`, runtime configuration in both Tool Pods, `BusinessToolController`, `ToolManifestController`, `ToolMcpServerConfiguration`, `LocalToolScanner`, and `ToolPodMcpToolSynchronizer` from `HEAD`.
- Produces: A self-contained Korean README for developers operating or extending the current Tool WAS deployment.
- [x] **Step 1: Create a fact inventory before editing**
Record the following source-backed details for use in the README:
```text
Modules: dap-was-lib, dap-was-sms, dap-was-oth
Ports: SMS 8082, OTH 8084
REST endpoints: GET /mcp/api/v1/tools/local, POST /mcp/{name}, GET /tool-manifest
MCP transport: Streamable HTTP at /mcp
Compose host ports: SMS 8282, OTH 8284, Redis 6379, WireMock 8089
```
- [x] **Step 2: Rewrite README sections**
Replace Gateway-centric architecture, commands, URLs, environment variables, and future Gateway design material with sections for architecture, modules, API behavior, tool development, schema behavior, local/Docker execution, configuration, testing, and known limitations.
- [x] **Step 3: Verify README facts mechanically**
Run:
```powershell
rg -n "dap-gateway|OPENROUTER|/api/chat|/mcp/sse|AXHUB_GATEWAY_URL|ToolRegistryHeartbeatSender" README.md
rg -n "dap-was-(lib|sms|oth)|/mcp/\{name\}|/tool-manifest|/mcp/api/v1/tools/local|8282|8284" README.md
```
Expected: the first command produces no matches; the second shows the retained current implementation references.
- [x] **Step 4: Cross-check every endpoint and command**
Compare README endpoint statements with the Java controller/configuration classes and compare module names, ports, profiles, and Docker service names with `settings.gradle`, `application*.yml`, and `docker-compose.yml`. Confirm that the README explicitly distinguishes source-backed behavior from known blockers.
- [ ] **Step 5: Commit**
Do not commit unless the user explicitly requests a commit; the workspace already contains unrelated migration changes.

View File

@@ -0,0 +1,61 @@
# MCP SDK Validator and Source Updater Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Keep tool-name validation and source metadata updates functional after replacing the custom `@McpFunction` annotation with Spring AI's `@McpTool`.
**Architecture:** `McpToolNameValidator` will scan `@McpTool(name = "...")` declarations for naming and duplication rules. `ToolSourceUpdater` will update SDK-owned fields (`name`, `description`) on `@McpTool` and project-owned fields (`group`, `register`, `requiresApproval`) on adjacent `@ToolHint`, without trying to write unsupported fields to the SDK annotation.
**Tech Stack:** Java 21, JUnit 5, Spring AI MCP annotations, Gradle.
## Global Constraints
- Preserve the existing tool-name convention and duplicate-name build validation.
- Do not reintroduce the removed custom `McpFunction` annotation.
- Keep project-specific metadata in `io.shinhanlife.dap.lib.annotation.ToolHint`.
- Verify with focused tests and `gradlew.bat test`.
---
### Task 1: Migrate tool-name validation
**Files:**
- Modify: `dap-was-lib/src/main/java/io/shinhanlife/dap/lib/validation/McpToolNameValidator.java`
- Modify: `dap-was-lib/src/test/java/io/shinhanlife/dap/lib/validation/McpToolNameValidatorTest.java`
**Interfaces:**
- Consumes: Java source files containing `@McpTool(name = "...")`.
- Produces: `McpToolNameValidator.assertUnique(Path)` that rejects duplicate or invalid SDK tool names.
- [ ] Write tests using `@McpTool` source snippets for duplicate, invalid, and valid names.
- [ ] Run `:dap-was-lib:test --tests *McpToolNameValidatorTest` and confirm current implementation does not detect those annotations.
- [ ] Replace the annotation scan target from `@McpFunction` to `@McpTool`.
- [ ] Re-run the focused test and confirm it passes.
### Task 2: Migrate source metadata update behavior
**Files:**
- Modify: `dap-was-lib/src/main/java/io/shinhanlife/dap/lib/util/ToolSourceUpdater.java`
- Create: `dap-was-lib/src/test/java/io/shinhanlife/dap/lib/util/ToolSourceUpdaterTest.java`
**Interfaces:**
- Consumes: a tool interface source containing `@McpTool` and `@ToolHint`.
- Produces: `ToolSourceUpdater.updateToolSource(String, String, String, boolean, Boolean)` that updates SDK name/description and project metadata without emitting invalid `@McpTool` attributes.
- [ ] Write a temporary-source test defining one SDK annotation and one `ToolHint` annotation.
- [ ] Run the focused test and confirm the legacy updater cannot locate `@McpTool` declarations.
- [ ] Update annotation matching and replacements: `description` belongs to `@McpTool`; `group`, `register`, and `requiresApproval` belong to `@ToolHint`.
- [ ] Re-run the focused test and confirm it passes.
### Task 3: Restore test-suite compilation after SDK migration
**Files:**
- Modify: stale tests referencing `McpFunction` or old package locations.
**Interfaces:**
- Consumes: `McpTool`, `ToolHint`, current `ToolSchemaResolver`, and current package names.
- Produces: compilation and behavioral coverage aligned with the SDK-based production code.
- [ ] Replace stale annotation and resolver signatures in tests.
- [ ] Fix package relocation and missing assertion imports without widening production visibility.
- [ ] Run `gradlew.bat test`.