@agentshouse/mdruntime-adapter 0.1.0-cc7fa1e066844 → 0.1.0-ccd2ccb1f7214

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 (51) hide show
  1. package/AGENTS.md +280 -188
  2. package/README.md +3 -3
  3. package/dist/actions.d.ts +63 -2
  4. package/dist/actions.d.ts.map +1 -1
  5. package/dist/actions.js +157 -138
  6. package/dist/adapter.d.ts +1 -0
  7. package/dist/adapter.d.ts.map +1 -1
  8. package/dist/adapter.js +359 -171
  9. package/dist/discovery.d.ts +6 -12
  10. package/dist/discovery.d.ts.map +1 -1
  11. package/dist/discovery.js +31 -35
  12. package/dist/gather.d.ts +1 -0
  13. package/dist/gather.d.ts.map +1 -1
  14. package/dist/gather.js +11 -6
  15. package/dist/handed.d.ts +15 -0
  16. package/dist/handed.d.ts.map +1 -0
  17. package/dist/handed.js +38 -0
  18. package/dist/index.d.ts +2 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +1 -0
  21. package/dist/model.d.ts +7 -18
  22. package/dist/model.d.ts.map +1 -1
  23. package/dist/model.js +60 -39
  24. package/dist/read.d.ts +35 -7
  25. package/dist/read.d.ts.map +1 -1
  26. package/dist/read.js +164 -86
  27. package/dist/referrer.d.ts +7 -0
  28. package/dist/referrer.d.ts.map +1 -0
  29. package/dist/referrer.js +35 -0
  30. package/dist/refusal.d.ts +5 -9
  31. package/dist/refusal.d.ts.map +1 -1
  32. package/dist/refusal.js +31 -17
  33. package/dist/site.d.ts +1 -1
  34. package/dist/site.d.ts.map +1 -1
  35. package/dist/site.js +208 -107
  36. package/dist/stream.d.ts +10 -4
  37. package/dist/stream.d.ts.map +1 -1
  38. package/dist/stream.js +413 -47
  39. package/dist/transport.d.ts +94 -11
  40. package/dist/transport.d.ts.map +1 -1
  41. package/dist/transport.js +3 -1
  42. package/dist/version.d.ts +2 -0
  43. package/dist/version.d.ts.map +1 -1
  44. package/dist/version.js +10 -1
  45. package/dist/write.d.ts +2 -1
  46. package/dist/write.d.ts.map +1 -1
  47. package/dist/write.js +97 -15
  48. package/package.json +3 -4
  49. package/dist/links.d.ts +0 -12
  50. package/dist/links.d.ts.map +0 -1
  51. package/dist/links.js +0 -66
package/dist/site.js CHANGED
@@ -1,100 +1,165 @@
1
- import { actionOutcome } from './actions.js';
1
+ import { actionOutcome, SITE_SUBMIT } from './actions.js';
2
2
  import { mapDiscovery, parseSiteDiscovery, siteCapabilities, siteTracked, } from './discovery.js';
3
- import { MODEL_ABSENT, failedModel, heldModel, modelKey, modelShelf, } from './model.js';
4
- import { advancedScope, bootstrapOf, parseEnumeration, parseSiteBootstrap, refreshFrom, schemaOf, schemaPath, viewOf, } from './read.js';
5
- import { classifyDoor, discoveryFailure, doorRefusal } from './refusal.js';
3
+ import { partModels, streamedModels, viewModels } from './model.js';
4
+ import { advancedScope, bootstrapOf, parseEnumeration, parseSiteBootstrap, refreshFrom, siteBootstrapNext, siteBootstrapOffset, viewOf, wholeView, } from './read.js';
5
+ import { sha256Hex } from './digest.js';
6
+ import { classifyDoor, classifyRead, discoveryFailure } from './refusal.js';
6
7
  import { houseNotifications } from './stream.js';
