Publish curated Unraid-AppOps-Gateway source from bc001a6df859f7c9836fa145afb739d1ceebc524

This commit is contained in:
Public Source Publisher committed 2026-10-07 23:44:08 +00:00
1 parent 631b846397
commit ab3fa553f0
15 files changed
+3687 -227

No files matched your search

+22
View File
@@ -294,6 +294,28 @@ class DeploymentBrokerClient:
error_response_fields=frozenset({"noMutation"}),
)
def projectbrain_delivery_operation(self, stage: str, payload: dict[str, Any]) -> dict[str, Any]:
"""Use the fixed ProjectBrain retry gate; callers cannot select a repository or runtime."""
if stage not in {"preflight", "revalidate"} or not isinstance(payload, dict):
raise ValueError("ProjectBrain delivery stage is invalid")
if stage == "preflight":
if (set(payload) != {"revision"} or not isinstance(payload.get("revision"), str)
or not re.fullmatch(r"[0-9a-f]{40}", payload["revision"])):
raise ValueError("ProjectBrain preflight contract is invalid")
elif (set(payload) != {"revision", "expectedPreflightSha256", "idempotencyKey"}
or not isinstance(payload.get("revision"), str)
or not re.fullmatch(r"[0-9a-f]{40}", payload["revision"])
or not isinstance(payload.get("expectedPreflightSha256"), str)
or not re.fullmatch(r"[0-9a-f]{64}", payload["expectedPreflightSha256"])
or not isinstance(payload.get("idempotencyKey"), str)
or not re.fullmatch(r"[A-Za-z0-9._:-]{8,128}", payload["idempotencyKey"])):
raise ValueError("ProjectBrain revalidation contract is invalid")
return self._request(
"POST", f"/v1/appops/projectbrain-delivery/{stage}",
secret=settings.mcp_token or "", payload=payload,
error_response_fields=frozenset({"noMutation"}),
)
def registered_legacy_operation(self, stage: str, payload: dict[str, Any]) -> dict[str, Any]:
"""Signed fixed-stage metadata adoption/recovery for existing registered targets."""
if stage not in {"observe", "baseline", "preflight", "adopt", "status", "rollback", "delivery"}: