mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
feat: add media asset system, channel lifecycle refactor, and chat attachments (#54)
This commit is contained in:
+191
-90
@@ -2674,6 +2674,52 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"description": "Remove bot channel configuration",
|
||||
"tags": [
|
||||
"bots"
|
||||
],
|
||||
"summary": "Delete bot channel config",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Bot ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Channel platform",
|
||||
"name": "platform",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "No Content"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/bots/{id}/channel/{platform}/send": {
|
||||
@@ -2814,6 +2860,72 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/bots/{id}/channel/{platform}/status": {
|
||||
"patch": {
|
||||
"description": "Update bot channel enabled/disabled status",
|
||||
"tags": [
|
||||
"bots"
|
||||
],
|
||||
"summary": "Update bot channel status",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Bot ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Channel platform",
|
||||
"name": "platform",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Channel status payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/channel.UpdateChannelStatusRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/channel.ChannelConfig"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"403": {
|
||||
"description": "Forbidden",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/handlers.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/bots/{id}/checks": {
|
||||
"get": {
|
||||
"description": "Evaluate bot attached resource checks in runtime",
|
||||
@@ -2864,65 +2976,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/bots/{id}/checks/keys": {
|
||||
"get": {
|
||||
"description": "Returns all check keys available for a bot (builtin + MCP connections)",
|
||||
"tags": [
|
||||
"bots"
|
||||
],
|
||||
"summary": "List available check keys",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Bot ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/bots.ListCheckKeysResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/bots/{id}/checks/run/{key}": {
|
||||
"get": {
|
||||
"description": "Evaluate one check key for a bot",
|
||||
"tags": [
|
||||
"bots"
|
||||
],
|
||||
"summary": "Run a single bot check",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Bot ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Check key",
|
||||
"name": "key",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/bots.BotCheck"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/bots/{id}/members": {
|
||||
"get": {
|
||||
"description": "List members for a bot",
|
||||
@@ -4907,10 +4960,10 @@ const docTemplate = `{
|
||||
"bots.BotCheck": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"check_key": {
|
||||
"detail": {
|
||||
"type": "string"
|
||||
},
|
||||
"detail": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"metadata": {
|
||||
@@ -4920,8 +4973,17 @@ const docTemplate = `{
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"subtitle": {
|
||||
"type": "string"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string"
|
||||
},
|
||||
"title_key": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -4974,17 +5036,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"bots.ListCheckKeysResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"keys": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"bots.ListChecksResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -5064,6 +5115,13 @@ const docTemplate = `{
|
||||
"channel.Attachment": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"asset_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"base64": {
|
||||
"description": "data URL for agent delivery",
|
||||
"type": "string"
|
||||
},
|
||||
"caption": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -5197,6 +5255,9 @@ const docTemplate = `{
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"disabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"external_identity": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -5211,9 +5272,6 @@ const docTemplate = `{
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -5479,6 +5537,14 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"channel.UpdateChannelStatusRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"disabled": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"channel.UpsertChannelIdentityConfigRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -5495,6 +5561,9 @@ const docTemplate = `{
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"disabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"external_identity": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -5506,9 +5575,6 @@ const docTemplate = `{
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"verified_at": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -6334,6 +6400,12 @@ const docTemplate = `{
|
||||
"message.Message": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"assets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/message.MessageAsset"
|
||||
}
|
||||
},
|
||||
"bot_id": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -6382,21 +6454,56 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"message.MessageAsset": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"asset_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"duration_ms": {
|
||||
"type": "integer"
|
||||
},
|
||||
"height": {
|
||||
"type": "integer"
|
||||
},
|
||||
"media_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"mime": {
|
||||
"type": "string"
|
||||
},
|
||||
"ordinal": {
|
||||
"type": "integer"
|
||||
},
|
||||
"original_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string"
|
||||
},
|
||||
"size_bytes": {
|
||||
"type": "integer"
|
||||
},
|
||||
"storage_key": {
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.AddRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"dimensions": {
|
||||
"type": "integer"
|
||||
},
|
||||
"input": {
|
||||
"input_modalities": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"is_multimodal": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"llm_provider_id": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -6436,15 +6543,12 @@ const docTemplate = `{
|
||||
"dimensions": {
|
||||
"type": "integer"
|
||||
},
|
||||
"input": {
|
||||
"input_modalities": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"is_multimodal": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"llm_provider_id": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -6476,15 +6580,12 @@ const docTemplate = `{
|
||||
"dimensions": {
|
||||
"type": "integer"
|
||||
},
|
||||
"input": {
|
||||
"input_modalities": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"is_multimodal": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"llm_provider_id": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user