fix(plugins): load official hosted plugins from bundled resources

This commit is contained in:
2026-09-01 18:20:24 +08:00
parent 52e2a97a12
commit 1530ac7740
23 changed files with 835 additions and 48 deletions

View File

@@ -0,0 +1,51 @@
# Task: Use official bundled Plugins without Marketplace Release download
## Identity
- Task ID: 20260901-official-bundled-plugins-client-9d5f3b82
- Mode: Feature
- Branch: codex/20260901-official-bundled-plugins-client-9d5f3b82-official-bundled-plugins
- Worktree: D:\Datas\OthersProjects\makelore-official-bundled-plugins-9d5f3b82
- Base commit: 52e2a97a12ffaf838c3218795ff33e7fb91940cf
- Owner: codex-root
- Status: In Progress
## Scope
- Ship the code-owned Game Resource and Web Search package resources inside MakeLore.
- Materialize acquired bundled optional Plugins without a Package Store download while retaining policy/admission checks.
- Show bundled delivery honestly in Marketplace/My Plugins/Project Plugins and hide only device-package actions.
- Cover manifest, effective resolution, hosted admission, Renderer projection, and artifact reachability with focused tests.
## Intent And Constraints
- Preserve free account acquisition/removal, project enablement, Agent assignment, lifecycle invalidation, and Token Point billing.
- Preserve signed artifact download/update behavior for non-bundled Marketplace Plugins.
- Do not add Provider authority or secrets to the client.
- Keep unknown/removed Plugin configuration preservation unchanged.
## Outcome
- Game Resource and Web Search are now fixed schema-2 code-owned bundled definitions with deterministic server Release IDs. Their exact package manifests, capability contracts, and Skills ship under `resources/coding-plugins/**` and match the server source bytes.
- Effective resolution still requires the current Account Library entry, project enablement, Agent assignment, policy, and billing readiness, but no longer consults Package Store bytes for these official definitions. Registry definition lookup and hosted Admission resolve the exact bundled Release and reject any server drift.
- My Plugins shows “随 MakeLore 提供” and removes download/update/Beta/device-delete actions for official bundles while retaining Account removal, project enablement, and Agent assignment. Project Plugins no longer reports them as missing a device download.
- Third-party Marketplace package parsing, signature trust, Package Store installation, and lifecycle remain unchanged.
## Verification
- Initial RED: five official-bundle assertions failed while 33 adjacent tests passed, proving only Data Service was loaded and hosted Plugins still depended on Package Store.
- Registry-boundary RED: bundled `getInstalledDefinition(releaseId)` returned null; GREEN now returns the fixed bundled definition without `getInstalledRelease`.
- Focused manifest/effective resolver/Admission/resource-loader/UI suite: 57 passed across 6 files; broader adjacent suite: 133 passed.
- Full unit diagnostic before the final registry correction: 214 files ran with 1,781 passed and 2 skipped; two Windows process-spawn tests failed with transient `spawn EBUSY`, then passed 3/3 alone with one worker. Pressure test passed 1/1.
- TypeScript typecheck and scoped ESLint pass. `pnpm run build:vite` passes all Renderer/Main/Preload/utility builds (2,272 Renderer modules).
- Server/client Game Resource and Web Search resource trees are byte-identical under `git diff --no-index`.
- Windows package/artifact verification is pending the final source commit so embedded commit evidence names the exact deliverable.
## Follow-ups
- Integrate the sole source commit into the client `main` root without touching its unrelated untracked task record, then build and verify the Windows package.
- The matching Works Square deployment must reach migration `0078`; Provider/pricing readiness remains server-owned.
## Promotion Candidates
- None recorded.