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

Function authRecovery

packages/core/sdk/src/auth-tool-failure.ts:40–49  ·  view source on GitHub ↗
(input?: AuthToolFailureInput["recovery"])

Source from the content-addressed store, hash-verified

38// the OAuth start flow. These strings are read by the agent resolving the
39// failure, so they must name tools that actually exist on the executor.
40const authRecovery = (input?: AuthToolFailureInput["recovery"]) => ({
41 createConnectionTool: "executor.coreTools.connections.createHandoff",
42 startOAuthTool: "executor.coreTools.oauth.start",
43 listConnectionsTool: "executor.coreTools.connections.list",
44 ...(input?.configureSourceTool ? { configureSourceTool: input.configureSourceTool } : {}),
45 connectionInstructions:
46 "For API keys and tokens, call createConnectionTool for the integration to get a browser URL; the user enters the credential there, which creates the bound connection. Do not ask the user to paste secrets into chat. Then call listConnectionsTool to confirm the connection exists before retrying this tool.",
47 oauthInstructions:
48 "For OAuth credentials, call startOAuthTool and give the returned authorizationUrl to the user. The completed connection binds automatically, then retry the tool.",
49});
50
51export const authToolFailure = <T = never>(input: AuthToolFailureInput): ToolResult<T> => {
52 const error: ToolError = {

Callers 1

authToolFailureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected