diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2e24b7e8..35d005259 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -159,6 +159,11 @@ jobs: - name: Build and test root module if: env.RUN_STEPS == 'true' run: go test -timeout=15m ./... + - name: Accept plugin market installs against a moving Git reference + if: env.RUN_STEPS == 'true' + run: | + go build -o "$RUNNER_TEMP/deepzora-market" ./cmd/deepzora + python3 scripts/plugin-market-e2e.py "$RUNNER_TEMP/deepzora-market" - if: always() && env.RUN_STEPS == 'true' uses: ./.github/actions/go-build-cache with: @@ -204,6 +209,13 @@ jobs: # The runner fails unless every discovered package reports pass or skip. - name: Build and test every root package run: node scripts/ci-windows-root.mjs "$RUNNER_TEMP/windows-root" + - name: Verify Windows plugin market installation and replacement + shell: pwsh + run: | + $market = Join-Path $env:RUNNER_TEMP 'deepzora-market.exe' + go build -o $market ./cmd/deepzora + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + python scripts/plugin-market-e2e.py $market - name: Upload root package evidence if: always() uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 diff --git a/cmd/deepzora/main.go b/cmd/deepzora/main.go index 75911a706..bbbde5cfb 100644 --- a/cmd/deepzora/main.go +++ b/cmd/deepzora/main.go @@ -9,6 +9,7 @@ import ( "deepzora/internal/config" "deepzora/internal/crashreport" "deepzora/internal/plugin" + "deepzora/internal/plugincatalog" "deepzora/internal/skill/skillwatch" // Blank imports wire compile-time built-ins into their registries. @@ -38,6 +39,7 @@ var runCLI = func(args []string, buildVersion string) int { } func main() { + plugincatalog.HostVersion = version // Internal watcher-helper entry: the host-shared skill watch service // re-enters this executable so Windows directory watching never runs // in-process. Dispatch before any application initialization. diff --git a/desktop/frontend/bench/settings-pages.mjs b/desktop/frontend/bench/settings-pages.mjs index 449634525..8113c9350 100644 --- a/desktop/frontend/bench/settings-pages.mjs +++ b/desktop/frontend/bench/settings-pages.mjs @@ -207,6 +207,13 @@ try { await verify(page, "subagent-edit", true); await go("Plugins"); + await page.getByRole("button", { name: "Discover", exact: true }).click(); + await page.getByText("Review Checklist", {exact:true}).waitFor(); + await verify(page,"plugin-discover",true); + await page.locator("article").filter({hasText:"Review Checklist"}).getByRole("button",{name:/preview/i}).click(); + await page.locator(".cap-plugin-plan").waitFor(); + await page.locator(".cap-plugin-installer__actions button.btn--primary").click(); + await page.locator("#settings-plugin-install").waitFor({state:"hidden"}); await page.getByRole("button", { name: "Install plugin", exact: true }).click(); await page.locator(".cap-plugin-installer").waitFor(); await verify(page, "plugin-local", true); diff --git a/desktop/frontend/src/components/CapabilitiesPanel.tsx b/desktop/frontend/src/components/CapabilitiesPanel.tsx index bb471ee37..bc3916aa9 100644 --- a/desktop/frontend/src/components/CapabilitiesPanel.tsx +++ b/desktop/frontend/src/components/CapabilitiesPanel.tsx @@ -1,4 +1,5 @@ import { ErrorMessage } from "./ErrorMessage"; +import { PluginMarket } from "./PluginMarket"; import { SettingsSubpageHeader, SettingsFeedback, useSettingsDraft, useSettingsExperience } from "./SettingsExperience"; import { SettingsOptions } from "./SettingsOptions"; import { SettingsSelect } from "./SettingsSelect"; @@ -9,10 +10,11 @@ import { app } from "../lib/bridge"; import { activeWorkBusyNoticeText, installMCPServer } from "../lib/capabilityMutations"; import { useT } from "../lib/i18n"; import { presentError } from "../lib/errorPresentation"; +import { parsePluginInstallPlan, type PluginInstallPlanAction, type PluginInstallPlanView, type PluginRuntimePlan } from "../lib/pluginInstallPlan"; import { mcpServerLifecycleActions, mcpServerRetryableFromAvailableList } from "../lib/mcpServerLifecycle"; import { mcpSessionStateLabel, mcpSettingsSearchText } from "../lib/mcpSessionStatus"; import { canUseNativeMCPOAuth } from "../lib/mcpOAuthEligibility"; -import type { CapabilitiesView, MCPMarketplaceEntry, MCPMarketplaceView, MCPServerInput, PluginAgentView, PluginCommandView, PluginCompatibilityIssue, PluginHookView, PluginInstallOptions, PluginMCPServerView, PluginSkillView, PluginView, ServerView, SkillRootSkillView, SkillRootView, SkillsSettingsView, SkillView, TabMeta } from "../lib/types"; +import type { CapabilitiesView, MCPMarketplaceEntry, MCPMarketplaceView, MCPServerInput, PluginAgentView, PluginCommandView, PluginHookView, PluginInstallOptions, PluginMCPServerView, PluginSkillView, PluginView, ServerView, SkillRootSkillView, SkillRootView, SkillsSettingsView, SkillView, TabMeta } from "../lib/types"; import { InlineConfirmButton } from "./InlineConfirmButton"; import { ResizableDrawer } from "./ResizableDrawer"; import { Tooltip } from "./Tooltip"; @@ -1612,50 +1614,13 @@ export function parseMCPQuickDefinition(raw: string): MCPServerInput { return { name: quickMCPName(definition), transport: "stdio", command: definition, args: [], url: "", env: null, headers: null }; } -type PluginRuntimePlan = { - command?: string; - args?: string[]; - intercepts?: string[]; - replaces?: string[]; - capabilities?: string[]; - fullTrust?: boolean; -}; - -type PluginInstallPlanAction = { - action?: string; - kind?: string; - name?: string; - source?: string; - status?: string; - message?: string; - error?: string; - compatibility?: string; - mappedCapabilities?: string[]; - skippedCapabilities?: PluginCompatibilityIssue[]; - runtime?: PluginRuntimePlan; - agentCount?: number; - skillCount?: number; - commandCount?: number; - hookCount?: number; - toolCount?: number; -}; - -type PluginInstallPlanView = { - raw: string; - ok?: boolean; - status?: string; - name?: string; - actions: PluginInstallPlanAction[]; - warnings: string[]; - error?: string; -}; - type PluginInstallMode = "local" | "git"; // PluginsSettingsPage is the desktop plugin package manager embedded inside // Settings. It mirrors the MCP/Skills density: install planning on top, package // rows below, and diagnostics/details only when a row is expanded. export function PluginsSettingsPage() { + const [discover, setDiscover] = useState(false); const t = useT(); const { requestLeave, announce } = useSettingsExperience(); const [installOpen, setInstallOpen] = useState(false); @@ -1717,6 +1682,20 @@ export function PluginsSettingsPage() { }; const sourceValue = (installMode === "local" ? localSource : gitSource).trim(); + const isMarket = /^(catalog|topic):/.test(sourceValue); + const chooseMarket = (spec: string, installed?: PluginView) => { + setDiscover(false); + setInstallMode("git"); + setGitSource(spec); + setName(installed?.name || ""); + setReplace(Boolean(installed)); + setPlan(null); + setInstallOpen(true); + void run(async () => { + const raw = await app.PlanPluginInstall(spec, { dryRun: true, replace: Boolean(installed), name: installed?.name }); + setPlan(parsePluginInstallPlan(raw)); + }, false); + }; const installOptions = (): PluginInstallOptions => ({ dryRun: false, link: installMode === "local" ? link : false, @@ -1743,7 +1722,7 @@ export function PluginsSettingsPage() { const install = () => { if (!sourceValue) return; void run(async () => { - const raw = await app.InstallPlugin(sourceValue, installOptions()); + const raw = await app.InstallPlugin(sourceValue, { ...installOptions(), planId: plan?.planId }); setPlan(parsePluginInstallPlan(raw)); setLocalSource(""); setGitSource(""); setName(""); setInstallOpen(false); announce("success"); @@ -1787,10 +1766,15 @@ export function PluginsSettingsPage() { {loadError && { setLoadError(null); void reload(); }}>} {notice && !err && {notice}}
-
{t("caps.installedPlugins")}{plugins && plugins.length > 0 &&
{summary}
}
+
+ + + {!discover && summary && {summary}} +
+ {discover && }