.NET API
IAgentDefinitionStore
Tracon.Abstractions.dllThe store for agent definitions kept in the database. Versioning and rollback support are required: every save produces a new version, and old versions are not deleted.
public interface IAgentDefinitionStoreRemarks
Section titled “Remarks”Tenant behavior — AMBIENT tenant. No member takes a tenant
parameter; every method filters by the current ITenantContext
internally.
Why this differs from IAgentSkillStore/ISkillScriptGrantStore.
Those two sibling stores (added later, for the skills feature) take an
EXPECTED tenant as an explicit parameter on every method instead. Both
shapes filter correctly — there is no known cross-tenant leak from either
one — and there is no deeper design rule that decides which a given store
should use: this is a generational split, not a principled one. This store
followed the earlier convention shared with IRunStore and
ISessionStore (read ITenantContext internally); the skills
stores followed the convention shared with most later admin-CRUD stores
(an explicit parameter, no ambient fallback at all). A third-party
implementer must read each interface’s own tenant-mode remarks rather than
assume consistency across a cluster.
Methods
Section titled “Methods”DeleteAsync(string, CancellationToken)
Section titled “ DeleteAsync(string, CancellationToken)”Deletes the definition and every one of its versions.
ValueTask<bool> DeleteAsync(string name, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”name string
The agent name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”true when the delete happened.
GetAsync(string, CancellationToken)
Section titled “ GetAsync(string, CancellationToken)”Returns the current version of the definition with the given name.
ValueTask<AgentDefinition?> GetAsync(string name, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”name string
The agent name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The definition, or null when it does not exist.
GetVersionAsync(string, int, CancellationToken)
Section titled “ GetVersionAsync(string, int, CancellationToken)”Returns the given version of the definition with the given name.
ValueTask<AgentDefinition?> GetVersionAsync(string name, int version, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”name string
The agent name.
version int
The requested version number.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The definition, or null when that version does not exist.
ListAsync(CancellationToken)
Section titled “ ListAsync(CancellationToken)”Lists the current version of every definition.
ValueTask<IReadOnlyList<AgentDefinition>> ListAsync(CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<AgentDefinition>>
The definitions.
ListVersionsAsync(string, CancellationToken)
Section titled “ ListVersionsAsync(string, CancellationToken)”Lists every version of a definition, from newest to oldest.
ValueTask<IReadOnlyList<AgentDefinition>> ListVersionsAsync(string name, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”name string
The agent name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<AgentDefinition>>
The version history.
RollbackAsync(string, int, CancellationToken)
Section titled “ RollbackAsync(string, int, CancellationToken)”Makes the given version current. A rollback does not delete the old version; it saves its content as a new version.
ValueTask<AgentDefinition> RollbackAsync(string name, int version, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”name string
The agent name.
version int
The version number to roll back to.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The definition saved as the new version.
SaveAsync(AgentDefinition, CancellationToken)
Section titled “ SaveAsync(AgentDefinition, CancellationToken)”Saves the definition and produces a new version. The
AgentDefinition.Version value of the incoming definition is ignored;
the store decides the version number.
ValueTask<AgentDefinition> SaveAsync(AgentDefinition definition, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”definition AgentDefinition
The definition to save.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The definition with the new version number assigned.