@galaxy-tool-util/schema 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/workflow/clean.d.ts +27 -0
- package/dist/workflow/clean.d.ts.map +1 -1
- package/dist/workflow/clean.js +29 -0
- package/dist/workflow/clean.js.map +1 -1
- package/dist/workflow/coercions.d.ts +22 -0
- package/dist/workflow/coercions.d.ts.map +1 -0
- package/dist/workflow/coercions.js +67 -0
- package/dist/workflow/coercions.js.map +1 -0
- package/dist/workflow/index.d.ts +6 -1
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +6 -1
- package/dist/workflow/index.js.map +1 -1
- package/dist/workflow/normalized/index.d.ts +5 -2
- package/dist/workflow/normalized/index.d.ts.map +1 -1
- package/dist/workflow/normalized/index.js +2 -0
- package/dist/workflow/normalized/index.js.map +1 -1
- package/dist/workflow/normalized/stateful-runner.d.ts +82 -0
- package/dist/workflow/normalized/stateful-runner.d.ts.map +1 -0
- package/dist/workflow/normalized/stateful-runner.js +122 -0
- package/dist/workflow/normalized/stateful-runner.js.map +1 -0
- package/dist/workflow/normalized/toFormat2.d.ts +19 -1
- package/dist/workflow/normalized/toFormat2.d.ts.map +1 -1
- package/dist/workflow/normalized/toFormat2.js +47 -16
- package/dist/workflow/normalized/toFormat2.js.map +1 -1
- package/dist/workflow/normalized/toFormat2Stateful.d.ts +30 -0
- package/dist/workflow/normalized/toFormat2Stateful.d.ts.map +1 -0
- package/dist/workflow/normalized/toFormat2Stateful.js +58 -0
- package/dist/workflow/normalized/toFormat2Stateful.js.map +1 -0
- package/dist/workflow/normalized/toNative.d.ts +10 -1
- package/dist/workflow/normalized/toNative.d.ts.map +1 -1
- package/dist/workflow/normalized/toNative.js +24 -8
- package/dist/workflow/normalized/toNative.js.map +1 -1
- package/dist/workflow/normalized/toNativeStateful.d.ts +31 -0
- package/dist/workflow/normalized/toNativeStateful.d.ts.map +1 -0
- package/dist/workflow/normalized/toNativeStateful.js +55 -0
- package/dist/workflow/normalized/toNativeStateful.js.map +1 -0
- package/dist/workflow/precheck.d.ts +54 -0
- package/dist/workflow/precheck.d.ts.map +1 -0
- package/dist/workflow/precheck.js +91 -0
- package/dist/workflow/precheck.js.map +1 -0
- package/dist/workflow/raw/gxformat2.effect.d.ts +108 -332
- package/dist/workflow/raw/gxformat2.effect.d.ts.map +1 -1
- package/dist/workflow/raw/gxformat2.effect.js +106 -94
- package/dist/workflow/raw/gxformat2.effect.js.map +1 -1
- package/dist/workflow/raw/native.effect.d.ts +30 -177
- package/dist/workflow/raw/native.effect.d.ts.map +1 -1
- package/dist/workflow/raw/native.effect.js +43 -31
- package/dist/workflow/raw/native.effect.js.map +1 -1
- package/dist/workflow/roundtrip.d.ts +54 -0
- package/dist/workflow/roundtrip.d.ts.map +1 -0
- package/dist/workflow/roundtrip.js +516 -0
- package/dist/workflow/roundtrip.js.map +1 -0
- package/dist/workflow/runtime-markers.d.ts +20 -0
- package/dist/workflow/runtime-markers.d.ts.map +1 -0
- package/dist/workflow/runtime-markers.js +26 -0
- package/dist/workflow/runtime-markers.js.map +1 -0
- package/dist/workflow/stale-keys.d.ts +16 -0
- package/dist/workflow/stale-keys.d.ts.map +1 -0
- package/dist/workflow/stale-keys.js +43 -0
- package/dist/workflow/stale-keys.js.map +1 -0
- package/dist/workflow/state-merge.d.ts.map +1 -1
- package/dist/workflow/state-merge.js +5 -22
- package/dist/workflow/state-merge.js.map +1 -1
- package/dist/workflow/stateful-convert.d.ts +47 -0
- package/dist/workflow/stateful-convert.d.ts.map +1 -0
- package/dist/workflow/stateful-convert.js +151 -0
- package/dist/workflow/stateful-convert.js.map +1 -0
- package/dist/workflow/stateful-validate.d.ts +46 -0
- package/dist/workflow/stateful-validate.d.ts.map +1 -0
- package/dist/workflow/stateful-validate.js +96 -0
- package/dist/workflow/stateful-validate.js.map +1 -0
- package/dist/workflow/walker.d.ts +53 -0
- package/dist/workflow/walker.d.ts.map +1 -0
- package/dist/workflow/walker.js +189 -0
- package/dist/workflow/walker.js.map +1 -0
- package/package.json +18 -14
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 John Chilton
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,20 @@ expandedFormat2,
|
|
|
48
48
|
expandedNative,
|
|
49
49
|
/** Check whether a string is a TRS (Tool Registry Service) URL. */
|
|
50
50
|
isTrsUrl, MAX_EXPANSION_DEPTH, type ExpandedFormat2Workflow, type ExpandedFormat2Step, type ExpandedNativeWorkflow, type ExpandedNativeStep, type RefResolver, type ExpansionOptions,
|
|
51
|
+
/** Convert native workflow to normalized Format2. */
|
|
52
|
+
toFormat2,
|
|
53
|
+
/** Convert Format2 workflow to normalized native. */
|
|
54
|
+
toNative,
|
|
55
|
+
/** Stateful native → format2 conversion using cached tool definitions. */
|
|
56
|
+
toFormat2Stateful,
|
|
57
|
+
/** Stateful format2 → native conversion using cached tool definitions. */
|
|
58
|
+
toNativeStateful, type StepConversionStatus, type StepConversionFailureClass, type StatefulExportResult, type StatefulNativeResult, type ToolInputsResolver,
|
|
59
|
+
/** Precheck a native workflow / step for stateful conversion compatibility. */
|
|
60
|
+
precheckNativeWorkflow, precheckNativeStep, type PrecheckResult, type StepPrecheckResult,
|
|
61
|
+
/** Effect Schema validation wrappers for stateful conversion (pre/post). */
|
|
62
|
+
ConversionValidationFailure, validateNativeStepState, validateFormat2StepState, type ValidationPhase,
|
|
63
|
+
/** Roundtrip a native workflow through format2 and back, diffing tool_state per step. */
|
|
64
|
+
roundtripValidate, type RoundtripResult, type StepRoundtripResult, type StepDiff, type DiffSeverity, type BenignArtifactKind, type RoundtripFailureClass,
|
|
51
65
|
/** Scan native workflow tool_state for legacy parameter encoding signals. */
|
|
52
66
|
scanToolState, type LegacyEncodingClassification, type LegacyEncodingHit, type LegacyEncodingScanResult,
|
|
53
67
|
/** Clean a workflow — strip stale keys, decode legacy tool_state encoding. */
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO;AACL,0FAA0F;AAC1F,gBAAgB,EAChB,KAAK,mBAAmB;AACxB,4CAA4C;AAC5C,qBAAqB;AACrB,wEAAwE;AACxE,yBAAyB;AACzB,6DAA6D;AAC7D,wBAAwB;AACxB,wEAAwE;AACxE,yB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,6DAA6D;AAC7D,mBAAmB;AACnB,gFAAgF;AAChF,eAAe;AACf,+EAA+E;AAC/E,cAAc;AACd,mEAAmE;AACnE,QAAQ,EACR,mBAAmB,EACnB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,gBAAgB;AACrB,qDAAqD;AACrD,SAAS;AACT,qDAAqD;AACrD,QAAQ;AACR,0EAA0E;AAC1E,iBAAiB;AACjB,0EAA0E;AAC1E,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,0BAA0B,EAC/B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB;AACvB,+EAA+E;AAC/E,sBAAsB,EACtB,kBAAkB,EAClB,KAAK,cAAc,EACnB,KAAK,kBAAkB;AACvB,4EAA4E;AAC5E,2BAA2B,EAC3B,uBAAuB,EACvB,wBAAwB,EACxB,KAAK,eAAe;AACpB,yFAAyF;AACzF,iBAAiB,EACjB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB;AAC1B,6EAA6E;AAC7E,aAAa,EACb,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,wBAAwB;AAC7B,8EAA8E;AAC9E,aAAa;AACb,6EAA6E;AAC7E,YAAY,EACZ,KAAK,cAAc;AACnB,6EAA6E;AAC7E,WAAW;AACX,kDAAkD;AAClD,UAAU;AACV,yDAAyD;AACzD,WAAW;AACX,8CAA8C;AAC9C,YAAY;AACZ,yDAAyD;AACzD,wBAAwB;AACxB,wDAAwD;AACxD,uBAAuB,EACvB,KAAK,UAAU,GAChB,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -48,6 +48,20 @@ expandedFormat2,
|
|
|
48
48
|
expandedNative,
|
|
49
49
|
/** Check whether a string is a TRS (Tool Registry Service) URL. */
|
|
50
50
|
isTrsUrl, MAX_EXPANSION_DEPTH,
|
|
51
|
+
/** Convert native workflow to normalized Format2. */
|
|
52
|
+
toFormat2,
|
|
53
|
+
/** Convert Format2 workflow to normalized native. */
|
|
54
|
+
toNative,
|
|
55
|
+
/** Stateful native → format2 conversion using cached tool definitions. */
|
|
56
|
+
toFormat2Stateful,
|
|
57
|
+
/** Stateful format2 → native conversion using cached tool definitions. */
|
|
58
|
+
toNativeStateful,
|
|
59
|
+
/** Precheck a native workflow / step for stateful conversion compatibility. */
|
|
60
|
+
precheckNativeWorkflow, precheckNativeStep,
|
|
61
|
+
/** Effect Schema validation wrappers for stateful conversion (pre/post). */
|
|
62
|
+
ConversionValidationFailure, validateNativeStepState, validateFormat2StepState,
|
|
63
|
+
/** Roundtrip a native workflow through format2 and back, diffing tool_state per step. */
|
|
64
|
+
roundtripValidate,
|
|
51
65
|
/** Scan native workflow tool_state for legacy parameter encoding signals. */
|
|
52
66
|
scanToolState,
|
|
53
67
|
/** Clean a workflow — strip stale keys, decode legacy tool_state encoding. */
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO;AACL,0FAA0F;AAC1F,gBAAgB;AAEhB,4CAA4C;AAC5C,qBAAqB;AACrB,wEAAwE;AACxE,yBAAyB;AACzB,6DAA6D;AAC7D,wBAAwB;AACxB,wEAAwE;AACxE,yBAAyB;AACzB,6DAA6D;AAC7D,wBAAwB;AACxB,gEAAgE;AAChE,qBAAqB;AACrB,gEAAgE;AAChE,qBAAqB,GAEtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO;AAEL,6EAA6E;AAC7E,oBAAoB;AAEpB,oDAAoD;AACpD,0BAA0B;AAC1B,mFAAmF;AACnF,iBAAiB,EACjB,+BAA+B,EAC/B,2BAA2B,EAC3B,4BAA4B,EA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C,wFAAwF;AACxF,gBAAgB,EAChB,8BAA8B,EAC9B,0BAA0B,EAC1B,mBAAmB;AAInB,iEAAiE;AACjE,0BAA0B;AAC1B,oEAAoE;AACpE,oBAAoB;AACpB,iEAAiE;AACjE,aAAa,EACb,gBAAgB;AAChB,6CAA6C;AAC7C,mBAAmB;AACnB,qEAAqE;AACrE,eAAe;AACf,6DAA6D;AAC7D,mBAAmB;AACnB,gFAAgF;AAChF,eAAe;AACf,+EAA+E;AAC/E,cAAc;AACd,mEAAmE;AACnE,QAAQ,EACR,mBAAmB;AAOnB,qDAAqD;AACrD,SAAS;AACT,qDAAqD;AACrD,QAAQ;AACR,0EAA0E;AAC1E,iBAAiB;AACjB,0EAA0E;AAC1E,gBAAgB;AAMhB,+EAA+E;AAC/E,sBAAsB,EACtB,kBAAkB;AAGlB,4EAA4E;AAC5E,2BAA2B,EAC3B,uBAAuB,EACvB,wBAAwB;AAExB,yFAAyF;AACzF,iBAAiB;AAOjB,6EAA6E;AAC7E,aAAa;AAIb,8EAA8E;AAC9E,aAAa;AACb,6EAA6E;AAC7E,YAAY;AAEZ,6EAA6E;AAC7E,WAAW;AACX,kDAAkD;AAClD,UAAU;AACV,yDAAyD;AACzD,WAAW;AACX,8CAA8C;AAC9C,YAAY;AACZ,yDAAyD;AACzD,wBAAwB;AACxB,wDAAwD;AACxD,uBAAuB,GAExB,MAAM,qBAAqB,CAAC"}
|
package/dist/workflow/clean.d.ts
CHANGED
|
@@ -4,7 +4,34 @@
|
|
|
4
4
|
* Port of Galaxy's workflow_state clean operation. Removes bookkeeping keys
|
|
5
5
|
* (__page__, __rerun_remap_job_id__), runtime leak keys (chromInfo, __input_ext),
|
|
6
6
|
* and decodes JSON-encoded tool_state strings into proper dicts.
|
|
7
|
+
*
|
|
8
|
+
* Also provides a tool-definition-aware strip (`stripStaleKeysToolAware`)
|
|
9
|
+
* that mirrors Galaxy's `clean._strip_recursive`: uses the declared
|
|
10
|
+
* parameter tree to drop any undeclared key (runtime leaks, stale-branch
|
|
11
|
+
* params, tool-upgrade residue) honoring conditional branch selection,
|
|
12
|
+
* repeat expansion, and section nesting.
|
|
13
|
+
*/
|
|
14
|
+
import type { ToolParameterModel } from "../schema/bundle-types.js";
|
|
15
|
+
/**
|
|
16
|
+
* Strip all keys from a native step's `tool_state` that are not declared in
|
|
17
|
+
* the tool's parameter tree. Mirrors Galaxy's `clean._strip_recursive`.
|
|
18
|
+
*
|
|
19
|
+
* Uses `walkNativeState` with an identity leaf callback: the walker builds
|
|
20
|
+
* its output from declared params only, silently dropping undeclared keys
|
|
21
|
+
* (runtime leaks like `|__identifier__`, stale-branch conditional params,
|
|
22
|
+
* tool-upgrade residue). Missing declared leaves are omitted via
|
|
23
|
+
* `SKIP_VALUE` rather than written back as `undefined`.
|
|
24
|
+
*
|
|
25
|
+
* Used by `roundtripValidate` to pre-clean the original workflow before
|
|
26
|
+
* diffing (matches Galaxy's `roundtrip_validate(clean_stale=True)`
|
|
27
|
+
* default).
|
|
28
|
+
*
|
|
29
|
+
* @param state - Raw tool_state dict (parsed, not a JSON string)
|
|
30
|
+
* @param toolInputs - Declared parameter models from the tool definition
|
|
31
|
+
* @param inputConnections - Flat connection map; only used for repeat
|
|
32
|
+
* instance-count inference. Pass `{}` if not relevant.
|
|
7
33
|
*/
|
|
34
|
+
export declare function stripStaleKeysToolAware(state: Record<string, unknown>, toolInputs: ToolParameterModel[], inputConnections?: Record<string, unknown>): Record<string, unknown>;
|
|
8
35
|
/**
|
|
9
36
|
* Clean a workflow — strip stale keys and decode legacy tool_state encoding.
|
|
10
37
|
* Mutates and returns the workflow dict. Format2 workflows pass through unchanged.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean.d.ts","sourceRoot":"","sources":["../../src/workflow/clean.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"clean.d.ts","sourceRoot":"","sources":["../../src/workflow/clean.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AA2HpE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,UAAU,EAAE,kBAAkB,EAAE,EAChC,gBAAgB,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAC7C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAIzB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAM5F"}
|
package/dist/workflow/clean.js
CHANGED
|
@@ -4,7 +4,14 @@
|
|
|
4
4
|
* Port of Galaxy's workflow_state clean operation. Removes bookkeeping keys
|
|
5
5
|
* (__page__, __rerun_remap_job_id__), runtime leak keys (chromInfo, __input_ext),
|
|
6
6
|
* and decodes JSON-encoded tool_state strings into proper dicts.
|
|
7
|
+
*
|
|
8
|
+
* Also provides a tool-definition-aware strip (`stripStaleKeysToolAware`)
|
|
9
|
+
* that mirrors Galaxy's `clean._strip_recursive`: uses the declared
|
|
10
|
+
* parameter tree to drop any undeclared key (runtime leaks, stale-branch
|
|
11
|
+
* params, tool-upgrade residue) honoring conditional branch selection,
|
|
12
|
+
* repeat expansion, and section nesting.
|
|
7
13
|
*/
|
|
14
|
+
import { walkNativeState, SKIP_VALUE } from "./walker.js";
|
|
8
15
|
/** Keys injected by Galaxy's tool form machinery — never meaningful in saved workflows. */
|
|
9
16
|
const BOOKKEEPING_KEYS = new Set(["__page__", "__rerun_remap_job_id__"]);
|
|
10
17
|
/** Keys leaked from runtime context into saved state. */
|
|
@@ -117,6 +124,28 @@ function cleanNativeSteps(workflowDict) {
|
|
|
117
124
|
}
|
|
118
125
|
}
|
|
119
126
|
import { detectFormat } from "./detect-format.js";
|
|
127
|
+
/**
|
|
128
|
+
* Strip all keys from a native step's `tool_state` that are not declared in
|
|
129
|
+
* the tool's parameter tree. Mirrors Galaxy's `clean._strip_recursive`.
|
|
130
|
+
*
|
|
131
|
+
* Uses `walkNativeState` with an identity leaf callback: the walker builds
|
|
132
|
+
* its output from declared params only, silently dropping undeclared keys
|
|
133
|
+
* (runtime leaks like `|__identifier__`, stale-branch conditional params,
|
|
134
|
+
* tool-upgrade residue). Missing declared leaves are omitted via
|
|
135
|
+
* `SKIP_VALUE` rather than written back as `undefined`.
|
|
136
|
+
*
|
|
137
|
+
* Used by `roundtripValidate` to pre-clean the original workflow before
|
|
138
|
+
* diffing (matches Galaxy's `roundtrip_validate(clean_stale=True)`
|
|
139
|
+
* default).
|
|
140
|
+
*
|
|
141
|
+
* @param state - Raw tool_state dict (parsed, not a JSON string)
|
|
142
|
+
* @param toolInputs - Declared parameter models from the tool definition
|
|
143
|
+
* @param inputConnections - Flat connection map; only used for repeat
|
|
144
|
+
* instance-count inference. Pass `{}` if not relevant.
|
|
145
|
+
*/
|
|
146
|
+
export function stripStaleKeysToolAware(state, toolInputs, inputConnections = {}) {
|
|
147
|
+
return walkNativeState(inputConnections, toolInputs, state, (_input, value) => value === undefined ? SKIP_VALUE : value);
|
|
148
|
+
}
|
|
120
149
|
/**
|
|
121
150
|
* Clean a workflow — strip stale keys and decode legacy tool_state encoding.
|
|
122
151
|
* Mutates and returns the workflow dict. Format2 workflows pass through unchanged.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clean.js","sourceRoot":"","sources":["../../src/workflow/clean.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"clean.js","sourceRoot":"","sources":["../../src/workflow/clean.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE1D,2FAA2F;AAC3F,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,UAAU,E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E,EAAE,CAC5E,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CACzC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,YAAqC;IACjE,IAAI,YAAY,CAAC,YAAY,CAAC,KAAK,SAAS,EAAE,CAAC;QAC7C,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAC/B,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure scalar coercion parsers shared by state-merge and stateful-convert.
|
|
3
|
+
*
|
|
4
|
+
* Each function returns the parsed value or `null` when the input can't be
|
|
5
|
+
* interpreted. Callers choose whether to fall back to the original value
|
|
6
|
+
* (passthrough: `parseX(v) ?? v`) or treat `null` as an error.
|
|
7
|
+
*/
|
|
8
|
+
/** Parse boolean or "true"/"false" string → boolean. Case-insensitive. */
|
|
9
|
+
export declare function parseBool(value: unknown): boolean | null;
|
|
10
|
+
/** Parse number or non-empty numeric string → number. */
|
|
11
|
+
export declare function parseNumber(value: unknown): number | null;
|
|
12
|
+
/**
|
|
13
|
+
* Parse an array (passthrough) or comma-delimited string → string[].
|
|
14
|
+
* Empty string yields `[]`. Returns null for other inputs.
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseStringArray(value: unknown): string[] | null;
|
|
17
|
+
/**
|
|
18
|
+
* Parse an array or comma-delimited string → numeric array. Elements that
|
|
19
|
+
* can't be parsed as numbers are preserved as strings. Empty string → `[]`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseNumberArray(value: unknown): (number | string)[] | null;
|
|
22
|
+
//# sourceMappingURL=coercions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coercions.d.ts","sourceRoot":"","sources":["../../src/workflow/coercions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,0EAA0E;AAC1E,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,GAAG,IAAI,CAQxD;AAED,yDAAyD;AACzD,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAOzD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,IAAI,CAOhE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,IAAI,CAe3E"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure scalar coercion parsers shared by state-merge and stateful-convert.
|
|
3
|
+
*
|
|
4
|
+
* Each function returns the parsed value or `null` when the input can't be
|
|
5
|
+
* interpreted. Callers choose whether to fall back to the original value
|
|
6
|
+
* (passthrough: `parseX(v) ?? v`) or treat `null` as an error.
|
|
7
|
+
*/
|
|
8
|
+
/** Parse boolean or "true"/"false" string → boolean. Case-insensitive. */
|
|
9
|
+
export function parseBool(value) {
|
|
10
|
+
if (typeof value === "boolean")
|
|
11
|
+
return value;
|
|
12
|
+
if (typeof value === "string") {
|
|
13
|
+
const lower = value.toLowerCase();
|
|
14
|
+
if (lower === "true")
|
|
15
|
+
return true;
|
|
16
|
+
if (lower === "false")
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
/** Parse number or non-empty numeric string → number. */
|
|
22
|
+
export function parseNumber(value) {
|
|
23
|
+
if (typeof value === "number")
|
|
24
|
+
return value;
|
|
25
|
+
if (typeof value === "string" && value !== "") {
|
|
26
|
+
const n = Number(value);
|
|
27
|
+
if (!isNaN(n))
|
|
28
|
+
return n;
|
|
29
|
+
}
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Parse an array (passthrough) or comma-delimited string → string[].
|
|
34
|
+
* Empty string yields `[]`. Returns null for other inputs.
|
|
35
|
+
*/
|
|
36
|
+
export function parseStringArray(value) {
|
|
37
|
+
if (Array.isArray(value))
|
|
38
|
+
return value;
|
|
39
|
+
if (typeof value === "string") {
|
|
40
|
+
if (value === "")
|
|
41
|
+
return [];
|
|
42
|
+
return value.split(",");
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Parse an array or comma-delimited string → numeric array. Elements that
|
|
48
|
+
* can't be parsed as numbers are preserved as strings. Empty string → `[]`.
|
|
49
|
+
*/
|
|
50
|
+
export function parseNumberArray(value) {
|
|
51
|
+
if (Array.isArray(value)) {
|
|
52
|
+
return value.map((v) => {
|
|
53
|
+
const n = Number(v);
|
|
54
|
+
return isNaN(n) ? v : n;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
if (typeof value === "string") {
|
|
58
|
+
if (value === "")
|
|
59
|
+
return [];
|
|
60
|
+
return value.split(",").map((s) => {
|
|
61
|
+
const n = Number(s);
|
|
62
|
+
return isNaN(n) ? s : n;
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=coercions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coercions.js","sourceRoot":"","sources":["../../src/workflow/coercions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,0EAA0E;AAC1E,MAAM,UAAU,SAAS,CAAC,KAAc;IACtC,IAAI,OAAO,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;QAClC,IAAI,KAAK,KAAK,MAAM;YAAE,OAAO,IAAI,CAAC;QAClC,IAAI,KAAK,KAAK,OAAO;YAAE,OAAO,K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C,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YAChC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACpB,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
package/dist/workflow/index.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export { type GalaxyWorkflow, GalaxyWorkflowSchema, type NativeGalaxyWorkflow, NativeGalaxyWorkflowSchema, } from "./raw/index.js";
|
|
2
|
-
export { normalizedFormat2, NormalizedFormat2WorkflowSchema, NormalizedFormat2StepSchema, NormalizedFormat2InputSchema, NormalizedFormat2OutputSchema, NormalizedFormat2StepInputSchema, NormalizedFormat2StepOutputSchema, type NormalizedFormat2Workflow, type NormalizedFormat2Step, type NormalizedFormat2Input, type NormalizedFormat2Output, type NormalizedFormat2StepInput, type NormalizedFormat2StepOutput, normalizedNative, NormalizedNativeWorkflowSchema, NormalizedNativeStepSchema, ToolReferenceSchema, type NormalizedNativeWorkflow, type NormalizedNativeStep, type ToolReference, toFormat2, toNative, ensureFormat2, ensureNative, expandedFormat2, expandedNative, isTrsUrl, MAX_EXPANSION_DEPTH, type ExpandedFormat2Workflow, type ExpandedFormat2Step, type ExpandedNativeWorkflow, type ExpandedNativeStep, type RefResolver, type ExpansionOptions, flattenCommentData, unflattenCommentData, resolveSourceReference, UNLABELED_INPUT_PREFIX, UNLABELED_STEP_PREFIX, } from "./normalized/index.js";
|
|
2
|
+
export { normalizedFormat2, NormalizedFormat2WorkflowSchema, NormalizedFormat2StepSchema, NormalizedFormat2InputSchema, NormalizedFormat2OutputSchema, NormalizedFormat2StepInputSchema, NormalizedFormat2StepOutputSchema, type NormalizedFormat2Workflow, type NormalizedFormat2Step, type NormalizedFormat2Input, type NormalizedFormat2Output, type NormalizedFormat2StepInput, type NormalizedFormat2StepOutput, normalizedNative, NormalizedNativeWorkflowSchema, NormalizedNativeStepSchema, ToolReferenceSchema, type NormalizedNativeWorkflow, type NormalizedNativeStep, type ToolReference, toFormat2, type ToFormat2Options, type Format2StateOverride, toNative, type ToNativeOptions, toFormat2Stateful, toNativeStateful, type StepConversionStatus, type StepConversionFailureClass, type StatefulExportResult, type StatefulNativeResult, type ToolInputsResolver, ensureFormat2, ensureNative, expandedFormat2, expandedNative, isTrsUrl, MAX_EXPANSION_DEPTH, type ExpandedFormat2Workflow, type ExpandedFormat2Step, type ExpandedNativeWorkflow, type ExpandedNativeStep, type RefResolver, type ExpansionOptions, flattenCommentData, unflattenCommentData, resolveSourceReference, UNLABELED_INPUT_PREFIX, UNLABELED_STEP_PREFIX, } from "./normalized/index.js";
|
|
3
3
|
export { injectConnectionsIntoState, stripConnectedValues, flatStatePath, keysStartingWith, repeatInputsToArray, selectWhichWhen, } from "./state-merge.js";
|
|
4
4
|
export { scanForReplacements, type ReplacementClassification } from "./replacement-scan.js";
|
|
5
5
|
export { scanToolState, type LegacyEncodingClassification, type LegacyEncodingHit, type LegacyEncodingScanResult, } from "./legacy-encoding.js";
|
|
6
|
+
export { walkNativeState, walkFormat2State, SKIP_VALUE, UnknownKeyError, type LeafCallback, type WalkNativeOptions, } from "./walker.js";
|
|
7
|
+
export { convertScalarValue, reverseScalarValue, convertStateToFormat2, encodeStateToNative, type Format2ConvertedState, } from "./stateful-convert.js";
|
|
8
|
+
export { precheckNativeWorkflow, precheckNativeStep, type PrecheckResult, type StepPrecheckResult, } from "./precheck.js";
|
|
9
|
+
export { ConversionValidationFailure, validateNativeStepState, validateFormat2StepState, type ValidationPhase, } from "./stateful-validate.js";
|
|
10
|
+
export { roundtripValidate, type RoundtripResult, type StepRoundtripResult, type StepDiff, type DiffSeverity, type BenignArtifactKind, type RoundtripFailureClass, } from "./roundtrip.js";
|
|
6
11
|
export { cleanWorkflow } from "./clean.js";
|
|
7
12
|
export { detectFormat, type WorkflowFormat } from "./detect-format.js";
|
|
8
13
|
export { LintContext, lintNative, lintFormat2, lintWorkflow, lintBestPracticesFormat2, lintBestPracticesNative, type LintResult, } from "./lint.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EACnB,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,iBAAiB,EACjB,+BAA+B,EAC/B,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,gCAAgC,EAChC,iCAAiC,EACjC,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,EAChC,gBAAgB,EAChB,8BAA8B,EAC9B,0BAA0B,EAC1B,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,SAAS,EACT,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,eAAe,EACf,cAAc,EACd,QAAQ,EACR,mBAAmB,EACnB,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAE,KAAK,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAE5F,OAAO,EACL,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,UAAU,EACV,WAAW,EACX,YAAY,EACZ,wBAAwB,EACxB,uBAAuB,EACvB,KAAK,UAAU,GAChB,MAAM,WAAW,CAAC"}
|
package/dist/workflow/index.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
// Raw (generated) workflow schema types
|
|
2
2
|
export { GalaxyWorkflowSchema, NativeGalaxyWorkflowSchema, } from "./raw/index.js";
|
|
3
3
|
// Normalized workflow types + normalizers
|
|
4
|
-
export { normalizedFormat2, NormalizedFormat2WorkflowSchema, NormalizedFormat2StepSchema, NormalizedFormat2InputSchema, NormalizedFormat2OutputSchema, NormalizedFormat2StepInputSchema, NormalizedFormat2StepOutputSchema, normalizedNative, NormalizedNativeWorkflowSchema, NormalizedNativeStepSchema, ToolReferenceSchema, toFormat2, toNative, ensureFormat2, ensureNative, expandedFormat2, expandedNative, isTrsUrl, MAX_EXPANSION_DEPTH, flattenCommentData, unflattenCommentData, resolveSourceReference, UNLABELED_INPUT_PREFIX, UNLABELED_STEP_PREFIX, } from "./normalized/index.js";
|
|
4
|
+
export { normalizedFormat2, NormalizedFormat2WorkflowSchema, NormalizedFormat2StepSchema, NormalizedFormat2InputSchema, NormalizedFormat2OutputSchema, NormalizedFormat2StepInputSchema, NormalizedFormat2StepOutputSchema, normalizedNative, NormalizedNativeWorkflowSchema, NormalizedNativeStepSchema, ToolReferenceSchema, toFormat2, toNative, toFormat2Stateful, toNativeStateful, ensureFormat2, ensureNative, expandedFormat2, expandedNative, isTrsUrl, MAX_EXPANSION_DEPTH, flattenCommentData, unflattenCommentData, resolveSourceReference, UNLABELED_INPUT_PREFIX, UNLABELED_STEP_PREFIX, } from "./normalized/index.js";
|
|
5
5
|
export { injectConnectionsIntoState, stripConnectedValues, flatStatePath, keysStartingWith, repeatInputsToArray, selectWhichWhen, } from "./state-merge.js";
|
|
6
6
|
export { scanForReplacements } from "./replacement-scan.js";
|
|
7
7
|
export { scanToolState, } from "./legacy-encoding.js";
|
|
8
|
+
export { walkNativeState, walkFormat2State, SKIP_VALUE, UnknownKeyError, } from "./walker.js";
|
|
9
|
+
export { convertScalarValue, reverseScalarValue, convertStateToFormat2, encodeStateToNative, } from "./stateful-convert.js";
|
|
10
|
+
export { precheckNativeWorkflow, precheckNativeStep, } from "./precheck.js";
|
|
11
|
+
export { ConversionValidationFailure, validateNativeStepState, validateFormat2StepState, } from "./stateful-validate.js";
|
|
12
|
+
export { roundtripValidate, } from "./roundtrip.js";
|
|
8
13
|
export { cleanWorkflow } from "./clean.js";
|
|
9
14
|
export { detectFormat } from "./detect-format.js";
|
|
10
15
|
export { LintContext, lintNative, lintFormat2, lintWorkflow, lintBestPracticesFormat2, lintBestPracticesNative, } from "./lint.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAEL,oBAAoB,EAEpB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AAExB,0CAA0C;AAC1C,OAAO,EACL,iBAAiB,EACjB,+BAA+B,EAC/B,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,gCAAgC,EAChC,iCAAiC,EAOjC,gBAAgB,EAChB,8BAA8B,EAC9B,0BAA0B,EAC1B,mBAAmB,EAInB,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/workflow/index.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,OAAO,EAEL,oBAAoB,EAEpB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AAExB,0CAA0C;AAC1C,OAAO,EACL,iBAAiB,EACjB,+BAA+B,EAC/B,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,gCAAgC,EAChC,iCAAiC,EAOjC,gBAAgB,EAChB,8BAA8B,EAC9B,0BAA0B,EAC1B,mBAAmB,EAInB,SAAS,EAGT,QAAQ,EAER,iBAAiB,EACjB,gBAAgB,EAMhB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,cAAc,EACd,QAAQ,EACR,mBAAmB,EAOnB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,mBAAmB,EAAkC,MAAM,uBAAuB,CAAC;AAE5F,OAAO,EACL,aAAa,GAId,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,eAAe,GAGhB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,GAEpB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,sBAAsB,EACtB,kBAAkB,GAGnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,wBAAwB,GAEzB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,iBAAiB,GAOlB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAuB,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EACL,WAAW,EACX,UAAU,EACV,WAAW,EACX,YAAY,EACZ,wBAAwB,EACxB,uBAAuB,GAExB,MAAM,WAAW,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
export { normalizedFormat2, NormalizedFormat2WorkflowSchema, NormalizedFormat2StepSchema, NormalizedFormat2InputSchema, NormalizedFormat2OutputSchema, NormalizedFormat2StepInputSchema, NormalizedFormat2StepOutputSchema, type NormalizedFormat2Workflow, type NormalizedFormat2Step, type NormalizedFormat2Input, type NormalizedFormat2Output, type NormalizedFormat2StepInput, type NormalizedFormat2StepOutput, } from "./format2.js";
|
|
2
2
|
export { normalizedNative, NormalizedNativeWorkflowSchema, NormalizedNativeStepSchema, ToolReferenceSchema, type NormalizedNativeWorkflow, type NormalizedNativeStep, type ToolReference, } from "./native.js";
|
|
3
|
-
export { toFormat2 } from "./toFormat2.js";
|
|
4
|
-
export { toNative } from "./toNative.js";
|
|
3
|
+
export { toFormat2, type ToFormat2Options, type Format2StateOverride } from "./toFormat2.js";
|
|
4
|
+
export { toNative, type ToNativeOptions } from "./toNative.js";
|
|
5
|
+
export { toFormat2Stateful, type StepConversionStatus, type StatefulExportResult, type ToolInputsResolver, } from "./toFormat2Stateful.js";
|
|
6
|
+
export type { StepConversionFailureClass } from "./stateful-runner.js";
|
|
7
|
+
export { toNativeStateful, type StatefulNativeResult } from "./toNativeStateful.js";
|
|
5
8
|
export { ensureFormat2, ensureNative } from "./ensure.js";
|
|
6
9
|
export { expandedFormat2, expandedNative, isTrsUrl, MAX_EXPANSION_DEPTH, type ExpandedFormat2Workflow, type ExpandedFormat2Step, type ExpandedNativeWorkflow, type ExpandedNativeStep, type RefResolver, type ExpansionOptions, } from "./expanded.js";
|
|
7
10
|
export { flattenCommentData, unflattenCommentData } from "./comments.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workflow/normalized/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,+BAA+B,EAC/B,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,gCAAgC,EAChC,iCAAiC,EACjC,KAAK,yBAAyB,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,2BAA2B,GACjC,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAChB,8BAA8B,EAC9B,0BAA0B,EAC1B,mBAAmB,EACnB,K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AK,kBAAkB,EACvB,KAAK,WAAW,EAChB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -2,6 +2,8 @@ export { normalizedFormat2, NormalizedFormat2WorkflowSchema, NormalizedFormat2St
|
|
|
2
2
|
export { normalizedNative, NormalizedNativeWorkflowSchema, NormalizedNativeStepSchema, ToolReferenceSchema, } from "./native.js";
|
|
3
3
|
export { toFormat2 } from "./toFormat2.js";
|
|
4
4
|
export { toNative } from "./toNative.js";
|
|
5
|
+
export { toFormat2Stateful, } from "./toFormat2Stateful.js";
|
|
6
|
+
export { toNativeStateful } from "./toNativeStateful.js";
|
|
5
7
|
export { ensureFormat2, ensureNative } from "./ensure.js";
|
|
6
8
|
export { expandedFormat2, expandedNative, isTrsUrl, MAX_EXPANSION_DEPTH, } from "./expanded.js";
|
|
7
9
|
export { flattenCommentData, unflattenCommentData } from "./comments.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/workflow/normalized/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,+BAA+B,EAC/B,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,gCAAgC,EAChC,iCAAiC,GAOlC,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAChB,8BAA8B,EAC9B,0BAA0B,EAC1B,mBAAmB,GAIpB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/workflow/normalized/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,+BAA+B,EAC/B,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,gCAAgC,EAChC,iCAAiC,GAOlC,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,gBAAgB,EAChB,8BAA8B,EAC9B,0BAA0B,EAC1B,mBAAmB,GAIpB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAoD,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAwB,MAAM,eAAe,CAAC;AAC/D,OAAO,EACL,iBAAiB,GAIlB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,gBAAgB,EAA6B,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EACL,eAAe,EACf,cAAc,EACd,QAAQ,EACR,mBAAmB,GAOpB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared per-step runner for stateful conversions.
|
|
3
|
+
*
|
|
4
|
+
* Both `toFormat2Stateful` and `toNativeStateful` need the same boilerplate:
|
|
5
|
+
* eligibility gate → id resolution → tool-inputs lookup → optional precheck
|
|
6
|
+
* → optional pre-conversion validation → convert → optional post-conversion
|
|
7
|
+
* validation → per-step status tracking. This module factors that out so
|
|
8
|
+
* each wrapper only supplies the config that differs (predicate, id
|
|
9
|
+
* extractor, convert, optional hooks).
|
|
10
|
+
*
|
|
11
|
+
* Tool lookup is callback-shaped (matching gxformat2's
|
|
12
|
+
* `ConversionOptions.state_encode_to_*` design) — callers pass a resolver
|
|
13
|
+
* `(toolId, toolVersion) => ToolParameterModel[] | undefined` and own the
|
|
14
|
+
* caching / loading strategy. Version disambiguation is the caller's
|
|
15
|
+
* responsibility, not the runner's.
|
|
16
|
+
*
|
|
17
|
+
* Failure classes allow callers to distinguish *why* a step fell back:
|
|
18
|
+
*
|
|
19
|
+
* - `unknown_tool` — resolver returned undefined (not in cache, no tool_id)
|
|
20
|
+
* - `precheck` — legacy replacement params or legacy encoding detected
|
|
21
|
+
* - `pre_validation` — native state fails `workflow_step_native` schema
|
|
22
|
+
* - `conversion` — walker/convert threw (unknown param type, bad structure)
|
|
23
|
+
* - `post_validation` — converted format2/native state fails schema
|
|
24
|
+
*/
|
|
25
|
+
import type { ToolParameterModel } from "../../schema/bundle-types.js";
|
|
26
|
+
export type ToolInputsResolver = (toolId: string, toolVersion: string | null) => ToolParameterModel[] | undefined;
|
|
27
|
+
export type StepConversionFailureClass = "unknown_tool" | "precheck" | "pre_validation" | "conversion" | "post_validation";
|
|
28
|
+
export interface StepConversionStatus {
|
|
29
|
+
stepId: string;
|
|
30
|
+
toolId?: string;
|
|
31
|
+
toolVersion?: string | null;
|
|
32
|
+
converted: boolean;
|
|
33
|
+
/** Present when converted=false. Distinguishes why the fallback happened. */
|
|
34
|
+
failureClass?: StepConversionFailureClass;
|
|
35
|
+
error?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface StepRunnerConfig<Args, Result> {
|
|
38
|
+
/** Resolve parameter inputs for a given tool_id/tool_version pair. */
|
|
39
|
+
toolInputsResolver: ToolInputsResolver;
|
|
40
|
+
/** Per-step status entries are pushed into this array. */
|
|
41
|
+
status: StepConversionStatus[];
|
|
42
|
+
/** Return true if the step should participate in stateful conversion. */
|
|
43
|
+
isEligible: (args: Args) => boolean;
|
|
44
|
+
/** Extract identifiers for status reporting and lookup. */
|
|
45
|
+
resolveIds: (args: Args) => {
|
|
46
|
+
stepId: string;
|
|
47
|
+
toolId?: string;
|
|
48
|
+
toolVersion?: string | null;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Optional non-throwing precheck. Return an array of reasons (strings)
|
|
52
|
+
* if the step should be skipped without attempting conversion; return
|
|
53
|
+
* null/empty for "ok to proceed".
|
|
54
|
+
*/
|
|
55
|
+
precheck?: (args: Args, inputs: ToolParameterModel[]) => string[] | null;
|
|
56
|
+
/**
|
|
57
|
+
* Optional pre-conversion validation. Throw to signal failure — the
|
|
58
|
+
* runner will catch, classify as `pre_validation`, and fall back.
|
|
59
|
+
*/
|
|
60
|
+
preValidate?: (args: Args, inputs: ToolParameterModel[]) => void;
|
|
61
|
+
/** Perform the conversion. Thrown errors are classified as `conversion`. */
|
|
62
|
+
convert: (args: Args, inputs: ToolParameterModel[]) => Result;
|
|
63
|
+
/**
|
|
64
|
+
* Optional post-conversion validation on the converted result. Throw to
|
|
65
|
+
* signal failure — classified as `post_validation`, result discarded.
|
|
66
|
+
*/
|
|
67
|
+
postValidate?: (result: Result, inputs: ToolParameterModel[]) => void;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Build a per-step callback with status tracking and graceful fallback.
|
|
71
|
+
*
|
|
72
|
+
* Return semantics:
|
|
73
|
+
* - ineligible step → `null`, no status entry
|
|
74
|
+
* - resolver returned undefined → `null`, `unknown_tool` status
|
|
75
|
+
* - precheck returned reasons → `null`, `precheck` status
|
|
76
|
+
* - preValidate threw → `null`, `pre_validation` status
|
|
77
|
+
* - convert threw → `null`, `conversion` status
|
|
78
|
+
* - postValidate threw → `null`, `post_validation` status
|
|
79
|
+
* - success → result, `converted: true` status
|
|
80
|
+
*/
|
|
81
|
+
export declare function makeStepConversionRunner<Args, Result>(config: StepRunnerConfig<Args, Result>): (args: Args) => Result | null;
|
|
82
|
+
//# sourceMappingURL=stateful-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stateful-runner.d.ts","sourceRoot":"","sources":["../../../src/workflow/normalized/stateful-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,MAAM,MAAM,kBAAkB,GAAG,CAC/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IAC9D;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,EAAE,KAAK,IAAI,CAAC;CACvE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EACnD,MAAM,EAAE,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,GACrC,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,GAAG,IAAI,CAiG/B"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared per-step runner for stateful conversions.
|
|
3
|
+
*
|
|
4
|
+
* Both `toFormat2Stateful` and `toNativeStateful` need the same boilerplate:
|
|
5
|
+
* eligibility gate → id resolution → tool-inputs lookup → optional precheck
|
|
6
|
+
* → optional pre-conversion validation → convert → optional post-conversion
|
|
7
|
+
* validation → per-step status tracking. This module factors that out so
|
|
8
|
+
* each wrapper only supplies the config that differs (predicate, id
|
|
9
|
+
* extractor, convert, optional hooks).
|
|
10
|
+
*
|
|
11
|
+
* Tool lookup is callback-shaped (matching gxformat2's
|
|
12
|
+
* `ConversionOptions.state_encode_to_*` design) — callers pass a resolver
|
|
13
|
+
* `(toolId, toolVersion) => ToolParameterModel[] | undefined` and own the
|
|
14
|
+
* caching / loading strategy. Version disambiguation is the caller's
|
|
15
|
+
* responsibility, not the runner's.
|
|
16
|
+
*
|
|
17
|
+
* Failure classes allow callers to distinguish *why* a step fell back:
|
|
18
|
+
*
|
|
19
|
+
* - `unknown_tool` — resolver returned undefined (not in cache, no tool_id)
|
|
20
|
+
* - `precheck` — legacy replacement params or legacy encoding detected
|
|
21
|
+
* - `pre_validation` — native state fails `workflow_step_native` schema
|
|
22
|
+
* - `conversion` — walker/convert threw (unknown param type, bad structure)
|
|
23
|
+
* - `post_validation` — converted format2/native state fails schema
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* Build a per-step callback with status tracking and graceful fallback.
|
|
27
|
+
*
|
|
28
|
+
* Return semantics:
|
|
29
|
+
* - ineligible step → `null`, no status entry
|
|
30
|
+
* - resolver returned undefined → `null`, `unknown_tool` status
|
|
31
|
+
* - precheck returned reasons → `null`, `precheck` status
|
|
32
|
+
* - preValidate threw → `null`, `pre_validation` status
|
|
33
|
+
* - convert threw → `null`, `conversion` status
|
|
34
|
+
* - postValidate threw → `null`, `post_validation` status
|
|
35
|
+
* - success → result, `converted: true` status
|
|
36
|
+
*/
|
|
37
|
+
export function makeStepConversionRunner(config) {
|
|
38
|
+
const { toolInputsResolver, status, isEligible, resolveIds, precheck, preValidate, convert, postValidate, } = config;
|
|
39
|
+
return (args) => {
|
|
40
|
+
if (!isEligible(args))
|
|
41
|
+
return null;
|
|
42
|
+
const { stepId, toolId, toolVersion = null } = resolveIds(args);
|
|
43
|
+
const inputs = toolId != null ? toolInputsResolver(toolId, toolVersion) : undefined;
|
|
44
|
+
if (inputs == null) {
|
|
45
|
+
status.push({
|
|
46
|
+
stepId,
|
|
47
|
+
toolId,
|
|
48
|
+
toolVersion,
|
|
49
|
+
converted: false,
|
|
50
|
+
failureClass: "unknown_tool",
|
|
51
|
+
error: toolId == null
|
|
52
|
+
? "step has no tool_id"
|
|
53
|
+
: `tool not resolved: ${toolId}${toolVersion ? `@${toolVersion}` : ""}`,
|
|
54
|
+
});
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
if (precheck) {
|
|
58
|
+
const reasons = precheck(args, inputs);
|
|
59
|
+
if (reasons && reasons.length > 0) {
|
|
60
|
+
status.push({
|
|
61
|
+
stepId,
|
|
62
|
+
toolId,
|
|
63
|
+
toolVersion,
|
|
64
|
+
converted: false,
|
|
65
|
+
failureClass: "precheck",
|
|
66
|
+
error: reasons.join("; "),
|
|
67
|
+
});
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (preValidate) {
|
|
72
|
+
try {
|
|
73
|
+
preValidate(args, inputs);
|
|
74
|
+
}
|
|
75
|
+
catch (err) {
|
|
76
|
+
status.push({
|
|
77
|
+
stepId,
|
|
78
|
+
toolId,
|
|
79
|
+
toolVersion,
|
|
80
|
+
converted: false,
|
|
81
|
+
failureClass: "pre_validation",
|
|
82
|
+
error: err instanceof Error ? err.message : String(err),
|
|
83
|
+
});
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
let result;
|
|
88
|
+
try {
|
|
89
|
+
result = convert(args, inputs);
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
status.push({
|
|
93
|
+
stepId,
|
|
94
|
+
toolId,
|
|
95
|
+
toolVersion,
|
|
96
|
+
converted: false,
|
|
97
|
+
failureClass: "conversion",
|
|
98
|
+
error: err instanceof Error ? err.message : String(err),
|
|
99
|
+
});
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
if (postValidate) {
|
|
103
|
+
try {
|
|
104
|
+
postValidate(result, inputs);
|
|
105
|
+
}
|
|
106
|
+
catch (err) {
|
|
107
|
+
status.push({
|
|
108
|
+
stepId,
|
|
109
|
+
toolId,
|
|
110
|
+
toolVersion,
|
|
111
|
+
converted: false,
|
|
112
|
+
failureClass: "post_validation",
|
|
113
|
+
error: err instanceof Error ? err.message : String(err),
|
|
114
|
+
});
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
status.push({ stepId, toolId, toolVersion, converted: true });
|
|
119
|
+
return result;
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=stateful-runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stateful-runner.js","sourceRoot":"","sources":["../../../src/workflow/normalized/stateful-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AA2DH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAAsC;IAEtC,MAAM,EACJ,kBAAkB,EAClB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