Skip to content

Commit 9b72125

Browse files
feat(api): add conversation_sharing_policy field to agent_policy
1 parent 88048fd commit 9b72125

9 files changed

Lines changed: 30 additions & 5 deletions

File tree

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 193
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-84a17c2c7c56901f5fd5ebb6e444c831671d403eba90509a6ecd85780ba04ad2.yml
3-
openapi_spec_hash: 5ae1e9b53725fcf9a3224289f2f413e9
4-
config_hash: 7dcf23a612f573a3267446501c35a0e0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gitpod%2Fgitpod-bda11704254692a0568ae0b36b970e79946aa725c9a64c3511f979dc5c20aa13.yml
3+
openapi_spec_hash: abc326f8f7553f8e86eedc8bca0b0378
4+
config_hash: a456e43b92b021483b4b81971da31909

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ Types:
500500
```python
501501
from gitpod.types.organizations import (
502502
AgentPolicy,
503+
ConversationSharingPolicy,
503504
CrowdStrikeConfig,
504505
KernelControlsAction,
505506
OrganizationPolicies,

src/gitpod/types/organizations/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from .policy_retrieve_response import PolicyRetrieveResponse as PolicyRetrieveResponse
2828
from .domain_verification_state import DomainVerificationState as DomainVerificationState
2929
from .invite_get_summary_params import InviteGetSummaryParams as InviteGetSummaryParams
30+
from .conversation_sharing_policy import ConversationSharingPolicy as ConversationSharingPolicy
3031
from .custom_domain_create_params import CustomDomainCreateParams as CustomDomainCreateParams
3132
from .custom_domain_delete_params import CustomDomainDeleteParams as CustomDomainDeleteParams
3233
from .custom_domain_update_params import CustomDomainUpdateParams as CustomDomainUpdateParams

src/gitpod/types/organizations/agent_policy.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from pydantic import Field as FieldInfo
66

77
from ..._models import BaseModel
8+
from .conversation_sharing_policy import ConversationSharingPolicy
89

910
__all__ = ["AgentPolicy"]
1011

@@ -30,6 +31,11 @@ class AgentPolicy(BaseModel):
3031
disabled for agents
3132
"""
3233

34+
conversation_sharing_policy: Optional[ConversationSharingPolicy] = FieldInfo(
35+
alias="conversationSharingPolicy", default=None
36+
)
37+
"""conversation_sharing_policy controls whether agent conversations can be shared"""
38+
3339
scm_tools_allowed_group_id: Optional[str] = FieldInfo(alias="scmToolsAllowedGroupId", default=None)
3440
"""
3541
scm_tools_allowed_group_id restricts SCM tools access to members of this group.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing_extensions import Literal, TypeAlias
4+
5+
__all__ = ["ConversationSharingPolicy"]
6+
7+
ConversationSharingPolicy: TypeAlias = Literal[
8+
"CONVERSATION_SHARING_POLICY_UNSPECIFIED",
9+
"CONVERSATION_SHARING_POLICY_DISABLED",
10+
"CONVERSATION_SHARING_POLICY_ORGANIZATION",
11+
]

src/gitpod/types/organizations/policy_update_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from ..._types import SequenceNotStr
99
from ..._utils import PropertyInfo
1010
from .veto_exec_policy_param import VetoExecPolicyParam
11+
from .conversation_sharing_policy import ConversationSharingPolicy
1112

1213
__all__ = [
1314
"PolicyUpdateParams",
@@ -142,6 +143,11 @@ class AgentPolicy(TypedDict, total=False):
142143
execute
143144
"""
144145

146+
conversation_sharing_policy: Annotated[
147+
Optional[ConversationSharingPolicy], PropertyInfo(alias="conversationSharingPolicy")
148+
]
149+
"""conversation_sharing_policy controls whether agent conversations can be shared"""
150+
145151
mcp_disabled: Annotated[Optional[bool], PropertyInfo(alias="mcpDisabled")]
146152
"""
147153
mcp_disabled controls whether MCP (Model Context Protocol) is disabled for

src/gitpod/types/shared/resource_role.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"RESOURCE_ROLE_AGENT_EXECUTION_ADMIN",
4949
"RESOURCE_ROLE_AGENT_EXECUTION_RUNNER",
5050
"RESOURCE_ROLE_AGENT_EXECUTION_OUTPUTS_REPORTER",
51-
"RESOURCE_ROLE_AGENT_EXECUTION_VIEWER",
5251
"RESOURCE_ROLE_AGENT_ADMIN",
5352
"RESOURCE_ROLE_AGENT_VIEWER",
5453
"RESOURCE_ROLE_AGENT_EXECUTOR",

src/gitpod/types/shared_params/resource_role.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"RESOURCE_ROLE_AGENT_EXECUTION_ADMIN",
5151
"RESOURCE_ROLE_AGENT_EXECUTION_RUNNER",
5252
"RESOURCE_ROLE_AGENT_EXECUTION_OUTPUTS_REPORTER",
53-
"RESOURCE_ROLE_AGENT_EXECUTION_VIEWER",
5453
"RESOURCE_ROLE_AGENT_ADMIN",
5554
"RESOURCE_ROLE_AGENT_VIEWER",
5655
"RESOURCE_ROLE_AGENT_EXECUTOR",

tests/api_resources/organizations/test_policies.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def test_method_update_with_all_params(self, client: Gitpod) -> None:
6868
organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047",
6969
agent_policy={
7070
"command_deny_list": ["string"],
71+
"conversation_sharing_policy": "CONVERSATION_SHARING_POLICY_UNSPECIFIED",
7172
"mcp_disabled": True,
7273
"scm_tools_allowed_group_id": "scmToolsAllowedGroupId",
7374
"scm_tools_disabled": True,
@@ -185,6 +186,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncGitpod) ->
185186
organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047",
186187
agent_policy={
187188
"command_deny_list": ["string"],
189+
"conversation_sharing_policy": "CONVERSATION_SHARING_POLICY_UNSPECIFIED",
188190
"mcp_disabled": True,
189191
"scm_tools_allowed_group_id": "scmToolsAllowedGroupId",
190192
"scm_tools_disabled": True,

0 commit comments

Comments
 (0)