Repository navigation
Expand file tree
/
Copy pathagy.yaml
More file actions
136 lines (131 loc) · 5.1 KB
/
Copy pathagy.yaml
File metadata and controls
136 lines (131 loc) · 5.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# syntax=docker/sandbox-kit:3
# Antigravity CLI (agy) as a v3 workload: the image carries the agent and the
# dev toolchain, the capabilities declare what the host is allowed to grant.
schemaVersion: "3"
kind: workload
displayName: Antigravity CLI (agy) — Plone / Node / Python
description: >-
Google's Antigravity CLI in YOLO mode, inside a Docker Sandbox, with the
Plone, Node (22/24, pnpm, yarn), Python (uv) and T3 Code toolchain.
Sign in once: the host credential proxy keeps the Google tokens outside the
sandbox.
version: "0.1.0"
sourceUrl: https://github.com/avoinea/sbx-gemini-agy
licenses: [MIT]
capabilities:
# This is an agent sandbox: sbx launches agy using the entrypoint in the image.
- type: com.docker.sandbox/sbx@1
- type: com.docker.sandbox/network-policy@1
config:
runtime:
allow:
# Antigravity CLI: installer, feature flags, release channel.
- antigravity.google:443
- antigravity-unleash.goog:443
- antigravity-cli-auto-updater-974169037036.us-central1.run.app:443
- storage.googleapis.com:443
# Google OAuth and profile assets.
- accounts.google.com:443
- lh3.googleusercontent.com:443
- oauth2.googleapis.com:443
- play.googleapis.com:443
- www.googleapis.com:443
# Antigravity / Gemini Code Assist model and agent APIs.
- businessaicode.googleapis.com:443
- aiplatform.googleapis.com:443
- aicode.googleapis.com:443
- cloudaicompanion.googleapis.com:443
- cloudcode-pa.googleapis.com:443
- daily-cloudcode-pa.googleapis.com:443
- generativelanguage.googleapis.com:443
# Dev registries: this sandbox exists to install packages.
- registry.npmjs.org:443
- registry.yarnpkg.com:443
- nodejs.org:443
- pypi.org:443
- files.pythonhosted.org:443
- eggrepo.eea.europa.eu:443
- github.com:443
- codeload.github.com:443
- api.github.com:443
- raw.githubusercontent.com:443
- objects.githubusercontent.com:443
- release-assets.githubusercontent.com:443
# T3 Code: runtime downloads come from GitHub releases; the client
# checks this host for updates.
- t3.codes:443
# Optional: without a host binding, agy falls back to its interactive
# copy/paste OAuth login instead of the proxy-managed session.
- type: com.docker.sandbox/credential@1
optional: true
description: Google OAuth session used by the Antigravity CLI
config:
service: antigravity
phase: runtime
oauth:
tokenEndpoint:
host: oauth2.googleapis.com
path: /token
resourceHosts:
- businessaicode.googleapis.com
- aiplatform.googleapis.com
- play.googleapis.com
- aicode.googleapis.com
- cloudaicompanion.googleapis.com
- cloudcode-pa.googleapis.com
- daily-cloudcode-pa.googleapis.com
- generativelanguage.googleapis.com
- www.googleapis.com
sentinels:
accessToken: agy-oauth-access-proxy-managed
refreshToken: agy-oauth-refresh-proxy-managed
# agy reads its session from this file. It holds the sentinels, never
# the real tokens: those stay in the host credential store.
credentialFile:
5F54
path: ~/.gemini/antigravity-cli/antigravity-oauth-token
structure:
token:
access_token: "{{.AccessToken}}"
token_type: Bearer
refresh_token: "{{.RefreshToken}}"
expiry: "9999-12-31T23:59:59Z"
auth_method: consumer
- type: com.docker.sandbox/lifecycle@1
config:
install:
# Seed a permissive configuration so the first run does not stop for
# onboarding. Only written when missing: later user changes survive.
- description: Seed Antigravity settings for sandboxed operation
user: agent
env: [WORKSPACE_DIR]
command: |
set -eu
dir="$HOME/.gemini/antigravity-cli"
file="$dir/settings.json"
[ ! -e "$file" ] || exit 0
mkdir -p "$dir"
ws="${WORKSPACE_DIR:-/workspace}"
esc=$(printf '%s' "$ws" | sed 's/\\/\\\\/g; s/"/\\"/g; s/\t/\\t/g')
cat > "$file" <<EOF
{
"model": "Gemini 4 Neon (XHigh)",
"colorScheme": "tokyo night",
"altScreenMode": "always",
"agentMode": "accept-edits",
"toolPermission": "always-proceed",
"artifactReviewPolicy": "always-proceed",
"allowNonWorkspaceAccess": true,
"permissions": {
"allow": [
"command(*)",
"execute_url(*)",
"mcp(*)",
"read_file(*)",
"read_url(*)",
"write_file(*)"
]
},
"trustedWorkspaces": ["$esc"]
}
EOF
chmod 0600 "$file"