From c325b2b0028fdb4054365c3df040480a8f12cb30 Mon Sep 17 00:00:00 2001 From: Ari Webb Date: Mon, 23 Feb 2026 16:03:27 -0800 Subject: [PATCH] feat: add memfs file list and read endpoints to cloud-api [LET-7437] (#9520) * feat: add memfs file list and read endpoints to cloud-api * fix ci * add env var * tests and refactor memoryFilesRouter * rename env var * fix path parameter error * fix test * stage publish api * memfs in helm --- fern/openapi.json | 316 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 316 insertions(+) diff --git a/fern/openapi.json b/fern/openapi.json index 03fe544f..b30f6d08 100644 --- a/fern/openapi.json +++ b/fern/openapi.json @@ -24214,6 +24214,322 @@ } } }, + "/v1/agents/{agent_id}/memory-files/directory": { + "get": { + "description": "List immediate children of a directory in the agent memory repo (single level).", + "summary": "List Directory", + "tags": ["memoryFiles"], + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "path", + "in": "query", + "description": "Directory path to list. Empty for root.", + "schema": { + "type": "string" + } + }, + { + "name": "depth", + "in": "query", + "description": "Depth of directory listing (default: 1).", + "schema": { + "type": "number", + "nullable": true + } + }, + { + "name": "ref", + "in": "query", + "description": "Git ref (default: HEAD).", + "schema": { + "type": "string" + } + } + ], + "operationId": "memoryFiles.listDirectory", + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "entries": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string", + "enum": ["file", "directory"] + } + }, + "required": ["name", "type"] + } + }, + "depth": { + "type": "number" + } + }, + "required": ["path", "entries", "depth"] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"] + } + } + } + }, + "501": { + "description": "501", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"] + } + } + } + } + } + } + }, + "/v1/agents/{agent_id}/memory-files/history": { + "get": { + "description": "Get commit history for a specific file in the agent memory repo.", + "summary": "Get File History", + "tags": ["memoryFiles"], + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "file_path", + "in": "query", + "description": "Path to the file (e.g. \"blocks/persona.md\").", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "Max commits to return (default: 50).", + "schema": { + "type": "number", + "nullable": true + } + } + ], + "operationId": "memoryFiles.getFileHistory", + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "commits": { + "type": "array", + "items": { + "type": "object", + "properties": { + "sha": { + "type": "string" + }, + "message": { + "type": "string" + }, + "timestamp": { + "type": "string" + }, + "author_name": { + "type": "string", + "nullable": true + } + }, + "required": [ + "sha", + "message", + "timestamp", + "author_name" + ] + } + } + }, + "required": ["path", "commits"] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"] + } + } + } + }, + "501": { + "description": "501", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"] + } + } + } + } + } + } + }, + "/v1/agents/{agent_id}/memory-files/content": { + "get": { + "description": "Read a single file content at a specific git ref from the agent memory repo.", + "summary": "Read File Content", + "tags": ["memoryFiles"], + "parameters": [ + { + "name": "agent_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "file_path", + "in": "query", + "description": "Path to the file (e.g. \"blocks/persona.md\").", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "ref", + "in": "query", + "description": "Git ref (default: HEAD).", + "schema": { + "type": "string" + } + } + ], + "operationId": "memoryFiles.readFileContent", + "responses": { + "200": { + "description": "200", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "content": { + "type": "string" + }, + "ref": { + "type": "string" + } + }, + "required": ["path", "content", "ref"] + } + } + } + }, + "404": { + "description": "404", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"] + } + } + } + }, + "501": { + "description": "501", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": ["message"] + } + } + } + } + } + } + }, "/v1/pipelines": { "post": { "description": "Create a new pipeline (producer + feed + optionally subscribers)",