Skip to content

Commit b0d5628

Browse files
feat: Limit free organizations to three vaults
Stainless-Generated-From: ba7e1af409ddd0c708f01417cc714eb89c3739f0
1 parent 1c3b388 commit b0d5628

4 files changed

Lines changed: 23 additions & 4 deletions

File tree

src/kernel/resources/organization/limits.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def retrieve(
5555
extra_body: Body | None = None,
5656
timeout: float | httpx.Timeout | None | NotGiven = not_given,
5757
) -> OrgLimits:
58-
"""Get the organization's effective limits and managed auth usage."""
58+
"""Get the organization's effective limits and managed auth and vault usage."""
5959
return self._get(
6060
"/org/limits",
6161
options=make_request_options(
@@ -138,7 +138,7 @@ async def retrieve(
138138
extra_body: Body | None = None,
139139
timeout: float | httpx.Timeout | None | NotGiven = not_given,
140140
) -> OrgLimits:
141-
"""Get the organization's effective limits and managed auth usage."""
141+
"""Get the organization's effective limits and managed auth and vault usage."""
142142
return await self._get(
143143
"/org/limits",
144144
options=make_request_options(

src/kernel/resources/vaults/vaults.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ def upsert(
176176
timeout: float | httpx.Timeout | None | NotGiven = not_given,
177177
) -> Vault:
178178
"""
179-
Create or retrieve a vault by immutable name
179+
Free organizations can store up to 3 non-deleted vaults across all projects.
180+
Paid plans and active trials have no vault cap. Retrieving an existing vault by
181+
name succeeds even at the limit.
180182
181183
Args:
182184
name: Immutable name used to create or retrieve the vault.
@@ -345,7 +347,9 @@ async def upsert(
345347
timeout: float | httpx.Timeout | None | NotGiven = not_given,
346348
) -> Vault:
347349
"""
348-
Create or retrieve a vault by immutable name
350+
Free organizations can store up to 3 non-deleted vaults across all projects.
351+
Paid plans and active trials have no vault cap. Retrieving an existing vault by
352+
name succeeds even at the limit.
349353
350354
Args:
351355
name: Immutable name used to create or retrieve the vault.

src/kernel/types/organization/org_entitlements.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ class Limits(BaseModel):
172172
max_concurrent_invocations: int
173173
"""Effective organization-wide concurrent app invocation ceiling."""
174174

175+
max_vaults: Optional[int] = None
176+
"""Maximum non-deleted vaults allowed org-wide across all projects.
177+
178+
Null means unlimited. The vaults feature flag still controls access.
179+
"""
180+
175181

176182
class Plan(BaseModel):
177183
id: Literal["FREE", "HOBBYIST", "START_UP", "ENTERPRISE"]

src/kernel/types/organization/org_limits.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,22 @@ class OrgLimits(BaseModel):
2222
projects.
2323
"""
2424

25+
max_vaults: Optional[int] = None
26+
"""Maximum non-deleted vaults allowed org-wide across all projects.
27+
28+
Null means unlimited.
29+
"""
30+
2531
min_health_check_interval_seconds: int
2632
"""
2733
Smallest health_check_interval the organization's plan accepts on a managed auth
2834
connection. Requests below this are rejected with 400. Existing connections
2935
stored below the floor are grandfathered until edited.
3036
"""
3137

38+
vaults_used: int
39+
"""Current non-deleted vault count across all projects in the organization."""
40+
3241
default_project_max_concurrent_sessions: Optional[int] = None
3342
"""
3443
Default maximum concurrent browsers applied to every project that has no

0 commit comments

Comments
 (0)