/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import type { ServiceRegistry } from "../di/ServiceRegistry"; import type { ICredentialStore } from "./ICredentialStore"; /** * Gets the credential store from the given registry (defaults to global). * If the registry hasn't had `registerCredentialDefaults(registry)` run yet, * the default in-memory store is registered lazily — same pattern as * `getLogger` / `getTelemetryProvider`. Makes scoped registries returned by * `createOrchestrationContext` safe to use without an explicit bootstrap. */ export declare function getGlobalCredentialStore(registry?: ServiceRegistry): ICredentialStore; /** * Sets the credential store on the given registry (defaults to global). */ export declare function setGlobalCredentialStore(store: ICredentialStore, registry?: ServiceRegistry): void; /** * Resolves a credential from the store registered in the given registry. * * If `registry` is omitted, uses the global registry. If a `registry` is * passed but doesn't yet have `CREDENTIAL_STORE`, `getGlobalCredentialStore` * lazily registers the default in-memory store on it — so scoped registries * stay isolated from the global one. * * Intended for use in provider `getClient` functions and tasks. * * @param key The credential key to resolve * @param registry Optional service registry (e.g., from task context) * @returns The credential value, or undefined if not found */ export declare function resolveCredential(key: string, registry?: ServiceRegistry): Promise; /** * Registers the credential store default factory and the "credential" input resolver/compactor * on the given registry. Called by `bootstrapWorkglow` and `createOrchestrationContext`. */ export declare function registerCredentialDefaults(registry?: ServiceRegistry): void; //# sourceMappingURL=CredentialStoreRegistry.d.ts.map