gemini-computer-use 0.2.4 → 0.4.1
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.
- package/README.md +733 -16
- package/bin/cli.js +112 -17
- package/core/__pycache__/__init__.cpython-313.pyc +0 -0
- package/core/__pycache__/agent.cpython-313.pyc +0 -0
- package/core/__pycache__/code_cache.cpython-313.pyc +0 -0
- package/core/__pycache__/mcp_tools.cpython-313.pyc +0 -0
- package/core/__pycache__/schemas.cpython-313.pyc +0 -0
- package/core/__pycache__/server.cpython-313.pyc +0 -0
- package/core/__pycache__/vitals.cpython-313.pyc +0 -0
- package/core/__pycache__/web_share.cpython-313.pyc +0 -0
- package/core/agent.py +503 -18
- package/core/agent_harness.py +9 -2
- package/core/code_cache.py +15 -3
- package/core/device.py +2400 -0
- package/core/domain.py +303 -0
- package/core/mcp_tools.py +1840 -112
- package/core/policies.py +35 -5
- package/core/server.py +78 -32
- package/core/termux.py +916 -0
- package/core/updater.py +1713 -0
- package/core/version.py +31 -0
- package/core/vitals.py +66 -2
- package/core/web_share.py +814 -0
- package/gateway.py +1469 -98
- package/install-gui.cmd +40 -0
- package/install-gui.ps1 +1882 -0
- package/install-gui.strings.json +211 -0
- package/install.ps1 +960 -92
- package/install.sh +1214 -81
- package/ops/doctor.ps1 +735 -0
- package/ops/mesh-domain.sh +86 -0
- package/ops/nginx/README.md +77 -0
- package/ops/nginx/antigravity-mesh-mcp.conf +172 -0
- package/ops/nginx/mesh-domain.vhost.template +58 -0
- package/ops/nginx/render-domain.sh +123 -0
- package/ops/update.ps1 +373 -0
- package/ops/windows/README.md +298 -0
- package/ops/windows/agent-watchdog.ps1 +575 -0
- package/ops/windows/run-hidden.vbs +64 -0
- package/package.json +6 -2
- package/skills/orchestrator.md +12 -0
package/core/code_cache.py
CHANGED
|
@@ -4,6 +4,18 @@ import json
|
|
|
4
4
|
from typing import List, Dict, Optional, Any
|
|
5
5
|
from pydantic import BaseModel, Field
|
|
6
6
|
|
|
7
|
+
|
|
8
|
+
def _index_key(path: str) -> str:
|
|
9
|
+
"""Canonical, platform-stable key for a file inside the index.
|
|
10
|
+
|
|
11
|
+
``os.path.normpath`` returns backslashes on Windows, so the same repository
|
|
12
|
+
produced ``core\\schemas.py`` there and ``core/schemas.py`` on Linux: the
|
|
13
|
+
cache written on one platform did not match on the other and symbols were
|
|
14
|
+
reported with a separator the model could not paste back into a command.
|
|
15
|
+
Forward slashes work for every Windows API too, so they are used everywhere.
|
|
16
|
+
"""
|
|
17
|
+
return os.path.normpath(path).replace("\\", "/")
|
|
18
|
+
|
|
7
19
|
class CodeSymbol(BaseModel):
|
|
8
20
|
name: str
|
|
9
21
|
kind: str # "class", "function", "async_function"
|
|
@@ -132,7 +144,7 @@ class CodeIndex:
|
|
|
132
144
|
for file in files:
|
|
133
145
|
if not file.endswith(".py"):
|
|
134
146
|
continue
|
|
135
|
-
file_path =
|
|
147
|
+
file_path = _index_key(os.path.join(root, file))
|
|
136
148
|
current_seen.add(file_path)
|
|
137
149
|
total_files += 1
|
|
138
150
|
|
|
@@ -182,14 +194,14 @@ class CodeIndex:
|
|
|
182
194
|
return matches
|
|
183
195
|
|
|
184
196
|
def get_file_outline(self, file_path: str) -> List[CodeSymbol]:
|
|
185
|
-
norm =
|
|
197
|
+
norm = _index_key(file_path)
|
|
186
198
|
for path, entry in self.files.items():
|
|
187
199
|
if norm == path or norm.endswith(path) or path.endswith(norm):
|
|
188
200
|
return entry.symbols
|
|
189
201
|
return []
|
|
190
202
|
|
|
191
203
|
def get_cached_chunk(self, file_path: str, start_line: int = 1, end_line: int = 100) -> str:
|
|
192
|
-
norm =
|
|
204
|
+
norm = _index_key(file_path)
|
|
193
205
|
try:
|
|
194
206
|
stat = os.stat(norm)
|
|
195
207
|
mtime = stat.st_mtime
|