diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.StopAgent.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ArchiveAgent.g.cs
similarity index 79%
rename from src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.StopAgent.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ArchiveAgent.g.cs
index da7d17d..f013975 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.StopAgent.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ArchiveAgent.g.cs
@@ -7,66 +7,66 @@ public partial class CursorAgentsClient
{
- private static readonly global::CursorAgents.EndPointSecurityRequirement s_StopAgentSecurityRequirement0 =
+ private static readonly global::CursorAgents.EndPointSecurityRequirement s_ArchiveAgentSecurityRequirement0 =
new global::CursorAgents.EndPointSecurityRequirement
{
Authorizations = new global::CursorAgents.EndPointAuthorizationRequirement[]
{ new global::CursorAgents.EndPointAuthorizationRequirement
{
Type = "Http",
- SchemeId = "BearerAuth",
+ SchemeId = "BasicAuth",
Location = "Header",
- Name = "Bearer",
- FriendlyName = "Bearer",
+ Name = "Basic",
+ FriendlyName = "Basic",
},
},
};
- private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_StopAgentSecurityRequirements =
+ private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_ArchiveAgentSecurityRequirements =
new global::CursorAgents.EndPointSecurityRequirement[]
- { s_StopAgentSecurityRequirement0,
+ { s_ArchiveAgentSecurityRequirement0,
};
- partial void PrepareStopAgentArguments(
+ partial void PrepareArchiveAgentArguments(
global::System.Net.Http.HttpClient httpClient,
ref string id);
- partial void PrepareStopAgentRequest(
+ partial void PrepareArchiveAgentRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string id);
- partial void ProcessStopAgentResponse(
+ partial void ProcessArchiveAgentResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
- partial void ProcessStopAgentResponseContent(
+ partial void ProcessArchiveAgentResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
///
- /// Stop an agent
- /// Stop a running cloud agent. This pauses the agent's execution without deleting it. Stopped agents cannot be resumed.
+ /// Archive an agent
+ /// Archive an agent. Archived agents remain readable but cannot accept new runs until unarchived.
///
///
- /// Example: bc_abc123
+ /// Example: bc-00000000-0000-0000-0000-000000000001
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- public async global::System.Threading.Tasks.Task StopAgentAsync(
+ public async global::System.Threading.Tasks.Task ArchiveAgentAsync(
string id,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
- PrepareStopAgentArguments(
+ PrepareArchiveAgentArguments(
httpClient: HttpClient,
id: ref id);
var __authorizations = global::CursorAgents.EndPointSecurityResolver.ResolveAuthorizations(
availableAuthorizations: Authorizations,
- securityRequirements: s_StopAgentSecurityRequirements,
- operationName: "StopAgentAsync");
+ securityRequirements: s_ArchiveAgentSecurityRequirements,
+ operationName: "ArchiveAgentAsync");
using var __timeoutCancellationTokenSource = global::CursorAgents.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
clientOptions: Options,
@@ -85,7 +85,7 @@ partial void ProcessStopAgentResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
var __pathBuilder = new global::CursorAgents.PathBuilder(
- path: $"/v0/agents/{id}/stop",
+ path: $"/v1/agents/{id}/archive",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
__path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -124,7 +124,7 @@ partial void ProcessStopAgentResponseContent(
PrepareRequest(
client: HttpClient,
request: __httpRequest);
- PrepareStopAgentRequest(
+ PrepareArchiveAgentRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
id: id);
@@ -144,9 +144,9 @@ partial void ProcessStopAgentResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "StopAgent",
- methodName: "StopAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}/stop\"",
+ operationId: "ArchiveAgent",
+ methodName: "ArchiveAgentAsync",
+ pathTemplate: "$\"/v1/agents/{id}/archive\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -171,9 +171,9 @@ partial void ProcessStopAgentResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "StopAgent",
- methodName: "StopAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}/stop\"",
+ operationId: "ArchiveAgent",
+ methodName: "ArchiveAgentAsync",
+ pathTemplate: "$\"/v1/agents/{id}/archive\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -206,9 +206,9 @@ partial void ProcessStopAgentResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "StopAgent",
- methodName: "StopAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}/stop\"",
+ operationId: "ArchiveAgent",
+ methodName: "ArchiveAgentAsync",
+ pathTemplate: "$\"/v1/agents/{id}/archive\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -245,7 +245,7 @@ partial void ProcessStopAgentResponseContent(
ProcessResponse(
client: HttpClient,
response: __response);
- ProcessStopAgentResponse(
+ ProcessArchiveAgentResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
if (__response.IsSuccessStatusCode)
@@ -253,9 +253,9 @@ partial void ProcessStopAgentResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "StopAgent",
- methodName: "StopAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}/stop\"",
+ operationId: "ArchiveAgent",
+ methodName: "ArchiveAgentAsync",
+ pathTemplate: "$\"/v1/agents/{id}/archive\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -273,9 +273,9 @@ partial void ProcessStopAgentResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "StopAgent",
- methodName: "StopAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}/stop\"",
+ operationId: "ArchiveAgent",
+ methodName: "ArchiveAgentAsync",
+ pathTemplate: "$\"/v1/agents/{id}/archive\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -288,45 +288,7 @@ partial void ProcessStopAgentResponseContent(
willRetry: false,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
- // Invalid request - bad agent ID format
- if ((int)__response.StatusCode == 400)
- {
- string? __content_400 = null;
- global::System.Exception? __exception_400 = null;
- global::CursorAgents.Error? __value_400 = null;
- try
- {
- if (__effectiveReadResponseAsString)
- {
- __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
- __value_400 = global::CursorAgents.Error.FromJson(__content_400, JsonSerializerContext);
- }
- else
- {
- __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
-
- __value_400 = global::CursorAgents.Error.FromJson(__content_400, JsonSerializerContext);
- }
- }
- catch (global::System.Exception __ex)
- {
- __exception_400 = __ex;
- }
-
- throw new global::CursorAgents.ApiException(
- message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
- innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseObject = __value_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
- __response.Headers,
- h => h.Key,
- h => h.Value),
- };
- }
- // Unauthorized - invalid or missing API key
+ // Invalid or missing API key.
if ((int)__response.StatusCode == 401)
{
string? __content_401 = null;
@@ -364,7 +326,7 @@ partial void ProcessStopAgentResponseContent(
h => h.Value),
};
}
- // Forbidden - insufficient permissions
+ // Authenticated but insufficient permissions, plan required, or feature unavailable.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
@@ -402,7 +364,7 @@ partial void ProcessStopAgentResponseContent(
h => h.Value),
};
}
- // Agent not found or access denied
+ // Agent or run not found.
if ((int)__response.StatusCode == 404)
{
string? __content_404 = null;
@@ -440,45 +402,7 @@ partial void ProcessStopAgentResponseContent(
h => h.Value),
};
}
- // Conflict - agent is deleted or archived
- if ((int)__response.StatusCode == 409)
- {
- string? __content_409 = null;
- global::System.Exception? __exception_409 = null;
- global::CursorAgents.Error? __value_409 = null;
- try
- {
- if (__effectiveReadResponseAsString)
- {
- __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
- __value_409 = global::CursorAgents.Error.FromJson(__content_409, JsonSerializerContext);
- }
- else
- {
- __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
-
- __value_409 = global::CursorAgents.Error.FromJson(__content_409, JsonSerializerContext);
- }
- }
- catch (global::System.Exception __ex)
- {
- __exception_409 = __ex;
- }
-
- throw new global::CursorAgents.ApiException(
- message: __content_409 ?? __response.ReasonPhrase ?? string.Empty,
- innerException: __exception_409,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_409,
- ResponseObject = __value_409,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
- __response.Headers,
- h => h.Key,
- h => h.Value),
- };
- }
- // Rate limit exceeded
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
@@ -516,7 +440,7 @@ partial void ProcessStopAgentResponseContent(
h => h.Value),
};
}
- // Internal server error
+ // Internal server error.
if ((int)__response.StatusCode == 500)
{
string? __content_500 = null;
@@ -567,7 +491,7 @@ partial void ProcessStopAgentResponseContent(
client: HttpClient,
response: __response,
content: ref __content);
- ProcessStopAgentResponseContent(
+ ProcessArchiveAgentResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);
@@ -577,7 +501,7 @@ partial void ProcessStopAgentResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::CursorAgents.StopAgentResponse.FromJson(__content, JsonSerializerContext) ??
+ global::CursorAgents.IdResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -607,7 +531,7 @@ partial void ProcessStopAgentResponseContent(
).ConfigureAwait(false);
return
- await global::CursorAgents.StopAgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::CursorAgents.IdResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.Authorizations.Bearer.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.Authorizations.Basic.g.cs
similarity index 51%
rename from src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.Authorizations.Bearer.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.Authorizations.Basic.g.cs
index 58d2ed0..d4cb14f 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.Authorizations.Bearer.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.Authorizations.Basic.g.cs
@@ -7,16 +7,18 @@ public sealed partial class CursorAgentsClient
{
///
- public void AuthorizeUsingBearer(
- string apiKey)
+ public void AuthorizeUsingBasic(
+ string username,
+ string password)
{
- apiKey = apiKey ?? throw new global::System.ArgumentNullException(nameof(apiKey));
+ username = username ?? throw new global::System.ArgumentNullException(nameof(username));
+ password = password ?? throw new global::System.ArgumentNullException(nameof(password));
for (var i = Authorizations.Count - 1; i >= 0; i--)
{
var __authorization = Authorizations[i];
if (__authorization.Type == "Http" &&
- __authorization.Name == "Bearer")
+ __authorization.Name == "Basic")
{
Authorizations.RemoveAt(i);
}
@@ -25,10 +27,11 @@ public void AuthorizeUsingBearer(
Authorizations.Add(new global::CursorAgents.EndPointAuthorization
{
Type = "Http",
- SchemeId = "BearerAuth",
+ SchemeId = "BasicAuth",
Location = "Header",
- Name = "Bearer",
- Value = apiKey,
+ Name = "Basic",
+ Value = global::System.Convert.ToBase64String(
+ global::System.Text.Encoding.UTF8.GetBytes($"{username}:{password}")),
});
}
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListAgentArtifacts.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CancelRun.g.cs
similarity index 86%
rename from src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListAgentArtifacts.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CancelRun.g.cs
index d6c64f9..f1958a3 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListAgentArtifacts.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CancelRun.g.cs
@@ -7,66 +7,77 @@ public partial class CursorAgentsClient
{
- private static readonly global::CursorAgents.EndPointSecurityRequirement s_ListAgentArtifactsSecurityRequirement0 =
+ private static readonly global::CursorAgents.EndPointSecurityRequirement s_CancelRunSecurityRequirement0 =
new global::CursorAgents.EndPointSecurityRequirement
{
Authorizations = new global::CursorAgents.EndPointAuthorizationRequirement[]
{ new global::CursorAgents.EndPointAuthorizationRequirement
{
Type = "Http",
- SchemeId = "BearerAuth",
+ SchemeId = "BasicAuth",
Location = "Header",
- Name = "Bearer",
- FriendlyName = "Bearer",
+ Name = "Basic",
+ FriendlyName = "Basic",
},
},
};
- private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_ListAgentArtifactsSecurityRequirements =
+ private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_CancelRunSecurityRequirements =
new global::CursorAgents.EndPointSecurityRequirement[]
- { s_ListAgentArtifactsSecurityRequirement0,
+ { s_CancelRunSecurityRequirement0,
};
- partial void PrepareListAgentArtifactsArguments(
+ partial void PrepareCancelRunArguments(
global::System.Net.Http.HttpClient httpClient,
- ref string id);
- partial void PrepareListAgentArtifactsRequest(
+ ref string id,
+ ref string runId);
+ partial void PrepareCancelRunRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
- string id);
- partial void ProcessListAgentArtifactsResponse(
+ string id,
+ string runId);
+ partial void ProcessCancelRunResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
- partial void ProcessListAgentArtifactsResponseContent(
+ partial void ProcessCancelRunResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
///
- /// List agent artifacts
- /// List artifacts generated by a cloud agent created within the last 6 months. Returns at most 100 artifacts.
+ /// Cancel a run
+ /// Cancel the active run for an agent. Cancellation is terminal —
+ /// the run transitions to `CANCELLED`. Cancelling a run that is
+ /// already terminal or was never active returns
+ /// `409 run_not_cancellable`. To continue the conversation,
+ /// create a new run on the same agent.
///
///
/// Example: bc-00000000-0000-0000-0000-000000000001
///
+ ///
+ /// Example: run-00000000-0000-0000-0000-000000000001
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- public async global::System.Threading.Tasks.Task ListAgentArtifactsAsync(
+ public async global::System.Threading.Tasks.Task CancelRunAsync(
string id,
+ string runId,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
- PrepareListAgentArtifactsArguments(
+ PrepareCancelRunArguments(
httpClient: HttpClient,
- id: ref id);
+ id: ref id,
+ runId: ref runId);
var __authorizations = global::CursorAgents.EndPointSecurityResolver.ResolveAuthorizations(
availableAuthorizations: Authorizations,
- securityRequirements: s_ListAgentArtifactsSecurityRequirements,
- operationName: "ListAgentArtifactsAsync");
+ securityRequirements: s_CancelRunSecurityRequirements,
+ operationName: "CancelRunAsync");
using var __timeoutCancellationTokenSource = global::CursorAgents.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
clientOptions: Options,
@@ -85,7 +96,7 @@ partial void ProcessListAgentArtifactsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
var __pathBuilder = new global::CursorAgents.PathBuilder(
- path: $"/v0/agents/{id}/artifacts",
+ path: $"/v1/agents/{id}/runs/{runId}/cancel",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
__path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -93,7 +104,7 @@ partial void ProcessListAgentArtifactsResponseContent(
clientParameters: Options.QueryParameters,
requestParameters: requestOptions?.QueryParameters);
var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
- method: global::System.Net.Http.HttpMethod.Get,
+ method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
#if NET6_0_OR_GREATER
__httpRequest.Version = global::System.Net.HttpVersion.Version11;
@@ -124,10 +135,11 @@ partial void ProcessListAgentArtifactsResponseContent(
PrepareRequest(
client: HttpClient,
request: __httpRequest);
- PrepareListAgentArtifactsRequest(
+ PrepareCancelRunRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
- id: id);
+ id: id,
+ runId: runId);
return __httpRequest;
}
@@ -144,10 +156,10 @@ partial void ProcessListAgentArtifactsResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "ListAgentArtifacts",
- methodName: "ListAgentArtifactsAsync",
- pathTemplate: "$\"/v0/agents/{id}/artifacts\"",
- httpMethod: "GET",
+ operationId: "CancelRun",
+ methodName: "CancelRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}/cancel\"",
+ httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
response: null,
@@ -171,10 +183,10 @@ partial void ProcessListAgentArtifactsResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "ListAgentArtifacts",
- methodName: "ListAgentArtifactsAsync",
- pathTemplate: "$\"/v0/agents/{id}/artifacts\"",
- httpMethod: "GET",
+ operationId: "CancelRun",
+ methodName: "CancelRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}/cancel\"",
+ httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
response: null,
@@ -206,10 +218,10 @@ partial void ProcessListAgentArtifactsResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "ListAgentArtifacts",
- methodName: "ListAgentArtifactsAsync",
- pathTemplate: "$\"/v0/agents/{id}/artifacts\"",
- httpMethod: "GET",
+ operationId: "CancelRun",
+ methodName: "CancelRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}/cancel\"",
+ httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
response: __response,
@@ -245,7 +257,7 @@ partial void ProcessListAgentArtifactsResponseContent(
ProcessResponse(
client: HttpClient,
response: __response);
- ProcessListAgentArtifactsResponse(
+ ProcessCancelRunResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
if (__response.IsSuccessStatusCode)
@@ -253,10 +265,10 @@ partial void ProcessListAgentArtifactsResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "ListAgentArtifacts",
- methodName: "ListAgentArtifactsAsync",
- pathTemplate: "$\"/v0/agents/{id}/artifacts\"",
- httpMethod: "GET",
+ operationId: "CancelRun",
+ methodName: "CancelRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}/cancel\"",
+ httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
response: __response,
@@ -273,10 +285,10 @@ partial void ProcessListAgentArtifactsResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "ListAgentArtifacts",
- methodName: "ListAgentArtifactsAsync",
- pathTemplate: "$\"/v0/agents/{id}/artifacts\"",
- httpMethod: "GET",
+ operationId: "CancelRun",
+ methodName: "CancelRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}/cancel\"",
+ httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
response: __response,
@@ -288,45 +300,7 @@ partial void ProcessListAgentArtifactsResponseContent(
willRetry: false,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
- // Invalid request - bad agent ID format or artifacts expired for an agent older than 6 months
- if ((int)__response.StatusCode == 400)
- {
- string? __content_400 = null;
- global::System.Exception? __exception_400 = null;
- global::CursorAgents.Error? __value_400 = null;
- try
- {
- if (__effectiveReadResponseAsString)
- {
- __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
- __value_400 = global::CursorAgents.Error.FromJson(__content_400, JsonSerializerContext);
- }
- else
- {
- __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
-
- __value_400 = global::CursorAgents.Error.FromJson(__content_400, JsonSerializerContext);
- }
- }
- catch (global::System.Exception __ex)
- {
- __exception_400 = __ex;
- }
-
- throw new global::CursorAgents.ApiException(
- message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
- innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseObject = __value_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
- __response.Headers,
- h => h.Key,
- h => h.Value),
- };
- }
- // Unauthorized - invalid or missing API key
+ // Invalid or missing API key.
if ((int)__response.StatusCode == 401)
{
string? __content_401 = null;
@@ -364,7 +338,7 @@ partial void ProcessListAgentArtifactsResponseContent(
h => h.Value),
};
}
- // Forbidden - insufficient permissions
+ // Authenticated but insufficient permissions, plan required, or feature unavailable.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
@@ -402,7 +376,7 @@ partial void ProcessListAgentArtifactsResponseContent(
h => h.Value),
};
}
- // Agent not found or access denied
+ // Agent or run not found.
if ((int)__response.StatusCode == 404)
{
string? __content_404 = null;
@@ -440,7 +414,45 @@ partial void ProcessListAgentArtifactsResponseContent(
h => h.Value),
};
}
- // Rate limit exceeded
+ // Resource state conflict (`agent_busy`, `agent_archived`, or `run_not_cancellable`).
+ if ((int)__response.StatusCode == 409)
+ {
+ string? __content_409 = null;
+ global::System.Exception? __exception_409 = null;
+ global::CursorAgents.Error? __value_409 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_409 = global::CursorAgents.Error.FromJson(__content_409, JsonSerializerContext);
+ }
+ else
+ {
+ __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_409 = global::CursorAgents.Error.FromJson(__content_409, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_409 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_409 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_409,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_409,
+ ResponseObject = __value_409,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
@@ -478,7 +490,7 @@ partial void ProcessListAgentArtifactsResponseContent(
h => h.Value),
};
}
- // Internal server error
+ // Internal server error.
if ((int)__response.StatusCode == 500)
{
string? __content_500 = null;
@@ -529,7 +541,7 @@ partial void ProcessListAgentArtifactsResponseContent(
client: HttpClient,
response: __response,
content: ref __content);
- ProcessListAgentArtifactsResponseContent(
+ ProcessCancelRunResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);
@@ -539,7 +551,7 @@ partial void ProcessListAgentArtifactsResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::CursorAgents.ListArtifactsResponse.FromJson(__content, JsonSerializerContext) ??
+ global::CursorAgents.IdResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -569,7 +581,7 @@ partial void ProcessListAgentArtifactsResponseContent(
).ConfigureAwait(false);
return
- await global::CursorAgents.ListArtifactsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::CursorAgents.IdResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.Constructors.Bearer.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.Constructors.Basic.g.cs
similarity index 79%
rename from src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.Constructors.Bearer.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.Constructors.Basic.g.cs
index 7e5bbc3..3ea8cd7 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.Constructors.Bearer.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.Constructors.Basic.g.cs
@@ -8,22 +8,24 @@ public sealed partial class CursorAgentsClient
///
public CursorAgentsClient(
- string apiKey,
+ string username,
+ string password,
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null,
global::System.Collections.Generic.List? authorizations = null,
bool disposeHttpClient = true) : this(httpClient, baseUri, authorizations, disposeHttpClient)
{
- Authorizing(HttpClient, ref apiKey);
+ Authorizing(HttpClient, ref username, ref password);
- AuthorizeUsingBearer(apiKey);
+ AuthorizeUsingBasic(username, password);
Authorized(HttpClient);
}
partial void Authorizing(
global::System.Net.Http.HttpClient client,
- ref string apiKey);
+ ref string username,
+ ref string password);
partial void Authorized(
global::System.Net.Http.HttpClient client);
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateAgent.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateAgent.g.cs
index 856ac4f..06e61d6 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateAgent.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateAgent.g.cs
@@ -14,10 +14,10 @@ public partial class CursorAgentsClient
{ new global::CursorAgents.EndPointAuthorizationRequirement
{
Type = "Http",
- SchemeId = "BearerAuth",
+ SchemeId = "BasicAuth",
Location = "Header",
- Name = "Bearer",
- FriendlyName = "Bearer",
+ Name = "Basic",
+ FriendlyName = "Basic",
},
},
};
@@ -42,8 +42,10 @@ partial void ProcessCreateAgentResponseContent(
ref string content);
///
- /// Launch an agent
- /// Start a new cloud agent to work on your repository
+ /// Create an agent
+ /// Create a Cloud Agent and immediately enqueue its initial run.
+ /// The response contains both the durable `agent` and the initial
+ /// `run`.
///
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
@@ -86,7 +88,7 @@ partial void ProcessCreateAgentResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
var __pathBuilder = new global::CursorAgents.PathBuilder(
- path: "/v0/agents",
+ path: "/v1/agents",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
__path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -153,7 +155,7 @@ partial void ProcessCreateAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "CreateAgent",
methodName: "CreateAgentAsync",
- pathTemplate: "\"/v0/agents\"",
+ pathTemplate: "\"/v1/agents\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -180,7 +182,7 @@ partial void ProcessCreateAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "CreateAgent",
methodName: "CreateAgentAsync",
- pathTemplate: "\"/v0/agents\"",
+ pathTemplate: "\"/v1/agents\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -215,7 +217,7 @@ partial void ProcessCreateAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "CreateAgent",
methodName: "CreateAgentAsync",
- pathTemplate: "\"/v0/agents\"",
+ pathTemplate: "\"/v1/agents\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -262,7 +264,7 @@ partial void ProcessCreateAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "CreateAgent",
methodName: "CreateAgentAsync",
- pathTemplate: "\"/v0/agents\"",
+ pathTemplate: "\"/v1/agents\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -282,7 +284,7 @@ partial void ProcessCreateAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "CreateAgent",
methodName: "CreateAgentAsync",
- pathTemplate: "\"/v0/agents\"",
+ pathTemplate: "\"/v1/agents\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -295,7 +297,7 @@ partial void ProcessCreateAgentResponseContent(
willRetry: false,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
- // Invalid request
+ // Validation error or malformed request body.
if ((int)__response.StatusCode == 400)
{
string? __content_400 = null;
@@ -333,7 +335,7 @@ partial void ProcessCreateAgentResponseContent(
h => h.Value),
};
}
- // Unauthorized - invalid or missing API key
+ // Invalid or missing API key.
if ((int)__response.StatusCode == 401)
{
string? __content_401 = null;
@@ -371,7 +373,7 @@ partial void ProcessCreateAgentResponseContent(
h => h.Value),
};
}
- // Forbidden - insufficient permissions, plan limits exceeded, or storage full
+ // Authenticated but insufficient permissions, plan required, or feature unavailable.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
@@ -409,7 +411,7 @@ partial void ProcessCreateAgentResponseContent(
h => h.Value),
};
}
- // Rate limit exceeded
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
@@ -447,7 +449,7 @@ partial void ProcessCreateAgentResponseContent(
h => h.Value),
};
}
- // Internal server error
+ // Internal server error.
if ((int)__response.StatusCode == 500)
{
string? __content_500 = null;
@@ -578,26 +580,43 @@ partial void ProcessCreateAgentResponseContent(
}
}
///
- /// Launch an agent
- /// Start a new cloud agent to work on your repository
+ /// Create an agent
+ /// Create a Cloud Agent and immediately enqueue its initial run.
+ /// The response contains both the durable `agent` and the initial
+ /// `run`.
///
///
- ///
- /// Set to an explicit model ID for launch requests, or use "default" to use the configured default model. When omitted, Cursor resolves your user default model, then your team default model, then a system default.
- /// Example: claude-4-sonnet
+ ///
+ ///
+ /// Repository configuration. v1 currently supports one entry.
+ ///
+ ///
+ /// Custom branch name for the agent to create.
+ /// Example: feature/add-readme
+ ///
+ ///
+ /// Whether to create a new branch (true) or push to an existing head branch (false). Only applies when `repos[0].prUrl` is provided.
+ /// Default Value: true
+ ///
+ ///
+ /// Whether Cursor should open a pull request when the run completes.
+ /// Default Value: false
+ ///
+ ///
+ /// Whether to skip requesting the user as a reviewer when Cursor opens a PR. Only applies when `autoCreatePR` is true.
+ /// Default Value: false
///
- ///
- ///
- ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
public async global::System.Threading.Tasks.Task CreateAgentAsync(
global::CursorAgents.CreateAgentRequestPrompt prompt,
- global::CursorAgents.CreateAgentRequestSource source,
- string? model = default,
- global::CursorAgents.CreateAgentRequestTarget? target = default,
- global::CursorAgents.CreateAgentRequestWebhook? webhook = default,
+ global::System.Collections.Generic.IList repos,
+ global::CursorAgents.ModelRef? model = default,
+ string? branchName = default,
+ bool? autoGenerateBranch = default,
+ bool? autoCreatePR = default,
+ bool? skipReviewerRequest = default,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -605,9 +624,11 @@ partial void ProcessCreateAgentResponseContent(
{
Prompt = prompt,
Model = model,
- Source = source,
- Target = target,
- Webhook = webhook,
+ Repos = repos,
+ BranchName = branchName,
+ AutoGenerateBranch = autoGenerateBranch,
+ AutoCreatePR = autoCreatePR,
+ SkipReviewerRequest = skipReviewerRequest,
};
return await CreateAgentAsync(
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.AddFollowup.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateRun.g.cs
similarity index 90%
rename from src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.AddFollowup.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateRun.g.cs
index ee95674..8c0b675 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.AddFollowup.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateRun.g.cs
@@ -7,57 +7,59 @@ public partial class CursorAgentsClient
{
- private static readonly global::CursorAgents.EndPointSecurityRequirement s_AddFollowupSecurityRequirement0 =
+ private static readonly global::CursorAgents.EndPointSecurityRequirement s_CreateRunSecurityRequirement0 =
new global::CursorAgents.EndPointSecurityRequirement
{
Authorizations = new global::CursorAgents.EndPointAuthorizationRequirement[]
{ new global::CursorAgents.EndPointAuthorizationRequirement
{
Type = "Http",
- SchemeId = "BearerAuth",
+ SchemeId = "BasicAuth",
Location = "Header",
- Name = "Bearer",
- FriendlyName = "Bearer",
+ Name = "Basic",
+ FriendlyName = "Basic",
},
},
};
- private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_AddFollowupSecurityRequirements =
+ private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_CreateRunSecurityRequirements =
new global::CursorAgents.EndPointSecurityRequirement[]
- { s_AddFollowupSecurityRequirement0,
+ { s_CreateRunSecurityRequirement0,
};
- partial void PrepareAddFollowupArguments(
+ partial void PrepareCreateRunArguments(
global::System.Net.Http.HttpClient httpClient,
ref string id,
- global::CursorAgents.AddFollowupRequest request);
- partial void PrepareAddFollowupRequest(
+ global::CursorAgents.CreateRunRequest request);
+ partial void PrepareCreateRunRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string id,
- global::CursorAgents.AddFollowupRequest request);
- partial void ProcessAddFollowupResponse(
+ global::CursorAgents.CreateRunRequest request);
+ partial void ProcessCreateRunResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
- partial void ProcessAddFollowupResponseContent(
+ partial void ProcessCreateRunResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
///
- /// Add followup
- /// Add a followup instruction to an existing cloud agent
+ /// Create a run
+ /// Send a follow-up prompt to an existing active agent. The new
+ /// run uses the agent's current conversation and workspace state.
+ /// Only one run can be active per agent at a time.
///
///
- /// Example: bc_abc123
+ /// Example: bc-00000000-0000-0000-0000-000000000001
///
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- public async global::System.Threading.Tasks.Task AddFollowupAsync(
+ public async global::System.Threading.Tasks.Task CreateRunAsync(
string id,
- global::CursorAgents.AddFollowupRequest request,
+ global::CursorAgents.CreateRunRequest request,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -65,7 +67,7 @@ partial void ProcessAddFollowupResponseContent(
PrepareArguments(
client: HttpClient);
- PrepareAddFollowupArguments(
+ PrepareCreateRunArguments(
httpClient: HttpClient,
id: ref id,
request: request);
@@ -73,8 +75,8 @@ partial void ProcessAddFollowupResponseContent(
var __authorizations = global::CursorAgents.EndPointSecurityResolver.ResolveAuthorizations(
availableAuthorizations: Authorizations,
- securityRequirements: s_AddFollowupSecurityRequirements,
- operationName: "AddFollowupAsync");
+ securityRequirements: s_CreateRunSecurityRequirements,
+ operationName: "CreateRunAsync");
using var __timeoutCancellationTokenSource = global::CursorAgents.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
clientOptions: Options,
@@ -93,7 +95,7 @@ partial void ProcessAddFollowupResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
var __pathBuilder = new global::CursorAgents.PathBuilder(
- path: $"/v0/agents/{id}/followup",
+ path: $"/v1/agents/{id}/runs",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
__path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -138,7 +140,7 @@ partial void ProcessAddFollowupResponseContent(
PrepareRequest(
client: HttpClient,
request: __httpRequest);
- PrepareAddFollowupRequest(
+ PrepareCreateRunRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
id: id,
@@ -159,9 +161,9 @@ partial void ProcessAddFollowupResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "AddFollowup",
- methodName: "AddFollowupAsync",
- pathTemplate: "$\"/v0/agents/{id}/followup\"",
+ operationId: "CreateRun",
+ methodName: "CreateRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -186,9 +188,9 @@ partial void ProcessAddFollowupResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "AddFollowup",
- methodName: "AddFollowupAsync",
- pathTemplate: "$\"/v0/agents/{id}/followup\"",
+ operationId: "CreateRun",
+ methodName: "CreateRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -221,9 +223,9 @@ partial void ProcessAddFollowupResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "AddFollowup",
- methodName: "AddFollowupAsync",
- pathTemplate: "$\"/v0/agents/{id}/followup\"",
+ operationId: "CreateRun",
+ methodName: "CreateRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -260,7 +262,7 @@ partial void ProcessAddFollowupResponseContent(
ProcessResponse(
client: HttpClient,
response: __response);
- ProcessAddFollowupResponse(
+ ProcessCreateRunResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
if (__response.IsSuccessStatusCode)
@@ -268,9 +270,9 @@ partial void ProcessAddFollowupResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "AddFollowup",
- methodName: "AddFollowupAsync",
- pathTemplate: "$\"/v0/agents/{id}/followup\"",
+ operationId: "CreateRun",
+ methodName: "CreateRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -288,9 +290,9 @@ partial void ProcessAddFollowupResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "AddFollowup",
- methodName: "AddFollowupAsync",
- pathTemplate: "$\"/v0/agents/{id}/followup\"",
+ operationId: "CreateRun",
+ methodName: "CreateRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs\"",
httpMethod: "POST",
baseUri: BaseUri,
request: __httpRequest!,
@@ -303,7 +305,7 @@ partial void ProcessAddFollowupResponseContent(
willRetry: false,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
- // Invalid request - bad agent ID format or invalid request body
+ // Validation error or malformed request body.
if ((int)__response.StatusCode == 400)
{
string? __content_400 = null;
@@ -341,7 +343,7 @@ partial void ProcessAddFollowupResponseContent(
h => h.Value),
};
}
- // Unauthorized - invalid or missing API key
+ // Invalid or missing API key.
if ((int)__response.StatusCode == 401)
{
string? __content_401 = null;
@@ -379,7 +381,7 @@ partial void ProcessAddFollowupResponseContent(
h => h.Value),
};
}
- // Forbidden - insufficient permissions
+ // Authenticated but insufficient permissions, plan required, or feature unavailable.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
@@ -417,7 +419,7 @@ partial void ProcessAddFollowupResponseContent(
h => h.Value),
};
}
- // Agent not found or access denied
+ // Agent or run not found.
if ((int)__response.StatusCode == 404)
{
string? __content_404 = null;
@@ -455,7 +457,7 @@ partial void ProcessAddFollowupResponseContent(
h => h.Value),
};
}
- // Conflict - agent is deleted or archived
+ // Resource state conflict (`agent_busy`, `agent_archived`, or `run_not_cancellable`).
if ((int)__response.StatusCode == 409)
{
string? __content_409 = null;
@@ -493,7 +495,7 @@ partial void ProcessAddFollowupResponseContent(
h => h.Value),
};
}
- // Rate limit exceeded
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
@@ -531,7 +533,7 @@ partial void ProcessAddFollowupResponseContent(
h => h.Value),
};
}
- // Internal server error
+ // Internal server error.
if ((int)__response.StatusCode == 500)
{
string? __content_500 = null;
@@ -582,7 +584,7 @@ partial void ProcessAddFollowupResponseContent(
client: HttpClient,
response: __response,
content: ref __content);
- ProcessAddFollowupResponseContent(
+ ProcessCreateRunResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);
@@ -592,7 +594,7 @@ partial void ProcessAddFollowupResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::CursorAgents.AddFollowupResponse.FromJson(__content, JsonSerializerContext) ??
+ global::CursorAgents.CreateRunResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -622,7 +624,7 @@ partial void ProcessAddFollowupResponseContent(
).ConfigureAwait(false);
return
- await global::CursorAgents.AddFollowupResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::CursorAgents.CreateRunResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
@@ -662,28 +664,30 @@ partial void ProcessAddFollowupResponseContent(
}
}
///
- /// Add followup
- /// Add a followup instruction to an existing cloud agent
+ /// Create a run
+ /// Send a follow-up prompt to an existing active agent. The new
+ /// run uses the agent's current conversation and workspace state.
+ /// Only one run can be active per agent at a time.
///
///
- /// Example: bc_abc123
+ /// Example: bc-00000000-0000-0000-0000-000000000001
///
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- public async global::System.Threading.Tasks.Task AddFollowupAsync(
+ public async global::System.Threading.Tasks.Task CreateRunAsync(
string id,
- global::CursorAgents.AddFollowupRequestPrompt prompt,
+ global::CursorAgents.CreateRunRequestPrompt prompt,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
- var __request = new global::CursorAgents.AddFollowupRequest
+ var __request = new global::CursorAgents.CreateRunRequest
{
Prompt = prompt,
};
- return await AddFollowupAsync(
+ return await CreateRunAsync(
id: id,
request: __request,
requestOptions: requestOptions,
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.DeleteAgent.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.DeleteAgent.g.cs
index 177f0d4..0937302 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.DeleteAgent.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.DeleteAgent.g.cs
@@ -14,10 +14,10 @@ public partial class CursorAgentsClient
{ new global::CursorAgents.EndPointAuthorizationRequirement
{
Type = "Http",
- SchemeId = "BearerAuth",
+ SchemeId = "BasicAuth",
Location = "Header",
- Name = "Bearer",
- FriendlyName = "Bearer",
+ Name = "Basic",
+ FriendlyName = "Basic",
},
},
};
@@ -42,16 +42,16 @@ partial void ProcessDeleteAgentResponseContent(
ref string content);
///
- /// Delete an agent
- /// Delete a cloud agent. This action is permanent and cannot be undone.
+ /// Delete an agent permanently
+ /// Permanently delete an agent. This action is irreversible. Use POST /v1/agents/{id}/archive for reversible removal.
///
///
- /// Example: bc_abc123
+ /// Example: bc-00000000-0000-0000-0000-000000000001
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- public async global::System.Threading.Tasks.Task DeleteAgentAsync(
+ public async global::System.Threading.Tasks.Task DeleteAgentAsync(
string id,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -85,7 +85,7 @@ partial void ProcessDeleteAgentResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
var __pathBuilder = new global::CursorAgents.PathBuilder(
- path: $"/v0/agents/{id}",
+ path: $"/v1/agents/{id}",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
__path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -146,7 +146,7 @@ partial void ProcessDeleteAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "DeleteAgent",
methodName: "DeleteAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}\"",
+ pathTemplate: "$\"/v1/agents/{id}\"",
httpMethod: "DELETE",
baseUri: BaseUri,
request: __httpRequest!,
@@ -173,7 +173,7 @@ partial void ProcessDeleteAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "DeleteAgent",
methodName: "DeleteAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}\"",
+ pathTemplate: "$\"/v1/agents/{id}\"",
httpMethod: "DELETE",
baseUri: BaseUri,
request: __httpRequest!,
@@ -208,7 +208,7 @@ partial void ProcessDeleteAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "DeleteAgent",
methodName: "DeleteAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}\"",
+ pathTemplate: "$\"/v1/agents/{id}\"",
httpMethod: "DELETE",
baseUri: BaseUri,
request: __httpRequest!,
@@ -255,7 +255,7 @@ partial void ProcessDeleteAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "DeleteAgent",
methodName: "DeleteAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}\"",
+ pathTemplate: "$\"/v1/agents/{id}\"",
httpMethod: "DELETE",
baseUri: BaseUri,
request: __httpRequest!,
@@ -275,7 +275,7 @@ partial void ProcessDeleteAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "DeleteAgent",
methodName: "DeleteAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}\"",
+ pathTemplate: "$\"/v1/agents/{id}\"",
httpMethod: "DELETE",
baseUri: BaseUri,
request: __httpRequest!,
@@ -288,45 +288,7 @@ partial void ProcessDeleteAgentResponseContent(
willRetry: false,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
- // Invalid request - bad agent ID format
- if ((int)__response.StatusCode == 400)
- {
- string? __content_400 = null;
- global::System.Exception? __exception_400 = null;
- global::CursorAgents.Error? __value_400 = null;
- try
- {
- if (__effectiveReadResponseAsString)
- {
- __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
- __value_400 = global::CursorAgents.Error.FromJson(__content_400, JsonSerializerContext);
- }
- else
- {
- __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
-
- __value_400 = global::CursorAgents.Error.FromJson(__content_400, JsonSerializerContext);
- }
- }
- catch (global::System.Exception __ex)
- {
- __exception_400 = __ex;
- }
-
- throw new global::CursorAgents.ApiException(
- message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
- innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseObject = __value_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
- __response.Headers,
- h => h.Key,
- h => h.Value),
- };
- }
- // Unauthorized - invalid or missing API key
+ // Invalid or missing API key.
if ((int)__response.StatusCode == 401)
{
string? __content_401 = null;
@@ -364,7 +326,7 @@ partial void ProcessDeleteAgentResponseContent(
h => h.Value),
};
}
- // Forbidden - insufficient permissions
+ // Authenticated but insufficient permissions, plan required, or feature unavailable.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
@@ -402,7 +364,7 @@ partial void ProcessDeleteAgentResponseContent(
h => h.Value),
};
}
- // Agent not found or access denied
+ // Agent or run not found.
if ((int)__response.StatusCode == 404)
{
string? __content_404 = null;
@@ -440,45 +402,7 @@ partial void ProcessDeleteAgentResponseContent(
h => h.Value),
};
}
- // Conflict - agent is deleted or archived
- if ((int)__response.StatusCode == 409)
- {
- string? __content_409 = null;
- global::System.Exception? __exception_409 = null;
- global::CursorAgents.Error? __value_409 = null;
- try
- {
- if (__effectiveReadResponseAsString)
- {
- __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
- __value_409 = global::CursorAgents.Error.FromJson(__content_409, JsonSerializerContext);
- }
- else
- {
- __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
-
- __value_409 = global::CursorAgents.Error.FromJson(__content_409, JsonSerializerContext);
- }
- }
- catch (global::System.Exception __ex)
- {
- __exception_409 = __ex;
- }
-
- throw new global::CursorAgents.ApiException(
- message: __content_409 ?? __response.ReasonPhrase ?? string.Empty,
- innerException: __exception_409,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_409,
- ResponseObject = __value_409,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
- __response.Headers,
- h => h.Key,
- h => h.Value),
- };
- }
- // Rate limit exceeded
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
@@ -516,7 +440,7 @@ partial void ProcessDeleteAgentResponseContent(
h => h.Value),
};
}
- // Internal server error
+ // Internal server error.
if ((int)__response.StatusCode == 500)
{
string? __content_500 = null;
@@ -577,7 +501,7 @@ partial void ProcessDeleteAgentResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::CursorAgents.DeleteAgentResponse.FromJson(__content, JsonSerializerContext) ??
+ global::CursorAgents.IdResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -607,7 +531,7 @@ partial void ProcessDeleteAgentResponseContent(
).ConfigureAwait(false);
return
- await global::CursorAgents.DeleteAgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::CursorAgents.IdResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetAgentArtifact.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.DownloadArtifact.g.cs
similarity index 91%
rename from src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetAgentArtifact.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.DownloadArtifact.g.cs
index f49f512..f117b13 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetAgentArtifact.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.DownloadArtifact.g.cs
@@ -7,56 +7,58 @@ public partial class CursorAgentsClient
{
- private static readonly global::CursorAgents.EndPointSecurityRequirement s_GetAgentArtifactSecurityRequirement0 =
+ private static readonly global::CursorAgents.EndPointSecurityRequirement s_DownloadArtifactSecurityRequirement0 =
new global::CursorAgents.EndPointSecurityRequirement
{
Authorizations = new global::CursorAgents.EndPointAuthorizationRequirement[]
{ new global::CursorAgents.EndPointAuthorizationRequirement
{
Type = "Http",
- SchemeId = "BearerAuth",
+ SchemeId = "BasicAuth",
Location = "Header",
- Name = "Bearer",
- FriendlyName = "Bearer",
+ Name = "Basic",
+ FriendlyName = "Basic",
},
},
};
- private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_GetAgentArtifactSecurityRequirements =
+ private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_DownloadArtifactSecurityRequirements =
new global::CursorAgents.EndPointSecurityRequirement[]
- { s_GetAgentArtifactSecurityRequirement0,
+ { s_DownloadArtifactSecurityRequirement0,
};
- partial void PrepareGetAgentArtifactArguments(
+ partial void PrepareDownloadArtifactArguments(
global::System.Net.Http.HttpClient httpClient,
ref string id,
ref string path);
- partial void PrepareGetAgentArtifactRequest(
+ partial void PrepareDownloadArtifactRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string id,
string path);
- partial void ProcessGetAgentArtifactResponse(
+ partial void ProcessDownloadArtifactResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
- partial void ProcessGetAgentArtifactResponseContent(
+ partial void ProcessDownloadArtifactResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
///
/// Download an artifact
- /// Retrieve a temporary 15-minute presigned S3 URL for a specific artifact from an agent created within the last 6 months. The response includes both the URL and its expiration time.
+ /// Retrieve a temporary 15-minute presigned S3 URL for an
+ /// artifact. The `path` query parameter must be a relative path
+ /// under `artifacts/` returned by GET /v1/agents/{id}/artifacts.
///
///
/// Example: bc-00000000-0000-0000-0000-000000000001
///
///
- /// Example: /opt/cursor/artifacts/screenshot.png
+ /// Example: artifacts/screenshot.png
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- public async global::System.Threading.Tasks.Task GetAgentArtifactAsync(
+ public async global::System.Threading.Tasks.Task DownloadArtifactAsync(
string id,
string path,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
@@ -64,7 +66,7 @@ partial void ProcessGetAgentArtifactResponseContent(
{
PrepareArguments(
client: HttpClient);
- PrepareGetAgentArtifactArguments(
+ PrepareDownloadArtifactArguments(
httpClient: HttpClient,
id: ref id,
path: ref path);
@@ -72,8 +74,8 @@ partial void ProcessGetAgentArtifactResponseContent(
var __authorizations = global::CursorAgents.EndPointSecurityResolver.ResolveAuthorizations(
availableAuthorizations: Authorizations,
- securityRequirements: s_GetAgentArtifactSecurityRequirements,
- operationName: "GetAgentArtifactAsync");
+ securityRequirements: s_DownloadArtifactSecurityRequirements,
+ operationName: "DownloadArtifactAsync");
using var __timeoutCancellationTokenSource = global::CursorAgents.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
clientOptions: Options,
@@ -92,7 +94,7 @@ partial void ProcessGetAgentArtifactResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
var __pathBuilder = new global::CursorAgents.PathBuilder(
- path: $"/v0/agents/{id}/artifacts/download",
+ path: $"/v1/agents/{id}/artifacts/download",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddRequiredParameter("path", path)
@@ -134,7 +136,7 @@ partial void ProcessGetAgentArtifactResponseContent(
PrepareRequest(
client: HttpClient,
request: __httpRequest);
- PrepareGetAgentArtifactRequest(
+ PrepareDownloadArtifactRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
id: id,
@@ -155,9 +157,9 @@ partial void ProcessGetAgentArtifactResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetAgentArtifact",
- methodName: "GetAgentArtifactAsync",
- pathTemplate: "$\"/v0/agents/{id}/artifacts/download\"",
+ operationId: "DownloadArtifact",
+ methodName: "DownloadArtifactAsync",
+ pathTemplate: "$\"/v1/agents/{id}/artifacts/download\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -182,9 +184,9 @@ partial void ProcessGetAgentArtifactResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetAgentArtifact",
- methodName: "GetAgentArtifactAsync",
- pathTemplate: "$\"/v0/agents/{id}/artifacts/download\"",
+ operationId: "DownloadArtifact",
+ methodName: "DownloadArtifactAsync",
+ pathTemplate: "$\"/v1/agents/{id}/artifacts/download\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -217,9 +219,9 @@ partial void ProcessGetAgentArtifactResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetAgentArtifact",
- methodName: "GetAgentArtifactAsync",
- pathTemplate: "$\"/v0/agents/{id}/artifacts/download\"",
+ operationId: "DownloadArtifact",
+ methodName: "DownloadArtifactAsync",
+ pathTemplate: "$\"/v1/agents/{id}/artifacts/download\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -256,7 +258,7 @@ partial void ProcessGetAgentArtifactResponseContent(
ProcessResponse(
client: HttpClient,
response: __response);
- ProcessGetAgentArtifactResponse(
+ ProcessDownloadArtifactResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
if (__response.IsSuccessStatusCode)
@@ -264,9 +266,9 @@ partial void ProcessGetAgentArtifactResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetAgentArtifact",
- methodName: "GetAgentArtifactAsync",
- pathTemplate: "$\"/v0/agents/{id}/artifacts/download\"",
+ operationId: "DownloadArtifact",
+ methodName: "DownloadArtifactAsync",
+ pathTemplate: "$\"/v1/agents/{id}/artifacts/download\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -284,9 +286,9 @@ partial void ProcessGetAgentArtifactResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetAgentArtifact",
- methodName: "GetAgentArtifactAsync",
- pathTemplate: "$\"/v0/agents/{id}/artifacts/download\"",
+ operationId: "DownloadArtifact",
+ methodName: "DownloadArtifactAsync",
+ pathTemplate: "$\"/v1/agents/{id}/artifacts/download\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -299,7 +301,7 @@ partial void ProcessGetAgentArtifactResponseContent(
willRetry: false,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
- // Invalid request - bad agent ID format, missing path query parameter, or artifacts expired for an agent older than 6 months
+ // Validation error or malformed request body.
if ((int)__response.StatusCode == 400)
{
string? __content_400 = null;
@@ -337,7 +339,7 @@ partial void ProcessGetAgentArtifactResponseContent(
h => h.Value),
};
}
- // Unauthorized - invalid or missing API key
+ // Invalid or missing API key.
if ((int)__response.StatusCode == 401)
{
string? __content_401 = null;
@@ -375,7 +377,7 @@ partial void ProcessGetAgentArtifactResponseContent(
h => h.Value),
};
}
- // Forbidden - insufficient permissions
+ // Authenticated but insufficient permissions, plan required, or feature unavailable.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
@@ -413,7 +415,7 @@ partial void ProcessGetAgentArtifactResponseContent(
h => h.Value),
};
}
- // Agent or artifact not found
+ // Agent or run not found.
if ((int)__response.StatusCode == 404)
{
string? __content_404 = null;
@@ -451,7 +453,7 @@ partial void ProcessGetAgentArtifactResponseContent(
h => h.Value),
};
}
- // Rate limit exceeded
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
@@ -489,7 +491,7 @@ partial void ProcessGetAgentArtifactResponseContent(
h => h.Value),
};
}
- // Internal server error
+ // Internal server error.
if ((int)__response.StatusCode == 500)
{
string? __content_500 = null;
@@ -540,7 +542,7 @@ partial void ProcessGetAgentArtifactResponseContent(
client: HttpClient,
response: __response,
content: ref __content);
- ProcessGetAgentArtifactResponseContent(
+ ProcessDownloadArtifactResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);
@@ -550,7 +552,7 @@ partial void ProcessGetAgentArtifactResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::CursorAgents.GetArtifactResponse.FromJson(__content, JsonSerializerContext) ??
+ global::CursorAgents.DownloadArtifactResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -580,7 +582,7 @@ partial void ProcessGetAgentArtifactResponseContent(
).ConfigureAwait(false);
return
- await global::CursorAgents.GetArtifactResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::CursorAgents.DownloadArtifactResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetAgent.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetAgent.g.cs
index a34e80b..460c016 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetAgent.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetAgent.g.cs
@@ -14,10 +14,10 @@ public partial class CursorAgentsClient
{ new global::CursorAgents.EndPointAuthorizationRequirement
{
Type = "Http",
- SchemeId = "BearerAuth",
+ SchemeId = "BasicAuth",
Location = "Header",
- Name = "Bearer",
- FriendlyName = "Bearer",
+ Name = "Basic",
+ FriendlyName = "Basic",
},
},
};
@@ -42,16 +42,16 @@ partial void ProcessGetAgentResponseContent(
ref string content);
///
- /// Agent status
- /// Retrieve the current status and results of a cloud agent
+ /// Get an agent
+ /// Retrieve durable metadata for an agent. Execution status lives on runs.
///
///
- /// Example: bc_abc123
+ /// Example: bc-00000000-0000-0000-0000-000000000001
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- public async global::System.Threading.Tasks.Task GetAgentAsync(
+ public async global::System.Threading.Tasks.Task GetAgentAsync(
string id,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -85,7 +85,7 @@ partial void ProcessGetAgentResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
var __pathBuilder = new global::CursorAgents.PathBuilder(
- path: $"/v0/agents/{id}",
+ path: $"/v1/agents/{id}",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
__path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -146,7 +146,7 @@ partial void ProcessGetAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "GetAgent",
methodName: "GetAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}\"",
+ pathTemplate: "$\"/v1/agents/{id}\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -173,7 +173,7 @@ partial void ProcessGetAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "GetAgent",
methodName: "GetAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}\"",
+ pathTemplate: "$\"/v1/agents/{id}\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -208,7 +208,7 @@ partial void ProcessGetAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "GetAgent",
methodName: "GetAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}\"",
+ pathTemplate: "$\"/v1/agents/{id}\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -255,7 +255,7 @@ partial void ProcessGetAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "GetAgent",
methodName: "GetAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}\"",
+ pathTemplate: "$\"/v1/agents/{id}\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -275,7 +275,7 @@ partial void ProcessGetAgentResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "GetAgent",
methodName: "GetAgentAsync",
- pathTemplate: "$\"/v0/agents/{id}\"",
+ pathTemplate: "$\"/v1/agents/{id}\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -288,45 +288,7 @@ partial void ProcessGetAgentResponseContent(
willRetry: false,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
- // Invalid request - bad agent ID format
- if ((int)__response.StatusCode == 400)
- {
- string? __content_400 = null;
- global::System.Exception? __exception_400 = null;
- global::CursorAgents.Error? __value_400 = null;
- try
- {
- if (__effectiveReadResponseAsString)
- {
- __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
- __value_400 = global::CursorAgents.Error.FromJson(__content_400, JsonSerializerContext);
- }
- else
- {
- __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
-
- __value_400 = global::CursorAgents.Error.FromJson(__content_400, JsonSerializerContext);
- }
- }
- catch (global::System.Exception __ex)
- {
- __exception_400 = __ex;
- }
-
- throw new global::CursorAgents.ApiException(
- message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
- innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseObject = __value_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
- __response.Headers,
- h => h.Key,
- h => h.Value),
- };
- }
- // Unauthorized - invalid or missing API key
+ // Invalid or missing API key.
if ((int)__response.StatusCode == 401)
{
string? __content_401 = null;
@@ -364,7 +326,7 @@ partial void ProcessGetAgentResponseContent(
h => h.Value),
};
}
- // Forbidden - insufficient permissions
+ // Authenticated but insufficient permissions, plan required, or feature unavailable.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
@@ -402,7 +364,7 @@ partial void ProcessGetAgentResponseContent(
h => h.Value),
};
}
- // Agent not found or access denied
+ // Agent or run not found.
if ((int)__response.StatusCode == 404)
{
string? __content_404 = null;
@@ -440,7 +402,7 @@ partial void ProcessGetAgentResponseContent(
h => h.Value),
};
}
- // Rate limit exceeded
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
@@ -478,7 +440,7 @@ partial void ProcessGetAgentResponseContent(
h => h.Value),
};
}
- // Internal server error
+ // Internal server error.
if ((int)__response.StatusCode == 500)
{
string? __content_500 = null;
@@ -539,7 +501,7 @@ partial void ProcessGetAgentResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::CursorAgents.GetAgentResponse.FromJson(__content, JsonSerializerContext) ??
+ global::CursorAgents.Agent.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -569,7 +531,7 @@ partial void ProcessGetAgentResponseContent(
).ConfigureAwait(false);
return
- await global::CursorAgents.GetAgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::CursorAgents.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetMe.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetApiKeyInfo.g.cs
similarity index 84%
rename from src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetMe.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetApiKeyInfo.g.cs
index a3a894f..f51ebe0 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetMe.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetApiKeyInfo.g.cs
@@ -7,59 +7,59 @@ public partial class CursorAgentsClient
{
- private static readonly global::CursorAgents.EndPointSecurityRequirement s_GetMeSecurityRequirement0 =
+ private static readonly global::CursorAgents.EndPointSecurityRequirement s_GetApiKeyInfoSecurityRequirement0 =
new global::CursorAgents.EndPointSecurityRequirement
{
Authorizations = new global::CursorAgents.EndPointAuthorizationRequirement[]
{ new global::CursorAgents.EndPointAuthorizationRequirement
{
Type = "Http",
- SchemeId = "BearerAuth",
+ SchemeId = "BasicAuth",
Location = "Header",
- Name = "Bearer",
- FriendlyName = "Bearer",
+ Name = "Basic",
+ FriendlyName = "Basic",
},
},
};
- private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_GetMeSecurityRequirements =
+ private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_GetApiKeyInfoSecurityRequirements =
new global::CursorAgents.EndPointSecurityRequirement[]
- { s_GetMeSecurityRequirement0,
+ { s_GetApiKeyInfoSecurityRequirement0,
};
- partial void PrepareGetMeArguments(
+ partial void PrepareGetApiKeyInfoArguments(
global::System.Net.Http.HttpClient httpClient);
- partial void PrepareGetMeRequest(
+ partial void PrepareGetApiKeyInfoRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
- partial void ProcessGetMeResponse(
+ partial void ProcessGetApiKeyInfoResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
- partial void ProcessGetMeResponseContent(
+ partial void ProcessGetApiKeyInfoResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
///
/// API key info
- /// Retrieve information about the API key being used for authentication
+ /// Retrieve information about the API key being used for authentication.
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- public async global::System.Threading.Tasks.Task GetMeAsync(
+ public async global::System.Threading.Tasks.Task GetApiKeyInfoAsync(
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
- PrepareGetMeArguments(
+ PrepareGetApiKeyInfoArguments(
httpClient: HttpClient);
var __authorizations = global::CursorAgents.EndPointSecurityResolver.ResolveAuthorizations(
availableAuthorizations: Authorizations,
- securityRequirements: s_GetMeSecurityRequirements,
- operationName: "GetMeAsync");
+ securityRequirements: s_GetApiKeyInfoSecurityRequirements,
+ operationName: "GetApiKeyInfoAsync");
using var __timeoutCancellationTokenSource = global::CursorAgents.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
clientOptions: Options,
@@ -78,7 +78,7 @@ partial void ProcessGetMeResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
var __pathBuilder = new global::CursorAgents.PathBuilder(
- path: "/v0/me",
+ path: "/v1/me",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
__path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -117,7 +117,7 @@ partial void ProcessGetMeResponseContent(
PrepareRequest(
client: HttpClient,
request: __httpRequest);
- PrepareGetMeRequest(
+ PrepareGetApiKeyInfoRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest);
@@ -136,9 +136,9 @@ partial void ProcessGetMeResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetMe",
- methodName: "GetMeAsync",
- pathTemplate: "\"/v0/me\"",
+ operationId: "GetApiKeyInfo",
+ methodName: "GetApiKeyInfoAsync",
+ pathTemplate: "\"/v1/me\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -163,9 +163,9 @@ partial void ProcessGetMeResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetMe",
- methodName: "GetMeAsync",
- pathTemplate: "\"/v0/me\"",
+ operationId: "GetApiKeyInfo",
+ methodName: "GetApiKeyInfoAsync",
+ pathTemplate: "\"/v1/me\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -198,9 +198,9 @@ partial void ProcessGetMeResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetMe",
- methodName: "GetMeAsync",
- pathTemplate: "\"/v0/me\"",
+ operationId: "GetApiKeyInfo",
+ methodName: "GetApiKeyInfoAsync",
+ pathTemplate: "\"/v1/me\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -237,7 +237,7 @@ partial void ProcessGetMeResponseContent(
ProcessResponse(
client: HttpClient,
response: __response);
- ProcessGetMeResponse(
+ ProcessGetApiKeyInfoResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
if (__response.IsSuccessStatusCode)
@@ -245,9 +245,9 @@ partial void ProcessGetMeResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetMe",
- methodName: "GetMeAsync",
- pathTemplate: "\"/v0/me\"",
+ operationId: "GetApiKeyInfo",
+ methodName: "GetApiKeyInfoAsync",
+ pathTemplate: "\"/v1/me\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -265,9 +265,9 @@ partial void ProcessGetMeResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetMe",
- methodName: "GetMeAsync",
- pathTemplate: "\"/v0/me\"",
+ operationId: "GetApiKeyInfo",
+ methodName: "GetApiKeyInfoAsync",
+ pathTemplate: "\"/v1/me\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -280,7 +280,7 @@ partial void ProcessGetMeResponseContent(
willRetry: false,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
- // Unauthorized - invalid or missing API key
+ // Invalid or missing API key.
if ((int)__response.StatusCode == 401)
{
string? __content_401 = null;
@@ -318,45 +318,7 @@ partial void ProcessGetMeResponseContent(
h => h.Value),
};
}
- // API key not found
- if ((int)__response.StatusCode == 404)
- {
- string? __content_404 = null;
- global::System.Exception? __exception_404 = null;
- global::CursorAgents.Error? __value_404 = null;
- try
- {
- if (__effectiveReadResponseAsString)
- {
- __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
- __value_404 = global::CursorAgents.Error.FromJson(__content_404, JsonSerializerContext);
- }
- else
- {
- __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
-
- __value_404 = global::CursorAgents.Error.FromJson(__content_404, JsonSerializerContext);
- }
- }
- catch (global::System.Exception __ex)
- {
- __exception_404 = __ex;
- }
-
- throw new global::CursorAgents.ApiException(
- message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
- innerException: __exception_404,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_404,
- ResponseObject = __value_404,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
- __response.Headers,
- h => h.Key,
- h => h.Value),
- };
- }
- // Rate limit exceeded
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
@@ -394,7 +356,7 @@ partial void ProcessGetMeResponseContent(
h => h.Value),
};
}
- // Internal server error
+ // Internal server error.
if ((int)__response.StatusCode == 500)
{
string? __content_500 = null;
@@ -445,7 +407,7 @@ partial void ProcessGetMeResponseContent(
client: HttpClient,
response: __response,
content: ref __content);
- ProcessGetMeResponseContent(
+ ProcessGetApiKeyInfoResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);
@@ -455,7 +417,7 @@ partial void ProcessGetMeResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::CursorAgents.GetMeResponse.FromJson(__content, JsonSerializerContext) ??
+ global::CursorAgents.ApiKeyInfo.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -485,7 +447,7 @@ partial void ProcessGetMeResponseContent(
).ConfigureAwait(false);
return
- await global::CursorAgents.GetMeResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::CursorAgents.ApiKeyInfo.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetRun.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetRun.g.cs
new file mode 100644
index 0000000..09ecd98
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetRun.g.cs
@@ -0,0 +1,582 @@
+
+#nullable enable
+
+namespace CursorAgents
+{
+ public partial class CursorAgentsClient
+ {
+
+
+ private static readonly global::CursorAgents.EndPointSecurityRequirement s_GetRunSecurityRequirement0 =
+ new global::CursorAgents.EndPointSecurityRequirement
+ {
+ Authorizations = new global::CursorAgents.EndPointAuthorizationRequirement[]
+ { new global::CursorAgents.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "BasicAuth",
+ Location = "Header",
+ Name = "Basic",
+ FriendlyName = "Basic",
+ },
+ },
+ };
+ private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_GetRunSecurityRequirements =
+ new global::CursorAgents.EndPointSecurityRequirement[]
+ { s_GetRunSecurityRequirement0,
+ };
+ partial void PrepareGetRunArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string id,
+ ref string runId);
+ partial void PrepareGetRunRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string id,
+ string runId);
+ partial void ProcessGetRunResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetRunResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get a run
+ /// Retrieve status and timestamps for a specific run.
+ ///
+ ///
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Example: run-00000000-0000-0000-0000-000000000001
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task GetRunAsync(
+ string id,
+ string runId,
+ global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetRunArguments(
+ httpClient: HttpClient,
+ id: ref id,
+ runId: ref runId);
+
+
+ var __authorizations = global::CursorAgents.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetRunSecurityRequirements,
+ operationName: "GetRunAsync");
+
+ using var __timeoutCancellationTokenSource = global::CursorAgents.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::CursorAgents.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::CursorAgents.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+ var __pathBuilder = new global::CursorAgents.PathBuilder(
+ path: $"/v1/agents/{id}/runs/{runId}",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ __path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::CursorAgents.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetRunRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ id: id,
+ runId: runId);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetRun",
+ methodName: "GetRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetRun",
+ methodName: "GetRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::CursorAgents.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetRun",
+ methodName: "GetRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetRunResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetRun",
+ methodName: "GetRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetRun",
+ methodName: "GetRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Invalid or missing API key.
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::CursorAgents.Error? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::CursorAgents.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::CursorAgents.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_401,
+ ResponseObject = __value_401,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Authenticated but insufficient permissions, plan required, or feature unavailable.
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::CursorAgents.Error? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::CursorAgents.Error.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::CursorAgents.Error.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_403,
+ ResponseObject = __value_403,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Agent or run not found.
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::CursorAgents.Error? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::CursorAgents.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::CursorAgents.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseObject = __value_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
+ if ((int)__response.StatusCode == 429)
+ {
+ string? __content_429 = null;
+ global::System.Exception? __exception_429 = null;
+ global::CursorAgents.Error? __value_429 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_429 = global::CursorAgents.Error.FromJson(__content_429, JsonSerializerContext);
+ }
+ else
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_429 = global::CursorAgents.Error.FromJson(__content_429, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_429 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_429,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_429,
+ ResponseObject = __value_429,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Internal server error.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::CursorAgents.Error? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::CursorAgents.Error.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::CursorAgents.Error.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_500,
+ ResponseObject = __value_500,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetRunResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return
+ global::CursorAgents.Run.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw new global::CursorAgents.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ return
+ await global::CursorAgents.Run.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListAgents.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListAgents.g.cs
index 2387629..66f5436 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListAgents.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListAgents.g.cs
@@ -14,10 +14,10 @@ public partial class CursorAgentsClient
{ new global::CursorAgents.EndPointAuthorizationRequirement
{
Type = "Http",
- SchemeId = "BearerAuth",
+ SchemeId = "BasicAuth",
Location = "Header",
- Name = "Bearer",
- FriendlyName = "Bearer",
+ Name = "Basic",
+ FriendlyName = "Basic",
},
},
};
@@ -29,13 +29,15 @@ partial void PrepareListAgentsArguments(
global::System.Net.Http.HttpClient httpClient,
ref int? limit,
ref string? cursor,
- ref string? prUrl);
+ ref string? prUrl,
+ ref bool? includeArchived);
partial void PrepareListAgentsRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
int? limit,
string? cursor,
- string? prUrl);
+ string? prUrl,
+ bool? includeArchived);
partial void ProcessListAgentsResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
@@ -47,16 +49,15 @@ partial void ProcessListAgentsResponseContent(
///
/// List agents
- /// List all cloud agents for the authenticated user
+ /// List agents for the authenticated user, newest first.
///
///
/// Default Value: 20
///
- ///
- /// Example: bc_xyz789
- ///
- ///
- /// Example: https://github.com/your-org/your-repo/pull/123
+ ///
+ ///
+ ///
+ /// Default Value: true
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
@@ -65,6 +66,7 @@ partial void ProcessListAgentsResponseContent(
int? limit = default,
string? cursor = default,
string? prUrl = default,
+ bool? includeArchived = default,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -74,7 +76,8 @@ partial void ProcessListAgentsResponseContent(
httpClient: HttpClient,
limit: ref limit,
cursor: ref cursor,
- prUrl: ref prUrl);
+ prUrl: ref prUrl,
+ includeArchived: ref includeArchived);
var __authorizations = global::CursorAgents.EndPointSecurityResolver.ResolveAuthorizations(
@@ -99,12 +102,13 @@ partial void ProcessListAgentsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
var __pathBuilder = new global::CursorAgents.PathBuilder(
- path: "/v0/agents",
+ path: "/v1/agents",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("cursor", cursor)
- .AddOptionalParameter("prUrl", prUrl)
+ .AddOptionalParameter("prUrl", prUrl)
+ .AddOptionalParameter("includeArchived", includeArchived?.ToString().ToLowerInvariant())
;
var __path = __pathBuilder.ToString();
__path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -148,7 +152,8 @@ partial void ProcessListAgentsResponseContent(
httpRequestMessage: __httpRequest,
limit: limit,
cursor: cursor,
- prUrl: prUrl);
+ prUrl: prUrl,
+ includeArchived: includeArchived);
return __httpRequest;
}
@@ -167,7 +172,7 @@ partial void ProcessListAgentsResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListAgents",
methodName: "ListAgentsAsync",
- pathTemplate: "\"/v0/agents\"",
+ pathTemplate: "\"/v1/agents\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -194,7 +199,7 @@ partial void ProcessListAgentsResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListAgents",
methodName: "ListAgentsAsync",
- pathTemplate: "\"/v0/agents\"",
+ pathTemplate: "\"/v1/agents\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -229,7 +234,7 @@ partial void ProcessListAgentsResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListAgents",
methodName: "ListAgentsAsync",
- pathTemplate: "\"/v0/agents\"",
+ pathTemplate: "\"/v1/agents\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -276,7 +281,7 @@ partial void ProcessListAgentsResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListAgents",
methodName: "ListAgentsAsync",
- pathTemplate: "\"/v0/agents\"",
+ pathTemplate: "\"/v1/agents\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -296,7 +301,7 @@ partial void ProcessListAgentsResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListAgents",
methodName: "ListAgentsAsync",
- pathTemplate: "\"/v0/agents\"",
+ pathTemplate: "\"/v1/agents\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -309,7 +314,7 @@ partial void ProcessListAgentsResponseContent(
willRetry: false,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
- // Invalid request - bad query parameters
+ // Validation error or malformed request body.
if ((int)__response.StatusCode == 400)
{
string? __content_400 = null;
@@ -347,7 +352,7 @@ partial void ProcessListAgentsResponseContent(
h => h.Value),
};
}
- // Unauthorized - invalid or missing API key
+ // Invalid or missing API key.
if ((int)__response.StatusCode == 401)
{
string? __content_401 = null;
@@ -385,7 +390,7 @@ partial void ProcessListAgentsResponseContent(
h => h.Value),
};
}
- // Forbidden - insufficient permissions
+ // Authenticated but insufficient permissions, plan required, or feature unavailable.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
@@ -423,7 +428,7 @@ partial void ProcessListAgentsResponseContent(
h => h.Value),
};
}
- // Rate limit exceeded
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
@@ -461,7 +466,7 @@ partial void ProcessListAgentsResponseContent(
h => h.Value),
};
}
- // Internal server error
+ // Internal server error.
if ((int)__response.StatusCode == 500)
{
string? __content_500 = null;
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetAgentConversation.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListArtifacts.g.cs
similarity index 79%
rename from src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetAgentConversation.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListArtifacts.g.cs
index 40e2ac2..ef5c205 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.GetAgentConversation.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListArtifacts.g.cs
@@ -7,66 +7,69 @@ public partial class CursorAgentsClient
{
- private static readonly global::CursorAgents.EndPointSecurityRequirement s_GetAgentConversationSecurityRequirement0 =
+ private static readonly global::CursorAgents.EndPointSecurityRequirement s_ListArtifactsSecurityRequirement0 =
new global::CursorAgents.EndPointSecurityRequirement
{
Authorizations = new global::CursorAgents.EndPointAuthorizationRequirement[]
{ new global::CursorAgents.EndPointAuthorizationRequirement
{
Type = "Http",
- SchemeId = "BearerAuth",
+ SchemeId = "BasicAuth",
Location = "Header",
- Name = "Bearer",
- FriendlyName = "Bearer",
+ Name = "Basic",
+ FriendlyName = "Basic",
},
},
};
- private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_GetAgentConversationSecurityRequirements =
+ private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_ListArtifactsSecurityRequirements =
new global::CursorAgents.EndPointSecurityRequirement[]
- { s_GetAgentConversationSecurityRequirement0,
+ { s_ListArtifactsSecurityRequirement0,
};
- partial void PrepareGetAgentConversationArguments(
+ partial void PrepareListArtifactsArguments(
global::System.Net.Http.HttpClient httpClient,
ref string id);
- partial void PrepareGetAgentConversationRequest(
+ partial void PrepareListArtifactsRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string id);
- partial void ProcessGetAgentConversationResponse(
+ partial void ProcessListArtifactsResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
- partial void ProcessGetAgentConversationResponseContent(
+ partial void ProcessListArtifactsResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
///
- /// Get agent conversation
- /// Retrieve the conversation history of a cloud agent, including all user prompts and assistant responses
+ /// List artifacts
+ /// List artifacts produced by an agent. Each artifact's `path` is
+ /// relative to the workspace's `artifacts/` directory. Pass that
+ /// `path` to GET /v1/agents/{id}/artifacts/download to obtain a
+ /// presigned download URL.
///
///
- /// Example: bc_abc123
+ /// Example: bc-00000000-0000-0000-0000-000000000001
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- public async global::System.Threading.Tasks.Task GetAgentConversationAsync(
+ public async global::System.Threading.Tasks.Task ListArtifactsAsync(
string id,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
- PrepareGetAgentConversationArguments(
+ PrepareListArtifactsArguments(
httpClient: HttpClient,
id: ref id);
var __authorizations = global::CursorAgents.EndPointSecurityResolver.ResolveAuthorizations(
availableAuthorizations: Authorizations,
- securityRequirements: s_GetAgentConversationSecurityRequirements,
- operationName: "GetAgentConversationAsync");
+ securityRequirements: s_ListArtifactsSecurityRequirements,
+ operationName: "ListArtifactsAsync");
using var __timeoutCancellationTokenSource = global::CursorAgents.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
clientOptions: Options,
@@ -85,7 +88,7 @@ partial void ProcessGetAgentConversationResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
var __pathBuilder = new global::CursorAgents.PathBuilder(
- path: $"/v0/agents/{id}/conversation",
+ path: $"/v1/agents/{id}/artifacts",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
__path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -124,7 +127,7 @@ partial void ProcessGetAgentConversationResponseContent(
PrepareRequest(
client: HttpClient,
request: __httpRequest);
- PrepareGetAgentConversationRequest(
+ PrepareListArtifactsRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
id: id);
@@ -144,9 +147,9 @@ partial void ProcessGetAgentConversationResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetAgentConversation",
- methodName: "GetAgentConversationAsync",
- pathTemplate: "$\"/v0/agents/{id}/conversation\"",
+ operationId: "ListArtifacts",
+ methodName: "ListArtifactsAsync",
+ pathTemplate: "$\"/v1/agents/{id}/artifacts\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -171,9 +174,9 @@ partial void ProcessGetAgentConversationResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetAgentConversation",
- methodName: "GetAgentConversationAsync",
- pathTemplate: "$\"/v0/agents/{id}/conversation\"",
+ operationId: "ListArtifacts",
+ methodName: "ListArtifactsAsync",
+ pathTemplate: "$\"/v1/agents/{id}/artifacts\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -206,9 +209,9 @@ partial void ProcessGetAgentConversationResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetAgentConversation",
- methodName: "GetAgentConversationAsync",
- pathTemplate: "$\"/v0/agents/{id}/conversation\"",
+ operationId: "ListArtifacts",
+ methodName: "ListArtifactsAsync",
+ pathTemplate: "$\"/v1/agents/{id}/artifacts\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -245,7 +248,7 @@ partial void ProcessGetAgentConversationResponseContent(
ProcessResponse(
client: HttpClient,
response: __response);
- ProcessGetAgentConversationResponse(
+ ProcessListArtifactsResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
if (__response.IsSuccessStatusCode)
@@ -253,9 +256,9 @@ partial void ProcessGetAgentConversationResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetAgentConversation",
- methodName: "GetAgentConversationAsync",
- pathTemplate: "$\"/v0/agents/{id}/conversation\"",
+ operationId: "ListArtifacts",
+ methodName: "ListArtifactsAsync",
+ pathTemplate: "$\"/v1/agents/{id}/artifacts\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -273,9 +276,9 @@ partial void ProcessGetAgentConversationResponseContent(
await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
- operationId: "GetAgentConversation",
- methodName: "GetAgentConversationAsync",
- pathTemplate: "$\"/v0/agents/{id}/conversation\"",
+ operationId: "ListArtifacts",
+ methodName: "ListArtifactsAsync",
+ pathTemplate: "$\"/v1/agents/{id}/artifacts\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -288,45 +291,7 @@ partial void ProcessGetAgentConversationResponseContent(
willRetry: false,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
- // Invalid request - bad agent ID format
- if ((int)__response.StatusCode == 400)
- {
- string? __content_400 = null;
- global::System.Exception? __exception_400 = null;
- global::CursorAgents.Error? __value_400 = null;
- try
- {
- if (__effectiveReadResponseAsString)
- {
- __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
- __value_400 = global::CursorAgents.Error.FromJson(__content_400, JsonSerializerContext);
- }
- else
- {
- __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
-
- __value_400 = global::CursorAgents.Error.FromJson(__content_400, JsonSerializerContext);
- }
- }
- catch (global::System.Exception __ex)
- {
- __exception_400 = __ex;
- }
-
- throw new global::CursorAgents.ApiException(
- message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
- innerException: __exception_400,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_400,
- ResponseObject = __value_400,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
- __response.Headers,
- h => h.Key,
- h => h.Value),
- };
- }
- // Unauthorized - invalid or missing API key
+ // Invalid or missing API key.
if ((int)__response.StatusCode == 401)
{
string? __content_401 = null;
@@ -364,7 +329,7 @@ partial void ProcessGetAgentConversationResponseContent(
h => h.Value),
};
}
- // Forbidden - insufficient permissions
+ // Authenticated but insufficient permissions, plan required, or feature unavailable.
if ((int)__response.StatusCode == 403)
{
string? __content_403 = null;
@@ -402,7 +367,7 @@ partial void ProcessGetAgentConversationResponseContent(
h => h.Value),
};
}
- // Agent not found or access denied
+ // Agent or run not found.
if ((int)__response.StatusCode == 404)
{
string? __content_404 = null;
@@ -440,45 +405,7 @@ partial void ProcessGetAgentConversationResponseContent(
h => h.Value),
};
}
- // Conflict - agent is deleted or archived
- if ((int)__response.StatusCode == 409)
- {
- string? __content_409 = null;
- global::System.Exception? __exception_409 = null;
- global::CursorAgents.Error? __value_409 = null;
- try
- {
- if (__effectiveReadResponseAsString)
- {
- __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
- __value_409 = global::CursorAgents.Error.FromJson(__content_409, JsonSerializerContext);
- }
- else
- {
- __content_409 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
-
- __value_409 = global::CursorAgents.Error.FromJson(__content_409, JsonSerializerContext);
- }
- }
- catch (global::System.Exception __ex)
- {
- __exception_409 = __ex;
- }
-
- throw new global::CursorAgents.ApiException(
- message: __content_409 ?? __response.ReasonPhrase ?? string.Empty,
- innerException: __exception_409,
- statusCode: __response.StatusCode)
- {
- ResponseBody = __content_409,
- ResponseObject = __value_409,
- ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
- __response.Headers,
- h => h.Key,
- h => h.Value),
- };
- }
- // Rate limit exceeded
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
@@ -516,7 +443,7 @@ partial void ProcessGetAgentConversationResponseContent(
h => h.Value),
};
}
- // Internal server error
+ // Internal server error.
if ((int)__response.StatusCode == 500)
{
string? __content_500 = null;
@@ -567,7 +494,7 @@ partial void ProcessGetAgentConversationResponseContent(
client: HttpClient,
response: __response,
content: ref __content);
- ProcessGetAgentConversationResponseContent(
+ ProcessListArtifactsResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);
@@ -577,7 +504,7 @@ partial void ProcessGetAgentConversationResponseContent(
__response.EnsureSuccessStatusCode();
return
- global::CursorAgents.GetAgentConversationResponse.FromJson(__content, JsonSerializerContext) ??
+ global::CursorAgents.ListArtifactsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
catch (global::System.Exception __ex)
@@ -607,7 +534,7 @@ partial void ProcessGetAgentConversationResponseContent(
).ConfigureAwait(false);
return
- await global::CursorAgents.GetAgentConversationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ await global::CursorAgents.ListArtifactsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
catch (global::System.Exception __ex)
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListModels.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListModels.g.cs
index 69308a0..9e33c5b 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListModels.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListModels.g.cs
@@ -14,10 +14,10 @@ public partial class CursorAgentsClient
{ new global::CursorAgents.EndPointAuthorizationRequirement
{
Type = "Http",
- SchemeId = "BearerAuth",
+ SchemeId = "BasicAuth",
Location = "Header",
- Name = "Bearer",
- FriendlyName = "Bearer",
+ Name = "Basic",
+ FriendlyName = "Basic",
},
},
};
@@ -40,8 +40,11 @@ partial void ProcessListModelsResponseContent(
ref string content);
///
- /// List available models
- /// Returns a recommended set of explicit model IDs for launch requests. This list excludes "default".
+ /// List models
+ /// Returns a recommended set of explicit model IDs you can pass
+ /// to the `model.id` field on POST /v1/agents. To use the
+ /// configured default model, omit the `model` field from the
+ /// request body entirely.
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
@@ -78,7 +81,7 @@ partial void ProcessListModelsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
var __pathBuilder = new global::CursorAgents.PathBuilder(
- path: "/v0/models",
+ path: "/v1/models",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
__path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -138,7 +141,7 @@ partial void ProcessListModelsResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListModels",
methodName: "ListModelsAsync",
- pathTemplate: "\"/v0/models\"",
+ pathTemplate: "\"/v1/models\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -165,7 +168,7 @@ partial void ProcessListModelsResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListModels",
methodName: "ListModelsAsync",
- pathTemplate: "\"/v0/models\"",
+ pathTemplate: "\"/v1/models\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -200,7 +203,7 @@ partial void ProcessListModelsResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListModels",
methodName: "ListModelsAsync",
- pathTemplate: "\"/v0/models\"",
+ pathTemplate: "\"/v1/models\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -247,7 +250,7 @@ partial void ProcessListModelsResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListModels",
methodName: "ListModelsAsync",
- pathTemplate: "\"/v0/models\"",
+ pathTemplate: "\"/v1/models\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -267,7 +270,7 @@ partial void ProcessListModelsResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListModels",
methodName: "ListModelsAsync",
- pathTemplate: "\"/v0/models\"",
+ pathTemplate: "\"/v1/models\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -280,7 +283,7 @@ partial void ProcessListModelsResponseContent(
willRetry: false,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
- // Unauthorized - invalid or missing API key
+ // Invalid or missing API key.
if ((int)__response.StatusCode == 401)
{
string? __content_401 = null;
@@ -318,7 +321,7 @@ partial void ProcessListModelsResponseContent(
h => h.Value),
};
}
- // Rate limit exceeded
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
@@ -356,7 +359,7 @@ partial void ProcessListModelsResponseContent(
h => h.Value),
};
}
- // Internal server error
+ // Internal server error.
if ((int)__response.StatusCode == 500)
{
string? __content_500 = null;
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListRepositories.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListRepositories.g.cs
index 96f02c8..d47472b 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListRepositories.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListRepositories.g.cs
@@ -14,10 +14,10 @@ public partial class CursorAgentsClient
{ new global::CursorAgents.EndPointAuthorizationRequirement
{
Type = "Http",
- SchemeId = "BearerAuth",
+ SchemeId = "BasicAuth",
Location = "Header",
- Name = "Bearer",
- FriendlyName = "Bearer",
+ Name = "Basic",
+ FriendlyName = "Basic",
},
},
};
@@ -41,7 +41,13 @@ partial void ProcessListRepositoriesResponseContent(
///
/// List GitHub repositories
- /// Retrieve a list of GitHub repositories accessible to the authenticated user
+ /// List GitHub repositories accessible to the authenticated user
+ /// through Cursor's GitHub App installation. This endpoint has
+ /// very strict rate limits (1 request per user per minute, 30
+ /// per user per hour) and can take tens of seconds to respond
+ /// for users with access to many repositories. Cache responses
+ /// aggressively and handle this information not being available
+ /// gracefully.
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
@@ -78,7 +84,7 @@ partial void ProcessListRepositoriesResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
var __pathBuilder = new global::CursorAgents.PathBuilder(
- path: "/v0/repositories",
+ path: "/v1/repositories",
baseUri: HttpClient.BaseAddress);
var __path = __pathBuilder.ToString();
__path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -138,7 +144,7 @@ partial void ProcessListRepositoriesResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListRepositories",
methodName: "ListRepositoriesAsync",
- pathTemplate: "\"/v0/repositories\"",
+ pathTemplate: "\"/v1/repositories\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -165,7 +171,7 @@ partial void ProcessListRepositoriesResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListRepositories",
methodName: "ListRepositoriesAsync",
- pathTemplate: "\"/v0/repositories\"",
+ pathTemplate: "\"/v1/repositories\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -200,7 +206,7 @@ partial void ProcessListRepositoriesResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListRepositories",
methodName: "ListRepositoriesAsync",
- pathTemplate: "\"/v0/repositories\"",
+ pathTemplate: "\"/v1/repositories\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -247,7 +253,7 @@ partial void ProcessListRepositoriesResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListRepositories",
methodName: "ListRepositoriesAsync",
- pathTemplate: "\"/v0/repositories\"",
+ pathTemplate: "\"/v1/repositories\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -267,7 +273,7 @@ partial void ProcessListRepositoriesResponseContent(
context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
operationId: "ListRepositories",
methodName: "ListRepositoriesAsync",
- pathTemplate: "\"/v0/repositories\"",
+ pathTemplate: "\"/v1/repositories\"",
httpMethod: "GET",
baseUri: BaseUri,
request: __httpRequest!,
@@ -280,7 +286,7 @@ partial void ProcessListRepositoriesResponseContent(
willRetry: false,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
- // Unauthorized - invalid or missing API key
+ // Invalid or missing API key.
if ((int)__response.StatusCode == 401)
{
string? __content_401 = null;
@@ -318,7 +324,7 @@ partial void ProcessListRepositoriesResponseContent(
h => h.Value),
};
}
- // Rate limit exceeded
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
if ((int)__response.StatusCode == 429)
{
string? __content_429 = null;
@@ -356,7 +362,7 @@ partial void ProcessListRepositoriesResponseContent(
h => h.Value),
};
}
- // Internal server error
+ // Internal server error.
if ((int)__response.StatusCode == 500)
{
string? __content_500 = null;
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListRuns.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListRuns.g.cs
new file mode 100644
index 0000000..9ef27cf
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.ListRuns.g.cs
@@ -0,0 +1,592 @@
+
+#nullable enable
+
+namespace CursorAgents
+{
+ public partial class CursorAgentsClient
+ {
+
+
+ private static readonly global::CursorAgents.EndPointSecurityRequirement s_ListRunsSecurityRequirement0 =
+ new global::CursorAgents.EndPointSecurityRequirement
+ {
+ Authorizations = new global::CursorAgents.EndPointAuthorizationRequirement[]
+ { new global::CursorAgents.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "BasicAuth",
+ Location = "Header",
+ Name = "Basic",
+ FriendlyName = "Basic",
+ },
+ },
+ };
+ private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_ListRunsSecurityRequirements =
+ new global::CursorAgents.EndPointSecurityRequirement[]
+ { s_ListRunsSecurityRequirement0,
+ };
+ partial void PrepareListRunsArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string id,
+ ref int? limit,
+ ref string? cursor);
+ partial void PrepareListRunsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string id,
+ int? limit,
+ string? cursor);
+ partial void ProcessListRunsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessListRunsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// List runs
+ /// List runs for an agent, newest first.
+ ///
+ ///
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Default Value: 20
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task ListRunsAsync(
+ string id,
+ int? limit = default,
+ string? cursor = default,
+ global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareListRunsArguments(
+ httpClient: HttpClient,
+ id: ref id,
+ limit: ref limit,
+ cursor: ref cursor);
+
+
+ var __authorizations = global::CursorAgents.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_ListRunsSecurityRequirements,
+ operationName: "ListRunsAsync");
+
+ using var __timeoutCancellationTokenSource = global::CursorAgents.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::CursorAgents.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::CursorAgents.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+ var __pathBuilder = new global::CursorAgents.PathBuilder(
+ path: $"/v1/agents/{id}/runs",
+ baseUri: HttpClient.BaseAddress);
+ __pathBuilder
+ .AddOptionalParameter("limit", limit?.ToString())
+ .AddOptionalParameter("cursor", cursor)
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::CursorAgents.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareListRunsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ id: id,
+ limit: limit,
+ cursor: cursor);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListRuns",
+ methodName: "ListRunsAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListRuns",
+ methodName: "ListRunsAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::CursorAgents.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListRuns",
+ methodName: "ListRunsAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessListRunsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListRuns",
+ methodName: "ListRunsAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "ListRuns",
+ methodName: "ListRunsAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Invalid or missing API key.
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::CursorAgents.Error? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::CursorAgents.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::CursorAgents.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_401,
+ ResponseObject = __value_401,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Authenticated but insufficient permissions, plan required, or feature unavailable.
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::CursorAgents.Error? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::CursorAgents.Error.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::CursorAgents.Error.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_403,
+ ResponseObject = __value_403,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Agent or run not found.
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::CursorAgents.Error? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::CursorAgents.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::CursorAgents.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseObject = __value_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
+ if ((int)__response.StatusCode == 429)
+ {
+ string? __content_429 = null;
+ global::System.Exception? __exception_429 = null;
+ global::CursorAgents.Error? __value_429 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_429 = global::CursorAgents.Error.FromJson(__content_429, JsonSerializerContext);
+ }
+ else
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_429 = global::CursorAgents.Error.FromJson(__content_429, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_429 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_429,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_429,
+ ResponseObject = __value_429,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Internal server error.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::CursorAgents.Error? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::CursorAgents.Error.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::CursorAgents.Error.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_500,
+ ResponseObject = __value_500,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessListRunsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return
+ global::CursorAgents.ListRunsResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw new global::CursorAgents.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ return
+ await global::CursorAgents.ListRunsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.StreamRun.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.StreamRun.g.cs
new file mode 100644
index 0000000..ee00162
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.StreamRun.g.cs
@@ -0,0 +1,383 @@
+
+#nullable enable
+
+namespace CursorAgents
+{
+ public partial class CursorAgentsClient
+ {
+
+
+ private static readonly global::CursorAgents.EndPointSecurityRequirement s_StreamRunSecurityRequirement0 =
+ new global::CursorAgents.EndPointSecurityRequirement
+ {
+ Authorizations = new global::CursorAgents.EndPointAuthorizationRequirement[]
+ { new global::CursorAgents.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "BasicAuth",
+ Location = "Header",
+ Name = "Basic",
+ FriendlyName = "Basic",
+ },
+ },
+ };
+ private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_StreamRunSecurityRequirements =
+ new global::CursorAgents.EndPointSecurityRequirement[]
+ { s_StreamRunSecurityRequirement0,
+ };
+ partial void PrepareStreamRunArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string id,
+ ref string runId,
+ ref string? lastEventId);
+ partial void PrepareStreamRunRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string id,
+ string runId,
+ string? lastEventId);
+ partial void ProcessStreamRunResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ ///
+ /// Stream a run
+ /// Stream Server-Sent Events for one run. Event types include
+ /// `status`, `assistant`, `thinking`, `tool_call`, `heartbeat`,
+ /// `result`, `error`, and `done`. Reconnect with the
+ /// `Last-Event-ID` header to resume after a disconnect; the event
+ /// ID must belong to the requested run. Responses include the
+ /// `X-Cursor-Stream-Retention-Seconds` header. After the
+ /// retention window the endpoint may return `410 stream_expired`.
+ ///
+ ///
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Example: run-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Collections.Generic.IAsyncEnumerable StreamRunAsync(
+ string id,
+ string runId,
+ string? lastEventId = default,
+ global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
+ [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareStreamRunArguments(
+ httpClient: HttpClient,
+ id: ref id,
+ runId: ref runId,
+ lastEventId: ref lastEventId);
+
+
+ var __authorizations = global::CursorAgents.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_StreamRunSecurityRequirements,
+ operationName: "StreamRunAsync");
+
+ using var __timeoutCancellationTokenSource = global::CursorAgents.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::CursorAgents.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::CursorAgents.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+ var __pathBuilder = new global::CursorAgents.PathBuilder(
+ path: $"/v1/agents/{id}/runs/{runId}/stream",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ __path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+
+ if (lastEventId != default)
+ {
+ __httpRequest.Headers.TryAddWithoutValidation("Last-Event-ID", lastEventId.ToString());
+ }
+
+ global::CursorAgents.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareStreamRunRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ id: id,
+ runId: runId,
+ lastEventId: lastEventId);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "StreamRun",
+ methodName: "StreamRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}/stream\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseHeadersRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "StreamRun",
+ methodName: "StreamRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}/stream\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::CursorAgents.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "StreamRun",
+ methodName: "StreamRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}/stream\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessStreamRunResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "StreamRun",
+ methodName: "StreamRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}/stream\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "StreamRun",
+ methodName: "StreamRunAsync",
+ pathTemplate: "$\"/v1/agents/{id}/runs/{runId}/stream\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ using var __stream = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ await foreach (var __sseEvent in global::System.Net.ServerSentEvents.SseParser
+ .Create(__stream).EnumerateAsync(__effectiveCancellationToken))
+ {
+ var __content = __sseEvent.Data;
+ if (__content == "[DONE]")
+ {
+ yield break;
+ }
+
+ var __streamedResponse = (string?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(string), JsonSerializerContext) ??
+ throw new global::CursorAgents.ApiException(
+ message: $"Response deserialization failed for \"{__content}\" ",
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+
+ yield return __streamedResponse;
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.UnarchiveAgent.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.UnarchiveAgent.g.cs
new file mode 100644
index 0000000..197ec35
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.UnarchiveAgent.g.cs
@@ -0,0 +1,574 @@
+
+#nullable enable
+
+namespace CursorAgents
+{
+ public partial class CursorAgentsClient
+ {
+
+
+ private static readonly global::CursorAgents.EndPointSecurityRequirement s_UnarchiveAgentSecurityRequirement0 =
+ new global::CursorAgents.EndPointSecurityRequirement
+ {
+ Authorizations = new global::CursorAgents.EndPointAuthorizationRequirement[]
+ { new global::CursorAgents.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "BasicAuth",
+ Location = "Header",
+ Name = "Basic",
+ FriendlyName = "Basic",
+ },
+ },
+ };
+ private static readonly global::CursorAgents.EndPointSecurityRequirement[] s_UnarchiveAgentSecurityRequirements =
+ new global::CursorAgents.EndPointSecurityRequirement[]
+ { s_UnarchiveAgentSecurityRequirement0,
+ };
+ partial void PrepareUnarchiveAgentArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string id);
+ partial void PrepareUnarchiveAgentRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string id);
+ partial void ProcessUnarchiveAgentResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessUnarchiveAgentResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Unarchive an agent
+ /// Unarchive an agent so it can accept new runs again.
+ ///
+ ///
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task UnarchiveAgentAsync(
+ string id,
+ global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareUnarchiveAgentArguments(
+ httpClient: HttpClient,
+ id: ref id);
+
+
+ var __authorizations = global::CursorAgents.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_UnarchiveAgentSecurityRequirements,
+ operationName: "UnarchiveAgentAsync");
+
+ using var __timeoutCancellationTokenSource = global::CursorAgents.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::CursorAgents.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::CursorAgents.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+ var __pathBuilder = new global::CursorAgents.PathBuilder(
+ path: $"/v1/agents/{id}/unarchive",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ __path = global::CursorAgents.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::CursorAgents.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareUnarchiveAgentRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ id: id);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UnarchiveAgent",
+ methodName: "UnarchiveAgentAsync",
+ pathTemplate: "$\"/v1/agents/{id}/unarchive\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UnarchiveAgent",
+ methodName: "UnarchiveAgentAsync",
+ pathTemplate: "$\"/v1/agents/{id}/unarchive\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::CursorAgents.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UnarchiveAgent",
+ methodName: "UnarchiveAgentAsync",
+ pathTemplate: "$\"/v1/agents/{id}/unarchive\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: true,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ __response.Dispose();
+ __response = null;
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessUnarchiveAgentResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UnarchiveAgent",
+ methodName: "UnarchiveAgentAsync",
+ pathTemplate: "$\"/v1/agents/{id}/unarchive\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::CursorAgents.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::CursorAgents.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "UnarchiveAgent",
+ methodName: "UnarchiveAgentAsync",
+ pathTemplate: "$\"/v1/agents/{id}/unarchive\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Invalid or missing API key.
+ if ((int)__response.StatusCode == 401)
+ {
+ string? __content_401 = null;
+ global::System.Exception? __exception_401 = null;
+ global::CursorAgents.Error? __value_401 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_401 = global::CursorAgents.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ else
+ {
+ __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_401 = global::CursorAgents.Error.FromJson(__content_401, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_401 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_401 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_401,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_401,
+ ResponseObject = __value_401,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Authenticated but insufficient permissions, plan required, or feature unavailable.
+ if ((int)__response.StatusCode == 403)
+ {
+ string? __content_403 = null;
+ global::System.Exception? __exception_403 = null;
+ global::CursorAgents.Error? __value_403 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_403 = global::CursorAgents.Error.FromJson(__content_403, JsonSerializerContext);
+ }
+ else
+ {
+ __content_403 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_403 = global::CursorAgents.Error.FromJson(__content_403, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_403 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_403 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_403,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_403,
+ ResponseObject = __value_403,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Agent or run not found.
+ if ((int)__response.StatusCode == 404)
+ {
+ string? __content_404 = null;
+ global::System.Exception? __exception_404 = null;
+ global::CursorAgents.Error? __value_404 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_404 = global::CursorAgents.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ else
+ {
+ __content_404 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_404 = global::CursorAgents.Error.FromJson(__content_404, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_404 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_404 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_404,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_404,
+ ResponseObject = __value_404,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Rate limit exceeded. Response includes `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` headers.
+ if ((int)__response.StatusCode == 429)
+ {
+ string? __content_429 = null;
+ global::System.Exception? __exception_429 = null;
+ global::CursorAgents.Error? __value_429 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_429 = global::CursorAgents.Error.FromJson(__content_429, JsonSerializerContext);
+ }
+ else
+ {
+ __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_429 = global::CursorAgents.Error.FromJson(__content_429, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_429 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_429 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_429,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_429,
+ ResponseObject = __value_429,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Internal server error.
+ if ((int)__response.StatusCode == 500)
+ {
+ string? __content_500 = null;
+ global::System.Exception? __exception_500 = null;
+ global::CursorAgents.Error? __value_500 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_500 = global::CursorAgents.Error.FromJson(__content_500, JsonSerializerContext);
+ }
+ else
+ {
+ __content_500 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_500 = global::CursorAgents.Error.FromJson(__content_500, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_500 = __ex;
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content_500 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_500,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_500,
+ ResponseObject = __value_500,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessUnarchiveAgentResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ return
+ global::CursorAgents.IdResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw new global::CursorAgents.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ return
+ await global::CursorAgents.IdResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw new global::CursorAgents.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.g.cs
index fee11b4..a5eca2f 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.g.cs
@@ -4,7 +4,10 @@
namespace CursorAgents
{
///
- /// Programmatically create and manage AI-powered coding agents that work autonomously on your repositories
+ /// Programmatically create and manage Cursor Cloud Agents that work
+ /// autonomously on your repositories. v1 separates a durable agent
+ /// from one or more runs: each prompt submission creates a run on the
+ /// agent. Streaming and cancellation are scoped to the active run.
/// If no httpClient is provided, a new one will be created.
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
///
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListAgentArtifacts.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ArchiveAgent.g.cs
similarity index 80%
rename from src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListAgentArtifacts.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ArchiveAgent.g.cs
index 5ffa22c..35e256c 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListAgentArtifacts.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ArchiveAgent.g.cs
@@ -5,8 +5,8 @@ namespace CursorAgents
public partial interface ICursorAgentsClient
{
///
- /// List agent artifacts
- /// List artifacts generated by a cloud agent created within the last 6 months. Returns at most 100 artifacts.
+ /// Archive an agent
+ /// Archive an agent. Archived agents remain readable but cannot accept new runs until unarchived.
///
///
/// Example: bc-00000000-0000-0000-0000-000000000001
@@ -14,7 +14,7 @@ public partial interface ICursorAgentsClient
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- global::System.Threading.Tasks.Task ListAgentArtifactsAsync(
+ global::System.Threading.Tasks.Task ArchiveAgentAsync(
string id,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.Authorizations.Basic.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.Authorizations.Basic.g.cs
new file mode 100644
index 0000000..e1374cd
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.Authorizations.Basic.g.cs
@@ -0,0 +1,18 @@
+
+#nullable enable
+
+namespace CursorAgents
+{
+ public partial interface ICursorAgentsClient
+ {
+ ///
+ /// Authorize using basic authentication.
+ ///
+ ///
+ ///
+
+ public void AuthorizeUsingBasic(
+ string username,
+ string password);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.Authorizations.Bearer.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.Authorizations.Bearer.g.cs
deleted file mode 100644
index 4937452..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.Authorizations.Bearer.g.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-
-#nullable enable
-
-namespace CursorAgents
-{
- public partial interface ICursorAgentsClient
- {
- ///
- /// Authorize using bearer authentication.
- ///
- ///
-
- public void AuthorizeUsingBearer(
- string apiKey);
- }
-}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CancelRun.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CancelRun.g.cs
new file mode 100644
index 0000000..a280d83
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CancelRun.g.cs
@@ -0,0 +1,30 @@
+#nullable enable
+
+namespace CursorAgents
+{
+ public partial interface ICursorAgentsClient
+ {
+ ///
+ /// Cancel a run
+ /// Cancel the active run for an agent. Cancellation is terminal —
+ /// the run transitions to `CANCELLED`. Cancelling a run that is
+ /// already terminal or was never active returns
+ /// `409 run_not_cancellable`. To continue the conversation,
+ /// create a new run on the same agent.
+ ///
+ ///
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Example: run-00000000-0000-0000-0000-000000000001
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task CancelRunAsync(
+ string id,
+ string runId,
+ global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateAgent.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateAgent.g.cs
index 1f5abe5..d51061a 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateAgent.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateAgent.g.cs
@@ -5,8 +5,10 @@ namespace CursorAgents
public partial interface ICursorAgentsClient
{
///
- /// Launch an agent
- /// Start a new cloud agent to work on your repository
+ /// Create an agent
+ /// Create a Cloud Agent and immediately enqueue its initial run.
+ /// The response contains both the durable `agent` and the initial
+ /// `run`.
///
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
@@ -18,26 +20,43 @@ public partial interface ICursorAgentsClient
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
- /// Launch an agent
- /// Start a new cloud agent to work on your repository
+ /// Create an agent
+ /// Create a Cloud Agent and immediately enqueue its initial run.
+ /// The response contains both the durable `agent` and the initial
+ /// `run`.
///
///
- ///
- /// Set to an explicit model ID for launch requests, or use "default" to use the configured default model. When omitted, Cursor resolves your user default model, then your team default model, then a system default.
- /// Example: claude-4-sonnet
+ ///
+ ///
+ /// Repository configuration. v1 currently supports one entry.
+ ///
+ ///
+ /// Custom branch name for the agent to create.
+ /// Example: feature/add-readme
+ ///
+ ///
+ /// Whether to create a new branch (true) or push to an existing head branch (false). Only applies when `repos[0].prUrl` is provided.
+ /// Default Value: true
+ ///
+ ///
+ /// Whether Cursor should open a pull request when the run completes.
+ /// Default Value: false
+ ///
+ ///
+ /// Whether to skip requesting the user as a reviewer when Cursor opens a PR. Only applies when `autoCreatePR` is true.
+ /// Default Value: false
///
- ///
- ///
- ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
global::System.Threading.Tasks.Task CreateAgentAsync(
global::CursorAgents.CreateAgentRequestPrompt prompt,
- global::CursorAgents.CreateAgentRequestSource source,
- string? model = default,
- global::CursorAgents.CreateAgentRequestTarget? target = default,
- global::CursorAgents.CreateAgentRequestWebhook? webhook = default,
+ global::System.Collections.Generic.IList repos,
+ global::CursorAgents.ModelRef? model = default,
+ string? branchName = default,
+ bool? autoGenerateBranch = default,
+ bool? autoCreatePR = default,
+ bool? skipReviewerRequest = default,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.AddFollowup.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateRun.g.cs
similarity index 65%
rename from src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.AddFollowup.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateRun.g.cs
index 354bf7c..e1b4d99 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.AddFollowup.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateRun.g.cs
@@ -5,36 +5,40 @@ namespace CursorAgents
public partial interface ICursorAgentsClient
{
///
- /// Add followup
- /// Add a followup instruction to an existing cloud agent
+ /// Create a run
+ /// Send a follow-up prompt to an existing active agent. The new
+ /// run uses the agent's current conversation and workspace state.
+ /// Only one run can be active per agent at a time.
///
///
- /// Example: bc_abc123
+ /// Example: bc-00000000-0000-0000-0000-000000000001
///
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- global::System.Threading.Tasks.Task AddFollowupAsync(
+ global::System.Threading.Tasks.Task CreateRunAsync(
string id,
- global::CursorAgents.AddFollowupRequest request,
+ global::CursorAgents.CreateRunRequest request,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
///
- /// Add followup
- /// Add a followup instruction to an existing cloud agent
+ /// Create a run
+ /// Send a follow-up prompt to an existing active agent. The new
+ /// run uses the agent's current conversation and workspace state.
+ /// Only one run can be active per agent at a time.
///
///
- /// Example: bc_abc123
+ /// Example: bc-00000000-0000-0000-0000-000000000001
///
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- global::System.Threading.Tasks.Task AddFollowupAsync(
+ global::System.Threading.Tasks.Task CreateRunAsync(
string id,
- global::CursorAgents.AddFollowupRequestPrompt prompt,
+ global::CursorAgents.CreateRunRequestPrompt prompt,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.DeleteAgent.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.DeleteAgent.g.cs
index 83ee9af..c7d0741 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.DeleteAgent.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.DeleteAgent.g.cs
@@ -5,16 +5,16 @@ namespace CursorAgents
public partial interface ICursorAgentsClient
{
///
- /// Delete an agent
- /// Delete a cloud agent. This action is permanent and cannot be undone.
+ /// Delete an agent permanently
+ /// Permanently delete an agent. This action is irreversible. Use POST /v1/agents/{id}/archive for reversible removal.
///
///
- /// Example: bc_abc123
+ /// Example: bc-00000000-0000-0000-0000-000000000001
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- global::System.Threading.Tasks.Task DeleteAgentAsync(
+ global::System.Threading.Tasks.Task DeleteAgentAsync(
string id,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetAgentArtifact.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.DownloadArtifact.g.cs
similarity index 79%
rename from src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetAgentArtifact.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.DownloadArtifact.g.cs
index 46f0bf1..e2c65d3 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetAgentArtifact.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.DownloadArtifact.g.cs
@@ -6,18 +6,20 @@ public partial interface ICursorAgentsClient
{
///
/// Download an artifact
- /// Retrieve a temporary 15-minute presigned S3 URL for a specific artifact from an agent created within the last 6 months. The response includes both the URL and its expiration time.
+ /// Retrieve a temporary 15-minute presigned S3 URL for an
+ /// artifact. The `path` query parameter must be a relative path
+ /// under `artifacts/` returned by GET /v1/agents/{id}/artifacts.
///
///
/// Example: bc-00000000-0000-0000-0000-000000000001
///
///
- /// Example: /opt/cursor/artifacts/screenshot.png
+ /// Example: artifacts/screenshot.png
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- global::System.Threading.Tasks.Task GetAgentArtifactAsync(
+ global::System.Threading.Tasks.Task DownloadArtifactAsync(
string id,
string path,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetAgent.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetAgent.g.cs
index e4aab8b..cf32293 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetAgent.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetAgent.g.cs
@@ -5,16 +5,16 @@ namespace CursorAgents
public partial interface ICursorAgentsClient
{
///
- /// Agent status
- /// Retrieve the current status and results of a cloud agent
+ /// Get an agent
+ /// Retrieve durable metadata for an agent. Execution status lives on runs.
///
///
- /// Example: bc_abc123
+ /// Example: bc-00000000-0000-0000-0000-000000000001
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- global::System.Threading.Tasks.Task GetAgentAsync(
+ global::System.Threading.Tasks.Task GetAgentAsync(
string id,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetMe.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetApiKeyInfo.g.cs
similarity index 93%
rename from src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetMe.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetApiKeyInfo.g.cs
index 018c0be..a56d410 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetMe.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetApiKeyInfo.g.cs
@@ -6,12 +6,12 @@ public partial interface ICursorAgentsClient
{
///
/// API key info
- /// Retrieve information about the API key being used for authentication
+ /// Retrieve information about the API key being used for authentication.
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- global::System.Threading.Tasks.Task GetMeAsync(
+ global::System.Threading.Tasks.Task GetApiKeyInfoAsync(
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetAgentConversation.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetRun.g.cs
similarity index 71%
rename from src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetAgentConversation.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetRun.g.cs
index 5e8a835..343e41b 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetAgentConversation.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.GetRun.g.cs
@@ -5,17 +5,21 @@ namespace CursorAgents
public partial interface ICursorAgentsClient
{
///
- /// Get agent conversation
- /// Retrieve the conversation history of a cloud agent, including all user prompts and assistant responses
+ /// Get a run
+ /// Retrieve status and timestamps for a specific run.
///
///
- /// Example: bc_abc123
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Example: run-00000000-0000-0000-0000-000000000001
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- global::System.Threading.Tasks.Task GetAgentConversationAsync(
+ global::System.Threading.Tasks.Task GetRunAsync(
string id,
+ string runId,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListAgents.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListAgents.g.cs
index 47cf309..67b4de9 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListAgents.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListAgents.g.cs
@@ -6,16 +6,15 @@ public partial interface ICursorAgentsClient
{
///
/// List agents
- /// List all cloud agents for the authenticated user
+ /// List agents for the authenticated user, newest first.
///
///
/// Default Value: 20
///
- ///
- /// Example: bc_xyz789
- ///
- ///
- /// Example: https://github.com/your-org/your-repo/pull/123
+ ///
+ ///
+ ///
+ /// Default Value: true
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
@@ -24,6 +23,7 @@ public partial interface ICursorAgentsClient
int? limit = default,
string? cursor = default,
string? prUrl = default,
+ bool? includeArchived = default,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListArtifacts.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListArtifacts.g.cs
new file mode 100644
index 0000000..a194b88
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListArtifacts.g.cs
@@ -0,0 +1,25 @@
+#nullable enable
+
+namespace CursorAgents
+{
+ public partial interface ICursorAgentsClient
+ {
+ ///
+ /// List artifacts
+ /// List artifacts produced by an agent. Each artifact's `path` is
+ /// relative to the workspace's `artifacts/` directory. Pass that
+ /// `path` to GET /v1/agents/{id}/artifacts/download to obtain a
+ /// presigned download URL.
+ ///
+ ///
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ListArtifactsAsync(
+ string id,
+ global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListModels.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListModels.g.cs
index e5fa4df..9c42022 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListModels.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListModels.g.cs
@@ -5,8 +5,11 @@ namespace CursorAgents
public partial interface ICursorAgentsClient
{
///
- /// List available models
- /// Returns a recommended set of explicit model IDs for launch requests. This list excludes "default".
+ /// List models
+ /// Returns a recommended set of explicit model IDs you can pass
+ /// to the `model.id` field on POST /v1/agents. To use the
+ /// configured default model, omit the `model` field from the
+ /// request body entirely.
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListRepositories.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListRepositories.g.cs
index 65fd67b..f0eca97 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListRepositories.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListRepositories.g.cs
@@ -6,7 +6,13 @@ public partial interface ICursorAgentsClient
{
///
/// List GitHub repositories
- /// Retrieve a list of GitHub repositories accessible to the authenticated user
+ /// List GitHub repositories accessible to the authenticated user
+ /// through Cursor's GitHub App installation. This endpoint has
+ /// very strict rate limits (1 request per user per minute, 30
+ /// per user per hour) and can take tens of seconds to respond
+ /// for users with access to many repositories. Cache responses
+ /// aggressively and handle this information not being available
+ /// gracefully.
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListRuns.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListRuns.g.cs
new file mode 100644
index 0000000..355236d
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.ListRuns.g.cs
@@ -0,0 +1,28 @@
+#nullable enable
+
+namespace CursorAgents
+{
+ public partial interface ICursorAgentsClient
+ {
+ ///
+ /// List runs
+ /// List runs for an agent, newest first.
+ ///
+ ///
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Default Value: 20
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ListRunsAsync(
+ string id,
+ int? limit = default,
+ string? cursor = default,
+ global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.StreamRun.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.StreamRun.g.cs
new file mode 100644
index 0000000..cb8d5ff
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.StreamRun.g.cs
@@ -0,0 +1,34 @@
+#nullable enable
+
+namespace CursorAgents
+{
+ public partial interface ICursorAgentsClient
+ {
+ ///
+ /// Stream a run
+ /// Stream Server-Sent Events for one run. Event types include
+ /// `status`, `assistant`, `thinking`, `tool_call`, `heartbeat`,
+ /// `result`, `error`, and `done`. Reconnect with the
+ /// `Last-Event-ID` header to resume after a disconnect; the event
+ /// ID must belong to the requested run. Responses include the
+ /// `X-Cursor-Stream-Retention-Seconds` header. After the
+ /// retention window the endpoint may return `410 stream_expired`.
+ ///
+ ///
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Example: run-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Collections.Generic.IAsyncEnumerable StreamRunAsync(
+ string id,
+ string runId,
+ string? lastEventId = default,
+ global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.StopAgent.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.UnarchiveAgent.g.cs
similarity index 77%
rename from src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.StopAgent.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.UnarchiveAgent.g.cs
index 0c7edd2..e0fee25 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.StopAgent.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.UnarchiveAgent.g.cs
@@ -5,16 +5,16 @@ namespace CursorAgents
public partial interface ICursorAgentsClient
{
///
- /// Stop an agent
- /// Stop a running cloud agent. This pauses the agent's execution without deleting it. Stopped agents cannot be resumed.
+ /// Unarchive an agent
+ /// Unarchive an agent so it can accept new runs again.
///
///
- /// Example: bc_abc123
+ /// Example: bc-00000000-0000-0000-0000-000000000001
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
- global::System.Threading.Tasks.Task StopAgentAsync(
+ global::System.Threading.Tasks.Task UnarchiveAgentAsync(
string id,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.g.cs
index 39a2f24..2b8f29f 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.g.cs
@@ -4,7 +4,10 @@
namespace CursorAgents
{
///
- /// Programmatically create and manage AI-powered coding agents that work autonomously on your repositories
+ /// Programmatically create and manage Cursor Cloud Agents that work
+ /// autonomously on your repositories. v1 separates a durable agent
+ /// from one or more runs: each prompt submission creates a run on the
+ /// agent. Streaming and cancellation are scoped to the active run.
/// If no httpClient is provided, a new one will be created.
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
///
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.Agent.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.Agent.g.cs
new file mode 100644
index 0000000..3db6a5c
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.Agent.g.cs
@@ -0,0 +1,155 @@
+#nullable enable
+#pragma warning disable CS0618 // Type or member is obsolete
+
+namespace CursorAgents.JsonConverters
+{
+ ///
+ public class AgentJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::CursorAgents.Agent Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+
+ using var __jsonDocument = global::System.Text.Json.JsonDocument.ParseValue(ref reader);
+ var __rawJson = __jsonDocument.RootElement.GetRawText();
+ var __jsonProps = new global::System.Collections.Generic.HashSet();
+ if (__jsonDocument.RootElement.ValueKind == global::System.Text.Json.JsonValueKind.Object)
+ {
+ foreach (var __jsonProp in __jsonDocument.RootElement.EnumerateObject())
+ {
+ __jsonProps.Add(__jsonProp.Name);
+ if (__jsonProp.Value.ValueKind == global::System.Text.Json.JsonValueKind.Object)
+ {
+ foreach (var __nestedJsonProp in __jsonProp.Value.EnumerateObject())
+ {
+ __jsonProps.Add(__jsonProp.Name + "." + __nestedJsonProp.Name);
+ }
+ }
+
+ }
+ }
+
+ var __score0 = 0;
+ if (__jsonProps.Contains("createdAt")) __score0++;
+ if (__jsonProps.Contains("env")) __score0++;
+ if (__jsonProps.Contains("env.type")) __score0++;
+ if (__jsonProps.Contains("id")) __score0++;
+ if (__jsonProps.Contains("latestRunId")) __score0++;
+ if (__jsonProps.Contains("name")) __score0++;
+ if (__jsonProps.Contains("status")) __score0++;
+ if (__jsonProps.Contains("updatedAt")) __score0++;
+ if (__jsonProps.Contains("url")) __score0++;
+ var __score1 = 0;
+ if (__jsonProps.Contains("autoCreatePR")) __score1++;
+ if (__jsonProps.Contains("autoGenerateBranch")) __score1++;
+ if (__jsonProps.Contains("branchName")) __score1++;
+ if (__jsonProps.Contains("repos")) __score1++;
+ if (__jsonProps.Contains("skipReviewerRequest")) __score1++;
+ var __bestScore = 0;
+ var __bestIndex = -1;
+ if (__score0 > __bestScore) { __bestScore = __score0; __bestIndex = 0; }
+ if (__score1 > __bestScore) { __bestScore = __score1; __bestIndex = 1; }
+
+ global::CursorAgents.AgentSummary? summary = default;
+ global::CursorAgents.AgentVariant2? agentVariant2 = default;
+ if (__bestIndex >= 0)
+ {
+ if (__bestIndex == 0)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::CursorAgents.AgentSummary), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::CursorAgents.AgentSummary).Name}");
+ summary = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ else if (__bestIndex == 1)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::CursorAgents.AgentVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::CursorAgents.AgentVariant2).Name}");
+ agentVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+ }
+
+ if (summary == null && agentVariant2 == null)
+ {
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::CursorAgents.AgentSummary), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::CursorAgents.AgentSummary).Name}");
+ summary = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+
+ try
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::CursorAgents.AgentVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::CursorAgents.AgentVariant2).Name}");
+ agentVariant2 = global::System.Text.Json.JsonSerializer.Deserialize(__rawJson, typeInfo);
+ }
+ catch (global::System.Text.Json.JsonException)
+ {
+ }
+ catch (global::System.InvalidOperationException)
+ {
+ }
+ }
+
+ var __value = new global::CursorAgents.Agent(
+ summary,
+
+ agentVariant2
+ );
+
+ return __value;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::CursorAgents.Agent value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ options = options ?? throw new global::System.ArgumentNullException(nameof(options));
+ var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set.");
+
+ if (value.IsSummary)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::CursorAgents.AgentSummary), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::CursorAgents.AgentSummary).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.Summary!, typeInfo);
+ }
+ else if (value.IsAgentVariant2)
+ {
+ var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::CursorAgents.AgentVariant2), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ??
+ throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::CursorAgents.AgentVariant2).Name}");
+ global::System.Text.Json.JsonSerializer.Serialize(writer, value.AgentVariant2!, typeInfo);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.GetAgentResponseStatus.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.AgentSummaryStatus.g.cs
similarity index 66%
rename from src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.GetAgentResponseStatus.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.AgentSummaryStatus.g.cs
index 573336b..631b470 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.GetAgentResponseStatus.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.AgentSummaryStatus.g.cs
@@ -3,10 +3,10 @@
namespace CursorAgents.JsonConverters
{
///
- public sealed class GetAgentResponseStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ public sealed class AgentSummaryStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter
{
///
- public override global::CursorAgents.GetAgentResponseStatus Read(
+ public override global::CursorAgents.AgentSummaryStatus Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
@@ -18,7 +18,7 @@ public sealed class GetAgentResponseStatusJsonConverter : global::System.Text.Js
var stringValue = reader.GetString();
if (stringValue != null)
{
- return global::CursorAgents.GetAgentResponseStatusExtensions.ToEnum(stringValue) ?? default;
+ return global::CursorAgents.AgentSummaryStatusExtensions.ToEnum(stringValue) ?? default;
}
break;
@@ -26,11 +26,11 @@ public sealed class GetAgentResponseStatusJsonConverter : global::System.Text.Js
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
- return (global::CursorAgents.GetAgentResponseStatus)numValue;
+ return (global::CursorAgents.AgentSummaryStatus)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
- return default(global::CursorAgents.GetAgentResponseStatus);
+ return default(global::CursorAgents.AgentSummaryStatus);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
@@ -42,12 +42,12 @@ public sealed class GetAgentResponseStatusJsonConverter : global::System.Text.Js
///
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
- global::CursorAgents.GetAgentResponseStatus value,
+ global::CursorAgents.AgentSummaryStatus value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
- writer.WriteStringValue(global::CursorAgents.GetAgentResponseStatusExtensions.ToValueString(value));
+ writer.WriteStringValue(global::CursorAgents.AgentSummaryStatusExtensions.ToValueString(value));
}
}
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.GetAgentResponseStatusNullable.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.AgentSummaryStatusNullable.g.cs
similarity index 68%
rename from src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.GetAgentResponseStatusNullable.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.AgentSummaryStatusNullable.g.cs
index 2ce7122..30c7da7 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.GetAgentResponseStatusNullable.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.AgentSummaryStatusNullable.g.cs
@@ -3,10 +3,10 @@
namespace CursorAgents.JsonConverters
{
///
- public sealed class GetAgentResponseStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ public sealed class AgentSummaryStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
{
///
- public override global::CursorAgents.GetAgentResponseStatus? Read(
+ public override global::CursorAgents.AgentSummaryStatus? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
@@ -18,7 +18,7 @@ public sealed class GetAgentResponseStatusNullableJsonConverter : global::System
var stringValue = reader.GetString();
if (stringValue != null)
{
- return global::CursorAgents.GetAgentResponseStatusExtensions.ToEnum(stringValue);
+ return global::CursorAgents.AgentSummaryStatusExtensions.ToEnum(stringValue);
}
break;
@@ -26,11 +26,11 @@ public sealed class GetAgentResponseStatusNullableJsonConverter : global::System
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
- return (global::CursorAgents.GetAgentResponseStatus)numValue;
+ return (global::CursorAgents.AgentSummaryStatus)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
- return default(global::CursorAgents.GetAgentResponseStatus?);
+ return default(global::CursorAgents.AgentSummaryStatus?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
@@ -42,7 +42,7 @@ public sealed class GetAgentResponseStatusNullableJsonConverter : global::System
///
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
- global::CursorAgents.GetAgentResponseStatus? value,
+ global::CursorAgents.AgentSummaryStatus? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
@@ -53,7 +53,7 @@ public override void Write(
}
else
{
- writer.WriteStringValue(global::CursorAgents.GetAgentResponseStatusExtensions.ToValueString(value.Value));
+ writer.WriteStringValue(global::CursorAgents.AgentSummaryStatusExtensions.ToValueString(value.Value));
}
}
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.GetAgentConversationResponseMessageType.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.GetAgentConversationResponseMessageType.g.cs
deleted file mode 100644
index 385069c..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.GetAgentConversationResponseMessageType.g.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-#nullable enable
-
-namespace CursorAgents.JsonConverters
-{
- ///
- public sealed class GetAgentConversationResponseMessageTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
- {
- ///
- public override global::CursorAgents.GetAgentConversationResponseMessageType Read(
- ref global::System.Text.Json.Utf8JsonReader reader,
- global::System.Type typeToConvert,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- switch (reader.TokenType)
- {
- case global::System.Text.Json.JsonTokenType.String:
- {
- var stringValue = reader.GetString();
- if (stringValue != null)
- {
- return global::CursorAgents.GetAgentConversationResponseMessageTypeExtensions.ToEnum(stringValue) ?? default;
- }
-
- break;
- }
- case global::System.Text.Json.JsonTokenType.Number:
- {
- var numValue = reader.GetInt32();
- return (global::CursorAgents.GetAgentConversationResponseMessageType)numValue;
- }
- case global::System.Text.Json.JsonTokenType.Null:
- {
- return default(global::CursorAgents.GetAgentConversationResponseMessageType);
- }
- default:
- throw new global::System.ArgumentOutOfRangeException(nameof(reader));
- }
-
- return default;
- }
-
- ///
- public override void Write(
- global::System.Text.Json.Utf8JsonWriter writer,
- global::CursorAgents.GetAgentConversationResponseMessageType value,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
-
- writer.WriteStringValue(global::CursorAgents.GetAgentConversationResponseMessageTypeExtensions.ToValueString(value));
- }
- }
-}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.GetAgentConversationResponseMessageTypeNullable.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.GetAgentConversationResponseMessageTypeNullable.g.cs
deleted file mode 100644
index e51ff7f..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.GetAgentConversationResponseMessageTypeNullable.g.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-#nullable enable
-
-namespace CursorAgents.JsonConverters
-{
- ///
- public sealed class GetAgentConversationResponseMessageTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
- {
- ///
- public override global::CursorAgents.GetAgentConversationResponseMessageType? Read(
- ref global::System.Text.Json.Utf8JsonReader reader,
- global::System.Type typeToConvert,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- switch (reader.TokenType)
- {
- case global::System.Text.Json.JsonTokenType.String:
- {
- var stringValue = reader.GetString();
- if (stringValue != null)
- {
- return global::CursorAgents.GetAgentConversationResponseMessageTypeExtensions.ToEnum(stringValue);
- }
-
- break;
- }
- case global::System.Text.Json.JsonTokenType.Number:
- {
- var numValue = reader.GetInt32();
- return (global::CursorAgents.GetAgentConversationResponseMessageType)numValue;
- }
- case global::System.Text.Json.JsonTokenType.Null:
- {
- return default(global::CursorAgents.GetAgentConversationResponseMessageType?);
- }
- default:
- throw new global::System.ArgumentOutOfRangeException(nameof(reader));
- }
-
- return default;
- }
-
- ///
- public override void Write(
- global::System.Text.Json.Utf8JsonWriter writer,
- global::CursorAgents.GetAgentConversationResponseMessageType? value,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
-
- if (value == null)
- {
- writer.WriteNullValue();
- }
- else
- {
- writer.WriteStringValue(global::CursorAgents.GetAgentConversationResponseMessageTypeExtensions.ToValueString(value.Value));
- }
- }
- }
-}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.ListAgentsResponseAgentStatus.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.ListAgentsResponseAgentStatus.g.cs
deleted file mode 100644
index 1ba2e61..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.ListAgentsResponseAgentStatus.g.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-#nullable enable
-
-namespace CursorAgents.JsonConverters
-{
- ///
- public sealed class ListAgentsResponseAgentStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter
- {
- ///
- public override global::CursorAgents.ListAgentsResponseAgentStatus Read(
- ref global::System.Text.Json.Utf8JsonReader reader,
- global::System.Type typeToConvert,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- switch (reader.TokenType)
- {
- case global::System.Text.Json.JsonTokenType.String:
- {
- var stringValue = reader.GetString();
- if (stringValue != null)
- {
- return global::CursorAgents.ListAgentsResponseAgentStatusExtensions.ToEnum(stringValue) ?? default;
- }
-
- break;
- }
- case global::System.Text.Json.JsonTokenType.Number:
- {
- var numValue = reader.GetInt32();
- return (global::CursorAgents.ListAgentsResponseAgentStatus)numValue;
- }
- case global::System.Text.Json.JsonTokenType.Null:
- {
- return default(global::CursorAgents.ListAgentsResponseAgentStatus);
- }
- default:
- throw new global::System.ArgumentOutOfRangeException(nameof(reader));
- }
-
- return default;
- }
-
- ///
- public override void Write(
- global::System.Text.Json.Utf8JsonWriter writer,
- global::CursorAgents.ListAgentsResponseAgentStatus value,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
-
- writer.WriteStringValue(global::CursorAgents.ListAgentsResponseAgentStatusExtensions.ToValueString(value));
- }
- }
-}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.ListAgentsResponseAgentStatusNullable.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.ListAgentsResponseAgentStatusNullable.g.cs
deleted file mode 100644
index 5387eaa..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.ListAgentsResponseAgentStatusNullable.g.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-#nullable enable
-
-namespace CursorAgents.JsonConverters
-{
- ///
- public sealed class ListAgentsResponseAgentStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
- {
- ///
- public override global::CursorAgents.ListAgentsResponseAgentStatus? Read(
- ref global::System.Text.Json.Utf8JsonReader reader,
- global::System.Type typeToConvert,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- switch (reader.TokenType)
- {
- case global::System.Text.Json.JsonTokenType.String:
- {
- var stringValue = reader.GetString();
- if (stringValue != null)
- {
- return global::CursorAgents.ListAgentsResponseAgentStatusExtensions.ToEnum(stringValue);
- }
-
- break;
- }
- case global::System.Text.Json.JsonTokenType.Number:
- {
- var numValue = reader.GetInt32();
- return (global::CursorAgents.ListAgentsResponseAgentStatus)numValue;
- }
- case global::System.Text.Json.JsonTokenType.Null:
- {
- return default(global::CursorAgents.ListAgentsResponseAgentStatus?);
- }
- default:
- throw new global::System.ArgumentOutOfRangeException(nameof(reader));
- }
-
- return default;
- }
-
- ///
- public override void Write(
- global::System.Text.Json.Utf8JsonWriter writer,
- global::CursorAgents.ListAgentsResponseAgentStatus? value,
- global::System.Text.Json.JsonSerializerOptions options)
- {
- writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
-
- if (value == null)
- {
- writer.WriteNullValue();
- }
- else
- {
- writer.WriteStringValue(global::CursorAgents.ListAgentsResponseAgentStatusExtensions.ToValueString(value.Value));
- }
- }
- }
-}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.CreateAgentResponseStatus.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.RunStatus.g.cs
similarity index 66%
rename from src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.CreateAgentResponseStatus.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.RunStatus.g.cs
index ac1084d..26c5917 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.CreateAgentResponseStatus.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.RunStatus.g.cs
@@ -3,10 +3,10 @@
namespace CursorAgents.JsonConverters
{
///
- public sealed class CreateAgentResponseStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ public sealed class RunStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter
{
///
- public override global::CursorAgents.CreateAgentResponseStatus Read(
+ public override global::CursorAgents.RunStatus Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
@@ -18,7 +18,7 @@ public sealed class CreateAgentResponseStatusJsonConverter : global::System.Text
var stringValue = reader.GetString();
if (stringValue != null)
{
- return global::CursorAgents.CreateAgentResponseStatusExtensions.ToEnum(stringValue) ?? default;
+ return global::CursorAgents.RunStatusExtensions.ToEnum(stringValue) ?? default;
}
break;
@@ -26,11 +26,11 @@ public sealed class CreateAgentResponseStatusJsonConverter : global::System.Text
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
- return (global::CursorAgents.CreateAgentResponseStatus)numValue;
+ return (global::CursorAgents.RunStatus)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
- return default(global::CursorAgents.CreateAgentResponseStatus);
+ return default(global::CursorAgents.RunStatus);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
@@ -42,12 +42,12 @@ public sealed class CreateAgentResponseStatusJsonConverter : global::System.Text
///
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
- global::CursorAgents.CreateAgentResponseStatus value,
+ global::CursorAgents.RunStatus value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
- writer.WriteStringValue(global::CursorAgents.CreateAgentResponseStatusExtensions.ToValueString(value));
+ writer.WriteStringValue(global::CursorAgents.RunStatusExtensions.ToValueString(value));
}
}
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.CreateAgentResponseStatusNullable.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.RunStatusNullable.g.cs
similarity index 68%
rename from src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.CreateAgentResponseStatusNullable.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.RunStatusNullable.g.cs
index 5502f30..588802c 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.CreateAgentResponseStatusNullable.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.RunStatusNullable.g.cs
@@ -3,10 +3,10 @@
namespace CursorAgents.JsonConverters
{
///
- public sealed class CreateAgentResponseStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ public sealed class RunStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
{
///
- public override global::CursorAgents.CreateAgentResponseStatus? Read(
+ public override global::CursorAgents.RunStatus? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
@@ -18,7 +18,7 @@ public sealed class CreateAgentResponseStatusNullableJsonConverter : global::Sys
var stringValue = reader.GetString();
if (stringValue != null)
{
- return global::CursorAgents.CreateAgentResponseStatusExtensions.ToEnum(stringValue);
+ return global::CursorAgents.RunStatusExtensions.ToEnum(stringValue);
}
break;
@@ -26,11 +26,11 @@ public sealed class CreateAgentResponseStatusNullableJsonConverter : global::Sys
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
- return (global::CursorAgents.CreateAgentResponseStatus)numValue;
+ return (global::CursorAgents.RunStatus)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
- return default(global::CursorAgents.CreateAgentResponseStatus?);
+ return default(global::CursorAgents.RunStatus?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
@@ -42,7 +42,7 @@ public sealed class CreateAgentResponseStatusNullableJsonConverter : global::Sys
///
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
- global::CursorAgents.CreateAgentResponseStatus? value,
+ global::CursorAgents.RunStatus? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
@@ -53,7 +53,7 @@ public override void Write(
}
else
{
- writer.WriteStringValue(global::CursorAgents.CreateAgentResponseStatusExtensions.ToValueString(value.Value));
+ writer.WriteStringValue(global::CursorAgents.RunStatusExtensions.ToValueString(value.Value));
}
}
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContext.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContext.g.cs
index aa64924..bdabff2 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContext.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContext.g.cs
@@ -13,21 +13,15 @@ namespace CursorAgents
DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull,
Converters = new global::System.Type[]
{
- typeof(global::CursorAgents.JsonConverters.CreateAgentResponseStatusJsonConverter),
+ typeof(global::CursorAgents.JsonConverters.AgentSummaryStatusJsonConverter),
- typeof(global::CursorAgents.JsonConverters.CreateAgentResponseStatusNullableJsonConverter),
+ typeof(global::CursorAgents.JsonConverters.AgentSummaryStatusNullableJsonConverter),
- typeof(global::CursorAgents.JsonConverters.ListAgentsResponseAgentStatusJsonConverter),
+ typeof(global::CursorAgents.JsonConverters.RunStatusJsonConverter),
- typeof(global::CursorAgents.JsonConverters.ListAgentsResponseAgentStatusNullableJsonConverter),
+ typeof(global::CursorAgents.JsonConverters.RunStatusNullableJsonConverter),
- typeof(global::CursorAgents.JsonConverters.GetAgentResponseStatusJsonConverter),
-
- typeof(global::CursorAgents.JsonConverters.GetAgentResponseStatusNullableJsonConverter),
-
- typeof(global::CursorAgents.JsonConverters.GetAgentConversationResponseMessageTypeJsonConverter),
-
- typeof(global::CursorAgents.JsonConverters.GetAgentConversationResponseMessageTypeNullableJsonConverter),
+ typeof(global::CursorAgents.JsonConverters.AgentJsonConverter),
typeof(global::CursorAgents.JsonConverters.UnixTimestampJsonConverter),
})]
@@ -36,56 +30,50 @@ namespace CursorAgents
[global::System.Text.Json.Serialization.JsonSerializable(typeof(int))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.Image))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(string))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ModelRef))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.RepoConfig))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.AgentEnv))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.AgentSummary))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.AgentSummaryStatus), TypeInfoPropertyName = "AgentSummaryStatus2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.Agent), TypeInfoPropertyName = "Agent2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.AgentVariant2))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.Run))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.RunStatus), TypeInfoPropertyName = "RunStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.CreateAgentRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.CreateAgentRequestPrompt))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.CreateAgentRequestSource))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.CreateAgentRequestTarget))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.CreateAgentRequestWebhook))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.Error))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ErrorError1))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.CreateRunRequest))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.CreateRunRequestPrompt))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.CreateAgentResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.CreateRunResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ListAgentsResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ListRunsResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.IdResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.Artifact))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(long))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.DateTime))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ListArtifactsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.GetArtifactResponse))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.AddFollowupRequest))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.AddFollowupRequestPrompt))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.CreateAgentResponse))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.CreateAgentResponseStatus), TypeInfoPropertyName = "CreateAgentResponseStatus2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.CreateAgentResponseSource))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.CreateAgentResponseTarget))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ListAgentsResponse))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ListAgentsResponseAgent))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ListAgentsResponseAgentStatus), TypeInfoPropertyName = "ListAgentsResponseAgentStatus2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ListAgentsResponseAgentSource))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ListAgentsResponseAgentTarget))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.GetAgentResponse))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.GetAgentResponseStatus), TypeInfoPropertyName = "GetAgentResponseStatus2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.GetAgentResponseSource))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.GetAgentResponseTarget))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.DeleteAgentResponse))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.AddFollowupResponse))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.StopAgentResponse))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.GetAgentConversationResponse))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.GetAgentConversationResponseMessage))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.GetAgentConversationResponseMessageType), TypeInfoPropertyName = "GetAgentConversationResponseMessageType2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.GetMeResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.DownloadArtifactResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ApiKeyInfo))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ListModelsResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.Repository))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ListRepositoriesResponse))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ListRepositoriesResponseRepositorie))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.Error))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.ErrorError1))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
public sealed partial class SourceGenerationContext : global::System.Text.Json.Serialization.JsonSerializerContext
{
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContextTypes.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContextTypes.g.cs
index f6337df..0adbb92 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContextTypes.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContextTypes.g.cs
@@ -44,71 +44,71 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::CursorAgents.CreateAgentRequest? Type4 { get; set; }
+ public global::CursorAgents.ModelRef? Type4 { get; set; }
///
///
///
- public global::CursorAgents.CreateAgentRequestPrompt? Type5 { get; set; }
+ public global::CursorAgents.RepoConfig? Type5 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type6 { get; set; }
+ public global::CursorAgents.AgentEnv? Type6 { get; set; }
///
///
///
- public global::CursorAgents.CreateAgentRequestSource? Type7 { get; set; }
+ public global::CursorAgents.AgentSummary? Type7 { get; set; }
///
///
///
- public global::CursorAgents.CreateAgentRequestTarget? Type8 { get; set; }
+ public global::CursorAgents.AgentSummaryStatus? Type8 { get; set; }
///
///
///
- public bool? Type9 { get; set; }
+ public global::System.DateTime? Type9 { get; set; }
///
///
///
- public global::CursorAgents.CreateAgentRequestWebhook? Type10 { get; set; }
+ public global::CursorAgents.Agent? Type10 { get; set; }
///
///
///
- public global::CursorAgents.Error? Type11 { get; set; }
+ public global::CursorAgents.AgentVariant2? Type11 { get; set; }
///
///
///
- public global::CursorAgents.ErrorError1? Type12 { get; set; }
+ public global::System.Collections.Generic.IList? Type12 { get; set; }
///
///
///
- public global::CursorAgents.Artifact? Type13 { get; set; }
+ public bool? Type13 { get; set; }
///
///
///
- public long? Type14 { get; set; }
+ public global::CursorAgents.Run? Type14 { get; set; }
///
///
///
- public global::System.DateTime? Type15 { get; set; }
+ public global::CursorAgents.RunStatus? Type15 { get; set; }
///
///
///
- public global::CursorAgents.ListArtifactsResponse? Type16 { get; set; }
+ public global::CursorAgents.CreateAgentRequest? Type16 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type17 { get; set; }
+ public global::CursorAgents.CreateAgentRequestPrompt? Type17 { get; set; }
///
///
///
- public global::CursorAgents.GetArtifactResponse? Type18 { get; set; }
+ public global::System.Collections.Generic.IList? Type18 { get; set; }
///
///
///
- public global::CursorAgents.AddFollowupRequest? Type19 { get; set; }
+ public global::CursorAgents.CreateRunRequest? Type19 { get; set; }
///
///
///
- public global::CursorAgents.AddFollowupRequestPrompt? Type20 { get; set; }
+ public global::CursorAgents.CreateRunRequestPrompt? Type20 { get; set; }
///
///
///
@@ -116,131 +116,107 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::CursorAgents.CreateAgentResponseStatus? Type22 { get; set; }
+ public global::CursorAgents.CreateRunResponse? Type22 { get; set; }
///
///
///
- public global::CursorAgents.CreateAgentResponseSource? Type23 { get; set; }
+ public global::CursorAgents.ListAgentsResponse? Type23 { get; set; }
///
///
///
- public global::CursorAgents.CreateAgentResponseTarget? Type24 { get; set; }
+ public global::System.Collections.Generic.IList? Type24 { get; set; }
///
///
///
- public global::CursorAgents.ListAgentsResponse? Type25 { get; set; }
+ public global::CursorAgents.ListRunsResponse? Type25 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type26 { get; set; }
+ public global::System.Collections.Generic.IList? Type26 { get; set; }
///
///
///
- public global::CursorAgents.ListAgentsResponseAgent? Type27 { get; set; }
+ public global::CursorAgents.IdResponse? Type27 { get; set; }
///
///
///
- public global::CursorAgents.ListAgentsResponseAgentStatus? Type28 { get; set; }
+ public global::CursorAgents.Artifact? Type28 { get; set; }
///
///
///
- public global::CursorAgents.ListAgentsResponseAgentSource? Type29 { get; set; }
+ public long? Type29 { get; set; }
///
///
///
- public global::CursorAgents.ListAgentsResponseAgentTarget? Type30 { get; set; }
+ public global::CursorAgents.ListArtifactsResponse? Type30 { get; set; }
///
///
///
- public global::CursorAgents.GetAgentResponse? Type31 { get; set; }
+ public global::System.Collections.Generic.IList? Type31 { get; set; }
///
///
///
- public global::CursorAgents.GetAgentResponseStatus? Type32 { get; set; }
+ public global::CursorAgents.DownloadArtifactResponse? Type32 { get; set; }
///
///
///
- public global::CursorAgents.GetAgentResponseSource? Type33 { get; set; }
+ public global::CursorAgents.ApiKeyInfo? Type33 { get; set; }
///
///
///
- public global::CursorAgents.GetAgentResponseTarget? Type34 { get; set; }
+ public global::CursorAgents.ListModelsResponse? Type34 { get; set; }
///
///
///
- public global::CursorAgents.DeleteAgentResponse? Type35 { get; set; }
+ public global::System.Collections.Generic.IList? Type35 { get; set; }
///
///
///
- public global::CursorAgents.AddFollowupResponse? Type36 { get; set; }
+ public global::CursorAgents.Repository? Type36 { get; set; }
///
///
///
- public global::CursorAgents.StopAgentResponse? Type37 { get; set; }
+ public global::CursorAgents.ListRepositoriesResponse? Type37 { get; set; }
///
///
///
- public global::CursorAgents.GetAgentConversationResponse? Type38 { get; set; }
+ public global::System.Collections.Generic.IList? Type38 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type39 { get; set; }
+ public global::CursorAgents.Error? Type39 { get; set; }
///
///
///
- public global::CursorAgents.GetAgentConversationResponseMessage? Type40 { get; set; }
- ///
- ///
- ///
- public global::CursorAgents.GetAgentConversationResponseMessageType? Type41 { get; set; }
- ///
- ///
- ///
- public global::CursorAgents.GetMeResponse? Type42 { get; set; }
- ///
- ///
- ///
- public global::CursorAgents.ListModelsResponse? Type43 { get; set; }
- ///
- ///
- ///
- public global::System.Collections.Generic.IList? Type44 { get; set; }
- ///
- ///
- ///
- public global::CursorAgents.ListRepositoriesResponse? Type45 { get; set; }
- ///
- ///
- ///
- public global::System.Collections.Generic.IList? Type46 { get; set; }
+ public global::CursorAgents.ErrorError1? Type40 { get; set; }
+
///
///
///
- public global::CursorAgents.ListRepositoriesResponseRepositorie? Type47 { get; set; }
-
+ public global::System.Collections.Generic.List? ListType0 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType0 { get; set; }
+ public global::System.Collections.Generic.List? ListType1 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType1 { get; set; }
+ public global::System.Collections.Generic.List? ListType2 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType2 { get; set; }
+ public global::System.Collections.Generic.List? ListType3 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType3 { get; set; }
+ public global::System.Collections.Generic.List? ListType4 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType4 { get; set; }
+ public global::System.Collections.Generic.List? ListType5 { get; set; }
///
///
///
- public global::System.Collections.Generic.List? ListType5 { get; set; }
+ public global::System.Collections.Generic.List? ListType6 { get; set; }
}
}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupRequestPrompt.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupRequestPrompt.Json.g.cs
deleted file mode 100644
index ec493aa..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupRequestPrompt.Json.g.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-#nullable enable
-
-namespace CursorAgents
-{
- public sealed partial class AddFollowupRequestPrompt
- {
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
- ///
- public static global::CursorAgents.AddFollowupRequestPrompt? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::CursorAgents.AddFollowupRequestPrompt),
- jsonSerializerContext) as global::CursorAgents.AddFollowupRequestPrompt;
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::CursorAgents.AddFollowupRequestPrompt? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::CursorAgents.AddFollowupRequestPrompt),
- jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.AddFollowupRequestPrompt;
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
- }
- }
-}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.Agent.Json.g.cs
similarity index 87%
rename from src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupResponse.Json.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.Models.Agent.Json.g.cs
index da85e74..8f27632 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.Agent.Json.g.cs
@@ -2,7 +2,7 @@
namespace CursorAgents
{
- public sealed partial class AddFollowupResponse
+ public readonly partial struct Agent
{
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
@@ -34,14 +34,14 @@ public string ToJson(
///
/// Deserializes a JSON string using the provided JsonSerializerContext.
///
- public static global::CursorAgents.AddFollowupResponse? FromJson(
+ public static global::CursorAgents.Agent? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
- typeof(global::CursorAgents.AddFollowupResponse),
- jsonSerializerContext) as global::CursorAgents.AddFollowupResponse;
+ typeof(global::CursorAgents.Agent),
+ jsonSerializerContext) as global::CursorAgents.Agent?;
}
///
@@ -51,11 +51,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::CursorAgents.AddFollowupResponse? FromJson(
+ public static global::CursorAgents.Agent? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
+ return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
}
@@ -63,14 +63,14 @@ public string ToJson(
///
/// Deserializes a JSON stream using the provided JsonSerializerContext.
///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
- typeof(global::CursorAgents.AddFollowupResponse),
- jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.AddFollowupResponse;
+ typeof(global::CursorAgents.Agent),
+ jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.Agent?;
}
///
@@ -80,11 +80,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.Agent.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.Agent.g.cs
new file mode 100644
index 0000000..6b211c8
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.Agent.g.cs
@@ -0,0 +1,221 @@
+#pragma warning disable CS0618 // Type or member is obsolete
+
+#nullable enable
+
+namespace CursorAgents
+{
+ ///
+ ///
+ ///
+ public readonly partial struct Agent : global::System.IEquatable
+ {
+ ///
+ ///
+ ///
+#if NET6_0_OR_GREATER
+ public global::CursorAgents.AgentSummary? Summary { get; init; }
+#else
+ public global::CursorAgents.AgentSummary? Summary { get; }
+#endif
+
+ ///
+ ///
+ ///
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(Summary))]
+#endif
+ public bool IsSummary => Summary != null;
+
+ ///
+ ///
+ ///
+#if NET6_0_OR_GREATER
+ public global::CursorAgents.AgentVariant2? AgentVariant2 { get; init; }
+#else
+ public global::CursorAgents.AgentVariant2? AgentVariant2 { get; }
+#endif
+
+ ///
+ ///
+ ///
+#if NET6_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(AgentVariant2))]
+#endif
+ public bool IsAgentVariant2 => AgentVariant2 != null;
+ ///
+ ///
+ ///
+ public static implicit operator Agent(global::CursorAgents.AgentSummary value) => new Agent((global::CursorAgents.AgentSummary?)value);
+
+ ///
+ ///
+ ///
+ public static implicit operator global::CursorAgents.AgentSummary?(Agent @this) => @this.Summary;
+
+ ///
+ ///
+ ///
+ public Agent(global::CursorAgents.AgentSummary? value)
+ {
+ Summary = value;
+ }
+
+ ///
+ ///
+ ///
+ public static implicit operator Agent(global::CursorAgents.AgentVariant2 value) => new Agent((global::CursorAgents.AgentVariant2?)value);
+
+ ///
+ ///
+ ///
+ public static implicit operator global::CursorAgents.AgentVariant2?(Agent @this) => @this.AgentVariant2;
+
+ ///
+ ///
+ ///
+ public Agent(global::CursorAgents.AgentVariant2? value)
+ {
+ AgentVariant2 = value;
+ }
+
+ ///
+ ///
+ ///
+ public Agent(
+ global::CursorAgents.AgentSummary? summary,
+ global::CursorAgents.AgentVariant2? agentVariant2
+ )
+ {
+ Summary = summary;
+ AgentVariant2 = agentVariant2;
+ }
+
+ ///
+ ///
+ ///
+ public object? Object =>
+ AgentVariant2 as object ??
+ Summary as object
+ ;
+
+ ///
+ ///
+ ///
+ public override string? ToString() =>
+ Summary?.ToString() ??
+ AgentVariant2?.ToString()
+ ;
+
+ ///
+ ///
+ ///
+ public bool Validate()
+ {
+ return IsSummary && IsAgentVariant2;
+ }
+
+ ///
+ ///
+ ///
+ public TResult? Match(
+ global::System.Func? summary = null,
+ global::System.Func? agentVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsSummary && summary != null)
+ {
+ return summary(Summary!);
+ }
+ else if (IsAgentVariant2 && agentVariant2 != null)
+ {
+ return agentVariant2(AgentVariant2!);
+ }
+
+ return default(TResult);
+ }
+
+ ///
+ ///
+ ///
+ public void Match(
+ global::System.Action? summary = null,
+ global::System.Action? agentVariant2 = null,
+ bool validate = true)
+ {
+ if (validate)
+ {
+ Validate();
+ }
+
+ if (IsSummary)
+ {
+ summary?.Invoke(Summary!);
+ }
+ else if (IsAgentVariant2)
+ {
+ agentVariant2?.Invoke(AgentVariant2!);
+ }
+ }
+
+ ///
+ ///
+ ///
+ public override int GetHashCode()
+ {
+ var fields = new object?[]
+ {
+ Summary,
+ typeof(global::CursorAgents.AgentSummary),
+ AgentVariant2,
+ typeof(global::CursorAgents.AgentVariant2),
+ };
+ const int offset = unchecked((int)2166136261);
+ const int prime = 16777619;
+ static int HashCodeAggregator(int hashCode, object? value) => value == null
+ ? (hashCode ^ 0) * prime
+ : (hashCode ^ value.GetHashCode()) * prime;
+
+ return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator);
+ }
+
+ ///
+ ///
+ ///
+ public bool Equals(Agent other)
+ {
+ return
+ global::System.Collections.Generic.EqualityComparer.Default.Equals(Summary, other.Summary) &&
+ global::System.Collections.Generic.EqualityComparer.Default.Equals(AgentVariant2, other.AgentVariant2)
+ ;
+ }
+
+ ///
+ ///
+ ///
+ public static bool operator ==(Agent obj1, Agent obj2)
+ {
+ return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2);
+ }
+
+ ///
+ ///
+ ///
+ public static bool operator !=(Agent obj1, Agent obj2)
+ {
+ return !(obj1 == obj2);
+ }
+
+ ///
+ ///
+ ///
+ public override bool Equals(object? obj)
+ {
+ return obj is Agent o && Equals(o);
+ }
+ }
+}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentEnv.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentEnv.Json.g.cs
new file mode 100644
index 0000000..ca02634
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentEnv.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace CursorAgents
+{
+ public sealed partial class AgentEnv
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::CursorAgents.AgentEnv? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::CursorAgents.AgentEnv),
+ jsonSerializerContext) as global::CursorAgents.AgentEnv;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::CursorAgents.AgentEnv? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::CursorAgents.AgentEnv),
+ jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.AgentEnv;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupResponse.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentEnv.g.cs
similarity index 55%
rename from src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupResponse.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.Models.AgentEnv.g.cs
index a775a18..1eeb260 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupResponse.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentEnv.g.cs
@@ -6,16 +6,16 @@ namespace CursorAgents
///
///
///
- public sealed partial class AddFollowupResponse
+ public sealed partial class AgentEnv
{
///
- /// Unique identifier for the cloud agent
- /// Example: bc_abc123
+ /// Execution environment type.
+ /// Example: cloud
///
- /// bc_abc123
- [global::System.Text.Json.Serialization.JsonPropertyName("id")]
+ /// cloud
+ [global::System.Text.Json.Serialization.JsonPropertyName("type")]
[global::System.Text.Json.Serialization.JsonRequired]
- public required string Id { get; set; }
+ public required string Type { get; set; }
///
/// Additional properties that are not explicitly defined in the schema
@@ -24,25 +24,25 @@ public sealed partial class AddFollowupResponse
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- ///
- /// Unique identifier for the cloud agent
- /// Example: bc_abc123
+ ///
+ /// Execution environment type.
+ /// Example: cloud
///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
- public AddFollowupResponse(
- string id)
+ public AgentEnv(
+ string type)
{
- this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id));
+ this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type));
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public AddFollowupResponse()
+ public AgentEnv()
{
}
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentSummary.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentSummary.Json.g.cs
new file mode 100644
index 0000000..a059e08
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentSummary.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace CursorAgents
+{
+ public sealed partial class AgentSummary
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::CursorAgents.AgentSummary? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::CursorAgents.AgentSummary),
+ jsonSerializerContext) as global::CursorAgents.AgentSummary;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::CursorAgents.AgentSummary? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::CursorAgents.AgentSummary),
+ jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.AgentSummary;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentSummary.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentSummary.g.cs
new file mode 100644
index 0000000..6823193
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentSummary.g.cs
@@ -0,0 +1,140 @@
+
+#nullable enable
+
+namespace CursorAgents
+{
+ ///
+ ///
+ ///
+ public sealed partial class AgentSummary
+ {
+ ///
+ /// Unique agent identifier.
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ /// bc-00000000-0000-0000-0000-000000000001
+ [global::System.Text.Json.Serialization.JsonPropertyName("id")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Id { get; set; }
+
+ ///
+ /// Auto-derived agent name.
+ /// Example: Add README with setup instructions
+ ///
+ /// Add README with setup instructions
+ [global::System.Text.Json.Serialization.JsonPropertyName("name")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Name { get; set; }
+
+ ///
+ /// Agent lifecycle state. Execution status lives on runs.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("status")]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::CursorAgents.JsonConverters.AgentSummaryStatusJsonConverter))]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::CursorAgents.AgentSummaryStatus Status { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("env")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::CursorAgents.AgentEnv Env { get; set; }
+
+ ///
+ /// URL to view the agent in Cursor Web.
+ /// Example: https://cursor.com/agents?id=bc-00000000-0000-0000-0000-000000000001
+ ///
+ /// https://cursor.com/agents?id=bc-00000000-0000-0000-0000-000000000001
+ [global::System.Text.Json.Serialization.JsonPropertyName("url")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string Url { get; set; }
+
+ ///
+ /// When the agent was created.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("createdAt")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.DateTime CreatedAt { get; set; }
+
+ ///
+ /// When the agent was last updated.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("updatedAt")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required global::System.DateTime UpdatedAt { get; set; }
+
+ ///
+ /// ID of the most recent run on this agent, if any.
+ /// Example: run-00000000-0000-0000-0000-000000000001
+ ///
+ /// run-00000000-0000-0000-0000-000000000001
+ [global::System.Text.Json.Serialization.JsonPropertyName("latestRunId")]
+ public string? LatestRunId { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Unique agent identifier.
+ /// Example: bc-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// Auto-derived agent name.
+ /// Example: Add README with setup instructions
+ ///
+ ///
+ /// Agent lifecycle state. Execution status lives on runs.
+ ///
+ ///
+ ///
+ /// URL to view the agent in Cursor Web.
+ /// Example: https://cursor.com/agents?id=bc-00000000-0000-0000-0000-000000000001
+ ///
+ ///
+ /// When the agent was created.
+ ///
+ ///
+ /// When the agent was last updated.
+ ///
+ ///
+ /// ID of the most recent run on this agent, if any.
+ /// Example: run-00000000-0000-0000-0000-000000000001
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public AgentSummary(
+ string id,
+ string name,
+ global::CursorAgents.AgentSummaryStatus status,
+ global::CursorAgents.AgentEnv env,
+ string url,
+ global::System.DateTime createdAt,
+ global::System.DateTime updatedAt,
+ string? latestRunId)
+ {
+ this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id));
+ this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
+ this.Status = status;
+ this.Env = env ?? throw new global::System.ArgumentNullException(nameof(env));
+ this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url));
+ this.CreatedAt = createdAt;
+ this.UpdatedAt = updatedAt;
+ this.LatestRunId = latestRunId;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AgentSummary()
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseStatus.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentSummaryStatus.g.cs
similarity index 54%
rename from src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseStatus.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.Models.AgentSummaryStatus.g.cs
index cea8d75..8f61e07 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseStatus.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentSummaryStatus.g.cs
@@ -4,41 +4,46 @@
namespace CursorAgents
{
///
- /// Initial status of the newly created agent
- /// Example: CREATING
+ /// Agent lifecycle state. Execution status lives on runs.
///
- public enum CreateAgentResponseStatus
+ public enum AgentSummaryStatus
{
///
///
///
- Creating,
+ Active,
+ ///
+ ///
+ ///
+ Archived,
}
///
/// Enum extensions to do fast conversions without the reflection.
///
- public static class CreateAgentResponseStatusExtensions
+ public static class AgentSummaryStatusExtensions
{
///
/// Converts an enum to a string.
///
- public static string ToValueString(this CreateAgentResponseStatus value)
+ public static string ToValueString(this AgentSummaryStatus value)
{
return value switch
{
- CreateAgentResponseStatus.Creating => "CREATING",
+ AgentSummaryStatus.Active => "ACTIVE",
+ AgentSummaryStatus.Archived => "ARCHIVED",
_ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
};
}
///
/// Converts an string to a enum.
///
- public static CreateAgentResponseStatus? ToEnum(string value)
+ public static AgentSummaryStatus? ToEnum(string value)
{
return value switch
{
- "CREATING" => CreateAgentResponseStatus.Creating,
+ "ACTIVE" => AgentSummaryStatus.Active,
+ "ARCHIVED" => AgentSummaryStatus.Archived,
_ => null,
};
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.GetMeResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentVariant2.Json.g.cs
similarity index 87%
rename from src/libs/CursorAgents/Generated/CursorAgents.Models.GetMeResponse.Json.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.Models.AgentVariant2.Json.g.cs
index 81f7fb2..030b19d 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.GetMeResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentVariant2.Json.g.cs
@@ -2,7 +2,7 @@
namespace CursorAgents
{
- public sealed partial class GetMeResponse
+ public sealed partial class AgentVariant2
{
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
@@ -34,14 +34,14 @@ public string ToJson(
///
/// Deserializes a JSON string using the provided JsonSerializerContext.
///
- public static global::CursorAgents.GetMeResponse? FromJson(
+ public static global::CursorAgents.AgentVariant2? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
- typeof(global::CursorAgents.GetMeResponse),
- jsonSerializerContext) as global::CursorAgents.GetMeResponse;
+ typeof(global::CursorAgents.AgentVariant2),
+ jsonSerializerContext) as global::CursorAgents.AgentVariant2;
}
///
@@ -51,11 +51,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::CursorAgents.GetMeResponse? FromJson(
+ public static global::CursorAgents.AgentVariant2? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
+ return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
}
@@ -63,14 +63,14 @@ public string ToJson(
///
/// Deserializes a JSON stream using the provided JsonSerializerContext.
///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
- typeof(global::CursorAgents.GetMeResponse),
- jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.GetMeResponse;
+ typeof(global::CursorAgents.AgentVariant2),
+ jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.AgentVariant2;
}
///
@@ -80,11 +80,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentVariant2.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentVariant2.g.cs
new file mode 100644
index 0000000..9ec9de3
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentVariant2.g.cs
@@ -0,0 +1,98 @@
+
+#nullable enable
+
+namespace CursorAgents
+{
+ ///
+ ///
+ ///
+ public sealed partial class AgentVariant2
+ {
+ ///
+ /// Repository configuration. v1 currently supports one entry.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("repos")]
+ public global::System.Collections.Generic.IList? Repos { get; set; }
+
+ ///
+ /// Branch the agent works on.
+ /// Example: cursor/add-readme
+ ///
+ /// cursor/add-readme
+ [global::System.Text.Json.Serialization.JsonPropertyName("branchName")]
+ public string? BranchName { get; set; }
+
+ ///
+ /// Whether the branch was auto-generated.
+ /// Example: true
+ ///
+ /// true
+ [global::System.Text.Json.Serialization.JsonPropertyName("autoGenerateBranch")]
+ public bool? AutoGenerateBranch { get; set; }
+
+ ///
+ /// Whether Cursor opens a pull request when the run completes.
+ /// Example: true
+ ///
+ /// true
+ [global::System.Text.Json.Serialization.JsonPropertyName("autoCreatePR")]
+ public bool? AutoCreatePR { get; set; }
+
+ ///
+ /// Whether to skip requesting the user as a reviewer when Cursor opens a PR.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("skipReviewerRequest")]
+ public bool? SkipReviewerRequest { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ /// Repository configuration. v1 currently supports one entry.
+ ///
+ ///
+ /// Branch the agent works on.
+ /// Example: cursor/add-readme
+ ///
+ ///
+ /// Whether the branch was auto-generated.
+ /// Example: true
+ ///
+ ///
+ /// Whether Cursor opens a pull request when the run completes.
+ /// Example: true
+ ///
+ ///
+ /// Whether to skip requesting the user as a reviewer when Cursor opens a PR.
+ ///
+#if NET7_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+#endif
+ public AgentVariant2(
+ global::System.Collections.Generic.IList? repos,
+ string? branchName,
+ bool? autoGenerateBranch,
+ bool? autoCreatePR,
+ bool? skipReviewerRequest)
+ {
+ this.Repos = repos;
+ this.BranchName = branchName;
+ this.AutoGenerateBranch = autoGenerateBranch;
+ this.AutoCreatePR = autoCreatePR;
+ this.SkipReviewerRequest = skipReviewerRequest;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AgentVariant2()
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupRequest.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ApiKeyInfo.Json.g.cs
similarity index 88%
rename from src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupRequest.Json.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.Models.ApiKeyInfo.Json.g.cs
index 2979f5a..23c4f02 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupRequest.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ApiKeyInfo.Json.g.cs
@@ -2,7 +2,7 @@
namespace CursorAgents
{
- public sealed partial class AddFollowupRequest
+ public sealed partial class ApiKeyInfo
{
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
@@ -34,14 +34,14 @@ public string ToJson(
///
/// Deserializes a JSON string using the provided JsonSerializerContext.
///
- public static global::CursorAgents.AddFollowupRequest? FromJson(
+ public static global::CursorAgents.ApiKeyInfo? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
- typeof(global::CursorAgents.AddFollowupRequest),
- jsonSerializerContext) as global::CursorAgents.AddFollowupRequest;
+ typeof(global::CursorAgents.ApiKeyInfo),
+ jsonSerializerContext) as global::CursorAgents.ApiKeyInfo;
}
///
@@ -51,11 +51,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::CursorAgents.AddFollowupRequest? FromJson(
+ public static global::CursorAgents.ApiKeyInfo? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
+ return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
}
@@ -63,14 +63,14 @@ public string ToJson(
///
/// Deserializes a JSON stream using the provided JsonSerializerContext.
///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
- typeof(global::CursorAgents.AddFollowupRequest),
- jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.AddFollowupRequest;
+ typeof(global::CursorAgents.ApiKeyInfo),
+ jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.ApiKeyInfo;
}
///
@@ -80,11 +80,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.GetMeResponse.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.ApiKeyInfo.g.cs
similarity index 68%
rename from src/libs/CursorAgents/Generated/CursorAgents.Models.GetMeResponse.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.Models.ApiKeyInfo.g.cs
index 8c7ca15..b32ce79 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.GetMeResponse.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.ApiKeyInfo.g.cs
@@ -6,10 +6,9 @@ namespace CursorAgents
///
///
///
- public sealed partial class GetMeResponse
+ public sealed partial class ApiKeyInfo
{
///
- /// The name of the API key
/// Example: Production API Key
///
/// Production API Key
@@ -18,21 +17,19 @@ public sealed partial class GetMeResponse
public required string ApiKeyName { get; set; }
///
- /// When the API key was created
- /// Example: 2024-01-15T10:30:00Z
+ ///
///
- /// 2024-01-15T10:30:00Z
[global::System.Text.Json.Serialization.JsonPropertyName("createdAt")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.DateTime CreatedAt { get; set; }
///
- /// Email address of the user who owns the API key (if available)
/// Example: developer@example.com
///
/// developer@example.com
[global::System.Text.Json.Serialization.JsonPropertyName("userEmail")]
- public string? UserEmail { get; set; }
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string UserEmail { get; set; }
///
/// Additional properties that are not explicitly defined in the schema
@@ -41,37 +38,32 @@ public sealed partial class GetMeResponse
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
///
- /// The name of the API key
/// Example: Production API Key
///
- ///
- /// When the API key was created
- /// Example: 2024-01-15T10:30:00Z
- ///
+ ///
///
- /// Email address of the user who owns the API key (if available)
/// Example: developer@example.com
///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
- public GetMeResponse(
+ public ApiKeyInfo(
string apiKeyName,
global::System.DateTime createdAt,
- string? userEmail)
+ string userEmail)
{
this.ApiKeyName = apiKeyName ?? throw new global::System.ArgumentNullException(nameof(apiKeyName));
this.CreatedAt = createdAt;
- this.UserEmail = userEmail;
+ this.UserEmail = userEmail ?? throw new global::System.ArgumentNullException(nameof(userEmail));
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public GetMeResponse()
+ public ApiKeyInfo()
{
}
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.Artifact.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.Artifact.g.cs
index 8150622..968e9a7 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.Artifact.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.Artifact.g.cs
@@ -9,16 +9,16 @@ namespace CursorAgents
public sealed partial class Artifact
{
///
- /// Absolute artifact path in the cloud agent environment
- /// Example: /opt/cursor/artifacts/screenshot.png
+ /// Artifact path relative to the workspace's `artifacts/` directory.
+ /// Example: artifacts/screenshot.png
///
- /// /opt/cursor/artifacts/screenshot.png
- [global::System.Text.Json.Serialization.JsonPropertyName("absolutePath")]
+ /// artifacts/screenshot.png
+ [global::System.Text.Json.Serialization.JsonPropertyName("path")]
[global::System.Text.Json.Serialization.JsonRequired]
- public required string AbsolutePath { get; set; }
+ public required string Path { get; set; }
///
- /// Artifact file size in bytes
+ /// File size in bytes.
/// Example: 12345
///
/// 12345
@@ -27,10 +27,8 @@ public sealed partial class Artifact
public required long SizeBytes { get; set; }
///
- /// Last modified timestamp for the artifact
- /// Example: 2024-01-15T11:02:00.000Z
+ /// Last modified timestamp.
///
- /// 2024-01-15T11:02:00.000Z
[global::System.Text.Json.Serialization.JsonPropertyName("updatedAt")]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::System.DateTime UpdatedAt { get; set; }
@@ -44,27 +42,26 @@ public sealed partial class Artifact
///
/// Initializes a new instance of the class.
///
- ///
- /// Absolute artifact path in the cloud agent environment
- /// Example: /opt/cursor/artifacts/screenshot.png
+ ///
+ /// Artifact path relative to the workspace's `artifacts/` directory.
+ /// Example: artifacts/screenshot.png
///
///
- /// Artifact file size in bytes
+ /// File size in bytes.
/// Example: 12345
///
///
- /// Last modified timestamp for the artifact
- /// Example: 2024-01-15T11:02:00.000Z
+ /// Last modified timestamp.
///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public Artifact(
- string absolutePath,
+ string path,
long sizeBytes,
global::System.DateTime updatedAt)
{
- this.AbsolutePath = absolutePath ?? throw new global::System.ArgumentNullException(nameof(absolutePath));
+ this.Path = path ?? throw new global::System.ArgumentNullException(nameof(path));
this.SizeBytes = sizeBytes;
this.UpdatedAt = updatedAt;
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequest.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequest.g.cs
index b247226..9c244ae 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequest.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequest.g.cs
@@ -16,31 +16,46 @@ public sealed partial class CreateAgentRequest
public required global::CursorAgents.CreateAgentRequestPrompt Prompt { get; set; }
///
- /// Set to an explicit model ID for launch requests, or use "default" to use the configured default model. When omitted, Cursor resolves your user default model, then your team default model, then a system default.
- /// Example: claude-4-sonnet
+ ///
///
- /// claude-4-sonnet
[global::System.Text.Json.Serialization.JsonPropertyName("model")]
- public string? Model { get; set; }
+ public global::CursorAgents.ModelRef? Model { get; set; }
///
- ///
+ /// Repository configuration. v1 currently supports one entry.
///
- [global::System.Text.Json.Serialization.JsonPropertyName("source")]
+ [global::System.Text.Json.Serialization.JsonPropertyName("repos")]
[global::System.Text.Json.Serialization.JsonRequired]
- public required global::CursorAgents.CreateAgentRequestSource Source { get; set; }
+ public required global::System.Collections.Generic.IList Repos { get; set; }
///
- ///
+ /// Custom branch name for the agent to create.
+ /// Example: feature/add-readme
///
- [global::System.Text.Json.Serialization.JsonPropertyName("target")]
- public global::CursorAgents.CreateAgentRequestTarget? Target { get; set; }
+ /// feature/add-readme
+ [global::System.Text.Json.Serialization.JsonPropertyName("branchName")]
+ public string? BranchName { get; set; }
///
- ///
+ /// Whether to create a new branch (true) or push to an existing head branch (false). Only applies when `repos[0].prUrl` is provided.
+ /// Default Value: true
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("autoGenerateBranch")]
+ public bool? AutoGenerateBranch { get; set; }
+
+ ///
+ /// Whether Cursor should open a pull request when the run completes.
+ /// Default Value: false
///
- [global::System.Text.Json.Serialization.JsonPropertyName("webhook")]
- public global::CursorAgents.CreateAgentRequestWebhook? Webhook { get; set; }
+ [global::System.Text.Json.Serialization.JsonPropertyName("autoCreatePR")]
+ public bool? AutoCreatePR { get; set; }
+
+ ///
+ /// Whether to skip requesting the user as a reviewer when Cursor opens a PR. Only applies when `autoCreatePR` is true.
+ /// Default Value: false
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("skipReviewerRequest")]
+ public bool? SkipReviewerRequest { get; set; }
///
/// Additional properties that are not explicitly defined in the schema
@@ -52,28 +67,45 @@ public sealed partial class CreateAgentRequest
/// Initializes a new instance of the class.
///
///
- ///
- ///
- /// Set to an explicit model ID for launch requests, or use "default" to use the configured default model. When omitted, Cursor resolves your user default model, then your team default model, then a system default.
- /// Example: claude-4-sonnet
+ ///
+ /// Repository configuration. v1 currently supports one entry.
+ ///
+ ///
+ ///
+ /// Custom branch name for the agent to create.
+ /// Example: feature/add-readme
+ ///
+ ///
+ /// Whether to create a new branch (true) or push to an existing head branch (false). Only applies when `repos[0].prUrl` is provided.
+ /// Default Value: true
+ ///
+ ///
+ /// Whether Cursor should open a pull request when the run completes.
+ /// Default Value: false
+ ///
+ ///
+ /// Whether to skip requesting the user as a reviewer when Cursor opens a PR. Only applies when `autoCreatePR` is true.
+ /// Default Value: false
///
- ///
- ///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public CreateAgentRequest(
global::CursorAgents.CreateAgentRequestPrompt prompt,
- global::CursorAgents.CreateAgentRequestSource source,
- string? model,
- global::CursorAgents.CreateAgentRequestTarget? target,
- global::CursorAgents.CreateAgentRequestWebhook? webhook)
+ global::System.Collections.Generic.IList repos,
+ global::CursorAgents.ModelRef? model,
+ string? branchName,
+ bool? autoGenerateBranch,
+ bool? autoCreatePR,
+ bool? skipReviewerRequest)
{
this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt));
this.Model = model;
- this.Source = source ?? throw new global::System.ArgumentNullException(nameof(source));
- this.Target = target;
- this.Webhook = webhook;
+ this.Repos = repos ?? throw new global::System.ArgumentNullException(nameof(repos));
+ this.BranchName = branchName;
+ this.AutoGenerateBranch = autoGenerateBranch;
+ this.AutoCreatePR = autoCreatePR;
+ this.SkipReviewerRequest = skipReviewerRequest;
}
///
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestPrompt.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestPrompt.g.cs
index 8df253d..bb8db73 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestPrompt.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestPrompt.g.cs
@@ -9,19 +9,17 @@ namespace CursorAgents
public sealed partial class CreateAgentRequestPrompt
{
///
- /// The task or instructions for the agent to execute
- /// Example: Add a README.md file with installation instructions
+ /// Task instruction for the agent.
+ /// Example: Add a README with setup instructions
///
- /// Add a README.md file with installation instructions
+ /// Add a README with setup instructions
[global::System.Text.Json.Serialization.JsonPropertyName("text")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string Text { get; set; }
///
- /// Optional array of base64 encoded images (max 5)
- /// Example: [{"data":"iVBORw0KGgoAAAANSUhEUgAA...","dimension":{"width":1024,"height":768}}]
+ /// Optional base64-encoded images. Maximum 5 images, 15 MB each.
///
- /// [{"data":"iVBORw0KGgoAAAANSUhEUgAA...","dimension":{"width":1024,"height":768}}]
[global::System.Text.Json.Serialization.JsonPropertyName("images")]
public global::System.Collections.Generic.IList? Images { get; set; }
@@ -35,12 +33,11 @@ public sealed partial class CreateAgentRequestPrompt
/// Initializes a new instance of the class.
///
///
- /// The task or instructions for the agent to execute
- /// Example: Add a README.md file with installation instructions
+ /// Task instruction for the agent.
+ /// Example: Add a README with setup instructions
///
///
- /// Optional array of base64 encoded images (max 5)
- /// Example: [{"data":"iVBORw0KGgoAAAANSUhEUgAA...","dimension":{"width":1024,"height":768}}]
+ /// Optional base64-encoded images. Maximum 5 images, 15 MB each.
///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestSource.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestSource.Json.g.cs
deleted file mode 100644
index 19025e0..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestSource.Json.g.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-#nullable enable
-
-namespace CursorAgents
-{
- public sealed partial class CreateAgentRequestSource
- {
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
- ///
- public static global::CursorAgents.CreateAgentRequestSource? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::CursorAgents.CreateAgentRequestSource),
- jsonSerializerContext) as global::CursorAgents.CreateAgentRequestSource;
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::CursorAgents.CreateAgentRequestSource? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::CursorAgents.CreateAgentRequestSource),
- jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateAgentRequestSource;
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
- }
- }
-}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestTarget.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestTarget.g.cs
deleted file mode 100644
index 91297ad..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestTarget.g.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-
-#nullable enable
-
-namespace CursorAgents
-{
- ///
- ///
- ///
- public sealed partial class CreateAgentRequestTarget
- {
- ///
- /// Whether to automatically create a pull request when the agent completes
- /// Default Value: false
- ///
- [global::System.Text.Json.Serialization.JsonPropertyName("autoCreatePr")]
- public bool? AutoCreatePr { get; set; }
-
- ///
- /// Whether to open the pull request as the Cursor GitHub App instead of as the user. Only applies if autoCreatePr is true.
- /// Default Value: false
- ///
- [global::System.Text.Json.Serialization.JsonPropertyName("openAsCursorGithubApp")]
- public bool? OpenAsCursorGithubApp { get; set; }
-
- ///
- /// Whether to skip adding the user as a reviewer to the pull request. Only applies if autoCreatePr is true and the PR is opened as the Cursor GitHub App.
- /// Default Value: false
- ///
- [global::System.Text.Json.Serialization.JsonPropertyName("skipReviewerRequest")]
- public bool? SkipReviewerRequest { get; set; }
-
- ///
- /// Custom branch name for the agent to create
- /// Example: feature/add-readme
- ///
- /// feature/add-readme
- [global::System.Text.Json.Serialization.JsonPropertyName("branchName")]
- public string? BranchName { get; set; }
-
- ///
- /// Whether to create a new branch (true) or use the PR's existing head branch (false). Only applies when source.prUrl is provided.
- /// Default Value: true
- ///
- [global::System.Text.Json.Serialization.JsonPropertyName("autoBranch")]
- public bool? AutoBranch { get; set; }
-
- ///
- /// Additional properties that are not explicitly defined in the schema
- ///
- [global::System.Text.Json.Serialization.JsonExtensionData]
- public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Initializes a new instance of the class.
- ///
- ///
- /// Whether to automatically create a pull request when the agent completes
- /// Default Value: false
- ///
- ///
- /// Whether to open the pull request as the Cursor GitHub App instead of as the user. Only applies if autoCreatePr is true.
- /// Default Value: false
- ///
- ///
- /// Whether to skip adding the user as a reviewer to the pull request. Only applies if autoCreatePr is true and the PR is opened as the Cursor GitHub App.
- /// Default Value: false
- ///
- ///
- /// Custom branch name for the agent to create
- /// Example: feature/add-readme
- ///
- ///
- /// Whether to create a new branch (true) or use the PR's existing head branch (false). Only applies when source.prUrl is provided.
- /// Default Value: true
- ///
-#if NET7_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
-#endif
- public CreateAgentRequestTarget(
- bool? autoCreatePr,
- bool? openAsCursorGithubApp,
- bool? skipReviewerRequest,
- string? branchName,
- bool? autoBranch)
- {
- this.AutoCreatePr = autoCreatePr;
- this.OpenAsCursorGithubApp = openAsCursorGithubApp;
- this.SkipReviewerRequest = skipReviewerRequest;
- this.BranchName = branchName;
- this.AutoBranch = autoBranch;
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- public CreateAgentRequestTarget()
- {
- }
- }
-}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestWebhook.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestWebhook.Json.g.cs
deleted file mode 100644
index 81f51ac..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestWebhook.Json.g.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-#nullable enable
-
-namespace CursorAgents
-{
- public sealed partial class CreateAgentRequestWebhook
- {
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
- ///
- public static global::CursorAgents.CreateAgentRequestWebhook? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::CursorAgents.CreateAgentRequestWebhook),
- jsonSerializerContext) as global::CursorAgents.CreateAgentRequestWebhook;
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::CursorAgents.CreateAgentRequestWebhook? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::CursorAgents.CreateAgentRequestWebhook),
- jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateAgentRequestWebhook;
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
- }
- }
-}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestWebhook.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestWebhook.g.cs
deleted file mode 100644
index 12604b0..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestWebhook.g.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-
-#nullable enable
-
-namespace CursorAgents
-{
- ///
- ///
- ///
- public sealed partial class CreateAgentRequestWebhook
- {
- ///
- /// URL to receive webhook notifications about agent status changes
- /// Example: https://example.com/webhooks/cursor-agent
- ///
- /// https://example.com/webhooks/cursor-agent
- [global::System.Text.Json.Serialization.JsonPropertyName("url")]
- [global::System.Text.Json.Serialization.JsonRequired]
- public required string Url { get; set; }
-
- ///
- /// Secret key for webhook payload verification
- /// Example: your-webhook-secret-key-minimum-32-characters
- ///
- /// your-webhook-secret-key-minimum-32-characters
- [global::System.Text.Json.Serialization.JsonPropertyName("secret")]
- public string? Secret { get; set; }
-
- ///
- /// Additional properties that are not explicitly defined in the schema
- ///
- [global::System.Text.Json.Serialization.JsonExtensionData]
- public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Initializes a new instance of the class.
- ///
- ///
- /// URL to receive webhook notifications about agent status changes
- /// Example: https://example.com/webhooks/cursor-agent
- ///
- ///
- /// Secret key for webhook payload verification
- /// Example: your-webhook-secret-key-minimum-32-characters
- ///
-#if NET7_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
-#endif
- public CreateAgentRequestWebhook(
- string url,
- string? secret)
- {
- this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url));
- this.Secret = secret;
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- public CreateAgentRequestWebhook()
- {
- }
- }
-}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponse.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponse.g.cs
index 2a1494b..18d5063 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponse.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponse.g.cs
@@ -8,55 +8,20 @@ namespace CursorAgents
///
public sealed partial class CreateAgentResponse
{
- ///
- /// Unique identifier for the cloud agent
- /// Example: bc_abc123
- ///
- /// bc_abc123
- [global::System.Text.Json.Serialization.JsonPropertyName("id")]
- [global::System.Text.Json.Serialization.JsonRequired]
- public required string Id { get; set; }
-
- ///
- /// Name for the agent
- /// Example: Add README Documentation
- ///
- /// Add README Documentation
- [global::System.Text.Json.Serialization.JsonPropertyName("name")]
- [global::System.Text.Json.Serialization.JsonRequired]
- public required string Name { get; set; }
-
- ///
- /// Initial status of the newly created agent
- /// Example: CREATING
- ///
- /// CREATING
- [global::System.Text.Json.Serialization.JsonPropertyName("status")]
- [global::System.Text.Json.Serialization.JsonConverter(typeof(global::CursorAgents.JsonConverters.CreateAgentResponseStatusJsonConverter))]
- public global::CursorAgents.CreateAgentResponseStatus Status { get; set; }
-
///
///
///
- [global::System.Text.Json.Serialization.JsonPropertyName("source")]
+ [global::System.Text.Json.Serialization.JsonPropertyName("agent")]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::CursorAgents.JsonConverters.AgentJsonConverter))]
[global::System.Text.Json.Serialization.JsonRequired]
- public required global::CursorAgents.CreateAgentResponseSource Source { get; set; }
+ public required global::CursorAgents.Agent Agent { get; set; }
///
///
///
- [global::System.Text.Json.Serialization.JsonPropertyName("target")]
- [global::System.Text.Json.Serialization.JsonRequired]
- public required global::CursorAgents.CreateAgentResponseTarget Target { get; set; }
-
- ///
- /// When the agent was created
- /// Example: 2024-01-15T10:30:00Z
- ///
- /// 2024-01-15T10:30:00Z
- [global::System.Text.Json.Serialization.JsonPropertyName("createdAt")]
+ [global::System.Text.Json.Serialization.JsonPropertyName("run")]
[global::System.Text.Json.Serialization.JsonRequired]
- public required global::System.DateTime CreatedAt { get; set; }
+ public required global::CursorAgents.Run Run { get; set; }
///
/// Additional properties that are not explicitly defined in the schema
@@ -67,41 +32,17 @@ public sealed partial class CreateAgentResponse
///
/// Initializes a new instance of the class.
///
- ///
- /// Unique identifier for the cloud agent
- /// Example: bc_abc123
- ///
- ///
- /// Name for the agent
- /// Example: Add README Documentation
- ///
- ///
- ///
- ///
- /// When the agent was created
- /// Example: 2024-01-15T10:30:00Z
- ///
- ///
- /// Initial status of the newly created agent
- /// Example: CREATING
- ///
+ ///
+ ///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public CreateAgentResponse(
- string id,
- string name,
- global::CursorAgents.CreateAgentResponseSource source,
- global::CursorAgents.CreateAgentResponseTarget target,
- global::System.DateTime createdAt,
- global::CursorAgents.CreateAgentResponseStatus status)
+ global::CursorAgents.Agent agent,
+ global::CursorAgents.Run run)
{
- this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id));
- this.Name = name ?? throw new global::System.ArgumentNullException(nameof(name));
- this.Status = status;
- this.Source = source ?? throw new global::System.ArgumentNullException(nameof(source));
- this.Target = target ?? throw new global::System.ArgumentNullException(nameof(target));
- this.CreatedAt = createdAt;
+ this.Agent = agent;
+ this.Run = run ?? throw new global::System.ArgumentNullException(nameof(run));
}
///
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseSource.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseSource.Json.g.cs
deleted file mode 100644
index f166796..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseSource.Json.g.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-#nullable enable
-
-namespace CursorAgents
-{
- public sealed partial class CreateAgentResponseSource
- {
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
- ///
- public static global::CursorAgents.CreateAgentResponseSource? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::CursorAgents.CreateAgentResponseSource),
- jsonSerializerContext) as global::CursorAgents.CreateAgentResponseSource;
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::CursorAgents.CreateAgentResponseSource? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::CursorAgents.CreateAgentResponseSource),
- jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateAgentResponseSource;
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
- }
- }
-}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseSource.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseSource.g.cs
deleted file mode 100644
index 70dfb44..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseSource.g.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-
-#nullable enable
-
-namespace CursorAgents
-{
- ///
- ///
- ///
- public sealed partial class CreateAgentResponseSource
- {
- ///
- /// The GitHub repository URL
- /// Example: https://github.com/your-org/your-repo
- ///
- /// https://github.com/your-org/your-repo
- [global::System.Text.Json.Serialization.JsonPropertyName("repository")]
- [global::System.Text.Json.Serialization.JsonRequired]
- public required string Repository { get; set; }
-
- ///
- /// Git ref (branch/tag) used as the base branch
- /// Example: main
- ///
- /// main
- [global::System.Text.Json.Serialization.JsonPropertyName("ref")]
- public string? Ref { get; set; }
-
- ///
- /// Additional properties that are not explicitly defined in the schema
- ///
- [global::System.Text.Json.Serialization.JsonExtensionData]
- public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Initializes a new instance of the class.
- ///
- ///
- /// The GitHub repository URL
- /// Example: https://github.com/your-org/your-repo
- ///
- ///
- /// Git ref (branch/tag) used as the base branch
- /// Example: main
- ///
-#if NET7_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
-#endif
- public CreateAgentResponseSource(
- string repository,
- string? @ref)
- {
- this.Repository = repository ?? throw new global::System.ArgumentNullException(nameof(repository));
- this.Ref = @ref;
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- public CreateAgentResponseSource()
- {
- }
- }
-}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseTarget.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseTarget.Json.g.cs
deleted file mode 100644
index 8524a06..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseTarget.Json.g.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-#nullable enable
-
-namespace CursorAgents
-{
- public sealed partial class CreateAgentResponseTarget
- {
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
- ///
- public string ToJson(
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- this.GetType(),
- jsonSerializerContext);
- }
-
- ///
- /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public string ToJson(
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Serialize(
- this,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerContext.
- ///
- public static global::CursorAgents.CreateAgentResponseTarget? FromJson(
- string json,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- typeof(global::CursorAgents.CreateAgentResponseTarget),
- jsonSerializerContext) as global::CursorAgents.CreateAgentResponseTarget;
- }
-
- ///
- /// Deserializes a JSON string using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::CursorAgents.CreateAgentResponseTarget? FromJson(
- string json,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.Deserialize(
- json,
- jsonSerializerOptions);
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerContext.
- ///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
- {
- return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- typeof(global::CursorAgents.CreateAgentResponseTarget),
- jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateAgentResponseTarget;
- }
-
- ///
- /// Deserializes a JSON stream using the provided JsonSerializerOptions.
- ///
-#if NET8_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
- [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
-#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
- global::System.IO.Stream jsonStream,
- global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
- {
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
- jsonStream,
- jsonSerializerOptions);
- }
- }
-}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseTarget.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseTarget.g.cs
deleted file mode 100644
index 8b0acfc..0000000
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentResponseTarget.g.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-
-#nullable enable
-
-namespace CursorAgents
-{
- ///
- ///
- ///
- public sealed partial class CreateAgentResponseTarget
- {
- ///
- /// The Git branch name where the agent is working
- /// Example: cursor/add-readme-1234
- ///
- /// cursor/add-readme-1234
- [global::System.Text.Json.Serialization.JsonPropertyName("branchName")]
- public string? BranchName { get; set; }
-
- ///
- /// URL to view the agent in Cursor Web
- /// Example: https://cursor.com/agents?id=bc_abc123
- ///
- /// https://cursor.com/agents?id=bc_abc123
- [global::System.Text.Json.Serialization.JsonPropertyName("url")]
- [global::System.Text.Json.Serialization.JsonRequired]
- public required string Url { get; set; }
-
- ///
- /// URL of the pull request, if agent was created from a PR
- /// Example: https://github.com/your-org/your-repo/pull/123
- ///
- /// https://github.com/your-org/your-repo/pull/123
- [global::System.Text.Json.Serialization.JsonPropertyName("prUrl")]
- public string? PrUrl { get; set; }
-
- ///
- /// Whether a pull request will be automatically created
- /// Example: false
- ///
- /// false
- [global::System.Text.Json.Serialization.JsonPropertyName("autoCreatePr")]
- public bool? AutoCreatePr { get; set; }
-
- ///
- /// Whether the pull request will be opened as the Cursor GitHub App
- /// Example: false
- ///
- /// false
- [global::System.Text.Json.Serialization.JsonPropertyName("openAsCursorGithubApp")]
- public bool? OpenAsCursorGithubApp { get; set; }
-
- ///
- /// Whether to skip adding the user as a reviewer to the pull request
- /// Example: false
- ///
- /// false
- [global::System.Text.Json.Serialization.JsonPropertyName("skipReviewerRequest")]
- public bool? SkipReviewerRequest { get; set; }
-
- ///
- /// Additional properties that are not explicitly defined in the schema
- ///
- [global::System.Text.Json.Serialization.JsonExtensionData]
- public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
-
- ///
- /// Initializes a new instance of the class.
- ///
- ///
- /// URL to view the agent in Cursor Web
- /// Example: https://cursor.com/agents?id=bc_abc123
- ///
- ///
- /// The Git branch name where the agent is working
- /// Example: cursor/add-readme-1234
- ///
- ///
- /// URL of the pull request, if agent was created from a PR
- /// Example: https://github.com/your-org/your-repo/pull/123
- ///
- ///
- /// Whether a pull request will be automatically created
- /// Example: false
- ///
- ///
- /// Whether the pull request will be opened as the Cursor GitHub App
- /// Example: false
- ///
- ///
- /// Whether to skip adding the user as a reviewer to the pull request
- /// Example: false
- ///
-#if NET7_0_OR_GREATER
- [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
-#endif
- public CreateAgentResponseTarget(
- string url,
- string? branchName,
- string? prUrl,
- bool? autoCreatePr,
- bool? openAsCursorGithubApp,
- bool? skipReviewerRequest)
- {
- this.BranchName = branchName;
- this.Url = url ?? throw new global::System.ArgumentNullException(nameof(url));
- this.PrUrl = prUrl;
- this.AutoCreatePr = autoCreatePr;
- this.OpenAsCursorGithubApp = openAsCursorGithubApp;
- this.SkipReviewerRequest = skipReviewerRequest;
- }
-
- ///
- /// Initializes a new instance of the class.
- ///
- public CreateAgentResponseTarget()
- {
- }
- }
-}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.GetAgentResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.Json.g.cs
similarity index 87%
rename from src/libs/CursorAgents/Generated/CursorAgents.Models.GetAgentResponse.Json.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.Json.g.cs
index a0bb973..9419575 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.GetAgentResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.Json.g.cs
@@ -2,7 +2,7 @@
namespace CursorAgents
{
- public sealed partial class GetAgentResponse
+ public sealed partial class CreateRunRequest
{
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
@@ -34,14 +34,14 @@ public string ToJson(
///
/// Deserializes a JSON string using the provided JsonSerializerContext.
///
- public static global::CursorAgents.GetAgentResponse? FromJson(
+ public static global::CursorAgents.CreateRunRequest? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
- typeof(global::CursorAgents.GetAgentResponse),
- jsonSerializerContext) as global::CursorAgents.GetAgentResponse;
+ typeof(global::CursorAgents.CreateRunRequest),
+ jsonSerializerContext) as global::CursorAgents.CreateRunRequest;
}
///
@@ -51,11 +51,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::CursorAgents.GetAgentResponse? FromJson(
+ public static global::CursorAgents.CreateRunRequest? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
+ return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
}
@@ -63,14 +63,14 @@ public string ToJson(
///
/// Deserializes a JSON stream using the provided JsonSerializerContext.
///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
- typeof(global::CursorAgents.GetAgentResponse),
- jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.GetAgentResponse;
+ typeof(global::CursorAgents.CreateRunRequest),
+ jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateRunRequest;
}
///
@@ -80,11 +80,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupRequest.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.g.cs
similarity index 69%
rename from src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupRequest.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.g.cs
index ec62a94..f57350d 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupRequest.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.g.cs
@@ -6,14 +6,14 @@ namespace CursorAgents
///
///
///
- public sealed partial class AddFollowupRequest
+ public sealed partial class CreateRunRequest
{
///
///
///
[global::System.Text.Json.Serialization.JsonPropertyName("prompt")]
[global::System.Text.Json.Serialization.JsonRequired]
- public required global::CursorAgents.AddFollowupRequestPrompt Prompt { get; set; }
+ public required global::CursorAgents.CreateRunRequestPrompt Prompt { get; set; }
///
/// Additional properties that are not explicitly defined in the schema
@@ -22,22 +22,22 @@ public sealed partial class AddFollowupRequest
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
- public AddFollowupRequest(
- global::CursorAgents.AddFollowupRequestPrompt prompt)
+ public CreateRunRequest(
+ global::CursorAgents.CreateRunRequestPrompt prompt)
{
this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt));
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public AddFollowupRequest()
+ public CreateRunRequest()
{
}
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestTarget.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequestPrompt.Json.g.cs
similarity index 86%
rename from src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestTarget.Json.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequestPrompt.Json.g.cs
index 63dcd8d..db1726b 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequestTarget.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequestPrompt.Json.g.cs
@@ -2,7 +2,7 @@
namespace CursorAgents
{
- public sealed partial class CreateAgentRequestTarget
+ public sealed partial class CreateRunRequestPrompt
{
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
@@ -34,14 +34,14 @@ public string ToJson(
///
/// Deserializes a JSON string using the provided JsonSerializerContext.
///
- public static global::CursorAgents.CreateAgentRequestTarget? FromJson(
+ public static global::CursorAgents.CreateRunRequestPrompt? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
- typeof(global::CursorAgents.CreateAgentRequestTarget),
- jsonSerializerContext) as global::CursorAgents.CreateAgentRequestTarget;
+ typeof(global::CursorAgents.CreateRunRequestPrompt),
+ jsonSerializerContext) as global::CursorAgents.CreateRunRequestPrompt;
}
///
@@ -51,11 +51,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::CursorAgents.CreateAgentRequestTarget? FromJson(
+ public static global::CursorAgents.CreateRunRequestPrompt? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
+ return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
}
@@ -63,14 +63,14 @@ public string ToJson(
///
/// Deserializes a JSON stream using the provided JsonSerializerContext.
///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
- typeof(global::CursorAgents.CreateAgentRequestTarget),
- jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateAgentRequestTarget;
+ typeof(global::CursorAgents.CreateRunRequestPrompt),
+ jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateRunRequestPrompt;
}
///
@@ -80,11 +80,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
jsonSerializerOptions);
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupRequestPrompt.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequestPrompt.g.cs
similarity index 58%
rename from src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupRequestPrompt.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequestPrompt.g.cs
index a4210e5..2869900 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.AddFollowupRequestPrompt.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequestPrompt.g.cs
@@ -6,22 +6,20 @@ namespace CursorAgents
///
///
///
- public sealed partial class AddFollowupRequestPrompt
+ public sealed partial class CreateRunRequestPrompt
{
///
- /// The followup instruction for the agent
- /// Example: Also add a section about troubleshooting
+ /// Follow-up instruction text.
+ /// Example: Also add troubleshooting steps
///
- /// Also add a section about troubleshooting
+ /// Also add troubleshooting steps
[global::System.Text.Json.Serialization.JsonPropertyName("text")]
[global::System.Text.Json.Serialization.JsonRequired]
public required string Text { get; set; }
///
- /// Optional array of base64 encoded images (max 5)
- /// Example: [{"data":"iVBORw0KGgoAAAANSUhEUgAA...","dimension":{"width":1024,"height":768}}]
+ /// Optional base64-encoded images. Maximum 5 images, 15 MB each.
///
- /// [{"data":"iVBORw0KGgoAAAANSUhEUgAA...","dimension":{"width":1024,"height":768}}]
[global::System.Text.Json.Serialization.JsonPropertyName("images")]
public global::System.Collections.Generic.IList? Images { get; set; }
@@ -32,20 +30,19 @@ public sealed partial class AddFollowupRequestPrompt
public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
///
- /// The followup instruction for the agent
- /// Example: Also add a section about troubleshooting
+ /// Follow-up instruction text.
+ /// Example: Also add troubleshooting steps
///
///
- /// Optional array of base64 encoded images (max 5)
- /// Example: [{"data":"iVBORw0KGgoAAAANSUhEUgAA...","dimension":{"width":1024,"height":768}}]
+ /// Optional base64-encoded images. Maximum 5 images, 15 MB each.
///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
- public AddFollowupRequestPrompt(
+ public CreateRunRequestPrompt(
string text,
global::System.Collections.Generic.IList? images)
{
@@ -54,9 +51,9 @@ public AddFollowupRequestPrompt(
}
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- public AddFollowupRequestPrompt()
+ public CreateRunRequestPrompt()
{
}
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.StopAgentResponse.Json.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunResponse.Json.g.cs
similarity index 87%
rename from src/libs/CursorAgents/Generated/CursorAgents.Models.StopAgentResponse.Json.g.cs
rename to src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunResponse.Json.g.cs
index 97e7d82..b809696 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.StopAgentResponse.Json.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunResponse.Json.g.cs
@@ -2,7 +2,7 @@
namespace CursorAgents
{
- public sealed partial class StopAgentResponse
+ public sealed partial class CreateRunResponse
{
///
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
@@ -34,14 +34,14 @@ public string ToJson(
///
/// Deserializes a JSON string using the provided JsonSerializerContext.
///
- public static global::CursorAgents.StopAgentResponse? FromJson(
+ public static global::CursorAgents.CreateRunResponse? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
- typeof(global::CursorAgents.StopAgentResponse),
- jsonSerializerContext) as global::CursorAgents.StopAgentResponse;
+ typeof(global::CursorAgents.CreateRunResponse),
+ jsonSerializerContext) as global::CursorAgents.CreateRunResponse;
}
///
@@ -51,11 +51,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::CursorAgents.StopAgentResponse? FromJson(
+ public static global::CursorAgents.CreateRunResponse? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
- return global::System.Text.Json.JsonSerializer.Deserialize(
+ return global::System.Text.Json.JsonSerializer.Deserialize(
json,
jsonSerializerOptions);
}
@@ -63,14 +63,14 @@ public string ToJson(
///
/// Deserializes a JSON stream using the provided JsonSerializerContext.
///
- public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
- typeof(global::CursorAgents.StopAgentResponse),
- jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.StopAgentResponse;
+ typeof(global::CursorAgents.CreateRunResponse),
+ jsonSerializerContext).ConfigureAwait(false)) as global::CursorAgents.CreateRunResponse;
}
///
@@ -80,11 +80,11 @@ public string ToJson(
[global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
[global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
#endif
- public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ public static global::System.Threading.Tasks.ValueTask