fix: resolve confirmation (#2161)

This commit is contained in:
Yingjie He
2025-04-11 13:58:54 -07:00
committed by GitHub
parent 454e4a47f4
commit 79e65ec3de
10 changed files with 160 additions and 70 deletions
+59
View File
@@ -351,6 +351,40 @@
}
}
}
},
"/confirm": {
"post": {
"tags": [
"super::routes::reply"
],
"operationId": "confirm_permission",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PermissionConfirmationRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Permission action is confirmed",
"content": {
"application/json": {
"schema": {}
}
}
},
"401": {
"description": "Unauthorized - invalid secret key"
},
"500": {
"description": "Internal server error"
}
}
}
}
},
"components": {
@@ -635,6 +669,24 @@
}
}
},
"PermissionConfirmationRequest": {
"type": "object",
"required": [
"id",
"action"
],
"properties": {
"action": {
"type": "string"
},
"id": {
"type": "string"
},
"principal_type": {
"$ref": "#/components/schemas/PrincipalType"
}
}
},
"PermissionLevel": {
"type": "string",
"description": "Enum representing the possible permission levels for a tool.",
@@ -644,6 +696,13 @@
"never_allow"
]
},
"PrincipalType": {
"type": "string",
"enum": [
"Extension",
"Tool"
]
},
"ProviderDetails": {
"type": "object",
"required": [