urun-cli 0.7.4__tar.gz → 0.7.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {urun_cli-0.7.4 → urun_cli-0.7.5}/PKG-INFO +1 -1
- {urun_cli-0.7.4 → urun_cli-0.7.5}/pyproject.toml +1 -1
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/api.py +39 -5
- {urun_cli-0.7.4 → urun_cli-0.7.5}/.gitignore +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/CHANGELOG.md +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/LICENSE +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/README.md +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/SECURITY.md +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/hatch_build.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/__init__.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/_bin/README.md +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/buildlogs.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/catalog.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/cli.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/client_tokens.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/config.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/deps.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/dev.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/devconsole.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/devstream.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/discovery.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/errors.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/fleet.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/frontend_launch.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/launch_auth.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/manifest.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/nodes.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/openai_proxy_bin.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/repo_deps.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/retry.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/runtime_health.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/rust.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/scratch.py +0 -0
- {urun_cli-0.7.4 → urun_cli-0.7.5}/src/urun/serve.py +0 -0
|
@@ -20,7 +20,7 @@ name = "urun-cli"
|
|
|
20
20
|
# so every merge remains on the already-published version until this value is
|
|
21
21
|
# advanced. Wiring semantic-release into CI remains separate work; this patch
|
|
22
22
|
# bump is the minimal release unblock (post-v0.6.3 fixes + the Rust feature minor).
|
|
23
|
-
version = "0.7.
|
|
23
|
+
version = "0.7.5"
|
|
24
24
|
description = "End-user CLI for deploying apps to urun"
|
|
25
25
|
readme = "README.md"
|
|
26
26
|
requires-python = ">=3.11"
|
|
@@ -45,6 +45,39 @@ class ApiClient:
|
|
|
45
45
|
self.backoff = backoff
|
|
46
46
|
self.on_retry = on_retry
|
|
47
47
|
|
|
48
|
+
@property
|
|
49
|
+
def session_api_origin(self) -> str:
|
|
50
|
+
"""The BARE gateway origin the session-API (``/api/...``) surface lives on.
|
|
51
|
+
|
|
52
|
+
The CLI's ``api_url`` is the REST base carrying the ``/v1`` prefix
|
|
53
|
+
(``https://api.urun.sh/v1``) — but ``/v1/<name>`` routes are the
|
|
54
|
+
Supabase EDGE surfaces (``/v1/apps``, ``/v1/cli/*``, ...), while the
|
|
55
|
+
session-api-ts HTTP surface is served on the BARE origin
|
|
56
|
+
(``https://api.urun.sh/api/...`` behind Envoy). Sending ``/api/*``
|
|
57
|
+
through the ``/v1`` base hits the edge runtime's unknown-function 404
|
|
58
|
+
(``Requested function was not found``) — proven live on
|
|
59
|
+
``GET /v1/api/scratch`` (2026-09-30, dev proof). One deterministic
|
|
60
|
+
transform, loud on surprise: strip exactly ONE trailing ``/v1`` path
|
|
61
|
+
segment (the mirror of :func:`urun.cli.sdk_base_url`); a bare origin
|
|
62
|
+
is returned as-is; anything else is a hard error.
|
|
63
|
+
"""
|
|
64
|
+
parsed = urllib.parse.urlsplit(self.base_url)
|
|
65
|
+
if parsed.path == "/v1":
|
|
66
|
+
return urllib.parse.urlunsplit((parsed.scheme, parsed.netloc, "", "", ""))
|
|
67
|
+
if parsed.path in ("", "/"):
|
|
68
|
+
return self.base_url
|
|
69
|
+
raise UrunError(
|
|
70
|
+
f"cannot derive the session-API origin from api_url {self.base_url!r}: "
|
|
71
|
+
"expected a bare origin or a single trailing /v1 path segment "
|
|
72
|
+
"(the /api/* session-API surface lives on the bare gateway origin)"
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
def _url(self, path: str) -> str:
|
|
76
|
+
"""Request URL for ``path``: ``/api/*`` → the session-API origin, rest → REST base."""
|
|
77
|
+
if path.startswith("/api/"):
|
|
78
|
+
return self.session_api_origin + path
|
|
79
|
+
return self.base_url + path
|
|
80
|
+
|
|
48
81
|
def register_manifest(self, manifest: dict[str, Any]) -> dict[str, Any]:
|
|
49
82
|
return self._json("POST", "/register-manifest", manifest)
|
|
50
83
|
|
|
@@ -691,9 +724,10 @@ class ApiClient:
|
|
|
691
724
|
"""
|
|
692
725
|
payload = self._request_bytes(
|
|
693
726
|
"GET",
|
|
694
|
-
self.
|
|
695
|
-
|
|
696
|
-
|
|
727
|
+
self._url(
|
|
728
|
+
self._path(
|
|
729
|
+
f"/api/scratch/{urllib.parse.quote(scratch_id, safe='')}/logs", {"tail": tail}
|
|
730
|
+
)
|
|
697
731
|
),
|
|
698
732
|
None,
|
|
699
733
|
timeout=self.timeout,
|
|
@@ -867,7 +901,7 @@ class ApiClient:
|
|
|
867
901
|
if body is None
|
|
868
902
|
else json.dumps(body, sort_keys=True, separators=(",", ":")).encode("utf-8")
|
|
869
903
|
)
|
|
870
|
-
url = self.
|
|
904
|
+
url = self._url(path)
|
|
871
905
|
try:
|
|
872
906
|
payload = self._request_bytes(method, url, data, timeout=self.timeout)
|
|
873
907
|
except ApiError:
|
|
@@ -892,7 +926,7 @@ class ApiClient:
|
|
|
892
926
|
if body is None
|
|
893
927
|
else json.dumps(body, sort_keys=True, separators=(",", ":")).encode("utf-8")
|
|
894
928
|
)
|
|
895
|
-
url = self.
|
|
929
|
+
url = self._url(path)
|
|
896
930
|
|
|
897
931
|
try:
|
|
898
932
|
payload = retry_call(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|