@productbrain/cli 0.1.0-beta.8141 → 0.1.0-beta.8143
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/__tests__/handshake-augment.test.js +2 -16
- package/dist/__tests__/handshake-augment.test.js.map +1 -1
- package/dist/__tests__/handshake-preview.test.js +2 -9
- package/dist/__tests__/handshake-preview.test.js.map +1 -1
- package/dist/__tests__/handshake-session-threading.test.js +2 -9
- package/dist/__tests__/handshake-session-threading.test.js.map +1 -1
- package/dist/commands/admin/seedRegistryEntries.generated.js +1 -1
- package/dist/commands/admin/seedRegistryEntries.generated.js.map +1 -1
- package/dist/commands/handshake.d.ts +0 -2
- package/dist/commands/handshake.d.ts.map +1 -1
- package/dist/commands/handshake.js +21 -38
- package/dist/commands/handshake.js.map +1 -1
- package/dist/formatters/handshake.d.ts +0 -5
- package/dist/formatters/handshake.d.ts.map +1 -1
- package/dist/formatters/handshake.js +0 -9
- package/dist/formatters/handshake.js.map +1 -1
- package/dist/generators/adapters.d.ts +1 -1
- package/dist/generators/adapters.d.ts.map +1 -1
- package/dist/generators/adapters.js +9 -2
- package/dist/generators/adapters.js.map +1 -1
- package/dist/generators/everyone-rules-md.d.ts +10 -0
- package/dist/generators/everyone-rules-md.d.ts.map +1 -0
- package/dist/generators/everyone-rules-md.js +27 -0
- package/dist/generators/everyone-rules-md.js.map +1 -0
- package/dist/generators/retired-projections.d.ts +14 -0
- package/dist/generators/retired-projections.d.ts.map +1 -0
- package/dist/generators/retired-projections.js +79 -0
- package/dist/generators/retired-projections.js.map +1 -0
- package/dist/generators/retired-projections.test.d.ts +2 -0
- package/dist/generators/retired-projections.test.d.ts.map +1 -0
- package/dist/generators/retired-projections.test.js +62 -0
- package/dist/generators/retired-projections.test.js.map +1 -0
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/generators/archetypes.d.ts +0 -52
- package/dist/generators/archetypes.d.ts.map +0 -1
- package/dist/generators/archetypes.js +0 -190
- package/dist/generators/archetypes.js.map +0 -1
- package/dist/generators/archetypes.test.d.ts +0 -2
- package/dist/generators/archetypes.test.d.ts.map +0 -1
- package/dist/generators/archetypes.test.js +0 -272
- package/dist/generators/archetypes.test.js.map +0 -1
- package/dist/generators/chain-classifier-kernel-client-drift.test.d.ts +0 -2
- package/dist/generators/chain-classifier-kernel-client-drift.test.d.ts.map +0 -1
- package/dist/generators/chain-classifier-kernel-client-drift.test.js +0 -41
- package/dist/generators/chain-classifier-kernel-client-drift.test.js.map +0 -1
- package/dist/generators/chain-classifier.d.ts +0 -102
- package/dist/generators/chain-classifier.d.ts.map +0 -1
- package/dist/generators/chain-classifier.js +0 -52
- package/dist/generators/chain-classifier.js.map +0 -1
- package/dist/generators/chain-rules.d.ts +0 -42
- package/dist/generators/chain-rules.d.ts.map +0 -1
- package/dist/generators/chain-rules.js +0 -256
- package/dist/generators/chain-rules.js.map +0 -1
- package/dist/generators/chain-rules.test.d.ts +0 -2
- package/dist/generators/chain-rules.test.d.ts.map +0 -1
- package/dist/generators/chain-rules.test.js +0 -448
- package/dist/generators/chain-rules.test.js.map +0 -1
- package/dist/generators/handshake-diff.d.ts +0 -67
- package/dist/generators/handshake-diff.d.ts.map +0 -1
- package/dist/generators/handshake-diff.js +0 -183
- package/dist/generators/handshake-diff.js.map +0 -1
- package/dist/generators/handshake-diff.test.d.ts +0 -2
- package/dist/generators/handshake-diff.test.d.ts.map +0 -1
- package/dist/generators/handshake-diff.test.js +0 -264
- package/dist/generators/handshake-diff.test.js.map +0 -1
- package/templates/archetypes/boundary.md +0 -23
- package/templates/archetypes/constraint.md +0 -23
- package/templates/archetypes/convention.md +0 -23
- package/templates/archetypes/policy.md +0 -23
- package/templates/archetypes/quality-gate.md +0 -23
- package/templates/archetypes/workflow.md +0 -23
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Chain Rules Assembler — BET-286 Slice 3
|
|
3
|
-
*
|
|
4
|
-
* Fetches governance entries via MCP, classifies them, resolves archetype
|
|
5
|
-
* templates, and returns CanonicalRule objects ready to merge into the
|
|
6
|
-
* canonical rules array in runHandshake().
|
|
7
|
-
*
|
|
8
|
-
* Chain: BET-286 (Chain-Derived Agent Configuration)
|
|
9
|
-
*/
|
|
10
|
-
import { resolveArchetype } from './archetypes.js';
|
|
11
|
-
// ── Sentinel ──────────────────────────────────────────────────────────
|
|
12
|
-
/** Produced when chain.getGovernanceWithRelations is unreachable. */
|
|
13
|
-
const CHAIN_DEGRADED_SENTINEL = {
|
|
14
|
-
name: '_chain_degraded',
|
|
15
|
-
description: 'Chain governance unavailable — agent operating with manual rules only',
|
|
16
|
-
body: 'WARNING: The Chain MCP endpoint is unreachable. Generated governance rules are unavailable. Agent is operating with manual rules only. Exercise extra caution on governance decisions — check with the human before proceeding.',
|
|
17
|
-
sourcePath: 'chain://_sentinel',
|
|
18
|
-
autoApply: true,
|
|
19
|
-
level: 'core',
|
|
20
|
-
scope: undefined,
|
|
21
|
-
targets: undefined,
|
|
22
|
-
};
|
|
23
|
-
// ── Governance functions to attempt (excluding 'unclassified') ────────
|
|
24
|
-
const GOVERNANCE_FUNCTIONS = [
|
|
25
|
-
'constraint',
|
|
26
|
-
'boundary',
|
|
27
|
-
'convention',
|
|
28
|
-
'policy',
|
|
29
|
-
'workflow',
|
|
30
|
-
'quality-gate',
|
|
31
|
-
];
|
|
32
|
-
/** Maximum number of generated rules (ranked by relation density). */
|
|
33
|
-
const MAX_GENERATED_RULES = 8;
|
|
34
|
-
// ── Assembler ─────────────────────────────────────────────────────────
|
|
35
|
-
/**
|
|
36
|
-
* Fetch governance entries, classify them, resolve archetypes, and produce
|
|
37
|
-
* CanonicalRule objects ready to merge into the handshake pipeline.
|
|
38
|
-
*
|
|
39
|
-
* @param kernelCallFn - Injected kernelCall function for testability.
|
|
40
|
-
* @param manualRules - Existing manual rules from .productbrain/rules/.
|
|
41
|
-
* Used to suppress generated rules when a manual rule
|
|
42
|
-
* with the same name already exists.
|
|
43
|
-
*/
|
|
44
|
-
export async function generateChainRules(kernelCallFn, manualRules) {
|
|
45
|
-
const emptyStats = {
|
|
46
|
-
totalEntries: 0,
|
|
47
|
-
classifiedEntries: 0,
|
|
48
|
-
generatedRules: 0,
|
|
49
|
-
suppressedByManual: 0,
|
|
50
|
-
suppressedByZeroEntries: 0,
|
|
51
|
-
};
|
|
52
|
-
// Step 1: Fetch governance entries — return sentinel on failure
|
|
53
|
-
// The Convex query returns { entries: [...], total: N } — unwrap the array.
|
|
54
|
-
let entries;
|
|
55
|
-
let collections = [];
|
|
56
|
-
try {
|
|
57
|
-
const result = await kernelCallFn('chain.getGovernanceWithRelations', {});
|
|
58
|
-
if (!Array.isArray(result?.entries)) {
|
|
59
|
-
return { rules: [], gaps: [], sentinel: CHAIN_DEGRADED_SENTINEL, stats: emptyStats, classified: [] };
|
|
60
|
-
}
|
|
61
|
-
entries = result.entries;
|
|
62
|
-
}
|
|
63
|
-
catch {
|
|
64
|
-
return {
|
|
65
|
-
rules: [],
|
|
66
|
-
gaps: [],
|
|
67
|
-
sentinel: CHAIN_DEGRADED_SENTINEL,
|
|
68
|
-
stats: emptyStats,
|
|
69
|
-
classified: [],
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
try {
|
|
73
|
-
const collectionResult = await kernelCallFn('chain.listCollections', {});
|
|
74
|
-
collections = Array.isArray(collectionResult) ? collectionResult : [];
|
|
75
|
-
}
|
|
76
|
-
catch {
|
|
77
|
-
collections = [];
|
|
78
|
-
}
|
|
79
|
-
// Step 2: Classify entries — WP-488 Slice 4 (FEAT-1378, TEN-2733): served verdict
|
|
80
|
-
// (chain.classifyGovernance), not a local scorer. `ClassifiedGovernance[]` is a
|
|
81
|
-
// hand-typed local generic, not derived via kernel-client's GatewayRouteReturnByName —
|
|
82
|
-
// verified in WP-488 Slice 3 that reaching kernel-client's type derivation from
|
|
83
|
-
// packages/cli fails (`rootDir: "src"` + `moduleResolution: "NodeNext"`); same
|
|
84
|
-
// documented deviation as entryAccept.ts/orient.ts.
|
|
85
|
-
//
|
|
86
|
-
// Project down to exactly the fields `chain.classifyGovernance`'s
|
|
87
|
-
// `governanceEntryInputValidator` declares (convex/agentKnowledge/governanceQuery.ts)
|
|
88
|
-
// before sending [Codex review, PR #378 P1]: `entries` here is populated from
|
|
89
|
-
// `chain.getGovernanceWithRelations`'s response, whose real runtime shape
|
|
90
|
-
// (`GovernanceEntry`) carries `attestation` + `verifiedBy` — display-only fields the
|
|
91
|
-
// kernel judge never reads. The CLI's `kernelCallFn<T>` generic is a type ASSERTION,
|
|
92
|
-
// not a runtime projection, so `entries: GovernanceEntryInput[]` above is a compile-time
|
|
93
|
-
// convenience, not a guarantee — the underlying objects still carry those extra fields.
|
|
94
|
-
// Convex's `v.object(...)` validators are strict (unknown keys are a validation error,
|
|
95
|
-
// not a silent strip), so forwarding the un-projected objects would fail validation on
|
|
96
|
-
// every real workspace that has governance entries (an empty-entries workspace never hit
|
|
97
|
-
// this, since there's nothing to validate) — the classify call would always throw, and
|
|
98
|
-
// fall into the catch below.
|
|
99
|
-
const classifyEntries = entries.map((e) => ({
|
|
100
|
-
entryId: e.entryId,
|
|
101
|
-
name: e.name,
|
|
102
|
-
collectionSlug: e.collectionSlug,
|
|
103
|
-
status: e.status,
|
|
104
|
-
verificationStatus: e.verificationStatus,
|
|
105
|
-
data: e.data,
|
|
106
|
-
relations: e.relations,
|
|
107
|
-
}));
|
|
108
|
-
// Same class of bug, same fix, for `collections` [Copilot review, PR #378, follow-up to
|
|
109
|
-
// Codex P1 #1]: `chain.listCollections` (convex/agentKnowledge/collections.ts) returns
|
|
110
|
-
// full DB rows via `{ ...c, descriptionFieldKey }` — `_id`, `_creationTime`,
|
|
111
|
-
// `workspaceId`, `descriptionFieldKey`, and every other `collections` table field, none
|
|
112
|
-
// of which `governanceCollectionInputValidator` declares. The CLI's
|
|
113
|
-
// `kernelCallFn<GovernanceCollectionInput[]>` generic is a type assertion, not a runtime
|
|
114
|
-
// projection, so `collections` above carries all of that at runtime despite its narrower
|
|
115
|
-
// compile-time type. Forwarding it un-projected would fail Convex's strict `v.object()`
|
|
116
|
-
// validation in any real workspace with collections (the corpus/unit-test fixtures never
|
|
117
|
-
// carried extra keys, so this was masked there too).
|
|
118
|
-
//
|
|
119
|
-
// [Codex P1, PR #378 follow-up round] Send only the fields the kernel judge actually
|
|
120
|
-
// reads. Checked kernel/governance/classifyGovernance.ts directly: `slug` (map key),
|
|
121
|
-
// `classificationSignals`, and `governanceFunction` are the ONLY collection fields the
|
|
122
|
-
// scorer touches (`inferCollectionGovernanceFunction`, Signal 3's name-boost lookup) —
|
|
123
|
-
// `name`, `description`, `purpose`, `usageGuidance`, `classificationCheck`,
|
|
124
|
-
// `defaultCanonicalKey`, `governanceRole`, `thinkingLayer` are read by nothing in the
|
|
125
|
-
// classifier and were being forwarded as pure dead weight. That matters beyond bytes:
|
|
126
|
-
// the AKI gateway rejects the WHOLE request if any single string argument exceeds 10KB
|
|
127
|
-
// (convex/http.ts:933-935, `validateArgLengths`) — a workspace collection with a long
|
|
128
|
-
// `description`/`usageGuidance` (the MCP tool allows up to 20KB) would have broken every
|
|
129
|
-
// handshake, even though the classifier never looks at that text. No truncation-with-
|
|
130
|
-
// marker is needed here (contrast the entries fix): these fields are unused, not merely
|
|
131
|
-
// long, so the honest fix is to not send them at all, not to send a truncated copy.
|
|
132
|
-
const classifyCollections = collections.map((c) => ({
|
|
133
|
-
slug: c.slug,
|
|
134
|
-
classificationSignals: c.classificationSignals,
|
|
135
|
-
governanceFunction: c.governanceFunction,
|
|
136
|
-
}));
|
|
137
|
-
// A classify failure is NOT equivalent to "zero governance entries" — no rules can be
|
|
138
|
-
// derived without classification, so [Codex review, PR #378 P1] this failure now gets
|
|
139
|
-
// the SAME degraded-sentinel treatment as the two fetch failures above, instead of
|
|
140
|
-
// silently continuing with an empty classified list (which would report success with 0
|
|
141
|
-
// generated rules, indistinguishable from a genuinely empty workspace and masking the
|
|
142
|
-
// real error). The pre-migration local `classifyGovernance()` was a pure synchronous
|
|
143
|
-
// function with no failure mode to preserve — this is a new failure surface introduced
|
|
144
|
-
// by moving classification behind a network call, so there is no prior degraded
|
|
145
|
-
// semantics to match; the fetch steps' existing pattern is the honest precedent to
|
|
146
|
-
// extend rather than a fresh invention.
|
|
147
|
-
// [Codex P1, PR #378 follow-up round] Chunk below Convex's function-argument ceiling.
|
|
148
|
-
// At production scale (SCALE_TIERS.xl, convex/lib/scaleTiers.ts: ~4,000 governance
|
|
149
|
-
// entries × 3 relations each) the full corpus as one `entries` argument — echoed back
|
|
150
|
-
// in the response too, since `data`/`relations` pass through — can exceed the <1MB cap
|
|
151
|
-
// a Convex function argument/value must stay under (convex/http.ts:1816-1819 documents
|
|
152
|
-
// the same platform ceiling for a different route). Batch by an estimated worst-case
|
|
153
|
-
// per-entry byte size with headroom, not a fixed entry count, so the batch size adapts
|
|
154
|
-
// to how large individual entries/relations actually are; merge each batch's results.
|
|
155
|
-
const CLASSIFY_BATCH_BUDGET_BYTES = 400_000; // headroom under the ~1MB ceiling —
|
|
156
|
-
// covers this call's args AND its response echo (roughly 2x the entries payload),
|
|
157
|
-
// plus classifyCollections and JSON/HTTP framing overhead, with margin to spare.
|
|
158
|
-
const collectionsBytes = classifyCollections.length
|
|
159
|
-
? new TextEncoder().encode(JSON.stringify(classifyCollections)).length
|
|
160
|
-
: 0;
|
|
161
|
-
const worstCaseEntryBytes = classifyEntries.reduce((max, e) => Math.max(max, new TextEncoder().encode(JSON.stringify(e)).length), 1);
|
|
162
|
-
const entryBudgetBytes = Math.max(CLASSIFY_BATCH_BUDGET_BYTES - collectionsBytes, worstCaseEntryBytes);
|
|
163
|
-
const batchSize = Math.max(1, Math.floor(entryBudgetBytes / worstCaseEntryBytes));
|
|
164
|
-
const entryBatches = [];
|
|
165
|
-
for (let i = 0; i < classifyEntries.length; i += batchSize) {
|
|
166
|
-
entryBatches.push(classifyEntries.slice(i, i + batchSize));
|
|
167
|
-
}
|
|
168
|
-
if (entryBatches.length === 0)
|
|
169
|
-
entryBatches.push([]); // preserve one call at zero entries
|
|
170
|
-
let classified = [];
|
|
171
|
-
try {
|
|
172
|
-
for (const batch of entryBatches) {
|
|
173
|
-
const classifyResult = await kernelCallFn('chain.classifyGovernance', {
|
|
174
|
-
entries: batch,
|
|
175
|
-
collections: classifyCollections,
|
|
176
|
-
});
|
|
177
|
-
if (!Array.isArray(classifyResult)) {
|
|
178
|
-
return { rules: [], gaps: [], sentinel: CHAIN_DEGRADED_SENTINEL, stats: emptyStats, classified: [] };
|
|
179
|
-
}
|
|
180
|
-
classified = classified.concat(classifyResult);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
catch {
|
|
184
|
-
return { rules: [], gaps: [], sentinel: CHAIN_DEGRADED_SENTINEL, stats: emptyStats, classified: [] };
|
|
185
|
-
}
|
|
186
|
-
// Step 3: Build manual rule name set for suppression check
|
|
187
|
-
const manualRuleNames = new Set(manualRules.map((r) => r.name));
|
|
188
|
-
// Step 4: Resolve an archetype per governance function
|
|
189
|
-
const resolvedRules = [];
|
|
190
|
-
const gaps = [];
|
|
191
|
-
let suppressedByManual = 0;
|
|
192
|
-
let suppressedByZeroEntries = 0;
|
|
193
|
-
for (const fn of GOVERNANCE_FUNCTIONS) {
|
|
194
|
-
const matching = classified.filter((e) => e.governanceFunction === fn);
|
|
195
|
-
if (matching.length === 0) {
|
|
196
|
-
// Zero entries for this function — add to gaps
|
|
197
|
-
gaps.push(fn);
|
|
198
|
-
suppressedByZeroEntries++;
|
|
199
|
-
continue;
|
|
200
|
-
}
|
|
201
|
-
const result = resolveArchetype(fn, classified, manualRuleNames);
|
|
202
|
-
if ('skipped' in result) {
|
|
203
|
-
if (result.skipped === 'manual-suppression') {
|
|
204
|
-
suppressedByManual++;
|
|
205
|
-
}
|
|
206
|
-
// 'no-template' and 'zero-entries' are not counted as manual suppression.
|
|
207
|
-
// Zero-entries is already handled above; no-template is a missing file (not a user action).
|
|
208
|
-
continue;
|
|
209
|
-
}
|
|
210
|
-
resolvedRules.push(result.resolved.rule);
|
|
211
|
-
}
|
|
212
|
-
// Step 5: Cap at MAX_GENERATED_RULES — rank by relation density
|
|
213
|
-
// Relation density = total relations across all classified entries matching this function
|
|
214
|
-
const ranked = rankByRelationDensity(resolvedRules, classified);
|
|
215
|
-
const cappedRules = ranked.slice(0, MAX_GENERATED_RULES);
|
|
216
|
-
const stats = {
|
|
217
|
-
totalEntries: entries.length,
|
|
218
|
-
classifiedEntries: classified.length,
|
|
219
|
-
generatedRules: cappedRules.length,
|
|
220
|
-
suppressedByManual,
|
|
221
|
-
suppressedByZeroEntries,
|
|
222
|
-
};
|
|
223
|
-
return {
|
|
224
|
-
rules: cappedRules,
|
|
225
|
-
gaps,
|
|
226
|
-
sentinel: null,
|
|
227
|
-
stats,
|
|
228
|
-
classified,
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
// ── Ranking ───────────────────────────────────────────────────────────
|
|
232
|
-
/**
|
|
233
|
-
* Rank generated rules by the total number of relations across classified
|
|
234
|
-
* entries that contributed to each rule. Higher relation density → ranked first.
|
|
235
|
-
*
|
|
236
|
-
* Falls back to name-based sort for ties to ensure stable output.
|
|
237
|
-
*/
|
|
238
|
-
function rankByRelationDensity(rules, classified) {
|
|
239
|
-
// Build a density score per sourcePath (chain://<functionKey>)
|
|
240
|
-
const densityMap = new Map();
|
|
241
|
-
for (const rule of rules) {
|
|
242
|
-
// sourcePath is 'chain://<functionKey>'
|
|
243
|
-
const functionKey = rule.sourcePath.replace('chain://', '');
|
|
244
|
-
const matching = classified.filter((e) => e.governanceFunction === functionKey);
|
|
245
|
-
const density = matching.reduce((sum, e) => sum + e.relations.length, 0);
|
|
246
|
-
densityMap.set(rule.sourcePath, density);
|
|
247
|
-
}
|
|
248
|
-
return [...rules].sort((a, b) => {
|
|
249
|
-
const densityA = densityMap.get(a.sourcePath) ?? 0;
|
|
250
|
-
const densityB = densityMap.get(b.sourcePath) ?? 0;
|
|
251
|
-
if (densityB !== densityA)
|
|
252
|
-
return densityB - densityA;
|
|
253
|
-
return a.name.localeCompare(b.name);
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
//# sourceMappingURL=chain-rules.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chain-rules.js","sourceRoot":"","sources":["../../src/generators/chain-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AA4BnD,yEAAyE;AAEzE,qEAAqE;AACrE,MAAM,uBAAuB,GAAkB;IAC7C,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,uEAAuE;IACpF,IAAI,EAAE,iOAAiO;IACvO,UAAU,EAAE,mBAAmB;IAC/B,SAAS,EAAE,IAAI;IACf,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,yEAAyE;AAEzE,MAAM,oBAAoB,GAAG;IAC3B,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,QAAQ;IACR,UAAU;IACV,cAAc;CACN,CAAC;AAIX,sEAAsE;AACtE,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAE9B,yEAAyE;AAEzE;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,YAA8B,EAC9B,WAA4B;IAE5B,MAAM,UAAU,GAAoB;QAClC,YAAY,EAAE,CAAC;QACf,iBAAiB,EAAE,CAAC;QACpB,cAAc,EAAE,CAAC;QACjB,kBAAkB,EAAE,CAAC;QACrB,uBAAuB,EAAE,CAAC;KAC3B,CAAC;IAEF,gEAAgE;IAChE,4EAA4E;IAC5E,IAAI,OAA+B,CAAC;IACpC,IAAI,WAAW,GAAgC,EAAE,CAAC;IAClD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,YAAY,CAA+D,kCAAkC,EAAE,EAAE,CAAC,CAAC;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