diff --git a/scripts/deploy_light.sh b/scripts/deploy_light.sh index 4c5910f..f33ee47 100755 --- a/scripts/deploy_light.sh +++ b/scripts/deploy_light.sh @@ -302,10 +302,10 @@ resolve_opencode_bin() { die "opencode binary not found in PATH: $OPENCODE_BIN" } -run_python_http_check() { +run_python_http_check_with() { local url="$1" - if command -v python3 >/dev/null 2>&1; then - python3 - "$url" <<'PY' + shift + "$@" - "$url" <<'PY' import json import sys import urllib.request @@ -318,37 +318,19 @@ with urllib.request.urlopen(url, timeout=1.5) as response: if body: json.loads(body) PY - return 0 +} + +run_python_http_check() { + local url="$1" + if command -v python3 >/dev/null 2>&1; then + run_python_http_check_with "$url" python3 + return fi if command -v python >/dev/null 2>&1; then - python - "$url" <<'PY' -import json -import sys -import urllib.request - -url = sys.argv[1] -with urllib.request.urlopen(url, timeout=1.5) as response: - if response.status != 200: - raise SystemExit(1) - body = response.read().decode("utf-8") - if body: - json.loads(body) -PY - return 0 + run_python_http_check_with "$url" python + return fi - uv run python - "$url" <<'PY' -import json -import sys -import urllib.request - -url = sys.argv[1] -with urllib.request.urlopen(url, timeout=1.5) as response: - if response.status != 200: - raise SystemExit(1) - body = response.read().decode("utf-8") - if body: - json.loads(body) -PY + run_python_http_check_with "$url" uv run python } wait_for_http_ready() { diff --git a/src/opencode_a2a_server/extension_contracts.py b/src/opencode_a2a_server/extension_contracts.py index 38cbf28..dc7a8fb 100644 --- a/src/opencode_a2a_server/extension_contracts.py +++ b/src/opencode_a2a_server/extension_contracts.py @@ -3,7 +3,6 @@ from dataclasses import dataclass from typing import Any -SHARED_METADATA_NAMESPACE = "shared" SHARED_SESSION_BINDING_FIELD = "metadata.shared.session.id" SHARED_SESSION_METADATA_FIELD = "metadata.shared.session" SHARED_MODEL_SELECTION_FIELD = "metadata.shared.model"