{"version":29,"agent":"pinch","message":"Client: abso issue N --save-attachments <dir> saves each attachment on an issue and its comments once (an SVG's own file beside its drawing), outside the abso folder unless the place is ignored; MCP confines the folder like attach. abso export now stamps its folder with .abso-export, one line of JSON in a file with no extension, so the exported project's own formatter and linter pass it by; a folder stamped .abso-export.json or .avcs-export.json still counts as an export.","time":1791540340754,"timeIso":"2026-10-09T10:05:40.754Z","changes":12,"change":361,"files":["client/README.md","client/src/api.ts","client/src/export.ts","client/src/issues.ts","client/src/main.ts","client/src/mcp.ts","client/test/attach.test.ts","client/test/client.test.ts"],"draft":null,"diff":[{"path":"client/README.md","added":4,"removed":3,"diff":"--- a/client/README.md\n+++ b/client/README.md\n@@ -152,9 +152,10 @@\n same text, so the tools and the command line can't drift apart. `json: true` on\n a call answers with the command's JSON instead. The folder and the token come from\n where the server runs, as for the command line; `folder` on a call points it at\n-an abso folder inside that one. A call's `folder`, and the files the `issue`\n-tool's `attach` names, must be in the folder the server started in or below it:\n-anything outside is refused. Add it to Claude Code with:\n+an abso folder inside that one. A call's `folder`, the files the `issue`\n+tool's `attach` and `clean` name, and the folder its `save-attachments` writes\n+to, must be in the folder the server started in or below it: anything outside is\n+refused. Add it to Claude Code with:\n \n ```\n claude mcp add abso -- node <repo>/client/abso.ts mcp"},{"path":"client/src/api.ts","added":23,"removed":0,"diff":"--- a/client/src/api.ts\n+++ b/client/src/api.ts\n@@ -517,6 +517,29 @@\n \t\treturn this.url(`/attachments/${id}`, this.issuesServer);\n \t}\n \n+\t/** An attachment's bytes, or with `source` the svg it was drawn from; refused past `max` bytes. */\n+\tasync attachmentBytes(id: string, source: boolean, max: number): Promise<Uint8Array> {\n+\t\tif (this.issuesServer === undefined)\n+\t\t\tthrow new ApiError(`${this.config.server} has no Issues Worker beside it; ABSO_ISSUES_SERVER names one`);\n+\t\tconst url = `${this.attachmentUrl(id)}${source ? \"/source\" : \"\"}`;\n+\t\tlet res: Response;\n+\t\ttry {\n+\t\t\tres = await fetch(url, {\n+\t\t\t\theaders: this.headers(),\n+\t\t\t\tsignal: AbortSignal.timeout(Math.max(this.timeoutMs, 120_000)),\n+\t\t\t});\n+\t\t} catch (err) {\n+\t\t\tconst e = err as Error;\n+\t\t\tthrow new ApiError(\n+\t\t\t\t`could not reach ${this.issuesServer}: ${(e.cause as Error | undefined)?.message ?? e.message}`,\n+\t\t\t);\n+\t\t}\n+\t\tif (!res.ok) throw new ApiError(`${url} answered ${res.status}: ${errorSentence(await res.text())}`, res.status);\n+\t\tconst bytes = new Uint8Array(await res.arrayBuffer());\n+\t\tif (bytes.length > max) throw new ApiError(`${url} sent ${bytes.length} bytes, more than an attachment may be`);\n+\t\treturn bytes;\n+\t}\n+\n \t/** An edit (abso issue 3): it tells the issue's watchers, and `also`, unless `notify` is false. null clears a parent or Agent. */\n \tissueEdit(\n \t\tid: number,"},{"path":"client/src/export.ts","added":10,"removed":9,"diff":"--- a/client/src/export.ts\n+++ b/client/src/export.ts\n@@ -1,8 +1,10 @@\n // abso export <dir> [--version N]: one published version of this folder's\n // space, written to a folder of its own, for a build that doesn't move while\n-// shared does (#37, Playtester 1). The folder gets .abso-export.json (.avcs-export.json before the rename) naming\n-// the version, to stamp the build with. Exporting again replaces the folder,\n-// keeping node_modules (and what --keep names) so a build needs no new install.\n+// shared does (#37, Playtester 1). The folder gets .abso-export naming the\n+// version, to stamp the build with: JSON on one line, in a file with no\n+// extension, so the exported project's own formatter and linter pass it by.\n+// Exporting again replaces the folder, keeping node_modules (and what --keep\n+// names) so a build needs no new install.\n //\n // The version is rebuilt as `abso run --at` rebuilds it (at.ts), from the\n // known copies and one compare; the server's listing of that version (#37,\n@@ -19,9 +21,9 @@\n import { type Refused, unsafePath } from \"./safety.ts\";\n \n /** The file an export leaves in its folder: what it holds, and the sign that the folder is one export may replace. */\n-export const EXPORT_STAMP = \".abso-export.json\";\n-/** The name before the rename: an export made then still counts as one. */\n-const OLD_EXPORT_STAMP = \".avcs-export.json\";\n+export const EXPORT_STAMP = \".abso-export\";\n+/** Its earlier names: an export made then still counts as one. A .json name drew the project's formatter. */\n+const OLD_EXPORT_STAMPS = [\".abso-export.json\", \".avcs-export.json\"];\n \n /** Where an export may go: outside the abso folder, or in a part of it abso leaves out. Empty, or an earlier export. */\n function checkTarget(root: string, target: string): void {\n@@ -38,8 +40,7 @@\n \tif (!statSync(target).isDirectory()) throw new UsageError(`${target} is a file; export to a folder`);\n \tif (\n \t\treaddirSync(target).length > 0 &&\n-\t\t!existsSync(join(target, EXPORT_STAMP)) &&\n-\t\t!existsSync(join(target, OLD_EXPORT_STAMP))\n+\t\t![EXPORT_STAMP, ...OLD_EXPORT_STAMPS].some((n) => existsSync(join(target, n)))\n \t) {\n \t\tthrow new UsageError(\n \t\t\t`${target} has files in it; export to an empty folder (an export replaces only a folder an earlier export made)`,\n@@ -137,7 +138,7 @@\n \t\tfiles: written,\n \t\texportedAt: new Date().toISOString(),\n \t};\n-\twriteFileSync(join(target, EXPORT_STAMP), `${JSON.stringify(stamp, null, 2)}\\n`);\n+\twriteFileSync(join(target, EXPORT_STAMP), `${JSON.stringify(stamp)}\\n`);\n \treturn {\n \t\ttext: [\n \t\t\t`Exported version ${version} of ${space} to ${target}: ${plural(written, \"file\")}. ${EXPORT_STAMP} there names the version; abso export to the same folder replaces it.`,"},{"path":"client/src/issues.ts","added":68,"removed":6,"diff":"--- a/client/src/issues.ts\n+++ b/client/src/issues.ts\n@@ -5,8 +5,8 @@\n // In review, and publish --done closes it. Other agents' and people's words\n // are quoted as JSON, so none can print as another line (#30).\n \n-import { readFileSync, statSync } from \"node:fs\";\n-import { basename, resolve } from \"node:path\";\n+import { mkdirSync, readFileSync, statSync, writeFileSync } from \"node:fs\";\n+import { basename, join, resolve } from \"node:path\";\n import {\n \ttype Api,\n \tApiError,\n@@ -25,13 +25,15 @@\n import { type Config, readMachineServers, trustedServers } from \"./config.ts\";\n import { issuesServerFor, tokenGoesTo } from \"./core.ts\";\n import { fromEnv } from \"./env-names.ts\";\n+import { ignoredHere } from \"./fetch.ts\";\n+import { loadIgnore, relativeTo } from \"./folder.ts\";\n import { seenText, shortWhen } from \"./times.ts\";\n \n const q = (s: string): string => JSON.stringify(s);\n \n /** The folder, with its Api pointed at the Issues Worker: the token goes only where tokenGoesTo allows, as for the avcs server. */\n-function openIssues(env: Env): { config: Config; api: Api } {\n-\tconst { config, api } = open(env);\n+function openIssues(env: Env): { root: string; config: Config; api: Api } {\n+\tconst { root, config, api } = open(env);\n \tconst server = fromEnv(env.env, \"ISSUES_SERVER\") || issuesServerFor(config.server, readMachineServers(env.env));\n \tif (server === undefined)\n \t\tthrow new UsageError(\n@@ -43,7 +45,7 @@\n \t\t);\n \t}\n \tapi.issuesServer = server;\n-\treturn { config, api };\n+\treturn { root, config, api };\n }\n \n function issueNumber(word: string | undefined, what = \"an issue number\"): number {\n@@ -172,6 +174,57 @@\n \t]);\n }\n \n+/** A saved attachment's file name: its id, then its own name with anything but letters, digits, . - _ made _. */\n+export function savedName(id: string, name: string): string {\n+\tconst own = (name.split(/[\\\\/]/).pop() ?? \"\")\n+\t\t.replace(/[^A-Za-z0-9._-]/g, \"_\")\n+\t\t.replace(/^\\.+/, \"_\")\n+\t\t.slice(0, 100);\n+\treturn `${id}-${own || \"file\"}`;\n+}\n+\n+/**\n+ * abso issue N --save-attachments <folder>: every attachment on the issue and\n+ * its comments, written to that folder as <id>-<name>; an svg's own file\n+ * beside the png drawn from it. Not into the abso folder unless abso leaves\n+ * that place out, or the images would be recorded as edits.\n+ */\n+async function saveAttachments(api: Api, root: string, cwd: string, dir: string, page: IssuePage): Promise<Output> {\n+\tconst target = resolve(cwd, dir);\n+\tconst inside = target === resolve(root) ? \"\" : relativeTo(root, target);\n+\tif (inside !== undefined && (inside === \"\" || !ignoredHere(loadIgnore(root), inside, true)))\n+\t\tthrow new UsageError(\n+\t\t\t`${dir} is inside this abso folder, so abso would record the images as your edits. Save them outside the folder, or into a folder .absoignore leaves out`,\n+\t\t);\n+\tconst seen = new Set<string>();\n+\tconst all = [...(page.issue.attachments ?? []), ...page.comments.flatMap((c) => c.attachments ?? [])].filter(\n+\t\t(a) => !seen.has(a.id) && seen.add(a.id),\n+\t);\n+\tif (all.length === 0)\n+\t\treturn {\n+\t\t\ttext: `Issue ${page.issue.id} has no attachments.`,\n+\t\t\tjson: { issue: page.issue.id, folder: target, files: [] },\n+\t\t};\n+\tmkdirSync(target, { recursive: true });\n+\tconst files: { id: string; path: string; size: number }[] = [];\n+\tfor (const a of all) {\n+\t\tconst wanted = [{ name: a.name, source: false }, ...(a.source ? [{ name: a.source.name, source: true }] : [])];\n+\t\tfor (const w of wanted) {\n+\t\t\tconst bytes = await api.attachmentBytes(a.id, w.source, ATTACH_MAX);\n+\t\t\tconst path = join(target, savedName(a.id, w.name));\n+\t\t\twriteFileSync(path, bytes);\n+\t\t\tfiles.push({ id: a.id, path, size: bytes.length });\n+\t\t}\n+\t}\n+\treturn {\n+\t\ttext: [\n+\t\t\t`Saved ${plural(files.length, \"file\")} from issue ${page.issue.id} to ${target}:`,\n+\t\t\t...files.map((f) => `  ${basename(f.path)}, ${sizeText(f.size)}`),\n+\t\t].join(\"\\n\"),\n+\t\tjson: { issue: page.issue.id, folder: target, files },\n+\t};\n+}\n+\n /** An issue's page, as text. */\n export function issuePage(p: IssuePage, api?: Pick<Api, \"attachmentUrl\">): string[] {\n \tconst i = p.issue;\n@@ -416,7 +469,15 @@\n \n export async function runIssue(args: Parsed, env: Env): Promise<Output> {\n \tconst [first, ...rest] = args.positionals;\n-\tconst { api } = openIssues(env);\n+\tconst { root, api } = openIssues(env);\n+\tconst saveTo = str(args, \"save-attachments\");\n+\tif (saveTo !== undefined) {\n+\t\tconst other = [...args.flags.keys()].filter((f) => f !== \"save-attachments\" && f !== \"json\");\n+\t\tif (other.length > 0 || first === \"new\" || first === \"draft\")\n+\t\t\tthrow new UsageError(\n+\t\t\t\t`--save-attachments goes alone with an issue number: abso issue <N> --save-attachments <folder>${other.length > 0 ? `, not with --${other[0]}` : \"\"}`,\n+\t\t\t);\n+\t}\n \tif (first === \"draft\") return runDraft(api, args, rest);\n \tif (first === \"new\") {\n \t\tif (rest.length === 0)\n@@ -522,6 +583,7 @@\n \t\t};\n \t}\n \tconst page = await api.issue(id);\n+\tif (saveTo !== undefined) return saveAttachments(api, root, env.cwd, saveTo, page);\n \treturn { text: issuePage(page, api).join(\"\\n\"), json: { ...page } };\n }\n "},{"path":"client/src/main.ts","added":3,"removed":2,"diff":"--- a/client/src/main.ts\n+++ b/client/src/main.ts\n@@ -390,11 +390,12 @@\n \t\t\t\"copy-to\": \"string\",\n \t\t\tclean: \"string\",\n \t\t\t\"dry-run\": \"boolean\",\n+\t\t\t\"save-attachments\": \"string\",\n \t\t},\n \t\tusage:\n-\t\t\t'abso issue <N> --copy-to <project> [--clean <file>] [--dry-run] | abso issue <N> [--comment \"...\" [--attach <file,file>] | --object \"...\" | --drop | --reopen | --done [--done-by <version>]] | abso issue <N> [--title \"...\"] [--description \"...\"] [--parent <N|none>] [--agent <agent|none>] [--blocked-by <N,N|none>] [--label <l,l>] [--unlabel <l,l>] [--notify <who,who> | --quiet] | abso issue new \"<title>\" [--description \"...\"] [--parent <N>] [--lines <file>:<from>-<to>@<version>] [--agent <agent>] [--blocked-by <N,N>] [--notify <who,who>] [--label <l,l>] [--attach <file,file>]',\n+\t\t\t'abso issue <N> --save-attachments <folder> | abso issue <N> --copy-to <project> [--clean <file>] [--dry-run] | abso issue <N> [--comment \"...\" [--attach <file,file>] | --object \"...\" | --drop | --reopen | --done [--done-by <version>]] | abso issue <N> [--title \"...\"] [--description \"...\"] [--parent <N|none>] [--agent <agent|none>] [--blocked-by <N,N|none>] [--label <l,l>] [--unlabel <l,l>] [--notify <who,who> | --quiet] | abso issue new \"<title>\" [--description \"...\"] [--parent <N>] [--lines <file>:<from>-<to>@<version>] [--agent <agent>] [--blocked-by <N,N>] [--notify <who,who>] [--label <l,l>] [--attach <file,file>]',\n \t\tabout:\n-\t\t\t\"One issue: its description, Agent, Blocked by, labels, asks, comments, edits, sub-issues and watchers. --comment comments on it and --object objects; its agents hear either. --drop drops it. --reopen opens a dropped issue again. --done marks it done by hand, and --done-by <version> names the published version that did it. publish --done still marks it done too. --title, --description, --parent, --agent and --blocked-by edit it, and the edit tells its watchers (who opened it, its Agent and agents, its Reviewer, whoever was named in Notify, and whoever commented); --notify tells more people, --quiet tells nobody. --label adds labels and --unlabel takes them off (friction, area:client: lower-case letters, digits and - _ . :); a label-only edit tells nobody unless --notify names people. An issue is Blocked until each issue it's blocked by is Done. abso issue new opens one; --lines ties it to lines at a version of shared, --agent says who it's for, --notify tells people now, and --label labels it. --attach shot.png,after.png puts images on a new issue or a comment (png, jpeg, gif or webp, 10 MB each; the server checks the type by the bytes and takes out metadata such as where a photo was taken. An svg, up to 1 MB, is drawn as a png, and its own file is kept as a download, on servers that take svg), and prints each one's id for the text to point at; the issue's page lists them with a link. --copy-to <project> copies the issue into another project, with its comments, answered asks and labels, each keeping its author and time; --dry-run shows what would go and writes nothing, and --clean <file> gives cleaned texts by source id as JSON ({title, description, comments: [{id, text}], asks: [{id, question, answer}]}; a comment left out of a given list isn't copied). Copying out of a project on a live server takes an owner of that project. abso issue draft \\\"<title>\\\" [the same fields] saves a draft instead: yours alone, with no number and no news; abso issue draft <D> [fields] changes it, --open opens it as an issue, --delete deletes it.\",\n+\t\t\t\"One issue: its description, Agent, Blocked by, labels, asks, comments, edits, sub-issues and watchers. --comment comments on it and --object objects; its agents hear either. --drop drops it. --reopen opens a dropped issue again. --done marks it done by hand, and --done-by <version> names the published version that did it. publish --done still marks it done too. --title, --description, --parent, --agent and --blocked-by edit it, and the edit tells its watchers (who opened it, its Agent and agents, its Reviewer, whoever was named in Notify, and whoever commented); --notify tells more people, --quiet tells nobody. --label adds labels and --unlabel takes them off (friction, area:client: lower-case letters, digits and - _ . :); a label-only edit tells nobody unless --notify names people. An issue is Blocked until each issue it's blocked by is Done. abso issue new opens one; --lines ties it to lines at a version of shared, --agent says who it's for, --notify tells people now, and --label labels it. --attach shot.png,after.png puts images on a new issue or a comment (png, jpeg, gif or webp, 10 MB each; the server checks the type by the bytes and takes out metadata such as where a photo was taken. An svg, up to 1 MB, is drawn as a png, and its own file is kept as a download, on servers that take svg), and prints each one's id for the text to point at; the issue's page lists them with a link, and --save-attachments <folder> saves every one on the issue and its comments there as <id>-<name> (an svg's own file too), outside the abso folder or where abso leaves files out. --copy-to <project> copies the issue into another project, with its comments, answered asks and labels, each keeping its author and time; --dry-run shows what would go and writes nothing, and --clean <file> gives cleaned texts by source id as JSON ({title, description, comments: [{id, text}], asks: [{id, question, answer}]}; a comment left out of a given list isn't copied). Copying out of a project on a live server takes an owner of that project. abso issue draft \\\"<title>\\\" [the same fields] saves a draft instead: yours alone, with no number and no news; abso issue draft <D> [fields] changes it, --open opens it as an issue, --delete deletes it.\",\n \t\trun: runIssue,\n \t},\n \task: {"},{"path":"client/src/mcp.ts","added":3,"removed":3,"diff":"--- a/client/src/mcp.ts\n+++ b/client/src/mcp.ts\n@@ -120,8 +120,8 @@\n \treturn rel === \"\" || (rel !== \"..\" && !rel.startsWith(`..${sep}`) && !isAbsolute(rel));\n }\n \n-/** The tool inputs that name files on this machine to read, comma-separated: each is confined like the folder. */\n-export const FILE_INPUTS = [\"attach\", \"clean\"] as const;\n+/** The tool inputs that name files or folders on this machine to read or write, comma-separated: each is confined like the folder. */\n+export const FILE_INPUTS = [\"attach\", \"clean\", \"save-attachments\"] as const;\n \n /**\n  * Where a tool call runs, and what it may read: its folder and\n@@ -149,7 +149,7 @@\n \t\t\t.filter((x) => x !== \"\"))\n \t\t\tif (!inside(start, resolve(folder, p)))\n \t\t\t\treturn {\n-\t\t\t\t\trefused: `--${flag} ${p} is outside ${start}, the folder this server started in; a tool reads files from there or below`,\n+\t\t\t\t\trefused: `--${flag} ${p} is outside ${start}, the folder this server started in; a tool reads and writes files only there or below`,\n \t\t\t\t};\n \t}\n \treturn { folder };"},{"path":"client/test/attach.test.ts","added":38,"removed":1,"diff":"--- a/client/test/attach.test.ts\n+++ b/client/test/attach.test.ts\n@@ -3,7 +3,7 @@\n // here is a stand-in that keeps what it was sent.\n \n import assert from \"node:assert/strict\";\n-import { mkdtempSync, rmSync, writeFileSync } from \"node:fs\";\n+import { mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from \"node:fs\";\n import { createServer, type Server } from \"node:http\";\n import type { AddressInfo } from \"node:net\";\n import { tmpdir } from \"node:os\";\n@@ -43,6 +43,20 @@\n \t\t\t\t});\n \t\t\tif (req.url!.endsWith(\"/issue\")) return json({ id: 7 });\n \t\t\tif (/\\/issue\\/\\d+\\/comment$/.test(req.url!)) return json({ id: 3 });\n+\t\t\t// Issue 8 carries an svg-drawn image on itself and again on a comment, plus one more on the comment.\n+\t\t\tconst logo = { id: \"a00000000000b\", name: \"../shot one.png\", type: \"image/png\", size: 13 };\n+\t\t\tif (req.method === \"GET\" && /\\/issue\\/8$/.test(req.url!))\n+\t\t\t\treturn json({\n+\t\t\t\t\tissue: { id: 8, attachments: [{ ...logo, source: { name: \"logo.svg\", size: 20 } }] },\n+\t\t\t\t\tcomments: [{ attachments: [logo, { id: \"a00000000000c\", name: \"after.png\", type: \"image/png\", size: 13 }] }],\n+\t\t\t\t\tedits: [],\n+\t\t\t\t\tasks: [],\n+\t\t\t\t\tclaims: [],\n+\t\t\t\t\tchildren: [],\n+\t\t\t\t});\n+\t\t\tconst served = /\\/attachments\\/(a[0-9a-f]{12})(\\/source)?$/.exec(req.url!);\n+\t\t\tif (req.method === \"GET\" && served)\n+\t\t\t\treturn res.writeHead(200, { \"content-type\": \"image/png\" }).end(`${served[1]}${served[2] ?? \"\"}`);\n \t\t\tres.writeHead(404).end(\"{}\");\n \t\t});\n \t});\n@@ -142,6 +156,29 @@\n \t\tassert.equal(seen.length, from);\n \t});\n \n+\tit(\"--save-attachments saves each attachment once, an svg's own file too, outside the folder\", async () => {\n+\t\tconst dir = await folder();\n+\t\tconst out = mkdtempSync(join(tmpdir(), \"abso-saved-\"));\n+\t\tdirs.push(out);\n+\t\tconst r = await avcs(dir, [\"issue\", \"8\", \"--save-attachments\", join(out, \"images\")]);\n+\t\tassert.equal(r.exit, 0, r.out);\n+\t\tconst names = readdirSync(join(out, \"images\")).sort();\n+\t\tassert.deepEqual(names, [\"a00000000000b-logo.svg\", \"a00000000000b-shot_one.png\", \"a00000000000c-after.png\"]);\n+\t\tassert.equal(readFileSync(join(out, \"images\", \"a00000000000b-logo.svg\"), \"utf8\"), \"a00000000000b/source\");\n+\t\tassert.equal(readFileSync(join(out, \"images\", \"a00000000000c-after.png\"), \"utf8\"), \"a00000000000c\");\n+\t\tassert.equal((r.json as { files: unknown[] }).files.length, 3);\n+\t\t// Into the folder only where abso leaves files out, or they'd be recorded as edits.\n+\t\tconst inside = await avcs(dir, [\"issue\", \"8\", \"--save-attachments\", \"images\"]);\n+\t\tassert.equal(inside.exit, 1);\n+\t\tassert.match(inside.out, /inside this abso folder/);\n+\t\tassert.equal((await avcs(dir, [\"issue\", \"8\", \"--save-attachments\", \".\"])).exit, 1);\n+\t\twriteFileSync(join(dir, \".absoignore\"), \"saved/\\n\");\n+\t\tassert.equal((await avcs(dir, [\"issue\", \"8\", \"--save-attachments\", \"saved\"])).exit, 0);\n+\t\tconst mixed = await avcs(dir, [\"issue\", \"8\", \"--save-attachments\", out, \"--comment\", \"x\"]);\n+\t\tassert.equal(mixed.exit, 1);\n+\t\tassert.match(mixed.out, /--save-attachments goes alone/);\n+\t});\n+\n \tit(\"an issue's page lists its attachments and each comment's, with links\", () => {\n \t\tconst page = {\n \t\t\tissue: {"},{"path":"client/test/client.test.ts","added":13,"removed":4,"diff":"--- a/client/test/client.test.ts\n+++ b/client/test/client.test.ts\n@@ -1925,16 +1925,22 @@\n \t\tconst one = await avcs(tester, \"export\", out, \"--version\", \"1\");\n \t\tassert.equal(one.exit, 0, one.out);\n \t\tassert.equal(one.json.version, 1);\n-\t\tassert.deepEqual(listAll(out), [\".abso-export.json\", \".absoignore\", \"index.html\", \"src/game.ts\", \"src/new.ts\"]);\n+\t\tassert.deepEqual(listAll(out), [\".abso-export\", \".absoignore\", \"index.html\", \"src/game.ts\", \"src/new.ts\"]);\n \t\tassert.equal(read(out, \"src/game.ts\"), \"game v1\\n\");\n \t\tassert.equal(read(out, \"index.html\"), \"<p>v0</p>\\n\", \"published files, not the unpublished edit\");\n-\t\tassert.equal(JSON.parse(read(out, \".abso-export.json\")).version, 1);\n-\t\t// The newest by default; an earlier export's folder is replaced whole.\n+\t\t// One line, no extension: the exported project's own formatter has nothing to say about it.\n+\t\tconst stamp = read(out, \".abso-export\");\n+\t\tassert.equal(stamp.split(\"\\n\").length, 2, stamp);\n+\t\tassert.equal(JSON.parse(stamp).version, 1);\n+\t\t// The newest by default; an earlier export's folder is replaced whole, one stamped by an older client too.\n+\t\trmSync(join(out, \".abso-export\"));\n+\t\twrite(out, { \".abso-export.json\": \"{}\\n\" });\n \t\tconst newest = await main([\"export\", out], { cwd: tester, env: ENV, write: () => {} });\n \t\tassert.match(\n \t\t\tnewest.stdout,\n-\t\t\t/^Exported version 2 of shared to .*build: 4 files\\. \\.abso-export\\.json there names the version/,\n+\t\t\t/^Exported version 2 of shared to .*build: 4 files\\. \\.abso-export there names the version/,\n \t\t);\n+\t\tassert.equal(existsSync(join(out, \".abso-export.json\")), false);\n \t\tassert.equal(read(out, \"src/game.ts\"), \"game v2\\n\");\n \t\t// Exporting again keeps the build's node_modules (abso never exports it) and what --keep names, and nothing else.\n \t\twrite(out, {\n@@ -2694,6 +2700,9 @@\n \t\tassert.match(refused({ folder: \"sub\", attach: \"../../x.png\" }), /is outside/);\n \t\tassert.match(refused({ clean: \"../clean.json\" }), /^--clean \\.\\.\\/clean\\.json is outside/);\n \t\tassert.deepEqual(confineCall(start, { clean: \"clean.json\" }), { folder: start });\n+\t\t// A folder a tool writes to is confined the same way.\n+\t\tassert.match(refused({ \"save-attachments\": \"../images\" }), /^--save-attachments \\.\\.\\/images is outside/);\n+\t\tassert.deepEqual(confineCall(start, { \"save-attachments\": \"images\" }), { folder: start });\n \t\tassert.deepEqual(confineCall(start, { folder: \"sub\", attach: \"../a.txt\" }), { folder: join(start, \"sub\") });\n \t\tconst server = mcp(start);\n \t\ttry {"}],"ci":null}