@agentshouse/mdruntime 0.1.0-alpha.8 → 0.1.0-c3903a68dcbbf

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 (121) hide show
  1. package/AGENTS.md +210 -0
  2. package/README.md +44 -0
  3. package/dist/adapter.d.ts +223 -25
  4. package/dist/adapter.d.ts.map +1 -1
  5. package/dist/adapter.js +2 -3
  6. package/dist/attachment.d.ts +3 -0
  7. package/dist/attachment.d.ts.map +1 -0
  8. package/dist/attachment.js +8 -0
  9. package/dist/bootstrap.d.ts +6 -7
  10. package/dist/bootstrap.d.ts.map +1 -1
  11. package/dist/bootstrap.js +32 -28
  12. package/dist/change-set.d.ts +33 -0
  13. package/dist/change-set.d.ts.map +1 -0
  14. package/dist/change-set.js +87 -0
  15. package/dist/change.d.ts +9 -0
  16. package/dist/change.d.ts.map +1 -1
  17. package/dist/change.js +6 -5
  18. package/dist/client.d.ts +75 -0
  19. package/dist/client.d.ts.map +1 -0
  20. package/dist/client.js +171 -0
  21. package/dist/collection.d.ts +24 -15
  22. package/dist/collection.d.ts.map +1 -1
  23. package/dist/collection.js +69 -77
  24. package/dist/connection.d.ts +79 -36
  25. package/dist/connection.d.ts.map +1 -1
  26. package/dist/connection.js +1699 -953
  27. package/dist/conversation.d.ts +79 -0
  28. package/dist/conversation.d.ts.map +1 -0
  29. package/dist/conversation.js +557 -0
  30. package/dist/durability.d.ts +8 -3
  31. package/dist/durability.d.ts.map +1 -1
  32. package/dist/durability.js +7 -61
  33. package/dist/file.d.ts +20 -0
  34. package/dist/file.d.ts.map +1 -0
  35. package/dist/file.js +126 -0
  36. package/dist/host.d.ts +14 -0
  37. package/dist/host.d.ts.map +1 -0
  38. package/dist/host.js +198 -0
  39. package/dist/identity.d.ts +1 -0
  40. package/dist/identity.d.ts.map +1 -1
  41. package/dist/identity.js +10 -9
  42. package/dist/index.d.ts +14 -9
  43. package/dist/index.d.ts.map +1 -1
  44. package/dist/index.js +1 -2
  45. package/dist/log.js +5 -6
  46. package/dist/memory.d.ts +17 -2
  47. package/dist/memory.d.ts.map +1 -1
  48. package/dist/memory.js +269 -113
  49. package/dist/model.d.ts +10 -25
  50. package/dist/model.d.ts.map +1 -1
  51. package/dist/model.js +18 -21
  52. package/dist/observation.d.ts +25 -0
  53. package/dist/observation.d.ts.map +1 -0
  54. package/dist/observation.js +85 -0
  55. package/dist/outcome.d.ts +22 -18
  56. package/dist/outcome.d.ts.map +1 -1
  57. package/dist/outcome.js +1 -13
  58. package/dist/overlay.d.ts +9 -2
  59. package/dist/overlay.d.ts.map +1 -1
  60. package/dist/overlay.js +187 -43
  61. package/dist/paths.d.ts +0 -1
  62. package/dist/paths.d.ts.map +1 -1
  63. package/dist/paths.js +12 -19
  64. package/dist/query.d.ts +210 -9
  65. package/dist/query.d.ts.map +1 -1
  66. package/dist/query.js +420 -15
  67. package/dist/read-side.d.ts +14 -0
  68. package/dist/read-side.d.ts.map +1 -0
  69. package/dist/read-side.js +371 -0
  70. package/dist/refresh.d.ts +4 -5
  71. package/dist/refresh.d.ts.map +1 -1
  72. package/dist/refresh.js +45 -30
  73. package/dist/replica.d.ts +27 -6
  74. package/dist/replica.d.ts.map +1 -1
  75. package/dist/replica.js +237 -30
  76. package/dist/room-draft.d.ts +124 -0
  77. package/dist/room-draft.d.ts.map +1 -0
  78. package/dist/room-draft.js +327 -0
  79. package/dist/rows.d.ts +41 -0
  80. package/dist/rows.d.ts.map +1 -0
  81. package/dist/rows.js +100 -0
  82. package/dist/save.d.ts +10 -6
  83. package/dist/save.d.ts.map +1 -1
  84. package/dist/save.js +267 -333
  85. package/dist/search.d.ts +61 -0
  86. package/dist/search.d.ts.map +1 -0
  87. package/dist/search.js +125 -0
  88. package/dist/status.d.ts +9 -2
  89. package/dist/status.d.ts.map +1 -1
  90. package/dist/status.js +11 -14
  91. package/dist/store.d.ts +85 -18
  92. package/dist/store.d.ts.map +1 -1
  93. package/dist/store.js +380 -97
  94. package/dist/transfer.d.ts +5 -0
  95. package/dist/transfer.d.ts.map +1 -1
  96. package/dist/transfer.js +1 -5
  97. package/dist/wire.d.ts +64 -0
  98. package/dist/wire.d.ts.map +1 -0
  99. package/dist/wire.js +124 -0
  100. package/package.json +15 -13
  101. package/dist/adapter.js.map +0 -1
  102. package/dist/bootstrap.js.map +0 -1
  103. package/dist/change.js.map +0 -1
  104. package/dist/collection.js.map +0 -1
  105. package/dist/connection.js.map +0 -1
  106. package/dist/durability.js.map +0 -1
  107. package/dist/identity.js.map +0 -1
  108. package/dist/index.js.map +0 -1
  109. package/dist/log.js.map +0 -1
  110. package/dist/memory.js.map +0 -1
  111. package/dist/model.js.map +0 -1
  112. package/dist/outcome.js.map +0 -1
  113. package/dist/overlay.js.map +0 -1
  114. package/dist/paths.js.map +0 -1
  115. package/dist/query.js.map +0 -1
  116. package/dist/refresh.js.map +0 -1
  117. package/dist/replica.js.map +0 -1
  118. package/dist/save.js.map +0 -1
  119. package/dist/status.js.map +0 -1
  120. package/dist/store.js.map +0 -1
  121. package/dist/transfer.js.map +0 -1
