Make Git a native feature with an off switch

- Add the native feature runtime in src/lib/features/: the catalog, the switches, the first-start migration, the loader, and the feature sessions.
- Add Settings → Features and the features settings section.
- Add features_legacy. It reads the old plugin packages and changes nothing.
- Move Git from the plugin into src/lib/features/git/, on host internals.
- Remove api.git, the git contribution key, and the SDK Git types.
- Add pnpm check:features. It fails when a feature module loads at start.
- Update the tests, the menu inventory, the docs, and UI-055.
This commit is contained in:
Knotty Wyvern
2026-10-29 15:51:21 -07:00
parent 58f77b2e9f
commit d3218b2501
68 changed files with 2068 additions and 324 deletions
-13
View File
@@ -1,7 +1,6 @@
import type { FilesApi, PluginApi, PtyApi, ServicesApi, SettingsApi, UiApi, WorkspaceApi } from "./api.ts";
import type { BackgroundApi } from "./backgrounds.ts";
import type { CompletionApi } from "./completion.ts";
import type { GitApi } from "./git.ts";
/**
* The optional members of `PluginApi`, by path, and the type that `requireFeature` returns for each path.
@@ -12,12 +11,6 @@ export interface PluginFeatures {
files: FilesApi;
services: ServicesApi;
backgrounds: BackgroundApi;
git: GitApi;
"git.push": GitApi["push"];
"git.pull": GitApi["pull"];
"git.graph": GitApi["graph"];
"git.commitDetails": GitApi["commitDetails"];
"git.commitDiff": GitApi["commitDiff"];
completion: CompletionApi;
"completion.transport": NonNullable<CompletionApi["transport"]>;
"ui.showActionMenu": UiApi["showActionMenu"];
@@ -44,12 +37,6 @@ const descriptions: { [K in PluginFeature]: string } = {
files: "the folder grant API",
services: "the plugin service API",
backgrounds: "the background API",
git: "the Git API",
"git.push": "Git push",
"git.pull": "Git pull",
"git.graph": "the Git commit graph",
"git.commitDetails": "Git commit details",
"git.commitDiff": "Git commit diffs",
completion: "the completion API",
"completion.transport": "the completion model transport",
"ui.showActionMenu": "the shared action menu",