@frontmcp/sdk 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/adapter/adapter.instance.d.ts +10 -3
  2. package/adapter/adapter.instance.d.ts.map +1 -1
  3. package/adapter/{adapter.regsitry.d.ts → adapter.registry.d.ts} +2 -1
  4. package/adapter/adapter.registry.d.ts.map +1 -0
  5. package/adapter/adapter.utils.d.ts.map +1 -1
  6. package/agent/agent.instance.d.ts.map +1 -1
  7. package/agent/agent.scope.d.ts +9 -9
  8. package/agent/agent.scope.d.ts.map +1 -1
  9. package/agent/agent.utils.d.ts.map +1 -1
  10. package/app/app.registry.d.ts.map +1 -1
  11. package/app/app.utils.d.ts.map +1 -1
  12. package/app/instances/app.local.instance.d.ts +1 -1
  13. package/auth/auth.registry.d.ts +1 -1
  14. package/auth/auth.registry.d.ts.map +1 -1
  15. package/auth/auth.utils.d.ts.map +1 -1
  16. package/auth/authorization/index.d.ts +0 -6
  17. package/auth/authorization/index.d.ts.map +1 -1
  18. package/auth/authorization/orchestrated.context-extension.d.ts +1 -1
  19. package/auth/authorization/orchestrated.context-extension.d.ts.map +1 -1
  20. package/auth/flows/auth.verify.flow.d.ts +1 -1
  21. package/auth/flows/auth.verify.flow.d.ts.map +1 -1
  22. package/auth/flows/oauth.authorize.flow.d.ts.map +1 -1
  23. package/auth/flows/oauth.callback.flow.d.ts.map +1 -1
  24. package/auth/flows/oauth.provider-callback.flow.d.ts.map +1 -1
  25. package/auth/flows/session.verify.flow.d.ts +2 -2
  26. package/auth/flows/session.verify.flow.d.ts.map +1 -1
  27. package/auth/flows/well-known.jwks.flow.d.ts.map +1 -1
  28. package/auth/flows/well-known.oauth-authorization-server.flow.d.ts.map +1 -1
  29. package/auth/flows/well-known.prm.flow.d.ts.map +1 -1
  30. package/auth/instances/instance.local-primary-auth.d.ts +2 -2
  31. package/auth/instances/instance.local-primary-auth.d.ts.map +1 -1
  32. package/auth/session/index.d.ts +7 -11
  33. package/auth/session/index.d.ts.map +1 -1
  34. package/auth/session/record/session.base.d.ts +1 -1
  35. package/auth/session/record/session.base.d.ts.map +1 -1
  36. package/auth/session/session-store.factory.d.ts +19 -3
  37. package/auth/session/session-store.factory.d.ts.map +1 -1
  38. package/auth/session/session.service.d.ts +1 -1
  39. package/auth/session/session.service.d.ts.map +1 -1
  40. package/auth/session/transport-session.manager.d.ts +1 -1
  41. package/auth/session/transport-session.manager.d.ts.map +1 -1
  42. package/auth/session/utils/session-id.utils.d.ts +1 -2
  43. package/auth/session/utils/session-id.utils.d.ts.map +1 -1
  44. package/auth/vault/auth-providers.context-extension.d.ts +2 -2
  45. package/auth/vault/auth-providers.context-extension.d.ts.map +1 -1
  46. package/auth/vault/auth-providers.providers.d.ts +1 -1
  47. package/auth/vault/auth-providers.providers.d.ts.map +1 -1
  48. package/auth/vault/index.d.ts +0 -52
  49. package/auth/vault/index.d.ts.map +1 -1
  50. package/builtin/config/config-resolver.d.ts.map +1 -1
  51. package/common/decorators/app.decorator.d.ts +1 -1
  52. package/common/decorators/app.decorator.d.ts.map +1 -1
  53. package/common/decorators/front-mcp.decorator.d.ts.map +1 -1
  54. package/common/decorators/plugin.decorator.d.ts.map +1 -1
  55. package/common/dynamic/dynamic.adapter.d.ts.map +1 -1
  56. package/common/dynamic/dynamic.plugin.d.ts.map +1 -1
  57. package/common/interfaces/agent.interface.d.ts.map +1 -1
  58. package/common/interfaces/internal/flow.utils.d.ts.map +1 -1
  59. package/common/interfaces/server.interface.d.ts +4 -2
  60. package/common/interfaces/server.interface.d.ts.map +1 -1
  61. package/common/metadata/app.metadata.d.ts +16 -16
  62. package/common/metadata/front-mcp.metadata.d.ts +184 -52
  63. package/common/metadata/front-mcp.metadata.d.ts.map +1 -1
  64. package/common/providers/base-config.provider.d.ts.map +1 -1
  65. package/common/tokens/front-mcp.tokens.d.ts.map +1 -1
  66. package/common/types/auth/jwt.types.d.ts +2 -86
  67. package/common/types/auth/jwt.types.d.ts.map +1 -1
  68. package/common/types/auth/session.types.d.ts +5 -101
  69. package/common/types/auth/session.types.d.ts.map +1 -1
  70. package/common/types/options/auth/app-auth.schema.d.ts +8 -8
  71. package/common/types/options/auth/index.d.ts +14 -14
  72. package/common/types/options/auth/index.d.ts.map +1 -1
  73. package/common/types/options/auth/interfaces.d.ts +1 -1
  74. package/common/types/options/auth/interfaces.d.ts.map +1 -1
  75. package/common/types/options/auth/orchestrated.schema.d.ts +10 -10
  76. package/common/types/options/auth/public.schema.d.ts +2 -2
  77. package/common/types/options/auth/schema.d.ts +8 -8
  78. package/common/types/options/auth/shared.schemas.d.ts +2 -132
  79. package/common/types/options/auth/shared.schemas.d.ts.map +1 -1
  80. package/common/types/options/auth/transparent.schema.d.ts +1 -1
  81. package/common/types/options/http/index.d.ts +1 -1
  82. package/common/types/options/http/index.d.ts.map +1 -1
  83. package/common/types/options/http/interfaces.d.ts +36 -0
  84. package/common/types/options/http/interfaces.d.ts.map +1 -1
  85. package/common/types/options/http/schema.d.ts +6 -0
  86. package/common/types/options/http/schema.d.ts.map +1 -1
  87. package/common/types/options/index.d.ts +1 -0
  88. package/common/types/options/index.d.ts.map +1 -1
  89. package/common/types/options/session/schema.d.ts +3 -3
  90. package/common/types/options/sqlite/index.d.ts +3 -0
  91. package/common/types/options/sqlite/index.d.ts.map +1 -0
  92. package/common/types/options/sqlite/schema.d.ts +26 -0
  93. package/common/types/options/sqlite/schema.d.ts.map +1 -0
  94. package/common/types/options/transport/schema.d.ts +1 -1
  95. package/elicitation/store/elicitation-encryption.d.ts +1 -1
  96. package/elicitation/store/elicitation-encryption.d.ts.map +1 -1
  97. package/elicitation/store/elicitation-store.factory.d.ts +21 -1
  98. package/elicitation/store/elicitation-store.factory.d.ts.map +1 -1
  99. package/errors/auth-internal.errors.d.ts +2 -0
  100. package/errors/auth-internal.errors.d.ts.map +1 -0
  101. package/errors/decorator.errors.d.ts +14 -0
  102. package/errors/decorator.errors.d.ts.map +1 -0
  103. package/errors/index.d.ts +8 -1
  104. package/errors/index.d.ts.map +1 -1
  105. package/errors/normalization.errors.d.ts +32 -0
  106. package/errors/normalization.errors.d.ts.map +1 -0
  107. package/errors/provider.errors.d.ts +63 -0
  108. package/errors/provider.errors.d.ts.map +1 -0
  109. package/errors/registry.errors.d.ts +50 -0
  110. package/errors/registry.errors.d.ts.map +1 -0
  111. package/errors/remote.errors.d.ts +8 -0
  112. package/errors/remote.errors.d.ts.map +1 -1
  113. package/errors/sdk.errors.d.ts +139 -0
  114. package/errors/sdk.errors.d.ts.map +1 -0
  115. package/errors/transport.errors.d.ts +46 -0
  116. package/errors/transport.errors.d.ts.map +1 -0
  117. package/esm/index.mjs +7422 -8497
  118. package/esm/package.json +11 -7
  119. package/flows/flow.instance.d.ts.map +1 -1
  120. package/flows/flow.registry.d.ts.map +1 -1
  121. package/flows/flow.utils.d.ts.map +1 -1
  122. package/front-mcp/front-mcp.d.ts +30 -1
  123. package/front-mcp/front-mcp.d.ts.map +1 -1
  124. package/front-mcp/front-mcp.providers.d.ts +76 -20
  125. package/front-mcp/front-mcp.providers.d.ts.map +1 -1
  126. package/front-mcp/serverless-handler.d.ts +0 -4
  127. package/front-mcp/serverless-handler.d.ts.map +1 -1
  128. package/hooks/hook.instance.d.ts.map +1 -1
  129. package/hooks/hook.registry.d.ts.map +1 -1
  130. package/index.d.ts +1 -1
  131. package/index.js +19714 -20739
  132. package/logger/logger.registry.d.ts.map +1 -1
  133. package/logger/logger.utils.d.ts.map +1 -1
  134. package/package.json +11 -7
  135. package/plugin/plugin.utils.d.ts.map +1 -1
  136. package/prompt/prompt.instance.d.ts.map +1 -1
  137. package/prompt/prompt.registry.d.ts.map +1 -1
  138. package/prompt/prompt.utils.d.ts.map +1 -1
  139. package/provider/provider.registry.d.ts.map +1 -1
  140. package/provider/provider.utils.d.ts.map +1 -1
  141. package/regsitry/registry.base.d.ts.map +1 -1
  142. package/remote-mcp/mcp-client.service.d.ts.map +1 -1
  143. package/remote-mcp/resilience/retry.d.ts.map +1 -1
  144. package/resource/resource.instance.d.ts.map +1 -1
  145. package/resource/resource.registry.d.ts.map +1 -1
  146. package/resource/resource.utils.d.ts.map +1 -1
  147. package/scope/flows/http.request.flow.d.ts +1 -1
  148. package/scope/flows/http.request.flow.d.ts.map +1 -1
  149. package/scope/scope.instance.d.ts.map +1 -1
  150. package/scope/scope.registry.d.ts.map +1 -1
  151. package/scope/scope.utils.d.ts.map +1 -1
  152. package/server/adapters/base.host.adapter.d.ts +4 -2
  153. package/server/adapters/base.host.adapter.d.ts.map +1 -1
  154. package/server/adapters/express.host.adapter.d.ts +6 -32
  155. package/server/adapters/express.host.adapter.d.ts.map +1 -1
  156. package/server/server.instance.d.ts +1 -1
  157. package/server/server.instance.d.ts.map +1 -1
  158. package/skill/flows/search-skills.flow.d.ts +2 -2
  159. package/skill/session/skill-session.manager.d.ts.map +1 -1
  160. package/skill/skill.utils.d.ts.map +1 -1
  161. package/skill/tools/search-skills.tool.d.ts +1 -1
  162. package/tool/tool.instance.d.ts.map +1 -1
  163. package/tool/tool.registry.d.ts.map +1 -1
  164. package/tool/tool.utils.d.ts.map +1 -1
  165. package/transport/adapters/streamable-http-transport.d.ts +9 -3
  166. package/transport/adapters/streamable-http-transport.d.ts.map +1 -1
  167. package/transport/event-stores/event-store.factory.d.ts +8 -3
  168. package/transport/event-stores/event-store.factory.d.ts.map +1 -1
  169. package/transport/event-stores/redis.event-store.d.ts.map +1 -1
  170. package/transport/flows/handle.sse.flow.d.ts +1 -1
  171. package/transport/flows/handle.streamable-http.flow.d.ts +1 -1
  172. package/transport/legacy/legacy.sse.tranporter.d.ts.map +1 -1
  173. package/transport/mcp-handlers/skills-mcp.types.d.ts +1 -1
  174. package/transport/transport.local.d.ts.map +1 -1
  175. package/transport/transport.registry.d.ts +1 -1
  176. package/transport/transport.registry.d.ts.map +1 -1
  177. package/transport/transport.remote.d.ts.map +1 -1
  178. package/adapter/adapter.regsitry.d.ts.map +0 -1
  179. package/auth/authorization/authorization.class.d.ts +0 -123
  180. package/auth/authorization/authorization.class.d.ts.map +0 -1
  181. package/auth/authorization/authorization.types.d.ts +0 -128
  182. package/auth/authorization/authorization.types.d.ts.map +0 -1
  183. package/auth/authorization/orchestrated.accessor.d.ts +0 -161
  184. package/auth/authorization/orchestrated.accessor.d.ts.map +0 -1
  185. package/auth/authorization/orchestrated.authorization.d.ts +0 -258
  186. package/auth/authorization/orchestrated.authorization.d.ts.map +0 -1
  187. package/auth/authorization/public.authorization.d.ts +0 -92
  188. package/auth/authorization/public.authorization.d.ts.map +0 -1
  189. package/auth/authorization/transparent.authorization.d.ts +0 -131
  190. package/auth/authorization/transparent.authorization.d.ts.map +0 -1
  191. package/auth/consent/consent.types.d.ts +0 -112
  192. package/auth/consent/consent.types.d.ts.map +0 -1
  193. package/auth/consent/index.d.ts +0 -2
  194. package/auth/consent/index.d.ts.map +0 -1
  195. package/auth/detection/auth-provider-detection.d.ts +0 -85
  196. package/auth/detection/auth-provider-detection.d.ts.map +0 -1
  197. package/auth/detection/index.d.ts +0 -2
  198. package/auth/detection/index.d.ts.map +0 -1
  199. package/auth/machine-id.d.ts +0 -28
  200. package/auth/machine-id.d.ts.map +0 -1
  201. package/auth/session/encrypted-authorization-vault.d.ts +0 -181
  202. package/auth/session/encrypted-authorization-vault.d.ts.map +0 -1
  203. package/auth/session/federated-auth.session.d.ts +0 -252
  204. package/auth/session/federated-auth.session.d.ts.map +0 -1
  205. package/auth/session/orchestrated-token.store.d.ts +0 -155
  206. package/auth/session/orchestrated-token.store.d.ts.map +0 -1
  207. package/auth/session/redis-session.store.d.ts +0 -93
  208. package/auth/session/redis-session.store.d.ts.map +0 -1
  209. package/auth/session/session-crypto.d.ts +0 -84
  210. package/auth/session/session-crypto.d.ts.map +0 -1
  211. package/auth/session/session-rate-limiter.d.ts +0 -114
  212. package/auth/session/session-rate-limiter.d.ts.map +0 -1
  213. package/auth/session/session.transport.d.ts +0 -11
  214. package/auth/session/session.transport.d.ts.map +0 -1
  215. package/auth/session/session.types.d.ts +0 -66
  216. package/auth/session/session.types.d.ts.map +0 -1
  217. package/auth/session/token.refresh.d.ts +0 -60
  218. package/auth/session/token.refresh.d.ts.map +0 -1
  219. package/auth/session/transport-session.types.d.ts +0 -479
  220. package/auth/session/transport-session.types.d.ts.map +0 -1
  221. package/auth/session/utils/auth-token.utils.d.ts +0 -12
  222. package/auth/session/utils/auth-token.utils.d.ts.map +0 -1
  223. package/auth/session/vercel-kv-session.store.d.ts +0 -117
  224. package/auth/session/vercel-kv-session.store.d.ts.map +0 -1
  225. package/auth/ui/base-layout.d.ts +0 -181
  226. package/auth/ui/base-layout.d.ts.map +0 -1
  227. package/auth/ui/index.d.ts +0 -11
  228. package/auth/ui/index.d.ts.map +0 -1
  229. package/auth/ui/templates.d.ts +0 -135
  230. package/auth/ui/templates.d.ts.map +0 -1
  231. package/auth/utils/authorization-id.utils.d.ts +0 -12
  232. package/auth/utils/authorization-id.utils.d.ts.map +0 -1
  233. package/auth/utils/index.d.ts +0 -2
  234. package/auth/utils/index.d.ts.map +0 -1
  235. package/auth/vault/auth-providers.accessor.d.ts +0 -153
  236. package/auth/vault/auth-providers.accessor.d.ts.map +0 -1
  237. package/auth/vault/auth-providers.accessor.impl.d.ts +0 -52
  238. package/auth/vault/auth-providers.accessor.impl.d.ts.map +0 -1
  239. package/auth/vault/auth-providers.registry.d.ts +0 -110
  240. package/auth/vault/auth-providers.registry.d.ts.map +0 -1
  241. package/auth/vault/auth-providers.vault.d.ts +0 -93
  242. package/auth/vault/auth-providers.vault.d.ts.map +0 -1
  243. package/auth/vault/credential-loaders/eager-loader.d.ts +0 -46
  244. package/auth/vault/credential-loaders/eager-loader.d.ts.map +0 -1
  245. package/auth/vault/credential-loaders/index.d.ts +0 -7
  246. package/auth/vault/credential-loaders/index.d.ts.map +0 -1
  247. package/auth/vault/credential-loaders/lazy-loader.d.ts +0 -53
  248. package/auth/vault/credential-loaders/lazy-loader.d.ts.map +0 -1
@@ -1,110 +0,0 @@
1
- /**
2
- * AuthProvidersRegistry - Registry for credential providers
3
- *
4
- * Manages registration and lookup of credential providers.
5
- * Providers are registered at scope initialization and
6
- * remain available for the lifetime of the scope.
7
- */
8
- import { Token } from '@frontmcp/di';
9
- import type { Credential, CredentialProviderConfig, CredentialScope, LoadingStrategy, AuthProvidersVaultOptions } from '@frontmcp/auth';
10
- /**
11
- * Normalized provider config with defaults applied
12
- */
13
- export interface NormalizedProviderConfig<T extends Credential = Credential> extends Required<Pick<CredentialProviderConfig<T>, 'name' | 'scope' | 'loading'>> {
14
- description?: string;
15
- cacheTtl: number;
16
- factory: CredentialProviderConfig<T>['factory'];
17
- refresh?: CredentialProviderConfig<T>['refresh'];
18
- toHeaders?: CredentialProviderConfig<T>['toHeaders'];
19
- metadata?: Record<string, unknown>;
20
- required: boolean;
21
- }
22
- /**
23
- * AuthProvidersRegistry - Manages credential provider configurations
24
- */
25
- export declare class AuthProvidersRegistry {
26
- private readonly providers;
27
- private readonly defaultCacheTtl;
28
- constructor(options?: AuthProvidersVaultOptions);
29
- /**
30
- * Register a credential provider
31
- *
32
- * @param config - Provider configuration
33
- * @throws Error if provider with same name already registered
34
- */
35
- register<T extends Credential = Credential>(config: CredentialProviderConfig<T>): void;
36
- /**
37
- * Unregister a credential provider
38
- *
39
- * @param name - Provider name to unregister
40
- * @returns true if provider was unregistered, false if not found
41
- */
42
- unregister(name: string): boolean;
43
- /**
44
- * Get a provider configuration by name
45
- *
46
- * @param name - Provider name
47
- * @returns Provider config or undefined if not found
48
- */
49
- get<T extends Credential = Credential>(name: string): NormalizedProviderConfig<T> | undefined;
50
- /**
51
- * Check if a provider is registered
52
- *
53
- * @param name - Provider name
54
- * @returns true if provider is registered
55
- */
56
- has(name: string): boolean;
57
- /**
58
- * Get all registered provider names
59
- */
60
- getNames(): string[];
61
- /**
62
- * Get all provider configurations
63
- */
64
- getAll(): NormalizedProviderConfig[];
65
- /**
66
- * Get providers by scope
67
- *
68
- * @param scope - Credential scope to filter by
69
- */
70
- getByScope(scope: CredentialScope): NormalizedProviderConfig[];
71
- /**
72
- * Get providers by loading strategy
73
- *
74
- * @param loading - Loading strategy to filter by
75
- */
76
- getByLoading(loading: LoadingStrategy): NormalizedProviderConfig[];
77
- /**
78
- * Get providers that are required
79
- */
80
- getRequired(): NormalizedProviderConfig[];
81
- /**
82
- * Get providers that should be eagerly loaded
83
- */
84
- getEager(): NormalizedProviderConfig[];
85
- /**
86
- * Get providers that should be lazily loaded
87
- */
88
- getLazy(): NormalizedProviderConfig[];
89
- /**
90
- * Get the number of registered providers
91
- */
92
- get size(): number;
93
- /**
94
- * Check if registry is empty
95
- */
96
- isEmpty(): boolean;
97
- /**
98
- * Clear all registered providers
99
- */
100
- clear(): void;
101
- /**
102
- * Normalize provider config with defaults
103
- */
104
- private normalize;
105
- }
106
- /**
107
- * DI Token for AuthProvidersRegistry
108
- */
109
- export declare const AUTH_PROVIDERS_REGISTRY: Token<AuthProvidersRegistry>;
110
- //# sourceMappingURL=auth-providers.registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-providers.registry.d.ts","sourceRoot":"","sources":["../../../src/auth/vault/auth-providers.registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,EACV,UAAU,EACV,wBAAwB,EACxB,eAAe,EACf,eAAe,EACf,yBAAyB,EAC1B,MAAM,gBAAgB,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,wBAAwB,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,CACzE,SAAQ,QAAQ,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;IACjF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC,S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B;IAED;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,OAAO,CAAC,SAAS;CAclB;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAqD,KAAK,CAAC,qBAAqB,CAAC,CAAC"}
@@ -1,93 +0,0 @@
1
- /**
2
- * AuthProvidersVault - Dedicated storage namespace for auth provider credentials
3
- *
4
- * Uses the same underlying storage (Redis/Vercel KV) as AuthorizationVault
5
- * but with a separate namespace to avoid conflicts.
6
- */
7
- import { Token } from '@frontmcp/di';
8
- import type { Credential, AuthorizationVault, AppCredential, CredentialScope } from '@frontmcp/auth';
9
- import { FrontMcpLogger } from '../../common';
10
- /**
11
- * AuthProvidersVault - Storage layer for auth provider credentials
12
- */
13
- export declare class AuthProvidersVault {
14
- private readonly baseVault;
15
- private readonly namespace;
16
- private readonly logger?;
17
- constructor(baseVault: AuthorizationVault, namespace?: string, logger?: FrontMcpLogger);
18
- /**
19
- * Store a credential in the vault
20
- *
21
- * @param sessionId - Current session ID
22
- * @param providerId - Provider name
23
- * @param credential - Credential to store
24
- * @param scope - Credential scope
25
- * @param userId - User ID (required for user scope)
26
- */
27
- storeCredential<T extends Credential>(sessionId: string, providerId: string, credential: T, scope: CredentialScope, userId?: string): Promise<void>;
28
- /**
29
- * Get a credential from the vault
30
- *
31
- * @param sessionId - Current session ID
32
- * @param providerId - Provider name
33
- * @param scope - Credential scope
34
- * @param userId - User ID (required for user scope)
35
- * @returns Credential or null if not found
36
- */
37
- getCredential<T extends Credential>(sessionId: string, providerId: string, scope: CredentialScope, userId?: string): Promise<T | null>;
38
- /**
39
- * Remove a credential from the vault
40
- *
41
- * @param sessionId - Current session ID
42
- * @param providerId - Provider name
43
- * @param scope - Credential scope
44
- * @param userId - User ID (required for user scope)
45
- */
46
- removeCredential(sessionId: string, providerId: string, scope: CredentialScope, userId?: string): Promise<void>;
47
- /**
48
- * Invalidate a credential (mark as invalid without removing)
49
- *
50
- * @param sessionId - Current session ID
51
- * @param providerId - Provider name
52
- * @param scope - Credential scope
53
- * @param reason - Reason for invalidation
54
- * @param userId - User ID (required for user scope)
55
- */
56
- invalidateCredential(sessionId: string, providerId: string, scope: CredentialScope, reason: string, userId?: string): Promise<void>;
57
- /**
58
- * Update OAuth credential tokens (for refresh)
59
- *
60
- * @param sessionId - Current session ID
61
- * @param providerId - Provider name
62
- * @param scope - Credential scope
63
- * @param tokens - New tokens
64
- * @param userId - User ID (required for user scope)
65
- */
66
- refreshOAuthCredential(sessionId: string, providerId: string, scope: CredentialScope, tokens: {
67
- accessToken: string;
68
- refreshToken?: string;
69
- expiresAt?: number;
70
- }, userId?: string): Promise<void>;
71
- /**
72
- * Get all credentials for a session
73
- *
74
- * @param sessionId - Current session ID
75
- * @param scope - Optional scope filter
76
- * @param userId - User ID (required for user scope)
77
- */
78
- getAllCredentials(sessionId: string, scope?: CredentialScope, userId?: string): Promise<AppCredential[]>;
79
- /**
80
- * Build vault key based on scope
81
- *
82
- * Key patterns:
83
- * - global: `authproviders:global`
84
- * - user: `authproviders:user:{userId}`
85
- * - session: `authproviders:session:{sessionId}`
86
- */
87
- private buildVaultKey;
88
- }
89
- /**
90
- * DI Token for AuthProvidersVault
91
- */
92
- export declare const AUTH_PROVIDERS_VAULT: Token<AuthProvidersVault>;
93
- //# sourceMappingURL=auth-providers.vault.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-providers.vault.d.ts","sourceRoot":"","sources":["../../../src/auth/vault/auth-providers.vault.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAErG,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C;;GAEG;AACH,qBAAa,kBAAkB;IAI3B,OAAO,CAAC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AO,CAAC,IAAI,CAAC;IAYhB;;;;;;OAMG;IACG,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAoD9G;;;;;;;OAOG;IACH,OAAO,CAAC,aAAa;CAkBtB;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAkD,KAAK,CAAC,kBAAkB,CAAC,CAAC"}
@@ -1,46 +0,0 @@
1
- /**
2
- * EagerCredentialLoader - Loads credentials at session initialization
3
- *
4
- * Used for providers configured with `loading: 'eager'`.
5
- * Credentials are loaded in parallel at session start.
6
- */
7
- import type { CredentialCache, CredentialFactoryContext, ResolvedCredential } from '@frontmcp/auth';
8
- import type { AuthProvidersRegistry } from '../auth-providers.registry';
9
- import { FrontMcpLogger } from '../../../common';
10
- /**
11
- * Result of eager loading
12
- */
13
- export interface EagerLoadResult {
14
- /** Successfully loaded credentials */
15
- loaded: Map<string, ResolvedCredential>;
16
- /** Failed provider names with errors */
17
- failed: Map<string, Error>;
18
- /** Total loading time in ms */
19
- duration: number;
20
- }
21
- /**
22
- * EagerCredentialLoader - Loads credentials at session initialization
23
- */
24
- export declare class EagerCredentialLoader {
25
- private readonly registry;
26
- private readonly cache;
27
- private readonly logger?;
28
- constructor(registry: AuthProvidersRegistry, cache: CredentialCache, logger?: FrontMcpLogger);
29
- /**
30
- * Load all eager credentials for a session.
31
- * Called during session initialization.
32
- *
33
- * @param context - Factory context with session/user info
34
- * @returns Map of provider name to resolved credential
35
- */
36
- loadForSession(context: CredentialFactoryContext): Promise<EagerLoadResult>;
37
- /**
38
- * Load a single credential
39
- */
40
- private loadOne;
41
- /**
42
- * Wrap credential with resolved metadata
43
- */
44
- private wrapCredential;
45
- }
46
- //# sourceMappingURL=eager-loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eager-loader.d.ts","sourceRoot":"","sources":["../../../../src/auth/vault/credential-loaders/eager-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAc,eAAe,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEhH,OAAO,KAAK,EAAE,qBAAqB,EAA4B,MAAM,4BAA4B,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACxC,wCAAwC;IACxC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC3B,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,qBAAa,qBAAqB;IAI9B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAJxB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAiB;gBAGtB,QAAQ,EAAE,qBAAqB,EAC/B,KAAK,EAAE,eAAe,EACvC,MAAM,CAAC,EAAE,cAAc;IAKzB;;;;;;OAMG;IACG,cAAc,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,eAAe,CAAC;IAoDjF;;OAEG;YACW,OAAO;IAgBrB;;OAEG;IACH,OAAO,CAAC,cAAc;CAcvB"}
@@ -1,7 +0,0 @@
1
- /**
2
- * Credential Loaders - Eager and Lazy credential loading strategies
3
- */
4
- export { EagerCredentialLoader, type EagerLoadResult } from './eager-loader';
5
- export { LazyCredentialLoader } from './lazy-loader';
6
- export { extractCredentialExpiry } from '@frontmcp/auth';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/auth/vault/credential-loaders/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAGrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,53 +0,0 @@
1
- /**
2
- * LazyCredentialLoader - Loads credentials on first access
3
- *
4
- * Used for providers configured with `loading: 'lazy'` (default).
5
- * Prevents concurrent loads for the same provider (deduplication).
6
- */
7
- import type { Credential, CredentialFactoryContext, ResolvedCredential } from '@frontmcp/auth';
8
- import type { NormalizedProviderConfig } from '../auth-providers.registry';
9
- import { FrontMcpLogger } from '../../../common';
10
- /**
11
- * LazyCredentialLoader - Loads credentials on first access
12
- */
13
- export declare class LazyCredentialLoader {
14
- /** In-flight loading promises for deduplication */
15
- private readonly loading;
16
- private readonly logger?;
17
- constructor(logger?: FrontMcpLogger);
18
- /**
19
- * Load a credential lazily.
20
- * If already loading, returns the in-flight promise (deduplication).
21
- *
22
- * @param config - Provider configuration
23
- * @param context - Factory context
24
- * @returns Resolved credential or null
25
- */
26
- load<T extends Credential>(config: NormalizedProviderConfig<T>, context: CredentialFactoryContext): Promise<ResolvedCredential<T> | null>;
27
- /**
28
- * Perform the actual credential loading
29
- */
30
- private doLoad;
31
- /**
32
- * Refresh a credential using the provider's refresh function or factory
33
- *
34
- * @param config - Provider configuration
35
- * @param context - Factory context with existing credential
36
- * @returns Refreshed credential or null
37
- */
38
- refresh<T extends Credential>(config: NormalizedProviderConfig<T>, context: CredentialFactoryContext & {
39
- existingCredential: T;
40
- }): Promise<ResolvedCredential<T> | null>;
41
- /**
42
- * Check if a credential is currently being loaded
43
- *
44
- * @param name - Provider name
45
- * @returns true if loading is in progress
46
- */
47
- isLoading(name: string): boolean;
48
- /**
49
- * Cancel all in-flight loads (for cleanup)
50
- */
51
- cancelAll(): void;
52
- }
53
- //# sourceMappingURL=lazy-loader.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lazy-loader.d.ts","sourceRoot":"","sources":["../../../../src/auth/vault/credential-loaders/lazy-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAE/F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,mDAAmD;IACnD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAyD;IACjF,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAiB;gBAE7B,MAAM,CAAC,EAAE,cAAc;IAInC;;;;;;;OAOG;IACG,IAAI,CAAC,CAAC,SAAS,UAAU,EAC7B,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC,EACnC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAmBxC;;OAEG;YACW,MAAM;IAsCpB;;;;;;OAMG;IACG,OAAO,CAAC,CAAC,SAAS,UAAU,EAChC,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC,EACnC,OAAO,EAAE,wBAAwB,GAAG;QAAE,kBAAkB,EAAE,CAAC,CAAA;KAAE,GAC5D,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAwCxC;;;;;OAKG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIhC;;OAEG;IACH,SAAS,IAAI,IAAI;CAGlB"}