Table of Contents

Class GitWorkflowStore

Namespace
JD.AI.Workflows.Store
Assembly
JD.AI.Workflows.dll

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

repoUrl string

Remote Git repository URL (HTTPS or SSH).

localCachePath string

Local 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

tag string
author string
ct CancellationToken

Returns

Task<IReadOnlyList<SharedWorkflow>>

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

nameOrId string
version string
ct CancellationToken

Returns

Task<SharedWorkflow>

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

nameOrId string
version string
localDirectory string
ct CancellationToken

Returns

Task<bool>

PublishAsync(SharedWorkflow, CancellationToken)

Publishes a workflow to the shared store.

public Task PublishAsync(SharedWorkflow workflow, CancellationToken ct = default)

Parameters

workflow SharedWorkflow
ct CancellationToken

Returns

Task

SearchAsync(string, CancellationToken)

Searches workflows by substring match on name, description, and tags.

public Task<IReadOnlyList<SharedWorkflow>> SearchAsync(string query, CancellationToken ct = default)

Parameters

query string
ct CancellationToken

Returns

Task<IReadOnlyList<SharedWorkflow>>

VersionsAsync(string, CancellationToken)

Lists all versions of a named workflow.

public Task<IReadOnlyList<SharedWorkflow>> VersionsAsync(string name, CancellationToken ct = default)

Parameters

name string
ct CancellationToken

Returns

Task<IReadOnlyList<SharedWorkflow>>