Table of Contents

Class FileWorkflowStore

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

File-based workflow store that persists shared workflows as JSON files. Uses a hierarchical directory structure: {baseDir}/{name}/{version}.json. Serves as a local-only fallback when no Git repository is configured.

public sealed class FileWorkflowStore : IWorkflowStore
Inheritance
FileWorkflowStore
Implements
Inherited Members

Constructors

FileWorkflowStore(string)

public FileWorkflowStore(string baseDirectory)

Parameters

baseDirectory string

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>>