reasoning-deployment-service 0.5.5__tar.gz → 0.5.7__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.
Files changed (34) hide show
  1. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/PKG-INFO +1 -1
  2. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/pyproject.toml +1 -1
  3. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/reasoning_deployment_service.py +25 -23
  4. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service.egg-info/PKG-INFO +1 -1
  5. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/README.md +0 -0
  6. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/__init__.py +0 -0
  7. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/cli_editor/__init__.py +0 -0
  8. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/cli_editor/api_client.py +0 -0
  9. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/cli_editor/cli_runner.py +0 -0
  10. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/cli_editor/config.py +0 -0
  11. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/cli_editor/google_deps.py +0 -0
  12. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/cli_editor/reasoning_engine_creator.py +0 -0
  13. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/__init__.py +0 -0
  14. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/agent_checkbox_list.py +0 -0
  15. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/main.py +0 -0
  16. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/src/__init__.py +0 -0
  17. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/src/core/__init__.py +0 -0
  18. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/src/core/api_client.py +0 -0
  19. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/src/core/config.py +0 -0
  20. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/src/core/google_deps.py +0 -0
  21. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/src/core/reasoning_engine_creator.py +0 -0
  22. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/src/ui/__init__.py +0 -0
  23. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/src/ui/agent_space_view.py +0 -0
  24. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/src/ui/authorization_view.py +0 -0
  25. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/src/ui/reasoning_engine_view.py +0 -0
  26. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/src/ui/reasoning_engines_view.py +0 -0
  27. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/gui_editor/src/ui/ui_components.py +0 -0
  28. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service/runner.py +0 -0
  29. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service.egg-info/SOURCES.txt +0 -0
  30. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service.egg-info/dependency_links.txt +0 -0
  31. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service.egg-info/entry_points.txt +0 -0
  32. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service.egg-info/requires.txt +0 -0
  33. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/reasoning_deployment_service.egg-info/top_level.txt +0 -0
  34. {reasoning_deployment_service-0.5.5 → reasoning_deployment_service-0.5.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reasoning-deployment-service
3
- Version: 0.5.5
3
+ Version: 0.5.7
4
4
  Summary: Deployment helper for Vertex AI Reasoning Engines & Agent Spaces
5
5
  Author-email: Sergio Estrada <sergio.estrada@accenture.com>
6
6
  License: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "reasoning-deployment-service"
7
- version = "0.5.5"
7
+ version = "0.5.7"
8
8
  description = "Deployment helper for Vertex AI Reasoning Engines & Agent Spaces"
9
9
  readme = "README.md"
10
10
  license = { text = "Apache-2.0" }
@@ -815,6 +815,30 @@ class ReasoningEngineDeploymentService:
815
815
  def one_githhub_deployment_to_go_with_skip(self):
816
816
  return self.one_github_deployment_to_go(skip_engine=True)
817
817
 
818
+ def update_authorization_scopes(self, auth_id: str, scopes: list, oauth_client_id: str) -> dict:
819
+ """Patch the scopes for a specific authorization by ID, updating the authorizationUri as well."""
820
+ scopes_str = " ".join(scopes)
821
+ authorization_uri = (
822
+ "https://accounts.google.com/o/oauth2/auth"
823
+ "?response_type=code"
824
+ f"&client_id={oauth_client_id}"
825
+ f"&scope={scopes_str}"
826
+ "&access_type=offline&prompt=consent"
827
+ )
828
+ payload = {
829
+ "serverSideOauth2": {
830
+ "authorizationUri": authorization_uri
831
+ }
832
+ }
833
+ url = f"{DISCOVERY_ENGINE_URL}/projects/{self._project_id}/locations/global/authorizations/{auth_id}?update_mask=server_side_oauth2.authorization_uri"
834
+ headers = {
835
+ "Authorization": f"Bearer {self._access_token()}",
836
+ "Content-Type": "application/json",
837
+ "X-Goog-User-Project": self._project_number,
838
+ }
839
+ r = self._http.patch(url, headers=headers, json=payload, timeout=60)
840
+ r.raise_for_status()
841
+ return r.json()
818
842
 
819
843
  def one_github_deployment_to_go(self, skip_engine=False):
820
844
  """
@@ -918,29 +942,7 @@ class ReasoningEngineDeploymentService:
918
942
 
919
943
  if existing_scopes != want_scopes:
920
944
  self.info("[AUTH] Scopes changed. Patching authorization...")
921
- new_auth_uri = self._build_authorization_uri(self._oauth_client_id, list(want_scopes))
922
- patch_payload = {
923
- "serverSideOauth2": {
924
- "clientId": self._oauth_client_id,
925
- "clientSecret": "***" if self._oauth_client_secret else None,
926
- "authorizationUri": new_auth_uri,
927
- "tokenUri": "https://oauth2.googleapis.com/token",
928
- }
929
- }
930
- if patch_payload["serverSideOauth2"]["clientSecret"] is None:
931
- patch_payload["serverSideOauth2"].pop("clientSecret", None)
932
-
933
- hdrs2 = self._get_headers().copy()
934
- if "Authorization" in hdrs2:
935
- hdrs2["Authorization"] = "Bearer ***"
936
- self.info(f"[AUTH] PATCH {auth_url} headers={json.dumps(hdrs2)} payload={json.dumps(patch_payload, indent=2)}")
937
- pr = self._http.patch(auth_url, headers=self._get_headers(), json=patch_payload, timeout=60)
938
- self.info(f"[AUTH] PATCH status={pr.status_code} ct={pr.headers.get('content-type','')}")
939
- try:
940
- self.info(f"[AUTH] PATCH body={json.dumps(pr.json(), indent=2)[:4000]}")
941
- except Exception:
942
- self.info(f"[AUTH] PATCH text={(pr.text or '')[:1000]}")
943
- pr.raise_for_status()
945
+ self.update_authorization_scopes(self._authorization_id, list(want_scopes), self._oauth_client_id)
944
946
  self.info("[AUTH] Authorization updated.")
945
947
  else:
946
948
  self.info("[AUTH] Scopes unchanged; no update needed.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reasoning-deployment-service
3
- Version: 0.5.5
3
+ Version: 0.5.7
4
4
  Summary: Deployment helper for Vertex AI Reasoning Engines & Agent Spaces
5
5
  Author-email: Sergio Estrada <sergio.estrada@accenture.com>
6
6
  License: Apache-2.0