Skip to content

Stock-tool CLI support: correct framing, built-in loop branch, node-meta dedup#324

Merged
jmchilton merged 5 commits into
mainfrom
cli-install-metadata
Jun 19, 2026
Merged

Stock-tool CLI support: correct framing, built-in loop branch, node-meta dedup#324
jmchilton merged 5 commits into
mainfrom
cli-install-metadata

Conversation

@jmchilton

Copy link
Copy Markdown
Member

Started from foundry#323 (whose root-cause diagnosis was wrong — stock tools resolve against the Tool Shed by bare id, not a Galaxy instance; the real bug was client-side, fixed upstream in galaxy-tool-util-ts#136 and released in @galaxy-tool-util/cli 1.8.1). This branch fixes the Foundry side and removes the duplication that let the CLI docs drift from the tool.

What changed

1. CLI reference pages corrected (a74657a)

  • galaxy-tool-cache/{add,summarize}.md: bare/stock ids resolve against the shed; --galaxy-url reframed from "fallback" → "alternate source, tried after the ToolShed"; stock ids need an explicit --tool-version (shed TRS version-list 500s, no auto-version).
  • New list.md (cache version-confirmation surface).
  • Behavioral claims grounded against real @galaxy-tool-util/cli@1.8.1 runs.

2. Built-in/stock branch in the per-step loop Molds (e8124f9)

3. Pin @galaxy-tool-util/cli to ^1.8.1 (770df68)

  • Single-source the version in package.json (root + site/); pin gxwf/index.md for parity with galaxy-tool-cache. Bumping the dep pulled the corrected stock-tool descriptions into @galaxy-tool-util/cli/meta automatically.

4. De-duplicate CLI flag docs over the node package (8d6e79c)

  • buildCliSidecar now embeds description/synopsis/args/options from the package's meta subpath (the same spec the commander program and --help are built from) — the single source the site's cli-registry already renders from. Falls back to body-only for non-meta packages (planemo).
  • The galaxy-tool-cache notes drop their hand-authored ## Flags mirrors; gxwf/draft-validate keeps its section (genuine --concrete behavioral doc). Adds a cast regression test.

Verification

npm run validate (0 errors), npm run test (135 passed), cast --check clean across the three re-cast Molds, pipeline harnesses re-assembled. CLI bumped 1.7.2 → 1.8.1; @galaxy-tool-util/schema left at 1.7.2 to avoid unrelated cast churn.

Related

  • galaxy-tool-util-ts#138 — CLI --help/spec descriptions for stock tools (shipped in 1.8.1).
  • galaxy-tool-util-ts#139 — follow-up: gxwf draft-validate --concrete should resolve built-in versions so a guessed stock version can't validate green.

🤖 Generated with Claude Code

jmchilton and others added 5 commits June 18, 2026 19:22
…li ^1.8.1

The CLI reference pages (the source we cast + expose to skills) framed
stock/built-in tools as needing a Galaxy-instance fallback. Stock tools
resolve against the Tool Shed by the bare id (galaxy-tool-util-ts #136,
released 1.8.1):

- add.md: bare/stock ids resolve against the shed; --galaxy-url reframed
  "fallback" -> alternate source tried after the shed; note --tool-version
  required for stock ids (shed TRS version-list endpoint 500s, no auto-version);
  stock example.
- summarize.md: bare stock-id support + stock example.
- list.md: new page — cache version-confirmation surface.
- index.md: pin package_version ^1.8.1 + invoke_fallback @1.8.1; drop the
  "or a Galaxy instance" source framing.
- Re-cast summarize-galaxy-tool: refreshed cli sidecars, SKILL.md install line,
  _required_tools.json now carries the 1.8.1 pin.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Stock/built-in tools (bare ids: Filter1, Cut1, collection ops, __APPLY_RULES__)
