diff --git a/swagger/docs.go b/swagger/docs.go index 5a860ef96d..b9dfb13d82 100644 --- a/swagger/docs.go +++ b/swagger/docs.go @@ -4471,7 +4471,7 @@ const docTemplate = `{ } }, "post": { - "description": "An agent is a definition: instructions and exact lists of the MCP servers, add-ons, collections and skills a chat with it may use. A chat gets what the lists name and you may use at that moment, never more. Start a chat with it by passing agent_id to POST /api/chats. folder {path, mode} gives the agent one folder of your files, read or write; without it the agent works on all your files.", + "description": "An agent is a definition: instructions and exact lists of the MCP servers, add-ons, collections and skills a chat with it may use. A chat gets what the lists name and you may use at that moment, never more. Start a chat with it by passing agent_id to POST /api/chats. folders [{path, mode}] gives the agent up to 8 folders of your files, each read or write (folder {path, mode} is the same with one entry); without them the agent works on all your files.", "tags": [ "chats" ], @@ -4505,7 +4505,7 @@ const docTemplate = `{ }, "/api/chats/agents/import": { "post": { - "description": "Send the export file (version 1, or 2 for an agent with a folder) as the JSON body, or as the file field of a multipart form. A bare agent definition (the body of POST /api/chats/agents) is accepted too. The agent is always new: a name you already use gets a number, and a model this server does not have, or you may not use, is dropped with a warning. A folder is looked up by its path in your files; when you have no such folder the agent keeps the mode without a folder (folder state unset) and does not start until you choose one, and a warning says so.", + "description": "Send the export file (version 1, 2 for an agent with a folder, or 3 for an agent with several) as the JSON body, or as the file field of a multipart form. A bare agent definition (the body of POST /api/chats/agents) is accepted too. The agent is always new: a name you already use gets a number, and a model this server does not have, or you may not use, is dropped with a warning. A folder is looked up by its path in your files; when you have no such folder the agent keeps the mode without a folder (folder state unset) and does not start until you choose one, and a warning says so.", "consumes": [ "application/json", "multipart/form-data" @@ -4622,7 +4622,7 @@ const docTemplate = `{ } }, "put": { - "description": "The body replaces every field but folder: a body without folder keeps the folder the agent has, so a client that does not know the field cannot widen the agent, and folder {path: \"\"} clears it. Chats that already run with the agent use the new definition from their next turn.", + "description": "The body replaces every field but folder: a body without folder or folders keeps the folders the agent has, so a client that does not know the fields cannot widen the agent, and folders [] (or folder {path: \"\"}) clears them. Chats that already run with the agent use the new definition from their next turn.", "tags": [ "chats" ], @@ -4696,7 +4696,7 @@ const docTemplate = `{ }, "/api/chats/agents/{id}/export": { "get": { - "description": "Returns the definition as a JSON file (version, kind localai-agent, agent). It holds no ID, owner or time. An agent with a folder is version 2 and carries folder {path, mode}, the folder's home-relative path now (empty when the folder is missing, not chosen, or outside your home, even if readable); importing an empty path preserves the scope as unset with a warning; a server that knows only version 1 refuses it. An agent without a folder is version 1. POST /api/chats/agents/import reads it. This replaces the old /api/agents/{name}/export.", + "description": "Returns the definition as a JSON file (version, kind localai-agent, agent). It holds no ID, owner or time. An agent with one folder is version 2 and carries folder {path, mode}; an agent with several is version 3 and carries folders [{path, mode}], the folder's home-relative path now (empty when the folder is missing, not chosen, or outside your home, even if readable); importing an empty path preserves the scope as unset with a warning; a server that knows only version 1 refuses it. An agent without a folder is version 1. POST /api/chats/agents/import reads it. This replaces the old /api/agents/{name}/export.", "tags": [ "chats" ], @@ -18743,6 +18743,21 @@ const docTemplate = `{ } ] }, + "folder_notice": { + "description": "FolderNotice is set when shared folders do not fit the access limit of\na chat of this agent and are left out.", + "allOf": [ + { + "$ref": "#/definitions/schema.ChatsAgentFolderNotice" + } + ] + }, + "folders": { + "description": "Folders are all the folders of the agent (at most 8), in order; Folder\nis the first of them. Absent for an agent that works on all your files.", + "type": "array", + "items": { + "$ref": "#/definitions/schema.ChatsAgentFolder" + } + }, "id": { "type": "string" }, @@ -18796,6 +18811,10 @@ const docTemplate = `{ "schema.ChatsAgentFolder": { "type": "object", "properties": { + "effective": { + "description": "Effective is the mode the folder has in a chat: read for a shared\nfolder, and the mode of the outer folder when the folder is inside\nanother folder of the same agent.", + "type": "string" + }, "mode": { "description": "Mode is read (the agent's chats can read the folder) or write (they can\nread and change it).", "type": "string" @@ -18814,6 +18833,14 @@ const docTemplate = `{ } } }, + "schema.ChatsAgentFolderNotice": { + "type": "object", + "properties": { + "not_mounted": { + "type": "integer" + } + } + }, "schema.ChatsAgentFolderWrite": { "type": "object", "properties": { @@ -18971,6 +18998,13 @@ const docTemplate = `{ } ] }, + "folders": { + "description": "Folders chooses up to 8 folders, each with its own mode. When both are\nsent, folders wins. A write without folders and folder keeps the folders\nthe agent has; \"folders\": [] clears them. Where a folder is inside\nanother one, it gets the outer folder's mode.", + "type": "array", + "items": { + "$ref": "#/definitions/schema.ChatsAgentFolderWrite" + } + }, "instructions": { "type": "string" }, diff --git a/swagger/swagger.json b/swagger/swagger.json index 0235805603..7b30c43230 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -4468,7 +4468,7 @@ } }, "post": { - "description": "An agent is a definition: instructions and exact lists of the MCP servers, add-ons, collections and skills a chat with it may use. A chat gets what the lists name and you may use at that moment, never more. Start a chat with it by passing agent_id to POST /api/chats. folder {path, mode} gives the agent one folder of your files, read or write; without it the agent works on all your files.", + "description": "An agent is a definition: instructions and exact lists of the MCP servers, add-ons, collections and skills a chat with it may use. A chat gets what the lists name and you may use at that moment, never more. Start a chat with it by passing agent_id to POST /api/chats. folders [{path, mode}] gives the agent up to 8 folders of your files, each read or write (folder {path, mode} is the same with one entry); without them the agent works on all your files.", "tags": [ "chats" ], @@ -4502,7 +4502,7 @@ }, "/api/chats/agents/import": { "post": { - "description": "Send the export file (version 1, or 2 for an agent with a folder) as the JSON body, or as the file field of a multipart form. A bare agent definition (the body of POST /api/chats/agents) is accepted too. The agent is always new: a name you already use gets a number, and a model this server does not have, or you may not use, is dropped with a warning. A folder is looked up by its path in your files; when you have no such folder the agent keeps the mode without a folder (folder state unset) and does not start until you choose one, and a warning says so.", + "description": "Send the export file (version 1, 2 for an agent with a folder, or 3 for an agent with several) as the JSON body, or as the file field of a multipart form. A bare agent definition (the body of POST /api/chats/agents) is accepted too. The agent is always new: a name you already use gets a number, and a model this server does not have, or you may not use, is dropped with a warning. A folder is looked up by its path in your files; when you have no such folder the agent keeps the mode without a folder (folder state unset) and does not start until you choose one, and a warning says so.", "consumes": [ "application/json", "multipart/form-data" @@ -4619,7 +4619,7 @@ } }, "put": { - "description": "The body replaces every field but folder: a body without folder keeps the folder the agent has, so a client that does not know the field cannot widen the agent, and folder {path: \"\"} clears it. Chats that already run with the agent use the new definition from their next turn.", + "description": "The body replaces every field but folder: a body without folder or folders keeps the folders the agent has, so a client that does not know the fields cannot widen the agent, and folders [] (or folder {path: \"\"}) clears them. Chats that already run with the agent use the new definition from their next turn.", "tags": [ "chats" ], @@ -4693,7 +4693,7 @@ }, "/api/chats/agents/{id}/export": { "get": { - "description": "Returns the definition as a JSON file (version, kind localai-agent, agent). It holds no ID, owner or time. An agent with a folder is version 2 and carries folder {path, mode}, the folder's home-relative path now (empty when the folder is missing, not chosen, or outside your home, even if readable); importing an empty path preserves the scope as unset with a warning; a server that knows only version 1 refuses it. An agent without a folder is version 1. POST /api/chats/agents/import reads it. This replaces the old /api/agents/{name}/export.", + "description": "Returns the definition as a JSON file (version, kind localai-agent, agent). It holds no ID, owner or time. An agent with one folder is version 2 and carries folder {path, mode}; an agent with several is version 3 and carries folders [{path, mode}], the folder's home-relative path now (empty when the folder is missing, not chosen, or outside your home, even if readable); importing an empty path preserves the scope as unset with a warning; a server that knows only version 1 refuses it. An agent without a folder is version 1. POST /api/chats/agents/import reads it. This replaces the old /api/agents/{name}/export.", "tags": [ "chats" ], @@ -18740,6 +18740,21 @@ } ] }, + "folder_notice": { + "description": "FolderNotice is set when shared folders do not fit the access limit of\na chat of this agent and are left out.", + "allOf": [ + { + "$ref": "#/definitions/schema.ChatsAgentFolderNotice" + } + ] + }, + "folders": { + "description": "Folders are all the folders of the agent (at most 8), in order; Folder\nis the first of them. Absent for an agent that works on all your files.", + "type": "array", + "items": { + "$ref": "#/definitions/schema.ChatsAgentFolder" + } + }, "id": { "type": "string" }, @@ -18793,6 +18808,10 @@ "schema.ChatsAgentFolder": { "type": "object", "properties": { + "effective": { + "description": "Effective is the mode the folder has in a chat: read for a shared\nfolder, and the mode of the outer folder when the folder is inside\nanother folder of the same agent.", + "type": "string" + }, "mode": { "description": "Mode is read (the agent's chats can read the folder) or write (they can\nread and change it).", "type": "string" @@ -18811,6 +18830,14 @@ } } }, + "schema.ChatsAgentFolderNotice": { + "type": "object", + "properties": { + "not_mounted": { + "type": "integer" + } + } + }, "schema.ChatsAgentFolderWrite": { "type": "object", "properties": { @@ -18968,6 +18995,13 @@ } ] }, + "folders": { + "description": "Folders chooses up to 8 folders, each with its own mode. When both are\nsent, folders wins. A write without folders and folder keeps the folders\nthe agent has; \"folders\": [] clears them. Where a folder is inside\nanother one, it gets the outer folder's mode.", + "type": "array", + "items": { + "$ref": "#/definitions/schema.ChatsAgentFolderWrite" + } + }, "instructions": { "type": "string" }, diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 30fd35644d..c2e82a9783 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -3116,6 +3116,19 @@ definitions: description: |- Folder is the one folder that chats with the agent work in. It is absent for an agent that works on all your files. + folder_notice: + allOf: + - $ref: '#/definitions/schema.ChatsAgentFolderNotice' + description: |- + FolderNotice is set when shared folders do not fit the access limit of + a chat of this agent and are left out. + folders: + description: |- + Folders are all the folders of the agent (at most 8), in order; Folder + is the first of them. Absent for an agent that works on all your files. + items: + $ref: '#/definitions/schema.ChatsAgentFolder' + type: array id: type: string instructions: @@ -3154,6 +3167,12 @@ definitions: type: object schema.ChatsAgentFolder: properties: + effective: + description: |- + Effective is the mode the folder has in a chat: read for a shared + folder, and the mode of the outer folder when the folder is inside + another folder of the same agent. + type: string mode: description: |- Mode is read (the agent's chats can read the folder) or write (they can @@ -3177,6 +3196,11 @@ definitions: not start. type: string type: object + schema.ChatsAgentFolderNotice: + properties: + not_mounted: + type: integer + type: object schema.ChatsAgentFolderWrite: properties: mode: @@ -3297,6 +3321,15 @@ definitions: an export file it is the home-relative path and mode when the file was made. A missing, unchosen or non-home folder has an empty export path; import preserves its mode as unset and warns instead of clearing scope. + folders: + description: |- + Folders chooses up to 8 folders, each with its own mode. When both are + sent, folders wins. A write without folders and folder keeps the folders + the agent has; "folders": [] clears them. Where a folder is inside + another one, it gets the outer folder's mode. + items: + $ref: '#/definitions/schema.ChatsAgentFolderWrite' + type: array instructions: type: string mcp_servers: @@ -14594,9 +14627,10 @@ paths: description: 'An agent is a definition: instructions and exact lists of the MCP servers, add-ons, collections and skills a chat with it may use. A chat gets what the lists name and you may use at that moment, never more. Start - a chat with it by passing agent_id to POST /api/chats. folder {path, mode} - gives the agent one folder of your files, read or write; without it the agent - works on all your files.' + a chat with it by passing agent_id to POST /api/chats. folders [{path, mode}] + gives the agent up to 8 folders of your files, each read or write (folder + {path, mode} is the same with one entry); without them the agent works on + all your files.' parameters: - description: the agent in: body @@ -14657,9 +14691,10 @@ paths: - chats put: description: 'The body replaces every field but folder: a body without folder - keeps the folder the agent has, so a client that does not know the field cannot - widen the agent, and folder {path: ""} clears it. Chats that already run with - the agent use the new definition from their next turn.' + or folders keeps the folders the agent has, so a client that does not know + the fields cannot widen the agent, and folders [] (or folder {path: ""}) clears + them. Chats that already run with the agent use the new definition from their + next turn.' parameters: - description: the agent's id in: path @@ -14691,8 +14726,9 @@ paths: /api/chats/agents/{id}/export: get: description: Returns the definition as a JSON file (version, kind localai-agent, - agent). It holds no ID, owner or time. An agent with a folder is version 2 - and carries folder {path, mode}, the folder's home-relative path now (empty + agent). It holds no ID, owner or time. An agent with one folder is version + 2 and carries folder {path, mode}; an agent with several is version 3 and + carries folders [{path, mode}], the folder's home-relative path now (empty when the folder is missing, not chosen, or outside your home, even if readable); importing an empty path preserves the scope as unset with a warning; a server that knows only version 1 refuses it. An agent without a folder is version @@ -14739,14 +14775,14 @@ paths: consumes: - application/json - multipart/form-data - description: 'Send the export file (version 1, or 2 for an agent with a folder) - as the JSON body, or as the file field of a multipart form. A bare agent definition - (the body of POST /api/chats/agents) is accepted too. The agent is always - new: a name you already use gets a number, and a model this server does not - have, or you may not use, is dropped with a warning. A folder is looked up - by its path in your files; when you have no such folder the agent keeps the - mode without a folder (folder state unset) and does not start until you choose - one, and a warning says so.' + description: 'Send the export file (version 1, 2 for an agent with a folder, + or 3 for an agent with several) as the JSON body, or as the file field of + a multipart form. A bare agent definition (the body of POST /api/chats/agents) + is accepted too. The agent is always new: a name you already use gets a number, + and a model this server does not have, or you may not use, is dropped with + a warning. A folder is looked up by its path in your files; when you have + no such folder the agent keeps the mode without a folder (folder state unset) + and does not start until you choose one, and a warning says so.' parameters: - description: the agent file in: body