HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.
Python agent-apiagent-frameworkagent-harnessai-agentsai-infrastructurecoding-agentconformance-testingdeepseek-harnessharness-engineeringhermesllmopen-protocolopen-sourceopen-standardpi-coding-agentself-hosteduhpunified-apiunified-harness-protocolunified-interface
UHP 2026-10-04, patched: a record's content is an ordered list of text and file parts (#385)
github-actions[bot]4eea87ae7dc8
diff --git a/protocol/CHANGELOG.md b/protocol/CHANGELOG.mdindex 9edd8c85..84726f39 100644--- a/protocol/CHANGELOG.md+++ b/protocol/CHANGELOG.md@@ -2,10 +2,27 @@All notable changes to the Unified Harness Protocol.-## 2026-10-04+## 2026-10-04 (patched the same day)Additive to `2026-09-28`: every request and object valid under the previous version is valid here.+**Patch of 2026-10-04, same version.** A record's `content` is an ordered list of parts, always, on+every read ([Memories §4.3](versions/2026-10-04/memories.md#43-content)). The chapter as first+published that morning said `content` was text or one file reference, which could not hold a+picture beside what it shows, or a conversation turn with a file in it. Two kinds of part are+defined, `text` and `file`; a modality is a media type of a file part, not a kind of part, so a new+one needs no change here, and any other kind is `x.`-prefixed and carried unchanged. A file part+may carry the words that stand for it (`text`, with `text_source`), which is what recall by words+finds; a part may carry the `role` that said it, so a turn is observed in this same shape. A string+remains shorthand for one text part on a write. A file part's bytes are read at+`GET /v1/memories/{id}/records/{rid}/content/{index}` (was `/content`). A provider's capability+document says what it keeps in `content` (`media`, `bytes`, `describes`), replacing the `files`+flag, and a write of a media type the provider does not keep is refused with `memory_unsupported`,+never stored without its file. Schema: `MemoryContentPart`; `MemoryRecord.content` is an array.+Suite `2026.10.4.post1`: ME-02 expects the list, ME-09 exercises parts, order, refusals, and a file+part kept with its description and read back byte for byte, or refused, as the provider declares.+No implementation had shipped against the morning's text.+- **Memories** ([Memories](versions/2026-10-04/memories.md)), the Harness Memories sub-protocol,optional at every class behind the `memories` capability. A memory is a named node in a tree:it holds records and may have child memories. A grant gives a principal privileges (`read`,diff --git a/protocol/conformance/pyproject.toml b/protocol/conformance/pyproject.tomlindex 4b14865f..f9f5624e 100644--- a/protocol/conformance/pyproject.toml+++ b/protocol/conformance/pyproject.toml@@ -1,6 +1,6 @@[project]name = "uhp-conformance"-version = "2026.10.4"+version = "2026.10.4.post1"description = "Conformance suite for the Unified Harness Protocol (UHP)"readme = "README.md"requires-python = ">=3.10"diff --git a/protocol/conformance/uhp_conformance/checks.py b/protocol/conformance/uhp_conformance/checks.pyindex 22766bb4..64c9199e 100644--- a/protocol/conformance/uhp_conformance/checks.py+++ b/protocol/conformance/uhp_conformance/checks.py@@ -2048,7 +2048,8 @@ def me02(ctx):_memories_supported(ctx)rec = _memory_fact(ctx)ctx.validate(rec, "MemoryRecord")- assert rec.get("content") == "Quillon Freight renews its contract every March.", f"the record does not say what was stated: {rec.get('content')!r}"+ assert rec.get("content") == [{"type": "text", "text": "Quillon Freight renews its contract every March."}], (+ f"a string written as content must read back as one text part, in a list; got {rec.get('content')!r}")assert rec.get("trust") == "untrusted", "a record read back must be marked untrusted"assert rec.get("memory_id") == ctx.state["memory_child"]["id"], "the record must name the memory it is in"assert (rec.get("written_by") or {}).get("id") != "someone-else", (@@ -2171,6 +2172,62 @@ def me07(ctx):return f"forgotten, then erased with unreachable={len((e.json or {}).get('unreachable') or [])}"+@check("ME-09", "Content is an ordered list of text and file parts, and a provider keeps what it says it keeps", "full",+ f"{SPEC}/memories.md#43-content")+def me09(ctx):+ prov = _memories_supported(ctx)+ child = _memory_child(ctx)+ base = f"/v1/memories/{child['id']}/records"+ two = ctx.client.post(base, body={"type": "note", "content": [{"type": "text", "text": "First line."},+ {"type": "text", "text": "Second line."}]})+ assert two.status == 200, f"a list of text parts was refused: HTTP {two.status} {two.text[:160]}"+ parts = (two.json or {}).get("content")+ assert isinstance(parts, list) and parts and all(p.get("type") == "text" for p in parts), (+ f"content must read back as a list of parts; got {parts!r}")+ said = " ".join(str(p.get("text")) for p in parts)+ assert "First line." in said and said.index("First line.") < said.index("Second line."), (+ f"the parts' words must survive in order; got {said!r}")+ for bad, why in (([{"type": "image", "url": "x"}], "a part that is neither text, file nor x.-prefixed"),+ ([{"type": "text"}], "a text part with no text"),+ ([{"type": "file", "file": {}}], "a file part that names no file"),+ ([{"type": "text", "text": "x", "role": "narrator"}], "a role that is not one of the four")):+ r = ctx.client.post(base, body={"content": bad})+ assert r.status == 422, f"{why} must be refused with 422; got HTTP {r.status}"+ # a file part: uploaded as Files says, named by id, completed by the server, kept or refused as declared+ media = ((prov.get("content") or {}).get("media")) or ["text/*"]+ png = b"\x89PNG\r\n\x1a\n" + b"\x00" * 16+ boundary = "uhpconformance" + uuid.uuid4().hex+ form = (f"--{boundary}\r\nContent-Disposition: form-data; name=\"purpose\"\r\n\r\nuser_data\r\n"+ f"--{boundary}\r\nContent-Disposition: form-data; name=\"file\"; filename=\"dot.png\"\r\n"+ f"Content-Type: image/png\r\n\r\n").encode() + png + f"\r\n--{boundary}--\r\n".encode()+ up = ctx.client.post("/v1/files", raw=form, content_type=f"multipart/form-data; boundary={boundary}")+ if up.status != 200:+ return f"text parts in order; file parts not exercised (POST /v1/files answered HTTP {up.status})"+ fid = (up.json or {}).get("id")+ r = ctx.client.post(base, body={"type": "note", "content": [+ {"type": "text", "text": "A dot."},+ {"type": "file", "file": {"id": fid, "name": "forged.bin", "media_type": "application/x-forged", "bytes": 1},+ "text": "A single black dot on white."}]})+ import fnmatch+ keeps = any(fnmatch.fnmatch("image/png", pat) for pat in media)+ if not keeps:+ assert r.status == 422 and ((r.json or {}).get("error") or {}).get("code") == "memory_unsupported", (+ f"this provider declares content.media={media}; a png must be refused with memory_unsupported, not stored "+ f"without its file. Got HTTP {r.status}: {r.text[:160]}")+ return f"text parts in order; image/png refused as declared (content.media={media})"+ assert r.status == 200, f"this provider declares it keeps image/png, and refused it: HTTP {r.status} {r.text[:160]}"+ rec = r.json or {}+ ctx.validate(rec, "MemoryRecord")+ fp = next((p for p in rec.get("content") or [] if p.get("type") == "file"), None)+ assert fp and (fp.get("file") or {}).get("media_type") == "image/png" and (fp["file"].get("name") == "dot.png"), (+ f"the server completes a file part from its own file store, not from the caller: {fp!r}")+ assert fp.get("text") == "A single black dot on white.", "the words that stand for a file must be kept with it"+ idx = (rec.get("content") or []).index(fp)+ b = ctx.client.get(f"{base}/{rec['id']}/content/{idx}")+ assert b.status == 200 and b.body == png, f"the part's bytes must read back at its own address; got HTTP {b.status}"+ return "text parts in order; a png kept with its description and read back byte for byte"++@check("ME-08", "A memory moves with its subtree, and deleting it takes the subtree", "full",f"{SPEC}/memories.md#2-the-memory-object")def me08(ctx):diff --git a/protocol/conformance/uhp_conformance/uhp-2026-10-04.schema.json b/protocol/conformance/uhp_conformance/uhp-2026-10-04.schema.jsonindex 34f1c669..d26782e3 100644--- a/protocol/conformance/uhp_conformance/uhp-2026-10-04.schema.json+++ b/protocol/conformance/uhp_conformance/uhp-2026-10-04.schema.json@@ -2271,7 +2271,11 @@"description": "episode, fact, note, procedure, link, or an extension type."},"content": {- "description": "Text, or a file reference."+ "type": "array",+ "items": {+ "$ref": "#/$defs/MemoryContentPart"+ },+ "description": "An ordered list of parts. Always a list on a read."},"attributes": {"type": "object",@@ -2342,6 +2346,62 @@},"additionalProperties": true},+ "MemoryContentPart": {+ "type": "object",+ "required": [+ "type"+ ],+ "description": "One part of the content of a record. `text` and `file` are defined; any other kind is `x.`-prefixed and carried unchanged.",+ "properties": {+ "type": {+ "type": "string"+ },+ "text": {+ "type": "string",+ "description": "The words of a text part, or the words that stand for a file."+ },+ "text_source": {+ "type": "string",+ "enum": [+ "stated",+ "derived"+ ]+ },+ "role": {+ "type": "string",+ "enum": [+ "user",+ "assistant",+ "system",+ "tool"+ ]+ },+ "file": {+ "type": "object",+ "required": [+ "id"+ ],+ "properties": {+ "id": {+ "type": "string"+ },+ "name": {+ "type": "string"+ },+ "media_type": {+ "type": "string"+ },+ "bytes": {+ "type": "integer"+ },+ "version": {+ "type": "string"+ }+ }+ }+ },+ "additionalProperties": true+ },"MemoryRecordCreate": {"type": "object","required": [@@ -2351,7 +2411,20 @@"type": {"type": "string"},- "content": {},+ "content": {+ "oneOf": [+ {+ "type": "string",+ "description": "Shorthand for one text part."+ },+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/MemoryContentPart"+ }+ }+ ]+ },"attributes": {"type": "object","additionalProperties": true@@ -2371,7 +2444,20 @@"MemoryRecordRevise": {"type": "object","properties": {- "content": {},+ "content": {+ "oneOf": [+ {+ "type": "string",+ "description": "Shorthand for one text part."+ },+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/MemoryContentPart"+ }+ }+ ]+ },"attributes": {"type": "object","additionalProperties": true@@ -2432,7 +2518,20 @@"content"],"properties": {- "content": {},+ "content": {+ "oneOf": [+ {+ "type": "string",+ "description": "Shorthand for one text part."+ },+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/MemoryContentPart"+ }+ }+ ]+ },"attributes": {"type": "object","additionalProperties": true@@ -2890,6 +2989,32 @@"queries": {"type": "object","additionalProperties": true+ },+ "content": {+ "type": "object",+ "description": "What the content of a record may carry on this provider.",+ "properties": {+ "media": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Media types kept, as patterns such as `text/*` or `image/*`."+ },+ "bytes": {+ "type": "string",+ "enum": [+ "kept",+ "referenced"+ ]+ },+ "describes": {+ "type": "array",+ "items": {+ "type": "string"+ }+ }+ }}},"additionalProperties": truediff --git a/protocol/schema/uhp-2026-10-04.openapi.yaml b/protocol/schema/uhp-2026-10-04.openapi.yamlindex 30a90182..f390a9ea 100644--- a/protocol/schema/uhp-2026-10-04.openapi.yaml+++ b/protocol/schema/uhp-2026-10-04.openapi.yaml@@ -868,6 +868,24 @@ paths:schema: { $ref: '#/components/schemas/MemoryRecord' }'404': { $ref: '#/components/responses/NotFound' }+ /v1/memories/{memory_id}/records/{record_id}/content/{index}:+ parameters:+ - $ref: '#/components/parameters/MemoryId'+ - $ref: '#/components/parameters/MemoryRecordId'+ - { name: index, in: path, required: true, schema: { type: integer, minimum: 0 } }+ get:+ tags: [Memories]+ operationId: getMemoryRecordFile+ summary: "The bytes of one file part of a record"+ description: "Needs `read`. A part that is not a file answers 404."+ responses:+ '200':+ description: The bytes, under the media type of the file+ content:+ application/octet-stream:+ schema: { type: string, format: binary }+ '404': { $ref: '#/components/responses/NotFound' }+/v1/memories/{memory_id}/records/{record_id}/history:parameters:- $ref: '#/components/parameters/MemoryId'@@ -2705,7 +2723,7 @@ components:object: { type: string, const: memory.record }memory_id: { type: string }type: { type: string, description: 'episode, fact, note, procedure, link, or an extension type.' }- content: { description: 'Text, or a file reference.' }+ content: { type: array, items: { $ref: '#/components/schemas/MemoryContentPart' }, description: An ordered list of parts. Always a list on a read. }attributes: { type: object, additionalProperties: true }version: { type: integer }status: { type: string, enum: [active, superseded, forgotten] }@@ -2721,19 +2739,38 @@ components:references: { type: array, items: { $ref: '#/components/schemas/MemoryReference' } }trust: { type: string, const: untrusted }additionalProperties: true+ MemoryContentPart:+ type: object+ required: [type]+ description: 'One part of the content of a record. `text` and `file` are defined; any other kind is `x.`-prefixed and carried unchanged.'+ properties:+ type: { type: string }+ text: { type: string, description: 'The words of a text part, or the words that stand for a file.' }+ text_source: { type: string, enum: [stated, derived] }+ role: { type: string, enum: [user, assistant, system, tool] }+ file:+ type: object+ required: [id]+ properties:+ id: { type: string }+ name: { type: string }+ media_type: { type: string }+ bytes: { type: integer }+ version: { type: string }+ additionalProperties: trueMemoryRecordCreate:type: objectrequired: [content]properties:type: { type: string }- content: {}+ content: { oneOf: [ { type: string, description: Shorthand for one text part. }, { type: array, items: { $ref: '#/components/schemas/MemoryContentPart' } } ] }attributes: { type: object, additionalProperties: true }references: { type: array, items: { $ref: '#/components/schemas/MemoryReference' } }time: { type: object, additionalProperties: true }MemoryRecordRevise:type: objectproperties:- content: {}+ content: { oneOf: [ { type: string, description: Shorthand for one text part. }, { type: array, items: { $ref: '#/components/schemas/MemoryContentPart' } } ] }attributes: { type: object, additionalProperties: true }references: { type: array, items: { $ref: '#/components/schemas/MemoryReference' } }time: { type: object, additionalProperties: true }@@ -2756,7 +2793,7 @@ components:type: objectrequired: [content]properties:- content: {}+ content: { oneOf: [ { type: string, description: Shorthand for one text part. }, { type: array, items: { $ref: '#/components/schemas/MemoryContentPart' } } ] }attributes: { type: object, additionalProperties: true }MemoryJob:type: object@@ -2901,6 +2938,13 @@ components:history: { type: object, additionalProperties: true }erase: { type: object, additionalProperties: true }queries: { type: object, additionalProperties: true }+ content:+ type: object+ description: What the content of a record may carry on this provider.+ properties:+ media: { type: array, items: { type: string }, description: 'Media types kept, as patterns such as `text/*` or `image/*`.' }+ bytes: { type: string, enum: [kept, referenced] }+ describes: { type: array, items: { type: string } }additionalProperties: trueMemoryProviderList:type: objectdiff --git a/protocol/schema/uhp-2026-10-04.schema.json b/protocol/schema/uhp-2026-10-04.schema.jsonindex 34f1c669..d26782e3 100644--- a/protocol/schema/uhp-2026-10-04.schema.json+++ b/protocol/schema/uhp-2026-10-04.schema.json@@ -2271,7 +2271,11 @@"description": "episode, fact, note, procedure, link, or an extension type."},"content": {- "description": "Text, or a file reference."+ "type": "array",+ "items": {+ "$ref": "#/$defs/MemoryContentPart"+ },+ "description": "An ordered list of parts. Always a list on a read."},"attributes": {"type": "object",@@ -2342,6 +2346,62 @@},"additionalProperties": true},+ "MemoryContentPart": {+ "type": "object",+ "required": [+ "type"+ ],+ "description": "One part of the content of a record. `text` and `file` are defined; any other kind is `x.`-prefixed and carried unchanged.",+ "properties": {+ "type": {+ "type": "string"+ },+ "text": {+ "type": "string",+ "description": "The words of a text part, or the words that stand for a file."+ },+ "text_source": {+ "type": "string",+ "enum": [+ "stated",+ "derived"+ ]+ },+ "role": {+ "type": "string",+ "enum": [+ "user",+ "assistant",+ "system",+ "tool"+ ]+ },+ "file": {+ "type": "object",+ "required": [+ "id"+ ],+ "properties": {+ "id": {+ "type": "string"+ },+ "name": {+ "type": "string"+ },+ "media_type": {+ "type": "string"+ },+ "bytes": {+ "type": "integer"+ },+ "version": {+ "type": "string"+ }+ }+ }+ },+ "additionalProperties": true+ },"MemoryRecordCreate": {"type": "object","required": [@@ -2351,7 +2411,20 @@"type": {"type": "string"},- "content": {},+ "content": {+ "oneOf": [+ {+ "type": "string",+ "description": "Shorthand for one text part."+ },+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/MemoryContentPart"+ }+ }+ ]+ },"attributes": {"type": "object","additionalProperties": true@@ -2371,7 +2444,20 @@"MemoryRecordRevise": {"type": "object","properties": {- "content": {},+ "content": {+ "oneOf": [+ {+ "type": "string",+ "description": "Shorthand for one text part."+ },+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/MemoryContentPart"+ }+ }+ ]+ },"attributes": {"type": "object","additionalProperties": true@@ -2432,7 +2518,20 @@"content"],"properties": {- "content": {},+ "content": {+ "oneOf": [+ {+ "type": "string",+ "description": "Shorthand for one text part."+ },+ {+ "type": "array",+ "items": {+ "$ref": "#/$defs/MemoryContentPart"+ }+ }+ ]+ },"attributes": {"type": "object","additionalProperties": true@@ -2890,6 +2989,32 @@"queries": {"type": "object","additionalProperties": true+ },+ "content": {+ "type": "object",+ "description": "What the content of a record may carry on this provider.",+ "properties": {+ "media": {+ "type": "array",+ "items": {+ "type": "string"+ },+ "description": "Media types kept, as patterns such as `text/*` or `image/*`."+ },+ "bytes": {+ "type": "string",+ "enum": [+ "kept",+ "referenced"+ ]+ },+ "describes": {+ "type": "array",+ "items": {+ "type": "string"+ }+ }+ }}},"additionalProperties": truediff --git a/protocol/versions/2026-10-04/index.md b/protocol/versions/2026-10-04/index.mdindex bc111624..5407dee3 100644--- a/protocol/versions/2026-10-04/index.md+++ b/protocol/versions/2026-10-04/index.md@@ -78,7 +78,7 @@ the [protocol README](../../README.md).| `GET` `POST` | `/v1/memories/{id}/records` | Full, capability `memories` | [Memories](memories.md) || `GET` `PATCH` `DELETE` | `/v1/memories/{id}/records/{rid}` | Full, capability `memories` | [Memories](memories.md) || `GET` | `/v1/memories/{id}/records/{rid}/history` | Full, capability `memories` | [Memories](memories.md) |-| `GET` | `/v1/memories/{id}/records/{rid}/content` | Full, capability `memories` | [Memories](memories.md) |+| `GET` | `/v1/memories/{id}/records/{rid}/content/{index}` | Full, capability `memories` | [Memories](memories.md) || `POST` | `/v1/memories/{id}/records/{rid}/operations/{name}` | Full, capability `memories` | [Memories](memories.md) || `POST` | `/v1/memories/{id}/recall` | Full, capability `memories` | [Memories](memories.md) || `POST` | `/v1/memories/{id}/erase` | Full, capability `memories` | [Memories](memories.md) |@@ -98,7 +98,7 @@ The `plugins` column entries are served only by a server whose discovery documen`plugins` capability; the capability is optional at every class.The `memories` entries are served only by a server that reports the `memories` capability, which is-optional at every class as well; within it, named and free queries, types, files, snapshots,+optional at every class as well; within it, named and free queries, types, the media a record may carry, snapshots,consolidation runs and erase are declared per provider ([Memories §10.2](memories.md#102-the-capability-document)).## What changed in this versiondiff --git a/protocol/versions/2026-10-04/memories.md b/protocol/versions/2026-10-04/memories.mdindex f84cc84d..e2579c9b 100644--- a/protocol/versions/2026-10-04/memories.md+++ b/protocol/versions/2026-10-04/memories.md@@ -145,7 +145,7 @@ A record is one thing a memory holds. Its `id` is the provider's and opaque to a"object": "memory.record","memory_id": "hmem_7c1e4b9a2d3f4e5a8b6c7d8e9f0a1b2c","type": "fact",- "content": "Acme renews in March and wants the annual discount kept.",+ "content": [ { "type": "text", "text": "Acme renews in March and wants the annual discount kept." } ],"attributes": { "account": "acme" },"version": 2,"status": "active",@@ -163,7 +163,7 @@ A record is one thing a memory holds. Its `id` is the provider's and opaque to a| Field | Meaning ||---|---|| `type` | What kind of record ([§4.1](#41-types)) |-| `content` | Text, or a file reference `{ "file": { "id", "name", "bytes", "media_type", "version" } }` |+| `content` | What the record says: an ordered list of parts, text and files ([§4.3](#43-content)) || `attributes` | Structured fields. Free-form for core types; the type's schema for extension types ([§8](#8-types)) || `version`, `status`, `supersedes` | A change appends a version and closes the one before it ([§5.3](#53-nothing-is-overwritten)). `status` is `active`, `superseded` or `forgotten` || `time` | When it was true in the world (`valid_*`) and when the memory held it (`written_at`, `invalidated_at`). A provider without validity leaves `valid_*` null |@@ -197,6 +197,51 @@ memory, or with the same provider.- Writing a reference does not require `read` on its target. A record promoted from a privatememory into a shared one keeps its source, and only those who may read the source can follow it.+### 4.3 Content++A record's `content` is an ordered list of **parts**. Two kinds of part are defined:++```json+"content": [+ { "type": "text", "text": "The new logo, final on 1 October." },+ { "type": "file",+ "file": { "id": "file_9a2c…", "name": "logo.png", "media_type": "image/png", "bytes": 48213 },+ "text": "A blue circle with a white letter A.", "text_source": "stated" }+]+```++| Part | Carries |+|---|---|+| `text` | `text`: words |+| `file` | `file`: a reference to bytes, with their `media_type`; and optionally `text`, the words that stand for the file |++- **A modality is a media type, not a kind of part.** An image, a recording, a video and a PDF are+ all `file` parts and differ in `media_type` alone, so a modality this chapter has never heard of+ needs no change to it. A part of any other kind has an `x.`-prefixed `type`; a server MUST carry+ it unchanged and MUST NOT refuse a read because of it.+- **A file may carry the words that stand for it**: a description of an image, a transcript of a+ recording. That text is what recall by words finds ([§6.2](#62-the-request)) and what a reader+ that takes only text is given. `text_source` says whether the writer `stated` it or the provider+ `derived` it.+- **A record holds a reference to a file, never its bytes.** The bytes are sent first as+ [Files](files.md) says (`POST /v1/files`), and the part names the file by `id`. The server+ completes `name`, `media_type` and `bytes` from its own file store; a client's values for them+ are not read. The bytes of a part are read at their own address by whoever may read the record:++ ```http+ GET /v1/memories/{id}/records/{rid}/content/{index}+ ```++- **A string is shorthand** for one text part on a write. What is read back is always the list,+ so a client handles one shape.+- **A part may name who said it**: `role` is `user`, `assistant`, `system` or `tool`. A turn of a+ conversation is observed ([§5.1](#51-two-ways-to-write)) as it happened, each part under its+ role, files included, with no shape of its own.+- **A provider keeps what it says it keeps.** Its capability document lists the media types it+ keeps in `content.media` ([§10.2](#102-the-capability-document)). A write that carries a file of+ a media type the provider does not keep is refused with `memory_unsupported`; it is never stored+ without the file.+## 5. Operations```http@@ -366,16 +411,15 @@ out the condition that confines it, so the confinement cannot be in the statemen## 7. Files-A record's `content` may be a file. The server returns a reference with an opaque `version`; a-revision with new bytes is a new version of the record, and the earlier bytes remain readable-through `history` and `as_of` for as long as the provider keeps history.--```http-GET /v1/memories/{id}/records/{rid}/content[?version=…]-```+A file enters a memory as a part of a record's content ([§4.3](#43-content)): uploaded as+[Files](files.md) says, named in the part by its id, and read back at the part's own address. A+revision whose content names other files is a new version of the record; the earlier version keeps+naming the files it had, for as long as the provider keeps history and the server keeps the files.-Upload follows [Files](files.md): the bytes are sent with `POST /v1/files` and the-record names the file's id.+`content.bytes` in the provider's capability document says where the bytes live: `kept` when the+provider stores them itself, `referenced` when it keeps the reference and the bytes stay with the+server's file store, living as long as that file does. `content.describes` lists the media types+the provider writes a part's `text` for when the writer gave none.## 8. Types@@ -531,7 +575,8 @@ GET /v1/memories/providers"revise": "native", "forget": "native", "erase": { "unreachable": "reported" },"prime": true, "consolidate": "runs","queries": { "named": true, "free": { "languages": ["cypher"], "write": false } },- "types": true, "files": true+ "types": true,+ "content": { "media": ["text/*", "image/*"], "bytes": "referenced", "describes": ["image/*"] }} ] }```@@ -562,7 +607,7 @@ the differences are said, and three rules keep it honest:```A server that reports `memories: true` implements [§2](#2-the-memory-object) to [§6.3](#63-the-response)-and [§9](#9-attaching-memories-to-a-harness). Named and free queries, types, files, snapshots, consolidation runs and erase are+and [§9](#9-attaching-memories-to-a-harness). Named and free queries, types, the media a record's content may carry, snapshots, consolidation runs and erase arereported per provider ([§10.2](#102-the-capability-document)). A server that does not implement thechapter reports `false` or omits it and answers its endpoints with `404`.