Implement CLI send flows and refactor plugin event handling

This commit is contained in:
Gregory Schier committed 2026-02-20 08:06:48 -08:00
1 parent 1f588d0498
commit a4f96fca11
29 files changed
+1587 -252

No files matched your search

@@ -33,7 +33,7 @@ import type {
ListFoldersResponse,
ListHttpRequestsRequest,
ListHttpRequestsResponse,
ListWorkspacesResponse,
ListOpenWorkspacesResponse,
PluginContext,
PromptFormResponse,
PromptTextResponse,
@@ -942,9 +942,9 @@ export class PluginInstance {
workspace: {
list: async () => {
const payload = {
type: 'list_workspaces_request',
type: 'list_open_workspaces_request',
} as InternalEventPayload;
const response = await this.#sendForReply<ListWorkspacesResponse>(context, payload);
const response = await this.#sendForReply<ListOpenWorkspacesResponse>(context, payload);
return response.workspaces.map((w) => {
// Internal workspace info includes label field not in public API
type WorkspaceInfoInternal = typeof w & { label?: string };