virtuai-cli 0.8.6__tar.gz → 0.8.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 (23) hide show
  1. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/PKG-INFO +1 -1
  2. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/pyproject.toml +1 -1
  3. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli/__init__.py +1 -1
  4. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli/runner.py +8 -5
  5. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli/security.py +17 -6
  6. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli.egg-info/PKG-INFO +1 -1
  7. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/README.md +0 -0
  8. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/setup.cfg +0 -0
  9. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli/chat/__init__.py +0 -0
  10. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli/chat/ask.py +0 -0
  11. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli/chat/command.py +0 -0
  12. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli/chat/history.py +0 -0
  13. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli/chat/sse.py +0 -0
  14. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli/chat/tui.py +0 -0
  15. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli/chat/widgets.py +0 -0
  16. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli/config.py +0 -0
  17. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli/executor.py +0 -0
  18. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli/main.py +0 -0
  19. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli.egg-info/SOURCES.txt +0 -0
  20. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli.egg-info/dependency_links.txt +0 -0
  21. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli.egg-info/entry_points.txt +0 -0
  22. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli.egg-info/requires.txt +0 -0
  23. {virtuai_cli-0.8.6 → virtuai_cli-0.8.7}/src/virtuai_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: virtuai-cli
3
- Version: 0.8.6
3
+ Version: 0.8.7
4
4
  Summary: Run VirtuAI deep agents on your local machine
5
5
  Author-email: uCloudStore <lmoreno@ucloudstore.com>
6
6
  License: Proprietary
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "virtuai-cli"
7
- version = "0.8.6"
7
+ version = "0.8.7"
8
8
  description = "Run VirtuAI deep agents on your local machine"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -1,2 +1,2 @@
1
1
  """VirtuAI local CLI."""
2
- __version__ = "0.8.6"
2
+ __version__ = "0.8.7"
@@ -176,15 +176,18 @@ async def _handle_frame(
176
176
 
177
177
  try:
178
178
  async with asyncio.timeout(timeout):
179
- async for raw_line in proc.stdout:
180
- chunk = raw_line.decode("utf-8", errors="replace")
179
+ # Read in chunks rather than lines so partial-line output
180
+ # (e.g. interactive prompts like "Enter verification code: "
181
+ # that have no trailing newline) is forwarded immediately.
182
+ while True:
183
+ chunk_bytes = await proc.stdout.read(4096)
184
+ if not chunk_bytes:
185
+ break
186
+ chunk = chunk_bytes.decode("utf-8", errors="replace")
181
187
  chunks.append(chunk)
182
188
  total_bytes += len(chunk)
183
189
  if on_output and fid:
184
190
  on_output(fid, chunk)
185
- # Forward chunk to server — server may show it in the agent
186
- # trace or buffer it; either way the agent gets the full
187
- # execute_result below.
188
191
  try:
189
192
  await ws.send(json.dumps({
190
193
  "v": 1, "id": fid, "type": "execute_output",
@@ -65,24 +65,35 @@ _PASS_THROUGH_ENV = {
65
65
  # Some build tools need these
66
66
  "USER", "LOGNAME",
67
67
  "XDG_RUNTIME_DIR",
68
+ # GCP / Cloud SDK — needed for gcloud auth and ADC to work
69
+ "CLOUDSDK_CONFIG",
70
+ "GOOGLE_APPLICATION_CREDENTIALS",
71
+ "GOOGLE_CLOUD_PROJECT",
72
+ "GCLOUD_PROJECT",
73
+ "GOOGLE_CLOUD_QUOTA_PROJECT",
68
74
  }
69
75
 
70
- _VIRTUAI_ENV_PREFIX = "VIRTUAI_"
76
+ # Env var prefixes whose entire namespace is passed through
77
+ _PASS_THROUGH_PREFIXES = ("VIRTUAI_", "GOOGLE_", "GCLOUD_", "CLOUDSDK_", "AWS_", "AZURE_")
71
78
 
72
79
 
73
80
  def scrub_env(workdir: Path, extra_allow: list[str] | None = None) -> dict[str, str]:
74
- """Build a clean environment: allowlist + VIRTUAI_ vars + user opt-ins."""
81
+ """Build a clean environment: allowlist + cloud-tool prefixes + user opt-ins.
82
+
83
+ HOME is intentionally kept as-is so local tools (gcloud, aws, git, npm …)
84
+ can find their credentials and config in the user's real home directory.
85
+ The agent runs on the user's own machine with their explicit permission,
86
+ so restricting HOME would only break authentication without adding security.
87
+ REAL_HOME is also set as a convenience alias for scripts that need it.
88
+ """
75
89
  allowed = set(_PASS_THROUGH_ENV)
76
90
  if extra_allow:
77
91
  allowed.update(extra_allow)
78
92
 
79
93
  env: dict[str, str] = {}
80
94
  for key, value in os.environ.items():
81
- if key in allowed or key.startswith(_VIRTUAI_ENV_PREFIX):
95
+ if key in allowed or any(key.startswith(p) for p in _PASS_THROUGH_PREFIXES):
82
96
  env[key] = value
83
97
 
84
- # Keep REAL_HOME so the agent can resolve user paths, but override HOME
85
- # so tools that write to ~/.cache/~/.config don't escape the workdir
86
98
  env["REAL_HOME"] = env.get("HOME", os.path.expanduser("~"))
87
- env["HOME"] = str(workdir)
88
99
  return env
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: virtuai-cli
3
- Version: 0.8.6
3
+ Version: 0.8.7
4
4
  Summary: Run VirtuAI deep agents on your local machine
5
5
  Author-email: uCloudStore <lmoreno@ucloudstore.com>
6
6
  License: Proprietary
File without changes
File without changes