Skip to content

feat(plugins): add plugin store with install, lockfile and update - #1727

Open
developerkunal wants to merge 2 commits into
DXCDT-2602/registry-clientfrom
DXCDT-2603/plugin-store
Open

developerkunal wants to merge 2 commits into
DXCDT-2602/registry-clientfrom
DXCDT-2603/plugin-store

Conversation

@developerkunal

@developerkunal developerkunal commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

🔧 Changes

Adds internal/plugins/store, which installs plugins from the signed registry index, records them in a lockfile and checks them again before they run. This is a library only, so nothing changes for users yet. The commands and process launching come in later PRs of the stack.

On disk. plugins.lock.json holds the active and previous version of each plugin, whether it is pinned, and the hashes of its files and permissions. A damaged lockfile is an error and is never replaced automatically. Each version lives under store/<registry>/<name>/<version>/ with private permissions.

Checked on install

  • Before downloading, the version must be in the index, not revoked, and have a build for this machine, and engines must be met.
  • Downloads are https only, limited to GitHub hosts on every redirect hop, and must match the size and SHA-256 in the index.
  • The archive must contain exactly two regular files, the binary and plugin.json. Directories, links and unsafe names are rejected.
  • The extracted plugin.json must match the registry record, including the recomputed permissions hash, so the manifest that runs is the one the registry showed the user.
  • Nothing is activated until the lockfile switches in one step, so a failure leaves the installed plugin as it was.

Consent. A callback runs before the download when the plugin is new or its permissions hash differs from the active version, and a refusal stops the install. A nil callback proceeds, because approvals come in a later PR.

Versions. An exact version pins the plugin, and UpdateAll skips pinned plugins. Update never moves backwards.

Verify before every run. Verify hashes the binary and manifest against the lockfile, requires the version directory to hold only those two regular files, and checks that the consent hash still matches. On Unix it also refuses group or world writable files and extra hard links. It cannot close the gap between hashing and starting the binary.

Existing code. The file lock moves into a shared filelock package. The engines check compares only the MAJOR.MINOR.PATCH core, so >=1.39.0 passes on beta builds, and a dev CLI skips it.

📚 References

DXCDT-2603. This is part of the plugin framework stack of 11 PRs and builds on the PR below it, DXCDT-2602.

🔬 Testing

The new code is covered by unit tests.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@developerkunal
developerkunal requested a review from a team as a code owner October 24, 2026 14:47
@developerkunal
developerkunal force-pushed the DXCDT-2603/plugin-store branch from b1305ac to d4fc42e Compare October 24, 2026 15:30
@developerkunal
developerkunal force-pushed the DXCDT-2603/plugin-store branch from d4fc42e to 6aed7ae Compare November 2, 2026 11:12
@developerkunal
developerkunal force-pushed the DXCDT-2603/plugin-store branch from 5000141 to 456114d Compare November 2, 2026 19:35
@developerkunal
developerkunal force-pushed the DXCDT-2603/plugin-store branch from 456114d to 220bf76 Compare November 24, 2026 11:33
@developerkunal
developerkunal force-pushed the DXCDT-2603/plugin-store branch from 220bf76 to 85ab3c0 Compare November 24, 2026 12:03
@bkiran6398
bkiran6398 force-pushed the DXCDT-2603/plugin-store branch from 85ab3c0 to a0246d8 Compare November 27, 2026 06:23
@developerkunal
developerkunal removed this pull request from stack #1736 November 30, 2026 17:24
@developerkunal
developerkunal force-pushed the DXCDT-2603/plugin-store branch from a0246d8 to 7150366 Compare November 30, 2026 17:24
@developerkunal
developerkunal removed this pull request from stack #1792 November 30, 2026 17:27
Adds internal/plugins/store, which downloads a plugin archive from the signed registry index, verifies it, extracts it safely and records it in plugins.lock.json. Verify re-checks the installed binary and manifest before every run. The file lock moves into a shared filelock package, and engines evaluation and libc detection are added to the plugins package.
@developerkunal
developerkunal force-pushed the DXCDT-2603/plugin-store branch from 7150366 to 942c821 Compare December 1, 2026 17:11

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant