@antasphere/cli-core 0.5.0 → 0.7.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 (48) hide show
  1. package/README.md +324 -85
  2. package/dist/auth.d.ts +1 -1
  3. package/dist/auth.d.ts.map +1 -1
  4. package/dist/config.d.ts +120 -62
  5. package/dist/config.d.ts.map +1 -1
  6. package/dist/config.js +207 -91
  7. package/dist/config.js.map +1 -1
  8. package/dist/connect-on-demand.d.ts +196 -99
  9. package/dist/connect-on-demand.d.ts.map +1 -1
  10. package/dist/connect-on-demand.js +565 -117
  11. package/dist/connect-on-demand.js.map +1 -1
  12. package/dist/connect.d.ts +8 -8
  13. package/dist/connect.d.ts.map +1 -1
  14. package/dist/index.d.ts +25 -17
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +20 -15
  17. package/dist/index.js.map +1 -1
  18. package/dist/kept-keys.d.ts +208 -0
  19. package/dist/kept-keys.d.ts.map +1 -0
  20. package/dist/kept-keys.js +484 -0
  21. package/dist/kept-keys.js.map +1 -0
  22. package/dist/lock.d.ts +65 -0
  23. package/dist/lock.d.ts.map +1 -0
  24. package/dist/lock.js +408 -0
  25. package/dist/lock.js.map +1 -0
  26. package/dist/migrate.d.ts +9 -3
  27. package/dist/migrate.d.ts.map +1 -1
  28. package/dist/migrate.js +32 -11
  29. package/dist/migrate.js.map +1 -1
  30. package/dist/resolve.d.ts +12 -4
  31. package/dist/resolve.d.ts.map +1 -1
  32. package/dist/resolve.js +12 -8
  33. package/dist/resolve.js.map +1 -1
  34. package/dist/sign-in.d.ts +266 -0
  35. package/dist/sign-in.d.ts.map +1 -0
  36. package/dist/sign-in.js +398 -0
  37. package/dist/sign-in.js.map +1 -0
  38. package/package.json +1 -1
  39. package/src/auth.ts +1 -1
  40. package/src/config.ts +303 -136
  41. package/src/connect-on-demand.ts +801 -223
  42. package/src/connect.ts +8 -8
  43. package/src/index.ts +42 -26
  44. package/src/kept-keys.ts +561 -0
  45. package/src/lock.ts +479 -0
  46. package/src/migrate.ts +33 -11
  47. package/src/resolve.ts +20 -15
  48. package/src/sign-in.ts +601 -0
@@ -1,167 +1,264 @@
1
1
  import type { CliEnv } from './config.js';
2
2
  import type { CliConnectResult } from './connect.js';
