vrex-flow-engine 0.2.1__tar.gz → 0.2.3__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 (41) hide show
  1. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/PKG-INFO +1 -1
  2. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/bridge/flow_client.py +9 -2
  3. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/bridge/flow_sdk.py +3 -2
  4. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/cli/processes.py +3 -0
  5. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/cli/supervisor.py +5 -1
  6. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/pyproject.toml +1 -1
  7. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/vrex_flow_engine.egg-info/PKG-INFO +1 -1
  8. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/PYPI_README.md +0 -0
  9. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/__init__.py +0 -0
  10. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/bridge/__init__.py +0 -0
  11. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/bridge/ws_server.py +0 -0
  12. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/catalog.py +0 -0
  13. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/cli/__init__.py +0 -0
  14. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/cli/app.py +0 -0
  15. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/cli/config.py +0 -0
  16. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/cli/dashboard.py +0 -0
  17. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/cli/health.py +0 -0
  18. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/config.py +0 -0
  19. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/ingest.py +0 -0
  20. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/job_store.py +0 -0
  21. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/jobs.py +0 -0
  22. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/main.py +0 -0
  23. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/media.py +0 -0
  24. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/media_store.py +0 -0
  25. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/openai/__init__.py +0 -0
  26. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/openai/_util.py +0 -0
  27. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/openai/images.py +0 -0
  28. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/openai/models.py +0 -0
  29. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/openai/uploads.py +0 -0
  30. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/openai/videos.py +0 -0
  31. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/pool.py +0 -0
  32. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/posthog_client.py +0 -0
  33. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/session.py +0 -0
  34. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/video_context.py +0 -0
  35. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/flow_engine/video_context_store.py +0 -0
  36. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/setup.cfg +0 -0
  37. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/vrex_flow_engine.egg-info/SOURCES.txt +0 -0
  38. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/vrex_flow_engine.egg-info/dependency_links.txt +0 -0
  39. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/vrex_flow_engine.egg-info/entry_points.txt +0 -0
  40. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/vrex_flow_engine.egg-info/requires.txt +0 -0
  41. {vrex_flow_engine-0.2.1 → vrex_flow_engine-0.2.3}/vrex_flow_engine.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vrex-flow-engine
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: Launcher + supervisor and OpenAI-compatible image/video generation service (Vrex Flow Engine).
5
5
  Author: Vrex
6
6
  License: Proprietary
@@ -35,6 +35,13 @@ logger = logging.getLogger(__name__)
35
35
  # need to plumb it through from the extension on every call.
36
36
  _FLOW_API_KEY = "AIzaSyBtrm0o5ab1c-Ec8ZuLcGt3oJAA5VWt3pY"
37
37
  _FLOW_CREDITS_URL = "https://aisandbox-pa.googleapis.com/v1/credits"
38
+
39
+ # Concrete paygate tiers Google returns that we accept as "resolved". Google
40
+ # periodically introduces tiers (ONE=Pro, TWO=Ultra, TIER1P5="Tier 1.5"); an
41
+ # unknown or `PAYGATE_TIER_UNSPECIFIED` value means the tier isn't resolved.
42
+ # Single source of truth — flow_sdk imports this for its dispatch-time guard so
43
+ # the two sites can never drift (a drift is what silently blocked TIER1P5).
44
+ VALID_PAYGATE_TIERS = ("PAYGATE_TIER_ONE", "PAYGATE_TIER_TWO", "PAYGATE_TIER_TIER1P5")
38
45
  # Minimum gap between paygate-tier refreshes when the same Bearer token
39
46
  # is re-delivered. Tier rarely changes; 60 s is fine for AccountPanel
40
47
  # freshness and tames the credits-fetch storm an old extension can
@@ -182,9 +189,9 @@ class FlowClient:
182
189
  logger.warning("fetch_paygate_tier: response was not JSON")
183
190
  return False
184
191
  tier = data.get("userPaygateTier")
