gemini-computer-use 0.4.2 → 0.4.4
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 +18 -1086
- package/cli.js +56 -0
- package/package.json +14 -24
- package/LICENSE +0 -21
- package/bin/cli.js +0 -122
- package/core/__init__.py +0 -0
- package/core/agent.py +0 -767
- package/core/agent_harness.py +0 -67
- package/core/code_cache.py +0 -244
- package/core/device.py +0 -2400
- package/core/domain.py +0 -303
- package/core/hooks.py +0 -61
- package/core/mcp_tools.py +0 -3497
- package/core/policies.py +0 -132
- package/core/schemas.py +0 -49
- package/core/server.py +0 -972
- package/core/subagents.py +0 -55
- package/core/termux.py +0 -916
- package/core/triggers.py +0 -70
- package/core/updater.py +0 -1713
- package/core/version.py +0 -31
- package/core/vitals.py +0 -181
- package/core/web_share.py +0 -814
- package/gateway.py +0 -2862
- package/install-gui.cmd +0 -40
- package/install-gui.ps1 +0 -1882
- package/install-gui.strings.json +0 -211
- package/install.ps1 +0 -1287
- package/install.sh +0 -1998
- package/ops/doctor.ps1 +0 -735
- package/ops/mesh-domain.sh +0 -86
- package/ops/nginx/README.md +0 -77
- package/ops/nginx/antigravity-mesh-mcp.conf +0 -172
- package/ops/nginx/mesh-domain.vhost.template +0 -58
- package/ops/nginx/render-domain.sh +0 -123
- package/ops/update.ps1 +0 -373
- package/ops/windows/README.md +0 -298
- package/ops/windows/agent-watchdog.ps1 +0 -575
- package/ops/windows/run-hidden.vbs +0 -64
- package/skills/orchestrator.md +0 -26
package/core/triggers.py
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
import logging
|
|
3
|
-
from typing import Callable, Awaitable, List, Optional, Sequence
|
|
4
|
-
from google.antigravity.triggers import (
|
|
5
|
-
Trigger,
|
|
6
|
-
TriggerContext,
|
|
7
|
-
FileChange,
|
|
8
|
-
FileChangeKind,
|
|
9
|
-
every,
|
|
10
|
-
on_file_change,
|
|
11
|
-
)
|
|
12
|
-
from core.schemas import NodeVitals
|
|
13
|
-
|
|
14
|
-
logger = logging.getLogger(__name__)
|
|
15
|
-
|
|
16
|
-
async def default_vitals_fetcher() -> List[NodeVitals]:
|
|
17
|
-
"""Default local fetcher when no custom fetcher is provided."""
|
|
18
|
-
return []
|
|
19
|
-
|
|
20
|
-
async def check_mesh_health(
|
|
21
|
-
ctx: TriggerContext,
|
|
22
|
-
vitals_fetcher: Optional[Callable[[], Awaitable[List[NodeVitals]]]] = None,
|
|
23
|
-
) -> None:
|
|
24
|
-
fetcher = vitals_fetcher or default_vitals_fetcher
|
|
25
|
-
try:
|
|
26
|
-
nodes = await fetcher()
|
|
27
|
-
except Exception as e:
|
|
28
|
-
logger.error(f"Error fetching vitals in watchdog: {e}")
|
|
29
|
-
await ctx.send(f"[WATCHDOG ALERT] Failed to collect mesh vitals: {e}")
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
for node in nodes:
|
|
33
|
-
if not node.is_online:
|
|
34
|
-
await ctx.send(
|
|
35
|
-
f"[WATCHDOG ALERT] Node '{node.hostname}' ({node.ip}) is offline! Check mesh tunnel and host status."
|
|
36
|
-
)
|
|
37
|
-
elif node.ram_usage_pct > 90.0:
|
|
38
|
-
await ctx.send(
|
|
39
|
-
f"[WATCHDOG ALERT] Node '{node.hostname}' exceeded critical memory threshold ({node.ram_usage_pct:.1f}%). Diagnostic required."
|
|
40
|
-
)
|
|
41
|
-
elif node.cpu_load_1m > 10.0:
|
|
42
|
-
await ctx.send(
|
|
43
|
-
f"[WATCHDOG ALERT] Node '{node.hostname}' high load average: {node.cpu_load_1m}."
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
async def handle_config_file_change(
|
|
47
|
-
ctx: TriggerContext,
|
|
48
|
-
changes: Sequence[FileChange],
|
|
49
|
-
reload_callback: Optional[Callable[[Sequence[FileChange]], Awaitable[None]]] = None,
|
|
50
|
-
) -> None:
|
|
51
|
-
if reload_callback:
|
|
52
|
-
await reload_callback(changes)
|
|
53
|
-
|
|
54
|
-
paths_str = ", ".join([str(c.path) for c in changes])
|
|
55
|
-
await ctx.send(f"[CONFIG RELOAD] Config reloaded due to change in {paths_str}")
|
|
56
|
-
|
|
57
|
-
def create_mesh_watchdog_trigger(
|
|
58
|
-
interval_seconds: float = 60.0,
|
|
59
|
-
vitals_fetcher: Optional[Callable[[], Awaitable[List[NodeVitals]]]] = None,
|
|
60
|
-
) -> Trigger:
|
|
61
|
-
return every(interval_seconds, lambda ctx: check_mesh_health(ctx, vitals_fetcher))
|
|
62
|
-
|
|
63
|
-
def create_config_trigger(
|
|
64
|
-
path: str = "server_facts.json",
|
|
65
|
-
reload_callback: Optional[Callable[[Sequence[FileChange]], Awaitable[None]]] = None,
|
|
66
|
-
) -> Trigger:
|
|
67
|
-
return on_file_change(
|
|
68
|
-
path,
|
|
69
|
-
lambda ctx, changes: handle_config_file_change(ctx, changes, reload_callback),
|
|
70
|
-
)
|