3
- import type { ResolvedProfile } from './resolve.js';
4
3
  /**
5
- * Connect-on-demand (binding patterns §7, gcloud model), extracted from the
6
- * Slideless CLI so every Antasphere tool CLI inherits "one `antasphere login`
7
- * serves every federated tool". When a tool CLI resolves NO credential of its
8
- * own, it calls `connectOnDemand` with the profile it selected
9
- * (`selectProfile`: the profile IS the instance):
4
+ * Connect-on-demand (binding patterns §7, gcloud model): one Antasphere login
5
+ * per hub serves every federated tool. When a tool CLI resolves NO credential
6
+ * of its own, it calls `connectOnDemand` with the profile it selected
7
+ * (`selectProfile`: the profile IS the site), and the sign-in FOLLOWS THE
8
+ * SITE (R2, PRDCT-3521): the login used is the login at the hub the site
9
+ * trusts (`planSignIn`), never the machine's active hub login.
10
10
  *
11
- * 0. The cache is consulted FIRST: a key minted earlier for THIS instance
12
- * under the active hub profile is USER-scoped (hub ADR 014) — it serves
13
- * every subsequent run and every org, with zero network (no probe, no
14
- * hub round-trip, no fresh mint). It is read on the selected profile
15
- * only when that profile is at the resolved instance (its `baseUrl`,
16
- * else the tool's `cloudUrl` when the profile has none), so a cached
17
- * key never travels to another origin. `cached: false` skips this step.
18
- * 1. On a miss, discovery gates the flow: only an Antasphere-CLOUD
19
- * instance can mint keys through the hub (unauthenticated GET
20
- * /instance — never guess). Unreachable, foreign, or self-hosted
21
- * instances answer `not_cloud` and the tool raises its classic no-key
22
- * error unchanged.
23
- * 2. The hub credential is what `antasphere login` stored on the hub
24
- * profile (the config home's HUB_TOOL namespace) — hub URL included,
25
- * never a hardcoded constant here.
26
- * 3. `CliConnectClient.exchange` trades it for a tool-local key (one
27
- * re-exchange retry when the 120 s JWT dies in transit; a rejected hub
28
- * credential maps to guided `antasphere login` advice on either
29
- * attempt; a hub REFUSAL, a 403 that is not the scope case, propagates
30
- * as its `CliConnectError` with the hub's own sentence and `exitCode`
31
- * 3).
32
- * 4. The minted key is cached on the SELECTED profile under the hub
33
- * profile's name. A profile not on disk yet is created with this
34
- * instance's URL, and made active only when the tool had no profile at
35
- * all; an existing profile is never renamed or repointed, and one that
36
- * is at another instance never receives the key.
11
+ * 0. A profile at another site than the command's is refused before any
12
+ * request, and so is a profile with no site of its own that holds a
13
+ * key (its keys are never adopted): nothing is minted for a profile
14
+ * that cannot keep the key (PRDCT-3044). The old slots are moved once.
15
+ * Then the plan: a refusal
16
+ * (`ANTASPHERE_URL` or `--hub` naming another hub than the site's) is
17
+ * thrown; a servable kept key is served with zero network, after one
18
+ * discovery read when what the profile remembers of its site is missing
19
+ * or older than a day (`cached: false` skips this step).
20
+ * 1. Discovery gates the flow: only a site that signs in through an
21
+ * Antasphere hub can mint keys through one (unauthenticated GET
22
+ * /instance, never a guess); an unreachable, foreign or self-hosted site
23
+ * answers `not_cloud`, and the tool raises its classic no-key error.
24
+ * What the site says is remembered on its profile (`rememberSite`).
25
+ * 2. The plan again, on the fresh facts: a refusal, a hub to pick or a
26
+ * login to pick is a `CliUsageError` naming the way out.
37
27
  *
38
- * A stranded key recovers: on a 401 with a key that came from the cache,
39
- * the tool CLI calls `refreshConnectKey` once (evict, exchange again with
40
- * `cached: false`) and retries its request once; a second 401 fails.
28
+ * Whatever the command ends with (a key served, an error, `not_cloud` from
29
+ * a site that answered, an exchange), the stale keys of its plan go first:
30
+ * revoked on the profile's own site with no lock held, then forgotten; a
31
+ * site that does not answer within the limit (`requestTimeoutMs`, 10 s:
32
+ * every revoke on a command's way is bounded) keeps them for the next
33
+ * command. A key whose login is gone is one of them. A stale key another
34
+ * profile at that same site still holds is never revoked: it is forgotten
35
+ * on this profile only, and `notify` says so (`keysHeldElsewhere`, R2's
36
+ * one rule).
37
+ * 3. The mint is single-flight: a second lock, per (profile, hub, e-mail),
38
+ * the file read again inside it (and the login, when it carried no
39
+ * e-mail: another command's exchange may have told its address), and
40
+ * the exchange only when the key is still missing. The hub key goes to
41
+ * the chosen login's OWN hub and nowhere else (one re-exchange retry
42
+ * when the 120 s JWT dies in transit; a rejected hub key maps to
43
+ * `messages.hubLoginRejected`; a refusal propagates as its
44
+ * `CliConnectError`, exit code 3). A hub the profile's `lastHub` chose
45
+ * (or, in a recovery, the refused key's) that does not know this site's
46
+ * resource ends on that error with the way out appended (`login --hub
47
+ * <hub>`).
48
+ * 4. First stored wins: when another command stored a kept key for the
49
+ * slot after this command's re-read under the mint lock, it is kept and
50
+ * used, and the key just minted is revoked on the site; when the site
51
+ * does not answer that revoke, the key is filed undated in its slot, a
52
+ * stale duplicate the next command revokes; when it refuses it (a 403),
53
+ * `notify` is told and nothing is filed. A key the profile held at
54
+ * that re-read is not first stored (a login with no e-mail is never
55
+ * served a key, so its exchange may mint for a slot that holds one): the
56
+ * key just minted is stored beside it, and the older one is a stale
57
+ * duplicate the next command revokes. A key minted for a profile that
58
+ * cannot keep it is revoked on its site, and `notify` is told when that
59
+ * revoke did not answer. The store writes the address of the hub the
60
+ * exchange went through on the profile, in its normal form
61
+ * (`normalizeUrl`: `lastHub`), whichever key is kept.
62
+ * 5. A login whose address the hub's answer contradicts (or that had none)
63
+ * takes the hub's address (`healed`), before the mint lock is let go:
64
+ * a command waiting on it with that login finds the key just kept.
41
65
  *
42
- * A new tool needs only its namespace, its cloud URL, and copy — the flow
43
- * itself is tool-agnostic.
66
+ * A stranded key recovers: on a 401 with a key served `cached: true`, the
67
+ * tool CLI calls `refreshConnectKey` once with that key (compare-and-evict,
68
+ * the refused key's hub kept as the profile's `lastHub` when it holds none,
69
+ * then the exchange again for the refused key's account, at that key's hub
70
+ * when the site names none and a login is in place there) and retries its
71
+ * request once; a second 401 fails.
44
72
  */
