Add I Ching MCP to extension catalog (#4525)

This commit is contained in:
Joe Gracyk
2025-09-22 12:35:28 -07:00
committed by GitHub
parent c36b9b59b4
commit 83fc8a69d3
4 changed files with 119 additions and 1 deletions
@@ -94,6 +94,23 @@ describe('ExtensionInstallModal', () => {
expect(screen.getAllByRole('button')).toHaveLength(3);
});
it("should handle i-ching-mcp-server as allowed command", async () => {
mockElectron.getAllowedExtensions.mockResolvedValue([]);
render(<ExtensionInstallModal addExtension={mockAddExtension} />);
const eventHandler = getAddExtensionEventHandler();
await act(async () => {
await eventHandler({}, "goose://extension?cmd=i-ching-mcp-server&id=i-ching&name=I%20Ching&description=I%20Ching%20divination");
});
expect(screen.getByRole("dialog")).toBeInTheDocument();
expect(screen.getByText("Confirm Extension Installation")).toBeInTheDocument();
expect(screen.getByText(/I Ching extension/)).toBeInTheDocument();
expect(screen.getAllByRole("button")).toHaveLength(3);
});
it('should handle blocked extension', async () => {
mockElectron.getAllowedExtensions.mockResolvedValue(['uvx allowed-package']);
@@ -14,7 +14,7 @@ function getStdioConfig(
timeout: number
) {
// Validate that the command is one of the allowed commands
const allowedCommands = ['cu', 'docker', 'jbang', 'npx', 'uvx', 'goosed', 'npx.cmd'];
const allowedCommands = ['cu', 'docker', 'jbang', 'npx', 'uvx', 'goosed', 'npx.cmd', 'i-ching-mcp-server'];
if (!allowedCommands.includes(cmd)) {
toastService.handleError(
'Invalid Command',