fix(claude-code): satisfy marketplace CI checks

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Devin AI 2026-09-16 16:10:51 +00:00
parent 7a2e475d51
commit 7415cd3ff3
2 changed files with 24 additions and 7 deletions

View file

@ -21,7 +21,7 @@ import json
import re
from collections.abc import Mapping, Sequence
from datetime import datetime, timezone
from typing import Annotated, Final, Protocol, TypedDict, cast
from typing import Annotated, Final, Protocol, TypedDict
from urllib.parse import urlsplit
from fastapi import APIRouter, Depends, HTTPException, Request
@ -73,6 +73,11 @@ class _MarketplaceEntry(TypedDict, total=False):
installationPreference: str
def _get_manifest_string(manifest: Mapping[str, object], key: str) -> str | None:
value: Final = manifest.get(key)
return value if isinstance(value, str) else None
async def _get_prisma_client() -> object:
"""Get the prisma client from proxy_server."""
from litellm.proxy.proxy_server import prisma_client
@ -154,8 +159,9 @@ async def get_marketplace(request: Request, key: str | None = None):
entry["keywords"] = manifest["keywords"]
if "category" in manifest:
entry["category"] = manifest["category"]
if "installation_preference" in manifest:
entry["installationPreference"] = cast(str, manifest["installation_preference"])
installation_preference: Final[str | None] = _get_manifest_string(manifest, "installation_preference")
if installation_preference is not None:
entry["installationPreference"] = installation_preference
plugin_list.append(entry)
@ -439,10 +445,7 @@ async def list_plugins(
category=manifest.get("category"),
domain=manifest.get("domain"),
namespace=manifest.get("namespace"),
installation_preference=cast(
str | None,
cast(Mapping[str, object], manifest).get("installation_preference"),
),
installation_preference=_get_manifest_string(manifest, "installation_preference"),
enabled=p.enabled,
created_at=p.created_at.isoformat() if p.created_at else None,
updated_at=p.updated_at.isoformat() if p.updated_at else None,

View file

@ -2250,6 +2250,7 @@ export interface paths {
* - homepage: Plugin homepage URL (optional)
* - keywords: Search keywords (optional)
* - category: Plugin category (optional)
* - installation_preference: Marketplace installationPreference, e.g. 'auto_install' (optional)
*
* Returns:
* Registration status (action is always "created") and plugin information.
@ -2316,6 +2317,7 @@ export interface paths {
* - homepage: Plugin homepage URL (optional)
* - keywords: Search keywords (optional)
* - category: Plugin category (optional)
* - installation_preference: Marketplace installationPreference, e.g. 'auto_install' (optional)
*
* Returns:
* Update status (action is always "updated") and plugin information.
@ -34381,6 +34383,8 @@ export interface components {
homepage?: string | null;
/** Id */
id: string;
/** Installation Preference */
installation_preference?: string | null;
/** Keywords */
keywords?: string[] | null;
/** Name */
@ -35699,6 +35703,11 @@ export interface components {
* @description Plugin homepage URL
*/
homepage?: string | null;
/**
* Installation Preference
* @description Claude Code marketplace installationPreference for this plugin (e.g. 'auto_install')
*/
installation_preference?: string | null;
/**
* Keywords
* @description Search keywords
@ -39079,6 +39088,11 @@ export interface components {
* @description Plugin homepage URL
*/
homepage?: string | null;
/**
* Installation Preference
* @description Claude Code marketplace installationPreference for this plugin (e.g. 'auto_install')
*/
installation_preference?: string | null;
/**
* Keywords
* @description Search keywords