45
- /** What the unauthenticated discovery probe learned about a tool instance. */
73
+ /** What the unauthenticated discovery probe learned about a site. */
46
74
  export interface ToolInstanceProbe {
47
- /** Whether the instance signs in through the Antasphere hub (advertises
48
- * the `antasphere` auth method, or calls itself the cloud edition). */
75
+ /** The site probed (`normalizeUrl`'d): whose facts these are. */
76
+ url: string;
77
+ /** Whether the site signs in through an Antasphere hub (advertises the
78
+ * `antasphere` auth method, or calls itself the cloud edition). */
49
79
  cloud: boolean;
50
- /** The instance's self-reported edition (`cloud`, `oss`, …). */
80
+ /** The site's self-reported edition (`cloud`, `oss`, …). */
51
81
  edition: string | undefined;
52
82
  /** The advertised auth methods (open enum — unknown entries kept). */
53
83
  authMethods: string[];
84
+ /** The Antasphere hub the site names (`auth.hub`, `normalizeUrl`'d), or null when it names none. */
85
+ hub: string | null;
86
+ /** Its discovery `name`, or null. */
87
+ name: string | null;
88
+ /** The CLI version it announces (`cli.version`), or null. */
89
+ cliVersion: string | null;
54
90
  }
55
91
  /**
56
- * Probe a tool instance's unauthenticated discovery endpoint
92
+ * Probe a site's unauthenticated discovery endpoint
57
93
  * (`GET {toolBaseUrl}/api/v1/instance`). Returns what it advertises, or
58
- * `null` when the instance is unreachable or answers a foreign shape —
59
- * callers treat both exactly like "not cloud".
94
+ * `null` when the site is unreachable or answers a foreign shape — callers
95
+ * treat both exactly like "not cloud".
60
96
  */
61
97
  export declare function probeToolInstance(toolBaseUrl: string, fetchImpl?: typeof globalThis.fetch): Promise<ToolInstanceProbe | null>;
98
+ /** The hub's URL env var: for a site that names no hub, the hub a command signs in at. */
99
+ export declare const HUB_URL_ENV = "ANTASPHERE_URL";
62
100
  /**
63
- * The ACTIVE hub profile — what `antasphere login` stored. Its NAME is the
64
- * connect cache's slot (config.ts `connectKeys`): stable per hub account on
65
- * this machine, independent of any org selection.
101
+ * Remember what a site said of itself on its profile, under `updateConfig`:
102
+ * only for a profile on disk at that site (`probe.url`; a profile with no
103
+ * `baseUrl` is at `cloudUrl`), and only when the hub, `federated`, the name
104
+ * or the CLI version differ from what the profile holds, or when its
105
+ * `seenAt` is older than 24 hours, or with `force` (`profiles --check`).
106
+ * Otherwise nothing is written. Answers whether the file changed.
66
107
  */
67
- export declare function activeHubProfile(env: CliEnv): ResolvedProfile;
68
- /** The facts the connected notice is rendered from (fresh exchanges only —
69
- * cache hits are silent). */
108
+ export declare function rememberSite(env: CliEnv, tool: string, profileName: string, probe: ToolInstanceProbe, opts?: {
109
+ force?: boolean | undefined;
110
+ cloudUrl?: string | undefined;
111
+ }): boolean;
112
+ /** The facts the connected notice is rendered from (fresh exchanges only — served keys are silent). */
70
113
  export interface ConnectNoticeFacts {
71
- /** The tool instance the exchange connected to (origin-normalized). */
114
+ /** The site the exchange connected to (origin-normalized). */
72
115
  toolBaseUrl: string;
73
- /** The signed-in account's email at mint. */
116
+ /** The signed-in account's email, as the hub answered it. */
74
117
  email: string;
75
- /** Whether the minted key was persisted for the next run (on the
76
- * selected profile, under the hub profile's name); false = the profile
77
- * is at another instance. */
118
+ /** Whether the minted key was kept on the profile: always true (a profile at another site is
119
+ * refused before any request). */
78
120
  stored: boolean;
79
- /** The tool profile the cache targeted. */
121
+ /** The tool profile the key is kept on. */
80
122
  profileName: string;
81
- /** When NOT stored: the other instance the profile is at. */
123
+ /** Never set any more (kept for the shape of 0.6). */
82
124
  profileBaseUrl?: string;
83
125
  }
84
126
  /**
85
- * Branded copy seams. Defaults reproduce the Slideless CLI's strings modulo
86
- * the tool name (the tool namespace stands in for the display name, and the
87
- * key-env-var name is derived from it: `slideless` → `SLIDELESS_API_KEY`).
127
+ * Branded copy seams. The sentences that say why a command cannot sign in
128
+ * (a refusal, a hub or a login to pick, no login at the site's hub) are
129
+ * cli-core's own, with the tool's binary (`bin`) in them.
88
130
  */
89
131
  export interface ConnectOnDemandMessages {
90
- /** `CliUsageError` text when the instance is cloud but no `antasphere
91
- * login` credential is stored on the hub profile. */
92
- missingHubLogin?: string;
93
- /** `CliUsageError` text when the hub rejected the stored credential. */
132
+ /** `CliUsageError` text when the hub rejected the login's stored key. */
94
133
  hubLoginRejected?: string;
95
134
  /** Renders the success notice handed to `notify` (newline included). */
96
135
  connected?: (facts: ConnectNoticeFacts) => string;
97
136
  }
