@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.
Files changed (451) hide show
  1. package/CHANGELOG.md +123 -0
  2. package/LICENSE +21 -0
  3. package/README.md +760 -5
  4. package/bin/legacy-mcp-config.js +363 -0
  5. package/bin/orbit.js +810 -0
  6. package/bin/pi-extension-path.d.ts +4 -0
  7. package/bin/pi-extension-path.js +44 -0
  8. package/bin/provider-auth.d.ts +22 -0
  9. package/bin/provider-auth.js +77 -0
  10. package/bin/thinking-pref.js +38 -0
  11. package/bin/update-check.d.ts +15 -0
  12. package/bin/update-check.js +137 -0
  13. package/extensions/cli-update/index.ts +32 -0
  14. package/extensions/orbit/activity-hooks.ts +141 -0
  15. package/extensions/orbit/activity.ts +116 -0
  16. package/extensions/orbit/agent-dir.ts +11 -0
  17. package/extensions/orbit/auto-resume.ts +352 -0
  18. package/extensions/orbit/config.ts +3 -0
  19. package/extensions/orbit/confusables.ts +1 -0
  20. package/extensions/orbit/context.ts +957 -0
  21. package/extensions/orbit/dashboard-commands.ts +191 -0
  22. package/extensions/orbit/dashboard-store.ts +473 -0
  23. package/extensions/orbit/dashboard-tools.ts +1185 -0
  24. package/extensions/orbit/empty-completion.ts +99 -0
  25. package/extensions/orbit/evidence-gate.ts +1276 -0
  26. package/extensions/orbit/evidence-override-command.ts +294 -0
  27. package/extensions/orbit/exec-guard/bash-risk.ts +1408 -0
  28. package/extensions/orbit/exec-guard/gate.ts +181 -0
  29. package/extensions/orbit/exec-guard/guardian-config.ts +54 -0
  30. package/extensions/orbit/exec-guard/index.ts +1 -0
  31. package/extensions/orbit/exec-guard/model-tier.ts +36 -0
  32. package/extensions/orbit/exec-guard/path-jail.ts +54 -0
  33. package/extensions/orbit/exec-guard/policy.ts +342 -0
  34. package/extensions/orbit/exec-guard/runtime-state.ts +15 -0
  35. package/extensions/orbit/exec-guard/sensitive-read.ts +525 -0
  36. package/extensions/orbit/exec-guard/types.ts +42 -0
  37. package/extensions/orbit/execution-commands.ts +134 -0
  38. package/extensions/orbit/feedback-command.ts +81 -0
  39. package/extensions/orbit/feedback.ts +96 -0
  40. package/extensions/orbit/galaxy-api.test.ts +122 -0
  41. package/extensions/orbit/galaxy-api.ts +606 -0
  42. package/extensions/orbit/galaxy-artifact-link-guidance.ts +5 -0
  43. package/extensions/orbit/galaxy-destructive-gate.ts +113 -0
  44. package/extensions/orbit/galaxy-enrich.ts +1108 -0
  45. package/extensions/orbit/galaxy-failure.ts +101 -0
  46. package/extensions/orbit/galaxy-fixture.ts +126 -0
  47. package/extensions/orbit/galaxy-history-guard.ts +233 -0
  48. package/extensions/orbit/galaxy-job-block.ts +347 -0
  49. package/extensions/orbit/galaxy-job-ops.ts +288 -0
  50. package/extensions/orbit/galaxy-live-source.ts +929 -0
  51. package/extensions/orbit/galaxy-markdown-adapter.ts +248 -0
  52. package/extensions/orbit/galaxy-op-policy.ts +332 -0
  53. package/extensions/orbit/galaxy-ops-tools.ts +326 -0
  54. package/extensions/orbit/galaxy-output-store.ts +80 -0
  55. package/extensions/orbit/galaxy-output.ts +346 -0
  56. package/extensions/orbit/galaxy-page-binding.ts +222 -0
  57. package/extensions/orbit/galaxy-page-markdown-guidance.ts +15 -0
  58. package/extensions/orbit/galaxy-page-ops.ts +159 -0
  59. package/extensions/orbit/galaxy-page-sync.test.ts +417 -0
  60. package/extensions/orbit/galaxy-page-sync.ts +318 -0
  61. package/extensions/orbit/galaxy-pages-api.ts +203 -0
  62. package/extensions/orbit/galaxy-pages-sync.ts +409 -0
  63. package/extensions/orbit/galaxy-poll-guard.ts +189 -0
  64. package/extensions/orbit/galaxy-poller.ts +706 -0
  65. package/extensions/orbit/galaxy-provenance.ts +623 -0
  66. package/extensions/orbit/galaxy-reconcile.ts +956 -0
  67. package/extensions/orbit/galaxy-recovery.ts +176 -0
  68. package/extensions/orbit/galaxy-repeat-guard.ts +55 -0
  69. package/extensions/orbit/galaxy-submission-capture.ts +707 -0
  70. package/extensions/orbit/galaxy-submission.ts +502 -0
  71. package/extensions/orbit/galaxy-tool-source.ts +78 -0
  72. package/extensions/orbit/galaxy-tool-wrap.ts +234 -0
  73. package/extensions/orbit/galaxy-udt-block.ts +127 -0
  74. package/extensions/orbit/galaxy-upload-tus.ts +334 -0
  75. package/extensions/orbit/galaxy-upload.ts +300 -0
  76. package/extensions/orbit/galaxy-version-capture.ts +65 -0
  77. package/extensions/orbit/git.ts +173 -0
  78. package/extensions/orbit/harness-block-fields.ts +597 -0
  79. package/extensions/orbit/index.ts +593 -0
  80. package/extensions/orbit/init-gate.ts +284 -0
  81. package/extensions/orbit/instructions-command.ts +136 -0
  82. package/extensions/orbit/invocation-failure-hint.ts +57 -0
  83. package/extensions/orbit/iwc-plan-check.ts +94 -0
  84. package/extensions/orbit/lesson-command.ts +303 -0
  85. package/extensions/orbit/lesson-hint.ts +245 -0
  86. package/extensions/orbit/lesson-nudge.ts +106 -0
  87. package/extensions/orbit/lessons/compose.ts +177 -0
  88. package/extensions/orbit/lessons/counters.ts +120 -0
  89. package/extensions/orbit/lessons/enabled.ts +116 -0
  90. package/extensions/orbit/lessons/matcher.ts +346 -0
  91. package/extensions/orbit/lessons/paths.ts +286 -0
  92. package/extensions/orbit/lessons/pi-event-contract.ts +105 -0
  93. package/extensions/orbit/lessons/propose-replay.ts +103 -0
  94. package/extensions/orbit/lessons/propose-tool.ts +222 -0
  95. package/extensions/orbit/lessons/propose.ts +502 -0
  96. package/extensions/orbit/lessons/replay.ts +89 -0
  97. package/extensions/orbit/lessons/reproduction-index.ts +83 -0
  98. package/extensions/orbit/lessons/search-tool.ts +99 -0
  99. package/extensions/orbit/lessons/search.ts +136 -0
  100. package/extensions/orbit/lessons/store.ts +415 -0
  101. package/extensions/orbit/lessons/text.ts +36 -0
  102. package/extensions/orbit/lessons/types.ts +69 -0
  103. package/extensions/orbit/lessons/user-dir.ts +24 -0
  104. package/extensions/orbit/lessons/user-lesson.ts +88 -0
  105. package/extensions/orbit/lessons/wrapper.ts +61 -0
  106. package/extensions/orbit/lessons-command.ts +147 -0
  107. package/extensions/orbit/local-exec.ts +39 -0
  108. package/extensions/orbit/mcp-output.ts +179 -0
  109. package/extensions/orbit/mcp-servers.test.ts +24 -0
  110. package/extensions/orbit/mcp-servers.ts +25 -0
  111. package/extensions/orbit/model-script.ts +351 -0
  112. package/extensions/orbit/notebook-anchors.ts +342 -0
  113. package/extensions/orbit/notebook-writer.ts +863 -0
  114. package/extensions/orbit/observation-allowlists.ts +1109 -0
  115. package/extensions/orbit/observation-replay.ts +148 -0
  116. package/extensions/orbit/observation-triggers.ts +563 -0
  117. package/extensions/orbit/observation-ui.ts +175 -0
  118. package/extensions/orbit/observations-command.ts +421 -0
  119. package/extensions/orbit/observations-config.ts +200 -0
  120. package/extensions/orbit/observations.ts +1381 -0
  121. package/extensions/orbit/profiles.ts +270 -0
  122. package/extensions/orbit/progress-updates.ts +95 -0
  123. package/extensions/orbit/proposal-commands.ts +882 -0
  124. package/extensions/orbit/provenance-fs-file.ts +59 -0
  125. package/extensions/orbit/provenance-fs.ts +32 -0
  126. package/extensions/orbit/provenance-memory-fs.ts +59 -0
  127. package/extensions/orbit/record-store-file.ts +177 -0
  128. package/extensions/orbit/record-store-page.ts +77 -0
  129. package/extensions/orbit/record-store-seam.ts +47 -0
  130. package/extensions/orbit/record-store.ts +149 -0
  131. package/extensions/orbit/registry-carrier.ts +107 -0
  132. package/extensions/orbit/registry-eligibility.ts +95 -0
  133. package/extensions/orbit/registry-evaluation.ts +403 -0
  134. package/extensions/orbit/registry-evaluator.ts +519 -0
  135. package/extensions/orbit/registry-import.ts +91 -0
  136. package/extensions/orbit/registry-lock.ts +221 -0
  137. package/extensions/orbit/registry-memory-fs.ts +42 -0
  138. package/extensions/orbit/registry-page-carrier.ts +103 -0
  139. package/extensions/orbit/registry-proposal.ts +1348 -0
  140. package/extensions/orbit/registry-runtime.ts +234 -0
  141. package/extensions/orbit/registry-schema.ts +735 -0
  142. package/extensions/orbit/registry-submitter.ts +59 -0
  143. package/extensions/orbit/registry-templates.ts +346 -0
  144. package/extensions/orbit/registry.ts +476 -0
  145. package/extensions/orbit/sandbox/index.ts +120 -0
  146. package/extensions/orbit/sandbox/sandbox-bash.ts +93 -0
  147. package/extensions/orbit/sandbox/sandbox-config.ts +87 -0
  148. package/extensions/orbit/sandbox/sandbox-init-message.ts +28 -0
  149. package/extensions/orbit/secret-redaction.ts +247 -0
  150. package/extensions/orbit/session-index/cwd.ts +18 -0
  151. package/extensions/orbit/session-index/db.ts +56 -0
  152. package/extensions/orbit/session-index/indexer.ts +154 -0
  153. package/extensions/orbit/session-index/is-enabled.ts +17 -0
  154. package/extensions/orbit/session-index/parse.ts +254 -0
  155. package/extensions/orbit/session-index/query.ts +209 -0
  156. package/extensions/orbit/session-index/schema.ts +72 -0
  157. package/extensions/orbit/session-index/tools.ts +152 -0
  158. package/extensions/orbit/session-lifecycle.ts +321 -0
  159. package/extensions/orbit/skill-triggers.ts +159 -0
  160. package/extensions/orbit/skills-command.ts +48 -0
  161. package/extensions/orbit/skills-discovery.ts +435 -0
  162. package/extensions/orbit/skills.ts +84 -0
  163. package/extensions/orbit/sra-import-gate.ts +77 -0
  164. package/extensions/orbit/state.ts +265 -0
  165. package/extensions/orbit/submission-replay.ts +147 -0
  166. package/extensions/orbit/sync-command.ts +157 -0
  167. package/extensions/orbit/teams/critic-parser.ts +93 -0
  168. package/extensions/orbit/teams/dispatcher.ts +210 -0
  169. package/extensions/orbit/teams/is-enabled.ts +22 -0
  170. package/extensions/orbit/teams/tool.ts +187 -0
  171. package/extensions/orbit/teams/types.ts +57 -0
  172. package/extensions/orbit/teams/validate.ts +42 -0
  173. package/extensions/orbit/tester-id-command.ts +133 -0
  174. package/extensions/orbit/tools-sync.ts +279 -0
  175. package/extensions/orbit/tools.ts +1300 -0
  176. package/extensions/orbit/types.ts +41 -0
  177. package/extensions/orbit/ui-bridge.ts +55 -0
  178. package/extensions/orbit/ulid.ts +60 -0
  179. package/extensions/orbit/user-instructions.ts +388 -0
  180. package/extensions/orbit/vendor/skills/_catalog.json +68 -0
  181. package/extensions/orbit/vendor/skills/_manifest.json +1106 -0
  182. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/SKILL.md +112 -0
  183. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/_provenance.json +218 -0
  184. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/_required_tools.json +33 -0
  185. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/_verify.json +4 -0
  186. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/add.json +50 -0
  187. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/draft-extract.json +51 -0
  188. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/draft-next-step.json +42 -0
  189. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/draft-validate.json +140 -0
  190. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/list.json +32 -0
  191. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/notes/galaxy-tool-job-failure-reference.md +137 -0
  192. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/notes/open-requirements-ledger.md +173 -0
  193. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/schemas/galaxy-tool-summary.schema.json +175 -0
  194. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/schemas/galaxy-workflow-draft.schema.json +2727 -0
  195. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/SKILL.md +82 -0
  196. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/_provenance.json +133 -0
  197. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/_required_tools.json +16 -0
  198. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/_verify.json +4 -0
  199. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/cli/draft-validate.json +140 -0
  200. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/notes/galaxy-workflow-draft-format.md +135 -0
  201. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/notes/open-requirements-ledger.md +173 -0
  202. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/schemas/galaxy-workflow-draft.schema.json +2727 -0
  203. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/SKILL.md +84 -0
  204. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/_provenance.json +166 -0
  205. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/_verify.json +29 -0
  206. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/galaxy-workflow-testability-design.md +136 -0
  207. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
  208. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/iwc-test-data-conventions.md +308 -0
  209. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/planemo-asserts-idioms.md +246 -0
  210. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/planemo-workflow-test-architecture.md +151 -0
  211. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/schemas/galaxy-workflow-test-plan.schema.json +552 -0
  212. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/schemas/summary-galaxy-workflow.schema.json +687 -0
  213. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/schemas/tests-format.schema.json +7328 -0
  214. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/SKILL.md +127 -0
  215. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/_provenance.json +198 -0
  216. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/_required_tools.json +16 -0
  217. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/_verify.json +4 -0
  218. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/cli/convert.json +123 -0
  219. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/galaxy-data-flow-draft-contract.md +129 -0
  220. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
  221. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/iwc-test-data-conventions.md +308 -0
  222. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/open-requirements-ledger.md +173 -0
  223. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/SKILL.md +73 -0
  224. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/_provenance.json +160 -0
  225. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/_verify.json +4 -0
  226. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-collection-semantics.md +43 -0
  227. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-collection-semantics.yml +1250 -0
  228. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-tool-job-failure-reference.md +137 -0
  229. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-workflow-invocation-failure-reference.md +138 -0
  230. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
  231. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/nextflow-operators-to-galaxy-collection-recipes.md +98 -0
  232. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/planemo-asserts-idioms.md +246 -0
  233. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/planemo-workflow-test-architecture.md +151 -0
  234. package/extensions/orbit/vendor/skills/discover-shed-tool/SKILL.md +174 -0
  235. package/extensions/orbit/vendor/skills/discover-shed-tool/_provenance.json +130 -0
  236. package/extensions/orbit/vendor/skills/discover-shed-tool/_required_tools.json +18 -0
  237. package/extensions/orbit/vendor/skills/discover-shed-tool/_verify.json +17 -0
  238. package/extensions/orbit/vendor/skills/discover-shed-tool/references/cli/tool-revisions.json +48 -0
  239. package/extensions/orbit/vendor/skills/discover-shed-tool/references/cli/tool-search.json +95 -0
  240. package/extensions/orbit/vendor/skills/discover-shed-tool/references/cli/tool-versions.json +39 -0
  241. package/extensions/orbit/vendor/skills/discover-shed-tool/references/notes/component-tool-shed-search.md +230 -0
  242. package/extensions/orbit/vendor/skills/discover-shed-tool/references/schemas/galaxy-tool-discovery.schema.json +231 -0
  243. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/SKILL.md +93 -0
  244. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/_provenance.json +201 -0
  245. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/_required_tools.json +28 -0
  246. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/_verify.json +17 -0
  247. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/cli/planemo.md +44 -0
  248. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/cli/validate-tests.json +40 -0
  249. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/galaxy-workflow-testability-design.md +136 -0
  250. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
  251. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/iwc-test-data-conventions.md +308 -0
  252. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/planemo-asserts-idioms.md +246 -0
  253. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/planemo-workflow-test-architecture.md +151 -0
  254. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/schemas/galaxy-workflow-test-plan.schema.json +552 -0
  255. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/schemas/tests-format.schema.json +7328 -0
  256. package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/SKILL.md +81 -0
  257. package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/_provenance.json +93 -0
  258. package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/_verify.json +17 -0
  259. package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/references/notes/open-requirements-ledger.md +173 -0
  260. package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/references/schemas/summary-galaxy-workflow.schema.json +687 -0
  261. package/extensions/orbit/vendor/skills/pipeline-update-interview-to-galaxy/SKILL.md +81 -0
  262. package/extensions/orbit/vendor/skills/pipeline-update-interview-to-galaxy/_assembly.json +23 -0
  263. package/extensions/orbit/vendor/skills/run-workflow-test/SKILL.md +79 -0
  264. package/extensions/orbit/vendor/skills/run-workflow-test/_provenance.json +125 -0
  265. package/extensions/orbit/vendor/skills/run-workflow-test/_required_tools.json +28 -0
  266. package/extensions/orbit/vendor/skills/run-workflow-test/_verify.json +4 -0
  267. package/extensions/orbit/vendor/skills/run-workflow-test/references/cli/planemo.md +44 -0
  268. package/extensions/orbit/vendor/skills/run-workflow-test/references/cli/validate-tests.json +40 -0
  269. package/extensions/orbit/vendor/skills/run-workflow-test/references/notes/galaxy-workflow-invocation-failure-reference.md +138 -0
  270. package/extensions/orbit/vendor/skills/run-workflow-test/references/notes/planemo-asserts-idioms.md +246 -0
  271. package/extensions/orbit/vendor/skills/run-workflow-test/references/notes/planemo-workflow-test-architecture.md +151 -0
  272. package/extensions/orbit/vendor/skills/run-workflow-test/references/schemas/tests-format.schema.json +7328 -0
  273. package/extensions/orbit/vendor/skills/skills/LICENSE +21 -0
  274. package/extensions/orbit/vendor/skills/skills/collection-manipulation/README.md +39 -0
  275. package/extensions/orbit/vendor/skills/skills/collection-manipulation/SKILL.md +892 -0
  276. package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/api-patterns.md +927 -0
  277. package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/apply-rules.md +1482 -0
  278. package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/test-patterns.md +996 -0
  279. package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/tools.md +609 -0
  280. package/extensions/orbit/vendor/skills/skills/galaxy-data-libraries/SKILL.md +170 -0
  281. package/extensions/orbit/vendor/skills/skills/galaxy-integration/README.md +162 -0
  282. package/extensions/orbit/vendor/skills/skills/galaxy-integration/SKILL.md +99 -0
  283. package/extensions/orbit/vendor/skills/skills/galaxy-integration/examples/README.md +119 -0
  284. package/extensions/orbit/vendor/skills/skills/galaxy-integration/examples/tool-checking.md +419 -0
  285. package/extensions/orbit/vendor/skills/skills/galaxy-integration/examples/workflow-testing.md +617 -0
  286. package/extensions/orbit/vendor/skills/skills/galaxy-integration/galaxy-integration.md +614 -0
  287. package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/SKILL.md +144 -0
  288. package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/average_col3.ipynb +68 -0
  289. package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/extract_sample_metadata.ipynb +190 -0
  290. package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/variant_annotation.ipynb +816 -0
  291. package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/vcp_variant_map.ipynb +443 -0
  292. package/extensions/orbit/vendor/skills/skills/galaxy-integration/scripts/README.md +165 -0
  293. package/extensions/orbit/vendor/skills/skills/galaxy-integration/scripts/galaxy_tool_checker.py +521 -0
  294. package/extensions/orbit/vendor/skills/skills/galaxy-mcp-reference/SKILL.md +128 -0
  295. package/extensions/orbit/vendor/skills/skills/galaxy-mcp-reference/gotchas.md +135 -0
  296. package/extensions/orbit/vendor/skills/skills/galaxy-mcp-reference/history-access.md +132 -0
  297. package/extensions/orbit/vendor/skills/skills/reproduciblify/SKILL.md +146 -0
  298. package/extensions/orbit/vendor/skills/skills/reproduciblify/references/directives.yml +496 -0
  299. package/extensions/orbit/vendor/skills/skills/udt-authoring/SKILL.md +245 -0
  300. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/01-minimal-echo.yml +27 -0
  301. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/02-single-data-in-out.yml +27 -0
  302. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/03-multiple-data-js.yml +28 -0
  303. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/04-select-integer-boolean.yml +41 -0
  304. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/05-resource-requirements.yml +25 -0
  305. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/06-biocontainer-tool.yml +38 -0
  306. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/07-inline-python-script.yml +56 -0
  307. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/08-configfile-script.yml +74 -0
  308. package/extensions/orbit/vendor/skills/skills/udt-authoring/references/common-mistakes.md +76 -0
  309. package/extensions/orbit/vendor/skills/skills/udt-authoring/references/schema-reference.md +155 -0
  310. package/extensions/orbit/vendor/skills/skills/udt-authoring/references/templating.md +196 -0
  311. package/extensions/orbit/vendor/skills/skills/udt-authoring/scripts/validate.py +109 -0
  312. package/extensions/orbit/vendor/skills/skills/workflow-reports/README.md +71 -0
  313. package/extensions/orbit/vendor/skills/skills/workflow-reports/SKILL.md +190 -0
  314. package/extensions/orbit/vendor/skills/skills/workflow-reports/examples/histology-staining.md +145 -0
  315. package/extensions/orbit/vendor/skills/skills/workflow-reports/examples/tissue-microarray-analysis.md +176 -0
  316. package/extensions/orbit/vendor/skills/skills/workflow-reports/references/directives.md +415 -0
  317. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/SKILL.md +98 -0
  318. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/_provenance.json +93 -0
  319. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/_required_tools.json +28 -0
  320. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/_verify.json +17 -0
  321. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/cli/convert.json +123 -0
  322. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/cli/foundry.md +25 -0
  323. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/cli/validate.json +142 -0
  324. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/schemas/summary-galaxy-workflow.schema.json +687 -0
  325. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/SKILL.md +74 -0
  326. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/_provenance.json +71 -0
  327. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/_required_tools.json +16 -0
  328. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/_verify.json +4 -0
  329. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/references/cli/validate.json +142 -0
  330. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/references/notes/galaxy-workflow-invocation-failure-reference.md +138 -0
  331. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/references/notes/galaxy-workflow-testability-design.md +136 -0
  332. package/extensions/orbit/vendor-skills.ts +283 -0
  333. package/extensions/orbit/workspace-state-dir.ts +46 -0
  334. package/extensions/orbit-handoff/index.ts +73 -0
  335. package/extensions/orbit-handoff/orbit-launcher.ts +142 -0
  336. package/extensions/whats-new/index.ts +98 -0
  337. package/lessons/LICENSE +17 -0
  338. package/lessons/README.md +117 -0
  339. package/lessons/SCHEMA.md +187 -0
  340. package/lessons/build-snapshot.mjs +311 -0
  341. package/lessons/data/downloaded-file-is-not-what-its-extension-says.md +61 -0
  342. package/lessons/galaxy-api/403-history-is-a-hard-stop.md +57 -0
  343. package/lessons/galaxy-api/collection-into-single-dataset-input.md +61 -0
  344. package/lessons/galaxy-api/connectedvalue-in-command-line.md +62 -0
  345. package/lessons/galaxy-api/hid-is-not-an-id.md +59 -0
  346. package/lessons/galaxy-api/invoke-workflow-inputs-not-params.md +60 -0
  347. package/lessons/galaxy-api/repeat-param-pipe-keys.md +63 -0
  348. package/lessons/galaxy-api/run-tool-returns-on-submit.md +61 -0
  349. package/lessons/galaxy-tools/reference-index-not-on-server.md +62 -0
  350. package/lessons/log.md +42 -0
  351. package/lessons/reproduction/input-population-mismatch.md +59 -0
  352. package/lessons/reproduction/methods-text-vs-executed-parameters.md +62 -0
  353. package/lessons/snapshot.json +1004 -0
  354. package/lessons/stats/de-contrast-direction-and-sample-labels.md +63 -0
  355. package/lessons/stats/na-coerced-to-zero-in-filters.md +59 -0
  356. package/lessons/validate.mjs +1219 -0
  357. package/package.json +103 -5
  358. package/shared/agent-prompt.d.ts +8 -0
  359. package/shared/agent-prompt.js +15 -0
  360. package/shared/approval-prompt.d.ts +4 -0
  361. package/shared/approval-prompt.js +61 -0
  362. package/shared/brain-env.d.ts +14 -0
  363. package/shared/brain-env.js +108 -0
  364. package/shared/brain-exit.d.ts +20 -0
  365. package/shared/brain-exit.js +149 -0
  366. package/shared/capability-profile.d.ts +16 -0
  367. package/shared/capability-profile.js +75 -0
  368. package/shared/config-source.d.ts +13 -0
  369. package/shared/config-source.js +17 -0
  370. package/shared/confusables.d.ts +3 -0
  371. package/shared/confusables.js +93 -0
  372. package/shared/custom-provider.d.ts +45 -0
  373. package/shared/custom-provider.js +169 -0
  374. package/shared/dashboard-contract.d.ts +123 -0
  375. package/shared/dashboard-contract.js +560 -0
  376. package/shared/dashboard-layout-store.d.ts +44 -0
  377. package/shared/dashboard-layout-store.js +281 -0
  378. package/shared/feedback-contract.d.ts +61 -0
  379. package/shared/feedback-contract.js +146 -0
  380. package/shared/galaxy-artifact-links.d.ts +30 -0
  381. package/shared/galaxy-artifact-links.js +166 -0
  382. package/shared/galaxy-credentials.d.ts +26 -0
  383. package/shared/galaxy-credentials.js +71 -0
  384. package/shared/galaxy-destructive.d.ts +21 -0
  385. package/shared/galaxy-destructive.js +269 -0
  386. package/shared/galaxy-guidance.d.ts +2 -0
  387. package/shared/galaxy-guidance.js +53 -0
  388. package/shared/galaxy-live-contract.d.ts +92 -0
  389. package/shared/galaxy-live-contract.js +180 -0
  390. package/shared/galaxy-page-cells.d.ts +2 -0
  391. package/shared/galaxy-page-cells.js +22 -0
  392. package/shared/galaxy-tool-family.d.ts +5 -0
  393. package/shared/galaxy-tool-family.js +27 -0
  394. package/shared/galaxy-url.d.ts +1 -0
  395. package/shared/galaxy-url.js +48 -0
  396. package/shared/gtn.d.ts +31 -0
  397. package/shared/gtn.js +253 -0
  398. package/shared/handled-prompt.d.ts +3 -0
  399. package/shared/handled-prompt.js +26 -0
  400. package/shared/known-provider.d.ts +11 -0
  401. package/shared/known-provider.js +89 -0
  402. package/shared/lesson-hint-marker.d.ts +7 -0
  403. package/shared/lesson-hint-marker.js +32 -0
  404. package/shared/lesson-rules.d.ts +150 -0
  405. package/shared/lesson-rules.js +203 -0
  406. package/shared/malformed-object-ids.d.ts +1 -0
  407. package/shared/malformed-object-ids.js +37 -0
  408. package/shared/markdown-sections.d.ts +10 -0
  409. package/shared/markdown-sections.js +118 -0
  410. package/shared/notebook-fences.d.ts +12 -0
  411. package/shared/notebook-fences.js +53 -0
  412. package/shared/observation-contract.d.ts +91 -0
  413. package/shared/observation-contract.js +544 -0
  414. package/shared/orbit-config.d.ts +226 -0
  415. package/shared/orbit-config.js +189 -0
  416. package/shared/orbit-env.d.ts +13 -0
  417. package/shared/orbit-env.js +124 -0
  418. package/shared/orbit-shell-contract.d.ts +74 -0
  419. package/shared/orbit-shell-contract.js +30 -0
  420. package/shared/page-content-hash.d.ts +1 -0
  421. package/shared/page-content-hash.js +13 -0
  422. package/shared/pi-default-model.d.ts +7 -0
  423. package/shared/pi-default-model.js +41 -0
  424. package/shared/prompt-blocks.d.ts +87 -0
  425. package/shared/prompt-blocks.js +898 -0
  426. package/shared/provider-auth-caps.d.ts +22 -0
  427. package/shared/provider-auth-caps.js +57 -0
  428. package/shared/random.d.ts +2 -0
  429. package/shared/random.js +15 -0
  430. package/shared/record-excerpt.d.ts +4 -0
  431. package/shared/record-excerpt.js +16 -0
  432. package/shared/redirect-guard.d.ts +36 -0
  433. package/shared/redirect-guard.js +235 -0
  434. package/shared/skills-pin.d.ts +8 -0
  435. package/shared/skills-pin.js +9 -0
  436. package/shared/skills-router.d.ts +17 -0
  437. package/shared/skills-router.js +63 -0
  438. package/shared/sra-import.d.ts +34 -0
  439. package/shared/sra-import.js +206 -0
  440. package/shared/state-dir.d.ts +21 -0
  441. package/shared/state-dir.js +240 -0
  442. package/shared/team-dispatch-contract.d.ts +28 -0
  443. package/shared/team-dispatch-contract.js +1 -0
  444. package/shared/truncate-middle.d.ts +11 -0
  445. package/shared/truncate-middle.js +68 -0
  446. package/shared/version-compare.d.ts +10 -0
  447. package/shared/version-compare.js +74 -0
  448. package/shared/whats-new.d.ts +31 -0
  449. package/shared/whats-new.js +83 -0
  450. package/shared/wsl.d.ts +10 -0
  451. package/shared/wsl.js +24 -0
