@uipath/maestro-builder-sdk 6.96.6 → 6.97.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +2 -1
  2. package/dist/bpmn/check-cli.js +8 -4
  3. package/dist/bpmn/compile-cli.js +4 -3
  4. package/dist/bpmn/decompile-cli.js +15 -1
  5. package/dist/bpmn/decompile-pipeline.d.ts +5 -0
  6. package/dist/bpmn/decompile-pipeline.js +3 -3
  7. package/dist/bpmn/decompile-stamp.d.ts +13 -0
  8. package/dist/bpmn/decompile-stamp.js +8 -0
  9. package/dist/bpmn/decompile.d.ts +17 -4
  10. package/dist/bpmn/decompile.js +9 -4
  11. package/dist/bpmn/merge-cli.js +32 -4
  12. package/dist/bpmn/merge-source.d.ts +2 -0
  13. package/dist/bpmn/merge-source.js +1 -0
  14. package/dist/case/check-cli.js +4 -2
  15. package/dist/case/compile-cli.js +14 -9
  16. package/dist/case/decompile-cli.d.ts +1 -1
  17. package/dist/case/decompile-cli.js +12 -2
  18. package/dist/check-cli.js +12 -6
  19. package/dist/cli/commands/registry.js +2 -0
  20. package/dist/compile-cli.js +16 -10
  21. package/dist/core/agent-sidecar.d.ts +16 -4
  22. package/dist/core/agent-sidecar.js +20 -7
  23. package/dist/core/cli-library.d.ts +18 -2
  24. package/dist/core/cli-library.js +25 -5
  25. package/dist/core/library.d.ts +74 -2
  26. package/dist/core/library.js +88 -11
  27. package/dist/decompile-cli.js +17 -2
  28. package/dist/decompile-stamp.d.ts +13 -0
  29. package/dist/decompile-stamp.js +7 -1
  30. package/dist/emit.js +5 -8
  31. package/dist/merge-cli.js +51 -1
  32. package/dist/nodes/agent/flow/check.js +13 -2
  33. package/dist/registry/curated-overlay.d.ts +11 -0
  34. package/dist/registry/curated-overlay.js +27 -0
  35. package/dist/registry/describe-cli.d.ts +3 -0
  36. package/dist/registry/describe-cli.js +38 -6
  37. package/dist/registry/fetch/fetch-connectors.d.ts +21 -0
  38. package/dist/registry/fetch/fetch-connectors.js +84 -0
  39. package/dist/registry/fetch/fetch-definitions.d.ts +61 -0
  40. package/dist/registry/fetch/fetch-definitions.js +447 -0
  41. package/dist/registry/fetch/flow-requests.d.ts +14 -0
  42. package/dist/registry/fetch/flow-requests.js +81 -0
  43. package/dist/registry/fetch/with-fetched-definitions.d.ts +46 -0
  44. package/dist/registry/fetch/with-fetched-definitions.js +211 -0
  45. package/dist/registry/library-build/events.d.ts +9 -2
  46. package/dist/registry/library-build/events.js +4 -10
  47. package/dist/registry/pull-cli.d.ts +9 -0
  48. package/dist/registry/pull-cli.js +150 -10
  49. package/dist/registry/search-cli.d.ts +25 -0
  50. package/dist/registry/search-cli.js +94 -10
  51. package/package.json +4 -3
package/dist/merge-cli.js CHANGED
@@ -87,6 +87,10 @@ import { readFlowFile } from './decompile-file.js';
87
87
  import { readFlowStamp, restampFlowSource, sourceDigest, STAMP_MARKER } from './decompile-stamp.js';
88
88
  import { ensureTypeScriptRuntime } from './node-runtime.js';
89
89
  import { flowCheckOpts, openCliLibrary } from './cli-library.js';