98
137
  export interface ConnectOnDemandOptions {
99
- /** The tool's config namespace (lowercase slug — it names the cache file). */
138
+ /** The tool's config namespace (lowercase slug — it names the profiles file). */
100
139
  tool: string;
101
- /** The resolved tool instance origin the CLI is talking to. */
140
+ /** The site the command talks to. */
102
141
  toolBaseUrl: string;
103
142
  /** The tool's cloud URL, the same value `selectProfile` got: what a
104
143
  * profile with no `baseUrl` of its own is at. Omit only for a tool with
105
- * no cloud instance. */
144
+ * no cloud site. */
106
145
  cloudUrl?: string | undefined;
107
- /** The exchange resource URL; default = this instance's MCP endpoint,
146
+ /** REQUIRED: the hub's cloud URL, what a login with no `baseUrl` of its own
147
+ * is at (`listLogins`); a `TypeError` naming it when it is missing, blank
148
+ * or not an `http:` or `https:` URL. A login's own `baseUrl` always wins,
149
+ * and its key goes to that login's own hub only. */
150
+ hubCloudUrl: string;
151
+ /** `login --hub`: the hub to sign in at, for a site that names none. Refused, both named, when
152
+ * the site names another one. */
153
+ hubUrl?: string | undefined;
154
+ /** `login --email`: the account to sign in with, among the logins at the site's hub. */
155
+ email?: string | undefined;
156
+ /** The binary named in the sentences (default: the tool's namespace). */
157
+ bin?: string | undefined;
158
+ /** The exchange resource URL; default = this site's MCP endpoint,
108
159
  * `${toolBaseUrl}/mcp` (the tool's registered resource URL). */
109
160
  resource?: string;
110
161
  /** The tool profile the CLI selected for this run (`selectProfile`), the
111
- * one the minted key is cached on. Not on disk yet → created with
112
- * `toolBaseUrl` on first contact; at another instance → the key is
113
- * returned but never stored. cli-core never guesses it. */
162
+ * one the key is kept on. Not on disk yet → created with `toolBaseUrl` on
163
+ * first contact; at another site → refused before any request. cli-core
164
+ * never guesses it. */
114
165
  profileName: string;
115
166
  env: CliEnv;
116
167
  fetch?: typeof globalThis.fetch;
117
- /** Receives the human "Connected to …" notice (tools wire their stderr);
118
- * omitted = silent. Cache hits are always silent either way. */
168
+ /** Receives the human "Connected to …" notice, and the line that says a key
169
+ * minted on the site could not be revoked there (tools wire their stderr);
170
+ * omitted = silent. Served keys are always silent either way. */
119
171
  notify?: (line: string) => void;
120
172
  messages?: ConnectOnDemandMessages;
121
- /** false = do not read the cache: run the exchange even when a key is
122
- * cached (the one re-exchange after a 401 on a cached key;
123
- * `refreshConnectKey` sets it). Default true. */
173
+ /** false = skip step 0 (serving a kept key before discovery is read):
174
+ * discovery is read and the plan decided on fresh facts. A kept key the
175
+ * file holds for the slot inside the mint lock is still used (another
176
+ * command's mint); a caller that wants a fresh key forgets the kept one
177
+ * first (`forgetKeys`). Default true. */
124
178
  cached?: boolean;
179
+ /** The limit of each revoke cli-core sends on a command's way (a profile's stale keys, a key just
180
+ * minted that cannot be kept), in milliseconds: past it the revoke is aborted and counts as no
181
+ * answer (a stale key then stays for the next command), and the command goes on. 10 s when absent;
182
+ * a value that is not an integer from 1 to 2 147 483 647 (2^31 − 1) reads as absent: a Node timer
183
+ * refuses a fraction and cuts a longer delay to 1 ms. */
184
+ requestTimeoutMs?: number;
185
+ }
186
+ export interface RefreshConnectKeyOptions extends ConnectOnDemandOptions {
187
+ /** The kept key the site refused (401): evicted only when it is still the one kept. */
188
+ refusedKey: string;
189
+ }
190
+ /** The login that signed a command in. */
191
+ export interface ConnectedLogin {
192
+ /** The login's entry name in the hub file. */
193
+ name: string;
194
+ /** Its hub. */
195
+ hub: string;
196
+ /** The account's address. */
197
+ email: string;
125
198
  }
126
199
  export type ConnectOnDemandOutcome = {
127
200
  outcome: 'connected';
128
201
  /** The tool-local key — this invocation's credential. */
129
202
  key: string;
130
- /** true = served from the (tool profile, hub profile) config cache:
131
- * zero network, nothing minted. false = a fresh exchange ran. A 401
132
- * on a `cached: true` key is what warrants `refreshConnectKey`. */
203
+ /** true = a kept key, nothing minted by this command (served, or stored by another
204
+ * command first). false = a fresh exchange ran and its key is kept. A 401 on a
205
+ * `cached: true` key is what warrants `refreshConnectKey`. */
133
206
  cached: boolean;
207
+ /** The login that signed the command in. */
208
+ login: ConnectedLogin;
134
209
  /** Fresh exchanges only: the full result (user, key meta). */
135
210
  result?: CliConnectResult;
136
- /** Fresh exchanges only: whether the minted key was persisted for
137
- * the next run (false = the profile is at another instance). */
211
+ /** Fresh exchanges only: the minted key is kept on the profile (always true). */
138
212
  stored?: boolean;
213
+ /** The login's address, replaced by the hub's answer after a fresh exchange
214
+ * (`from` null when it had none). */
215
+ healed?: {
216
+ from: string | null;
217
+ to: string;
218
+ };
139
219
  } | {
140
- /** Not an Antasphere-cloud instance (or unreachable): the caller
220
+ /** Not a site that signs in through an Antasphere hub (or unreachable): the caller
141
221
  * raises its classic no-key error unchanged. */
142
222
  outcome: 'not_cloud';
143
223
  };
