feat(chat): refresh agent credentials during tool calls

This commit is contained in:
2026-08-06 10:16:50 +08:00
parent b4c96f8524
commit 5037089057
10 changed files with 590 additions and 3 deletions
+128
View File
@@ -109,6 +109,23 @@ export interface paths {
patch?: never;
trace?: never;
};
"/api/v1/agent/sessions/{session_id}/credential-refreshes": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
get?: never;
put?: never;
/** Resume a waiting agent tool call with refreshed credentials */
post: operations["post_sessions_session_id_credential_refreshes"];
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/v1/agent/sessions/{session_id}/permission-responses": {
parameters: {
query?: never;
@@ -1195,6 +1212,117 @@ export interface operations {
};
};
};
post_sessions_session_id_credential_refreshes: {
parameters: {
query?: never;
header?: never;
path: {
session_id: string;
};
cookie?: never;
};
requestBody?: {
content: {
"application/json": {
request_id: string;
};
};
};
responses: {
/** @description Successful response */
202: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
[key: string]: unknown;
};
};
};
/** @description Invalid request */
400: {
headers: {
[name: string]: unknown;
};
content: {
"application/problem+json": components["schemas"]["ProblemDetails"];
};
};
/** @description Authentication required */
401: {
headers: {
[name: string]: unknown;
};
content: {
"application/problem+json": components["schemas"]["ProblemDetails"];
};
};
/** @description Insufficient permission */
403: {
headers: {
[name: string]: unknown;
};
content: {
"application/problem+json": components["schemas"]["ProblemDetails"];
};
};
/** @description Resource not found */
404: {
headers: {
[name: string]: unknown;
};
content: {
"application/problem+json": components["schemas"]["ProblemDetails"];
};
};
/** @description Resource conflict */
409: {
headers: {
[name: string]: unknown;
};
content: {
"application/problem+json": components["schemas"]["ProblemDetails"];
};
};
/** @description Validation error */
422: {
headers: {
[name: string]: unknown;
};
content: {
"application/problem+json": components["schemas"]["ProblemDetails"];
};
};
/** @description Internal server error */
500: {
headers: {
[name: string]: unknown;
};
content: {
"application/problem+json": components["schemas"]["ProblemDetails"];
};
};
/** @description Upstream dependency error */
502: {
headers: {
[name: string]: unknown;
};
content: {
"application/problem+json": components["schemas"]["ProblemDetails"];
};
};
/** @description Dependency unavailable */
503: {
headers: {
[name: string]: unknown;
};
content: {
"application/problem+json": components["schemas"]["ProblemDetails"];
};
};
};
};
post_sessions_session_id_permission_responses: {
parameters: {
query?: never;