@parall/cli 1.59.0 → 1.60.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.
@@ -0,0 +1,407 @@
1
+ // Shared wiki CLI plumbing: public result types, mount / manifest types,
2
+ // wiki resolution, wiki-service REST helpers, blob hashing and path utilities.
3
+ // Entry point for consumers is ./wiki.ts, which re-exports the public surface.
4
+ import { createHash } from 'node:crypto';
5
+ import { promises as fs } from 'node:fs';
6
+ import path from 'node:path';
7
+ // ---------------------------------------------------------------------------
8
+ // Constants
9
+ // ---------------------------------------------------------------------------
10
+ export const LOCAL_MANIFEST_FILE = 'manifest.json';
11
+ export const PRLL_WIKI_DIR = '.parall-wiki';
12
+ export const TEXT_MAX_BYTES = 10 * 1024 * 1024;
13
+ /** Degraded listing entries (discoverable-but-unreadable libraries) carry no
14
+ * slug and no content access — they exist only so the Web join browser can
15
+ * offer them. The CLI never mounts, syncs or enumerates them. */
16
+ export function isReadableWiki(wiki_) {
17
+ return !wiki_.degraded && typeof wiki_.slug === 'string' && wiki_.slug.length > 0;
18
+ }
19
+ export async function listWikis(ctx) {
20
+ return (await ctx.client.getWikis(ctx.orgId)).filter(isReadableWiki);
21
+ }
22
+ export async function resolveWikiRef(ctx, wikiRef) {
23
+ const normalized = wikiRef?.trim() ?? '';
24
+ if (!normalized) {
25
+ return resolveWikiRefOrDefault(ctx);
26
+ }
27
+ const wikis = await listWikis(ctx);
28
+ const exact = wikis.find((wiki) => wiki.id === normalized || wiki.slug === normalized);
29
+ if (exact) {
30
+ return exact;
31
+ }
32
+ const lower = normalized.toLowerCase();
33
+ const fuzzy = wikis.find((wiki) => wiki.slug.toLowerCase() === lower || wiki.name.toLowerCase() === lower);
34
+ if (fuzzy) {
35
+ return fuzzy;
36
+ }
37
+ const available = wikis.length > 0
38
+ ? ` Available wikis: ${wikis.map((w) => w.slug).join(', ')}`
39
+ : ' This organization has no wikis yet.';
40
+ throw new Error(`wiki not found: ${wikiRef}.${available}`);
41
+ }
42
+ /**
43
+ * Resolve wiki reference. If wikiRef is omitted or empty, auto-resolves to
44
+ * the org's single wiki. Errors if the org has zero or multiple wikis without
45
+ * a ref specified.
46
+ */
47
+ export async function resolveWikiRefOrDefault(ctx, wikiRef) {
48
+ if (wikiRef?.trim()) {
49
+ return resolveWikiRef(ctx, wikiRef);
50
+ }
51
+ const wikis = await listWikis(ctx);
52
+ if (wikis.length === 1) {
53
+ return wikis[0];
54
+ }
55
+ if (wikis.length === 0) {
56
+ throw new Error('No wikis found in this organization. Create one first.');
57
+ }
58
+ throw new Error(`Multiple wikis found. Specify which one:\n${wikis.map((w) => ` ${w.slug} (${w.name})`).join('\n')}`);
59
+ }
60
+ // ---------------------------------------------------------------------------
61
+ // REST helpers for wiki-service
62
+ // ---------------------------------------------------------------------------
63
+ // Exported so the binary-file raw-byte download (wiki-files.ts) authenticates
64
+ // the same way as sync/bulk-download — bearer from the client or PRLL_API_KEY.
65
+ export function resolveApiToken(ctx) {
66
+ const token = ctx?.client.getToken()?.trim() || process.env.PRLL_API_KEY?.trim();
67
+ if (!token) {
68
+ throw new Error('API token is required via ctx.client.getToken() or PRLL_API_KEY for wiki operations');
69
+ }
70
+ return token;
71
+ }
72
+ /**
73
+ * Resolve the wiki-service base URL (trailing slashes trimmed): explicit ctx
74
+ * override, then PRLL_WIKI_URL, then PRLL_API_URL. SSOT for the raw-fetch wiki
75
+ * endpoints (sync / bulk-download / binary file download). Hosted/staging/prod
76
+ * collapse these to one gateway host; local dev can split api (:8080) and wiki
77
+ * (:8090). Returns '' when none is set — callers decide whether that's fatal.
78
+ */
79
+ export function resolveWikiServiceBaseUrl(ctx) {
80
+ return (ctx.baseUrl ?? process.env.PRLL_WIKI_URL ?? process.env.PRLL_API_URL ?? '').replace(/\/+$/, '');
81
+ }
82
+ function tryResolveApiToken(ctx) {
83
+ return ctx?.client.getToken()?.trim() || process.env.PRLL_API_KEY?.trim() || undefined;
84
+ }
85
+ export function requireMountToken(mount) {
86
+ if (!mount.token) {
87
+ throw new Error('API token is required for wiki-service operations on a local mount');
88
+ }
89
+ return mount.token;
90
+ }
91
+ export async function wikiServiceFetch(url, token, options = {}) {
92
+ const method = options.method ?? 'GET';
93
+ const headers = {
94
+ Authorization: `Bearer ${token}`,
95
+ 'Content-Type': 'application/json',
96
+ };
97
+ if (process.env.PRLL_SWIMLANE_NAME) {
98
+ headers['X-Prll-Swimlane'] = process.env.PRLL_SWIMLANE_NAME;
99
+ }
100
+ const response = await fetch(url, {
101
+ method,
102
+ headers,
103
+ body: options.body,
104
+ });
105
+ if (!response.ok) {
106
+ const text = await response.text().catch(() => '');
107
+ throw new Error(`wiki-service ${method} ${url}: ${response.status} ${response.statusText}${text ? ` — ${text}` : ''}`);
108
+ }
109
+ return response.json();
110
+ }
111
+ export async function bulkDownloadFiles(bulkDownloadUrl, token, paths) {
112
+ // Batch in chunks to avoid overly large requests
113
+ const BATCH_SIZE = 100;
114
+ const results = [];
115
+ for (let i = 0; i < paths.length; i += BATCH_SIZE) {
116
+ const batch = paths.slice(i, i + BATCH_SIZE);
117
+ const raw = (await wikiServiceFetch(bulkDownloadUrl, token, {
118
+ method: 'POST',
119
+ body: JSON.stringify({ paths: batch }),
120
+ }));
121
+ results.push(...raw.data);
122
+ }
123
+ return results;
124
+ }
125
+ export function computeGitBlobSHA(content) {
126
+ // Manifest SHAs come from Gitea's Git blob object IDs, not raw content hashes.
127
+ // This matches Git's current SHA-1 blob format; if the server ever switches to
128
+ // SHA-256 object IDs, this helper must change in lockstep.
129
+ const header = Buffer.from(`blob ${content.length}\0`, 'utf8');
130
+ return createHash('sha1').update(header).update(content).digest('hex');
131
+ }
132
+ // Exact mirror of the magic signatures where the server's classifier
133
+ // (filetype.IsText → Go http.DetectContentType → isBinaryContentType)
134
+ // rejects content that could still be NUL-free, UTF-8-decodable bytes.
135
+ // Signatures whose match requires NUL or non-UTF-8 bytes (PNG, JPEG, OGG,
136
+ // MIDI, ICO, …) are deliberately omitted — the UTF-8 + NUL checks below
137
+ // already cover them. Keep this table in lockstep with the Go sniffing
138
+ // rules; test/testdata/text-classifier-cases.json is the shared contract
139
+ // both sides verify against.
140
+ const BINARY_MAGIC_PREFIXES = [
141
+ Buffer.from('GIF87a'), // image/gif
142
+ Buffer.from('GIF89a'), // image/gif
143
+ Buffer.from('%PDF-'), // application/pdf
144
+ Buffer.from('BM'), // image/bmp (yes, bare "BM" — Go sniffs it as BMP)
145
+ Buffer.from('ID3'), // audio/mpeg
146
+ Buffer.from([0x50, 0x4b, 0x03, 0x04]), // application/zip
147
+ Buffer.from([0x1f, 0x8b, 0x08]), // application/x-gzip
148
+ ];
149
+ // Container formats Go sniffs via offset-masked signatures: 4-byte container
150
+ // tag at offset 0, format tag at offset 8.
151
+ const BINARY_CONTAINER_SIGS = [
152
+ { head: 'RIFF', at8: 'WAVE' }, // audio/wave
153
+ { head: 'RIFF', at8: 'AVI ' }, // video/avi
154
+ { head: 'RIFF', at8: 'WEBPVP' }, // image/webp
155
+ { head: 'FORM', at8: 'AIFF' }, // audio/aiff
156
+ ];
157
+ const utf8Strict = new TextDecoder('utf-8', { fatal: true });
158
+ /**
159
+ * Mirror of the server's text classifier (filetype.IsText): content-type
160
+ * magic sniff, valid UTF-8, and no NUL bytes — kept aligned so content the
161
+ * CLI accepts cannot bounce off the server's 422 USE_UPLOAD later. The
162
+ * shared fixture table (test/testdata/text-classifier-cases.json) is
163
+ * verified by both this implementation's tests and the Go package's tests.
164
+ */
165
+ export function isWikiTextContent(content) {
166
+ for (const magic of BINARY_MAGIC_PREFIXES) {
167
+ if (content.subarray(0, magic.length).equals(magic)) {
168
+ return false;
169
+ }
170
+ }
171
+ for (const sig of BINARY_CONTAINER_SIGS) {
172
+ if (content.subarray(0, 4).equals(Buffer.from(sig.head)) &&
173
+ content.subarray(8, 8 + sig.at8.length).equals(Buffer.from(sig.at8))) {
174
+ return false;
175
+ }
176
+ }
177
+ if (content.includes(0)) {
178
+ return false;
179
+ }
180
+ try {
181
+ utf8Strict.decode(content);
182
+ }
183
+ catch {
184
+ return false;
185
+ }
186
+ return true;
187
+ }
188
+ export function looksBinary(content) {
189
+ return !isWikiTextContent(content);
190
+ }
191
+ // ---------------------------------------------------------------------------
192
+ // File system helpers
193
+ // ---------------------------------------------------------------------------
194
+ /** Walk all files (not just markdown) under a root, excluding .parall-wiki. */
195
+ export async function walkLocalFiles(root, dir, visitor) {
196
+ const entries = await fs.readdir(dir, { withFileTypes: true });
197
+ for (const entry of entries) {
198
+ if (entry.isDirectory()) {
199
+ if (entry.name === PRLL_WIKI_DIR) {
200
+ continue;
201
+ }
202
+ await walkLocalFiles(root, path.join(dir, entry.name), visitor);
203
+ continue;
204
+ }
205
+ if (!entry.isFile()) {
206
+ continue;
207
+ }
208
+ const fullPath = path.join(dir, entry.name);
209
+ const relativePath = toPosix(path.relative(root, fullPath));
210
+ await visitor(fullPath, relativePath);
211
+ }
212
+ }
213
+ /** Walk only markdown files under a root. */
214
+ export async function walkLocalMarkdownFiles(root, dir, visitor) {
215
+ const entries = await fs.readdir(dir, { withFileTypes: true });
216
+ for (const entry of entries) {
217
+ if (entry.isDirectory()) {
218
+ if (entry.name === PRLL_WIKI_DIR) {
219
+ continue;
220
+ }
221
+ await walkLocalMarkdownFiles(root, path.join(dir, entry.name), visitor);
222
+ continue;
223
+ }
224
+ if (!entry.isFile()) {
225
+ continue;
226
+ }
227
+ const fullPath = path.join(dir, entry.name);
228
+ const relativePath = toPosix(path.relative(root, fullPath));
229
+ if (!isMarkdownFile(relativePath)) {
230
+ continue;
231
+ }
232
+ await visitor(fullPath, relativePath);
233
+ }
234
+ }
235
+ /** Remove files not present in manifest. */
236
+ async function removeFilesNotInManifest(root, manifest) {
237
+ await walkLocalFiles(root, root, async (fullPath, relativePath) => {
238
+ if (!(relativePath in manifest.files)) {
239
+ await fs.rm(fullPath, { force: true });
240
+ await removeEmptyParents(root, path.dirname(fullPath));
241
+ }
242
+ });
243
+ }
244
+ /** Remove empty parent directories up to (but not including) root. */
245
+ export async function removeEmptyParents(root, dir) {
246
+ const absRoot = path.resolve(root);
247
+ let current = path.resolve(dir);
248
+ while (current !== absRoot && current.startsWith(absRoot)) {
249
+ try {
250
+ const entries = await fs.readdir(current);
251
+ if (entries.length > 0)
252
+ break;
253
+ await fs.rmdir(current);
254
+ current = path.dirname(current);
255
+ }
256
+ catch {
257
+ break;
258
+ }
259
+ }
260
+ }
261
+ // ---------------------------------------------------------------------------
262
+ // Mount resolution
263
+ // ---------------------------------------------------------------------------
264
+ export async function resolveLocalWikiMount(ctx, wiki) {
265
+ const mountRoot = ctx.mountRoot ?? process.env.PRLL_WIKI_MOUNT_ROOT;
266
+ let root;
267
+ try {
268
+ root = resolveMountPath(wiki.slug, mountRoot);
269
+ }
270
+ catch {
271
+ return null;
272
+ }
273
+ if (!(await pathExists(root))) {
274
+ return null;
275
+ }
276
+ const baseUrl = resolveWikiServiceBaseUrl(ctx);
277
+ const wikiBase = `${baseUrl}/wiki/v1/orgs/${ctx.orgId}/wikis/${wiki.id}`;
278
+ return {
279
+ root,
280
+ wikiId: wiki.id,
281
+ token: tryResolveApiToken(ctx),
282
+ manifestUrl: `${wikiBase}/manifest`,
283
+ blobUrl: `${wikiBase}/files`,
284
+ bulkDownloadUrl: `${wikiBase}/files/bulk-download`,
285
+ changesetsUrl: `${wikiBase}/changesets`,
286
+ };
287
+ }
288
+ export async function requireLocalWikiMount(ctx, wiki) {
289
+ const mount = await resolveLocalWikiMount(ctx, wiki);
290
+ if (!mount) {
291
+ throw new Error(`wiki ${wiki.slug} has no local workspace yet — run \`parall wiki sync\` to download it ` +
292
+ '(the sync output prints the workspace path)');
293
+ }
294
+ return mount;
295
+ }
296
+ // ---------------------------------------------------------------------------
297
+ // Path & string utilities
298
+ // ---------------------------------------------------------------------------
299
+ export function normalizeRef(ref) {
300
+ const value = ref?.trim();
301
+ return value ? value : undefined;
302
+ }
303
+ export function normalizeWikiPath(value) {
304
+ if (!value) {
305
+ return '';
306
+ }
307
+ const normalized = toPosix(value.trim())
308
+ .replace(/^\.?\//, '')
309
+ .replace(/^\/+/, '');
310
+ return normalized === '.' ? '' : normalized.replace(/\/+$/, '');
311
+ }
312
+ // Exported so the binary-file helpers (wiki-files.ts) normalize repo paths
313
+ // through the exact same rules as every other CLI path entry point.
314
+ export function normalizeRequiredWikiPath(value) {
315
+ const normalized = normalizeWikiPath(value);
316
+ if (!normalized) {
317
+ throw new Error('path is required');
318
+ }
319
+ return normalized;
320
+ }
321
+ export function resolveAgentId(explicit) {
322
+ const value = explicit?.trim() || process.env.PRLL_AGENT_ID?.trim() || process.env.AGENT_ID?.trim();
323
+ return value || undefined;
324
+ }
325
+ export function resolveMountPath(mountPath, mountRoot) {
326
+ const trimmedMountPath = mountPath.trim();
327
+ if (!trimmedMountPath) {
328
+ throw new Error('mount path is required');
329
+ }
330
+ if (mountRoot?.trim()) {
331
+ const absoluteRoot = path.resolve(mountRoot.trim());
332
+ const candidate = path.isAbsolute(trimmedMountPath)
333
+ ? path.resolve(trimmedMountPath)
334
+ : path.resolve(absoluteRoot, trimmedMountPath);
335
+ const relative = path.relative(absoluteRoot, candidate);
336
+ if (!relative ||
337
+ relative === '.' ||
338
+ relative === '..' ||
339
+ relative.startsWith(`..${path.sep}`)) {
340
+ throw new Error(`mount path "${mountPath}" escapes PRLL_WIKI_MOUNT_ROOT`);
341
+ }
342
+ return candidate;
343
+ }
344
+ if (path.isAbsolute(trimmedMountPath)) {
345
+ throw new Error('absolute mount path requires PRLL_WIKI_MOUNT_ROOT');
346
+ }
347
+ return path.resolve(trimmedMountPath);
348
+ }
349
+ export function resolvePathInsideRoot(root, relativePath) {
350
+ const normalized = normalizeWikiPath(relativePath);
351
+ const candidate = path.resolve(root, normalized);
352
+ const relative = path.relative(root, candidate);
353
+ if (relative === '' ||
354
+ relative === '.' ||
355
+ relative === '..' ||
356
+ relative.startsWith(`..${path.sep}`)) {
357
+ throw new Error(`path "${relativePath}" escapes wiki root`);
358
+ }
359
+ return candidate;
360
+ }
361
+ // ACL is now enforced server-side via path_scopes. These helpers are no-ops.
362
+ export function enforceAllowedPrefix(_pathPrefix, _allowedPrefixes) {
363
+ // No-op: server handles ACL via path_scopes.
364
+ }
365
+ export function matchesAllowedPrefix(_filePath, _allowedPrefixes) {
366
+ // Server manifest already filters by ACL — all returned files are readable.
367
+ return true;
368
+ }
369
+ export function isMarkdownFile(filePath) {
370
+ const ext = path.posix.extname(toPosix(filePath)).toLowerCase();
371
+ return ext === '.md' || ext === '.markdown' || ext === '.mdx';
372
+ }
373
+ export function compactWhitespace(value) {
374
+ return value.trim().split(/\s+/).filter(Boolean).join(' ');
375
+ }
376
+ export function truncateSnippet(value, limit) {
377
+ if (value.length <= limit) {
378
+ return value;
379
+ }
380
+ if (limit <= 3) {
381
+ return value.slice(0, limit);
382
+ }
383
+ return `${value.slice(0, limit - 3)}...`;
384
+ }
385
+ export function toPosix(value) {
386
+ return value.split(path.sep).join(path.posix.sep);
387
+ }
388
+ export function normalizeOptionalString(value) {
389
+ const normalized = value?.trim();
390
+ return normalized ? normalized : undefined;
391
+ }
392
+ export async function pathExists(target) {
393
+ try {
394
+ await fs.access(target);
395
+ return true;
396
+ }
397
+ catch {
398
+ return false;
399
+ }
400
+ }
401
+ export function requireAgentId(ctx) {
402
+ const agentId = resolveAgentId(ctx.agentId);
403
+ if (!agentId) {
404
+ throw new Error('wiki write tools require PRLL_AGENT_ID or an explicit agentId');
405
+ }
406
+ return agentId;
407
+ }
@@ -0,0 +1,109 @@
1
+ import { type ParallContext, type SyncConflict, type SyncFailure, type WikiSyncOutcome } from './wiki-shared.js';
2
+ /** Server-side text ceiling for changeset file content (mirrors filetype.TextMaxBytes). */
3
+ export type SyncResult = {
4
+ /** True iff every wiki's per-path action ran without failure. Conflicts do
5
+ * NOT clear this flag — they are an expected, structured outcome the agent
6
+ * is responsible for resolving. Only `failed[]` (download error,
7
+ * shape-conflict, etc.) flips ok to false. */
8
+ ok: boolean;
9
+ mounts: number;
10
+ synced: {
11
+ slug: string;
12
+ path: string;
13
+ applied: number;
14
+ fastForwarded: number;
15
+ conflicts: SyncConflict[];
16
+ failed: SyncFailure[];
17
+ /** Paths where non-overlapping local and upstream edits were merged into the working copy. */
18
+ merged: string[];
19
+ }[];
20
+ };
21
+ /**
22
+ * Sync wiki workspaces via REST (manifest comparison + bulk download).
23
+ * Without `wikiRef`: every accessible wiki is synced and stale mount
24
+ * directories are pruned. With `wikiRef`: only that wiki is synced and
25
+ * pruning is skipped — other wikis' workspaces must survive a scoped sync.
26
+ * Mount path is determined client-side: {mountRoot}/{slug}/
27
+ */
28
+ export declare function syncAllMounts(ctx: ParallContext, wikiRef?: string): Promise<SyncResult>;
29
+ /**
30
+ * Run {@link syncAllMounts} in a loop, sleeping `intervalSec` between
31
+ * iterations. Returns a `stop` callback to break the loop.
32
+ */
33
+ export declare function watchMounts(ctx: ParallContext, intervalSec: number): {
34
+ stop: () => void;
35
+ };
36
+ /**
37
+ * Sync a single wiki:
38
+ * 1. Fetch server manifest (file listing with SHAs)
39
+ * 2. Compare with local manifest
40
+ * 3. Download new/modified files via bulk download
41
+ * 4. Delete removed files
42
+ * 5. Save updated local manifest
43
+ */
44
+ /** Per-path sync action computed by three-way comparison. */
45
+ export type SyncAction = {
46
+ kind: 'noop';
47
+ path: string;
48
+ } | {
49
+ kind: 'apply-write';
50
+ path: string;
51
+ remoteSha: string;
52
+ remoteSize: number;
53
+ } | {
54
+ kind: 'apply-delete';
55
+ path: string;
56
+ } | {
57
+ kind: 'fast-forward';
58
+ path: string;
59
+ remoteSha: string;
60
+ remoteSize: number;
61
+ } | {
62
+ kind: 'fast-forward-delete';
63
+ path: string;
64
+ } | {
65
+ kind: 'conflict-write';
66
+ path: string;
67
+ remoteSha: string;
68
+ remoteSize: number;
69
+ baseSha: string | null;
70
+ localSha: string | null;
71
+ } | {
72
+ kind: 'conflict-delete';
73
+ path: string;
74
+ baseSha: string;
75
+ };
76
+ /**
77
+ * Pure three-way sync planner. Decides what to do per-path given the base
78
+ * (manifest entry from last successful sync), the current local working tree
79
+ * sha, and the latest remote sha. No I/O.
80
+ */
81
+ export declare function planSyncActions(input: {
82
+ paths: Iterable<string>;
83
+ baseSha: (path: string) => string | null;
84
+ localSha: (path: string) => string | null;
85
+ remote: (path: string) => {
86
+ sha: string;
87
+ size: number;
88
+ } | null;
89
+ }): SyncAction[];
90
+ export declare function syncSingleWiki(ctx: ParallContext, wiki: import('@parall/sdk').Wiki, mountPath: string): Promise<WikiSyncOutcome>;
91
+ /**
92
+ * Write a sync conflict marker under .parall-wiki/conflicts/, mirroring the
93
+ * source path so the agent (or user) can locate the upstream copy next to the
94
+ * local edit. Returns the absolute path written.
95
+ */
96
+ export declare function writeConflictMarker(mountRoot: string, sourcePath: string, suffix: string, content: Buffer): Promise<string>;
97
+ /**
98
+ * Drop every conflict artifact sync may have left for `sourcePath` (`.mine`,
99
+ * `.remote`, and the legacy `.remote-deleted` marker), pruning empty conflict
100
+ * directories on the way up. Idempotent; missing files are fine.
101
+ *
102
+ * The suffix layout is not injective: a wiki directory literally named
103
+ * `a.mine/` mirrors to `conflicts/a.mine/`, the same location `a`'s `.mine`
104
+ * artifact would take. Cleanup therefore only ever removes a regular file —
105
+ * a directory at an artifact location belongs to someone else's paths and is
106
+ * left alone.
107
+ */
108
+ export declare function removeConflictArtifacts(mountRoot: string, sourcePath: string): Promise<void>;
109
+ //# sourceMappingURL=wiki-sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wiki-sync.d.ts","sourceRoot":"","sources":["../../src/lib/wiki-sync.ts"],"names":[],"mappings":"AAQA,OAAO,EAKL,KAAK,aAAa,EAElB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,eAAe,EAerB,MAAM,kBAAkB,CAAC;AAqB1B,2FAA2F;AAK3F,MAAM,MAAM,UAAU,GAAG;IACvB;;;kDAG8C;IAC9C,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE;Q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