netra-zen 1.0.4__py3-none-any.whl → 1.0.6__py3-none-any.whl

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.
zen_orchestrator.py CHANGED
@@ -2442,6 +2442,8 @@ async def main():
2442
2442
  help="List all available example configurations")
2443
2443
  parser.add_argument("--show-prompt-template", action="store_true",
2444
2444
  help="Show LLM prompt template for configuration generation")
2445
+ parser.add_argument("--apex", "-a", action="store_true",
2446
+ help="Invoke Apex agent CLI (passes remaining args to scripts.agent_cli)")
2445
2447
 
2446
2448
  args = parser.parse_args()
2447
2449
 
@@ -2955,6 +2957,51 @@ async def main():
2955
2957
 
2956
2958
  def run():
2957
2959
  """Synchronous wrapper for the main function to be used as console script entry point."""
2960
+ # Early check for --apex flag to delegate to agent_cli before main() processing
2961
+ if '--apex' in sys.argv or '-a' in sys.argv:
2962
+ # Delegate to agent_cli via subprocess to avoid dependency conflicts
2963
+ import subprocess
2964
+ import os
2965
+
2966
+ # Filter sys.argv to remove 'zen' and '--apex'/'-a' flags
2967
+ # Keep all other arguments to pass through to agent_cli
2968
+ filtered_argv = [arg for arg in sys.argv[1:] if arg not in ('--apex', '-a')]
2969
+
2970
+ # Set PYTHONPATH for optional advanced backend features
2971
+ # Note: The minimal shared/ module is vendored in zen repo (no external dependency)
2972
+ # PYTHONPATH is only needed for advanced backend features beyond basic agent_cli
2973
+ env = os.environ.copy()
2974
+
2975
+ # Check if APEX_BACKEND_PATH env var is set (for GCP deployment)
2976
+ # Otherwise try ../netra-apex (for local development with advanced features)
2977
+ if 'APEX_BACKEND_PATH' in env:
2978
+ backend_paths = [env['APEX_BACKEND_PATH']]
2979
+ else:
2980
+ # Try to find netra-apex in parent directory (development mode)
2981
+ zen_parent = Path(__file__).parent.parent
2982
+ netra_apex = zen_parent / "netra-apex"
2983
+ if netra_apex.exists():
2984
+ # Add both netra-apex root and netra-apex/scripts for imports
2985
+ backend_paths = [str(netra_apex), str(netra_apex / "scripts")]
2986
+ else:
2987
+ # In GCP, backend modules might be in PYTHONPATH already
2988
+ backend_paths = []
2989
+
2990
+ if backend_paths:
2991
+ paths_to_add = ":".join(backend_paths)
2992
+ if 'PYTHONPATH' in env:
2993
+ env['PYTHONPATH'] = f"{paths_to_add}:{env['PYTHONPATH']}"
2994
+ else:
2995
+ env['PYTHONPATH'] = paths_to_add
2996
+
2997
+ # Run agent_cli.py as a module (works in packaged installations)
2998
+ result = subprocess.run(
2999
+ [sys.executable, "-m", "scripts.agent_cli"] + filtered_argv,
3000
+ env=env
3001
+ )
3002
+
3003
+ sys.exit(result.returncode)
3004
+
2958
3005
  asyncio.run(main())
2959
3006
 
2960
3007
  if __name__ == "__main__":
@@ -1,19 +0,0 @@
1
- zen_orchestrator.py,sha256=eUiA8T08QYMfx5kM84LUloDUxscCUzv_k3O0WN3nFpo,148941
2
- agent_interface/__init__.py,sha256=OsbOKzElHsxhVgak87oOx_u46QNgKmz-Reis-plAMwk,525
3
- agent_interface/base_agent.py,sha256=GNskG9VaZgno7X24lQTpFdxUoQE0yJHLh0UPFJvOPn4,11098
4
- netra_zen-1.0.4.dist-info/licenses/LICENSE.md,sha256=t6LtOzAE2hgIIv5WbaN0wOcU3QCnGtAkMGNclHrKTOs,79
5
- token_budget/__init__.py,sha256=_2tmi72DGNtbYcZ-rGIxVKMytdkHFjzJaWz8bDhYACc,33
6
- token_budget/budget_manager.py,sha256=VRWxKcGDtgJfIRh-ztYQ4-wuhBvddVJJnyoGfxCBlv0,9567
7
- token_budget/models.py,sha256=14xFTk2-R1Ql0F9WLDof7vADrKC_5Fj7EE7UmZdoG00,2384
8
- token_budget/visualization.py,sha256=SaNnZ15edHXtjDCA5Yfu7w3AztCZRYsYCPGBqzapupY,719
9
- token_transparency/__init__.py,sha256=go86Rg4_VYAPLw3myVpLe1s1PbMu1llDTw1wfomP1lA,453
10
- token_transparency/claude_pricing_engine.py,sha256=9zWQJS3HJEs_lljil-xT1cUvG-Jf3ykNAninJFyfNSM,12630
11
- zen/__init__.py,sha256=_1gd3iYHH2ekLrCvZQ4DEA2bZ-OK0vlLfxBb3KlZALU,206
12
- zen/telemetry/__init__.py,sha256=QiW8p9TBDwPxtmYTszMyccblLHKrlVTsKLFIBvMHKx8,305
13
- zen/telemetry/embedded_credentials.py,sha256=0ktJEeAwj_oLeSottOaCPEOnBXfqF7OYyAihiUOoRbA,3925
14
- zen/telemetry/manager.py,sha256=TtrIPOvRvq1OOhNAO_Tp-dz7EiS2xXfqnpKQduLwYoI,9731
15
- netra_zen-1.0.4.dist-info/METADATA,sha256=x_6PpiIaeS3MlUOU-YTP9hRp2cU3TDM5BM0aYu3aHyE,29442
16
- netra_zen-1.0.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
17
- netra_zen-1.0.4.dist-info/entry_points.txt,sha256=oDehCnPGZezG0m9ZWspxjHLHyQ3eERX87eojR4ljaRo,45
18
- netra_zen-1.0.4.dist-info/top_level.txt,sha256=zHGp3q7L19xyJ98JsLMpkt1FffEneS2GNMq468hfhpo,69
19
- netra_zen-1.0.4.dist-info/RECORD,,