Interestingly, when I omit the x-callback-url part from my URL.fromString('x-devonthink://x-callback-url/get-itemlink') example, DEVONthink complains that this actions can only be used via x-callback-url and aborts the action. However, in your example it seems as if the x-callback-url part gets added automatically.
Just a followup: this was fixed in OmniOutliner 5.3 for Mac and OmniOutliner 3.1 for iOS. It’s now possible to use URL.call() with x-callback-url URLs that return arbitrary content (rather than only working for URLs that returned JSON).
I’m not sure if there has been a regression, but I’m getting the symptoms that was mentioned above when trying to call urls from omnioutliner pro. Whether I try to fetch or call a URL (bear:// in this case) the callbacks never fire and bear is never notified.
I can confirm that the URL is valid because if I console.log it and then load it in chrome, it all works as expected.