7
- import { PRIVATE_LOCATOR, SITE_DOOR_BOOTSTRAP, SITE_DOOR_DISCOVER, SITE_DOOR_ENUMERATE, SITE_DOOR_SUBMIT, } from './transport.js';
8
- import { logPosition, presented, reachedVersion, roomVersion, } from './version.js';
8
+ import { SITE_DOOR_BOOTSTRAP, SITE_DOOR_DISCOVER, SITE_DOOR_ENUMERATE, SITE_DOOR_SUBMIT, SITE_FILE_RECORD, SITE_FILES, } from './transport.js';
9
+ import { houseReferrer } from './referrer.js';
10
+ import { followsVersion, logPosition, presented, reachedVersion, roomVersion, } from './version.js';
9
11
  const UNCERTAIN = { kind: 'transport-uncertainty' };
10
- function siteRoom(tracked, attachedModel) {
12
+ function unfound() {
13
+ return { kind: 'rejected', code: 'file_not_found', fields: {}, retryable: false };
14
+ }
15
+ function siteRoom(tracked) {
11
16
  return {
12
17
  name: tracked.handle,
13
18
  locator: tracked.locator,
19
+ handle: tracked.handle,
14
20
  roomVersion: roomVersion(tracked),
15
21
  operations: { read: [''], sync: [''], write: [], delete: [] },
16
22
  replica: { selection: tracked.locator, admission: 'admitted' },
17
- attachedModel,
18
23
  providerOwnedPaths: [],
19
24
  };
20
25
  }
21
26
  function settled(refused) {
22
- return refused.kind === 'beyond-horizon' || refused.kind === 'retryable-refusal'
23
- ? UNCERTAIN
24
- : refused;
27
+ return refused.kind === 'beyond-horizon' ? UNCERTAIN : refused;
25
28
  }
26
- export function createSiteAdapter(transport) {
29
+ export function createSiteAdapter(transport, snapshot = false) {
27
30
  const notifications = houseNotifications(transport, 'site');
28
31
  const tracked = new Map();
29
- const models = modelShelf();
30
- const acquired = new Map();
31
- let caught = new Map();
32
- async function enumeration(entry, from) {
32
+ function published(referrer) {
33
+ const named = houseReferrer(referrer, tracked);
34
+ return named === null || !tracked.has(named.locator) ? null : named;
35
+ }
36
+ function fileRoute(request) {
37
+ const named = published(request.kind === 'path' ? { room: request.locator, path: request.path } : request.referrer);
38
+ if (named === null) {
39
+ return { kind: 'rejected', code: 'referrer_unknown', fields: {}, retryable: false };
40
+ }
41
+ if (request.fileRef === undefined)
42
+ return unfound();
43
+ const { room_ref, path, record } = named.referrer;
44
+ return `${SITE_FILES}${room_ref}/${encodeURIComponent(request.fileRef)}/${path === undefined
45
+ ? `${SITE_FILE_RECORD}/${encodeURIComponent(record)}`
46
+ : encodeURIComponent(path)}`;
47
+ }
48
+ async function enumerated(entry, from, page) {
33
49
  const answer = await transport.door(SITE_DOOR_ENUMERATE, {
34
- positions: [presented(entry.authority, from)],
50
+ positions: [
51
+ page === undefined
52
+ ? presented(entry.authority, from)
53
+ : {
54
+ ...presented(entry.authority, { position: page.after, logEpoch: from.logEpoch }),
55
+ page: { through: page.through, read: page.read },
56
+ },
57
+ ],
35
58
  });
36
- const behind = doorRefusal(answer.body);
37
- if (behind?.code === 'replica_behind' && behind.retryable) {
38
- return { kind: 'retryable-refusal', code: behind.code, fields: behind.fields };
39
- }
40
- const classified = classifyDoor(answer.status, answer.body, entry.locator);
59
+ const classified = classifyRead(answer.status, answer.body, entry.locator);
41
60
  if (classified !== null)
42
61
  return classified;
43
- return parseEnumeration(answer.body, 'site') ?? UNCERTAIN;
62
+ const found = parseEnumeration(answer.body, 'site');
63
+ if (found === null)
64
+ return UNCERTAIN;
65
+ return viewOf(found, entry) ?? { kind: 'room-not-readable', locator: entry.locator };
44
66
  }
45
- async function caughtUp(entry) {
46
- const answer = await transport.read(`${SITE_DOOR_BOOTSTRAP}${entry.authority}`);
67
+ async function enumeration(entry, from) {
68
+ const first = await enumerated(entry, from);
69
+ return 'kind' in first ? first : wholeView(first, (page) => enumerated(entry, from, page));
70
+ }
71
+ async function bootstrapPart(entry, after, offset) {
72
+ const query = [
73
+ ...(after === null ? [] : [`after=${encodeURIComponent(after)}`]),
74
+ ...(offset === null ? [] : [`offset=${offset}`]),
75
+ ];
76
+ const answer = await transport.read(`${SITE_DOOR_BOOTSTRAP}${entry.authority}${query.length === 0 ? '' : `?${query.join('&')}`}`);
47
77
  const classified = classifyDoor(answer.status, answer.body, entry.locator);
48
78
  if (classified !== null)
49
- return { failure: settled(classified) };
79
+ return { failure: classified };
50
80
  const scope = parseSiteBootstrap(answer.body);
51
- if (scope === null)
52
- return { failure: UNCERTAIN };
53
- if (roomVersion(scope) === roomVersion(entry))
54
- return { scope };
55
- const found = await enumeration(entry, scope);
56
- if ('kind' in found)
57
- return { failure: settled(found) };
58
- const view = viewOf(found, entry);
59
- if (view === undefined)
60
- return { failure: { kind: 'room-not-readable', locator: entry.locator } };
61
- return { scope: advancedScope(scope, view) };
81
+ return scope === null ? { failure: UNCERTAIN } : { body: answer.body, scope };
82
+ }
83
+ async function assembled(entry, scope, path, offset) {
84
+ const opened = scope.contents.at(-1);
85
+ if (opened === undefined || opened.path !== path || opened.content.length !== offset) {
86
+ return UNCERTAIN;
87
+ }
88
+ let text = opened.content;
89
+ for (;;) {
90
+ const part = await bootstrapPart(entry, path, text.length);
91
+ if ('failure' in part)
92
+ return part.failure;
93
+ const [piece] = part.scope.contents;
94
+ if (piece === undefined ||
95
+ part.scope.contents.length !== 1 ||
96
+ piece.path !== path ||
97
+ piece.content.length === 0) {
98
+ return UNCERTAIN;
99
+ }
100
+ text += piece.content;
101
+ const more = siteBootstrapOffset(part.body);
102
+ if (more === null)
103
+ break;
104
+ if (more !== text.length)
105
+ return UNCERTAIN;
106
+ }
107
+ const file = scope.files.find((held) => held.path === path);
108
+ if (file === undefined || (await sha256Hex(text)) !== file.version)
109
+ return UNCERTAIN;
110
+ return { ...scope, contents: [...scope.contents.slice(0, -1), { path, content: text }] };
111
+ }
112
+ async function caughtUp(entry, after) {
113
+ const part = await bootstrapPart(entry, after, null);
114
+ if ('failure' in part)
115
+ return part;
116
+ const next = siteBootstrapNext(part.body);
117
+ const offset = siteBootstrapOffset(part.body);
118
+ if (offset !== null) {
119
+ if (next === null)
120
+ return { failure: UNCERTAIN };
121
+ const scope = await assembled(entry, part.scope, next, offset);
122
+ return 'kind' in scope ? { failure: scope } : { scope, next };
123
+ }
124
+ const { scope } = part;
125
+ if (after !== null || next !== null || roomVersion(scope) === roomVersion(entry)) {
126
+ return { scope, next };
127
+ }
128
+ const view = await enumeration(entry, scope);
129
+ if ('kind' in view)
130
+ return { failure: settled(view) };
131
+ return { scope: advancedScope(scope, view), next: null };
62
132
  }
63
133
  async function refreshed(entry, fromRoomVersion) {
64
134
  const from = logPosition(fromRoomVersion);
65
135
  if (from === null)
66
136
  return { kind: 'beyond-horizon' };
67
137
  const streamed = notifications.advance(entry, from);
68
- if (streamed !== null)
69
- return streamed.page;
70
- const found = await enumeration(entry, from);
71
- if ('kind' in found)
72
- return found;
73
- const view = viewOf(found, entry);
74
- if (view === undefined)
75
- return { kind: 'room-not-readable', locator: entry.locator };
76
- notifications.hold(entry.authority, view);
77
- return refreshFrom(view, fromRoomVersion);
78
- }
79
- async function acquire(entry, held) {
80
- if ('failure' in held)
81
- return { snapshot: failedModel(held.failure), identity: null };
82
- const model = await heldModel(schemaOf(held.scope, entry.schema), schemaPath(entry.handle, entry.schema), MODEL_ABSENT);
83
- acquired.set(entry.authority, { roomVersion: roomVersion(held.scope), model });
84
- return model;
138
+ if (streamed !== null) {
139
+ const models = await streamedModels(streamed.schemas, entry, 'site');
140
+ return models === undefined ? streamed.page : { ...streamed.page, models };
141
+ }
142
+ const view = await enumeration(entry, from);
143
+ if ('kind' in view)
144
+ return view;
145
+ notifications.reach(entry.authority, view);
146
+ const answer = refreshFrom(view, fromRoomVersion);
147
+ if (answer.kind !== 'net-advancement')
148
+ return answer;
149
+ const models = await viewModels(view, entry);
150
+ return models === undefined ? answer : { ...answer, models };
85
151
  }
86
152
  return {
153
+ localSaves: true,
154
+ exhaustiveDiscovery: true,
87
155
  async authorize() {
88
156
  return {};
89
157
  },
90
- async model(_authorization, request) {
91
- return models.answer(request);
92
- },
93
158
  async discover() {
94
159
  const answer = await transport.read(SITE_DOOR_DISCOVER);
95
- const classified = classifyDoor(answer.status, answer.body, PRIVATE_LOCATOR);
96
- if (classified !== null)
97
- return discoveryFailure(classified);
160
+ const failed = discoveryFailure(answer.status, answer.body);
161
+ if (failed !== null)
162
+ return failed;
98
163
  const document = parseSiteDiscovery(answer.body);
99
164
  if (document === null)
100
165
  return UNCERTAIN;
@@ -103,42 +168,30 @@ export function createSiteAdapter(transport) {
103
168
  for (const entry of entries)
104
169
  tracked.set(entry.locator, entry);
105
170
  notifications.track(entries);
106
- const published = new Set(entries.map((entry) => entry.authority));
107
- for (const authority of [...acquired.keys()]) {
108
- if (!published.has(authority))
109
- acquired.delete(authority);
110
- }
111
- const fresh = new Map();
112
- const current = new Map();
113
- for (const entry of entries) {
114
- const kept = acquired.get(entry.authority);
115
- if (kept !== undefined && kept.roomVersion === roomVersion(entry)) {
116
- current.set(entry.authority, kept.model);
117
- continue;
118
- }
119
- const held = await caughtUp(entry);
120
- fresh.set(entry.authority, held);
121
- current.set(entry.authority, await acquire(entry, held));
122
- }
123
- caught = fresh;
124
- const rooms = entries.map((entry) => {
125
- const shelved = models.retain(modelKey(entry.locator, 'collection'), current.get(entry.authority));
126
- return siteRoom(entry, shelved?.identity ?? null);
127
- });
128
- models.keep(entries.map((entry) => entry.locator));
129
- return mapDiscovery(document, rooms, siteCapabilities());
171
+ return mapDiscovery(document, entries.map(siteRoom), siteCapabilities());
130
172
  },
131
173
  async bootstrap(_authorization, request) {
132
174
  const entry = tracked.get(request.locator);
133
175
  if (entry === undefined)
134
176
  return { kind: 'room-not-readable', locator: request.locator };
135
- if (request.pageToken !== undefined)
136
- return UNCERTAIN;
137
- const held = caught.get(entry.authority) ?? (await caughtUp(entry));
177
+ const continued = request.pageToken === undefined
178
+ ? null
179
+ : JSON.parse(request.pageToken);
180
+ const held = await caughtUp(entry, continued?.after ?? null);
138
181
  if ('failure' in held)
139
182
  return held.failure;
140
- notifications.hold(entry.authority, held.scope);
141
- return bootstrapOf(held.scope);
183
+ notifications.reach(entry.authority, held.scope);
184
+ const seen = [
185
+ ...(continued?.seen ?? []),
186
+ ...entry.schemas.filter((schema) => held.scope.files.some((file) => file.path === schema)),
187
+ ];
188
+ const models = await partModels(held.scope, entry, new Set(seen), held.next === null);
189
+ const continuation = held.next === null ? null : { after: held.next, seen };
190
+ return {
191
+ ...bootstrapOf(held.scope),
192
+ ...(models === undefined ? {} : { models }),
193
+ ...(continuation === null ? {} : { pageToken: JSON.stringify(continuation) }),
194
+ };
142
195
  },
143
196
  async refresh(_authorization, request) {
144
197
  const entry = tracked.get(request.locator);
@@ -146,39 +199,87 @@ export function createSiteAdapter(transport) {
146
199
  return { kind: 'room-not-readable', locator: request.locator };
147
200
  if (request.pageToken !== undefined)
148
201
  return UNCERTAIN;
149
- const result = await refreshed(entry, request.fromRoomVersion);
150
- if (result.kind === 'beyond-horizon')
151
- caught.delete(entry.authority);
152
- const answered = result.kind === 'net-advancement'
153
- ? result.roomVersion
154
- : result.kind === 'still-current'
155
- ? request.fromRoomVersion
156
- : null;
157
- if (request.minPosition !== undefined &&
158
- answered !== null &&
159
- !reachedVersion(answered, request.minPosition, entry.logEpoch)) {
160
- return { kind: 'retryable-refusal', code: 'replica_behind', fields: {} };
202
+ if (snapshot) {
203
+ return request.fromRoomVersion === roomVersion(entry)
204
+ ? { kind: 'still-current' }
205
+ : { kind: 'beyond-horizon' };
161
206
  }
162
- return result;
207
+ return refreshed(entry, request.fromRoomVersion);
163
208
  },
164
209
  async mutate() {
165
- return { kind: 'rejected', affected: {}, code: 'write-grant', fields: {} };
210
+ return { kind: 'rejected', affected: {}, code: 'write-grant', fields: {}, retryable: false };
166
211
  },
167
212
  async history() {
168
213
  return { kind: 'no-history' };
169
214
  },
215
+ async binary(_authorization, request) {
216
+ const route = fileRoute(request);
217
+ if (typeof route !== 'string')
218
+ return route;
219
+ const read = await transport.download(route);
220
+ if (read.status === 404)
221
+ return unfound();
222
+ return read.status === 200 && read.blob !== null
223
+ ? { kind: 'binary', blob: read.blob }
224
+ : UNCERTAIN;
225
+ },
226
+ async link(_authorization, request) {
227
+ const route = fileRoute(request);
228
+ if (typeof route !== 'string')
229
+ return route;
230
+ return {
231
+ kind: 'link',
232
+ url: route,
233
+ name: request.path.slice(request.path.lastIndexOf('/') + 1),
234
+ };
235
+ },
236
+ referrerScope(referrer) {
237
+ const named = published(referrer);
238
+ if (named === null)
239
+ return null;
240
+ const { path } = named.referrer;
241
+ return { kind: 'room', locator: named.locator, ...(path === undefined ? {} : { path }) };
242
+ },
170
243
  reached(locator, version, target) {
171
244
  return reachedVersion(version, target, tracked.get(locator)?.logEpoch);
172
245
  },
246
+ follows(_locator, version, next) {
247
+ return followsVersion(version, next);
248
+ },
173
249
  async action(_authorization, request) {
174
- if (request.name !== 'submit') {
175
- return { kind: 'rejected', code: 'action-unimplemented', fields: { name: request.name } };
250
+ if (request.name !== SITE_SUBMIT) {
251
+ return {
252
+ kind: 'rejected',
253
+ code: 'action-unimplemented',
254
+ fields: { name: request.name },
255
+ retryable: false,
256
+ };
176
257
  }
177
258
  if (!transport.online())
178
259
  return UNCERTAIN;
179
- return actionOutcome(await transport.door(SITE_DOOR_SUBMIT, request.input), 'submit');
260
+ return actionOutcome(await transport.door(SITE_DOOR_SUBMIT, request.input), SITE_SUBMIT);
180
261
  },
181
- roomVersions: notifications,
262
+ roomStream: snapshot
263
+ ? undefined
264
+ : {
265
+ hold(rooms) {
266
+ notifications.send(rooms.flatMap((room) => {
267
+ const entry = tracked.get(room.locator);
268
+ const at = logPosition(room.roomVersion);
269
+ if (entry === undefined || at === null)
270
+ return [];
271
+ notifications.reach(entry.authority, at);
272
+ return [presented(entry.authority, at)];
273
+ }));
274
+ },
275
+ reopen: notifications.reopen,
276
+ observe: notifications.observe,
277
+ published(locator, roomVersion) {
278
+ const at = logPosition(roomVersion);
279
+ if (at !== null)
280
+ notifications.published(locator, at);
281
+ },
282
+ },
182
283
  serviceMode: notifications.serviceMode,
183
284
  };
184
285
  }
package/dist/stream.d.ts CHANGED
@@ -1,15 +1,21 @@
1
- import type { ConversationStream, RefreshPage, SelectedRooms, ServiceModeSignal } from '@agentshouse/mdruntime';
1
+ import type { ConversationStream, RefreshPage, RoomStreamEvent, ServiceModeSignal, StreamReceipts } from '@agentshouse/mdruntime';
2
2
  import type { TrackedAuthority } from './discovery.js';
3
- import type { HouseDoor, HouseMode, HouseStreamEntry } from './transport.js';
3
+ import type { HouseDoor, HouseHeldRoom, HouseMode, HouseStreamEntry } from './transport.js';
4
4
  import { type LogPosition } from './version.js';
5
5
  export type HeldRevision = (path: string, revision: string) => boolean;
6
6
  export type StreamedAdvancement = {
7
7
  page: RefreshPage;
8
8
  entries: readonly HouseStreamEntry[];
9
+ schemas: ReadonlyMap<string, HouseStreamEntry>;
9
10
  };
10
- export type HouseNotifications = SelectedRooms & {
11
+ export type HouseNotifications = {
12
+ runtime: string;
13
+ observe(notify: (event: RoomStreamEvent) => void, receipts: StreamReceipts): () => void;
14
+ send(rooms: readonly HouseHeldRoom[]): void;
15
+ published(locator: string, at: LogPosition): void;
16
+ reopen(): void;
11
17
  track(authorities: readonly TrackedAuthority[]): void;
12
- hold(authority: string, at: LogPosition): void;
18
+ reach(authority: string, at: LogPosition): void;
13
19
  advance(tracked: TrackedAuthority, from: LogPosition, holds?: HeldRevision): StreamedAdvancement | null;
14
20
  conversations: ConversationStream;
15
21
  serviceMode: ServiceModeSignal;
@@ -1 +1 @@
1
- {"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../src/stream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,kBAAkB,EAClB,WAAW,EAEX,aAAa,EAEb,iBAAiB,EAElB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAoB,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAgB7D,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,SAAS,gBAAgB,EAAE,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG;IAC/C,KAAK,CAAC,WAAW,EAAE,SAAS,gBAAgB,EAAE,GAAG,IAAI,CAAC;IACtD,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,GAAG,IAAI,CAAC;IAC/C,OAAO,CACL,OAAO,EAAE,gBAAgB,EACzB,IAAI,EAAE,WAAW,EACjB,KAAK,CAAC,EAAE,YAAY,GACnB,mBAAmB,GAAG,IAAI,CAAC;IAC9B,aAAa,EAAE,kBAAkB,CAA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