mirror of
https://github.com/openai/codex.git
synced 2026-05-01 01:47:18 +00:00
feat: support remote_sync for plugin install/uninstall. (#14878)
- Added forceRemoteSync to plugin/install and plugin/uninstall. - With forceRemoteSync=true, we update the remote plugin status first, then apply the local change only if the backend call succeeds. - Kept plugin/list(forceRemoteSync=true) as the main recon path, and for now it treats remote enabled=false as uninstall. We will eventually migrate to plugin/installed for more precise state handling.
This commit is contained in:
@@ -339,6 +339,7 @@ class CodexErrorInfo(
|
||||
class CollabAgentStatus(Enum):
|
||||
pending_init = "pendingInit"
|
||||
running = "running"
|
||||
interrupted = "interrupted"
|
||||
completed = "completed"
|
||||
errored = "errored"
|
||||
shutdown = "shutdown"
|
||||
@@ -746,6 +747,7 @@ class DynamicToolSpec(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
)
|
||||
defer_loading: Annotated[bool | None, Field(alias="deferLoading")] = None
|
||||
description: str
|
||||
input_schema: Annotated[Any, Field(alias="inputSchema")]
|
||||
name: str
|
||||
@@ -1631,6 +1633,13 @@ 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")]
|
||||
|
||||
@@ -1657,7 +1666,13 @@ class PluginInterface(BaseModel):
|
||||
capabilities: list[str]
|
||||
category: str | None = None
|
||||
composer_icon: Annotated[AbsolutePathBuf | None, Field(alias="composerIcon")] = None
|
||||
default_prompt: Annotated[str | None, Field(alias="defaultPrompt")] = None
|
||||
default_prompt: Annotated[
|
||||
list[str] | None,
|
||||
Field(
|
||||
alias="defaultPrompt",
|
||||
description="Starter prompts for the plugin. Capped at 3 entries with a maximum of 128 characters per entry.",
|
||||
),
|
||||
] = None
|
||||
developer_name: Annotated[str | None, Field(alias="developerName")] = None
|
||||
display_name: Annotated[str | None, Field(alias="displayName")] = None
|
||||
logo: AbsolutePathBuf | None = None
|
||||
@@ -1729,6 +1744,13 @@ 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")]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user