Publish curated ITWorx_MCP_Hub source from 9ec6419178e8ddc76a698e84bde72d5ff4472411

This commit is contained in:
Public Source Publisher committed 2026-10-01 09:39:30 +00:00
1 parent 5ff5c807d3
commit f26354e16c
20 files changed
+1639 -84

No files matched your search

+50 -1
View File
@@ -9,6 +9,49 @@ from uuid import UUID, uuid4
import httpx
APPOPS_INPUT_SCHEMAS: dict[str, dict[str, Any]] = {
"server.appops.deployment.status": {
"type": "object",
"additionalProperties": False,
},
"server.appops.self_upgrade.preflight": {
"type": "object",
"additionalProperties": False,
"properties": {
"repository": {"type": "string", "const": "jens/unraid-appops-gateway"},
"revision": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
"reason": {"type": "string", "minLength": 8, "maxLength": 500},
"expected_current_revision": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
},
"required": ["repository", "revision", "reason"],
},
"server.appops.self_upgrade.apply": {
"type": "object",
"additionalProperties": False,
"properties": {
"repository": {"type": "string", "const": "jens/unraid-appops-gateway"},
"revision": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
"reason": {"type": "string", "minLength": 8, "maxLength": 500},
"expected_preflight_fingerprint": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
"idempotency_key": {"type": "string", "pattern": "^[A-Za-z0-9._:-]{8,128}$"},
"expected_current_revision": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
},
"required": [
"repository",
"revision",
"reason",
"expected_preflight_fingerprint",
"idempotency_key",
],
},
"server.appops.self_upgrade.status": {
"type": "object",
"additionalProperties": False,
"properties": {"operation_id": {"type": "string", "pattern": "^[0-9a-f]{64}$"}},
"required": ["operation_id"],
},
}
class FakeContextForge:
"""Fake REST gateway for offline adapter and reconciliation tests."""
@@ -201,6 +244,10 @@ class FakeContextForge:
"server.deployment.status",
"server.deployment.verify",
"server.deployment.rollback",
"server.appops.deployment.status",
"server.appops.self_upgrade.preflight",
"server.appops.self_upgrade.apply",
"server.appops.self_upgrade.status",
),
"itworx-opencode": (
"opencode.capabilities.get",
@@ -251,7 +298,9 @@ class FakeContextForge:
@staticmethod
def _tool_payload(tool_name: str) -> dict[str, Any]:
payload: dict[str, Any] = {"id": str(uuid4()), "name": tool_name}
if tool_name == "gitea.repository.create":
if tool_name in APPOPS_INPUT_SCHEMAS:
payload["inputSchema"] = deepcopy(APPOPS_INPUT_SCHEMAS[tool_name])
elif tool_name == "gitea.repository.create":
payload["inputSchema"] = {
"type": "object",
"properties": {