@aglyn/plugins-marketplace 1.0.0-beta.152 → 1.0.0-beta.154

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/package.json +14 -14
  2. package/src/lib/components/listing-review-status.component.d.ts +1 -1
  3. package/src/lib/components/listing-review-status.component.js +1 -1
  4. package/src/lib/components/listing-review-status.component.js.map +1 -1
  5. package/src/lib/components/listing-verification-request.component.d.ts +1 -1
  6. package/src/lib/components/listing-verification-request.component.js +1 -1
  7. package/src/lib/components/listing-verification-request.component.js.map +1 -1
  8. package/src/lib/components/plugin-review-detail.component.js +1 -1
  9. package/src/lib/components/plugin-review-detail.component.js.map +1 -1
  10. package/src/lib/components/publish-plugin-form.component.js +1 -1
  11. package/src/lib/components/publish-plugin-form.component.js.map +1 -1
  12. package/src/lib/model/listing-verification.d.ts +95 -0
  13. package/src/lib/model/listing-verification.js +81 -0
  14. package/src/lib/model/listing-verification.js.map +1 -0
  15. package/src/lib/model/marketplace.d.ts +11 -7
  16. package/src/lib/model/marketplace.js +9 -5
  17. package/src/lib/model/marketplace.js.map +1 -1
  18. package/src/lib/model/publisher-attestation.d.ts +99 -0
  19. package/src/lib/model/publisher-attestation.js +158 -0
  20. package/src/lib/model/publisher-attestation.js.map +1 -0
  21. package/src/lib/server/admin-reviews.js +2 -2
  22. package/src/lib/server/admin-reviews.js.map +1 -1
  23. package/src/lib/server/artifact-inventory.d.ts +18 -0
  24. package/src/lib/server/artifact-inventory.js +171 -0
  25. package/src/lib/server/artifact-inventory.js.map +1 -0
  26. package/src/lib/server/listing-versions.js +1 -1
  27. package/src/lib/server/listing-versions.js.map +1 -1
  28. package/src/lib/server/publish-plugin.js +1 -1
  29. package/src/lib/server/publish-plugin.js.map +1 -1
  30. package/src/lib/server.js +13 -0
  31. package/src/lib/server.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../libs/plugins/marketplace/src/lib/components/plugin-review-detail.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport { ICON_VARIANT_SYMBOL_FLAG } from '@aglyn/shared-data-enums'\nimport {\n PageHeaderHelp,\n PageHeaderRecord,\n resolveStaffRoleGate,\n SUPER_STAFF_ONLY_REASON,\n type ConsoleStaffPagePaths,\n} from '@aglyn/aglyn'\nimport { AppLink, CardDisplay } from '@aglyn/shared-ui-jsx'\nimport BlockedControl from '@aglyn/shared-ui-jsx/components/blocked-control.component'\nimport {\n listingPath,\n orgMarketplacePath,\n publisherPath,\n} from '../model/marketplace-paths'\nimport { useSnackbar } from '@aglyn/shared-ui-snackstack'\nimport {\n Alert,\n Box,\n Button,\n Checkbox,\n Chip,\n Divider,\n FormControlLabel,\n Link as MuiLink,\n MenuItem,\n Skeleton,\n Stack,\n TextField,\n ToggleButton,\n ToggleButtonGroup,\n Tooltip,\n Typography,\n} from '@mui/material'\nimport { useCallback, useEffect, useState } from 'react'\nimport { useUser } from '@aglyn/tenant-feature-instance'\nimport { MarkdownLiteView } from '@aglyn/aglyn-markdown-editor'\nimport { pluginDocsHelp } from '@aglyn/aglyn'\nimport { PLUGIN_REVIEW_CHECKLIST } from '../model/plugin-review-checklist'\nimport {\n PLUGIN_REJECTION_CATEGORIES,\n pluginRejectionCategory,\n rejectionHeadline,\n rejectionInputError,\n} from '../model/plugin-rejection-categories'\nimport { PUBLISHER_ATTESTATION } from '@aglyn/aglyn/app-utils/publisher-attestation'\nimport { authorizedFetch } from '@aglyn/shared-util-http/authorized-token'\nimport { reviewStatusMeaning } from '../model/plugin-review-status'\n\ninterface VersionEntry {\n version: string\n trust: string | null\n sha256: string\n hostAbi: number | null\n capabilities: { network?: string[]; events?: string[] }\n /**\n * Canvas elements this version declares (AGL-1031) — publisher-authored\n * text the besigner renders in the element picker AND ranks its search on,\n * and the subject of the `element-metadata` criterion (AGL-2486).\n *\n * Deliberately untyped past the entry itself. The page prints whatever the\n * manifest holds rather than the fields it knew about when it was written,\n * so a reviewer keeps seeing everything the publisher wrote.\n */\n elements?: Array<Record<string, unknown>>\n publishedAt: string | null\n signed: boolean\n reviewState: string\n grandfathered: boolean\n /** Installs that ever landed on this version (AGL-1036). */\n installCount: number\n /** Installs pinned to it right now — the blast radius of a revoke. */\n activeInstalls: number\n /** Kill switch is on for these bytes (AGL-1085). */\n revoked: boolean\n}\n\ninterface ListingDetail {\n listingId: string\n displayName: string\n description: string\n readme: string\n license: string\n categories: string[]\n homepageUrl: string\n repositoryUrl: string\n publisherId: string\n publisherName: string\n publisherSlug: string | null\n reviewStatus: string\n rejectionReason: string\n rejectionCategory?: string\n priceUsd: number\n latestVersion: string\n activeInstalls: number\n hidden: boolean\n hiddenReason: string\n revoked: boolean\n unpublished: boolean\n platformHostAbi: number\n /** Bucket holding the bundle objects, for the Cloud console link (AGL-990). */\n artifactsBucket: string | null\n versions: VersionEntry[]\n verifier: {\n ok?: boolean\n problems?: Array<{ level: string; message: string; check?: string }>\n /** What was checked, including what passed and what never ran (AGL-1087). */\n checks?: Array<{\n id: string\n label: string\n status: 'pass' | 'fail' | 'question' | 'unknown'\n detail?: string\n }>\n error?: string\n } | null\n /** The verdict came from the version doc rather than a fresh download. */\n verifierCached: boolean\n /** Ticked items, keyed by id, for THIS version's bytes (AGL-963). */\n checklist: Record<string, { by: string | null }>\n checklistOutstanding: string[]\n /** Ids the publisher attested to for THIS version's bytes (AGL-969). */\n attestation: string[]\n /** Who signed the attestation, and when. */\n attestedBy: string | null\n attestedAt: string | null\n /** The org-level agreement this publisher is under (AGL-1077). */\n publisherAgreement: {\n version: string | null\n acceptedAt: string | null\n required: string\n state: 'none' | 'outdated' | 'current'\n }\n /** The version the checklist and verifier verdict above refer to. */\n reviewVersion: string\n private: boolean\n /** The publisher's standing ask for the Verified badge (AGL-1217). */\n verificationRequest?: {\n state?: string\n requestedAt?: string | null\n declineReason?: string | null\n } | null\n}\n\n/** Verifier findings read as a wall of text otherwise; group by severity. */\nconst SEVERITY_ORDER = ['error', 'warn', 'warning', 'info']\n\n/**\n * One plugin submission or listed plugin, in full (AGL-960).\n *\n * The index is for scanning; this is where a reviewer reads the manifest,\n * weighs the verifier findings and acts. Every consequential action lives\n * here rather than on the list, so nobody grants realm trust or takes a\n * plugin down while skimming rows.\n */\nexport function PluginReviewDetail({\n basePath,\n segments,\n staffRole,\n staffPaths,\n}: {\n basePath: string\n segments?: readonly string[]\n staffRole?: string | null\n staffPaths?: ConsoleStaffPagePaths\n}) {\n /*\n * The row this page is: the first segment beneath the queue. The surface\n * owns its subtree, so it also owns saying \"no such thing\" — which the\n * body below already does for a listing that was withdrawn while a link\n * to it sat in a reviewer's inbox.\n */\n const params = { listingId: String(segments?.[0] ?? '') }\n /*\n * Granting realm trust is super-only on the server (AGL-2131). The claim\n * is the app's and arrives as a prop; `null` is \"still reading the token\"\n * and must never render as a refusal, or every reviewer sees a disabled\n * button for a beat.\n */\n const superGate = resolveStaffRoleGate(staffRole, ['super'])\n const listingId = String(params?.listingId ?? '')\n const { data: user } = useUser()\n const { enqueueSnackbar } = useSnackbar()\n const [detail, setDetail] = useState<ListingDetail | null>(null)\n // Rendered by default (AGL-989) — the reviewer's first question is what a\n // buyer sees; Source is for auditing exactly what was submitted.\n const [readmeView, setReadmeView] = useState<'rendered' | 'source'>(\n 'rendered',\n )\n const [loaded, setLoaded] = useState(false)\n const [busy, setBusy] = useState(false)\n const [reason, setReason] = useState('')\n // Structured rejection (AGL-977). The comment stays — it is what tells a\n // publisher what to fix — but it is no longer the only thing recorded.\n const [rejectCategory, setRejectCategory] = useState('')\n // The same predicate the route enforces, so the button and the server\n // cannot disagree about what a complete rejection looks like.\n const rejectBlocked = rejectionInputError(rejectCategory, reason)\n const rejectCategoryNeedsComment = Boolean(\n pluginRejectionCategory(rejectCategory)?.requiresComment,\n )\n const [takedownReason, setTakedownReason] = useState('')\n // Which version is being reviewed. Empty = let the server pick the oldest\n // one still awaiting a verdict, which is the work queue for this listing.\n const [selectedVersion, setSelectedVersion] = useState('')\n\n const refresh = useCallback(async () => {\n if (!listingId) return\n const response = await authorizedFetch(\n user,\n `/api/marketplace/admin/reviews?listingId=${encodeURIComponent(listingId)}` +\n (selectedVersion\n ? `&version=${encodeURIComponent(selectedVersion)}`\n : ''),\n )\n if (response.ok) setDetail(await response.json())\n setLoaded(true)\n }, [user, listingId, selectedVersion])\n\n useEffect(() => {\n if (user) void refresh()\n }, [user, refresh])\n\n const post = useCallback(\n async (payload: Record<string, unknown>, success: string) => {\n setBusy(true)\n try {\n const response = await authorizedFetch(\n user,\n '/api/marketplace/admin/reviews',\n {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ listingId, ...payload }),\n },\n )\n const result = await response.json().catch(() => ({}))\n if (response.ok) {\n enqueueSnackbar(success, { variant: 'success' })\n await refresh()\n } else {\n enqueueSnackbar(result?.error ?? 'Action failed', {\n variant: 'error',\n allowDuplicate: true,\n })\n }\n } finally {\n setBusy(false)\n }\n },\n [user, listingId, enqueueSnackbar, refresh],\n )\n\n const signRealm = useCallback(\n async (version: string, action: 'grant' | 'revoke') => {\n setBusy(true)\n try {\n const response = await authorizedFetch(\n user,\n '/api/marketplace/admin/trust',\n {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n listingId,\n version,\n ...(action === 'revoke' ? { action: 'revoke' } : {}),\n }),\n },\n )\n const result = await response.json().catch(() => ({}))\n if (response.ok) {\n enqueueSnackbar(\n action === 'revoke'\n ? `v${version} returned to the sandbox`\n : `v${version} signed for the app realm`,\n { variant: 'success' },\n )\n await refresh()\n } else {\n enqueueSnackbar(result?.error ?? 'Signing failed', {\n variant: 'error',\n allowDuplicate: true,\n })\n }\n } finally {\n setBusy(false)\n }\n },\n [user, listingId, enqueueSnackbar, refresh],\n )\n\n /**\n * Per-version kill switch (AGL-1085). Distinct from `takedown`, which\n * revokes EVERY version and hides the listing: stopping one version's\n * bytes must not also stop the approved version customers are running.\n */\n const setVersionRevoked = useCallback(\n async (version: string, revoke: boolean) => {\n await post(\n {\n action: revoke ? 'revoke-version' : 'unrevoke-version',\n version,\n },\n revoke\n ? `v${version} stopped — running installs render a placeholder on next load`\n : `v${version} allowed to run again`,\n )\n },\n [post],\n )\n\n const takedown = useCallback(async () => {\n if (!detail) return\n if (!detail.hidden && !takedownReason.trim()) {\n return void enqueueSnackbar('Taking a plugin down needs a reason', {\n variant: 'warning',\n allowDuplicate: true,\n })\n }\n await post(\n {\n action: detail.hidden ? 'unhide' : 'hide',\n reason: takedownReason,\n },\n detail.hidden\n ? `${detail.displayName} restored`\n : `${detail.displayName} taken down — running installs stop on next load`,\n )\n setTakedownReason('')\n }, [detail, takedownReason, post, enqueueSnackbar])\n\n const status = reviewStatusMeaning(detail?.reviewStatus ?? '')\n const blocked = (detail?.checklistOutstanding.length ?? 0) > 0\n\n /**\n * The version the approve/reject buttons act on (AGL-1085). Rejecting does\n * not stop bytes that are already pinned — the runtime resolves a pin by\n * {version, sha256} and only asks whether it is revoked — so the reviewer\n * needs this version's live-install count at the moment they decide, not\n * on some other page.\n */\n const reviewEntry = detail?.versions.find(\n (entry) => entry.version === detail?.reviewVersion,\n )\n const liveOnReviewVersion = reviewEntry?.activeInstalls ?? 0\n\n /**\n * Where a reviewer actually goes to check each item (AGL-973).\n *\n * Without these, the checklist asks people to \"read the bundle source\"\n * with no way to reach it — the bundle lives in a private bucket behind\n * the plugin origin, and its URL is content-addressed, so nobody could\n * construct it by hand. An unactionable checklist gets ticked without\n * being done, which is worse than no checklist.\n */\n const artifactUrl = (version: string) => {\n const entry = detail?.versions.find((item) => item.version === version)\n if (!entry?.sha256) return null\n const path = `/artifacts/${detail?.listingId}/${version}/${entry.sha256}.bundle`\n const origin = process.env.NEXT_PUBLIC_PLUGIN_ORIGIN ?? ''\n // The plugin origin just edge-rewrites to the console's own artifact\n // route, so fall back to that directly when the origin is unset — as it\n // is on every dev machine. Without the fallback the \"read the bundle\n // source\" link silently vanished exactly where it matters most, and a\n // reviewer had no way to reach the code they are certifying.\n return origin\n ? `${origin.replace(/\\/+$/, '')}${path}`\n : `/api/plugin-artifacts/${detail?.listingId}/${version}/${entry.sha256}.bundle`\n }\n\n /**\n * The stored object in the Cloud console (AGL-990) — the served bundle is\n * what a reviewer READS, this is where they see the bytes: size, upload\n * time, content type, generation. The bucket is not in the Firebase\n * console, so nobody finds this by hand.\n */\n const bucketUrl = (version: string) => {\n const entry = detail?.versions.find((item) => item.version === version)\n if (!entry?.sha256 || !detail?.artifactsBucket) return null\n const object = `artifacts/${detail.listingId}/${version}/${entry.sha256}.bundle`\n return (\n 'https://console.cloud.google.com/storage/browser/_details/' +\n `${detail.artifactsBucket}/${object}`\n )\n }\n\n /**\n * Every string a publisher wrote on one declared element (AGL-2486).\n *\n * Derived by WALKING the entry rather than by reading named fields, so text\n * added to the manifest later — the way `tags` and `keywords` became\n * searched after `description` became rendered — shows up here without\n * anyone remembering this page. The criterion asks a reviewer to check the\n * publisher's text, so the page has to show all of it, including the search\n * terms that rank without ever rendering.\n */\n const publisherTextOf = (element: Record<string, unknown>): string[] => {\n const lines: string[] = []\n const walk = (value: unknown, path: string) => {\n if (lines.length >= 40) return\n if (typeof value === 'string') {\n if (value.trim()) lines.push(`${path}: ${value}`)\n return\n }\n if (Array.isArray(value)) {\n value.forEach((entry, index) => walk(entry, `${path}[${index}]`))\n return\n }\n if (value && typeof value === 'object') {\n for (const [key, entry] of Object.entries(value)) {\n walk(entry, `${path}.${key}`)\n }\n }\n }\n for (const [key, value] of Object.entries(element ?? {})) {\n // The icon is an mdi NAME looked up in our own set, not publisher prose.\n if (key === 'id' || key === 'icon') continue\n walk(value, key)\n }\n return lines\n }\n\n const checklistLink = (\n itemId: string,\n ): { href: string; label: string; external?: boolean } | null => {\n if (!detail) return null\n // The version approved before this one — what a diff should be against.\n const previousApproved = detail.versions\n .filter(\n (entry) =>\n entry.version !== detail.reviewVersion &&\n entry.reviewState === 'approved',\n )\n .at(0)\n switch (itemId) {\n case 'provenance':\n return detail.repositoryUrl\n ? { href: detail.repositoryUrl, label: 'Open repository', external: true }\n : null\n case 'publisher':\n return {\n href: staffPaths?.orgDetail(detail.publisherId) ?? '',\n label: 'Publisher workspace',\n }\n case 'source-read': {\n const href = artifactUrl(detail.reviewVersion)\n return href\n ? { href, label: `Read v${detail.reviewVersion} bundle`, external: true }\n : null\n }\n case 'diff': {\n const href = previousApproved\n ? artifactUrl(previousApproved.version)\n : null\n return href\n ? {\n href,\n label: `Previous approved: v${previousApproved?.version}`,\n external: true,\n }\n : null\n }\n case 'element-metadata':\n // Where the copy is READ, which is the whole difficulty with this\n // one: the picker lives in the besigner on whatever site the\n // reviewer installed it to, so the listing is the closest thing to\n // a starting point this page can hand them.\n return detail.publisherSlug\n ? {\n href: listingPath(\n orgMarketplacePath(detail.publisherSlug),\n detail.listingId,\n ),\n label: 'Install, then open the element picker',\n }\n : null\n case 'behaviour':\n return detail.publisherSlug\n ? {\n href: listingPath(\n orgMarketplacePath(detail.publisherSlug),\n detail.listingId,\n ),\n label: 'Marketplace listing',\n }\n : null\n case 'license':\n case 'support':\n return detail.homepageUrl\n ? { href: detail.homepageUrl, label: 'Homepage', external: true }\n : detail.repositoryUrl\n ? { href: detail.repositoryUrl, label: 'Repository', external: true }\n : null\n default:\n return null\n }\n }\n\n // Everything in the Security card is a statement about the version under\n // review, whose capabilities are what the verifier checked against.\n const reviewVersionEntry = detail?.versions.find(\n (entry) => entry.version === detail?.reviewVersion,\n )\n const reviewCapabilities = reviewVersionEntry?.capabilities\n\n const findings = (detail?.verifier?.problems ?? [])\n .slice()\n .sort(\n (a, b) =>\n SEVERITY_ORDER.indexOf(a.level) - SEVERITY_ORDER.indexOf(b.level),\n )\n\n // The per-check summary (AGL-1087). Findings hang off the check that\n // produced them, so a reviewer reads \"why\" beside \"what\", and the counts\n // below say in one line whether this verdict is mostly green or mostly\n // questions. Findings from a checker that did not tag them fall through to\n // their own list rather than disappearing.\n const checks = detail?.verifier?.checks ?? []\n const findingsByCheck = new Map<string, typeof findings>()\n const untaggedFindings: typeof findings = []\n for (const finding of findings) {\n const id = finding.check\n if (!id || !checks.some((check) => check.id === id)) {\n untaggedFindings.push(finding)\n continue\n }\n findingsByCheck.set(id, [...(findingsByCheck.get(id) ?? []), finding])\n }\n const countBy = (status: string) =>\n checks.filter((check) => check.status === status).length\n\n return (\n <>\n {/*\n The listing's own name in the heading and the trail: a review page\n headed \"Plugin reviews\" reads identically on every submission, and\n two reviewers with two tabs open would share one title.\n */}\n <PageHeaderRecord title={detail?.displayName ?? ''} />\n <PageHeaderHelp\n topic=\"publisherHandbook\"\n anchor=\"#review-what-happens-after-you-publish\"\n />\n {!loaded ? (\n <Stack spacing={2}>\n <Skeleton variant=\"rounded\" height={120} />\n <Skeleton variant=\"rounded\" height={220} />\n </Stack>\n ) : !detail ? (\n <Alert severity=\"warning\">\n {'That listing no longer exists.'}\n </Alert>\n ) : (\n <Stack spacing={3}>\n {/* Status first: a reviewer needs to know what state they\n are acting on before they read a word of the manifest. */}\n <CardDisplay header=\"Status\"\n help={pluginDocsHelp('publisherHandbook', {\n anchor: '#review-what-happens-after-you-publish',\n excerpt:\n 'Where this version stands: submitted, listed, verified, or ' +\n 'rejected — and what each state lets a customer do.',\n })} contentGutterX contentGutterY>\n <Stack spacing={1.5}>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <Chip size=\"small\" color={status.color} label={status.label} />\n <Chip\n size=\"small\"\n variant=\"outlined\"\n label={`v${detail.latestVersion || '—'}`}\n />\n <Chip\n size=\"small\"\n variant=\"outlined\"\n label={\n detail.priceUsd > 0 ? `$${detail.priceUsd}` : 'Free'\n }\n />\n <Chip\n size=\"small\"\n variant=\"outlined\"\n label={`${detail.activeInstalls} install${\n detail.activeInstalls === 1 ? '' : 's'\n }`}\n />\n {detail.hidden ? (\n <Chip\n size=\"small\"\n color=\"error\"\n label=\"Taken down — revoked\"\n />\n ) : null}\n {detail.unpublished ? (\n <Chip\n size=\"small\"\n color=\"warning\"\n label=\"Unpublished by the publisher\"\n />\n ) : null}\n </Stack>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {status.meaning}\n </Typography>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'Publisher: '}\n {detail.publisherSlug ? (\n <AppLink\n // The storefront route takes a handle now\n // (AGL-1001). This payload carries the org's slug\n // and name, not the publisher profile's handle, so\n // it passes the id — which that page still\n // resolves, the same fallback that keeps existing\n // links working.\n href={publisherPath(\n orgMarketplacePath(detail.publisherSlug),\n detail.publisherId,\n )}\n >\n {detail.publisherName}\n </AppLink>\n ) : (\n detail.publisherName\n )}\n {` · ${detail.listingId}`}\n </Typography>\n {/* Grandfathering (AGL-965): plugins listed before the\n checklist existed are still listed — retroactively\n emptying the marketplace would be worse than the gap\n — but staff should be able to see which ones carry\n no recorded review for the bytes running today. */}\n {['listed', 'verified'].includes(detail.reviewStatus) &&\n detail.checklistOutstanding.length ? (\n <Alert severity=\"warning\">\n {`Live in the marketplace with no recorded review for these bytes (${detail.checklistOutstanding.length} required item(s) outstanding). Work through the checklist, or delist while you do.`}\n </Alert>\n ) : null}\n {detail.rejectionReason ? (\n <Alert severity=\"error\">\n {`Rejected: ${rejectionHeadline(\n detail.rejectionCategory,\n detail.rejectionReason,\n )}${\n detail.rejectionReason &&\n pluginRejectionCategory(detail.rejectionCategory)\n ? ` — ${detail.rejectionReason}`\n : ''\n }`}\n </Alert>\n ) : null}\n {detail.hidden ? (\n <Alert severity=\"error\">\n {detail.hiddenReason\n ? `Taken down: ${detail.hiddenReason}`\n : 'Taken down (no reason recorded)'}\n </Alert>\n ) : null}\n </Stack>\n </CardDisplay>\n\n <CardDisplay header=\"Overview\"\n help={pluginDocsHelp('publisherHandbook', {\n excerpt:\n 'The listing as a customer sees it — name, description, media and ' +\n 'links, all publisher-supplied.',\n })} contentGutterX contentGutterY>\n <Stack spacing={1.5}>\n <Typography variant=\"body2\">\n {detail.description || 'No description.'}\n </Typography>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n {detail.license ? (\n <Chip size=\"small\" variant=\"outlined\" label={detail.license} />\n ) : (\n <Chip size=\"small\" color=\"warning\" label=\"No license\" />\n )}\n {detail.categories.map((category) => (\n <Chip key={category} size=\"small\" label={category} />\n ))}\n </Stack>\n {detail.homepageUrl || detail.repositoryUrl ? (\n <Typography variant=\"body2\" color=\"text.secondary\">\n {detail.homepageUrl ? `Homepage: ${detail.homepageUrl}` : ''}\n {detail.homepageUrl && detail.repositoryUrl ? ' · ' : ''}\n {detail.repositoryUrl\n ? `Repository: ${detail.repositoryUrl}`\n : ''}\n </Typography>\n ) : null}\n <Divider />\n {/* A reviewer needs both halves (AGL-989): the rendered\n page a buyer lands on, and the exact source the\n publisher submitted. */}\n <Stack\n direction=\"row\"\n sx={{\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 1,\n }}\n >\n <Typography variant=\"subtitle2\">{'README'}</Typography>\n <ToggleButtonGroup\n exclusive\n size=\"small\"\n value={readmeView}\n onChange={(_event, next) => {\n if (next) setReadmeView(next as 'rendered' | 'source')\n }}\n >\n <ToggleButton value=\"rendered\">\n <Typography variant=\"caption\">\n {'Rendered'}\n </Typography>\n </ToggleButton>\n <ToggleButton value=\"source\">\n <Typography variant=\"caption\">{'Source'}</Typography>\n </ToggleButton>\n </ToggleButtonGroup>\n </Stack>\n {detail.readme ? (\n // Framed (AGL-991): everything inside this border is\n // publisher-submitted content, not our page. On a review\n // screen that boundary is the whole job.\n <Box\n sx={{\n maxHeight: 480,\n overflowY: 'auto',\n border: 1,\n borderColor: 'divider',\n borderRadius: 1,\n p: 2,\n bgcolor: 'action.hover',\n }}\n >\n {readmeView === 'rendered' ? (\n <MarkdownLiteView source={detail.readme} />\n ) : (\n <Typography\n variant=\"body2\"\n component=\"pre\"\n sx={{\n whiteSpace: 'pre-wrap',\n fontFamily: 'monospace',\n fontSize: 12,\n m: 0,\n }}\n >\n {detail.readme}\n </Typography>\n )}\n </Box>\n ) : (\n <Alert severity=\"warning\">\n {'No README — publishers are expected to ship one.'}\n </Alert>\n )}\n </Stack>\n </CardDisplay>\n\n {/* What the bundle is allowed to reach, and what the static\n verifier found in it. The two questions that decide\n whether this code may run in the app realm. */}\n <CardDisplay header=\"Security\"\n help={pluginDocsHelp('sandboxSecurity', {\n excerpt:\n 'What the bundle asked for, against what the sandbox enforces ' +\n 'regardless of what it asked for.',\n })} contentGutterX contentGutterY>\n <Stack spacing={1.5}>\n {/* The version under review, not the latest one: the\n verifier diffs network calls against THESE declared\n origins (AGL-964), so showing another version's\n capabilities beside its findings would misexplain\n them. */}\n <Typography variant=\"body2\" color=\"text.secondary\">\n {`Declared network: ${\n reviewCapabilities?.network?.join(', ') || 'none'\n } · events: ${\n reviewCapabilities?.events?.join(', ') || 'none'\n }`}\n </Typography>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {`Host ABI: declared ${\n reviewVersionEntry?.hostAbi ?? 'none (legacy)'\n }, platform runs ${detail.platformHostAbi}`}\n </Typography>\n {/* Declared elements (AGL-2486). Not a capability — copy.\n The picker renders this name and description inside the\n customer's console, and the listing page shows neither,\n so a reviewer working from the listing alone never meets\n it. \"Declares none\" and \"we never looked\" must not read\n the same, hence the explicit empty line. */}\n <Stack spacing={0.5}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {`Declared elements: ${\n reviewVersionEntry?.elements?.length ?? 0\n } — publisher text the picker renders and ranks its search on, none of it on the listing page.`}\n </Typography>\n {(reviewVersionEntry?.elements ?? []).map((element) => (\n <Stack key={String(element['id'])} sx={{ pl: 1 }}>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {`${String(element['displayName'] || element['id'])}${\n element['category']\n ? ` · ${String(element['category'])}`\n : ''\n }`}\n </Typography>\n {publisherTextOf(element).map((line) => (\n <Typography\n key={line}\n variant=\"caption\"\n color=\"text.secondary\"\n sx={{\n pl: 1,\n fontFamily: 'monospace',\n fontSize: 11,\n wordBreak: 'break-word',\n }}\n >\n {line}\n </Typography>\n ))}\n </Stack>\n ))}\n </Stack>\n {/* \"No findings\" and \"never checked\" must not look the\n same. A null verdict means the artifacts bucket is\n unreachable or unconfigured, and rendering that as a\n clean bill of health would invite a reviewer to\n approve a bundle nobody has inspected. */}\n {!detail.verifier ? (\n <Alert severity=\"warning\">\n {'The static verifier has not run for this version — ' +\n 'no artifact was reachable. Treat this as unchecked, ' +\n 'not as clean.'}\n </Alert>\n ) : detail.verifier.error ? (\n <Alert severity=\"warning\">\n {`Verifier could not run: ${detail.verifier.error}`}\n </Alert>\n ) : (\n <Stack spacing={1}>\n {/* One line for the whole verdict, then the areas\n themselves (AGL-1087). \"Found nothing\" alone could\n not tell a reviewer whether ten checks passed or\n the interesting one never ran. */}\n <Typography variant=\"body2\" color=\"text.secondary\">\n {checks.length\n ? [\n `${countBy('pass')} passed`,\n countBy('fail')\n ? `${countBy('fail')} failed`\n : '',\n countBy('question')\n ? `${countBy('question')} to question`\n : '',\n countBy('unknown')\n ? `${countBy('unknown')} could not run`\n : '',\n ]\n .filter(Boolean)\n .join(' · ')\n : detail.verifier.ok\n ? 'Static verifier found nothing.'\n : 'Static verifier found problems.'}\n {/* Says WHICH bytes, because that is what makes a\n stored verdict trustworthy — not when it ran. */}\n {detail.verifierCached\n ? ' · stored verdict for these exact bytes'\n : ''}\n </Typography>\n {checks.map((check) => {\n // The state has to survive being read aloud and being\n // read by someone who cannot separate the red from the\n // green (AGL-1089), so it is named in text as well as\n // drawn — this is a page people skim to decide whether\n // code runs in other people's workspaces.\n const marker =\n check.status === 'pass'\n ? { glyph: '✓', color: 'success.main', name: 'Passed' }\n : check.status === 'fail'\n ? { glyph: '✕', color: 'error.main', name: 'Failed' }\n : check.status === 'question'\n ? {\n glyph: '?',\n color: 'warning.main',\n name: 'Worth questioning',\n }\n : {\n glyph: '—',\n color: 'text.disabled',\n name: 'Not checked',\n }\n return (\n <Stack key={check.id} spacing={0.5}>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'baseline' }}\n >\n <Typography\n variant=\"body2\"\n aria-label={`${marker.name}:`}\n sx={{ color: marker.color, width: 16 }}\n >\n {marker.glyph}\n </Typography>\n <Typography\n variant=\"body2\"\n color={\n check.status === 'unknown'\n ? 'text.secondary'\n : undefined\n }\n >\n {check.label}\n {check.status === 'unknown'\n ? ' — not checked'\n : ''}\n </Typography>\n {check.detail ? (\n <Typography\n variant=\"caption\"\n color=\"text.secondary\"\n >\n {check.detail}\n </Typography>\n ) : null}\n </Stack>\n {(findingsByCheck.get(check.id) ?? []).map(\n (problem, index) => (\n <Alert\n key={`${check.id}-${index}`}\n severity={\n problem.level === 'error'\n ? 'error'\n : 'warning'\n }\n sx={{ ml: 3 }}\n >\n {problem.message}\n </Alert>\n ),\n )}\n </Stack>\n )\n })}\n {/* A verdict stored before findings carried their check\n (AGL-1087) still has to be readable. */}\n {untaggedFindings.map((problem, index) => (\n <Alert\n key={`untagged-${index}`}\n severity={\n problem.level === 'error' ? 'error' : 'warning'\n }\n >\n {problem.message}\n </Alert>\n ))}\n {checks.length ? (\n <Typography variant=\"caption\" color=\"text.secondary\">\n {'A full column of ticks means these shapes were ' +\n 'not found in code the parser could read. It is ' +\n 'not a statement that the plugin is safe — that ' +\n 'is the checklist below.'}\n </Typography>\n ) : null}\n </Stack>\n )}\n </Stack>\n </CardDisplay>\n\n {/* What the PUBLISHER claimed (AGL-969), read before the\n reviewer's own list below. Not evidence — nothing here is\n verified by anyone but the person who submitted it — but it\n says where to look: an attestation that contradicts the\n bundle is a documented false statement by a named publisher\n on a date, which is what makes removal defensible rather\n than a judgement call. */}\n <CardDisplay\n header={`Publisher attestation — v${detail.reviewVersion} (${detail.attestation.length}/${PUBLISHER_ATTESTATION.length})`}\n help={pluginDocsHelp('publisherHandbook', {\n anchor: '#the-two-badges-and-what-each-one-promises',\n excerpt:\n 'What the publisher asserted about THIS version. Their claim, not ' +\n 'our finding — the checklist below is ours.',\n })}\n contentGutterX\n contentGutterY\n >\n <Stack spacing={1}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {detail.attestedBy\n ? `Stated by ${detail.attestedBy}${\n detail.attestedAt\n ? ` on ${new Date(\n detail.attestedAt,\n ).toLocaleDateString()}`\n : ''\n }, against this version's exact bytes.`\n : 'Nothing recorded for these bytes.'}\n </Typography>\n {detail.attestation.length ? null : (\n <Alert severity=\"info\">\n {'Published before publishers were asked to attest, or ' +\n 'republished since. Check everything yourself — the ' +\n 'absence of a claim is not a claim.'}\n </Alert>\n )}\n {PUBLISHER_ATTESTATION.map((item) => {\n const claimed = detail.attestation.includes(item.id)\n return (\n <Stack key={item.id} spacing={0.25}>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <Typography\n variant=\"body2\"\n color={claimed ? undefined : 'text.secondary'}\n >\n {claimed ? '✓' : '—'} {item.label}\n </Typography>\n {item.updateOnly ? (\n <Chip\n size=\"small\"\n variant=\"outlined\"\n label=\"Updates only\"\n />\n ) : null}\n </Stack>\n </Stack>\n )\n })}\n {/* Which terms this publisher is under (AGL-1077). Sits\n with the attestation because both answer \"what has this\n publisher committed to\" — but they answer it at\n different scopes. The attestation is about these bytes;\n this is about the relationship, and it is the one that\n decides what we are entitled to do if the bytes turn\n out to be a problem. */}\n <Divider sx={{ my: 1 }} />\n <Typography variant=\"body2\" color=\"text.secondary\">\n {detail.publisherAgreement?.state === 'current'\n ? `Publisher agreement v${detail.publisherAgreement.version} accepted` +\n (detail.publisherAgreement.acceptedAt\n ? ` on ${new Date(\n detail.publisherAgreement.acceptedAt,\n ).toLocaleDateString()}`\n : '') +\n '.'\n : detail.publisherAgreement?.state === 'outdated'\n ? `Publisher agreement: on v${detail.publisherAgreement.version}, ` +\n `current is v${detail.publisherAgreement.required}. This ` +\n 'version was published under the older terms.'\n : 'No publisher agreement on record — this org ' +\n 'published before one existed. Weigh a takedown ' +\n 'against the Terms of Service, not against terms ' +\n 'nobody accepted.'}\n </Typography>\n </Stack>\n </CardDisplay>\n\n {/* The checklist is the actual review (AGL-963). The verifier\n parses the bundle now (AGL-964), so computed access like\n g['ev'+'al'] no longer walks past it — but it still reads\n only shapes, never intent. These items are the things a\n machine structurally cannot judge. */}\n <CardDisplay\n header={`Review checklist — v${detail.reviewVersion} (${\n PLUGIN_REVIEW_CHECKLIST.filter(\n (item) => detail.checklist?.[item.id],\n ).length\n }/${PLUGIN_REVIEW_CHECKLIST.length})`}\n help={pluginDocsHelp('publisherHandbook', {\n anchor: '#review-what-happens-after-you-publish',\n excerpt:\n 'The checklist a reviewer works through. Re-earned per version — a ' +\n 'new release starts with none of it ticked.',\n })}\n contentGutterX\n contentGutterY\n >\n <Stack spacing={1}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'The static verifier is a lint, not a boundary — it ' +\n 'parses the bundle and reports shapes (computed access ' +\n 'on a global, undeclared network calls), but it cannot ' +\n 'judge what the code is for, and code it cannot see ' +\n 'through it says nothing about. These are the checks ' +\n 'only a person can make. Ticks are recorded against ' +\n \"this version's exact bytes and reset if it is \" +\n 'republished.'}\n </Typography>\n {detail.checklistOutstanding.length ? (\n <Alert severity=\"info\">\n {`${detail.checklistOutstanding.length} required item(s) outstanding — List and Verify stay blocked until they are done. Rejecting never needs the checklist.`}\n </Alert>\n ) : (\n <Alert severity=\"success\">\n {'Every required item is recorded for these bytes.'}\n </Alert>\n )}\n {PLUGIN_REVIEW_CHECKLIST.map((item) => (\n <Stack key={item.id} spacing={0.25} sx={{ pl: 0.5 }}>\n <FormControlLabel\n control={\n <Checkbox\n size=\"small\"\n checked={Boolean(detail.checklist?.[item.id])}\n disabled={busy}\n onChange={(event) =>\n void post(\n {\n action: 'checklist',\n version: detail.reviewVersion,\n itemId: item.id,\n checked: event.target.checked,\n },\n event.target.checked\n ? 'Recorded'\n : 'Cleared',\n )\n }\n />\n }\n label={\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <Typography variant=\"body2\">\n {item.label}\n </Typography>\n {item.required ? (\n <Chip size=\"small\" label=\"Required\" />\n ) : null}\n {item.realmOnly ? (\n <Chip\n size=\"small\"\n variant=\"outlined\"\n label=\"Realm trust\"\n />\n ) : null}\n </Stack>\n }\n />\n <Typography\n variant=\"caption\"\n color=\"text.secondary\"\n sx={{ pl: 4 }}\n >\n {item.detail}\n </Typography>\n {(() => {\n const link = checklistLink(item.id)\n // The stored object sits beside what it serves\n // (AGL-990) — read the code, then inspect the bytes.\n const bucket =\n item.id === 'source-read' && detail\n ? bucketUrl(detail.reviewVersion)\n : null\n if (!link && !bucket) return null\n // External targets (the raw bundle, the publisher's\n // repo) are plain anchors on purpose; internal ones\n // go through AppLink so the SPA does not full-reload.\n return (\n <Stack\n direction=\"row\"\n spacing={2}\n sx={{ pl: 4, flexWrap: 'wrap' }}\n >\n {link ? (\n <Typography variant=\"caption\">\n {link.external ? (\n <MuiLink\n href={link.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {`${link.label} ↗`}\n </MuiLink>\n ) : (\n <AppLink href={link.href}>\n {link.label}\n </AppLink>\n )}\n </Typography>\n ) : null}\n {bucket ? (\n <Typography variant=\"caption\">\n <MuiLink\n href={bucket}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {'Object in Cloud Storage ↗'}\n </MuiLink>\n </Typography>\n ) : null}\n </Stack>\n )\n })()}\n </Stack>\n ))}\n </Stack>\n </CardDisplay>\n\n {/* Verdicts, ordered by consequence rather than by the\n order they were built (AGL-966). The old card was a flat\n row of same-weight text buttons where \"List\" — the click\n that makes a plugin installable by every workspace — sat\n between \"Start review\" and a rejection box. */}\n <CardDisplay\n header=\"Review verdict\"\n contentGutterX\n contentGutterY\n help={pluginDocsHelp('manifestAndEnvs', {\n anchor: '#review--trust-lifecycle',\n excerpt:\n 'Move this submission through the review lifecycle — list, verify, or reject with a reason.',\n })}\n >\n <Stack spacing={2}>\n <Stack spacing={0.5}>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <Typography variant=\"body2\">{'Currently:'}</Typography>\n <Chip\n size=\"small\"\n color={status.color}\n label={status.label}\n />\n {status.live ? (\n <Chip size=\"small\" color=\"warning\" label=\"Live to customers\" />\n ) : (\n <Chip size=\"small\" variant=\"outlined\" label=\"Not installable\" />\n )}\n </Stack>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {status.meaning}\n </Typography>\n </Stack>\n\n <Divider />\n\n {/* The verdict that matters is per VERSION (AGL-966).\n Approving these bytes is what makes them installable;\n listing-level state only says whether the plugin is\n in the marketplace at all. */}\n <Stack spacing={0.5}>\n <Typography variant=\"subtitle2\">\n {`Verdict on v${detail.reviewVersion}`}\n </Typography>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <TextField\n size=\"small\"\n select\n value={detail.reviewVersion}\n onChange={(event) =>\n setSelectedVersion(event.target.value)\n }\n sx={{ minWidth: 160 }}\n >\n {detail.versions.map((entry) => (\n <MenuItem key={entry.version} value={entry.version}>\n {`v${entry.version} · ${entry.reviewState}`}\n </MenuItem>\n ))}\n </TextField>\n <Button\n size=\"small\"\n variant=\"contained\"\n color=\"success\"\n disabled={busy || blocked}\n onClick={() =>\n void post(\n {\n action: 'approve-version',\n version: detail.reviewVersion,\n },\n `v${detail.reviewVersion} approved`,\n )\n }\n >\n {'Approve version'}\n </Button>\n <Button\n size=\"small\"\n color=\"error\"\n disabled={busy}\n onClick={() =>\n void post(\n {\n action: 'reject-version',\n version: detail.reviewVersion,\n reason,\n },\n `v${detail.reviewVersion} rejected`,\n )\n }\n >\n {'Reject version'}\n </Button>\n </Stack>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {'Approving makes these bytes the version new ' +\n 'installs receive. Existing installs are pinned and ' +\n 'do not move. A pending version is never installed ' +\n 'by anyone but its publisher, so an update cannot ' +\n 'ship past review.'}\n </Typography>\n {blocked ? (\n <Alert severity=\"info\" sx={{ mt: 0.5 }}>\n {`Blocked: ${detail.checklistOutstanding.length} required checklist item(s) outstanding for these bytes.`}\n </Alert>\n ) : null}\n {/* AGL-1085: a rejection is a verdict, not a kill. These\n bytes are live somewhere, so say so HERE — the number\n is what decides whether the kill switch is warranted,\n and a reviewer who has to go and find it will not. */}\n {liveOnReviewVersion > 0 ? (\n <Alert\n severity={reviewEntry?.revoked ? 'success' : 'warning'}\n sx={{ mt: 0.5 }}\n action={\n <Button\n size=\"small\"\n color=\"inherit\"\n disabled={busy}\n onClick={() =>\n void setVersionRevoked(\n detail.reviewVersion,\n !reviewEntry?.revoked,\n )\n }\n >\n {reviewEntry?.revoked\n ? 'Allow again'\n : 'Stop these bytes'}\n </Button>\n }\n >\n {reviewEntry?.revoked\n ? `v${detail.reviewVersion} is stopped. The ` +\n `${liveOnReviewVersion} site${\n liveOnReviewVersion === 1\n ? ' pinned to it renders'\n : 's pinned to it render'\n } a placeholder instead.`\n : `${liveOnReviewVersion} site${\n liveOnReviewVersion === 1\n ? ' is'\n : 's are'\n } running v${detail.reviewVersion} right now. ` +\n 'Rejecting it stops new installs but leaves ' +\n 'those running — stop the bytes if they should ' +\n 'not be executing.'}\n </Alert>\n ) : null}\n </Stack>\n\n <Divider />\n\n {/* Listing-level distribution, unchanged. */}\n <Stack spacing={0.5}>\n <Typography variant=\"subtitle2\">\n {'Marketplace listing'}\n </Typography>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n {/* The action the queue was missing (AGL-2059).\n `list` is what turns `isListingBrowsable` true —\n the moment third-party code becomes installable by\n every workspace — and it had no button, while\n `verify`, which only adds a badge, has had one all\n along. The only way a listing reached `listed` was\n the incidental mirror inside `approve-version`, so\n the consequential act happened as a side effect of\n a control labelled about something else, and a\n delisted plugin had no path back at all.\n\n Same checklist gate as `Verify` — the route gates\n both (and the `list` half of that gate had never\n been reachable). `warning`, matching the `listed`\n chip: this state is the live one, and the colour\n is the page's existing shorthand for that. */}\n {!['listed', 'verified'].includes(detail.reviewStatus) ? (\n <Tooltip\n title={\n blocked\n ? `Complete the review checklist first — ` +\n `${detail.checklistOutstanding.length} required ` +\n `item(s) outstanding for this version's bytes`\n : 'Makes this plugin browsable in the ' +\n 'marketplace and installable by every ' +\n 'workspace. This is the step that puts the ' +\n 'code in front of customers.'\n }\n >\n <span>\n <Button\n size=\"small\"\n color=\"warning\"\n variant=\"outlined\"\n disabled={busy || blocked}\n onClick={() =>\n void post(\n { action: 'list' },\n 'Listed — installable by every workspace',\n )\n }\n >\n {'List in marketplace'}\n </Button>\n </span>\n </Tooltip>\n ) : null}\n {/* Claiming a submission (AGL-2059). Ungated, as the\n route intends: `delist` reuses `in_review` but\n reads as a retreat, so with more than one reviewer\n there was no way to say \"I have this one\". */}\n {detail.reviewStatus === 'submitted' ? (\n <Button\n size=\"small\"\n variant=\"outlined\"\n disabled={busy}\n onClick={() =>\n void post(\n { action: 'start-review' },\n 'Marked in review',\n )\n }\n >\n {'Start review'}\n </Button>\n ) : null}\n {detail.reviewStatus !== 'verified' ? (\n // Say WHY it is disabled, at the button (AGL-1121).\n // The checklist alert lives elsewhere on the page, so\n // a reviewer met a greyed-out control with no stated\n // cause and reasonably read it as broken. The tooltip\n // names the count and where to clear it; a disabled\n // MUI Button swallows pointer events, so the wrapper\n // is what the tooltip can attach to.\n <Tooltip\n title={\n blocked\n ? `Complete the review checklist first — ` +\n `${detail.checklistOutstanding.length} required ` +\n `item(s) outstanding for this version's bytes`\n : ''\n }\n >\n <span>\n <Button\n size=\"small\"\n color=\"success\"\n variant=\"outlined\"\n disabled={busy || blocked}\n onClick={() =>\n void post({ action: 'verify' }, 'Verified')\n }\n >\n {'Verify ✓ (badge)'}\n </Button>\n </span>\n </Tooltip>\n ) : null}\n {/* Only when something is actually waiting (AGL-1217).\n Declining is a refusal of a request, not a verdict\n on the plugin — offering it with nothing pending\n would invite staff to refuse something nobody\n asked for. Verify is already on this bar and is\n how a request is GRANTED, so there is no second\n grant button. */}\n {/*\n * What a colleague already told this publisher\n * (AGL-2339).\n *\n * `declineReason` was served by the route and the page\n * only branched on `state`, so the PUBLISHER could read\n * the reason their verification was refused —\n * `listing-verification-request.component` renders it —\n * and the staff reviewer handling the re-request could\n * not. Whoever picks up the second ask would otherwise\n * re-decide it blind, or contradict the first answer.\n */}\n {detail.verificationRequest?.declineReason ? (\n <Chip\n size=\"small\"\n color=\"warning\"\n variant=\"outlined\"\n sx={{ maxWidth: 420 }}\n label={`Previously declined: ${detail.verificationRequest.declineReason}`}\n />\n ) : null}\n {detail.verificationRequest?.state === 'pending' ? (\n <Button\n size=\"small\"\n color=\"warning\"\n variant=\"outlined\"\n disabled={busy}\n onClick={() => {\n const reason = window.prompt(\n 'Why is verification declined? The publisher is ' +\n 'told this, and cannot ask again for 30 days.',\n )\n // `prompt` returns null on cancel and '' on an\n // empty submit. Neither is a decline — the server\n // requires a reason, and sending one anyway would\n // surface as an error the reviewer did not cause.\n if (!reason?.trim()) return\n void post(\n { action: 'decline-verification', reason },\n 'Verification declined',\n )\n }}\n >\n {'Decline verification'}\n </Button>\n ) : null}\n {detail.private ? (\n <Chip size=\"small\" label=\"Private — never listed\" />\n ) : null}\n </Stack>\n </Stack>\n\n <Divider />\n\n {/* Back down the ladder. Never checklist-gated — a\n retreat must always be available — and deliberately\n quieter than the danger zone below, which is the only\n control that reaches code already running. */}\n <Stack spacing={0.5}>\n <Typography variant=\"subtitle2\">{'Step back'}</Typography>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <TextField\n select\n size=\"small\"\n label=\"Rejection reason\"\n value={rejectCategory}\n onChange={(event) =>\n setRejectCategory(event.target.value)\n }\n // `displayEmpty` is not enough on a MUI Select: an\n // empty value renders NOTHING without a rendered\n // option, so the field reads as broken.\n slotProps={{\n select: { displayEmpty: true },\n inputLabel: { shrink: true },\n }}\n sx={{ minWidth: 260 }}\n >\n <MenuItem value=\"\">{'Select a reason…'}</MenuItem>\n {PLUGIN_REJECTION_CATEGORIES.map((entry) => (\n <MenuItem key={entry.id} value={entry.id}>\n {entry.label}\n </MenuItem>\n ))}\n </TextField>\n <TextField\n size=\"small\"\n placeholder={\n rejectCategoryNeedsComment\n ? 'Comment (required for “Other”)'\n : 'Comment (optional)'\n }\n value={reason}\n onChange={(event) => setReason(event.target.value)}\n sx={{ minWidth: 260 }}\n />\n {status.live ? (\n <Button\n size=\"small\"\n color=\"warning\"\n disabled={busy}\n onClick={() =>\n void post(\n { action: 'delist', reason },\n 'Delisted — back in review',\n )\n }\n >\n {'Delist'}\n </Button>\n ) : null}\n {detail.reviewStatus === 'verified' ? (\n <Button\n size=\"small\"\n disabled={busy}\n onClick={() =>\n void post({ action: 'unverify' }, 'Badge removed')\n }\n >\n {'Unverify'}\n </Button>\n ) : null}\n <Button\n size=\"small\"\n color=\"error\"\n // Disabled rather than left to fail server-side: the\n // route validates too, but a reviewer should not have\n // to press a button to learn the form is incomplete.\n disabled={busy || Boolean(rejectBlocked)}\n onClick={() =>\n void post(\n { action: 'reject', reason, category: rejectCategory },\n 'Rejected',\n )\n }\n >\n {'Reject'}\n </Button>\n </Stack>\n {rejectBlocked ? (\n <Typography variant=\"caption\" color=\"text.secondary\">\n {rejectBlocked}\n </Typography>\n ) : null}\n <Typography variant=\"caption\" color=\"text.secondary\">\n {'Delist pulls it from the marketplace and blocks new ' +\n 'installs; existing installs keep working. Unverify ' +\n 'only drops the badge. Reject notifies the publisher. ' +\n 'None of these stop code already running — that is ' +\n 'the danger zone.'}\n </Typography>\n </Stack>\n </Stack>\n </CardDisplay>\n\n <CardDisplay header=\"Versions\"\n help={pluginDocsHelp('publisherHandbook', {\n anchor: '#versioning--updates',\n excerpt:\n 'Every version this publisher has submitted. Review lives on the ' +\n 'VERSION, so each one is judged on its own.',\n })} contentGutterX contentGutterY>\n <Stack spacing={1}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'Granting realm trust signs a version to run inside ' +\n 'the app realm instead of the sandbox iframe. ' +\n 'Super-staff only, audited.'}\n </Typography>\n {/* The two axes get conflated constantly (AGL-966):\n review status is per LISTING and controls who can\n install; trust is per VERSION and controls what the\n code can reach once installed. Verified is not realm\n trust, and realm trust is the far more dangerous of\n the two. */}\n <Alert severity=\"info\">\n {'This is a different axis from the review verdict above. ' +\n 'Listing and verifying apply to the whole listing and ' +\n 'decide who may install it. Trust applies to ONE ' +\n 'version and decides where its code runs: sandboxed in ' +\n 'a cross-origin iframe capped by the manifest CSP, or ' +\n 'inside the app realm with neither of those between it ' +\n 'and user data. A verified plugin can be sandboxed, and ' +\n 'a sandboxed version of a verified plugin is the normal ' +\n 'case — realm trust is the exception that needs a ' +\n 'reason.'}\n </Alert>\n {detail.versions.map((entry) => (\n <Stack\n key={entry.version}\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <Typography variant=\"body2\" sx={{ minWidth: 64 }}>\n {`v${entry.version}`}\n </Typography>\n {entry.version === detail.latestVersion ? (\n <Chip size=\"small\" label=\"Latest\" />\n ) : null}\n <Chip\n size=\"small\"\n color={\n entry.reviewState === 'approved'\n ? 'success'\n : entry.reviewState === 'rejected'\n ? 'error'\n : 'warning'\n }\n variant=\"outlined\"\n label={\n entry.grandfathered\n ? 'approved (grandfathered)'\n : entry.reviewState\n }\n />\n <Chip\n size=\"small\"\n color={entry.trust === 'realm' ? 'success' : 'default'}\n variant={entry.trust === 'realm' ? 'filled' : 'outlined'}\n label={\n entry.trust === 'realm' ? 'Realm-trusted' : 'Sandboxed'\n }\n />\n {/* AGL-1085. Two states worth distinguishing at a\n glance: bytes a reviewer turned off, and rejected\n bytes still executing somewhere — which a rejection\n alone never changes. */}\n {entry.revoked ? (\n <Chip size=\"small\" color=\"error\" label=\"Stopped\" />\n ) : entry.reviewState === 'rejected' &&\n entry.activeInstalls > 0 ? (\n <Chip\n size=\"small\"\n color=\"error\"\n variant=\"outlined\"\n label=\"Rejected but still running\"\n />\n ) : null}\n <Typography variant=\"caption\" color=\"text.secondary\">\n {entry.publishedAt\n ? new Date(entry.publishedAt).toLocaleDateString()\n : '—'}\n {` · ${entry.sha256.slice(0, 12)}`}\n {/* The blast radius of revoking THIS version\n (AGL-1036) — the listing total above answers a\n different question. */}\n {entry.activeInstalls\n ? ` · ${entry.activeInstalls} pinned here`\n : ''}\n </Typography>\n {/* Realm trust bypasses the plugin sandbox's CSP, so\n /api/marketplace/admin/trust is super-only. The button was\n live for support staff (AGL-2131). */}\n <BlockedControl\n blocked={superGate.blocked}\n reason={superGate.reason ?? SUPER_STAFF_ONLY_REASON}\n >\n <Button\n size=\"small\"\n color={entry.trust === 'realm' ? 'error' : 'success'}\n disabled={busy}\n onClick={() =>\n void signRealm(\n entry.version,\n entry.trust === 'realm' ? 'revoke' : 'grant',\n )\n }\n >\n {entry.trust === 'realm'\n ? 'Revoke realm trust'\n : 'Grant realm trust'}\n </Button>\n </BlockedControl>\n {/* The kill switch for THESE bytes (AGL-1085) —\n narrower than the takedown below, which stops every\n version including the one customers are happily\n running. */}\n <Button\n size=\"small\"\n color={entry.revoked ? 'success' : 'error'}\n disabled={busy}\n onClick={() =>\n void setVersionRevoked(entry.version, !entry.revoked)\n }\n >\n {entry.revoked ? 'Allow again' : 'Stop this version'}\n </Button>\n </Stack>\n ))}\n </Stack>\n </CardDisplay>\n\n {/* Separated on purpose: this is the only control here that\n reaches code already running in customers' workspaces. */}\n <CardDisplay header=\"Danger zone\"\n help={pluginDocsHelp('publisherHandbook', {\n anchor: '#review-what-happens-after-you-publish',\n excerpt:\n 'Rejecting a version is not a kill switch — it stops new installs ' +\n 'and leaves existing ones running.',\n })} contentGutterX contentGutterY>\n <Stack spacing={1.5}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'Taking a plugin down de-lists it AND writes the kill ' +\n 'switch: every workspace that already installed it ' +\n 'stops loading it on the next render, and new ' +\n 'installs are refused. Restoring clears both.'}\n </Typography>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n {detail.hidden ? null : (\n <TextField\n size=\"small\"\n placeholder=\"Takedown reason\"\n value={takedownReason}\n onChange={(event) =>\n setTakedownReason(event.target.value)\n }\n sx={{ minWidth: 260 }}\n />\n )}\n <Button\n size=\"small\"\n variant={detail.hidden ? 'text' : 'outlined'}\n color={detail.hidden ? 'success' : 'error'}\n disabled={busy}\n onClick={() => void takedown()}\n >\n {detail.hidden ? 'Restore listing' : 'Take down'}\n </Button>\n </Stack>\n </Stack>\n </CardDisplay>\n </Stack>\n )}\n </>\n )\n}\n\nexport default PluginReviewDetail\n"],"names":["PageHeaderHelp","PageHeaderRecord","resolveStaffRoleGate","SUPER_STAFF_ONLY_REASON","AppLink","CardDisplay","BlockedControl","listingPath","orgMarketplacePath","publisherPath","useSnackbar","Alert","Box","Button","Checkbox","Chip","Divider","FormControlLabel","Link","MuiLink","MenuItem","Skeleton","Stack","TextField","ToggleButton","ToggleButtonGroup","Tooltip","Typography","useCallback","useEffect","useState","useUser","MarkdownLiteView","pluginDocsHelp","PLUGIN_REVIEW_CHECKLIST","PLUGIN_REJECTION_CATEGORIES","pluginRejectionCategory","rejectionHeadline","rejectionInputError","PUBLISHER_ATTESTATION","authorizedFetch","reviewStatusMeaning","SEVERITY_ORDER","PluginReviewDetail","basePath","segments","staffRole","staffPaths","detail","reviewCapabilities","reviewVersionEntry","params","listingId","String","superGate","data","user","enqueueSnackbar","setDetail","readmeView","setReadmeView","loaded","setLoaded","busy","setBusy","reason","setReason","rejectCategory","setRejectCategory","rejectBlocked","rejectCategoryNeedsComment","Boolean","requiresComment","takedownReason","setTakedownReason","selectedVersion","setSelectedVersion","refresh","response","encodeURIComponent","ok","json","post","payload","success","method","headers","body","JSON","stringify","result","catch","variant","error","allowDuplicate","signRealm","version","action","setVersionRevoked","revoke","takedown","hidden","trim","displayName","status","reviewStatus","blocked","checklistOutstanding","length","reviewEntry","versions","find","entry","reviewVersion","liveOnReviewVersion","activeInstalls","artifactUrl","process","item","sha256","path","origin","env","NEXT_PUBLIC_PLUGIN_ORIGIN","replace","bucketUrl","artifactsBucket","object","publisherTextOf","element","lines","walk","value","push","Array","isArray","forEach","index","key","Object","entries","checklistLink","itemId","previousApproved","filter","reviewState","at","repositoryUrl","href","label","external","orgDetail","publisherId","publisherSlug","homepageUrl","capabilities","findings","verifier","problems","slice","sort","a","b","indexOf","level","checks","findingsByCheck","Map","untaggedFindings","finding","id","check","some","set","get","countBy","title","topic","anchor","spacing","height","severity","header","help","excerpt","contentGutterX","contentGutterY","direction","sx","alignItems","flexWrap","size","color","latestVersion","priceUsd","unpublished","meaning","publisherName","includes","rejectionReason","rejectionCategory","hiddenReason","description","license","categories","map","category","justifyContent","gap","exclusive","onChange","_event","next","readme","maxHeight","overflowY","border","borderColor","borderRadius","p","bgcolor","source","component","whiteSpace","fontFamily","fontSize","m","network","join","events","hostAbi","platformHostAbi","elements","pl","line","wordBreak","verifierCached","marker","glyph","name","aria-label","width","undefined","problem","ml","message","attestation","attestedBy","attestedAt","Date","toLocaleDateString","claimed","updateOnly","my","publisherAgreement","state","acceptedAt","required","checklist","control","checked","disabled","event","target","realmOnly","link","bucket","rel","live","select","minWidth","onClick","mt","revoked","span","verificationRequest","declineReason","maxWidth","window","prompt","private","slotProps","displayEmpty","inputLabel","shrink","placeholder","grandfathered","trust","publishedAt"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;AAGA,SACEA,cAAc,EACdC,gBAAgB,EA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,KAAK,UAAU,WAAW;8DAIxC/K,MAAM+K,KAAK,KAAK,UACb,uBACA;;;0DAOR,KAAClR;gDACCkL,MAAK;gDACLC,OAAOhF,MAAMiK,OAAO,GAAG,YAAY;gDACnCZ,UAAUtM;gDACVgN,SAAS,IACP,KAAK7K,kBAAkBc,MAAMhB,OAAO,EAAE,CAACgB,MAAMiK,OAAO;0DAGrDjK,MAAMiK,OAAO,GAAG,gBAAgB;;;uCAjG9BjK,MAAMhB,OAAO;;;;;kCA0G1B,KAAC3F;wBAAYiL,QAAO;wBAClBC,MAAMtJ,eAAe,qBAAqB;4BACxCiJ,QAAQ;4BACRM,SACE,sEACA;wBACJ;wBAAIC,cAAc;wBAACC,cAAc;kCACjC,cAAA,MAACpK;4BAAM6J,SAAS;;8CACd,KAACxJ;oCAAWiE,SAAQ;oCAAQoG,OAAM;8CAC/B,0DACC,uDACA,kDACA;;8CAEJ,MAAC1K;oCACCqK,WAAU;oCACVR,SAAS;oCACTS,IAAI;wCAAEC,YAAY;wCAAUC,UAAU;oCAAO;;wCAE5C9I,OAAOqD,MAAM,GAAG,qBACf,KAAC9E;4CACCwK,MAAK;4CACL8F,aAAY;4CACZzJ,OAAO3D;4CACPyI,UAAU,CAACoD,QACT5L,kBAAkB4L,MAAMC,MAAM,CAACnI,KAAK;4CAEtCwD,IAAI;gDAAEkF,UAAU;4CAAI;;sDAGxB,KAACjQ;4CACCkL,MAAK;4CACLnG,SAAS5C,OAAOqD,MAAM,GAAG,SAAS;4CAClC2F,OAAOhJ,OAAOqD,MAAM,GAAG,YAAY;4CACnCgK,UAAUtM;4CACVgN,SAAS,IAAM,KAAK3K;sDAEnBpD,OAAOqD,MAAM,GAAG,oBAAoB;;;;;;;;;;;AAS3D;AAEA,eAAe1D,mBAAkB"}
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/marketplace/src/lib/components/plugin-review-detail.component.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n'use client'\n\nimport { ICON_VARIANT_SYMBOL_FLAG } from '@aglyn/shared-data-enums'\nimport {\n PageHeaderHelp,\n PageHeaderRecord,\n resolveStaffRoleGate,\n SUPER_STAFF_ONLY_REASON,\n type ConsoleStaffPagePaths,\n} from '@aglyn/aglyn'\nimport { AppLink, CardDisplay } from '@aglyn/shared-ui-jsx'\nimport BlockedControl from '@aglyn/shared-ui-jsx/components/blocked-control.component'\nimport {\n listingPath,\n orgMarketplacePath,\n publisherPath,\n} from '../model/marketplace-paths'\nimport { useSnackbar } from '@aglyn/shared-ui-snackstack'\nimport {\n Alert,\n Box,\n Button,\n Checkbox,\n Chip,\n Divider,\n FormControlLabel,\n Link as MuiLink,\n MenuItem,\n Skeleton,\n Stack,\n TextField,\n ToggleButton,\n ToggleButtonGroup,\n Tooltip,\n Typography,\n} from '@mui/material'\nimport { useCallback, useEffect, useState } from 'react'\nimport { useUser } from '@aglyn/tenant-feature-instance'\nimport { MarkdownLiteView } from '@aglyn/aglyn-markdown-editor'\nimport { pluginDocsHelp } from '@aglyn/aglyn'\nimport { PLUGIN_REVIEW_CHECKLIST } from '../model/plugin-review-checklist'\nimport {\n PLUGIN_REJECTION_CATEGORIES,\n pluginRejectionCategory,\n rejectionHeadline,\n rejectionInputError,\n} from '../model/plugin-rejection-categories'\nimport { PUBLISHER_ATTESTATION } from '../model/publisher-attestation'\nimport { authorizedFetch } from '@aglyn/shared-util-http/authorized-token'\nimport { reviewStatusMeaning } from '../model/plugin-review-status'\n\ninterface VersionEntry {\n version: string\n trust: string | null\n sha256: string\n hostAbi: number | null\n capabilities: { network?: string[]; events?: string[] }\n /**\n * Canvas elements this version declares (AGL-1031) — publisher-authored\n * text the besigner renders in the element picker AND ranks its search on,\n * and the subject of the `element-metadata` criterion (AGL-2486).\n *\n * Deliberately untyped past the entry itself. The page prints whatever the\n * manifest holds rather than the fields it knew about when it was written,\n * so a reviewer keeps seeing everything the publisher wrote.\n */\n elements?: Array<Record<string, unknown>>\n publishedAt: string | null\n signed: boolean\n reviewState: string\n grandfathered: boolean\n /** Installs that ever landed on this version (AGL-1036). */\n installCount: number\n /** Installs pinned to it right now — the blast radius of a revoke. */\n activeInstalls: number\n /** Kill switch is on for these bytes (AGL-1085). */\n revoked: boolean\n}\n\ninterface ListingDetail {\n listingId: string\n displayName: string\n description: string\n readme: string\n license: string\n categories: string[]\n homepageUrl: string\n repositoryUrl: string\n publisherId: string\n publisherName: string\n publisherSlug: string | null\n reviewStatus: string\n rejectionReason: string\n rejectionCategory?: string\n priceUsd: number\n latestVersion: string\n activeInstalls: number\n hidden: boolean\n hiddenReason: string\n revoked: boolean\n unpublished: boolean\n platformHostAbi: number\n /** Bucket holding the bundle objects, for the Cloud console link (AGL-990). */\n artifactsBucket: string | null\n versions: VersionEntry[]\n verifier: {\n ok?: boolean\n problems?: Array<{ level: string; message: string; check?: string }>\n /** What was checked, including what passed and what never ran (AGL-1087). */\n checks?: Array<{\n id: string\n label: string\n status: 'pass' | 'fail' | 'question' | 'unknown'\n detail?: string\n }>\n error?: string\n } | null\n /** The verdict came from the version doc rather than a fresh download. */\n verifierCached: boolean\n /** Ticked items, keyed by id, for THIS version's bytes (AGL-963). */\n checklist: Record<string, { by: string | null }>\n checklistOutstanding: string[]\n /** Ids the publisher attested to for THIS version's bytes (AGL-969). */\n attestation: string[]\n /** Who signed the attestation, and when. */\n attestedBy: string | null\n attestedAt: string | null\n /** The org-level agreement this publisher is under (AGL-1077). */\n publisherAgreement: {\n version: string | null\n acceptedAt: string | null\n required: string\n state: 'none' | 'outdated' | 'current'\n }\n /** The version the checklist and verifier verdict above refer to. */\n reviewVersion: string\n private: boolean\n /** The publisher's standing ask for the Verified badge (AGL-1217). */\n verificationRequest?: {\n state?: string\n requestedAt?: string | null\n declineReason?: string | null\n } | null\n}\n\n/** Verifier findings read as a wall of text otherwise; group by severity. */\nconst SEVERITY_ORDER = ['error', 'warn', 'warning', 'info']\n\n/**\n * One plugin submission or listed plugin, in full (AGL-960).\n *\n * The index is for scanning; this is where a reviewer reads the manifest,\n * weighs the verifier findings and acts. Every consequential action lives\n * here rather than on the list, so nobody grants realm trust or takes a\n * plugin down while skimming rows.\n */\nexport function PluginReviewDetail({\n basePath,\n segments,\n staffRole,\n staffPaths,\n}: {\n basePath: string\n segments?: readonly string[]\n staffRole?: string | null\n staffPaths?: ConsoleStaffPagePaths\n}) {\n /*\n * The row this page is: the first segment beneath the queue. The surface\n * owns its subtree, so it also owns saying \"no such thing\" — which the\n * body below already does for a listing that was withdrawn while a link\n * to it sat in a reviewer's inbox.\n */\n const params = { listingId: String(segments?.[0] ?? '') }\n /*\n * Granting realm trust is super-only on the server (AGL-2131). The claim\n * is the app's and arrives as a prop; `null` is \"still reading the token\"\n * and must never render as a refusal, or every reviewer sees a disabled\n * button for a beat.\n */\n const superGate = resolveStaffRoleGate(staffRole, ['super'])\n const listingId = String(params?.listingId ?? '')\n const { data: user } = useUser()\n const { enqueueSnackbar } = useSnackbar()\n const [detail, setDetail] = useState<ListingDetail | null>(null)\n // Rendered by default (AGL-989) — the reviewer's first question is what a\n // buyer sees; Source is for auditing exactly what was submitted.\n const [readmeView, setReadmeView] = useState<'rendered' | 'source'>(\n 'rendered',\n )\n const [loaded, setLoaded] = useState(false)\n const [busy, setBusy] = useState(false)\n const [reason, setReason] = useState('')\n // Structured rejection (AGL-977). The comment stays — it is what tells a\n // publisher what to fix — but it is no longer the only thing recorded.\n const [rejectCategory, setRejectCategory] = useState('')\n // The same predicate the route enforces, so the button and the server\n // cannot disagree about what a complete rejection looks like.\n const rejectBlocked = rejectionInputError(rejectCategory, reason)\n const rejectCategoryNeedsComment = Boolean(\n pluginRejectionCategory(rejectCategory)?.requiresComment,\n )\n const [takedownReason, setTakedownReason] = useState('')\n // Which version is being reviewed. Empty = let the server pick the oldest\n // one still awaiting a verdict, which is the work queue for this listing.\n const [selectedVersion, setSelectedVersion] = useState('')\n\n const refresh = useCallback(async () => {\n if (!listingId) return\n const response = await authorizedFetch(\n user,\n `/api/marketplace/admin/reviews?listingId=${encodeURIComponent(listingId)}` +\n (selectedVersion\n ? `&version=${encodeURIComponent(selectedVersion)}`\n : ''),\n )\n if (response.ok) setDetail(await response.json())\n setLoaded(true)\n }, [user, listingId, selectedVersion])\n\n useEffect(() => {\n if (user) void refresh()\n }, [user, refresh])\n\n const post = useCallback(\n async (payload: Record<string, unknown>, success: string) => {\n setBusy(true)\n try {\n const response = await authorizedFetch(\n user,\n '/api/marketplace/admin/reviews',\n {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ listingId, ...payload }),\n },\n )\n const result = await response.json().catch(() => ({}))\n if (response.ok) {\n enqueueSnackbar(success, { variant: 'success' })\n await refresh()\n } else {\n enqueueSnackbar(result?.error ?? 'Action failed', {\n variant: 'error',\n allowDuplicate: true,\n })\n }\n } finally {\n setBusy(false)\n }\n },\n [user, listingId, enqueueSnackbar, refresh],\n )\n\n const signRealm = useCallback(\n async (version: string, action: 'grant' | 'revoke') => {\n setBusy(true)\n try {\n const response = await authorizedFetch(\n user,\n '/api/marketplace/admin/trust',\n {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n listingId,\n version,\n ...(action === 'revoke' ? { action: 'revoke' } : {}),\n }),\n },\n )\n const result = await response.json().catch(() => ({}))\n if (response.ok) {\n enqueueSnackbar(\n action === 'revoke'\n ? `v${version} returned to the sandbox`\n : `v${version} signed for the app realm`,\n { variant: 'success' },\n )\n await refresh()\n } else {\n enqueueSnackbar(result?.error ?? 'Signing failed', {\n variant: 'error',\n allowDuplicate: true,\n })\n }\n } finally {\n setBusy(false)\n }\n },\n [user, listingId, enqueueSnackbar, refresh],\n )\n\n /**\n * Per-version kill switch (AGL-1085). Distinct from `takedown`, which\n * revokes EVERY version and hides the listing: stopping one version's\n * bytes must not also stop the approved version customers are running.\n */\n const setVersionRevoked = useCallback(\n async (version: string, revoke: boolean) => {\n await post(\n {\n action: revoke ? 'revoke-version' : 'unrevoke-version',\n version,\n },\n revoke\n ? `v${version} stopped — running installs render a placeholder on next load`\n : `v${version} allowed to run again`,\n )\n },\n [post],\n )\n\n const takedown = useCallback(async () => {\n if (!detail) return\n if (!detail.hidden && !takedownReason.trim()) {\n return void enqueueSnackbar('Taking a plugin down needs a reason', {\n variant: 'warning',\n allowDuplicate: true,\n })\n }\n await post(\n {\n action: detail.hidden ? 'unhide' : 'hide',\n reason: takedownReason,\n },\n detail.hidden\n ? `${detail.displayName} restored`\n : `${detail.displayName} taken down — running installs stop on next load`,\n )\n setTakedownReason('')\n }, [detail, takedownReason, post, enqueueSnackbar])\n\n const status = reviewStatusMeaning(detail?.reviewStatus ?? '')\n const blocked = (detail?.checklistOutstanding.length ?? 0) > 0\n\n /**\n * The version the approve/reject buttons act on (AGL-1085). Rejecting does\n * not stop bytes that are already pinned — the runtime resolves a pin by\n * {version, sha256} and only asks whether it is revoked — so the reviewer\n * needs this version's live-install count at the moment they decide, not\n * on some other page.\n */\n const reviewEntry = detail?.versions.find(\n (entry) => entry.version === detail?.reviewVersion,\n )\n const liveOnReviewVersion = reviewEntry?.activeInstalls ?? 0\n\n /**\n * Where a reviewer actually goes to check each item (AGL-973).\n *\n * Without these, the checklist asks people to \"read the bundle source\"\n * with no way to reach it — the bundle lives in a private bucket behind\n * the plugin origin, and its URL is content-addressed, so nobody could\n * construct it by hand. An unactionable checklist gets ticked without\n * being done, which is worse than no checklist.\n */\n const artifactUrl = (version: string) => {\n const entry = detail?.versions.find((item) => item.version === version)\n if (!entry?.sha256) return null\n const path = `/artifacts/${detail?.listingId}/${version}/${entry.sha256}.bundle`\n const origin = process.env.NEXT_PUBLIC_PLUGIN_ORIGIN ?? ''\n // The plugin origin just edge-rewrites to the console's own artifact\n // route, so fall back to that directly when the origin is unset — as it\n // is on every dev machine. Without the fallback the \"read the bundle\n // source\" link silently vanished exactly where it matters most, and a\n // reviewer had no way to reach the code they are certifying.\n return origin\n ? `${origin.replace(/\\/+$/, '')}${path}`\n : `/api/plugin-artifacts/${detail?.listingId}/${version}/${entry.sha256}.bundle`\n }\n\n /**\n * The stored object in the Cloud console (AGL-990) — the served bundle is\n * what a reviewer READS, this is where they see the bytes: size, upload\n * time, content type, generation. The bucket is not in the Firebase\n * console, so nobody finds this by hand.\n */\n const bucketUrl = (version: string) => {\n const entry = detail?.versions.find((item) => item.version === version)\n if (!entry?.sha256 || !detail?.artifactsBucket) return null\n const object = `artifacts/${detail.listingId}/${version}/${entry.sha256}.bundle`\n return (\n 'https://console.cloud.google.com/storage/browser/_details/' +\n `${detail.artifactsBucket}/${object}`\n )\n }\n\n /**\n * Every string a publisher wrote on one declared element (AGL-2486).\n *\n * Derived by WALKING the entry rather than by reading named fields, so text\n * added to the manifest later — the way `tags` and `keywords` became\n * searched after `description` became rendered — shows up here without\n * anyone remembering this page. The criterion asks a reviewer to check the\n * publisher's text, so the page has to show all of it, including the search\n * terms that rank without ever rendering.\n */\n const publisherTextOf = (element: Record<string, unknown>): string[] => {\n const lines: string[] = []\n const walk = (value: unknown, path: string) => {\n if (lines.length >= 40) return\n if (typeof value === 'string') {\n if (value.trim()) lines.push(`${path}: ${value}`)\n return\n }\n if (Array.isArray(value)) {\n value.forEach((entry, index) => walk(entry, `${path}[${index}]`))\n return\n }\n if (value && typeof value === 'object') {\n for (const [key, entry] of Object.entries(value)) {\n walk(entry, `${path}.${key}`)\n }\n }\n }\n for (const [key, value] of Object.entries(element ?? {})) {\n // The icon is an mdi NAME looked up in our own set, not publisher prose.\n if (key === 'id' || key === 'icon') continue\n walk(value, key)\n }\n return lines\n }\n\n const checklistLink = (\n itemId: string,\n ): { href: string; label: string; external?: boolean } | null => {\n if (!detail) return null\n // The version approved before this one — what a diff should be against.\n const previousApproved = detail.versions\n .filter(\n (entry) =>\n entry.version !== detail.reviewVersion &&\n entry.reviewState === 'approved',\n )\n .at(0)\n switch (itemId) {\n case 'provenance':\n return detail.repositoryUrl\n ? { href: detail.repositoryUrl, label: 'Open repository', external: true }\n : null\n case 'publisher':\n return {\n href: staffPaths?.orgDetail(detail.publisherId) ?? '',\n label: 'Publisher workspace',\n }\n case 'source-read': {\n const href = artifactUrl(detail.reviewVersion)\n return href\n ? { href, label: `Read v${detail.reviewVersion} bundle`, external: true }\n : null\n }\n case 'diff': {\n const href = previousApproved\n ? artifactUrl(previousApproved.version)\n : null\n return href\n ? {\n href,\n label: `Previous approved: v${previousApproved?.version}`,\n external: true,\n }\n : null\n }\n case 'element-metadata':\n // Where the copy is READ, which is the whole difficulty with this\n // one: the picker lives in the besigner on whatever site the\n // reviewer installed it to, so the listing is the closest thing to\n // a starting point this page can hand them.\n return detail.publisherSlug\n ? {\n href: listingPath(\n orgMarketplacePath(detail.publisherSlug),\n detail.listingId,\n ),\n label: 'Install, then open the element picker',\n }\n : null\n case 'behaviour':\n return detail.publisherSlug\n ? {\n href: listingPath(\n orgMarketplacePath(detail.publisherSlug),\n detail.listingId,\n ),\n label: 'Marketplace listing',\n }\n : null\n case 'license':\n case 'support':\n return detail.homepageUrl\n ? { href: detail.homepageUrl, label: 'Homepage', external: true }\n : detail.repositoryUrl\n ? { href: detail.repositoryUrl, label: 'Repository', external: true }\n : null\n default:\n return null\n }\n }\n\n // Everything in the Security card is a statement about the version under\n // review, whose capabilities are what the verifier checked against.\n const reviewVersionEntry = detail?.versions.find(\n (entry) => entry.version === detail?.reviewVersion,\n )\n const reviewCapabilities = reviewVersionEntry?.capabilities\n\n const findings = (detail?.verifier?.problems ?? [])\n .slice()\n .sort(\n (a, b) =>\n SEVERITY_ORDER.indexOf(a.level) - SEVERITY_ORDER.indexOf(b.level),\n )\n\n // The per-check summary (AGL-1087). Findings hang off the check that\n // produced them, so a reviewer reads \"why\" beside \"what\", and the counts\n // below say in one line whether this verdict is mostly green or mostly\n // questions. Findings from a checker that did not tag them fall through to\n // their own list rather than disappearing.\n const checks = detail?.verifier?.checks ?? []\n const findingsByCheck = new Map<string, typeof findings>()\n const untaggedFindings: typeof findings = []\n for (const finding of findings) {\n const id = finding.check\n if (!id || !checks.some((check) => check.id === id)) {\n untaggedFindings.push(finding)\n continue\n }\n findingsByCheck.set(id, [...(findingsByCheck.get(id) ?? []), finding])\n }\n const countBy = (status: string) =>\n checks.filter((check) => check.status === status).length\n\n return (\n <>\n {/*\n The listing's own name in the heading and the trail: a review page\n headed \"Plugin reviews\" reads identically on every submission, and\n two reviewers with two tabs open would share one title.\n */}\n <PageHeaderRecord title={detail?.displayName ?? ''} />\n <PageHeaderHelp\n topic=\"publisherHandbook\"\n anchor=\"#review-what-happens-after-you-publish\"\n />\n {!loaded ? (\n <Stack spacing={2}>\n <Skeleton variant=\"rounded\" height={120} />\n <Skeleton variant=\"rounded\" height={220} />\n </Stack>\n ) : !detail ? (\n <Alert severity=\"warning\">\n {'That listing no longer exists.'}\n </Alert>\n ) : (\n <Stack spacing={3}>\n {/* Status first: a reviewer needs to know what state they\n are acting on before they read a word of the manifest. */}\n <CardDisplay header=\"Status\"\n help={pluginDocsHelp('publisherHandbook', {\n anchor: '#review-what-happens-after-you-publish',\n excerpt:\n 'Where this version stands: submitted, listed, verified, or ' +\n 'rejected — and what each state lets a customer do.',\n })} contentGutterX contentGutterY>\n <Stack spacing={1.5}>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <Chip size=\"small\" color={status.color} label={status.label} />\n <Chip\n size=\"small\"\n variant=\"outlined\"\n label={`v${detail.latestVersion || '—'}`}\n />\n <Chip\n size=\"small\"\n variant=\"outlined\"\n label={\n detail.priceUsd > 0 ? `$${detail.priceUsd}` : 'Free'\n }\n />\n <Chip\n size=\"small\"\n variant=\"outlined\"\n label={`${detail.activeInstalls} install${\n detail.activeInstalls === 1 ? '' : 's'\n }`}\n />\n {detail.hidden ? (\n <Chip\n size=\"small\"\n color=\"error\"\n label=\"Taken down — revoked\"\n />\n ) : null}\n {detail.unpublished ? (\n <Chip\n size=\"small\"\n color=\"warning\"\n label=\"Unpublished by the publisher\"\n />\n ) : null}\n </Stack>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {status.meaning}\n </Typography>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'Publisher: '}\n {detail.publisherSlug ? (\n <AppLink\n // The storefront route takes a handle now\n // (AGL-1001). This payload carries the org's slug\n // and name, not the publisher profile's handle, so\n // it passes the id — which that page still\n // resolves, the same fallback that keeps existing\n // links working.\n href={publisherPath(\n orgMarketplacePath(detail.publisherSlug),\n detail.publisherId,\n )}\n >\n {detail.publisherName}\n </AppLink>\n ) : (\n detail.publisherName\n )}\n {` · ${detail.listingId}`}\n </Typography>\n {/* Grandfathering (AGL-965): plugins listed before the\n checklist existed are still listed — retroactively\n emptying the marketplace would be worse than the gap\n — but staff should be able to see which ones carry\n no recorded review for the bytes running today. */}\n {['listed', 'verified'].includes(detail.reviewStatus) &&\n detail.checklistOutstanding.length ? (\n <Alert severity=\"warning\">\n {`Live in the marketplace with no recorded review for these bytes (${detail.checklistOutstanding.length} required item(s) outstanding). Work through the checklist, or delist while you do.`}\n </Alert>\n ) : null}\n {detail.rejectionReason ? (\n <Alert severity=\"error\">\n {`Rejected: ${rejectionHeadline(\n detail.rejectionCategory,\n detail.rejectionReason,\n )}${\n detail.rejectionReason &&\n pluginRejectionCategory(detail.rejectionCategory)\n ? ` — ${detail.rejectionReason}`\n : ''\n }`}\n </Alert>\n ) : null}\n {detail.hidden ? (\n <Alert severity=\"error\">\n {detail.hiddenReason\n ? `Taken down: ${detail.hiddenReason}`\n : 'Taken down (no reason recorded)'}\n </Alert>\n ) : null}\n </Stack>\n </CardDisplay>\n\n <CardDisplay header=\"Overview\"\n help={pluginDocsHelp('publisherHandbook', {\n excerpt:\n 'The listing as a customer sees it — name, description, media and ' +\n 'links, all publisher-supplied.',\n })} contentGutterX contentGutterY>\n <Stack spacing={1.5}>\n <Typography variant=\"body2\">\n {detail.description || 'No description.'}\n </Typography>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n {detail.license ? (\n <Chip size=\"small\" variant=\"outlined\" label={detail.license} />\n ) : (\n <Chip size=\"small\" color=\"warning\" label=\"No license\" />\n )}\n {detail.categories.map((category) => (\n <Chip key={category} size=\"small\" label={category} />\n ))}\n </Stack>\n {detail.homepageUrl || detail.repositoryUrl ? (\n <Typography variant=\"body2\" color=\"text.secondary\">\n {detail.homepageUrl ? `Homepage: ${detail.homepageUrl}` : ''}\n {detail.homepageUrl && detail.repositoryUrl ? ' · ' : ''}\n {detail.repositoryUrl\n ? `Repository: ${detail.repositoryUrl}`\n : ''}\n </Typography>\n ) : null}\n <Divider />\n {/* A reviewer needs both halves (AGL-989): the rendered\n page a buyer lands on, and the exact source the\n publisher submitted. */}\n <Stack\n direction=\"row\"\n sx={{\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 1,\n }}\n >\n <Typography variant=\"subtitle2\">{'README'}</Typography>\n <ToggleButtonGroup\n exclusive\n size=\"small\"\n value={readmeView}\n onChange={(_event, next) => {\n if (next) setReadmeView(next as 'rendered' | 'source')\n }}\n >\n <ToggleButton value=\"rendered\">\n <Typography variant=\"caption\">\n {'Rendered'}\n </Typography>\n </ToggleButton>\n <ToggleButton value=\"source\">\n <Typography variant=\"caption\">{'Source'}</Typography>\n </ToggleButton>\n </ToggleButtonGroup>\n </Stack>\n {detail.readme ? (\n // Framed (AGL-991): everything inside this border is\n // publisher-submitted content, not our page. On a review\n // screen that boundary is the whole job.\n <Box\n sx={{\n maxHeight: 480,\n overflowY: 'auto',\n border: 1,\n borderColor: 'divider',\n borderRadius: 1,\n p: 2,\n bgcolor: 'action.hover',\n }}\n >\n {readmeView === 'rendered' ? (\n <MarkdownLiteView source={detail.readme} />\n ) : (\n <Typography\n variant=\"body2\"\n component=\"pre\"\n sx={{\n whiteSpace: 'pre-wrap',\n fontFamily: 'monospace',\n fontSize: 12,\n m: 0,\n }}\n >\n {detail.readme}\n </Typography>\n )}\n </Box>\n ) : (\n <Alert severity=\"warning\">\n {'No README — publishers are expected to ship one.'}\n </Alert>\n )}\n </Stack>\n </CardDisplay>\n\n {/* What the bundle is allowed to reach, and what the static\n verifier found in it. The two questions that decide\n whether this code may run in the app realm. */}\n <CardDisplay header=\"Security\"\n help={pluginDocsHelp('sandboxSecurity', {\n excerpt:\n 'What the bundle asked for, against what the sandbox enforces ' +\n 'regardless of what it asked for.',\n })} contentGutterX contentGutterY>\n <Stack spacing={1.5}>\n {/* The version under review, not the latest one: the\n verifier diffs network calls against THESE declared\n origins (AGL-964), so showing another version's\n capabilities beside its findings would misexplain\n them. */}\n <Typography variant=\"body2\" color=\"text.secondary\">\n {`Declared network: ${\n reviewCapabilities?.network?.join(', ') || 'none'\n } · events: ${\n reviewCapabilities?.events?.join(', ') || 'none'\n }`}\n </Typography>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {`Host ABI: declared ${\n reviewVersionEntry?.hostAbi ?? 'none (legacy)'\n }, platform runs ${detail.platformHostAbi}`}\n </Typography>\n {/* Declared elements (AGL-2486). Not a capability — copy.\n The picker renders this name and description inside the\n customer's console, and the listing page shows neither,\n so a reviewer working from the listing alone never meets\n it. \"Declares none\" and \"we never looked\" must not read\n the same, hence the explicit empty line. */}\n <Stack spacing={0.5}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {`Declared elements: ${\n reviewVersionEntry?.elements?.length ?? 0\n } — publisher text the picker renders and ranks its search on, none of it on the listing page.`}\n </Typography>\n {(reviewVersionEntry?.elements ?? []).map((element) => (\n <Stack key={String(element['id'])} sx={{ pl: 1 }}>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {`${String(element['displayName'] || element['id'])}${\n element['category']\n ? ` · ${String(element['category'])}`\n : ''\n }`}\n </Typography>\n {publisherTextOf(element).map((line) => (\n <Typography\n key={line}\n variant=\"caption\"\n color=\"text.secondary\"\n sx={{\n pl: 1,\n fontFamily: 'monospace',\n fontSize: 11,\n wordBreak: 'break-word',\n }}\n >\n {line}\n </Typography>\n ))}\n </Stack>\n ))}\n </Stack>\n {/* \"No findings\" and \"never checked\" must not look the\n same. A null verdict means the artifacts bucket is\n unreachable or unconfigured, and rendering that as a\n clean bill of health would invite a reviewer to\n approve a bundle nobody has inspected. */}\n {!detail.verifier ? (\n <Alert severity=\"warning\">\n {'The static verifier has not run for this version — ' +\n 'no artifact was reachable. Treat this as unchecked, ' +\n 'not as clean.'}\n </Alert>\n ) : detail.verifier.error ? (\n <Alert severity=\"warning\">\n {`Verifier could not run: ${detail.verifier.error}`}\n </Alert>\n ) : (\n <Stack spacing={1}>\n {/* One line for the whole verdict, then the areas\n themselves (AGL-1087). \"Found nothing\" alone could\n not tell a reviewer whether ten checks passed or\n the interesting one never ran. */}\n <Typography variant=\"body2\" color=\"text.secondary\">\n {checks.length\n ? [\n `${countBy('pass')} passed`,\n countBy('fail')\n ? `${countBy('fail')} failed`\n : '',\n countBy('question')\n ? `${countBy('question')} to question`\n : '',\n countBy('unknown')\n ? `${countBy('unknown')} could not run`\n : '',\n ]\n .filter(Boolean)\n .join(' · ')\n : detail.verifier.ok\n ? 'Static verifier found nothing.'\n : 'Static verifier found problems.'}\n {/* Says WHICH bytes, because that is what makes a\n stored verdict trustworthy — not when it ran. */}\n {detail.verifierCached\n ? ' · stored verdict for these exact bytes'\n : ''}\n </Typography>\n {checks.map((check) => {\n // The state has to survive being read aloud and being\n // read by someone who cannot separate the red from the\n // green (AGL-1089), so it is named in text as well as\n // drawn — this is a page people skim to decide whether\n // code runs in other people's workspaces.\n const marker =\n check.status === 'pass'\n ? { glyph: '✓', color: 'success.main', name: 'Passed' }\n : check.status === 'fail'\n ? { glyph: '✕', color: 'error.main', name: 'Failed' }\n : check.status === 'question'\n ? {\n glyph: '?',\n color: 'warning.main',\n name: 'Worth questioning',\n }\n : {\n glyph: '—',\n color: 'text.disabled',\n name: 'Not checked',\n }\n return (\n <Stack key={check.id} spacing={0.5}>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'baseline' }}\n >\n <Typography\n variant=\"body2\"\n aria-label={`${marker.name}:`}\n sx={{ color: marker.color, width: 16 }}\n >\n {marker.glyph}\n </Typography>\n <Typography\n variant=\"body2\"\n color={\n check.status === 'unknown'\n ? 'text.secondary'\n : undefined\n }\n >\n {check.label}\n {check.status === 'unknown'\n ? ' — not checked'\n : ''}\n </Typography>\n {check.detail ? (\n <Typography\n variant=\"caption\"\n color=\"text.secondary\"\n >\n {check.detail}\n </Typography>\n ) : null}\n </Stack>\n {(findingsByCheck.get(check.id) ?? []).map(\n (problem, index) => (\n <Alert\n key={`${check.id}-${index}`}\n severity={\n problem.level === 'error'\n ? 'error'\n : 'warning'\n }\n sx={{ ml: 3 }}\n >\n {problem.message}\n </Alert>\n ),\n )}\n </Stack>\n )\n })}\n {/* A verdict stored before findings carried their check\n (AGL-1087) still has to be readable. */}\n {untaggedFindings.map((problem, index) => (\n <Alert\n key={`untagged-${index}`}\n severity={\n problem.level === 'error' ? 'error' : 'warning'\n }\n >\n {problem.message}\n </Alert>\n ))}\n {checks.length ? (\n <Typography variant=\"caption\" color=\"text.secondary\">\n {'A full column of ticks means these shapes were ' +\n 'not found in code the parser could read. It is ' +\n 'not a statement that the plugin is safe — that ' +\n 'is the checklist below.'}\n </Typography>\n ) : null}\n </Stack>\n )}\n </Stack>\n </CardDisplay>\n\n {/* What the PUBLISHER claimed (AGL-969), read before the\n reviewer's own list below. Not evidence — nothing here is\n verified by anyone but the person who submitted it — but it\n says where to look: an attestation that contradicts the\n bundle is a documented false statement by a named publisher\n on a date, which is what makes removal defensible rather\n than a judgement call. */}\n <CardDisplay\n header={`Publisher attestation — v${detail.reviewVersion} (${detail.attestation.length}/${PUBLISHER_ATTESTATION.length})`}\n help={pluginDocsHelp('publisherHandbook', {\n anchor: '#the-two-badges-and-what-each-one-promises',\n excerpt:\n 'What the publisher asserted about THIS version. Their claim, not ' +\n 'our finding — the checklist below is ours.',\n })}\n contentGutterX\n contentGutterY\n >\n <Stack spacing={1}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {detail.attestedBy\n ? `Stated by ${detail.attestedBy}${\n detail.attestedAt\n ? ` on ${new Date(\n detail.attestedAt,\n ).toLocaleDateString()}`\n : ''\n }, against this version's exact bytes.`\n : 'Nothing recorded for these bytes.'}\n </Typography>\n {detail.attestation.length ? null : (\n <Alert severity=\"info\">\n {'Published before publishers were asked to attest, or ' +\n 'republished since. Check everything yourself — the ' +\n 'absence of a claim is not a claim.'}\n </Alert>\n )}\n {PUBLISHER_ATTESTATION.map((item) => {\n const claimed = detail.attestation.includes(item.id)\n return (\n <Stack key={item.id} spacing={0.25}>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <Typography\n variant=\"body2\"\n color={claimed ? undefined : 'text.secondary'}\n >\n {claimed ? '✓' : '—'} {item.label}\n </Typography>\n {item.updateOnly ? (\n <Chip\n size=\"small\"\n variant=\"outlined\"\n label=\"Updates only\"\n />\n ) : null}\n </Stack>\n </Stack>\n )\n })}\n {/* Which terms this publisher is under (AGL-1077). Sits\n with the attestation because both answer \"what has this\n publisher committed to\" — but they answer it at\n different scopes. The attestation is about these bytes;\n this is about the relationship, and it is the one that\n decides what we are entitled to do if the bytes turn\n out to be a problem. */}\n <Divider sx={{ my: 1 }} />\n <Typography variant=\"body2\" color=\"text.secondary\">\n {detail.publisherAgreement?.state === 'current'\n ? `Publisher agreement v${detail.publisherAgreement.version} accepted` +\n (detail.publisherAgreement.acceptedAt\n ? ` on ${new Date(\n detail.publisherAgreement.acceptedAt,\n ).toLocaleDateString()}`\n : '') +\n '.'\n : detail.publisherAgreement?.state === 'outdated'\n ? `Publisher agreement: on v${detail.publisherAgreement.version}, ` +\n `current is v${detail.publisherAgreement.required}. This ` +\n 'version was published under the older terms.'\n : 'No publisher agreement on record — this org ' +\n 'published before one existed. Weigh a takedown ' +\n 'against the Terms of Service, not against terms ' +\n 'nobody accepted.'}\n </Typography>\n </Stack>\n </CardDisplay>\n\n {/* The checklist is the actual review (AGL-963). The verifier\n parses the bundle now (AGL-964), so computed access like\n g['ev'+'al'] no longer walks past it — but it still reads\n only shapes, never intent. These items are the things a\n machine structurally cannot judge. */}\n <CardDisplay\n header={`Review checklist — v${detail.reviewVersion} (${\n PLUGIN_REVIEW_CHECKLIST.filter(\n (item) => detail.checklist?.[item.id],\n ).length\n }/${PLUGIN_REVIEW_CHECKLIST.length})`}\n help={pluginDocsHelp('publisherHandbook', {\n anchor: '#review-what-happens-after-you-publish',\n excerpt:\n 'The checklist a reviewer works through. Re-earned per version — a ' +\n 'new release starts with none of it ticked.',\n })}\n contentGutterX\n contentGutterY\n >\n <Stack spacing={1}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'The static verifier is a lint, not a boundary — it ' +\n 'parses the bundle and reports shapes (computed access ' +\n 'on a global, undeclared network calls), but it cannot ' +\n 'judge what the code is for, and code it cannot see ' +\n 'through it says nothing about. These are the checks ' +\n 'only a person can make. Ticks are recorded against ' +\n \"this version's exact bytes and reset if it is \" +\n 'republished.'}\n </Typography>\n {detail.checklistOutstanding.length ? (\n <Alert severity=\"info\">\n {`${detail.checklistOutstanding.length} required item(s) outstanding — List and Verify stay blocked until they are done. Rejecting never needs the checklist.`}\n </Alert>\n ) : (\n <Alert severity=\"success\">\n {'Every required item is recorded for these bytes.'}\n </Alert>\n )}\n {PLUGIN_REVIEW_CHECKLIST.map((item) => (\n <Stack key={item.id} spacing={0.25} sx={{ pl: 0.5 }}>\n <FormControlLabel\n control={\n <Checkbox\n size=\"small\"\n checked={Boolean(detail.checklist?.[item.id])}\n disabled={busy}\n onChange={(event) =>\n void post(\n {\n action: 'checklist',\n version: detail.reviewVersion,\n itemId: item.id,\n checked: event.target.checked,\n },\n event.target.checked\n ? 'Recorded'\n : 'Cleared',\n )\n }\n />\n }\n label={\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <Typography variant=\"body2\">\n {item.label}\n </Typography>\n {item.required ? (\n <Chip size=\"small\" label=\"Required\" />\n ) : null}\n {item.realmOnly ? (\n <Chip\n size=\"small\"\n variant=\"outlined\"\n label=\"Realm trust\"\n />\n ) : null}\n </Stack>\n }\n />\n <Typography\n variant=\"caption\"\n color=\"text.secondary\"\n sx={{ pl: 4 }}\n >\n {item.detail}\n </Typography>\n {(() => {\n const link = checklistLink(item.id)\n // The stored object sits beside what it serves\n // (AGL-990) — read the code, then inspect the bytes.\n const bucket =\n item.id === 'source-read' && detail\n ? bucketUrl(detail.reviewVersion)\n : null\n if (!link && !bucket) return null\n // External targets (the raw bundle, the publisher's\n // repo) are plain anchors on purpose; internal ones\n // go through AppLink so the SPA does not full-reload.\n return (\n <Stack\n direction=\"row\"\n spacing={2}\n sx={{ pl: 4, flexWrap: 'wrap' }}\n >\n {link ? (\n <Typography variant=\"caption\">\n {link.external ? (\n <MuiLink\n href={link.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {`${link.label} ↗`}\n </MuiLink>\n ) : (\n <AppLink href={link.href}>\n {link.label}\n </AppLink>\n )}\n </Typography>\n ) : null}\n {bucket ? (\n <Typography variant=\"caption\">\n <MuiLink\n href={bucket}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {'Object in Cloud Storage ↗'}\n </MuiLink>\n </Typography>\n ) : null}\n </Stack>\n )\n })()}\n </Stack>\n ))}\n </Stack>\n </CardDisplay>\n\n {/* Verdicts, ordered by consequence rather than by the\n order they were built (AGL-966). The old card was a flat\n row of same-weight text buttons where \"List\" — the click\n that makes a plugin installable by every workspace — sat\n between \"Start review\" and a rejection box. */}\n <CardDisplay\n header=\"Review verdict\"\n contentGutterX\n contentGutterY\n help={pluginDocsHelp('manifestAndEnvs', {\n anchor: '#review--trust-lifecycle',\n excerpt:\n 'Move this submission through the review lifecycle — list, verify, or reject with a reason.',\n })}\n >\n <Stack spacing={2}>\n <Stack spacing={0.5}>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <Typography variant=\"body2\">{'Currently:'}</Typography>\n <Chip\n size=\"small\"\n color={status.color}\n label={status.label}\n />\n {status.live ? (\n <Chip size=\"small\" color=\"warning\" label=\"Live to customers\" />\n ) : (\n <Chip size=\"small\" variant=\"outlined\" label=\"Not installable\" />\n )}\n </Stack>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {status.meaning}\n </Typography>\n </Stack>\n\n <Divider />\n\n {/* The verdict that matters is per VERSION (AGL-966).\n Approving these bytes is what makes them installable;\n listing-level state only says whether the plugin is\n in the marketplace at all. */}\n <Stack spacing={0.5}>\n <Typography variant=\"subtitle2\">\n {`Verdict on v${detail.reviewVersion}`}\n </Typography>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <TextField\n size=\"small\"\n select\n value={detail.reviewVersion}\n onChange={(event) =>\n setSelectedVersion(event.target.value)\n }\n sx={{ minWidth: 160 }}\n >\n {detail.versions.map((entry) => (\n <MenuItem key={entry.version} value={entry.version}>\n {`v${entry.version} · ${entry.reviewState}`}\n </MenuItem>\n ))}\n </TextField>\n <Button\n size=\"small\"\n variant=\"contained\"\n color=\"success\"\n disabled={busy || blocked}\n onClick={() =>\n void post(\n {\n action: 'approve-version',\n version: detail.reviewVersion,\n },\n `v${detail.reviewVersion} approved`,\n )\n }\n >\n {'Approve version'}\n </Button>\n <Button\n size=\"small\"\n color=\"error\"\n disabled={busy}\n onClick={() =>\n void post(\n {\n action: 'reject-version',\n version: detail.reviewVersion,\n reason,\n },\n `v${detail.reviewVersion} rejected`,\n )\n }\n >\n {'Reject version'}\n </Button>\n </Stack>\n <Typography variant=\"caption\" color=\"text.secondary\">\n {'Approving makes these bytes the version new ' +\n 'installs receive. Existing installs are pinned and ' +\n 'do not move. A pending version is never installed ' +\n 'by anyone but its publisher, so an update cannot ' +\n 'ship past review.'}\n </Typography>\n {blocked ? (\n <Alert severity=\"info\" sx={{ mt: 0.5 }}>\n {`Blocked: ${detail.checklistOutstanding.length} required checklist item(s) outstanding for these bytes.`}\n </Alert>\n ) : null}\n {/* AGL-1085: a rejection is a verdict, not a kill. These\n bytes are live somewhere, so say so HERE — the number\n is what decides whether the kill switch is warranted,\n and a reviewer who has to go and find it will not. */}\n {liveOnReviewVersion > 0 ? (\n <Alert\n severity={reviewEntry?.revoked ? 'success' : 'warning'}\n sx={{ mt: 0.5 }}\n action={\n <Button\n size=\"small\"\n color=\"inherit\"\n disabled={busy}\n onClick={() =>\n void setVersionRevoked(\n detail.reviewVersion,\n !reviewEntry?.revoked,\n )\n }\n >\n {reviewEntry?.revoked\n ? 'Allow again'\n : 'Stop these bytes'}\n </Button>\n }\n >\n {reviewEntry?.revoked\n ? `v${detail.reviewVersion} is stopped. The ` +\n `${liveOnReviewVersion} site${\n liveOnReviewVersion === 1\n ? ' pinned to it renders'\n : 's pinned to it render'\n } a placeholder instead.`\n : `${liveOnReviewVersion} site${\n liveOnReviewVersion === 1\n ? ' is'\n : 's are'\n } running v${detail.reviewVersion} right now. ` +\n 'Rejecting it stops new installs but leaves ' +\n 'those running — stop the bytes if they should ' +\n 'not be executing.'}\n </Alert>\n ) : null}\n </Stack>\n\n <Divider />\n\n {/* Listing-level distribution, unchanged. */}\n <Stack spacing={0.5}>\n <Typography variant=\"subtitle2\">\n {'Marketplace listing'}\n </Typography>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n {/* The action the queue was missing (AGL-2059).\n `list` is what turns `isListingBrowsable` true —\n the moment third-party code becomes installable by\n every workspace — and it had no button, while\n `verify`, which only adds a badge, has had one all\n along. The only way a listing reached `listed` was\n the incidental mirror inside `approve-version`, so\n the consequential act happened as a side effect of\n a control labelled about something else, and a\n delisted plugin had no path back at all.\n\n Same checklist gate as `Verify` — the route gates\n both (and the `list` half of that gate had never\n been reachable). `warning`, matching the `listed`\n chip: this state is the live one, and the colour\n is the page's existing shorthand for that. */}\n {!['listed', 'verified'].includes(detail.reviewStatus) ? (\n <Tooltip\n title={\n blocked\n ? `Complete the review checklist first — ` +\n `${detail.checklistOutstanding.length} required ` +\n `item(s) outstanding for this version's bytes`\n : 'Makes this plugin browsable in the ' +\n 'marketplace and installable by every ' +\n 'workspace. This is the step that puts the ' +\n 'code in front of customers.'\n }\n >\n <span>\n <Button\n size=\"small\"\n color=\"warning\"\n variant=\"outlined\"\n disabled={busy || blocked}\n onClick={() =>\n void post(\n { action: 'list' },\n 'Listed — installable by every workspace',\n )\n }\n >\n {'List in marketplace'}\n </Button>\n </span>\n </Tooltip>\n ) : null}\n {/* Claiming a submission (AGL-2059). Ungated, as the\n route intends: `delist` reuses `in_review` but\n reads as a retreat, so with more than one reviewer\n there was no way to say \"I have this one\". */}\n {detail.reviewStatus === 'submitted' ? (\n <Button\n size=\"small\"\n variant=\"outlined\"\n disabled={busy}\n onClick={() =>\n void post(\n { action: 'start-review' },\n 'Marked in review',\n )\n }\n >\n {'Start review'}\n </Button>\n ) : null}\n {detail.reviewStatus !== 'verified' ? (\n // Say WHY it is disabled, at the button (AGL-1121).\n // The checklist alert lives elsewhere on the page, so\n // a reviewer met a greyed-out control with no stated\n // cause and reasonably read it as broken. The tooltip\n // names the count and where to clear it; a disabled\n // MUI Button swallows pointer events, so the wrapper\n // is what the tooltip can attach to.\n <Tooltip\n title={\n blocked\n ? `Complete the review checklist first — ` +\n `${detail.checklistOutstanding.length} required ` +\n `item(s) outstanding for this version's bytes`\n : ''\n }\n >\n <span>\n <Button\n size=\"small\"\n color=\"success\"\n variant=\"outlined\"\n disabled={busy || blocked}\n onClick={() =>\n void post({ action: 'verify' }, 'Verified')\n }\n >\n {'Verify ✓ (badge)'}\n </Button>\n </span>\n </Tooltip>\n ) : null}\n {/* Only when something is actually waiting (AGL-1217).\n Declining is a refusal of a request, not a verdict\n on the plugin — offering it with nothing pending\n would invite staff to refuse something nobody\n asked for. Verify is already on this bar and is\n how a request is GRANTED, so there is no second\n grant button. */}\n {/*\n * What a colleague already told this publisher\n * (AGL-2339).\n *\n * `declineReason` was served by the route and the page\n * only branched on `state`, so the PUBLISHER could read\n * the reason their verification was refused —\n * `listing-verification-request.component` renders it —\n * and the staff reviewer handling the re-request could\n * not. Whoever picks up the second ask would otherwise\n * re-decide it blind, or contradict the first answer.\n */}\n {detail.verificationRequest?.declineReason ? (\n <Chip\n size=\"small\"\n color=\"warning\"\n variant=\"outlined\"\n sx={{ maxWidth: 420 }}\n label={`Previously declined: ${detail.verificationRequest.declineReason}`}\n />\n ) : null}\n {detail.verificationRequest?.state === 'pending' ? (\n <Button\n size=\"small\"\n color=\"warning\"\n variant=\"outlined\"\n disabled={busy}\n onClick={() => {\n const reason = window.prompt(\n 'Why is verification declined? The publisher is ' +\n 'told this, and cannot ask again for 30 days.',\n )\n // `prompt` returns null on cancel and '' on an\n // empty submit. Neither is a decline — the server\n // requires a reason, and sending one anyway would\n // surface as an error the reviewer did not cause.\n if (!reason?.trim()) return\n void post(\n { action: 'decline-verification', reason },\n 'Verification declined',\n )\n }}\n >\n {'Decline verification'}\n </Button>\n ) : null}\n {detail.private ? (\n <Chip size=\"small\" label=\"Private — never listed\" />\n ) : null}\n </Stack>\n </Stack>\n\n <Divider />\n\n {/* Back down the ladder. Never checklist-gated — a\n retreat must always be available — and deliberately\n quieter than the danger zone below, which is the only\n control that reaches code already running. */}\n <Stack spacing={0.5}>\n <Typography variant=\"subtitle2\">{'Step back'}</Typography>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <TextField\n select\n size=\"small\"\n label=\"Rejection reason\"\n value={rejectCategory}\n onChange={(event) =>\n setRejectCategory(event.target.value)\n }\n // `displayEmpty` is not enough on a MUI Select: an\n // empty value renders NOTHING without a rendered\n // option, so the field reads as broken.\n slotProps={{\n select: { displayEmpty: true },\n inputLabel: { shrink: true },\n }}\n sx={{ minWidth: 260 }}\n >\n <MenuItem value=\"\">{'Select a reason…'}</MenuItem>\n {PLUGIN_REJECTION_CATEGORIES.map((entry) => (\n <MenuItem key={entry.id} value={entry.id}>\n {entry.label}\n </MenuItem>\n ))}\n </TextField>\n <TextField\n size=\"small\"\n placeholder={\n rejectCategoryNeedsComment\n ? 'Comment (required for “Other”)'\n : 'Comment (optional)'\n }\n value={reason}\n onChange={(event) => setReason(event.target.value)}\n sx={{ minWidth: 260 }}\n />\n {status.live ? (\n <Button\n size=\"small\"\n color=\"warning\"\n disabled={busy}\n onClick={() =>\n void post(\n { action: 'delist', reason },\n 'Delisted — back in review',\n )\n }\n >\n {'Delist'}\n </Button>\n ) : null}\n {detail.reviewStatus === 'verified' ? (\n <Button\n size=\"small\"\n disabled={busy}\n onClick={() =>\n void post({ action: 'unverify' }, 'Badge removed')\n }\n >\n {'Unverify'}\n </Button>\n ) : null}\n <Button\n size=\"small\"\n color=\"error\"\n // Disabled rather than left to fail server-side: the\n // route validates too, but a reviewer should not have\n // to press a button to learn the form is incomplete.\n disabled={busy || Boolean(rejectBlocked)}\n onClick={() =>\n void post(\n { action: 'reject', reason, category: rejectCategory },\n 'Rejected',\n )\n }\n >\n {'Reject'}\n </Button>\n </Stack>\n {rejectBlocked ? (\n <Typography variant=\"caption\" color=\"text.secondary\">\n {rejectBlocked}\n </Typography>\n ) : null}\n <Typography variant=\"caption\" color=\"text.secondary\">\n {'Delist pulls it from the marketplace and blocks new ' +\n 'installs; existing installs keep working. Unverify ' +\n 'only drops the badge. Reject notifies the publisher. ' +\n 'None of these stop code already running — that is ' +\n 'the danger zone.'}\n </Typography>\n </Stack>\n </Stack>\n </CardDisplay>\n\n <CardDisplay header=\"Versions\"\n help={pluginDocsHelp('publisherHandbook', {\n anchor: '#versioning--updates',\n excerpt:\n 'Every version this publisher has submitted. Review lives on the ' +\n 'VERSION, so each one is judged on its own.',\n })} contentGutterX contentGutterY>\n <Stack spacing={1}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'Granting realm trust signs a version to run inside ' +\n 'the app realm instead of the sandbox iframe. ' +\n 'Super-staff only, audited.'}\n </Typography>\n {/* The two axes get conflated constantly (AGL-966):\n review status is per LISTING and controls who can\n install; trust is per VERSION and controls what the\n code can reach once installed. Verified is not realm\n trust, and realm trust is the far more dangerous of\n the two. */}\n <Alert severity=\"info\">\n {'This is a different axis from the review verdict above. ' +\n 'Listing and verifying apply to the whole listing and ' +\n 'decide who may install it. Trust applies to ONE ' +\n 'version and decides where its code runs: sandboxed in ' +\n 'a cross-origin iframe capped by the manifest CSP, or ' +\n 'inside the app realm with neither of those between it ' +\n 'and user data. A verified plugin can be sandboxed, and ' +\n 'a sandboxed version of a verified plugin is the normal ' +\n 'case — realm trust is the exception that needs a ' +\n 'reason.'}\n </Alert>\n {detail.versions.map((entry) => (\n <Stack\n key={entry.version}\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n <Typography variant=\"body2\" sx={{ minWidth: 64 }}>\n {`v${entry.version}`}\n </Typography>\n {entry.version === detail.latestVersion ? (\n <Chip size=\"small\" label=\"Latest\" />\n ) : null}\n <Chip\n size=\"small\"\n color={\n entry.reviewState === 'approved'\n ? 'success'\n : entry.reviewState === 'rejected'\n ? 'error'\n : 'warning'\n }\n variant=\"outlined\"\n label={\n entry.grandfathered\n ? 'approved (grandfathered)'\n : entry.reviewState\n }\n />\n <Chip\n size=\"small\"\n color={entry.trust === 'realm' ? 'success' : 'default'}\n variant={entry.trust === 'realm' ? 'filled' : 'outlined'}\n label={\n entry.trust === 'realm' ? 'Realm-trusted' : 'Sandboxed'\n }\n />\n {/* AGL-1085. Two states worth distinguishing at a\n glance: bytes a reviewer turned off, and rejected\n bytes still executing somewhere — which a rejection\n alone never changes. */}\n {entry.revoked ? (\n <Chip size=\"small\" color=\"error\" label=\"Stopped\" />\n ) : entry.reviewState === 'rejected' &&\n entry.activeInstalls > 0 ? (\n <Chip\n size=\"small\"\n color=\"error\"\n variant=\"outlined\"\n label=\"Rejected but still running\"\n />\n ) : null}\n <Typography variant=\"caption\" color=\"text.secondary\">\n {entry.publishedAt\n ? new Date(entry.publishedAt).toLocaleDateString()\n : '—'}\n {` · ${entry.sha256.slice(0, 12)}`}\n {/* The blast radius of revoking THIS version\n (AGL-1036) — the listing total above answers a\n different question. */}\n {entry.activeInstalls\n ? ` · ${entry.activeInstalls} pinned here`\n : ''}\n </Typography>\n {/* Realm trust bypasses the plugin sandbox's CSP, so\n /api/marketplace/admin/trust is super-only. The button was\n live for support staff (AGL-2131). */}\n <BlockedControl\n blocked={superGate.blocked}\n reason={superGate.reason ?? SUPER_STAFF_ONLY_REASON}\n >\n <Button\n size=\"small\"\n color={entry.trust === 'realm' ? 'error' : 'success'}\n disabled={busy}\n onClick={() =>\n void signRealm(\n entry.version,\n entry.trust === 'realm' ? 'revoke' : 'grant',\n )\n }\n >\n {entry.trust === 'realm'\n ? 'Revoke realm trust'\n : 'Grant realm trust'}\n </Button>\n </BlockedControl>\n {/* The kill switch for THESE bytes (AGL-1085) —\n narrower than the takedown below, which stops every\n version including the one customers are happily\n running. */}\n <Button\n size=\"small\"\n color={entry.revoked ? 'success' : 'error'}\n disabled={busy}\n onClick={() =>\n void setVersionRevoked(entry.version, !entry.revoked)\n }\n >\n {entry.revoked ? 'Allow again' : 'Stop this version'}\n </Button>\n </Stack>\n ))}\n </Stack>\n </CardDisplay>\n\n {/* Separated on purpose: this is the only control here that\n reaches code already running in customers' workspaces. */}\n <CardDisplay header=\"Danger zone\"\n help={pluginDocsHelp('publisherHandbook', {\n anchor: '#review-what-happens-after-you-publish',\n excerpt:\n 'Rejecting a version is not a kill switch — it stops new installs ' +\n 'and leaves existing ones running.',\n })} contentGutterX contentGutterY>\n <Stack spacing={1.5}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n {'Taking a plugin down de-lists it AND writes the kill ' +\n 'switch: every workspace that already installed it ' +\n 'stops loading it on the next render, and new ' +\n 'installs are refused. Restoring clears both.'}\n </Typography>\n <Stack\n direction=\"row\"\n spacing={1}\n sx={{ alignItems: 'center', flexWrap: 'wrap' }}\n >\n {detail.hidden ? null : (\n <TextField\n size=\"small\"\n placeholder=\"Takedown reason\"\n value={takedownReason}\n onChange={(event) =>\n setTakedownReason(event.target.value)\n }\n sx={{ minWidth: 260 }}\n />\n )}\n <Button\n size=\"small\"\n variant={detail.hidden ? 'text' : 'outlined'}\n color={detail.hidden ? 'success' : 'error'}\n disabled={busy}\n onClick={() => void takedown()}\n >\n {detail.hidden ? 'Restore listing' : 'Take down'}\n </Button>\n </Stack>\n </Stack>\n </CardDisplay>\n </Stack>\n )}\n </>\n )\n}\n\nexport default PluginReviewDetail\n"],"names":["PageHeaderHelp","PageHeaderRecord","resolveStaffRoleGate","SUPER_STAFF_ONLY_REASON","AppLink","CardDisplay","BlockedControl","listingPath","orgMarketplacePath","publisherPath","useSnackbar","Alert","Box","Button","Checkbox","Chip","Divider","FormControlLabel","Link","MuiLink","MenuItem","Skeleton","Stack","TextField","ToggleButton","ToggleButtonGroup","Tooltip","Typography","useCallback","useEffect","useState","useUser","MarkdownLiteView","pluginDocsHelp","PLUGIN_REVIEW_CHECKLIST","PLUGIN_REJECTION_CATEGORIES","pluginRejectionCategory","rejectionHeadline","rejectionInputError","PUBLISHER_ATTESTATION","authorizedFetch","reviewStatusMeaning","SEVERITY_ORDER","PluginReviewDetail","basePath","segments","staffRole","staffPaths","detail","reviewCapabilities","reviewVersionEntry","params","listingId","String","superGate","data","user","enqueueSnackbar","setDetail","readmeView","setReadmeView","loaded","setLoaded","busy","setBusy","reason","setReason","rejectCategory","setRejectCategory","rejectBlocked","rejectCategoryNeedsComment","Boolean","requiresComment","takedownReason","setTakedownReason","selectedVersion","setSelectedVersion","refresh","response","encodeURIComponent","ok","json","post","payload","success","method","headers","body","JSON","stringify","result","catch","variant","error","allowDuplicate","signRealm","version","action","setVersionRevoked","revoke","takedown","hidden","trim","displayName","status","reviewStatus","blocked","checklistOutstanding","length","reviewEntry","versions","find","entry","reviewVersion","liveOnReviewVersion","activeInstalls","artifactUrl","process","item","sha256","path","origin","env","NEXT_PUBLIC_PLUGIN_ORIGIN","replace","bucketUrl","artifactsBucket","object","publisherTextOf","element","lines","walk","value","push","Array","isArray","forEach","index","key","Object","entries","checklistLink","itemId","previousApproved","filter","reviewState","at","repositoryUrl","href","label","external","orgDetail","publisherId","publisherSlug","homepageUrl","capabilities","findings","verifier","problems","slice","sort","a","b","indexOf","level","checks","findingsByCheck","Map","untaggedFindings","finding","id","check","some","set","get","countBy","title","topic","anchor","spacing","height","severity","header","help","excerpt","contentGutterX","contentGutterY","direction","sx","alignItems","flexWrap","size","color","latestVersion","priceUsd","unpublished","meaning","publisherName","includes","rejectionReason","rejectionCategory","hiddenReason","description","license","categories","map","category","justifyContent","gap","exclusive","onChange","_event","next","readme","maxHeight","overflowY","border","borderColor","borderRadius","p","bgcolor","source","component","whiteSpace","fontFamily","fontSize","m","network","join","events","hostAbi","platformHostAbi","elements","pl","line","wordBreak","verifierCached","marker","glyph","name","aria-label","width","undefined","problem","ml","message","attestation","attestedBy","attestedAt","Date","toLocaleDateString","claimed","updateOnly","my","publisherAgreement","state","acceptedAt","required","checklist","control","checked","disabled","event","target","realmOnly","link","bucket","rel","live","select","minWidth","onClick","mt","revoked","span","verificationRequest","declineReason","maxWidth","window","prompt","private","slotProps","displayEmpty","inputLabel","shrink","placeholder","grandfathered","trust","publishedAt"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GACD;;;AAGA,SACEA,cAAc,EACdC,gBAAgB,EAChBC,oBAAoB,EACpBC,uBAAuB,QAElB,eAAc;AACrB,SAASC,OAAO,EAAEC,WAAW,QAAQ,uBAAsB;AAC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