import type { SessionAuthContext } from "#channel/types.js"; import type { ToolAuthOptions, ToolAuthProvider } from "#tools/definition.js"; import type { TokenResult } from "#shared/connection-types.js"; import { type ScopedAuthorization } from "#runtime/connections/scoped-authorization.js"; /** Shared getToken/requireAuth capability, independent of the executing tool or workflow. */ export declare function createAuthorizationContext(input: { readonly scope: string; readonly boundResponder?: SessionAuthContext; readonly completeAuthorization?: (scoped: ScopedAuthorization) => Promise; }): { getToken(provider?: ToolAuthProvider, options?: ToolAuthOptions): Promise; requireAuth(provider?: ToolAuthProvider, options?: ToolAuthOptions): never; run: (execute: () => unknown) => Promise | AsyncIterable; };