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:
xl-openai
2026-03-16 21:37:27 -07:00
committed by GitHub
parent 49c2b66ece
commit 1d85fe79ed
17 changed files with 743 additions and 101 deletions

View File

@@ -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")]