@@ -1,90 +1,82 @@
1
- import { parse, validate, VERSION } from '@agentshouse/mdmodel';
2
- import { normalize } from './paths.js';
3
- export const MD_MODEL = {
4
- identity: '@agentshouse/mdmodel',
5
- version: VERSION
6
- };
7
- export const PRESENTED = {
8
- path: {
9
- $regex: '\\.md$'
10
- }
11
- };
12
- export function parseCollection(text, model) {
1
+ import { parse, validate, VERSION, } from '@agentshouse/mdmodel';
2
+ import { beneath, normalize } from './paths.js';
3
+ export const MD_MODEL = { identity: '@agentshouse/mdmodel', version: VERSION };
4
+ const NO_TYPES = { types: {} };
5
+ function selected(composition, path) {
6
+ return (composition.selection !== null &&
7
+ composition.selection.roots.some((root) => beneath(root, path)));
8
+ }
9
+ export function untyped(roots, path) {
10
+ return roots.some((root) => beneath(root, path));
11
+ }
12
+ export function governing(composition, path) {
13
+ return composition.selection !== null && selected(composition, path)
14
+ ? composition.selection.model
15
+ : composition.model;
16
+ }
17
+ function parsedAt(text, path, previous) {
18
+ const retained = previous?.collection.documents[path];
19
+ return retained !== undefined && previous?.text[path] === text[path]
20
+ ? { ok: true, document: retained }
21
+ : parse(text[path], path);
22
+ }
23
+ export function parseCollection(text, composition, previous) {
13
24
  const documents = {};
14
- for (const path of Object.keys(text).sort()){
15
- const parsed = parse(text[path], path);
16
- if (parsed.ok) documents[path] = parsed.document;
25
+ for (const path of Object.keys(text).sort()) {
26
+ if (untyped(composition.untypedFolders, path))
27
+ continue;
28
+ const parsed = parsedAt(text, path, previous);
29
+ if (parsed.ok)
30
+ documents[path] = parsed.document;
17
31
  }
18
- return {
19
- documents,
20
- types: model.status === 'unavailable' ? [] : model.types
21
- };
32
+ return { documents, composition };
22
33
  }
23
- export function readCollection(text, collectionRoot, model) {
24
- if (!validRoot(collectionRoot)) return null;
25
- const collection = parseCollection(text, model);
26
- if (Object.keys(collection.documents).length !== Object.keys(text).length) return null;
27
- if (Object.entries(collection.documents).some(([path, document])=>!member(path, collectionRoot) && document.type !== undefined && document.type !== 'any')) return null;
28
- return collection;
34
+ export function readCollection(text, composition, previous) {
35
+ const documents = {};
36
+ for (const path of Object.keys(text).sort()) {
37
+ if (untyped(composition.untypedFolders, path))
38
+ continue;
39
+ const parsed = parsedAt(text, path, previous);
40
+ if (!parsed.ok)
41
+ return { kind: 'refused', refusal: parsed.refusal };
42
+ documents[path] = parsed.document;
43
+ }
44
+ return { kind: 'read', collection: { documents, composition } };
29
45
  }
30
46
  export function validRoot(root) {
31
47
  return typeof root === 'string' && normalize(root) === root;
32
48
  }
33
- function member(path, root) {
34
- return root === '' || path.startsWith(`${root}/`);
49
+ function validateAgainst(documents, binaryTargets, model) {
50
+ if (model.status === 'unavailable') {
51
+ const typed = Object.entries(documents).find(([, content]) => {
52
+ const parsed = parse(content);
53
+ return parsed.ok && parsed.document.type !== undefined && parsed.document.type !== 'any';
54
+ });
55
+ if (typed !== undefined)
56
+ return { verdict: 'refuse', rule: 'model-unavailable', file: typed[0] };
57
+ }
58
+ return validate(documents, { binaryTargets }, model.status === 'unavailable' ? NO_TYPES : { types: model.types });
35
59
  }
36
- export function validateCollection(text, binaryTargets, collectionRoot, model, binding) {
37
- const prefix = collectionRoot === '' ? '' : `${collectionRoot}/`;
60
+ export function validateCollection(text, binaryTargets, composition) {
38
61
  const collection = {};
39
- for (const [path, content] of Object.entries(text)){
40
- if (member(path, collectionRoot)) {
41
- collection[path.slice(prefix.length)] = content;
62
+ const selection = {};
63
+ for (const [path, content] of Object.entries(text)) {
64
+ if (untyped(composition.untypedFolders, path))
42
65
  continue;
43
- }
44
- const parsed = parse(content, path);
45
- if (!parsed.ok) return {
46
- verdict: 'refuse',
47
- ...parsed.refusal
48
- };
49
- if (Object.hasOwn(parsed.document.fields, 'type') && parsed.document.fields.type !== 'any') {
50
- return {
51
- verdict: 'refuse',
52
- rule: 'outside-collection-type',
53
- file: path,
54
- version: VERSION
55
- };
56
- }
66
+ if (selected(composition, path))
67
+ selection[path] = content;
68
+ else
69
+ collection[path] = content;
57
70
  }
58
- const targets = binaryTargets.filter((path)=>member(path, collectionRoot)).map((path)=>path.slice(prefix.length));
59
- if (model.status === 'unavailable' || binding === null) {
60
- const typed = Object.entries(collection).find(([, content])=>{
61
- const parsed = parse(content);
62
- return parsed.ok && parsed.document.type !== undefined && parsed.document.type !== 'any';
63
- });
64
- if (typed !== undefined) return {
65
- verdict: 'refuse',
66
- rule: 'model-unavailable',
67
- file: `${prefix}${typed[0]}`,
68
- version: VERSION
69
- };
70
- return validate(collection, {
71
- binaryTargets: targets
72
- });
71
+ const linked = binaryTargets.filter((path) => !untyped(composition.untypedFolders, path));
72
+ const verdicts = [
73
+ validateAgainst(collection, linked.filter((path) => !selected(composition, path)), composition.model),
74
+ ];
75
+ if (composition.selection !== null) {
76
+ verdicts.push(validateAgainst(selection, linked.filter((path) => selected(composition, path)), composition.selection.model));
73
77
  }
74
- const verdict = binding.validate({
75
- model: model.snapshot,
76
- documents: collection,
77
- binaryTargets: targets
78
- });
79
- if (verdict.verdict === 'refuse' && verdict.source === 'model') return verdict;
80
- if (verdict.verdict === 'accept') return verdict;
81
- return {
82
- ...verdict,
83
- file: `${prefix}${verdict.file}`,
84
- ...verdict.referrers === undefined ? {} : {
85
- referrers: verdict.referrers.map((path)=>`${prefix}${path}`)
86
- }
87
- };
78
+ const refusals = verdicts.filter((verdict) => verdict.verdict === 'refuse');
79
+ if (refusals.length === 0)
80
+ return verdicts[0];
81
+ return refusals.find((refusal) => refusal.rule !== 'model-unavailable') ?? refusals[0];
88
82
  }
89
-
90
- //# sourceMappingURL=collection.js.map
@@ -1,32 +1,56 @@
1
- import { type QueryBinding } from './query.js';
2
- import { type AttachedModelBinding, type TypesResult } from './model.js';
3
- import { type QueryOptions, type QueryResult } from '@agentshouse/query';
4
- import { type ActionResult, type Adapter, type Authorization, type HistoryResult } from './adapter.js';
5
- import type { Change } from './change.js';
6
- import { type QueueEntry, type SubmissionOutcome } from './outcome.js';
1
+ import { type TypesResult } from './model.js';
2
+ import { type Observation } from './observation.js';
3
+ import { type DocumentQuery, type DocumentResult, type GroupQuery, type GroupResult } from './query.js';
4
+ import { type SearchRequest, type SearchResult } from './search.js';
5
+ import { type Adapter, type Authorization, type HistoryResult, type RoomAttachment, type ProviderRefusal, type ServiceMode } from './adapter.js';
6
+ import { type ChatDraftSurface, type ConversationOptions, type ConversationSurface, type ConversationView } from './conversation.js';
7
+ import type { WrittenBy } from './change.js';
8
+ import type { CallResult, QueueEntry, SubmissionOutcome } from './outcome.js';
7
9
  import { type SaveRefusal } from './save.js';
10
+ import { type RoomDraft, type RoomDraftWrite } from './room-draft.js';
8
11
  import { type SyncStatus } from './status.js';
12
+ import { type RuntimeShell } from './durability.js';
13
+ export type AppTypedSelection = {
14
+ roots: readonly string[];
15
+ attachedModel: import('./model.js').ModelIdentity | null;
16
+ model: TypesResult;
17
+ };
9
18
  export type AppRoom = {
10
- collectionRoot: string;
11
19
  name: string;
12
20
  locator: string;
13
21
  operations: import('./adapter.js').OperationScopes;
14
22
  replica: import('./adapter.js').ReplicaAdmission;
15
23
  attachedModel: import('./model.js').ModelIdentity | null;
16
24
  model: TypesResult;
25
+ typedSelection: AppTypedSelection | null;
26
+ untypedFolders: readonly string[];
17
27
  providerOwnedPaths: readonly string[];
18
28
  roomVersion: string | null;
29
+ attachments: readonly RoomAttachment[];
19
30
  synchronizationAvailable: boolean;
31
+ refusal: ProviderRefusal | null;
32
+ };
33
+ export type AppSlotEntry = {
34
+ room: AppRoom;
35
+ segment: string | null;
36
+ };
37
+ export type AppSlot = {
38
+ slot: string;
39
+ entries: readonly AppSlotEntry[];
20
40
  };
21
- export type ConnectionRefusalReason = 'no-matching-version' | 'missing-required-guarantee' | 'md-model-version-mismatch' | 'revoked-authorization';
41
+ export type RoomTypes = {
42
+ collection: TypesResult;
43
+ typedSelection: TypesResult | null;
44
+ };
45
+ export type ConnectionRefusalReason = 'no-matching-version' | 'missing-required-guarantee' | 'md-model-version-mismatch' | 'revoked-authorization' | 'client-host-protocol-mismatch';
22
46
  export type ConnectionRefusal = {
23
47
  reason: ConnectionRefusalReason;
24
48
  reauthorizationOffered: boolean;
49
+ refusal: ProviderRefusal | null;
25
50
  };
26
51
  export type MdRuntimeOptions = {
27
52
  adapter: Adapter;
28
- modelBinding: AttachedModelBinding | null;
29
- queryBinding: QueryBinding | null;
53
+ shell: RuntimeShell;
30
54
  requiredGuarantees: readonly string[];
31
55
  authorization?: Authorization;
32
56
  discoveryIntervalMs?: number;
@@ -34,54 +58,73 @@ export type MdRuntimeOptions = {
34
58
  };
35
59
  export type SaveResult = {
36
60
  outcome: 'saved';
37
- id: string;
61
+ identifier: string;
38
62
  } | ({
39
63
  outcome: 'refused';
40
64
  } & SaveRefusal);
41
- export type DraftEntry = {
42
- readonly locator: string;
65
+ export type SavedRoomDraft = {
43
66
  readonly path: string;
44
- readonly content: unknown;
67
+ readonly revision: string;
45
68
  };
46
- export type DraftSurface = {
47
- list(): Promise<readonly DraftEntry[]>;
48
- read(locator: string, path: string): unknown;
49
- replace(locator: string, path: string, content: unknown): Promise<void>;
50
- discard(locator: string, path: string): Promise<void>;
69
+ export type RoomDraftSurface = {
70
+ list(): Promise<readonly RoomDraft[]>;
71
+ read(room: string, path: string): RoomDraft | null;
72
+ write(room: string, path: string, revision: string | null, parts: unknown): Promise<RoomDraftWrite>;
73
+ discard(room: string, path: string, revision: string): Promise<RoomDraftWrite>;
51
74
  };
52
- export type QueueSurface = {
53
- discard(locator: string, identifier: string): Promise<void>;
75
+ export type PresentationSurface = {
76
+ read(app: string): Promise<unknown>;
77
+ write(app: string, value: unknown): Promise<void>;
54
78
  };
55
79
  export type HistoryQuery = {
56
80
  revision?: string;
57
81
  pageToken?: string;
58
82
  };
59
- export type CallResult = ActionResult | {
60
- kind: 'undeclared';
61
- };
62
83
  export type MdRuntime = {
84
+ loaded(): Promise<void>;
63
85
  rooms(): readonly AppRoom[];
64
- query(options?: QueryOptions): QueryResult;
65
- types(locator: string): TypesResult;
86
+ slots(): readonly AppSlot[];
87
+ query: {
88
+ (query: DocumentQuery): Promise<DocumentResult>;
89
+ (query: GroupQuery): Promise<GroupResult>;
90
+ };
91
+ search(request: SearchRequest): Promise<SearchResult>;
92
+ types(locator: string): RoomTypes;
66
93
  syncStatus(): SyncStatus;
67
- draft: DraftSurface;
68
- save(locator: string, changes: readonly Change[], replacing?: string): Promise<SaveResult>;
94
+ serviceMode(): ServiceMode;
95
+ roomDraft: RoomDraftSurface;
96
+ conversation: ConversationSurface;
97
+ chatDraft: ChatDraftSurface;
98
+ presentation: PresentationSurface;
99
+ save(room: string, roomDrafts: readonly SavedRoomDraft[], writtenBy?: WrittenBy): Promise<SaveResult>;
69
100
  outcome(identifier: string): SubmissionOutcome | null;
70
- queue: QueueSurface;
71
101
  history(locator: string, path: string, query?: HistoryQuery): Promise<HistoryResult>;
72
102
  call(name: string, input: unknown): Promise<CallResult>;
103
+ reached(locator: string, roomVersion: string, path?: string): boolean;
73
104
  log(): string;
74
105
  storageLoss(): string | null;
106
+ persistence(): boolean;
75
107
  observe: {
76
- (topic: 'rooms', listener: (rooms: readonly AppRoom[]) => void): () => void;
77
- (topic: 'connection-refusal', listener: (refusal: ConnectionRefusal | null) => void): () => void;
78
- (topic: 'storage-loss', listener: (statement: string | null) => void): () => void;
79
- (topic: 'sync-status', listener: (status: SyncStatus) => void): () => void;
80
- (topic: 'query', query: QueryOptions, listener: (result: QueryResult) => void): () => void;
81
- (topic: 'queue', locator: string, listener: (entries: readonly QueueEntry[]) => void): () => void;
82
- (topic: 'drafts', listener: (drafts: readonly DraftEntry[]) => void): () => void;
108
+ (topic: 'rooms'): Promise<Observation<readonly AppRoom[]>>;
109
+ (topic: 'connection-refusal'): Promise<Observation<ConnectionRefusal | null>>;
110
+ (topic: 'storage-loss'): Promise<Observation<string | null>>;
111
+ (topic: 'sync-status'): Promise<Observation<SyncStatus>>;
112
+ (topic: 'service-mode'): Promise<Observation<ServiceMode>>;
113
+ (topic: 'query', query: DocumentQuery): Promise<Observation<DocumentResult>>;
114
+ (topic: 'query', query: GroupQuery): Promise<Observation<GroupResult>>;
115
+ (topic: 'queue', locator: string): Promise<Observation<readonly QueueEntry[]>>;
116
+ (topic: 'room-drafts'): Promise<Observation<readonly RoomDraft[]>>;
117
+ (topic: 'presentation', app: string): Promise<Observation<unknown>>;
118
+ (topic: 'conversation', conversation: string, options: ConversationOptions): Promise<Observation<ConversationView>>;
83
119
  };
84
120
  reauthorize(): Promise<void>;
85
121
  };
122
+ export type RuntimeTopic = 'rooms' | 'connection-refusal' | 'storage-loss' | 'sync-status' | 'service-mode' | 'query' | 'queue' | 'room-drafts' | 'presentation' | 'conversation';
123
+ export type ComposedRuntime = {
124
+ md: MdRuntime;
125
+ stop(): Promise<void>;
126
+ watch(topic: RuntimeTopic, input: readonly unknown[], deliver: (message: unknown) => void): () => void;
127
+ };
86
128
  export declare function createMdRuntime(options: MdRuntimeOptions): MdRuntime;
129
+ export declare function composeRuntime(options: MdRuntimeOptions): ComposedRuntime;
87
130
  //# sourceMappingURL=connection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connection.d.ts","sourceRoot":"","sources":["../src/connection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,YAAY,EAAmB,MAAM,YAAY,CAAC;AAC1E,OAAO,EAKL,KAAK,oBAAoB,EAEzB,KAAK,WAAW,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,WAAW,EAEjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,OAAO,EAEZ,KAAK,aAAa,EAGlB,KAAK,aAAa,EAGnB,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,aAAa,CAAC;AAGvD,OAAO,EAGL,KAAK,UAAU,EAEf,KAAK,iBAAiB,EACvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAQzD,OAAO,EAOL,KAAK,UAAU,EAChB,MAAM,aAAa,CAAC;AASrB,MAAM,MAAM,OAAO,GAAG;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,OAAO,cAAc,EAAE,eAAe,CAAC;IACnD,OAAO,EAAE,OAAO,cAAc,EAAE,gBAAgB,CAAC;IACjD,aAAa,EAAE,OAAO,YAAY,EAAE,aAAa,GAAG,IAAI,CAAC;IACzD,KAAK,EAAE,WAAW,CAAC;IACnB,kBAAkB,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,wBAAwB,EAAE,OAAO,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAC/B,qBAAqB,GACrB,4BAA4B,GAC5B,2BAA2B,GAC3B,uBAAuB,CAAC;AAE5B,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