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

+33
View File
@@ -3,6 +3,7 @@ from __future__ import annotations
import hashlib
import json
import os
import re
from collections import defaultdict
from datetime import UTC, datetime
from functools import wraps
@@ -759,6 +760,38 @@ def appops_registered_legacy_delivery(repository: str, revision: str, request_id
}))
@appops_mcp.tool(name="appops.projectbrain_delivery.preflight", annotations=_READ_ONLY_TOOL)
@_tracked("appops.projectbrain_delivery.preflight")
def appops_projectbrain_delivery_preflight(revision: str) -> dict[str, Any]:
"""Read the fixed ProjectBrain retry evidence without changing delivery or deployment state."""
if not isinstance(revision, str) or not re.fullmatch(r"[0-9a-f]{40}", revision):
raise ValueError("ProjectBrain delivery revision is invalid")
return _json(DeploymentBrokerClient().projectbrain_delivery_operation(
"preflight", {"revision": revision},
))
@appops_mcp.tool(name="appops.projectbrain_delivery.revalidate", annotations=_OPERATION_RUN_TOOL)
@_tracked("appops.projectbrain_delivery.revalidate")
def appops_projectbrain_delivery_revalidate(
revision: str, expected_preflight_sha256: str, idempotency_key: str,
) -> dict[str, Any]:
"""Queue only the existing ProjectBrain main push after the fixed evidence fingerprint is rechecked."""
if (not isinstance(revision, str) or not re.fullmatch(r"[0-9a-f]{40}", revision)
or not isinstance(expected_preflight_sha256, str)
or not re.fullmatch(r"[0-9a-f]{64}", expected_preflight_sha256)
or not isinstance(idempotency_key, str)
or not re.fullmatch(r"[A-Za-z0-9._:-]{8,128}", idempotency_key)):
raise ValueError("ProjectBrain revalidation contract is invalid")
return _json(DeploymentBrokerClient().projectbrain_delivery_operation(
"revalidate", {
"revision": revision,
"expectedPreflightSha256": expected_preflight_sha256,
"idempotencyKey": idempotency_key,
},
))
@appops_mcp.tool(name="server.operation.execute", annotations=_LEGACY_APPROVAL_EXECUTION_TOOL)
@_tracked("server.operation.execute")
def execute_operation(