144
224
  /**
145
- * The hub → tool exchange fallback a tool CLI runs when no direct credential
146
- * resolved. Serves the cached user-scoped key when one exists for this
147
- * (instance, hub profile) on the selected profile; otherwise returns
148
- * `not_cloud` when the instance is not an Antasphere-cloud one (or
149
- * unreachable). Throws a guided `CliUsageError` when the instance IS cloud
150
- * but the hub login is missing or rejected; a refusal and every other
151
- * exchange failure propagate as their `CliConnectError` (`exitCode` says 3
152
- * for the refusal, `message` is the server's own sentence).
225
+ * The hub → tool exchange a tool CLI runs when no direct credential resolved,
226
+ * signed in by the login at the hub the site trusts (the flow is the module
227
+ * comment's). Answers the key (`cached: true` when kept, false when minted by
228
+ * this command) with the login that signed it in, or `not_cloud`. Throws a
229
+ * `CliUsageError` naming the way out when the profile is at another site or
230
+ * has no site of its own while it holds a key (both before any request),
231
+ * when `ANTASPHERE_URL` or `hubUrl` names another hub than the site's, when
232
+ * a hub or a login must be picked, when no login is at the site's hub, or
233
+ * when the hub rejected the login's key; a refusal and every other exchange
234
+ * failure propagate as their `CliConnectError` (`exitCode` 3 for a refusal).
235
+ * A missing, blank or unreadable `hubCloudUrl` is a `TypeError` naming it,
236
+ * before any read, request or write.
153
237
  */
154
238
  export declare function connectOnDemand(opts: ConnectOnDemandOptions): Promise<ConnectOnDemandOutcome>;
155
239
  /**
156
240
  * The stranded-key recovery: what a tool CLI calls once when a request
157
- * answered 401 with a key that `connectOnDemand` served from the cache
158
- * (`cached: true`). Evicts that key from the selected profile (the hub
159
- * revoked it, or a membership was swept), only when that profile is at
160
- * this instance (a key of another instance is never touched), and runs the
161
- * exchange again with the cache skipped. The caller retries its request
162
- * once with the new key and fails on a second 401; `not_cloud` means there
163
- * is nothing to recover with, and the caller fails with its 401 as it
164
- * stands.
241
+ * answered 401 with a key `connectOnDemand` served (`cached: true`), with that
242
+ * key as `refusedKey`. COMPARE-AND-EVICT: the kept entry whose key is
243
+ * `refusedKey` is removed (only on a profile at this site); when none is,
244
+ * another command already replaced it, and the kept key the plan now serves
245
+ * is returned (`cached: true`) with no exchange. Otherwise the exchange runs
246
+ * again (`cached: false`), never serving the refused key. The refused key's
247
+ * slot is read before the eviction takes it away: the recovery continues the
248
+ * command whose key was refused, so its account picks the login at the hub
249
+ * the recovery signs in at, the way the `email` option does when the caller
250
+ * gives none, and its hub is the recovery's first hint, never the `hubUrl`
251
+ * option: for a site that names no hub, the order is `--hub`,
252
+ * `ANTASPHERE_URL`, the refused key's hub while a login is in place there,
253
+ * the newest kept key in place, then `lastHub`; a site that names a hub
254
+ * decides it. The eviction's own write also keeps that hub as the profile's
255
+ * `lastHub` when the profile holds none (one from before the field), for the
256
+ * commands after it. An exchange that hub refuses because it does not know
257
+ * the site ends on the way out, as at a remembered hub (`login --hub`). The
258
+ * caller retries its request once with the new key and fails on a second
259
+ * 401; `not_cloud` means there is nothing to recover with. A missing, blank
260
+ * or unreadable `hubCloudUrl` is a `TypeError` naming it, before anything is
261
+ * read, evicted or sent.
165
262
  */
166
- export declare function refreshConnectKey(opts: ConnectOnDemandOptions): Promise<ConnectOnDemandOutcome>;
263
+ export declare function refreshConnectKey(opts: RefreshConnectKeyOptions): Promise<ConnectOnDemandOutcome>;
167
264
  //# sourceMappingURL=connect-on-demand.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connect-on-demand.d.ts","sourceRoot":"","sources":["../src/connect-on-dem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