diff --git a/custom/setup/curabis-standard.agent.md b/custom/setup/curabis-standard.agent.md index 8603dda..a4f8684 100644 --- a/custom/setup/curabis-standard.agent.md +++ b/custom/setup/curabis-standard.agent.md @@ -1,7 +1,7 @@ --- kind: action-skill id: curabis-standard-setup -version: 16 +version: 17 title: CURABIS Standard — Project Setup description: > Configures a new or existing repository to the CURABIS Standard development @@ -356,7 +356,10 @@ MCP Server" referenced a command that does not exist). 1. If `.vscode/find-altool.ps1` is missing: fetch `{BASE}/templates/find-altool.ps1` AS RAW BYTES → `.vscode/find-altool.ps1` (create `.vscode/` if needed) and stage it for commit. -2. Write `.mcp.json` — ALWAYS with both entries: +2. Write `.mcp.json` — ALWAYS with both entries. **`launchmcpserver` REQUIRES + the project folders as arguments** (`altool launchmcpserver `); + without them the server exits immediately and `/mcp` shows `al` as Failed. + Substitute the actual app folders from Step 2: ```json { @@ -367,7 +370,10 @@ MCP Server" referenced a command that does not exist). "args": [ "-ExecutionPolicy", "Bypass", "-File", "${CLAUDE_PROJECT_DIR:-.}\\.vscode\\find-altool.ps1", - "launchmcpserver", "--transport", "stdio" + "launchmcpserver", + "${CLAUDE_PROJECT_DIR:-.}\\.apps\\{APP_FOLDER}", + "${CLAUDE_PROJECT_DIR:-.}\\.apps\\{APP_FOLDER}.Test", + "--transport", "stdio" ] }, "businesscentral": { @@ -378,6 +384,9 @@ MCP Server" referenced a command that does not exist). } ``` +(One `${CLAUDE_PROJECT_DIR:-.}\...`-line per app project — a repo with only a +main app has one; main + test has two.) + Use Claude Code's built-in environment-variable expansion — `${CLAUDE_PROJECT_DIR:-.}` and `${USERPROFILE}` — instead of substituting literal detected paths. `.mcp.json` is git-committed and shared; a path baked in for one developer's machine or username @@ -617,6 +626,13 @@ literal username or drive path: 2. Check the `-File` value is `${CLAUDE_PROJECT_DIR:-.}\.vscode\find-altool.ps1` 3. If it is a literal absolute path (e.g. `C:\Curabis\ProjectX\.vscode\find-altool.ps1` or any drive-letter path): **correct it silently** to use `${CLAUDE_PROJECT_DIR:-.}` +4. Check that at least one project path stands between `launchmcpserver` and + `--transport` — `altool launchmcpserver ` REQUIRES the app + folders, or the server exits immediately (`/mcp` shows `al` as Failed). + If missing: **correct silently** by inserting one + `${CLAUDE_PROJECT_DIR:-.}\`-argument per AL app project in the + repo, then report the correction and remind the developer to restart + Claude Code. Report any correction made: ``` diff --git a/custom/setup/templates/find-altool.ps1 b/custom/setup/templates/find-altool.ps1 index 37debcb..3c37235 100644 --- a/custom/setup/templates/find-altool.ps1 +++ b/custom/setup/templates/find-altool.ps1 @@ -3,8 +3,9 @@ # # Finder altool.exe dynamisk i den NYESTE installerede AL Language extension, # uanset version, og videresender alle argumenter. Bruges af .mcp.json til at -# starte AL MCP-serveren: -# powershell -ExecutionPolicy Bypass -File .vscode/find-altool.ps1 launchmcpserver --transport stdio +# starte AL MCP-serveren - BEMÆRK: launchmcpserver KRÆVER projektstierne som +# argumenter, ellers dør serveren straks: +# powershell -ExecutionPolicy Bypass -File .vscode/find-altool.ps1 launchmcpserver .apps/MinApp .apps/MinApp.Test --transport stdio $ext = Get-ChildItem "$env:USERPROFILE\.vscode\extensions" -Filter "ms-dynamics-smb.al-*" -Directory | Sort-Object { [version]($_.Name -replace '^ms-dynamics-smb\.al-', '' -replace '-.*$', '') } -Descending |