diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateAgent.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateAgent.g.cs
index 3c37489..0c0973d 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateAgent.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateAgent.g.cs
@@ -662,6 +662,10 @@ partial void ProcessCreateAgentResponseContent(
///
/// Session-scoped environment variables for the cloud agent. Values are encrypted at rest, injected into the agent's shell, and deleted with the agent. Names must be non-empty, 1024 bytes or less, and cannot start with `CURSOR_`. Values must be non-empty and 4096 bytes or less.
///
+ ///
+ /// Initial conversation mode for the agent's first run.
+ /// Default Value: agent
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -675,6 +679,7 @@ partial void ProcessCreateAgentResponseContent(
bool? autoCreatePR = default,
bool? skipReviewerRequest = default,
global::System.Collections.Generic.Dictionary? envVars = default,
+ global::CursorAgents.AgentMode? mode = default,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -689,6 +694,7 @@ partial void ProcessCreateAgentResponseContent(
AutoCreatePR = autoCreatePR,
SkipReviewerRequest = skipReviewerRequest,
EnvVars = envVars,
+ Mode = mode,
};
return await CreateAgentAsync(
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateRun.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateRun.g.cs
index 3c4f732..4c23e3b 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateRun.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.CursorAgentsClient.CreateRun.g.cs
@@ -730,18 +730,23 @@ partial void ProcessCreateRunResponseContent(
/// Example: bc-00000000-0000-0000-0000-000000000001
///
///
+ ///
+ /// Conversation mode. `plan` explores and drafts a plan before coding; `agent` implements changes directly. On follow-up runs, omit to keep the conversation's current mode; set explicitly to switch modes for that run.
+ ///
/// 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 CreateRunAsync(
string id,
global::CursorAgents.CreateRunRequestPrompt prompt,
+ global::CursorAgents.AgentMode? mode = default,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::CursorAgents.CreateRunRequest
{
Prompt = prompt,
+ Mode = mode,
};
return await CreateRunAsync(
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateAgent.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateAgent.g.cs
index 3f0df1f..6404a3d 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateAgent.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateAgent.g.cs
@@ -65,6 +65,10 @@ public partial interface ICursorAgentsClient
///
/// Session-scoped environment variables for the cloud agent. Values are encrypted at rest, injected into the agent's shell, and deleted with the agent. Names must be non-empty, 1024 bytes or less, and cannot start with `CURSOR_`. Values must be non-empty and 4096 bytes or less.
///
+ ///
+ /// Initial conversation mode for the agent's first run.
+ /// Default Value: agent
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -78,6 +82,7 @@ public partial interface ICursorAgentsClient
bool? autoCreatePR = default,
bool? skipReviewerRequest = default,
global::System.Collections.Generic.Dictionary? envVars = default,
+ global::CursorAgents.AgentMode? mode = default,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateRun.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateRun.g.cs
index 40e5580..96a9f81 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateRun.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.ICursorAgentsClient.CreateRun.g.cs
@@ -52,12 +52,16 @@ public partial interface ICursorAgentsClient
/// Example: bc-00000000-0000-0000-0000-000000000001
///
///
+ ///
+ /// Conversation mode. `plan` explores and drafts a plan before coding; `agent` implements changes directly. On follow-up runs, omit to keep the conversation's current mode; set explicitly to switch modes for that run.
+ ///
/// 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 CreateRunAsync(
string id,
global::CursorAgents.CreateRunRequestPrompt prompt,
+ global::CursorAgents.AgentMode? mode = default,
global::CursorAgents.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.AgentMode.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.AgentMode.g.cs
new file mode 100644
index 0000000..27126a3
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.AgentMode.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace CursorAgents.JsonConverters
+{
+ ///
+ public sealed class AgentModeJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::CursorAgents.AgentMode 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.AgentModeExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::CursorAgents.AgentMode)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::CursorAgents.AgentMode);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::CursorAgents.AgentMode value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::CursorAgents.AgentModeExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.AgentModeNullable.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.AgentModeNullable.g.cs
new file mode 100644
index 0000000..a8269db
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.JsonConverters.AgentModeNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace CursorAgents.JsonConverters
+{
+ ///
+ public sealed class AgentModeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::CursorAgents.AgentMode? 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.AgentModeExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::CursorAgents.AgentMode)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::CursorAgents.AgentMode?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::CursorAgents.AgentMode? 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.AgentModeExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContext.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContext.g.cs
index 6811d98..afe702b 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContext.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContext.g.cs
@@ -25,6 +25,10 @@ namespace CursorAgents
typeof(global::CursorAgents.JsonConverters.RunStatusNullableJsonConverter),
+ typeof(global::CursorAgents.JsonConverters.AgentModeJsonConverter),
+
+ typeof(global::CursorAgents.JsonConverters.AgentModeNullableJsonConverter),
+
typeof(global::CursorAgents.JsonConverters.AgentJsonConverter),
typeof(global::CursorAgents.JsonConverters.UnixTimestampJsonConverter),
@@ -53,6 +57,7 @@ namespace CursorAgents
[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::System.Collections.Generic.Dictionary))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::CursorAgents.AgentMode), TypeInfoPropertyName = "AgentMode2")]
[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))]
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContextTypes.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContextTypes.g.cs
index 0e465fe..cbcd15a 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContextTypes.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.JsonSerializerContextTypes.g.cs
@@ -120,103 +120,107 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::CursorAgents.CreateRunRequest? Type23 { get; set; }
+ public global::CursorAgents.AgentMode? Type23 { get; set; }
///
///
///
- public global::CursorAgents.CreateRunRequestPrompt? Type24 { get; set; }
+ public global::CursorAgents.CreateRunRequest? Type24 { get; set; }
///
///
///
- public global::CursorAgents.CreateAgentResponse? Type25 { get; set; }
+ public global::CursorAgents.CreateRunRequestPrompt? Type25 { get; set; }
///
///
///
- public global::CursorAgents.CreateRunResponse? Type26 { get; set; }
+ public global::CursorAgents.CreateAgentResponse? Type26 { get; set; }
///
///
///
- public global::CursorAgents.ListAgentsResponse? Type27 { get; set; }
+ public global::CursorAgents.CreateRunResponse? Type27 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type28 { get; set; }
+ public global::CursorAgents.ListAgentsResponse? Type28 { get; set; }
///
///
///
- public global::CursorAgents.ListRunsResponse? Type29 { get; set; }
+ public global::System.Collections.Generic.IList? Type29 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type30 { get; set; }
+ public global::CursorAgents.ListRunsResponse? Type30 { get; set; }
///
///
///
- public global::CursorAgents.IdResponse? Type31 { get; set; }
+ public global::System.Collections.Generic.IList? Type31 { get; set; }
///
///
///
- public global::CursorAgents.Artifact? Type32 { get; set; }
+ public global::CursorAgents.IdResponse? Type32 { get; set; }
///
///
///
- public long? Type33 { get; set; }
+ public global::CursorAgents.Artifact? Type33 { get; set; }
///
///
///
- public global::CursorAgents.ListArtifactsResponse? Type34 { get; set; }
+ public long? Type34 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type35 { get; set; }
+ public global::CursorAgents.ListArtifactsResponse? Type35 { get; set; }
///
///
///
- public global::CursorAgents.DownloadArtifactResponse? Type36 { get; set; }
+ public global::System.Collections.Generic.IList? Type36 { get; set; }
///
///
///
- public global::CursorAgents.ApiKeyInfo? Type37 { get; set; }
+ public global::CursorAgents.DownloadArtifactResponse? Type37 { get; set; }
///
///
///
- public global::CursorAgents.ListModelsResponse? Type38 { get; set; }
+ public global::CursorAgents.ApiKeyInfo? Type38 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type39 { get; set; }
+ public global::CursorAgents.ListModelsResponse? Type39 { get; set; }
///
///
///
- public global::CursorAgents.Repository? Type40 { get; set; }
+ public global::System.Collections.Generic.IList? Type40 { get; set; }
///
///
///
- public global::CursorAgents.ListRepositoriesResponse? Type41 { get; set; }
+ public global::CursorAgents.Repository? Type41 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type42 { get; set; }
+ public global::CursorAgents.ListRepositoriesResponse? Type42 { get; set; }
///
///
///
- public global::CursorAgents.CreateSubTokenRequest? Type43 { get; set; }
+ public global::System.Collections.Generic.IList? Type43 { get; set; }
///
///
///
- public object? Type44 { get; set; }
+ public global::CursorAgents.CreateSubTokenRequest? Type44 { get; set; }
///
///
///
- public global::CursorAgents.CreateSubTokenResponse? Type45 { get; set; }
+ public object? Type45 { get; set; }
///
///
///
- public global::CursorAgents.Error? Type46 { get; set; }
+ public global::CursorAgents.CreateSubTokenResponse? Type46 { get; set; }
///
///
///
- public global::CursorAgents.ErrorError1? Type47 { get; set; }
+ public global::CursorAgents.Error? Type47 { get; set; }
+ ///
+ ///
+ ///
+ public global::CursorAgents.ErrorError1? Type48 { get; set; }
///
///
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentMode.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentMode.g.cs
new file mode 100644
index 0000000..0be69f1
--- /dev/null
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.AgentMode.g.cs
@@ -0,0 +1,51 @@
+
+#nullable enable
+
+namespace CursorAgents
+{
+ ///
+ /// Conversation mode. `plan` explores and drafts a plan before coding; `agent` implements changes directly. On follow-up runs, omit to keep the conversation's current mode; set explicitly to switch modes for that run.
+ ///
+ public enum AgentMode
+ {
+ ///
+ ///
+ ///
+ Agent,
+ ///
+ ///
+ ///
+ Plan,
+ }
+
+ ///
+ /// Enum extensions to do fast conversions without the reflection.
+ ///
+ public static class AgentModeExtensions
+ {
+ ///
+ /// Converts an enum to a string.
+ ///
+ public static string ToValueString(this AgentMode value)
+ {
+ return value switch
+ {
+ AgentMode.Agent => "agent",
+ AgentMode.Plan => "plan",
+ _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null),
+ };
+ }
+ ///
+ /// Converts an string to a enum.
+ ///
+ public static AgentMode? ToEnum(string value)
+ {
+ return value switch
+ {
+ "agent" => AgentMode.Agent,
+ "plan" => AgentMode.Plan,
+ _ => null,
+ };
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequest.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequest.g.cs
index 47a9746..595e7fa 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequest.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateAgentRequest.g.cs
@@ -68,6 +68,14 @@ public sealed partial class CreateAgentRequest
[global::System.Text.Json.Serialization.JsonPropertyName("envVars")]
public global::System.Collections.Generic.Dictionary? EnvVars { get; set; }
+ ///
+ /// Initial conversation mode for the agent's first run.
+ /// Default Value: agent
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("mode")]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::CursorAgents.JsonConverters.AgentModeJsonConverter))]
+ public global::CursorAgents.AgentMode? Mode { get; set; }
+
///
/// Additional properties that are not explicitly defined in the schema
///
@@ -102,6 +110,10 @@ public sealed partial class CreateAgentRequest
///
/// Session-scoped environment variables for the cloud agent. Values are encrypted at rest, injected into the agent's shell, and deleted with the agent. Names must be non-empty, 1024 bytes or less, and cannot start with `CURSOR_`. Values must be non-empty and 4096 bytes or less.
///
+ ///
+ /// Initial conversation mode for the agent's first run.
+ /// Default Value: agent
+ ///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
@@ -114,7 +126,8 @@ public CreateAgentRequest(
bool? autoGenerateBranch,
bool? autoCreatePR,
bool? skipReviewerRequest,
- global::System.Collections.Generic.Dictionary? envVars)
+ global::System.Collections.Generic.Dictionary? envVars,
+ global::CursorAgents.AgentMode? mode)
{
this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt));
this.Model = model;
@@ -125,6 +138,7 @@ public CreateAgentRequest(
this.AutoCreatePR = autoCreatePR;
this.SkipReviewerRequest = skipReviewerRequest;
this.EnvVars = envVars;
+ this.Mode = mode;
}
///
diff --git a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.g.cs b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.g.cs
index bbad262..ce54d4d 100644
--- a/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.g.cs
+++ b/src/libs/CursorAgents/Generated/CursorAgents.Models.CreateRunRequest.g.cs
@@ -15,6 +15,13 @@ public sealed partial class CreateRunRequest
[global::System.Text.Json.Serialization.JsonRequired]
public required global::CursorAgents.CreateRunRequestPrompt Prompt { get; set; }
+ ///
+ /// Conversation mode. `plan` explores and drafts a plan before coding; `agent` implements changes directly. On follow-up runs, omit to keep the conversation's current mode; set explicitly to switch modes for that run.
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("mode")]
+ [global::System.Text.Json.Serialization.JsonConverter(typeof(global::CursorAgents.JsonConverters.AgentModeJsonConverter))]
+ public global::CursorAgents.AgentMode? Mode { get; set; }
+
///
/// Additional properties that are not explicitly defined in the schema
///
@@ -25,13 +32,18 @@ public sealed partial class CreateRunRequest
/// Initializes a new instance of the class.
///
///
+ ///
+ /// Conversation mode. `plan` explores and drafts a plan before coding; `agent` implements changes directly. On follow-up runs, omit to keep the conversation's current mode; set explicitly to switch modes for that run.
+ ///
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public CreateRunRequest(
- global::CursorAgents.CreateRunRequestPrompt prompt)
+ global::CursorAgents.CreateRunRequestPrompt prompt,
+ global::CursorAgents.AgentMode? mode)
{
this.Prompt = prompt ?? throw new global::System.ArgumentNullException(nameof(prompt));
+ this.Mode = mode;
}
///
diff --git a/src/libs/CursorAgents/openapi.yaml b/src/libs/CursorAgents/openapi.yaml
index 196e3c0..806eef1 100644
--- a/src/libs/CursorAgents/openapi.yaml
+++ b/src/libs/CursorAgents/openapi.yaml
@@ -272,6 +272,11 @@ components:
type: string
minLength: 1
maxLength: 4096
+ mode:
+ allOf:
+ - $ref: '#/components/schemas/AgentMode'
+ default: agent
+ description: Initial conversation mode for the agent's first run.
CreateRunRequest:
type: object
@@ -294,6 +299,19 @@ components:
items:
$ref: '#/components/schemas/Image'
description: Optional base64-encoded images. Maximum 5 images, 15 MB each.
+ mode:
+ $ref: '#/components/schemas/AgentMode'
+
+ AgentMode:
+ type: string
+ enum:
+ - agent
+ - plan
+ description: >
+ Conversation mode. `plan` explores and drafts a plan before coding;
+ `agent` implements changes directly. On follow-up runs, omit to keep
+ the conversation's current mode; set explicitly to switch modes for
+ that run.
CreateAgentResponse:
type: object