Let plugins add contextual workspace tools (#3465)

* feat(plugins): add workspace panels and command center contributions

Give local plugins contextual UI entry points without making the daemon interpret client placement or callbacks. Panels receive stable IDs and read cached client state through required selectors with shallow equality, avoiding unrelated guest rerenders and context-discovery RPCs.

* fix(plugins): align shared client state ownership

Workspace panels and Command Center callbacks consume the same frozen client snapshots, so their adapter belongs to the plugin boundary rather than either contribution surface. Refresh the Nix dependency hash for the selector-store dependency added by this feature.
This commit is contained in:
Mohamed Boudra
2026-08-17 19:26:40 +02:00
committed by GitHub
parent 1e2089cef7
commit 6d7606160e
64 changed files with 2557 additions and 122 deletions
+21
View File
@@ -375,6 +375,27 @@ test("workspace handles keep identity and refresh snapshots through existing dri
expect(updates).toEqual(["sdk pushed"]);
expect(workspace.current()).toEqual(pushedWorkspace);
const titlePromise = workspace.setTitle("SDK review", "workspace-title-request");
expect(parseSentSessionMessage(ws.sent.at(-1))).toMatchObject({
type: "workspace.title.set.request",
requestId: "workspace-title-request",
workspaceId: "workspace_sdk",
title: "SDK review",
});
ws.message(
sessionMessage({
type: "workspace.title.set.response",
payload: {
requestId: "workspace-title-request",
workspaceId: "workspace_sdk",
accepted: true,
title: "SDK review",
error: null,
},
}),
);
await expect(titlePromise).resolves.toEqual({ title: "SDK review" });
unsubscribe();
ws.message(
sessionMessage({
+2
View File
@@ -132,6 +132,7 @@ export interface PaseoWorkspaceHandle {
};
current(): PaseoWorkspace | null;
refresh(options?: { requestId?: string }): Promise<PaseoWorkspace | null>;
setTitle(title: string | null, requestId?: string): Promise<{ title: string | null }>;
archive(requestId?: string): Promise<PaseoWorkspaceArchiveResult>;
/**
* Subscribes to already-emitted daemon workspace_update events for this id.
@@ -526,6 +527,7 @@ function createWorkspaceHandleFactory(
},
current: () => current,
refresh,
setTitle: (title, requestId) => daemonClient.setWorkspaceTitle(id, title, requestId),
archive: async (requestId) => {
const result = await daemonClient.archiveWorkspace(id, requestId);
if (current) {