diff --git a/dotnet/src/Generated/Rpc.cs b/dotnet/src/Generated/Rpc.cs
index 81cd4e6da8..774df7a0ed 100644
--- a/dotnet/src/Generated/Rpc.cs
+++ b/dotnet/src/Generated/Rpc.cs
@@ -667,6 +667,14 @@ public sealed class CopilotUserResponseEndpoints
public string? Telemetry { get; set; }
}
+/// RPC data type for CopilotUserResponseEnterpriseList operations.
+public sealed class CopilotUserResponseEnterpriseList
+{
+ /// Numeric database ID of the enterprise.
+ [JsonPropertyName("id")]
+ public long Id { get; set; }
+}
+
/// RPC data type for CopilotUserResponseOrganizationListItem operations.
public sealed class CopilotUserResponseOrganizationListItem
{
@@ -911,6 +919,10 @@ public sealed class CopilotUserResponse
[JsonPropertyName("endpoints")]
public CopilotUserResponseEndpoints? Endpoints { get; set; }
+ /// Enterprises that provide the user's Copilot license, each with a stable numeric ID.
+ [JsonPropertyName("enterprise_list")]
+ public IList? EnterpriseList { get; set; }
+
/// Whether MCP (Model Context Protocol) support is enabled for the user.
[JsonPropertyName("is_mcp_enabled")]
public bool? IsMcpEnabled { get; set; }
@@ -1420,7 +1432,7 @@ public partial class McpPlanInstallResult
[Experimental(Diagnostics.Experimental)]
public sealed class CatalogNegotiatedContract
{
- /// Wire features the runtime understood for this operation. Always a superset of the caller's required features, because any shortfall is a refusal instead. Operation availability remains a separate typed result.
+ /// Wire features the runtime understood for this operation. Includes the five original catalog capabilities and only explicitly requested supported additions, in supported order without duplicates. Capabilities that introduce new success-union variants or operations are therefore included only when explicitly required, preserving older protocol-v3 clients. Always a superset of the caller's required features, because any shortfall is a refusal instead. Operation availability remains a separate typed result.
[JsonPropertyName("grantedCapabilities")]
public IList GrantedCapabilities { get => field ??= []; set; }
@@ -1429,7 +1441,7 @@ public sealed class CatalogNegotiatedContract
public long RuntimeProtocolVersion { get; set; }
}
-/// One change applying the plan would make, described rather than serialised so the configuration payload stays behind the runtime boundary.
+/// The configuration-change alternative for the transportChoices entry at the same index. Only the selected alternative is applied; entries are not cumulative. The payload stays behind the runtime boundary.
[Experimental(Diagnostics.Experimental)]
public sealed class McpPlanConfigurationChange
{
@@ -1797,7 +1809,7 @@ public partial class McpPlanTransportChoiceRemote : McpPlanTransportChoice
[Experimental(Diagnostics.Experimental)]
public sealed class McpInstallPlan
{
- /// The configuration changes installing would make, described rather than serialised, so the mutable configuration payload stays behind the runtime boundary.
+ /// Alternative configuration changes, with exactly one entry for each transportChoices entry in the same order. Only the entry for the subsequently selected transport applies; these are not cumulative writes. Payloads remain behind the runtime boundary.
[JsonPropertyName("configurationChanges")]
public IList ConfigurationChanges { get => field ??= []; set; }
@@ -1831,7 +1843,7 @@ public sealed class McpInstallPlan
[JsonPropertyName("reloadRequired")]
public bool ReloadRequired { get; set; }
- /// Whether the plan cannot be applied without further input, because a required value has no default or a secret must be supplied.
+ /// True only when every eligible transport choice needs additional values or secrets. False means at least one choice needs no additional configuration, not that every choice is ready. A later apply operation must validate the selected choice's own inputs, secrets and policy after explicit confirmation.
[JsonPropertyName("requiresInteractiveConfiguration")]
public bool RequiresInteractiveConfiguration { get; set; }
@@ -1922,7 +1934,7 @@ public partial class McpPlanInstallResultHandleRejected : McpPlanInstallResult
public required CatalogHandleRejectionReason Reason { get; set; }
}
-/// The request was rejected before any work was done, because a bounded field fell outside its permitted range or a required field was unusable.
+/// The request was rejected because a bounded field fell outside its permitted range or a required field was unusable. Pagination may also be rejected by the authority after a continuation request; repeat the search without page.
/// The invalid-request variant of .
[Experimental(Diagnostics.Experimental)]
public partial class McpPlanInstallResultInvalidRequest : McpPlanInstallResult
@@ -2182,7 +2194,7 @@ public partial class McpPlanInstallSourceCandidate : McpPlanInstallSource
[JsonPropertyName("candidateHandle")]
public required string CandidateHandle { get; set; }
- /// The runtime- or authority-minted `searchId` returned with the search that produced this candidate. A search implementation binds it to private candidate-handle context; a planning implementation must verify that context before returning a plan. The unavailable planning implementation in this contract layer validates presence but does not claim the verification has occurred. It identifies a search rather than a person and must never be joined with user identity to re-identify anyone.
+ /// The runtime- or authority-minted `searchId` returned with the search that produced this candidate. Planning verifies the private correlation and atomically consumes a matching candidate before downstream work, including attempts that subsequently fail or report unavailable. A mismatched search does not consume the candidate. It identifies a search rather than a person and must never be joined with user identity to re-identify anyone.
[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
[MinLength(1)]
[MaxLength(64)]
@@ -2448,7 +2460,7 @@ public partial class CatalogSearchResult
}
-/// One inert catalog result, represented as an MCP server or discovery-only AI skill variant so kind, media type, provenance, and installability cannot contradict each other.
+/// One inert catalog result, represented as an MCP server, discovery-only AI skill, or opt-in Agent Plugin variant so kind, media type, provenance, and available operations cannot contradict each other.
/// Polymorphic base type discriminated by kind.
[Experimental(Diagnostics.Experimental)]
[JsonPolymorphic(
@@ -2456,6 +2468,7 @@ public partial class CatalogSearchResult
UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
[JsonDerivedType(typeof(CatalogCandidateMcpServer), "mcp-server")]
[JsonDerivedType(typeof(CatalogCandidateAiSkill), "ai-skill")]
+[JsonDerivedType(typeof(CatalogCandidatePlugin), "plugin")]
public partial class CatalogCandidate
{
/// The type discriminator.
@@ -2793,7 +2806,7 @@ public sealed class CatalogAiSkillCandidateProvenance
/// Media type advertised for the referenced AI skill card.
[JsonPropertyName("mediaType")]
- public string MediaType { get; set; } = string.Empty;
+ public CatalogAiSkillMediaType MediaType { get; set; }
/// ISO 8601 timestamp at which the runtime observed the catalog reference. This is not a retrieval or validation timestamp.
[JsonPropertyName("observedAt")]
@@ -2834,11 +2847,11 @@ public partial class CatalogCandidateAiSkill : CatalogCandidate
/// AI skills are discovery-only and cannot be installed through this surface.
[JsonPropertyName("installability")]
- public required string Installability { get; set; }
+ public required CatalogAiSkillInstallability Installability { get; set; }
/// Media type of the underlying AI skill card.
[JsonPropertyName("mediaType")]
- public required string MediaType { get; set; }
+ public required CatalogAiSkillMediaType MediaType { get; set; }
/// Where the catalog reference was observed, without the card itself or any content digest.
[JsonPropertyName("provenance")]
@@ -2861,7 +2874,146 @@ public partial class CatalogCandidateAiSkill : CatalogCandidate
public CatalogTrustSnapshot? Trust { get; set; }
}
-/// A completed catalog search: inert candidate summaries, each carrying a single-use handle.
+/// Where and when an Agent Plugin catalog reference was observed. Discovery provenance deliberately carries no descriptor URL, raw data, candidate handle, or content digest.
+[Experimental(Diagnostics.Experimental)]
+public sealed class CatalogAgentPluginCandidateProvenance
+{
+ /// Host of the catalog authority that advertised the reference, without path, query, or credentials. Inert untrusted data.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MinLength(1)]
+ [JsonPropertyName("authority")]
+ public string Authority { get; set; } = string.Empty;
+
+ /// Canonical Agent Plugin media type.
+ [JsonPropertyName("mediaType")]
+ public CatalogAgentPluginMediaType MediaType { get; set; }
+
+ /// ISO 8601 timestamp at which the runtime observed the catalog reference. This is not a retrieval or validation timestamp.
+ [JsonPropertyName("observedAt")]
+ public string ObservedAt { get; set; } = string.Empty;
+}
+
+/// Syntactically validated GitHub repository provenance declared by catalog metadata. This is a source claim rather than proof that the descriptor URL resolves to the repository.
+[Experimental(Diagnostics.Experimental)]
+public sealed class CatalogPluginRepositorySource
+{
+ /// Case-preserving safe relative POSIX path derived from metadata.repoPath.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MinLength(1)]
+ [MaxLength(256)]
+ [JsonPropertyName("path")]
+ public string Path { get; set; } = string.Empty;
+
+ /// Canonical lowercase owner/repository name derived from metadata.sourceSet.
+ [RegularExpression("^[a-z0-9_.-]+/[a-z0-9_.-]+$")]
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MinLength(3)]
+ [MaxLength(256)]
+ [JsonPropertyName("repository")]
+ public string Repository { get; set; } = string.Empty;
+}
+
+/// An inert Agent Plugin catalog result. Its canonical catalog identity, declared version, repository source claim, and explicit compatibility tags are safe to correlate, while its descriptor, URL, raw data, and installed-plugin state remain runtime-private. This contract-only variant does not mint or expose a candidate handle.
+/// The plugin variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class CatalogCandidatePlugin : CatalogCandidate
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "plugin";
+
+ /// Explicit validated compatibility tags, in canonical order. An empty list means the source declared no recognised compatibility; clients must not infer compatibility from other fields. `canvas-only` requires both `canvas` and `github-copilot`.
+ [JsonPropertyName("compatibilityTags")]
+ public required IList CompatibilityTags { get; set; }
+
+ /// Description taken verbatim from the card. Inert untrusted text.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MaxLength(1000)]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("description")]
+ public string? Description { get; set; }
+
+ /// Display name taken verbatim from the card. Inert untrusted text.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MaxLength(200)]
+ [JsonPropertyName("displayName")]
+ public required string DisplayName { get; set; }
+
+ /// Validated, normalised catalogue resource URN. This identity comes only from the catalog identifier and is never inferred from display text or installed-plugin state.
+ [JsonPropertyName("identity")]
+ public required string Identity { get; set; }
+
+ /// Canonical Agent Plugin media type.
+ [JsonPropertyName("mediaType")]
+ public required CatalogAgentPluginMediaType MediaType { get; set; }
+
+ /// Where the Agent Plugin catalog reference was observed, without its descriptor, URL, raw data, or content digest.
+ [JsonPropertyName("provenance")]
+ public required CatalogAgentPluginCandidateProvenance Provenance { get; set; }
+
+ /// Publisher taken verbatim from the card. Inert untrusted text.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MaxLength(200)]
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("publisher")]
+ public string? Publisher { get; set; }
+
+ /// Bounded repository provenance declared through the catalog's sourceSet and repoPath metadata. It contains no descriptor URL.
+ [JsonPropertyName("source")]
+ public required CatalogPluginRepositorySource Source { get; set; }
+
+ /// Versioned trust metadata observed from the catalog authority. Optional for protocol-3 compatibility and emitted only when the caller also requires the trust-snapshot capability.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("trust")]
+ public CatalogTrustSnapshot? Trust { get; set; }
+
+ /// Optional version declared by the catalog source. Omitted rather than guessed when the source supplies no version.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("version")]
+ public string? Version { get; set; }
+}
+
+/// Authority-reported navigation metadata, returned only to callers requiring catalog-search-pagination and only when a supported token is present. Tokenless first-page and continuation responses omit this object; no counts are inferred from candidates. The opaque token may be retained for previous or numbered navigation even when hasNextPage is false.
+[Experimental(Diagnostics.Experimental)]
+public sealed class CatalogSearchPagination
+{
+ /// One-based page returned by the authority.
+ [JsonPropertyName("currentPage")]
+ public int CurrentPage { get; set; }
+
+ /// Whether the authority token advertises a valid next target within the navigation window. Not inferred from token presence, truncated, or currentPage being less than pageCount.
+ [JsonPropertyName("hasNextPage")]
+ public bool HasNextPage { get; set; }
+
+ /// Navigation window ceiling ceil(1000 / pageSize), not the number of existing pages. Legal targets must not exceed this ceiling or the token's signed pageCount.
+ [JsonPropertyName("maxPage")]
+ public int MaxPage { get; set; }
+
+ /// Backend-reported page count, which may exceed maxPage. Present pagination metadata always describes a multi-page result; zero- and single-page responses omit pagination. Navigation targets must also be within the signed pageCount carried by the supplied token.
+ [JsonPropertyName("pageCount")]
+ public long PageCount { get; set; }
+
+ /// Page size bound to the search, equal to the effective request limit.
+ [JsonPropertyName("pageSize")]
+ public int PageSize { get; set; }
+
+ /// Opaque authority-issued pagination token. Only the runtime decodes it or changes targetPage; SDK consumers must not decode, modify or log it. It has no runtime-created expiry or cache.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MinLength(1)]
+ [MaxLength(4096)]
+ [JsonPropertyName("token")]
+ public string Token { get; set; } = string.Empty;
+
+ /// Backend-reported count for this response, not the number of returned candidates. Its relationship to the full query result set is unknown.
+ [JsonPropertyName("totalCount")]
+ public long TotalCount { get; set; }
+
+ /// The relationship of totalCount to the complete query result set is unknown; neither exactness nor a lower-bound guarantee is implied.
+ [JsonPropertyName("totalCountRelation")]
+ public CatalogSearchTotalCountRelation TotalCountRelation { get; set; }
+}
+
+/// A completed catalog search containing inert candidate summaries. MCP server and AI skill variants carry a single-use handle; the Agent Plugin variant is handleless.
/// The succeeded variant of .
[Experimental(Diagnostics.Experimental)]
public partial class CatalogSearchResultSucceeded : CatalogSearchResult
@@ -2878,6 +3030,11 @@ public partial class CatalogSearchResultSucceeded : CatalogSearchResult
[JsonPropertyName("negotiated")]
public required CatalogNegotiatedContract Negotiated { get; set; }
+ /// Navigation metadata for callers explicitly requiring catalog-search-pagination. Omitted when the authority returns no token, including tokenless first-page and continuation responses. Counts are never substituted from candidates.length.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("pagination")]
+ public CatalogSearchPagination? Pagination { get; set; }
+
/// Pseudonymous identifier for this search, issued by the runtime or by the catalog authority it queried and never by the caller, so it cannot be forged or replayed to attribute an install to a search that never happened. Always present on a success, so a result set can be tied to the installs it leads to. It identifies a search rather than a person: it is derived from no user, account, device, or query data, and must never be joined with user identity to re-identify anyone.
[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
[MinLength(1)]
@@ -2885,7 +3042,7 @@ public partial class CatalogSearchResultSucceeded : CatalogSearchResult
[JsonPropertyName("searchId")]
public required string SearchId { get; set; }
- /// Whether further matches existed beyond the requested limit.
+ /// Legacy indication that the authority returned a page token. Preserved for compatibility; this is not a has-next-page indicator. Use pagination.hasNextPage when pagination metadata is present.
[JsonPropertyName("truncated")]
public required bool Truncated { get; set; }
}
@@ -2950,7 +3107,7 @@ public partial class CatalogSearchResultUnsupportedKind : CatalogSearchResult
public required IList SupportedKinds { get; set; }
}
-/// The request was rejected before any work was done, because a bounded field fell outside its permitted range or a required field was unusable.
+/// The request was rejected because a bounded field fell outside its permitted range or a required field was unusable. Pagination may also be rejected by the authority after a continuation request; repeat the search without page.
/// The invalid-request variant of .
[Experimental(Diagnostics.Experimental)]
public partial class CatalogSearchResultInvalidRequest : CatalogSearchResult
@@ -3125,6 +3282,22 @@ public partial class CatalogSearchResultUnavailable : CatalogSearchResult
public required CatalogUnavailableReason Reason { get; set; }
}
+/// An explicit numbered-page request. The SDK treats the token as opaque; only the runtime decodes it and changes its targetPage. Authority validation binds navigation to the original search. No snapshot stability or token TTL is promised.
+[Experimental(Diagnostics.Experimental)]
+public sealed class CatalogSearchPage
+{
+ /// Requested one-based page. Must not exceed either the token's signed pageCount or the navigation window ceil(1000 / pageSize). Repeat the search without page to discover newly available pages beyond that signed pageCount.
+ [JsonPropertyName("number")]
+ public int Number { get; set; }
+
+ /// Opaque authority-issued pagination token from an earlier response. Never decode, modify or log it in an SDK consumer.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MinLength(1)]
+ [MaxLength(4096)]
+ [JsonPropertyName("token")]
+ public string Token { get; set; } = string.Empty;
+}
+
/// A bounded catalog search. Both the query length and the result count are capped by the schema so a caller cannot request an unbounded scan.
[Experimental(Diagnostics.Experimental)]
internal sealed class CatalogSearchRequest
@@ -3133,7 +3306,7 @@ internal sealed class CatalogSearchRequest
[JsonPropertyName("contract")]
public CatalogClientContract Contract { get => field ??= new(); set; }
- /// Restrict results to these candidate kinds. When omitted, every kind the runtime supports is searched.
+ /// Restrict results to these candidate kinds. Agent Plugins are opt-in and require the `agent-plugin-discovery` capability so protocol-v3 clients generated before that variant cannot receive an unknown result; when omitted, the backwards-compatible MCP server and AI skill kinds are searched.
[JsonPropertyName("kinds")]
public IList? Kinds { get; set; }
@@ -3141,6 +3314,10 @@ internal sealed class CatalogSearchRequest
[JsonPropertyName("limit")]
public int? Limit { get; set; }
+ /// Numbered navigation using metadata from an earlier response. Requires catalog-search-pagination and the same query, kinds and effective limit. Omit for a fresh first-page search.
+ [JsonPropertyName("page")]
+ public CatalogSearchPage? Page { get; set; }
+
/// Free-text search query. Persisted as tool input for session continuity, but omitted from telemetry.
[RegularExpression("\\S")]
[UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
@@ -3150,6 +3327,290 @@ internal sealed class CatalogSearchRequest
public string Query { get; set; } = string.Empty;
}
+/// Typed outcome of catalog.select. Only the selected host result carries a fresh candidate handle; the model-facing projection removes both that handle and searchId.
+/// Polymorphic base type discriminated by kind.
+[Experimental(Diagnostics.Experimental)]
+[JsonPolymorphic(
+ TypeDiscriminatorPropertyName = "kind",
+ UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
+[JsonDerivedType(typeof(CatalogSelectionResultSelected), "selected")]
+[JsonDerivedType(typeof(CatalogSelectionResultDeclined), "declined")]
+[JsonDerivedType(typeof(CatalogSelectionResultCancelled), "cancelled")]
+[JsonDerivedType(typeof(CatalogSelectionResultTimedOut), "timed-out")]
+[JsonDerivedType(typeof(CatalogSelectionResultInvalid), "invalid")]
+[JsonDerivedType(typeof(CatalogSelectionResultStale), "stale")]
+[JsonDerivedType(typeof(CatalogSelectionResultReplayed), "replayed")]
+[JsonDerivedType(typeof(CatalogSelectionResultForeign), "foreign")]
+[JsonDerivedType(typeof(CatalogSelectionResultWrongKind), "wrong-kind")]
+[JsonDerivedType(typeof(CatalogSelectionResultNegotiationRefused), "negotiation-refused")]
+[JsonDerivedType(typeof(CatalogSelectionResultInvalidRequest), "invalid-request")]
+[JsonDerivedType(typeof(CatalogSelectionResultUnavailable), "unavailable")]
+public partial class CatalogSelectionResult
+{
+ /// The type discriminator.
+ [JsonPropertyName("kind")]
+ public virtual string Kind { get; set; } = string.Empty;
+}
+
+
+/// The chosen candidate was transferred into a fresh bounded single-use handle for a later explicit planning request.
+/// The selected variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class CatalogSelectionResultSelected : CatalogSelectionResult
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "selected";
+
+ /// Fresh single-use candidate handle accepted by mcp.planInstall. Returned only to the native host and never included in model-tool output.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MinLength(1)]
+ [MaxLength(256)]
+ [JsonPropertyName("candidateHandle")]
+ public required string CandidateHandle { get; set; }
+
+ /// The exact search identifier privately bound to the selected candidate.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MinLength(1)]
+ [MaxLength(64)]
+ [JsonPropertyName("searchId")]
+ public required string SearchId { get; set; }
+}
+
+/// The caller explicitly declined every candidate and the retained search state was released.
+/// The declined variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class CatalogSelectionResultDeclined : CatalogSelectionResult
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "declined";
+
+ /// The search identifier privately bound to the released selection group.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MinLength(1)]
+ [MaxLength(64)]
+ [JsonPropertyName("searchId")]
+ public required string SearchId { get; set; }
+}
+
+/// The caller cancelled the selection interaction and the retained search state was released.
+/// The cancelled variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class CatalogSelectionResultCancelled : CatalogSelectionResult
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "cancelled";
+
+ /// The search identifier privately bound to the released selection group.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MinLength(1)]
+ [MaxLength(64)]
+ [JsonPropertyName("searchId")]
+ public required string SearchId { get; set; }
+}
+
+/// The host declared that its live selection interaction timed out, and the retained search state was released.
+/// The timed-out variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class CatalogSelectionResultTimedOut : CatalogSelectionResult
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "timed-out";
+
+ /// The search identifier privately bound to the released selection group.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MinLength(1)]
+ [MaxLength(64)]
+ [JsonPropertyName("searchId")]
+ public required string SearchId { get; set; }
+}
+
+/// The selection reference was malformed or unknown.
+/// The invalid variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class CatalogSelectionResultInvalid : CatalogSelectionResult
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "invalid";
+
+ /// Human-readable explanation safe to surface. Never contains the presented reference or private candidate state.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MaxLength(1000)]
+ [JsonPropertyName("message")]
+ public required string Message { get; set; }
+}
+
+/// The runtime-enforced selection reference lifetime elapsed before the request arrived.
+/// The stale variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class CatalogSelectionResultStale : CatalogSelectionResult
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "stale";
+
+ /// Human-readable explanation safe to surface. Never contains the presented reference or private candidate state.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MaxLength(1000)]
+ [JsonPropertyName("message")]
+ public required string Message { get; set; }
+}
+
+/// The selection group was already terminated or its pending host hand-off was already claimed.
+/// The replayed variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class CatalogSelectionResultReplayed : CatalogSelectionResult
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "replayed";
+
+ /// Human-readable explanation safe to surface. Never contains the presented reference or private candidate state.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MaxLength(1000)]
+ [JsonPropertyName("message")]
+ public required string Message { get; set; }
+}
+
+/// The selection reference belongs to another runtime instance or session.
+/// The foreign variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class CatalogSelectionResultForeign : CatalogSelectionResult
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "foreign";
+
+ /// Human-readable explanation safe to surface. Never contains the presented reference or private candidate state.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MaxLength(1000)]
+ [JsonPropertyName("message")]
+ public required string Message { get; set; }
+}
+
+/// The presented opaque handle was issued for another catalog operation.
+/// The wrong-kind variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class CatalogSelectionResultWrongKind : CatalogSelectionResult
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "wrong-kind";
+
+ /// Human-readable explanation safe to surface. Never contains the presented reference or private candidate state.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MaxLength(1000)]
+ [JsonPropertyName("message")]
+ public required string Message { get; set; }
+}
+
+/// The caller's protocol version or required capabilities cannot be honoured. Returned instead of a partial or ambiguous success.
+/// The negotiation-refused variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class CatalogSelectionResultNegotiationRefused : CatalogSelectionResult
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "negotiation-refused";
+
+ /// Human-readable explanation, safe to surface. Never contains a query, URL, handle, or secret.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MaxLength(1000)]
+ [JsonPropertyName("message")]
+ public required string Message { get; set; }
+
+ /// Lowest caller protocol version this runtime will serve.
+ [JsonPropertyName("minimumSupportedProtocolVersion")]
+ public required long MinimumSupportedProtocolVersion { get; set; }
+
+ /// Whether the version or the capability set was the problem.
+ [JsonPropertyName("reason")]
+ public required CatalogNegotiationRefusedReason Reason { get; set; }
+
+ /// Protocol version of the runtime that refused the request.
+ [JsonPropertyName("runtimeProtocolVersion")]
+ public required long RuntimeProtocolVersion { get; set; }
+
+ /// Capabilities this runtime can safely advertise to this caller. The complete five-capability protocol-3 legacy set is always present; every capability added after that baseline appears only when the caller required it, so an older closed-enum decoder can still consume a refusal. This list does not imply that every deployment has enabled every operation.
+ [JsonPropertyName("supportedCapabilities")]
+ public required IList SupportedCapabilities { get; set; }
+
+ /// The subset of the caller's bounded extensible capability identifiers this runtime cannot honour.
+ [JsonPropertyName("unsupportedCapabilities")]
+ public required IList UnsupportedCapabilities { get; set; }
+}
+
+/// The request was rejected because a bounded field fell outside its permitted range or a required field was unusable. Pagination may also be rejected by the authority after a continuation request; repeat the search without page.
+/// The invalid-request variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class CatalogSelectionResultInvalidRequest : CatalogSelectionResult
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "invalid-request";
+
+ /// Which request field was rejected.
+ [JsonPropertyName("field")]
+ public required CatalogInvalidRequestField Field { get; set; }
+
+ /// Human-readable explanation, safe to surface. Never echoes the offending value, nor a query, URL, handle, or secret.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MaxLength(1000)]
+ [JsonPropertyName("message")]
+ public required string Message { get; set; }
+}
+
+/// The operation is not available on this runtime. Distinct from a network failure: nothing was attempted.
+/// The unavailable variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class CatalogSelectionResultUnavailable : CatalogSelectionResult
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "unavailable";
+
+ /// Human-readable explanation, safe to surface. Never contains a query, URL, handle, or secret.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MaxLength(1000)]
+ [JsonPropertyName("message")]
+ public required string Message { get; set; }
+
+ /// Why the operation is unavailable.
+ [JsonPropertyName("reason")]
+ public required CatalogUnavailableReason Reason { get; set; }
+}
+
+/// Terminates one retained catalog selection group through an opaque reference previously returned by the model-safe search projection.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class CatalogSelectionRequest
+{
+ /// Protocol version and capabilities the caller requires.
+ [JsonPropertyName("contract")]
+ public CatalogClientContract Contract { get => field ??= new(); set; }
+
+ /// The terminal outcome declared by the caller. Timed-out means the host's live interaction deadline elapsed; a reference whose runtime TTL elapsed is rejected separately as stale.
+ [JsonPropertyName("outcome")]
+ public CatalogSelectionDecision Outcome { get; set; }
+
+ /// Opaque runtime-instance scoped reference to one visible candidate. For a non-selected outcome, any candidate reference from the same search closes that search's retained group.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MinLength(1)]
+ [MaxLength(256)]
+ [JsonPropertyName("selectionRef")]
+ public string SelectionRef { get; set; } = string.Empty;
+
+ /// Locally owned root session whose retained search state is being resolved.
+ [UnconditionalSuppressMessage("Trimming", "IL2026", Justification = "Safe for generated string properties: JSON Schema minLength/maxLength map to string length validation, not reflection over trimmed Count members")]
+ [MinLength(1)]
+ [MaxLength(256)]
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
/// Information about an installed plugin tracked in global state.
[Experimental(Diagnostics.Experimental)]
public sealed class InstalledPluginInfo
@@ -3162,10 +3623,22 @@ public sealed class InstalledPluginInfo
[JsonPropertyName("enabled")]
public bool Enabled { get; set; }
+ /// Whether the managed desired plugin currently has an installed or live record. Set to false for a managed desired entry retained in the listing after installation or reconciliation failed.
+ [JsonPropertyName("installed")]
+ public bool? Installed { get; set; }
+
/// Absolute path of the marketplace directory a live plugin was resolved from. Present only on live, never-persisted records — a plugin belonging to a directory/local marketplace, which is loaded from its real directory on every pass instead of a copy under the installed-plugins cache. Its presence is what marks a listed plugin as live: such a plugin is always present on disk, so `enabled` is its only meaningful state and it is never "not installed".
[JsonPropertyName("installedFrom")]
public string? InstalledFrom { get; set; }
+ /// Whether enterprise managed settings control this plugin's enabled state.
+ [JsonPropertyName("managed")]
+ public bool? Managed { get; set; }
+
+ /// The enabled state required by enterprise managed settings, when this plugin spec is managed.
+ [JsonPropertyName("managedDesiredEnabled")]
+ public bool? ManagedDesiredEnabled { get; set; }
+
/// Marketplace the plugin came from. Empty string ("") for direct repo / URL / local installs.
[JsonPropertyName("marketplace")]
public string Marketplace { get; set; } = string.Empty;
@@ -3350,10 +3823,18 @@ internal sealed class PluginsBuiltinSetRequest
[Experimental(Diagnostics.Experimental)]
public sealed class MarketplaceInfo
{
+ /// Whether the managed marketplace currently resolved into the runtime marketplace registry. Set to false when the desired managed entry is retained for governance visibility after loading or reconciliation failed.
+ [JsonPropertyName("available")]
+ public bool? Available { get; set; }
+
/// True when this is a default marketplace shipped with the runtime. Defaults are not removable.
[JsonPropertyName("isDefault")]
public bool? IsDefault { get; set; }
+ /// Whether enterprise managed settings provide and control this marketplace entry.
+ [JsonPropertyName("managed")]
+ public bool? Managed { get; set; }
+
/// Marketplace name (matches the @marketplace suffix in plugin specs).
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
@@ -4026,7 +4507,7 @@ public sealed class SessionFsSetProviderCapabilities
public bool? Sqlite { get; set; }
}
-/// Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider.
+/// Initial working directory, session-state path layout, and path conventions used to register the calling SDK client as the session filesystem provider. A registered provider is authoritative for path interpretation and filesystem facts used by workspace permission validation. Paths are interpreted lexically; home-relative paths (`~` and `~/...`) and Windows drive-relative paths such as `C:foo` are unsupported. Until provider-side canonicalization is supported, providers must not expose symlinks inside allowed roots that escape those roots.
[Experimental(Diagnostics.Experimental)]
internal sealed class SessionFsSetProviderRequest
{
@@ -4038,7 +4519,7 @@ internal sealed class SessionFsSetProviderRequest
[JsonPropertyName("conventions")]
public SessionFsSetProviderConventions Conventions { get; set; }
- /// Initial working directory for sessions.
+ /// Absolute initial working directory for sessions. Registering the provider establishes this path as the root of its virtual namespace; the runtime does not require the provider to materialize or stat it before creating a session.
[JsonPropertyName("initialCwd")]
public string InitialCwd { get; set; } = string.Empty;
@@ -7893,21 +8374,1115 @@ public sealed class FactoryAgentOptions
public JsonElement? Schema { get; set; }
}
-/// Parameters for one factory-scoped subagent call.
+/// Parameters for one factory-scoped subagent call.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class FactoryAgentRequest
+{
+ /// Opaque token identifying the current factory execution attempt.
+ [JsonPropertyName("executionToken")]
+ public string ExecutionToken { get; set; } = string.Empty;
+
+ /// Factory run identifier that owns the subagent.
+ [JsonPropertyName("factoryRunId")]
+ public string FactoryRunId { get; set; } = string.Empty;
+
+ /// Subagent execution options.
+ [JsonPropertyName("opts")]
+ public FactoryAgentOptions Opts { get => field ??= new(); set; }
+
+ /// Prompt to send to the subagent.
+ [JsonPropertyName("prompt")]
+ public string Prompt { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Result of reading a factory journal entry.
+[Experimental(Diagnostics.Experimental)]
+public sealed class FactoryJournalGetResult
+{
+ /// Whether the journal contained the requested key.
+ [JsonPropertyName("hit")]
+ public bool Hit { get; set; }
+
+ /// Cached JSON result. The hit field distinguishes a cached JSON null from a miss.
+ [JsonPropertyName("resultJson")]
+ public JsonElement? ResultJson { get; set; }
+}
+
+/// Parameters for reading a factory journal entry.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class FactoryJournalGetRequest
+{
+ /// Opaque token identifying the current factory execution attempt.
+ [JsonPropertyName("executionToken")]
+ public string ExecutionToken { get; set; } = string.Empty;
+
+ /// Namespaced journal key.
+ [JsonPropertyName("key")]
+ public string Key { get; set; } = string.Empty;
+
+ /// Factory run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Parameters for storing a factory journal entry.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class FactoryJournalPutRequest
+{
+ /// Opaque token identifying the current factory execution attempt.
+ [JsonPropertyName("executionToken")]
+ public string ExecutionToken { get; set; } = string.Empty;
+
+ /// Namespaced journal key.
+ [JsonPropertyName("key")]
+ public string Key { get; set; } = string.Empty;
+
+ /// JSON result to memoize.
+ [JsonPropertyName("resultJson")]
+ public JsonElement ResultJson { get; set; }
+
+ /// Factory run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Machine-readable workflow run failure.
+/// Polymorphic base type discriminated by type.
+[Experimental(Diagnostics.Experimental)]
+[JsonPolymorphic(
+ TypeDiscriminatorPropertyName = "type",
+ UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
+[JsonDerivedType(typeof(WorkflowRunFailureWorkflowLimitReached), "workflow_limit_reached")]
+[JsonDerivedType(typeof(WorkflowRunFailureWorkflowResumeDeclined), "workflow_resume_declined")]
+[JsonDerivedType(typeof(WorkflowRunFailureWorkflowDurableFailure), "workflow_durable_failure")]
+[JsonDerivedType(typeof(WorkflowRunFailureWorkflowAccountingIncomplete), "workflow_accounting_incomplete")]
+[JsonDerivedType(typeof(WorkflowRunFailureWorkflowProviderDisconnected), "workflow_provider_disconnected")]
+public partial class WorkflowRunFailure
+{
+ /// The type discriminator.
+ [JsonPropertyName("type")]
+ public virtual string Type { get; set; } = string.Empty;
+}
+
+
+/// The workflow_limit_reached variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class WorkflowRunFailureWorkflowLimitReached : WorkflowRunFailure
+{
+ ///
+ [JsonIgnore]
+ public override string Type => "workflow_limit_reached";
+
+ /// Resource ceiling that stopped the run.
+ [JsonPropertyName("kind")]
+ public required WorkflowRunFailureKind Kind { get; set; }
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public required string RunId { get; set; }
+
+ /// Suggested larger ceiling when the runtime can derive one safely.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("suggestedValue")]
+ public double? SuggestedValue { get; set; }
+
+ /// Approved effective ceiling that was reached.
+ [JsonPropertyName("value")]
+ public required double Value { get; set; }
+}
+
+/// The workflow_resume_declined variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class WorkflowRunFailureWorkflowResumeDeclined : WorkflowRunFailure
+{
+ ///
+ [JsonIgnore]
+ public override string Type => "workflow_resume_declined";
+
+ /// Human-readable reason the resume did not proceed.
+ [JsonPropertyName("reason")]
+ public required string Reason { get; set; }
+
+ /// Workflow run identifier whose changed limits were declined.
+ [JsonPropertyName("runId")]
+ public required string RunId { get; set; }
+}
+
+/// The workflow_durable_failure variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class WorkflowRunFailureWorkflowDurableFailure : WorkflowRunFailure
+{
+ ///
+ [JsonIgnore]
+ public override string Type => "workflow_durable_failure";
+
+ /// Stable failure code.
+ [JsonPropertyName("code")]
+ public required string Code { get; set; }
+
+ /// Execution-critical durable operation that failed.
+ [JsonPropertyName("operation")]
+ public required WorkflowDurableOperation Operation { get; set; }
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public required string RunId { get; set; }
+}
+
+/// The run stopped because its usage accounting could not be completed.
+/// The workflow_accounting_incomplete variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class WorkflowRunFailureWorkflowAccountingIncomplete : WorkflowRunFailure
+{
+ ///
+ [JsonIgnore]
+ public override string Type => "workflow_accounting_incomplete";
+
+ /// Confirmed usage in nano-AIU, representing the floor of what the run spent.
+ [JsonPropertyName("drainedNanoAiu")]
+ public required long DrainedNanoAiu { get; set; }
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public required string RunId { get; set; }
+}
+
+/// The extension that owns the workflow disconnected while the run was executing, so the host halted it. The run's journaled subagent results are preserved so a resume can reuse them.
+/// The workflow_provider_disconnected variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class WorkflowRunFailureWorkflowProviderDisconnected : WorkflowRunFailure
+{
+ ///
+ [JsonIgnore]
+ public override string Type => "workflow_provider_disconnected";
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public required string RunId { get; set; }
+}
+
+/// Durable metadata describing who initiated a workflow pause.
+/// Polymorphic base type discriminated by type.
+[Experimental(Diagnostics.Experimental)]
+[JsonPolymorphic(
+ TypeDiscriminatorPropertyName = "type",
+ UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
+[JsonDerivedType(typeof(WorkflowPauseInfoUser), "user")]
+[JsonDerivedType(typeof(WorkflowPauseInfoCheckpoint), "checkpoint")]
+public partial class WorkflowPauseInfo
+{
+ /// The type discriminator.
+ [JsonPropertyName("type")]
+ public virtual string Type { get; set; } = string.Empty;
+}
+
+
+/// The user variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class WorkflowPauseInfoUser : WorkflowPauseInfo
+{
+ ///
+ [JsonIgnore]
+ public override string Type => "user";
+}
+
+/// The checkpoint variant of .
+[Experimental(Diagnostics.Experimental)]
+public partial class WorkflowPauseInfoCheckpoint : WorkflowPauseInfo
+{
+ ///
+ [JsonIgnore]
+ public override string Type => "checkpoint";
+
+ /// Stable author-defined checkpoint key that initiated the pause.
+ [JsonPropertyName("key")]
+ public required string Key { get; set; }
+}
+
+/// Complete current or terminal workflow run envelope.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowRunResult
+{
+ /// One-based execution attempt represented by this envelope. Absent before the first attempt starts or when returned by an older runtime.
+ [JsonPropertyName("attempt")]
+ public long? Attempt { get; set; }
+
+ /// Error message for an errored run.
+ [JsonPropertyName("error")]
+ public string? Error { get; set; }
+
+ /// Machine-readable failure details for a halted or errored run.
+ [JsonPropertyName("failure")]
+ public WorkflowRunFailure? Failure { get; set; }
+
+ /// Structured pause initiator metadata for a paused attempt.
+ [JsonPropertyName("pauseInfo")]
+ public WorkflowPauseInfo? PauseInfo { get; set; }
+
+ /// Reason for a halted or cancelled run.
+ [JsonPropertyName("reason")]
+ public string? Reason { get; set; }
+
+ /// Completed workflow result.
+ [JsonPropertyName("result")]
+ public JsonElement? Result { get; set; }
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Partial journal and progress snapshot for a halted, cancelled, or errored run.
+ [JsonPropertyName("snapshot")]
+ public JsonElement? Snapshot { get; set; }
+
+ /// Current or terminal workflow run status.
+ [JsonPropertyName("status")]
+ public WorkflowRunStatus Status { get; set; }
+}
+
+/// Wire-only per-invocation workflow resource ceiling overrides.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowRunLimits
+{
+ /// Maximum AI credits consumed by workflow subagents and their descendants. The post-paid ceiling is soft: parallel turns can settle beyond it before the run stops.
+ [JsonPropertyName("maxAiCredits")]
+ public double? MaxAiCredits { get; set; }
+
+ /// Maximum number of workflow subagents that may run concurrently.
+ [JsonPropertyName("maxConcurrentSubagents")]
+ public long? MaxConcurrentSubagents { get; set; }
+
+ /// Maximum total number of workflow subagents that may be admitted.
+ [JsonPropertyName("maxTotalSubagents")]
+ public long? MaxTotalSubagents { get; set; }
+
+ /// Maximum accumulated active-execution time in seconds. Active execution includes the entire extension body, subprocess waits, queued-agent waits, and sleeps; time between resumed attempts is not counted.
+ [JsonPropertyName("timeoutSeconds")]
+ public double? TimeoutSeconds { get; set; }
+}
+
+/// Options controlling workflow invocation.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowRunOptions
+{
+ /// Per-invocation resource ceiling overrides.
+ [JsonPropertyName("limits")]
+ public WorkflowRunLimits? Limits { get; set; }
+
+ /// Whether to emit workflow phase names to the session transcript.
+ [JsonPropertyName("logPhaseNames")]
+ public bool? LogPhaseNames { get; set; }
+
+ /// Whether to notify the originating session when the workflow completes.
+ [JsonPropertyName("notifyOnComplete")]
+ public bool? NotifyOnComplete { get; set; }
+
+ /// Run identifier whose journal and progress should seed this resumed run.
+ [JsonPropertyName("resumeFromRunId")]
+ public string? ResumeFromRunId { get; set; }
+}
+
+/// Parameters for invoking a registered workflow.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class WorkflowRunRequest
+{
+ /// Workflow input value.
+ [JsonPropertyName("args")]
+ public JsonElement Args { get; set; }
+
+ /// Registered workflow name.
+ [JsonPropertyName("name")]
+ public string Name { get; set; } = string.Empty;
+
+ /// Workflow invocation options.
+ [JsonPropertyName("options")]
+ public WorkflowRunOptions? Options { get; set; }
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Resolved persisted workflow identity and resumed run envelope.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowResumeResult
+{
+ /// Terminal resumed run envelope.
+ [JsonPropertyName("run")]
+ public WorkflowRunResult Run { get => field ??= new(); set; }
+
+ /// Persisted workflow name resolved for the resumed run.
+ [JsonPropertyName("workflowName")]
+ public string WorkflowName { get; set; } = string.Empty;
+}
+
+/// Parameters for resuming a workflow run from its persisted identity.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class WorkflowResumeRequest
+{
+ /// Optional per-invocation resource ceiling overrides.
+ [JsonPropertyName("limits")]
+ public WorkflowRunLimits? Limits { get; set; }
+
+ /// Whether to emit workflow phase names to the session transcript.
+ [JsonPropertyName("logPhaseNames")]
+ public bool? LogPhaseNames { get; set; }
+
+ /// Whether to notify the originating session when the workflow completes.
+ [JsonPropertyName("notifyOnComplete")]
+ public bool? NotifyOnComplete { get; set; }
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Options for an internal tool-originated workflow invocation.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class WorkflowToolRunOptions
+{
+ /// Per-invocation resource ceiling overrides.
+ [JsonPropertyName("limits")]
+ public WorkflowRunLimits? Limits { get; set; }
+
+ /// Run identifier whose journal and progress should seed this resumed run.
+ [JsonPropertyName("resumeFromRunId")]
+ public string? ResumeFromRunId { get; set; }
+}
+
+/// Internal parameters for invoking a registered workflow from a tool.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class WorkflowToolRunRequest
+{
+ /// Workflow input value.
+ [JsonPropertyName("args")]
+ public JsonElement Args { get; set; }
+
+ /// Registered workflow name.
+ [JsonPropertyName("name")]
+ public string Name { get; set; } = string.Empty;
+
+ /// Tool-originated workflow invocation options.
+ [JsonPropertyName("options")]
+ public WorkflowToolRunOptions? Options { get; set; }
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+
+ /// Opaque identifier of the originating tool call.
+ [JsonPropertyName("toolCallId")]
+ public string? ToolCallId { get; set; }
+}
+
+/// Internal parameters for resuming a workflow run from a tool.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class WorkflowToolResumeRequest
+{
+ /// Optional per-invocation resource ceiling overrides.
+ [JsonPropertyName("limits")]
+ public WorkflowRunLimits? Limits { get; set; }
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+
+ /// Opaque identifier of the originating tool call.
+ [JsonPropertyName("toolCallId")]
+ public string? ToolCallId { get; set; }
+}
+
+/// Parameters for retrieving a workflow run.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class WorkflowGetRunRequest
+{
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Declared or approved workflow resource ceilings.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowDeclaredLimits
+{
+ /// Maximum AI credits consumed by subagents and descendants.
+ [JsonPropertyName("maxAiCredits")]
+ public double? MaxAiCredits { get; set; }
+
+ /// Maximum concurrently active subagents.
+ [JsonPropertyName("maxConcurrentSubagents")]
+ public long? MaxConcurrentSubagents { get; set; }
+
+ /// Maximum total subagents spawned by the run.
+ [JsonPropertyName("maxTotalSubagents")]
+ public long? MaxTotalSubagents { get; set; }
+
+ /// Maximum accumulated active execution time in seconds.
+ [JsonPropertyName("timeoutSeconds")]
+ public double? TimeoutSeconds { get; set; }
+}
+
+/// Durable workflow resource consumption.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowRunConsumed
+{
+ /// Accumulated active execution time in milliseconds.
+ [JsonPropertyName("activeMs")]
+ public long ActiveMs { get; set; }
+
+ /// AI usage consumed by the run in nano-AIU.
+ [JsonPropertyName("nanoAiu")]
+ public long NanoAiu { get; set; }
+
+ /// Total subagents spawned by the run.
+ [JsonPropertyName("subagents")]
+ public long Subagents { get; set; }
+}
+
+/// Current workflow phase identity.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowCurrentPhase
+{
+ /// Current phase identifier.
+ [JsonPropertyName("id")]
+ public string Id { get; set; } = string.Empty;
+
+ /// Zero-based declared phase ordinal, or null for an undeclared phase.
+ [JsonPropertyName("ordinal")]
+ public long? Ordinal { get; set; }
+}
+
+/// Prompt-safe terminal workflow outcome.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowRunTerminal
+{
+ /// Human-readable terminal error.
+ [JsonPropertyName("error")]
+ public string? Error { get; set; }
+
+ /// Machine-readable terminal failure.
+ [JsonPropertyName("failure")]
+ public WorkflowRunFailure? Failure { get; set; }
+
+ /// Pause initiator metadata, or null when the run did not pause.
+ [JsonPropertyName("pauseInfo")]
+ public WorkflowPauseInfo? PauseInfo { get; set; }
+
+ /// Human-readable terminal reason.
+ [JsonPropertyName("reason")]
+ public string? Reason { get; set; }
+
+ /// Prompt-safe preview of the completed result.
+ [JsonPropertyName("resultPreview")]
+ public string? ResultPreview { get; set; }
+}
+
+/// Durable workflow run summary with read-time live overlays.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowRunSummary
+{
+ /// Epoch milliseconds when the current active segment started, or null while inactive.
+ [JsonPropertyName("activeSegmentStartedAt")]
+ public long? ActiveSegmentStartedAt { get; set; }
+
+ /// Approved effective resource ceilings, or null until approved.
+ [JsonPropertyName("approved")]
+ public WorkflowDeclaredLimits? Approved { get; set; }
+
+ /// Whether the durable run state currently passes runtime resume eligibility checks.
+ [JsonPropertyName("canResume")]
+ public bool CanResume { get; set; }
+
+ /// Epoch milliseconds when the run completed, or null while nonterminal.
+ [JsonPropertyName("completedAt")]
+ public long? CompletedAt { get; set; }
+
+ /// Durable resource consumption.
+ [JsonPropertyName("consumed")]
+ public WorkflowRunConsumed Consumed { get => field ??= new(); set; }
+
+ /// Epoch milliseconds when the run was created.
+ [JsonPropertyName("createdAt")]
+ public long CreatedAt { get; set; }
+
+ /// Current phase identity, or null before any phase is entered.
+ [JsonPropertyName("currentPhase")]
+ public WorkflowCurrentPhase? CurrentPhase { get; set; }
+
+ /// Resource ceilings declared by the workflow.
+ [JsonPropertyName("declaredLimits")]
+ public WorkflowDeclaredLimits DeclaredLimits { get => field ??= new(); set; }
+
+ /// Number of phases declared by the workflow.
+ [JsonPropertyName("declaredPhaseCount")]
+ public long DeclaredPhaseCount { get; set; }
+
+ /// Human-readable workflow description.
+ [JsonPropertyName("description")]
+ public string Description { get; set; } = string.Empty;
+
+ /// Number of direct workflow agents currently live.
+ [JsonPropertyName("liveAgentCount")]
+ public long LiveAgentCount { get; set; }
+
+ /// Epoch milliseconds when this live-overlay snapshot was observed.
+ [JsonPropertyName("observedAt")]
+ public long ObservedAt { get; set; }
+
+ /// Monotonic durable run revision.
+ [JsonPropertyName("revision")]
+ public long Revision { get; set; }
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Epoch milliseconds when execution first started, or null before start.
+ [JsonPropertyName("startedAt")]
+ public long? StartedAt { get; set; }
+
+ /// Current workflow run status.
+ [JsonPropertyName("status")]
+ public WorkflowRunStatus Status { get; set; }
+
+ /// Terminal run outcome, or null while nonterminal.
+ [JsonPropertyName("terminal")]
+ public WorkflowRunTerminal? Terminal { get; set; }
+
+ /// Total direct workflow agents spawned across all attempts.
+ [JsonPropertyName("totalSpawnedAgentCount")]
+ public long TotalSpawnedAgentCount { get; set; }
+
+ /// Epoch milliseconds when the durable run was last updated.
+ [JsonPropertyName("updatedAt")]
+ public long UpdatedAt { get; set; }
+
+ /// Registered workflow name.
+ [JsonPropertyName("workflowName")]
+ public string WorkflowName { get; set; } = string.Empty;
+}
+
+/// A page of workflow runs in durable creation order.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowListRunsResult
+{
+ /// Whether terminal runs newer than this page exist.
+ [JsonPropertyName("hasMoreNewer")]
+ public bool? HasMoreNewer { get; set; }
+
+ /// Newest terminal-run cursor in this page, or null when the terminal window is empty.
+ [JsonPropertyName("newestSeq")]
+ public long? NewestSeq { get; set; }
+
+ /// Oldest terminal-run cursor in this page, or null when the terminal window is empty.
+ [JsonPropertyName("oldestSeq")]
+ public long? OldestSeq { get; set; }
+
+ /// Number of terminal runs older than this page.
+ [JsonPropertyName("omittedOlder")]
+ public long? OmittedOlder { get; set; }
+
+ /// Workflow run summaries in durable creation order.
+ [JsonPropertyName("runs")]
+ public IList Runs { get => field ??= []; set; }
+}
+
+/// Parameters for paging workflow runs.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class WorkflowListRunsRequest
+{
+ /// Exclusive forward cursor.
+ [JsonPropertyName("afterSeq")]
+ public long? AfterSeq { get; set; }
+
+ /// Exclusive backward cursor.
+ [JsonPropertyName("beforeSeq")]
+ public long? BeforeSeq { get; set; }
+
+ /// Maximum terminal runs to return. Defaults to 200 and is capped at 500.
+ [JsonPropertyName("limit")]
+ public int? Limit { get; set; }
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Prompt-safe durable identity and live status for a direct workflow agent.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowAgentSummary
+{
+ /// Accumulated active agent time in milliseconds.
+ [JsonPropertyName("activeMs")]
+ public long ActiveMs { get; set; }
+
+ /// Prompt-safe live activity text.
+ [JsonPropertyName("activity")]
+ public string? Activity { get; set; }
+
+ /// Stable direct-agent identifier.
+ [JsonPropertyName("agentId")]
+ public string AgentId { get; set; } = string.Empty;
+
+ /// Registered agent type.
+ [JsonPropertyName("agentType")]
+ public string AgentType { get; set; } = string.Empty;
+
+ /// Epoch milliseconds when the agent completed.
+ [JsonPropertyName("completedAt")]
+ public long? CompletedAt { get; set; }
+
+ /// Friendly, non-unique name intended for display.
+ [JsonPropertyName("displayName")]
+ public string? DisplayName { get; set; }
+
+ /// Friendly, non-unique name intended for display.
+ [JsonPropertyName("label")]
+ public string Label { get; set; } = string.Empty;
+
+ /// Phase identifier active when the agent was launched, or null.
+ [JsonPropertyName("phaseId")]
+ public string? PhaseId { get; set; }
+
+ /// Model requested when the agent was launched.
+ [JsonPropertyName("requestedModel")]
+ public string? RequestedModel { get; set; }
+
+ /// Concrete model resolved for the agent.
+ [JsonPropertyName("resolvedModel")]
+ public string? ResolvedModel { get; set; }
+
+ /// Owning workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Epoch milliseconds when the agent started.
+ [JsonPropertyName("startedAt")]
+ public long? StartedAt { get; set; }
+
+ /// Current durable or live agent status.
+ [JsonPropertyName("status")]
+ public string Status { get; set; } = string.Empty;
+
+ /// Tool-call identifier that launched the agent.
+ [JsonPropertyName("toolCallId")]
+ public string ToolCallId { get; set; } = string.Empty;
+}
+
+/// Durable lifecycle and timing for one workflow phase.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowPhaseObservation
+{
+ /// Completed active time accumulated by this phase in milliseconds.
+ [JsonPropertyName("accumulatedActiveMs")]
+ public long AccumulatedActiveMs { get; set; }
+
+ /// Epoch milliseconds when this phase completed; for a skipped phase, the synthetic skip timestamp (equal to `startedAt`).
+ [JsonPropertyName("completedAt")]
+ public long? CompletedAt { get; set; }
+
+ /// Current live active time for this phase in milliseconds.
+ [JsonPropertyName("currentActiveMs")]
+ public long CurrentActiveMs { get; set; }
+
+ /// Optional human-readable phase detail.
+ [JsonPropertyName("detail")]
+ public string? Detail { get; set; }
+
+ /// Number of times execution entered this phase.
+ [JsonPropertyName("entryCount")]
+ public long EntryCount { get; set; }
+
+ /// Phase identifier.
+ [JsonPropertyName("id")]
+ public string Id { get; set; } = string.Empty;
+
+ /// Most recent run attempt that entered this phase, or `0` if the phase has never been entered.
+ [JsonPropertyName("lastEnteredRunAttempt")]
+ public long LastEnteredRunAttempt { get; set; }
+
+ /// Direct agents in this phase that are currently live.
+ [JsonPropertyName("liveAgentCount")]
+ public long LiveAgentCount { get; set; }
+
+ /// Zero-based declared phase ordinal, or null for an undeclared phase.
+ [JsonPropertyName("ordinal")]
+ public long? Ordinal { get; set; }
+
+ /// Epoch milliseconds when this phase first started; for a skipped phase, the synthetic skip timestamp (equal to `completedAt`).
+ [JsonPropertyName("startedAt")]
+ public long? StartedAt { get; set; }
+
+ /// Derived lifecycle state of the phase.
+ [JsonPropertyName("status")]
+ public WorkflowPhaseStatus Status { get; set; }
+
+ /// Human-readable phase title.
+ [JsonPropertyName("title")]
+ public string Title { get; set; } = string.Empty;
+
+ /// Total direct agents associated with this phase.
+ [JsonPropertyName("totalAgentCount")]
+ public long TotalAgentCount { get; set; }
+}
+
+/// One durable workflow progress record.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowProgressLine
+{
+ /// Resume attempt that emitted this record.
+ [JsonPropertyName("attempt")]
+ public long Attempt { get; set; }
+
+ /// Progress record kind.
+ [JsonPropertyName("kind")]
+ public WorkflowLogLineKind Kind { get; set; }
+
+ /// Phase active when the record was emitted, or null before any phase.
+ [JsonPropertyName("phaseId")]
+ public string? PhaseId { get; set; }
+
+ /// Epoch milliseconds when the record was persisted.
+ [JsonPropertyName("recordedAt")]
+ public long RecordedAt { get; set; }
+
+ /// Global monotonic sequence number within the run.
+ [JsonPropertyName("seq")]
+ public long Seq { get; set; }
+
+ /// Prompt-safe progress text.
+ [JsonPropertyName("text")]
+ public string Text { get; set; } = string.Empty;
+}
+
+/// A bidirectional page of workflow progress.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowProgressPage
+{
+ /// Whether progress records newer than this page exist.
+ [JsonPropertyName("hasMoreNewer")]
+ public bool HasMoreNewer { get; set; }
+
+ /// Whether progress records older than this page exist.
+ [JsonPropertyName("hasMoreOlder")]
+ public bool HasMoreOlder { get; set; }
+
+ /// Newest sequence number in this page, or null when empty.
+ [JsonPropertyName("newestSeq")]
+ public long? NewestSeq { get; set; }
+
+ /// Oldest sequence number in this page, or null when empty.
+ [JsonPropertyName("oldestSeq")]
+ public long? OldestSeq { get; set; }
+
+ /// Progress records in sequence order.
+ [JsonPropertyName("records")]
+ public IList Records { get => field ??= []; set; }
+
+ /// Run revision reflected by this page.
+ [JsonPropertyName("revision")]
+ public long Revision { get; set; }
+}
+
+/// Full workflow run observability detail.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowRunDetail
+{
+ /// Epoch milliseconds when the current active segment started, or null while inactive.
+ [JsonPropertyName("activeSegmentStartedAt")]
+ public long? ActiveSegmentStartedAt { get; set; }
+
+ /// Durable identities and live statuses for direct workflow agents.
+ [JsonPropertyName("agents")]
+ public IList Agents { get => field ??= []; set; }
+
+ /// Approved effective resource ceilings, or null until approved.
+ [JsonPropertyName("approved")]
+ public WorkflowDeclaredLimits? Approved { get; set; }
+
+ /// Whether the durable run state currently passes runtime resume eligibility checks.
+ [JsonPropertyName("canResume")]
+ public bool CanResume { get; set; }
+
+ /// Epoch milliseconds when the run completed, or null while nonterminal.
+ [JsonPropertyName("completedAt")]
+ public long? CompletedAt { get; set; }
+
+ /// Durable resource consumption.
+ [JsonPropertyName("consumed")]
+ public WorkflowRunConsumed Consumed { get => field ??= new(); set; }
+
+ /// Epoch milliseconds when the run was created.
+ [JsonPropertyName("createdAt")]
+ public long CreatedAt { get; set; }
+
+ /// Current phase identity, or null before any phase is entered.
+ [JsonPropertyName("currentPhase")]
+ public WorkflowCurrentPhase? CurrentPhase { get; set; }
+
+ /// Resource ceilings declared by the workflow.
+ [JsonPropertyName("declaredLimits")]
+ public WorkflowDeclaredLimits DeclaredLimits { get => field ??= new(); set; }
+
+ /// Number of phases declared by the workflow.
+ [JsonPropertyName("declaredPhaseCount")]
+ public long DeclaredPhaseCount { get; set; }
+
+ /// Human-readable workflow description.
+ [JsonPropertyName("description")]
+ public string Description { get; set; } = string.Empty;
+
+ /// Number of direct workflow agents currently live.
+ [JsonPropertyName("liveAgentCount")]
+ public long LiveAgentCount { get; set; }
+
+ /// Epoch milliseconds when this live-overlay snapshot was observed.
+ [JsonPropertyName("observedAt")]
+ public long ObservedAt { get; set; }
+
+ /// Lifecycle and timing observations for each workflow phase.
+ [JsonPropertyName("phases")]
+ public IList Phases { get => field ??= []; set; }
+
+ /// Bidirectional page of durable workflow progress.
+ [JsonPropertyName("progress")]
+ public WorkflowProgressPage Progress { get => field ??= new(); set; }
+
+ /// Monotonic durable run revision.
+ [JsonPropertyName("revision")]
+ public long Revision { get; set; }
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Epoch milliseconds when execution first started, or null before start.
+ [JsonPropertyName("startedAt")]
+ public long? StartedAt { get; set; }
+
+ /// Current workflow run status.
+ [JsonPropertyName("status")]
+ public WorkflowRunStatus Status { get; set; }
+
+ /// Terminal run outcome, or null while nonterminal.
+ [JsonPropertyName("terminal")]
+ public WorkflowRunTerminal? Terminal { get; set; }
+
+ /// Total direct workflow agents spawned across all attempts.
+ [JsonPropertyName("totalSpawnedAgentCount")]
+ public long TotalSpawnedAgentCount { get; set; }
+
+ /// Epoch milliseconds when the durable run was last updated.
+ [JsonPropertyName("updatedAt")]
+ public long UpdatedAt { get; set; }
+
+ /// Registered workflow name.
+ [JsonPropertyName("workflowName")]
+ public string WorkflowName { get; set; } = string.Empty;
+}
+
+/// Parameters for paging workflow progress.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class WorkflowGetRunProgressRequest
+{
+ /// Exclusive forward cursor.
+ [JsonPropertyName("afterSeq")]
+ public long? AfterSeq { get; set; }
+
+ /// Exclusive backward cursor.
+ [JsonPropertyName("beforeSeq")]
+ public long? BeforeSeq { get; set; }
+
+ /// Maximum records to return. Defaults to 200 and is capped at 500.
+ [JsonPropertyName("limit")]
+ public int? Limit { get; set; }
+
+ /// Optional phase identifier used to scope records and cursors.
+ [JsonPropertyName("phaseId")]
+ public string? PhaseId { get; set; }
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Parameters for cancelling a workflow run.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class WorkflowCancelRequest
+{
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Parameters for pausing a running workflow.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class WorkflowPauseRequest
+{
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// RPC data type for SessionWorkflowPauseAtCheckpoint operations.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class SessionWorkflowPauseAtCheckpointResult
+{
+ /// Whether this execution attempt must pause or may continue.
+ [JsonPropertyName("action")]
+ public WorkflowPauseCheckpointAction Action { get; set; }
+}
+
+/// Parameters for an owned durable pause checkpoint.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class WorkflowPauseCheckpointRequest
+{
+ /// Opaque token identifying the execution attempt that reached the checkpoint.
+ [JsonPropertyName("executionToken")]
+ public string ExecutionToken { get; set; } = string.Empty;
+
+ /// Stable author-defined checkpoint key.
+ [JsonPropertyName("key")]
+ public string Key { get; set; } = string.Empty;
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Acknowledgement that a workflow request was accepted.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowAckResult
+{
+}
+
+/// One ordered workflow progress line.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowLogLine
+{
+ /// Progress line kind.
+ [JsonPropertyName("kind")]
+ public WorkflowLogLineKind Kind { get; set; }
+
+ /// Monotonic sequence number within the workflow run.
+ [JsonPropertyName("seq")]
+ public long Seq { get; set; }
+
+ /// Progress text.
+ [JsonPropertyName("text")]
+ public string Text { get; set; } = string.Empty;
+}
+
+/// Parameters for recording workflow progress.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class WorkflowLogRequest
+{
+ /// Opaque token identifying the current workflow execution attempt.
+ [JsonPropertyName("executionToken")]
+ public string ExecutionToken { get; set; } = string.Empty;
+
+ /// Ordered progress lines to append.
+ [JsonPropertyName("lines")]
+ public IList Lines { get => field ??= []; set; }
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Result of one workflow-scoped subagent call.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowAgentResult
+{
+ /// Agent result, omitted when the agent produced no result.
+ [JsonPropertyName("result")]
+ public JsonElement? Result { get; set; }
+}
+
+/// Options for one workflow-scoped subagent call.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowAgentOptions
+{
+ /// Optional built-in or custom agent name whose definition configures the subagent.
+ [JsonPropertyName("agent")]
+ public string? Agent { get; set; }
+
+ /// Optional context tier override for the subagent.
+ [JsonPropertyName("contextTier")]
+ public ContextTier? ContextTier { get; set; }
+
+ /// Optional label distinguishing otherwise identical memoized agent calls.
+ [JsonPropertyName("label")]
+ public string? Label { get; set; }
+
+ /// Optional model identifier for the subagent.
+ [JsonPropertyName("model")]
+ public string? Model { get; set; }
+
+ /// Optional reasoning effort override for the subagent.
+ [JsonPropertyName("reasoningEffort")]
+ public string? ReasoningEffort { get; set; }
+
+ /// Optional JSON Schema for structured agent output.
+ [JsonPropertyName("schema")]
+ public JsonElement? Schema { get; set; }
+}
+
+/// Parameters for one workflow-scoped subagent call.
[Experimental(Diagnostics.Experimental)]
-internal sealed class FactoryAgentRequest
+internal sealed class WorkflowAgentRequest
{
- /// Opaque token identifying the current factory execution attempt.
+ /// Opaque token identifying the current workflow execution attempt.
[JsonPropertyName("executionToken")]
public string ExecutionToken { get; set; } = string.Empty;
- /// Factory run identifier that owns the subagent.
- [JsonPropertyName("factoryRunId")]
- public string FactoryRunId { get; set; } = string.Empty;
-
/// Subagent execution options.
[JsonPropertyName("opts")]
- public FactoryAgentOptions Opts { get => field ??= new(); set; }
+ public WorkflowAgentOptions Opts { get => field ??= new(); set; }
/// Prompt to send to the subagent.
[JsonPropertyName("prompt")]
@@ -7916,11 +9491,15 @@ internal sealed class FactoryAgentRequest
/// Target session identifier.
[JsonPropertyName("sessionId")]
public string SessionId { get; set; } = string.Empty;
+
+ /// Workflow run identifier that owns the subagent.
+ [JsonPropertyName("workflowRunId")]
+ public string WorkflowRunId { get; set; } = string.Empty;
}
-/// Result of reading a factory journal entry.
+/// Result of reading a workflow journal entry.
[Experimental(Diagnostics.Experimental)]
-public sealed class FactoryJournalGetResult
+public sealed class WorkflowJournalGetResult
{
/// Whether the journal contained the requested key.
[JsonPropertyName("hit")]
@@ -7931,11 +9510,11 @@ public sealed class FactoryJournalGetResult
public JsonElement? ResultJson { get; set; }
}
-/// Parameters for reading a factory journal entry.
+/// Parameters for reading a workflow journal entry.
[Experimental(Diagnostics.Experimental)]
-internal sealed class FactoryJournalGetRequest
+internal sealed class WorkflowJournalGetRequest
{
- /// Opaque token identifying the current factory execution attempt.
+ /// Opaque token identifying the current workflow execution attempt.
[JsonPropertyName("executionToken")]
public string ExecutionToken { get; set; } = string.Empty;
@@ -7943,7 +9522,7 @@ internal sealed class FactoryJournalGetRequest
[JsonPropertyName("key")]
public string Key { get; set; } = string.Empty;
- /// Factory run identifier.
+ /// Workflow run identifier.
[JsonPropertyName("runId")]
public string RunId { get; set; } = string.Empty;
@@ -7952,11 +9531,11 @@ internal sealed class FactoryJournalGetRequest
public string SessionId { get; set; } = string.Empty;
}
-/// Parameters for storing a factory journal entry.
+/// Parameters for storing a workflow journal entry.
[Experimental(Diagnostics.Experimental)]
-internal sealed class FactoryJournalPutRequest
+internal sealed class WorkflowJournalPutRequest
{
- /// Opaque token identifying the current factory execution attempt.
+ /// Opaque token identifying the current workflow execution attempt.
[JsonPropertyName("executionToken")]
public string ExecutionToken { get; set; } = string.Empty;
@@ -7968,7 +9547,7 @@ internal sealed class FactoryJournalPutRequest
[JsonPropertyName("resultJson")]
public JsonElement ResultJson { get; set; }
- /// Factory run identifier.
+ /// Workflow run identifier.
[JsonPropertyName("runId")]
public string RunId { get; set; } = string.Empty;
@@ -8064,6 +9643,10 @@ public sealed class ModelSwitchToResult
[JsonPropertyName("persistenceError")]
public string? PersistenceError { get; set; }
+ /// Stable queue item identifier when this request was enqueued. Remains present if the item drains before the response is returned.
+ [JsonPropertyName("queueId")]
+ public string? QueueId { get; set; }
+
/// Lifecycle result for the requested switch.
[JsonPropertyName("status")]
public string? Status { get; set; }
@@ -8296,6 +9879,10 @@ internal sealed class ModelSwitchAutoTierRequest
[Experimental(Diagnostics.Experimental)]
internal sealed class ModelApplyStartupOverlayRequest
{
+ /// Effective default Auto routing preference from user and managed settings. Applies only to fresh sessions and never replaces a per-session selection.
+ [JsonPropertyName("autoTier")]
+ public AutoTier? AutoTier { get; set; }
+
/// Model explicitly selected by the CLI, when provided.
[JsonPropertyName("cliModel")]
public string? CliModel { get; set; }
@@ -12166,14 +13753,92 @@ internal sealed class McpResourcesListTemplatesRequest
public string SessionId { get; set; } = string.Empty;
}
+/// Enterprise managed-settings resolution: the effective managed settings the session applied and which channels contributed, so SDK clients can show users what is enterprise-managed. Fires whenever managed policy is (re)applied — at session start, on resume, and on account switch. This is an ephemeral live snapshot (delivered to subscribers but not persisted to the session event log), because at session start it resolves before `session.start` is emitted. Device values take precedence over server values, then the policy helper, per ordinary key, while permissions compose restrictively across device, server, policy-helper, and SDK-client layers. The account-scoped `getManagedSettings()` API does not include session-local client injection. Marked experimental while the managed-settings surface stabilizes.
+[Experimental(Diagnostics.Experimental)]
+public sealed class ManagedSettingsResolvedData
+{
+ /// Whether enterprise policy disables bypass-permissions ("yolo") mode for this session. Deny-wins across layers, and forced on when `failClosed` is true.
+ [JsonPropertyName("bypassPermissionsDisabled")]
+ public bool BypassPermissionsDisabled { get; set; }
+
+ /// Whether a session-local permissions layer injected by the SDK host was present.
+ [JsonPropertyName("clientManaged")]
+ public bool? ClientManaged { get; set; }
+
+ /// Whether an actual device MDM/plist/registry/file managed-settings layer was present.
+ [JsonPropertyName("deviceManaged")]
+ public bool DeviceManaged { get; set; }
+
+ /// Whether managed policy could not be determined (e.g. a failed server fetch) and the session fell back to the fail-closed restriction. When true, restrictions such as disabling bypass-permissions are enforced even though `settings` may be absent.
+ [JsonPropertyName("failClosed")]
+ public bool FailClosed { get; set; }
+
+ /// The setting keys under enterprise management in the effective managed settings (e.g. `model`, `enabledPlugins`, `permissions`). Empty when no managed settings are in force.
+ [JsonPropertyName("managedKeys")]
+ public IList ManagedKeys { get => field ??= []; set; }
+
+ /// Whether at least two managed sources supplied permission allowlists, so enforcement intersects them and the flattened settings payload omits `permissions.allow`.
+ [JsonPropertyName("permissionsAllowIntersected")]
+ public bool? PermissionsAllowIntersected { get; set; }
+
+ /// Whether the policy-helper managed-settings layer was present. The policy helper is the weakest channel: it fills keys no enterprise source set and can never replace one.
+ [JsonPropertyName("policyHelperManaged")]
+ public bool? PolicyHelperManaged { get; set; }
+
+ /// Whether the effective sandbox policy forces the sandbox on *only* because managed policy could not be determined, rather than because the policy requires it. Lets clients tell a user whose `--no-sandbox` was overridden that the sandbox stayed on as a fail-closed fallback, instead of attributing it to an administrator who set no such policy.
+ [JsonPropertyName("sandboxEnabledByUndeterminedPolicy")]
+ public bool? SandboxEnabledByUndeterminedPolicy { get; set; }
+
+ /// Whether the server (account/org) managed-settings layer was present.
+ [JsonPropertyName("serverManaged")]
+ public bool ServerManaged { get; set; }
+
+ /// The effective (resolved) managed settings values, so clients can render exactly what is enforced. Absent when no managed policy is in force.
+ [JsonPropertyName("settings")]
+ public JsonElement? Settings { get; set; }
+
+ /// Channel summary: `server`, `device`, `client`, or `policyHelper` when exactly one channel contributed; `mixed` when multiple channels contributed; otherwise `none`. Consult the per-channel booleans for exact provenance.
+ [JsonPropertyName("source")]
+ public ManagedSettingsResolvedSource Source { get; set; }
+}
+
+/// Identifies the target session.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class SessionManagedSettingsGetRequest
+{
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
/// Session plugin metadata, with name, marketplace, optional version, and enabled state.
[Experimental(Diagnostics.Experimental)]
public sealed class Plugin
{
+ /// Opaque stable identity for a direct plugin source.
+ [JsonPropertyName("directSourceId")]
+ public string? DirectSourceId { get; set; }
+
/// Whether the plugin is currently enabled.
[JsonPropertyName("enabled")]
public bool Enabled { get; set; }
+ /// Whether this managed desired plugin has an installed or live record.
+ [JsonPropertyName("installed")]
+ public bool? Installed { get; set; }
+
+ /// Absolute marketplace directory for a live plugin.
+ [JsonPropertyName("installedFrom")]
+ public string? InstalledFrom { get; set; }
+
+ /// Whether enterprise managed settings control this plugin.
+ [JsonPropertyName("managed")]
+ public bool? Managed { get; set; }
+
+ /// Enabled state required by enterprise managed settings.
+ [JsonPropertyName("managedDesiredEnabled")]
+ public bool? ManagedDesiredEnabled { get; set; }
+
/// Marketplace the plugin came from.
[JsonPropertyName("marketplace")]
public string Marketplace { get; set; } = string.Empty;
@@ -12182,6 +13847,10 @@ public sealed class Plugin
[JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
+ /// Runtime plugin provenance, such as "builtin".
+ [JsonPropertyName("source")]
+ public string? Source { get; set; }
+
/// Installed version.
[JsonPropertyName("version")]
public string? Version { get; set; }
@@ -12205,6 +13874,75 @@ internal sealed class SessionPluginsListRequest
public string SessionId { get; set; } = string.Empty;
}
+/// Plugin source resolved relative to the session's authoritative working directory.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class SessionPluginsInstallRequest
+{
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+
+ /// Plugin install spec. Accepts the same forms as the CLI: "plugin@marketplace" (marketplace install), "owner/repo" or "owner/repo:subpath" (GitHub direct), an http/https/ssh URL, or a local path. Direct (non-marketplace) installs are deprecated and will produce a deprecationWarning in the result.
+ [JsonPropertyName("source")]
+ public string Source { get; set; } = string.Empty;
+}
+
+/// Name (or spec) of the plugin to uninstall.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class PluginsUninstallRequestWithSession
+{
+ /// Stable source identity for a direct (non-marketplace) install. Disambiguates uninstall when multiple installed plugins share the same name.
+ [JsonPropertyName("directSourceId")]
+ public string? DirectSourceId { get; set; }
+
+ /// Plugin name or "plugin@marketplace" spec to uninstall. When ambiguous, prefer the fully-qualified spec.
+ [JsonPropertyName("name")]
+ public string Name { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Name (or spec) of the plugin to update.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class PluginsUpdateRequestWithSession
+{
+ /// Plugin name or "plugin@marketplace" spec to update.
+ [JsonPropertyName("name")]
+ public string Name { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Plugin names (or specs) to enable in the session's authoritative working directory.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class SessionPluginsEnableRequest
+{
+ /// Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API.
+ [JsonPropertyName("names")]
+ public IList Names { get => field ??= []; set; }
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Plugin names (or specs) to disable in the session's authoritative working directory.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class SessionPluginsDisableRequest
+{
+ /// Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins.
+ [JsonPropertyName("names")]
+ public IList Names { get => field ??= []; set; }
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
/// RPC data type for SessionPluginsReload operations.
[Experimental(Diagnostics.Experimental)]
public sealed class SessionPluginsReloadRequest
@@ -12259,6 +13997,84 @@ internal sealed class SessionPluginsReloadRequestWithSession
public string SessionId { get; set; } = string.Empty;
}
+/// Identifies the target session.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class SessionPluginsMarketplacesListRequest
+{
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Marketplace source and optional working directory for relative-path resolution.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class PluginsMarketplacesAddRequestWithSession
+{
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+
+ /// Marketplace source. Accepts the same forms as the CLI: "owner/repo" or "owner/repo#ref" (GitHub), an http/https/ssh URL (optionally with #ref), a git scp-style URL (user@host:path), or a local path. The marketplace's own name (from its manifest) is used as the registration key.
+ [JsonPropertyName("source")]
+ public string Source { get; set; } = string.Empty;
+
+ /// Working directory used to resolve relative local paths in `source`. Defaults to the server's current working directory.
+ [JsonPropertyName("workingDirectory")]
+ public string? WorkingDirectory { get; set; }
+}
+
+/// Name of the marketplace to remove and an optional force flag.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class PluginsMarketplacesRemoveRequestWithSession
+{
+ /// When true, also uninstall every plugin sourced from this marketplace. When false (default), removal is a no-op if any plugin from this marketplace is installed and the dependent plugin names are returned in the result.
+ [JsonPropertyName("force")]
+ public bool? Force { get; set; }
+
+ /// Marketplace name to remove.
+ [JsonPropertyName("name")]
+ public string Name { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Name of the marketplace whose plugin catalog to fetch.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class PluginsMarketplacesBrowseRequestWithSession
+{
+ /// Marketplace name to browse.
+ [JsonPropertyName("name")]
+ public string Name { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// RPC data type for SessionPluginsMarketplacesRefresh operations.
+[Experimental(Diagnostics.Experimental)]
+public sealed class SessionPluginsMarketplacesRefreshRequest
+{
+ /// Marketplace name to refresh. When omitted, every registered marketplace is refreshed.
+ [JsonPropertyName("name")]
+ public string? Name { get; set; }
+}
+
+/// RPC data type for SessionPluginsMarketplacesRefreshRequestWithSession operations.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class SessionPluginsMarketplacesRefreshRequestWithSession
+{
+ /// Marketplace name to refresh. When omitted, every registered marketplace is refreshed.
+ [JsonPropertyName("name")]
+ public string? Name { get; set; }
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
/// Short-lived, rotating credential the caller must send on every request, in addition to `apiKey` if one is present. Omitted when the endpoint does not require one.
[Experimental(Diagnostics.Experimental)]
public sealed class ProviderSessionToken
@@ -13023,7 +14839,7 @@ public sealed class SandboxConfigUserPolicyNetwork
[JsonPropertyName("blockedHosts")]
public IList? BlockedHosts { get; set; }
- /// HTTP(S) proxy for sandboxed traffic. With host rules, this is the built-in local proxy's upstream; credentials stay in the runtime, and Linux and macOS restrict the child to the local listener. Without host rules, Linux restricts egress to this endpoint but rejects credentials, and macOS proxying is cooperative. Windows enforcement depends on the application's networking stack. Configure credentials in the separate username/password fields. The transient local listener URL is never persisted.
+ /// HTTP(S) proxy for sandboxed traffic. This is the built-in local proxy's upstream: every sandboxed command reaches it through a loopback listener, so credentials stay in the runtime and never reach the child. On Windows the sandbox also needs local network access, because it reaches that listener over host loopback. Configure credentials in the separate username/password fields. The transient local listener URL is never persisted.
[JsonPropertyName("proxy")]
public SandboxConfigUserPolicyNetworkProxy? Proxy { get; set; }
}
@@ -14242,6 +16058,10 @@ internal sealed class ToolsGetBuiltinDescriptorsRequest
[Experimental(Diagnostics.Experimental)]
public sealed class TaskCompleteData
{
+ /// Structured blocker details when outcome is blocked.
+ [JsonPropertyName("blocker")]
+ public TaskBlocker? Blocker { get; set; }
+
/// Active autopilot objective ID evaluated by the completion reviewer.
[JsonPropertyName("objectiveId")]
public long? ObjectiveId { get; set; }
@@ -16527,6 +18347,10 @@ internal sealed class PermissionDecisionRequest
[Experimental(Diagnostics.Experimental)]
public sealed class PendingPermissionRequest
{
+ /// Permission-recovery episode that authorized this request to surface for interactive attention.
+ [JsonPropertyName("recoveryEpisodeId")]
+ public string? RecoveryEpisodeId { get; set; }
+
/// The user-facing permission prompt details (commands, write, read, mcp, url, memory, custom-tool, path, hook).
[JsonPropertyName("request")]
public PermissionPromptRequest Request { get; set; } = null!;
@@ -17279,6 +19103,10 @@ public sealed class SessionMetadataSnapshot
[JsonPropertyName("currentMode")]
public MetadataSnapshotCurrentMode CurrentMode { get; set; }
+ /// Live indexed-search state for this session activation. Omitted by runtimes that do not expose indexed-search status; absence does not indicate enablement.
+ [JsonPropertyName("indexedSearch")]
+ public IndexedSearchState? IndexedSearch { get; set; }
+
/// User-provided name supplied at session construction (via `--name`), if any. Immutable after construction.
[JsonPropertyName("initialName")]
public string? InitialName { get; set; }
@@ -18594,6 +20422,10 @@ internal sealed class SessionQueuePendingItemsRequest
[Experimental(Diagnostics.Experimental)]
internal sealed class QueueSnapshotResult
{
+ /// Queue item identifier of a model switch that has been dequeued but not yet applied.
+ [JsonPropertyName("inFlightModelChangeId")]
+ public string? InFlightModelChangeId { get; set; }
+
/// Insertion orders for queued items, aligned with `items`.
[JsonPropertyName("itemOrders")]
public IList? ItemOrders { get; set; }
@@ -18777,6 +20609,56 @@ internal sealed class QueueUpdateTextRequest
public string SessionId { get; set; } = string.Empty;
}
+/// Conditional withdrawal of a single user message, before the runtime claims it for delivery.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class QueueWithdrawMessageRequest
+{
+ /// The prompt originally sent. A message edited since submission is not withdrawn, so an obsolete draft cannot replace the edit.
+ [JsonPropertyName("expectedPrompt")]
+ public string ExpectedPrompt { get; set; } = string.Empty;
+
+ /// Message identity returned by send, not the queue item id. Batch messages are not eligible.
+ [JsonPropertyName("messageId")]
+ public string MessageId { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Append to one pending steering message without changing its identity or delivery position.
+[Experimental(Diagnostics.Experimental)]
+internal sealed class QueueAppendSteeringRequest
+{
+ /// Mode captured at submission. Only steering messages in the same mode may be combined.
+ [JsonPropertyName("agentMode")]
+ public SendAgentMode AgentMode { get; set; }
+
+ /// Attachments to add after the message's existing attachments. An empty list preserves the existing attachments.
+ [JsonPropertyName("attachments")]
+ public IList Attachments { get => field ??= []; set; }
+
+ /// Display text to append to the existing preview after a blank line.
+ [JsonPropertyName("displayPrompt")]
+ public string DisplayPrompt { get; set; } = string.Empty;
+
+ /// Expected current prompt, including any previous appends. The runtime applies plan-mode normalization before comparing and refuses a changed message.
+ [JsonPropertyName("expectedPrompt")]
+ public string ExpectedPrompt { get; set; } = string.Empty;
+
+ /// Message identity returned by send, not the queue item id. Only unclaimed user steering messages are eligible.
+ [JsonPropertyName("messageId")]
+ public string MessageId { get; set; } = string.Empty;
+
+ /// Text to append after a blank line.
+ [JsonPropertyName("prompt")]
+ public string Prompt { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
/// Result of duplicating a queued item.
[Experimental(Diagnostics.Experimental)]
public sealed class QueueDuplicateAtResult
@@ -19846,6 +21728,57 @@ public sealed class FactoryAbortRequest
public string SessionId { get; set; } = string.Empty;
}
+/// Result returned by an extension workflow closure.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowExecuteResult
+{
+ /// Workflow result value.
+ [JsonPropertyName("result")]
+ public JsonElement? Result { get; set; }
+}
+
+/// Parameters sent to the owning extension to execute a workflow closure.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowExecuteRequest
+{
+ /// Workflow input value.
+ [JsonPropertyName("args")]
+ public JsonElement Args { get; set; }
+
+ /// Opaque token identifying this workflow execution attempt.
+ [JsonPropertyName("executionToken")]
+ public string ExecutionToken { get; set; } = string.Empty;
+
+ /// Registered workflow name.
+ [JsonPropertyName("name")]
+ public string Name { get; set; } = string.Empty;
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
+/// Parameters for cooperatively aborting a workflow body.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowAbortRequest
+{
+ /// Opaque token identifying the execution attempt to abort.
+ [JsonPropertyName("executionToken")]
+ public string ExecutionToken { get; set; } = string.Empty;
+
+ /// Workflow run identifier.
+ [JsonPropertyName("runId")]
+ public string RunId { get; set; } = string.Empty;
+
+ /// Target session identifier.
+ [JsonPropertyName("sessionId")]
+ public string SessionId { get; set; } = string.Empty;
+}
+
/// Whether the client authoritatively confirmed its external work stopped.
[Experimental(Diagnostics.Experimental)]
public sealed class ClientTaskCancelResult
@@ -21344,15 +23277,24 @@ public CatalogCapability(string value)
/// Understands `application/ai-skill` candidates as discovery-only and typed non-installable.
public static CatalogCapability AiSkillDiscovery { get; } = new("ai-skill-discovery");
+ /// Understands opt-in `application/vnd.github.copilot-plugin` candidates and their typed identity, version, source, and compatibility fields.
+ public static CatalogCapability AgentPluginDiscovery { get; } = new("agent-plugin-discovery");
+
/// Understands side-effect-free MCP install-plan requests, results, and plan handles; `planning-unavailable` separately reports that planning is not enabled.
public static CatalogCapability McpInstallPlanning { get; } = new("mcp-install-planning");
/// Understands plans that enumerate every eligible transport rather than a single preferred one.
public static CatalogCapability MultipleTransportChoice { get; } = new("multiple-transport-choice");
+ /// Understands explicit numbered navigation and authority-reported pagination metadata with opaque tokens. Advertised and granted only when requested.
+ public static CatalogCapability CatalogSearchPagination { get; } = new("catalog-search-pagination");
+
/// Understands versioned candidate trust snapshots. Protocol-3 callers must require this capability before the runtime adds the optional snapshot field.
public static CatalogCapability TrustSnapshot { get; } = new("trust-snapshot");
+ /// Understands exact candidate selection through model-safe opaque references and host-only candidate-handle hand-off.
+ public static CatalogCapability CatalogSelection { get; } = new("catalog-selection");
+
/// Returns a value indicating whether two instances are equivalent.
public static bool operator ==(CatalogCapability left, CatalogCapability right) => left.Equals(right);
@@ -22187,6 +24129,9 @@ public CatalogHandleType(string value)
/// An install plan handle.
public static CatalogHandleType Plan { get; } = new("plan");
+ /// A model-safe reference to one retained search candidate.
+ public static CatalogHandleType Selection { get; } = new("selection");
+
/// Returns a value indicating whether two instances are equivalent.
public static bool operator ==(CatalogHandleType left, CatalogHandleType right) => left.Equals(right);
@@ -22244,7 +24189,7 @@ public CatalogHandleRejectionReason(string value)
/// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The handle is unparseable, unknown, or was issued for a different operation.
+ /// The handle is unparseable or unknown.
public static CatalogHandleRejectionReason Invalid { get; } = new("invalid");
/// The handle's time to live has elapsed.
@@ -22253,9 +24198,15 @@ public CatalogHandleRejectionReason(string value)
/// The handle has already been used, and handles are single-use.
public static CatalogHandleRejectionReason Replayed { get; } = new("replayed");
- /// The handle was issued by a different runtime instance.
+ /// The handle was issued by a different runtime instance or session.
public static CatalogHandleRejectionReason Foreign { get; } = new("foreign");
+ /// The handle was issued for another catalog operation.
+ public static CatalogHandleRejectionReason WrongKind { get; } = new("wrong-kind");
+
+ /// The supplied search identifier does not match the retained candidate.
+ public static CatalogHandleRejectionReason SearchMismatch { get; } = new("search-mismatch");
+
/// Returns a value indicating whether two instances are equivalent.
public static bool operator ==(CatalogHandleRejectionReason left, CatalogHandleRejectionReason right) => left.Equals(right);
@@ -22293,7 +24244,7 @@ public override void Write(Utf8JsonWriter writer, CatalogHandleRejectionReason v
}
-/// Which request field was rejected before any work was done.
+/// Which request field was rejected locally or by the catalog authority.
[Experimental(Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
@@ -22334,6 +24285,18 @@ public CatalogInvalidRequestField(string value)
/// The requested configuration scope is not one this runtime writes.
public static CatalogInvalidRequestField Scope { get; } = new("scope");
+ /// The pagination token or target was invalid, or the authority rejected the continuation. Repeat the search without page.
+ public static CatalogInvalidRequestField Page { get; } = new("page");
+
+ /// The locally owned session identifier was missing or malformed.
+ public static CatalogInvalidRequestField SessionId { get; } = new("sessionId");
+
+ /// The opaque selection reference was missing or malformed.
+ public static CatalogInvalidRequestField SelectionRef { get; } = new("selectionRef");
+
+ /// The terminal selection outcome was missing or unsupported.
+ public static CatalogInvalidRequestField Outcome { get; } = new("outcome");
+
/// Returns a value indicating whether two instances are equivalent.
public static bool operator ==(CatalogInvalidRequestField left, CatalogInvalidRequestField right) => left.Equals(right);
@@ -22631,6 +24594,9 @@ public CatalogMediaType(string value)
/// An AI skill card. Representable and searchable, but typed non-installable.
public static CatalogMediaType ApplicationAiSkill { get; } = new("application/ai-skill");
+ /// An inert Agent Plugin descriptor.
+ public static CatalogMediaType ApplicationVndGitHubCopilotPlugin { get; } = new("application/vnd.github.copilot-plugin");
+
/// Returns a value indicating whether two instances are equivalent.
public static bool operator ==(CatalogMediaType left, CatalogMediaType right) => left.Equals(right);
@@ -22766,7 +24732,7 @@ public CatalogContractViolationReason(string value)
/// A result carried neither a URL nor embedded data, when exactly one is required.
public static CatalogContractViolationReason NeitherUrlNorData { get; } = new("neither-url-nor-data");
- /// Two results claimed the same normalised identity.
+ /// Two results claimed the same collision key: normalised identity for existing kinds, or normalised identity and declared version for Agent Plugins.
public static CatalogContractViolationReason DuplicateIdentity { get; } = new("duplicate-identity");
/// A result declared no media type, or one this contract does not model.
@@ -22967,6 +24933,9 @@ public CatalogUnavailableReason(string value)
/// Install planning is not wired up on this runtime build.
public static CatalogUnavailableReason PlanningUnavailable { get; } = new("planning-unavailable");
+ /// Exact candidate selection is not available in this session or runtime.
+ public static CatalogUnavailableReason SelectionUnavailable { get; } = new("selection-unavailable");
+
/// No catalog authority is configured for this runtime.
public static CatalogUnavailableReason AuthorityNotConfigured { get; } = new("authority-not-configured");
@@ -23454,6 +25423,312 @@ public override void Write(Utf8JsonWriter writer, CatalogTrustTier value, JsonSe
}
+/// Typed non-installable state for an AI skill candidate.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct CatalogAiSkillInstallability : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public CatalogAiSkillInstallability(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// AI skills are discovery-only on this surface.
+ public static CatalogAiSkillInstallability NotInstallableKind { get; } = new("not-installable-kind");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(CatalogAiSkillInstallability left, CatalogAiSkillInstallability right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(CatalogAiSkillInstallability left, CatalogAiSkillInstallability right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is CatalogAiSkillInstallability other && Equals(other);
+
+ ///
+ public bool Equals(CatalogAiSkillInstallability other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override CatalogAiSkillInstallability Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, CatalogAiSkillInstallability value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(CatalogAiSkillInstallability));
+ }
+ }
+}
+
+
+/// Canonical AI skill media type.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct CatalogAiSkillMediaType : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public CatalogAiSkillMediaType(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// An AI skill card.
+ public static CatalogAiSkillMediaType ApplicationAiSkill { get; } = new("application/ai-skill");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(CatalogAiSkillMediaType left, CatalogAiSkillMediaType right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(CatalogAiSkillMediaType left, CatalogAiSkillMediaType right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is CatalogAiSkillMediaType other && Equals(other);
+
+ ///
+ public bool Equals(CatalogAiSkillMediaType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override CatalogAiSkillMediaType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, CatalogAiSkillMediaType value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(CatalogAiSkillMediaType));
+ }
+ }
+}
+
+
+/// Explicit Agent Plugin compatibility declared by exact catalog tags. Clients must not infer these values from display text or other metadata.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct CatalogAgentPluginCompatibilityTag : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public CatalogAgentPluginCompatibilityTag(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// The plugin contributes at least one GitHub Copilot Canvas.
+ public static CatalogAgentPluginCompatibilityTag Canvas { get; } = new("canvas");
+
+ /// The plugin depends on Canvas for its intended functionality.
+ public static CatalogAgentPluginCompatibilityTag CanvasOnly { get; } = new("canvas-only");
+
+ /// The plugin targets GitHub Copilot.
+ public static CatalogAgentPluginCompatibilityTag GitHubCopilot { get; } = new("github-copilot");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(CatalogAgentPluginCompatibilityTag left, CatalogAgentPluginCompatibilityTag right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(CatalogAgentPluginCompatibilityTag left, CatalogAgentPluginCompatibilityTag right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is CatalogAgentPluginCompatibilityTag other && Equals(other);
+
+ ///
+ public bool Equals(CatalogAgentPluginCompatibilityTag other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override CatalogAgentPluginCompatibilityTag Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, CatalogAgentPluginCompatibilityTag value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(CatalogAgentPluginCompatibilityTag));
+ }
+ }
+}
+
+
+/// Canonical Agent Plugin media type.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct CatalogAgentPluginMediaType : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public CatalogAgentPluginMediaType(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// A GitHub Copilot Agent Plugin descriptor.
+ public static CatalogAgentPluginMediaType ApplicationVndGitHubCopilotPlugin { get; } = new("application/vnd.github.copilot-plugin");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(CatalogAgentPluginMediaType left, CatalogAgentPluginMediaType right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(CatalogAgentPluginMediaType left, CatalogAgentPluginMediaType right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is CatalogAgentPluginMediaType other && Equals(other);
+
+ ///
+ public bool Equals(CatalogAgentPluginMediaType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override CatalogAgentPluginMediaType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, CatalogAgentPluginMediaType value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(CatalogAgentPluginMediaType));
+ }
+ }
+}
+
+
+/// Relationship of the backend-reported count to the complete query result set.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct CatalogSearchTotalCountRelation : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public CatalogSearchTotalCountRelation(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// No exact/full-query or lower-bound guarantee is available.
+ public static CatalogSearchTotalCountRelation Unknown { get; } = new("unknown");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(CatalogSearchTotalCountRelation left, CatalogSearchTotalCountRelation right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(CatalogSearchTotalCountRelation left, CatalogSearchTotalCountRelation right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is CatalogSearchTotalCountRelation other && Equals(other);
+
+ ///
+ public bool Equals(CatalogSearchTotalCountRelation other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override CatalogSearchTotalCountRelation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, CatalogSearchTotalCountRelation value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(CatalogSearchTotalCountRelation));
+ }
+ }
+}
+
+
/// What kind of resource a catalog candidate describes.
[Experimental(Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
@@ -23480,6 +25755,9 @@ public CatalogCandidateKind(string value)
/// An AI skill, which is discoverable but not installable through this surface.
public static CatalogCandidateKind AiSkill { get; } = new("ai-skill");
+ /// An inert Agent Plugin candidate, available only when explicitly requested.
+ public static CatalogCandidateKind Plugin { get; } = new("plugin");
+
/// Returns a value indicating whether two instances are equivalent.
public static bool operator ==(CatalogCandidateKind left, CatalogCandidateKind right) => left.Equals(right);
@@ -23517,6 +25795,75 @@ public override void Write(Utf8JsonWriter writer, CatalogCandidateKind value, Js
}
+/// Terminal outcome declared for a retained catalog selection group.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct CatalogSelectionDecision : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public CatalogSelectionDecision(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// Choose the candidate named by selectionRef.
+ public static CatalogSelectionDecision Selected { get; } = new("selected");
+
+ /// Explicitly decline every candidate in the search.
+ public static CatalogSelectionDecision Declined { get; } = new("declined");
+
+ /// Cancel the selection interaction without choosing a candidate.
+ public static CatalogSelectionDecision Cancelled { get; } = new("cancelled");
+
+ /// Declare that the host's live interaction deadline elapsed while the reference remained valid.
+ public static CatalogSelectionDecision TimedOut { get; } = new("timed-out");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(CatalogSelectionDecision left, CatalogSelectionDecision right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(CatalogSelectionDecision left, CatalogSelectionDecision right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is CatalogSelectionDecision other && Equals(other);
+
+ ///
+ public bool Equals(CatalogSelectionDecision other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override CatalogSelectionDecision Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, CatalogSelectionDecision value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(CatalogSelectionDecision));
+ }
+ }
+}
+
+
/// Where completed plugin content was staged before atomic promotion.
[Experimental(Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
@@ -26631,6 +28978,435 @@ public override void Write(Utf8JsonWriter writer, FactoryPauseCheckpointAction v
}
+/// Cumulative resource ceiling that stopped a workflow run.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct WorkflowRunFailureKind : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public WorkflowRunFailureKind(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// The run admitted the approved maximum total number of subagents.
+ public static WorkflowRunFailureKind MaxTotalSubagents { get; } = new("maxTotalSubagents");
+
+ /// The run reached the approved accumulated active-execution time in seconds.
+ public static WorkflowRunFailureKind TimeoutSeconds { get; } = new("timeoutSeconds");
+
+ /// The run's settled subagent model usage exceeded the approved AI-credit ceiling, or no headroom remained for another subagent.
+ public static WorkflowRunFailureKind MaxAiCredits { get; } = new("maxAiCredits");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(WorkflowRunFailureKind left, WorkflowRunFailureKind right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(WorkflowRunFailureKind left, WorkflowRunFailureKind right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is WorkflowRunFailureKind other && Equals(other);
+
+ ///
+ public bool Equals(WorkflowRunFailureKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override WorkflowRunFailureKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, WorkflowRunFailureKind value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkflowRunFailureKind));
+ }
+ }
+}
+
+
+/// Execution-critical workflow storage operation.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct WorkflowDurableOperation : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public WorkflowDurableOperation(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// Creating the durable run and declared phases.
+ public static WorkflowDurableOperation CreateRun { get; } = new("createRun");
+
+ /// Persisting the transition to running.
+ public static WorkflowDurableOperation MarkRunStarted { get; } = new("markRunStarted");
+
+ /// Persisting the terminal run envelope.
+ public static WorkflowDurableOperation FinishRun { get; } = new("finishRun");
+
+ /// Persisting subagent admission accounting.
+ public static WorkflowDurableOperation ReserveAgent { get; } = new("reserveAgent");
+
+ /// Rolling back an uncommitted subagent admission.
+ public static WorkflowDurableOperation ReleaseAgent { get; } = new("releaseAgent");
+
+ /// Persisting an idempotent model-usage charge.
+ public static WorkflowDurableOperation ChargeCredit { get; } = new("chargeCredit");
+
+ /// Persisting active execution time.
+ public static WorkflowDurableOperation AddElapsed { get; } = new("addElapsed");
+
+ /// Reading the authoritative AI-credit total.
+ public static WorkflowDurableOperation ReconcileCreditTotal { get; } = new("reconcileCreditTotal");
+
+ /// Reading a journal entry without treating storage failure as a cache miss.
+ public static WorkflowDurableOperation JournalGet { get; } = new("journalGet");
+
+ /// Persisting a journal entry before reporting success.
+ public static WorkflowDurableOperation JournalPut { get; } = new("journalPut");
+
+ /// Renewing the durable owner lease that proves this process still owns the run.
+ public static WorkflowDurableOperation RefreshLease { get; } = new("refreshLease");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(WorkflowDurableOperation left, WorkflowDurableOperation right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(WorkflowDurableOperation left, WorkflowDurableOperation right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is WorkflowDurableOperation other && Equals(other);
+
+ ///
+ public bool Equals(WorkflowDurableOperation other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override WorkflowDurableOperation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, WorkflowDurableOperation value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkflowDurableOperation));
+ }
+ }
+}
+
+
+/// Current or terminal state of a workflow run.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct WorkflowRunStatus : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public WorkflowRunStatus(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// The run was minted and is awaiting approval.
+ public static WorkflowRunStatus Pending { get; } = new("pending");
+
+ /// The run is executing.
+ public static WorkflowRunStatus Running { get; } = new("running");
+
+ /// The run completed successfully.
+ public static WorkflowRunStatus Completed { get; } = new("completed");
+
+ /// The run was interrupted while resource budget remained.
+ public static WorkflowRunStatus Halted { get; } = new("halted");
+
+ /// The current attempt stopped intentionally and the run may be resumed.
+ public static WorkflowRunStatus Paused { get; } = new("paused");
+
+ /// The run was cancelled before completion.
+ public static WorkflowRunStatus Cancelled { get; } = new("cancelled");
+
+ /// The workflow body failed or reached a cumulative resource ceiling.
+ public static WorkflowRunStatus Error { get; } = new("error");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(WorkflowRunStatus left, WorkflowRunStatus right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(WorkflowRunStatus left, WorkflowRunStatus right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is WorkflowRunStatus other && Equals(other);
+
+ ///
+ public bool Equals(WorkflowRunStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override WorkflowRunStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, WorkflowRunStatus value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkflowRunStatus));
+ }
+ }
+}
+
+
+/// Derived lifecycle state of a workflow phase.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct WorkflowPhaseStatus : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public WorkflowPhaseStatus(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// The phase has not been entered yet.
+ public static WorkflowPhaseStatus Pending { get; } = new("pending");
+
+ /// The phase is currently entered and accumulating active time.
+ public static WorkflowPhaseStatus Active { get; } = new("active");
+
+ /// The phase was entered and has since been closed.
+ public static WorkflowPhaseStatus Completed { get; } = new("completed");
+
+ /// The phase was never entered because a later phase was entered or the run reached a terminal state.
+ public static WorkflowPhaseStatus Skipped { get; } = new("skipped");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(WorkflowPhaseStatus left, WorkflowPhaseStatus right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(WorkflowPhaseStatus left, WorkflowPhaseStatus right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is WorkflowPhaseStatus other && Equals(other);
+
+ ///
+ public bool Equals(WorkflowPhaseStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override WorkflowPhaseStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, WorkflowPhaseStatus value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkflowPhaseStatus));
+ }
+ }
+}
+
+
+/// Kind of workflow progress line.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct WorkflowLogLineKind : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public WorkflowLogLineKind(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// A narrator log line.
+ public static WorkflowLogLineKind Log { get; } = new("log");
+
+ /// A named workflow phase marker.
+ public static WorkflowLogLineKind Phase { get; } = new("phase");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(WorkflowLogLineKind left, WorkflowLogLineKind right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(WorkflowLogLineKind left, WorkflowLogLineKind right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is WorkflowLogLineKind other && Equals(other);
+
+ ///
+ public bool Equals(WorkflowLogLineKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override WorkflowLogLineKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, WorkflowLogLineKind value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkflowLogLineKind));
+ }
+ }
+}
+
+
+/// Action the runtime selected for a durable workflow pause checkpoint.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct WorkflowPauseCheckpointAction : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public WorkflowPauseCheckpointAction(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// The checkpoint was committed by a prior paused attempt, so execution may continue.
+ public static WorkflowPauseCheckpointAction Continue { get; } = new("continue");
+
+ /// This attempt claimed the checkpoint and must cooperatively stop.
+ public static WorkflowPauseCheckpointAction Pause { get; } = new("pause");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(WorkflowPauseCheckpointAction left, WorkflowPauseCheckpointAction right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(WorkflowPauseCheckpointAction left, WorkflowPauseCheckpointAction right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is WorkflowPauseCheckpointAction other && Equals(other);
+
+ ///
+ public bool Equals(WorkflowPauseCheckpointAction other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override WorkflowPauseCheckpointAction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, WorkflowPauseCheckpointAction value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(WorkflowPauseCheckpointAction));
+ }
+ }
+}
+
+
/// Whether the requested preference was already effective or was accepted for later transactional activation.
[Experimental(Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
@@ -33450,17 +36226,35 @@ internal ServerCatalogApi(JsonRpc rpc)
/// Protocol version and capabilities the caller requires.
/// Free-text search query. Persisted as tool input for session continuity, but omitted from telemetry.
/// Maximum number of candidates to return. Defaults to 10 when omitted.
- /// Restrict results to these candidate kinds. When omitted, every kind the runtime supports is searched.
+ /// Restrict results to these candidate kinds. Agent Plugins are opt-in and require the `agent-plugin-discovery` capability so protocol-v3 clients generated before that variant cannot receive an unknown result; when omitted, the backwards-compatible MCP server and AI skill kinds are searched.
+ /// Numbered navigation using metadata from an earlier response. Requires catalog-search-pagination and the same query, kinds and effective limit. Omit for a fresh first-page search.
/// The to monitor for cancellation requests. The default is .
/// Outcome of a catalog.search call: either bounded inert candidates, or one typed refusal. Never a partial success.
- public async Task SearchAsync(CatalogClientContract contract, string query, int? limit = null, IList? kinds = null, CancellationToken cancellationToken = default)
+ public async Task SearchAsync(CatalogClientContract contract, string query, int? limit = null, IList? kinds = null, CatalogSearchPage? page = null, CancellationToken cancellationToken = default)
{
ArgumentNullException.ThrowIfNull(contract);
ArgumentNullException.ThrowIfNull(query);
- var request = new CatalogSearchRequest { Contract = contract, Query = query, Limit = limit, Kinds = kinds };
+ var request = new CatalogSearchRequest { Contract = contract, Query = query, Limit = limit, Kinds = kinds, Page = page };
return await CopilotClient.InvokeRpcAsync(_rpc, "catalog.search", [request], cancellationToken);
}
+
+ /// Terminates one retained catalog selection group. A selected outcome returns the native host a fresh single-use candidate handle plus the original searchId for a later explicit mcp.planInstall call; non-selected outcomes release the group without producing a planning input. Candidate state, cards, URLs, credentials and private identifiers remain inside the runtime. The model-facing catalog_select tool projects the result separately and never exposes the candidate handle or searchId.
+ /// Protocol version and capabilities the caller requires.
+ /// Locally owned root session whose retained search state is being resolved.
+ /// Opaque runtime-instance scoped reference to one visible candidate. For a non-selected outcome, any candidate reference from the same search closes that search's retained group.
+ /// The terminal outcome declared by the caller. Timed-out means the host's live interaction deadline elapsed; a reference whose runtime TTL elapsed is rejected separately as stale.
+ /// The to monitor for cancellation requests. The default is .
+ /// Typed outcome of catalog.select. Only the selected host result carries a fresh candidate handle; the model-facing projection removes both that handle and searchId.
+ public async Task SelectAsync(CatalogClientContract contract, string sessionId, string selectionRef, CatalogSelectionDecision outcome, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(contract);
+ ArgumentNullException.ThrowIfNull(sessionId);
+ ArgumentNullException.ThrowIfNull(selectionRef);
+
+ var request = new CatalogSelectionRequest { Contract = contract, SessionId = sessionId, SelectionRef = selectionRef, Outcome = outcome };
+ return await CopilotClient.InvokeRpcAsync(_rpc, "catalog.select", [request], cancellationToken);
+ }
}
/// Provides server-scoped Plugins APIs.
@@ -33934,7 +36728,7 @@ internal ServerSessionFsApi(JsonRpc rpc)
}
/// Registers an SDK client as the session filesystem provider.
- /// Initial working directory for sessions.
+ /// Absolute initial working directory for sessions. Registering the provider establishes this path as the root of its virtual namespace; the runtime does not require the provider to materialize or stat it before creating a session.
/// Path within each session's SessionFs where the runtime stores files for that session.
/// Path conventions used by this filesystem.
/// Optional capabilities declared by the provider.
@@ -34463,6 +37257,12 @@ internal SessionRpc(CopilotSession session)
Interlocked.CompareExchange(ref field, new(_session), null) ??
field;
+ /// Workflow APIs.
+ public WorkflowApi Workflow =>
+ field ??
+ Interlocked.CompareExchange(ref field, new(_session), null) ??
+ field;
+
/// Model APIs.
public ModelApi Model =>
field ??
@@ -34541,6 +37341,12 @@ internal SessionRpc(CopilotSession session)
Interlocked.CompareExchange(ref field, new(_session), null) ??
field;
+ /// ManagedSettings APIs.
+ public ManagedSettingsApi ManagedSettings =>
+ field ??
+ Interlocked.CompareExchange(ref field, new(_session), null) ??
+ field;
+
/// Plugins APIs.
public PluginsApi Plugins =>
field ??
@@ -35426,6 +38232,271 @@ public async Task PutAsync(string runId, string executionToken
}
}
+/// Provides session-scoped Workflow APIs.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowApi
+{
+ private readonly CopilotSession _session;
+
+ internal WorkflowApi(CopilotSession session)
+ {
+ _session = session;
+ }
+
+ /// Runs a registered dynamic workflow by name at the top level.
+ /// Registered workflow name.
+ /// Workflow input value.
+ /// Workflow invocation options.
+ /// The to monitor for cancellation requests. The default is .
+ /// Complete current or terminal workflow run envelope.
+ public async Task RunAsync(string name, object args, WorkflowRunOptions? options = null, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(name);
+ ArgumentNullException.ThrowIfNull(args);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowRunRequest { SessionId = _session.SessionId, Name = name, Args = CopilotClient.ToJsonElementForWire(args)!.Value, Options = options };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.run", [request], cancellationToken);
+ }
+
+ /// Resumes a dynamic workflow run using its persisted name, arguments, journal, and accounting.
+ /// Workflow run identifier.
+ /// Optional per-invocation resource ceiling overrides.
+ /// Whether to notify the originating session when the workflow completes.
+ /// Whether to emit workflow phase names to the session transcript.
+ /// The to monitor for cancellation requests. The default is .
+ /// Resolved persisted workflow identity and resumed run envelope.
+ public async Task ResumeAsync(string runId, WorkflowRunLimits? limits = null, bool? notifyOnComplete = null, bool? logPhaseNames = null, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(runId);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowResumeRequest { SessionId = _session.SessionId, RunId = runId, Limits = limits, NotifyOnComplete = notifyOnComplete, LogPhaseNames = logPhaseNames };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.resume", [request], cancellationToken);
+ }
+
+ /// Internal tool-originated dynamic workflow invocation.
+ /// Registered workflow name.
+ /// Workflow input value.
+ /// Tool-originated workflow invocation options.
+ /// Opaque identifier of the originating tool call.
+ /// The to monitor for cancellation requests. The default is .
+ /// Complete current or terminal workflow run envelope.
+ internal async Task RunFromToolAsync(string name, object args, WorkflowToolRunOptions? options = null, string? toolCallId = null, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(name);
+ ArgumentNullException.ThrowIfNull(args);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowToolRunRequest { SessionId = _session.SessionId, Name = name, Args = CopilotClient.ToJsonElementForWire(args)!.Value, Options = options, ToolCallId = toolCallId };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.runFromTool", [request], cancellationToken);
+ }
+
+ /// Internal tool-originated dynamic workflow resume.
+ /// Workflow run identifier.
+ /// Optional per-invocation resource ceiling overrides.
+ /// Opaque identifier of the originating tool call.
+ /// The to monitor for cancellation requests. The default is .
+ /// Resolved persisted workflow identity and resumed run envelope.
+ internal async Task ResumeFromToolAsync(string runId, WorkflowRunLimits? limits = null, string? toolCallId = null, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(runId);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowToolResumeRequest { SessionId = _session.SessionId, RunId = runId, Limits = limits, ToolCallId = toolCallId };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.resumeFromTool", [request], cancellationToken);
+ }
+
+ /// Gets the current or settled envelope for a dynamic workflow run.
+ /// Workflow run identifier.
+ /// The to monitor for cancellation requests. The default is .
+ /// Complete current or terminal workflow run envelope.
+ public async Task GetRunAsync(string runId, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(runId);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowGetRunRequest { SessionId = _session.SessionId, RunId = runId };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.getRun", [request], cancellationToken);
+ }
+
+ /// Lists durable dynamic workflow runs for this session in creation order.
+ /// Exclusive forward cursor.
+ /// Exclusive backward cursor.
+ /// Maximum terminal runs to return. Defaults to 200 and is capped at 500.
+ /// The to monitor for cancellation requests. The default is .
+ /// A page of workflow runs in durable creation order.
+ public async Task ListRunsAsync(long? afterSeq = null, long? beforeSeq = null, int? limit = null, CancellationToken cancellationToken = default)
+ {
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowListRunsRequest { SessionId = _session.SessionId, AfterSeq = afterSeq, BeforeSeq = beforeSeq, Limit = limit };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.listRuns", [request], cancellationToken);
+ }
+
+ /// Gets durable and live observability detail for one dynamic workflow run.
+ /// Workflow run identifier.
+ /// The to monitor for cancellation requests. The default is .
+ /// Full workflow run observability detail.
+ public async Task GetRunDetailAsync(string runId, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(runId);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowGetRunRequest { SessionId = _session.SessionId, RunId = runId };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.getRunDetail", [request], cancellationToken);
+ }
+
+ /// Pages durable progress for one dynamic workflow run.
+ /// Workflow run identifier.
+ /// Optional phase identifier used to scope records and cursors.
+ /// Exclusive forward cursor.
+ /// Exclusive backward cursor.
+ /// Maximum records to return. Defaults to 200 and is capped at 500.
+ /// The to monitor for cancellation requests. The default is .
+ /// A bidirectional page of workflow progress.
+ public async Task GetRunProgressAsync(string runId, string? phaseId = null, long? afterSeq = null, long? beforeSeq = null, int? limit = null, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(runId);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowGetRunProgressRequest { SessionId = _session.SessionId, RunId = runId, PhaseId = phaseId, AfterSeq = afterSeq, BeforeSeq = beforeSeq, Limit = limit };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.getRunProgress", [request], cancellationToken);
+ }
+
+ /// Requests cancellation of a dynamic workflow run and returns its run envelope.
+ /// Workflow run identifier.
+ /// The to monitor for cancellation requests. The default is .
+ /// Complete current or terminal workflow run envelope.
+ public async Task CancelAsync(string runId, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(runId);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowCancelRequest { SessionId = _session.SessionId, RunId = runId };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.cancel", [request], cancellationToken);
+ }
+
+ /// Pauses a running dynamic workflow and returns its settled run envelope.
+ /// Workflow run identifier.
+ /// The to monitor for cancellation requests. The default is .
+ /// Complete current or terminal workflow run envelope.
+ public async Task PauseAsync(string runId, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(runId);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowPauseRequest { SessionId = _session.SessionId, RunId = runId };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.pause", [request], cancellationToken);
+ }
+
+ /// Atomically pauses an owned dynamic workflow attempt at a durable checkpoint.
+ /// Workflow run identifier.
+ /// Opaque token identifying the execution attempt that reached the checkpoint.
+ /// Stable author-defined checkpoint key.
+ /// The to monitor for cancellation requests. The default is .
+ internal async Task PauseAtCheckpointAsync(string runId, string executionToken, string key, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(runId);
+ ArgumentNullException.ThrowIfNull(executionToken);
+ ArgumentNullException.ThrowIfNull(key);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowPauseCheckpointRequest { SessionId = _session.SessionId, RunId = runId, ExecutionToken = executionToken, Key = key };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.pauseAtCheckpoint", [request], cancellationToken);
+ }
+
+ /// Records a batch of ordered dynamic workflow progress lines.
+ /// Workflow run identifier.
+ /// Opaque token identifying the current workflow execution attempt.
+ /// Ordered progress lines to append.
+ /// The to monitor for cancellation requests. The default is .
+ /// Acknowledgement that a workflow request was accepted.
+ public async Task LogAsync(string runId, string executionToken, IList lines, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(runId);
+ ArgumentNullException.ThrowIfNull(executionToken);
+ ArgumentNullException.ThrowIfNull(lines);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowLogRequest { SessionId = _session.SessionId, RunId = runId, ExecutionToken = executionToken, Lines = lines };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.log", [request], cancellationToken);
+ }
+
+ /// Runs one dynamic-workflow-scoped subagent and returns its result.
+ /// Workflow run identifier that owns the subagent.
+ /// Opaque token identifying the current workflow execution attempt.
+ /// Prompt to send to the subagent.
+ /// Subagent execution options.
+ /// The to monitor for cancellation requests. The default is .
+ /// Result of one workflow-scoped subagent call.
+ public async Task AgentAsync(string workflowRunId, string executionToken, string prompt, WorkflowAgentOptions opts, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(workflowRunId);
+ ArgumentNullException.ThrowIfNull(executionToken);
+ ArgumentNullException.ThrowIfNull(prompt);
+ ArgumentNullException.ThrowIfNull(opts);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowAgentRequest { SessionId = _session.SessionId, WorkflowRunId = workflowRunId, ExecutionToken = executionToken, Prompt = prompt, Opts = opts };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.agent", [request], cancellationToken);
+ }
+
+ /// Journal APIs.
+ public WorkflowJournalApi Journal =>
+ field ??
+ Interlocked.CompareExchange(ref field, new(_session), null) ??
+ field;
+}
+
+/// Provides session-scoped WorkflowJournal APIs.
+[Experimental(Diagnostics.Experimental)]
+public sealed class WorkflowJournalApi
+{
+ private readonly CopilotSession _session;
+
+ internal WorkflowJournalApi(CopilotSession session)
+ {
+ _session = session;
+ }
+
+ /// Reads a memoized dynamic workflow journal entry.
+ /// Workflow run identifier.
+ /// Opaque token identifying the current workflow execution attempt.
+ /// Namespaced journal key.
+ /// The to monitor for cancellation requests. The default is .
+ /// Result of reading a workflow journal entry.
+ public async Task GetAsync(string runId, string executionToken, string key, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(runId);
+ ArgumentNullException.ThrowIfNull(executionToken);
+ ArgumentNullException.ThrowIfNull(key);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowJournalGetRequest { SessionId = _session.SessionId, RunId = runId, ExecutionToken = executionToken, Key = key };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.journal.get", [request], cancellationToken);
+ }
+
+ /// Stores a memoized dynamic workflow journal entry.
+ /// Workflow run identifier.
+ /// Opaque token identifying the current workflow execution attempt.
+ /// Namespaced journal key.
+ /// JSON result to memoize.
+ /// The to monitor for cancellation requests. The default is .
+ /// Acknowledgement that a workflow request was accepted.
+ public async Task PutAsync(string runId, string executionToken, string key, object resultJson, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(runId);
+ ArgumentNullException.ThrowIfNull(executionToken);
+ ArgumentNullException.ThrowIfNull(key);
+ ArgumentNullException.ThrowIfNull(resultJson);
+ _session.ThrowIfDisposed();
+
+ var request = new WorkflowJournalPutRequest { SessionId = _session.SessionId, RunId = runId, ExecutionToken = executionToken, Key = key, ResultJson = CopilotClient.ToJsonElementForWire(resultJson)!.Value };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.workflow.journal.put", [request], cancellationToken);
+ }
+}
+
/// Provides session-scoped Model APIs.
[Experimental(Diagnostics.Experimental)]
public sealed class ModelApi
@@ -35492,6 +38563,7 @@ public async Task SwitchAutoTierAsync(AutoTier? autoT
/// Model required by device-managed policy, when configured.
/// Model required by server-managed policy, when configured.
/// Startup default model from the enterprise policy helper, when configured. Weakest of the managed sources: it applies only when neither device nor server policy names a model, and an explicit user selection still wins.
+ /// Effective default Auto routing preference from user and managed settings. Applies only to fresh sessions and never replaces a per-session selection.
/// Model selected by repository settings, when configured.
/// Reasoning effort selected by repository settings, when configured.
/// Context tier selected by repository settings, when configured.
@@ -35500,11 +38572,11 @@ public async Task SwitchAutoTierAsync(AutoTier? autoT
/// Whether the overlay is being applied while resuming a deferred session.
/// The to monitor for cancellation requests. The default is .
/// The model identifier active on the session after the switch.
- internal async Task ApplyStartupOverlayAsync(string? deviceManagedModel = null, string? serverManagedModel = null, string? policyHelperModel = null, string? repoModel = null, string? repoReasoningEffort = null, string? repoContextTier = null, string? repoAutoTier = null, string? cliModel = null, bool? deferredResume = null, CancellationToken cancellationToken = default)
+ internal async Task ApplyStartupOverlayAsync(string? deviceManagedModel = null, string? serverManagedModel = null, string? policyHelperModel = null, AutoTier? autoTier = null, string? repoModel = null, string? repoReasoningEffort = null, string? repoContextTier = null, string? repoAutoTier = null, string? cliModel = null, bool? deferredResume = null, CancellationToken cancellationToken = default)
{
_session.ThrowIfDisposed();
- var request = new ModelApplyStartupOverlayRequest { SessionId = _session.SessionId, DeviceManagedModel = deviceManagedModel, ServerManagedModel = serverManagedModel, PolicyHelperModel = policyHelperModel, RepoModel = repoModel, RepoReasoningEffort = repoReasoningEffort, RepoContextTier = repoContextTier, RepoAutoTier = repoAutoTier, CliModel = cliModel, DeferredResume = deferredResume };
+ var request = new ModelApplyStartupOverlayRequest { SessionId = _session.SessionId, DeviceManagedModel = deviceManagedModel, ServerManagedModel = serverManagedModel, PolicyHelperModel = policyHelperModel, AutoTier = autoTier, RepoModel = repoModel, RepoReasoningEffort = repoReasoningEffort, RepoContextTier = repoContextTier, RepoAutoTier = repoAutoTier, CliModel = cliModel, DeferredResume = deferredResume };
return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.model.applyStartupOverlay", [request], cancellationToken);
}
@@ -36950,6 +40022,29 @@ public async Task ListTemplatesAsync(string ser
}
}
+/// Provides session-scoped ManagedSettings APIs.
+[Experimental(Diagnostics.Experimental)]
+public sealed class ManagedSettingsApi
+{
+ private readonly CopilotSession _session;
+
+ internal ManagedSettingsApi(CopilotSession session)
+ {
+ _session = session;
+ }
+
+ /// Waits for the live session's in-flight managed-settings application, then returns the retained effective snapshot used by runtime enforcement and by `session.managed_settings_resolved`. It does not perform another account, device, or server resolution, and rejects when resolution has not produced a snapshot.
+ /// The to monitor for cancellation requests. The default is .
+ /// Enterprise managed-settings resolution: the effective managed settings the session applied and which channels contributed, so SDK clients can show users what is enterprise-managed. Fires whenever managed policy is (re)applied — at session start, on resume, and on account switch. This is an ephemeral live snapshot (delivered to subscribers but not persisted to the session event log), because at session start it resolves before `session.start` is emitted. Device values take precedence over server values, then the policy helper, per ordinary key, while permissions compose restrictively across device, server, policy-helper, and SDK-client layers. The account-scoped `getManagedSettings()` API does not include session-local client injection. Marked experimental while the managed-settings surface stabilizes.
+ public async Task GetAsync(CancellationToken cancellationToken = default)
+ {
+ _session.ThrowIfDisposed();
+
+ var request = new SessionManagedSettingsGetRequest { SessionId = _session.SessionId };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.managedSettings.get", [request], cancellationToken);
+ }
+}
+
/// Provides session-scoped Plugins APIs.
[Experimental(Diagnostics.Experimental)]
public sealed class PluginsApi
@@ -36961,7 +40056,7 @@ internal PluginsApi(CopilotSession session)
_session = session;
}
- /// Lists plugins installed for the session.
+ /// Lists globally installed, live, built-in, and enterprise-managed desired plugins using the live session's authoritative account, working directory, and retained managed policy.
/// The to monitor for cancellation requests. The default is .
/// Plugins installed for the session, with their enabled state and version metadata.
public async Task ListAsync(CancellationToken cancellationToken = default)
@@ -36972,6 +40067,69 @@ public async Task ListAsync(CancellationToken cancellationToken = de
return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.list", [request], cancellationToken);
}
+ /// Installs a plugin using the live session's authoritative account, working directory, and retained managed policy.
+ /// Plugin install spec. Accepts the same forms as the CLI: "plugin@marketplace" (marketplace install), "owner/repo" or "owner/repo:subpath" (GitHub direct), an http/https/ssh URL, or a local path. Direct (non-marketplace) installs are deprecated and will produce a deprecationWarning in the result.
+ /// The to monitor for cancellation requests. The default is .
+ /// Result of installing a plugin.
+ public async Task InstallAsync(string source, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(source);
+ _session.ThrowIfDisposed();
+
+ var request = new SessionPluginsInstallRequest { SessionId = _session.SessionId, Source = source };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.install", [request], cancellationToken);
+ }
+
+ /// Uninstalls a plugin when permitted by the live session's retained managed policy.
+ /// Plugin name or "plugin@marketplace" spec to uninstall. When ambiguous, prefer the fully-qualified spec.
+ /// Stable source identity for a direct (non-marketplace) install. Disambiguates uninstall when multiple installed plugins share the same name.
+ /// The to monitor for cancellation requests. The default is .
+ public async Task UninstallAsync(string name, string? directSourceId = null, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(name);
+ _session.ThrowIfDisposed();
+
+ var request = new PluginsUninstallRequestWithSession { SessionId = _session.SessionId, Name = name, DirectSourceId = directSourceId };
+ await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.uninstall", [request], cancellationToken);
+ }
+
+ /// Updates an installed plugin using the live session's authoritative account, working directory, and retained managed policy.
+ /// Plugin name or "plugin@marketplace" spec to update.
+ /// The to monitor for cancellation requests. The default is .
+ /// Result of updating a single plugin.
+ public async Task UpdateAsync(string name, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(name);
+ _session.ThrowIfDisposed();
+
+ var request = new PluginsUpdateRequestWithSession { SessionId = _session.SessionId, Name = name };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.update", [request], cancellationToken);
+ }
+
+ /// Enables installed plugins when permitted by the live session's retained managed policy.
+ /// Plugin names or "plugin@marketplace" specs to enable. Unknown names are ignored. Non-marketplace direct installs are always enabled and cannot be toggled via this API.
+ /// The to monitor for cancellation requests. The default is .
+ public async Task EnableAsync(IList names, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(names);
+ _session.ThrowIfDisposed();
+
+ var request = new SessionPluginsEnableRequest { SessionId = _session.SessionId, Names = names };
+ await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.enable", [request], cancellationToken);
+ }
+
+ /// Disables installed plugins when permitted by the live session's retained managed policy.
+ /// Plugin names or "plugin@marketplace" specs to disable. Unknown names are ignored. Non-marketplace direct installs cannot be disabled via this API; uninstall them instead. Plugin-owned MCP servers are stopped in active sessions immediately; other plugin contributions remain available until each session reloads plugins.
+ /// The to monitor for cancellation requests. The default is .
+ public async Task DisableAsync(IList names, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(names);
+ _session.ThrowIfDisposed();
+
+ var request = new SessionPluginsDisableRequest { SessionId = _session.SessionId, Names = names };
+ await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.disable", [request], cancellationToken);
+ }
+
/// Reloads the session's plugin set, refreshing MCP servers, custom agents, hooks, and skills cache so SDK-driven changes via `server.plugins.*` take effect immediately.
/// Optional flags controlling which side effects the reload performs.
/// The to monitor for cancellation requests. The default is .
@@ -36982,6 +40140,88 @@ public async Task ReloadAsync(SessionPluginsReloadRequest? request = null, Cance
var rpcRequest = new SessionPluginsReloadRequestWithSession { SessionId = _session.SessionId, ReloadMcp = request?.ReloadMcp, ReloadCustomAgents = request?.ReloadCustomAgents, ReloadHooks = request?.ReloadHooks, ReloadExtensions = request?.ReloadExtensions, DeferRepoHooks = request?.DeferRepoHooks };
await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.reload", [rpcRequest], cancellationToken);
}
+
+ /// Marketplaces APIs.
+ public PluginsMarketplacesApi Marketplaces =>
+ field ??
+ Interlocked.CompareExchange(ref field, new(_session), null) ??
+ field;
+}
+
+/// Provides session-scoped PluginsMarketplaces APIs.
+[Experimental(Diagnostics.Experimental)]
+public sealed class PluginsMarketplacesApi
+{
+ private readonly CopilotSession _session;
+
+ internal PluginsMarketplacesApi(CopilotSession session)
+ {
+ _session = session;
+ }
+
+ /// Lists registered and enterprise-managed desired marketplaces using the live session's retained policy.
+ /// The to monitor for cancellation requests. The default is .
+ /// All registered marketplaces, including built-in defaults.
+ public async Task ListAsync(CancellationToken cancellationToken = default)
+ {
+ _session.ThrowIfDisposed();
+
+ var request = new SessionPluginsMarketplacesListRequest { SessionId = _session.SessionId };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.marketplaces.list", [request], cancellationToken);
+ }
+
+ /// Adds a marketplace when permitted by the live session's retained managed policy.
+ /// Marketplace source. Accepts the same forms as the CLI: "owner/repo" or "owner/repo#ref" (GitHub), an http/https/ssh URL (optionally with #ref), a git scp-style URL (user@host:path), or a local path. The marketplace's own name (from its manifest) is used as the registration key.
+ /// Working directory used to resolve relative local paths in `source`. Defaults to the server's current working directory.
+ /// The to monitor for cancellation requests. The default is .
+ /// Result of registering a new marketplace.
+ public async Task AddAsync(string source, string? workingDirectory = null, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(source);
+ _session.ThrowIfDisposed();
+
+ var request = new PluginsMarketplacesAddRequestWithSession { SessionId = _session.SessionId, Source = source, WorkingDirectory = workingDirectory };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.marketplaces.add", [request], cancellationToken);
+ }
+
+ /// Removes a marketplace when permitted by the live session's retained managed policy.
+ /// Marketplace name to remove.
+ /// When true, also uninstall every plugin sourced from this marketplace. When false (default), removal is a no-op if any plugin from this marketplace is installed and the dependent plugin names are returned in the result.
+ /// The to monitor for cancellation requests. The default is .
+ /// Outcome of the remove attempt, including dependent-plugin info when applicable.
+ public async Task RemoveAsync(string name, bool? force = null, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(name);
+ _session.ThrowIfDisposed();
+
+ var request = new PluginsMarketplacesRemoveRequestWithSession { SessionId = _session.SessionId, Name = name, Force = force };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.marketplaces.remove", [request], cancellationToken);
+ }
+
+ /// Browses a marketplace resolved through the live session's working directory and retained managed policy.
+ /// Marketplace name to browse.
+ /// The to monitor for cancellation requests. The default is .
+ /// Plugins advertised by the marketplace.
+ public async Task BrowseAsync(string name, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(name);
+ _session.ThrowIfDisposed();
+
+ var request = new PluginsMarketplacesBrowseRequestWithSession { SessionId = _session.SessionId, Name = name };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.marketplaces.browse", [request], cancellationToken);
+ }
+
+ /// Refreshes marketplaces resolved through the live session's working directory and retained managed policy.
+ /// Optional marketplace name; omit to refresh all.
+ /// The to monitor for cancellation requests. The default is .
+ /// Result of refreshing one or more marketplace catalogs.
+ public async Task RefreshAsync(SessionPluginsMarketplacesRefreshRequest? request = null, CancellationToken cancellationToken = default)
+ {
+ _session.ThrowIfDisposed();
+
+ var rpcRequest = new SessionPluginsMarketplacesRefreshRequestWithSession { SessionId = _session.SessionId, Name = request?.Name };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.plugins.marketplaces.refresh", [rpcRequest], cancellationToken);
+ }
}
/// Provides session-scoped Provider APIs.
@@ -38469,6 +41709,43 @@ public async Task UpdateTextAsync(string id, string promp
return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.queue.updateText", [request], cancellationToken);
}
+ /// Atomically withdraws an unchanged, unconsumed user message from the local queued or steering lane. A client retaining the original draft may restore it only when removed is true. Does not interrupt the running turn.
+ /// Message identity returned by send, not the queue item id. Batch messages are not eligible.
+ /// The prompt originally sent. A message edited since submission is not withdrawn, so an obsolete draft cannot replace the edit.
+ /// The to monitor for cancellation requests. The default is .
+ /// Result of removing a queued item.
+ public async Task WithdrawMessageAsync(string messageId, string expectedPrompt, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(messageId);
+ ArgumentNullException.ThrowIfNull(expectedPrompt);
+ _session.ThrowIfDisposed();
+
+ var request = new QueueWithdrawMessageRequest { SessionId = _session.SessionId, MessageId = messageId, ExpectedPrompt = expectedPrompt };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.queue.withdrawMessage", [request], cancellationToken);
+ }
+
+ /// Atomically appends text and attachments to an unchanged, unconsumed local steering message. Returns updated=false if delivery or withdrawal already claimed the message.
+ /// Message identity returned by send, not the queue item id. Only unclaimed user steering messages are eligible.
+ /// Expected current prompt, including any previous appends. The runtime applies plan-mode normalization before comparing and refuses a changed message.
+ /// Mode captured at submission. Only steering messages in the same mode may be combined.
+ /// Text to append after a blank line.
+ /// Display text to append to the existing preview after a blank line.
+ /// Attachments to add after the message's existing attachments. An empty list preserves the existing attachments.
+ /// The to monitor for cancellation requests. The default is .
+ /// Result of editing a queued message.
+ public async Task AppendSteeringAsync(string messageId, string expectedPrompt, SendAgentMode agentMode, string prompt, string displayPrompt, IList attachments, CancellationToken cancellationToken = default)
+ {
+ ArgumentNullException.ThrowIfNull(messageId);
+ ArgumentNullException.ThrowIfNull(expectedPrompt);
+ ArgumentNullException.ThrowIfNull(prompt);
+ ArgumentNullException.ThrowIfNull(displayPrompt);
+ ArgumentNullException.ThrowIfNull(attachments);
+ _session.ThrowIfDisposed();
+
+ var request = new QueueAppendSteeringRequest { SessionId = _session.SessionId, MessageId = messageId, ExpectedPrompt = expectedPrompt, AgentMode = agentMode, Prompt = prompt, DisplayPrompt = displayPrompt, Attachments = attachments };
+ return await CopilotClient.InvokeRpcAsync(_session.Rpc, "session.queue.appendSteering", [request], cancellationToken);
+ }
+
/// Duplicates an addressable queued item immediately after its source.
/// Stable opaque ID of the queued item to duplicate.
/// The to monitor for cancellation requests. The default is .
@@ -38966,6 +42243,22 @@ public interface IFactoryHandler
Task AbortAsync(FactoryAbortRequest request, CancellationToken cancellationToken = default);
}
+/// Handles `workflow` client session API methods.
+[Experimental(Diagnostics.Experimental)]
+public interface IWorkflowHandler
+{
+ /// Asks the owning extension connection to execute a registered dynamic workflow.
+ /// Parameters sent to the owning extension to execute a workflow closure.
+ /// The to monitor for cancellation requests. The default is .
+ /// Result returned by an extension workflow closure.
+ Task ExecuteAsync(WorkflowExecuteRequest request, CancellationToken cancellationToken = default);
+ /// Asks the owning extension connection to abort a running dynamic workflow cooperatively.
+ /// Parameters for cooperatively aborting a workflow body.
+ /// The to monitor for cancellation requests. The default is .
+ /// Acknowledgement that a workflow request was accepted.
+ Task AbortAsync(WorkflowAbortRequest request, CancellationToken cancellationToken = default);
+}
+
/// Handles `tasks` client session API methods.
[Experimental(Diagnostics.Experimental)]
public interface ITasksHandler
@@ -39077,6 +42370,9 @@ public sealed class ClientSessionApiHandlers
/// Optional handler for Factory client session API methods.
public IFactoryHandler? Factory { get; set; }
+ /// Optional handler for Workflow client session API methods.
+ public IWorkflowHandler? Workflow { get; set; }
+
/// Optional handler for Tasks client session API methods.
public ITasksHandler? Tasks { get; set; }
@@ -39115,6 +42411,18 @@ public static void RegisterClientSessionApiHandlers(JsonRpc rpc, Func>)(async (request, cancellationToken) =>
+ {
+ var handler = getHandlers(request.SessionId).Workflow;
+ if (handler is null) throw new InvalidOperationException($"No workflow handler registered for session: {request.SessionId}");
+ return await handler.ExecuteAsync(request, cancellationToken);
+ }), singleObjectParam: true);
+ rpc.SetLocalRpcMethod("workflow.abort", (Func>)(async (request, cancellationToken) =>
+ {
+ var handler = getHandlers(request.SessionId).Workflow;
+ if (handler is null) throw new InvalidOperationException($"No workflow handler registered for session: {request.SessionId}");
+ return await handler.AbortAsync(request, cancellationToken);
+ }), singleObjectParam: true);
rpc.SetLocalRpcMethod("tasks.cancel", (Func>)(async (request, cancellationToken) =>
{
var handler = getHandlers(request.SessionId).Tasks;
@@ -39508,6 +42816,11 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(GitHub.Copilot.HookProgressEvent), TypeInfoPropertyName = "SessionEventsHookProgressEvent")]
[JsonSerializable(typeof(GitHub.Copilot.HookStartData), TypeInfoPropertyName = "SessionEventsHookStartData")]
[JsonSerializable(typeof(GitHub.Copilot.HookStartEvent), TypeInfoPropertyName = "SessionEventsHookStartEvent")]
+[JsonSerializable(typeof(GitHub.Copilot.IndexedSearchDisabledReason), TypeInfoPropertyName = "SessionEventsIndexedSearchDisabledReason")]
+[JsonSerializable(typeof(GitHub.Copilot.IndexedSearchErrorType), TypeInfoPropertyName = "SessionEventsIndexedSearchErrorType")]
+[JsonSerializable(typeof(GitHub.Copilot.IndexedSearchIncrementalPhase), TypeInfoPropertyName = "SessionEventsIndexedSearchIncrementalPhase")]
+[JsonSerializable(typeof(GitHub.Copilot.IndexedSearchOutcome), TypeInfoPropertyName = "SessionEventsIndexedSearchOutcome")]
+[JsonSerializable(typeof(GitHub.Copilot.IndexedSearchState), TypeInfoPropertyName = "SessionEventsIndexedSearchState")]
[JsonSerializable(typeof(GitHub.Copilot.ManagedSettingsEnforcedAction), TypeInfoPropertyName = "SessionEventsManagedSettingsEnforcedAction")]
[JsonSerializable(typeof(GitHub.Copilot.ManagedSettingsEnforcedEscalation), TypeInfoPropertyName = "SessionEventsManagedSettingsEnforcedEscalation")]
[JsonSerializable(typeof(GitHub.Copilot.ManagedSettingsResolvedSource), TypeInfoPropertyName = "SessionEventsManagedSettingsResolvedSource")]
@@ -39557,6 +42870,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(GitHub.Copilot.OmittedBinaryType), TypeInfoPropertyName = "SessionEventsOmittedBinaryType")]
[JsonSerializable(typeof(GitHub.Copilot.PendingMessagesModifiedData), TypeInfoPropertyName = "SessionEventsPendingMessagesModifiedData")]
[JsonSerializable(typeof(GitHub.Copilot.PendingMessagesModifiedEvent), TypeInfoPropertyName = "SessionEventsPendingMessagesModifiedEvent")]
+[JsonSerializable(typeof(GitHub.Copilot.PermissionApprovalEvaluation), TypeInfoPropertyName = "SessionEventsPermissionApprovalEvaluation")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionAssentDetectedData), TypeInfoPropertyName = "SessionEventsPermissionAssentDetectedData")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionAssentDetectedEvent), TypeInfoPropertyName = "SessionEventsPermissionAssentDetectedEvent")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionAssistedApproval), TypeInfoPropertyName = "SessionEventsPermissionAssistedApproval")]
@@ -39591,6 +42905,14 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestUrl), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestUrl")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionPromptRequestWrite), TypeInfoPropertyName = "SessionEventsPermissionPromptRequestWrite")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRecommendation), TypeInfoPropertyName = "SessionEventsPermissionRecommendation")]
+[JsonSerializable(typeof(GitHub.Copilot.PermissionRecoveryAttempt), TypeInfoPropertyName = "SessionEventsPermissionRecoveryAttempt")]
+[JsonSerializable(typeof(GitHub.Copilot.PermissionRecoveryAttemptDisposition), TypeInfoPropertyName = "SessionEventsPermissionRecoveryAttemptDisposition")]
+[JsonSerializable(typeof(GitHub.Copilot.PermissionRecoveryAttemptReason), TypeInfoPropertyName = "SessionEventsPermissionRecoveryAttemptReason")]
+[JsonSerializable(typeof(GitHub.Copilot.PermissionRecoveryAttemptRelation), TypeInfoPropertyName = "SessionEventsPermissionRecoveryAttemptRelation")]
+[JsonSerializable(typeof(GitHub.Copilot.PermissionRecoveryData), TypeInfoPropertyName = "SessionEventsPermissionRecoveryData")]
+[JsonSerializable(typeof(GitHub.Copilot.PermissionRecoveryOnBlocked), TypeInfoPropertyName = "SessionEventsPermissionRecoveryOnBlocked")]
+[JsonSerializable(typeof(GitHub.Copilot.PermissionRecoveryReason), TypeInfoPropertyName = "SessionEventsPermissionRecoveryReason")]
+[JsonSerializable(typeof(GitHub.Copilot.PermissionRecoveryStatus), TypeInfoPropertyName = "SessionEventsPermissionRecoveryStatus")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequest), TypeInfoPropertyName = "SessionEventsPermissionRequest")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestCustomTool), TypeInfoPropertyName = "SessionEventsPermissionRequestCustomTool")]
[JsonSerializable(typeof(GitHub.Copilot.PermissionRequestExtensionEnvAccess), TypeInfoPropertyName = "SessionEventsPermissionRequestExtensionEnvAccess")]
@@ -39623,12 +42945,26 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(GitHub.Copilot.ReasoningSummary), TypeInfoPropertyName = "SessionEventsReasoningSummary")]
[JsonSerializable(typeof(GitHub.Copilot.RecommendedAutoTier), TypeInfoPropertyName = "SessionEventsRecommendedAutoTier")]
[JsonSerializable(typeof(GitHub.Copilot.RemediationAction), TypeInfoPropertyName = "SessionEventsRemediationAction")]
+[JsonSerializable(typeof(GitHub.Copilot.ResponsesReasoning), TypeInfoPropertyName = "SessionEventsResponsesReasoning")]
[JsonSerializable(typeof(GitHub.Copilot.SamplingCompletedData), TypeInfoPropertyName = "SessionEventsSamplingCompletedData")]
[JsonSerializable(typeof(GitHub.Copilot.SamplingCompletedEvent), TypeInfoPropertyName = "SessionEventsSamplingCompletedEvent")]
[JsonSerializable(typeof(GitHub.Copilot.SamplingRequestedData), TypeInfoPropertyName = "SessionEventsSamplingRequestedData")]
[JsonSerializable(typeof(GitHub.Copilot.SamplingRequestedEvent), TypeInfoPropertyName = "SessionEventsSamplingRequestedEvent")]
+[JsonSerializable(typeof(GitHub.Copilot.SandboxAttestation), TypeInfoPropertyName = "SessionEventsSandboxAttestation")]
+[JsonSerializable(typeof(GitHub.Copilot.SandboxBackend), TypeInfoPropertyName = "SessionEventsSandboxBackend")]
+[JsonSerializable(typeof(GitHub.Copilot.SandboxBypassSource), TypeInfoPropertyName = "SessionEventsSandboxBypassSource")]
+[JsonSerializable(typeof(GitHub.Copilot.SandboxControl), TypeInfoPropertyName = "SessionEventsSandboxControl")]
[JsonSerializable(typeof(GitHub.Copilot.SandboxDecisionData), TypeInfoPropertyName = "SessionEventsSandboxDecisionData")]
[JsonSerializable(typeof(GitHub.Copilot.SandboxDecisionEvent), TypeInfoPropertyName = "SessionEventsSandboxDecisionEvent")]
+[JsonSerializable(typeof(GitHub.Copilot.SandboxDegradationReason), TypeInfoPropertyName = "SessionEventsSandboxDegradationReason")]
+[JsonSerializable(typeof(GitHub.Copilot.SandboxDenialClass), TypeInfoPropertyName = "SessionEventsSandboxDenialClass")]
+[JsonSerializable(typeof(GitHub.Copilot.SandboxDenialConfidence), TypeInfoPropertyName = "SessionEventsSandboxDenialConfidence")]
+[JsonSerializable(typeof(GitHub.Copilot.SandboxEnforcementPoint), TypeInfoPropertyName = "SessionEventsSandboxEnforcementPoint")]
+[JsonSerializable(typeof(GitHub.Copilot.SandboxFilesystemPolicyDetails), TypeInfoPropertyName = "SessionEventsSandboxFilesystemPolicyDetails")]
+[JsonSerializable(typeof(GitHub.Copilot.SandboxOutcome), TypeInfoPropertyName = "SessionEventsSandboxOutcome")]
+[JsonSerializable(typeof(GitHub.Copilot.SandboxPlatform), TypeInfoPropertyName = "SessionEventsSandboxPlatform")]
+[JsonSerializable(typeof(GitHub.Copilot.SandboxPolicySource), TypeInfoPropertyName = "SessionEventsSandboxPolicySource")]
+[JsonSerializable(typeof(GitHub.Copilot.SandboxProxyMode), TypeInfoPropertyName = "SessionEventsSandboxProxyMode")]
[JsonSerializable(typeof(GitHub.Copilot.ScheduleOrigin), TypeInfoPropertyName = "SessionEventsScheduleOrigin")]
[JsonSerializable(typeof(GitHub.Copilot.SessionEvent), TypeInfoPropertyName = "SessionEventsSessionEvent")]
[JsonSerializable(typeof(GitHub.Copilot.SessionLimitsConfig), TypeInfoPropertyName = "SessionEventsSessionLimitsConfig")]
@@ -39690,6 +43026,8 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationShellCompleted), TypeInfoPropertyName = "SessionEventsSystemNotificationShellCompleted")]
[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationShellDetachedCompleted), TypeInfoPropertyName = "SessionEventsSystemNotificationShellDetachedCompleted")]
[JsonSerializable(typeof(GitHub.Copilot.SystemNotificationUnclassified), TypeInfoPropertyName = "SessionEventsSystemNotificationUnclassified")]
+[JsonSerializable(typeof(GitHub.Copilot.TaskBlocker), TypeInfoPropertyName = "SessionEventsTaskBlocker")]
+[JsonSerializable(typeof(GitHub.Copilot.TaskBlockerKind), TypeInfoPropertyName = "SessionEventsTaskBlockerKind")]
[JsonSerializable(typeof(GitHub.Copilot.TaskCompletionOutcome), TypeInfoPropertyName = "SessionEventsTaskCompletionOutcome")]
[JsonSerializable(typeof(GitHub.Copilot.ToolExecutionCompleteContent), TypeInfoPropertyName = "SessionEventsToolExecutionCompleteContent")]
[JsonSerializable(typeof(GitHub.Copilot.ToolExecutionCompleteContentAudio), TypeInfoPropertyName = "SessionEventsToolExecutionCompleteContentAudio")]
@@ -39814,14 +43152,20 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(CanvasSessionContext))]
[JsonSerializable(typeof(CapiSessionOptions))]
[JsonSerializable(typeof(CardDigest))]
+[JsonSerializable(typeof(CatalogAgentPluginCandidateProvenance))]
[JsonSerializable(typeof(CatalogAiSkillCandidateProvenance))]
[JsonSerializable(typeof(CatalogCandidate))]
[JsonSerializable(typeof(CatalogCandidateSource))]
[JsonSerializable(typeof(CatalogClientContract))]
[JsonSerializable(typeof(CatalogMcpServerCandidateProvenance))]
[JsonSerializable(typeof(CatalogNegotiatedContract))]
+[JsonSerializable(typeof(CatalogPluginRepositorySource))]
+[JsonSerializable(typeof(CatalogSearchPage))]
+[JsonSerializable(typeof(CatalogSearchPagination))]
[JsonSerializable(typeof(CatalogSearchRequest))]
[JsonSerializable(typeof(CatalogSearchResult))]
+[JsonSerializable(typeof(CatalogSelectionRequest))]
+[JsonSerializable(typeof(CatalogSelectionResult))]
[JsonSerializable(typeof(CatalogTrustProvenance))]
[JsonSerializable(typeof(CatalogTrustSnapshot))]
[JsonSerializable(typeof(ClientTaskCancelRequest))]
@@ -39851,6 +43195,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(ContextHeaviestMessage))]
[JsonSerializable(typeof(CopilotUserResponse))]
[JsonSerializable(typeof(CopilotUserResponseEndpoints))]
+[JsonSerializable(typeof(CopilotUserResponseEnterpriseList))]
[JsonSerializable(typeof(CopilotUserResponseOrganizationListItem))]
[JsonSerializable(typeof(CopilotUserResponseQuotaSnapshots))]
[JsonSerializable(typeof(CopilotUserResponseQuotaSnapshotsChat))]
@@ -39993,6 +43338,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(LogResult))]
[JsonSerializable(typeof(LspInitializeRequest))]
[JsonSerializable(typeof(ManagedSettingsReadResult))]
+[JsonSerializable(typeof(ManagedSettingsResolvedData))]
[JsonSerializable(typeof(MarketplaceAddResult))]
[JsonSerializable(typeof(MarketplaceBrowseResult))]
[JsonSerializable(typeof(MarketplaceInfo))]
@@ -40232,11 +43578,16 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(PluginsEnableRequest))]
[JsonSerializable(typeof(PluginsInstallRequest))]
[JsonSerializable(typeof(PluginsMarketplacesAddRequest))]
+[JsonSerializable(typeof(PluginsMarketplacesAddRequestWithSession))]
[JsonSerializable(typeof(PluginsMarketplacesBrowseRequest))]
+[JsonSerializable(typeof(PluginsMarketplacesBrowseRequestWithSession))]
[JsonSerializable(typeof(PluginsMarketplacesRefreshRequest))]
[JsonSerializable(typeof(PluginsMarketplacesRemoveRequest))]
+[JsonSerializable(typeof(PluginsMarketplacesRemoveRequestWithSession))]
[JsonSerializable(typeof(PluginsUninstallRequest))]
+[JsonSerializable(typeof(PluginsUninstallRequestWithSession))]
[JsonSerializable(typeof(PluginsUpdateRequest))]
+[JsonSerializable(typeof(PluginsUpdateRequestWithSession))]
[JsonSerializable(typeof(ProtocolExternalToolDefinition))]
[JsonSerializable(typeof(ProtocolMarkerSectionOverride))]
[JsonSerializable(typeof(ProtocolSectionOverride))]
@@ -40262,6 +43613,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(PushAttachmentSelectionDetailsEnd))]
[JsonSerializable(typeof(PushAttachmentSelectionDetailsStart))]
[JsonSerializable(typeof(PushGitHubRepoRef))]
+[JsonSerializable(typeof(QueueAppendSteeringRequest))]
[JsonSerializable(typeof(QueueBeginDeferredIdleDrainRequest))]
[JsonSerializable(typeof(QueueBeginDeferredIdleDrainResult))]
[JsonSerializable(typeof(QueueConsumeSystemNotificationsRequest))]
@@ -40288,6 +43640,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(QueueSnapshotResult))]
[JsonSerializable(typeof(QueueUpdateTextRequest))]
[JsonSerializable(typeof(QueueUpdateTextResult))]
+[JsonSerializable(typeof(QueueWithdrawMessageRequest))]
[JsonSerializable(typeof(QueuedCommandResult))]
[JsonSerializable(typeof(RegisterEventInterestParams))]
[JsonSerializable(typeof(RegisterEventInterestResult))]
@@ -40420,6 +43773,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(SessionListEntry))]
[JsonSerializable(typeof(SessionListFilter))]
[JsonSerializable(typeof(SessionLoadDeferredRepoHooksResult))]
+[JsonSerializable(typeof(SessionManagedSettingsGetRequest))]
[JsonSerializable(typeof(SessionMcpAppsGetHostContextRequest))]
[JsonSerializable(typeof(SessionMcpListRequest))]
[JsonSerializable(typeof(SessionMcpMoveLoadingToBackgroundRequest))]
@@ -40444,7 +43798,13 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(SessionPlanReadRequest))]
[JsonSerializable(typeof(SessionPlanReadSqlTodosRequest))]
[JsonSerializable(typeof(SessionPlanReadSqlTodosWithDependenciesRequest))]
+[JsonSerializable(typeof(SessionPluginsDisableRequest))]
+[JsonSerializable(typeof(SessionPluginsEnableRequest))]
+[JsonSerializable(typeof(SessionPluginsInstallRequest))]
[JsonSerializable(typeof(SessionPluginsListRequest))]
+[JsonSerializable(typeof(SessionPluginsMarketplacesListRequest))]
+[JsonSerializable(typeof(SessionPluginsMarketplacesRefreshRequest))]
+[JsonSerializable(typeof(SessionPluginsMarketplacesRefreshRequestWithSession))]
[JsonSerializable(typeof(SessionPluginsReloadRequest))]
[JsonSerializable(typeof(SessionPluginsReloadRequestWithSession))]
[JsonSerializable(typeof(SessionProviderGetEndpointRequest))]
@@ -40494,6 +43854,7 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(SessionUpdateOptionsResult))]
[JsonSerializable(typeof(SessionUsageGetMetricsRequest))]
[JsonSerializable(typeof(SessionVisibilityGetRequest))]
+[JsonSerializable(typeof(SessionWorkflowPauseAtCheckpointResult))]
[JsonSerializable(typeof(SessionWorkingDirectoryContext))]
[JsonSerializable(typeof(SessionWorkspacesAutopilotObjectiveExistsRequest))]
[JsonSerializable(typeof(SessionWorkspacesDeleteAutopilotObjectiveRequest))]
@@ -40664,6 +44025,46 @@ public static void RegisterClientGlobalApiHandlers(JsonRpc rpc, ClientGlobalApiH
[JsonSerializable(typeof(VisibilityGetResult))]
[JsonSerializable(typeof(VisibilitySetRequest))]
[JsonSerializable(typeof(VisibilitySetResult))]
+[JsonSerializable(typeof(WorkflowAbortRequest))]
+[JsonSerializable(typeof(WorkflowAckResult))]
+[JsonSerializable(typeof(WorkflowAgentOptions))]
+[JsonSerializable(typeof(WorkflowAgentRequest))]
+[JsonSerializable(typeof(WorkflowAgentResult))]
+[JsonSerializable(typeof(WorkflowAgentSummary))]
+[JsonSerializable(typeof(WorkflowCancelRequest))]
+[JsonSerializable(typeof(WorkflowCurrentPhase))]
+[JsonSerializable(typeof(WorkflowDeclaredLimits))]
+[JsonSerializable(typeof(WorkflowExecuteRequest))]
+[JsonSerializable(typeof(WorkflowExecuteResult))]
+[JsonSerializable(typeof(WorkflowGetRunProgressRequest))]
+[JsonSerializable(typeof(WorkflowGetRunRequest))]
+[JsonSerializable(typeof(WorkflowJournalGetRequest))]
+[JsonSerializable(typeof(WorkflowJournalGetResult))]
+[JsonSerializable(typeof(WorkflowJournalPutRequest))]
+[JsonSerializable(typeof(WorkflowListRunsRequest))]
+[JsonSerializable(typeof(WorkflowListRunsResult))]
+[JsonSerializable(typeof(WorkflowLogLine))]
+[JsonSerializable(typeof(WorkflowLogRequest))]
+[JsonSerializable(typeof(WorkflowPauseCheckpointRequest))]
+[JsonSerializable(typeof(WorkflowPauseInfo))]
+[JsonSerializable(typeof(WorkflowPauseRequest))]
+[JsonSerializable(typeof(WorkflowPhaseObservation))]
+[JsonSerializable(typeof(WorkflowProgressLine))]
+[JsonSerializable(typeof(WorkflowProgressPage))]
+[JsonSerializable(typeof(WorkflowResumeRequest))]
+[JsonSerializable(typeof(WorkflowResumeResult))]
+[JsonSerializable(typeof(WorkflowRunConsumed))]
+[JsonSerializable(typeof(WorkflowRunDetail))]
+[JsonSerializable(typeof(WorkflowRunFailure))]
+[JsonSerializable(typeof(WorkflowRunLimits))]
+[JsonSerializable(typeof(WorkflowRunOptions))]
+[JsonSerializable(typeof(WorkflowRunRequest))]
+[JsonSerializable(typeof(WorkflowRunResult))]
+[JsonSerializable(typeof(WorkflowRunSummary))]
+[JsonSerializable(typeof(WorkflowRunTerminal))]
+[JsonSerializable(typeof(WorkflowToolResumeRequest))]
+[JsonSerializable(typeof(WorkflowToolRunOptions))]
+[JsonSerializable(typeof(WorkflowToolRunRequest))]
[JsonSerializable(typeof(WorkspaceDiffFileChange))]
[JsonSerializable(typeof(WorkspaceDiffResult))]
[JsonSerializable(typeof(WorkspacesAddSummaryRequest))]
diff --git a/dotnet/src/Generated/SessionEvents.cs b/dotnet/src/Generated/SessionEvents.cs
index f643dc002c..0f0a16bee7 100644
--- a/dotnet/src/Generated/SessionEvents.cs
+++ b/dotnet/src/Generated/SessionEvents.cs
@@ -117,6 +117,7 @@ namespace GitHub.Copilot;
[JsonDerivedType(typeof(SessionFusionRouteStartedEvent), "session.fusion_route_started")]
[JsonDerivedType(typeof(SessionHandoffEvent), "session.handoff")]
[JsonDerivedType(typeof(SessionIdleEvent), "session.idle")]
+[JsonDerivedType(typeof(SessionIndexedSearchEvent), "session.indexed_search")]
[JsonDerivedType(typeof(SessionInfoEvent), "session.info")]
[JsonDerivedType(typeof(SessionManagedSettingsEnforcedEvent), "session.managed_settings_enforced")]
[JsonDerivedType(typeof(SessionManagedSettingsResolvedEvent), "session.managed_settings_resolved")]
@@ -127,6 +128,7 @@ namespace GitHub.Copilot;
[JsonDerivedType(typeof(SessionModeChangedEvent), "session.mode_changed")]
[JsonDerivedType(typeof(SessionModeNoticeDeliveredEvent), "session.mode_notice_delivered")]
[JsonDerivedType(typeof(SessionModelChangeEvent), "session.model_change")]
+[JsonDerivedType(typeof(SessionPermissionRecoveryEvent), "session.permission_recovery")]
[JsonDerivedType(typeof(SessionPermissionsChangedEvent), "session.permissions_changed")]
[JsonDerivedType(typeof(SessionPlanChangedEvent), "session.plan_changed")]
[JsonDerivedType(typeof(SessionRemoteSteerableChangedEvent), "session.remote_steerable_changed")]
@@ -355,6 +357,19 @@ public sealed partial class SessionInfoEvent : SessionEvent
public required SessionInfoData Data { get; set; }
}
+/// Transient indexed-search status and diagnostics from the live runtime service. Never persisted or used to infer activation from session history.
+/// Represents the session.indexed_search event.
+public sealed partial class SessionIndexedSearchEvent : SessionEvent
+{
+ ///
+ [JsonIgnore]
+ public override string Type => "session.indexed_search";
+
+ /// The session.indexed_search event payload.
+ [JsonPropertyName("data")]
+ public required SessionIndexedSearchData Data { get; set; }
+}
+
/// Warning message for timeline display with categorization.
/// Represents the session.warning event.
public sealed partial class SessionWarningEvent : SessionEvent
@@ -713,6 +728,19 @@ public sealed partial class SessionFusionCompletedEvent : SessionEvent
public required SessionFusionCompletedData Data { get; set; }
}
+/// Authoritative snapshot of an Autopilot permission-recovery episode.
+/// Represents the session.permission_recovery event.
+public sealed partial class SessionPermissionRecoveryEvent : SessionEvent
+{
+ ///
+ [JsonIgnore]
+ public override string Type => "session.permission_recovery";
+
+ /// The session.permission_recovery event payload.
+ [JsonPropertyName("data")]
+ public required SessionPermissionRecoveryData Data { get; set; }
+}
+
/// Payload of `user.message` with displayed and model-transformed content, attachments, source/delivery metadata, mode, and telemetry IDs.
/// Represents the user.message event.
public sealed partial class UserMessageEvent : SessionEvent
@@ -2500,6 +2528,23 @@ public sealed partial class SessionInfoData
public string? Url { get; set; }
}
+/// Transient indexed-search status and diagnostics from the live runtime service. Never persisted or used to infer activation from session history.
+/// Polymorphic base type discriminated by kind.
+[JsonPolymorphic(
+ TypeDiscriminatorPropertyName = "kind",
+ UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
+[JsonDerivedType(typeof(SessionIndexedSearchDataStatus), "status")]
+[JsonDerivedType(typeof(SessionIndexedSearchDataStartup), "startup")]
+[JsonDerivedType(typeof(SessionIndexedSearchDataServerError), "server_error")]
+[JsonDerivedType(typeof(SessionIndexedSearchDataIncremental), "incremental")]
+public partial class SessionIndexedSearchData
+{
+ /// The type discriminator.
+ [JsonPropertyName("kind")]
+ public virtual string Kind { get; set; } = string.Empty;
+}
+
+
/// Warning message for timeline display with categorization.
public sealed partial class SessionWarningData
{
@@ -3095,6 +3140,11 @@ public sealed partial class SessionCompactionCompleteData
[JsonPropertyName("requestId")]
public string? RequestId { get; set; }
+ /// Reasoning baseline on the replacement summary, preserved when replay skips the compacted history.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("responsesReasoning")]
+ public ResponsesReasoning? ResponsesReasoning { get; set; }
+
/// Copilot service request ID (x-copilot-service-request-id header) for the compaction LLM call.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("serviceRequestId")]
@@ -3143,6 +3193,11 @@ public sealed partial class SessionCompactionCompleteData
/// Task completion notification with summary from the agent.
public sealed partial class SessionTaskCompleteData
{
+ /// Structured blocker details when outcome is blocked.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("blocker")]
+ public TaskBlocker? Blocker { get; set; }
+
/// Active autopilot objective ID evaluated by the completion reviewer.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("objectiveId")]
@@ -3444,6 +3499,34 @@ public sealed partial class SessionFusionCompletedData
public required string TurnId { get; set; }
}
+/// Authoritative snapshot of an Autopilot permission-recovery episode.
+public sealed partial class SessionPermissionRecoveryData
+{
+ /// Ordered privacy-safe record of permission attempts and the successful alternative, when any.
+ [JsonPropertyName("attempts")]
+ public required PermissionRecoveryAttempt[] Attempts { get; set; }
+
+ /// Stable identifier shared by every transition in this recovery episode.
+ [JsonPropertyName("episodeId")]
+ public required string EpisodeId { get; set; }
+
+ /// Maximum number of distinct autonomous permission attempts allowed before escalation.
+ [JsonPropertyName("maxAttempts")]
+ public required long MaxAttempts { get; set; }
+
+ /// Policy selected from the current client's response capability; mode or client changes may update it during recovery.
+ [JsonPropertyName("onBlocked")]
+ public required PermissionRecoveryOnBlocked OnBlocked { get; set; }
+
+ /// Controlled reason for the latest episode transition.
+ [JsonPropertyName("reason")]
+ public required PermissionRecoveryReason Reason { get; set; }
+
+ /// Current lifecycle state of the recovery episode.
+ [JsonPropertyName("status")]
+ public required PermissionRecoveryStatus Status { get; set; }
+}
+
/// Payload of `user.message` with displayed and model-transformed content, attachments, source/delivery metadata, mode, and telemetry IDs.
public sealed partial class UserMessageData
{
@@ -3491,6 +3574,11 @@ public sealed partial class UserMessageData
[JsonPropertyName("parentAgentTaskId")]
public string? ParentAgentTaskId { get; set; }
+ /// Responses reasoning settings anchored before this model-facing message, for cache-stable history replay.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("responsesReasoning")]
+ public ResponsesReasoning? ResponsesReasoning { get; set; }
+
/// Origin of this message, used for timeline filtering and attribution (e.g., `skill-pdf` for hidden skill injection or `agent-<agent-id>` for an inter-agent prompt).
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("source")]
@@ -4293,6 +4381,18 @@ public sealed partial class AssistantUsageData
[JsonPropertyName("serviceRequestId")]
public string? ServiceRequestId { get; set; }
+ /// Number of prior thinking blocks the provider dropped while transforming the request.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonInclude]
+ [JsonPropertyName("thinkingDroppedBlocks")]
+ internal long? ThinkingDroppedBlocks { get; set; }
+
+ /// Recognized provider-reported reasons for dropped thinking blocks, in response order.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonInclude]
+ [JsonPropertyName("thinkingDroppedReasons")]
+ internal string[]? ThinkingDroppedReasons { get; set; }
+
/// Time to first token in milliseconds. Only available for streaming requests.
[JsonConverter(typeof(MillisecondsTimeSpanConverter))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
@@ -4893,6 +4993,11 @@ public sealed partial class SkillInvokedData
[JsonPropertyName("disableModelInvocation")]
public bool? DisableModelInvocation { get; set; }
+ /// Projected chat-message count when the skill was invoked. New writers persist this so replay does not need to reconstruct superseded history; readers derive it for legacy events when absent.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("invokedAtTurn")]
+ public long? InvokedAtTurn { get; set; }
+
/// Model identifier active when the skill was invoked, when known.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("model")]
@@ -4953,6 +5058,11 @@ public sealed partial class SkillInvokedRefData
[JsonPropertyName("disableModelInvocation")]
public bool? DisableModelInvocation { get; set; }
+ /// Projected chat-message count when the skill was invoked. Preserved from the inline event data when the authored body is deduplicated.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("invokedAtTurn")]
+ public long? InvokedAtTurn { get; set; }
+
/// Model identifier active when the skill was invoked, when known.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("model")]
@@ -5032,7 +5142,24 @@ public sealed partial class SkillContextDeliveredRefData
}
/// Payload of `sandbox.decision`, a bounded governance record of what the process sandbox was configured to do and whether it took effect. Discriminated by `kind`.
-public sealed partial class SandboxDecisionData { }
+/// Polymorphic base type discriminated by kind.
+[JsonPolymorphic(
+ TypeDiscriminatorPropertyName = "kind",
+ UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FallBackToBaseType)]
+[JsonDerivedType(typeof(SandboxDecisionDataPolicyResolved), "policy_resolved")]
+[JsonDerivedType(typeof(SandboxDecisionDataSpawnCompleted), "spawn_completed")]
+[JsonDerivedType(typeof(SandboxDecisionDataEnforcementState), "enforcement_state")]
+[JsonDerivedType(typeof(SandboxDecisionDataAccessDenied), "access_denied")]
+[JsonDerivedType(typeof(SandboxDecisionDataBypassDecided), "bypass_decided")]
+[JsonDerivedType(typeof(SandboxDecisionDataPermissiveRetryDecided), "permissive_retry_decided")]
+[JsonDerivedType(typeof(SandboxDecisionDataPermissiveRetryCompleted), "permissive_retry_completed")]
+public partial class SandboxDecisionData
+{
+ /// The type discriminator.
+ [JsonPropertyName("kind")]
+ public virtual string Kind { get; set; } = string.Empty;
+}
+
/// Sub-agent startup details including parent tool call and agent information.
public sealed partial class SubagentStartedData
@@ -5428,6 +5555,11 @@ public sealed partial class SystemNotificationData
/// Structured metadata identifying what triggered this notification.
[JsonPropertyName("kind")]
public required SystemNotification Kind { get; set; }
+
+ /// Responses reasoning settings anchored before this model-facing message, for cache-stable history replay.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("responsesReasoning")]
+ public ResponsesReasoning? ResponsesReasoning { get; set; }
}
/// Permission request notification requiring client approval with request details.
@@ -5438,6 +5570,11 @@ public sealed partial class PermissionRequestedData
[JsonPropertyName("agentMode")]
public SessionMode? AgentMode { get; set; }
+ /// Permission mode captured when evaluation began. Absent on historical events.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("permissionMode")]
+ public PermissionMode? PermissionMode { get; set; }
+
/// Details of the permission being requested.
[JsonPropertyName("permissionRequest")]
public required PermissionRequest PermissionRequest { get; set; }
@@ -5447,6 +5584,11 @@ public sealed partial class PermissionRequestedData
[JsonPropertyName("promptRequest")]
public PermissionPromptRequest? PromptRequest { get; set; }
+ /// Permission-recovery episode that authorized this request to surface for interactive attention.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("recoveryEpisodeId")]
+ public string? RecoveryEpisodeId { get; set; }
+
/// Unique identifier for this permission request; used to respond via session.respondToPermission().
[JsonPropertyName("requestId")]
public required string RequestId { get; set; }
@@ -5465,12 +5607,22 @@ public sealed partial class PermissionRequestedData
/// Permission request completion notification signaling UI dismissal.
public sealed partial class PermissionCompletedData
{
+ /// Atomic structured blocked outcome when this permission response ended an Autopilot recovery episode unsuccessfully.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("blocker")]
+ public TaskBlocker? Blocker { get; set; }
+
/// Who decided this permission request. Absent on completions recorded before this field existed, which consumers must treat as "not a human decision" rather than assuming one. Authorization records are minted only for `human_response`; an assisted-approval verdict, a host policy, an unattended fallback, and a hook resolution all produce the same `result` a person does, so this is the only field that distinguishes them.
[Experimental(Diagnostics.Experimental)]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("decisionSource")]
public PermissionDecisionSource? DecisionSource { get; set; }
+ /// Permission-recovery episode settled by this response, when the request was escalated by Autopilot.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("recoveryEpisodeId")]
+ public string? RecoveryEpisodeId { get; set; }
+
/// Request ID of the resolved permission request; clients should dismiss any UI for this request.
[JsonPropertyName("requestId")]
public required string RequestId { get; set; }
@@ -6708,6 +6860,131 @@ public sealed partial class SessionLimitsConfig
public double? MaxAiCredits { get; set; }
}
+/// The status variant of .
+public sealed partial class SessionIndexedSearchDataStatus : SessionIndexedSearchData
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "status";
+
+ /// Current indexed-search state for this session activation.
+ [JsonPropertyName("state")]
+ public required IndexedSearchState State { get; set; }
+}
+
+/// The startup variant of .
+public sealed partial class SessionIndexedSearchDataStartup : SessionIndexedSearchData
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "startup";
+
+ /// Why indexed search was disabled, when applicable.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("disabledReason")]
+ public IndexedSearchDisabledReason? DisabledReason { get; set; }
+
+ /// Whether the repository meets the automatic indexing file-count threshold, when known.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("eligible")]
+ public bool? Eligible { get; set; }
+
+ /// Startup failure details. May contain sensitive user data; restricted telemetry only.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("errorMessage")]
+ public string? ErrorMessage { get; set; }
+
+ /// Number of text files counted in the repository.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("fileCount")]
+ public double? FileCount { get; set; }
+
+ /// Whether indexed search was explicitly enabled through the environment.
+ [JsonPropertyName("forcedByEnv")]
+ public required bool ForcedByEnv { get; set; }
+
+ /// Outcome of this startup attempt.
+ [JsonPropertyName("outcome")]
+ public required IndexedSearchOutcome Outcome { get; set; }
+
+ /// Wall-clock duration of startup in milliseconds.
+ [JsonPropertyName("startupDurationMs")]
+ public required double StartupDurationMs { get; set; }
+
+ /// Whether waiting for index readiness was requested, including skipped attempts.
+ [JsonPropertyName("warmStart")]
+ public required bool WarmStart { get; set; }
+}
+
+/// The server_error variant of .
+public sealed partial class SessionIndexedSearchDataServerError : SessionIndexedSearchData
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "server_error";
+
+ /// Server failure details. May contain sensitive user data; restricted telemetry only.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("errorMessage")]
+ public string? ErrorMessage { get; set; }
+
+ /// Category of the server failure.
+ [JsonPropertyName("errorType")]
+ public required IndexedSearchErrorType ErrorType { get; set; }
+
+ /// Process exit code, when available.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("exitCode")]
+ public double? ExitCode { get; set; }
+}
+
+/// The incremental variant of .
+public sealed partial class SessionIndexedSearchDataIncremental : SessionIndexedSearchData
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "incremental";
+
+ /// Number of added files.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("addedFileCount")]
+ public double? AddedFileCount { get; set; }
+
+ /// Number of modified files.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("changedFileCount")]
+ public double? ChangedFileCount { get; set; }
+
+ /// Number of deleted files.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("deletedFileCount")]
+ public double? DeletedFileCount { get; set; }
+
+ /// Phase of the incremental index update.
+ [JsonPropertyName("phase")]
+ public required IndexedSearchIncrementalPhase Phase { get; set; }
+
+ /// Total number of detected changes.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("totalChangeCount")]
+ public double? TotalChangeCount { get; set; }
+
+ /// Total incremental indexing duration in milliseconds.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("totalDurationMs")]
+ public double? TotalDurationMs { get; set; }
+
+ /// Index update duration in milliseconds.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("updateDurationMs")]
+ public double? UpdateDurationMs { get; set; }
+
+ /// Workspace scan duration in milliseconds.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("walkDurationMs")]
+ public double? WalkDurationMs { get; set; }
+}
+
/// Repository context for the handed-off session.
/// Nested data type for HandoffRepository.
public sealed partial class HandoffRepository
@@ -6963,6 +7240,111 @@ public sealed partial class CompactionCompleteCompactionTokensUsed
public long? OutputTokens { get; set; }
}
+/// Original request-level and effective conversation reasoning effort for a Responses history boundary.
+/// Nested data type for ResponsesReasoning.
+public sealed partial class ResponsesReasoning
+{
+ /// Effective effort selected before this message, independent of the response-level reasoning field.
+ [JsonPropertyName("effort")]
+ public required string Effort { get; set; }
+
+ /// Original request-level effort, retained while replaying this conversation prefix.
+ [JsonPropertyName("initialEffort")]
+ public required string InitialEffort { get; set; }
+
+ /// Provider model whose reasoning settings this boundary records.
+ [JsonPropertyName("model")]
+ public required string Model { get; set; }
+}
+
+/// Nested data type for PermissionRecoveryAttempt.
+public sealed partial class PermissionRecoveryAttempt
+{
+ /// Unique identifier for this attempt record.
+ [JsonPropertyName("attemptId")]
+ public required string AttemptId { get; set; }
+
+ /// How the runtime handled this attempt.
+ [JsonPropertyName("disposition")]
+ public required PermissionRecoveryAttemptDisposition Disposition { get; set; }
+
+ /// One-based position of this attempt in the episode.
+ [JsonPropertyName("ordinal")]
+ public required long Ordinal { get; set; }
+
+ /// Controlled permission request kind, such as shell, path, URL, or tool.
+ [JsonPropertyName("permissionKind")]
+ public required string PermissionKind { get; set; }
+
+ /// Controlled reason for the attempt disposition.
+ [JsonPropertyName("reason")]
+ public required PermissionRecoveryAttemptReason Reason { get; set; }
+
+ /// Relationship between this attempt and earlier attempts in the episode.
+ [JsonPropertyName("relation")]
+ public required PermissionRecoveryAttemptRelation Relation { get; set; }
+
+ /// SHA-256 fingerprint of normalized request data; raw permission arguments are not included.
+ [JsonPropertyName("requestFingerprint")]
+ public required string RequestFingerprint { get; set; }
+
+ /// Tool-call identifier associated with this attempt, when available.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("toolCallId")]
+ public string? ToolCallId { get; set; }
+}
+
+/// Authoritative snapshot of an Autopilot permission-recovery episode.
+/// Nested data type for PermissionRecoveryData.
+public sealed partial class PermissionRecoveryData
+{
+ /// Ordered privacy-safe record of permission attempts and the successful alternative, when any.
+ [JsonPropertyName("attempts")]
+ public required PermissionRecoveryAttempt[] Attempts { get; set; }
+
+ /// Stable identifier shared by every transition in this recovery episode.
+ [JsonPropertyName("episodeId")]
+ public required string EpisodeId { get; set; }
+
+ /// Maximum number of distinct autonomous permission attempts allowed before escalation.
+ [JsonPropertyName("maxAttempts")]
+ public required long MaxAttempts { get; set; }
+
+ /// Policy selected from the current client's response capability; mode or client changes may update it during recovery.
+ [JsonPropertyName("onBlocked")]
+ public required PermissionRecoveryOnBlocked OnBlocked { get; set; }
+
+ /// Controlled reason for the latest episode transition.
+ [JsonPropertyName("reason")]
+ public required PermissionRecoveryReason Reason { get; set; }
+
+ /// Current lifecycle state of the recovery episode.
+ [JsonPropertyName("status")]
+ public required PermissionRecoveryStatus Status { get; set; }
+}
+
+/// Structured reason that the task cannot continue without intervention.
+/// Nested data type for TaskBlocker.
+[Experimental(Diagnostics.Experimental)]
+public sealed partial class TaskBlocker
+{
+ /// Category of intervention that blocked the task.
+ [JsonPropertyName("kind")]
+ public required TaskBlockerKind Kind { get; set; }
+
+ /// Permission-recovery episode that produced this blocker.
+ [JsonPropertyName("permissionRecovery")]
+ public required PermissionRecoveryData PermissionRecovery { get; set; }
+
+ /// Controlled reason for the current blocked state.
+ [JsonPropertyName("reason")]
+ public required PermissionRecoveryReason Reason { get; set; }
+
+ /// Whether a later user response or steering message can resume the task.
+ [JsonPropertyName("resumable")]
+ public required bool Resumable { get; set; }
+}
+
/// Inclusive durable event range summarized by a completion receipt.
/// Nested data type for CompletionReceiptEventRange.
public sealed partial class CompletionReceiptEventRange
@@ -8997,90 +9379,514 @@ public sealed partial class ToolExecutionCompleteToolDescription
public required string Name { get; set; }
}
-/// Error details when the hook failed.
-/// Nested data type for HookEndError.
-public sealed partial class HookEndError
+/// Effective sandbox filesystem rules, in policy order. Only populated when content capture is enabled, since these are real host paths.
+/// Nested data type for SandboxFilesystemPolicyDetails.
+public sealed partial class SandboxFilesystemPolicyDetails
{
- /// Human-readable error message.
- [JsonPropertyName("message")]
- public required string Message { get; set; }
-
- /// Source label of the hook that errored (e.g. the plugin it was loaded from), when known.
- [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
- [JsonPropertyName("source")]
- public string? Source { get; set; }
-
- /// Error stack trace, when available.
- [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
- [JsonPropertyName("stack")]
- public string? Stack { get; set; }
-}
+ /// Paths the sandboxed process may not access at all.
+ [JsonPropertyName("deniedPaths")]
+ public required string[] DeniedPaths { get; set; }
-/// Metadata about the prompt template and its construction.
-/// Nested data type for SystemMessageMetadata.
-public sealed partial class SystemMessageMetadata
-{
- /// Version identifier of the prompt template used.
- [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
- [JsonPropertyName("promptVersion")]
- public string? PromptVersion { get; set; }
+ /// Paths the sandboxed process may read but not write.
+ [JsonPropertyName("readonlyPaths")]
+ public required string[] ReadonlyPaths { get; set; }
- /// Template variables used when constructing the prompt.
- [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
- [JsonPropertyName("variables")]
- public IDictionary? Variables { get; set; }
+ /// Paths the sandboxed process may read and write.
+ [JsonPropertyName("readwritePaths")]
+ public required string[] ReadwritePaths { get; set; }
}
-/// System notification metadata for a background agent that completed or failed, including agent ID, type, status, description, and prompt.
-/// The agent_completed variant of .
-public sealed partial class SystemNotificationAgentCompleted : SystemNotification
+/// The policy_resolved variant of .
+public sealed partial class SandboxDecisionDataPolicyResolved : SandboxDecisionData
{
///
[JsonIgnore]
- public override string Type => "agent_completed";
+ public override string Kind => "policy_resolved";
- /// Unique task identifier.
- [JsonPropertyName("agentId")]
- public required string AgentId { get; set; }
+ /// Whether the current working directory was granted automatically.
+ [JsonPropertyName("addCurrentWorkingDirectory")]
+ public required bool AddCurrentWorkingDirectory { get; set; }
- /// Type of the agent (e.g., explore, task, general-purpose).
- [JsonPropertyName("agentType")]
- public required string AgentType { get; set; }
+ /// Whether callers may opt an individual command out of the sandbox.
+ [JsonPropertyName("allowBypass")]
+ public required bool AllowBypass { get; set; }
- /// Human-readable description of the agent task.
- [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
- [JsonPropertyName("description")]
- public string? Description { get; set; }
+ /// Whether the sandboxed process may reach loopback and private-range addresses.
+ [JsonPropertyName("allowLocalNetwork")]
+ public required bool AllowLocalNetwork { get; set; }
- /// Friendly, non-unique name intended for display.
+ /// Whether the sandboxed process may open outbound network connections.
+ [JsonPropertyName("allowOutbound")]
+ public required bool AllowOutbound { get; set; }
+
+ /// Process-containment implementation backing the sandbox.
+ [JsonPropertyName("backend")]
+ public required SandboxBackend Backend { get; set; }
+
+ /// Enforcement mechanism this decision describes.
+ [JsonPropertyName("control")]
+ public required SandboxControl Control { get; set; }
+
+ /// Why enforcement is weaker than configured, when it is.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
- [JsonPropertyName("displayName")]
- public string? DisplayName { get; set; }
+ [JsonPropertyName("degradationReason")]
+ public SandboxDegradationReason? DegradationReason { get; set; }
- /// The full prompt given to the background agent.
+ /// Number of denied path rules in the effective policy.
+ [JsonPropertyName("deniedPathsCount")]
+ public required long DeniedPathsCount { get; set; }
+
+ /// Effective filesystem rules. Populated only when content capture is enabled; the counts above are always present.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
- [JsonPropertyName("prompt")]
- public string? Prompt { get; set; }
+ [JsonPropertyName("effectiveFilesystemPolicy")]
+ public SandboxFilesystemPolicyDetails? EffectiveFilesystemPolicy { get; set; }
- /// Whether the agent completed successfully or failed.
- [JsonPropertyName("status")]
- public required SystemNotificationAgentCompletedStatus Status { get; set; }
+ /// Runtime subsystem that applied the policy.
+ [JsonPropertyName("enforcementPoint")]
+ public required SandboxEnforcementPoint EnforcementPoint { get; set; }
+
+ /// Whether the sandbox policy permits GitHub CLI credentials inside the sandbox. A policy capability, not proof that a credential was injected into this spawn: injection is per-command.
+ [JsonPropertyName("ghAuth")]
+ public required bool GhAuth { get; set; }
+
+ /// Whether the sandbox policy permits git credentials inside the sandbox. A policy capability, not proof that a credential was injected into this spawn: injection is per-command.
+ [JsonPropertyName("gitAuth")]
+ public required bool GitAuth { get; set; }
+
+ /// Whether the macOS keychain was reachable from inside the sandbox. Always false on other platforms.
+ [JsonPropertyName("keychainAccess")]
+ public required bool KeychainAccess { get; set; }
+
+ /// Whether the resolved policy is fully active or degraded.
+ [JsonPropertyName("outcome")]
+ public required SandboxOutcome Outcome { get; set; }
+
+ /// Host platform the sandbox is running on.
+ [JsonPropertyName("platform")]
+ public required SandboxPlatform Platform { get; set; }
+
+ /// Whether the policy came from built-in defaults or user configuration.
+ [JsonPropertyName("policySource")]
+ public required SandboxPolicySource PolicySource { get; set; }
+
+ /// Whether outbound traffic is unproxied, routed through a loopback proxy, or routed through an external proxy.
+ [JsonPropertyName("proxyMode")]
+ public required SandboxProxyMode ProxyMode { get; set; }
+
+ /// Number of read-only path rules in the effective policy.
+ [JsonPropertyName("readonlyPathsCount")]
+ public required long ReadonlyPathsCount { get; set; }
+
+ /// Number of read-write path rules in the effective policy.
+ [JsonPropertyName("readwritePathsCount")]
+ public required long ReadwritePathsCount { get; set; }
+
+ /// Internal tool-call ID, used only to correlate the decision with its owning span. Omitted when the decision is not attributable to a tool call.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("toolCallId")]
+ public string? ToolCallId { get; set; }
}
-/// System notification metadata for a background agent that became idle, including agent ID, type, and description.
-/// The agent_idle variant of .
-public sealed partial class SystemNotificationAgentIdle : SystemNotification
+/// The spawn_completed variant of .
+public sealed partial class SandboxDecisionDataSpawnCompleted : SandboxDecisionData
{
///
[JsonIgnore]
- public override string Type => "agent_idle";
+ public override string Kind => "spawn_completed";
- /// Unique task identifier.
- [JsonPropertyName("agentId")]
- public required string AgentId { get; set; }
+ /// Process-containment implementation backing the sandbox.
+ [JsonPropertyName("backend")]
+ public required SandboxBackend Backend { get; set; }
- /// Type of the agent (e.g., explore, task, general-purpose).
- [JsonPropertyName("agentType")]
+ /// Enforcement mechanism this decision describes.
+ [JsonPropertyName("control")]
+ public required SandboxControl Control { get; set; }
+
+ /// Why enforcement is weaker than configured, when it is.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("degradationReason")]
+ public SandboxDegradationReason? DegradationReason { get; set; }
+
+ /// Wall-clock time spent spawning the sandboxed process, in milliseconds.
+ [JsonPropertyName("durationMs")]
+ public required double DurationMs { get; set; }
+
+ /// Runtime subsystem that applied the policy.
+ [JsonPropertyName("enforcementPoint")]
+ public required SandboxEnforcementPoint EnforcementPoint { get; set; }
+
+ /// Whether the sandboxed process launched under the named backend. Not the exit status of the command that ran inside it.
+ [JsonPropertyName("outcome")]
+ public required SandboxOutcome Outcome { get; set; }
+
+ /// Host platform the sandbox is running on.
+ [JsonPropertyName("platform")]
+ public required SandboxPlatform Platform { get; set; }
+
+ /// Internal tool-call ID, used only to correlate the decision with its owning span. Omitted when the decision is not attributable to a tool call.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("toolCallId")]
+ public string? ToolCallId { get; set; }
+}
+
+/// The enforcement_state variant of .
+public sealed partial class SandboxDecisionDataEnforcementState : SandboxDecisionData
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "enforcement_state";
+
+ /// Runtime observation backing the state. Omitted for `inactive`, which has nothing to attest.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("attestation")]
+ public SandboxAttestation? Attestation { get; set; }
+
+ /// Containment backend that engaged. `unsupported` for any state other than `engaged`, since no backend is known to have run.
+ [JsonPropertyName("backend")]
+ public required SandboxBackend Backend { get; set; }
+
+ /// Command the enforcement governed. Populated only when content capture is enabled, and only for shell commands; MCP, LSP, and search command lines are runtime plumbing.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("command")]
+ public string? Command { get; set; }
+
+ /// Enforcement mechanism this decision describes.
+ [JsonPropertyName("control")]
+ public required SandboxControl Control { get; set; }
+
+ /// Runtime subsystem whose enforcement this describes.
+ [JsonPropertyName("enforcementPoint")]
+ public required SandboxEnforcementPoint EnforcementPoint { get; set; }
+
+ /// Observed enforcement state: `engaged`, `inactive`, or `failed`. Derived from runtime evidence, never from the configured posture or the compile-time target platform.
+ [JsonPropertyName("outcome")]
+ public required SandboxOutcome Outcome { get; set; }
+
+ /// Host platform the sandbox is running on.
+ [JsonPropertyName("platform")]
+ public required SandboxPlatform Platform { get; set; }
+
+ /// Internal tool-call ID, used only to correlate the decision with its owning span. Omitted when the decision is not attributable to a tool call.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("toolCallId")]
+ public string? ToolCallId { get; set; }
+}
+
+/// An enforcement check refused a specific access. Emitted per refusal with no deduplication, including when policy permits the caller to bypass the denial. Carries no backend: the built-in checks that produce this run in-process against the effective policy.
+/// The access_denied variant of .
+public sealed partial class SandboxDecisionDataAccessDenied : SandboxDecisionData
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "access_denied";
+
+ /// Runtime observation backing the denial.
+ [JsonPropertyName("attestation")]
+ public required SandboxAttestation Attestation { get; set; }
+
+ /// Command whose execution the denial arose from. Populated only when content capture is enabled.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("command")]
+ public string? Command { get; set; }
+
+ /// How strong the evidence behind this denial is. Lets an analysis separate denials the sandbox recorded from ones inferred from output text, which otherwise look identical.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("confidence")]
+ public SandboxDenialConfidence? Confidence { get; set; }
+
+ /// Sandbox control the denial belongs to. Follows from `denialClass`.
+ [JsonPropertyName("control")]
+ public required SandboxControl Control { get; set; }
+
+ /// Bounded class of the refused access.
+ [JsonPropertyName("denialClass")]
+ public required SandboxDenialClass DenialClass { get; set; }
+
+ /// Resource the check refused, when identified and content capture is enabled.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("deniedResource")]
+ public string? DeniedResource { get; set; }
+
+ /// Runtime subsystem that performed the check.
+ [JsonPropertyName("enforcementPoint")]
+ public required SandboxEnforcementPoint EnforcementPoint { get; set; }
+
+ /// Always `denied`.
+ [JsonPropertyName("outcome")]
+ public required SandboxOutcome Outcome { get; set; }
+
+ /// Host operating-system family.
+ [JsonPropertyName("platform")]
+ public required SandboxPlatform Platform { get; set; }
+
+ /// Executable image associated with the captured denial, normalized to a basename. Populated only when content capture is enabled.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("processName")]
+ public string? ProcessName { get; set; }
+
+ /// Tool call the denial belongs to, for span correlation only. Never exported as a telemetry attribute or metric dimension.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("toolCallId")]
+ public string? ToolCallId { get; set; }
+}
+
+/// A request to run outside the process sandbox was resolved. This is what makes an `inactive` `enforcement_state` readable: without it, a command that ran unsandboxed because a person approved a bypass looks identical to one that ran unsandboxed because the session never had a sandbox. Reported only when a sandbox was in force, since bypassing a disabled sandbox bypasses nothing. Carries neither backend nor attestation: the verdict comes from the runtime's own permission flow or the local escalation prompt, not from a containment backend and not from the built-in policy check, so `source` is what records where it came from.
+/// The bypass_decided variant of .
+public sealed partial class SandboxDecisionDataBypassDecided : SandboxDecisionData
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "bypass_decided";
+
+ /// Command the verdict governs. Populated only when content capture is enabled.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("command")]
+ public string? Command { get; set; }
+
+ /// How strong the evidence behind `denialClass` was. Present exactly when `denialClass` is, so a verdict that relaxed the sandbox on a guess is distinguishable from one that relaxed it on a recorded refusal. Named to match `access_denied`, which reports the same pair.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("confidence")]
+ public SandboxDenialConfidence? Confidence { get; set; }
+
+ /// Always `bypass`.
+ [JsonPropertyName("control")]
+ public required SandboxControl Control { get; set; }
+
+ /// Bounded class of the access whose refusal raised this escalation. Omitted for a pre-execution bypass, such as a detached command that cannot be sandboxed and therefore resolves no denial.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("denialClass")]
+ public SandboxDenialClass? DenialClass { get; set; }
+
+ /// Resource whose refusal raised this escalation. Populated only when content capture is enabled.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("deniedResource")]
+ public string? DeniedResource { get; set; }
+
+ /// Runtime subsystem the bypass applies to.
+ [JsonPropertyName("enforcementPoint")]
+ public required SandboxEnforcementPoint EnforcementPoint { get; set; }
+
+ /// Whether the bypass was granted: `approved` or `declined`. `declined` also covers the cases where nobody answered, since the sandboxed denial stands either way.
+ [JsonPropertyName("outcome")]
+ public required SandboxOutcome Outcome { get; set; }
+
+ /// Host operating-system family.
+ [JsonPropertyName("platform")]
+ public required SandboxPlatform Platform { get; set; }
+
+ /// Executable image associated with the denial that raised this escalation, normalized to a basename. Populated only when content capture is enabled.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("processName")]
+ public string? ProcessName { get; set; }
+
+ /// Where the request originated. Orthogonal to `outcome`.
+ [JsonPropertyName("source")]
+ public required SandboxBypassSource Source { get; set; }
+
+ /// Tool call the decision belongs to, for span correlation only. Never exported as a telemetry attribute or metric dimension.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("toolCallId")]
+ public string? ToolCallId { get; set; }
+}
+
+/// A permissive retry was resolved. Distinct from `bypass_decided` because this rung never requests a run outside the process sandbox: it relaxes the process container for one run while the sandbox, and with it the network policy, stays attached. Reported for both outcomes, so an escalation the user declined still leaves evidence that the runtime asked and that the sandboxed denial stood.
+/// The permissive_retry_decided variant of .
+public sealed partial class SandboxDecisionDataPermissiveRetryDecided : SandboxDecisionData
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "permissive_retry_decided";
+
+ /// Command the verdict governs. Populated only when content capture is enabled.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("command")]
+ public string? Command { get; set; }
+
+ /// How strong the evidence behind `denialClass` was. Present exactly when `denialClass` is.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("confidence")]
+ public SandboxDenialConfidence? Confidence { get; set; }
+
+ /// Always `process`: the process container is what this rung relaxes, and the network control is deliberately untouched.
+ [JsonPropertyName("control")]
+ public required SandboxControl Control { get; set; }
+
+ /// Bounded class of the access whose refusal raised this escalation.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("denialClass")]
+ public SandboxDenialClass? DenialClass { get; set; }
+
+ /// Resource whose refusal raised this escalation. Populated only when content capture is enabled.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("deniedResource")]
+ public string? DeniedResource { get; set; }
+
+ /// Runtime subsystem the retry applies to.
+ [JsonPropertyName("enforcementPoint")]
+ public required SandboxEnforcementPoint EnforcementPoint { get; set; }
+
+ /// Whether the permissive retry was granted: `approved` or `declined`. `declined` also covers the cases where nobody answered, since the sandboxed denial stands either way.
+ [JsonPropertyName("outcome")]
+ public required SandboxOutcome Outcome { get; set; }
+
+ /// Host operating-system family.
+ [JsonPropertyName("platform")]
+ public required SandboxPlatform Platform { get; set; }
+
+ /// Executable image associated with the denial that raised this escalation, normalized to a basename. Populated only when content capture is enabled.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("processName")]
+ public string? ProcessName { get; set; }
+
+ /// Where the request originated. Orthogonal to `outcome`.
+ [JsonPropertyName("source")]
+ public required SandboxBypassSource Source { get; set; }
+
+ /// Tool call the decision belongs to, for span correlation only. Never exported as a telemetry attribute or metric dimension.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("toolCallId")]
+ public string? ToolCallId { get; set; }
+}
+
+/// An approved permissive retry finished. `succeeded` means the retry exited successfully without another correlated sandbox denial; `failed` means it failed or remained blocked and may therefore be followed by a full bypass.
+/// The permissive_retry_completed variant of .
+public sealed partial class SandboxDecisionDataPermissiveRetryCompleted : SandboxDecisionData
+{
+ ///
+ [JsonIgnore]
+ public override string Kind => "permissive_retry_completed";
+
+ /// Command the retry executed. Populated only when content capture is enabled.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("command")]
+ public string? Command { get; set; }
+
+ /// How strong the evidence behind `denialClass` was.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("confidence")]
+ public SandboxDenialConfidence? Confidence { get; set; }
+
+ /// Always `process`: the retry changes process-container enforcement while leaving network policy attached.
+ [JsonPropertyName("control")]
+ public required SandboxControl Control { get; set; }
+
+ /// Bounded class of the access whose refusal raised the permissive retry.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("denialClass")]
+ public SandboxDenialClass? DenialClass { get; set; }
+
+ /// Resource whose refusal raised the retry. Populated only when content capture is enabled.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("deniedResource")]
+ public string? DeniedResource { get; set; }
+
+ /// Runtime subsystem that ran the retry.
+ [JsonPropertyName("enforcementPoint")]
+ public required SandboxEnforcementPoint EnforcementPoint { get; set; }
+
+ /// Whether the permissive retry completed successfully: `succeeded` or `failed`.
+ [JsonPropertyName("outcome")]
+ public required SandboxOutcome Outcome { get; set; }
+
+ /// Host operating-system family.
+ [JsonPropertyName("platform")]
+ public required SandboxPlatform Platform { get; set; }
+
+ /// Executable image associated with the denial that raised the retry, normalized to a basename. Populated only when content capture is enabled.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("processName")]
+ public string? ProcessName { get; set; }
+
+ /// Tool call the completion belongs to, for span correlation only. Never exported as a telemetry attribute or metric dimension.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("toolCallId")]
+ public string? ToolCallId { get; set; }
+}
+
+/// Error details when the hook failed.
+/// Nested data type for HookEndError.
+public sealed partial class HookEndError
+{
+ /// Human-readable error message.
+ [JsonPropertyName("message")]
+ public required string Message { get; set; }
+
+ /// Source label of the hook that errored (e.g. the plugin it was loaded from), when known.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("source")]
+ public string? Source { get; set; }
+
+ /// Error stack trace, when available.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("stack")]
+ public string? Stack { get; set; }
+}
+
+/// Metadata about the prompt template and its construction.
+/// Nested data type for SystemMessageMetadata.
+public sealed partial class SystemMessageMetadata
+{
+ /// Version identifier of the prompt template used.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("promptVersion")]
+ public string? PromptVersion { get; set; }
+
+ /// Template variables used when constructing the prompt.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("variables")]
+ public IDictionary? Variables { get; set; }
+}
+
+/// System notification metadata for a background agent that completed or failed, including agent ID, type, status, description, and prompt.
+/// The agent_completed variant of .
+public sealed partial class SystemNotificationAgentCompleted : SystemNotification
+{
+ ///
+ [JsonIgnore]
+ public override string Type => "agent_completed";
+
+ /// Unique task identifier.
+ [JsonPropertyName("agentId")]
+ public required string AgentId { get; set; }
+
+ /// Type of the agent (e.g., explore, task, general-purpose).
+ [JsonPropertyName("agentType")]
+ public required string AgentType { get; set; }
+
+ /// Human-readable description of the agent task.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("description")]
+ public string? Description { get; set; }
+
+ /// Friendly, non-unique name intended for display.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("displayName")]
+ public string? DisplayName { get; set; }
+
+ /// The full prompt given to the background agent.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("prompt")]
+ public string? Prompt { get; set; }
+
+ /// Whether the agent completed successfully or failed.
+ [JsonPropertyName("status")]
+ public required SystemNotificationAgentCompletedStatus Status { get; set; }
+}
+
+/// System notification metadata for a background agent that became idle, including agent ID, type, and description.
+/// The agent_idle variant of .
+public sealed partial class SystemNotificationAgentIdle : SystemNotification
+{
+ ///
+ [JsonIgnore]
+ public override string Type => "agent_idle";
+
+ /// Unique task identifier.
+ [JsonPropertyName("agentId")]
+ public required string AgentId { get; set; }
+
+ /// Type of the agent (e.g., explore, task, general-purpose).
+ [JsonPropertyName("agentType")]
public required string AgentType { get; set; }
/// Human-readable description of the agent task.
@@ -9632,11 +10438,38 @@ public override bool? ManagedApprovalRequired
public required string Url { get; set; }
}
+/// Bounded runtime attribution, independent of free-text rationale. Telemetry revalidates this vocabulary before standard collection.
+/// Nested data type for PermissionApprovalEvaluation.
+public sealed partial class PermissionApprovalEvaluation
+{
+ /// Stage that produced this attribution.
+ [JsonPropertyName("evaluationStage")]
+ public required PermissionApprovalEvaluationEvaluationStage EvaluationStage { get; set; }
+
+ /// Whether the request invoked the judge interface. A cached recommendation retains the original attempt fact. Omitted means unknown, including inherited outcomes.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("judgeAttempted")]
+ public bool? JudgeAttempted { get; set; }
+
+ /// Status of the local judge interface, not proof of a model network call.
+ [JsonPropertyName("judgeStatus")]
+ public required PermissionApprovalEvaluationJudgeStatus JudgeStatus { get; set; }
+
+ /// Machine-readable runtime gate reason, never a command, path or human rationale.
+ [JsonPropertyName("reasonCode")]
+ public required PermissionApprovalEvaluationReasonCode ReasonCode { get; set; }
+}
+
/// Assisted-approval judge information attached to a permission request. Present only in assisted mode; its absence means the judge did not evaluate the request. The `recommendation` conveys the judge's disposition for this request.
/// Nested data type for PermissionAssistedApproval.
[Experimental(Diagnostics.Experimental)]
public sealed partial class PermissionAssistedApproval
{
+ /// Runtime reason and judge-call metadata. Absent on older events; missing metadata means unknown, not that the judge was skipped.
+ [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
+ [JsonPropertyName("evaluation")]
+ public PermissionApprovalEvaluation? Evaluation { get; set; }
+
/// Classified cause of an `error` recommendation. Absent for every other recommendation.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("failureReason")]
@@ -11946,45 +12779,395 @@ public override void Write(Utf8JsonWriter writer, AutopilotObjectiveChangedStatu
}
}
-/// Origin of an effective session model change.
+/// Live indexed-search state for this session activation, never inferred from persisted history.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct ModelChangeSource : IEquatable
+public readonly struct IndexedSearchState : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public ModelChangeSource(string value)
+ public IndexedSearchState(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The user selected a model directly with `/model <id>`.
- public static ModelChangeSource ModelCommand { get; } = new("model_command");
+ /// Indexed search is not active for this session.
+ public static IndexedSearchState Disabled { get; } = new("disabled");
- /// The user selected the model with `/settings`.
- public static ModelChangeSource SettingsCommand { get; } = new("settings_command");
+ /// Indexed-search startup is in progress.
+ public static IndexedSearchState Starting { get; } = new("starting");
- /// The user selected the model with the `/config` alias.
- public static ModelChangeSource ConfigCommand { get; } = new("config_command");
+ /// The indexed-search server started successfully; its index may still be warming.
+ public static IndexedSearchState Enabled { get; } = new("enabled");
- /// The user selected the model in the model picker, including the picker opened by bare `/model`.
- public static ModelChangeSource ModelPicker { get; } = new("model_picker");
+ /// The indexed-search server and its index are ready.
+ public static IndexedSearchState Ready { get; } = new("ready");
- /// Organization-managed settings selected the model.
- public static ModelChangeSource ManagedSettings { get; } = new("managed_settings");
+ /// Indexed-search startup or the active server failed.
+ public static IndexedSearchState Failed { get; } = new("failed");
- /// Repository settings selected the model.
- public static ModelChangeSource RepoSettings { get; } = new("repo_settings");
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(IndexedSearchState left, IndexedSearchState right) => left.Equals(right);
- /// Startup model resolution selected the model.
- public static ModelChangeSource Startup { get; } = new("startup");
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(IndexedSearchState left, IndexedSearchState right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is IndexedSearchState other && Equals(other);
+
+ ///
+ public bool Equals(IndexedSearchState other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override IndexedSearchState Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, IndexedSearchState value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(IndexedSearchState));
+ }
+ }
+}
+
+/// Configuration, policy, or workspace condition that disabled indexed search.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct IndexedSearchDisabledReason : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public IndexedSearchDisabledReason(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// Indexed search was explicitly disabled by the environment.
+ public static IndexedSearchDisabledReason UseTgrepFalse { get; } = new("use_tgrep_false");
+
+ /// Search uses the external ripgrep binary instead of bundled search.
+ public static IndexedSearchDisabledReason UseBuiltinRipgrepFalse { get; } = new("use_builtin_ripgrep_false");
+
+ /// Organization policy disables indexed search.
+ public static IndexedSearchDisabledReason Organization { get; } = new("organization");
+
+ /// Authentication has not resolved organization policy.
+ public static IndexedSearchDisabledReason OrganizationPolicyAuthPending { get; } = new("organization_policy_auth_pending");
+
+ /// Organization policy could not be determined.
+ public static IndexedSearchDisabledReason OrganizationPolicyUnknown { get; } = new("organization_policy_unknown");
+
+ /// The workspace uses a virtualized or network filesystem.
+ public static IndexedSearchDisabledReason VirtualFilesystem { get; } = new("virtual_filesystem");
+
+ /// The workspace is inside a Windows cloud-sync root.
+ public static IndexedSearchDisabledReason CloudSyncRoot { get; } = new("cloud_sync_root");
+
+ /// The Windows cloud-sync safety check failed.
+ public static IndexedSearchDisabledReason CloudSyncDetectionFailed { get; } = new("cloud_sync_detection_failed");
+
+ /// The workspace is not available on the runtime's local filesystem.
+ public static IndexedSearchDisabledReason WorkspaceNotLocal { get; } = new("workspace_not_local");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(IndexedSearchDisabledReason left, IndexedSearchDisabledReason right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(IndexedSearchDisabledReason left, IndexedSearchDisabledReason right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is IndexedSearchDisabledReason other && Equals(other);
+
+ ///
+ public bool Equals(IndexedSearchDisabledReason other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override IndexedSearchDisabledReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, IndexedSearchDisabledReason value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(IndexedSearchDisabledReason));
+ }
+ }
+}
+
+/// Result of an indexed-search startup attempt.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct IndexedSearchOutcome : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public IndexedSearchOutcome(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// A new indexed-search server was started.
+ public static IndexedSearchOutcome Started { get; } = new("started");
+
+ /// The repository has too few files for automatic indexing.
+ public static IndexedSearchOutcome SkippedBelowThreshold { get; } = new("skipped_below_threshold");
+
+ /// No Git repository was found and indexing was not forced.
+ public static IndexedSearchOutcome SkippedNoGitroot { get; } = new("skipped_no_gitroot");
+
+ /// Configuration, policy, or workspace safety disabled indexing.
+ public static IndexedSearchOutcome SkippedDisabled { get; } = new("skipped_disabled");
+
+ /// An existing indexed-search server was reused.
+ public static IndexedSearchOutcome ReusedExisting { get; } = new("reused_existing");
+
+ /// The startup attempt failed.
+ public static IndexedSearchOutcome Failed { get; } = new("failed");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(IndexedSearchOutcome left, IndexedSearchOutcome right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(IndexedSearchOutcome left, IndexedSearchOutcome right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is IndexedSearchOutcome other && Equals(other);
+
+ ///
+ public bool Equals(IndexedSearchOutcome other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override IndexedSearchOutcome Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, IndexedSearchOutcome value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(IndexedSearchOutcome));
+ }
+ }
+}
+
+/// Category of an indexed-search server failure.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct IndexedSearchErrorType : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public IndexedSearchErrorType(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// The indexed-search server could not be spawned.
+ public static IndexedSearchErrorType SpawnError { get; } = new("spawn_error");
+
+ /// The indexed-search server exited unexpectedly.
+ public static IndexedSearchErrorType UnexpectedExit { get; } = new("unexpected_exit");
+
+ /// The indexed-search server was terminated by a signal.
+ public static IndexedSearchErrorType KilledBySignal { get; } = new("killed_by_signal");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(IndexedSearchErrorType left, IndexedSearchErrorType right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(IndexedSearchErrorType left, IndexedSearchErrorType right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is IndexedSearchErrorType other && Equals(other);
+
+ ///
+ public bool Equals(IndexedSearchErrorType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override IndexedSearchErrorType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, IndexedSearchErrorType value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(IndexedSearchErrorType));
+ }
+ }
+}
+
+/// Phase of an incremental indexed-search update.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct IndexedSearchIncrementalPhase : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public IndexedSearchIncrementalPhase(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// A workspace scan found changes to index.
+ public static IndexedSearchIncrementalPhase ChangesDetected { get; } = new("changes_detected");
+
+ /// The incremental index update completed.
+ public static IndexedSearchIncrementalPhase Updated { get; } = new("updated");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(IndexedSearchIncrementalPhase left, IndexedSearchIncrementalPhase right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(IndexedSearchIncrementalPhase left, IndexedSearchIncrementalPhase right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is IndexedSearchIncrementalPhase other && Equals(other);
+
+ ///
+ public bool Equals(IndexedSearchIncrementalPhase other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override IndexedSearchIncrementalPhase Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, IndexedSearchIncrementalPhase value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(IndexedSearchIncrementalPhase));
+ }
+ }
+}
+
+/// Origin of an effective session model change.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct ModelChangeSource : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public ModelChangeSource(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// The user selected a model directly with `/model <id>`.
+ public static ModelChangeSource ModelCommand { get; } = new("model_command");
+
+ /// The user selected the model with `/settings`.
+ public static ModelChangeSource SettingsCommand { get; } = new("settings_command");
+
+ /// The user selected the model with the `/config` alias.
+ public static ModelChangeSource ConfigCommand { get; } = new("config_command");
+
+ /// The user selected the model in the model picker, including the picker opened by bare `/model`.
+ public static ModelChangeSource ModelPicker { get; } = new("model_picker");
+
+ /// Organization-managed settings selected the model.
+ public static ModelChangeSource ManagedSettings { get; } = new("managed_settings");
+
+ /// Repository settings selected the model.
+ public static ModelChangeSource RepoSettings { get; } = new("repo_settings");
+
+ /// Startup model resolution selected the model.
+ public static ModelChangeSource Startup { get; } = new("startup");
/// Selecting an agent selected its configured model.
public static ModelChangeSource Agent { get; } = new("agent");
@@ -11995,6 +13178,9 @@ public ModelChangeSource(string value)
/// The runtime selected the model automatically, such as rate-limit recovery or refusal fallback.
public static ModelChangeSource Automatic { get; } = new("automatic");
+ /// The user selected the promoted model from the changeboarding card or its keyboard shortcut.
+ public static ModelChangeSource ChangeboardingShortcut { get; } = new("changeboarding_shortcut");
+
/// An SDK or RPC caller selected the model.
public static ModelChangeSource Sdk { get; } = new("sdk");
@@ -12547,45 +13733,39 @@ public override void Write(Utf8JsonWriter writer, CompactionTrigger value, JsonS
}
}
-/// Semantic result of evaluating a task completion request.
+/// Category of structured task blocker.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct TaskCompletionOutcome : IEquatable
+public readonly struct TaskBlockerKind : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public TaskCompletionOutcome(string value)
+ public TaskBlockerKind(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The completion request was accepted and the objective is complete.
- public static TaskCompletionOutcome Completed { get; } = new("completed");
-
- /// The completion request was rejected because more work or validation remains.
- public static TaskCompletionOutcome Continue { get; } = new("continue");
-
- /// Completion cannot proceed without intervention; the active objective is paused when one is identified.
- public static TaskCompletionOutcome Blocked { get; } = new("blocked");
+ /// Autopilot permission recovery requires intervention or has no safe autonomous path.
+ public static TaskBlockerKind PermissionRecovery { get; } = new("permission_recovery");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(TaskCompletionOutcome left, TaskCompletionOutcome right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(TaskBlockerKind left, TaskBlockerKind right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(TaskCompletionOutcome left, TaskCompletionOutcome right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(TaskBlockerKind left, TaskBlockerKind right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is TaskCompletionOutcome other && Equals(other);
+ public override bool Equals(object? obj) => obj is TaskBlockerKind other && Equals(other);
///
- public bool Equals(TaskCompletionOutcome other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(TaskBlockerKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -12593,69 +13773,72 @@ public TaskCompletionOutcome(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override TaskCompletionOutcome Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override TaskBlockerKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, TaskCompletionOutcome value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, TaskBlockerKind value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(TaskCompletionOutcome));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(TaskBlockerKind));
}
}
}
-/// Structured terminal status from a tool completion event.
+/// Runtime handling applied to a recovery attempt.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct CompletionReceiptToolStatus : IEquatable
+public readonly struct PermissionRecoveryAttemptDisposition : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public CompletionReceiptToolStatus(string value)
+ public PermissionRecoveryAttemptDisposition(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The tool completed successfully.
- public static CompletionReceiptToolStatus Success { get; } = new("success");
+ /// The request was denied without prompting so the agent could try an alternative.
+ public static PermissionRecoveryAttemptDisposition Deferred { get; } = new("deferred");
- /// The tool failed without a more specific structured status.
- public static CompletionReceiptToolStatus Failure { get; } = new("failure");
+ /// The request was surfaced to an interactive responder.
+ public static PermissionRecoveryAttemptDisposition Prompted { get; } = new("prompted");
- /// The tool exceeded its time budget.
- public static CompletionReceiptToolStatus Timeout { get; } = new("timeout");
+ /// The interactive responder approved the request.
+ public static PermissionRecoveryAttemptDisposition Approved { get; } = new("approved");
- /// The user rejected the tool call.
- public static CompletionReceiptToolStatus Rejected { get; } = new("rejected");
+ /// The interactive responder denied the request or became unavailable.
+ public static PermissionRecoveryAttemptDisposition Denied { get; } = new("denied");
- /// The permissions service denied the tool call.
- public static CompletionReceiptToolStatus Denied { get; } = new("denied");
+ /// The request exhausted unattended recovery and produced a blocked outcome.
+ public static PermissionRecoveryAttemptDisposition Blocked { get; } = new("blocked");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(CompletionReceiptToolStatus left, CompletionReceiptToolStatus right) => left.Equals(right);
+ /// A tool call succeeded as an equivalent alternative.
+ public static PermissionRecoveryAttemptDisposition Succeeded { get; } = new("succeeded");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(CompletionReceiptToolStatus left, CompletionReceiptToolStatus right) => !(left == right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(PermissionRecoveryAttemptDisposition left, PermissionRecoveryAttemptDisposition right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(PermissionRecoveryAttemptDisposition left, PermissionRecoveryAttemptDisposition right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is CompletionReceiptToolStatus other && Equals(other);
+ public override bool Equals(object? obj) => obj is PermissionRecoveryAttemptDisposition other && Equals(other);
///
- public bool Equals(CompletionReceiptToolStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(PermissionRecoveryAttemptDisposition other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -12663,63 +13846,75 @@ public CompletionReceiptToolStatus(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override CompletionReceiptToolStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override PermissionRecoveryAttemptDisposition Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, CompletionReceiptToolStatus value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, PermissionRecoveryAttemptDisposition value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(CompletionReceiptToolStatus));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionRecoveryAttemptDisposition));
}
}
}
-/// Runtime reason the completion decision was accepted.
+/// Controlled reason for an individual attempt disposition.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct CompletionReceiptStopReason : IEquatable
+public readonly struct PermissionRecoveryAttemptReason : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public CompletionReceiptStopReason(string value)
+ public PermissionRecoveryAttemptReason(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The model reached a natural terminal response.
- public static CompletionReceiptStopReason Natural { get; } = new("natural");
+ /// The attempt required permission that Assisted Permissions could not grant.
+ public static PermissionRecoveryAttemptReason PermissionRequired { get; } = new("permission_required");
- /// A terminal tool ended the interaction.
- public static CompletionReceiptStopReason TerminalTool { get; } = new("terminal_tool");
+ /// The request repeated an earlier attempt.
+ public static PermissionRecoveryAttemptReason RepeatedAttempt { get; } = new("repeated_attempt");
- /// The configured agentStop continuation limit was reached.
- public static CompletionReceiptStopReason AgentStopBlockLimit { get; } = new("agent_stop_block_limit");
+ /// The request exceeded the bounded number of distinct attempts.
+ public static PermissionRecoveryAttemptReason AttemptsExhausted { get; } = new("attempts_exhausted");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(CompletionReceiptStopReason left, CompletionReceiptStopReason right) => left.Equals(right);
+ /// The interactive responder approved the request.
+ public static PermissionRecoveryAttemptReason PermissionApproved { get; } = new("permission_approved");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(CompletionReceiptStopReason left, CompletionReceiptStopReason right) => !(left == right);
+ /// The interactive responder denied the request.
+ public static PermissionRecoveryAttemptReason PermissionDenied { get; } = new("permission_denied");
+
+ /// The interactive responder became unavailable.
+ public static PermissionRecoveryAttemptReason ResponderUnavailable { get; } = new("responder_unavailable");
+
+ /// The tool call succeeded without the blocked permission.
+ public static PermissionRecoveryAttemptReason EquivalentAlternativeSucceeded { get; } = new("equivalent_alternative_succeeded");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(PermissionRecoveryAttemptReason left, PermissionRecoveryAttemptReason right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(PermissionRecoveryAttemptReason left, PermissionRecoveryAttemptReason right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is CompletionReceiptStopReason other && Equals(other);
+ public override bool Equals(object? obj) => obj is PermissionRecoveryAttemptReason other && Equals(other);
///
- public bool Equals(CompletionReceiptStopReason other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(PermissionRecoveryAttemptReason other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -12727,61 +13922,63 @@ public CompletionReceiptStopReason(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override CompletionReceiptStopReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override PermissionRecoveryAttemptReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, CompletionReceiptStopReason value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, PermissionRecoveryAttemptReason value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(CompletionReceiptStopReason));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionRecoveryAttemptReason));
}
}
}
-/// Kind of turn for which HydraFusion routing is running.
-[Experimental(Diagnostics.Experimental)]
+/// Relationship of an attempt to earlier permission requests.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FusionTurnKind : IEquatable
+public readonly struct PermissionRecoveryAttemptRelation : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FusionTurnKind(string value)
+ public PermissionRecoveryAttemptRelation(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// A user-message turn.
- public static FusionTurnKind User { get; } = new("user");
+ /// The first denied permission request in the episode.
+ public static PermissionRecoveryAttemptRelation Initial { get; } = new("initial");
- /// A conversation-compaction turn.
- public static FusionTurnKind Compaction { get; } = new("compaction");
+ /// A request equivalent to an earlier attempt.
+ public static PermissionRecoveryAttemptRelation Retry { get; } = new("retry");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FusionTurnKind left, FusionTurnKind right) => left.Equals(right);
+ /// A distinct request or a successful alternative tool call.
+ public static PermissionRecoveryAttemptRelation Alternative { get; } = new("alternative");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FusionTurnKind left, FusionTurnKind right) => !(left == right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(PermissionRecoveryAttemptRelation left, PermissionRecoveryAttemptRelation right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(PermissionRecoveryAttemptRelation left, PermissionRecoveryAttemptRelation right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FusionTurnKind other && Equals(other);
+ public override bool Equals(object? obj) => obj is PermissionRecoveryAttemptRelation other && Equals(other);
///
- public bool Equals(FusionTurnKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(PermissionRecoveryAttemptRelation other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -12789,61 +13986,60 @@ public FusionTurnKind(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FusionTurnKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override PermissionRecoveryAttemptRelation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FusionTurnKind value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, PermissionRecoveryAttemptRelation value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionTurnKind));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionRecoveryAttemptRelation));
}
}
}
-/// Server-recommended routing behavior for a later HydraFusion turn.
-[Experimental(Diagnostics.Experimental)]
+/// Action selected when autonomous recovery cannot continue.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FusionFollowUpAction : IEquatable
+public readonly struct PermissionRecoveryOnBlocked : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FusionFollowUpAction(string value)
+ public PermissionRecoveryOnBlocked(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// Reuse the durable primary model without routing.
- public static FusionFollowUpAction ReusePrimary { get; } = new("reuse_primary");
+ /// Surface the existing permission prompt to a response-capable client.
+ public static PermissionRecoveryOnBlocked Ask { get; } = new("ask");
- /// Request a new routing decision.
- public static FusionFollowUpAction Reroute { get; } = new("reroute");
+ /// Return a structured unsuccessful blocked outcome because no responder is available.
+ public static PermissionRecoveryOnBlocked Fail { get; } = new("fail");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FusionFollowUpAction left, FusionFollowUpAction right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(PermissionRecoveryOnBlocked left, PermissionRecoveryOnBlocked right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FusionFollowUpAction left, FusionFollowUpAction right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(PermissionRecoveryOnBlocked left, PermissionRecoveryOnBlocked right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FusionFollowUpAction other && Equals(other);
+ public override bool Equals(object? obj) => obj is PermissionRecoveryOnBlocked other && Equals(other);
///
- public bool Equals(FusionFollowUpAction other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(PermissionRecoveryOnBlocked other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -12851,64 +14047,75 @@ public FusionFollowUpAction(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FusionFollowUpAction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override PermissionRecoveryOnBlocked Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FusionFollowUpAction value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, PermissionRecoveryOnBlocked value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionFollowUpAction));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionRecoveryOnBlocked));
}
}
}
-/// Validated HydraFusion execution pattern.
-[Experimental(Diagnostics.Experimental)]
+/// Controlled reason for a permission-recovery episode transition.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FusionPattern : IEquatable
+public readonly struct PermissionRecoveryReason : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FusionPattern(string value)
+ public PermissionRecoveryReason(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// Run one primary solver phase.
- public static FusionPattern Single { get; } = new("single");
+ /// An action required permission that Assisted Permissions could not grant.
+ public static PermissionRecoveryReason PermissionRequired { get; } = new("permission_required");
- /// Run a primary phase, a judge, and an optional repair.
- public static FusionPattern Cascade { get; } = new("cascade");
+ /// The agent repeated an equivalent permission request instead of making progress.
+ public static PermissionRecoveryReason RepeatedAttempt { get; } = new("repeated_attempt");
- /// Run a primary draft, a read-only critique, and a revision.
- public static FusionPattern Critique { get; } = new("critique");
+ /// The bounded number of distinct permission attempts was exhausted.
+ public static PermissionRecoveryReason AttemptsExhausted { get; } = new("attempts_exhausted");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FusionPattern left, FusionPattern right) => left.Equals(right);
+ /// A responder approved the escalated permission request.
+ public static PermissionRecoveryReason PermissionApproved { get; } = new("permission_approved");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FusionPattern left, FusionPattern right) => !(left == right);
+ /// A responder denied the escalated permission request.
+ public static PermissionRecoveryReason PermissionDenied { get; } = new("permission_denied");
+
+ /// The response-capable client became unavailable while escalation was pending.
+ public static PermissionRecoveryReason ResponderUnavailable { get; } = new("responder_unavailable");
+
+ /// A later tool call succeeded without requiring the blocked permission.
+ public static PermissionRecoveryReason EquivalentAlternativeSucceeded { get; } = new("equivalent_alternative_succeeded");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(PermissionRecoveryReason left, PermissionRecoveryReason right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(PermissionRecoveryReason left, PermissionRecoveryReason right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FusionPattern other && Equals(other);
+ public override bool Equals(object? obj) => obj is PermissionRecoveryReason other && Equals(other);
///
- public bool Equals(FusionPattern other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(PermissionRecoveryReason other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -12916,76 +14123,66 @@ public FusionPattern(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FusionPattern Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override PermissionRecoveryReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FusionPattern value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, PermissionRecoveryReason value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionPattern));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionRecoveryReason));
}
}
}
-/// HydraFusion phase kind.
-[Experimental(Diagnostics.Experimental)]
+/// Lifecycle state of a permission-recovery episode.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FusionPhaseKind : IEquatable
+public readonly struct PermissionRecoveryStatus : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FusionPhaseKind(string value)
+ public PermissionRecoveryStatus(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// Primary solver phase.
- public static FusionPhaseKind Primary { get; } = new("primary");
-
- /// Read-only cascade judge phase.
- public static FusionPhaseKind Judge { get; } = new("judge");
-
- /// Cascade repair phase.
- public static FusionPhaseKind Repair { get; } = new("repair");
-
- /// Initial critique-pattern draft phase.
- public static FusionPhaseKind Draft { get; } = new("draft");
+ /// Autopilot may try a bounded equivalent alternative.
+ public static PermissionRecoveryStatus Recovering { get; } = new("recovering");
- /// Read-only critique phase.
- public static FusionPhaseKind Critic { get; } = new("critic");
+ /// An interactive permission response is required.
+ public static PermissionRecoveryStatus AwaitingApproval { get; } = new("awaiting_approval");
- /// Critique-pattern revision phase.
- public static FusionPhaseKind Revision { get; } = new("revision");
+ /// The episode ended through approval or a successful equivalent alternative.
+ public static PermissionRecoveryStatus Resolved { get; } = new("resolved");
- /// Follow-up phase continuing from the resolved model.
- public static FusionPhaseKind FollowUp { get; } = new("follow_up");
+ /// No autonomous path remains and the task requires intervention.
+ public static PermissionRecoveryStatus Blocked { get; } = new("blocked");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FusionPhaseKind left, FusionPhaseKind right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(PermissionRecoveryStatus left, PermissionRecoveryStatus right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FusionPhaseKind left, FusionPhaseKind right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(PermissionRecoveryStatus left, PermissionRecoveryStatus right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FusionPhaseKind other && Equals(other);
+ public override bool Equals(object? obj) => obj is PermissionRecoveryStatus other && Equals(other);
///
- public bool Equals(FusionPhaseKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(PermissionRecoveryStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -12993,61 +14190,63 @@ public FusionPhaseKind(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FusionPhaseKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override PermissionRecoveryStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FusionPhaseKind value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, PermissionRecoveryStatus value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionPhaseKind));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(PermissionRecoveryStatus));
}
}
}
-/// Conversation scope in which a HydraFusion phase executes.
-[Experimental(Diagnostics.Experimental)]
+/// Semantic result of evaluating a task completion request.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FusionConversationScope : IEquatable
+public readonly struct TaskCompletionOutcome : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FusionConversationScope(string value)
+ public TaskCompletionOutcome(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// Canonical root conversation history.
- public static FusionConversationScope Root { get; } = new("root");
+ /// The completion request was accepted and the objective is complete.
+ public static TaskCompletionOutcome Completed { get; } = new("completed");
- /// Isolated read-only review history that does not enter the root conversation.
- public static FusionConversationScope Review { get; } = new("review");
+ /// The completion request was rejected because more work or validation remains.
+ public static TaskCompletionOutcome Continue { get; } = new("continue");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FusionConversationScope left, FusionConversationScope right) => left.Equals(right);
+ /// Completion cannot proceed without intervention; the active objective is paused when one is identified.
+ public static TaskCompletionOutcome Blocked { get; } = new("blocked");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FusionConversationScope left, FusionConversationScope right) => !(left == right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(TaskCompletionOutcome left, TaskCompletionOutcome right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(TaskCompletionOutcome left, TaskCompletionOutcome right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FusionConversationScope other && Equals(other);
+ public override bool Equals(object? obj) => obj is TaskCompletionOutcome other && Equals(other);
///
- public bool Equals(FusionConversationScope other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(TaskCompletionOutcome other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -13055,66 +14254,69 @@ public FusionConversationScope(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FusionConversationScope Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override TaskCompletionOutcome Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FusionConversationScope value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, TaskCompletionOutcome value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionConversationScope));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(TaskCompletionOutcome));
}
}
}
-/// The agent mode that was active when this message was sent.
+/// Structured terminal status from a tool completion event.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct UserMessageAgentMode : IEquatable
+public readonly struct CompletionReceiptToolStatus : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public UserMessageAgentMode(string value)
+ public CompletionReceiptToolStatus(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The agent is responding interactively to the user.
- public static UserMessageAgentMode Interactive { get; } = new("interactive");
+ /// The tool completed successfully.
+ public static CompletionReceiptToolStatus Success { get; } = new("success");
- /// The agent is preparing a plan before making changes.
- public static UserMessageAgentMode Plan { get; } = new("plan");
+ /// The tool failed without a more specific structured status.
+ public static CompletionReceiptToolStatus Failure { get; } = new("failure");
- /// The agent is working autonomously toward task completion.
- public static UserMessageAgentMode Autopilot { get; } = new("autopilot");
+ /// The tool exceeded its time budget.
+ public static CompletionReceiptToolStatus Timeout { get; } = new("timeout");
- /// The agent is in shell-focused UI mode.
- public static UserMessageAgentMode Shell { get; } = new("shell");
+ /// The user rejected the tool call.
+ public static CompletionReceiptToolStatus Rejected { get; } = new("rejected");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(UserMessageAgentMode left, UserMessageAgentMode right) => left.Equals(right);
+ /// The permissions service denied the tool call.
+ public static CompletionReceiptToolStatus Denied { get; } = new("denied");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(UserMessageAgentMode left, UserMessageAgentMode right) => !(left == right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(CompletionReceiptToolStatus left, CompletionReceiptToolStatus right) => left.Equals(right);
- ///
- public override bool Equals(object? obj) => obj is UserMessageAgentMode other && Equals(other);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(CompletionReceiptToolStatus left, CompletionReceiptToolStatus right) => !(left == right);
///
- public bool Equals(UserMessageAgentMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public override bool Equals(object? obj) => obj is CompletionReceiptToolStatus other && Equals(other);
+
+ ///
+ public bool Equals(CompletionReceiptToolStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -13122,60 +14324,63 @@ public UserMessageAgentMode(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override UserMessageAgentMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override CompletionReceiptToolStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, UserMessageAgentMode value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, CompletionReceiptToolStatus value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(UserMessageAgentMode));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(CompletionReceiptToolStatus));
}
}
}
-/// Why the binary data is absent: it exceeded the inline size limit, or its asset was unavailable.
+/// Runtime reason the completion decision was accepted.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct OmittedBinaryOmittedReason : IEquatable
+public readonly struct CompletionReceiptStopReason : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public OmittedBinaryOmittedReason(string value)
+ public CompletionReceiptStopReason(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// Bytes exceeded the session's inline size limit.
- public static OmittedBinaryOmittedReason TooLarge { get; } = new("too_large");
+ /// The model reached a natural terminal response.
+ public static CompletionReceiptStopReason Natural { get; } = new("natural");
- /// The referenced binary asset could not be found (e.g. a truncated log).
- public static OmittedBinaryOmittedReason AssetUnavailable { get; } = new("asset_unavailable");
+ /// A terminal tool ended the interaction.
+ public static CompletionReceiptStopReason TerminalTool { get; } = new("terminal_tool");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(OmittedBinaryOmittedReason left, OmittedBinaryOmittedReason right) => left.Equals(right);
+ /// The configured agentStop continuation limit was reached.
+ public static CompletionReceiptStopReason AgentStopBlockLimit { get; } = new("agent_stop_block_limit");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(OmittedBinaryOmittedReason left, OmittedBinaryOmittedReason right) => !(left == right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(CompletionReceiptStopReason left, CompletionReceiptStopReason right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(CompletionReceiptStopReason left, CompletionReceiptStopReason right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is OmittedBinaryOmittedReason other && Equals(other);
+ public override bool Equals(object? obj) => obj is CompletionReceiptStopReason other && Equals(other);
///
- public bool Equals(OmittedBinaryOmittedReason other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(CompletionReceiptStopReason other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -13183,63 +14388,123 @@ public OmittedBinaryOmittedReason(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override OmittedBinaryOmittedReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override CompletionReceiptStopReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, OmittedBinaryOmittedReason value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, CompletionReceiptStopReason value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(OmittedBinaryOmittedReason));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(CompletionReceiptStopReason));
}
}
}
-/// Type of GitHub reference.
+/// Kind of turn for which HydraFusion routing is running.
+[Experimental(Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct AttachmentGitHubReferenceType : IEquatable
+public readonly struct FusionTurnKind : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public AttachmentGitHubReferenceType(string value)
+ public FusionTurnKind(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// GitHub issue reference.
- public static AttachmentGitHubReferenceType Issue { get; } = new("issue");
+ /// A user-message turn.
+ public static FusionTurnKind User { get; } = new("user");
- /// GitHub pull request reference.
- public static AttachmentGitHubReferenceType Pr { get; } = new("pr");
+ /// A conversation-compaction turn.
+ public static FusionTurnKind Compaction { get; } = new("compaction");
- /// GitHub discussion reference.
- public static AttachmentGitHubReferenceType Discussion { get; } = new("discussion");
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(FusionTurnKind left, FusionTurnKind right) => left.Equals(right);
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(AttachmentGitHubReferenceType left, AttachmentGitHubReferenceType right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(FusionTurnKind left, FusionTurnKind right) => !(left == right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(AttachmentGitHubReferenceType left, AttachmentGitHubReferenceType right) => !(left == right);
+ ///
+ public override bool Equals(object? obj) => obj is FusionTurnKind other && Equals(other);
///
- public override bool Equals(object? obj) => obj is AttachmentGitHubReferenceType other && Equals(other);
+ public bool Equals(FusionTurnKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
- public bool Equals(AttachmentGitHubReferenceType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override FusionTurnKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, FusionTurnKind value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionTurnKind));
+ }
+ }
+}
+
+/// Server-recommended routing behavior for a later HydraFusion turn.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct FusionFollowUpAction : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public FusionFollowUpAction(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// Reuse the durable primary model without routing.
+ public static FusionFollowUpAction ReusePrimary { get; } = new("reuse_primary");
+
+ /// Request a new routing decision.
+ public static FusionFollowUpAction Reroute { get; } = new("reroute");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(FusionFollowUpAction left, FusionFollowUpAction right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(FusionFollowUpAction left, FusionFollowUpAction right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is FusionFollowUpAction other && Equals(other);
+
+ ///
+ public bool Equals(FusionFollowUpAction other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -13247,63 +14512,64 @@ public AttachmentGitHubReferenceType(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override AttachmentGitHubReferenceType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override FusionFollowUpAction Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, AttachmentGitHubReferenceType value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, FusionFollowUpAction value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AttachmentGitHubReferenceType));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionFollowUpAction));
}
}
}
-/// How this user message was delivered to the agentic loop, relative to whether the loop was already running. This is the timing axis only; the message's origin (human vs. system/command/schedule/skill/etc.) is carried separately by `source`. A system-injected message has a delivery too — e.g. a background-task notification waking an idle agent is `idle`, the same mechanism as a human starting a fresh turn.
+/// Validated HydraFusion execution pattern.
+[Experimental(Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct UserMessageDelivery : IEquatable
+public readonly struct FusionPattern : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public UserMessageDelivery(string value)
+ public FusionPattern(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// Delivered while the loop was idle; starts its own run immediately (a human's fresh turn, or a system notification waking an idle agent).
- public static UserMessageDelivery Idle { get; } = new("idle");
+ /// Run one primary solver phase.
+ public static FusionPattern Single { get; } = new("single");
- /// Injected into the current in-flight run while the agent was busy (immediate mode).
- public static UserMessageDelivery Steering { get; } = new("steering");
+ /// Run a primary phase, a judge, and an optional repair.
+ public static FusionPattern Cascade { get; } = new("cascade");
- /// Enqueued while the agent was busy; processed as its own run afterward.
- public static UserMessageDelivery Queued { get; } = new("queued");
+ /// Run a primary draft, a read-only critique, and a revision.
+ public static FusionPattern Critique { get; } = new("critique");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(UserMessageDelivery left, UserMessageDelivery right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(FusionPattern left, FusionPattern right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(UserMessageDelivery left, UserMessageDelivery right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(FusionPattern left, FusionPattern right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is UserMessageDelivery other && Equals(other);
+ public override bool Equals(object? obj) => obj is FusionPattern other && Equals(other);
///
- public bool Equals(UserMessageDelivery other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(FusionPattern other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -13311,66 +14577,1212 @@ public UserMessageDelivery(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override UserMessageDelivery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override FusionPattern Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, UserMessageDelivery value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, FusionPattern value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(UserMessageDelivery));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionPattern));
}
}
}
-/// What the agent was doing when the user interrupted it.
+/// HydraFusion phase kind.
+[Experimental(Diagnostics.Experimental)]
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct AgentInterruptedActivity : IEquatable
+public readonly struct FusionPhaseKind : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public AgentInterruptedActivity(string value)
+ public FusionPhaseKind(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// A request to the model was open.
- public static AgentInterruptedActivity ModelCall { get; } = new("model_call");
+ /// Primary solver phase.
+ public static FusionPhaseKind Primary { get; } = new("primary");
- /// The turn was sleeping between retry attempts.
- public static AgentInterruptedActivity RetryBackoff { get; } = new("retry_backoff");
+ /// Read-only cascade judge phase.
+ public static FusionPhaseKind Judge { get; } = new("judge");
- /// One or more tools were executing.
- public static AgentInterruptedActivity ToolCall { get; } = new("tool_call");
+ /// Cascade repair phase.
+ public static FusionPhaseKind Repair { get; } = new("repair");
- /// Background sub-agents were running while the main loop was idle.
- public static AgentInterruptedActivity BackgroundAgent { get; } = new("background_agent");
+ /// Initial critique-pattern draft phase.
+ public static FusionPhaseKind Draft { get; } = new("draft");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(AgentInterruptedActivity left, AgentInterruptedActivity right) => left.Equals(right);
+ /// Read-only critique phase.
+ public static FusionPhaseKind Critic { get; } = new("critic");
+
+ /// Critique-pattern revision phase.
+ public static FusionPhaseKind Revision { get; } = new("revision");
+
+ /// Follow-up phase continuing from the resolved model.
+ public static FusionPhaseKind FollowUp { get; } = new("follow_up");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(FusionPhaseKind left, FusionPhaseKind right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(FusionPhaseKind left, FusionPhaseKind right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is FusionPhaseKind other && Equals(other);
+
+ ///
+ public bool Equals(FusionPhaseKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override FusionPhaseKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, FusionPhaseKind value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionPhaseKind));
+ }
+ }
+}
+
+/// Conversation scope in which a HydraFusion phase executes.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct FusionConversationScope : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public FusionConversationScope(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// Canonical root conversation history.
+ public static FusionConversationScope Root { get; } = new("root");
+
+ /// Isolated read-only review history that does not enter the root conversation.
+ public static FusionConversationScope Review { get; } = new("review");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(FusionConversationScope left, FusionConversationScope right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(FusionConversationScope left, FusionConversationScope right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is FusionConversationScope other && Equals(other);
+
+ ///
+ public bool Equals(FusionConversationScope other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override FusionConversationScope Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, FusionConversationScope value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionConversationScope));
+ }
+ }
+}
+
+/// The agent mode that was active when this message was sent.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct UserMessageAgentMode : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public UserMessageAgentMode(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// The agent is responding interactively to the user.
+ public static UserMessageAgentMode Interactive { get; } = new("interactive");
+
+ /// The agent is preparing a plan before making changes.
+ public static UserMessageAgentMode Plan { get; } = new("plan");
+
+ /// The agent is working autonomously toward task completion.
+ public static UserMessageAgentMode Autopilot { get; } = new("autopilot");
+
+ /// The agent is in shell-focused UI mode.
+ public static UserMessageAgentMode Shell { get; } = new("shell");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(UserMessageAgentMode left, UserMessageAgentMode right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(UserMessageAgentMode left, UserMessageAgentMode right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is UserMessageAgentMode other && Equals(other);
+
+ ///
+ public bool Equals(UserMessageAgentMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override UserMessageAgentMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, UserMessageAgentMode value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(UserMessageAgentMode));
+ }
+ }
+}
+
+/// Why the binary data is absent: it exceeded the inline size limit, or its asset was unavailable.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct OmittedBinaryOmittedReason : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public OmittedBinaryOmittedReason(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// Bytes exceeded the session's inline size limit.
+ public static OmittedBinaryOmittedReason TooLarge { get; } = new("too_large");
+
+ /// The referenced binary asset could not be found (e.g. a truncated log).
+ public static OmittedBinaryOmittedReason AssetUnavailable { get; } = new("asset_unavailable");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(OmittedBinaryOmittedReason left, OmittedBinaryOmittedReason right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(OmittedBinaryOmittedReason left, OmittedBinaryOmittedReason right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is OmittedBinaryOmittedReason other && Equals(other);
+
+ ///
+ public bool Equals(OmittedBinaryOmittedReason other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override OmittedBinaryOmittedReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, OmittedBinaryOmittedReason value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(OmittedBinaryOmittedReason));
+ }
+ }
+}
+
+/// Type of GitHub reference.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct AttachmentGitHubReferenceType : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public AttachmentGitHubReferenceType(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// GitHub issue reference.
+ public static AttachmentGitHubReferenceType Issue { get; } = new("issue");
+
+ /// GitHub pull request reference.
+ public static AttachmentGitHubReferenceType Pr { get; } = new("pr");
+
+ /// GitHub discussion reference.
+ public static AttachmentGitHubReferenceType Discussion { get; } = new("discussion");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(AttachmentGitHubReferenceType left, AttachmentGitHubReferenceType right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(AttachmentGitHubReferenceType left, AttachmentGitHubReferenceType right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is AttachmentGitHubReferenceType other && Equals(other);
+
+ ///
+ public bool Equals(AttachmentGitHubReferenceType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override AttachmentGitHubReferenceType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, AttachmentGitHubReferenceType value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AttachmentGitHubReferenceType));
+ }
+ }
+}
+
+/// How this user message was delivered to the agentic loop, relative to whether the loop was already running. This is the timing axis only; the message's origin (human vs. system/command/schedule/skill/etc.) is carried separately by `source`. A system-injected message has a delivery too — e.g. a background-task notification waking an idle agent is `idle`, the same mechanism as a human starting a fresh turn.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct UserMessageDelivery : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public UserMessageDelivery(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// Delivered while the loop was idle; starts its own run immediately (a human's fresh turn, or a system notification waking an idle agent).
+ public static UserMessageDelivery Idle { get; } = new("idle");
+
+ /// Injected into the current in-flight run while the agent was busy (immediate mode).
+ public static UserMessageDelivery Steering { get; } = new("steering");
+
+ /// Enqueued while the agent was busy; processed as its own run afterward.
+ public static UserMessageDelivery Queued { get; } = new("queued");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(UserMessageDelivery left, UserMessageDelivery right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(UserMessageDelivery left, UserMessageDelivery right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is UserMessageDelivery other && Equals(other);
+
+ ///
+ public bool Equals(UserMessageDelivery other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override UserMessageDelivery Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, UserMessageDelivery value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(UserMessageDelivery));
+ }
+ }
+}
+
+/// What the agent was doing when the user interrupted it.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct AgentInterruptedActivity : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public AgentInterruptedActivity(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// A request to the model was open.
+ public static AgentInterruptedActivity ModelCall { get; } = new("model_call");
+
+ /// The turn was sleeping between retry attempts.
+ public static AgentInterruptedActivity RetryBackoff { get; } = new("retry_backoff");
+
+ /// One or more tools were executing.
+ public static AgentInterruptedActivity ToolCall { get; } = new("tool_call");
+
+ /// Background sub-agents were running while the main loop was idle.
+ public static AgentInterruptedActivity BackgroundAgent { get; } = new("background_agent");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(AgentInterruptedActivity left, AgentInterruptedActivity right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(AgentInterruptedActivity left, AgentInterruptedActivity right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is AgentInterruptedActivity other && Equals(other);
+
+ ///
+ public bool Equals(AgentInterruptedActivity other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override AgentInterruptedActivity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, AgentInterruptedActivity value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentInterruptedActivity));
+ }
+ }
+}
+
+/// Where the interruption landed relative to the first streamed token.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct AgentInterruptedCancelPhase : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public AgentInterruptedCancelPhase(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// No output had been produced when the request was cancelled.
+ public static AgentInterruptedCancelPhase PreFirstToken { get; } = new("pre_first_token");
+
+ /// The response was already streaming when the request was cancelled.
+ public static AgentInterruptedCancelPhase MidStream { get; } = new("mid_stream");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(AgentInterruptedCancelPhase left, AgentInterruptedCancelPhase right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(AgentInterruptedCancelPhase left, AgentInterruptedCancelPhase right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is AgentInterruptedCancelPhase other && Equals(other);
+
+ ///
+ public bool Equals(AgentInterruptedCancelPhase other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override AgentInterruptedCancelPhase Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, AgentInterruptedCancelPhase value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentInterruptedCancelPhase));
+ }
+ }
+}
+
+/// Transport used for a failed model call.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct ModelCallFailureTransport : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public ModelCallFailureTransport(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// HTTP transport, including SSE streams.
+ public static ModelCallFailureTransport Http { get; } = new("http");
+
+ /// WebSocket transport.
+ public static ModelCallFailureTransport Websocket { get; } = new("websocket");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(ModelCallFailureTransport left, ModelCallFailureTransport right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(ModelCallFailureTransport left, ModelCallFailureTransport right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is ModelCallFailureTransport other && Equals(other);
+
+ ///
+ public bool Equals(ModelCallFailureTransport other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override ModelCallFailureTransport Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, ModelCallFailureTransport value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelCallFailureTransport));
+ }
+ }
+}
+
+/// Content-safe activity observed while a HydraFusion phase is running.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct FusionPhaseActivityKind : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public FusionPhaseActivityKind(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// The provider produced additional private output bytes.
+ public static FusionPhaseActivityKind ModelOutput { get; } = new("model_output");
+
+ /// A tool began executing inside the phase.
+ public static FusionPhaseActivityKind ToolStarted { get; } = new("tool_started");
+
+ /// A tool finished executing inside the phase.
+ public static FusionPhaseActivityKind ToolCompleted { get; } = new("tool_completed");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(FusionPhaseActivityKind left, FusionPhaseActivityKind right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(FusionPhaseActivityKind left, FusionPhaseActivityKind right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is FusionPhaseActivityKind other && Equals(other);
+
+ ///
+ public bool Equals(FusionPhaseActivityKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override FusionPhaseActivityKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, FusionPhaseActivityKind value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionPhaseActivityKind));
+ }
+ }
+}
+
+/// How a durable phase checkpoint contributes its exact message to canonical root history.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct FusionProjectionMode : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public FusionProjectionMode(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// Append the exact root message immediately.
+ public static FusionProjectionMode Append { get; } = new("append");
+
+ /// Hold a terminal message outside canonical history until the final commit selects it.
+ public static FusionProjectionMode Staged { get; } = new("staged");
+
+ /// Do not project the checkpoint into root history.
+ public static FusionProjectionMode None { get; } = new("none");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(FusionProjectionMode left, FusionProjectionMode right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(FusionProjectionMode left, FusionProjectionMode right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is FusionProjectionMode other && Equals(other);
+
+ ///
+ public bool Equals(FusionProjectionMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override FusionProjectionMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, FusionProjectionMode value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionProjectionMode));
+ }
+ }
+}
+
+/// Durable outcome status of a HydraFusion phase.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct FusionPhaseStatus : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public FusionPhaseStatus(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// The phase completed successfully.
+ public static FusionPhaseStatus Succeeded { get; } = new("succeeded");
+
+ /// The phase failed.
+ public static FusionPhaseStatus Failed { get; } = new("failed");
+
+ /// The phase was cancelled.
+ public static FusionPhaseStatus Cancelled { get; } = new("cancelled");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(FusionPhaseStatus left, FusionPhaseStatus right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(FusionPhaseStatus left, FusionPhaseStatus right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is FusionPhaseStatus other && Equals(other);
+
+ ///
+ public bool Equals(FusionPhaseStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override FusionPhaseStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, FusionPhaseStatus value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionPhaseStatus));
+ }
+ }
+}
+
+/// Tool call type: "function" for standard tool calls, "custom" for grammar-based tool calls. Defaults to "function" when absent.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct AssistantMessageToolRequestType : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public AssistantMessageToolRequestType(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// Standard function-style tool call.
+ public static AssistantMessageToolRequestType Function { get; } = new("function");
+
+ /// Custom grammar-based tool call.
+ public static AssistantMessageToolRequestType Custom { get; } = new("custom");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(AssistantMessageToolRequestType left, AssistantMessageToolRequestType right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(AssistantMessageToolRequestType left, AssistantMessageToolRequestType right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is AssistantMessageToolRequestType other && Equals(other);
+
+ ///
+ public bool Equals(AssistantMessageToolRequestType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override AssistantMessageToolRequestType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, AssistantMessageToolRequestType value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AssistantMessageToolRequestType));
+ }
+ }
+}
+
+/// The system that produced a citation.
+[Experimental(Diagnostics.Experimental)]
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct CitationProvider : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public CitationProvider(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// Citation produced by an Anthropic (Claude) model response.
+ public static CitationProvider Anthropic { get; } = new("anthropic");
+
+ /// Citation produced by an OpenAI model response.
+ public static CitationProvider Openai { get; } = new("openai");
+
+ /// Citation synthesized client-side by the runtime from tool output.
+ public static CitationProvider Client { get; } = new("client");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(CitationProvider left, CitationProvider right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(CitationProvider left, CitationProvider right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is CitationProvider other && Equals(other);
+
+ ///
+ public bool Equals(CitationProvider other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override CitationProvider Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, CitationProvider value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(CitationProvider));
+ }
+ }
+}
+
+/// Hosted program caller type.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct AssistantMessageToolRequestCallerType : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public AssistantMessageToolRequestCallerType(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// Gets the program value.
+ public static AssistantMessageToolRequestCallerType Program { get; } = new("program");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(AssistantMessageToolRequestCallerType left, AssistantMessageToolRequestCallerType right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(AssistantMessageToolRequestCallerType left, AssistantMessageToolRequestCallerType right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is AssistantMessageToolRequestCallerType other && Equals(other);
+
+ ///
+ public bool Equals(AssistantMessageToolRequestCallerType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override AssistantMessageToolRequestCallerType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, AssistantMessageToolRequestCallerType value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AssistantMessageToolRequestCallerType));
+ }
+ }
+}
+
+/// API endpoint used for this model call, matching CAPI supported_endpoints vocabulary.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct AssistantUsageApiEndpoint : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public AssistantUsageApiEndpoint(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// Chat Completions API endpoint.
+ public static AssistantUsageApiEndpoint ChatCompletions { get; } = new("/chat/completions");
+
+ /// Anthropic Messages API endpoint.
+ public static AssistantUsageApiEndpoint V1Messages { get; } = new("/v1/messages");
+
+ /// Responses API endpoint.
+ public static AssistantUsageApiEndpoint Responses { get; } = new("/responses");
+
+ /// WebSocket Responses API endpoint.
+ public static AssistantUsageApiEndpoint WsResponses { get; } = new("ws:/responses");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(AssistantUsageApiEndpoint left, AssistantUsageApiEndpoint right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(AssistantUsageApiEndpoint left, AssistantUsageApiEndpoint right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is AssistantUsageApiEndpoint other && Equals(other);
+
+ ///
+ public bool Equals(AssistantUsageApiEndpoint other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override AssistantUsageApiEndpoint Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, AssistantUsageApiEndpoint value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AssistantUsageApiEndpoint));
+ }
+ }
+}
+
+/// Transport used for a successful model call.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct AssistantUsageTransport : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public AssistantUsageTransport(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// HTTP transport, including SSE streams.
+ public static AssistantUsageTransport Http { get; } = new("http");
+
+ /// WebSocket transport.
+ public static AssistantUsageTransport Websocket { get; } = new("websocket");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(AssistantUsageTransport left, AssistantUsageTransport right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(AssistantUsageTransport left, AssistantUsageTransport right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is AssistantUsageTransport other && Equals(other);
+
+ ///
+ public bool Equals(AssistantUsageTransport other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override AssistantUsageTransport Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, AssistantUsageTransport value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AssistantUsageTransport));
+ }
+ }
+}
+
+/// For HTTP 400 failures only: whether the response carried a structured CAPI error envelope (structured_error, a deterministic validation failure) or no error body (bodyless, the transient gateway/proxy signature). Absent for non-400 failures.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct ModelCallFailureBadRequestKind : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public ModelCallFailureBadRequestKind(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// The 400 response carried no error body (transient gateway/proxy signature).
+ public static ModelCallFailureBadRequestKind Bodyless { get; } = new("bodyless");
+
+ /// The 400 response carried a structured CAPI error envelope (deterministic validation failure).
+ public static ModelCallFailureBadRequestKind StructuredError { get; } = new("structured_error");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(ModelCallFailureBadRequestKind left, ModelCallFailureBadRequestKind right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(ModelCallFailureBadRequestKind left, ModelCallFailureBadRequestKind right) => !(left == right);
+
+ ///
+ public override bool Equals(object? obj) => obj is ModelCallFailureBadRequestKind other && Equals(other);
+
+ ///
+ public bool Equals(ModelCallFailureBadRequestKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+
+ ///
+ public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
+
+ ///
+ public override string ToString() => Value;
+
+ /// Provides a for serializing instances.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Converter : JsonConverter
+ {
+ ///
+ public override ModelCallFailureBadRequestKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ {
+ return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
+ }
+
+ ///
+ public override void Write(Utf8JsonWriter writer, ModelCallFailureBadRequestKind value, JsonSerializerOptions options)
+ {
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelCallFailureBadRequestKind));
+ }
+ }
+}
+
+/// Boundary that produced a model call failure.
+[JsonConverter(typeof(Converter))]
+[DebuggerDisplay("{Value,nq}")]
+public readonly struct ModelCallFailureKind : IEquatable
+{
+ private readonly string? _value;
+
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
+ [JsonConstructor]
+ public ModelCallFailureKind(string value)
+ {
+ ArgumentException.ThrowIfNullOrWhiteSpace(value);
+ _value = value;
+ }
+
+ /// Gets the value associated with this .
+ public string Value => _value ?? string.Empty;
+
+ /// The provider returned an API error response.
+ public static ModelCallFailureKind Api { get; } = new("api");
+
+ /// The request transport failed before a usable API response completed.
+ public static ModelCallFailureKind Transport { get; } = new("transport");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(ModelCallFailureKind left, ModelCallFailureKind right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(AgentInterruptedActivity left, AgentInterruptedActivity right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(ModelCallFailureKind left, ModelCallFailureKind right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is AgentInterruptedActivity other && Equals(other);
+ public override bool Equals(object? obj) => obj is ModelCallFailureKind other && Equals(other);
///
- public bool Equals(AgentInterruptedActivity other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(ModelCallFailureKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -13378,60 +15790,63 @@ public AgentInterruptedActivity(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override AgentInterruptedActivity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override ModelCallFailureKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, AgentInterruptedActivity value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, ModelCallFailureKind value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentInterruptedActivity));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelCallFailureKind));
}
}
}
-/// Where the interruption landed relative to the first streamed token.
+/// Where the failed model call originated.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct AgentInterruptedCancelPhase : IEquatable
+public readonly struct ModelCallFailureSource : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public AgentInterruptedCancelPhase(string value)
+ public ModelCallFailureSource(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// No output had been produced when the request was cancelled.
- public static AgentInterruptedCancelPhase PreFirstToken { get; } = new("pre_first_token");
+ /// Model call from the top-level agent.
+ public static ModelCallFailureSource TopLevel { get; } = new("top_level");
- /// The response was already streaming when the request was cancelled.
- public static AgentInterruptedCancelPhase MidStream { get; } = new("mid_stream");
+ /// Model call from a sub-agent.
+ public static ModelCallFailureSource Subagent { get; } = new("subagent");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(AgentInterruptedCancelPhase left, AgentInterruptedCancelPhase right) => left.Equals(right);
+ /// Model call from MCP sampling.
+ public static ModelCallFailureSource McpSampling { get; } = new("mcp_sampling");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(AgentInterruptedCancelPhase left, AgentInterruptedCancelPhase right) => !(left == right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(ModelCallFailureSource left, ModelCallFailureSource right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(ModelCallFailureSource left, ModelCallFailureSource right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is AgentInterruptedCancelPhase other && Equals(other);
+ public override bool Equals(object? obj) => obj is ModelCallFailureSource other && Equals(other);
///
- public bool Equals(AgentInterruptedCancelPhase other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(ModelCallFailureSource other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -13439,60 +15854,66 @@ public AgentInterruptedCancelPhase(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override AgentInterruptedCancelPhase Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override ModelCallFailureSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, AgentInterruptedCancelPhase value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, ModelCallFailureSource value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AgentInterruptedCancelPhase));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelCallFailureSource));
}
}
}
-/// Transport used for a failed model call.
+/// Final outcome of one logical model dispatch after response acceptance processing.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct ModelCallFailureTransport : IEquatable
+public readonly struct ModelCallFinishedOutcome : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public ModelCallFailureTransport(string value)
+ public ModelCallFinishedOutcome(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// HTTP transport, including SSE streams.
- public static ModelCallFailureTransport Http { get; } = new("http");
+ /// The provider response was accepted for continued agent processing.
+ public static ModelCallFinishedOutcome Success { get; } = new("success");
- /// WebSocket transport.
- public static ModelCallFailureTransport Websocket { get; } = new("websocket");
+ /// The dispatch ended with a provider or transport error.
+ public static ModelCallFinishedOutcome Error { get; } = new("error");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(ModelCallFailureTransport left, ModelCallFailureTransport right) => left.Equals(right);
+ /// The dispatch was cancelled before an accepted response was produced.
+ public static ModelCallFinishedOutcome Cancelled { get; } = new("cancelled");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(ModelCallFailureTransport left, ModelCallFailureTransport right) => !(left == right);
+ /// The provider response was rejected during post-response acceptance processing.
+ public static ModelCallFinishedOutcome Rejected { get; } = new("rejected");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(ModelCallFinishedOutcome left, ModelCallFinishedOutcome right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(ModelCallFinishedOutcome left, ModelCallFinishedOutcome right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is ModelCallFailureTransport other && Equals(other);
+ public override bool Equals(object? obj) => obj is ModelCallFinishedOutcome other && Equals(other);
///
- public bool Equals(ModelCallFailureTransport other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(ModelCallFinishedOutcome other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -13500,64 +15921,66 @@ public ModelCallFailureTransport(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override ModelCallFailureTransport Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override ModelCallFinishedOutcome Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, ModelCallFailureTransport value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, ModelCallFinishedOutcome value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelCallFailureTransport));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ModelCallFinishedOutcome));
}
}
}
-/// Content-safe activity observed while a HydraFusion phase is running.
-[Experimental(Diagnostics.Experimental)]
+/// Finite reason code describing why the current turn was aborted.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FusionPhaseActivityKind : IEquatable
+public readonly struct AbortReason : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FusionPhaseActivityKind(string value)
+ public AbortReason(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The provider produced additional private output bytes.
- public static FusionPhaseActivityKind ModelOutput { get; } = new("model_output");
+ /// The local user requested the abort, for example by pressing Ctrl+C in the CLI.
+ public static AbortReason UserInitiated { get; } = new("user_initiated");
- /// A tool began executing inside the phase.
- public static FusionPhaseActivityKind ToolStarted { get; } = new("tool_started");
+ /// A remote command requested the abort.
+ public static AbortReason RemoteCommand { get; } = new("remote_command");
- /// A tool finished executing inside the phase.
- public static FusionPhaseActivityKind ToolCompleted { get; } = new("tool_completed");
+ /// An MCP server delivered a user.abort notification.
+ public static AbortReason UserAbort { get; } = new("user_abort");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FusionPhaseActivityKind left, FusionPhaseActivityKind right) => left.Equals(right);
+ /// Autopilot stopped the run because the active objective reached its user-set --max-ai-credits limit.
+ public static AbortReason AutopilotCreditLimit { get; } = new("autopilot_credit_limit");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FusionPhaseActivityKind left, FusionPhaseActivityKind right) => !(left == right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(AbortReason left, AbortReason right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(AbortReason left, AbortReason right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FusionPhaseActivityKind other && Equals(other);
+ public override bool Equals(object? obj) => obj is AbortReason other && Equals(other);
///
- public bool Equals(FusionPhaseActivityKind other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(AbortReason other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -13565,64 +15988,69 @@ public FusionPhaseActivityKind(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FusionPhaseActivityKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override AbortReason Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FusionPhaseActivityKind value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, AbortReason value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionPhaseActivityKind));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AbortReason));
}
}
}
-/// How a durable phase checkpoint contributes its exact message to canonical root history.
-[Experimental(Diagnostics.Experimental)]
+/// Configuration source: user, workspace, plugin, builtin, or managed.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FusionProjectionMode : IEquatable
+public readonly struct McpServerSource : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FusionProjectionMode(string value)
+ public McpServerSource(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// Append the exact root message immediately.
- public static FusionProjectionMode Append { get; } = new("append");
+ /// Server configured in the user's global MCP configuration.
+ public static McpServerSource User { get; } = new("user");
- /// Hold a terminal message outside canonical history until the final commit selects it.
- public static FusionProjectionMode Staged { get; } = new("staged");
+ /// Server configured by the current workspace.
+ public static McpServerSource Workspace { get; } = new("workspace");
- /// Do not project the checkpoint into root history.
- public static FusionProjectionMode None { get; } = new("none");
+ /// Server contributed by an installed plugin.
+ public static McpServerSource Plugin { get; } = new("plugin");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FusionProjectionMode left, FusionProjectionMode right) => left.Equals(right);
+ /// Server bundled with the runtime.
+ public static McpServerSource Builtin { get; } = new("builtin");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FusionProjectionMode left, FusionProjectionMode right) => !(left == right);
+ /// Server supplied by a trusted host-managed catalog.
+ public static McpServerSource Managed { get; } = new("managed");
+
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(McpServerSource left, McpServerSource right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(McpServerSource left, McpServerSource right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FusionProjectionMode other && Equals(other);
+ public override bool Equals(object? obj) => obj is McpServerSource other && Equals(other);
///
- public bool Equals(FusionProjectionMode other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(McpServerSource other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -13630,64 +16058,66 @@ public FusionProjectionMode(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FusionProjectionMode Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override McpServerSource Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FusionProjectionMode value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, McpServerSource value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionProjectionMode));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpServerSource));
}
}
}
-/// Durable outcome status of a HydraFusion phase.
-[Experimental(Diagnostics.Experimental)]
+/// Transport mechanism: stdio, http, sse (deprecated), or memory (in-process MCP server).
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct FusionPhaseStatus : IEquatable
+public readonly struct McpServerTransport : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public FusionPhaseStatus(string value)
+ public McpServerTransport(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// The phase completed successfully.
- public static FusionPhaseStatus Succeeded { get; } = new("succeeded");
+ /// Server communicates over stdio with a local child process.
+ public static McpServerTransport Stdio { get; } = new("stdio");
- /// The phase failed.
- public static FusionPhaseStatus Failed { get; } = new("failed");
+ /// Server communicates over streamable HTTP.
+ public static McpServerTransport Http { get; } = new("http");
- /// The phase was cancelled.
- public static FusionPhaseStatus Cancelled { get; } = new("cancelled");
+ /// Server communicates over Server-Sent Events (deprecated).
+ public static McpServerTransport Sse { get; } = new("sse");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(FusionPhaseStatus left, FusionPhaseStatus right) => left.Equals(right);
+ /// Server is backed by an in-memory runtime implementation.
+ public static McpServerTransport Memory { get; } = new("memory");
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(FusionPhaseStatus left, FusionPhaseStatus right) => !(left == right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(McpServerTransport left, McpServerTransport right) => left.Equals(right);
+
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(McpServerTransport left, McpServerTransport right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is FusionPhaseStatus other && Equals(other);
+ public override bool Equals(object? obj) => obj is McpServerTransport other && Equals(other);
///
- public bool Equals(FusionPhaseStatus other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(McpServerTransport other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -13695,60 +16125,60 @@ public FusionPhaseStatus(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override FusionPhaseStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override McpServerTransport Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, FusionPhaseStatus value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, McpServerTransport value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(FusionPhaseStatus));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(McpServerTransport));
}
}
}
-/// Tool call type: "function" for standard tool calls, "custom" for grammar-based tool calls. Defaults to "function" when absent.
+/// Allowed values for the `ToolExecutionStartToolDescriptionMetaUIVisibility` enumeration.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct AssistantMessageToolRequestType : IEquatable
+public readonly struct ToolExecutionStartToolDescriptionMetaUIVisibility : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public AssistantMessageToolRequestType(string value)
+ public ToolExecutionStartToolDescriptionMetaUIVisibility(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// Standard function-style tool call.
- public static AssistantMessageToolRequestType Function { get; } = new("function");
+ /// Tool is callable by the model (LLM tool surface).
+ public static ToolExecutionStartToolDescriptionMetaUIVisibility Model { get; } = new("model");
- /// Custom grammar-based tool call.
- public static AssistantMessageToolRequestType Custom { get; } = new("custom");
+ /// Tool is callable by the MCP App view (iframe) via session.mcp.apps.callTool.
+ public static ToolExecutionStartToolDescriptionMetaUIVisibility App { get; } = new("app");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(AssistantMessageToolRequestType left, AssistantMessageToolRequestType right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(ToolExecutionStartToolDescriptionMetaUIVisibility left, ToolExecutionStartToolDescriptionMetaUIVisibility right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(AssistantMessageToolRequestType left, AssistantMessageToolRequestType right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(ToolExecutionStartToolDescriptionMetaUIVisibility left, ToolExecutionStartToolDescriptionMetaUIVisibility right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is AssistantMessageToolRequestType other && Equals(other);
+ public override bool Equals(object? obj) => obj is ToolExecutionStartToolDescriptionMetaUIVisibility other && Equals(other);
///
- public bool Equals(AssistantMessageToolRequestType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(ToolExecutionStartToolDescriptionMetaUIVisibility other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -13756,64 +16186,60 @@ public AssistantMessageToolRequestType(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///
- public override AssistantMessageToolRequestType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+ public override ToolExecutionStartToolDescriptionMetaUIVisibility Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return new(GeneratedStringEnumJson.ReadValue(ref reader, typeToConvert));
}
///
- public override void Write(Utf8JsonWriter writer, AssistantMessageToolRequestType value, JsonSerializerOptions options)
+ public override void Write(Utf8JsonWriter writer, ToolExecutionStartToolDescriptionMetaUIVisibility value, JsonSerializerOptions options)
{
- GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(AssistantMessageToolRequestType));
+ GeneratedStringEnumJson.WriteValue(writer, value.Value, typeof(ToolExecutionStartToolDescriptionMetaUIVisibility));
}
}
}
-/// The system that produced a citation.
-[Experimental(Diagnostics.Experimental)]
+/// Binary result type discriminator. Use "image" for images and "resource" for other binary data.
[JsonConverter(typeof(Converter))]
[DebuggerDisplay("{Value,nq}")]
-public readonly struct CitationProvider : IEquatable
+public readonly struct PersistedBinaryImageType : IEquatable
{
private readonly string? _value;
- /// Initializes a new instance of the struct.
- /// The value to associate with this .
+ /// Initializes a new instance of the struct.
+ /// The value to associate with this .
[JsonConstructor]
- public CitationProvider(string value)
+ public PersistedBinaryImageType(string value)
{
ArgumentException.ThrowIfNullOrWhiteSpace(value);
_value = value;
}
- /// Gets the value associated with this .
+ /// Gets the value associated with this .
public string Value => _value ?? string.Empty;
- /// Citation produced by an Anthropic (Claude) model response.
- public static CitationProvider Anthropic { get; } = new("anthropic");
-
- /// Citation produced by an OpenAI model response.
- public static CitationProvider Openai { get; } = new("openai");
+ /// Binary image data.
+ public static PersistedBinaryImageType Image { get; } = new("image");
- /// Citation synthesized client-side by the runtime from tool output.
- public static CitationProvider Client { get; } = new("client");
+ /// Other binary resource data.
+ public static PersistedBinaryImageType Resource { get; } = new("resource");
- /// Returns a value indicating whether two instances are equivalent.
- public static bool operator ==(CitationProvider left, CitationProvider right) => left.Equals(right);
+ /// Returns a value indicating whether two instances are equivalent.
+ public static bool operator ==(PersistedBinaryImageType left, PersistedBinaryImageType right) => left.Equals(right);
- /// Returns a value indicating whether two instances are not equivalent.
- public static bool operator !=(CitationProvider left, CitationProvider right) => !(left == right);
+ /// Returns a value indicating whether two instances are not equivalent.
+ public static bool operator !=(PersistedBinaryImageType left, PersistedBinaryImageType right) => !(left == right);
///
- public override bool Equals(object? obj) => obj is CitationProvider other && Equals(other);
+ public override bool Equals(object? obj) => obj is PersistedBinaryImageType other && Equals(other);
///
- public bool Equals(CitationProvider other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
+ public bool Equals(PersistedBinaryImageType other) => string.Equals(Value, other.Value, StringComparison.OrdinalIgnoreCase);
///
public override int GetHashCode() => StringComparer.OrdinalIgnoreCase.GetHashCode(Value);
@@ -13821,57 +16247,60 @@ public CitationProvider(string value)
///
public override string ToString() => Value;
- /// Provides a for serializing instances.
+ /// Provides a for serializing instances.
[EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Converter : JsonConverter
+ public sealed class Converter : JsonConverter
{
///