@atproto/api 0.13.0-rc.0 → 0.13.0-rc.2

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 (67) hide show
  1. package/CHANGELOG.md +13 -25
  2. package/OAUTH.md +37 -35
  3. package/dist/agent.d.ts +78 -15
  4. package/dist/agent.d.ts.map +1 -1
  5. package/dist/agent.js +250 -53
  6. package/dist/agent.js.map +1 -1
  7. package/dist/atp-agent.d.ts +10 -8
  8. package/dist/atp-agent.d.ts.map +1 -1
  9. package/dist/atp-agent.js +38 -34
  10. package/dist/atp-agent.js.map +1 -1
  11. package/dist/client/lexicons.d.ts +1092 -2
  12. package/dist/client/lexicons.d.ts.map +1 -1
  13. package/dist/client/lexicons.js +32 -3
  14. package/dist/client/lexicons.js.map +1 -1
  15. package/dist/client/types/app/bsky/actor/defs.d.ts +5 -0
  16. package/dist/client/types/app/bsky/actor/defs.d.ts.map +1 -1
  17. package/dist/client/types/app/bsky/actor/defs.js.map +1 -1
  18. package/dist/client/types/app/bsky/feed/defs.d.ts +1 -1
  19. package/dist/client/types/app/bsky/feed/defs.d.ts.map +1 -1
  20. package/dist/client/types/com/atproto/label/defs.d.ts +1 -1
  21. package/dist/client/types/com/atproto/server/getServiceAuth.d.ts +8 -1
  22. package/dist/client/types/com/atproto/server/getServiceAuth.d.ts.map +1 -1
  23. package/dist/client/types/com/atproto/server/getServiceAuth.js +15 -1
  24. package/dist/client/types/com/atproto/server/getServiceAuth.js.map +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +3 -3
  28. package/dist/index.js.map +1 -1
  29. package/dist/moderation/decision.js +1 -1
  30. package/dist/moderation/decision.js.map +1 -1
  31. package/dist/moderation/mutewords.d.ts +2 -1
  32. package/dist/moderation/mutewords.d.ts.map +1 -1
  33. package/dist/moderation/mutewords.js +7 -1
  34. package/dist/moderation/mutewords.js.map +1 -1
  35. package/dist/moderation/subjects/post.js +13 -0
  36. package/dist/moderation/subjects/post.js.map +1 -1
  37. package/dist/rich-text/rich-text.d.ts +2 -3
  38. package/dist/rich-text/rich-text.d.ts.map +1 -1
  39. package/dist/rich-text/rich-text.js +1 -1
  40. package/dist/rich-text/rich-text.js.map +1 -1
  41. package/dist/util.d.ts +1 -0
  42. package/dist/util.d.ts.map +1 -1
  43. package/dist/util.js +12 -2
  44. package/dist/util.js.map +1 -1
  45. package/docs/moderation.md +3 -3
  46. package/package.json +5 -5
  47. package/src/agent.ts +300 -60
  48. package/src/atp-agent.ts +55 -42
  49. package/src/client/lexicons.ts +39 -3
  50. package/src/client/types/app/bsky/actor/defs.ts +5 -0
  51. package/src/client/types/app/bsky/feed/defs.ts +1 -1
  52. package/src/client/types/com/atproto/label/defs.ts +1 -1
  53. package/src/client/types/com/atproto/server/getServiceAuth.ts +13 -0
  54. package/src/index.ts +1 -1
  55. package/src/moderation/decision.ts +1 -1
  56. package/src/moderation/mutewords.ts +11 -0
  57. package/src/moderation/subjects/post.ts +15 -0
  58. package/src/rich-text/rich-text.ts +3 -4
  59. package/src/util.ts +10 -1
  60. package/tests/bsky-agent.test.ts +525 -156
  61. package/tests/moderation-mutewords.test.ts +308 -50
  62. package/tests/rich-text-detection.test.ts +7 -7
  63. package/dist/atp-client.d.ts +0 -57
  64. package/dist/atp-client.d.ts.map +0 -1
  65. package/dist/atp-client.js +0 -177
  66. package/dist/atp-client.js.map +0 -1
  67. package/src/atp-client.ts +0 -164
