@madarco/agentbox 0.5.0 → 0.7.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.
Files changed (62) hide show
  1. package/dist/_cloud-attach-DMVH6GWO.js +12 -0
  2. package/dist/chunk-7KOEFGN2.js +1162 -0
  3. package/dist/chunk-7KOEFGN2.js.map +1 -0
  4. package/dist/chunk-I24B6AXR.js +600 -0
  5. package/dist/chunk-I24B6AXR.js.map +1 -0
  6. package/dist/chunk-NAVL4R34.js +7546 -0
  7. package/dist/chunk-NAVL4R34.js.map +1 -0
  8. package/dist/chunk-NW5NYTQM.js +1366 -0
  9. package/dist/chunk-NW5NYTQM.js.map +1 -0
  10. package/dist/chunk-UK72UQ5U.js +237 -0
  11. package/dist/chunk-UK72UQ5U.js.map +1 -0
  12. package/dist/chunk-V5KZGB5V.js +722 -0
  13. package/dist/chunk-V5KZGB5V.js.map +1 -0
  14. package/dist/cloud-poller-ZIWSADJB-JXFRJUEM.js +10 -0
  15. package/dist/dist-ETCFRVPA.js +423 -0
  16. package/dist/dist-QZGJIBT5.js +1339 -0
  17. package/dist/dist-QZGJIBT5.js.map +1 -0
  18. package/dist/dist-R67WMLCF.js +183 -0
  19. package/dist/dist-R67WMLCF.js.map +1 -0
  20. package/dist/index.js +4088 -1451
  21. package/dist/index.js.map +1 -1
  22. package/package.json +9 -4
  23. package/runtime/docker/Dockerfile.box +115 -19
  24. package/runtime/docker/apps/cli/share/agentbox-setup/SKILL.md +34 -19
  25. package/runtime/docker/packages/ctl/dist/bin.cjs +10246 -758
  26. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-checkpoint-cleanup +13 -3
  27. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-codex-hooks.json +37 -0
  28. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-dockerd-start +87 -7
  29. package/runtime/docker/packages/sandbox-docker/scripts/agentbox-open +28 -0
  30. package/runtime/docker/packages/sandbox-docker/scripts/custom-system-CLAUDE.md +4 -9
  31. package/runtime/hetzner/agentbox-checkpoint-cleanup +52 -0
  32. package/runtime/hetzner/agentbox-codex-hooks.json +37 -0
  33. package/runtime/hetzner/agentbox-dockerd-start +132 -0
  34. package/runtime/hetzner/agentbox-open +28 -0
  35. package/runtime/hetzner/agentbox-setup-skill.md +196 -0
  36. package/runtime/hetzner/agentbox-vnc-start +77 -0
  37. package/runtime/hetzner/claude-managed-settings.json +54 -0
  38. package/runtime/hetzner/ctl.cjs +22350 -0
  39. package/runtime/hetzner/custom-system-CLAUDE.md +27 -0
  40. package/runtime/hetzner/scripts/install-box.sh +365 -0
  41. package/runtime/relay/bin.cjs +9182 -754
  42. package/share/agentbox-setup/SKILL.md +34 -19
  43. package/dist/chunk-6VTAPD4H.js +0 -507
  44. package/dist/chunk-6VTAPD4H.js.map +0 -1
  45. package/dist/chunk-7J5AJLWG.js +0 -238
  46. package/dist/chunk-7J5AJLWG.js.map +0 -1
  47. package/dist/chunk-FJNIFTWK.js +0 -523
  48. package/dist/chunk-FJNIFTWK.js.map +0 -1
  49. package/dist/chunk-HPZMD5DE.js +0 -106
  50. package/dist/chunk-HPZMD5DE.js.map +0 -1
  51. package/dist/chunk-PXUBE5KS.js +0 -2346
  52. package/dist/chunk-PXUBE5KS.js.map +0 -1
  53. package/dist/chunk-RFC5F5HR.js +0 -1709
  54. package/dist/chunk-RFC5F5HR.js.map +0 -1
  55. package/dist/create-AHZ3GVEZ-TGEDL7UX.js +0 -15
  56. package/dist/lifecycle-LFOL6YFM-TCHDX3J5.js +0 -38
  57. package/dist/state-KD7M46ZP-KHFTHFUS.js +0 -26
  58. package/dist/stats-Z4BVJODD-HEC4TMUZ.js +0 -19
  59. package/dist/stats-Z4BVJODD-HEC4TMUZ.js.map +0 -1
  60. /package/dist/{create-AHZ3GVEZ-TGEDL7UX.js.map → _cloud-attach-DMVH6GWO.js.map} +0 -0
  61. /package/dist/{lifecycle-LFOL6YFM-TCHDX3J5.js.map → cloud-poller-ZIWSADJB-JXFRJUEM.js.map} +0 -0
  62. /package/dist/{state-KD7M46ZP-KHFTHFUS.js.map → dist-ETCFRVPA.js.map} +0 -0
