Skip to content

feat: Workflow Template Registry — remote discovery, publish validation#88

Closed
Copilot wants to merge 2 commits intomainfrom
copilot/add-workflow-template-registry
Closed

feat: Workflow Template Registry — remote discovery, publish validation#88
Copilot wants to merge 2 commits intomainfrom
copilot/add-workflow-template-registry

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 10, 2026

Adds a remote registry backed by a GitHub repo for discovering and sharing community workflows, extending the existing local template infrastructure.

New CLI commands

conductor templates --remote                              # list community templates
conductor init my-project -t registry:research-pipeline   # scaffold from registry
conductor publish my-workflow.yaml                        # validate before sharing

Changes

  • src/conductor/cli/registry.py — New module: registry client (index fetching, template download, render), publish validation with security checks (suspicious shell patterns, hardcoded secrets, schema validation)
  • src/conductor/cli/app.pytemplates gets --remote flag, init gains registry: prefix routing, new publish command
  • tests/test_cli/test_registry.py — 37 tests covering registry fetch/render, publish validation, CLI integration; all 325 existing CLI tests unaffected

Design notes

  • Registry is a simple GitHub repo (microsoft/conductor-workflows) with a JSON index and YAML templates — no new infrastructure
  • publish validates locally and directs users to open a PR against the registry repo; no write API
  • Security gate catches curl|sh, rm -rf /, hardcoded API keys, eval()/exec() patterns
  • Network failures are non-fatal for templates --remote (shows error, exits 0)

Copilot AI linked an issue Apr 10, 2026 that may be closed by this pull request
…alidation

- Add registry client module (src/conductor/cli/registry.py) for fetching
  remote templates from a GitHub-based registry
- Update `templates` command with --remote flag to list community workflows
- Update `init` command to support registry: prefix for remote templates
- Add `publish` command for validating workflows before sharing
- Add comprehensive test suite (37 tests) for all new functionality
- All 325 existing CLI tests continue to pass

Agent-Logs-Url: https://github.com/microsoft/conductor/sessions/57159493-449a-4afa-bb5e-3497c8680c42

Co-authored-by: jrob5756 <7672803+jrob5756@users.noreply.github.com>
Copilot AI changed the title [WIP] Add remote registry support for conductor templates feat: Workflow Template Registry — remote discovery, publish validation Apr 10, 2026
Copilot AI requested a review from jrob5756 April 10, 2026 19:28
jrob5756 added a commit that referenced this pull request Apr 17, 2026
Introduce a configurable named-registry system for distributing and
running shared workflows. Registries can be GitHub repos or local
directories, configured once in ~/.conductor/registries.toml and
referenced by short name.

- Add src/conductor/registry/ package (config, resolver, index, cache,
  github helpers, errors)
- Add `conductor registry` CLI subcommand group (list, add, remove,
  set-default, update, show)
- Modify run/resume/validate to accept registry refs
  (name[@registry][@Version]) in addition to local file paths
- Remove init/templates feature (init.py, templates/, test_init.py)
- Add httpx dependency for GitHub API fetching
- Add 133 new tests (unit + integration + CLI)
- Update README, cli-reference, design doc, and conductor skill

Supersedes PR #88.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jrob5756
Copy link
Copy Markdown
Collaborator

Superseded by the workflow registry redesign on branch feat/workflow-registry. The new design replaces the remote template concept with a configurable named-registry system — see docs/design/registry.md for the full design doc.

@jrob5756 jrob5756 closed this Apr 17, 2026
jrob5756 added a commit that referenced this pull request Apr 20, 2026
…ng, caching (#97)

* feat(registry): add workflow registry system, replace init/templates

Introduce a configurable named-registry system for distributing and
running shared workflows. Registries can be GitHub repos or local
directories, configured once in ~/.conductor/registries.toml and
referenced by short name.

- Add src/conductor/registry/ package (config, resolver, index, cache,
  github helpers, errors)
- Add `conductor registry` CLI subcommand group (list, add, remove,
  set-default, update, show)
- Modify run/resume/validate to accept registry refs
  (name[@registry][@Version]) in addition to local file paths
- Remove init/templates feature (init.py, templates/, test_init.py)
- Add httpx dependency for GitHub API fetching
- Add 133 new tests (unit + integration + CLI)
- Update README, cli-reference, design doc, and conductor skill

Supersedes PR #88.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(registry): add type narrowing asserts for ResolvedRef fields

The type checker flags `ref.workflow`, `ref.registry_name`, and
`ref.registry_entry` as `str | None` when passed to functions
expecting non-optional args. Add assert narrowing in each branch
to satisfy the type checker.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat(registry): auto-set first registry as default

When adding the first registry (no default configured yet), it is
automatically set as the default. Subsequent registries still require
--default to change the default.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat(registry): add GitHub auth via gh CLI for private repos

GitHub fetch helpers now automatically pick up a token from
`gh auth token` when available, enabling access to private
registry repos. Falls back to unauthenticated requests for
public repos.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(registry): use shared github helpers in index loader

The index loader was calling httpx.get directly, bypassing the auth
token from gh CLI. Refactored _load_github_index to use
fetch_file_text from github.py, which adds the Bearer token for
private repos.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(registry): show command accepts registry name or workflow ref

When `conductor registry show <name>` matches a configured registry
name, it displays the registry details and its workflows instead of
trying to parse the name as a workflow reference.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat(registry): show workflow inputs in registry show command

`conductor registry show <workflow>` now fetches the workflow and
displays its input parameters (name, type, required, default,
description) in a table, plus an example run command.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat: add top-level `conductor show` command for workflow details

Split the show UX cleanly:
- `conductor registry show <registry>` — registry info + workflow list
- `conductor show <workflow-ref>` — workflow details, inputs table,
  and example run command

Both registry show and list now hint at `conductor show` for details.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(registry): path registries read directly from source

Local path registries now return the source file path directly instead
of copying to cache. This means edits to workflow files are reflected
immediately without needing `conductor registry update`. Versioning
is skipped for path registries since there's no version control.

GitHub registries still use the cache as before.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* feat: conductor show displays inputs, agents, and outputs

The show command now displays three tables:
- Inputs: name, type, required, default, description
- Agents: name, type, description, routes (incl. parallel/for-each)
- Outputs: field name and template expression

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: bump github-copilot-sdk minimum to 0.2.2

v0.2.0 is missing copilot.session.PermissionHandler, causing the SDK
to be detected as unavailable. Pin to >=0.2.2 which has the required
exports.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: remove unused import in integration tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* style: fix ruff formatting in app.py and registry.py

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Workflow Template Registry

2 participants