diff --git a/.project-docs/30-worklog/tasks/20260905-plugin-download-action-6c8e4a21.md b/.project-docs/30-worklog/tasks/20260905-plugin-download-action-6c8e4a21.md new file mode 100644 index 0000000..3b244a0 --- /dev/null +++ b/.project-docs/30-worklog/tasks/20260905-plugin-download-action-6c8e4a21.md @@ -0,0 +1,69 @@ +# Task: Fix missing official plugin acquire and download action + +## Identity + +- Task ID: 20260905-plugin-download-action-6c8e4a21 +- Mode: Feature +- Branch: codex/20260905-plugin-download-action-6c8e4a21-plugin-download-action +- Worktree: D:\Datas\OthersProjects\.codex-worktrees\makelore\20260905-plugin-download-action-6c8e4a21 +- Base commit: 9ed9bf4a715e300420e7a764a4cf576a6dfc4938 +- Owner: codex-root +- Status: Ready for Integration + +## Scope + +- Reproduce and fix the unified `/plugins` projection for the code-owned bundled + `makelore.project-scaffold` Plugin when the Account Library has not acquired it. +- Keep the existing acquisition, device-package, project-enablement, and Agent + assignment authorities separate; cover the public Renderer seam with a focused + regression test. +- Limit product changes to the unified Plugin workspace projection/presentation and + its focused tests unless the reproduction proves the fault is owned elsewhere. + +## Intent And Constraints + +- A bundled Project Scaffold Plugin never has a device download/update/uninstall + action. Before acquisition it must offer the existing free Account Library acquire + action; after acquisition it may offer project enablement and Agent assignment. +- Do not add a visible local package/Skill installation picker, change server/Main + contracts, or collapse Account Library acquisition into device installation. +- Preserve the occupied client root worktree and its three adopted untracked task + records exactly. Work only in this isolated feature worktree. +- Concurrent Task Gate: Passed. Planning Gate: Passed after loading the current + integrated state, ADR-008, Plugin business rules/module boundaries, and the completed + root Project Scaffold integration task. No active product writer overlaps this scope. + +## Outcome + +- Added one shared projection predicate for code-owned bundled official Plugins and + used it on both the unified Plugin card and detail dialog. An unacquired bundled + Project Scaffold now reports `随应用提供` rather than the false + `未下载官方包` state. +- Preserved the existing authority boundary: the client does not synthesize a + Marketplace catalog entry or acquisition action. The existing `免费获取` action + still appears only when the server catalog contains the Plugin and the authenticated + Account Library snapshot confirms it is not acquired. + +## Verification + +- TDD red: the new public Renderer regression failed because both card and detail + reported the bundled Plugin as not downloaded. +- Focused green: `plugins-page` plus `plugin-workspace-model` = 35 passed. +- `corepack pnpm run typecheck`: passed. +- Scoped ESLint on the three changed product files and focused test: passed. +- `corepack pnpm run build:vite`: passed for Renderer, Main, Preload, and utility + targets with existing size/import warnings. +- Full unit run: 225 files / 1887 passed / 2 skipped, with one unrelated real-process + timing threshold failure (`2657ms < 2000ms`). The exact failed file then passed 6/6 + in isolation; the separately skipped pressure suite passed 1/1. +- `git diff --check`: passed. + +## Follow-ups + +- Deploy the current Works Square server revision and migrate production through + `20260904_project_scaffold_0085`; until then the live catalog has no authority to + offer `免费获取` for `makelore.project-scaffold`. + +## Promotion Candidates + +- None recorded. diff --git a/src/pages/Plugins/PluginDetails.tsx b/src/pages/Plugins/PluginDetails.tsx index 9b77a2e..477d2a8 100644 --- a/src/pages/Plugins/PluginDetails.tsx +++ b/src/pages/Plugins/PluginDetails.tsx @@ -12,7 +12,11 @@ import { DialogTitle, } from '@/components/ui/dialog'; import type { DataServiceInstanceState } from '../../../shared/data-service'; -import type { PluginWorkspaceCommand, PluginWorkspaceItem } from './plugin-workspace-model'; +import { + isBundledOfficialPlugin, + type PluginWorkspaceCommand, + type PluginWorkspaceItem, +} from './plugin-workspace-model'; interface DetailOperation { capabilityId: string; @@ -286,7 +290,7 @@ export function PluginDetails(props: PluginDetailsProps) {
{item.summary}