.NET API
SkillScriptGrant
Tracon.Abstractions.dllThe record carrying permission to execute a skill script.
public sealed record SkillScriptGrant : IEquatable<SkillScriptGrant>- Inheritance
- object ← SkillScriptGrant
- Implements
- IEquatable<SkillScriptGrant>
- Inherited Members
- object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Script execution is a deliberate exception to Tracon’s “tools are defined only in code” rule. The grant record is this exception’s gate: a script with no grant record does not run, even with a whitelisted interpreter.
If SkillScriptGrant.ScriptName is null, the grant covers all of the skill’s scripts.
A grant for a stored or code-defined skill pins the content it was given for (SkillScriptGrant.ContentHash): a script whose content changes afterwards does not run until it is granted again. A script on disk is not pinned.
Constructors
Section titled “Constructors”SkillScriptGrant()
Section titled “ SkillScriptGrant()”public SkillScriptGrant()Properties
Section titled “Properties”ContentHash
Section titled “ ContentHash”The content the grant authorizes: the script’s content hash when a script name is set, the fingerprint of the whole script set when it is not.
public string? ContentHash { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The values are AgentSkillScriptDefinition.ContentHash and AgentSkillDefinition.ScriptSetHash.
null means the grant pins nothing, so it authorizes scripts read from disk only: a stored or code-defined script is refused under it. A grant written before content pinning existed carries null and has to be given again. A store implementation must keep this value.
ExpiresAt
Section titled “ ExpiresAt”The moment the grant expires. Never expires if null.
public DateTimeOffset? ExpiresAt { get; init; }Property Value
Section titled “Property Value”GrantedAt
Section titled “ GrantedAt”The moment the grant was given (UTC).
public DateTimeOffset GrantedAt { get; init; }Property Value
Section titled “Property Value”GrantedBy
Section titled “ GrantedBy”The actor who gave the grant.
public string? GrantedBy { get; init; }Property Value
Section titled “Property Value”The grant record identifier. A time-ordered UUID (v7).
public Guid Id { get; init; }Property Value
Section titled “Property Value”RevokedAt
Section titled “ RevokedAt”The moment the grant was revoked. Active if null.
public DateTimeOffset? RevokedAt { get; init; }Property Value
Section titled “Property Value”ScriptName
Section titled “ ScriptName”The name of the script granted. If null, all of the skill’s scripts are covered.
public string? ScriptName { get; init; }Property Value
Section titled “Property Value”SkillName
Section titled “ SkillName”The name of the skill granted.
public required string SkillName { get; init; }Property Value
Section titled “Property Value”TenantId
Section titled “ TenantId”The tenant the grant belongs to.
public required string TenantId { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(SkillScriptGrant?)
Section titled “ Equals(SkillScriptGrant?)”public bool Equals(SkillScriptGrant? other)Parameters
Section titled “Parameters”other SkillScriptGrant?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”IsActiveAt(DateTimeOffset)
Section titled “ IsActiveAt(DateTimeOffset)”Reports whether the grant is active at the given moment.
public bool IsActiveAt(DateTimeOffset instant)Parameters
Section titled “Parameters”instant DateTimeOffset
The evaluation moment.
Returns
Section titled “Returns”true if the grant is active.
Remarks
Section titled “Remarks”An expired grant is automatically invalid; the record is not expected to be deleted. Removing the row is retention’s concern.
ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(SkillScriptGrant?, SkillScriptGrant?)
Section titled “ operator ==(SkillScriptGrant?, SkillScriptGrant?)”public static bool operator ==(SkillScriptGrant? left, SkillScriptGrant? right)Parameters
Section titled “Parameters”left SkillScriptGrant?
right SkillScriptGrant?
Returns
Section titled “Returns”operator !=(SkillScriptGrant?, SkillScriptGrant?)
Section titled “ operator !=(SkillScriptGrant?, SkillScriptGrant?)”public static bool operator !=(SkillScriptGrant? left, SkillScriptGrant? right)Parameters
Section titled “Parameters”left SkillScriptGrant?
right SkillScriptGrant?