mirror of
https://github.com/openai/codex.git
synced 2026-05-01 18:06:47 +00:00
fix: harden plugin feature gating (#15020)
1. Use requirement-resolved config.features as the plugin gate. 2. Guard plugin/list, plugin/read, and related flows behind that gate. 3. Skip bad marketplace.json files instead of failing the whole list. 4. Simplify plugin state and caching.
This commit is contained in:
@@ -3131,6 +3131,7 @@ class ThreadSourceKind(Enum):
|
||||
vscode = "vscode"
|
||||
exec = "exec"
|
||||
app_server = "appServer"
|
||||
custom = "custom"
|
||||
sub_agent = "subAgent"
|
||||
sub_agent_review = "subAgentReview"
|
||||
sub_agent_compact = "subAgentCompact"
|
||||
@@ -5810,11 +5811,19 @@ class SubAgentSessionSource(BaseModel):
|
||||
sub_agent: Annotated[SubAgentSource, Field(alias="subAgent")]
|
||||
|
||||
|
||||
class SessionSource(RootModel[SessionSourceValue | SubAgentSessionSource]):
|
||||
class CustomSessionSource(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
extra="forbid",
|
||||
populate_by_name=True,
|
||||
)
|
||||
custom: str
|
||||
|
||||
|
||||
class SessionSource(RootModel[SessionSourceValue | CustomSessionSource | SubAgentSessionSource]):
|
||||
model_config = ConfigDict(
|
||||
populate_by_name=True,
|
||||
)
|
||||
root: SessionSourceValue | SubAgentSessionSource
|
||||
root: SessionSourceValue | CustomSessionSource | SubAgentSessionSource
|
||||
|
||||
|
||||
class Thread(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user