Class GitWorkflowStore
Git-backed workflow store. Wraps a FileWorkflowStore whose base directory is a cloned Git repository. Operations pull before reading and push after writing so the store stays in sync across machines.
public sealed class GitWorkflowStore : IWorkflowStore
- Inheritance
-
GitWorkflowStore
- Implements
- Inherited Members
Remarks
Uses the git CLI via JD.AI.Workflows.Store.GitHelper rather than LibGit2Sharp
to avoid heavy native library dependencies.
Constructors
GitWorkflowStore(string, string?)
public GitWorkflowStore(string repoUrl, string? localCachePath = null)
Parameters
repoUrlstringRemote Git repository URL (HTTPS or SSH).
localCachePathstringLocal path where the repo is cloned. Defaults to a subdirectory of the data root (honors
JDAI_DATA_DIR).
Methods
CatalogAsync(string?, string?, CancellationToken)
Lists all workflows in the catalog, optionally filtered by tag or author.
public Task<IReadOnlyList<SharedWorkflow>> CatalogAsync(string? tag = null, string? author = null, CancellationToken ct = default)
Parameters
tagstringauthorstringctCancellationToken
Returns
GetAsync(string, string?, CancellationToken)
Gets a specific workflow by name or ID, optionally at a specific version.
public Task<SharedWorkflow?> GetAsync(string nameOrId, string? version = null, CancellationToken ct = default)
Parameters
nameOrIdstringversionstringctCancellationToken
Returns
InstallAsync(string, string?, string, CancellationToken)
Installs a workflow from the store to a local directory.
public Task<bool> InstallAsync(string nameOrId, string? version, string localDirectory, CancellationToken ct = default)
Parameters
nameOrIdstringversionstringlocalDirectorystringctCancellationToken
Returns
PublishAsync(SharedWorkflow, CancellationToken)
Publishes a workflow to the shared store.
public Task PublishAsync(SharedWorkflow workflow, CancellationToken ct = default)
Parameters
workflowSharedWorkflowctCancellationToken
Returns
SearchAsync(string, CancellationToken)
Searches workflows by substring match on name, description, and tags.
public Task<IReadOnlyList<SharedWorkflow>> SearchAsync(string query, CancellationToken ct = default)
Parameters
querystringctCancellationToken
Returns
VersionsAsync(string, CancellationToken)
Lists all versions of a named workflow.
public Task<IReadOnlyList<SharedWorkflow>> VersionsAsync(string name, CancellationToken ct = default)
Parameters
namestringctCancellationToken