greprag 5.61.1 → 5.63.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/codex-chip-hooks.js +2 -1
- package/dist/codex-chip-hooks.js.map +1 -1
- package/dist/commands/arm-reminder.js +5 -0
- package/dist/commands/arm-reminder.js.map +1 -1
- package/dist/commands/codex-chip/prompt.js +1 -1
- package/dist/commands/codex-chip/prompt.js.map +1 -1
- package/dist/commands/inbox-primer-reminder.js +10 -2
- package/dist/commands/inbox-primer-reminder.js.map +1 -1
- package/dist/commands/load-primer-reminder.d.ts +6 -0
- package/dist/commands/load-primer-reminder.js +22 -2
- package/dist/commands/load-primer-reminder.js.map +1 -1
- package/dist/commands/mechanic-manifest.d.ts +12 -0
- package/dist/commands/mechanic-manifest.js +62 -0
- package/dist/commands/mechanic-manifest.js.map +1 -1
- package/dist/commands/mechanic-spawn.js +37 -2
- package/dist/commands/mechanic-spawn.js.map +1 -1
- package/dist/commands/mechanic.js +29 -1
- package/dist/commands/mechanic.js.map +1 -1
- package/dist/commands/opencode-chip-mission.js +1 -0
- package/dist/commands/opencode-chip-mission.js.map +1 -1
- package/dist/commands/opencode-interrupt.d.ts +15 -5
- package/dist/commands/opencode-interrupt.js +22 -20
- package/dist/commands/opencode-interrupt.js.map +1 -1
- package/dist/commands/os-primer-reminder.js +5 -2
- package/dist/commands/os-primer-reminder.js.map +1 -1
- package/dist/commands/reminder-registry.d.ts +7 -0
- package/dist/commands/reminder-registry.js +9 -1
- package/dist/commands/reminder-registry.js.map +1 -1
- package/dist/commands/reminder-types.d.ts +13 -1
- package/dist/commands/state-trigger.d.ts +17 -0
- package/dist/commands/state-trigger.js +152 -16
- package/dist/commands/state-trigger.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/opencode-plugin-png.d.ts +151 -0
- package/dist/opencode-plugin-png.js +275 -0
- package/dist/opencode-plugin-png.js.map +1 -0
- package/dist/opencode-plugin.bundle.js +683 -29
- package/dist/opencode-plugin.js +76 -1
- package/dist/opencode-plugin.js.map +1 -1
- package/package.json +2 -2
- package/skill/greprag/docs/codex-chip.md +5 -0
- package/skill/mechanic/SKILL.md +5 -0
- package/skill/templates/chip-spawn.md +8 -0
- package/skill/templates/codex-chip-spawn.md +23 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// adr: adr/opencode-png-recode.md
|
|
3
|
+
/** opencode-plugin-png.ts — Lever 2 (Snapcompact) PNG recode for opencode.
|
|
4
|
+
*
|
|
5
|
+
* WHAT — at a CONTEXT-SIZE THRESHOLD, recode OLD conversation history (bulky
|
|
6
|
+
* text parts) into dense pixel-font PNG IMAGE parts so the model receives them
|
|
7
|
+
* as VISION tokens: lossless ~3x input compression (a 1568x1568 PNG holds
|
|
8
|
+
* ~30K chars but bills ~3,279 image tokens). Design + economics:
|
|
9
|
+
* docs/pre-llm-compression.md ("Lever 2 — Snapcompact", "cache cost model").
|
|
10
|
+
* This is Lever 2 to opencode-plugin-crush.ts's Lever 1 (per-part text crush).
|
|
11
|
+
*
|
|
12
|
+
* WHY HERE — opencode's `experimental.chat.messages.transform` hook fires
|
|
13
|
+
* before every LLM call with the full outbound `output.messages` array in
|
|
14
|
+
* hand (opencode-native `{ info, parts[] }` shape). We can REPLACE bulky old
|
|
15
|
+
* text parts with image parts in that request-scoped array. Claude Code's
|
|
16
|
+
* harness can only render the WHOLE pre-compact transcript at PreCompact
|
|
17
|
+
* (commands/archive.ts); opencode lets us recode SURVIVING history selectively
|
|
18
|
+
* and continuously, which is the Lever-2 idea this engine implements.
|
|
19
|
+
*
|
|
20
|
+
* ── THE OPENCODE IMAGE-PART CONTRACT (load-bearing, verified) ──────────────
|
|
21
|
+
* An opencode-native image part is a FILE part:
|
|
22
|
+
* { type: 'file', mime: 'image/png', url: 'data:image/png;base64,<b64>',
|
|
23
|
+
* filename?: string }
|
|
24
|
+
* Source of truth: sst/opencode `session/message-v2.ts` `toModelMessagesEffect`
|
|
25
|
+
* reads `part.mime` / `part.url` / `part.filename`, builds a UIMessage file
|
|
26
|
+
* part `{ type:'file', url, mediaType: part.mime, filename }`, then hands it to
|
|
27
|
+
* the AI SDK `convertToModelMessages()` which emits the provider image block.
|
|
28
|
+
* Confirmed against tests/test-opencode-plugin.cjs (the `{ type:'file', mime:
|
|
29
|
+
* 'image/png', url:'data:image/png;base64,...' }` fixture). The shipped Lever-1
|
|
30
|
+
* crusher proves mutations to this same native parts array DO propagate to the
|
|
31
|
+
* model, so an INJECTED file part rides the same path. The one residual a live
|
|
32
|
+
* opencode restart confirms: that `convertToModelMessages` + the provider
|
|
33
|
+
* accept a freshly-injected file part identically to a user-uploaded one.
|
|
34
|
+
*
|
|
35
|
+
* ── THE VISION GATE (critical) ─────────────────────────────────────────────
|
|
36
|
+
* Feeding a PNG to a TEXT-ONLY model BREAKS the turn. opencode declares image
|
|
37
|
+
* support per model via `modalities.input` containing `"image"`; a model
|
|
38
|
+
* lacking it has opencode REJECT image parts ("this model does not support
|
|
39
|
+
* image input"). So recode fires ONLY for vision-capable models — authoritative
|
|
40
|
+
* check is `modalities.input` includes 'image'; when the hook payload omits
|
|
41
|
+
* modalities we fall back to a model-id allowlist that DENIES the unknown
|
|
42
|
+
* (never recode unless proven safe). `deepseek-v4-flash` is text-only in
|
|
43
|
+
* opencode's model def (issue: missing image modality) → it must pass through.
|
|
44
|
+
*
|
|
45
|
+
* INVARIANTS:
|
|
46
|
+
* - Reversible: the byte-exact original is CCR-stashed via the injected
|
|
47
|
+
* `stash` callback; the 16-hex hash (sha256[:16], identical to CcrStore.put)
|
|
48
|
+
* is embedded in the image filename AND a tiny `<<ccr:HASH>>` breadcrumb
|
|
49
|
+
* text part, so `greprag retrieve <hash>` recovers it byte-exact.
|
|
50
|
+
* - Threshold-fired: a no-op below `thresholdChars` (default ~400K) — recoding
|
|
51
|
+
* history pays a one-time cache-rebuild toll, only worth it past the
|
|
52
|
+
* crossover (docs/pre-llm-compression.md cache cost model).
|
|
53
|
+
* - Live-tail-safe: the newest `liveTailMessages` messages (default 1) are
|
|
54
|
+
* NEVER recoded — only old history is rewritten.
|
|
55
|
+
* - Lossless: every rendered page self-tests its pixel round-trip
|
|
56
|
+
* (verifyRoundTrip); a failure is surfaced in stats, never silent.
|
|
57
|
+
* - Defensive: per-part try/catch — a render/stash failure leaves that part
|
|
58
|
+
* verbatim; malformed input is handled; the turn is NEVER broken.
|
|
59
|
+
* - Non-destructive: mutates ONLY the request-scoped message objects handed
|
|
60
|
+
* in (caller passes opencode's per-call `output.messages`, never persisted
|
|
61
|
+
* history).
|
|
62
|
+
* - Dep-free: imports ONLY the pure archive renderer (zlib via png-codec is a
|
|
63
|
+
* Node builtin) — inlines cleanly into the single opencode plugin bundle,
|
|
64
|
+
* no sql.js / no proc / no sidecar require.
|
|
65
|
+
*/
|
|
66
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
+
exports.DEFAULT_VISION_MODEL_SUBSTRINGS = exports.DEFAULT_LIVE_TAIL_MESSAGES = exports.DEFAULT_MIN_PART_CHARS = exports.DEFAULT_THRESHOLD_CHARS = void 0;
|
|
68
|
+
exports.ccrPngMarker = ccrPngMarker;
|
|
69
|
+
exports.isVisionCapable = isVisionCapable;
|
|
70
|
+
exports.renderTextToImageParts = renderTextToImageParts;
|
|
71
|
+
exports.recodeMessagesToPng = recodeMessagesToPng;
|
|
72
|
+
const page_renderer_1 = require("./archive/page-renderer");
|
|
73
|
+
// ---------- CCR marker (inlined — see opencode-plugin-crush.ts header) --------
|
|
74
|
+
/** First 16 hex of sha256 — must match ccr-store.ts CCR_MARKER_HASH_LEN. */
|
|
75
|
+
const CCR_MARKER_HASH_LEN = 16;
|
|
76
|
+
/** `<<ccr:HASH>>` — must match ccr-store.ts ccrMarker() / opencode-plugin-crush. */
|
|
77
|
+
function ccrPngMarker(hash) {
|
|
78
|
+
return `<<ccr:${hash.slice(0, CCR_MARKER_HASH_LEN)}>>`;
|
|
79
|
+
}
|
|
80
|
+
/** Already-crushed / already-recoded detector — idempotency guard. */
|
|
81
|
+
const CCR_MARKER_RE = /<<ccr:/;
|
|
82
|
+
// ---------- Defaults ----------------------------------------------------------
|
|
83
|
+
/** Total context chars above which recode fires. ~400K crossover where cache-read
|
|
84
|
+
* overhead overtakes productive turn cost (docs/pre-llm-compression.md). */
|
|
85
|
+
exports.DEFAULT_THRESHOLD_CHARS = 400_000;
|
|
86
|
+
/** Only text parts at least this big are recoded — a tiny part isn't worth a PNG. */
|
|
87
|
+
exports.DEFAULT_MIN_PART_CHARS = 4_000;
|
|
88
|
+
/** Newest N messages preserved verbatim (never recode the live tail). */
|
|
89
|
+
exports.DEFAULT_LIVE_TAIL_MESSAGES = 1;
|
|
90
|
+
/** Built-in vision-capable model-id substrings — the deny-unknown fallback used
|
|
91
|
+
* ONLY when the hook payload carries no `modalities`. Deliberately EXCLUDES
|
|
92
|
+
* deepseek-*: opencode's model def declares deepseek-v4-flash text-only (no
|
|
93
|
+
* image modality) and rejects image parts, so it must pass through. Extend via
|
|
94
|
+
* GREPRAG_OPENCODE_PNG_VISION_MODELS without editing code. */
|
|
95
|
+
exports.DEFAULT_VISION_MODEL_SUBSTRINGS = [
|
|
96
|
+
'gpt-4o', 'gpt-4.1', 'gpt-4-turbo', 'gpt-5', 'o1', 'o3', 'o4',
|
|
97
|
+
'claude-3', 'claude-4', 'claude-opus', 'claude-sonnet', 'claude-haiku', 'claude-fable',
|
|
98
|
+
'gemini', 'llama-3.2-vision', 'llama-4', 'qwen2.5-vl', 'qwen2-vl', 'qwen3-vl',
|
|
99
|
+
'pixtral', 'mistral-small-3', 'grok-vision', 'grok-4', 'internvl', '-vl', 'vision',
|
|
100
|
+
];
|
|
101
|
+
// ---------- Vision capability gate (pure) -------------------------------------
|
|
102
|
+
function inputModalities(modalities) {
|
|
103
|
+
if (!modalities)
|
|
104
|
+
return null;
|
|
105
|
+
if (Array.isArray(modalities))
|
|
106
|
+
return modalities.map((m) => String(m));
|
|
107
|
+
if (typeof modalities === 'object' && Array.isArray(modalities.input)) {
|
|
108
|
+
return modalities.input.map((m) => String(m));
|
|
109
|
+
}
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
/** Decide whether the model accepts image input. `modalities.input` is
|
|
113
|
+
* AUTHORITATIVE (opencode's own declaration); only when it is absent do we
|
|
114
|
+
* fall back to the model-id allowlist, which DENIES the unknown. */
|
|
115
|
+
function isVisionCapable(opts) {
|
|
116
|
+
const mods = inputModalities(opts.modalities);
|
|
117
|
+
if (mods) {
|
|
118
|
+
return mods.some((m) => m.toLowerCase() === 'image');
|
|
119
|
+
}
|
|
120
|
+
const id = (opts.modelId || '').toLowerCase();
|
|
121
|
+
if (!id)
|
|
122
|
+
return false; // deny-unknown
|
|
123
|
+
const allow = [...exports.DEFAULT_VISION_MODEL_SUBSTRINGS, ...(opts.visionAllowlist || [])];
|
|
124
|
+
return allow.some((sub) => sub && id.includes(String(sub).toLowerCase()));
|
|
125
|
+
}
|
|
126
|
+
// ---------- Render one text blob to image parts (pure) ------------------------
|
|
127
|
+
/** Render `text` to one or more pixel-font PNG file parts (one per page).
|
|
128
|
+
* Each page self-tests its pixel round-trip. `hash` is embedded in every
|
|
129
|
+
* page's filename so a model (or a human) can map an image back to its CCR
|
|
130
|
+
* original. */
|
|
131
|
+
function renderTextToImageParts(text, hash) {
|
|
132
|
+
const sanitized = (0, page_renderer_1.sanitizeForGrid)(text);
|
|
133
|
+
const pages = (0, page_renderer_1.paginate)((0, page_renderer_1.layoutRows)(sanitized));
|
|
134
|
+
const parts = [];
|
|
135
|
+
let pngBytes = 0;
|
|
136
|
+
let selfTestError = null;
|
|
137
|
+
for (let i = 0; i < pages.length; i++) {
|
|
138
|
+
const rendered = (0, page_renderer_1.renderPage)(pages[i]);
|
|
139
|
+
const err = (0, page_renderer_1.verifyRoundTrip)(rendered);
|
|
140
|
+
if (err && !selfTestError)
|
|
141
|
+
selfTestError = `page ${i + 1}: ${err}`;
|
|
142
|
+
pngBytes += rendered.png.length;
|
|
143
|
+
parts.push({
|
|
144
|
+
type: 'file',
|
|
145
|
+
mime: 'image/png',
|
|
146
|
+
url: `data:image/png;base64,${rendered.png.toString('base64')}`,
|
|
147
|
+
filename: `greprag-png-${hash.slice(0, CCR_MARKER_HASH_LEN)}-p${String(i + 1).padStart(3, '0')}.png`,
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
return { parts, pages: pages.length, pngBytes, selfTestError };
|
|
151
|
+
}
|
|
152
|
+
// ---------- Message walker ----------------------------------------------------
|
|
153
|
+
function partsOf(msg) {
|
|
154
|
+
if (!msg || typeof msg !== 'object')
|
|
155
|
+
return null;
|
|
156
|
+
const parts = msg.parts;
|
|
157
|
+
return Array.isArray(parts) ? parts : null;
|
|
158
|
+
}
|
|
159
|
+
/** Char length of one part's string content (text part text, tool output, or a
|
|
160
|
+
* file part's url). Used to size total context for the threshold — counts ALL
|
|
161
|
+
* bulky carriers even though only TEXT parts get recoded (tool output is
|
|
162
|
+
* Lever 1 / crush's domain). */
|
|
163
|
+
function partCharLen(p) {
|
|
164
|
+
if (!p || typeof p !== 'object')
|
|
165
|
+
return 0;
|
|
166
|
+
const part = p;
|
|
167
|
+
if (part.type === 'text' && typeof part.text === 'string')
|
|
168
|
+
return part.text.length;
|
|
169
|
+
if (part.type === 'file' && typeof part.url === 'string')
|
|
170
|
+
return part.url.length;
|
|
171
|
+
if (part.type === 'tool' && part.state && typeof part.state === 'object') {
|
|
172
|
+
const out = part.state.output;
|
|
173
|
+
if (typeof out === 'string')
|
|
174
|
+
return out.length;
|
|
175
|
+
}
|
|
176
|
+
return 0;
|
|
177
|
+
}
|
|
178
|
+
/** Recode one part if it is a bulky, not-already-marked TEXT part; else null. */
|
|
179
|
+
function maybeRecodePart(p, minPartChars, stash) {
|
|
180
|
+
if (!p || typeof p !== 'object')
|
|
181
|
+
return null;
|
|
182
|
+
const part = p;
|
|
183
|
+
if (part.type !== 'text' || typeof part.text !== 'string')
|
|
184
|
+
return null;
|
|
185
|
+
const text = part.text;
|
|
186
|
+
if (CCR_MARKER_RE.test(text))
|
|
187
|
+
return null; // already crushed/recoded — idempotent
|
|
188
|
+
if (text.length < minPartChars)
|
|
189
|
+
return null; // below per-part floor
|
|
190
|
+
const hash = stash(text); // persist byte-exact original
|
|
191
|
+
const { parts: fileParts, pages, pngBytes, selfTestError } = renderTextToImageParts(text, hash);
|
|
192
|
+
const breadcrumb = {
|
|
193
|
+
type: 'text',
|
|
194
|
+
text: `[greprag-png-recode: ${pages} page(s) of prior history rendered as ` +
|
|
195
|
+
`pixel-text image(s) above; verbatim original ${ccrPngMarker(hash)} ` +
|
|
196
|
+
`(greprag retrieve ${hash.slice(0, CCR_MARKER_HASH_LEN)})]`,
|
|
197
|
+
};
|
|
198
|
+
return { fileParts, breadcrumb, pages, pngBytes, selfTestError };
|
|
199
|
+
}
|
|
200
|
+
/** Walk an opencode outbound message array and recode bulky OLD text parts to
|
|
201
|
+
* pixel-font PNG image parts, in place on the request-scoped objects. Fires
|
|
202
|
+
* only when the total context exceeds `thresholdChars` AND the model is
|
|
203
|
+
* vision-capable. Returns stats; never throws. */
|
|
204
|
+
function recodeMessagesToPng(messages, opts) {
|
|
205
|
+
const thresholdChars = opts.thresholdChars ?? exports.DEFAULT_THRESHOLD_CHARS;
|
|
206
|
+
const minPartChars = opts.minPartChars ?? exports.DEFAULT_MIN_PART_CHARS;
|
|
207
|
+
const liveTail = opts.liveTailMessages ?? exports.DEFAULT_LIVE_TAIL_MESSAGES;
|
|
208
|
+
const stats = {
|
|
209
|
+
fired: false, visionCapable: false, totalChars: 0, thresholdChars,
|
|
210
|
+
partsRecoded: 0, pagesRendered: 0, pngBytes: 0, selfTestError: null, reason: '',
|
|
211
|
+
};
|
|
212
|
+
if (!Array.isArray(messages)) {
|
|
213
|
+
stats.reason = 'messages not an array';
|
|
214
|
+
return stats;
|
|
215
|
+
}
|
|
216
|
+
// 1. Total context size (all carriers).
|
|
217
|
+
for (const msg of messages) {
|
|
218
|
+
const parts = partsOf(msg);
|
|
219
|
+
if (!parts)
|
|
220
|
+
continue;
|
|
221
|
+
for (const p of parts)
|
|
222
|
+
stats.totalChars += partCharLen(p);
|
|
223
|
+
}
|
|
224
|
+
// 2. Vision gate — feeding a PNG to a text-only model breaks the turn.
|
|
225
|
+
const vision = isVisionCapable(opts);
|
|
226
|
+
stats.visionCapable = vision;
|
|
227
|
+
if (!vision) {
|
|
228
|
+
stats.reason = `model not vision-capable (modelId=${opts.modelId || '?'}) — pass-through`;
|
|
229
|
+
return stats;
|
|
230
|
+
}
|
|
231
|
+
// 3. Threshold gate — recoding history pays a one-time rebuild toll.
|
|
232
|
+
if (stats.totalChars < thresholdChars) {
|
|
233
|
+
stats.reason = `below threshold (${stats.totalChars} < ${thresholdChars} chars)`;
|
|
234
|
+
return stats;
|
|
235
|
+
}
|
|
236
|
+
// 4. Recode old history — everything before the last `liveTail` messages.
|
|
237
|
+
const lastRecodableIdx = Math.max(0, messages.length - Math.max(0, liveTail));
|
|
238
|
+
for (let mi = 0; mi < lastRecodableIdx; mi++) {
|
|
239
|
+
const msg = messages[mi];
|
|
240
|
+
const parts = partsOf(msg);
|
|
241
|
+
if (!parts)
|
|
242
|
+
continue;
|
|
243
|
+
let changed = false;
|
|
244
|
+
const newParts = [];
|
|
245
|
+
for (const p of parts) {
|
|
246
|
+
let rec = null;
|
|
247
|
+
try {
|
|
248
|
+
rec = maybeRecodePart(p, minPartChars, opts.stash);
|
|
249
|
+
}
|
|
250
|
+
catch {
|
|
251
|
+
rec = null; // per-part swallow — a render/stash failure leaves the part verbatim
|
|
252
|
+
}
|
|
253
|
+
if (rec) {
|
|
254
|
+
newParts.push(...rec.fileParts, rec.breadcrumb);
|
|
255
|
+
changed = true;
|
|
256
|
+
stats.partsRecoded++;
|
|
257
|
+
stats.pagesRendered += rec.pages;
|
|
258
|
+
stats.pngBytes += rec.pngBytes;
|
|
259
|
+
if (rec.selfTestError && !stats.selfTestError)
|
|
260
|
+
stats.selfTestError = rec.selfTestError;
|
|
261
|
+
}
|
|
262
|
+
else {
|
|
263
|
+
newParts.push(p);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
if (changed)
|
|
267
|
+
msg.parts = newParts;
|
|
268
|
+
}
|
|
269
|
+
stats.fired = stats.partsRecoded > 0;
|
|
270
|
+
stats.reason = stats.fired
|
|
271
|
+
? `recoded ${stats.partsRecoded} part(s) -> ${stats.pagesRendered} page(s), ${stats.pngBytes} png bytes`
|
|
272
|
+
: 'threshold crossed but no recodable text parts (all below per-part floor or already marked)';
|
|
273
|
+
return stats;
|
|
274
|
+
}
|
|
275
|
+
//# sourceMappingURL=opencode-plugin-png.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opencode-plugin-png.js","sourceRoot":"","sources":["../src/opencode-plugin-png.ts"],"names":[],"mappings":";AAAA,kCAAkC;AAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;;;AAWH,oCAEC;AA8FD,0CAaC;AAQD,wDAsBC;AA0DD,kDAkEC;AAhRD,2DAEiC;AAEjC,iFAAiF;AAEjF,4EAA4E;AAC5E,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,oFAAoF;AACpF,SAAgB,YAAY,CAAC,IAAY;IACvC,OAAO,SAAS,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,mBAAmB,CAAC,IAAI,CAAC;AACzD,CAAC;AACD,sEAAsE;AACtE,MAAM,aAAa,GAAG,QAAQ,CAAC;AAE/B,iFAAiF;AAEjF;6EAC6E;AAChE,QAAA,uBAAuB,GAAG,OAAO,CAAC;AAC/C,qFAAqF;AACxE,QAAA,sBAAsB,GAAG,KAAK,CAAC;AAC5C,yEAAyE;AAC5D,QAAA,0BAA0B,GAAG,CAAC,CAAC;AAE5C;;;;+DAI+D;AAClD,QAAA,+BAA+B,GAAG;IAC7C,QAAQ,EAA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