@galaxyproject/orbit 0.0.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +123 -0
- package/LICENSE +21 -0
- package/README.md +760 -5
- package/bin/legacy-mcp-config.js +363 -0
- package/bin/orbit.js +810 -0
- package/bin/pi-extension-path.d.ts +4 -0
- package/bin/pi-extension-path.js +44 -0
- package/bin/provider-auth.d.ts +22 -0
- package/bin/provider-auth.js +77 -0
- package/bin/thinking-pref.js +38 -0
- package/bin/update-check.d.ts +15 -0
- package/bin/update-check.js +137 -0
- package/extensions/cli-update/index.ts +32 -0
- package/extensions/orbit/activity-hooks.ts +141 -0
- package/extensions/orbit/activity.ts +116 -0
- package/extensions/orbit/agent-dir.ts +11 -0
- package/extensions/orbit/auto-resume.ts +352 -0
- package/extensions/orbit/config.ts +3 -0
- package/extensions/orbit/confusables.ts +1 -0
- package/extensions/orbit/context.ts +957 -0
- package/extensions/orbit/dashboard-commands.ts +191 -0
- package/extensions/orbit/dashboard-store.ts +473 -0
- package/extensions/orbit/dashboard-tools.ts +1185 -0
- package/extensions/orbit/empty-completion.ts +99 -0
- package/extensions/orbit/evidence-gate.ts +1276 -0
- package/extensions/orbit/evidence-override-command.ts +294 -0
- package/extensions/orbit/exec-guard/bash-risk.ts +1408 -0
- package/extensions/orbit/exec-guard/gate.ts +181 -0
- package/extensions/orbit/exec-guard/guardian-config.ts +54 -0
- package/extensions/orbit/exec-guard/index.ts +1 -0
- package/extensions/orbit/exec-guard/model-tier.ts +36 -0
- package/extensions/orbit/exec-guard/path-jail.ts +54 -0
- package/extensions/orbit/exec-guard/policy.ts +342 -0
- package/extensions/orbit/exec-guard/runtime-state.ts +15 -0
- package/extensions/orbit/exec-guard/sensitive-read.ts +525 -0
- package/extensions/orbit/exec-guard/types.ts +42 -0
- package/extensions/orbit/execution-commands.ts +134 -0
- package/extensions/orbit/feedback-command.ts +81 -0
- package/extensions/orbit/feedback.ts +96 -0
- package/extensions/orbit/galaxy-api.test.ts +122 -0
- package/extensions/orbit/galaxy-api.ts +606 -0
- package/extensions/orbit/galaxy-artifact-link-guidance.ts +5 -0
- package/extensions/orbit/galaxy-destructive-gate.ts +113 -0
- package/extensions/orbit/galaxy-enrich.ts +1108 -0
- package/extensions/orbit/galaxy-failure.ts +101 -0
- package/extensions/orbit/galaxy-fixture.ts +126 -0
- package/extensions/orbit/galaxy-history-guard.ts +233 -0
- package/extensions/orbit/galaxy-job-block.ts +347 -0
- package/extensions/orbit/galaxy-job-ops.ts +288 -0
- package/extensions/orbit/galaxy-live-source.ts +929 -0
- package/extensions/orbit/galaxy-markdown-adapter.ts +248 -0
- package/extensions/orbit/galaxy-op-policy.ts +332 -0
- package/extensions/orbit/galaxy-ops-tools.ts +326 -0
- package/extensions/orbit/galaxy-output-store.ts +80 -0
- package/extensions/orbit/galaxy-output.ts +346 -0
- package/extensions/orbit/galaxy-page-binding.ts +222 -0
- package/extensions/orbit/galaxy-page-markdown-guidance.ts +15 -0
- package/extensions/orbit/galaxy-page-ops.ts +159 -0
- package/extensions/orbit/galaxy-page-sync.test.ts +417 -0
- package/extensions/orbit/galaxy-page-sync.ts +318 -0
- package/extensions/orbit/galaxy-pages-api.ts +203 -0
- package/extensions/orbit/galaxy-pages-sync.ts +409 -0
- package/extensions/orbit/galaxy-poll-guard.ts +189 -0
- package/extensions/orbit/galaxy-poller.ts +706 -0
- package/extensions/orbit/galaxy-provenance.ts +623 -0
- package/extensions/orbit/galaxy-reconcile.ts +956 -0
- package/extensions/orbit/galaxy-recovery.ts +176 -0
- package/extensions/orbit/galaxy-repeat-guard.ts +55 -0
- package/extensions/orbit/galaxy-submission-capture.ts +707 -0
- package/extensions/orbit/galaxy-submission.ts +502 -0
- package/extensions/orbit/galaxy-tool-source.ts +78 -0
- package/extensions/orbit/galaxy-tool-wrap.ts +234 -0
- package/extensions/orbit/galaxy-udt-block.ts +127 -0
- package/extensions/orbit/galaxy-upload-tus.ts +334 -0
- package/extensions/orbit/galaxy-upload.ts +300 -0
- package/extensions/orbit/galaxy-version-capture.ts +65 -0
- package/extensions/orbit/git.ts +173 -0
- package/extensions/orbit/harness-block-fields.ts +597 -0
- package/extensions/orbit/index.ts +593 -0
- package/extensions/orbit/init-gate.ts +284 -0
- package/extensions/orbit/instructions-command.ts +136 -0
- package/extensions/orbit/invocation-failure-hint.ts +57 -0
- package/extensions/orbit/iwc-plan-check.ts +94 -0
- package/extensions/orbit/lesson-command.ts +303 -0
- package/extensions/orbit/lesson-hint.ts +245 -0
- package/extensions/orbit/lesson-nudge.ts +106 -0
- package/extensions/orbit/lessons/compose.ts +177 -0
- package/extensions/orbit/lessons/counters.ts +120 -0
- package/extensions/orbit/lessons/enabled.ts +116 -0
- package/extensions/orbit/lessons/matcher.ts +346 -0
- package/extensions/orbit/lessons/paths.ts +286 -0
- package/extensions/orbit/lessons/pi-event-contract.ts +105 -0
- package/extensions/orbit/lessons/propose-replay.ts +103 -0
- package/extensions/orbit/lessons/propose-tool.ts +222 -0
- package/extensions/orbit/lessons/propose.ts +502 -0
- package/extensions/orbit/lessons/replay.ts +89 -0
- package/extensions/orbit/lessons/reproduction-index.ts +83 -0
- package/extensions/orbit/lessons/search-tool.ts +99 -0
- package/extensions/orbit/lessons/search.ts +136 -0
- package/extensions/orbit/lessons/store.ts +415 -0
- package/extensions/orbit/lessons/text.ts +36 -0
- package/extensions/orbit/lessons/types.ts +69 -0
- package/extensions/orbit/lessons/user-dir.ts +24 -0
- package/extensions/orbit/lessons/user-lesson.ts +88 -0
- package/extensions/orbit/lessons/wrapper.ts +61 -0
- package/extensions/orbit/lessons-command.ts +147 -0
- package/extensions/orbit/local-exec.ts +39 -0
- package/extensions/orbit/mcp-output.ts +179 -0
- package/extensions/orbit/mcp-servers.test.ts +24 -0
- package/extensions/orbit/mcp-servers.ts +25 -0
- package/extensions/orbit/model-script.ts +351 -0
- package/extensions/orbit/notebook-anchors.ts +342 -0
- package/extensions/orbit/notebook-writer.ts +863 -0
- package/extensions/orbit/observation-allowlists.ts +1109 -0
- package/extensions/orbit/observation-replay.ts +148 -0
- package/extensions/orbit/observation-triggers.ts +563 -0
- package/extensions/orbit/observation-ui.ts +175 -0
- package/extensions/orbit/observations-command.ts +421 -0
- package/extensions/orbit/observations-config.ts +200 -0
- package/extensions/orbit/observations.ts +1381 -0
- package/extensions/orbit/profiles.ts +270 -0
- package/extensions/orbit/progress-updates.ts +95 -0
- package/extensions/orbit/proposal-commands.ts +882 -0
- package/extensions/orbit/provenance-fs-file.ts +59 -0
- package/extensions/orbit/provenance-fs.ts +32 -0
- package/extensions/orbit/provenance-memory-fs.ts +59 -0
- package/extensions/orbit/record-store-file.ts +177 -0
- package/extensions/orbit/record-store-page.ts +77 -0
- package/extensions/orbit/record-store-seam.ts +47 -0
- package/extensions/orbit/record-store.ts +149 -0
- package/extensions/orbit/registry-carrier.ts +107 -0
- package/extensions/orbit/registry-eligibility.ts +95 -0
- package/extensions/orbit/registry-evaluation.ts +403 -0
- package/extensions/orbit/registry-evaluator.ts +519 -0
- package/extensions/orbit/registry-import.ts +91 -0
- package/extensions/orbit/registry-lock.ts +221 -0
- package/extensions/orbit/registry-memory-fs.ts +42 -0
- package/extensions/orbit/registry-page-carrier.ts +103 -0
- package/extensions/orbit/registry-proposal.ts +1348 -0
- package/extensions/orbit/registry-runtime.ts +234 -0
- package/extensions/orbit/registry-schema.ts +735 -0
- package/extensions/orbit/registry-submitter.ts +59 -0
- package/extensions/orbit/registry-templates.ts +346 -0
- package/extensions/orbit/registry.ts +476 -0
- package/extensions/orbit/sandbox/index.ts +120 -0
- package/extensions/orbit/sandbox/sandbox-bash.ts +93 -0
- package/extensions/orbit/sandbox/sandbox-config.ts +87 -0
- package/extensions/orbit/sandbox/sandbox-init-message.ts +28 -0
- package/extensions/orbit/secret-redaction.ts +247 -0
- package/extensions/orbit/session-index/cwd.ts +18 -0
- package/extensions/orbit/session-index/db.ts +56 -0
- package/extensions/orbit/session-index/indexer.ts +154 -0
- package/extensions/orbit/session-index/is-enabled.ts +17 -0
- package/extensions/orbit/session-index/parse.ts +254 -0
- package/extensions/orbit/session-index/query.ts +209 -0
- package/extensions/orbit/session-index/schema.ts +72 -0
- package/extensions/orbit/session-index/tools.ts +152 -0
- package/extensions/orbit/session-lifecycle.ts +321 -0
- package/extensions/orbit/skill-triggers.ts +159 -0
- package/extensions/orbit/skills-command.ts +48 -0
- package/extensions/orbit/skills-discovery.ts +435 -0
- package/extensions/orbit/skills.ts +84 -0
- package/extensions/orbit/sra-import-gate.ts +77 -0
- package/extensions/orbit/state.ts +265 -0
- package/extensions/orbit/submission-replay.ts +147 -0
- package/extensions/orbit/sync-command.ts +157 -0
- package/extensions/orbit/teams/critic-parser.ts +93 -0
- package/extensions/orbit/teams/dispatcher.ts +210 -0
- package/extensions/orbit/teams/is-enabled.ts +22 -0
- package/extensions/orbit/teams/tool.ts +187 -0
- package/extensions/orbit/teams/types.ts +57 -0
- package/extensions/orbit/teams/validate.ts +42 -0
- package/extensions/orbit/tester-id-command.ts +133 -0
- package/extensions/orbit/tools-sync.ts +279 -0
- package/extensions/orbit/tools.ts +1300 -0
- package/extensions/orbit/types.ts +41 -0
- package/extensions/orbit/ui-bridge.ts +55 -0
- package/extensions/orbit/ulid.ts +60 -0
- package/extensions/orbit/user-instructions.ts +388 -0
- package/extensions/orbit/vendor/skills/_catalog.json +68 -0
- package/extensions/orbit/vendor/skills/_manifest.json +1106 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/SKILL.md +112 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/_provenance.json +218 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/_required_tools.json +33 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/_verify.json +4 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/add.json +50 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/draft-extract.json +51 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/draft-next-step.json +42 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/draft-validate.json +140 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/list.json +32 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/notes/galaxy-tool-job-failure-reference.md +137 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/notes/open-requirements-ledger.md +173 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/schemas/galaxy-tool-summary.schema.json +175 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/schemas/galaxy-workflow-draft.schema.json +2727 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/SKILL.md +82 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/_provenance.json +133 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/_required_tools.json +16 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/_verify.json +4 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/cli/draft-validate.json +140 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/notes/galaxy-workflow-draft-format.md +135 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/notes/open-requirements-ledger.md +173 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/schemas/galaxy-workflow-draft.schema.json +2727 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/SKILL.md +84 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/_provenance.json +166 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/_verify.json +29 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/galaxy-workflow-testability-design.md +136 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/iwc-test-data-conventions.md +308 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/planemo-asserts-idioms.md +246 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/planemo-workflow-test-architecture.md +151 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/schemas/galaxy-workflow-test-plan.schema.json +552 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/schemas/summary-galaxy-workflow.schema.json +687 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/schemas/tests-format.schema.json +7328 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/SKILL.md +127 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/_provenance.json +198 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/_required_tools.json +16 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/_verify.json +4 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/cli/convert.json +123 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/galaxy-data-flow-draft-contract.md +129 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/iwc-test-data-conventions.md +308 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/open-requirements-ledger.md +173 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/SKILL.md +73 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/_provenance.json +160 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/_verify.json +4 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-collection-semantics.md +43 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-collection-semantics.yml +1250 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-tool-job-failure-reference.md +137 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-workflow-invocation-failure-reference.md +138 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/nextflow-operators-to-galaxy-collection-recipes.md +98 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/planemo-asserts-idioms.md +246 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/planemo-workflow-test-architecture.md +151 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/SKILL.md +174 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/_provenance.json +130 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/_required_tools.json +18 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/_verify.json +17 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/references/cli/tool-revisions.json +48 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/references/cli/tool-search.json +95 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/references/cli/tool-versions.json +39 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/references/notes/component-tool-shed-search.md +230 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/references/schemas/galaxy-tool-discovery.schema.json +231 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/SKILL.md +93 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/_provenance.json +201 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/_required_tools.json +28 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/_verify.json +17 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/cli/planemo.md +44 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/cli/validate-tests.json +40 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/galaxy-workflow-testability-design.md +136 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/iwc-test-data-conventions.md +308 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/planemo-asserts-idioms.md +246 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/planemo-workflow-test-architecture.md +151 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/schemas/galaxy-workflow-test-plan.schema.json +552 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/schemas/tests-format.schema.json +7328 -0
- package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/SKILL.md +81 -0
- package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/_provenance.json +93 -0
- package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/_verify.json +17 -0
- package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/references/notes/open-requirements-ledger.md +173 -0
- package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/references/schemas/summary-galaxy-workflow.schema.json +687 -0
- package/extensions/orbit/vendor/skills/pipeline-update-interview-to-galaxy/SKILL.md +81 -0
- package/extensions/orbit/vendor/skills/pipeline-update-interview-to-galaxy/_assembly.json +23 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/SKILL.md +79 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/_provenance.json +125 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/_required_tools.json +28 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/_verify.json +4 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/references/cli/planemo.md +44 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/references/cli/validate-tests.json +40 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/references/notes/galaxy-workflow-invocation-failure-reference.md +138 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/references/notes/planemo-asserts-idioms.md +246 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/references/notes/planemo-workflow-test-architecture.md +151 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/references/schemas/tests-format.schema.json +7328 -0
- package/extensions/orbit/vendor/skills/skills/LICENSE +21 -0
- package/extensions/orbit/vendor/skills/skills/collection-manipulation/README.md +39 -0
- package/extensions/orbit/vendor/skills/skills/collection-manipulation/SKILL.md +892 -0
- package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/api-patterns.md +927 -0
- package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/apply-rules.md +1482 -0
- package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/test-patterns.md +996 -0
- package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/tools.md +609 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-data-libraries/SKILL.md +170 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/README.md +162 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/SKILL.md +99 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/examples/README.md +119 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/examples/tool-checking.md +419 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/examples/workflow-testing.md +617 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/galaxy-integration.md +614 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/SKILL.md +144 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/average_col3.ipynb +68 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/extract_sample_metadata.ipynb +190 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/variant_annotation.ipynb +816 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/vcp_variant_map.ipynb +443 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/scripts/README.md +165 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/scripts/galaxy_tool_checker.py +521 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-mcp-reference/SKILL.md +128 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-mcp-reference/gotchas.md +135 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-mcp-reference/history-access.md +132 -0
- package/extensions/orbit/vendor/skills/skills/reproduciblify/SKILL.md +146 -0
- package/extensions/orbit/vendor/skills/skills/reproduciblify/references/directives.yml +496 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/SKILL.md +245 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/01-minimal-echo.yml +27 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/02-single-data-in-out.yml +27 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/03-multiple-data-js.yml +28 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/04-select-integer-boolean.yml +41 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/05-resource-requirements.yml +25 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/06-biocontainer-tool.yml +38 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/07-inline-python-script.yml +56 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/08-configfile-script.yml +74 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/references/common-mistakes.md +76 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/references/schema-reference.md +155 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/references/templating.md +196 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/scripts/validate.py +109 -0
- package/extensions/orbit/vendor/skills/skills/workflow-reports/README.md +71 -0
- package/extensions/orbit/vendor/skills/skills/workflow-reports/SKILL.md +190 -0
- package/extensions/orbit/vendor/skills/skills/workflow-reports/examples/histology-staining.md +145 -0
- package/extensions/orbit/vendor/skills/skills/workflow-reports/examples/tissue-microarray-analysis.md +176 -0
- package/extensions/orbit/vendor/skills/skills/workflow-reports/references/directives.md +415 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/SKILL.md +98 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/_provenance.json +93 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/_required_tools.json +28 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/_verify.json +17 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/cli/convert.json +123 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/cli/foundry.md +25 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/cli/validate.json +142 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/schemas/summary-galaxy-workflow.schema.json +687 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/SKILL.md +74 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/_provenance.json +71 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/_required_tools.json +16 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/_verify.json +4 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/references/cli/validate.json +142 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/references/notes/galaxy-workflow-invocation-failure-reference.md +138 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/references/notes/galaxy-workflow-testability-design.md +136 -0
- package/extensions/orbit/vendor-skills.ts +283 -0
- package/extensions/orbit/workspace-state-dir.ts +46 -0
- package/extensions/orbit-handoff/index.ts +73 -0
- package/extensions/orbit-handoff/orbit-launcher.ts +142 -0
- package/extensions/whats-new/index.ts +98 -0
- package/lessons/LICENSE +17 -0
- package/lessons/README.md +117 -0
- package/lessons/SCHEMA.md +187 -0
- package/lessons/build-snapshot.mjs +311 -0
- package/lessons/data/downloaded-file-is-not-what-its-extension-says.md +61 -0
- package/lessons/galaxy-api/403-history-is-a-hard-stop.md +57 -0
- package/lessons/galaxy-api/collection-into-single-dataset-input.md +61 -0
- package/lessons/galaxy-api/connectedvalue-in-command-line.md +62 -0
- package/lessons/galaxy-api/hid-is-not-an-id.md +59 -0
- package/lessons/galaxy-api/invoke-workflow-inputs-not-params.md +60 -0
- package/lessons/galaxy-api/repeat-param-pipe-keys.md +63 -0
- package/lessons/galaxy-api/run-tool-returns-on-submit.md +61 -0
- package/lessons/galaxy-tools/reference-index-not-on-server.md +62 -0
- package/lessons/log.md +42 -0
- package/lessons/reproduction/input-population-mismatch.md +59 -0
- package/lessons/reproduction/methods-text-vs-executed-parameters.md +62 -0
- package/lessons/snapshot.json +1004 -0
- package/lessons/stats/de-contrast-direction-and-sample-labels.md +63 -0
- package/lessons/stats/na-coerced-to-zero-in-filters.md +59 -0
- package/lessons/validate.mjs +1219 -0
- package/package.json +103 -5
- package/shared/agent-prompt.d.ts +8 -0
- package/shared/agent-prompt.js +15 -0
- package/shared/approval-prompt.d.ts +4 -0
- package/shared/approval-prompt.js +61 -0
- package/shared/brain-env.d.ts +14 -0
- package/shared/brain-env.js +108 -0
- package/shared/brain-exit.d.ts +20 -0
- package/shared/brain-exit.js +149 -0
- package/shared/capability-profile.d.ts +16 -0
- package/shared/capability-profile.js +75 -0
- package/shared/config-source.d.ts +13 -0
- package/shared/config-source.js +17 -0
- package/shared/confusables.d.ts +3 -0
- package/shared/confusables.js +93 -0
- package/shared/custom-provider.d.ts +45 -0
- package/shared/custom-provider.js +169 -0
- package/shared/dashboard-contract.d.ts +123 -0
- package/shared/dashboard-contract.js +560 -0
- package/shared/dashboard-layout-store.d.ts +44 -0
- package/shared/dashboard-layout-store.js +281 -0
- package/shared/feedback-contract.d.ts +61 -0
- package/shared/feedback-contract.js +146 -0
- package/shared/galaxy-artifact-links.d.ts +30 -0
- package/shared/galaxy-artifact-links.js +166 -0
- package/shared/galaxy-credentials.d.ts +26 -0
- package/shared/galaxy-credentials.js +71 -0
- package/shared/galaxy-destructive.d.ts +21 -0
- package/shared/galaxy-destructive.js +269 -0
- package/shared/galaxy-guidance.d.ts +2 -0
- package/shared/galaxy-guidance.js +53 -0
- package/shared/galaxy-live-contract.d.ts +92 -0
- package/shared/galaxy-live-contract.js +180 -0
- package/shared/galaxy-page-cells.d.ts +2 -0
- package/shared/galaxy-page-cells.js +22 -0
- package/shared/galaxy-tool-family.d.ts +5 -0
- package/shared/galaxy-tool-family.js +27 -0
- package/shared/galaxy-url.d.ts +1 -0
- package/shared/galaxy-url.js +48 -0
- package/shared/gtn.d.ts +31 -0
- package/shared/gtn.js +253 -0
- package/shared/handled-prompt.d.ts +3 -0
- package/shared/handled-prompt.js +26 -0
- package/shared/known-provider.d.ts +11 -0
- package/shared/known-provider.js +89 -0
- package/shared/lesson-hint-marker.d.ts +7 -0
- package/shared/lesson-hint-marker.js +32 -0
- package/shared/lesson-rules.d.ts +150 -0
- package/shared/lesson-rules.js +203 -0
- package/shared/malformed-object-ids.d.ts +1 -0
- package/shared/malformed-object-ids.js +37 -0
- package/shared/markdown-sections.d.ts +10 -0
- package/shared/markdown-sections.js +118 -0
- package/shared/notebook-fences.d.ts +12 -0
- package/shared/notebook-fences.js +53 -0
- package/shared/observation-contract.d.ts +91 -0
- package/shared/observation-contract.js +544 -0
- package/shared/orbit-config.d.ts +226 -0
- package/shared/orbit-config.js +189 -0
- package/shared/orbit-env.d.ts +13 -0
- package/shared/orbit-env.js +124 -0
- package/shared/orbit-shell-contract.d.ts +74 -0
- package/shared/orbit-shell-contract.js +30 -0
- package/shared/page-content-hash.d.ts +1 -0
- package/shared/page-content-hash.js +13 -0
- package/shared/pi-default-model.d.ts +7 -0
- package/shared/pi-default-model.js +41 -0
- package/shared/prompt-blocks.d.ts +87 -0
- package/shared/prompt-blocks.js +898 -0
- package/shared/provider-auth-caps.d.ts +22 -0
- package/shared/provider-auth-caps.js +57 -0
- package/shared/random.d.ts +2 -0
- package/shared/random.js +15 -0
- package/shared/record-excerpt.d.ts +4 -0
- package/shared/record-excerpt.js +16 -0
- package/shared/redirect-guard.d.ts +36 -0
- package/shared/redirect-guard.js +235 -0
- package/shared/skills-pin.d.ts +8 -0
- package/shared/skills-pin.js +9 -0
- package/shared/skills-router.d.ts +17 -0
- package/shared/skills-router.js +63 -0
- package/shared/sra-import.d.ts +34 -0
- package/shared/sra-import.js +206 -0
- package/shared/state-dir.d.ts +21 -0
- package/shared/state-dir.js +240 -0
- package/shared/team-dispatch-contract.d.ts +28 -0
- package/shared/team-dispatch-contract.js +1 -0
- package/shared/truncate-middle.d.ts +11 -0
- package/shared/truncate-middle.js +68 -0
- package/shared/version-compare.d.ts +10 -0
- package/shared/version-compare.js +74 -0
- package/shared/whats-new.d.ts +31 -0
- package/shared/whats-new.js +83 -0
- package/shared/wsl.d.ts +10 -0
- package/shared/wsl.js +24 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: research
|
|
3
|
+
tags:
|
|
4
|
+
- target/galaxy
|
|
5
|
+
component: "Tool Shed Search and Indexing"
|
|
6
|
+
status: draft
|
|
7
|
+
created: 2026-04-30
|
|
8
|
+
revised: 2026-05-03
|
|
9
|
+
revision: 2
|
|
10
|
+
summary: "Tool Shed's Whoosh repo/tool search and partial GA4GH TRS v2, indexed from hg-walked metadata with no auto-refresh on upload"
|
|
11
|
+
related_notes:
|
|
12
|
+
- "galaxy-tool-summary-input-source"
|
|
13
|
+
- "tool-search"
|
|
14
|
+
- "tool-versions"
|
|
15
|
+
- "tool-revisions"
|
|
16
|
+
- "discover-shed-tool"
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Galaxy Tool Shed — Search, Indexing, and TRS APIs: Current State
|
|
20
|
+
|
|
21
|
+
## 1. Architecture primer
|
|
22
|
+
|
|
23
|
+
The Galaxy Tool Shed is a standalone web application that hosts and serves Galaxy tool wrappers (XML tool definitions plus helper files) to Galaxy servers for installation. Its server code lives under `lib/tool_shed/` in the Galaxy monorepo, sharing model/security/tool-parsing libraries with Galaxy itself but running as its own FastAPI application (`lib/tool_shed/webapp/fast_app.py`, with route modules under `lib/tool_shed/webapp/api2/`). The legacy web framework is almost gone — only `lib/tool_shed/webapp/controllers/hg.py` survives, because the Tool Shed also serves each repository's Mercurial working copy over HTTP for `hg clone`.
|
|
24
|
+
|
|
25
|
+
A **repository** is the unit of distribution in the Tool Shed: it is a named, owned Mercurial repository (the Tool Shed still runs on `hg`, not `git` — see `mercurial` imports in `lib/tool_shed/util/shed_index.py:4` and `lib/tool_shed/managers/repositories.py:471` onward). A repository has a `name`, an owner (`User.username`), a `type` (e.g. `unrestricted`, `repository_suite_definition`, `tool_dependency_definition` — see `lib/tool_shed/repository_types/`), optional `description`/`long_description`/`homepage_url`/`remote_repository_url`, and a set of categories associated via `RepositoryCategoryAssociation` (`lib/tool_shed/webapp/model/__init__.py`). A repository is indexed/installable only if `deleted=false`, `deprecated=false`, and it is not a `tool_dependency_definition` (see `get_repositories_for_indexing` at `lib/tool_shed/util/shed_index.py:202-212`).
|
|
26
|
+
|
|
27
|
+
A **tool** is one XML file *inside* a repository's working tree at some revision. The Tool Shed finds tools by walking the repository filesystem and loading XML with `galaxy.tool_util.loader_directory.load_tool_elements_from_path` (`lib/tool_shed/util/shed_index.py:181-198`). Tools are identified by three things that vary across contexts:
|
|
28
|
+
- Tool XML `id` attribute (e.g. `bwa_wrapper`) — not globally unique.
|
|
29
|
+
- Tool XML `version` attribute.
|
|
30
|
+
- The GUID assembled by the Tool Shed as `<host>/repos/<owner>/<name>/<tool_id>/<version>` (see `decode_identifier` in `lib/tool_shed_client/trs_util.py:17-19`).
|
|
31
|
+
|
|
32
|
+
Revisions/changesets are Mercurial changeset hashes. Each repository has a full changelog; only *some* changesets have a `RepositoryMetadata` row (those that contain installable tools — the Tool Shed regenerates metadata on upload in `upload_tar_and_set_metadata` at `lib/tool_shed/managers/repositories.py:741-803`). `RepositoryMetadata.metadata` is a JSON blob with keys including `tools`, `tool_dependencies`, `repository_dependencies`, `workflows`, `datatypes`, `data_manager` (see `_has_galaxy_utilities` at `lib/tool_shed/managers/repositories.py:904-939`). Only repository changesets that produced a `RepositoryMetadata` row with `downloadable=True` are returned by `get_ordered_installable_revisions` (`lib/tool_shed/managers/repositories.py:415-433`), which is the canonical list of revision hashes a client can install.
|
|
33
|
+
|
|
34
|
+
## 2. The two Tool Shed search APIs
|
|
35
|
+
|
|
36
|
+
Both surfaces are backed by **Whoosh** indexes on disk, configured by `whoosh_index_dir` (default `database/toolshed_whoosh_indexes`, `lib/galaxy/config/schemas/tool_shed_config_schema.yml:104`) and gated by `toolshed_search_on` (default `true`, same file:93). One directory holds the repository index; a `tools/` subdirectory holds the tool index (`_get_or_create_index` at `lib/tool_shed/util/shed_index.py:31-37`).
|
|
37
|
+
|
|
38
|
+
### 2a. Repository search
|
|
39
|
+
|
|
40
|
+
- **Endpoint**: `GET /api/repositories?q=<term>&page=<n>&page_size=<n>` — `lib/tool_shed/webapp/api2/repositories.py:130-159`. When `q` is present, the endpoint delegates to `search()` (`lib/tool_shed/managers/repositories.py:110-157`) and returns a `RepositorySearchResults`. When `q` is absent, the same endpoint does a plain SQL listing (see §7); `q` and `filter` are mutually exclusive (`api2/repositories.py:150-153`).
|
|
41
|
+
- **Implementation**: `RepoSearch` in `lib/tool_shed/webapp/search/repo_search.py:74-215`.
|
|
42
|
+
- **Schema fields** (`repo_search.py:27-41`): `id` (NUMERIC, stored), `name` (TEXT, boost 1.7), `description` (TEXT, boost 1.5), `long_description` (TEXT), `homepage_url` (TEXT), `remote_repository_url` (TEXT), `repo_owner_username` (TEXT), `categories` (KEYWORD, comma-separated), plus stored-only `times_downloaded`, `approved`, `last_updated`, `repo_lineage`, `full_last_updated`.
|
|
43
|
+
- **Querying**: `MultifieldParser` over `name, description, long_description, homepage_url, remote_repository_url, repo_owner_username, categories` (`repo_search.py:112-123`). The raw term is **lowercased** and wrapped as `*term*` (`repo_search.py:87, 130`) — everything becomes a prefix+suffix wildcard query.
|
|
44
|
+
- **Ranking**: Custom `RepoWeighting(BM25F)` multiplies the BM25F score by `times_downloaded/100` (with a minimum of 1) and doubles it when `approved == "yes"` (`repo_search.py:44-71`). Per-field B-values are configurable via options `repo_name_boost`, `repo_description_boost`, etc., collected into a `Boosts` namedtuple in `managers/repositories.py:133-153`.
|
|
45
|
+
- **Filters**: GitHub-style reserved filters `category:`/`c:` and `owner:`/`o:` are pre-parsed out of the query string (`repo_search.py:168-215`; supports single-quoted multi-word values). Unknown filter names fall through as literal text.
|
|
46
|
+
- **Pagination**: `page` and `page_size` are real; `searcher.search_page` returns `total_results`, `page`, `page_size` and a `hits` list. Missing pages raise `404 ObjectNotFound` (`repo_search.py:138-139`).
|
|
47
|
+
- **Response shape**: `RepositorySearchResults` (`lib/tool_shed_client/schema/__init__.py:407-412`) = `{total_results: str, page: str, page_size: str, hostname: str, hits: [{score, repository: RepositorySearchResult}]}`. Note: the numeric fields are serialized as strings. `RepositorySearchResult` exposes `id` (encoded), `name`, `repo_owner_username`, `description`, `long_description`, `remote_repository_url`, `homepage_url`, `last_update`, `full_last_updated`, `repo_lineage` (stringified list of `rev:hash`), `approved`, `times_downloaded`, `categories` (comma-joined string).
|
|
48
|
+
|
|
49
|
+
### 2b. Tool search
|
|
50
|
+
|
|
51
|
+
- **Endpoint**: `GET /api/tools?q=<term>&page=<n>&page_size=<n>` — `lib/tool_shed/webapp/api2/tools.py:68-80`.
|
|
52
|
+
- **Implementation**: `ToolSearch` in `lib/tool_shed/webapp/search/tool_search.py:34-92`.
|
|
53
|
+
- **Schema fields** (`tool_search.py:21-31`): `name`, `description`, `owner`, `id` (TEXT — NOT `ID`, despite the name), `help`, `version`, `repo_name`, `repo_owner_username`, `repo_id` (Whoosh `ID`, used to delete-by-repo when reindexing).
|
|
54
|
+
- **Querying**: `MultifieldParser(["name", "description", "help", "repo_owner_username"])` (`tool_search.py:62`). Again the term is wrapped as `*term*` (`tool_search.py:64`). There is no lowercasing step in the tool search (compare `repo_search.py:87`).
|
|
55
|
+
- **Ranking**: Plain `BM25F` with configurable field weights `tool_name_boost` (1.2), `tool_description_boost` (0.6), `tool_help_boost` (0.4), `tool_repo_owner_username_boost` (0.3) — see `managers/tools.py:67-75`. No popularity/certification modifier.
|
|
56
|
+
- **Pagination**: same as repo search.
|
|
57
|
+
- **Response shape**: `{total_results, page, page_size, hostname, hits: [{tool: {id, repo_owner_username, repo_name, name, description}, matched_terms: {...}, score}]}` (`tool_search.py:74-88`).
|
|
58
|
+
|
|
59
|
+
Notably: the tool search index stores `id`, `version`, `help`, `owner` but the JSON hit dict only exposes `id, repo_owner_username, repo_name, name, description` (plus matched-terms and score). There is no changeset/revision information in hits — the tool index is revision-agnostic; it indexes whatever tools happen to be present on the current filesystem snapshot of the repo (see §2c).
|
|
60
|
+
|
|
61
|
+
### 2c. Index build
|
|
62
|
+
|
|
63
|
+
Both indexes are built by the same function, `build_index()` in `lib/tool_shed/util/shed_index.py:40-91`:
|
|
64
|
+
|
|
65
|
+
1. Open SQLAlchemy session, select repos via `get_repositories_for_indexing` (sorted by `update_time DESC`, excluding deleted/deprecated/tool_dependency_definition).
|
|
66
|
+
2. For each repo, open its Mercurial repo, walk `hg_repo.changelog` to build `repo_lineage` (a stringified Python list of `<num>:<hash>`), then walk the filesystem under `<file_path>/<hash_dir>/repo_<id>/` and call `load_one_dir` on each subdirectory, parsing every `<tool>` element it finds.
|
|
67
|
+
3. Incremental logic: if the repo's document is already in the index and `full_last_updated` matches, the loop **breaks** (not continues) — relying on the descending sort by update time (`shed_index.py:65-67`). This is why freshness is fragile: any bug that prevents a re-add causes the crawler to stop.
|
|
68
|
+
4. Tool documents are replaced atomically per repo: `tool_index_writer.delete_by_term("repo_id", repo_id)` followed by one add per tool (`shed_index.py:75-82`).
|
|
69
|
+
5. Category names are lowercased and joined by commas (`shed_index.py:101-105`).
|
|
70
|
+
|
|
71
|
+
Indexing entry points:
|
|
72
|
+
- Script: `scripts/tool_shed/build_ts_whoosh_index.py` — the documented "run this manually" path, called out in docstrings at `managers/repositories.py:111-117` and `managers/tools.py:43-50`.
|
|
73
|
+
- Admin API: `PUT /api/tools/build_search_index` (`api2/tools.py:82-102`, `require_admin=True`) returns `BuildSearchIndexResponse{repositories_indexed, tools_indexed}`.
|
|
74
|
+
|
|
75
|
+
There is **no automatic trigger** on upload — indexes are stale until rebuilt.
|
|
76
|
+
|
|
77
|
+
## 3. TRS (GA4GH Tool Registry Service) API
|
|
78
|
+
|
|
79
|
+
Implemented in `lib/tool_shed/webapp/api2/tools.py:104-143` and `lib/tool_shed/managers/trs.py`.
|
|
80
|
+
|
|
81
|
+
Endpoints:
|
|
82
|
+
- `GET /api/ga4gh/trs/v2/service-info` → `Service` (`api2/tools.py:104-106`, `managers/trs.py:37-67`). Reports organization, `type={group: org.ga4gh, artifact: trs, version: 2.1.0}`, service version = Galaxy `VERSION`.
|
|
83
|
+
- `GET /api/ga4gh/trs/v2/toolClasses` → list with one entry: `ToolClass(id="galaxy_tool", name="Galaxy Tool", description="Galaxy XML Tools")` (`managers/trs.py:70-71`).
|
|
84
|
+
- `GET /api/ga4gh/trs/v2/tools` → **always returns `[]`** (`api2/tools.py:116-121`). The method has a TODO comment acknowledging it should query the DB; currently listing all tools via TRS is not implemented.
|
|
85
|
+
- `GET /api/ga4gh/trs/v2/tools/{tool_id}` → `Tool`. The `tool_id` is the Tool Shed's TRS-encoded identifier: `<owner>~<repo>~<tool_id>` (encoding defined by `encode_identifier`/`decode_identifier` in `lib/tool_shed_client/trs_util.py:17-24`). The `~`→`/` substitution is a workaround for FastAPI path-param decoding issues, per the comment at `trs_util.py:11-15`.
|
|
86
|
+
- `GET /api/ga4gh/trs/v2/tools/{tool_id}/versions` → `list[ToolVersion]`, implemented as `get_tool(...).versions` (`api2/tools.py:138-143`).
|
|
87
|
+
|
|
88
|
+
**Construction of the TRS Tool response** (`managers/trs.py:121-151`):
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
Tool(
|
|
92
|
+
id = trs_tool_id, # owner~repo~tool_id form
|
|
93
|
+
aliases = [guid], # single-element list with Galaxy-style GUID
|
|
94
|
+
url = "https://<host>/repos/<owner>/<repo>",
|
|
95
|
+
toolclass = ToolClass(id="galaxy_tool", ...),
|
|
96
|
+
organization = <owner username>,
|
|
97
|
+
versions = [ ToolVersion(...) for each version across installable revisions ]
|
|
98
|
+
)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
And each `ToolVersion` is (`managers/trs.py:134-143`):
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
ToolVersion(
|
|
105
|
+
author = [repo_owner], # owner username, not tool author
|
|
106
|
+
containerfile = False, # always False
|
|
107
|
+
descriptor_type = [GALAXY],
|
|
108
|
+
id = <tool_version_string>,
|
|
109
|
+
url = <same as Tool.url>, # TODO comment — not a version-specific URL
|
|
110
|
+
verified = False, # always False
|
|
111
|
+
)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Versions are collected by iterating installable revisions of the repo, loading each `RepositoryMetadata.metadata["tools"]`, and accumulating the set of `version` strings (`managers/trs.py:84-97`, `get_repository_metadata_by_tool_version`). If the same `version` string appears in multiple changesets, the last one seen wins (it's a `dict` keyed by version, `trs.py:96`).
|
|
115
|
+
|
|
116
|
+
**Deviations / omissions from the TRS 2.1 spec**:
|
|
117
|
+
- `GET /tools` is stubbed to `[]`.
|
|
118
|
+
- `name`, `description`, `meta_version`, `has_checker`, `checker_url` on `Tool`: not populated.
|
|
119
|
+
- `ToolVersion.name`, `meta_version`, `images`, `descriptor_type_version`, `signed`, `verified_source`, `included_apps`: not populated.
|
|
120
|
+
- `ToolVersion.author` is set to the *repository owner username*, not the tool's `<citations>`/`<requirements>` author.
|
|
121
|
+
- `ToolVersion.url` is the same as `Tool.url` (explicit TODO at `trs.py:134`).
|
|
122
|
+
- No checksum endpoint (`/tools/{id}/versions/{v}/{type}/descriptor`, `/tests`, `/containerfile`, `/files`) is implemented.
|
|
123
|
+
- No pagination headers (TRS uses `Link` / `next_page` for the list endpoint, which is stubbed).
|
|
124
|
+
|
|
125
|
+
## 4. Galaxy's own tool search (for contrast)
|
|
126
|
+
|
|
127
|
+
Galaxy's installed-toolbox search lives in `lib/galaxy/tools/search/__init__.py` (`ToolBoxSearch`, `ToolPanelViewSearch`). It is Whoosh-based, but very different:
|
|
128
|
+
|
|
129
|
+
- Per-**panel-view** index directory: each tool panel view gets its own index, so search results respect the current view (`__init__.py:100-127`).
|
|
130
|
+
- Much richer schema (`__init__.py:144-199`): `id_exact` (NGRAMWORDS), `name_exact` (TEXT with `IDTokenizer`), `stub` (parsed GUID), `section`, `edam_operations`, `edam_topics`, `repository`, `owner`, `description` (StemmingAnalyzer), `help`, `labels`, plus `name` as either NGRAMWORDS (configurable `tool_enable_ngram_search`) or plain TEXT.
|
|
131
|
+
- Indexed from the running `ToolBox`/`ToolCache` on reload, not from disk crawling — so it is always in sync with installed tools.
|
|
132
|
+
- Uses a `MultiWeighting` with `BM25F` + `Frequency` and has EDAM ontology fields that are *actually analyzed*.
|
|
133
|
+
- Exposed via `GET /api/tools?q=<term>` (`lib/galaxy/webapps/galaxy/api/tools.py:529-572`) which delegates to `service._search(q, view)`. Returns a flat list of tool IDs, not scored hits.
|
|
134
|
+
- Reserved query `ilovegalaxy` / "favorites" short-circuits to the user's favorited tool list (`tools.py:552-559`).
|
|
135
|
+
|
|
136
|
+
The two search surfaces exist because they answer different questions: Galaxy's searches *installed* tools for a logged-in user session (respects tool panel views, EDAM, user favorites); the Tool Shed's searches *installable* tools/repositories across the whole shed catalog. The Tool Shed's schema is substantially poorer (no EDAM, no stem analyzer, no panel context) and its index is not automatically refreshed.
|
|
137
|
+
|
|
138
|
+
## 5. Repository vs. tool as a search unit
|
|
139
|
+
|
|
140
|
+
The Tool Shed exposes both because they describe different things:
|
|
141
|
+
|
|
142
|
+
- A **repository** is what an admin actually *installs*. Installation is a `(name, owner, changeset_revision)` triple (`get_install_info` at `lib/tool_shed/managers/repositories.py:342-403`). Repositories group files that must travel together: tool XML + test data + tool-data tables + data managers + datatypes + workflows + dependency declarations (`_has_galaxy_utilities`, `managers/repositories.py:904-939`). Discovery by repository is the right answer to "I want a package named X by owner Y" and is how the Tool Shed UI and `ephemeris`/`planemo` install flows work.
|
|
143
|
+
- A **tool** is a single `<tool>` element. A single repository can contain many tools (loader walks the whole tree — `shed_index.py:142-149`); one "logical tool" (by XML `id`) can exist at many versions within one repository (each `<tool version=...>` in different changesets → multiple entries in `RepositoryMetadata.metadata["tools"]`); and the same XML `id` can be wrapped and published in **multiple independent repositories** owned by different users, with no referential link between them. Repository-level search cannot answer "find me any tool that runs BWA".
|
|
144
|
+
|
|
145
|
+
Tool identity, concretely:
|
|
146
|
+
- At parse time: `(tool_id, tool_version)` from the XML.
|
|
147
|
+
- At shed storage: `GUID = <tool_shed_host>/repos/<owner>/<repo>/<tool_id>/<version>` (unique). This is what Galaxy stores as `Tool.id` after installation.
|
|
148
|
+
- At TRS: `<owner>~<repo>~<tool_id>`, with `version` as a separate path segment. Note that the TRS `tool_id` does **not** include the shed host or the repo's tool XML version.
|
|
149
|
+
- In the tool search index: only `id` (the XML id, non-unique), `repo_name`, `repo_owner_username`, `repo_id` — no changeset, no GUID field stored directly. Two different repos exposing a tool with XML id `bwa` collapse into two hits distinguishable only by `repo_name` + `repo_owner_username`.
|
|
150
|
+
|
|
151
|
+
Implication: if you search the tool index and get a hit with `id=bwa_wrapper`, `repo_name=bwa`, `repo_owner_username=devteam`, you still need a separate call — typically `GET /api/repositories/get_ordered_installable_revisions?owner=devteam&name=bwa` (`api2/repositories.py:270-281`) — to learn which changesets actually contain that tool, and then `GET /api/repositories/get_repository_revision_install_info` (`api2/repositories.py:194-212`) to get the `valid_tools` list for a specific revision. The TRS endpoints (`/api/ga4gh/trs/v2/tools/{owner~repo~tool_id}`) give you the per-version list but require you to already know the TRS id.
|
|
152
|
+
|
|
153
|
+
Revisions also muddy tool identity: a tool's XML `version` string *usually* bumps between changesets, but there is no invariant — two changesets can publish the same XML `version` with different content, and the TRS version accumulator silently deduplicates by version string (`managers/trs.py:87-97`, note the `versions[tool_metadata["version"]] = metadata` overwrite). Nothing in the indexed data exposes this collision.
|
|
154
|
+
|
|
155
|
+
## 6. Realistic limitations and rough edges
|
|
156
|
+
|
|
157
|
+
- **Stale indexes**. The Whoosh indexes are built by a separate script (`scripts/tool_shed/build_ts_whoosh_index.py`) or an admin-only API call (`PUT /api/tools/build_search_index`). There is no hook from `upload_tar_and_set_metadata` or from `RepositoryMetadataManager.set_repository_metadata_due_to_new_tip` into the index. Freshness depends on cron. The docstrings literally say "you have to pre-create with scripts/tool_shed/build_ts_whoosh_index.sh manually" (`managers/repositories.py:113-115`).
|
|
158
|
+
- **Incremental build break-loop**. `build_index` breaks out of the repo loop on the first `full_last_updated` match (`shed_index.py:65-67`); any anomaly in `update_time` ordering or `full_last_updated` format can silently halt the incremental update partway through. A repo deleted since last index is not purged.
|
|
159
|
+
- **Wildcard wrapping**. Both searches rewrite the query as `*term*`. That disables Whoosh's analyzer-based stemming on the user's term, makes very short terms O(n) over the vocabulary, and prevents users from doing structured Whoosh syntax (boolean operators beyond what survives wrapping). `RepoSearch` additionally lowercases the term before parsing (`repo_search.py:87`); `ToolSearch` does not (`tool_search.py:61-64`), creating a case-sensitivity asymmetry between the two endpoints.
|
|
160
|
+
- **Categories are free text**. In the repo index, `categories` is a comma-joined string built from `Category.name.lower()` (`shed_index.py:101-105`). The reserved filter `category:'Climate Analysis'` (see doctest at `repo_search.py:187`) constructs a Whoosh `Term('categories', 'Climate Analysis')`, which against a comma-separated KEYWORD field matches if that exact value appears in the list — but the indexed form is lowercased, so `category:'Climate Analysis'` will silently miss and the user has to know to type lowercase. There's no schema validation — arbitrary `category:anything` is accepted.
|
|
161
|
+
- **`approved` boost is dead code**. `approved` is always stored as the literal string `"no"` (`shed_index.py:161`), despite `RepoWeighting.final` checking for `"yes"` to double the score (`repo_search.py:66`). No repo is ever scored as approved. `times_downloaded` is read from the `Repository` row.
|
|
162
|
+
- **`/api/ga4gh/trs/v2/tools` returns `[]`**. The list endpoint is a stub (`api2/tools.py:116-121`). There is no bulk-enumeration TRS endpoint.
|
|
163
|
+
- **TRS version dedup across revisions**. `get_repository_metadata_by_tool_version` overwrites duplicates (`managers/trs.py:87-97`); if a tool has version `1.0.0` across several changesets, only the last-iterated one is reflected in the TRS response.
|
|
164
|
+
- **Partial TRS payload**. `ToolVersion` fields `images`, `descriptor_type_version`, `name`, `meta_version`, `verified_source`, `signed`, `included_apps`, `is_production` are never populated (`managers/trs.py:134-143`). `ToolVersion.url` and `Tool.url` are the same string — there's no version-specific URL to fetch the descriptor from, and no `/tools/{id}/versions/{v}/GALAXY/descriptor` endpoint is implemented.
|
|
165
|
+
- **No containerfile / checksum / tests via TRS**. The spec's `/tools/{id}/versions/{v}/containerfile`, `/tests`, `/{type}/files` endpoints are not implemented.
|
|
166
|
+
- **Pagination**. `search_page` raises `ObjectNotFound("The requested page does not exist.")` rather than returning an empty page (`repo_search.py:138-139`, `tool_search.py:67-69`). The SQL `index_repositories` path returns a **bare list with no `total_results`, `next`, or `prev`** (`api2/repositories.py:182-192`, `managers/repositories.py:297-299`); only the opt-in `?page=&page_size=` path returns `PaginatedRepositoryIndexResults` with a count (`managers/repositories.py:302-316`). Filter-based listing with `filter=` uses `ILIKE '%…%'` across `User.username`, `Repository.name`, `Repository.description` — case-insensitive but with no phrase boundaries (`managers/repositories.py:837-845`).
|
|
167
|
+
- **`id` field type in tool index**. Declared as `TEXT`, not Whoosh `ID` (`tool_search.py:25`). Searches on `id` therefore tokenize — you can't pin a hit to an exact GUID.
|
|
168
|
+
- **No EDAM in shed indexes**. Tool XML `<edam_operations>`/`<edam_topics>` are parsed by Galaxy's metadata pipeline (stored in `RepositoryMetadata.metadata["tools"][i]`) but **not included in the Whoosh `tool_schema`** (`tool_search.py:21-31`). EDAM is only indexed in *Galaxy's* tool search, not the Tool Shed's. `load_one_dir` reads only `help`, `description`, `id`, `name`, `version` (`shed_index.py:182-198`).
|
|
169
|
+
- **Authentication**. Search endpoints do not require auth (`toolshed_search_on` is the only gate). `build_search_index` requires admin. Management endpoints (upload, delete/deprecate, allow_push, admins) require ownership (`can_manage_repo` in `managers/repositories.py:319-321`) or admin role.
|
|
170
|
+
- **Deleted/deprecated handling**. Deleted and deprecated repos are excluded from indexing (`shed_index.py:205-212`) and from DB queries for category listing (`_get_repository_by_name_and_owner` at `managers/repositories.py:812-822`). But *deprecating a repo does not trigger reindexing*; its hits persist until the next rebuild. `RepositoryIndexDeletedQueryParam` exists (`api2/__init__.py:282`) but only for the SQL-listing branch.
|
|
171
|
+
- **Rate limits**. None in this code; rate-limiting is deployment-level.
|
|
172
|
+
- **Custom encoding of identifiers**. TRS tool ids use `~` as a separator purely to dodge FastAPI's URL-decoding behavior on `/` (see comment at `trs_util.py:11-15`). Consumers must encode accordingly.
|
|
173
|
+
|
|
174
|
+
## 7. Endpoint reference table
|
|
175
|
+
|
|
176
|
+
| Method | Path | Key params | Returns | Notes |
|
|
177
|
+
|---|---|---|---|---|
|
|
178
|
+
| GET | `/api/repositories` | `q`, `filter`, `page`, `page_size`, `owner`, `name`, `category_id`, `deleted`, `sort_by` (`name\|create_time`), `sort_desc` | `RepositorySearchResults` when `q`, else `PaginatedRepositoryIndexResults` when `page`, else `list[Repository]` | `q` and `filter` mutually exclusive. `q` uses Whoosh; rest use SQL `ILIKE`. `api2/repositories.py:130-192` |
|
|
179
|
+
| GET | `/api/repositories/{id}` | — | `DetailedRepository` | encoded repo ID |
|
|
180
|
+
| GET | `/api/repositories/{id}/metadata` | `downloadable_only` | `dict` keyed `"{rev_num}:{hash}"` | per-revision metadata; also `/api_internal/.../metadata` returns typed `RepositoryMetadata` |
|
|
181
|
+
| GET | `/api/repositories/get_ordered_installable_revisions` | `owner`+`name` or `tsr_id` | `list[str]` of changeset hashes | canonical installable-revision list |
|
|
182
|
+
| GET | `/api/repositories/get_repository_revision_install_info` | `name`, `owner`, `changeset_revision` | `list[repo_dict, metadata_dict, repo_info_dict]` | 3-element list (legacy) |
|
|
183
|
+
| GET | `/api/repositories/install_info` | same as above | `InstallInfo` | modern typed form |
|
|
184
|
+
| GET | `/api/repositories/updates` | `owner`, `name`, `changeset_revision`, `hexlify` | string (hex-encoded dict) | whether a newer rev exists |
|
|
185
|
+
| GET | `/api/repositories/{id}/revisions/{rev}/readmes` | — | `RepositoryRevisionReadmes` | |
|
|
186
|
+
| POST | `/api/repositories` | `CreateRepositoryRequest` body | `Repository` | auth required |
|
|
187
|
+
| PUT | `/api/repositories/{id}` | `UpdateRepositoryRequest` | `DetailedRepository` | owner/admin |
|
|
188
|
+
| POST | `/api/repositories/{id}/changeset_revision` | multipart tar + `commit_message` | `RepositoryUpdate` | upload new revision |
|
|
189
|
+
| PUT/DELETE | `/api/repositories/{id}/deprecated` | — | 204 | owner/admin |
|
|
190
|
+
| GET | `/api/categories` | — | `list[Category]` | |
|
|
191
|
+
| GET | `/api/categories/{id}` | — | `Category` | |
|
|
192
|
+
| GET | `/api/categories/{id}/repositories` | `installable`, `sort_key`, `sort_order`, `page` | `RepositoriesByCategory` | |
|
|
193
|
+
| POST | `/api/categories` | body | `Category` | admin only |
|
|
194
|
+
| GET | `/api/tools` | `q` (required), `page`, `page_size` | tool search result dict | Whoosh tool index |
|
|
195
|
+
| PUT | `/api/tools/build_search_index` | — | `BuildSearchIndexResponse` | admin only |
|
|
196
|
+
| GET | `/api/tools/{tool_id}/versions/{tool_version}` | — | `ShedParsedTool` | expanded parsed tool; cached via `model_cache` |
|
|
197
|
+
| GET | `/api/tools/{tool_id}/versions/{tool_version}/parameter_request_schema` | — | JSON Schema | |
|
|
198
|
+
| GET | `/api/tools/{tool_id}/versions/{tool_version}/parameter_landing_request_schema` | — | JSON Schema | |
|
|
199
|
+
| GET | `/api/tools/{tool_id}/versions/{tool_version}/parameter_test_case_xml_schema` | — | JSON Schema | |
|
|
200
|
+
| GET | `/api/tools/{tool_id}/versions/{tool_version}/tool_source` | — | raw tool XML (text/plain) | `language` header |
|
|
201
|
+
| GET | `/api/ga4gh/trs/v2/service-info` | — | `Service` | |
|
|
202
|
+
| GET | `/api/ga4gh/trs/v2/toolClasses` | — | `[ToolClass]` | single class `galaxy_tool` |
|
|
203
|
+
| GET | `/api/ga4gh/trs/v2/tools` | — | `[]` | **stub — always empty** |
|
|
204
|
+
| GET | `/api/ga4gh/trs/v2/tools/{tool_id}` | — | `Tool` | `tool_id` = `owner~repo~tool_id` |
|
|
205
|
+
| GET | `/api/ga4gh/trs/v2/tools/{tool_id}/versions` | — | `list[ToolVersion]` | |
|
|
206
|
+
|
|
207
|
+
Mercurial access (needed for actual file fetching of a specific revision): each repository is also exposed at `/<owner>/<name>` through `lib/tool_shed/webapp/controllers/hg.py`, which serves the Mercurial HTTP protocol (`hg clone`, `hg pull`). This is how `InstallInfo`-driven clients materialize the content at a changeset.
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## Sources consulted
|
|
212
|
+
|
|
213
|
+
- `lib/tool_shed/webapp/search/repo_search.py`
|
|
214
|
+
- `lib/tool_shed/webapp/search/tool_search.py`
|
|
215
|
+
- `lib/tool_shed/util/shed_index.py`
|
|
216
|
+
- `lib/tool_shed/webapp/api2/__init__.py`
|
|
217
|
+
- `lib/tool_shed/webapp/api2/repositories.py`
|
|
218
|
+
- `lib/tool_shed/webapp/api2/tools.py`
|
|
219
|
+
- `lib/tool_shed/webapp/api2/categories.py`
|
|
220
|
+
- `lib/tool_shed/managers/repositories.py`
|
|
221
|
+
- `lib/tool_shed/managers/tools.py`
|
|
222
|
+
- `lib/tool_shed/managers/trs.py`
|
|
223
|
+
- `lib/tool_shed_client/trs_util.py`
|
|
224
|
+
- `lib/tool_shed_client/schema/__init__.py`
|
|
225
|
+
- `lib/tool_shed_client/schema/trs.py`
|
|
226
|
+
- `lib/galaxy/tools/search/__init__.py`
|
|
227
|
+
- `lib/galaxy/webapps/galaxy/api/tools.py`
|
|
228
|
+
- `lib/galaxy/config/schemas/tool_shed_config_schema.yml`
|
|
229
|
+
- `scripts/tool_shed/build_ts_whoosh_index.py`
|
|
230
|
+
- `packages/core/src/client/toolshed.ts` (galaxy-tool-util)
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://galaxyproject.org/foundry/schemas/galaxy-tool-discovery.schema.json",
|
|
4
|
+
"$comment": "Canonical source: packages/gxwf-foundry/src/schemas/galaxy-tool-discovery/galaxy-tool-discovery.schema.json in galaxyproject/foundry. Mold frontmatter cites this schema via [[galaxy-tool-discovery]] wiki-links; the cast pipeline imports the `galaxyToolDiscoverySchema` runtime export and serializes it into cast bundles.",
|
|
5
|
+
"title": "Galaxy Tool Discovery Recommendation",
|
|
6
|
+
"description": "Structured recommendation emitted by the discover-shed-tool Mold after searching the Galaxy Tool Shed and resolving any selected candidate to a pinnable Tool Shed version and changeset revision.",
|
|
7
|
+
"$ref": "#/$defs/DiscoveryRecommendation",
|
|
8
|
+
"$defs": {
|
|
9
|
+
"DiscoveryRecommendation": {
|
|
10
|
+
"title": "DiscoveryRecommendation",
|
|
11
|
+
"description": "Top-level output from discover-shed-tool. A hit or weak result carries a selected candidate; a miss carries null candidate plus fallthrough rationale.",
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"required": [
|
|
15
|
+
"status",
|
|
16
|
+
"candidate",
|
|
17
|
+
"alternates",
|
|
18
|
+
"rationale",
|
|
19
|
+
"warnings"
|
|
20
|
+
],
|
|
21
|
+
"properties": {
|
|
22
|
+
"status": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": [
|
|
25
|
+
"hit",
|
|
26
|
+
"weak",
|
|
27
|
+
"miss"
|
|
28
|
+
],
|
|
29
|
+
"description": "Recommendation class. hit means proceed with the selected Tool Shed pin; weak means candidate exists but needs confirmation or may fall through; miss means no usable wrapper was found."
|
|
30
|
+
},
|
|
31
|
+
"candidate": {
|
|
32
|
+
"anyOf": [
|
|
33
|
+
{
|
|
34
|
+
"$ref": "#/$defs/ToolCandidate"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "null"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"description": "Selected candidate for hit/weak results. Null for miss."
|
|
41
|
+
},
|
|
42
|
+
"alternates": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": {
|
|
45
|
+
"$ref": "#/$defs/ToolCandidate"
|
|
46
|
+
},
|
|
47
|
+
"description": "Runner-up candidates worth surfacing to the user or harness. Empty when no plausible alternates were found."
|
|
48
|
+
},
|
|
49
|
+
"rationale": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1,
|
|
52
|
+
"description": "Short explanation of why this status and candidate were selected, including ambiguity or fallthrough reasoning."
|
|
53
|
+
},
|
|
54
|
+
"warnings": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"items": {
|
|
57
|
+
"$ref": "#/$defs/Warning"
|
|
58
|
+
},
|
|
59
|
+
"description": "Advisory issues that do not invalidate the recommendation but affect confidence or downstream binding."
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"allOf": [
|
|
63
|
+
{
|
|
64
|
+
"if": {
|
|
65
|
+
"properties": {
|
|
66
|
+
"status": {
|
|
67
|
+
"enum": [
|
|
68
|
+
"hit",
|
|
69
|
+
"weak"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"required": [
|
|
74
|
+
"status"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"then": {
|
|
78
|
+
"properties": {
|
|
79
|
+
"candidate": {
|
|
80
|
+
"$ref": "#/$defs/ToolCandidate"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"if": {
|
|
87
|
+
"properties": {
|
|
88
|
+
"status": {
|
|
89
|
+
"const": "miss"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"required": [
|
|
93
|
+
"status"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"then": {
|
|
97
|
+
"properties": {
|
|
98
|
+
"candidate": {
|
|
99
|
+
"type": "null"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"ToolCandidate": {
|
|
107
|
+
"title": "ToolCandidate",
|
|
108
|
+
"description": "One Tool Shed candidate plus the version and changeset pin needed by downstream caching and gxformat2 authoring.",
|
|
109
|
+
"type": "object",
|
|
110
|
+
"additionalProperties": false,
|
|
111
|
+
"required": [
|
|
112
|
+
"tool_shed_url",
|
|
113
|
+
"owner",
|
|
114
|
+
"repo",
|
|
115
|
+
"tool_id",
|
|
116
|
+
"trs_tool_id",
|
|
117
|
+
"version",
|
|
118
|
+
"changeset_revision",
|
|
119
|
+
"score",
|
|
120
|
+
"matched_terms",
|
|
121
|
+
"match_fields",
|
|
122
|
+
"rationale"
|
|
123
|
+
],
|
|
124
|
+
"properties": {
|
|
125
|
+
"tool_shed_url": {
|
|
126
|
+
"type": "string",
|
|
127
|
+
"format": "uri",
|
|
128
|
+
"description": "Tool Shed base URL searched, normally https://toolshed.g2.bx.psu.edu."
|
|
129
|
+
},
|
|
130
|
+
"owner": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"minLength": 1,
|
|
133
|
+
"description": "Tool Shed repository owner, e.g. devteam or iuc."
|
|
134
|
+
},
|
|
135
|
+
"repo": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"minLength": 1,
|
|
138
|
+
"description": "Tool Shed repository name containing the wrapper. Maps from gxwf search's repoName field."
|
|
139
|
+
},
|
|
140
|
+
"tool_id": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"minLength": 1,
|
|
143
|
+
"description": "Galaxy XML tool id inside the repository."
|
|
144
|
+
},
|
|
145
|
+
"trs_tool_id": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"pattern": "^[^~]+~[^~]+~[^~]+$",
|
|
148
|
+
"description": "Tool Shed TRS-style id: <owner>~<repo>~<tool_id>. Used for gxwf tool-versions and tool-revisions."
|
|
149
|
+
},
|
|
150
|
+
"version": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"minLength": 1,
|
|
153
|
+
"description": "Selected Galaxy XML tool version, usually the newest installable version unless the caller requested a specific version."
|
|
154
|
+
},
|
|
155
|
+
"changeset_revision": {
|
|
156
|
+
"type": "string",
|
|
157
|
+
"minLength": 1,
|
|
158
|
+
"description": "Selected Tool Shed Mercurial changeset revision for reproducible gxformat2 tool_shed_repository pinning."
|
|
159
|
+
},
|
|
160
|
+
"score": {
|
|
161
|
+
"type": "number",
|
|
162
|
+
"description": "Search score or cast-skill confidence score used to rank this candidate. Higher is better."
|
|
163
|
+
},
|
|
164
|
+
"matched_terms": {
|
|
165
|
+
"type": "array",
|
|
166
|
+
"items": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"minLength": 1
|
|
169
|
+
},
|
|
170
|
+
"description": "Query terms or exact hints that matched this candidate. Empty only when the candidate came from a non-lexical hint."
|
|
171
|
+
},
|
|
172
|
+
"match_fields": {
|
|
173
|
+
"type": "array",
|
|
174
|
+
"items": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"enum": [
|
|
177
|
+
"tool_id",
|
|
178
|
+
"name",
|
|
179
|
+
"description",
|
|
180
|
+
"help",
|
|
181
|
+
"owner",
|
|
182
|
+
"repo",
|
|
183
|
+
"exact_name_hint",
|
|
184
|
+
"owner_hint",
|
|
185
|
+
"version_hint"
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
"uniqueItems": true,
|
|
189
|
+
"description": "Candidate fields or hints that matched the query. Preserves the older sketch's name/description-style evidence separately from matched_terms."
|
|
190
|
+
},
|
|
191
|
+
"rationale": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"minLength": 1,
|
|
194
|
+
"description": "Candidate-specific explanation, especially for alternates and weak recommendations."
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"Warning": {
|
|
199
|
+
"title": "Warning",
|
|
200
|
+
"description": "Advisory confidence issue surfaced by discover-shed-tool.",
|
|
201
|
+
"type": "object",
|
|
202
|
+
"additionalProperties": false,
|
|
203
|
+
"required": [
|
|
204
|
+
"code",
|
|
205
|
+
"message"
|
|
206
|
+
],
|
|
207
|
+
"properties": {
|
|
208
|
+
"code": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"enum": [
|
|
211
|
+
"ambiguous-owner",
|
|
212
|
+
"duplicate-tool-id",
|
|
213
|
+
"deprecated-suspected",
|
|
214
|
+
"stale-index-suspected",
|
|
215
|
+
"weak-name-match",
|
|
216
|
+
"version-resolution-gap",
|
|
217
|
+
"changeset-resolution-gap",
|
|
218
|
+
"manual-confirmation-needed",
|
|
219
|
+
"other"
|
|
220
|
+
],
|
|
221
|
+
"description": "Machine-stable warning category."
|
|
222
|
+
},
|
|
223
|
+
"message": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"minLength": 1,
|
|
226
|
+
"description": "Human-readable warning detail."
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implement-galaxy-workflow-test
|
|
3
|
+
description: "Assemble Galaxy workflow test fixtures and assertions."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# implement-galaxy-workflow-test
|
|
7
|
+
|
|
8
|
+
Follow the procedure below and use the artifact/reference sections as the runtime contract.
|
|
9
|
+
|
|
10
|
+
## When To Use
|
|
11
|
+
|
|
12
|
+
- Assemble Galaxy workflow test fixtures and assertions.
|
|
13
|
+
|
|
14
|
+
## Inputs
|
|
15
|
+
|
|
16
|
+
- Read artifact `galaxy-test-plan`. Schema: galaxy-workflow-test-plan. Produced by `changeset-to-galaxy-test-plan`, `cwl-test-to-galaxy-test-plan`, `freeform-summary-to-galaxy-test-plan`, `nextflow-test-to-galaxy-test-plan`. Schema-valid Galaxy test plan (galaxy-workflow-test-plan) from a *-test-to-galaxy-test-plan Mold; carries job inputs, expected outputs, assertion intent, fixture provenance, label assumptions, unresolved mappings, and omissions.
|
|
17
|
+
- Read artifact `galaxy-workflow`. Produced by `advance-galaxy-draft-step`, `mature-galaxy-workflow-for-iwc`. Concrete gxformat2 workflow being tested — the loop-endstate `galaxy-workflow.gxwf.yml` from advance-galaxy-draft-step (`class: GalaxyWorkflow`); provides the real input/output labels, outputs, and collection shapes the test must assert against.
|
|
18
|
+
- Read artifact `test-data-refs`. Produced by `cwl-to-test-data`, `find-test-data`, `nextflow-to-test-data`, `paper-to-test-data`. Resolved test data references (URLs, paths, expected shapes) from paper-to-test-data or find-test-data.
|
|
19
|
+
|
|
20
|
+
## Outputs
|
|
21
|
+
|
|
22
|
+
- Write artifact `galaxy-workflow-test` as `galaxy-workflow.gxwf-tests.yml`. Format: `yaml`. Galaxy workflow test file (tests-format) with job inputs, expected outputs, assertions; passes static schema + label cross-check. Named as the workflow basename + `-tests.yml` so Planemo discovers it as the companion of `galaxy-workflow.gxwf.yml`.
|
|
23
|
+
|
|
24
|
+
## Required Tools
|
|
25
|
+
|
|
26
|
+
- **`gxwf`** (gxwf). `npm install -g '@galaxy-tool-util/cli@^1.8.1'`.
|
|
27
|
+
Ephemeral run: `npx --yes --package @galaxy-tool-util/cli@1.8.1 gxwf`.
|
|
28
|
+
Check: `gxwf --help | grep -q draft-validate`.
|
|
29
|
+
Docs: https://github.com/jmchilton/galaxy-tool-util-ts/tree/main/packages/cli
|
|
30
|
+
- **`planemo`** (planemo). `uv tool install planemo==0.75.47` (or `pip install planemo==0.75.47`).
|
|
31
|
+
Ephemeral run: `uvx --from planemo==0.75.47 planemo`.
|
|
32
|
+
Check: `planemo --version`.
|
|
33
|
+
Docs: https://planemo.readthedocs.io/
|
|
34
|
+
Bundled reference: `references/cli/planemo.md`.
|
|
35
|
+
|
|
36
|
+
## Load Upfront
|
|
37
|
+
|
|
38
|
+
- `references/cli/planemo.md`: CLI tool reference copied verbatim into the bundle. Runtime for workflow_test_init / workflow_test_on_invocation; install before authoring tests against a live invocation.
|
|
39
|
+
- `references/schemas/galaxy-workflow-test-plan.schema.json`: Schema file copied verbatim into the bundle. Input contract: read the schema-valid Galaxy test plan (job inputs, expected outputs, assertion intent, tolerances, label assumptions, unresolved mappings, omissions) and convert it into tests-format output, reconciling assumed labels and fixtures against the real draft.
|
|
40
|
+
- `references/schemas/tests-format.schema.json`: Schema file copied verbatim into the bundle. JSON Schema contract for the Galaxy workflow test format. Output of this Mold must validate against it.
|
|
41
|
+
|
|
42
|
+
## Load On Demand
|
|
43
|
+
|
|
44
|
+
- `references/cli/validate-tests.json`: CLI command reference packaged as a sidecar. Run the cheap static workflow-test validation and workflow-label cross-check before Planemo execution. Use when: after authoring or editing a Galaxy workflow test file and before Planemo invocation.
|
|
45
|
+
- `references/notes/galaxy-workflow-testability-design.md`: Research note copied verbatim into the bundle. Revise workflow inputs, outputs, labels, checkpoints, and collection identifiers so meaningful tests can be authored. Use when: test authoring reveals missing labels, omitted workflow-level outputs, unstable collection identifiers, weakly assertable final outputs, or fixture-shape pressure on workflow inputs.
|
|
46
|
+
- `references/notes/iwc-shortcuts-anti-patterns.md`: Research note copied verbatim into the bundle. Flag assertion shortcuts that are acceptable in IWC versus shortcuts that should be avoided. Use when: considering existence-only, size-only, image-only, checksum, output-label, or negative-test patterns.
|
|
47
|
+
- `references/notes/iwc-test-data-conventions.md`: Research note copied verbatim into the bundle. Assemble job input fixtures, remote URLs, hashes, collection shapes, and test-data layout in IWC style. Use when: writing or revising the job/input side of a Galaxy workflow test file.
|
|
48
|
+
- `references/notes/planemo-asserts-idioms.md`: Research note copied verbatim into the bundle. Choose assertion families, tolerance magnitudes, and the static/Planemo validation loop. Use when: writing or revising output assertions for a Galaxy workflow test file.
|
|
49
|
+
- `references/notes/planemo-workflow-test-architecture.md`: Research note copied verbatim into the bundle. Write tests with stable labels and artifacts that Planemo can connect back to Galaxy invocations, jobs, and outputs. Use when: adding or revising workflow tests that will be iterated with Planemo or generated from existing invocations.
|
|
50
|
+
|
|
51
|
+
## Validation
|
|
52
|
+
|
|
53
|
+
- None declared.
|
|
54
|
+
|
|
55
|
+
## Procedure
|
|
56
|
+
|
|
57
|
+
Assemble a Galaxy workflow test file (`tests-format`) from the schema-valid Galaxy test plan (galaxy-workflow-test-plan), the concrete gxformat2 workflow (`galaxy-workflow.gxwf.yml`), and the resolved test-data refs. One invocation produces the companion test file whose job inputs come from the workflow inputs and whose assertions come from the plan's assertion intent. The output must validate against tests-format and pass the workflow-label cross-check before any Planemo run.
|
|
58
|
+
|
|
59
|
+
**Name the companion off the workflow's basename.** Planemo discovers the test file by stripping only the workflow's final extension and appending `-tests.yml`, so the companion of `galaxy-workflow.gxwf.yml` is `galaxy-workflow.gxwf-tests.yml` (keep the `.gxwf`) — not `galaxy-workflow-tests.yml`. Derive the name from whatever the workflow file is actually called; a `.ga` workflow would instead pair with `<basename>-tests.yml`.
|
|
60
|
+
|
|
61
|
+
The workflow is the contract: input and output labels in the test file must address real workflow input/output labels. The test plan's bindings may be `assumed` or `unresolved` — especially for synthesized (freeform-sourced) plans whose `workflow.label_source` is `interface-brief` — so reconcile each plan binding against the real workflow labels here, and resolve `unresolved[]` entries and `storage: unresolved` fixtures against the workflow and the resolved test-data refs. When authoring reveals a missing label, an omitted workflow output, or an unstable collection identifier, treat it as testability pressure on the workflow itself — surface it per galaxy-workflow-testability-design rather than asserting around it.
|
|
62
|
+
|
|
63
|
+
### Sequence
|
|
64
|
+
|
|
65
|
+
1. **Bootstrap.** Prefer generating the test skeleton from a real invocation, not from scratch:
|
|
66
|
+
- **`planemo workflow_test_init --from_invocation <id>`** (planemo-workflow_test_init) — preferred bootstrap for new test files; reviewer convention. See planemo-asserts-idioms §7.
|
|
67
|
+
- **`planemo workflow_test_on_invocation <tests.yml> <id>`** (planemo-workflow_test_on_invocation) — fast assertion-iteration loop without re-running the workflow.
|
|
68
|
+
2. **Author job inputs and stage their data.** Wire each workflow input to a `test-data-refs` entry, and make the data the test references actually exist on disk before any Planemo run:
|
|
69
|
+
- **Prefer a bare remote `location:`** (iwc-test-data-conventions, remote-URL-first) whenever the ref is a single fetchable artifact — Galaxy fetches it at upload time, so nothing is staged locally. Record the hash when known.
|
|
70
|
+
- **Materialize a local `test-data/` layout only when the ref needs prep a URL can't express** — a concatenation (e.g. per-isolate chromosome+plasmid into one FASTA), a subset (one chromosome, selected loci), or a column split into named collection elements. In that case the test file's `path:` entries point at files this skill writes: fetch from the ref's verified source URLs, run the documented prep, and lay the result out in the `test-data/` directory addressed by the `*-tests.yml`, relative to the workflow. The collection element identifiers in the staged layout must match the test file and the workflow labels exactly.
|
|
71
|
+
- Never emit a `path:` (or `location:`) the test references but no source produces — an un-materialized path passes the static cross-check and fails only at upload, far from here. If a ref is `resolved: false`, surface the gap rather than authoring a path to a file that does not exist.
|
|
72
|
+
|
|
73
|
+
Inputs must match the workflow's collection shapes and datatypes.
|
|
74
|
+
3. **Author assertions.** Materialize the plan's assertion intent into concrete output assertions. Choose assertion families and tolerances per planemo-asserts-idioms; check each shortcut against iwc-shortcuts-anti-patterns so an existence-only or size-only assertion is a deliberate choice, not an evasion. Honor the plan's `omissions[]` and treat low-`confidence` synthesized intent as a starting point to tighten against the real invocation.
|
|
75
|
+
4. **Validate static.** Run validate-tests for the schema gate, then the workflow-label cross-check (`checkTestsAgainstWorkflow`): zero missing input labels, zero missing output labels, no collection/datatype mismatches. Fix before spending a Planemo run.
|
|
76
|
+
5. **Run green.** Drive planemo `test` with the staged data. "Managed Galaxy" here means **Planemo-managed**: `planemo test` bootstraps its own Galaxy and installs the workflow's tools from the Tool Shed/conda — it does **not** require a pre-provisioned external server, so absence of a running Galaxy is not a reason to skip this gate (cost/runtime of heavy tool or reference-DB installs may be, but that is a deliberate deferral, not an impossibility). On green, hand off the test file plus enough invocation/job/assertion context for run-workflow-test and debug-galaxy-workflow-output to use if a later run fails.
|
|
77
|
+
|
|
78
|
+
Author tests with stable labels and artifacts that Planemo can connect back to Galaxy invocations, jobs, and outputs (planemo-workflow-test-architecture) — that traceability is what makes the downstream debug skill able to locate failure evidence.
|
|
79
|
+
|
|
80
|
+
## Feedback Mode
|
|
81
|
+
|
|
82
|
+
- Feedback mode is off unless the caller explicitly enables `--feedback` or supplies a feedback-ledger path.
|
|
83
|
+
- When enabled, read `_feedback.md` before doing the work and use its registered `foundry-feedback.ledger.yml` protocol.
|
|
84
|
+
- Preserve harness-owned run and phase state. Append only concrete observations about a canonical Foundry source asset or a related project that this run showed to be at fault; do not put ordinary workflow requirements in this ledger.
|
|
85
|
+
- Before reporting completion, make one explicit pass over the work you just did. Do not ask yourself whether anything was unclear — recall what happened: where you guessed at something the instructions should have settled, needed information this bundle does not carry, hit an instruction that contradicted another or contradicted the artifacts in front of you, used a packaged reference that did not cover your case, or did something the procedure never describes.
|
|
86
|
+
- Append an entry for each such event that clears the protocol's bar. If none do, append nothing and report `no feedback` explicitly. Silence and a clean pass are not the same thing, and nothing downstream can tell them apart unless you say which one it was.
|
|
87
|
+
- Pass the same ledger path to any subagent used for this work, and merge updates serially so one writer cannot overwrite another.
|
|
88
|
+
|
|
89
|
+
## Runtime Notes
|
|
90
|
+
|
|
91
|
+
- Do not read Foundry source files at runtime; use only files packaged in this skill bundle and user-supplied artifacts.
|
|
92
|
+
- Preserve declared artifact filenames unless the user or harness supplies explicit paths.
|
|
93
|
+
- Carry unresolved assumptions into the output artifact instead of silently inventing missing source evidence.
|