package/CHANGELOG.md CHANGED
@@ -1,40 +1,28 @@
1
1
  # @atproto/api
2
2
 
3
- ## 0.13.0-rc.0
3
+ ## 0.12.29
4
4
 
5
- ### Minor Changes
5
+ ### Patch Changes
6
+
7
+ - [#2668](https://github.com/bluesky-social/atproto/pull/2668) [`dc471da26`](https://github.com/bluesky-social/atproto/commit/dc471da267955d0962a8affaf983df60d962d97c) Thanks [@dholms](https://github.com/dholms)! - Add lxm and exp parameters to com.atproto.server.getServiceAuth
6
8
 
7
- - [#2483](https://github.com/bluesky-social/atproto/pull/2483) [`2ded0156b`](https://github.com/bluesky-social/atproto/commit/2ded0156b9adf33b9cce66583a375bff922d383b) Thanks [@matthieusieben](https://github.com/matthieusieben)! - **New Features**:
9
+ ## 0.12.28
8
10
 
9
- 1. Improved Separation of Concerns: We've restructured the XRPC HTTP call
10
- dispatcher into a distinct class. This means cleaner code organization and
11
- better clarity on responsibilities.
12
- 2. Enhanced Evolutivity: With this refactor, the XRPC client is now more
13
- adaptable to various use cases. You can easily extend and customize the
14
- dispatcher perform session management, retries, and more.
11
+ ### Patch Changes
12
+
13
+ - [#2676](https://github.com/bluesky-social/atproto/pull/2676) [`951a3df15`](https://github.com/bluesky-social/atproto/commit/951a3df15aa9c1f5b0a2b66cfb0e2eaf6198fe41) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Remove `app.bsky.feed.detach` record, to be replaced by `app.bsky.feed.postgate` record in a future release.
15
14
 
16
- **Compatibility**:
15
+ ## 0.12.27
17
16
 
18
- Most of the changes introduced in this version are backward-compatible. However,
19
- there are a couple of breaking changes you should be aware of:
17
+ ### Patch Changes
20
18
 
21
- - Customizing `fetchHandler`: The ability to customize the fetchHandler on the
22
- XRPC Client and AtpAgent classes has been modified. Please review your code if
23
- you rely on custom fetch handlers.
24
- - Managing Sessions: Previously, you had the ability to manage sessions directly
25
- through AtpAgent instances. Now, session management must be handled through a
26
- dedicated `SessionManager` instance. If you were making authenticated
27
- requests, you'll need to update your code to use explicit session management.
28
- - The `fetch()` method, as well as WhatWG compliant `Request` and `Headers`
29
- constructors, must be globally available in your environment.
19
+ - [#2664](https://github.com/bluesky-social/atproto/pull/2664) [`ff803fd2b`](https://github.com/bluesky-social/atproto/commit/ff803fd2bfad92eec5f88ee9b347c174731ef4ec) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Adds `app.bsky.feed.detach` record lexicons.
30
20
 
31
- - [#2483](https://github.com/bluesky-social/atproto/pull/2483) [`2ded0156b`](https://github.com/bluesky-social/atproto/commit/2ded0156b9adf33b9cce66583a375bff922d383b) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add the ability to use `fetch()` compatible `BodyInit` body when making XRPC calls.
21
+ ## 0.12.26
32
22
 
33
23
  ### Patch Changes
34
24
 
35
- - Updated dependencies [[`2ded0156b`](https://github.com/bluesky-social/atproto/commit/2ded0156b9adf33b9cce66583a375bff922d383b), [`2ded0156b`](https://github.com/bluesky-social/atproto/commit/2ded0156b9adf33b9cce66583a375bff922d383b), [`2ded0156b`](https://github.com/bluesky-social/atproto/commit/2ded0156b9adf33b9cce66583a375bff922d383b)]:
36
- - @atproto/lexicon@0.4.1-rc.0
37
- - @atproto/xrpc@0.6.0-rc.0
25
+ - [#2276](https://github.com/bluesky-social/atproto/pull/2276) [`77c5306d2`](https://github.com/bluesky-social/atproto/commit/77c5306d2a40d7edd20def73163b8f93f3a30ee7) Thanks [@estrattonbailey](https://github.com/estrattonbailey)! - Updates muted words lexicons to include new attributes `id`, `actorTarget`, and `expiresAt`. Adds and updates methods in API SDK for better management of muted words.
38
26
 
39
27
  ## 0.12.25
40
28
 
package/OAUTH.md CHANGED
@@ -1,13 +1,12 @@
1
- # Oauth based authentication in a PWA
1
+ # OAuth Client Quickstart
2
2
 
3
- ## Introduction
4
-
5
- This document describes how to implement OAuth based authentication in a PWA, to
6
- communicate with Bluesky's [[ATPROTO]] API.
3
+ This document describes how to implement OAuth based authentication in a
4
+ browser-based Single Page App (SPA), to communicate with
5
+ [atproto](https://atproto.com) API services.
7
6
 
8
7
  ## Prerequisites
9
8
 
10
- - You need a web server, or at very least a static file server, to host your PWA.
9
+ - You need a web server - or at the very least a static file server - to host your SPA.
11
10
 
12
11
  > [!TIP]
13
12
  >
@@ -18,16 +17,16 @@ communicate with Bluesky's [[ATPROTO]] API.
18
17
  > [!TIP]
19
18
  >
20
19
  > You can use a service like [GitHub Pages](https://pages.github.com/) to host
21
- > your client metadata and PWA for free.
20
+ > your client metadata and SPA for free.
22
21
 
23
- - You must be able to build and deploy a PWA to your server.
22
+ - You must be able to build and deploy a SPA to your server.
24
23
 
25
24
  ## Step 1: Create your client metadata
26
25
 
27
26
  Based on your hosting server endpoint, you will first need to choose a
28
- `client_id`. That `client_id` will be used to identify your client to Bluesky's
29
- Authorization Servers. A `client_id` must be a URL that points to a JSON file
30
- that contains your client metadata. The client metadata **must** contain a
27
+ `client_id`. That `client_id` will be used to identify your client to
28
+ Authorization Servers. A `client_id` must be a URL pointing to a JSON file
29
+ which contains your client metadata. The client metadata **must** contain a
31
30
  `client_id` that is the URL used to access the metadata.
32
31
 
33
32
  Here is an example client metadata.
@@ -35,7 +34,7 @@ Here is an example client metadata.
35
34
  ```json
36
35
  {
37
36
  "client_id": "https://example.com/client-metadata.json",
38
- "client_name": "Example PWA",
37
+ "client_name": "Example atproto Browser App",
39
38
  "client_uri": "https://example.com",
40
39
  "logo_uri": "https://example.com/logo.png",
41
40
  "tos_uri": "https://example.com/tos",
@@ -52,7 +51,7 @@ Here is an example client metadata.
52
51
 
53
52
  - `redirect_uris`: An array of URLs that will be used as the redirect URIs for
54
53
  the OAuth flow. This should typically contain a single URL that points to a
55
- page on your PWA that will handle the OAuth response. This URL must be HTTPS.
54
+ page on your SPA that will handle the OAuth response. This URL must be HTTPS.
56
55
 
57
56
  - `client_id`: The URL where the client metadata is hosted. This field must be
58
57
  the exact same as the URL used to access the metadata.
@@ -80,15 +79,16 @@ Here is an example client metadata.
80
79
  > [!NOTE]
81
80
  >
82
81
  > To mitigate phishing attacks, the Authentication Server will typically _not_
83
- > display the `client_uri`, `logo_uri` to the user. If you don't see your logo
84
- > or client name during the authentication process, don't worry, this is normal.
82
+ > display the `client_uri` or `logo_uri` to the user. If you don't see your logo
83
+ > or client name during the authentication process, don't worry. This is normal.
84
+ > The `client_name` _is_ generally displayed for all clients.
85
85
 
86
86
  Upload this JSON file so that it is accessible at the URL you chose for your
87
87
  `client_id`.
88
88
 
89
- ## Step 2: Setup you PWA
89
+ ## Step 2: Setup your SPA
90
90
 
91
- Start by setting up your PWA. You can use any framework you like, or none at
91
+ Start by setting up your SPA. You can use any framework you like, or none at
92
92
  all. In this example, we will use TypeScript and Parcel, with plain JavaScript.
93
93
 
94
94
  ```bash
@@ -130,7 +130,7 @@ Create an `src/index.html` file with the following content:
130
130
  And an `src/app.ts` file, with the following content:
131
131
 
132
132
  ```typescript
133
- console.log('Hello from PWA!')
133
+ console.log('Hello from atproto OAuth example app!')
134
134
  ```
135
135
 
136
136
  Start the app in development mode:
@@ -152,7 +152,7 @@ ngrok as the `client_id`:
152
152
  ```json
153
153
  {
154
154
  "client_id": "https://<RANDOM_VALUE>.ngrok.app/client-metadata.json",
155
- "client_name": "My First ATPROTO OAuth App",
155
+ "client_name": "My First atproto OAuth App",
156
156
  "client_uri": "https://<RANDOM_VALUE>.ngrok.app",
157
157
  "redirect_uris": ["https://<RANDOM_VALUE>.ngrok.app/"],
158
158
  "grant_types": ["authorization_code"],
@@ -184,18 +184,19 @@ document.addEventListener('DOMContentLoaded', main)
184
184
 
185
185
  > [!CAUTION]
186
186
  >
187
- > By using `https://bsky.app/` as the `handleResolver`, you are using Bluesky's
188
- > servers as handle resolver. This has the advantage of not requiring you to
189
- > host your own handle resolver, but it also means that Bluesky will be able to
190
- > see the IP addresses of your users (and their associated handle). If you want
191
- > to avoid this, you will need to host your own handle resolver. If you are a
192
- > PDS self-hoster, you can use your PDS's URL here. If you rely on Bluesky's
193
- > handle resolver, you are required to inform your users that their IP addresses
194
- > will be shared with Bluesky in your app's privacy policy.
195
-
196
- The `oauthClient` is now configured to communicate with Bluesky's Authorization.
197
- We can now initialize it in order to detect if the user is already
198
- authenticated. Replace the `// TO BE CONTINUED` comment with the following code:
187
+ > Using Bluesky-hosted services for handle resolution (eg, the `bsky.social`
188
+ > endpoint) will leak both user IP addresses and handle identifier to Bluesky,
189
+ > a third party. While Bluesky has a declared privacy policy, both developers
190
+ > and users of applications need to be informed of and aware of the privacy
191
+ > implications of this arrangement. Application developers are encouraged to
192
+ > improve user privacy by operating their own handle resolution service when
193
+ > possible. If you are a PDS self-hoster, you can use your PDS's URL for
194
+ > `handleResolver`.
195
+
196
+ The `oauthClient` is now configured to communicate with the user's
197
+ Authorization Service. You can now initialize it in order to detect if the user
198
+ is already authenticated. Replace the `// TO BE CONTINUED` comment with the
199
+ following code:
199
200
 
200
201
  ```typescript
201
202
  const result = await oauthClient.init()
@@ -212,7 +213,7 @@ the `// TO BE CONTINUED` comment with the following code:
212
213
 
213
214
  ```typescript
214
215
  if (!agent) {
215
- const handle = prompt('Enter your Bluesky handle to authenticate')
216
+ const handle = prompt('Enter your atproto handle to authenticate')
216
217
  if (!handle) throw new Error('Authentication process canceled by the user')
217
218
 
218
219
  const url = await oauthClient.authorize(handle)
@@ -234,9 +235,10 @@ if (!agent) {
234
235
  ```
235
236
 
236
237
  At this point in the script, the user **will** be authenticated. API calls can
237
- be made using an `ApiClient` instance. Let's make a simple call to the API to
238
- retrieve the user's profile. Replace the `// TO BE CONTINUED` comment with the
239
- following code:
238
+ be made using the `agent`. The `agent` is an instance of a sub-class of the
239
+ `Agent` from `@atproto/api`. Let's make a simple call to the API to retrieve the
240
+ user's profile. Replace the `// TO BE CONTINUED` comment with the following
241
+ code:
240
242
 
241
243
  ```typescript
242
244
  if (agent) {
package/dist/agent.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- import { FetchHandler } from '@atproto/xrpc';
2
- import { AtpClient } from './atp-client';
3
- import { AppBskyActorDefs, AppBskyActorProfile, AppBskyFeedPost } from './client/index';
1
+ import { FetchHandler, FetchHandlerOptions } from '@atproto/xrpc';
2
+ import { AppBskyActorDefs, AppBskyActorProfile, AppBskyFeedPost, AtpBaseClient } from './client/index';
3
+ import { MutedWord } from './client/types/app/bsky/actor/defs';
4
4
  import { InterpretedLabelValueDefinition, LabelPreference, ModerationPrefs } from './moderation/types';
5
- import { BskyFeedViewPreference, BskyInterestsPreference, BskyPreferences, BskyThreadViewPreference } from './types';
5
+ import { AtpAgentGlobalOpts, AtprotoServiceType, BskyFeedViewPreference, BskyInterestsPreference, BskyPreferences, BskyThreadViewPreference } from './types';
6
+ import { Did } from './util';
6
7
  declare global {
7
8
  interface Array<T> {
8
9
  findLast(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T;
@@ -10,22 +11,45 @@ declare global {
10
11
  }
11
12
  export type { FetchHandler };
12
13
  /**
13
- * {@link Agent} is an abstract class that extends {@link AtpClient} with
14
- * (abstract) session based utilities and bsky-specific methods.
14
+ * An {@link Agent} is an {@link AtpBaseClient} with the following
15
+ * additional features:
16
+ * - Abstract session management utilities
17
+ * - AT Protocol labelers configuration utilities
18
+ * - AT Protocol proxy configuration utilities
19
+ * - Cloning utilities
20
+ * - `app.bsky` syntactic sugar
21
+ * - `com.atproto` syntactic sugar
15
22
  */
16
- export declare abstract class Agent extends AtpClient {
23
+ export declare abstract class Agent extends AtpBaseClient {
17
24
  #private;
18
- /** @deprecated use "this" instead */
19
- get api(): this;
20
25
  /**
21
- * Get the authenticated user's DID, if any.
26
+ * The labelers to be used across all requests with the takedown capability
22
27
  */
23
- abstract readonly did?: string;
28
+ static appLabelers: readonly string[];
29
+ /**
30
+ * Configures the Agent (or its sub classes) globally.
31
+ */
32
+ static configure(opts: AtpAgentGlobalOpts): void;
33
+ constructor(fetchHandlerOpts: FetchHandler | FetchHandlerOptions);
34
+ abstract clone(): Agent;
35
+ copyInto<T extends Agent>(inst: T): T;
36
+ withProxy(serviceType: AtprotoServiceType, did: string): ReturnType<this["clone"]>;
37
+ /**
38
+ * The labelers statically configured on the class of the current instance.
39
+ */
40
+ get appLabelers(): readonly string[];
41
+ labelers: readonly string[];
42
+ configureLabelers(labelerDids: readonly string[]): void;
43
+ /** @deprecated use {@link configureLabelers} instead */
44
+ configureLabelersHeader(labelerDids: readonly string[]): void;
45
+ proxy?: `${Did}#${AtprotoServiceType}`;
46
+ configureProxy(value: `${Did}#${AtprotoServiceType}` | null): void;
47
+ /** @deprecated use {@link configureProxy} instead */
48
+ configureProxyHeader(serviceType: AtprotoServiceType, did: string): void;
24
49
  /**
25
- * Sign the current user out. This might make the agent un-useable (depending
26
- * on whether the sub-class implementation supports signing back in).
50
+ * Get the authenticated user's DID, if any.
27
51
  */
28
- abstract signOut(): Promise<void>;
52
+ abstract readonly did?: string;
29
53
  /**
30
54
  * Get the authenticated user's DID, or throw an error if not authenticated.
31
55
  */
@@ -36,6 +60,24 @@ export declare abstract class Agent extends AtpClient {
36
60
  assertAuthenticated(): asserts this is {
37
61
  did: string;
38
62
  };
63
+ /** @deprecated use "this" instead */
64
+ get api(): this;
65
+ /**
66
+ * Upload a binary blob to the server
67
+ */
68
+ uploadBlob: typeof this.com.atproto.repo.uploadBlob;
69
+ /**
70
+ * Resolve a handle to a DID
71
+ */
72
+ resolveHandle: typeof this.com.atproto.identity.resolveHandle;
73
+ /**
74
+ * Change the user's handle
75
+ */
76
+ updateHandle: typeof this.com.atproto.identity.updateHandle;
77
+ /**
78
+ * Create a moderation report
79
+ */
80
+ createModerationReport: typeof this.com.atproto.moderation.createReport;
39
81
  getTimeline: typeof this.app.bsky.feed.getTimeline;
40
82
  getAuthorFeed: typeof this.app.bsky.feed.getAuthorFeed;
41
83
  getActorLikes: typeof this.app.bsky.feed.getActorLikes;
@@ -136,9 +178,30 @@ export declare abstract class Agent extends AtpClient {
136
178
  setFeedViewPrefs(feed: string, pref: Partial<BskyFeedViewPreference>): Promise<void>;
137
179
  setThreadViewPrefs(pref: Partial<BskyThreadViewPreference>): Promise<void>;
138
180
  setInterestsPref(pref: Partial<BskyInterestsPreference>): Promise<void>;
139
- upsertMutedWords(newMutedWords: AppBskyActorDefs.MutedWord[]): Promise<void>;
181
+ /**
182
+ * Add a muted word to user preferences.
183
+ */
184
+ addMutedWord(mutedWord: Pick<MutedWord, 'value' | 'targets' | 'actorTarget' | 'expiresAt'>): Promise<void>;
185
+ /**
186
+ * Convenience method to add muted words to user preferences
187
+ */
188
+ addMutedWords(newMutedWords: AppBskyActorDefs.MutedWord[]): Promise<void>;
189
+ /**
190
+ * @deprecated use `addMutedWords` or `addMutedWord` instead
191
+ */
192
+ upsertMutedWords(mutedWords: Pick<MutedWord, 'value' | 'targets' | 'actorTarget' | 'expiresAt'>[]): Promise<void>;
193
+ /**
194
+ * Update a muted word in user preferences.
195
+ */
140
196
  updateMutedWord(mutedWord: AppBskyActorDefs.MutedWord): Promise<void>;
197
+ /**
198
+ * Remove a muted word from user preferences.
199
+ */
141
200
  removeMutedWord(mutedWord: AppBskyActorDefs.MutedWord): Promise<void>;
201
+ /**
202
+ * Convenience method to remove muted words from user preferences
203
+ */
204
+ removeMutedWords(mutedWords: AppBskyActorDefs.MutedWord[]): Promise<void>;
142
205
  hidePost(postUri: string): Promise<void>;
143
206
  unhidePost(postUri: string): Promise<void>;
144
207
  bskyAppQueueNudges(nudges: string | string[]): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EAGhB,MAAM,gBAAgB,CAAA;AAGvB,OAAO,EACL,+BAA+B,EAC/B,eAAe,EACf,eAAe,EAChB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,EACf,wBAAwB,EACzB,MAAM,SAAS,CAAA;AAqBhB,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC,CAAC;QACf,QAAQ,CACN,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,OAAO,EACzD,OAAO,CAAC,EAAE,GAAG,GACZ,CAAC,CAAA;KACL;CACF;AAED,YAAY,EAAE,YAAY,EAAE,CAAA;AA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