{"draft":null,"from":175,"to":318,"files":[{"path":"worker/project/http.ts","added":19,"removed":5,"diff":"--- a/worker/project/http.ts\n+++ b/worker/project/http.ts\n@@ -49,9 +49,11 @@\n }\n \n /**\n- * What a reader may not do. Edits and records (which old edit mods send on\n- * their own) and publishes answer 200 {ok: false, reason}, so a mod only logs\n- * it; the rest are refused outright.\n+ * What a reader may not do: change code. Edits and records (which old edit\n+ * mods send on their own) and publishes answer 200 {ok: false, reason}, so a\n+ * mod only logs it; the rest are refused outright. Talking stays open (abso\n+ * 682, Christopher: \"readers need to be able to do asks and news and stuff\"):\n+ * announcements, notes on lines, asks and issues all work for a reader.\n  */\n const NOT_FOR_READERS: Record<string, \"answer\" | \"refuse\"> = {\n \tedit: \"answer\",\n@@ -316,7 +318,7 @@\n \t\t\t\treturn { status: 200, body: history.blame(q.file, num(q.from), num(q.to), num(q.version), draft, who) };\n \t\t\tconst line = num(q.line);\n \t\t\tif (!line || !Number.isInteger(line)) return fail(400, \"why needs ?line=<number>\");\n-\t\t\treturn { status: 200, body: history.why(q.file, line, draft, who) };\n+\t\t\treturn { status: 200, body: history.why(q.file, line, draft, who, num(q.version)) };\n \t\t}\n \t\tif (op === \"announce\" && agent === undefined) {\n \t\t\t// The sender comes from the route, like every other agent op, not from\n@@ -350,6 +352,17 @@\n \t\t\tconst limit = q.limit !== undefined && Number.isInteger(Number(q.limit)) ? Number(q.limit) : undefined;\n \t\t\treturn { status: 200, body: history.refusals(q.agent || undefined, limit) };\n \t\t}\n+\t\tif (op === \"without\") {\n+\t\t\t// GET ?version=<n>&versions=<n,n>: version n of shared with those versions left out (without.ts).\n+\t\t\tconst q = (body ?? {}) as Record<string, string | undefined>;\n+\t\t\tconst history = project as ProjectCalls & Partial<ProjectHistory>;\n+\t\t\tif (!history.without) return fail(501, \"without needs the engine\");\n+\t\t\tconst version = q.version !== undefined && /^\\d+$/.test(q.version) ? Number(q.version) : undefined;\n+\t\t\tconst versions = (q.versions ?? \"\").split(\",\").filter((s) => s.trim() !== \"\");\n+\t\t\tif (version === undefined || versions.length === 0 || versions.some((s) => !/^\\s*\\d+\\s*$/.test(s)))\n+\t\t\t\treturn fail(400, \"without needs ?version=<number>&versions=<number,number>\");\n+\t\t\treturn { status: 200, body: history.without(version, versions.map(Number)) };\n+\t\t}\n \t\tif (op === \"log\" || op === \"show\" || op === \"file\" || op === \"compare\") {\n \t\t\t// GETs: ?draft=<name> (shared when absent); log ?limit, ?path; show ?version; file ?path, ?version; compare ?from, ?to.\n \t\t\tconst q = (body ?? {}) as Record<string, string | undefined>;\n@@ -381,7 +394,8 @@\n \t\t\t\tconst from = int(q.from);\n \t\t\t\tconst to = int(q.to);\n \t\t\t\tif (from === undefined || to === undefined) return fail(400, \"compare needs ?from=<number>&to=<number>\");\n-\t\t\t\treturn { status: 200, body: history.compare(from, to, draft, who) };\n+\t\t\t\t// summary=1: each file's size and SHA-256, not its texts (abso issue 680).\n+\t\t\t\treturn { status: 200, body: history.compare(from, to, draft, who, q.summary === \"1\") };\n \t\t\t}\n \t\t\tconst version = Number(q.version);\n \t\t\tif (q.version === undefined || !Number.isInteger(version)) return fail(400, \"show needs ?version=<number>\");"}],"unmatched":[]}