Maintain Python SDK artifacts for the pinned runtime

This commit is contained in:
Shaqayeq
2026-03-19 17:00:43 -07:00
parent 6b8175c734
commit 3d853de33f
4 changed files with 269 additions and 39 deletions

View File

@@ -52,6 +52,23 @@ from ._run import (
_collect_run_result,
)
__all__ = [
"AsyncCodex",
"AsyncThread",
"AsyncTurnHandle",
"Codex",
"ImageInput",
"Input",
"InputItem",
"LocalImageInput",
"MentionInput",
"RunResult",
"SkillInput",
"TextInput",
"Thread",
"TurnHandle",
]
def _split_user_agent(user_agent: str) -> tuple[str | None, str | None]:
raw = user_agent.strip()

View File

@@ -1133,6 +1133,13 @@ class GuardianRiskLevel(Enum):
high = "high"
class HazelnutScope(Enum):
example = "example"
workspace_shared = "workspace-shared"
all_shared = "all-shared"
personal = "personal"
class HookEventName(Enum):
session_start = "sessionStart"
stop = "stop"
@@ -1378,13 +1385,6 @@ class LogoutAccountResponse(BaseModel):
)
class MarketplaceInterface(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
display_name: Annotated[str | None, Field(alias="displayName")] = None
class McpAuthStatus(Enum):
unsupported = "unsupported"
not_logged_in = "notLoggedIn"
@@ -1633,13 +1633,6 @@ class PluginInstallParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
force_remote_sync: Annotated[
bool | None,
Field(
alias="forceRemoteSync",
description="When true, apply the remote plugin change before the local install flow.",
),
] = None
marketplace_path: Annotated[AbsolutePathBuf, Field(alias="marketplacePath")]
plugin_name: Annotated[str, Field(alias="pluginName")]
@@ -1744,13 +1737,6 @@ class PluginUninstallParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
force_remote_sync: Annotated[
bool | None,
Field(
alias="forceRemoteSync",
description="When true, apply the remote plugin change before the local uninstall flow.",
),
] = None
plugin_id: Annotated[str, Field(alias="pluginId")]
@@ -1761,6 +1747,13 @@ class PluginUninstallResponse(BaseModel):
)
class ProductSurface(Enum):
chatgpt = "chatgpt"
codex = "codex"
api = "api"
atlas = "atlas"
class RateLimitWindow(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -1913,6 +1906,15 @@ class ReasoningTextDeltaNotification(BaseModel):
turn_id: Annotated[str, Field(alias="turnId")]
class RemoteSkillSummary(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
description: str
id: str
name: str
class RequestId(RootModel[str | int]):
model_config = ConfigDict(
populate_by_name=True,
@@ -1972,6 +1974,7 @@ class ReasoningResponseItem(BaseModel):
)
content: list[ReasoningItemContent] | None = None
encrypted_content: str | None = None
id: str
summary: list[ReasoningItemReasoningSummary]
type: Annotated[Literal["reasoning"], Field(title="ReasoningResponseItemType")]
@@ -2596,6 +2599,41 @@ class SkillsListParams(BaseModel):
] = None
class SkillsRemoteReadParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
enabled: bool | None = False
hazelnut_scope: Annotated[HazelnutScope | None, Field(alias="hazelnutScope")] = (
"example"
)
product_surface: Annotated[ProductSurface | None, Field(alias="productSurface")] = (
"codex"
)
class SkillsRemoteReadResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
data: list[RemoteSkillSummary]
class SkillsRemoteWriteParams(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
hazelnut_id: Annotated[str, Field(alias="hazelnutId")]
class SkillsRemoteWriteResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
id: str
path: str
class SubAgentSourceValue(Enum):
review = "review"
compact = "compact"
@@ -3012,7 +3050,6 @@ class ThreadRealtimeAudioChunk(BaseModel):
populate_by_name=True,
)
data: str
item_id: Annotated[str | None, Field(alias="itemId")] = None
num_channels: Annotated[int, Field(alias="numChannels", ge=0)]
sample_rate: Annotated[int, Field(alias="sampleRate", ge=0)]
samples_per_channel: Annotated[
@@ -3761,6 +3798,29 @@ class PluginReadRequest(BaseModel):
params: PluginReadParams
class SkillsRemoteListRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
id: RequestId
method: Annotated[
Literal["skills/remote/list"], Field(title="Skills/remote/listRequestMethod")
]
params: SkillsRemoteReadParams
class SkillsRemoteExportRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
id: RequestId
method: Annotated[
Literal["skills/remote/export"],
Field(title="Skills/remote/exportRequestMethod"),
]
params: SkillsRemoteWriteParams
class AppListRequest(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -4619,7 +4679,6 @@ class PluginMarketplaceEntry(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
interface: MarketplaceInterface | None = None
name: str
path: AbsolutePathBuf
plugins: list[PluginSummary]
@@ -5530,6 +5589,14 @@ class FunctionCallOutputBody(RootModel[str | list[FunctionCallOutputContentItem]
root: str | list[FunctionCallOutputContentItem]
class FunctionCallOutputPayload(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
)
body: FunctionCallOutputBody
success: bool | None = None
class GetAccountRateLimitsResponse(BaseModel):
model_config = ConfigDict(
populate_by_name=True,
@@ -5627,7 +5694,7 @@ class FunctionCallOutputResponseItem(BaseModel):
populate_by_name=True,
)
call_id: str
output: FunctionCallOutputBody
output: FunctionCallOutputPayload
type: Annotated[
Literal["function_call_output"],
Field(title="FunctionCallOutputResponseItemType"),
@@ -5639,7 +5706,7 @@ class CustomToolCallOutputResponseItem(BaseModel):
populate_by_name=True,
)
call_id: str
output: FunctionCallOutputBody
output: FunctionCallOutputPayload
type: Annotated[
Literal["custom_tool_call_output"],
Field(title="CustomToolCallOutputResponseItemType"),
@@ -6072,6 +6139,8 @@ class ClientRequest(
| SkillsListRequest
| PluginListRequest
| PluginReadRequest
| SkillsRemoteListRequest
| SkillsRemoteExportRequest
| AppListRequest
| FsReadFileRequest
| FsWriteFileRequest
@@ -6133,6 +6202,8 @@ class ClientRequest(
| SkillsListRequest
| PluginListRequest
| PluginReadRequest
| SkillsRemoteListRequest
| SkillsRemoteExportRequest
| AppListRequest
| FsReadFileRequest
| FsWriteFileRequest