@@ -1,106 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- // ../../packages/sandbox-docker/dist/chunk-JHUIWLIF.js
4
- import { mkdir, readFile, writeFile } from "fs/promises";
5
- import { homedir } from "os";
6
- import { dirname, join } from "path";
7
- var STATE_DIR = join(homedir(), ".agentbox");
8
- var STATE_FILE = join(STATE_DIR, "state.json");
9
- var EMPTY = { version: 1, boxes: [] };
10
- async function readState(path = STATE_FILE) {
11
- try {
12
- const raw = await readFile(path, "utf8");
13
- const parsed = JSON.parse(raw);
14
- if (parsed.version !== 1 || !Array.isArray(parsed.boxes)) {
15
- throw new Error(`unrecognized state file shape at ${path}`);
16
- }
17
- return parsed;
18
- } catch (err) {
19
- if (err.code === "ENOENT") {
20
- return { ...EMPTY };
21
- }
22
- throw err;
23
- }
24
- }
25
- async function writeState(state, path = STATE_FILE) {
26
- await mkdir(dirname(path), { recursive: true });
27
- await writeFile(path, JSON.stringify(state, null, 2) + "\n", "utf8");
28
- }
29
- async function recordBox(box, path = STATE_FILE) {
30
- const state = await readState(path);
31
- const next = {
32
- version: 1,
33
- boxes: [...state.boxes.filter((b) => b.id !== box.id), box]
34
- };
35
- await writeState(next, path);
36
- }
37
- async function removeBoxRecord(id, path = STATE_FILE) {
38
- const state = await readState(path);
39
- const before = state.boxes.length;
40
- const next = {
41
- version: 1,
42
- boxes: state.boxes.filter((b) => b.id !== id)
43
- };
44
- if (next.boxes.length === before) return false;
45
- await writeState(next, path);
46
- return true;
47
- }
48
- function findBox(idOrName, state) {
49
- const q = idOrName.trim();
50
- if (q.length === 0) return { kind: "none" };
51
- const exactId = state.boxes.find((b) => b.id === q);
52
- if (exactId) return { kind: "ok", box: exactId };
53
- const prefixMatches = state.boxes.filter((b) => b.id.startsWith(q));
54
- if (prefixMatches.length === 1) return { kind: "ok", box: prefixMatches[0] };
55
- if (prefixMatches.length > 1) return { kind: "ambiguous", matches: prefixMatches };
56
- const byName = state.boxes.find((b) => b.name === q);
57
- if (byName) return { kind: "ok", box: byName };
58
- const byContainer = state.boxes.find((b) => b.container === q);
59
- if (byContainer) return { kind: "ok", box: byContainer };
60
- return { kind: "none" };
61
- }
62
- function allocateProjectIndex(state, projectRoot) {
63
- let max = 0;
64
- for (const b of state.boxes) {
65
- if (b.projectRoot !== projectRoot) continue;
66
- if (typeof b.projectIndex === "number" && b.projectIndex > max) {
67
- max = b.projectIndex;
68
- }
69
- }
70
- return max + 1;
71
- }
72
- function autoPickProjectBox(state, projectRoot) {
73
- const matches = state.boxes.filter((b) => b.projectRoot === projectRoot);
74
- if (matches.length === 0) return { kind: "none" };
75
- if (matches.length === 1) return { kind: "ok", box: matches[0] };
76
- return { kind: "ambiguous", matches };
77
- }
78
- function resolveBoxRef(ref, state, projectRoot) {
79
- if (ref === void 0) {
80
- if (projectRoot === void 0) return { kind: "none" };
81
- return autoPickProjectBox(state, projectRoot);
82
- }
83
- const trimmed = ref.trim();
84
- if (projectRoot !== void 0 && /^[1-9][0-9]*$/.test(trimmed)) {
85
- const idx = Number.parseInt(trimmed, 10);
86
- const hit = state.boxes.find(
87
- (b) => b.projectRoot === projectRoot && b.projectIndex === idx
88
- );
89
- return hit ? { kind: "ok", box: hit } : { kind: "none" };
90
- }
91
- return findBox(trimmed, state);
92
- }
93
-
94
- export {
95
- STATE_DIR,
96
- STATE_FILE,
97
- readState,
98
- writeState,
99
- recordBox,
100
- removeBoxRecord,
101
- findBox,
102
- allocateProjectIndex,
103
- autoPickProjectBox,
104
- resolveBoxRef
105
- };
106
- //# sourceMappingURL=chunk-HPZMD5DE.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../packages/sandbox-docker/src/state.ts"],"sourcesContent":["import { mkdir, readFile, writeFile } from 'node:fs/promises';\nimport { homedir } from 'node:os';\nimport { dirname, join } from 'node:path';\n\nexport const STATE_DIR = join(homedir(), '.agentbox');\nexport const STATE_FILE = join(STATE_DIR, 'state.json');\n\nexport interface BoxRecord {\n id: string;\n name: string;\n container: string;\n /**\n * The image the box was started from. For plain boxes this is\n * `agentbox/box:dev` (the base image); for boxes started from a checkpoint\n * it's the checkpoint image tag (and `checkpointImage` mirrors it). Used by\n * `inspect`, by `prune --all` to know which checkpoint images are still in\n * use, and by `agentbox self-update` to know which image to wipe.\n */\n image: string;\n workspacePath: string;\n /**\n * Optional per-box scratch dir holding a `cp -c` APFS clone of the host\n * workspace, made at create time when `--host-snapshot` is on. The clone is\n * the source of the tar pipe into the container's `/workspace`; absent when\n * the option wasn't used. Removed on `destroyBox` (the named-volume model is\n * gone, so this is the only host-side scratch left).\n */\n snapshotDir?: string | null;\n /**\n * Host-side path to the agentbox-ctl unix socket bind-mounted into the\n * container at /run/agentbox/ctl.sock. Absent for boxes created before this\n * field existed (treated as \"ctl not available\").\n */\n socketPath?: string;\n /**\n * Docker volume mounted at /home/vscode/.claude inside the box. The default\n * shared volume (`agentbox-claude-config`) is reused across boxes; isolated\n * boxes get a per-box volume suffixed with the box id. Absent for boxes\n * created before this field existed.\n */\n claudeConfigVolume?: string;\n /**\n * Per-box volume holding `.vscode-server` (server binary + TS cache).\n * The shared `agentbox-vscode-extensions` volume layers over the `extensions`\n * subdir at run time and isn't recorded here (never auto-removed). Absent\n * for boxes created before this field existed.\n */\n vscodeServerVolume?: string;\n /**\n * Per-box volume holding `.cursor-server` (Cursor server binary + state).\n * Parallel to `vscodeServerVolume`. Absent for boxes created before this\n * field existed — lifecycle code falls back to deriving from `id`.\n */\n cursorServerVolume?: string;\n /**\n * Bearer token the in-box supervisor uses to authenticate with the host\n * relay. Generated at create time and forwarded as AGENTBOX_RELAY_TOKEN.\n * Absent for boxes created before the relay existed — those boxes simply\n * skip outbound push.\n */\n relayToken?: string;\n /**\n * Per-box git worktrees created inside the container against the bind-mounted\n * main `.git/` (`git worktree add -b agentbox/<name> /workspace HEAD` from\n * `seedWorkspace`). Empty/absent when the host workspace is not a git\n * checkout. The root entry (kind: 'root') is the worktree at /workspace;\n * nested entries (kind: 'nested', from monorepo 1st-level `.git` dirs) live\n * at /workspace/<relPathFromWorkspace>. The host has no per-box worktree\n * dir under ~/.agentbox/boxes/<id>/worktrees/ — `git push` runs in the\n * shared host main repo against `branch` (the relay's git RPC).\n */\n gitWorktrees?: GitWorktreeRecord[];\n /**\n * True when the box was created with --with-playwright. The install happens\n * once at create time (npm install -g @playwright/cli@latest inside the\n * container); we record the choice for `agentbox inspect` visibility. Absent\n * on boxes created before this field existed (treated as false).\n */\n withPlaywright?: boolean;\n /**\n * True when the box was created with --with-env. The host's env/config files\n * (DEFAULT_ENV_PATTERNS) were copied into /workspace once at create time,\n * bypassing gitignore; recorded for `agentbox inspect` visibility. Absent on\n * boxes created before this field existed (treated as false).\n */\n withEnv?: boolean;\n /**\n * VNC stack (Xvnc + websockify + noVNC) is enabled for this box. Absent on\n * boxes created before VNC support landed → treated as disabled.\n */\n vncEnabled?: boolean;\n /** Container-side noVNC web port. Fixed to 6080 today; here for future-proofing. */\n vncContainerPort?: number;\n /** Random host port Docker assigned to the noVNC web server (resolved via `docker port`). */\n vncHostPort?: number;\n /** Per-box password baked into Xvnc's PasswordFile and embedded in the auto-connect URL. */\n vncPassword?: string;\n /**\n * Container port reserved for the web service `expose:` forward. Fixed to 80\n * today; the `-p` mapping is created unconditionally at `create`. Absent on\n * boxes created before web-port reservation landed → no web endpoint until\n * the box is recreated.\n */\n webContainerPort?: number;\n /** Random host port Docker assigned to container :80 (resolved via `docker port`). */\n webHostPort?: number;\n /**\n * Volume mounted at /var/lib/docker for the in-box dockerd. Per-box\n * (`agentbox-docker-<id>`) by default; the shared `agentbox-docker-cache`\n * volume when `dockerCacheShared` is true. Absent on boxes created before\n * DinD landed — those boxes have no in-box dockerd at all.\n */\n dockerVolume?: string;\n /**\n * True when this box's `dockerVolume` is the shared cache. Tells `destroyBox`\n * to skip removal (the shared volume holds image layers other boxes may\n * reuse) and `pruneBoxes --all` to allowlist it.\n */\n dockerCacheShared?: boolean;\n /**\n * Absolute host path of the project this box belongs to. Set by `createBox`\n * from the CLI-supplied `findProjectRoot(workspacePath)` (nearest ancestor\n * dir holding `agentbox.yaml`, else workspacePath itself). Used by\n * `resolveBoxRef` + `autoPickProjectBox` to scope numeric refs and auto-pick\n * to the cwd's project. Absent on boxes created before this field existed —\n * those boxes are never auto-picked or matched by numeric index.\n */\n projectRoot?: string;\n /**\n * Monotonic 1-based index within `projectRoot`. Allocated once at create via\n * `allocateProjectIndex` and never recycled — destroying box #2 leaves a gap\n * (next new box is #3, not #2). Lets `agentbox open 3` mean the same box for\n * that box's whole lifetime.\n */\n projectIndex?: number;\n /**\n * The checkpoint image tag this box was started from (when `--snapshot <ref>`\n * resolved to a checkpoint). Mirrors `image`. Absent on plain boxes. Used by\n * `prune --all` to know which `agentbox-ckpt-*` image tags are still in use\n * by a live box, and by `inspect`/`status` for lineage display.\n */\n checkpointImage?: string;\n /**\n * Lineage of the checkpoint this box was started from. Drives chain-depth\n * (auto-flatten threshold) and `agentbox inspect`. Absent when the box was\n * not created from a checkpoint. `chain` is base-most last; for a flattened\n * checkpoint it's a single entry.\n */\n checkpointSource?: {\n ref: string;\n type: 'layered' | 'flattened';\n /** Checkpoint refs composing the chain, base-most last. */\n chain: string[];\n };\n /**\n * Resource ceilings actually applied at `docker run` (bytes/fractional/count;\n * the `disk` string only present when the engine's storage driver enforces\n * it — dropped + warned on overlay2/macOS). Absent on legacy boxes → treated\n * as unlimited. Surfaced by `agentbox inspect` and cross-checked by\n * `boxResourceStats`.\n */\n resourceLimits?: {\n memoryBytes?: number;\n cpus?: number;\n pidsLimit?: number;\n disk?: string;\n };\n createdAt: string; // ISO-8601\n}\n\nexport interface GitWorktreeRecord {\n kind: 'root' | 'nested';\n /** Host path to the main repo whose `.git/` is bind-mounted RW at the identical path inside the container. */\n hostMainRepo: string;\n /**\n * Agent-visible container path of the worktree (`/workspace` for root,\n * `/workspace/<sub>` for nested). After `seedWorkspace` runs this is a\n * symlink to `gitWorktreePath`.\n */\n containerPath: string;\n /**\n * Per-box unique path where git registered the worktree\n * (`/home/vscode/.agentbox-worktrees/<fsSafeBranch>`). Load-bearing: the\n * host main repo's worktree registry is keyed by absolute path, so multiple\n * concurrent boxes in the same project must register at *different* paths\n * even though they all expose `/workspace` to the agent. `destroyBox` uses\n * this path to deregister the worktree on the host.\n */\n gitWorktreePath: string;\n /** Branch the worktree was created on, e.g. `agentbox/<box-name>`. The relay's `git.push`/`git.fetch` runs against this branch in the shared host `.git`. */\n branch: string;\n /** Workspace-relative path the repo was found at (empty string for root). */\n relPathFromWorkspace: string;\n}\n\nexport interface StateFile {\n version: 1;\n boxes: BoxRecord[];\n}\n\nconst EMPTY: StateFile = { version: 1, boxes: [] };\n\nexport async function readState(path: string = STATE_FILE): Promise<StateFile> {\n try {\n const raw = await readFile(path, 'utf8');\n const parsed = JSON.parse(raw) as StateFile;\n if (parsed.version !== 1 || !Array.isArray(parsed.boxes)) {\n throw new Error(`unrecognized state file shape at ${path}`);\n }\n return parsed;\n } catch (err) {\n if ((err as NodeJS.ErrnoException).code === 'ENOENT') {\n return { ...EMPTY };\n }\n throw err;\n }\n}\n\nexport async function writeState(state: StateFile, path: string = STATE_FILE): Promise<void> {\n await mkdir(dirname(path), { recursive: true });\n await writeFile(path, JSON.stringify(state, null, 2) + '\\n', 'utf8');\n}\n\nexport async function recordBox(box: BoxRecord, path: string = STATE_FILE): Promise<void> {\n const state = await readState(path);\n const next: StateFile = {\n version: 1,\n boxes: [...state.boxes.filter((b) => b.id !== box.id), box],\n };\n await writeState(next, path);\n}\n\nexport async function removeBoxRecord(id: string, path: string = STATE_FILE): Promise<boolean> {\n const state = await readState(path);\n const before = state.boxes.length;\n const next: StateFile = {\n version: 1,\n boxes: state.boxes.filter((b) => b.id !== id),\n };\n if (next.boxes.length === before) return false;\n await writeState(next, path);\n return true;\n}\n\nexport type FindBoxResult =\n | { kind: 'ok'; box: BoxRecord }\n | { kind: 'none' }\n | { kind: 'ambiguous'; matches: BoxRecord[] };\n\n/**\n * Resolve a user-supplied identifier against the state file. Matching\n * precedence mirrors `docker`'s container reference resolution:\n *\n * 1. exact id\n * 2. unique id prefix\n * 3. exact name\n * 4. exact container name\n *\n * Returns `'ambiguous'` if step 2 finds more than one match (steps 1, 3, 4\n * are exact-match so they cannot be ambiguous on their own).\n */\nexport function findBox(idOrName: string, state: StateFile): FindBoxResult {\n const q = idOrName.trim();\n if (q.length === 0) return { kind: 'none' };\n\n const exactId = state.boxes.find((b) => b.id === q);\n if (exactId) return { kind: 'ok', box: exactId };\n\n const prefixMatches = state.boxes.filter((b) => b.id.startsWith(q));\n if (prefixMatches.length === 1) return { kind: 'ok', box: prefixMatches[0]! };\n if (prefixMatches.length > 1) return { kind: 'ambiguous', matches: prefixMatches };\n\n const byName = state.boxes.find((b) => b.name === q);\n if (byName) return { kind: 'ok', box: byName };\n\n const byContainer = state.boxes.find((b) => b.container === q);\n if (byContainer) return { kind: 'ok', box: byContainer };\n\n return { kind: 'none' };\n}\n\n/**\n * Next monotonic 1-based index for the given project. Reads only `state.boxes`\n * — caller is responsible for persisting the assignment. Boxes without\n * `projectRoot` are ignored (legacy records); boxes in *other* projects are\n * also ignored. Indices are never recycled, so a destroyed #2 leaves a gap.\n */\nexport function allocateProjectIndex(state: StateFile, projectRoot: string): number {\n let max = 0;\n for (const b of state.boxes) {\n if (b.projectRoot !== projectRoot) continue;\n if (typeof b.projectIndex === 'number' && b.projectIndex > max) {\n max = b.projectIndex;\n }\n }\n return max + 1;\n}\n\n/**\n * Auto-pick when a command's `[box]` argument is omitted. Returns the unique\n * box for `projectRoot`, an `ambiguous` carrying all candidates so the CLI can\n * print a chooser, or `none`.\n */\nexport function autoPickProjectBox(state: StateFile, projectRoot: string): FindBoxResult {\n const matches = state.boxes.filter((b) => b.projectRoot === projectRoot);\n if (matches.length === 0) return { kind: 'none' };\n if (matches.length === 1) return { kind: 'ok', box: matches[0]! };\n return { kind: 'ambiguous', matches };\n}\n\n/**\n * Top-level resolver every CLI command goes through. Combines numeric-index\n * lookup with the legacy `findBox` matcher:\n *\n * - `ref === undefined` and `projectRoot` known → autoPickProjectBox.\n * - `ref` is a pure positive integer and `projectRoot` known → resolve as\n * project index. **Never** falls through to `findBox` on miss, so\n * `agentbox open 3` is reserved for the index and won't accidentally\n * match a hex id like `3abc…`.\n * - Otherwise → `findBox` (id → prefix → name → container).\n */\nexport function resolveBoxRef(\n ref: string | undefined,\n state: StateFile,\n projectRoot: string | undefined,\n): FindBoxResult {\n if (ref === undefined) {\n if (projectRoot === undefined) return { kind: 'none' };\n return autoPickProjectBox(state, projectRoot);\n }\n const trimmed = ref.trim();\n if (projectRoot !== undefined && /^[1-9][0-9]*$/.test(trimmed)) {\n const idx = Number.parseInt(trimmed, 10);\n const hit = state.boxes.find(\n (b) => b.projectRoot === projectRoot && b.projectIndex === idx,\n );\n return hit ? { kind: 'ok', box: hit } : { kind: 'none' };\n }\n return findBox(trimmed, state);\n}\n"],"mappings":";;;AAAA,SAAS,OAAO,UAAU,iBAAiB;AAC3C,SAAS,eAAe;AACxB,SAAS,SAAS,YAAY;AAEvB,IAAM,YAAY,KAAK,QAAQ,GAAG,WAAW;AAC7C,IAAM,aAAa,KAAK,WAAW,YAAY;AAmMtD,IAAM,QAAmB,EAAE,SAAS,GAAG,OAAO,CAAC,EAAE;AAEjD,eAAsB,UAAU,OAAe,YAAgC;AAC7E,MAAI;AACF,UAAM,MAAM,MAAM,SAAS,MAAM,MAAM;AACvC,UAAM,SAAS,KAAK,MAAM,GAAG;AAC7B,QAAI,OAAO,YAAY,KAAK,CAAC,MAAM,QAAQ,OAAO,KAAK,GAAG;AACxD,YAAM,IAAI,MAAM,oCAAoC,IAAI,EAAE;IAC5D;AACA,WAAO;EACT,SAAS,KAAK;AACZ,QAAK,IAA8B,SAAS,UAAU;AACpD,aAAO,EAAE,GAAG,MAAM;IACpB;AACA,UAAM;EACR;AACF;AAEA,eAAsB,WAAW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