90
+ import { FETCHED_PROVENANCE } from './core/library.js';
91
+ import { flowConnectorRequests, hidesLacked } from './registry/fetch/flow-requests.js';
92
+ import { fetchDefinitionsEnabled } from './registry/fetch/fetch-definitions.js';
93
+ import { openWithFetchedDefinitions, withFetchedDefinitions } from './registry/fetch/with-fetched-definitions.js';
90
94
  import { Bindings } from './bindings.js';
91
95
  import { defaultBindingsFile } from './workdir.js';
92
96
  import { loadNodePackages } from './node-packages.js';
@@ -276,7 +280,29 @@ export async function run(argv) {
276
280
  // source; both load TypeScript, so both need the type-stripping runtime.
277
281
  if (derivedFrom || editedIsSource)
278
282
  ensureTypeScriptRuntime();
279
- const library = derivedFrom || editedIsSource ? openCliLibrary(argv) : undefined;
283
+ const fetchedLibrary = derivedFrom || editedIsSource ? await mergeLibrary(argv, originalPath, editedIsSource ? resolve(editedPath) : undefined) : undefined;
284
+ // Both sides compile against the library as decompile saw it: the operations
285
+ // its stamp records as lacked (carried from the file) are hidden, whatever has
286
+ // been fetched or prepared for them since. So the baseline gives back the
287
+ // stamped source, and an untouched carried step compiles from what it carries
288
+ // on both sides rather than from the tenant on one (decompile-stamp.ts).
289
+ const lacked = stamp?.lacked ?? [];
290
+ // A stamp from before fetching records no `lacked`: that decompile saw no
291
+ // fetched row at all, so those are what is hidden.
292
+ const preFetch = stamp !== undefined && !stamp.fetch;
293
+ const hide = preFetch
294
+ ? (row) => row.provenance === FETCHED_PROVENANCE
295
+ : hidesLacked(lacked);
296
+ const library = (lacked.length > 0 || preFetch) && fetchedLibrary !== undefined
297
+ ? openCliLibrary(argv, {
298
+ always: true,
299
+ hide,
300
+ missNote: (nodeType) => (hidesLacked(lacked)({ nodeType })
301
+ ? 'This source carries it from the file it was decompiled from; '
302
+ + 'to compile a step against the tenant’s definition, decompile the original again.'
303
+ : undefined),
304
+ })
305
+ : fetchedLibrary;
280
306
  const bindings = derivedFrom || editedIsSource ? new Bindings(flagValue(argv, '--bindings') ?? defaultBindingsFile()) : undefined;
281
307
  const compileOpts = { library, bindings };
282
308
  // Resolved as decompile resolves it, so a split `.flow` merges as the document the
@@ -563,3 +589,27 @@ function onNode(r) {
563
589
  return { nodeId: r.nodeId ?? '', code: r.code, message: r.message };
564
590
  }
565
591
  runWhenInvokedDirectly(import.meta.url, 'flow-merge', run);
592
+ /**
593
+ * The library merge compiles with, holding every connector definition either
594
+ * side needs (docs/CONNECTOR_LIBRARY_OPTIONAL_DESIGN.md).
595
+ *
596
+ * The original's operations are read from the file and fetched through `uip`
597
+ * when no layer carries them, as `flow decompile` fetches them, so the derived
598
+ * baseline is decompiled and compiled against what the tenant serves. An edited
599
+ * `.flow.ts` can name an operation the original did not: one compile of it with
600
+ * a recording library finds those, and they are fetched too. With the fetch off
601
+ * this is `openCliLibrary(argv)`, as before.
602
+ */
603
+ async function mergeLibrary(argv, originalPath, editedSource) {
604
+ const original = readFlowFile(originalPath);
605
+ // One set of notes for both steps, so the merge's refusal of an operation the
606
+ // edit added still says why it could not be fetched.
607
+ const notes = new Map();
608
+ const library = await openWithFetchedDefinitions(argv, flowConnectorRequests(original), { who: 'flow-merge', notes });
609
+ if (editedSource === undefined || !fetchDefinitionsEnabled())
610
+ return library;
611
+ // A recording pass only, its result discarded: the merge compiles with the
612
+ // library opened after it, which reads whatever it fetched.
613
+ await withFetchedDefinitions(argv, (pass) => compileSourceDraftTolerant(editedSource, { library: pass }), { who: 'flow-merge', notes });
614
+ return openWithFetchedDefinitions(argv, flowConnectorRequests(original), { who: 'flow-merge', notes });
615
+ }
@@ -540,9 +540,20 @@ export function checkInlineAgent(inputs, ctx) {
540
540
  }
541
541
  // The definition's own `required`: systemPrompt, userPrompt, model — each with
542
542
  // `minLength: 1`, so a blank string is as invalid as a missing key.
543
+ //
544
+ // `model` is the whole truth here, not only the node's copy: compile writes it
545
+ // into the agent's `<source>/agent.json` (`settings.model`), and decompile
546
+ // fills it from that file when the node carries none (`agentSidecarInputs`).
547
+ // So a blank one means no model anywhere: compile would write
548
+ // `"model": ""`. `uip maestro flow validate` accepts that (uip 1.205.0, with
549
+ // and without the sidecar beside the .flow), so this check is the only place
550
+ // it is said.
543
551
  if (blank(inputs?.model)) {
544
- at('INLINE_AGENT_NO_MODEL', `Inline agent step "${step}" has no \`model\`. The node's definition requires one (\`minLength: 1\`), so `
545
- + `a flow without it does not validate. \`uip agent model list\` shows what the tenant offers.`, `model: 'gpt-5.4'`);
552
+ at('INLINE_AGENT_NO_MODEL', `Inline agent step "${step}" has no \`model\`. The node's definition requires one (\`minLength: 1\`), and `
553
+ + `compile writes it as the agent's \`settings.model\` in \`<source>/agent.json\`, so the agent would be `
554
+ + `saved with \`"model": ""\`. \`uip maestro flow validate\` does not catch this. If the flow came from `
555
+ + `decompile, its agent project (\`<source>/agent.json\`) was not beside the .flow: decompile reads the `
556
+ + `model from there. \`uip agent model list\` shows what the tenant offers.`, `model: 'gpt-5.4'`);
546
557
  }
547
558
  if (blank(inputs?.systemPrompt)) {
548
559
  at('INLINE_AGENT_NO_SYSTEM_PROMPT', `Inline agent step "${step}" has no \`systemPrompt\`. The node's definition requires one `
@@ -105,3 +105,14 @@ export interface CuratedOverlayCheck {
105
105
  * because readers that load that archive directly apply no overlay.
106
106
  */
107
107
  export declare function checkCuratedOverlay(libraryPath: string, overlayPath?: string): Promise<CuratedOverlayCheck>;
108
+ /**
109
+ * The curated overlay's two connection-free contributions to a library that
110
+ * was not pulled: the corrections ledger's patches for the entries `libraryPath`
111
+ * holds, and the side-tables, each copied only when `libraryPath` has none.
112
+ *
113
+ * For a partial library fetched one operation at a time through `uip`
114
+ * (`registry/fetch/`), where {@link applyCuratedOverlay} would be wrong: it also
115
+ * adds every definition this directory carries, and those are fixtures, not
116
+ * operations the tenant was asked about. Returns the corrected entry paths.
117
+ */
118
+ export declare function applyCorrectionsAndSideTables(libraryPath: string, sideTablesTo: string, overlayPath?: string): Promise<string[]>;
@@ -444,3 +444,30 @@ export async function checkCuratedOverlay(libraryPath, overlayPath = bundledOver
444
444
  }
445
445
  return { missing, staleCorrections };
446
446
  }
447
+ /**
448
+ * The curated overlay's two connection-free contributions to a library that
449
+ * was not pulled: the corrections ledger's patches for the entries `libraryPath`
450
+ * holds, and the side-tables, each copied only when `libraryPath` has none.
451
+ *
452
+ * For a partial library fetched one operation at a time through `uip`
453
+ * (`registry/fetch/`), where {@link applyCuratedOverlay} would be wrong: it also
454
+ * adds every definition this directory carries, and those are fixtures, not
455
+ * operations the tenant was asked about. Returns the corrected entry paths.
456
+ */
457
+ export async function applyCorrectionsAndSideTables(libraryPath, sideTablesTo, overlayPath = bundledOverlayPath()) {
458
+ const corrected = [];
459
+ for (const correction of await readOverlayCorrections(overlayPath)) {
460
+ if (!(await exists(join(libraryPath, correction.path))))
461
+ continue;
462
+ if ((await patchCorrection(libraryPath, overlayPath, correction)).added.length > 0)
463
+ corrected.push(correction.path);
464
+ }
465
+ for (const table of SIDE_TABLES) {
466
+ const target = join(sideTablesTo, table);
467
+ if (await exists(target))
468
+ continue;
469
+ await mkdir(sideTablesTo, { recursive: true });
470
+ await cp(join(overlayPath, table), target);
471
+ }
472
+ return sortedStrings(corrected);
473
+ }
@@ -6,5 +6,8 @@
6
6
  * `connectors-local` overlay first, then the library. So after `registry prepare`
7
7
  * it shows the connection's real fields. It is rendered from the entry on each call,
8
8
  * so it needs no `library-md` tree and no file the agent must keep a path to.
9
+ *
10
+ * An operation no layer carries is fetched through `uip` into `connectors-local`
11
+ * first, and its page says it came from the tenant.
9
12
  */
10
13
  export declare function run(argv: string[]): Promise<number>;
@@ -1,6 +1,10 @@
1
1
  import { printResult, reportResult } from '../cli-result.js';
2
2
  import { flagValue } from '../cli-run.js';
3
3
  import { openCliLibrary } from '../core/cli-library.js';
4
+ import { existsSync } from 'node:fs';
5
+ import { join } from 'node:path';
6
+ import { FETCHED_SOURCE, fetchableNodeType } from './fetch/fetch-definitions.js';
7
+ import { openWithFetchedDefinitions } from './fetch/with-fetched-definitions.js';
4
8
  import { PULL_COMMAND } from '../core/cli-spelling.js';
5
9
  import { renderMarkdownPage } from './generators/markdown/index.js';
6
10
  import { symbolIndex } from './naming.js';
@@ -12,28 +16,56 @@ import { symbolIndex } from './naming.js';
12
16
  * `connectors-local` overlay first, then the library. So after `registry prepare`
13
17
  * it shows the connection's real fields. It is rendered from the entry on each call,
14
18
  * so it needs no `library-md` tree and no file the agent must keep a path to.
19
+ *
20
+ * An operation no layer carries is fetched through `uip` into `connectors-local`
21
+ * first, and its page says it came from the tenant.
15
22
  */
16
23
  export async function run(argv) {
17
24
  const nodeType = argv[0];
18
- const library = openCliLibrary(argv);
25
+ // An operation no layer carries is fetched through `uip` first, so a page can
26
+ // be read with no library pulled (docs/CONNECTOR_LIBRARY_OPTIONAL_DESIGN.md).
27
+ const library = nodeType && !nodeType.startsWith('-')
28
+ ? await openWithFetchedDefinitions(argv, [{ nodeType, ...(flagValue(argv, '--object') ? { objectName: flagValue(argv, '--object') } : {}) }], { who: 'registry describe' })
29
+ : openCliLibrary(argv);
19
30
  if (!library) {
20
31
  console.error(`No connector library is cached. Run \`${PULL_COMMAND}\`, or pass --library <dir>.`);
21
32
  return 2;
22
33
  }
23
34
  let source;
35
+ let derived = false;
24
36
  try {
25
37
  source = library.pageSource(nodeType, flagValue(argv, '--connector-version'), flagValue(argv, '--object'));
26
38
  }
27
39
  catch (error) {
28
- console.error(error instanceof Error ? error.message : String(error));
29
- return 1;
40
+ // A start trigger is held (and fetched) as its wait form, which the start
41
+ // form is derived from: show that page, and say so.
42
+ const wait = fetchableNodeType(nodeType);
43
+ try {
44
+ if (wait === nodeType)
45
+ throw error;
46
+ source = library.pageSource(wait, flagValue(argv, '--connector-version'), flagValue(argv, '--object'));
47
+ derived = true;
48
+ }
49
+ catch {
50
+ console.error(error instanceof Error ? error.message : String(error));
51
+ return 1;
52
+ }
30
53
  }
54
+ const fetched = source.entry?.provenance?.source === FETCHED_SOURCE;
31
55
  // The symbol names `prepare`'s module exports: it counts GenericExpanded entries only when the overlay has one.
56
+ // A fetched definition has a module only once `registry pull` generated it; without one the page's example uses
57
+ // the string form, so it never imports a module that is not there.
58
+ const key = source.entry?.connector?.key;
59
+ const hasModule = !fetched || (typeof key === 'string' && existsSync(join(source.dir, `${key}.ts`)));
32
60
  const expanded = source.prepared && source.rows.some((e) => e?.activityType === 'GenericExpanded');
33
- const body = renderMarkdownPage(source.entry, source.v1def, { symbols: symbolIndex(source.rows, expanded), invariant: source.invariant });
61
+ const symbols = hasModule ? symbolIndex(source.rows, expanded) : new Map();
62
+ const body = renderMarkdownPage(source.entry, source.v1def, { symbols, invariant: source.invariant });
34
63
  // No path: on a browser host it names a store the agent cannot open.
35
- const origin = source.prepared ? 'the prepared copy from `registry prepare`' : 'the connector library';
36
- const page = `> Source: ${origin}\n\n${body.replace(/\n$/, '')}`;
64
+ const origin = fetched
65
+ ? 'the tenant, fetched through uip'
66
+ : source.prepared ? 'the prepared copy from `registry prepare`' : 'the connector library';
67
+ const note = derived ? `\n> ${nodeType} starts a flow; it is derived from this wait-form operation, which it shares its inputs with.` : '';
68
+ const page = `> Source: ${origin}${note}\n\n${body.replace(/\n$/, '')}`;
37
69
  // The page alone, so `uip … --output plain` prints just the Markdown.
38
70
  reportResult({ page });
39
71
  printResult(page);
@@ -0,0 +1,21 @@
1
+ import { type Reporter } from "../reporter.js";
2
+ import { type UipClient } from "../uip/client.js";
3
+ import { type FetchDefinitionsResult } from "./fetch-definitions.js";
4
+ export interface FetchConnectorsOptions {
5
+ overlayDir: string;
6
+ /** The module specifier the generated `<key>.ts` modules import the SDK by. */
7
+ importSpecifier: string;
8
+ client?: UipClient;
9
+ reporter?: Reporter;
10
+ timeoutMs?: number;
11
+ /** Node types not to fetch: the ones a library layer already holds. */
12
+ skip?: (nodeType: string) => boolean;
13
+ }
14
+ export interface FetchConnectorsResult extends FetchDefinitionsResult {
15
+ /** Connector keys the tenant's catalog lists nothing for, sorted. */
16
+ unlisted: string[];
17
+ /** The typed modules written into the overlay. */
18
+ modules: string[];
19
+ }
20
+ /** Fetch every operation the tenant serves for `keys` into `overlayDir`. */
21
+ export declare function fetchConnectors(keys: readonly string[], options: FetchConnectorsOptions): Promise<FetchConnectorsResult>;
@@ -0,0 +1,84 @@
1
+ /**
2
+ * `registry pull` for a connector when there is no library to pull it from:
3
+ * every action and event the tenant serves for it, fetched into
4
+ * `connectors-local`, with the typed modules an author imports.
5
+ *
6
+ * The connector's operations are what `uip maestro flow registry search <key>`
7
+ * lists — the tenant's live catalog, which on Automation Suite is the curated
8
+ * one. Each is fetched by {@link fetchDefinitions}, so this writes exactly what
9
+ * a later compile would have fetched on its own, ahead of time, plus the
10
+ * modules (`<key>.ts`) that `registry prepare` writes beside them.
11
+ */
12
+ import { regenerateDescriptors } from "../prepare/regenerate.js";
13
+ import { existsSync } from "node:fs";
14
+ import { join } from "node:path";
15
+ import { catalogServesNothing, refreshRegistryCatalog, registryCatalog } from "../prepare/actions.js";
16
+ import { INDEX_FILENAME } from "../prepare/overlay.js";
17
+ import { silentReporter } from "../reporter.js";
18
+ import { defaultUipClient } from "../uip/client.js";
19
+ import { fetchDefinitions, uipUnavailableReason, } from "./fetch-definitions.js";
20
+ /** Fetch every operation the tenant serves for `keys` into `overlayDir`. */
21
+ export async function fetchConnectors(keys, options) {
22
+ const empty = { fetched: [], notServed: [], failed: [], unlisted: [], modules: [] };
23
+ if (keys.length === 0)
24
+ return empty;
25
+ const client = options.client ?? defaultUipClient();
26
+ const reporter = options.reporter ?? silentReporter;
27
+ const unavailable = await uipUnavailableReason(client);
28
+ if (unavailable !== undefined)
29
+ return { ...empty, unavailable };
30
+ const requests = [];
31
+ const unlisted = [];
32
+ const failed = [];
33
+ // `registry search` answers from uip's copy of the tenant catalog, refetched
34
+ // when it is older than 30 minutes or another tenant's. A connector it lists
35
+ // nothing for is believed only after one `registry pull --force`, as
36
+ // `prepare` does; a refresh that fails or is partial makes it a failure.
37
+ let refresh;
38
+ for (const key of [...new Set(keys)].sort()) {
39
+ let catalog = await registryCatalog(client, key, options.timeoutMs);
40
+ if (catalog.failure === undefined && catalogServesNothing(catalog)) {
41
+ refresh ??= await refreshRegistryCatalog(client, options.timeoutMs);
42
+ catalog = await registryCatalog(client, key, options.timeoutMs);
43
+ const doubt = !refresh.ok ? `the catalog refresh failed: ${refresh.reason}` : refresh.partial;
44
+ if (catalogServesNothing(catalog) && doubt !== undefined) {
45
+ failed.push({ nodeType: key, reason: `uip's catalog lists nothing for it, and ${doubt}` });
46
+ continue;
47
+ }
48
+ }
49
+ if (catalog.failure !== undefined) {
50
+ failed.push({ nodeType: key, reason: catalog.failure });
51
+ continue;
52
+ }
53
+ if (catalogServesNothing(catalog)) {
54
+ unlisted.push(key);
55
+ continue;
56
+ }
57
+ const wanted = (nodeType) => !options.skip?.(nodeType);
58
+ for (const action of catalog.actions) {
59
+ const nodeType = `uipath.connector.${key}.${action}`;
60
+ if (wanted(nodeType))
61
+ requests.push({ nodeType });
62
+ }
63
+ // The wait form: what `registry get` serves without a connection, and what
64
+ // the library derives a start trigger from.
65
+ for (const event of catalog.events) {
66
+ const nodeType = `uipath.connector.event.${key}.${event.id}`;
67
+ if (wanted(nodeType))
68
+ requests.push({ nodeType });
69
+ }
70
+ }
71
+ const fetched = await fetchDefinitions(requests, {
72
+ overlayDir: options.overlayDir,
73
+ client,
74
+ reporter,
75
+ ...(options.timeoutMs !== undefined ? { timeoutMs: options.timeoutMs } : {}),
76
+ });
77
+ // Whenever the overlay holds anything, not only when this call added to it:
78
+ // a module deleted, or an overlay `prepare --json-only` wrote, still gets one,
79
+ // and a changed import specifier applies.
80
+ const modules = existsSync(join(options.overlayDir, INDEX_FILENAME))
81
+ ? regenerateDescriptors(options.overlayDir, options.importSpecifier)
82
+ : [];
83
+ return { ...fetched, failed: [...failed, ...fetched.failed], unlisted, modules };
84
+ }
@@ -0,0 +1,61 @@
1
+ import { type Reporter } from "../reporter.js";
2
+ import { type UipClient } from "../uip/client.js";
3
+ /** The provenance every fetched entry carries. */
4
+ export declare const FETCHED_SOURCE = "uip-fetch";
5
+ /** Set `FLOW_SDK_FETCH_DEFINITIONS=0` to never call `uip` for a missing definition. */
6
+ export declare const FETCH_DEFINITIONS_ENV = "FLOW_SDK_FETCH_DEFINITIONS";
7
+ /** Whether a missing definition may be fetched through `uip` in this process. */
8
+ export declare function fetchDefinitionsEnabled(env?: Record<string, string | undefined>): boolean;
9
+ /** One node type to fetch, as `Library`'s `onMiss` reports it. */
10
+ export interface DefinitionRequest {
11
+ nodeType: string;
12
+ version?: string;
13
+ objectName?: string;
14
+ }
15
+ export interface FetchDefinitionsOptions {
16
+ /** The `connectors-local` directory to merge into; created when missing. */
17
+ overlayDir: string;
18
+ client?: UipClient;
19
+ reporter?: Reporter;
20
+ /** Parallel `uip` calls. */
21
+ concurrency?: number;
22
+ timeoutMs?: number;
23
+ }
24
+ export interface FetchDefinitionsResult {
25
+ /** Node types written into the overlay, sorted. */
26
+ fetched: string[];
27
+ /** Node types the tenant answered "not found" for, sorted. */
28
+ notServed: string[];
29
+ /**
30
+ * Why nothing could be asked, when nothing could: `uip` is not installed, or
31
+ * not logged in. Set only when no request reached the tenant.
32
+ */
33
+ unavailable?: string;
34
+ /** Node types whose fetch failed for another reason, with the reason. */
35
+ failed: Array<{
36
+ nodeType: string;
37
+ reason: string;
38
+ }>;
39
+ }
40
+ /**
41
+ * The node type to ask the registry for: a start trigger as its wait form.
42
+ * `registry get` refuses the start form without `--connection-id`, and the
43
+ * library derives the start form from the wait form (`Library.resolveEvent`).
44
+ */
45
+ export declare function fetchableNodeType(nodeType: string): string;
46
+ /** Why `uip` cannot be asked anything, or `undefined` when it is logged in. */
47
+ export declare function uipUnavailableReason(client: UipClient): Promise<string | undefined>;
48
+ /**
49
+ * Fetch every requested node type the tenant serves into `overlayDir`.
50
+ *
51
+ * Never throws for a tenant answer: a node type the tenant does not serve is
52
+ * `notServed`, any other failure is `failed`, and a `uip` that cannot be asked
53
+ * at all is `unavailable`. The caller turns those into its own refusals.
54
+ *
55
+ * `registry get` answers from `uip`'s local copy of the tenant catalog, so a
56
+ * "not found" is believed only after one `uip maestro flow registry pull
57
+ * --force` and a second probe, as `prepare` does (`prepare/actions.ts`). When
58
+ * that refresh fails, or writes only part of the catalog, a node type still
59
+ * not found is `failed` with the reason, not `notServed`.
60
+ */
61
+ export declare function fetchDefinitions(requests: readonly DefinitionRequest[], options: FetchDefinitionsOptions): Promise<FetchDefinitionsResult>;