@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,283 @@
1
+ /**
2
+ * Bundled skill content.
3
+ *
4
+ * Files under `vendor/skills/` are vendored from `galaxyproject/agentic-plugins`
5
+ * at a pinned commit by `scripts/sync-skills.mjs` and ship inside the package --
6
+ * both the npm CLI (`files: ["extensions/", ...]`) and the Orbit installers
7
+ * (forge's `ORBIT_BUNDLE_FILES` includes `extensions`) pick them up with no
8
+ * packaging change. That is deliberate: the guidance has to be available
9
+ * offline, at a version we reviewed, with no runtime dependency on GitHub.
10
+ *
11
+ * Three kinds of content live here. The galaxy-skills mirror backs the
12
+ * configured repo of the same name: its generated `_catalog.json` is what the
13
+ * system-prompt router renders, and `skills_fetch` reads it from disk. The
14
+ * Foundry casts back nothing configured and never enter the router -- nothing in
15
+ * them is ambient guidance the model needs to know exists up front, so a hint
16
+ * names the exact file at the moment it becomes relevant (see
17
+ * `invocation-failure-hint.ts`). Orbit's staging skills come from `skills/` in
18
+ * this repo rather than from agentic-plugins: skills Orbit needs before they
19
+ * have a permanent home, each naming where it should move. They are routed
20
+ * under the reserved `orbit` repo.
21
+ */
22
+
23
+ import fs from "node:fs";
24
+ import path from "node:path";
25
+ import { fileURLToPath } from "node:url";
26
+ import { isBundledSkillRepo } from "../../shared/orbit-config.js";
27
+ import type { SkillEntry } from "./skills-discovery";
28
+
29
+ /** Reserved repo name for `skills_fetch({ repo: "foundry" })`. */
30
+ export const VENDOR_REPO_NAME = "foundry";
31
+
32
+ /** Reserved repo name for Orbit's staging skills, `skills_fetch({ repo: "orbit" })`. */
33
+ export const STAGING_REPO_NAME = "orbit";
34
+
35
+ /**
36
+ * Names `skills_fetch` answers from the package without any configured repo
37
+ * behind them. A configured repo of the same name still wins, so an explicitly
38
+ * chosen repo is never silently answered from the package.
39
+ */
40
+ const RESERVED_REPOS: ReadonlySet<string> = new Set([VENDOR_REPO_NAME, STAGING_REPO_NAME]);
41
+
42
+ export function isReservedRepo(name: unknown): name is string {
43
+ return typeof name === "string" && RESERVED_REPOS.has(name);
44
+ }
45
+
46
+ export interface VendorManifestEntry {
47
+ target: string;
48
+ plugin: string;
49
+ source: string;
50
+ bytes: number;
51
+ sha256: string;
52
+ why?: string;
53
+ }
54
+
55
+ export interface VendorManifestPlugin {
56
+ plugin: string;
57
+ /** "local" for a plugin synced from this repo; absent for agentic-plugins. */
58
+ source?: "local";
59
+ /** The repo-relative source directory of a local plugin. */
60
+ dir?: string;
61
+ as: string;
62
+ repo?: string;
63
+ /** "catalog" puts this plugin's skills in the prompt router; "never" keeps them out. */
64
+ router: string;
65
+ }
66
+
67
+ export interface VendorManifest {
68
+ repo: string;
69
+ /** Commit, not tag: tags move, and "what did we ship" has to stay answerable. */
70
+ commit: string;
71
+ /** A label for the commit, null while the pin is ahead of the newest tag. */
72
+ tag?: string | null;
73
+ commitDate?: string;
74
+ plugins?: VendorManifestPlugin[];
75
+ files: VendorManifestEntry[];
76
+ }
77
+
78
+ /** Re-exported so brain-side callers do not reach across into shared/ directly. */
79
+ export { isBundledSkillRepo as isBundledRepo };
80
+
81
+ /** The vendored tree handed over by a shell that cannot read the package from disk. */
82
+ export interface VendorSkillsSource {
83
+ /** Parsed `_catalog.json`; filtered here exactly as the file is. */
84
+ catalog: unknown;
85
+ /** Parsed `_manifest.json`; checked here exactly as the file is. */
86
+ manifest: unknown;
87
+ /** Text of one manifest target, or null when the tree has no such file. */
88
+ read(target: string): string | null;
89
+ }
90
+
91
+ let installedSource: VendorSkillsSource | null = null;
92
+
93
+ export function setVendorSkillsSource(next: VendorSkillsSource | null): void {
94
+ installedSource = next;
95
+ }
96
+
97
+ function catalogFrom(data: unknown): Record<string, SkillEntry[]> | null {
98
+ if (!data || typeof data !== "object") return null;
99
+ const out: Record<string, SkillEntry[]> = {};
100
+ for (const [key, value] of Object.entries(data)) {
101
+ // The file's own $comment.
102
+ if (key.startsWith("$")) continue;
103
+ if (Array.isArray(value)) out[key] = value as SkillEntry[];
104
+ }
105
+ return out;
106
+ }
107
+
108
+ /** The generated router catalog, keyed by configured repo name. */
109
+ export function readBundledCatalog(): Record<string, SkillEntry[]> | null {
110
+ if (installedSource) return catalogFrom(installedSource.catalog);
111
+ try {
112
+ const raw = fs.readFileSync(path.join(vendorSkillsDir(), "_catalog.json"), "utf-8");
113
+ return catalogFrom(JSON.parse(raw));
114
+ } catch {
115
+ return null;
116
+ }
117
+ }
118
+
119
+ /**
120
+ * Whether the manifest says this exact target belongs to the plugin backing
121
+ * `repoName`. Ownership, not a path prefix: two plugins can share a prefix, and
122
+ * one of them writes at the root. Reading is scoped by it so a repo answers for
123
+ * its own files and nothing else -- the same path has to mean the same thing
124
+ * whether the repo is read from the package or fetched from GitHub, and a path
125
+ * that 404s live must not quietly resolve here.
126
+ */
127
+ function ownedTargets(repoName: string): string[] {
128
+ const manifest = readVendorManifest();
129
+ const plugin = manifest?.plugins?.find((p) => p.repo === repoName)?.plugin;
130
+ if (!plugin) return [];
131
+ return (manifest?.files ?? []).filter((f) => f.plugin === plugin).map((f) => f.target);
132
+ }
133
+
134
+ /**
135
+ * Read one file for a bundled repo. Never touches the network, so a miss lists
136
+ * that repo's own skills rather than every file in the package.
137
+ */
138
+ export function readBundledRepoFile(repo: { name: string }, rawPath: string): VendorReadResult {
139
+ const owned = ownedTargets(repo.name);
140
+ // What to offer on a miss. A repo in the router has a catalog and its skills
141
+ // are the useful answer; a repo that is deliberately out of the router has
142
+ // none, and offering nothing is how the reserved reference set used to
143
+ // dead-end on the relative paths its own SKILL.md prints.
144
+ const catalog = (readBundledCatalog()?.[repo.name] ?? []).map((s) => s.path);
145
+ const available = catalog.length ? catalog : summarise(owned);
146
+ const clean = (typeof rawPath === "string" ? rawPath : "")
147
+ .replace(/^\/+/, "")
148
+ .replace(/\\/g, "/");
149
+ const target = LEGACY_FLAT_PATHS[clean] ?? clean;
150
+ if (!owned.includes(target)) {
151
+ return { ok: false, error: `No file "${rawPath}" in ${repo.name}`, available };
152
+ }
153
+ const res = readVendoredSkill(target);
154
+ return res.ok ? res : { ...res, available };
155
+ }
156
+
157
+ /**
158
+ * Every entry point, plus a count of what sits under each. Printing 149 paths
159
+ * at a model that mistyped one is not help; the SKILL.md files are where it
160
+ * should start, and the count tells it the references exist.
161
+ */
162
+ function summarise(targets: string[]): string[] {
163
+ const entries = targets.filter((t) => t.endsWith("SKILL.md")).sort();
164
+ const rest = targets.length - entries.length;
165
+ return rest > 0 ? [...entries, `(and ${rest} reference files alongside these)`] : entries;
166
+ }
167
+
168
+ /** True when the package actually holds any content for this repo name. */
169
+ export function hasBundledContent(repoName: string): boolean {
170
+ return ownedTargets(repoName).length > 0;
171
+ }
172
+
173
+ /** Absolute path to the vendored skills directory (sibling of this module). */
174
+ export function vendorSkillsDir(): string {
175
+ return path.join(path.dirname(fileURLToPath(import.meta.url)), "vendor", "skills");
176
+ }
177
+
178
+ /**
179
+ * Resolve a vendored file path to an absolute path inside the vendor dir, or
180
+ * null if it escapes. A leading slash is stripped and a backslash is read as a
181
+ * separator, the way the GitHub path does it; a literal `..` anywhere is
182
+ * rejected outright rather than resolved, so percent-encoded traversal never
183
+ * gets a chance to become one.
184
+ */
185
+ export function resolveVendorPath(rawPath: string): string | null {
186
+ const clean = rawPath.replace(/^\/+/, "").replace(/\\/g, "/");
187
+ if (!clean || clean.includes("..")) return null;
188
+ const dir = vendorSkillsDir();
189
+ const abs = path.resolve(dir, clean);
190
+ // path.resolve collapses traversal; confirm the result is still contained.
191
+ // The trailing separator stops `/vendor/skillsX` from passing as `/vendor/skills`.
192
+ if (abs !== dir && !abs.startsWith(dir + path.sep)) return null;
193
+ return abs;
194
+ }
195
+
196
+ function manifestFrom(data: unknown): VendorManifest | null {
197
+ if (!data || typeof data !== "object" || !Array.isArray((data as VendorManifest).files)) {
198
+ return null;
199
+ }
200
+ return data as VendorManifest;
201
+ }
202
+
203
+ let warnedSourceManifest = false;
204
+
205
+ export function readVendorManifest(): VendorManifest | null {
206
+ if (installedSource) {
207
+ const manifest = manifestFrom(installedSource.manifest);
208
+ // Without the manifest no repo has bundled content and skills_fetch goes to
209
+ // the network instead; a half-built source should say so once, not hide.
210
+ if (!manifest && !warnedSourceManifest) {
211
+ warnedSourceManifest = true;
212
+ console.warn("[skills] the vendor skills source has no manifest; bundled skills are off");
213
+ }
214
+ return manifest;
215
+ }
216
+ try {
217
+ const raw = fs.readFileSync(path.join(vendorSkillsDir(), "_manifest.json"), "utf-8");
218
+ return manifestFrom(JSON.parse(raw));
219
+ } catch {
220
+ return null;
221
+ }
222
+ }
223
+
224
+ /**
225
+ * Bare names the vendor tree used before targets mirrored their upstream path.
226
+ * A session resumed across that change still carries them in its transcript --
227
+ * two were named in a failure hint, and the third was listed to the model every
228
+ * time a fetch missed. They keep resolving for one release; delete them once
229
+ * 0.8.0 has shipped.
230
+ *
231
+ * Null prototype on purpose. `path` reaches here straight from the model, and a
232
+ * plain object answers "constructor" with a function, which is not a path.
233
+ */
234
+ const LEGACY_FLAT_PATHS: Record<string, string> = Object.assign(Object.create(null), {
235
+ "galaxy-collection-semantics.yml":
236
+ "debug-galaxy-workflow-output/references/notes/galaxy-collection-semantics.yml",
237
+ "galaxy-tool-job-failure-reference.md":
238
+ "debug-galaxy-workflow-output/references/notes/galaxy-tool-job-failure-reference.md",
239
+ "galaxy-workflow-invocation-failure-reference.md":
240
+ "debug-galaxy-workflow-output/references/notes/galaxy-workflow-invocation-failure-reference.md",
241
+ });
242
+
243
+ export type VendorReadResult =
244
+ { ok: true; text: string } | { ok: false; error: string; available: string[] };
245
+
246
+ /** Read one vendored file. Never touches the network. */
247
+ export function readVendoredSkill(rawPath: string): VendorReadResult {
248
+ const available = () => (readVendorManifest()?.files ?? []).map((f) => f.target);
249
+ if (typeof rawPath !== "string") {
250
+ return { ok: false, error: `Invalid vendored skill path`, available: available() };
251
+ }
252
+ const target = LEGACY_FLAT_PATHS[rawPath] ?? rawPath;
253
+ if (installedSource) {
254
+ // The string-level rules resolveVendorPath applies before it touches the disk.
255
+ const clean = target.replace(/^\/+/, "").replace(/\\/g, "/");
256
+ if (!clean || clean.includes("..")) {
257
+ return {
258
+ ok: false,
259
+ error: `Invalid vendored skill path "${rawPath}"`,
260
+ available: available(),
261
+ };
262
+ }
263
+ const text = installedSource.read(clean);
264
+ return text === null
265
+ ? { ok: false, error: `No vendored file "${rawPath}"`, available: available() }
266
+ : { ok: true, text };
267
+ }
268
+ const abs = resolveVendorPath(target);
269
+ if (!abs) {
270
+ return { ok: false, error: `Invalid vendored skill path "${rawPath}"`, available: available() };
271
+ }
272
+ try {
273
+ // lstat, not stat: the containment check above is about the path string, and
274
+ // a symlink planted in the package would read straight past it. Nothing we
275
+ // vendor is a link, and the sync refuses to write one.
276
+ if (!fs.lstatSync(abs).isFile()) {
277
+ return { ok: false, error: `Not a vendored file "${rawPath}"`, available: available() };
278
+ }
279
+ return { ok: true, text: fs.readFileSync(abs, "utf-8") };
280
+ } catch {
281
+ return { ok: false, error: `No vendored file "${rawPath}"`, available: available() };
282
+ }
283
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * The per-analysis state dir (`<cwd>/.loom/` today, `<cwd>/.orbit/` after the
3
+ * rename). A workspace keeps whichever one it already has -- the conda env
4
+ * under it has hardcoded prefixes and cannot be moved -- so the active name is
5
+ * resolved per workspace, while the exec-guard protects every name in
6
+ * WORKSPACE_STATE_DIR_NAMES no matter which one is active.
7
+ */
8
+ import * as fs from "node:fs";
9
+ import * as path from "node:path";
10
+
11
+ export const ORBIT_STATE_DIR_NAME = ".orbit";
12
+ export const LEGACY_STATE_DIR_NAME = ".loom";
13
+
14
+ export type WorkspaceStateDirName = typeof ORBIT_STATE_DIR_NAME | typeof LEGACY_STATE_DIR_NAME;
15
+
16
+ /** Every spelling the security code treats as Orbit state, in resolution order. */
17
+ export const WORKSPACE_STATE_DIR_NAMES: readonly WorkspaceStateDirName[] = [
18
+ ORBIT_STATE_DIR_NAME,
19
+ LEGACY_STATE_DIR_NAME,
20
+ ];
21
+
22
+ // What a workspace with neither dir gets. Deliberately still `.loom` in the
23
+ // rename release: registry.ts, galaxy-provenance and submission capture
24
+ // hardcode `.loom/...` and persist relative paths, so flipping this alone would
25
+ // split a workspace's state in two. Route those through the resolver first.
26
+ export const NEW_WORKSPACE_STATE_DIR_NAME: WorkspaceStateDirName = LEGACY_STATE_DIR_NAME;
27
+
28
+ function isDir(p: string): boolean {
29
+ try {
30
+ return fs.statSync(p).isDirectory();
31
+ } catch {
32
+ return false;
33
+ }
34
+ }
35
+
36
+ /** `.orbit` if the workspace has one, else `.loom` if it has that, else the default. */
37
+ export function resolveWorkspaceStateDirName(cwd: string): WorkspaceStateDirName {
38
+ for (const name of WORKSPACE_STATE_DIR_NAMES) {
39
+ if (isDir(path.join(cwd, name))) return name;
40
+ }
41
+ return NEW_WORKSPACE_STATE_DIR_NAME;
42
+ }
43
+
44
+ export function resolveWorkspaceStateDir(cwd: string): string {
45
+ return path.join(cwd, resolveWorkspaceStateDirName(cwd));
46
+ }
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Orbit hand-off — terminal-CLI shell glue, deliberately NOT part of the Orbit
3
+ * core.
4
+ *
5
+ * All Orbit-specific knowledge (install paths, bundle layout, the `--cwd`
6
+ * launch protocol, the release URL) lives here so `extensions/orbit/` stays
7
+ * shell-neutral. bin/orbit.js loads this extension alongside the brain; because
8
+ * the same bin/orbit.js also runs as Orbit's embedded brain, the handler no-ops
9
+ * when it's already inside Orbit rather than handing the session off to itself.
10
+ */
11
+
12
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
13
+ import { findOrbit, launchOrbit } from "./orbit-launcher";
14
+ import { isDesktopShell } from "../../shared/orbit-env.js";
15
+
16
+ const RELEASE_URL = "https://github.com/galaxyproject/orbit/releases";
17
+
18
+ export async function handleOrbitHandoff(
19
+ _args: string | undefined,
20
+ ctx: ExtensionContext,
21
+ ): Promise<void> {
22
+ // Already inside Orbit: there's nothing to hand off to, and shutting down
23
+ // here would just tear the embedded session down. No-op with a note.
24
+ if (isDesktopShell()) {
25
+ ctx.ui.notify("You're already in Orbit -- nothing to hand off to.", "info");
26
+ return;
27
+ }
28
+
29
+ const orbitPath = findOrbit();
30
+ if (!orbitPath) {
31
+ ctx.ui.notify(
32
+ `Orbit is not installed. Grab a release for your platform from ${RELEASE_URL}, ` +
33
+ `then run /desktop again. (If Orbit is installed in a non-standard location, ` +
34
+ `set ORBIT_DESKTOP_BIN to the binary path.)`,
35
+ "warning",
36
+ );
37
+ return;
38
+ }
39
+
40
+ try {
41
+ const result = launchOrbit(orbitPath, ctx.cwd);
42
+ // We deliberately do NOT auto-close the CLI. ctx.shutdown() only sets a flag
43
+ // that pi's interactive mode reads at agent_end, so a slash command can't
44
+ // trigger a graceful exit (terminal restore + the session_shutdown lifecycle),
45
+ // and a bare process.exit() would leave the terminal in raw mode. So we launch
46
+ // and ask the user to close the CLI themselves. (Orbit's embedded RPC brain
47
+ // honors shutdown-from-command; the terminal CLI doesn't yet -- once it does,
48
+ // this can move the launch into a session_shutdown handler and exit cleanly.)
49
+ ctx.ui.notify(
50
+ `Orbit is opening on ${ctx.cwd} (pid ${result.pid ?? "?"}). Your work continues there -- ` +
51
+ `press Ctrl-D or type /exit to close this CLI so both don't write the same notebook.`,
52
+ "info",
53
+ );
54
+ } catch (err) {
55
+ ctx.ui.notify(
56
+ `Failed to launch Orbit at ${orbitPath}: ${err instanceof Error ? err.message : String(err)}`,
57
+ "error",
58
+ );
59
+ }
60
+ }
61
+
62
+ export default function orbitHandoffExtension(pi: ExtensionAPI): void {
63
+ pi.registerCommand("desktop", {
64
+ description: "Hand off this session to the Orbit desktop app",
65
+ handler: handleOrbitHandoff,
66
+ });
67
+ // The command was /orbit while the CLI was called Loom. Kept as an alias so
68
+ // muscle memory and old docs keep working; drop it in the sunset release.
69
+ pi.registerCommand("orbit", {
70
+ description: "Alias of /desktop",
71
+ handler: handleOrbitHandoff,
72
+ });
73
+ }
@@ -0,0 +1,142 @@
1
+ import { spawn } from "node:child_process";
2
+ import * as fs from "node:fs";
3
+ import * as os from "node:os";
4
+ import { readEnv } from "../../shared/orbit-env.js";
5
+
6
+ /**
7
+ * Dependencies findOrbit() reads from the environment. Threaded as a
8
+ * parameter so tests can pass a synthetic platform/env/fs without fighting
9
+ * vi.stubGlobal on process (some code paths capture process.platform at
10
+ * module load and never re-read it).
11
+ */
12
+ export interface FindOrbitDeps {
13
+ platform: NodeJS.Platform;
14
+ env: NodeJS.ProcessEnv;
15
+ homedir: string;
16
+ existsSync: (p: string) => boolean;
17
+ /** Optional so synthetic deps default to "every path is its own target". */
18
+ realpathSync?: (p: string) => string;
19
+ }
20
+
21
+ function realDeps(): FindOrbitDeps {
22
+ return {
23
+ platform: process.platform,
24
+ env: process.env,
25
+ homedir: os.homedir(),
26
+ existsSync: fs.existsSync,
27
+ realpathSync: fs.realpathSync,
28
+ };
29
+ }
30
+
31
+ /**
32
+ * True when a candidate resolves to a Node CLI entry point rather than the
33
+ * Electron binary. Once the CLI is published as `orbit`, a global npm install
34
+ * under /usr or /usr/local puts its shim at exactly the path the old desktop
35
+ * .deb used, and spawning that would just start another terminal session.
36
+ */
37
+ export function isNodeCliShim(resolved: string): boolean {
38
+ const p = resolved.replace(/\\/g, "/");
39
+ return (
40
+ /\.(c|m)?js$/i.test(p) ||
41
+ p.includes("/node_modules/.bin/") ||
42
+ p.includes("/node_modules/@galaxyproject/")
43
+ );
44
+ }
45
+
46
+ function acceptable(candidate: string, deps: FindOrbitDeps): boolean {
47
+ if (!deps.existsSync(candidate)) return false;
48
+ let resolved: string;
49
+ try {
50
+ resolved = deps.realpathSync ? deps.realpathSync(candidate) : candidate;
51
+ } catch {
52
+ return false;
53
+ }
54
+ return !isNodeCliShim(resolved);
55
+ }
56
+
57
+ /**
58
+ * Locate an installed Orbit binary on disk.
59
+ *
60
+ * Priority:
61
+ * 1. $ORBIT_DESKTOP_BIN, or its older alias $ORBIT_BIN (escape hatch for
62
+ * non-standard installs / dev builds).
63
+ * 2. Platform-conventional install paths (Applications, /usr/bin, etc.).
64
+ *
65
+ * Any candidate that resolves to a Node CLI shim is skipped -- see isNodeCliShim.
66
+ *
67
+ * Returns the absolute path or null if Orbit isn't installed.
68
+ */
69
+ export function findOrbit(deps: FindOrbitDeps = realDeps()): string | null {
70
+ // readEnv prefers ORBIT_DESKTOP_BIN over the older ORBIT_BIN alias.
71
+ const override = readEnv("DESKTOP_BIN", deps.env);
72
+ if (override) {
73
+ return acceptable(override, deps) ? override : null;
74
+ }
75
+ if (deps.platform === "darwin") {
76
+ // forge.config.ts sets executableName "Orbit" on darwin, which
77
+ // CFBundleExecutable inherits, so the real binary is capital-O. The
78
+ // lowercase pair covers bundles built before that was the case.
79
+ const candidates = [
80
+ "/Applications/Orbit.app/Contents/MacOS/Orbit",
81
+ `${deps.homedir}/Applications/Orbit.app/Contents/MacOS/Orbit`,
82
+ "/Applications/Orbit.app/Contents/MacOS/orbit",
83
+ `${deps.homedir}/Applications/Orbit.app/Contents/MacOS/orbit`,
84
+ ];
85
+ for (const c of candidates) if (acceptable(c, deps)) return c;
86
+ return null;
87
+ }
88
+ if (deps.platform === "linux") {
89
+ // The desktop's Linux executable is moving to `orbit-desktop` so the CLI
90
+ // can own `orbit` on PATH. electron-installer-debian/redhat install the app
91
+ // under /usr/lib/<package name>/ and symlink /usr/bin/<package name> to it,
92
+ // so the lib paths catch a package whose name hasn't changed yet.
93
+ const candidates = [
94
+ `${deps.homedir}/.local/bin/Orbit.AppImage`,
95
+ "/usr/bin/orbit-desktop",
96
+ "/usr/local/bin/orbit-desktop",
97
+ "/usr/lib/orbit-desktop/orbit-desktop",
98
+ "/usr/lib/orbit/orbit-desktop",
99
+ "/usr/bin/orbit",
100
+ "/usr/local/bin/orbit",
101
+ `${deps.homedir}/Applications/Orbit.AppImage`,
102
+ ];
103
+ for (const c of candidates) if (acceptable(c, deps)) return c;
104
+ return null;
105
+ }
106
+ if (deps.platform === "win32") {
107
+ const localAppData = deps.env.LOCALAPPDATA;
108
+ if (!localAppData) return null;
109
+ const candidates = [
110
+ `${localAppData}\\orbit\\Orbit.exe`,
111
+ `${localAppData}\\Programs\\orbit\\Orbit.exe`,
112
+ ];
113
+ for (const c of candidates) if (acceptable(c, deps)) return c;
114
+ return null;
115
+ }
116
+ return null;
117
+ }
118
+
119
+ export interface LaunchResult {
120
+ pid: number | undefined;
121
+ }
122
+
123
+ /**
124
+ * Launch Orbit detached with --cwd <cwd>. Returns immediately. The caller
125
+ * is responsible for the rest of session-shutdown -- launchOrbit does not
126
+ * wait for Orbit to start.
127
+ */
128
+ export function launchOrbit(orbitPath: string, cwd: string): LaunchResult {
129
+ const child = spawn(orbitPath, ["--cwd", cwd], {
130
+ detached: true,
131
+ stdio: "ignore",
132
+ });
133
+ // spawn reports a failed launch (ENOENT, not executable, damaged bundle) via
134
+ // an async 'error' event, not a throw -- and on an unref'd child with no
135
+ // listener that surfaces as an unhandled error. Best-effort note to stderr;
136
+ // by now the CLI is already tearing down, so there's nothing to recover.
137
+ child.on("error", (err) => {
138
+ process.stderr.write(`orbit launch failed: ${err.message}\n`);
139
+ });
140
+ child.unref();
141
+ return { pid: child.pid };
142
+ }
@@ -0,0 +1,98 @@
1
+ /**
2
+ * What's-new notice -- CLI-shell glue, NOT part of the loom brain.
3
+ *
4
+ * On the first session after an upgrade, surfaces the running version's curated
5
+ * highlights (from the shipped CHANGELOG.md) once via ctx.ui.notify, then stamps
6
+ * a sidecar so it shows once per upgrade. Also registers /whatsnew to re-view on
7
+ * demand. No-ops inside Orbit, which owns its own what's-new banner. Lives here,
8
+ * alongside cli-update, so extensions/orbit/ stays shell-neutral.
9
+ */
10
+
11
+ import fs from "node:fs";
12
+ import path from "node:path";
13
+ import { fileURLToPath } from "node:url";
14
+ import type { ExtensionAPI, ExtensionContext } from "@earendil-works/pi-coding-agent";
15
+ // bin/ and shared/ are siblings of extensions/.
16
+ import { getOrbitVersion } from "../../bin/update-check.js";
17
+ import {
18
+ parseChangelog,
19
+ decideWhatsNew,
20
+ selectEntries,
21
+ formatHighlightsText,
22
+ releaseUrlFor,
23
+ } from "../../shared/whats-new.js";
24
+ import { isDesktopShell } from "../../shared/orbit-env.js";
25
+ import { resolveStateDir } from "../../shared/state-dir.js";
26
+
27
+ // This file lives at <pkg>/extensions/whats-new/index.ts, so the package root is two up.
28
+ const PKG_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
29
+ const CHANGELOG_PATH = path.join(PKG_ROOT, "CHANGELOG.md");
30
+ const seenFile = () => path.join(resolveStateDir(), "whats-new-seen.json");
31
+
32
+ function loadEntries() {
33
+ try {
34
+ return parseChangelog(fs.readFileSync(CHANGELOG_PATH, "utf-8"));
35
+ } catch {
36
+ return [];
37
+ }
38
+ }
39
+
40
+ function readSeen(): string | undefined {
41
+ try {
42
+ const parsed = JSON.parse(fs.readFileSync(seenFile(), "utf-8"));
43
+ return typeof parsed?.version === "string" ? parsed.version : undefined;
44
+ } catch {
45
+ return undefined;
46
+ }
47
+ }
48
+
49
+ function writeSeen(version: string): void {
50
+ try {
51
+ const file = seenFile();
52
+ fs.mkdirSync(path.dirname(file), { recursive: true });
53
+ fs.writeFileSync(file, JSON.stringify({ version }));
54
+ } catch {}
55
+ }
56
+
57
+ export default function whatsNewExtension(pi: ExtensionAPI): void {
58
+ let shown = false;
59
+ pi.on("before_agent_start", async (_event, ctx: ExtensionContext) => {
60
+ if (shown) return;
61
+ shown = true;
62
+ // Orbit owns its own what's-new banner for the embedded brain.
63
+ if (isDesktopShell()) return;
64
+ try {
65
+ const running = getOrbitVersion();
66
+ const decision = decideWhatsNew(loadEntries(), readSeen(), running, "latest");
67
+ if (decision.entries.length) {
68
+ const body = formatHighlightsText(decision.entries);
69
+ ctx.ui.notify(`${body}\n Full notes: /whatsnew or ${releaseUrlFor(running)}`, "info");
70
+ }
71
+ // Stamp even with no entries: silently advances the sidecar for versions
72
+ // without Highlights so we don't re-check on every later launch.
73
+ if (decision.stamp) writeSeen(decision.stamp);
74
+ } catch {
75
+ // A notice must never break a session.
76
+ }
77
+ });
78
+
79
+ pi.registerCommand("whatsnew", {
80
+ description: "Show what's new in this version of loom",
81
+ handler: async (_args: string | undefined, ctx: ExtensionContext) => {
82
+ try {
83
+ const running = getOrbitVersion();
84
+ const entries = selectEntries(loadEntries(), undefined, running, "latest");
85
+ if (entries.length) {
86
+ ctx.ui.notify(
87
+ `${formatHighlightsText(entries)}\n Full notes: ${releaseUrlFor(running)}`,
88
+ "info",
89
+ );
90
+ } else {
91
+ ctx.ui.notify(`No what's-new notes for loom ${running}.`, "info");
92
+ }
93
+ } catch {
94
+ ctx.ui.notify("Could not load what's-new notes.", "warning");
95
+ }
96
+ },
97
+ });
98
+ }
@@ -0,0 +1,17 @@
1
+ Creative Commons Attribution 4.0 International (CC BY 4.0)
2
+
3
+ The lesson corpus in this directory -- every <namespace>/<slug>.md file and the
4
+ snapshot.json built from them -- is licensed under the Creative Commons
5
+ Attribution 4.0 International License. The rest of the Orbit repository is MIT;
6
+ this directory is the exception, so that any project can reuse the lessons with
7
+ attribution and nothing more.
8
+
9
+ SPDX-License-Identifier: CC-BY-4.0
10
+ Full legal code: https://creativecommons.org/licenses/by/4.0/legalcode
11
+ Plain-language summary: https://creativecommons.org/licenses/by/4.0/
12
+
13
+ Attribute as: "Orbit lesson bank, galaxyproject/orbit, CC BY 4.0", with a link to
14
+ the lesson's page or to the repository.
15
+
16
+ validate.mjs and build-snapshot.mjs in this directory are code, not corpus, and
17
+ stay under the repository's MIT licence.