@tai42/studio-sdk 13.3.0 → 15.0.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/dist/components/components.css +19 -0
- package/dist/components/icons.d.ts +2 -0
- package/dist/components/icons.d.ts.map +1 -1
- package/dist/components/icons.js +2 -0
- package/dist/components/icons.js.map +1 -1
- package/dist/components/templated-text-field.d.ts +98 -0
- package/dist/components/templated-text-field.d.ts.map +1 -0
- package/dist/components/templated-text-field.js +217 -0
- package/dist/components/templated-text-field.js.map +1 -0
- package/dist/hooks/useApi.d.ts +461 -59
- package/dist/hooks/useApi.d.ts.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/navigation/types.d.ts +2 -1
- package/dist/navigation/types.d.ts.map +1 -1
- package/dist/query-keys.d.ts +13 -0
- package/dist/query-keys.d.ts.map +1 -1
- package/dist/query-keys.js +13 -0
- package/dist/query-keys.js.map +1 -1
- package/dist/state-binding/AdapterMapping.d.ts +33 -0
- package/dist/state-binding/AdapterMapping.d.ts.map +1 -0
- package/dist/state-binding/AdapterMapping.js +205 -0
- package/dist/state-binding/AdapterMapping.js.map +1 -0
- package/dist/state-binding/BindingJqField.d.ts +43 -0
- package/dist/state-binding/BindingJqField.d.ts.map +1 -0
- package/dist/state-binding/BindingJqField.js +57 -0
- package/dist/state-binding/BindingJqField.js.map +1 -0
- package/dist/state-binding/BindingTemplatedJqField.d.ts +24 -0
- package/dist/state-binding/BindingTemplatedJqField.d.ts.map +1 -0
- package/dist/state-binding/BindingTemplatedJqField.js +7 -0
- package/dist/state-binding/BindingTemplatedJqField.js.map +1 -0
- package/dist/state-binding/InputInjectionRow.d.ts +18 -0
- package/dist/state-binding/InputInjectionRow.d.ts.map +1 -0
- package/dist/state-binding/InputInjectionRow.js +55 -0
- package/dist/state-binding/InputInjectionRow.js.map +1 -0
- package/dist/state-binding/StateAttachRow.d.ts +27 -0
- package/dist/state-binding/StateAttachRow.d.ts.map +1 -0
- package/dist/state-binding/StateAttachRow.js +102 -0
- package/dist/state-binding/StateAttachRow.js.map +1 -0
- package/dist/state-binding/StateBindingEditor.d.ts +37 -0
- package/dist/state-binding/StateBindingEditor.d.ts.map +1 -0
- package/dist/state-binding/StateBindingEditor.js +54 -0
- package/dist/state-binding/StateBindingEditor.js.map +1 -0
- package/dist/state-binding/StateBindingSection.d.ts +14 -0
- package/dist/state-binding/StateBindingSection.d.ts.map +1 -0
- package/dist/state-binding/StateBindingSection.js +17 -0
- package/dist/state-binding/StateBindingSection.js.map +1 -0
- package/dist/state-binding/SubjectScopeFields.d.ts +20 -0
- package/dist/state-binding/SubjectScopeFields.d.ts.map +1 -0
- package/dist/state-binding/SubjectScopeFields.js +8 -0
- package/dist/state-binding/SubjectScopeFields.js.map +1 -0
- package/dist/state-binding/UpdateRow.d.ts +20 -0
- package/dist/state-binding/UpdateRow.d.ts.map +1 -0
- package/dist/state-binding/UpdateRow.js +89 -0
- package/dist/state-binding/UpdateRow.js.map +1 -0
- package/dist/state-binding/adapter.d.ts +93 -0
- package/dist/state-binding/adapter.d.ts.map +1 -0
- package/dist/state-binding/adapter.js +251 -0
- package/dist/state-binding/adapter.js.map +1 -0
- package/dist/state-binding/build-catalog.d.ts +19 -0
- package/dist/state-binding/build-catalog.d.ts.map +1 -0
- package/dist/state-binding/build-catalog.js +43 -0
- package/dist/state-binding/build-catalog.js.map +1 -0
- package/dist/state-binding/catalog.d.ts +26 -0
- package/dist/state-binding/catalog.d.ts.map +1 -0
- package/dist/state-binding/catalog.js +71 -0
- package/dist/state-binding/catalog.js.map +1 -0
- package/dist/state-binding/index.d.ts +33 -0
- package/dist/state-binding/index.d.ts.map +1 -0
- package/dist/state-binding/index.js +20 -0
- package/dist/state-binding/index.js.map +1 -0
- package/dist/state-binding/templated-text-catalog.d.ts +21 -0
- package/dist/state-binding/templated-text-catalog.d.ts.map +1 -0
- package/dist/state-binding/templated-text-catalog.js +48 -0
- package/dist/state-binding/templated-text-catalog.js.map +1 -0
- package/dist/state-binding/types.d.ts +78 -0
- package/dist/state-binding/types.d.ts.map +1 -0
- package/dist/state-binding/types.js +2 -0
- package/dist/state-binding/types.js.map +1 -0
- package/package.json +5 -5
- package/src/components/components.css +19 -0
- package/src/components/icons.tsx +8 -0
- package/src/components/templated-text-field.tsx +508 -0
- package/src/index.ts +76 -1
- package/src/navigation/types.ts +4 -1
- package/src/query-keys.ts +15 -0
- package/src/state-binding/AdapterMapping.tsx +468 -0
- package/src/state-binding/BindingJqField.tsx +146 -0
- package/src/state-binding/BindingTemplatedJqField.tsx +73 -0
- package/src/state-binding/InputInjectionRow.tsx +157 -0
- package/src/state-binding/README.md +46 -0
- package/src/state-binding/StateAttachRow.tsx +289 -0
- package/src/state-binding/StateBindingEditor.tsx +166 -0
- package/src/state-binding/StateBindingSection.tsx +37 -0
- package/src/state-binding/SubjectScopeFields.tsx +57 -0
- package/src/state-binding/UpdateRow.tsx +227 -0
- package/src/state-binding/adapter.ts +276 -0
- package/src/state-binding/build-catalog.ts +59 -0
- package/src/state-binding/catalog.ts +87 -0
- package/src/state-binding/index.ts +67 -0
- package/src/state-binding/templated-text-catalog.ts +69 -0
- package/src/state-binding/types.ts +91 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure catalog helpers — resolve the template jq an attached state offers, with the
|
|
3
|
+
* name-collision rule shared by every layer: an unqualified name that TWO attached
|
|
4
|
+
* templates declare is ambiguous, so both are offered attachment-qualified as
|
|
5
|
+
* `template.name`; a name only one template declares stays bare.
|
|
6
|
+
*/
|
|
7
|
+
import { encodeTemplateSegment } from './adapter';
|
|
8
|
+
import type { BindingTemplateJqOption, BindingTemplateOption } from './types';
|
|
9
|
+
|
|
10
|
+
/** One template jq of an attached template, resolved to the reference a binding stores. */
|
|
11
|
+
export interface ResolvedTemplateJq extends BindingTemplateJqOption {
|
|
12
|
+
/** The owning template. */
|
|
13
|
+
readonly template: string;
|
|
14
|
+
/** The reference a binding writes: `name`, or `template.name` when ambiguous. */
|
|
15
|
+
readonly ref: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Every template jq the given attached templates offer for a purpose (or all
|
|
20
|
+
* purposes when `purpose` is omitted), each carrying the reference a binding stores.
|
|
21
|
+
*/
|
|
22
|
+
export function resolveTemplateJq(
|
|
23
|
+
templateNames: readonly string[],
|
|
24
|
+
catalog: readonly BindingTemplateOption[],
|
|
25
|
+
purpose?: 'input' | 'update',
|
|
26
|
+
): ResolvedTemplateJq[] {
|
|
27
|
+
const chosen = catalog.filter((template) => templateNames.includes(template.name));
|
|
28
|
+
const counts = new Map<string, number>();
|
|
29
|
+
for (const template of chosen) {
|
|
30
|
+
for (const jq of template.templateJq) {
|
|
31
|
+
if (purpose !== undefined && jq.purpose !== purpose) continue;
|
|
32
|
+
counts.set(jq.name, (counts.get(jq.name) ?? 0) + 1);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const resolved: ResolvedTemplateJq[] = [];
|
|
36
|
+
for (const template of chosen) {
|
|
37
|
+
for (const jq of template.templateJq) {
|
|
38
|
+
if (purpose !== undefined && jq.purpose !== purpose) continue;
|
|
39
|
+
const ambiguous = (counts.get(jq.name) ?? 0) > 1;
|
|
40
|
+
resolved.push({
|
|
41
|
+
...jq,
|
|
42
|
+
template: template.name,
|
|
43
|
+
ref: ambiguous ? `${template.name}.${jq.name}` : jq.name,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return resolved;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/** Find one resolved template jq by the reference a binding stores. */
|
|
51
|
+
export function findByRef(
|
|
52
|
+
ref: string,
|
|
53
|
+
resolved: readonly ResolvedTemplateJq[],
|
|
54
|
+
): ResolvedTemplateJq | undefined {
|
|
55
|
+
return resolved.find((entry) => entry.ref === ref);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Resolve a jq call name (`enc(template)__name`, or a bare `name`) back to the catalog
|
|
60
|
+
* ref, driven by the catalog — never by string splitting, since a jq name may carry its
|
|
61
|
+
* own `__` past the template boundary and `enc` maps `-`→`_`. Under the template-slug
|
|
62
|
+
* invariant (no consecutive/trailing hyphens ⇒ `enc(template)` has no `__` and no
|
|
63
|
+
* trailing `_`) the FIRST `__` is the one true boundary, so the longest encoded-template
|
|
64
|
+
* prefix whose remainder is a jq the template declares is the unique qualified match;
|
|
65
|
+
* failing that, a bare name a single template declares. `null` when nothing claims it.
|
|
66
|
+
*/
|
|
67
|
+
export function resolveCallName(
|
|
68
|
+
callName: string,
|
|
69
|
+
catalog: readonly BindingTemplateOption[],
|
|
70
|
+
): string | null {
|
|
71
|
+
let bestRef: string | null = null;
|
|
72
|
+
let bestPrefixLength = -1;
|
|
73
|
+
for (const template of catalog) {
|
|
74
|
+
const prefix = `${encodeTemplateSegment(template.name)}__`;
|
|
75
|
+
if (!callName.startsWith(prefix)) continue;
|
|
76
|
+
const jqName = callName.slice(prefix.length);
|
|
77
|
+
if (template.templateJq.some((jq) => jq.name === jqName) && prefix.length > bestPrefixLength) {
|
|
78
|
+
bestRef = `${template.name}.${jqName}`;
|
|
79
|
+
bestPrefixLength = prefix.length;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (bestRef !== null) return bestRef;
|
|
83
|
+
for (const template of catalog) {
|
|
84
|
+
if (template.templateJq.some((jq) => jq.name === callName)) return callName;
|
|
85
|
+
}
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The shared state-binding editor — the ONE binding shape every door and every flow
|
|
3
|
+
* node authors. Consumed by the platform door screens, the tai42 states surface, and
|
|
4
|
+
* (in the flow engine) the node State tab. Holds no edge to jq; paints from SDK
|
|
5
|
+
* tokens only.
|
|
6
|
+
*/
|
|
7
|
+
export { StateBindingEditor } from './StateBindingEditor';
|
|
8
|
+
export type { StateBindingEditorProps } from './StateBindingEditor';
|
|
9
|
+
export { StateBindingSection } from './StateBindingSection';
|
|
10
|
+
export type { StateBindingSectionProps } from './StateBindingSection';
|
|
11
|
+
export { StateAttachRow } from './StateAttachRow';
|
|
12
|
+
export type { StateAttachRowProps, InheritedSubject } from './StateAttachRow';
|
|
13
|
+
export { InjectionList } from './InputInjectionRow';
|
|
14
|
+
export type { InjectionListProps } from './InputInjectionRow';
|
|
15
|
+
export { UpdateList } from './UpdateRow';
|
|
16
|
+
export type { UpdateListProps } from './UpdateRow';
|
|
17
|
+
export { AdapterMapping } from './AdapterMapping';
|
|
18
|
+
export type { AdapterMappingProps } from './AdapterMapping';
|
|
19
|
+
export { SubjectScopeFields } from './SubjectScopeFields';
|
|
20
|
+
export type { SubjectScopeFieldsProps } from './SubjectScopeFields';
|
|
21
|
+
export { BindingJqField, appendTjq } from './BindingJqField';
|
|
22
|
+
export type { BindingJqFieldProps, TemplateJqSuggestion } from './BindingJqField';
|
|
23
|
+
export { BindingTemplatedJqField } from './BindingTemplatedJqField';
|
|
24
|
+
export type { BindingTemplatedJqFieldProps } from './BindingTemplatedJqField';
|
|
25
|
+
export { resolveTemplateJq, findByRef, resolveCallName } from './catalog';
|
|
26
|
+
export type { ResolvedTemplateJq } from './catalog';
|
|
27
|
+
export { templatedTextCatalog } from './templated-text-catalog';
|
|
28
|
+
export type { StoragePresenceQueryLike, TemplateNamesQueryLike } from './templated-text-catalog';
|
|
29
|
+
export {
|
|
30
|
+
templatesCatalogFromList,
|
|
31
|
+
statesCatalogFromList,
|
|
32
|
+
fieldPathsFromSchema,
|
|
33
|
+
} from './build-catalog';
|
|
34
|
+
export {
|
|
35
|
+
compileAdapter,
|
|
36
|
+
rowValueJq,
|
|
37
|
+
fieldPathToJq,
|
|
38
|
+
jqKey,
|
|
39
|
+
defaultRowsForInput,
|
|
40
|
+
parseAdapter,
|
|
41
|
+
parseFieldPath,
|
|
42
|
+
generateTemplateCall,
|
|
43
|
+
parseTemplateCall,
|
|
44
|
+
encodeTemplateSegment,
|
|
45
|
+
} from './adapter';
|
|
46
|
+
export type {
|
|
47
|
+
MappingRow,
|
|
48
|
+
MappingSource,
|
|
49
|
+
FieldSource,
|
|
50
|
+
LiteralSource,
|
|
51
|
+
JqSource,
|
|
52
|
+
FieldRoot,
|
|
53
|
+
AdapterCompileResult,
|
|
54
|
+
} from './adapter';
|
|
55
|
+
export type {
|
|
56
|
+
BindingStateOption,
|
|
57
|
+
BindingTemplateOption,
|
|
58
|
+
BindingTemplateJqOption,
|
|
59
|
+
BindingSourceSchemas,
|
|
60
|
+
SchemaFieldPath,
|
|
61
|
+
StateBinding,
|
|
62
|
+
StateAttach,
|
|
63
|
+
StateInjection,
|
|
64
|
+
StateUpdate,
|
|
65
|
+
TemplatedText,
|
|
66
|
+
TemplatedTextCatalog,
|
|
67
|
+
} from './types';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds the {@link TemplatedTextCatalog} a door form feeds its templated-text
|
|
3
|
+
* fields, from the two queries every such form already runs: the storage-presence
|
|
4
|
+
* signal (`GET /api/storage`) and the stored-template name list (`GET /api/templates`).
|
|
5
|
+
*
|
|
6
|
+
* Storage is dead by default — a deployment with no storage backend is supported —
|
|
7
|
+
* and the template list door cannot answer without one. So the CALLER gates its
|
|
8
|
+
* template-names query on presence (`enabled: storage.data?.present === true`), and
|
|
9
|
+
* this helper maps the two query states onto the catalog the field reads: when
|
|
10
|
+
* storage is absent it exposes no templates and marks the field absent (the field
|
|
11
|
+
* then offers no stored source); when present it exposes the fetched names. A
|
|
12
|
+
* presence-fetch failure surfaces ahead of a template-fetch failure, since presence
|
|
13
|
+
* is the prerequisite.
|
|
14
|
+
*
|
|
15
|
+
* It takes the query RESULTS structurally (the fields it reads), so this module adds
|
|
16
|
+
* no data-layer dependency to the SDK.
|
|
17
|
+
*/
|
|
18
|
+
import { errorMessage } from '../errors';
|
|
19
|
+
|
|
20
|
+
import type { TemplatedTextCatalog } from './types';
|
|
21
|
+
|
|
22
|
+
/** The storage-presence query result (`GET /api/storage`) fields this helper reads. */
|
|
23
|
+
export interface StoragePresenceQueryLike {
|
|
24
|
+
readonly data?: { readonly present: boolean };
|
|
25
|
+
readonly isPending: boolean;
|
|
26
|
+
readonly isError: boolean;
|
|
27
|
+
readonly error: unknown;
|
|
28
|
+
readonly refetch: () => unknown;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** The stored-template-names query result (`GET /api/templates`) fields this helper reads. */
|
|
32
|
+
export interface TemplateNamesQueryLike {
|
|
33
|
+
readonly data?: readonly string[];
|
|
34
|
+
readonly isPending: boolean;
|
|
35
|
+
readonly isError: boolean;
|
|
36
|
+
readonly error: unknown;
|
|
37
|
+
readonly refetch: () => unknown;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function templatedTextCatalog(
|
|
41
|
+
storage: StoragePresenceQueryLike,
|
|
42
|
+
templates: TemplateNamesQueryLike,
|
|
43
|
+
): TemplatedTextCatalog {
|
|
44
|
+
const presenceKnown = storage.data !== undefined;
|
|
45
|
+
const present = storage.data?.present === true;
|
|
46
|
+
// A presence failure matters only until presence is first known: once it is in
|
|
47
|
+
// hand, a later background-refetch failure must not blow away a field already
|
|
48
|
+
// working from it. Presence is the prerequisite of the catalog, so its failure
|
|
49
|
+
// surfaces ahead of a catalog-fetch failure.
|
|
50
|
+
const presenceFailed = storage.isError && !presenceKnown;
|
|
51
|
+
return {
|
|
52
|
+
// Never expose template names while storage is absent or unknown — the caller's
|
|
53
|
+
// gate keeps the list query from firing there, and its pending/stale data must
|
|
54
|
+
// not leak into a picker the field will not show.
|
|
55
|
+
templates: present ? (templates.data ?? []).map((id) => ({ id })) : [],
|
|
56
|
+
loading: present && templates.isPending,
|
|
57
|
+
error: presenceFailed
|
|
58
|
+
? errorMessage(storage.error)
|
|
59
|
+
: templates.isError
|
|
60
|
+
? errorMessage(templates.error)
|
|
61
|
+
: undefined,
|
|
62
|
+
onRetry: () => {
|
|
63
|
+
if (presenceFailed) void storage.refetch();
|
|
64
|
+
else void templates.refetch();
|
|
65
|
+
},
|
|
66
|
+
storageAbsent: storage.data?.present === false,
|
|
67
|
+
storagePresenceLoading: !presenceKnown && storage.isPending,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The catalog + value types the state-binding editor is fed and edits.
|
|
3
|
+
*
|
|
4
|
+
* The VALUE is the `StateBinding` document (mirrored in `@tai42/api-client`,
|
|
5
|
+
* imported type-only so this package keeps no runtime edge to the client). The
|
|
6
|
+
* CATALOGS are what the consumer resolves from the api-client and hands the editor:
|
|
7
|
+
* the states it may bind, the templates each may attach, and — when a schema is
|
|
8
|
+
* known — the fields a picker offers.
|
|
9
|
+
*/
|
|
10
|
+
import type {
|
|
11
|
+
StateBinding,
|
|
12
|
+
StateAttach,
|
|
13
|
+
StateInjection,
|
|
14
|
+
StateUpdate,
|
|
15
|
+
TemplatedText,
|
|
16
|
+
} from '@tai42/api-client';
|
|
17
|
+
|
|
18
|
+
import type { TemplatedTextTemplateOption } from '../components/templated-text-field';
|
|
19
|
+
|
|
20
|
+
export type { StateBinding, StateAttach, StateInjection, StateUpdate, TemplatedText };
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The stored templates a {@link TemplatedText} field's id picker offers, with the
|
|
24
|
+
* fetch's loading/error state — resolved by the door screen and passed to the
|
|
25
|
+
* editor, which holds no data edge of its own. Absent leaves every templated-text
|
|
26
|
+
* field with the inline source only.
|
|
27
|
+
*/
|
|
28
|
+
export interface TemplatedTextCatalog {
|
|
29
|
+
readonly templates?: readonly TemplatedTextTemplateOption[];
|
|
30
|
+
readonly loading?: boolean;
|
|
31
|
+
readonly error?: string;
|
|
32
|
+
readonly onRetry?: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Storage is registered absent (`GET /api/storage` → `present: false`), so the
|
|
35
|
+
* catalog was not fetched and the stored source is not offered on the fields this
|
|
36
|
+
* catalog feeds; an already-stored id is shown read-only.
|
|
37
|
+
*/
|
|
38
|
+
readonly storageAbsent?: boolean;
|
|
39
|
+
/** Storage presence is not yet known — the fields render a placeholder, not a toggle. */
|
|
40
|
+
readonly storagePresenceLoading?: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** One selectable field of a schema: the record path + a human label. */
|
|
44
|
+
export interface SchemaFieldPath {
|
|
45
|
+
readonly path: readonly string[];
|
|
46
|
+
readonly label: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** One template jq of an attached template, as the pickers present it. */
|
|
50
|
+
export interface BindingTemplateJqOption {
|
|
51
|
+
readonly name: string;
|
|
52
|
+
readonly purpose: 'input' | 'update';
|
|
53
|
+
readonly description?: string;
|
|
54
|
+
/** An `input` jq's declared params / an `update` jq's declared input keys. */
|
|
55
|
+
readonly params?: readonly string[];
|
|
56
|
+
/** An `update` jq's declared write paths, each a list of key segments. */
|
|
57
|
+
readonly writes?: readonly (readonly string[])[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** One template the editor may attach to a state (attach-on-use), with its template jq. */
|
|
61
|
+
export interface BindingTemplateOption {
|
|
62
|
+
readonly name: string;
|
|
63
|
+
readonly description?: string;
|
|
64
|
+
/** Whether this template is already attached to the chosen state (else: attach on save). */
|
|
65
|
+
readonly attached?: boolean;
|
|
66
|
+
readonly templateJq: readonly BindingTemplateJqOption[];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** One state the editor may bind, with the templates already attached to it and its fields. */
|
|
70
|
+
export interface BindingStateOption {
|
|
71
|
+
readonly name: string;
|
|
72
|
+
/** Templates already attached to the state (the rest attach on save). */
|
|
73
|
+
readonly attachedTemplates?: readonly string[];
|
|
74
|
+
/** The state's own record fields, for the `state` source of a field picker. */
|
|
75
|
+
readonly fields?: readonly SchemaFieldPath[];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The schemas a field picker draws from when authoring an injection or an adapter:
|
|
80
|
+
* the run's `output` and `input` fields (the state's fields ride each
|
|
81
|
+
* {@link BindingStateOption}). Absent roots offer no picked field — the author uses
|
|
82
|
+
* a literal or a jq expression instead.
|
|
83
|
+
*/
|
|
84
|
+
export interface BindingSourceSchemas {
|
|
85
|
+
readonly output?: readonly SchemaFieldPath[];
|
|
86
|
+
readonly input?: readonly SchemaFieldPath[];
|
|
87
|
+
/** The tool-schema fetch that feeds the pickers is in flight. */
|
|
88
|
+
readonly loading?: boolean;
|
|
89
|
+
/** The tool-schema fetch failed — the field control shows a note but stays usable. */
|
|
90
|
+
readonly error?: string;
|
|
91
|
+
}
|