@pipelex/mthds-form 0.3.0 → 0.5.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/README.md +21 -7
- package/dist/chunk-25I6JDIK.js +28 -0
- package/dist/chunk-25I6JDIK.js.map +1 -0
- package/dist/chunk-5Q2W6HBA.js +201 -0
- package/dist/chunk-5Q2W6HBA.js.map +1 -0
- package/dist/chunk-GCXV76WU.js +213 -0
- package/dist/chunk-GCXV76WU.js.map +1 -0
- package/dist/chunk-GKV77RAS.js +46 -0
- package/dist/chunk-GKV77RAS.js.map +1 -0
- package/dist/chunk-IIJRJGZQ.js +128 -0
- package/dist/chunk-IIJRJGZQ.js.map +1 -0
- package/dist/chunk-IM2AHWBR.js +99 -0
- package/dist/chunk-IM2AHWBR.js.map +1 -0
- package/dist/chunk-LBFZXYCY.js +44 -0
- package/dist/chunk-LBFZXYCY.js.map +1 -0
- package/dist/chunk-OD3VYXUY.js +156 -0
- package/dist/chunk-OD3VYXUY.js.map +1 -0
- package/dist/chunk-PM55AHRO.js +52 -0
- package/dist/chunk-PM55AHRO.js.map +1 -0
- package/dist/chunk-RPA7DNSK.js +41 -0
- package/dist/chunk-RPA7DNSK.js.map +1 -0
- package/dist/chunk-V3OV2XQT.js +12 -0
- package/dist/chunk-V3OV2XQT.js.map +1 -0
- package/dist/chunk-VTPUDBSJ.js +61 -0
- package/dist/chunk-VTPUDBSJ.js.map +1 -0
- package/dist/chunk-XYQ7NXQZ.js +31 -0
- package/dist/chunk-XYQ7NXQZ.js.map +1 -0
- package/dist/chunk-YEVVR6FE.js +66 -0
- package/dist/chunk-YEVVR6FE.js.map +1 -0
- package/dist/core/contracts.d.ts +114 -0
- package/dist/core/contracts.js +4 -0
- package/dist/core/contracts.js.map +1 -0
- package/dist/core/date-format.d.ts +87 -0
- package/dist/core/date-format.js +3 -0
- package/dist/core/date-format.js.map +1 -0
- package/dist/core/derive.d.ts +55 -0
- package/dist/core/derive.js +6 -0
- package/dist/core/derive.js.map +1 -0
- package/dist/core/descriptor.d.ts +172 -0
- package/dist/core/descriptor.js +3 -0
- package/dist/core/descriptor.js.map +1 -0
- package/dist/core/gate-validator.d.ts +27 -0
- package/dist/core/gate-validator.js +4 -0
- package/dist/core/gate-validator.js.map +1 -0
- package/dist/core/gate.d.ts +144 -0
- package/dist/core/gate.js +12 -0
- package/dist/core/gate.js.map +1 -0
- package/dist/core/gating-fields.d.ts +38 -0
- package/dist/core/gating-fields.js +6 -0
- package/dist/core/gating-fields.js.map +1 -0
- package/dist/core/index.d.ts +13 -623
- package/dist/core/index.js +14 -1
- package/dist/core/normalize-schema.d.ts +30 -0
- package/dist/core/normalize-schema.js +4 -0
- package/dist/core/normalize-schema.js.map +1 -0
- package/dist/core/own-property.d.ts +46 -0
- package/dist/core/own-property.js +3 -0
- package/dist/core/own-property.js.map +1 -0
- package/dist/core/readiness.d.ts +91 -0
- package/dist/core/readiness.js +4 -0
- package/dist/core/readiness.js.map +1 -0
- package/dist/core/schema-utils.d.ts +86 -0
- package/dist/core/schema-utils.js +3 -0
- package/dist/core/schema-utils.js.map +1 -0
- package/dist/core/validation-message.d.ts +39 -0
- package/dist/core/validation-message.js +4 -0
- package/dist/core/validation-message.js.map +1 -0
- package/dist/core/values.d.ts +98 -0
- package/dist/core/values.js +10 -0
- package/dist/core/values.js.map +1 -0
- package/dist/core/wire-format.d.ts +95 -0
- package/dist/core/wire-format.js +6 -0
- package/dist/core/wire-format.js.map +1 -0
- package/dist/react/index.d.ts +43 -2
- package/dist/react/index.js +166 -64
- package/dist/react/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +7 -1
- package/dist/chunk-S6KOTTGD.js +0 -990
- package/dist/chunk-S6KOTTGD.js.map +0 -1
- package/dist/descriptor-DPrrfAjL.d.ts +0 -101
package/dist/core/index.d.ts
CHANGED
|
@@ -1,623 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*/
|
|
15
|
-
interface PipeInputContract {
|
|
16
|
-
concept_ref: string;
|
|
17
|
-
json_schema: Record<string, unknown>;
|
|
18
|
-
/**
|
|
19
|
-
* `true` when the input is declared optional (`?`) - the caller may omit it
|
|
20
|
-
* and the pipe handles the absence itself. Plain and force (`!`) inputs
|
|
21
|
-
* report `false`. Absent on contracts persisted before the API carried the
|
|
22
|
-
* flag, so read it as "optional only when explicitly true".
|
|
23
|
-
*/
|
|
24
|
-
optional?: boolean;
|
|
25
|
-
}
|
|
26
|
-
interface PipeOutputContract {
|
|
27
|
-
concept_ref: string;
|
|
28
|
-
multiplicity: 'single' | 'variable';
|
|
29
|
-
/** `true` when the output is declared optional (`?`) - the pipe may resolve
|
|
30
|
-
* it as a recorded absence instead of a value. */
|
|
31
|
-
optional?: boolean;
|
|
32
|
-
}
|
|
33
|
-
interface PipeIOContract {
|
|
34
|
-
inputs: Record<string, PipeInputContract>;
|
|
35
|
-
output: PipeOutputContract;
|
|
36
|
-
}
|
|
37
|
-
/** The `pipe_io_contracts` map: namespaced `pipe_ref` → IO contract. */
|
|
38
|
-
type PipeIOContracts = Record<string, PipeIOContract>;
|
|
39
|
-
/** Namespaced pipe ref (`<domain>.<pipe_code>`) - the identity convention the
|
|
40
|
-
* validate artifacts key on. */
|
|
41
|
-
declare function buildPipeRef(domain: string, pipeCode: string): string;
|
|
42
|
-
/**
|
|
43
|
-
* Look up a pipe's IO contract by pipe code, tolerant of both key conventions.
|
|
44
|
-
*
|
|
45
|
-
* The map may be keyed by namespaced `pipe_ref` (`<domain>.<code>`, the
|
|
46
|
-
* canonical convention) OR by bare pipe code - the current hosted `/validate`
|
|
47
|
-
* keys `pipe_structures` by bare code, and methods persisted before the
|
|
48
|
-
* pipe_ref re-keying also carry bare-code keys. Try the namespaced ref first
|
|
49
|
-
* (when the caller supplies a domain), then fall back to the bare code.
|
|
50
|
-
* Returns `undefined` (never crashes) when neither matches.
|
|
51
|
-
*/
|
|
52
|
-
declare function getPipeIOContract(pipeIoContracts: PipeIOContracts | null | undefined, domain: string | null | undefined, pipeCode: string | null | undefined): PipeIOContract | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* True when the input carries a plural concept (`Image[]`): its JSON Schema is
|
|
55
|
-
* an array wrapper. A plural slot is never "absent" in MTHDS - its empty form
|
|
56
|
-
* IS the empty list - so the UI must treat "nothing entered" as a real value.
|
|
57
|
-
*/
|
|
58
|
-
declare function isPluralInput(input: PipeInputContract): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* True when the user MUST put a value in before a run can start.
|
|
61
|
-
*
|
|
62
|
-
* Two declarations relieve an input of that duty, for different reasons:
|
|
63
|
-
* - **optional (`?`)** - the method itself states the caller may omit it;
|
|
64
|
-
* - **plural (`[]`)** - the empty list is a legitimate value and no method can
|
|
65
|
-
* declare "at least one", so gating on it would invent a constraint the
|
|
66
|
-
* method never made.
|
|
67
|
-
*
|
|
68
|
-
* Everything else (plain and force `!`) still gates: that is the whole point of
|
|
69
|
-
* the Run button telling you what is missing.
|
|
70
|
-
*/
|
|
71
|
-
declare function inputMustBeFilled(input: PipeInputContract): boolean;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* The ONE derivation function: `PipeInputContract` map → `RunField[]`.
|
|
75
|
-
*
|
|
76
|
-
* Everything heuristic stays module-private behind `buildRunFields`: the
|
|
77
|
-
* native-concept taxonomy, `isDocumentObject`, the depth-based prose/label
|
|
78
|
-
* rule, the `accept` strings, list splitting. Nothing here is exported except
|
|
79
|
-
* the function itself - so the M1 milestone can swap the source of the
|
|
80
|
-
* descriptor (server-derived) without touching consumers.
|
|
81
|
-
*/
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Convert the API's per-input contracts into the runner's field descriptors.
|
|
85
|
-
* The map's insertion order is preserved (required-first is the caller's job).
|
|
86
|
-
*/
|
|
87
|
-
declare function buildRunFields(inputs: Record<string, PipeInputContract>): RunField[];
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Value readiness - the helpers the runner uses to decide whether the Run
|
|
91
|
-
* button may fire and which inputs are still missing.
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
|
-
/** True when a value is meaningfully filled (not empty / blank / empty container). */
|
|
95
|
-
declare function isFilled(value: unknown): boolean;
|
|
96
|
-
/** True when every required field has a value. */
|
|
97
|
-
declare function fieldFilled(field: RunField, value: unknown): boolean;
|
|
98
|
-
interface Readiness {
|
|
99
|
-
total: number;
|
|
100
|
-
ready: number;
|
|
101
|
-
missing: string[];
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* True when the user must put a value in this field before the run can start.
|
|
105
|
-
*
|
|
106
|
-
* Distinct from `required`, which also drives layout (a required field always
|
|
107
|
-
* shows; an optional one may collapse). A **plural** field stays required - it
|
|
108
|
-
* is a first-class input and keeps its place in the form - but it never gates:
|
|
109
|
-
* a plural slot is never "absent" in MTHDS, its empty form IS the empty list,
|
|
110
|
-
* and no method can declare "at least one item".
|
|
111
|
-
*
|
|
112
|
-
* **For a field this package built, the answer comes from `inputMustBeFilled`**
|
|
113
|
-
* (`contracts.ts`) - the SAME predicate the method viewer's Run button, its ajv
|
|
114
|
-
* `required` list and its missing-inputs toast all read. `buildRunFields`
|
|
115
|
-
* stamps it onto `gating`. This used to be re-derived here as
|
|
116
|
-
* `required && kind !== 'list'`: the same rule expressed against the MAPPED
|
|
117
|
-
* field instead of the contract, and the two could disagree - `kind` is `'list'`
|
|
118
|
-
* for a `conceptRef` ending in `[]` OR an array schema, while the contract's
|
|
119
|
-
* plural test is the array schema alone, so a plural input carrying a non-array
|
|
120
|
-
* schema gated on one surface and not the other.
|
|
121
|
-
*
|
|
122
|
-
* The shape heuristic survives only as the fallback for a **hand-authored**
|
|
123
|
-
* `RunField` - story fixtures and unit tests, which have no contract to consult
|
|
124
|
-
* and therefore nothing to disagree with. Every field a host renders comes from
|
|
125
|
-
* `buildRunFields` and carries `gating`, so a host is on the contract's answer
|
|
126
|
-
* alone.
|
|
127
|
-
*/
|
|
128
|
-
declare function mustBeFilled(field: RunField): boolean;
|
|
129
|
-
/** How many gating top-level inputs are satisfied by the current values. */
|
|
130
|
-
declare function computeReadiness(fields: RunField[], values: Record<string, unknown>): Readiness;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* One validation error, in the shape hosts read (`property`, `message`,
|
|
134
|
-
* `name`, `stack`, `params.format`). Structurally a superset-compatible twin of
|
|
135
|
-
* RJSF's `RJSFValidationError`, so a host surface still holding RJSF form errors
|
|
136
|
-
* (an RJSF-based inputs panel) can hand them to the same message renderer.
|
|
137
|
-
*/
|
|
138
|
-
interface RunInputError {
|
|
139
|
-
/** The ajv keyword that failed (`required`, `format`, `type`, …). */
|
|
140
|
-
name?: string;
|
|
141
|
-
/** Dotted path into the form data (`.quote_date.date`); for a `required`
|
|
142
|
-
* error the missing property name is appended (top-level: no leading dot). */
|
|
143
|
-
property?: string;
|
|
144
|
-
message?: string;
|
|
145
|
-
params?: Record<string, unknown>;
|
|
146
|
-
/** The human line: `property message`, or `'title' message` when the parent
|
|
147
|
-
* schema titles the field. */
|
|
148
|
-
stack: string;
|
|
149
|
-
schemaPath?: string;
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Validate `data` against `schema`, returning mapped errors (empty = valid).
|
|
153
|
-
* MUTATES `data` where ajv coerces (`"20"` → `20`) - deliberate and relied on:
|
|
154
|
-
* the string the user typed is stored as a number going forward.
|
|
155
|
-
*/
|
|
156
|
-
declare function validateRunInputsSchema(data: unknown, schema: object): RunInputError[];
|
|
157
|
-
|
|
158
|
-
type Dict$1 = Record<string, unknown>;
|
|
159
|
-
/**
|
|
160
|
-
* Combine the per-input schemas into one object schema.
|
|
161
|
-
*
|
|
162
|
-
* Each input variable becomes a property, titled with the variable name and
|
|
163
|
-
* described with the concept code. Only the inputs the method actually demands
|
|
164
|
-
* land in `required` - an optional (`?`) or plural (`[]`) input must not block
|
|
165
|
-
* the form (see `inputMustBeFilled`).
|
|
166
|
-
*/
|
|
167
|
-
declare function buildRunInputsSchema(inputs: Record<string, PipeInputContract>): Dict$1;
|
|
168
|
-
/**
|
|
169
|
-
* Last-gate repair, in two passes against the exact schema ajv validates.
|
|
170
|
-
*
|
|
171
|
-
* 1. **HEAL** - persisted `inputData` may still carry the legacy double-wrapped
|
|
172
|
-
* `{ text: { text } }` shape (or a form's state may lag a store fix).
|
|
173
|
-
* 2. **PRUNE** - RJSF fills every unset string with `""` on mount, which an
|
|
174
|
-
* optional CONSTRAINED field rejects (`DateContent.time` is `format: "time"`)
|
|
175
|
-
* - blocking a run on a field the user never opened. An absent optional field
|
|
176
|
-
* is what pipelex means by `None` anyway, so dropping it is the semantically
|
|
177
|
-
* correct repair, not a validation dodge.
|
|
178
|
-
*/
|
|
179
|
-
declare function prepareRunInputs(data: Dict$1, schema: Dict$1): Dict$1;
|
|
180
|
-
interface RunInputsVerdict {
|
|
181
|
-
isValid: boolean;
|
|
182
|
-
/** Variable names the scan could pin a missing required field on. */
|
|
183
|
-
missingInputs: string[];
|
|
184
|
-
/** Raw ajv errors, for when the scan cannot name anything. */
|
|
185
|
-
errors: RunInputError[];
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Validate PREPARED data against the combined schema.
|
|
189
|
-
*
|
|
190
|
-
* `missingInputs` is reported by VARIABLE NAME - the name on the node the user
|
|
191
|
-
* clicks - never by `concept_ref`, which used to produce "Missing required
|
|
192
|
-
* fields in: native.Text" and named neither the input at fault nor, when several
|
|
193
|
-
* inputs share a concept, which of them. Inputs the method declared omittable
|
|
194
|
-
* are skipped: an empty `?` input is not a missing one.
|
|
195
|
-
*
|
|
196
|
-
* The scan can come up empty even on an invalid form (a wrong value shape, a
|
|
197
|
-
* nested mismatch); `errors` is what the caller falls back to then, so a failure
|
|
198
|
-
* is never undiagnosable.
|
|
199
|
-
*/
|
|
200
|
-
declare function validateRunInputs(preparedData: Dict$1, inputs: Record<string, PipeInputContract>, schema: Dict$1): RunInputsVerdict;
|
|
201
|
-
/**
|
|
202
|
-
* Build the `{ concept, content }` map a run expects, from PREPARED data.
|
|
203
|
-
*
|
|
204
|
-
* The two ways a method says "this may be nothing" land differently on the wire:
|
|
205
|
-
* - an **optional (`?`)** input left blank is OMITTED, so the runtime records a
|
|
206
|
-
* real absence the method can branch on - sending `{ text: "" }` would look
|
|
207
|
-
* like the caller supplied an empty string;
|
|
208
|
-
* - a **plural (`[]`)** input keeps its key, because a plural slot is never
|
|
209
|
-
* absent - its empty form IS the empty list, and the runtime requires the key.
|
|
210
|
-
* When that list is EMPTY it is sent BARE, without the envelope: the envelope
|
|
211
|
-
* is the runtime's "explicit form", which bypasses the top-down shaper and
|
|
212
|
-
* hands the value to the bottom-up factory, and that factory types a list from
|
|
213
|
-
* its first item - so an empty list there raises "Cannot create Stuff from
|
|
214
|
-
* empty list in content". The bare form keeps the shaper, which reads the
|
|
215
|
-
* DECLARED concept and builds the empty list correctly. (pipelex/#1096 makes
|
|
216
|
-
* the envelope agree; the bare form runs today and stays correct after.)
|
|
217
|
-
*/
|
|
218
|
-
declare function apiInputsFromSchemaData(preparedData: Dict$1, inputs: Record<string, PipeInputContract>): Dict$1;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Bridges the `MethodRunner`'s field values to the rest of the host.
|
|
222
|
-
*
|
|
223
|
-
* The method-store keeps inputs in the *simplified* format and runs send the
|
|
224
|
-
* *full* RJSF form shape - both already handled by `inflate/deflateAllInputs`.
|
|
225
|
-
* The only gap is that a few field controls use a friendlier value than RJSF: a
|
|
226
|
-
* scalar is the bare scalar where the full shape is the content model its
|
|
227
|
-
* concept declares (`{ text }`, `{ number }`, `{ yes_no }`), and a file is
|
|
228
|
-
* `{ url, filename }`. `fromRjsf`/`toRjsf` translate just those, so store
|
|
229
|
-
* reads/writes and run payloads stay byte-for-byte compatible with the proven
|
|
230
|
-
* playground path.
|
|
231
|
-
*
|
|
232
|
-
* Which property a scalar wraps into is NOT decided here - it arrives on the
|
|
233
|
-
* descriptor as `contentKey`, derived from the contract by `buildRunFields`.
|
|
234
|
-
*
|
|
235
|
-
* Pure module - no React, unit-tested.
|
|
236
|
-
*/
|
|
237
|
-
|
|
238
|
-
type Dict = Record<string, unknown>;
|
|
239
|
-
type InputSchemas = Record<string, PipeInputContract>;
|
|
240
|
-
/** Seed the runner's form values from the method-store's simplified inputData. */
|
|
241
|
-
declare function runValuesFromStore(inputData: Dict | undefined, fields: RunField[], inputSchemas: InputSchemas): Dict;
|
|
242
|
-
/**
|
|
243
|
-
* The runner's form values in **schema shape** - the same shape an RJSF panel
|
|
244
|
-
* holds, and therefore the shape `gate.ts` validates against the per-input
|
|
245
|
-
* JSON Schemas.
|
|
246
|
-
*
|
|
247
|
-
* Deliberately stops short of `deflateAllInputs`: deflation is the STORE's
|
|
248
|
-
* compact form, and ajv validates the full one.
|
|
249
|
-
*/
|
|
250
|
-
declare function rjsfDataFromRunValues(values: Dict, fields: RunField[]): Dict;
|
|
251
|
-
/** Convert the runner's form values back to the store's simplified inputData. */
|
|
252
|
-
declare function storeInputDataFromRunValues(values: Dict, fields: RunField[], inputSchemas: InputSchemas): Dict;
|
|
253
|
-
/**
|
|
254
|
-
* Build the `{ concept, content }` map a run expects from the form values.
|
|
255
|
-
*
|
|
256
|
-
* The two ways a method says "this may be nothing" land differently on the wire,
|
|
257
|
-
* and both matter:
|
|
258
|
-
* - an **optional (`?`)** input left blank is OMITTED, so the runtime records a
|
|
259
|
-
* real absence the method can branch on - sending `{ text: "" }` would look
|
|
260
|
-
* like the caller supplied an empty string;
|
|
261
|
-
* - a **plural (`[]`)** input keeps its key, because a plural slot is never
|
|
262
|
-
* absent - its empty form IS the empty list, and the runtime requires the key.
|
|
263
|
-
* When that list is EMPTY it is sent BARE, without the envelope: the envelope
|
|
264
|
-
* is the runtime's "explicit form", which bypasses the top-down shaper and
|
|
265
|
-
* hands the value to the bottom-up factory, and that factory types a list from
|
|
266
|
-
* its first item - so an empty list there raises "Cannot create Stuff from
|
|
267
|
-
* empty list in content". The bare form keeps the shaper, which reads the
|
|
268
|
-
* DECLARED concept and builds the empty list correctly. (pipelex/#1096 makes
|
|
269
|
-
* the envelope agree; the bare form runs today and stays correct after.)
|
|
270
|
-
*/
|
|
271
|
-
declare function apiInputsFromRunValues(values: Dict, fields: RunField[], inputSchemas: InputSchemas): Record<string, unknown>;
|
|
272
|
-
/** One named output pulled out of a run's working memory, ready to render. */
|
|
273
|
-
interface OutputEntry {
|
|
274
|
-
/** The output variable key (mono). */
|
|
275
|
-
key: string;
|
|
276
|
-
conceptRef?: string;
|
|
277
|
-
value: unknown;
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* Split a run's pipe output into the main result and any intermediate outputs,
|
|
281
|
-
* excluding the inputs. The main output's identity comes from the working
|
|
282
|
-
* memory's `main_stuff` alias (the authoritative pointer to the output variable)
|
|
283
|
-
* - so its label is the REAL stuff name, not a positional guess. Falls back to
|
|
284
|
-
* the last produced stuff only when the alias is absent.
|
|
285
|
-
*/
|
|
286
|
-
declare function outputsFromPipeOutput(pipeOutput: unknown, inputKeys: string[]): {
|
|
287
|
-
main: OutputEntry;
|
|
288
|
-
intermediates: OutputEntry[];
|
|
289
|
-
} | null;
|
|
290
|
-
/**
|
|
291
|
-
* Recover the inputs a run was executed with from its working memory. The run's
|
|
292
|
-
* `working_memory.root` holds every named stuff - inputs AND outputs - keyed by
|
|
293
|
-
* variable name; we pull the entries whose keys are declared inputs and deflate
|
|
294
|
-
* their `content` (the full form shape) back into the store's simplified
|
|
295
|
-
* `inputData`. Lets the runner repopulate the form for a past/shared run - the
|
|
296
|
-
* inputs that produced the result. Returns `null` when no inputs are present.
|
|
297
|
-
*/
|
|
298
|
-
declare function inputDataFromWorkingMemory(workingMemory: unknown, inputSchemas: InputSchemas): Dict | null;
|
|
299
|
-
/** Field descriptors for a method's main pipe. */
|
|
300
|
-
declare function fieldsForContract(contract: PipeIOContract | undefined): RunField[];
|
|
301
|
-
/**
|
|
302
|
-
* Immutably set a value at a dotted/indexed path (`a.0.b`). Used to write an
|
|
303
|
-
* uploaded file's URL back to a field anywhere in the (possibly nested) tree.
|
|
304
|
-
*/
|
|
305
|
-
declare function setValueAtPath(root: Dict, path: string[], value: unknown): Dict;
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Converts between the simplified inputs.json format and the full RJSF form format.
|
|
309
|
-
*
|
|
310
|
-
* The inputs.json file uses a SIMPLIFIED format for users:
|
|
311
|
-
* - Text: "my text" (instead of { text: "my text" })
|
|
312
|
-
* - Document: "file.pdf" or { url: "..." } (instead of { url: "...", ... })
|
|
313
|
-
* - Image: same as Document
|
|
314
|
-
* - Text[]: ["t1", "t2"]
|
|
315
|
-
* - Document[]: ["f1.pdf"] or [{ url: "..." }]
|
|
316
|
-
* - Custom: { concept, content } (no simplification)
|
|
317
|
-
*
|
|
318
|
-
* The RJSF form uses the FULL concept structure from the json_schema.
|
|
319
|
-
*
|
|
320
|
-
* Two directions:
|
|
321
|
-
* - deflate: form (full) → inputs.json (simplified) - for writing inputs.json / API calls
|
|
322
|
-
* - inflate: inputs.json (simplified) → form (full) - for populating the form from inputs.json
|
|
323
|
-
*/
|
|
324
|
-
/**
|
|
325
|
-
* Convert a single form value to the simplified inputs.json format.
|
|
326
|
-
* Used when writing inputs.json and when calling the run API.
|
|
327
|
-
*
|
|
328
|
-
* Rules:
|
|
329
|
-
* - Text { text: "hello" } → "hello"
|
|
330
|
-
* - Document { url: "file.pdf", ... } → "file.pdf" (if only url) or { url, ... }
|
|
331
|
-
* - Image: same as Document
|
|
332
|
-
* - Page: same as Document
|
|
333
|
-
* - List types → array of deflated items
|
|
334
|
-
* - Custom → { concept, content }
|
|
335
|
-
*/
|
|
336
|
-
declare function deflateInput(value: unknown, conceptCode: string): unknown;
|
|
337
|
-
/**
|
|
338
|
-
* Convert a simplified inputs.json value to the full form structure.
|
|
339
|
-
* Used when populating the RJSF form from inputs.json.
|
|
340
|
-
*
|
|
341
|
-
* Rules:
|
|
342
|
-
* - "hello" → { text: "hello" } (for Text concepts)
|
|
343
|
-
* - "file.pdf" → { url: "file.pdf" } (for Document/Image/Page concepts)
|
|
344
|
-
* - { url: "..." } → passthrough (already full)
|
|
345
|
-
* - ["t1", "t2"] → inflated array of items
|
|
346
|
-
* - { concept, content } → content (for custom concepts)
|
|
347
|
-
*/
|
|
348
|
-
declare function inflateInput(value: unknown, conceptCode: string): unknown;
|
|
349
|
-
interface InputSchema {
|
|
350
|
-
concept_ref: string;
|
|
351
|
-
json_schema?: Record<string, unknown>;
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* The validation API returns concept_ref WITHOUT the [] suffix for list inputs.
|
|
355
|
-
* The array-ness is only encoded in json_schema.type === "array".
|
|
356
|
-
* This helper resolves the correct concept ref by checking the schema.
|
|
357
|
-
*/
|
|
358
|
-
declare function resolveConceptCode(schema: InputSchema): string;
|
|
359
|
-
/**
|
|
360
|
-
* Deflate all inputs from form format to simplified inputs.json format.
|
|
361
|
-
* Used by InputConfigPanel when preparing data for the run API.
|
|
362
|
-
*/
|
|
363
|
-
declare function deflateAllInputs(formData: Record<string, unknown>, inputSchemas: Record<string, InputSchema>): Record<string, unknown>;
|
|
364
|
-
/**
|
|
365
|
-
* Heal values against their json_schema: the run-form bridge used to
|
|
366
|
-
* double-wrap plain string properties as `{ text: "..." }` (fixed in
|
|
367
|
-
* run-values.ts, but the corrupted shape survives in persisted inputData -
|
|
368
|
-
* store and server copies). Wherever the schema expects a string but the
|
|
369
|
-
* value is a lone `{ text: string }` wrapper, unwrap it. Walks nested
|
|
370
|
-
* objects and arrays, resolving `#/$defs/...` refs against the root schema;
|
|
371
|
-
* anything already valid passes through untouched.
|
|
372
|
-
*/
|
|
373
|
-
declare function healStringWrappers(value: unknown, rawSchema: Record<string, unknown> | undefined, defs?: Record<string, Record<string, unknown>>): unknown;
|
|
374
|
-
/**
|
|
375
|
-
* Drop optional properties the user never filled, so an untouched field cannot
|
|
376
|
-
* fail validation or reach the API as an empty string.
|
|
377
|
-
*
|
|
378
|
-
* RJSF fills EVERY unset string property with `""` on mount. That is harmless
|
|
379
|
-
* for a plain string, but `prepareSchemaForRjsf` collapses pydantic's
|
|
380
|
-
* `anyOf: [T, null]` by dropping the null branch, so an optional *constrained*
|
|
381
|
-
* field - `DateContent.time`, declared `datetime.time | None` and rendered
|
|
382
|
-
* `{ type: "string", format: "time" }` - is left demanding a well-formed time.
|
|
383
|
-
* `""` is not one, and the run was blocked on a field the user never opened.
|
|
384
|
-
*
|
|
385
|
-
* Pruning is the semantically correct repair, not a validation dodge: for
|
|
386
|
-
* pipelex an absent optional field IS `None`, and `""` would fail pydantic at
|
|
387
|
-
* the runner just as it fails ajv here. Only properties absent from their
|
|
388
|
-
* parent's `required` are dropped - an empty REQUIRED field must still fail, so
|
|
389
|
-
* the user is told about it.
|
|
390
|
-
*
|
|
391
|
-
* What counts as empty is `isEmptyAfterPruning`, and it includes an optional
|
|
392
|
-
* STRUCTURE the user never opened, on exactly the same grounds.
|
|
393
|
-
*/
|
|
394
|
-
declare function pruneEmptyOptionals(value: unknown, rawSchema: Record<string, unknown> | undefined, defs?: Record<string, Record<string, unknown>>): unknown;
|
|
395
|
-
/**
|
|
396
|
-
* Inflate all inputs from simplified inputs.json format to form format.
|
|
397
|
-
* Used by onInputUpdate when receiving inputs.json changes from the sandbox.
|
|
398
|
-
*/
|
|
399
|
-
declare function inflateAllInputs(simplifiedData: Record<string, unknown>, inputSchemas: Record<string, InputSchema>): Record<string, unknown>;
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* Pure conversions between a stored date value and what a native `<input
|
|
403
|
-
* type="date">` shows, plus the leniency rules our schema validation uses.
|
|
404
|
-
* Kept React-free so both the runner's `DateField` and the RJSF `DateWidget`
|
|
405
|
-
* share one source of truth (and it's trivially unit-tested).
|
|
406
|
-
*
|
|
407
|
-
* Two schema shapes reach us, and they are NOT interchangeable:
|
|
408
|
-
* - an MTHDS `type = "date"` structure field compiles to `format: date-time`,
|
|
409
|
-
* so its value round-trips as a full RFC 3339 timestamp;
|
|
410
|
-
* - `native.Date`'s own `date` field is a python `datetime.date`, i.e.
|
|
411
|
-
* `format: date` - a bare `YYYY-MM-DD`.
|
|
412
|
-
*
|
|
413
|
-
* ## Why these rules exist
|
|
414
|
-
*
|
|
415
|
-
* The runtime (pydantic) is LENIENT in both directions, and our client used to
|
|
416
|
-
* be stricter than the contract it was enforcing: `ajv`'s stock `format: "date"`
|
|
417
|
-
* accepts a bare `YYYY-MM-DD` and nothing else, so a hand-written
|
|
418
|
-
* `"2026-07-06T00:00:00Z"` in an `inputs.json` was rejected here even though
|
|
419
|
-
* pydantic accepts it happily and coerces it to `date(2026, 7, 6)`. The run
|
|
420
|
-
* never even reached the runner. These predicates mirror pydantic exactly
|
|
421
|
-
* (measured, not assumed):
|
|
422
|
-
*
|
|
423
|
-
* format: date "2026-07-06" -> date(2026, 7, 6)
|
|
424
|
-
* "2026-07-06T00:00:00Z" -> date(2026, 7, 6)
|
|
425
|
-
* "2026-07-06T00:00:00+02:00" -> date(2026, 7, 6) (literal date, no UTC shift)
|
|
426
|
-
* "2026-07-06T15:40:00Z" -> REJECTED "should have zero time"
|
|
427
|
-
* format: date-time "2026-07-06" -> datetime(2026, 7, 6, 0, 0)
|
|
428
|
-
* "2026-07-06T00:00:00Z" -> datetime(2026, 7, 6, 0, 0, tz)
|
|
429
|
-
*
|
|
430
|
-
* A midnight-padded timestamp is unambiguously "just a day", so take it. A real
|
|
431
|
-
* time is data - refusing it is the point (`DateContentError`: "no silent
|
|
432
|
-
* midnight"), because silently dropping 15:40 corrupts the value. And an
|
|
433
|
-
* ambiguous `06/07/2026` is never accepted by anyone: 6 July or June 7 depends
|
|
434
|
-
* on who's reading, and guessing wrong fails silently.
|
|
435
|
-
*/
|
|
436
|
-
/**
|
|
437
|
-
* The calendar day a value denotes, or `null` when it doesn't denote one.
|
|
438
|
-
* Accepts a bare date or a midnight-padded timestamp; the day is taken
|
|
439
|
-
* LITERALLY from the string (never shifted through a timezone), matching
|
|
440
|
-
* pydantic - `2026-07-06T00:00:00+02:00` is 2026-07-06, not the 5th.
|
|
441
|
-
*/
|
|
442
|
-
declare function asCalendarDate(value: string): string | null;
|
|
443
|
-
/**
|
|
444
|
-
* The calendar day inside a value that carries a REAL time - precisely the case
|
|
445
|
-
* `asCalendarDate` refuses. `null` when the value isn't a timestamp at all, or
|
|
446
|
-
* when it IS already an acceptable day (nothing to report).
|
|
447
|
-
*
|
|
448
|
-
* This exists to EXPLAIN, never to coerce. `2026-07-06T14:30:00+02:00` is
|
|
449
|
-
* rejected for a `format: date` field, and the rejection is right (DT3, "no
|
|
450
|
-
* silent midnight" - dropping 14:30 corrupts the value). But telling the user
|
|
451
|
-
* "pick a valid date" while the picker shows them a perfectly good 06/07/2026
|
|
452
|
-
* reads as a lie: `toDateInputValue` renders the day, the stored value carries
|
|
453
|
-
* the time, and only one of those is what gets validated. Naming both the value
|
|
454
|
-
* we hold and the day it would have to become is what makes the error legible.
|
|
455
|
-
*/
|
|
456
|
-
declare function dayWithinDateTime(value: string): string | null;
|
|
457
|
-
/**
|
|
458
|
-
* What `format: "date"` accepts: a bare `YYYY-MM-DD`, and nothing else.
|
|
459
|
-
*
|
|
460
|
-
* DO NOT relax this to take a midnight-padded timestamp. `DateContent` in
|
|
461
|
-
* pipelex carries a `mode="before"` field validator (`_reject_lax_temporal`)
|
|
462
|
-
* that deliberately CLOSES pydantic's lax coercion for exactly this case:
|
|
463
|
-
*
|
|
464
|
-
* "A Date's `date` field takes a calendar date alone; a string carrying a
|
|
465
|
-
* time (e.g. '2026-07-07T00:00:00') would drop it - put the time and offset
|
|
466
|
-
* in `time` instead."
|
|
467
|
-
*
|
|
468
|
-
* That rule (DT3, "no silent midnight") is the concept's whole point, so a
|
|
469
|
-
* lenient client here does not help anyone: it just forwards the value and the
|
|
470
|
-
* runner answers with a 500 instead of the field saying so up front.
|
|
471
|
-
*
|
|
472
|
-
* The leniency belongs in `asCalendarDate` - normalize the pasted timestamp to
|
|
473
|
-
* the day it denotes, then this passes. Accept-and-fix, not accept-and-forward.
|
|
474
|
-
*/
|
|
475
|
-
declare function isAcceptableDate(value: string): boolean;
|
|
476
|
-
/** What `format: "date-time"` should accept - a bare day is midnight. */
|
|
477
|
-
declare function isAcceptableDateTime(value: string): boolean;
|
|
478
|
-
/** The `YYYY-MM-DD` a native date input shows, from any stored date/date-time. */
|
|
479
|
-
declare function toDateInputValue(value: string | undefined): string;
|
|
480
|
-
/**
|
|
481
|
-
* The value to store for a picked day. A `date-time` field becomes midnight-UTC
|
|
482
|
-
* (`2026-07-06T00:00:00Z`); a plain `date` field keeps the bare `YYYY-MM-DD`.
|
|
483
|
-
* An empty day clears the value.
|
|
484
|
-
*/
|
|
485
|
-
declare function toStoredDateValue(day: string, datetime: boolean): string | undefined;
|
|
486
|
-
|
|
487
|
-
/** The message keys this module renders, relative to the caller's namespace
|
|
488
|
-
* (a host passes its own translator for that namespace). */
|
|
489
|
-
type ValidationMessageKey = 'inputPanel.aDateField' | 'inputPanel.pickValidDate' | 'inputPanel.pickValidDateEmpty' | 'inputPanel.dateCarriesTime' | 'inputPanel.invalidValue' | 'inputPanel.invalidValueWithData';
|
|
490
|
-
/**
|
|
491
|
-
* The translate function the caller injects. Typed on the EXACT keys this
|
|
492
|
-
* module uses - not a loose `(key: string) => string` - for two reasons: a
|
|
493
|
-
* typo'd key still fails the build here, and next-intl's translator (whose
|
|
494
|
-
* `key` parameter is the namespace's real key union, a SUPERSET of these)
|
|
495
|
-
* remains assignable by parameter contravariance. Kernel-owned: this module
|
|
496
|
-
* must not import next-intl's types.
|
|
497
|
-
*/
|
|
498
|
-
type Translate = (key: ValidationMessageKey, values?: Record<string, string>) => string;
|
|
499
|
-
/**
|
|
500
|
-
* The value the validator actually rejected, read back out of the submitted data.
|
|
501
|
-
*
|
|
502
|
-
* RJSF builds `property` from ajv's `instancePath` by swapping `/` for `.`
|
|
503
|
-
* (`.quote_date.date`), so the segments index straight into the form data.
|
|
504
|
-
* Array indices arrive as digit strings and index arrays natively.
|
|
505
|
-
*/
|
|
506
|
-
declare function valueAtProperty(data: unknown, property: string | undefined): unknown;
|
|
507
|
-
/**
|
|
508
|
-
* The rejected value rendered for a toast, or `null` when there is nothing
|
|
509
|
-
* worth showing (an absent or blank value - "you left it empty" is what the
|
|
510
|
-
* message says on its own, and `“”` adds noise).
|
|
511
|
-
*/
|
|
512
|
-
declare function displayValue(value: unknown): string | null;
|
|
513
|
-
/**
|
|
514
|
-
* One validation error as a human line naming the offending value.
|
|
515
|
-
*
|
|
516
|
-
* The date branch is special-cased because ajv's own complaint (`'Date' must
|
|
517
|
-
* match format "date-time"`) is opaque, and because the carries-a-time case has
|
|
518
|
-
* a specific fix the user cannot guess: move the time into the sibling `time`
|
|
519
|
-
* field, which is exactly what the runtime's own error says.
|
|
520
|
-
*/
|
|
521
|
-
declare function describeValidationError(error: RunInputError, t: Translate, formData: unknown): string;
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* The ONE place JSON-Schema plumbing lives for the run form kernel: nullable
|
|
525
|
-
* `anyOf` collapsing, `$defs` collection/hoisting, `$ref` resolution, and type
|
|
526
|
-
* extraction. Consolidated from three drifted private copies (`field-model.ts`,
|
|
527
|
-
* `normalize-schema.ts`, `input-format.ts`) during the form-kernel extraction.
|
|
528
|
-
*
|
|
529
|
-
* Two collapse engines are exported ON PURPOSE - their semantics genuinely
|
|
530
|
-
* differ, and each caller's observable behavior is characterized and preserved
|
|
531
|
-
* (see `schema-utils-characterization.test.ts`):
|
|
532
|
-
*
|
|
533
|
-
* - `collapseNullable` (the field mapper's rule): collapse ONLY when exactly one
|
|
534
|
-
* non-null branch remains, dropping the null. A multi-branch union stays an
|
|
535
|
-
* `anyOf` and maps to the raw-JSON escape hatch.
|
|
536
|
-
* - `flattenAnyOf` (the RJSF/ajv rule): a union of simple primitives becomes a
|
|
537
|
-
* `type` ARRAY (null preserved as a type entry - ajv validates `type:
|
|
538
|
-
* ["number","null"]` natively); a 2-branch nullable non-primitive drops the
|
|
539
|
-
* null branch.
|
|
540
|
-
*
|
|
541
|
-
* Whether these converge (and which semantics win) is an M1 question, decided
|
|
542
|
-
* when the descriptor derivation moves server-side - not silently here.
|
|
543
|
-
*/
|
|
544
|
-
type JsonSchema = Record<string, unknown>;
|
|
545
|
-
/** Pydantic emits `anyOf: [T, {type:'null'}]` for Optional[T]; collapse to T.
|
|
546
|
-
* Collapses ONLY when exactly one non-null branch remains; the branch merges
|
|
547
|
-
* OVER the outer schema (its constraints win). */
|
|
548
|
-
declare function collapseNullable(schema: JsonSchema): JsonSchema;
|
|
549
|
-
/**
|
|
550
|
-
* The RJSF/ajv collapse: a union of simple primitives flattens to a `type`
|
|
551
|
-
* array (`anyOf: [{string},{null}]` → `type: ["string","null"]`, which RJSF
|
|
552
|
-
* renders as a plain input instead of a sub-schema picker); an exactly-two
|
|
553
|
-
* `[T, {null}]` union of anything else drops the null branch and merges T over
|
|
554
|
-
* the outer schema. Anything else passes through unchanged.
|
|
555
|
-
*/
|
|
556
|
-
declare function flattenAnyOf(schema: JsonSchema): JsonSchema;
|
|
557
|
-
/** The schema's non-null type: a bare `type` string, or the first non-null
|
|
558
|
-
* entry of a `type` array (`["number","null"]` → `"number"`). */
|
|
559
|
-
declare function schemaTypeOf(schema: JsonSchema): string | undefined;
|
|
560
|
-
/** Resolve `{ $ref: "#/$defs/Foo" }` against a collected `$defs` map. Sibling
|
|
561
|
-
* keys on the referencing schema override the definition's. */
|
|
562
|
-
declare function derefSchema(schema: JsonSchema, defs: Record<string, JsonSchema>): JsonSchema;
|
|
563
|
-
/**
|
|
564
|
-
* Resolve the indirection layers pydantic puts in front of a value schema - a
|
|
565
|
-
* `#/$defs/...` ref, a nullable `anyOf: [T, {null}]` wrapper, or a stack of
|
|
566
|
-
* both - until a plain schema remains. This is the resolver `healStringWrappers`
|
|
567
|
-
* and `pruneEmptyOptionals` apply before reading `type`. Unlike `derefSchema`
|
|
568
|
-
* it REPLACES the schema with the definition (no sibling merge) - exactly what
|
|
569
|
-
* the callers did inline.
|
|
570
|
-
*/
|
|
571
|
-
declare function resolveSchemaIndirection(schema: JsonSchema, defs: Record<string, JsonSchema>): JsonSchema;
|
|
572
|
-
interface CollectDefsOptions {
|
|
573
|
-
/**
|
|
574
|
-
* Whether the walk descends into JSON arrays (`anyOf`/`allOf` branches,
|
|
575
|
-
* tuple `items`). The field mapper always has (so a def declared inside an
|
|
576
|
-
* `anyOf` branch resolves); the wire-format heal path historically has NOT -
|
|
577
|
-
* both behaviors are characterized, and each caller states its mode
|
|
578
|
-
* explicitly until M1 retires the difference.
|
|
579
|
-
*/
|
|
580
|
-
traverseArrays: boolean;
|
|
581
|
-
}
|
|
582
|
-
/**
|
|
583
|
-
* Collect every nested `$defs` entry into one flat map so `#/$defs/...` refs
|
|
584
|
-
* resolve from anywhere. First definition of a name wins. The input schema is
|
|
585
|
-
* NOT modified (see `hoistDefsToRoot` for the stripping variant).
|
|
586
|
-
*/
|
|
587
|
-
declare function collectSchemaDefs(schema: JsonSchema, into: Record<string, JsonSchema>, options: CollectDefsOptions): Record<string, JsonSchema>;
|
|
588
|
-
/**
|
|
589
|
-
* Hoist every nested `$defs` to the schema root, so a wrapper schema composed
|
|
590
|
-
* from several pydantic sub-schemas keeps its `#/$defs/...` refs resolvable.
|
|
591
|
-
* (Pydantic emits one `$defs` per model; composing models as properties of a
|
|
592
|
-
* wrapper object leaves those maps below the root the refs point to.)
|
|
593
|
-
*/
|
|
594
|
-
declare function hoistDefsToRoot(schema: JsonSchema): JsonSchema;
|
|
595
|
-
|
|
596
|
-
/**
|
|
597
|
-
* Normalizes a JSON Schema for RJSF compatibility.
|
|
598
|
-
*
|
|
599
|
-
* Pydantic v2 generates `anyOf: [{type: "string"}, {type: "null"}]` for optional
|
|
600
|
-
* fields (`str | None`). RJSF renders this as a dropdown selector asking the user
|
|
601
|
-
* to pick a sub-schema, which is terrible UX. The normalizer flattens those
|
|
602
|
-
* patterns on every node (see `flattenAnyOf` in `schema-utils.ts` for the exact
|
|
603
|
-
* rules) and hoists nested `$defs` to the root so composed sub-schemas keep
|
|
604
|
-
* their refs resolvable.
|
|
605
|
-
*
|
|
606
|
-
* The collapse and hoist engines live in `schema-utils.ts` - the
|
|
607
|
-
* consolidated home for the kernel's JSON-Schema plumbing; this module owns the
|
|
608
|
-
* recursive application over a whole schema tree.
|
|
609
|
-
*/
|
|
610
|
-
|
|
611
|
-
/**
|
|
612
|
-
* Recursively normalize a JSON Schema for RJSF.
|
|
613
|
-
* Walks the entire schema tree and flattens anyOf patterns on every node.
|
|
614
|
-
*/
|
|
615
|
-
declare function normalizeSchemaForRjsf(schema: Record<string, unknown>): Record<string, unknown>;
|
|
616
|
-
/**
|
|
617
|
-
* Prepare a schema for RJSF: hoist all nested `$defs` to the root, then normalize
|
|
618
|
-
* anyOf patterns. Call this on any schema that composes multiple sub-schemas
|
|
619
|
-
* (each of which may ship its own `$defs`).
|
|
620
|
-
*/
|
|
621
|
-
declare function prepareSchemaForRjsf(schema: Record<string, unknown>): Record<string, unknown>;
|
|
622
|
-
|
|
623
|
-
export { type CollectDefsOptions, type JsonSchema, type OutputEntry, type PipeIOContract, type PipeIOContracts, type PipeInputContract, type PipeOutputContract, type Readiness, RunField, type RunInputError, type RunInputsVerdict, type Translate, type ValidationMessageKey, apiInputsFromRunValues, apiInputsFromSchemaData, asCalendarDate, buildPipeRef, buildRunFields, buildRunInputsSchema, collapseNullable, collectSchemaDefs, computeReadiness, dayWithinDateTime, deflateAllInputs, deflateInput, derefSchema, describeValidationError, displayValue, fieldFilled, fieldsForContract, flattenAnyOf, getPipeIOContract, healStringWrappers, hoistDefsToRoot, inflateAllInputs, inflateInput, inputDataFromWorkingMemory, inputMustBeFilled, isAcceptableDate, isAcceptableDateTime, isFilled, isPluralInput, mustBeFilled, normalizeSchemaForRjsf, outputsFromPipeOutput, prepareRunInputs, prepareSchemaForRjsf, pruneEmptyOptionals, resolveConceptCode, resolveSchemaIndirection, rjsfDataFromRunValues, runValuesFromStore, schemaTypeOf, setValueAtPath, storeInputDataFromRunValues, toDateInputValue, toStoredDateValue, validateRunInputs, validateRunInputsSchema, valueAtProperty };
|
|
1
|
+
export { BooleanRunField, ConceptCategory, DateRunField, EnumRunField, FileRunField, ListRunField, NumberRunField, ObjectRunField, ProseRunField, RunField, RunFieldCommon, RunFieldKind, TextConstraints, TextRunField, UnknownRunField, conceptCategory } from './descriptor.js';
|
|
2
|
+
export { IOMultiplicity, InputForm, PipeIOContract, PipeIOContracts, PipeInputContract, PipeInputFormDescriptor, PipeOutputContract } from 'mthds/protocol';
|
|
3
|
+
export { buildRunFields, getPipeInputForm } from './derive.js';
|
|
4
|
+
export { Readiness, computeReadiness, fieldFilled, isFilled, mustBeFilled } from './readiness.js';
|
|
5
|
+
export { InputPresence, buildPipeRef, getPipeIOContract, inputMustBeFilled, isFixedCountInput, isOptionalInput, isPluralInput } from './contracts.js';
|
|
6
|
+
export { RunInputsGateResult, RunInputsVerdict, apiInputsFromSchemaData, buildRunInputsSchema, gateRunInputs, prepareRunInputs, validateRunInputs } from './gate.js';
|
|
7
|
+
export { RunInputError, validateRunInputsSchema } from './gate-validator.js';
|
|
8
|
+
export { OutputEntry, apiInputsFromRunValues, fieldsForContract, inputDataFromWorkingMemory, outputsFromPipeOutput, rjsfDataFromRunValues, runValuesFromStore, setValueAtPath, storeInputDataFromRunValues } from './values.js';
|
|
9
|
+
export { deflateAllInputs, deflateInput, healStringWrappers, inflateAllInputs, inflateInput, pruneEmptyOptionals, resolveConceptCode } from './wire-format.js';
|
|
10
|
+
export { asCalendarDate, dayWithinDateTime, isAcceptableDate, isAcceptableDateTime, toDateInputValue, toStoredDateValue } from './date-format.js';
|
|
11
|
+
export { Translate, ValidationMessageKey, describeValidationError, displayValue, valueAtProperty } from './validation-message.js';
|
|
12
|
+
export { CollectDefsOptions, JsonSchema, collapseNullable, collectSchemaDefs, derefSchema, flattenAnyOf, hoistDefsToRoot, resolveSchemaIndirection, schemaTypeOf } from './schema-utils.js';
|
|
13
|
+
export { normalizeSchemaForRjsf, prepareSchemaForRjsf } from './normalize-schema.js';
|
package/dist/core/index.js
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { describeValidationError, displayValue, valueAtProperty } from '../chunk-RPA7DNSK.js';
|
|
2
|
+
export { apiInputsFromRunValues, fieldsForContract, inputDataFromWorkingMemory, outputsFromPipeOutput, rjsfDataFromRunValues, runValuesFromStore, setValueAtPath, storeInputDataFromRunValues } from '../chunk-5Q2W6HBA.js';
|
|
3
|
+
export { buildRunFields, getPipeInputForm } from '../chunk-IIJRJGZQ.js';
|
|
4
|
+
export { conceptCategory } from '../chunk-25I6JDIK.js';
|
|
5
|
+
export { apiInputsFromSchemaData, buildRunInputsSchema, gateRunInputs, prepareRunInputs, validateRunInputs } from '../chunk-IM2AHWBR.js';
|
|
6
|
+
export { normalizeSchemaForRjsf, prepareSchemaForRjsf } from '../chunk-LBFZXYCY.js';
|
|
7
|
+
export { deflateAllInputs, deflateInput, healStringWrappers, inflateAllInputs, inflateInput, pruneEmptyOptionals, resolveConceptCode } from '../chunk-GCXV76WU.js';
|
|
8
|
+
export { computeReadiness, fieldFilled, isFilled, mustBeFilled } from '../chunk-PM55AHRO.js';
|
|
9
|
+
export { validateRunInputsSchema } from '../chunk-VTPUDBSJ.js';
|
|
10
|
+
export { asCalendarDate, dayWithinDateTime, isAcceptableDate, isAcceptableDateTime, toDateInputValue, toStoredDateValue } from '../chunk-GKV77RAS.js';
|
|
11
|
+
import '../chunk-YEVVR6FE.js';
|
|
12
|
+
export { collapseNullable, collectSchemaDefs, derefSchema, flattenAnyOf, hoistDefsToRoot, resolveSchemaIndirection, schemaTypeOf } from '../chunk-OD3VYXUY.js';
|
|
13
|
+
export { buildPipeRef, getPipeIOContract, inputMustBeFilled, isFixedCountInput, isOptionalInput, isPluralInput } from '../chunk-XYQ7NXQZ.js';
|
|
14
|
+
import '../chunk-V3OV2XQT.js';
|
|
2
15
|
//# sourceMappingURL=index.js.map
|
|
3
16
|
//# sourceMappingURL=index.js.map
|