Rich tool state support, bidirectional conversion, and upstream @galaxy-tool-util integration#85
Conversation
Replace webpack+ts-loader with tsup across client and both language servers. Source tsconfigs updated to module:ESNext/moduleResolution:bundler; jest configs override back to commonjs for test execution. Add inline YAML esbuild plugin and @schemas alias for format2 server. Fix type-only exports in schema/index.ts (SchemaNode, SchemaNodeResolver are interfaces). Closes davelopez#84 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Old version incompatible with current VS Code Insiders ESM layout, 404s on all web assets. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace jest+ts-jest CJS workaround stack with native ESM test runner: - Add vitest 4.1.2 + unplugin-swc (decorator metadata support for inversify) - server/vitest.config.ts: SWC transform, globals, @schemas alias, reflect-metadata setup - server/package.json: test → vitest run - Remove execSync subprocess hacks in nativeSchemaLoader + jsonSchemaLoader tests; import @galaxy-tool-util/schema directly now that the test env is ESM - server/jest.config.js: reduced to stub comment (vitest handles tests) - root jest.config.js: add testPathIgnorePatterns to exclude server/ - server-common: remove @types/jest, replace with vitest/globals in tsconfig types Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove GalaxyWorkflowFormat2SchemaLoader, versions.ts, v19.09 YAML Salad schema files, and committed galaxyWorkflow.schema.json fixture - Wire JsonSchemaGalaxyWorkflowLoader unconditionally; drop GXWF_USE_JSON_SCHEMA flag - Switch @galaxy-tool-util/schema dep from local file: path to ^0.2.0 (published) - Tests generate schema at runtime via execSync (avoids ESM/CJS boundary) - Fix schemaValidationService: early return for canBeAny fields, null-on-required non-array check, canBeArray routing for object/scalar/map forms - Fix jsonSchemaLoader: add jsonldPredicate to inputs/outputs/steps/in fields, StepPosition top/left int->float - New schema adds pick_value step type and when field vs stale v19.09 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add @galaxy-tool-util/schema + effect deps to gx-workflow-ls-native - Add src/schema/jsonSchemaLoader.ts: lazy-loads NativeGalaxyWorkflowSchema via require() + effect.JSONSchema.make(); strips "class" from required (format2 artifact absent from .ga files); injects schema id - Update languageService.ts: drop static JSON import, use JsonSchemaNativeWorkflowLoader - Add tests/integration/nativeSchemaLoader.test.ts (6 tests, execSync pattern) - Delete workflow-languages/schemas/native.schema.json (343 lines) - Remove now-unused @schemas/* tsconfig path alias 253 tests passing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add ToolRegistryService DI wrapper, settings, LSP handlers, populate command, and status bar. Note: this implementation duplicates cache logic from upstream and uses a workaround ToolRegistryServiceImpl; intended to be replaced by Try 2 (rebase onto ESM branch + thin wrapper around ToolInfoService from @galaxy-tool-util/core). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace 190-line custom cache implementation with ~60-line wrapper around @galaxy-tool-util/core ToolInfoService: - Delete ParsedToolJson, CachedToolEntry, CachedToolInfo, ToolParameterJson, ToolOutputJson mirror types from languageTypes.ts - toolRegistry.ts now delegates entirely to upstream cache/fetch logic - Add @galaxy-tool-util/core dependency to server-common - Update jest.config.js to transform @galaxy-tool-util/* packages (moduleNameMapper + transformIgnorePatterns) so ESM source can be used in CJS Jest tests - Rewrite toolRegistry.test.ts for upstream cache format (snake_case keys) 261 tests passing (was 217 before; new tests added). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace jest+ts-jest CJS workaround stack with native ESM test runner: - Add vitest 4.1.2 + unplugin-swc (decorator metadata support for inversify) - server/vitest.config.ts: SWC transform, globals, @schemas alias, reflect-metadata setup - server/package.json: test → vitest run - Remove execSync subprocess hacks in nativeSchemaLoader + jsonSchemaLoader tests; import @galaxy-tool-util/schema directly now that the test env is ESM - server/jest.config.js: reduced to stub comment (vitest handles tests) - root jest.config.js: add testPathIgnorePatterns to exclude server/ - server-common: remove @types/jest, replace with vitest/globals in tsconfig types Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add getToolParameters() to ToolRegistryService (cache-only, no network) - ToolStateCompletionService: detects state blocks in YAML path, navigates tool parameter tree (sections, repeats, conditionals), generates property name and value (select/boolean) completion items - GxFormat2CompletionService: inject optional ToolRegistryService, delegate to ToolStateCompletionService when cursor is inside state/tool_state - GxFormat2WorkflowLanguageServiceImpl: inject ToolRegistryService via DI - Fix remaining execSync subprocess hacks in completion.test.ts and validation.test.ts (replace with direct ESM imports) - 9 new tests covering: name completions, prefix filtering, exclusion of existing keys, select/boolean value completions, section navigation, uncached tool → empty, insertText format Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove dead _DEBUG_printNodeName function + unused ASTNode import - Add parameter type detail field to name completion items (gx_integer → integer) - Add tests for: tool_state key, repeat navigation, conditional navigation, detail type field Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extract shared types/guards/AST helpers to toolStateTypes.ts - ToolStateValidationService: validates state blocks against cached tool params; unknown params (Warning), invalid select values (Error), tool not cached (Information); recurses into sections, repeats, conditionals - GxFormat2HoverService: optional ToolRegistryService; when hovering over param inside state, shows name/type/label/help/options hover markdown - GxFormat2WorkflowLanguageServiceImpl: wire ToolStateValidationService in doValidation(); pass ToolRegistryService to hover service - 14 new tests: validation (unknown param, select error, section, multi-step, uncached info), hover (name/type, select options, boolean hint, help text) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace local duplicate type definitions (ToolParam hierarchy, type guards) with re-exports from the upstream package. Local types were incomplete (ConditionalParam was missing discriminator/is_default_when on whens). Keeps only extension-specific items locally: - isSelectParam (covers gx_select + gx_genomebuild with flat LabelValue options) - isHidden (adapter for optional hidden field on container types) - getStringPropertyFromStep (YAML AST navigation, not upstreamable) Updates symlink: node_modules/@galaxy-tool-util/schema now points to vs_code_branch worktree (commit 6fb2ffe) instead of report_models. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… upstream
toolStateTypes.ts:
- Add ToolParamBase local interface (was missing, fixing latent import error)
- Add getObjectNodeFromStep (navigate AST to object value node)
- Add yamlObjectNodeToRecord (YAML ObjectASTNode → Record<string, unknown>)
toolStateCompletionService.ts:
- Delete navigateParams (~100 lines, incl. NavResult interface)
- Import findParamAtPath from @galaxy-tool-util/schema
- Build stateDict from YAML AST; pass to findParamAtPath for branch filtering
- Container-param-at-path special case: show children (section/repeat direct,
conditional via findParamAtPath with empty-string sentinel for branch filter)
hoverService.ts:
- Delete local findParamAtPath (~20 lines)
- Import findParamAtPath from @galaxy-tool-util/schema
- Build stateDict from YAML AST; pass to findParamAtPath for branch filtering
Tests (+4):
- toolStateCompletion: split "suggests all branch params" into 3 cases
(no discriminator set, fast selected, sensitive selected)
- toolStateHover: 2 new conditional hover cases (active + inactive branch)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace recursive AST validateStateNode with validateFormat2StepStateStrict. Add dotPathToYamlRange to map Effect dot-paths to YAML ranges. Post-process: 'is unexpected' → Warning + custom message; union value errors merged into single 'Invalid value ...' Error. A5: +2 conditional branch tests (stale branch warns, active branch clean). Update 'valid param name' fixture from gx_data (never valid in state) to alignment_type (valid select value). 294 tests passing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ridge dotPathToYamlRange: handle numeric array indices (repeat paths like "iterations.0.unknown_field" were falling back to state node range). yamlObjectNodeToRecord: include array items (repeat arrays were omitted; validation now receives full structure. selectWhichWhen ignores arrays so navigation behavior unchanged). Tests: +repeat param fixture + 2 repeat validation tests (unknown param warns, valid param clean). 296 tests passing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New workflowConnectionService.ts: findSourceInPath detects both the
explicit (in: [{source: ...}]) and map-shorthand (in: {key: value})
forms; getAvailableSources collects workflow inputs + upstream step
outputs (YAML order enforced — no forward references).
Wire into completionService.ts with afterColon guard for shorthand form.
8 integration tests in workflowSourceCompletion.test.ts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…olStateTypes Shared helpers for Phase 6 cleaning: - collectStepsWithState(nodeManager) — step-iteration loop (was inline in ToolStateValidationService.doValidation); yields StepStateContext with toolId, toolVersion, toolIdNode, stateKey, stateValueNode, stepNode - dotPathToYamlProperty(stateNode, dotPath) — navigates dot-path through YAML AST, returns PropertyASTNode | null; cleaning will use this to identify which YAML nodes to remove ToolStateValidationService refactored to use both; dotPathToYamlRange now delegates to dotPathToYamlProperty for the common case. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- client/tsup.config.ts: add noExternal: [/^vscode-/] so vscode-languageclient
and vscode-uri are bundled (not assumed present in extension host)
- server tsup configs: add noExternal: [/.*/] + mainFields/conditions so all
server deps (@gxwf/*, @galaxy-tool-util/*, inversify, vscode-languageserver,
effect, etc.) are bundled into the server dist files
- jsonSchemaLoader (native + format2): replace lazy require() of
@galaxy-tool-util/schema and effect with static imports (esbuild handles
ESM->CJS conversion at bundle time; require() blocked ESM resolution)
- schema/index.ts: convert SchemaNodeResolver to type-only import/export
- languageTypes.ts: split requestsDefinitions re-exports into export type {}
for interfaces (no runtime value) vs export {} for values
- inversify.config.ts, documentsCache.ts: import type for interface-only imports
- workflow-tests languageService.ts + service files: import type for
interface-only imports (WorkflowTestsHoverService, CompletionService,
ValidationService, SchemaService, SchemaProvider, SymbolsProvider,
YAMLLanguageService)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ixes - Add process + buffer devDeps to server workspace - Split tsup browser configs to alias process/browser + buffer for browser builds only - Fix ~25 more import type issues (ASTNode variants, ToolRegistryService, YAMLLanguageService, ConfigService, WorkflowDataProvider, etc.) - Fix @galaxy-tool-util/schema symlink to vs_code_branch (has findParamAtPath, validateFormat2StepStateStrict, isBooleanParam etc.) - All 6 server builds (node+browser for native, format2, workflow-tests) now succeed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace AST-based CleanWorkflowService with dict-level cleaning via cleanWorkflow() from @galaxy-tool-util/schema (vs_code_branch tarball). - Add cleanWorkflowText(text) to LanguageService interface; base impl returns text unchanged - Native: JSON.parse → cleanWorkflow() → JSON.stringify; gains bookkeeping key stripping (__page__, chromInfo, etc.) it never had - Format2: YAML.parse → cleanWorkflow() with pre-fetched tool resolver → YAML.stringify; gains tool-aware stale state key removal - CleanWorkflowService drops all AST-walking code (~100 lines removed); CLEAN_WORKFLOW_CONTENTS now detects format from content instead of hardcoding "galaxyworkflow" - Remove cleanableProperties setting (dead code; library handles it) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…expected fixture - Add test_ts_smoke.gxwf.yml fixture (format2 wf with uncached tool + state block) - Add e2e test: uncached tool emits Information diagnostic "not in the local cache" - Fix wf_01_clean.ga to match actual cleanWorkflow() output: position kept, uuid in workflow_outputs kept, tool_state decoded to dict with stale keys removed Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New "Convert to Format2" / "Convert to Native" commands that transform the active workflow document and open the result in a diff editor. Server: - Add CONVERT_WORKFLOW_CONTENTS LSP request + params/result types - Add convertWorkflowText() to LanguageService interface (throwing base default) - Format2 service: YAML.parse → toNativeStateful → JSON.stringify - Native service: inject ToolRegistryService, JSON.parse → toFormat2Stateful → YAML.stringify Both services build a ToolInputsResolver by pre-fetching cached tool params - New ConvertWorkflowService handles the LSP request; errors returned as typed result (not propagated) so client can surface them via showErrorMessage() - Add yaml dependency to gx-workflow-ls-native package.json Client: - New ConvertedWorkflowDocumentProvider (galaxy-converted-workflow: scheme) - ConvertToFormat2Command / ConvertToNativeCommand: send request, set language ID explicitly on the virtual document (custom schemes bypass VSCode's file-extension detection), then open vscode.diff - Error feedback via window.showErrorMessage (follows PopulateToolCacheCommand pattern, not the silent-throw pattern of CleanWorkflowCommand) - Commands registered in commandPalette and editor/context menus with appropriate when/enablement clauses Tests: 26 new cases across 4 new test files (318 server + 43 client all pass) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Promote AST helpers + hover markdown builder to server-common - Promote ToolStateCompletionService + CompletionTextContext to server-common - Format2 services updated to import from server-common (no behavior change) - NativeHoverService: tool_state hover + JSON schema fallback - NativeToolStateCompletionService: thin wrapper over shared service - NativeWorkflowConnectionService: input_connections key/id/output_name completion - Wire all three into NativeWorkflowLanguageServiceImpl - Integration tests for native hover, tool_state completion, connection completion Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds RenderDiagramService + renderDiagram on each language service, dispatching to @galaxy-tool-util/schema workflowToMermaid. Cytoscape case throws pending upstream impl. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds mermaid dep, third tsup target (iife/browser) producing dist/media/diagram/mermaid.global.js, plus html/css template and mermaid.ts entry that listens for postMessage and renders to #root. Panel manager (wired in next commit) will load this bundle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
DiagramPreviewPanelManager owns one WebviewPanel per (uri, format). Renders once on webview ready by sending RENDER_WORKFLOW_DIAGRAM to the language client matching the doc's languageId. Live-update on change is the next commit. Adds command + commandPalette/editor-title contributions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sends RENDER_WORKFLOW_DIAGRAM through the real LSP transport for both .ga and .gxwf.yml fixtures; covers the malformed-input and cytoscape-not-implemented branches. Webview render assertions will land later under a wdio harness (tracked upstream). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Panel manager subscribes onDidChangeTextDocument filtered to its URI and re-renders via a per-key RenderScheduler (extracted as a small testable unit, no vscode dep). onDidCloseTextDocument disposes the panel. 7 jest unit tests cover scheduler behaviour with fake timers. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Renders via RENDER_WORKFLOW_DIAGRAM, picks client by languageId, prompts to overwrite, fires the success toast as fire-and-forget so 'Reveal in Explorer' doesn't block the command. New e2e test covers the format2 path; ordered last in the suite since temp-file teardown disturbs language client state for subsequent tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a feature-table row and a section describing the previewMermaidDiagram + exportMermaid commands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- RenderScheduler: drop unused hooks seam; use setTimeout/clearTimeout directly (Jest fake timers intercept globals). - Panel manager: per-entry renderSeq guards against out-of-order LSP responses overwriting fresher output. - Webview: re-init mermaid + re-render on VS Code theme toggle via MutationObserver on document.body class. - mermaid: move to devDependencies (bundled into IIFE webview by tsup; not needed at extension runtime). - Commands: rename constructor params to nativeClient/format2Client to match InsertToolStepCommand convention; comment the unused this.client on PreviewMermaidDiagramCommand. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Maybe it is time to fully move to Let me know if you need any help with the branch 👍 |
|
Green!! 🎉 Is it ready for review, or is there anything else you want to add before I give it a thorough manual testing? |
davelopez
left a comment
There was a problem hiding this comment.
I've manually tested it a bit more thoroughly, and everything seems to work pretty well with so many cool features!
Thank you so much again for working on all this!
Let's get it merged since it is big enough as it is, and we can refine, clean up, and add even more features until we cut a new release. I can't wait!
|
Thanks for the merge - if I'm being honest I still haven't used it 😭 - the E2E tests let me find and fix and verify bugs but I'm sure the actual user experience needs a lot of fixes. I wasn't going to ask for a merge until I had tried it out 😅 so I really appreciate you actually using. If the using it resulted in paper cuts or clear ideas for next directions - please let me know. I want to continue to polish this and make it as awesome as possible. |
|
Yeah, there are some things that can be further improved and polished, but it was getting pretty big as a PR, so I decided to merge 😅 I was also confident because of all the nice tests, but I just noticed that the tool state functionality (validation, completion, and hover) in the format2 server is not working properly. Looks like it is not detecting the tool correctly from the context (it does work for .ga though), so probably the mocks in the integration tests are bypassing something worth testing. I will create an issue for that. I'm also going to do a quick format/lint pass to eliminate some warnings, etc., in another PR. Oh! Another polishing that we can do is make some of these commands more discoverable through the document context menus and other relevant places. I'm so excited that this opens the path for a LOT of cool features! |
|
I did notice some oddness in the conversion layer - I would expect ga -> gxformat2 to convert tool_state keys to state keys and I don't think it was doing last time I was looking at some outputs. That fix might be enough to get things working but I'll look into it early this week. Thanks for all the cleanup and debugging - I really appreciate your help. |
|
I tried the conversion with very simple workflows, and since I don't know much about them, I thought they were fine 😅 good thing I got you here now! 🎉 I will also work a bit on the typing. I noticed that we don't have a TypeScript check in CI, and there are some type issues currently that can create other potential bugs. The more well-structured and typed, the better for agents (and us). |
(This PR probably isn't ready to go yet but I wanted to open it for sanity checks. I was very relieved that it is a net negative in terms of LOC.)
This PR is the cumulative work on
wf_tool_state: it turns the extension from a primarily structure-validating editor into one that deeply understands Galaxy tool parameters, and moves the heavy-lift logic (schemas, tool parsing, cleaning, conversion, validation) out of this repo and into the upstream@galaxy-tool-utilTypeScript monorepo.The headline changes users will feel are (a) precise diagnostics, completions, and hover for per-step tool state, (b) bidirectional Format2 ↔ Native conversion as first-class commands, and (c) the native
.gaformat catching up to Format2 in editor support.User-facing changes
Tool state is now a first-class editing surface
Galaxy workflow steps carry per-step tool configuration under
tool_state(native.ga) orstate:(Format2.gxwf.yml). Previously the extension mostly ignored the contents. It now:Unknown tool parameter 'X'.) with a range pointing at the offending key. Invalid values are flagged as errors, and for union types the separate "Expected X, actual Y" messages are merged into a singleInvalid value 'Y' for 'X'. Must be one of: A, B, C.error on the value node.state:/tool_stateblocks. Typing a parameter name completes from the tool's actual parameter set; typing after a:completes from the legal values (select options,true/falsefor booleans). Completions are context-sensitive: the visible parameters adapt to the currently-selected conditional branch, and they descend correctly intosection,repeat, andconditionalstructures.state:/tool_stateand you get the parameter's name, type label, label, help text, and the option list for selects.tool_stategracefully. Native workflows exported from Galaxy's API storetool_stateas a JSON string rather than a JSON object. The extension still validates the parsed contents, but marks the whole value with aHint-severity diagnostic carrying a "Clean workflow (convert tool_state to object form)" quick fix so one click converts the file to the object form that enables precise sub-diagnostics, completions, and hover.Workflow cleaning is tool-aware
cleanWorkflow()now delegates to the upstream implementation in@galaxy-tool-util/schema, and the native cleaning path prefetches tool parameters viaToolInputsResolversotool_stateis filtered to only real tool parameters — runtime artifacts are stripped, string-encoded state is decoded, and the result is stable enough to diff cleanly.Bidirectional Format2 ↔ Native conversion
Six new/renamed commands cover the full conversion matrix, wired through
@galaxy-tool-util/schema'stoFormat2Stateful()/toNativeStateful()so tool state survives the round trip:previewConvertToFormat2/previewConvertToNativeexportToFormat2/exportToNative.gxwf.yml/.gafile next to the originalconvertFileToFormat2/convertFileToNativeErrors (bad input, write failures) surface as
showErrorMessage()toasts rather than thrown exceptions.Tool cache and resolution
Populate Tool Cachecommand — gathers everytool_id/tool_versionpair from open workflows, batch-fetches them from the ToolShed TRS API (concurrency 5), and caches them to disk. Results are reported as{ fetched, alreadyCached, failed }.Tools: N cachedshows current cache depth.Informationdiagnostics telling you to run Populate; tools that actually failed to resolve getWarningdiagnostics; cached tools get full validation. Nothing crashes and the editor stays usable offline.Native
.gaparity with Format2The native server now has dedicated services for tool-state validation, completion, hover, and input-connection completion that match the Format2 feature set. Validation for
.garuns in two passes — one over object-valuedtool_state(with precise sub-ranges) and one over string-encoded legacytool_state(pinned to the whole value, plus the hint + quick fix). Native hover and completion reach full parity with Format2.Smaller editor polish
out:shapes when computing available upstream outputs, and respect YAML ordering to prevent forward references.Architecture and upstream migration
Under the hood, most of the new behavior is wiring to upstream packages, not net-new code in this repo.
Schemas are now Effect-based and generated at runtime
The hand-written / vendored schemas were all retired:
workflow-languages/schemas/native.schema.json(343 lines) — replaced byEffectJSONSchema.make(NativeGalaxyWorkflowSchema)at server startup.workflow-languages/schemas/gxformat2/**(YAML Salad source) — replaced by Effect-based Format2 schema generation.workflow-languages/schemas/tests.schema.json(4,187 lines) — replaced bytestsSchemafrom@galaxy-tool-util/schema.Canonical DTOs (
WorkflowInput,WorkflowOutput,WorkflowDataType,isCompatibleType) are also re-exported from@galaxy-tool-util/schemarather than defined locally, so the client, server, and upstream all agree on shape.@galaxy-tool-util/corehandles tool fetching and cachingToolRegistryServiceImplis a thin wrapper around upstreamToolInfoService+ToolStateValidator. The extension itself contains no cache format, no TRS client, and no tool-XML parser — all of that lives upstream. The registry exposes asynchasCached/listCached/getCacheSize/getToolParameters, aconfigure({ toolShedUrl, storage })entry point, and a_resolutionFailedset to avoid re-attempting dead tools.Pluggable
CacheStoragefor browser buildsThe upstream
corepackage split its entry (galaxy-tool-util-ts#52) so Node-only symbols are isolated:FilesystemCacheStorage+getCacheDirfrom@galaxy-tool-util/core/node.vscode.dev) importIndexedDBCacheStoragefrom the top-level@galaxy-tool-util/coreentry.Each server now has
src/node/server.tsandsrc/browser/server.tsentries that bind aCacheStorageFactorythrough Inversify. The previoustsupshims that stubbed Node modules for browser builds have been dropped.Shared validation and AST infrastructure in
server-commonTo keep the two language servers in sync, the common bits moved into
server/packages/server-common:runObjectStateValidationLoop()— the per-step iteration that callshasCached(), emits cache-miss diagnostics, runs the format-specific validator, and maps results to LSP ranges. Used by both formats.toolStateAstHelpers.ts— format-agnostic AST walkers (collectStepsWithObjectState,astObjectNodeToRecord,dotPathToAstProperty,dotPathToAstRange, etc.) that operate on the unifiedASTNodetype produced by both the JSON and YAML parsers.toolStateDiagnostics.ts— themapToolStateDiagnosticsToLSPtransformer that groups, merges, and renders upstreamToolStateDiagnostics.ToolStateCompletionService— shared parameter-aware completion logic consumed by both the native and Format2 servers.CodeActionHandler— the quick-fix provider that reacts tolegacy-tool-statehints.Build and test infrastructure
reflect-metadata,@types/vscode,@vscode/test-web(0.0.54 → 0.0.80).inversifyintentionally held back.@galaxy-tool-util/schema@0.4.0+@galaxy-tool-util/core@0.3.0from npm (not workspace refs).E2E test coverage
New hermetic test infrastructure and scenarios:
tool_statediagnostic, legacy-hint code action.basic→iwc→basic) round-trip, and tool parameter completions insidestate:blocks.Compatibility notes
@galaxy-tool-util/core(default~/.galaxy/tool_info_cache); users with a prior cache may want to repopulate via the new command.WorkflowInput.docis now optional andWorkflowDataTypeis widened with(string & {})to accept custom datatype names — keeps autocomplete on the known union while matching upstream's structural shape.tool_statefiles still load and validate; running the quick fix once migrates them to the richer object form.