resolve against the Tool Shed by bare id, but the shed's TRS version-list
endpoint can't auto-resolve their version — so the loop must discover a concrete
version and never hand-guess one (the hallucinated-version failure in #323).

- summarize-galaxy-tool: accept a bare/stock id as the pin; wire [[list]] as the
  version-discovery surface; document the bare-id add/summarize flow with explicit
  --tool-version. list.md now casts into the skill (no longer an orphan).
- advance-galaxy-draft-step (step 2): split wrapper resolution — built-in/stock
  ids skip discover-shed-tool/author and only resolve a version via the cache flow;
  Tool Shed wrappers keep the identity-pinned/deferred branches.
- implement-galaxy-tool-step (steps 2, 4): take stock tool_version from the summary's
  cached pin, never invent it; built-in collection ops inserted to close shape gaps
  get a cache-resolved version too.
- Re-cast all three Molds (deterministic; no pending LLM step).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Single-source the CLI version in package.json (root + site), the same way
schema notes depend on a node package rather than a vendored copy. Bumping
1.7.2 -> 1.8.1 pulls the corrected stock-tool command/option descriptions into
@galaxy-tool-util/cli/meta automatically — the site's cli-registry already
renders args/options from that meta, so no hand-copying.

- package.json + site/package.json: @galaxy-tool-util/cli ^1.7.2 -> ^1.8.1
  (schema stays ^1.7.2 to avoid unrelated cast churn).
- content/cli/gxwf/index.md: pin package_version ^1.8.1 + invoke_fallback @1.8.1
  for parity with galaxy-tool-cache.
- Re-cast advance/implement and re-assemble pipeline harnesses to carry the pin.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…li/meta

cli-command sidecars now carry description/synopsis/args/options resolved from
the package's `meta` subpath (the same browser-safe spec the commander program
and --help are built from) — the single source the site's cli-registry already
renders from. buildCliSidecar imports `<package>/meta`, matches the program by
tool name and the command by name, and embeds them; it falls back to body-only
when a package ships no meta subpath (e.g. planemo).

With flags now sourced from the package, the galaxy-tool-cache notes drop their
hand-authored ## Flags lists (mechanical mirrors of the meta). gxwf/draft-validate
keeps its section — it documents --concrete extract+promote semantics and
pass-through gating the one-line meta descriptions don't carry. The shared
--cache-dir invariant moves to add.md Gotchas so it survives the flag-list drop.

Adds a cast-mold regression test for the meta-injection path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts:
#	casts/claude/skills/advance-galaxy-draft-step/SKILL.md
#	casts/claude/skills/advance-galaxy-draft-step/_provenance.json
#	casts/claude/skills/advance-galaxy-draft-step/_required_tools.json
#	casts/claude/skills/implement-galaxy-tool-step/SKILL.md
#	casts/claude/skills/implement-galaxy-tool-step/_provenance.json
#	casts/claude/skills/implement-galaxy-tool-step/_required_tools.json
#	casts/claude/skills/pipeline-cwl-to-galaxy/SKILL.md
#	casts/claude/skills/pipeline-cwl-to-galaxy/_assembly.json
#	casts/claude/skills/pipeline-interview-to-galaxy/SKILL.md
#	casts/claude/skills/pipeline-interview-to-galaxy/_assembly.json
#	casts/claude/skills/pipeline-nextflow-to-cwl/SKILL.md
#	casts/claude/skills/pipeline-nextflow-to-cwl/_assembly.json
#	casts/claude/skills/pipeline-nextflow-to-galaxy/SKILL.md
#	casts/claude/skills/pipeline-nextflow-to-galaxy/_assembly.json
#	casts/claude/skills/pipeline-paper-to-cwl/SKILL.md
#	casts/claude/skills/pipeline-paper-to-cwl/_assembly.json
#	casts/claude/skills/pipeline-paper-to-galaxy/SKILL.md
#	casts/claude/skills/pipeline-paper-to-galaxy/_assembly.json
#	casts/claude/skills/summarize-galaxy-tool/SKILL.md
#	casts/claude/skills/summarize-galaxy-tool/_provenance.json
#	casts/claude/skills/summarize-galaxy-tool/_required_tools.json
#	casts/claude/skills/summarize-galaxy-tool/references/cli/galaxy-tool-cache.md
#	content/cli/galaxy-tool-cache/index.md
#	content/cli/gxwf/index.md
@jmchilton jmchilton merged commit aa9b942 into main Jun 19, 2026
1 check passed
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.

1 participant