185
- if tier not in ("PAYGATE_TIER_ONE", "PAYGATE_TIER_TWO"):
192
+ if tier not in VALID_PAYGATE_TIERS:
186
193
  logger.warning(
187
- "fetch_paygate_tier: response missing userPaygateTier (got %r)",
194
+ "fetch_paygate_tier: unsupported userPaygateTier (got %r)",
188
195
  tier,
189
196
  )
190
197
  return False
@@ -17,7 +17,7 @@ import time
17
17
  import uuid
18
18
  from typing import Any, Optional
19
19
 
20
- from flow_engine.bridge.flow_client import FlowClient
20
+ from flow_engine.bridge.flow_client import FlowClient, VALID_PAYGATE_TIERS
21
21
 
22
22
  logger = logging.getLogger(__name__)
23
23
 
@@ -1465,7 +1465,8 @@ def _extract_project_id(resp: Any) -> Optional[str]:
1465
1465
  return None
1466
1466
 
1467
1467
 
1468
- _VALID_TIERS = {"PAYGATE_TIER_ONE", "PAYGATE_TIER_TWO"}
1468
+ # Dispatch-time guard shares flow_client's single tier list (no drift).
1469
+ _VALID_TIERS = set(VALID_PAYGATE_TIERS)
1469
1470
 
1470
1471
 
1471
1472
  def _extract_uploaded_media_id(resp: Any) -> Optional[str]:
@@ -29,6 +29,7 @@ class ManagedProcess:
29
29
  log_file: Optional[Path] = None,
30
30
  on_line: Optional[OnLine] = None,
31
31
  display: Optional[str] = None,
32
+ cwd: Optional[str] = None,
32
33
  ) -> None:
33
34
  self.name = name
34
35
  self.argv = list(argv)
@@ -37,6 +38,7 @@ class ManagedProcess:
37
38
  self._env = {**os.environ, **(env or {})}
38
39
  self._log_file = log_file
39
40
  self._on_line = on_line
41
+ self._cwd = cwd
40
42
 
41
43
  self._proc: Optional[subprocess.Popen] = None
42
44
  self._pump: Optional[threading.Thread] = None
@@ -52,6 +54,7 @@ class ManagedProcess:
52
54
  self._proc = subprocess.Popen(
53
55
  self.argv,
54
56
  env=self._env,
57
+ cwd=self._cwd,
55
58
  stdout=subprocess.PIPE,
56
59
  stderr=subprocess.STDOUT,
57
60
  text=True,
@@ -22,7 +22,7 @@ from typing import Optional
22
22
  from rich.console import Console
23
23
 
24
24
  from . import dashboard, health
25
- from .config import LOGS_DIR, FlowConfig, mask
25
+ from .config import CONFIG_DIR, LOGS_DIR, FlowConfig, mask
26
26
  from .processes import ManagedProcess
27
27
 
28
28
  console = Console()
@@ -92,6 +92,10 @@ class Supervisor:
92
92
  "engine",
93
93
  [sys.executable, "-m", "flow_engine.main"],
94
94
  env=env,
95
+ # Run from a package-free dir: `python -m` prepends cwd to sys.path, so
96
+ # launching from a checkout that contains a `flow_engine/` package would
97
+ # shadow the installed one and silently run stale code.
98
+ cwd=str(CONFIG_DIR),
95
99
  log_file=LOGS_DIR / "engine.log",
96
100
  on_line=self._on_line,
97
101
  display=f"{sys.executable} -m flow_engine.main",
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "vrex-flow-engine"
3
- version = "0.2.1"
3
+ version = "0.2.3"
4
4
  description = "Launcher + supervisor and OpenAI-compatible image/video generation service (Vrex Flow Engine)."
5
5
  # Neutral public description (the in-repo README.md carries the full internal docs).
6
6
  readme = "PYPI_README.md"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vrex-flow-engine
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: Launcher + supervisor and OpenAI-compatible image/video generation service (Vrex Flow Engine).
5
5
  Author: Vrex
6
6
  License: Proprietary