2026.11.24.r040: neutrale Beispielnamen, PHP-8.5-Fix, Tests auf macOS grün

- curl_close() entfernt (wirkungslos seit PHP 8.0, ab 8.5 Deprecation-Meldung)
- readProcessOutput akzeptiert den allgemeinen Bun-Prozesstyp (tsc wieder fehlerfrei)
- Test-Fixtures nutzen den aufgelösten Temp-Pfad (/var -> /private/var auf macOS)
- Release r040 gebaut, r039 aus dist/ entfernt (bleibt in der Historie)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Michael RollandClaude Opus 5.5 committed 2026-11-24 13:08:53 +01:00
1 parent 74013e847c
commit c219794850
11 files changed
+20 -13

No files matched your search

-1
View File
@@ -1 +0,0 @@
49f9187d532089d261e6ee26b495168b7ff369d94a6ab889530f37154a23a48a mua-2026.11.21.r039-x86_64-1.txz
+1
View File
@@ -0,0 +1 @@
a1e1c0c58da49d4a206c63185676315f721b8369ef1a653425463580a3833508 mua-2026.11.24.r040-x86_64-1.txz
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "mua",
"version": "2026.11.21.r039",
"version": "2026.11.24.r040",
"description": "Mikes Unraid Agent - MCP over HTTP(S) (Streamable HTTP) for Unraid",
"type": "module",
"main": "src/index.ts",
+9 -4
View File
@@ -2,13 +2,13 @@
<!DOCTYPE PLUGIN [
<!ENTITY name "mua">
<!ENTITY author "Michael">
<!ENTITY version "2026.11.21.r039">
<!ENTITY version "2026.11.24.r040">
<!ENTITY launch "Settings/mua">
<!ENTITY pluginURL "https://git.casaderoll.de/michael/MUA-Mikes-Unraid-Agent/raw/branch/main/plugin/mua.plg">
<!ENTITY pluginLOC "/boot/config/plugins/&name;">
<!ENTITY emhttpLOC "/usr/local/emhttp/plugins/&name;">
<!ENTITY txzURL "https://git.casaderoll.de/michael/MUA-Mikes-Unraid-Agent/raw/branch/main/dist/mua-2026.11.21.r039-x86_64-1.txz">
<!ENTITY txzSHA256 "49f9187d532089d261e6ee26b495168b7ff369d94a6ab889530f37154a23a48a">
<!ENTITY txzURL "https://git.casaderoll.de/michael/MUA-Mikes-Unraid-Agent/raw/branch/main/dist/mua-2026.11.24.r040-x86_64-1.txz">
<!ENTITY txzSHA256 "a1e1c0c58da49d4a206c63185676315f721b8369ef1a653425463580a3833508">
]>
<PLUGIN name="&name;"
@@ -23,6 +23,11 @@
>
<CHANGES>
### 2026.11.24.r040
- Neutrale Beispielnamen in Werkzeugbeschreibungen (z. B. Nextcloud statt eines Medien-Containers).
- WebGUI: kein veraltetes curl_close() mehr (Deprecation-Meldung ab PHP 8.5).
- Interne Typprüfung der Prozessausgabe; Tests laufen jetzt auch auf macOS und mit PHP 8.5.
### 2026.11.21.r039
- WebGUI: neuer Bereich „Verbindung“ mit beiden Endpunkten (Vollständig /mcp/full, Kompakt /mcp/lite), Kopier-Buttons und Auswahl des Standardprofils für /mcp.
- WebGUI: Hinweis auf neue, noch nicht freigegebene Werkzeuge mit Button „Neue Lesewerkzeuge freigeben“; Profile „Nur Lesen“ und „Betrieb + Diagnose“ um die neuen Werkzeuge ergänzt.
@@ -246,7 +251,7 @@ Das .txz enthält:
install/doinst.sh (läuft nach Installation)
===========================================
-->
<FILE Name="/boot/config/plugins/&name;/mua-2026.11.21.r039-x86_64-1.txz" Run="upgradepkg --install-new" Mode="755" Min="7.0.0">
<FILE Name="/boot/config/plugins/&name;/mua-2026.11.24.r040-x86_64-1.txz" Run="upgradepkg --install-new" Mode="755" Min="7.0.0">
<URL>&txzURL;</URL>
<SHA256>&txzSHA256;</SHA256>
</FILE>
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "mua",
"author": "Michael",
"version": "2026.11.21.r039",
"version": "2026.11.24.r040",
"minver": "7.0.0",
"pluginDirectory": "/usr/local/emhttp/plugins/mua",
"configDirectory": "/boot/config/plugins/mua",
-1
View File
@@ -31,7 +31,6 @@ function mua_api($method, $path, $payload, $token, $port) {
curl_setopt_array($ch, $options);
$raw = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
return [$code, $raw !== false ? json_decode($raw, true) : null];
}
+1 -1
View File
@@ -2,7 +2,7 @@
// Read-only acceptance; credentials stay on Unraid. No file copies or private logs.
function need($ok,$label){if(!$ok)throw new RuntimeException($label);}
$config=[];foreach(file('/boot/config/plugins/mua/mua.conf') as $line){$parts=explode('=',trim($line),2);if(count($parts)===2)$config[trim($parts[0])]=trim($parts[1]);}
function request($method,$params,$authenticated=true){global $config;$headers=['Content-Type: application/json','Accept: application/json, text/event-stream'];if($authenticated)$headers[]='Authorization: Bearer '.$config['MUA_API_KEY'];$c=curl_init('http://127.0.0.1:3002/mcp');curl_setopt_array($c,[CURLOPT_RETURNTRANSFER=>true,CURLOPT_POST=>true,CURLOPT_HTTPHEADER=>$headers,CURLOPT_POSTFIELDS=>json_encode(['jsonrpc'=>'2.0','id'=>1,'method'=>$method,'params'=>$params]),CURLOPT_TIMEOUT=>30]);$body=curl_exec($c);$code=curl_getinfo($c,CURLINFO_HTTP_CODE);$errno=curl_errno($c);curl_close($c);need($errno===0,'Local test transport failed');return [$code,json_decode($body,true)];}
function request($method,$params,$authenticated=true){global $config;$headers=['Content-Type: application/json','Accept: application/json, text/event-stream'];if($authenticated)$headers[]='Authorization: Bearer '.$config['MUA_API_KEY'];$c=curl_init('http://127.0.0.1:3002/mcp');curl_setopt_array($c,[CURLOPT_RETURNTRANSFER=>true,CURLOPT_POST=>true,CURLOPT_HTTPHEADER=>$headers,CURLOPT_POSTFIELDS=>json_encode(['jsonrpc'=>'2.0','id'=>1,'method'=>$method,'params'=>$params]),CURLOPT_TIMEOUT=>30]);$body=curl_exec($c);$code=curl_getinfo($c,CURLINFO_HTTP_CODE);$errno=curl_errno($c);need($errno===0,'Local test transport failed');return [$code,json_decode($body,true)];}
function rpc($method,$params){[$code,$r]=request($method,$params);need($code===200&&isset($r['result'])&&empty($r['result']['isError']),'Authenticated MCP request failed');return $r['result'];}
[$unauth]=request('initialize',(object)[],false);need($unauth===401,'Unauthenticated request must be rejected');
$i=rpc('initialize',['protocolVersion'=>'2025-03-26','capabilities'=>(object)[],'clientInfo'=>['name'=>'read-only-shell-acceptance','version'=>'1']]);need($i['serverInfo']['version']==='2026.10.12.r031','Expected loaded r031');
+1 -1
View File
@@ -19,7 +19,7 @@ import { redactKnownSecrets } from "./redact";
// ── Konstanten ──────────────────────────────────────────────────────────
export const MUA_SERVER_NAME = "mua";
export const MUA_VERSION = "2026.11.21.r039";
export const MUA_VERSION = "2026.11.24.r040";
export const MUA_PROTOCOL_VERSION = "2025-03-26";
export const PHP_HELPER = "/usr/local/bin/unraid-docker-mcp-helper.php";
export const STATUS_HELPER = "/usr/local/bin/unraid-mcp-status-helper.php";
+4 -1
View File
@@ -6,13 +6,16 @@ export interface ProcessOutput {
/** Keep a bounded head or tail while consuming a subprocess pipe. */
export async function readProcessOutput(
stream: ReadableStream<Uint8Array>,
stream: ReadableStream<Uint8Array> | number | undefined,
maxBytes: number,
options: { mode?: "head" | "tail"; stopOnLimit?: boolean; signal?: AbortSignal } = {},
): Promise<ProcessOutput> {
if (!Number.isSafeInteger(maxBytes) || maxBytes < 1) {
throw new Error("Output budget must be a positive safe integer");
}
if (!(stream instanceof ReadableStream)) {
throw new TypeError("Process output must be spawned with \"pipe\"");
}
const { mode = "head", stopOnLimit = true, signal } = options;
const reader = stream.getReader();
const cancel = () => { void reader.cancel().catch(() => {}); };
+2 -2
View File
@@ -1,10 +1,10 @@
import { mkdtempSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
import { mkdtempSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
import { join } from "node:path";
import { tmpdir } from "node:os";
// Synthetic filesystem only; never redirect fixture generation at a NAS.
export function unraidRoot(version = "7.0.0", scenario = "yes-local", config?: string) {
const root = mkdtempSync(join(tmpdir(), "mua-unraid-layout-"));
const root = realpathSync(mkdtempSync(join(tmpdir(), "mua-unraid-layout-")));
for (const directory of ["etc/nginx/conf.d", "var/local/emhttp", "boot/config/ssl/certs"]) mkdirSync(join(root, directory), { recursive: true });
writeFileSync(join(root, "etc/unraid-version"), `version="${version}"\n`);
writeFileSync(join(root, "var/local/emhttp/nginx.ini"),