You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fa4acc7
Browse filesBrowse the repository at this point in the historyBrowse files
feat: Support "allowlist": "disabled" in environment network config.
Adds a short form for `network.allowlist` so terminal egress
can be blocked from inside the `network` object. `network: "disabled"` keeps working unchanged.
PiperOrigin-RevId: 994980935
Copy file name to clipboardExpand all lines: google/genai/_gaos/types/interactions/environmentnetworkegressallowlist.py
+26-21Lines changed: 26 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -26,21 +26,38 @@
26
26
27
27
28
28
Disabled=Literal["disabled",]
29
-
r"""Turns all network off."""
30
29
31
30
32
-
classAllowlistParam(TypedDict):
33
-
r"""Outbound networking configuration for the sandbox. When specified, restricts which external domains the sandbox can reach. Omit entirely to allow all outbound traffic with no header injection."""
r"""List of allowed domains and their configurations. Set to `\"disabled\"`
41
+
to block all network egress.
42
+
"""
34
43
35
-
allowlist: NotRequired[List[AllowlistEntryParam]]
36
-
r"""List of allowed outbound domains. Only requests to listed domains are permitted. Use [{'domain': '*'}] to allow all domains while still injecting headers on specific ones."""
r"""Network egress configuration for the environment."""
38
47
39
-
classAllowlist(BaseModel):
40
-
r"""Outbound networking configuration for the sandbox. When specified, restricts which external domains the sandbox can reach. Omit entirely to allow all outbound traffic with no header injection."""
48
+
allowlist: NotRequired[AllowlistParam]
49
+
r"""List of allowed domains and their configurations. Set to `\"disabled\"`
50
+
to block all network egress.
51
+
"""
41
52
42
-
allowlist: Optional[List[AllowlistEntry]] =None
43
-
r"""List of allowed outbound domains. Only requests to listed domains are permitted. Use [{'domain': '*'}] to allow all domains while still injecting headers on specific ones."""
r"""Outbound networking configuration for the sandbox. Accepts an object with an 'allowlist' array to restrict traffic, or the string 'disabled' to turn off all network access. Omit entirely to allow all outbound traffic with no header injection."""
r"""Outbound networking configuration for the sandbox. Accepts an object with an 'allowlist' array to restrict traffic, or the string 'disabled' to turn off all network access. Omit entirely to allow all outbound traffic with no header injection."""
0 commit comments