reasoning-deployment-service 0.4.0__tar.gz → 0.4.1__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.

Potentially problematic release.


This version of reasoning-deployment-service might be problematic. Click here for more details.

Files changed (34) hide show
  1. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/PKG-INFO +1 -1
  2. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/pyproject.toml +1 -1
  3. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/reasoning_deployment_service.py +102 -32
  4. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service.egg-info/PKG-INFO +1 -1
  5. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/README.md +0 -0
  6. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/__init__.py +0 -0
  7. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/cli_editor/__init__.py +0 -0
  8. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/cli_editor/api_client.py +0 -0
  9. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/cli_editor/cli_runner.py +0 -0
  10. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/cli_editor/config.py +0 -0
  11. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/cli_editor/google_deps.py +0 -0
  12. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/cli_editor/reasoning_engine_creator.py +0 -0
  13. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/__init__.py +0 -0
  14. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/agent_checkbox_list.py +0 -0
  15. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/main.py +0 -0
  16. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/src/__init__.py +0 -0
  17. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/src/core/__init__.py +0 -0
  18. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/src/core/api_client.py +0 -0
  19. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/src/core/config.py +0 -0
  20. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/src/core/google_deps.py +0 -0
  21. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/src/core/reasoning_engine_creator.py +0 -0
  22. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/src/ui/__init__.py +0 -0
  23. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/src/ui/agent_space_view.py +0 -0
  24. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/src/ui/authorization_view.py +0 -0
  25. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/src/ui/reasoning_engine_view.py +0 -0
  26. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/src/ui/reasoning_engines_view.py +0 -0
  27. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/gui_editor/src/ui/ui_components.py +0 -0
  28. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service/runner.py +0 -0
  29. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service.egg-info/SOURCES.txt +0 -0
  30. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service.egg-info/dependency_links.txt +0 -0
  31. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service.egg-info/entry_points.txt +0 -0
  32. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service.egg-info/requires.txt +0 -0
  33. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/reasoning_deployment_service.egg-info/top_level.txt +0 -0
  34. {reasoning_deployment_service-0.4.0 → reasoning_deployment_service-0.4.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reasoning-deployment-service
3
- Version: 0.4.0
3
+ Version: 0.4.1
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.4.0"
7
+ version = "0.4.1"
8
8
  description = "Deployment helper for Vertex AI Reasoning Engines & Agent Spaces"
9
9
  readme = "README.md"
10
10
  license = { text = "Apache-2.0" }
@@ -767,7 +767,6 @@ class ReasoningEngineDeploymentService:
767
767
 
768
768
  return matches[0]
769
769
 
770
-
771
770
  def one_github_deployment_to_go(self):
772
771
  """
773
772
  CI-friendly deploy:
@@ -777,8 +776,17 @@ class ReasoningEngineDeploymentService:
777
776
  """
778
777
  self.info("Starting GitHub deployment...")
779
778
 
779
+ # Config snapshot
780
+ self.info(
781
+ f"[CFG] project_id={self._project_id} project_number={self._project_number} "
782
+ f"location={self._project_location} engine_name={self._reasoning_engine_name} "
783
+ f"agent_space_engine={self._agent_space_engine} auth_id={self._authorization_id} "
784
+ f"scopes={self._required_scopes} staging_bucket={self._staging_bucket}"
785
+ )
786
+
780
787
  # Ensure Vertex SDK calls have context for list/update
781
788
  self._cicd_deploy = True
789
+ self.info(f"[INIT] vertexai.init(project={self._project_id}, location={self._project_location}, staging_bucket={self._staging_bucket})")
782
790
  vertexai.init(
783
791
  project=self._project_id,
784
792
  location=self._project_location,
@@ -788,44 +796,64 @@ class ReasoningEngineDeploymentService:
788
796
  # -----------------------------
789
797
  # 1) Reasoning Engine (create or update)
790
798
  # -----------------------------
799
+ self.info(f"[ENGINE] Resolving by display_name={self._reasoning_engine_name}")
791
800
  engine_rn = self.find_engine_by_name(self._reasoning_engine_name)
801
+ self.info(f"[ENGINE] find_engine_by_name -> {engine_rn}")
802
+
792
803
  if not engine_rn:
793
- self.info(f"Engine '{self._reasoning_engine_name}' not found. Creating...")
804
+ self.info(f"[ENGINE] '{self._reasoning_engine_name}' not found. Creating...")
794
805
  self.create_reasoning_engine()
795
- # read back the created id (or re-resolve by name as fallback)
796
- engine_rn = self._read_engine_deployment_record().get("reasoning_engine_id") or \
797
- self.find_engine_by_name(self._reasoning_engine_name)
806
+ rec_after_create = self._read_engine_deployment_record()
807
+ self.info(f"[ENGINE] record after create -> {json.dumps(rec_after_create, indent=2)}")
808
+ engine_rn = rec_after_create.get("reasoning_engine_id") or self.find_engine_by_name(self._reasoning_engine_name)
809
+ self.info(f"[ENGINE] post-create resolution -> {engine_rn}")
798
810
  if not engine_rn:
799
- self.error("Engine creation did not yield a resource name.")
811
+ self.error("[ENGINE] Creation did not yield a resource name.")
800
812
  raise RuntimeError("Engine creation failed.")
801
813
  else:
802
- self.info(f"Engine '{self._reasoning_engine_name}' exists. Updating...")
814
+ self.info(f"[ENGINE] '{self._reasoning_engine_name}' exists. Updating...")
803
815
  self.update_reasoning_engine(engine_rn)
804
816
 
817
+ self.info(f"[ENGINE] final engine_rn={engine_rn}")
818
+
805
819
  # -----------------------------
806
820
  # 2) Authorization (create if missing; update scopes if changed)
807
821
  # -----------------------------
822
+ auth_full_name = None
808
823
  if self._authorization_id:
809
824
  want_scopes = set(self._required_scopes or [])
825
+ self.info(f"[AUTH] id={self._authorization_id} want_scopes={sorted(want_scopes)}")
810
826
  auth_full_name = self.find_authorization_by_id(self._authorization_id)
827
+ self.info(f"[AUTH] find_authorization_by_id -> {auth_full_name}")
811
828
 
812
829
  if not auth_full_name:
813
- self.info(f"Authorization '{self._authorization_id}' not found. Creating...")
830
+ self.info(f"[AUTH] '{self._authorization_id}' not found. Creating...")
814
831
  ok = self._create_authorization()
815
- if not ok:
816
- self.error("Authorization creation failed.")
817
- raise RuntimeError("Authorization creation failed.")
832
+ self.info(f"[AUTH] _create_authorization -> {ok}")
818
833
  auth_full_name = self.find_authorization_by_id(self._authorization_id)
819
- if not auth_full_name:
820
- self.error("Authorization creation did not resolve to a resource.")
821
- raise RuntimeError("Authorization creation failed to resolve.")
834
+ self.info(f"[AUTH] post-create resolve -> {auth_full_name}")
835
+ if not ok or not auth_full_name:
836
+ self.error("[AUTH] Creation failed or did not resolve.")
837
+ raise RuntimeError("Authorization creation failed.")
822
838
  else:
823
839
  # Compare scopes; patch if different
824
- r = self._http.get(f"{DISCOVERY_ENGINE_URL}/{auth_full_name}",
825
- headers=self._get_headers(), timeout=60)
840
+ auth_url = f"{DISCOVERY_ENGINE_URL}/{auth_full_name}"
841
+ hdrs = self._get_headers().copy()
842
+ if "Authorization" in hdrs:
843
+ hdrs["Authorization"] = "Bearer ***"
844
+ self.info(f"[AUTH] GET {auth_url} headers={json.dumps(hdrs)}")
845
+ r = self._http.get(auth_url, headers=self._get_headers(), timeout=60)
846
+ self.info(f"[AUTH] GET status={r.status_code} ct={r.headers.get('content-type','')}")
847
+ try:
848
+ self.info(f"[AUTH] GET body={json.dumps(r.json(), indent=2)[:4000]}")
849
+ except Exception:
850
+ self.info(f"[AUTH] GET text={(r.text or '')[:1000]}")
826
851
  r.raise_for_status()
852
+
827
853
  data = r.json() or {}
828
854
  existing_uri = (((data.get("serverSideOauth2") or {}).get("authorizationUri")) or "")
855
+ self.info(f"[AUTH] existing authorizationUri={existing_uri!r}")
856
+
829
857
  existing_scopes = set()
830
858
  if existing_uri:
831
859
  parsed = urlparse(existing_uri)
@@ -833,53 +861,95 @@ class ReasoningEngineDeploymentService:
833
861
  scope_str = (qs.get("scope", [""])[0] or "")
834
862
  existing_scopes = set(scope_str.split())
835
863
 
864
+ self.info(
865
+ f"[AUTH] scopes existing={sorted(existing_scopes)} want={sorted(want_scopes)} "
866
+ f"missing={sorted(want_scopes - existing_scopes)} extra={sorted(existing_scopes - want_scopes)}"
867
+ )
868
+
836
869
  if existing_scopes != want_scopes:
837
- self.info("Authorization scopes changed. Patching authorization...")
870
+ self.info("[AUTH] Scopes changed. Patching authorization...")
838
871
  new_auth_uri = self._build_authorization_uri(self._oauth_client_id, list(want_scopes))
839
872
  patch_payload = {
840
873
  "serverSideOauth2": {
841
874
  "clientId": self._oauth_client_id,
842
- "clientSecret": self._oauth_client_secret,
875
+ "clientSecret": "***" if self._oauth_client_secret else None,
843
876
  "authorizationUri": new_auth_uri,
844
877
  "tokenUri": "https://oauth2.googleapis.com/token",
845
878
  }
846
879
  }
847
- pr = self._http.patch(f"{DISCOVERY_ENGINE_URL}/{auth_full_name}",
848
- headers=self._get_headers(), json=patch_payload, timeout=60)
880
+ # remove None to keep payload clean
881
+ if patch_payload["serverSideOauth2"]["clientSecret"] is None:
882
+ patch_payload["serverSideOauth2"].pop("clientSecret", None)
883
+
884
+ hdrs2 = self._get_headers().copy()
885
+ if "Authorization" in hdrs2:
886
+ hdrs2["Authorization"] = "Bearer ***"
887
+ self.info(f"[AUTH] PATCH {auth_url} headers={json.dumps(hdrs2)} payload={json.dumps(patch_payload, indent=2)}")
888
+ pr = self._http.patch(auth_url, headers=self._get_headers(), json=patch_payload, timeout=60)
889
+ self.info(f"[AUTH] PATCH status={pr.status_code} ct={pr.headers.get('content-type','')}")
890
+ try:
891
+ self.info(f"[AUTH] PATCH body={json.dumps(pr.json(), indent=2)[:4000]}")
892
+ except Exception:
893
+ self.info(f"[AUTH] PATCH text={(pr.text or '')[:1000]}")
849
894
  pr.raise_for_status()
850
- self.info("Authorization updated.")
895
+ self.info("[AUTH] Authorization updated.")
851
896
  else:
852
- self.info("Authorization scopes unchanged; no update needed.")
897
+ self.info("[AUTH] Scopes unchanged; no update needed.")
853
898
  else:
854
- self.info("No authorization_id configured; skipping authorization step.")
899
+ self.info("[AUTH] No authorization_id configured; skipping authorization step.")
855
900
 
856
901
  # -----------------------------
857
902
  # 3) Agent Space Agent (create or update by displayName under engine)
858
903
  # -----------------------------
904
+ self.info(f"[AGENT] Resolving by display_name={self._agent_space_name}")
859
905
  existing_agent = self.find_agent_space_agents_by_display(self._agent_space_name)
906
+ self.info(f"[AGENT] find_agent_space_agents_by_display -> {json.dumps(existing_agent, indent=2)}")
907
+
860
908
  headers, payload = self._get_agent_space_payload(engine_rn)
909
+ headers_log = headers.copy()
910
+ if "Authorization" in headers_log:
911
+ headers_log["Authorization"] = "Bearer ***"
912
+ self.info(f"[AGENT] request headers={json.dumps(headers_log)}")
913
+ self.info(f"[AGENT] payload={json.dumps(payload, indent=2)}")
861
914
 
862
915
  if not existing_agent:
863
- self.info(f"Agent Space agent '{self._agent_space_name}' not found. Creating...")
916
+ self.info(f"[AGENT] '{self._agent_space_name}' not found. Creating...")
864
917
  create_url = self._get_agent_space_agent_url_new()
918
+ self.info(f"[AGENT] POST {create_url}")
865
919
  cr = self._http.post(create_url, headers=headers, json=payload, timeout=90)
920
+ self.info(f"[AGENT] POST status={cr.status_code} ct={cr.headers.get('content-type','')}")
921
+ try:
922
+ self.info(f"[AGENT] POST body={json.dumps(cr.json(), indent=2)[:4000]}")
923
+ except Exception:
924
+ self.info(f"[AGENT] POST text={(cr.text or '')[:1000]}")
866
925
  if cr.status_code >= 400:
867
- # File-only details already handled elsewhere; surface concise error here
868
- self.error(f"Agent creation failed [{cr.status_code}].")
926
+ self.error(f"[AGENT] Creation failed [{cr.status_code}].")
869
927
  cr.raise_for_status()
870
- agent_name = (cr.json() or {}).get("name")
928
+
929
+ try:
930
+ j = cr.json() or {}
931
+ except Exception:
932
+ j = {}
933
+ agent_name = j.get("name")
934
+ self.info(f"[AGENT] create response name={agent_name}")
871
935
  if agent_name:
872
936
  self._write_engine_deployment({"agent_space_id": agent_name})
873
- self.info(f"Agent Space agent created: {agent_name}")
937
+ self.info(f"[AGENT] Created: {agent_name}")
874
938
  else:
875
- self.warning("Agent created but response missing name. Verify in console.")
939
+ self.warning("[AGENT] Created but response missing name. Verify in console.")
876
940
  else:
877
- self.info(f"Agent Space agent '{self._agent_space_name}' exists. Updating...")
941
+ self.info(f"[AGENT] '{self._agent_space_name}' exists. Updating...")
878
942
  patch_url = f"{DISCOVERY_ENGINE_URL}/{existing_agent['full_name']}"
943
+ self.info(f"[AGENT] PATCH {patch_url}")
879
944
  ur = self._http.patch(patch_url, headers=headers, json=payload, timeout=90)
945
+ self.info(f"[AGENT] PATCH status={ur.status_code} ct={ur.headers.get('content-type','')}")
946
+ try:
947
+ self.info(f"[AGENT] PATCH body={json.dumps(ur.json(), indent=2)[:4000]}")
948
+ except Exception:
949
+ self.info(f"[AGENT] PATCH text={(ur.text or '')[:1000]}")
880
950
  if ur.status_code >= 400:
881
- self.error(f"Agent update failed [{ur.status_code}].")
951
+ self.error(f"[AGENT] Update failed [{ur.status_code}].")
882
952
  ur.raise_for_status()
883
- self.info("Agent Space agent updated.")
953
+ self.info("[AGENT] Agent Space agent updated.")
884
954
 
885
955
  self.info("GitHub deployment completed successfully.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reasoning-deployment-service
3
- Version: 0.4.0
3
+ Version: 0.4.1
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