rework config

This commit is contained in:
Dax Raad
2025-06-18 22:20:03 -04:00
parent 1e8a681de9
commit e5e9b3e3c0
14 changed files with 785 additions and 203 deletions

View File

@@ -44,6 +44,25 @@
"description": "Get app info"
}
},
"/config_get": {
"post": {
"responses": {
"200": {
"description": "Get config info",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Config.Info"
}
}
}
}
},
"operationId": "postConfig_get",
"parameters": [],
"description": "Get config info"
}
},
"/app_initialize": {
"post": {
"responses": {
@@ -518,14 +537,14 @@
{
"$ref": "#/components/schemas/Event.message.part.updated"
},
{
"$ref": "#/components/schemas/Event.installation.updated"
},
{
"$ref": "#/components/schemas/Event.session.updated"
},
{
"$ref": "#/components/schemas/Event.session.error"
},
{
"$ref": "#/components/schemas/Event.installation.updated"
}
],
"discriminator": {
@@ -536,9 +555,9 @@
"permission.updated": "#/components/schemas/Event.permission.updated",
"message.updated": "#/components/schemas/Event.message.updated",
"message.part.updated": "#/components/schemas/Event.message.part.updated",
"installation.updated": "#/components/schemas/Event.installation.updated",
"session.updated": "#/components/schemas/Event.session.updated",
"session.error": "#/components/schemas/Event.session.error",
"installation.updated": "#/components/schemas/Event.installation.updated"
"session.error": "#/components/schemas/Event.session.error"
}
}
},
@@ -1182,6 +1201,30 @@
"properties"
]
},
"Event.installation.updated": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "installation.updated"
},
"properties": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
},
"required": [
"version"
]
}
},
"required": [
"type",
"properties"
]
},
"Event.session.updated": {
"type": "object",
"properties": {
@@ -1220,21 +1263,20 @@
"share": {
"type": "object",
"properties": {
"secret": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"secret",
"url"
]
},
"title": {
"type": "string"
},
"version": {
"type": "string"
},
"time": {
"type": "object",
"properties": {
@@ -1254,6 +1296,7 @@
"required": [
"id",
"title",
"version",
"time"
]
},
@@ -1292,30 +1335,6 @@
"properties"
]
},
"Event.installation.updated": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "installation.updated"
},
"properties": {
"type": "object",
"properties": {
"version": {
"type": "string"
}
},
"required": [
"version"
]
}
},
"required": [
"type",
"properties"
]
},
"App.Info": {
"type": "object",
"properties": {
@@ -1368,21 +1387,153 @@
"time"
]
},
"Error": {
"Config.Info": {
"type": "object",
"properties": {
"data": {
"$schema": {
"type": "string"
},
"theme": {
"type": "string"
},
"keybinds": {
"type": "object",
"additionalProperties": {}
"additionalProperties": {
"type": "string"
}
},
"autoshare": {
"type": "boolean"
},
"autoupdate": {
"type": "boolean"
},
"disabled_providers": {
"type": "array",
"items": {
"type": "string"
}
},
"provider": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"api": {
"type": "string"
},
"name": {
"type": "string"
},
"env": {
"type": "array",
"items": {
"type": "string"
}
},
"id": {
"type": "string"
},
"npm": {
"type": "string"
},
"models": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"attachment": {
"type": "boolean"
},
"reasoning": {
"type": "boolean"
},
"temperature": {
"type": "boolean"
},
"cost": {
"type": "object",
"properties": {
"input": {
"type": "number"
},
"output": {
"type": "number"
},
"cache_read": {
"type": "number"
},
"cache_write": {
"type": "number"
}
},
"required": [
"input",
"output"
]
},
"limit": {
"type": "object",
"properties": {
"context": {
"type": "number"
},
"output": {
"type": "number"
}
},
"required": [
"context",
"output"
]
},
"id": {
"type": "string"
}
}
}
},
"options": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"models"
]
}
},
"mcp": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"$ref": "#/components/schemas/Config.McpLocal"
},
{
"$ref": "#/components/schemas/Config.McpRemote"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"local": "#/components/schemas/Config.McpLocal",
"remote": "#/components/schemas/Config.McpRemote"
}
}
}
}
},
"required": [
"data"
]
}
},
"Provider.Info": {
"type": "object",
"properties": {
"api": {
"type": "string"
},
"name": {
"type": "string"
},
@@ -1436,18 +1587,16 @@
"output": {
"type": "number"
},
"inputCached": {
"cache_read": {
"type": "number"
},
"outputCached": {
"cache_write": {
"type": "number"
}
},
"required": [
"input",
"output",
"inputCached",
"outputCached"
"output"
]
},
"limit": {
@@ -1479,6 +1628,59 @@
"id"
]
},
"Config.McpLocal": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "local"
},
"command": {
"type": "array",
"items": {
"type": "string"
}
},
"environment": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"type",
"command"
]
},
"Config.McpRemote": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "remote"
},
"url": {
"type": "string"
}
},
"required": [
"type",
"url"
]
},
"Error": {
"type": "object",
"properties": {
"data": {
"type": "object",
"additionalProperties": {}
}
},
"required": [
"data"
]
},
"InstallationInfo": {
"type": "object",
"properties": {