Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add reviewed plugin discovery and SHA-pinned market installs
  • Loading branch information
SivanCola committed Nov 12, 2026
commit 81f37d59376ee7d6ac2d597d8839ba2f051dbbe6
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions cmd/deepzora/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
7 changes: 7 additions & 0 deletions desktop/frontend/bench/settings-pages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
49 changes: 43 additions & 6 deletions desktop/frontend/src/components/CapabilitiesPanel.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -1622,6 +1623,7 @@ type PluginRuntimePlan = {
};

type PluginInstallPlanAction = {
changes?: string[];
action?: string;
kind?: string;
name?: string;
Expand All @@ -1641,6 +1643,8 @@ type PluginInstallPlanAction = {
};

type PluginInstallPlanView = {
planId?: string;
activationWarning?: string;
raw: string;
ok?: boolean;
status?: string;
Expand All @@ -1656,6 +1660,7 @@ type PluginInstallMode = "local" | "git";
// 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);
Expand Down Expand Up @@ -1717,6 +1722,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,
Expand All @@ -1743,7 +1762,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");
Expand Down Expand Up @@ -1787,10 +1806,12 @@ export function PluginsSettingsPage() {
{loadError && <SettingsFeedback kind="error" onRetry={() => { setLoadError(null); void reload(); }}><ErrorMessage error={loadError} /></SettingsFeedback>}
{notice && !err && <SettingsFeedback kind="success">{notice}</SettingsFeedback>}
<div className="settings-toolbar">
<div><strong>{t("caps.installedPlugins")}</strong>{plugins && plugins.length > 0 && <div className="drawer__summary">{summary}</div>}</div>
<div className="cap-tabs"><button className={"cap-tab"+(!discover?" cap-tab--active":"")} aria-pressed={!discover} onClick={()=>setDiscover(false)}>{t("caps.installedPlugins")}</button>
<button className={"cap-tab"+(discover?" cap-tab--active":"")} aria-pressed={discover} onClick={()=>requestLeave(()=>{setInstallOpen(false);setDiscover(true)})}>{t("market.discover")}</button>{!discover && summary && <span className="drawer__summary">{summary}</span>}</div>
<div className="settings-toolbar__actions"><button className="btn btn--small" disabled={actionBusy} onClick={() => void reload()}>{t("caps.pluginRefresh")}</button>
<button className="btn btn--primary" aria-expanded={installOpen} aria-controls="settings-plugin-install" disabled={actionBusy} onClick={() => installOpen ? requestLeave(() => setInstallOpen(false)) : setInstallOpen(true)}>{installOpen ? t("common.cancel") : t("caps.pluginInstall")}</button></div>
</div>
{discover && <PluginMarket installed={plugins||[]} choose={chooseMarket}/>}
<div id="settings-plugin-install" hidden={!installOpen}>
<div className="cap-plugin-installer">
<div className="cap-plugin-installer__head">
Expand Down Expand Up @@ -1875,15 +1896,15 @@ export function PluginsSettingsPage() {
<button className="btn btn--small" type="button" disabled={!canPlan} onClick={previewInstall}>
{t("caps.pluginPreview")}
</button>
<button className="btn btn--primary btn--small" type="button" disabled={!canPlan} onClick={install}>
<button className="btn btn--primary btn--small" type="button" disabled={!canPlan || (isMarket && (!plan?.planId || !plan.ok))} onClick={install}>
{t("caps.pluginInstall")}
</button>
</div>
</div>
</div>
{plan && <PluginPlanPreview plan={plan} />}
</div>
<div className="cap-server-section cap-plugin-section">
<div className="cap-server-section cap-plugin-section" hidden={discover}>

{!plugins ? (
!loadError && <SettingsFeedback kind="loading" />
Expand All @@ -1903,7 +1924,7 @@ export function PluginsSettingsPage() {
expanded={expanded.has(plugin.name)}
onToggleDetails={() => togglePlugin(plugin.name)}
onToggleEnabled={(enabled) => void run(() => app.SetPluginEnabled(plugin.name, enabled))}
onUpdate={() => void run(() => app.UpdatePlugin(plugin.name))}
onUpdate={() => plugin.catalogId ? chooseMarket(plugin.catalogId, plugin) : void run(() => app.UpdatePlugin(plugin.name))}
onDoctor={() => runDoctor(plugin.name)}
onRemove={() => void run(() => app.RemovePlugin(plugin.name))}
/>
Expand Down Expand Up @@ -1940,7 +1961,8 @@ function PluginPlanPreview({ plan }: { plan: PluginInstallPlanView }) {
{asArray(action.skippedCapabilities).map((issue, issueIndex) => <span className="cap-plugin-plan__warning" key={`${issue.capability}-${issue.path || ""}-${issueIndex}`}>{issue.capability}: {issue.reason}</span>)}
{action.message && <span className="cap-plugin-action__source">{action.message}</span>}
{action.error && <span className="cap-plugin-plan__warning"><ErrorMessage error={action.error} /></span>}
{action.runtime ? <PluginRuntimeTrustBlock runtime={action.runtime} /> : null}
{action.changes?.map((change,i)=><span key={i} className="cap-plugin-plan__warning">{change}</span>)}
{action.runtime ? <PluginRuntimeTrustBlock runtime={action.runtime} /> : null}
</div>
))}
</div>
Expand Down Expand Up @@ -2332,12 +2354,15 @@ function parsePluginInstallPlan(raw: string): PluginInstallPlanView {
mappedCapabilities: (Array.isArray(item.mappedCapabilities) ? item.mappedCapabilities : []).filter((value): value is string => typeof value === "string"),
skippedCapabilities: (Array.isArray(item.skippedCapabilities) ? item.skippedCapabilities : []) as PluginCompatibilityIssue[],
runtime: parsePluginRuntimePlan(item.runtime),
changes: marketPlanChanges(item),
agentCount: numericValue(item.agentCount), skillCount: numericValue(item.skillCount), commandCount: numericValue(item.commandCount), hookCount: numericValue(item.hookCount), toolCount: numericValue(item.toolCount),
}];
});
return {
raw,
ok: typeof value.ok === "boolean" ? value.ok : undefined,
planId: stringValue(value.planId),
activationWarning: stringValue(value.activationWarning),
status: stringValue(value.status),
name: stringValue(value.name),
actions,
Expand All @@ -2349,6 +2374,17 @@ function parsePluginInstallPlan(raw: string): PluginInstallPlanView {
}
}

function marketPlanChanges(item:Record<string,unknown>):string[] {
const c=item.catalog as {execution?:string[];previousExecution?:string[];requirements?:{namespace:string;kind:string;id:string}[];previous?:{version:string};previousCapabilities?:Record<string,number|boolean>;capabilities?:Record<string,number|boolean>}|undefined;
if(!c)return [];
const lines=(Array.isArray(item.riskReasons)?item.riskReasons:[]).filter((x):x is string=>typeof x==="string");
for(const s of c.execution||[])lines.push((c.previous && !c.previousExecution?.includes(s)?"+ ":"")+s);
for(const s of c.previousExecution||[])if(!c.execution?.includes(s))lines.push("− "+s);
for(const r of c.requirements||[])lines.push("requires: "+[r.namespace,r.kind,r.id].join("/"));
if(c.previous){lines.unshift(c.previous.version+" → "+item.version);
for(const [k,v] of Object.entries(c.capabilities||{}))if(c.previousCapabilities?.[k]!==v)lines.push(k+": "+(c.previousCapabilities?.[k]??0)+" → "+v)}
return lines;
}
function numericValue(value: unknown): number | undefined {
return typeof value === "number" && Number.isFinite(value) ? value : undefined;
}
Expand Down Expand Up @@ -2382,6 +2418,7 @@ function pluginPlanActionLabel(action: PluginInstallPlanAction, t: ReturnType<ty
}

function pluginPlanNotice(plan: PluginInstallPlanView, t: ReturnType<typeof useT>): string {
if(plan.activationWarning)return plan.activationWarning;
if (plan.error) return plan.error;
if (plan.status === "done" || plan.status === "applied" || plan.status === "complete") return t("caps.pluginPlanInstalled");
return plan.status ? t("caps.pluginPlanStatus", { status: plan.status }) : t("caps.pluginPlanComplete");
Expand Down
177 changes: 177 additions & 0 deletions desktop/frontend/src/components/PluginMarket.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
import { useEffect, useState } from "react";
import { app, openExternal } from "../lib/bridge";
import { useI18n } from "../lib/i18n";
import type { PluginView } from "../lib/types";
import { SettingsFeedback } from "./SettingsExperience";

type Entry = {
id: string;
spec: string;
name: string;
version: string;
commit: string;
repo: string;
path?: string;
summary: Record<string, string>;
channel: string;
upstream?: { spec: string; version: string };
capabilities?: string[];
};
function sameSource(p: PluginView, e: Entry) {
const match =
/^(?:https?:\/\/|git:)github\.com\/([^/]+\/[^/]+?)(?:\.git)?(?:\/tree\/[^/]+(?:\/(.+))?)?\/?$/i.exec(
p.source || "",
);
return (
!!match &&
match[1].toLowerCase() === e.repo.toLowerCase() &&
(match[2] || "") === (e.path || "")
);
}
export function PluginMarket({
installed,
choose,
}: {
installed: PluginView[];
choose: (spec: string, p?: PluginView) => void;
}) {
const { t, locale } = useI18n();
const [topics, setTopics] = useState(false);
const [q, setQ] = useState("");
const [retry, setRetry] = useState(0);
const [data, setData] = useState<{
entries: Entry[];
warning?: string;
} | null>(null);
const [error, setError] = useState("");
useEffect(() => {
let live = true;
setData(null);
setError("");
app
.SearchPluginCatalog("", topics)
.then((raw) => {
if (live) setData(JSON.parse(raw));
})
.catch((e) => {
if (live) setError(String(e));
});
return () => {
live = false;
};
}, [topics, retry]);
const rows = (data?.entries || []).filter((e) =>
[
e.id,
e.name,
e.repo,
...Object.values(e.summary),
...(e.capabilities || []),
]
.join(" ")
.toLowerCase()
.includes(q.trim().toLowerCase()),
);
return (
<section aria-label={t("market.discover")}>
<div className="settings-toolbar">
<input
className="mem-input"
aria-label={t("market.search")}
placeholder={t("market.search")}
value={q}
onChange={(ev) => setQ(ev.target.value)}
/>
<label>
<input
type="checkbox"
checked={topics}
onChange={(ev) => setTopics(ev.target.checked)}
/>
{t("market.include")}
</label>
<button
className="btn btn--small"
type="button"
onClick={() =>
openExternal("https://github.com/SivanCola/deepzora-plugins#readme")
}
>
{t("market.submit")}
</button>
</div>
{error ? (
<SettingsFeedback kind="error" onRetry={() => setRetry((i) => i + 1)}>
{error}
</SettingsFeedback>
) : !data ? (
<SettingsFeedback kind="loading" />
) : null}
{data?.warning && <p role="status">{data.warning}</p>}
{data && !rows.length && <p className="mem-empty">{t("market.empty")}</p>}
{rows.map((e) => {
const p = installed.find((x) => sameSource(x, e));
const current = p?.commit === e.commit;
return (
<article key={e.spec} className="cap-plugin-installer">
<div className="settings-toolbar">
<strong>{e.name}</strong>
<span className="cap-source-badge">
{t(
e.channel === "community"
? "market.reviewed"
: e.channel === "unreviewed"
? "market.unreviewed"
: "market.custom",
)}
</span>
</div>
<p>{e.summary[locale] || e.summary.en}</p>
<button
type="button"
className="btn btn--small"
onClick={() =>
openExternal(
"https://github.com/" +
e.repo +
"/tree/" +
e.commit +
(e.path ? "/" + e.path : ""),
)
}
>
{t("market.source")}
</button>
<div className="drawer__summary">
{e.repo} · v{e.version} · {e.commit.slice(0, 10)}
{e.capabilities?.length ? " · " + e.capabilities.join(", ") : ""}
</div>
<button
className="btn btn--small"
type="button"
disabled={current}
onClick={() => choose(e.spec, p)}
>
{t(
current
? "caps.installedPlugins"
: p
? "market.reviewUpdate"
: "caps.pluginPreview",
)}
</button>
{e.upstream && (
<button
type="button"
className="btn btn--small"
onClick={() => choose(e.upstream!.spec)}
>
{t("market.unreviewed")} · v{e.upstream.version}
</button>
)}
</article>
);
})}
</section>
);
}
Loading
Loading