@principal-ai/subsystems-react 0.51.4 → 0.53.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/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/subsystem/C4Graph.d.ts +3 -7
- package/dist/subsystem/C4Graph.d.ts.map +1 -1
- package/dist/subsystem/C4Graph.js +193 -47
- package/dist/subsystem/C4Graph.js.map +1 -1
- package/dist/subsystem/C4NodeCard.d.ts +33 -27
- package/dist/subsystem/C4NodeCard.d.ts.map +1 -1
- package/dist/subsystem/C4NodeCard.js +89 -43
- package/dist/subsystem/C4NodeCard.js.map +1 -1
- package/dist/subsystem/IssueList.d.ts +1 -1
- package/dist/subsystem/IssueList.d.ts.map +1 -1
- package/dist/subsystem/IssueList.js +20 -1
- package/dist/subsystem/IssueList.js.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.d.ts.map +1 -1
- package/dist/subsystem/SubsystemComponentGraph.js +42 -19
- package/dist/subsystem/SubsystemComponentGraph.js.map +1 -1
- package/dist/subsystem/c4.d.ts +48 -49
- package/dist/subsystem/c4.d.ts.map +1 -1
- package/dist/subsystem/c4.js +50 -0
- package/dist/subsystem/c4.js.map +1 -1
- package/dist/subsystem/c4Evidence.d.ts +88 -84
- package/dist/subsystem/c4Evidence.d.ts.map +1 -1
- package/dist/subsystem/c4Evidence.js +113 -166
- package/dist/subsystem/c4Evidence.js.map +1 -1
- package/dist/subsystem/model.d.ts +35 -245
- package/dist/subsystem/model.d.ts.map +1 -1
- package/dist/subsystem/model.js +11 -29
- package/dist/subsystem/model.js.map +1 -1
- package/dist/subsystem/nodes.js +5 -5
- package/dist/subsystem/nodes.js.map +1 -1
- package/dist/subsystem/techIcons/index.d.ts +5 -0
- package/dist/subsystem/techIcons/index.d.ts.map +1 -1
- package/dist/subsystem/techIcons/index.js +3 -0
- package/dist/subsystem/techIcons/index.js.map +1 -1
- package/dist/utils/edgeLabel.d.ts +15 -1
- package/dist/utils/edgeLabel.d.ts.map +1 -1
- package/dist/utils/edgeLabel.js +25 -1
- package/dist/utils/edgeLabel.js.map +1 -1
- package/dist/utils/elkLayout.d.ts +47 -0
- package/dist/utils/elkLayout.d.ts.map +1 -1
- package/dist/utils/elkLayout.js +71 -7
- package/dist/utils/elkLayout.js.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +8 -6
- package/src/stories/Subsystem/C4Graph/C4Component.stories.tsx +198 -0
- package/src/stories/Subsystem/C4Graph/C4Container.stories.tsx +42 -6
- package/src/stories/Subsystem/C4Graph/C4NodeGallery.stories.tsx +9 -7
- package/src/stories/Subsystem/ComponentGraph/Issues.stories.tsx +686 -2
- package/src/subsystem/C4Graph.tsx +278 -82
- package/src/subsystem/C4NodeCard.test.ts +32 -22
- package/src/subsystem/C4NodeCard.tsx +134 -69
- package/src/subsystem/IssueList.tsx +23 -0
- package/src/subsystem/SubsystemComponentGraph.tsx +38 -16
- package/src/subsystem/c4.protocolColor.test.ts +26 -0
- package/src/subsystem/c4.ts +76 -52
- package/src/subsystem/c4Evidence.test.ts +177 -237
- package/src/subsystem/c4Evidence.ts +160 -235
- package/src/subsystem/model.ts +62 -305
- package/src/subsystem/nodes.group.test.tsx +15 -0
- package/src/subsystem/nodes.tsx +7 -7
- package/src/subsystem/techIcons/index.tsx +8 -0
- package/src/utils/edgeLabel.test.ts +21 -2
- package/src/utils/edgeLabel.ts +29 -1
- package/src/utils/elkLayout.test.ts +16 -0
- package/src/utils/elkLayout.ts +119 -7
- package/src/stories/Subsystem/ComponentGraph/IssueOverlay.stories.tsx +0 -602
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* C4 evidence —
|
|
2
|
+
* C4 evidence — the pure read-side of proposing and verifying C4 containers.
|
|
3
3
|
*
|
|
4
|
-
* This module does not decide anything.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* This module does not decide anything. The proposing agent reads the
|
|
5
|
+
* subsystem diagrams, queries the existing containers, reasons, and writes
|
|
6
|
+
* its own rationale; what lives here is only the mechanical part of that
|
|
7
|
+
* loop:
|
|
8
8
|
*
|
|
9
|
-
* -
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* -
|
|
9
|
+
* - `proposeElements` — the proposal scaffold: skip keys containers
|
|
10
|
+
* already claim, skip boundaries no container can be discerned from
|
|
11
|
+
* (no runtime code behind them)
|
|
12
|
+
* - `verifyProcessBoundaries` — a boundary's verification status, read
|
|
13
|
+
* off the claiming container
|
|
14
|
+
* - `verificationIssues` — those statuses as dynamic-topology findings,
|
|
15
|
+
* so verification surfaces through the standard diagnostics pipeline
|
|
16
|
+
* - `findUnassigned` — runtime components no `process` names at all
|
|
13
17
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
18
|
+
* Judgements — is this the same unit under a different name? is one function
|
|
19
|
+
* a deployable unit? — belong to the agent and the human, never to a
|
|
20
|
+
* matcher.
|
|
16
21
|
*/
|
|
17
22
|
/** Constructs that execute at runtime — the only things a container can be. */
|
|
18
23
|
const RUNTIME_CONSTRUCTS = new Set(['function', 'class', 'custom_entity']);
|
|
@@ -24,105 +29,6 @@ function storageOf(m) {
|
|
|
24
29
|
export function isRuntimeConstruct(construct) {
|
|
25
30
|
return RUNTIME_CONSTRUCTS.has(construct);
|
|
26
31
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Derive the questions worth asking about one candidate element.
|
|
29
|
-
*
|
|
30
|
-
* Pure over the rollup, so it runs identically against a single model, the 40
|
|
31
|
-
* composed models, or a fixture. Pure *questions* — it never proposes an
|
|
32
|
-
* answer, because the answers are architectural.
|
|
33
|
-
*/
|
|
34
|
-
export function deriveConcerns(key, members, tech = { frameworks: [] }) {
|
|
35
|
-
const out = [];
|
|
36
|
-
const aliases = members.map((m) => m.alias);
|
|
37
|
-
const runtime = members.filter((m) => isRuntimeConstruct(m.construct));
|
|
38
|
-
if (members.length === 1) {
|
|
39
|
-
out.push({
|
|
40
|
-
target: key,
|
|
41
|
-
kind: 'singleton',
|
|
42
|
-
message: `process "${key}" has exactly one member (${aliases[0]}) — a lone function is not a deployable unit`,
|
|
43
|
-
members: aliases,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
// No member executes at runtime ⇒ this cannot be a deployable unit,
|
|
47
|
-
// regardless of how many members it has. A lone interface and a package of
|
|
48
|
-
// interfaces fail the same way.
|
|
49
|
-
if (members.length > 0 && runtime.length === 0) {
|
|
50
|
-
out.push({
|
|
51
|
-
target: key,
|
|
52
|
-
kind: 'library_shaped',
|
|
53
|
-
message: `process "${key}" has ${members.length} member(s) but none execute at runtime (${[...new Set(members.map((m) => m.construct))].join(', ')}) — this reads as a library, not a container`,
|
|
54
|
-
members: aliases,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
if (runtime.length > 0 && tech.frameworks.length === 0) {
|
|
58
|
-
out.push({
|
|
59
|
-
target: key,
|
|
60
|
-
kind: 'missing_technology',
|
|
61
|
-
message: `container "${key}" has no framework signal — C4 requires a technology on every container`,
|
|
62
|
-
members: aliases,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
const repos = new Set(members
|
|
66
|
-
.map((m) => (m.purl ?? '').split('#')[0])
|
|
67
|
-
.filter((r) => r && !r.startsWith('external:')));
|
|
68
|
-
if (repos.size > 1) {
|
|
69
|
-
out.push({
|
|
70
|
-
target: key,
|
|
71
|
-
kind: 'spans_repos',
|
|
72
|
-
message: `process "${key}" spans ${repos.size} repo keys (${[...repos].join(', ')}) — a C4 container cannot straddle a system boundary`,
|
|
73
|
-
members: aliases,
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
const unclassified = members.filter((m) => m.construct === 'store' && !storageOf(m));
|
|
77
|
-
if (unclassified.length > 0) {
|
|
78
|
-
out.push({
|
|
79
|
-
target: key,
|
|
80
|
-
kind: 'store_unclassified',
|
|
81
|
-
message: `${unclassified.length} store(s) in "${key}" declare no storage kind (${unclassified.map((m) => m.alias).join(', ')}) — decide whether each is a C4 data store or an internal detail`,
|
|
82
|
-
members: unclassified.map((m) => m.alias),
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
const unidentified = members.filter((m) => m.construct === 'external' && (!m.purl || m.purl === 'external' || m.purl.startsWith('external:proposed')));
|
|
86
|
-
if (unidentified.length > 0) {
|
|
87
|
-
out.push({
|
|
88
|
-
target: key,
|
|
89
|
-
kind: 'external_unidentified',
|
|
90
|
-
message: `${unidentified.length} external(s) have no resolvable identity (${unidentified.map((m) => m.alias).join(', ')}) — a C4 box named "external" is not a diagram`,
|
|
91
|
-
members: unidentified.map((m) => m.alias),
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
return out;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Suggest merges between keys that share a trailing role.
|
|
98
|
-
*
|
|
99
|
-
* `subsystems-studio/host` and `principal-studio/host` are the same role under
|
|
100
|
-
* two app names. This is a *question*, never a merge — only the user knows
|
|
101
|
-
* whether they are one process or two.
|
|
102
|
-
*/
|
|
103
|
-
export function suggestMerges(rollup) {
|
|
104
|
-
const byRole = new Map();
|
|
105
|
-
for (const { key } of rollup) {
|
|
106
|
-
const slash = key.lastIndexOf('/');
|
|
107
|
-
if (slash <= 0)
|
|
108
|
-
continue; // a bare key has no app/role shape
|
|
109
|
-
const role = key.slice(slash + 1);
|
|
110
|
-
const list = byRole.get(role) ?? [];
|
|
111
|
-
list.push(key);
|
|
112
|
-
byRole.set(role, list);
|
|
113
|
-
}
|
|
114
|
-
const out = [];
|
|
115
|
-
for (const [role, keys] of [...byRole].sort((a, b) => a[0].localeCompare(b[0]))) {
|
|
116
|
-
if (keys.length < 2)
|
|
117
|
-
continue;
|
|
118
|
-
out.push({
|
|
119
|
-
role,
|
|
120
|
-
keys: [...keys].sort(),
|
|
121
|
-
reason: `${keys.length} process keys end in "/${role}" (${[...keys].sort().join(', ')}) — one deployable unit under two names, or two units?`,
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
return out;
|
|
125
|
-
}
|
|
126
32
|
/**
|
|
127
33
|
* Runtime components that state no `process` at all.
|
|
128
34
|
*
|
|
@@ -134,69 +40,112 @@ export function findUnassigned(members) {
|
|
|
134
40
|
return members.filter((m) => !m.process && isRuntimeConstruct(m.construct));
|
|
135
41
|
}
|
|
136
42
|
/**
|
|
137
|
-
*
|
|
43
|
+
* Read a process boundary's verification off its container assignment.
|
|
138
44
|
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
45
|
+
* The claimant is the container whose `process` equals the boundary's key —
|
|
46
|
+
* a plain string match, no indirection. Two keys that are one deployable unit
|
|
47
|
+
* under two names are fixed in the model document (a consolidation proposal
|
|
48
|
+
* rewrites the components' `process` fields), so the reader never sees a
|
|
49
|
+
* discrepancy to resolve. When several containers claim one key (a
|
|
50
|
+
* hand-edited set can do this), the decided one wins: accepted over rejected
|
|
51
|
+
* over proposed, so one reviewer's yes outranks another's no.
|
|
142
52
|
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* leave the box labelled after an almost-empty process and lose its confirmed
|
|
146
|
-
* technology. Pass `preferId` to override.
|
|
147
|
-
*
|
|
148
|
-
* Returns a new set; the input is untouched. Idempotent.
|
|
53
|
+
* Pure: the same rollup and elements always read the same. `rollup` accepts
|
|
54
|
+
* `SubsystemProcessRegion`s directly — only `key` and `memberAliases` are read.
|
|
149
55
|
*/
|
|
150
|
-
export function
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
n += memberCountByKey.get(k) ?? 0;
|
|
166
|
-
return n;
|
|
56
|
+
export function verifyProcessBoundaries(options) {
|
|
57
|
+
const byKey = new Map();
|
|
58
|
+
for (const e of options.elements) {
|
|
59
|
+
if (e.kind !== 'container' || !e.process)
|
|
60
|
+
continue;
|
|
61
|
+
const list = byKey.get(e.process) ?? [];
|
|
62
|
+
list.push(e);
|
|
63
|
+
byKey.set(e.process, list);
|
|
64
|
+
}
|
|
65
|
+
const precedence = { accepted: 0, rejected: 1, proposed: 2 };
|
|
66
|
+
return options.rollup.map(({ key, memberAliases }) => {
|
|
67
|
+
const aliases = [...(memberAliases ?? [])];
|
|
68
|
+
const claimants = byKey.get(key) ?? [];
|
|
69
|
+
if (claimants.length === 0) {
|
|
70
|
+
return { key, memberAliases: aliases, status: 'unassigned' };
|
|
167
71
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
const absorbed = involved.filter((e) => e.id !== survivor.id);
|
|
173
|
-
const absorbedIds = new Set(absorbed.map((e) => e.id));
|
|
174
|
-
const merged = {
|
|
175
|
-
...survivor,
|
|
176
|
-
members: [...new Set([...survivor.members, ...absorbed.flatMap((e) => e.members)])],
|
|
177
|
-
derivedFrom: [
|
|
178
|
-
...new Set([...(survivor.derivedFrom ?? []), ...absorbed.flatMap((e) => e.derivedFrom ?? [])]),
|
|
179
|
-
],
|
|
180
|
-
rationale: [survivor.rationale, ...absorbed.map((e) => e.rationale)].filter(Boolean).join(' | ') ||
|
|
181
|
-
undefined,
|
|
182
|
-
};
|
|
183
|
-
return [...elements.filter((e) => e.id !== survivor.id && !absorbedIds.has(e.id)), merged].sort((a, b) => a.id.localeCompare(b.id));
|
|
72
|
+
const decided = [...claimants].sort((a, b) => precedence[a.state] - precedence[b.state] || a.id.localeCompare(b.id))[0];
|
|
73
|
+
const status = decided.state === 'accepted' ? 'verified' : decided.state;
|
|
74
|
+
return { key, memberAliases: aliases, status, element: decided };
|
|
75
|
+
});
|
|
184
76
|
}
|
|
185
77
|
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
78
|
+
* Verification statuses as diagnostics findings — the dynamic-topology layer
|
|
79
|
+
* of the issues list. One finding per boundary that is NOT verified: an
|
|
80
|
+
* unclaimed boundary is the absence a proposing agent run resolves, a
|
|
81
|
+
* `proposed` one awaits the human's decision, a `rejected` one records that
|
|
82
|
+
* the decision was no. `verified` reports nothing — the audit reports
|
|
83
|
+
* absence only, and silence is the good state.
|
|
188
84
|
*
|
|
189
|
-
*
|
|
190
|
-
*
|
|
85
|
+
* The findings ride the existing pipeline untouched: they badge the process
|
|
86
|
+
* frame (target kind `process`), list under Dynamic topology, focus their
|
|
87
|
+
* members on click, and carry the fix the decision needs. Pure over its
|
|
88
|
+
* input, like the rest of this module.
|
|
89
|
+
*/
|
|
90
|
+
export function verificationIssues(statuses) {
|
|
91
|
+
const out = [];
|
|
92
|
+
for (const { key, status, element } of statuses) {
|
|
93
|
+
if (status === 'verified')
|
|
94
|
+
continue;
|
|
95
|
+
const label = element?.label ?? key;
|
|
96
|
+
out.push({
|
|
97
|
+
id: `process-verification:${key}`,
|
|
98
|
+
severity: 'info',
|
|
99
|
+
kind: `boundary_process_${status}`,
|
|
100
|
+
message: status === 'unassigned'
|
|
101
|
+
? `No C4 container claims this process boundary yet — a proposing agent run would scaffold one.`
|
|
102
|
+
: status === 'proposed'
|
|
103
|
+
? `Container "${label}" claims this boundary and awaits a decision.`
|
|
104
|
+
: `Container "${label}" was rejected for this boundary — it stays unclaimed until a container is accepted.`,
|
|
105
|
+
target: { kind: 'process', id: key, label: key },
|
|
106
|
+
fix: status === 'unassigned'
|
|
107
|
+
? { label: 'Propose container' }
|
|
108
|
+
: status === 'proposed'
|
|
109
|
+
? { label: 'Accept container' }
|
|
110
|
+
: undefined,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return out;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* A starting point for an agent, shaped by the two questions that matter when
|
|
117
|
+
* assessing a process boundary:
|
|
118
|
+
*
|
|
119
|
+
* 1. **Does a container already exist for it?** (`elements`) — a key one
|
|
120
|
+
* already claims is never re-proposed; proposing another would be
|
|
121
|
+
* exactly the duplicate this module exists to prevent. The exact claim
|
|
122
|
+
* is a fact and skipped here; whether a *similarly named* container is
|
|
123
|
+
* the same unit is a judgement, so it belongs to the agent querying the
|
|
124
|
+
* container list — the fix there is a consolidation proposal, not a
|
|
125
|
+
* second box.
|
|
126
|
+
* 2. **Can the boundary be discerned into a container?** — code that never
|
|
127
|
+
* runs cannot be, so a library-shaped group gets no proposal; that
|
|
128
|
+
* fact is the agent's to report, not the scaffold's.
|
|
129
|
+
*
|
|
130
|
+
* For boundaries passing both, one `proposed` container per key. The
|
|
131
|
+
* rationale is the proposing agent's own reasoning, written on the proposal
|
|
132
|
+
* it POSTs — this scaffold does not fabricate one. A scaffold to edit and
|
|
133
|
+
* argue with — not an answer, and never `accepted`.
|
|
191
134
|
*/
|
|
192
135
|
export function proposeElements(options) {
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
136
|
+
const existing = options.elements ?? [];
|
|
137
|
+
const claimed = new Set(existing.flatMap((e) => (e.kind === 'container' && e.process ? [e.process] : [])));
|
|
138
|
+
const elements = [];
|
|
139
|
+
for (const { key, members, frameworks } of options.rollup) {
|
|
140
|
+
if (claimed.has(key))
|
|
141
|
+
continue; // already covered — exact claim, a fact
|
|
142
|
+
const runtime = members.filter((m) => isRuntimeConstruct(m.construct));
|
|
143
|
+
if (members.length > 0 && runtime.length === 0)
|
|
144
|
+
continue; // not discernible: code that never runs
|
|
145
|
+
elements.push({
|
|
196
146
|
id: `container:${key}`,
|
|
197
147
|
kind: 'container',
|
|
198
|
-
|
|
199
|
-
derivedFrom: [key],
|
|
148
|
+
process: key,
|
|
200
149
|
label: key,
|
|
201
150
|
containerKind: suggestContainerKind(members),
|
|
202
151
|
// C4 requires a technology on every container. With no framework signal
|
|
@@ -205,10 +154,8 @@ export function proposeElements(options) {
|
|
|
205
154
|
// module stopped doing.
|
|
206
155
|
technology: frameworks.length > 0 ? frameworks.join(' + ') : '',
|
|
207
156
|
state: 'proposed',
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
};
|
|
211
|
-
});
|
|
157
|
+
});
|
|
158
|
+
}
|
|
212
159
|
return {
|
|
213
160
|
repoKey: options.repoKey,
|
|
214
161
|
elements: elements.sort((a, b) => a.id.localeCompare(b.id)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"c4Evidence.js","sourceRoot":"","sources":["../../src/subsystem/c4Evidence.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"c4Evidence.js","sourceRoot":"","sources":["../../src/subsystem/c4Evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAiBH,+EAA+E;AAC/E,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC;AAE3E,SAAS,SAAS,CAAC,CAAe;IAChC,MAAM,CAAC,GAAG,CAAC,CAAC,WAA8D,CAAC;IAC3E,OAAO,CAAC,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AACrD,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,kBAAkB,CAAC,SAAiB;IAClD,OAAO,kBAAkB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgC;IAC7D,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,IAAI,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;AAC9E,CAAC;AA6BD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAGvC;IACC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC7C,KAAK,MAAM,CAAC,IAA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