fix(foundry): type runtime auth result

This commit is contained in:
Vincent Koc 2026-06-11 08:54:25 +09:00
parent 08655fb02b
commit 25bea06596
No known key found for this signature in database

View file

@ -1,5 +1,8 @@
// Microsoft Foundry plugin module implements runtime behavior.
import type { ProviderPrepareRuntimeAuthContext } from "openclaw/plugin-sdk/core";
import type {
ProviderPreparedRuntimeAuth,
ProviderPrepareRuntimeAuthContext,
} from "openclaw/plugin-sdk/core";
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
import {
asDateTimestampMs,
@ -49,7 +52,9 @@ async function refreshEntraToken(params?: {
return { apiKey: result.accessToken, expiresAt };
}
export async function prepareFoundryRuntimeAuth(ctx: ProviderPrepareRuntimeAuthContext) {
export async function prepareFoundryRuntimeAuth(
ctx: ProviderPrepareRuntimeAuthContext,
): Promise<ProviderPreparedRuntimeAuth> {
if (ctx.apiKey !== "__entra_id_dynamic__") {
return {
apiKey: ctx.apiKey,