Native .NET mixed tools
Answer a complete approval batch, resume the same turn, and inspect a fresh batch on the next turn.
Recorded in the real Angular workbench with OpenAI and the actual Hashbrown SDK. The local AG-UI agent maps shared state into instructions and authors state, activity and approval events around unchanged provider text. No browser tools, generated UI schema or executed plan steps. Approval permits another explanation only. The approval store is bounded, expiring and process-local. Unchanged provider events are paced at 20 ms for filming; the normal host adds no delay. Footage slowed to half speed for readability. Replay makes no requests or writes. No narration. Read the text walkthrough.
The teaser shows the workbench's client interrupt controls and explicit continuation. It does not demonstrate .NET native mixed tools, Microsoft Agent Framework approvals, or PostgreSQL session ownership. Those need the separate server configuration and verification below.
Host an agent behind ASP.NET Core
Scroll horizontally to see the full diagram, or expand it.
Read the diagram
Hashbrown sends AG-UI input to ASP.NET Core. The endpoint configures the Microsoft Agent Framework agent using server policy. The agent calls OpenAI or Azure OpenAI, and its AG-UI stream returns through the endpoint to the browser.
Use this opt-in recipe when one model response needs both browser tools and registered .NET functions. Microsoft Agent Framework (MAF) retains its native pending function state while Hashbrown executes browser tools. PostgreSQL owns each continuation and fences server dispatch across replicas and restarts.
The stateless .NET recipe remains available for separate browser/server model turns and application workflow confirmations. This native composition also supports genuine MAF ApprovalRequiredAIFunction requests through Hashbrown's generic interrupt controls. Application workflow confirmation and its checkpoint store remain a separate composition.
Install the pinned preview from NuGet.org
Use .NET SDK 10.0.402 and a Microsoft.NET.Sdk.Web application targeting net10.0, with nullable and implicit usings enabled. Add this single exact package reference; its nuspec supplies the tested dependencies. Commit the generated lockfile and restore with --locked-mode:
Install Hashbrown.AspNetCore 0.1.0-preview.1 from NuGet.org with an exact version pin, then create the lockfile. Commit the generated lockfile and use locked restore for subsequent builds:
dotnet add package Hashbrown.AspNetCore --version "[0.1.0-preview.1]" --source https://api.nuget.org/v3/index.json
dotnet restore --source https://api.nuget.org/v3/index.json --use-lock-file
dotnet restore --source https://api.nuget.org/v3/index.json --locked-mode
Your application owns authentication, authorization, PostgreSQL credentials and permissions, provider secrets, and configuration. The package does not provision these services. Stop and drain old workers before the source-to-package upgrade; retain the same agent, catalog, scope and configuration identities. Package versions do not replace workflow schema 3 or native schema 2. Recovery remains read-only. Published NuGet 0.1.0-preview.1 with npm SDKs 0.8.3 cannot cold-restore unresolved browser work; candidate recovery below is unreleased. Uncertain external effects must not be retried automatically. This is a stopped-worker upgrade, with no mixed-version rolling-operation guarantee.
<ItemGroup>
<PackageReference Include="Hashbrown.AspNetCore" Version="[0.1.0-preview.1]" />
</ItemGroup>
The library and its upstream hosting dependency are previews. The pinned library narrowly documents and suppresses the MAAI001 experimental session APIs. Upgrade the library pin and application startup together and rerun conformance. No private native session fields are accessed.
Use the same server provider configuration and Azure authentication settings as the existing recipe. Explicitly select Provider=openai|azure, ModelApi=responses|chat-completions, the matching endpoint and model/deployment. Supply credentials through server secret configuration. Azure CLI and managed identity modes remain server-owned; deployed managed identity qualification is still a separate follow-up. Provider credentials and PostgreSQL connection strings never belong in browser configuration.
Host the native endpoint
This complete startup assumes your application already signs users into the app cookie scheme with a trusted NameIdentifier claim. That claim must identify the full caller boundary, including tenant/issuer where necessary; provision it through your authentication system. Serve the browser and endpoint over HTTPS on the same origin. Integrate your existing authentication and request-forgery protection before accepting production requests; this example configures the session scheme and policies, not a sign-in flow.
using System.Security.Claims;
using Hashbrown.AspNetCore;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.Extensions.AI;
var builder = WebApplication.CreateBuilder(args);
builder.Configuration["ModelApi"] ??= "responses";
builder.Services.AddAuthentication("app").AddCookie("app", options =>
{
options.Cookie.HttpOnly = true;
options.Cookie.SecurePolicy = CookieSecurePolicy.Always;
options.Cookie.SameSite = SameSiteMode.Strict;
options.Events = new CookieAuthenticationEvents
{
OnRedirectToLogin = context =>
{
context.Response.StatusCode = StatusCodes.Status401Unauthorized;
return Task.CompletedTask;
},
OnRedirectToAccessDenied = context =>
{
context.Response.StatusCode = StatusCodes.Status403Forbidden;
return Task.CompletedTask;
}
};
});
builder.Services.AddAuthorization(options =>
{
options.AddPolicy("conversation-user", policy => policy.RequireAuthenticatedUser());
options.AddPolicy("native-session-operator", policy => policy.RequireAuthenticatedUser()
.RequireClaim("permission", "native-session-operator"));
});
const string AgentName = "ApplicationNativeAssistant";
var functions = new[] { AIFunctionFactory.Create(LookupAirport, "lookupAirport") };
var catalog = new NativeToolCatalog(functions.Select(function =>
new NativeToolDefinition(function.Name, 1, function.JsonSchema)));
var limits = new NativeSessionOptions
{
PayloadCapacity = 128,
SelectorCapacity = 4096,
Retention = TimeSpan.FromHours(1),
Lease = TimeSpan.FromSeconds(30)
};
await using var nativeSource = Npgsql.NpgsqlDataSource.Create(
builder.Configuration.GetConnectionString("NativeSessions")
?? throw new InvalidOperationException("Configure the native session database."));
var journal = new PostgresNativeSessionJournal(
nativeSource, catalog,
ServerConfigurationIdentity.Create(builder.Configuration),
schema: "hashbrown", options: limits);
await journal.InitializeAsync();
NativeSessionEndpointConfiguration.Configure(
builder.Services, AgentName, journal, catalog, Scope, limits);
var app = builder.Build();
app.UseAuthentication();
app.UseAuthorization();
using var client = ProviderFactory.Create(builder.Configuration);
var agent = NativeSessionAgentFactory.Create(
client, AgentName, functions, catalog,
app.Services.GetRequiredService<IHttpContextAccessor>());
NativeSessionEndpointConfiguration.Map(
app, "/run", agent, "conversation-user");
await app.RunAsync();
static string? Scope(HttpContext context) =>
context.User.Identity?.IsAuthenticated == true
? context.User.FindFirst(ClaimTypes.NameIdentifier)?.Value
: null;
static object LookupAirport(string code) => new
{
code,
name = code == "PDX" ? "Portland International Airport" : "Unknown"
};
NativeSessionEndpointConfiguration.Configure, NativeSessionAgentFactory.Create and Map are one composition. Pass the same catalog instance, complete function set, options and stable agent name. Build the catalog from each registered AIFunction.JsonSchema and explicit operation version. A hand-written approximation, missing function or mismatched schema is rejected. Browser declarations cannot reuse server names. Increment operation versions when behavior changes; never modify identities to bypass a stored conflict.
The raw ProviderFactory client is owned and disposed after the application stops. The pooled NpgsqlDataSource also lives through host shutdown. Configure ConnectionStrings:NativeSessions through server secrets and use authenticated TLS with certificate validation as described by Npgsql security. The reference is tested with PostgreSQL 18. InitializeAsync must finish before requests are accepted; it safely initializes a separately versioned native schema without converting existing application confirmation checkpoints. Coordinate initialization DDL privileges, runtime data permissions and upgrades across every worker.
ServerConfigurationIdentity binds provider, API, effective endpoint and model/deployment without storing secrets. The stable catalog additionally binds operation versions and exact schemas. Credential rotation alone does not change model compatibility. An incompatible existing selector fails before model or function work.
Authentication and a nonempty server-owned scope are both required. threadId selects a session; it grants no permissions. Native storage includes the stable agent name, trusted scope and complete native partition set. This helper uses isolation=scope. Every additional partition in a customized integration must be preserved exactly in admission, persistence and recovery. Do not accept scope or partitions from the browser.
The airport lookup is read-only. Authorize each privileged tool inside application code against the authenticated caller and its resource permissions before performing an effect. A model proposal or browser tool result never grants server permission. For downstream writes, use the business system's own idempotency/evidence controls as well: the native dispatch fence cannot prove the outcome of an interrupted external operation.
Require native approval
To require native approval for this registered lookup, replace the functions and catalog declarations in the startup above with this block. Keep the rest of the startup, authenticated scope, PostgreSQL journal initialization and endpoint composition. The lookup remains read-only; approval demonstrates the native flow and does not grant application permissions.
var functions = new AIFunction[]
{
new ApprovalRequiredAIFunction(
AIFunctionFactory.Create(LookupAirport, "lookupAirport"))
};
var catalog = new NativeToolCatalog(functions.Select(function =>
new NativeToolDefinition(
function.Name, 1, function.JsonSchema, RequiresConfirmation: true)));
The named RequiresConfirmation: true argument matches the actual wrapper; the fourth positional parameter is the optional argument validator. The complete factory composition verifies that each registered function's actual wrapper requirement matches the immutable catalog. A mixed protected/unprotected server catalog must record each function's requirement individually; marking an unwrapped function as protected is rejected. Operation versions, schemas and confirmation requirements are part of compatibility. Deploy changes deliberately, never to bypass a retained conflict.
MAF emits the genuine approval request for the registered protected function. The endpoint publishes actionable approval controls only after saving the complete native session, canonical public history and bound pending batch and authorizing terminal publication. Submit one complete decision batch for every current protected request through the existing generic interrupt controls. Each member may be approved, declined or cancelled; all decisions are admitted atomically before native execution. Each resume member uses resolved payload exactly {approved: true} or {approved: false}, or status cancelled with no payload. Missing, extra, repeated, stale or changed decisions fail before new model or executor work.
The original raw request and full actual native session key remain the authority boundary: stable agent, authenticated scope, every native partition, server configuration, registered versions and schemas, original call IDs/arguments/parents and complete batch must agree with retained server evidence. The adapter maps admitted decisions back through the original native requests using public MAF APIs. A browser-selected ID, copied server call or typed approval object cannot create permission. Your application must still authorize each operation for the caller and resource.
Declined and cancelled members never enter their registered executor. Cancellation records a distinct Cancelled decision and audit disposition while supplying native false approval with the fixed reason Cancelled by caller.. Native MAF produces the real rejection result. Cancelling a decision differs from aborting a request. Once a complete batch is consumed, failure cannot reopen it, even if no invocation reached Started. Inspect and terminally resolve uncertainty through the scoped operator path; do not replay the saved native session or resend a consumed decision as a retry.
The guarantee is at most one owned executor dispatch for an original call, not exactly-once external effects. A committed dispatch marker cannot establish whether an interrupted downstream operation completed. Use downstream idempotency and evidence, and establish old-worker and external-operation quiescence before terminal reconciliation.
A live native interrupt can cause the current SDK to cancel browser calls co-emitted in the same response. The cancelled original browser handler does not execute. On decision continuation, native MAF settles that original call with its genuine rejection result; the model can request a fresh browser call with a fresh ID, which the SDK can execute once. Do not promise execution of the cancelled original sibling or an automatic fresh call. Keep full canonical history and normal browser declarations.
What happens during a mixed turn
Browser results release deferred server work
Scroll horizontally to see the full diagram, or expand it.
Read the diagram
The native endpoint exposes browser tool calls while retaining server descriptors privately. The browser executes its own handler and returns the exact pending result. The endpoint commits a Started marker before dispatching a registered server function, then durably saves native and public state before authorizing terminal publication. This does not guarantee exactly-once external effects.
Keep the browser's normal Hashbrown tool declarations and full canonical conversation history. No browser implementation is registered for lookupAirport. The composed agent uses native invocable-function bypass plus public empty input/output history filters, so MAF retains pending work without appending a second transcript.
For a mixed response without a protected approval, the first native stream exposes browser calls while deferred server descriptors remain private. Protected interrupts follow the decision flow above. After the browser supplies the exact outstanding results, MAF executes the stored server functions and continues. The journal captures genuine model-emitted descriptors and commits Started before entering a registered function. A browser-replayed server call cannot create invocation authority. Duplicate IDs, altered prefixes/arguments, conflicting configuration and unmatched results fail before new work.
The journal atomically saves private native state, the current canonical public transcript and pending call metadata. The endpoint holds the genuine terminal event until that save and publication authorization succeed. Publication CAS cannot retract already-authorized or in-flight terminal bytes. Publishing blocks another owner until finalization or terminal retirement after independently verified publisher quiescence. The pinned upstream host alone emits its terminal before saving; attaching a store without this composition does not provide the barrier. Failed or unrepresentable native output withholds terminal success and makes recovery unavailable rather than reconstructing authority from client history.
A restart with the browser still alive may continue by sending its genuine pending tool result to another instance. No historical tool is rerun and no backend operation is replayed to recreate a missing answer. Unknown effect or terminal-publication outcomes remain fenced until an authorized operator establishes external quiescence and evidence.
Add bounded recovery and operator routes
Insert this block before await app.RunAsync(); in the startup above. The key builder mirrors the full actual native partition set. The operator policy and allowed scope claims come only from trusted application authentication; a requested route scope cannot grant access.
NativeSessionKey Key(string scope, string threadId) => new(
AgentName, scope, threadId,
new Dictionary<string, string>(StringComparer.Ordinal) { ["isolation"] = scope });
NativeSessionRecoveryEndpointConfiguration.MapRecovery(
app, "/threads/{threadId}/native-session", journal, "conversation-user",
(context, threadId) => Scope(context) is { Length: > 0 } scope
? Key(scope, threadId)
: null,
limits);
NativeSessionRecoveryEndpointConfiguration.MapOperations(
app, "/native-sessions", journal, "native-session-operator",
context => context.User.FindAll("native-session-scope")
.Select(claim => claim.Value).ToHashSet(StringComparer.Ordinal),
Scope,
Key);
The recovery route accepts POST /threads/{threadId}/native-session with the current ConversationRecoveryConfiguration from getRecoveryConfiguration(). Use matching core/framework SDK versions. These recovery APIs require SDK 0.8.1 or later; bounded projected diagnostic codes require 0.8.2 or later. The current qualification consumer uses 0.8.3. See the existing framework recovery integration and send the current system/tool/forwarded configuration; configuration drift prevents snapshot restoration.
Recovery returns a versioned public disposition and server revision, never the opaque native JSON, hidden descriptors or request authority. Restore a completed or otherwise known-safe snapshot only when provided. Ignore stale refresh responses using the existing revision/configuration guards.
Published recovery behavior
With NuGet 0.1.0-preview.1 and npm SDKs 0.8.3, native-only pending approvals can return a safe Pending snapshot. Restoring it creates a fresh local batch token; recovery lookup and restoration perform no model, executor or browser-handler work. Submit an explicit current decision to continue, including on another worker after restart. Apply the existing configuration and server-revision guards so stale refreshes cannot adopt an old batch. This published recovery response uses schema version 1, independently of the native database schema.
The published pair cannot cold-restore pending mixed approvals with an unresolved browser sibling. Recovery returns Pending with reason PendingMixedBrowserResult, no snapshot and no adoptable resumable batch. SDK cancellation annotations do not provide the missing browser result. Show the unavailable reason, disable sends and decision controls for that conversation, and expose an explicit new-thread action. An authorized operator can use the existing terminal retirement path after establishing the required quiescence/evidence. Do not omit the call, invent a result or change tool registration to restore it.
In that published flow, ordinary pending browser results return NativePendingBrowserResults with no snapshot, and restoreConversation rejects unresolved executable browser tools. Completed canonical histories containing genuine native results remain restorable without rerunning historical work. Busy, unknown, incompatible, expired, retired and missing states never authorize new execution under the same selector. This is bounded continuation recovery, not general chat archive storage.
Operators can inspect GET /native-sessions/{scope}/{threadId} and submit NativeSessionReconciliation to the corresponding /reconcile or /retire route. Supply the inspected expected state, generation and revision, a bounded reason/evidence reference, and an explicit external-quiescence acknowledgement. Establish that the old worker and downstream operation can no longer act before reconciling uncertainty. These audited transitions are terminal: they never execute, retry or reopen a function. Operator grants should be separate from ordinary conversation access.
Pending browser recovery (unreleased)
This workflow is absent from published npm 0.8.3 and NuGet 0.1.0-preview.1. It requires separately qualified, matching candidate server, core and framework packages. A locally packed package retaining a published version number is still a source candidate. The conformance reference separates candidate acceptance from the published-package live qualification.
PostgreSQL opts into INativeSessionBrowserRecoveryJournal. A custom journal must explicitly implement that optional contract; the base INativeSessionJournal interface alone supplies no browser recovery capability. Keep both recovery reads and continuation requests on the same compatible V2-capable deployment. Stop and drain incompatible workers before upgrading; a V2 advertisement does not qualify an older worker's continuation handling.
Refresh and restore without execution
Use authenticated POST /threads/{threadId}/native-session, cache: 'no-store', the unchanged JSON value from chat.getRecoveryConfiguration(), and exactly one Hashbrown-Recovery-Version: 2 header. Retain your application authorization and request-forgery policy. Malformed negotiation returns 400; an unsupported version or incapable journal returns 406. Refuse schema-1 downgrade for unresolved browser work.
Capture chat.recovery().revision before the asynchronous read. Pass that local revision as expectedRevision to restoreConversation; it is different from the response's durable serverRevision. Invalidate pending reads on thread/configuration changes, superseding reads and disposal. Network JSON remains untrusted: validate schema version 2, the known disposition, matching thread, a positive safe server revision, capability protocol version 1, equal outer/capability revisions and complete unique original call IDs. Preserve the entire canonical snapshot and let atomic restoration independently validate it against the current tools, schemas and configuration. A TypeScript cast cannot supply authority.
Only a valid Pending snapshot with pendingBrowserRecovery enables this path. Busy, UnknownEffect, Expired, Unavailable, unsupported, corrupt or unbound states grant no settlement capability. Restoration is inert: it performs no network, model, native executor or original browser-handler work. It installs chat.pendingConversationRecovery() with a fresh local id, the captured serverRevision, original toolCalls and genuine protected interrupts. The local ID is neither a server lease nor a durable lookup key.
Submit every explicit observation together
Start a fresh form for each local pending ID. Collect one choice for every original browser call and every genuine protected interrupt before enabling its single Submit action:
| Pending item | Explicit choices |
|---|---|
| Browser call | A result already known by the application: { toolCallId, status: 'result', value }; or an explicit { toolCallId, status: 'unavailable' } choice |
| Protected interrupt | Approve with { interruptId, status: 'resolved', payload: { approved: true } }; decline with { approved: false }; or cancel with { interruptId, status: 'cancelled' } and no payload |
These protected payloads apply to this recipe's boolean-object approval contract; validate a different agent's own interrupt schema. Do not call original handlers to reconstruct results, silently default missing choices to unavailable, or turn browser call IDs into ResumeEntry values. Known strings retain their exact content; object, array and null values are JSON serialized. Values must be plain, noncyclic JSON. The client limits JSON depth to 64 and the complete serialized request to 1 MiB of UTF-8; server limits may be smaller.
Call chat.resumeConversationRecovery once with the current local batchId, the complete outcomes array and all genuine protected entries. Browser-only batches omit entries or supply an empty array. Do not call ordinary resume first or manually edit canonical history; the SDK constructs result messages and transient continuation metadata. Disable ordinary send/resume and duplicate settlement while pending or recovery is required.
This unreleased helper submits choices from your form. Keep both maps empty until the user explicitly selects each observation and decision. Set batchId when that form is opened; discard it and the maps when the pending ID changes. Call submitRecovery(chat, draft) from one explicit Submit event on the existing configured resource. If a cold batch is present, show this complete form instead of the ordinary warm approval controls.
import type {
BrowserRecoveryOutcome,
Chat,
PendingConversationRecovery,
ResumeConversationRecoveryOptions,
ResumeEntry,
} from '@hashbrownai/core';
import type { ChatResourceRef } from '@hashbrownai/angular';
/** Explicit selections owned by one local recovery form. */
interface RecoveryDraft {
readonly batchId: string;
readonly outcomes: ReadonlyMap<string, BrowserRecoveryOutcome>;
readonly decisions: ReadonlyMap<string, 'approve' | 'decline' | 'cancel'>;
}
/** Builds a complete submission without changing the form or conversation. */
function recoveryOptions(
pending: PendingConversationRecovery,
draft: RecoveryDraft,
): ResumeConversationRecoveryOptions {
if (
draft.batchId !== pending.id ||
draft.outcomes.size !== pending.toolCalls.length ||
draft.decisions.size !== pending.interrupts.length
) throw Error('Complete the current recovery form');
return {
batchId: pending.id,
outcomes: pending.toolCalls.map(({ id }) => {
const outcome = draft.outcomes.get(id);
if (!outcome || outcome.toolCallId !== id)
throw Error('Choose an outcome for every original browser call');
return outcome;
}),
entries: pending.interrupts.map(({ id }): ResumeEntry => {
const decision = draft.decisions.get(id);
if (decision === 'cancel')
return { interruptId: id, status: 'cancelled' };
if (decision !== 'approve' && decision !== 'decline')
throw Error('Choose every protected decision');
return {
interruptId: id,
status: 'resolved',
payload: { approved: decision === 'approve' },
};
}),
};
}
/** Call once from the form's Submit event and display synchronous form errors. */
export function submitRecovery(
chat: Pick<ChatResourceRef<Chat.AnyTool>,
'pendingConversationRecovery' | 'resumeConversationRecovery'>,
draft: RecoveryDraft,
): void {
const pending = chat.pendingConversationRecovery();
if (!pending) throw Error('Refresh authoritative recovery first');
const options = recoveryOptions(pending, draft);
chat.resumeConversationRecovery(options);
}
A synchronous local validation error leaves the batch unchanged so the form can be corrected. The first cold continuation has one logical transport attempt and one built-in HTTP fetch, even with retry configuration. Timeout, cancellation, disconnect, malformed acknowledgement, unknown network failure or a 409 requires an explicit authoritative refresh. Do not resend the old token, silently substitute a newer server revision or generate a replacement request. The refresh may return Pending, Busy, Completed or UnknownEffect. An explicit new thread selects a new identity; it does not cancel server work.
After a terminal transport error, Angular's resource reports status() === 'error' and hasValue() === false; value() throws the same error returned by error(), and snapshot() contains the error. Keep the recovery controls available and refresh authoritative status explicitly. Restoring a Completed snapshot makes the value readable again.
For completion, structured completion and UI completion, keep the current threadId until the recovered run has settled. After restoring Completed, use an explicit application action to supply a fresh caller-owned threadId through the existing facade option before the next independent prediction, for example by remounting the facade. Completion inputs replace history, so replacing the retained canonical prefix under the same native thread is rejected with 400. Chat inputs append a turn and can continue on the same owned thread. Preserve a caller-provided selector until that explicit action; do not silently substitute another identity.
An unavailable result records uncertainty: the original operation may already have occurred, and no retry is authorized. The canonical result yields recovery().diagnostics with kind browser-result-unavailable, including after save and another reload. A known string exactly equal to the reserved unavailable marker is conservatively uncertain too; a near match is not the same marker. This diagnostic is independent of the unstructured-assistant-history policy. Render diagnostic content, arguments, names and IDs using ordinary escaped Angular bindings. Newly model-issued IDs follow normal application authorization/idempotency policy; this workflow does not promise exactly-once external effects.
Retention and deployment
Run journal.MaintainAsync from an application-owned bounded background job with cancellation and observed failures. Expiry uses the database clock; caller cancellation timestamps are telemetry. Approval expiry cannot outlive its session. Maintenance purges private native/history/argument payloads while retaining permanent selector tombstones, consumed-decision and invocation fences and bounded audit evidence. Purge does not permit selector or call identity reuse. Defaults remain 128 live/private payloads and 4096 total selectors per agent/scope. Retained fences count toward bounded capacity; deleting a row to reuse a selector defeats the fence.
The unreleased PostgreSQL implementation also reconciles expired request authority. Schedule maintenance for every trusted compatible agent/model/tool-catalog registration, with consistent options; reads do not repair expired authority. One combined MaintenanceBatch budget covers reconciliation and privacy purges. The return value counts distinct sessions actually changed. Database time, locked-row rechecks and skipped competing locks determine eligibility; repeated passes drain backlog, without promising recovery exactly at lease expiry.
Safely expired Owned work may become Ready only after complete dispatch and consumption checks. Consumed approve, decline and cancel decisions remain fences even before Started. Uncertain Owned or Saved work becomes Blocked; expired Publishing becomes PublicationUnknown. These uncertain states read as UnknownEffect and require independent outcome evidence and operator policy. Maintenance never infers an external result or redispatches a tool. A continuation requires a fresh authoritative revision. Privacy purge remains schema-wide, while retained lease reconciliation is registration-specific. Custom journals define their own maintenance behavior. See the durability and compatibility checkpoint for the separately executed process-death and old-server checks.
Input and selector/new-payload-slot capacity known at admission is rejected before model work. New native-output call or descriptor capacity can only be discovered from legitimate model output: a model request may already have occurred. Reject excess capture/allocation before protected dispatch or interrupt/terminal publication, without evicting retained fences, granting partial approval authority or automatically retrying the model. Reaching retained-call capacity does not prohibit a later model turn that needs no new call. Plan scope lifecycle and capacity explicitly.
Fresh initialization uses native schema 2. Stop, drain and establish quiescence of all schema1 workers before migration; there is no overlapping mixed-version rolling-operation guarantee. Native schema2 migration preserves existing dispatch markers, generations, tombstones and audit and is separate from application workflow checkpoint schema3. A new schema version cannot stop an already-running old binary. Deploy compatible model, agent name, tool catalog and source versions across workers. Size leases for your workload; helpers renew request authority, and an expired owner cannot obtain new dispatch or publication authority. Already-authorized or in-flight terminal writes still require finalization or independently verified publisher quiescence before retirement. Never silently turn a missing, expired, retired or incompatible continuation into a fresh session under the same selector.
For cookie authentication, keep secure/HTTP-only cookies, API 401/403 behavior, same-origin deployment and application request-forgery validation. If cross-origin hosting is necessary, allowlist exact trusted HTTPS origins, configure credentialed requests and your cookie/CSRF policy together; never combine credentials with wildcard CORS. Test those application policies with the browser before deployment.
The compiled documentation check is configured to compare identical framework C# blocks and build both provider/API choices with and without native approvals and recovery against the exact local package candidate. Its intended matrix retains the original eight native programs and adds eight approval programs; the separate stateless/application verifier retains its sixteen programs, for thirty-two compiler programs in total. Compilation results must be read from the current check output. Deterministic strict-provider tests establish protocol behavior; actual live provider and published-SDK qualification are recorded separately in the conformance reference.
Explore it in the workbench
Open the workbench below. Send the initial prompt, inspect the pending batch, and submit a complete explicit decision. Follow the continuation within that user turn and check that a new turn receives a fresh batch.
The lesson uses the checked local AG-UI agent around text chat; it does not run the native .NET composition or prove dispatch fencing across workers. Use the installed package, PostgreSQL configuration, and conformance reference above to verify native approvals and mixed calls. A generic client decision payload is not interchangeable with a MAF approval contract.