@@ -48,8 +48,10 @@ def create(
4848 self ,
4949 * ,
5050 name : str ,
51+ allow_ai_gateway : Optional [bool ] | Omit = omit ,
5152 allow_all : Optional [bool ] | Omit = omit ,
5253 allow_devbox_to_devbox : Optional [bool ] | Omit = omit ,
54+ allow_mcp_gateway : Optional [bool ] | Omit = omit ,
5355 allowed_hostnames : Optional [SequenceNotStr [str ]] | Omit = omit ,
5456 description : Optional [str ] | Omit = omit ,
5557 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -69,13 +71,19 @@ def create(
6971 name: The human-readable name for the NetworkPolicy. Must be unique within the
7072 account.
7173
74+ allow_ai_gateway: (Optional) If true, allows devbox egress to the AI credential gateway for
75+ credential proxying. Defaults to false.
76+
7277 allow_all: (Optional) If true, all egress traffic is allowed (ALLOW_ALL policy). Defaults
7378 to false.
7479
7580 allow_devbox_to_devbox: (Optional) If true, allows traffic between the account's own devboxes via
7681 tunnels. Defaults to false. If allow_all is true, this is automatically set to
7782 true.
7883
84+ allow_mcp_gateway: (Optional) If true, allows devbox egress to the MCP hub for MCP server access.
85+ Defaults to false.
86+
7987 allowed_hostnames: (Optional) DNS-based allow list with wildcard support. Examples: ['github.com',
8088 '*.npmjs.org'].
8189
@@ -96,8 +104,10 @@ def create(
96104 body = maybe_transform (
97105 {
98106 "name" : name ,
107+ "allow_ai_gateway" : allow_ai_gateway ,
99108 "allow_all" : allow_all ,
100109 "allow_devbox_to_devbox" : allow_devbox_to_devbox ,
110+ "allow_mcp_gateway" : allow_mcp_gateway ,
101111 "allowed_hostnames" : allowed_hostnames ,
102112 "description" : description ,
103113 },
@@ -150,8 +160,10 @@ def update(
150160 self ,
151161 id : str ,
152162 * ,
163+ allow_ai_gateway : Optional [bool ] | Omit = omit ,
153164 allow_all : Optional [bool ] | Omit = omit ,
154165 allow_devbox_to_devbox : Optional [bool ] | Omit = omit ,
166+ allow_mcp_gateway : Optional [bool ] | Omit = omit ,
155167 allowed_hostnames : Optional [SequenceNotStr [str ]] | Omit = omit ,
156168 description : Optional [str ] | Omit = omit ,
157169 name : Optional [str ] | Omit = omit ,
@@ -168,10 +180,14 @@ def update(
168180 All fields are optional.
169181
170182 Args:
183+ allow_ai_gateway: If true, allows devbox egress to the AI credential gateway.
184+
171185 allow_all: If true, all egress traffic is allowed (ALLOW_ALL policy).
172186
173187 allow_devbox_to_devbox: If true, allows traffic between the account's own devboxes via tunnels.
174188
189+ allow_mcp_gateway: If true, allows devbox egress to the MCP hub.
190+
175191 allowed_hostnames: Updated DNS-based allow list with wildcard support. Examples: ['github.com',
176192 '*.npmjs.org'].
177193
@@ -195,8 +211,10 @@ def update(
195211 f"/v1/network-policies/{ id } " ,
196212 body = maybe_transform (
197213 {
214+ "allow_ai_gateway" : allow_ai_gateway ,
198215 "allow_all" : allow_all ,
199216 "allow_devbox_to_devbox" : allow_devbox_to_devbox ,
217+ "allow_mcp_gateway" : allow_mcp_gateway ,
200218 "allowed_hostnames" : allowed_hostnames ,
201219 "description" : description ,
202220 "name" : name ,
@@ -334,8 +352,10 @@ async def create(
334352 self ,
335353 * ,
336354 name : str ,
355+ allow_ai_gateway : Optional [bool ] | Omit = omit ,
337356 allow_all : Optional [bool ] | Omit = omit ,
338357 allow_devbox_to_devbox : Optional [bool ] | Omit = omit ,
358+ allow_mcp_gateway : Optional [bool ] | Omit = omit ,
339359 allowed_hostnames : Optional [SequenceNotStr [str ]] | Omit = omit ,
340360 description : Optional [str ] | Omit = omit ,
341361 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -355,13 +375,19 @@ async def create(
355375 name: The human-readable name for the NetworkPolicy. Must be unique within the
356376 account.
357377
378+ allow_ai_gateway: (Optional) If true, allows devbox egress to the AI credential gateway for
379+ credential proxying. Defaults to false.
380+
358381 allow_all: (Optional) If true, all egress traffic is allowed (ALLOW_ALL policy). Defaults
359382 to false.
360383
361384 allow_devbox_to_devbox: (Optional) If true, allows traffic between the account's own devboxes via
362385 tunnels. Defaults to false. If allow_all is true, this is automatically set to
363386 true.
364387
388+ allow_mcp_gateway: (Optional) If true, allows devbox egress to the MCP hub for MCP server access.
389+ Defaults to false.
390+
365391 allowed_hostnames: (Optional) DNS-based allow list with wildcard support. Examples: ['github.com',
366392 '*.npmjs.org'].
367393
@@ -382,8 +408,10 @@ async def create(
382408 body = await async_maybe_transform (
383409 {
384410 "name" : name ,
411+ "allow_ai_gateway" : allow_ai_gateway ,
385412 "allow_all" : allow_all ,
386413 "allow_devbox_to_devbox" : allow_devbox_to_devbox ,
414+ "allow_mcp_gateway" : allow_mcp_gateway ,
387415 "allowed_hostnames" : allowed_hostnames ,
388416 "description" : description ,
389417 },
@@ -436,8 +464,10 @@ async def update(
436464 self ,
437465 id : str ,
438466 * ,
467+ allow_ai_gateway : Optional [bool ] | Omit = omit ,
439468 allow_all : Optional [bool ] | Omit = omit ,
440469 allow_devbox_to_devbox : Optional [bool ] | Omit = omit ,
470+ allow_mcp_gateway : Optional [bool ] | Omit = omit ,
441471 allowed_hostnames : Optional [SequenceNotStr [str ]] | Omit = omit ,
442472 description : Optional [str ] | Omit = omit ,
443473 name : Optional [str ] | Omit = omit ,
@@ -454,10 +484,14 @@ async def update(
454484 All fields are optional.
455485
456486 Args:
487+ allow_ai_gateway: If true, allows devbox egress to the AI credential gateway.
488+
457489 allow_all: If true, all egress traffic is allowed (ALLOW_ALL policy).
458490
459491 allow_devbox_to_devbox: If true, allows traffic between the account's own devboxes via tunnels.
460492
493+ allow_mcp_gateway: If true, allows devbox egress to the MCP hub.
494+
461495 allowed_hostnames: Updated DNS-based allow list with wildcard support. Examples: ['github.com',
462496 '*.npmjs.org'].
463497
@@ -481,8 +515,10 @@ async def update(
481515 f"/v1/network-policies/{ id } " ,
482516 body = await async_maybe_transform (
483517 {
518+ "allow_ai_gateway" : allow_ai_gateway ,
484519 "allow_all" : allow_all ,
485520 "allow_devbox_to_devbox" : allow_devbox_to_devbox ,
521+ "allow_mcp_gateway" : allow_mcp_gateway ,
486522 "allowed_hostnames" : allowed_hostnames ,
487523 "description" : description ,
488524 "name" : name ,
0 commit comments