MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / handleCheck

Function handleCheck

packages/plugins/mcp/src/react/CodexPluginAdd.tsx:106–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104 }, [plugin?.available, props.presetId]);
105
106 const handleCheck = async () => {
107 setChecking(true);
108 setAccess(null);
109 // Runs the plugin's own read-only probe down the real path. When macOS has
110 // not asked yet, THIS is what makes it ask — so the check doubles as the
111 // grant flow.
112 // Reads nothing and writes nothing, so no cache is invalidated by it.
113 const exit = await doCheckAccess({ params: { id: props.presetId }, reactivityKeys: [] });
114 setAccess(
115 Exit.isSuccess(exit)
116 ? (exit.value as CodexAccessState)
117 : { status: "blocked", message: "Could not reach the plugin." },
118 );
119 setChecking(false);
120 };
121
122 if (!AsyncResult.isSuccess(pluginsResult)) {
123 return (

Callers 1

CodexPluginAddFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected