@barndoor-ai/sdk 1.0.2 → 1.2.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.
- package/dist/auth/clientCredentials.d.ts +67 -0
- package/dist/auth/clientCredentials.d.ts.map +1 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/store.d.ts +1 -1
- package/dist/client.d.ts +98 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +11 -11
- package/dist/index.js +9 -9
- package/package.json +4 -2
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth 2.0 client-credentials (machine-to-machine) grant support.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the Python SDK's `get_client_credentials_token` /
|
|
5
|
+
* `get_client_credentials_token_async` helpers (PR #78).
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Parameters for the client-credentials grant.
|
|
9
|
+
*/
|
|
10
|
+
export interface ClientCredentialsParams {
|
|
11
|
+
/** OAuth client ID for a Barndoor M2M application. */
|
|
12
|
+
clientId: string;
|
|
13
|
+
/** OAuth client secret. */
|
|
14
|
+
clientSecret: string;
|
|
15
|
+
/** API audience identifier (e.g., `https://barndoor.ai/`). */
|
|
16
|
+
audience: string;
|
|
17
|
+
/**
|
|
18
|
+
* OIDC issuer URL. Preferred over `domain`; OIDC discovery is used to
|
|
19
|
+
* locate the token endpoint.
|
|
20
|
+
*/
|
|
21
|
+
issuer?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Legacy auth domain (POSTs directly to `https://{domain}/oauth/token`).
|
|
24
|
+
* Provide either `issuer` or `domain`.
|
|
25
|
+
*/
|
|
26
|
+
domain?: string;
|
|
27
|
+
/** Request timeout in milliseconds (default: 15000). */
|
|
28
|
+
timeoutMs?: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Resolve the token endpoint and form body for a client-credentials grant.
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export declare function _resolveClientCredentialsRequest(params: ClientCredentialsParams): Promise<{
|
|
35
|
+
tokenEndpoint: string;
|
|
36
|
+
body: URLSearchParams;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* Perform the OAuth 2.0 client-credentials grant against the auth server
|
|
40
|
+
* and return the issued access token.
|
|
41
|
+
*
|
|
42
|
+
* Suitable for headless / machine-to-machine use cases where no interactive
|
|
43
|
+
* user is available. The token is returned directly without caching; for
|
|
44
|
+
* a ready-to-use SDK instance with automatic refresh, prefer
|
|
45
|
+
* {@link BarndoorSDK.fromClientCredentials}.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const token = await getClientCredentialsToken({
|
|
50
|
+
* clientId: process.env.BARNDOOR_M2M_CLIENT_ID!,
|
|
51
|
+
* clientSecret: process.env.BARNDOOR_M2M_CLIENT_SECRET!,
|
|
52
|
+
* audience: 'https://barndoor.ai/',
|
|
53
|
+
* issuer: 'https://auth.barndoor.ai/realms/barndoor',
|
|
54
|
+
* });
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare function getClientCredentialsToken(params: ClientCredentialsParams): Promise<string>;
|
|
58
|
+
/**
|
|
59
|
+
* Return true if the given JWT's `exp` claim is within `skewSeconds` of now.
|
|
60
|
+
*
|
|
61
|
+
* Tokens that cannot be parsed or have no `exp` claim are treated as
|
|
62
|
+
* already expired so callers err on the side of refreshing.
|
|
63
|
+
*
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
export declare function _tokenNearExpiry(token: string, skewSeconds: number): boolean;
|
|
67
|
+
//# sourceMappingURL=clientCredentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clientCredentials.d.ts","sourceRoot":"","sources":["../../src/auth/clientCredentials.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,sDAAsD;IACtD,QAAQ,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAsB,gCAAgC,CACpD,MAAM,EAAE,uBAAuB,GAC9B,OAAO,CAAC;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,CAAC,CAqB3D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,MAAM,CAAC,CA6ChG;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAyB5E"}
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* including PKCE OAuth flows, token storage, and interactive login.
|
|
6
6
|
*/
|
|
7
7
|
export { PKCEManager, startLocalCallbackServer } from './pkce';
|
|
8
|
+
export { getClientCredentialsToken, _tokenNearExpiry } from './clientCredentials';
|
|
9
|
+
export type { ClientCredentialsParams } from './clientCredentials';
|
|
8
10
|
export { getTokenStorage, TokenManager, loadUserToken, saveUserToken, clearCachedToken, verifyJWTLocal, JWTVerificationResult, isTokenActive, isTokenActiveWithRefresh, validateToken, setTokenLogger, getOidcConfig, clearOidcConfigCache, } from './store';
|
|
9
11
|
export type { OidcConfig } from './store';
|
|
10
12
|
export type { AuthorizationUrlParams, TokenExchangeParams, PKCEState } from './pkce';
|
package/dist/auth/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAC;AAE/D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,wBAAwB,EACxB,aAAa,EACb,cAAc,EACd,aAAa,EACb,oBAAoB,GACrB,MAAM,SAAS,CAAC;AAGjB,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,YAAY,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrF,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,QAAQ,CAAC;AAE/D,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClF,YAAY,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EACL,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,wBAAwB,EACxB,aAAa,EACb,cAAc,EACd,aAAa,EACb,oBAAoB,GACrB,MAAM,SAAS,CAAC;AAGjB,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,YAAY,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrF,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/auth/store.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface OidcConfig {
|
|
|
20
20
|
* Fetch and cache OIDC configuration from the issuer's discovery endpoint.
|
|
21
21
|
*
|
|
22
22
|
* @param issuer - The OIDC issuer URL (e.g., https://auth.barndoor.ai or
|
|
23
|
-
* https://auth.
|
|
23
|
+
* https://auth.barndoor.ai/realms/barndoor)
|
|
24
24
|
* @returns OIDC configuration containing endpoints like token_endpoint, jwks_uri, etc.
|
|
25
25
|
*/
|
|
26
26
|
export declare function getOidcConfig(issuer: string): Promise<OidcConfig>;
|
package/dist/client.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* SDK's client.py functionality with 100% API compatibility.
|
|
6
6
|
*/
|
|
7
7
|
import { ServerSummary, ServerDetail } from './models';
|
|
8
|
+
import { ClientCredentialsParams } from './auth/clientCredentials';
|
|
8
9
|
/**
|
|
9
10
|
* Configuration options for BarndoorSDK constructor.
|
|
10
11
|
*/
|
|
@@ -40,6 +41,15 @@ export interface ConnectionStatusResponse {
|
|
|
40
41
|
/** Current connection status */
|
|
41
42
|
status: string;
|
|
42
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Options for {@link BarndoorSDK.fromClientCredentials}.
|
|
46
|
+
*/
|
|
47
|
+
export interface FromClientCredentialsOptions extends ClientCredentialsParams {
|
|
48
|
+
/** Request timeout in seconds for API calls (default: 30). */
|
|
49
|
+
timeout?: number;
|
|
50
|
+
/** Maximum number of retries for API calls (default: 3). */
|
|
51
|
+
maxRetries?: number;
|
|
52
|
+
}
|
|
43
53
|
/**
|
|
44
54
|
* Async client for interacting with the Barndoor Platform API.
|
|
45
55
|
*
|
|
@@ -62,6 +72,8 @@ export declare class BarndoorSDK {
|
|
|
62
72
|
private _tokenValidated;
|
|
63
73
|
/** Whether the SDK has been closed */
|
|
64
74
|
private _closed;
|
|
75
|
+
/** Cached client-credentials parameters for automatic token refresh. */
|
|
76
|
+
private _credentials;
|
|
65
77
|
/** Scoped logger for this SDK instance */
|
|
66
78
|
private readonly _logger;
|
|
67
79
|
/**
|
|
@@ -70,6 +82,30 @@ export declare class BarndoorSDK {
|
|
|
70
82
|
* @param options - Configuration options (token is optional)
|
|
71
83
|
*/
|
|
72
84
|
constructor(apiBaseUrl: string, options?: BarndoorSDKOptions);
|
|
85
|
+
/**
|
|
86
|
+
* Build a {@link BarndoorSDK} authenticated via the OAuth 2.0
|
|
87
|
+
* client-credentials (machine-to-machine) grant.
|
|
88
|
+
*
|
|
89
|
+
* Performs the grant against the Barndoor auth server and returns a
|
|
90
|
+
* ready-to-use SDK instance. The credentials are retained on the
|
|
91
|
+
* instance so the access token can be refreshed automatically when it
|
|
92
|
+
* nears expiry or when the API responds with 401.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```ts
|
|
96
|
+
* const sdk = await BarndoorSDK.fromClientCredentials(
|
|
97
|
+
* 'https://api.barndoor.host',
|
|
98
|
+
* {
|
|
99
|
+
* clientId: process.env.BARNDOOR_M2M_CLIENT_ID!,
|
|
100
|
+
* clientSecret: process.env.BARNDOOR_M2M_CLIENT_SECRET!,
|
|
101
|
+
* audience: 'https://barndoor.ai/',
|
|
102
|
+
* issuer: 'https://auth.barndoor.ai/realms/barndoor',
|
|
103
|
+
* }
|
|
104
|
+
* );
|
|
105
|
+
* const servers = await sdk.listServers();
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
static fromClientCredentials(apiBaseUrl: string, options: FromClientCredentialsOptions): Promise<BarndoorSDK>;
|
|
73
109
|
/**
|
|
74
110
|
* Get the current token.
|
|
75
111
|
*/
|
|
@@ -99,6 +135,18 @@ export declare class BarndoorSDK {
|
|
|
99
135
|
* @private
|
|
100
136
|
*/
|
|
101
137
|
private _req;
|
|
138
|
+
/**
|
|
139
|
+
* Refresh the M2M access token if it is near expiry.
|
|
140
|
+
*
|
|
141
|
+
* No-op for SDK instances not created via {@link BarndoorSDK.fromClientCredentials}.
|
|
142
|
+
* @private
|
|
143
|
+
*/
|
|
144
|
+
private _maybeRefreshM2MToken;
|
|
145
|
+
/**
|
|
146
|
+
* Unconditionally fetch a fresh M2M token using stored credentials.
|
|
147
|
+
* @private
|
|
148
|
+
*/
|
|
149
|
+
private _refreshM2MToken;
|
|
102
150
|
/**
|
|
103
151
|
* Validate the cached token by making a test API call.
|
|
104
152
|
* @returns True if the token is valid
|
|
@@ -152,6 +200,56 @@ export declare class BarndoorSDK {
|
|
|
152
200
|
* @private
|
|
153
201
|
*/
|
|
154
202
|
private _isUuid;
|
|
203
|
+
/**
|
|
204
|
+
* List policies with pagination and filtering.
|
|
205
|
+
* @param page - Page number for pagination (default: 1)
|
|
206
|
+
* @param limit - Number of items per page (default: 10)
|
|
207
|
+
* @param filters - Additional query parameters for filtering
|
|
208
|
+
* @returns Paginated response containing policies
|
|
209
|
+
*/
|
|
210
|
+
listPolicies(page?: number, limit?: number, filters?: Record<string, any>): Promise<any>;
|
|
211
|
+
/**
|
|
212
|
+
* Get detailed information about a specific policy.
|
|
213
|
+
* @param policyId - Unique identifier of the policy
|
|
214
|
+
* @returns Policy details
|
|
215
|
+
*/
|
|
216
|
+
getPolicy(policyId: string): Promise<any>;
|
|
217
|
+
/**
|
|
218
|
+
* Create a new policy.
|
|
219
|
+
* @param policyData - Policy configuration data
|
|
220
|
+
* @returns Created policy details
|
|
221
|
+
*/
|
|
222
|
+
createPolicy(policyData: any): Promise<any>;
|
|
223
|
+
/**
|
|
224
|
+
* Update an existing policy.
|
|
225
|
+
* @param policyId - Unique identifier of the policy to update
|
|
226
|
+
* @param policyData - Updated policy configuration data
|
|
227
|
+
* @returns Updated policy details
|
|
228
|
+
*/
|
|
229
|
+
updatePolicy(policyId: string, policyData: any): Promise<any>;
|
|
230
|
+
/**
|
|
231
|
+
* Clone an existing policy.
|
|
232
|
+
* @param policyId - Unique identifier of the policy to clone
|
|
233
|
+
* @param newName - Name for the cloned policy
|
|
234
|
+
* @returns Cloned policy details
|
|
235
|
+
*/
|
|
236
|
+
clonePolicy(policyId: string, newName: string): Promise<any>;
|
|
237
|
+
/**
|
|
238
|
+
* Validate policy configuration.
|
|
239
|
+
* @param validationData - Policy data to validate
|
|
240
|
+
* @returns Validation result
|
|
241
|
+
*/
|
|
242
|
+
validatePolicy(validationData: any): Promise<any>;
|
|
243
|
+
/**
|
|
244
|
+
* Get summary of all policies.
|
|
245
|
+
* @returns Policy summary information
|
|
246
|
+
*/
|
|
247
|
+
getPolicySummary(): Promise<any>;
|
|
248
|
+
/**
|
|
249
|
+
* Get available filter definitions for policies.
|
|
250
|
+
* @returns Available filter categories and options
|
|
251
|
+
*/
|
|
252
|
+
getPolicyFilterDefinitions(): Promise<any>;
|
|
155
253
|
/**
|
|
156
254
|
* Close the SDK and clean up resources.
|
|
157
255
|
*/
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIvD,OAAO,EACL,uBAAuB,EAGxB,MAAM,0BAA0B,CAAC;AAQlC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAsBD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,6CAA6C;IAC7C,WAAW,CAAC,EAAE,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AAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAezE;;;;OAIG;IACU,cAAc,CAAC,cAAc,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAS9D;;;OAGG;IACU,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC;IAK7C;;;OAGG;IACU,0BAA0B,IAAI,OAAO,CAAC,GAAG,CAAC;IAKvD;;OAEG;IACU,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAOnC;;OAEG;IACU,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIpC;;;;OAIG;IACU,qBAAqB,CAChC,gBAAgB,EAAE,MAAM,EACxB,OAAO,GAAE,4BAAiC,GACzC,OAAO,CAAC,IAAI,CAAC;CA4EjB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -28,11 +28,12 @@
|
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
30
|
export { BarndoorSDK } from './client';
|
|
31
|
+
export type { FromClientCredentialsOptions } from './client';
|
|
31
32
|
export { BarndoorError, AuthenticationError, TokenError, TokenExpiredError, TokenValidationError, ConnectionError, HTTPError, ServerNotFoundError, OAuthError, ConfigurationError, TimeoutError, } from './exceptions';
|
|
32
33
|
export { ServerSummary, ServerDetail, AgentToken } from './models';
|
|
33
34
|
export { loginInteractive, ensureServerConnected, makeMcpConnectionParams, makeMcpClient, } from './quickstart';
|
|
34
|
-
export { PKCEManager, startLocalCallbackServer, loadUserToken, saveUserToken, clearCachedToken, setTokenLogger, verifyJWTLocal, JWTVerificationResult, isTokenActive, isTokenActiveWithRefresh, validateToken, TokenManager, getOidcConfig, clearOidcConfigCache, } from './auth';
|
|
35
|
-
export type { OidcConfig } from './auth';
|
|
35
|
+
export { PKCEManager, startLocalCallbackServer, loadUserToken, saveUserToken, clearCachedToken, setTokenLogger, verifyJWTLocal, JWTVerificationResult, isTokenActive, isTokenActiveWithRefresh, validateToken, TokenManager, getOidcConfig, clearOidcConfigCache, getClientCredentialsToken, } from './auth';
|
|
36
|
+
export type { OidcConfig, ClientCredentialsParams } from './auth';
|
|
36
37
|
export { AUTH_CONFIG, BarndoorConfig, getStaticConfig, getDynamicConfig, checkTokenOrganization, hasOrganizationInfo, isBrowser, isNode, } from './config';
|
|
37
38
|
export { setLogger, getLogger, createScopedLogger, debug, info, warn, error } from './logging';
|
|
38
39
|
export type { Logger } from './logging';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAG7D,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,kBAAkB,EAClB,YAAY,GACb,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGnE,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,GACd,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,WAAW,EACX,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,wBAAwB,EACxB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,QAAQ,C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