@@ -0,0 +1,155 @@
1
+ # UserToolSource Schema Reference
2
+
3
+ The canonical schema for a UDT is the `UserToolSource` Pydantic model in
4
+ `galaxy-tool-util` (`galaxy.tool_util_models`). It is `extra="forbid"`: **any unknown field is
5
+ rejected at parse time.** Field names below are exact.
6
+
7
+ When you submit via `create_user_tool` / `POST /api/unprivileged_tools`, the server validates this
8
+ full `UserToolSource`, so everything here applies. (Galaxy's *in-app* authoring agent targets a
9
+ slimmed view of the same model that drops the `tests` block to shrink its structured-output schema;
10
+ `tests` is optional either way and usually skipped for a first version.)
11
+
12
+ ## Top-level fields
13
+
14
+ | Field | Required | Type | Notes |
15
+ |-------|----------|------|-------|
16
+ | `class` | **yes** | string | Must be exactly `GalaxyUserTool`. |
17
+ | `name` | **yes** | string | Display name; **min length 5**; not blank/whitespace. |
18
+ | `container` | **yes** | string | Container image, e.g. `quay.io/biocontainers/seqkit:2.8.2--h9ee0642_0`. A plain **string**, never a dict/list. Not blank. |
19
+ | `shell_command` | **yes** | string | Command with `$(...)` expressions. The field is `shell_command`, not `command`. |
20
+ | `id` | no (recommended) | string | Pattern `^[a-z][a-z0-9_-]*$`, length 3-255. Lowercase, starts with a letter; hyphens and underscores allowed. |
21
+ | `version` | **yes** | string | e.g. `"0.1.0"`. Required on 26.1+ -- a versionless tool fails schema validation with `version: Field required`. Not blank/whitespace; quote it so YAML doesn't read it as a number. |
22
+ | `description` | no | string | Short line in the tool menu. |
23
+ | `inputs` | no (default `[]`) | list | Input parameters (see below). |
24
+ | `outputs` | no (default `[]`) | list | Output definitions (see below). |
25
+ | `requirements` | no | list | `javascript` / `resource` / `container` requirements (see below). |
26
+ | `configfiles` | no | list | Files written before execution; content supports `$(...)`. |
27
+ | `citations` | no | list | `{type: doi|bibtex|reference, content: ...}`. DOIs/bibtex are validated. |
28
+ | `license` | no | string | SPDX identifier, e.g. `MIT`. |
29
+ | `help` | no (convention: yes) | object | `{format, content}`; `format` is `markdown`/`restructuredtext`/`plain_text`. Rendered under the tool form. Always include one -- see SKILL.md. |
30
+ | `tests` | no | list | In-tool tests (inputs/outputs). |
31
+ | `profile`, `edam_operations`, `edam_topics`, `xrefs` | no | -- | Metadata; rarely needed for a first version. |
32
+
33
+ ## Input parameter types
34
+
35
+ Every input has `name` (required) and may have `label`, `help`, `optional` (default `false`).
36
+ Beyond those, each type supports:
37
+
38
+ | `type` | Extra supported fields |
39
+ |--------|------------------------|
40
+ | `boolean` | `value` (true/false). **No** `truevalue`/`falsevalue` -- turn it into a flag in `shell_command` with a ternary. |
41
+ | `integer` | `value` (default), `min`, `max`, `validators` (`in_range`) |
42
+ | `float` | `value`, `min`, `max`, `validators` (`in_range`) |
43
+ | `text` | `value`, `area` (bool), `validators` (`length`, `regex`, `empty_field`) |
44
+ | `select` | `options` (static, non-empty), `multiple`, `validators` (`no_options`) |
45
+ | `color` | `value` |
46
+ | `data` | `format` (string or list of datatypes), `multiple` |
47
+ | `data_collection` | `collection_type` (e.g. `list`, `paired`), `format` |
48
+
49
+ `select` options are a list of `{label, value, selected}`:
50
+
51
+ ```yaml
52
+ - name: mode
53
+ type: select
54
+ options:
55
+ - { label: Fast, value: fast, selected: true }
56
+ - { label: Accurate, value: accurate, selected: false }
57
+ ```
58
+
59
+ **Structural groups** (recurse into the leaf types above): `conditional` (has `test_parameter`
60
+ and `whens`), `repeat` (has `parameters`, `min`, `max`), `section` (has `parameters`).
61
+
62
+ **Rejected types** (exist in XML, not in UDT -- parse error): `hidden`, `drill_down`,
63
+ `data_column`, `genomebuild`, `group_tag`, `baseurl`, `rules`, `directory`. **Rejected fields on
64
+ any parameter:** `truevalue`, `falsevalue`, `argument`, `is_dynamic`, `hidden`, `parameter_type`.
65
+
66
+ **`min`/`max` on a `data` input are rejected** (dropped from the authoring schema in Galaxy 26.1).
67
+ They only ever meant the min/max *number of selected datasets* for a `multiple` input, and the
68
+ runtime rejects them on a single one. Authors reached for `min: 1` to mean "required" -- but a
69
+ `data` input is already required (add `optional: true` to make it *not* required). Use `multiple:
70
+ true` to accept a list; never add `min`/`max` to a data input. (`min`/`max` stay valid on
71
+ `integer`/`float`, where they bound the numeric value.)
72
+
73
+ ## Output types
74
+
75
+ Every output has `name` and `type`. **A dataset output must declare `from_work_dir` OR
76
+ `discover_datasets`; a collection output must declare `discover_datasets`.** Omitting both is the
77
+ `dynamic_tool.output_unclaimed` error.
78
+
79
+ **Dataset output** (`type: data`):
80
+
81
+ | Field | Notes |
82
+ |-------|-------|
83
+ | `from_work_dir` | Relative path to the file your command wrote, e.g. `out.vcf`. |
84
+ | `format` | Datatype, e.g. `vcf`, `tabular`, `bam`. |
85
+ | `format_source` | Copy the format from a named input instead of hardcoding. |
86
+ | `metadata_source` | Copy metadata from a named input. |
87
+ | `label` | History display name. |
88
+ | `discover_datasets` | Alternative to `from_work_dir` for pattern-matched files. |
89
+
90
+ **Collection output** (`type: collection`): `collection_type` (`list`, `paired`, ...) plus
91
+ `discover_datasets` (required). Discovery is either a `pattern` or `tool_provided_metadata`. On
92
+ Galaxy 26.1+ every discovery field except the pattern has a sensible default, so a minimal entry
93
+ validates -- you only supply `pattern`:
94
+
95
+ ```yaml
96
+ outputs:
97
+ - name: parts
98
+ type: collection
99
+ collection_type: list
100
+ discover_datasets:
101
+ - pattern: 'part_(?P<designation>.+)\.txt' # named groups: designation, ext, dbkey
102
+ ```
103
+
104
+ Add a field only to override its default. The ones you'll actually reach for: `directory` (search
105
+ a subdir instead of the job root), `format`, `visible`, `recurse`, `sort_key` (`filename` | `name` |
106
+ `designation` | `dbkey`), `sort_comp` (`lexical` | `numeric`). That's the common subset, not the
107
+ full list -- `discover_via`, `match_relative_path`, `assign_primary_output` and `sort_reverse` are
108
+ also accepted; consult the model for the rest. The descriptor is `extra="forbid"`, so a mistyped key
109
+ (`patern`) or an XML-only one (`sort_by`, `dbkey`) is rejected, not silently ignored.
110
+
111
+ > **Server-version note.** The minimal one-field form needs Galaxy 26.1+; older servers required
112
+ > every field spelled out. To stay compatible with an older Galaxy, write the fully-specified form
113
+ > -- `discover_via: pattern` plus `directory`, `format`, `visible`, `recurse`,
114
+ > `match_relative_path`, `assign_primary_output`, `sort_key`, `sort_comp` alongside `pattern` --
115
+ > which still validates everywhere.
116
+
117
+ **Only `data` and `collection` outputs are usable.** They capture files into the history -- write
118
+ your result to a file and claim it. The scalar output types (`text`/`integer`/`float`/`boolean`) do
119
+ exist in the authoring model, and on 26.1 a named one validates without `hidden`, so `validate.py`
120
+ will pass a tool that declares one. It still won't *run*: the YAML tool parser accepts only `data`
121
+ and `collection` and raises `Unknown output_type [integer] encountered` on anything else. A clean
122
+ validation is not a green light here -- use `data` or `collection`.
123
+
124
+ ## Requirements
125
+
126
+ Prefer the top-level `container:` field for the image -- it is required, and a `requirements:` entry
127
+ of `type: container` does **not** satisfy it. The `requirements` list is for:
128
+
129
+ ```yaml
130
+ requirements:
131
+ - type: resource # request cores/ram; exposes $GALAXY_SLOTS at runtime
132
+ cores_min: 4
133
+ - type: javascript # helper functions usable inside $(...)
134
+ expression_lib:
135
+ - |
136
+ function basename(p) { return p.split('/').pop(); }
137
+ ```
138
+
139
+ `resource` supports `cores_min`/`cores_max`, `ram_min`/`ram_max`, `tmpdir_*`, GPU fields, and
140
+ `timelimit`. A `container` requirement also exists but the top-level `container` field is the
141
+ idiomatic choice.
142
+
143
+ ## The four semantic validators (stable error codes)
144
+
145
+ Beyond type/shape checks, `UserToolSource` runs these. Error `code`s are stable across releases:
146
+
147
+ | Code | Rule |
148
+ |------|------|
149
+ | `dynamic_tool.blank_string` | `name` and `version` must not be empty/whitespace. |
150
+ | `dynamic_tool.blank_container` | `container` must not be empty/whitespace. |
151
+ | `dynamic_tool.undeclared_input_ref` | Every `inputs.X` referenced in `shell_command` or a configfile must be a declared input. References resolve against the **top-level** name (a conditional's `inputs.cond.test_parameter` resolves via `cond`). |
152
+ | `dynamic_tool.output_unclaimed` | Each dataset output needs `from_work_dir` or `discover_datasets`; each collection output needs `discover_datasets`. |
153
+
154
+ `id` violations surface as Pydantic's `string_pattern_mismatch`; a too-short `name` as
155
+ `string_too_short`.
@@ -0,0 +1,196 @@
1
+ # Templating: `$(...)` ECMAScript, not Cheetah
2
+
3
+ UDT commands and config files interpolate parameters with **sandboxed ECMAScript (JavaScript)
4
+ expressions inside `$(...)`**. This is the single biggest difference from classic XML tools, which
5
+ use Cheetah (`$param`, `#for#`, `#if#`). None of the Cheetah syntax works here.
6
+
7
+ The sandbox has **no access to the database, filesystem, or network** -- only the `inputs` object
8
+ and any helpers you add via a `javascript` requirement's `expression_lib`.
9
+
10
+ ## Referencing inputs
11
+
12
+ | You want | Write |
13
+ |----------|-------|
14
+ | A scalar value (integer/float/text/boolean/select) | `$(inputs.count)` |
15
+ | A single data file's path | `$(inputs.reads.path)` |
16
+ | Multiple data files' paths, space-joined | `$(inputs.datasets.map(d => d.path).join(' '))` |
17
+ | A boolean turned into a flag | `$(inputs.trim ? '--trim' : '')` |
18
+ | A select value chosen into an option | `$(inputs.mode === 'fast' ? '-x' : '-y')` |
19
+
20
+ A `data` input is an **object** (a CWL-style File object, not a bare path string) -- you almost
21
+ always want `.path`. A `multiple: true` data input is an **array** of those objects; map over it.
22
+
23
+ ```yaml
24
+ shell_command: |
25
+ cat $(inputs.datasets.map((input) => input.path).join(' ')) > output.txt
26
+ ```
27
+
28
+ ## Quoting: scalar values are not auto-quoted
29
+
30
+ Galaxy substitutes `$(...)` expressions into `shell_command` as **raw text** -- unlike `base_command`
31
+ arguments, they are *not* run through `shlex.quote`. So a `text` or `select` value containing a
32
+ space, quote, `$`, or other shell metacharacter will break or alter the command (it is also an
33
+ injection vector if the value is attacker-controlled).
34
+
35
+ - **Quote interpolations defensively:** `'$(inputs.reads.path)'`, `'$(inputs.label)'`.
36
+ - **For free-form text you don't control, prefer a configfile** -- write the value into a JSON file
37
+ and read it in the command, rather than inlining it (see Config files below).
38
+ - **`select` inputs with a fixed option list, and numeric `integer`/`float`, are safe to inline** --
39
+ their values can't contain surprises.
40
+ - Data `.path` values are Galaxy-generated and normally clean, but quoting them costs nothing.
41
+
42
+ ## Job resources: `$GALAXY_SLOTS` (a shell variable, not an expression)
43
+
44
+ The number of CPU cores allocated to the job is exposed as the **shell environment variable**
45
+ `$GALAXY_SLOTS` (and memory as `$GALAXY_MEMORY_MB`). Because it has no parentheses, it is **not** a
46
+ `$(...)` expression -- it passes through to the shell and expands at runtime. Request cores with a
47
+ `resource` requirement:
48
+
49
+ ```yaml
50
+ requirements:
51
+ - type: resource
52
+ cores_min: 4
53
+ shell_command: |
54
+ seqkit stats --threads $GALAXY_SLOTS '$(inputs.reads.path)' > stats.tsv
55
+ ```
56
+
57
+ Use `$GALAXY_SLOTS` for "however many cores the job got" -- this is usually what a user means by
58
+ "number of threads." Expose an `integer` input only when the user needs explicit manual control.
59
+
60
+ **Pass it as the flag's value -- recording it is not using it.** The parallelism flag's argument
61
+ must *be* `$GALAXY_SLOTS` (`--threads $GALAXY_SLOTS`, `-@ $GALAXY_SLOTS`, `-p $GALAXY_SLOTS`).
62
+ Echoing it to a log, or storing it in a variable you never pass through, does nothing for
63
+ parallelism -- a command that prints `$GALAXY_SLOTS` "for debugging" but still runs `--threads 8`
64
+ is hardcoded and ignores the real allocation. Wiring it through and logging it are independent: do
65
+ the first; the second is optional.
66
+
67
+ ```yaml
68
+ # WRONG -- "aware" of the allocation, but the flag is still hardcoded
69
+ shell_command: |
70
+ echo "cores: $GALAXY_SLOTS" # recorded...
71
+ samtools sort -@ 8 -o out.bam in.bam # ...but ignored -- only 8 threads regardless
72
+
73
+ # RIGHT -- the flag's value IS the allocation
74
+ shell_command: |
75
+ samtools sort -@ $GALAXY_SLOTS -o out.bam in.bam
76
+ ```
77
+
78
+ ## Escaping: literal shell `$(...)` must be `\$(...)`
79
+
80
+ Galaxy intercepts `$(...)` as a JavaScript expression. If you need a **literal shell command
81
+ substitution** in your command, escape it so Galaxy passes it through:
82
+
83
+ ```yaml
84
+ shell_command: |
85
+ echo "Run on \$(date)" > log.txt # \$(date) -> shell runs `date`
86
+ echo "$(inputs.message)" >> log.txt # $(inputs.message) -> Galaxy expands the input
87
+ ```
88
+
89
+ A plain shell variable like `$GALAXY_SLOTS`, `$HOME`, or `$PWD` (no parentheses) needs **no**
90
+ escaping -- only the parenthesized `$(...)` form collides with the expression syntax.
91
+
92
+ ## Helper functions via `expression_lib`
93
+
94
+ For logic too awkward to inline, add ECMAScript 5.1 functions in a `javascript` requirement and
95
+ call them inside `$(...)`:
96
+
97
+ ```yaml
98
+ requirements:
99
+ - type: javascript
100
+ expression_lib:
101
+ - |
102
+ function pick(cond, a, b) { return cond ? a : b; }
103
+ shell_command: |
104
+ tool $(pick(inputs.fast, '--fast', '--accurate')) '$(inputs.reads.path)' > out.txt
105
+ ```
106
+
107
+ `expression_lib` and the `javascript` requirement are accepted by the UDT schema and wired up at
108
+ runtime, but they aren't covered by the official UDT docs -- confirm on your target server before
109
+ relying on them.
110
+
111
+ ## Running a script
112
+
113
+ You have three ways to run script logic. Pick one and complete it fully -- a `shell_command` that
114
+ *names* a script file with nothing that creates it is the most common broken-but-lint-clean tool
115
+ (the file won't exist at runtime, and lint can't catch it).
116
+
117
+ **1. One-liner: inline it with `python -c` / `Rscript -e`.** Self-contained, nothing else to
118
+ declare; reference inputs directly:
119
+
120
+ ```yaml
121
+ container: quay.io/biocontainers/pandas:2.1.1
122
+ shell_command: >-
123
+ python -c "import pandas as pd; d = pd.read_csv('$(inputs.table.path)', sep='\t');
124
+ d.describe().to_csv('summary.tsv', sep='\t')"
125
+ ```
126
+
127
+ **2. A few lines: embed it with a quoted heredoc.** Reference inputs with `$(inputs.x)` inside.
128
+ Galaxy expands the `$(...)` expressions **before** the shell runs, so a quoted heredoc (`<<'PY'`)
129
+ is correct -- it stops the shell from re-expanding things, while Galaxy has already substituted the
130
+ inputs:
131
+
132
+ ```yaml
133
+ container: python:3.11-slim # an inline Python script needs only a base Python image
134
+ shell_command: |
135
+ python <<'PY'
136
+ import csv
137
+ table = '$(inputs.table.path)' # Galaxy substitutes the path before the shell sees this
138
+ column = '$(inputs.column)'
139
+ with open(table) as fh:
140
+ rows = list(csv.DictReader(fh, delimiter='\t'))
141
+ with open('out.txt', 'w') as out:
142
+ out.write(str(len(rows)))
143
+ PY
144
+ inputs:
145
+ - { name: table, type: data }
146
+ - { name: column, type: text }
147
+ outputs:
148
+ - { name: out, type: data, format: txt, from_work_dir: out.txt }
149
+ ```
150
+
151
+ Two reminders inside a heredoc: Galaxy still scans the whole `shell_command` for `$(inputs.X)`
152
+ references (so they count toward `dynamic_tool.undeclared_input_ref`), and a **literal** shell
153
+ command substitution like `$(date)` must still be escaped as `\$(date)`.
154
+
155
+ ## Config files
156
+
157
+ `configfiles` content uses the same `$(...)` rules and is written to disk before the command runs:
158
+
159
+ ```yaml
160
+ configfiles:
161
+ - name: params
162
+ filename: params.json
163
+ content: |
164
+ {"min_depth": $(inputs.min_dp), "input": "$(inputs.vcf.path)"}
165
+ eval_engine: ecmascript
166
+ shell_command: |
167
+ mytool --config params.json > out.txt
168
+ ```
169
+
170
+ Input references inside a configfile count toward `dynamic_tool.undeclared_input_ref`, same as in
171
+ `shell_command`.
172
+
173
+ **3. Longer script: put it in a `configfiles` entry and run that file by name.** The file is
174
+ materialized in the working directory at `filename`, so `shell_command` runs it by that name:
175
+
176
+ ```yaml
177
+ configfiles:
178
+ - filename: script.py
179
+ content: |
180
+ import pandas as pd
181
+ df = pd.read_csv("$(inputs.table.path)", sep="\t")
182
+ df.describe().to_csv("summary.tsv", sep="\t")
183
+ shell_command: python script.py
184
+ ```
185
+
186
+ > **CRITICAL:** if `shell_command` runs a script by name (`python script.py`), you **must** include
187
+ > a `configfiles` entry whose `filename` is exactly that name. `python script.py` with no configfile
188
+ > that creates it is broken -- the file won't exist at runtime, and neither lint nor `create_user_tool`
189
+ > will catch it. If you don't want a configfile, inline the script with `python -c` (option 1) instead.
190
+
191
+ **Don't interpolate a free-text input straight into script *source*.** Inlining `$(inputs.name)`
192
+ into Python/R code (heredoc or configfile) has the same problem as inlining it into `shell_command`:
193
+ a quote, backslash, or newline in a `text`/`select` value breaks the script or injects code. Data
194
+ `.path` values are Galaxy-generated and safe to inline; user-controlled text is not. For text, write
195
+ it to a JSON configfile with `$(JSON.stringify(inputs.name))` (which safely encodes any string) and
196
+ read it back as data in the script -- see `examples/08-configfile-script.yml`.
@@ -0,0 +1,109 @@
1
+ #!/usr/bin/env python3
2
+ """Validate and lint a Galaxy User-Defined Tool (UDT) offline.
3
+
4
+ Runs the same checks Galaxy runs on the server -- the ``UserToolSource`` schema
5
+ (structure + the four semantic validators) and ``lint_user_tool_source`` -- without
6
+ needing a live Galaxy. Use it as a fast pre-submit gate before create_user_tool.
7
+
8
+ Requirements:
9
+ pip install 'galaxy-tool-util>=26.1' pyyaml # 26.1+ for --check-container
10
+
11
+ Usage:
12
+ python validate.py my-tool.yml
13
+ python validate.py - # read YAML/JSON from stdin
14
+ python validate.py my-tool.yml --check-container # also verify the container tag on quay.io
15
+
16
+ Exit codes:
17
+ 0 valid and lint-clean (and, with --check-container, the image is built or unverifiable)
18
+ 1 schema validation failed
19
+ 2 lint findings, or --check-container found the image is positively absent
20
+ 3 missing dependency or unreadable input
21
+ """
22
+
23
+ import sys
24
+
25
+ try:
26
+ import yaml
27
+ except ImportError:
28
+ print("Missing dependency: pip install pyyaml", file=sys.stderr)
29
+ sys.exit(3)
30
+
31
+ try:
32
+ from galaxy.tool_util_models import UserToolSource, format_validation_errors
33
+ from galaxy.tool_util.lint import lint_user_tool_source
34
+ except ImportError:
35
+ print("Missing dependency: pip install 'galaxy-tool-util>=26.1'", file=sys.stderr)
36
+ sys.exit(3)
37
+
38
+ from pydantic import ValidationError
39
+
40
+
41
+ def _check_container(image):
42
+ """Check whether ``image`` is actually built on quay.io. Returns an exit code.
43
+
44
+ Uses the mulled-recommend helper added in Galaxy 26.1; if the installed
45
+ galaxy-tool-util predates it, say so and don't fail the run.
46
+ """
47
+ try:
48
+ from galaxy.tool_util.deps.mulled.recommend import biocontainer_tag_built
49
+ except ImportError:
50
+ print(
51
+ "--check-container needs a galaxy-tool-util with mulled-recommend (Galaxy 26.1+); "
52
+ "skipping the image check.",
53
+ file=sys.stderr,
54
+ )
55
+ return 0
56
+
57
+ built = biocontainer_tag_built(image)
58
+ if built is True:
59
+ print(f"Container OK: {image} is built on quay.io.")
60
+ return 0
61
+ if built is False:
62
+ print(f"Container MISSING: {image} is not built on quay.io -- the job would fail with 'manifest unknown'.")
63
+ return 2
64
+ print(f"Container UNVERIFIED: could not check {image} (non-biocontainer reference or transient error).")
65
+ return 0
66
+
67
+
68
+ def main(argv):
69
+ args = argv[1:]
70
+ check_container = "--check-container" in args
71
+ args = [a for a in args if a != "--check-container"]
72
+ if len(args) != 1:
73
+ sys.exit(__doc__)
74
+
75
+ source = args[0]
76
+ try:
77
+ if source == "-":
78
+ text = sys.stdin.read()
79
+ else:
80
+ with open(source) as fh:
81
+ text = fh.read()
82
+ except OSError as exc:
83
+ print(f"Cannot read {source}: {exc}", file=sys.stderr)
84
+ return 3
85
+ data = yaml.safe_load(text)
86
+
87
+ try:
88
+ tool = UserToolSource.model_validate(data)
89
+ except ValidationError as exc:
90
+ print("Schema validation FAILED:")
91
+ for bullet in format_validation_errors(exc):
92
+ print(f" - {bullet}")
93
+ return 1
94
+
95
+ findings = lint_user_tool_source(tool)
96
+ if findings:
97
+ print("Lint findings (server create would reject these):")
98
+ for bullet in findings:
99
+ print(f" - {bullet}")
100
+ return 2
101
+
102
+ print(f"OK: '{tool.name}' is valid and lint-clean.")
103
+ if check_container:
104
+ return _check_container(tool.container)
105
+ return 0
106
+
107
+
108
+ if __name__ == "__main__":
109
+ sys.exit(main(sys.argv))
@@ -0,0 +1,71 @@
1
+ # Workflow Reports Skill
2
+
3
+ Claude Code skill for drafting Galaxy workflow report templates for the Workflow Editor's **Report** tab.
4
+
5
+ ## Quick Start
6
+
7
+ **From a `.ga` file** (e.g. IWC workflows):
8
+ 1. Point Claude at the file: *"Write a report for this workflow: `path/to/workflow.ga`"*
9
+ 2. Claude drafts the template and writes it into `report.markdown` in the `.ga` file (with confirmation).
10
+
11
+ **From a live Galaxy instance:**
12
+ 1. Get the workflow JSON: `GET https://<instance>/api/workflows/<id>/download?style=editor`
13
+ 2. Pass it to Claude: *"Create a report template for this workflow: [URL or paste JSON]"*
14
+ 3. Claude drafts the template — paste it into the Workflow Editor's **Report** tab and save.
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ # Personal skills (all projects)
20
+ ln -s /path/to/workflow-reports ~/.claude/skills/workflow-reports
21
+
22
+ # Project skills (shared via git)
23
+ ln -s /path/to/workflow-reports .claude/skills/workflow-reports
24
+ ```
25
+
26
+ ## File Organization
27
+
28
+ | File | Purpose | When to read |
29
+ |------|---------|--------------|
30
+ | `SKILL.md` | Main skill — fetch logic, output selection, report structure, gotchas | **Start here** |
31
+ | `references/directives.md` | Full Galaxy markdown directive reference | Looking up syntax |
32
+ | `examples/histology-staining.md` | Complete worked example with extracted metadata and final template | Understanding expected output |
33
+
34
+ ## Key Concepts
35
+
36
+ - Reports are **templates**, not post-hoc analyses — written before knowing if the run will succeed
37
+ - All directives use **block syntax only** — `${galaxy ...}` inline syntax does not work
38
+ - When using the API, use `/download?style=editor` — the regular API endpoint is missing step labels and workflow outputs
39
+ - `.ga` files contain a `report.markdown` field — this is what the skill writes; the default is a minimal placeholder that should be replaced
40
+
41
+ ## Decision Tree
42
+
43
+ ```
44
+ Do you have the workflow JSON or URL?
45
+ │
46
+ ├─ Yes → Follow SKILL.md steps 1–4
47
+ │
48
+ └─ No → Get it first:
49
+ GET https://<instance>/api/workflows/<id>/download?style=editor
50
+ ```
51
+
52
+ ```
53
+ What outputs does the workflow have?
54
+ │
55
+ ├─ Image outputs → history_dataset_as_image(output="<label>")
56
+ │
57
+ ├─ Tabular outputs → history_dataset_as_table(...) + history_dataset_link(...)
58
+ │
59
+ ├─ No workflow_outputs marked → flag to user, use invocation_outputs() as fallback
60
+ │
61
+ └─ Multiple images at different stages → prefer output closest to final result
62
+ ```
63
+
64
+ ## Common Issues
65
+
66
+ | Problem | Solution |
67
+ |---------|----------|
68
+ | Step labels are null | Skip `job_parameters` for unlabeled steps |
69
+ | No `workflow_outputs` marked | User must star outputs in the Workflow Editor |
70
+ | Key terminal output not marked | Flag it by name — don't silently use an upstream substitute |
71
+ | Report uses `${galaxy ...}` syntax | Replace with block syntax — inline does not work |