39 lines
648 B
TypeScript
39 lines
648 B
TypeScript
|
|
/**
|
||
|
|
* @clawd/auth-runtime
|
||
|
|
*
|
||
|
|
* Shared TypeScript auth runtime for OpenClaw skills.
|
||
|
|
*
|
||
|
|
* Provides authentication, token caching, and HTTP utilities.
|
||
|
|
*/
|
||
|
|
|
||
|
|
// Auth functions
|
||
|
|
export {
|
||
|
|
createEnvConfig,
|
||
|
|
fetchSessionJson,
|
||
|
|
getAccessToken,
|
||
|
|
refreshAccessToken,
|
||
|
|
isRetryableSessionError,
|
||
|
|
requestApiWithAutoRefresh,
|
||
|
|
} from './auth.js';
|
||
|
|
|
||
|
|
// HTTP utilities
|
||
|
|
export { requestApi } from './http.js';
|
||
|
|
|
||
|
|
// Cache utilities
|
||
|
|
export {
|
||
|
|
sha256,
|
||
|
|
getCacheFile,
|
||
|
|
readCachedToken,
|
||
|
|
writeCache,
|
||
|
|
deleteCache,
|
||
|
|
} from './cache.js';
|
||
|
|
|
||
|
|
// Types
|
||
|
|
export type {
|
||
|
|
EnvConfig,
|
||
|
|
SessionResponse,
|
||
|
|
CachedTokenData,
|
||
|
|
ApiResponse,
|
||
|
|
HttpMethod,
|
||
|
|
} from './types.js';
|