@uipath/maestro-builder-sdk 6.66.6 → 6.66.8

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 (41) hide show
  1. package/dist/bindings-v2.d.ts +15 -1
  2. package/dist/bindings-v2.js +29 -6
  3. package/dist/bpmn/check.js +16 -113
  4. package/dist/bpmn/serialize.d.ts +41 -0
  5. package/dist/bpmn/serialize.js +103 -1
  6. package/dist/bpmn/typed-node.d.ts +12 -0
  7. package/dist/bpmn/typed-node.js +24 -0
  8. package/dist/case/check.js +5 -40
  9. package/dist/case/serialize.js +6 -0
  10. package/dist/case/task-shape.d.ts +31 -0
  11. package/dist/case/task-shape.js +48 -0
  12. package/dist/check.js +7 -43
  13. package/dist/core/agent-sidecar.d.ts +13 -3
  14. package/dist/core/agent-sidecar.js +10 -0
  15. package/dist/core/compile-refusal.d.ts +25 -0
  16. package/dist/core/compile-refusal.js +19 -0
  17. package/dist/core/process-resource.d.ts +9 -0
  18. package/dist/core/process-resource.js +4 -0
  19. package/dist/core/refusals.d.ts +47 -44
  20. package/dist/core/refusals.js +47 -44
  21. package/dist/nodes/agent/flow/check.js +14 -42
  22. package/dist/nodes/agent/flow/inline-agent.js +62 -1
  23. package/dist/nodes/agent/flow/spec.d.ts +1 -1
  24. package/dist/nodes/connector/flow/node-type.js +5 -3
  25. package/dist/nodes/data-fabric/flow/check.js +2 -4
  26. package/dist/nodes/data-fabric/flow/shared.d.ts +9 -4
  27. package/dist/nodes/data-fabric/flow/shared.js +14 -4
  28. package/dist/nodes/document/flow/ixp.js +20 -9
  29. package/dist/nodes/hitl/flow/check.js +29 -110
  30. package/dist/nodes/hitl/flow/node-type.js +170 -3
  31. package/dist/nodes/process/flow/check.js +15 -80
  32. package/dist/nodes/process/flow/node-type.js +4 -0
  33. package/dist/nodes/process/flow/refusals.d.ts +8 -0
  34. package/dist/nodes/process/flow/refusals.js +92 -0
  35. package/dist/nodes/queue/flow/check.d.ts +25 -0
  36. package/dist/nodes/queue/flow/check.js +48 -18
  37. package/dist/nodes/queue/flow/node-type.js +13 -1
  38. package/dist/nodes/transform/flow/check.js +31 -43
  39. package/dist/nodes/transform/flow/node-type.js +35 -9
  40. package/dist/serialize.js +172 -20
  41. package/package.json +2 -2
@@ -46,21 +46,21 @@ import { ownEntry } from './own-entry.js';
46
46
  * code means the same condition in each.
47
47
  */
48
48
  export const REFUSALS = {
49
- ACTION_FIELD_UNKNOWN_KEY: 'lint',
49
+ ACTION_FIELD_UNKNOWN_KEY: 'lowering',
50
50
  AGENTIC_EMPTY_RETURNS: 'lint',
51
51
  AGENTIC_KEY_NOT_KEY: 'lint',
52
52
  AGENTIC_LOCAL_FORM_UNVERIFIED: 'lint',
53
- AGENTIC_LOCAL_HAS_FOLDER: 'lint',
53
+ AGENTIC_LOCAL_HAS_FOLDER: 'lowering',
54
54
  AGENTIC_LOCAL_NO_PROJECT_ID: 'lint',
55
55
  AGENTIC_LOCAL_PROJECT_ID_NOT_GUID: 'lint',
56
56
  AGENTIC_NAME_IS_PATH: 'lint',
57
57
  AGENTIC_NO_FOLDER: 'lint',
58
- AGENTIC_NO_KEY: 'lint',
58
+ AGENTIC_NO_KEY: 'lowering',
59
59
  AGENTIC_NO_NAME: 'lint',
60
60
  AGENTIC_READ_NOT_OUTPUT: 'lint',
61
61
  AGENTIC_READ_UNKNOWN_FIELD: 'lint',
62
62
  AGENTIC_READ_WITHOUT_RETURNS: 'lint',
63
- AGENTIC_RESERVED_INPUT: 'lint',
63
+ AGENTIC_RESERVED_INPUT: 'lowering',
64
64
  AGENT_CONTEXT_NO_FOLDER_PATH: 'lint',
65
65
  AGENT_CONTEXT_NO_ID: 'lowering',
66
66
  AGENT_CONTEXT_QUERY_NOT_EXPRESSION: 'lint',
@@ -73,7 +73,7 @@ export const REFUSALS = {
73
73
  AGENT_MEMORY_VERSION_NO_HANDLE: 'lowering',
74
74
  AGENT_NAME_IS_PATH: 'lint',
75
75
  AGENT_NO_FOLDER: 'lint',
76
- AGENT_NO_KEY: 'lint',
76
+ AGENT_NO_KEY: 'lowering',
77
77
  AGENT_NO_NAME: 'lint',
78
78
  AGENT_READ_NOT_OUTPUT: 'lint',
79
79
  AGENT_READ_UNKNOWN_FIELD: 'lint',
@@ -83,7 +83,7 @@ export const REFUSALS = {
83
83
  APIWF_KEY_NOT_KEY: 'lint',
84
84
  APIWF_NAME_IS_PATH: 'lint',
85
85
  APIWF_NO_FOLDER: 'lint',
86
- APIWF_NO_KEY: 'lint',
86
+ APIWF_NO_KEY: 'lowering',
87
87
  APIWF_NO_NAME: 'lint',
88
88
  APIWF_READ_NOT_OUTPUT: 'lint',
89
89
  APIWF_READ_UNKNOWN_FIELD: 'lint',
@@ -147,6 +147,7 @@ export const REFUSALS = {
147
147
  BPMN_HUMAN_TASK_APP_XOR_FORM: 'lowering',
148
148
  BPMN_JSON_INPUT_CDATA_END: 'lowering',
149
149
  BPMN_NO_DEFAULT_EXPORT: 'lowering',
150
+ BPMN_NO_ID: 'lowering',
150
151
  BPMN_OUTPUT_VAR_NO_OUTPUT_ROW: 'lowering',
151
152
  BPMN_PATH_ALREADY_LEFT: 'lowering',
152
153
  BPMN_PATH_NOT_CONTINUED: 'lowering',
@@ -201,7 +202,7 @@ export const REFUSALS = {
201
202
  CONNECTION_STUB: 'lint',
202
203
  CONNECTOR_IMPORT_NOT_A_FILE: 'lowering',
203
204
  CONNECTOR_INPUT: 'lowering',
204
- CONNECTOR_INPUTS_SHADOWED: 'lint',
205
+ CONNECTOR_INPUTS_SHADOWED: 'lowering',
205
206
  CONNECTOR_INPUT_MISSING: 'draft',
206
207
  CONNECTOR_INPUT_ROW_NO_TARGET: 'lint',
207
208
  CONNECTOR_INPUT_ROW_TARGET_UNKNOWN: 'lint',
@@ -238,7 +239,7 @@ export const REFUSALS = {
238
239
  DATAFABRIC_NO_ENTITY: 'lint',
239
240
  DATAFABRIC_QUERY_OPTS_WITHOUT_MULTIPLE: 'lint',
240
241
  DATAFABRIC_RECORD_REF: 'lowering',
241
- DATAFABRIC_RESOURCE_KEY_NO_FOLDER: 'lint',
242
+ DATAFABRIC_RESOURCE_KEY_NO_FOLDER: 'lowering',
242
243
  DATAFABRIC_RESULT_MODE_VERSION: 'lowering',
243
244
  DATAFABRIC_SYSTEM_COLUMN: 'lint',
244
245
  DEAD_END: 'lint',
@@ -253,18 +254,18 @@ export const REFUSALS = {
253
254
  DELAY_NO_DURATION: 'lint',
254
255
  DELAY_UNTIL_NOT_ISO: 'lint',
255
256
  DELAY_ZERO: 'lint',
256
- DOCVAL_NO_EXTRACTION: 'lint',
257
- DOCVAL_RENDER_UNKNOWN: 'lint',
258
- DOCVAL_TAXONOMY_REQUIRED: 'lint',
257
+ DOCVAL_NO_EXTRACTION: 'lowering',
258
+ DOCVAL_RENDER_UNKNOWN: 'lowering',
259
+ DOCVAL_TAXONOMY_REQUIRED: 'lowering',
259
260
  DOC_NO_FILEREF: 'lint',
260
261
  DOWHILE_CONST_COND: 'lint',
261
262
  DOWHILE_LIMIT: 'lint',
262
- DUPLICATE_DOCUMENT_ID: 'lint',
263
+ DUPLICATE_DOCUMENT_ID: 'lowering',
263
264
  DUP_BUSINESS_EVENT: 'lowering',
264
265
  DUP_CASE: 'lint',
265
266
  DUP_END_NAME: 'lowering',
266
267
  DUP_EXIT_RULE: 'lint',
267
- DUP_ID: 'lint',
268
+ DUP_ID: 'lowering',
268
269
  DUP_RULE_NAME: 'lint',
269
270
  DUP_STAGE: 'lowering',
270
271
  DUP_STEP: 'lowering',
@@ -300,6 +301,7 @@ export const REFUSALS = {
300
301
  EVENT_SCOPE_NOT_TAKEN: 'lint',
301
302
  EVENT_UNKNOWN: 'lowering',
302
303
  EVENT_UNPREPARED: 'lint',
304
+ EVENT_WHERE_NOT_SCALAR: 'lowering',
303
305
  EXCEPTION_STAGE_REQUIRED: 'lint',
304
306
  EXPR_BARE_VAR_REF: 'lowering',
305
307
  EXPR_SYNTAX: 'lowering',
@@ -327,12 +329,12 @@ export const REFUSALS = {
327
329
  FORM_TRIGGER_NO_INPUTS: 'lint',
328
330
  FUNCTION_EMPTY_RETURNS: 'lint',
329
331
  FUNCTION_KEY_NOT_KEY: 'lint',
330
- FUNCTION_LOCAL_HAS_FOLDER: 'lint',
332
+ FUNCTION_LOCAL_HAS_FOLDER: 'lowering',
331
333
  FUNCTION_LOCAL_NO_PROJECT_ID: 'lint',
332
334
  FUNCTION_LOCAL_PROJECT_ID_NOT_GUID: 'lint',
333
335
  FUNCTION_NAME_IS_PATH: 'lint',
334
336
  FUNCTION_NO_FOLDER: 'lint',
335
- FUNCTION_NO_KEY: 'lint',
337
+ FUNCTION_NO_KEY: 'lowering',
336
338
  FUNCTION_NO_NAME: 'lint',
337
339
  FUNCTION_READ_NOT_OUTPUT: 'lint',
338
340
  FUNCTION_READ_UNKNOWN_FIELD: 'lint',
@@ -344,19 +346,19 @@ export const REFUSALS = {
344
346
  GUARDRAIL_NO_SCOPE: 'lint',
345
347
  GUARDRAIL_NO_VALIDATOR: 'lint',
346
348
  GUARDRAIL_TYPE_UNKNOWN: 'lint',
347
- HITL_APP_INCOMPLETE: 'lint',
349
+ HITL_APP_INCOMPLETE: 'lowering',
348
350
  HITL_APP_INPUT_REQUIRED: 'lint',
349
351
  HITL_APP_INPUT_UNKNOWN: 'lint',
350
- HITL_APP_LOCAL_HAS_FOLDER: 'lint',
352
+ HITL_APP_LOCAL_HAS_FOLDER: 'lowering',
351
353
  HITL_APP_MISSING: 'lint',
352
354
  HITL_APP_NO_SCHEMA: 'lint',
353
- HITL_APP_OUTCOME_UNKNOWN: 'lint',
354
- HITL_APP_SCHEMA_INVALID: 'lint',
355
- HITL_APP_WITHOUT_VARIANT: 'lint',
355
+ HITL_APP_OUTCOME_UNKNOWN: 'lowering',
356
+ HITL_APP_SCHEMA_INVALID: 'lowering',
357
+ HITL_APP_WITHOUT_VARIANT: 'lowering',
356
358
  HITL_APP_WITH_FIELDS: 'lint',
357
359
  HITL_CHANNEL_UNKNOWN: 'lint',
358
360
  HITL_COMPLETED_PORT_GONE: 'lowering',
359
- HITL_DOCUMENT_WITHOUT_VARIANT: 'lint',
361
+ HITL_DOCUMENT_WITHOUT_VARIANT: 'lowering',
360
362
  HITL_DOCVAL_NO_DOCUMENT: 'lint',
361
363
  HITL_DOCVAL_WITH_FIELDS: 'lint',
362
364
  HITL_DUP_FIELD: 'lint',
@@ -366,16 +368,16 @@ export const REFUSALS = {
366
368
  HITL_EXPOSE_ERROR_VERSION: 'lowering',
367
369
  HITL_FAN_OUT_INTO_JOIN: 'lowering',
368
370
  HITL_FIELD_DIRECTION: 'lint',
369
- HITL_FIELD_NO_ID: 'lint',
371
+ HITL_FIELD_NO_ID: 'lowering',
370
372
  HITL_FIELD_NO_VALUE: 'lint',
371
373
  HITL_FIELD_OPTIONS: 'lint',
372
374
  HITL_FIELD_OPTIONS_IGNORED: 'lint',
373
375
  HITL_FIELD_RESERVED_ID: 'lint',
374
376
  HITL_FIELD_SETTING_INVALID: 'lint',
375
377
  HITL_FIELD_TYPE_UNKNOWN: 'lint',
376
- HITL_FIELD_VALUE_NOT_PATH: 'lint',
377
- HITL_FIELD_VALUE_NOT_REF: 'lint',
378
- HITL_FIELD_VARIABLE: 'lint',
378
+ HITL_FIELD_VALUE_NOT_PATH: 'lowering',
379
+ HITL_FIELD_VALUE_NOT_REF: 'lowering',
380
+ HITL_FIELD_VARIABLE: 'lowering',
379
381
  HITL_LEGACY_COMPLETED: 'lint',
380
382
  HITL_LEGACY_COMPLETED_CONFLICT: 'lowering',
381
383
  HITL_LEGACY_COMPLETED_NO_EFFECT: 'lint',
@@ -384,7 +386,7 @@ export const REFUSALS = {
384
386
  HITL_NO_OUTCOMES: 'lint',
385
387
  HITL_OUTCOMES_UNREACHABLE: 'lint',
386
388
  HITL_OUTCOME_ACTION: 'lint',
387
- HITL_OUTCOME_BAD_ID: 'lint',
389
+ HITL_OUTCOME_BAD_ID: 'lowering',
388
390
  HITL_OUTCOME_NO_NAME: 'lint',
389
391
  HITL_OUTCOME_PORTS_NONE: 'lowering',
390
392
  HITL_OUTCOME_PORTS_OFF: 'lowering',
@@ -400,7 +402,7 @@ export const REFUSALS = {
400
402
  HITL_RECIPIENT_TYPE: 'lint',
401
403
  HITL_RECIPIENT_VALUE: 'lint',
402
404
  HITL_UNREACHABLE_AFTER: 'lint',
403
- HITL_VARIANT_UNKNOWN: 'lint',
405
+ HITL_VARIANT_UNKNOWN: 'lowering',
404
406
  HTTP_BINDING_REQUIRES_MANAGED: 'lowering',
405
407
  HTTP_BRANCH_CONST: 'lint',
406
408
  HTTP_BRANCH_DUP: 'lint',
@@ -419,10 +421,10 @@ export const REFUSALS = {
419
421
  HTTP_TIMEOUT_NOT_DURATION: 'lint',
420
422
  HTTP_V1_RETIRED: 'lint',
421
423
  IMPLICIT_SPLIT: 'lint',
422
- INLINE_AGENT_COMPOSITE_INPUT: 'lint',
424
+ INLINE_AGENT_COMPOSITE_INPUT: 'lowering',
423
425
  INLINE_AGENT_EMPTY_RETURNS: 'lint',
424
426
  INLINE_AGENT_ESCALATION_APP_KEY_NOT_GUID: 'lint',
425
- INLINE_AGENT_ESCALATION_APP_WITH_FIELDS: 'lint',
427
+ INLINE_AGENT_ESCALATION_APP_WITH_FIELDS: 'lowering',
426
428
  INLINE_AGENT_ESCALATION_FIELD_OPTIONS: 'lint',
427
429
  INLINE_AGENT_ESCALATION_FIELD_OPTIONS_IGNORED: 'lint',
428
430
  INLINE_AGENT_ESCALATION_FIELD_SETTING_INVALID: 'lint',
@@ -430,8 +432,8 @@ export const REFUSALS = {
430
432
  INLINE_AGENT_ESCALATION_NO_APP: 'lint',
431
433
  INLINE_AGENT_ESCALATION_NO_FIELDS: 'lint',
432
434
  INLINE_AGENT_ESCALATION_NO_NAME: 'lint',
433
- INLINE_AGENT_ESCALATION_QUICKFORM_WITH_APP: 'lint',
434
- INLINE_AGENT_ESCALATION_VARIANT: 'lint',
435
+ INLINE_AGENT_ESCALATION_QUICKFORM_WITH_APP: 'lowering',
436
+ INLINE_AGENT_ESCALATION_VARIANT: 'lowering',
435
437
  INLINE_AGENT_INPUT_NAME_AMBIGUOUS: 'lint',
436
438
  INLINE_AGENT_MEMORY_ID_NOT_GUID: 'lint',
437
439
  INLINE_AGENT_MEMORY_INCOMPLETE: 'lint',
@@ -471,7 +473,7 @@ export const REFUSALS = {
471
473
  INTSVC_OPERATION_NOT_IDENTIFIER: 'lint',
472
474
  INTSVC_PATH_NOT_ABSOLUTE: 'lint',
473
475
  INTSVC_PATH_PARAM_UNBOUND: 'lint',
474
- IXP_FORBIDDEN_INPUT: 'lint',
476
+ IXP_FORBIDDEN_INPUT: 'lowering',
475
477
  IXP_NO_FILE: 'lint',
476
478
  IXP_NO_FOLDER: 'lint',
477
479
  IXP_NO_MODEL_NAME: 'lint',
@@ -550,7 +552,7 @@ export const REFUSALS = {
550
552
  QUEUE_BAD_PRIORITY: 'lint',
551
553
  QUEUE_ITEM_EXPR_UNSUPPORTED: 'lowering',
552
554
  QUEUE_ITEM_FIELD_NOT_PRIMITIVE: 'lint',
553
- QUEUE_ITEM_NOT_OBJECT: 'lint',
555
+ QUEUE_ITEM_NOT_OBJECT: 'lowering',
554
556
  QUEUE_KEY_NOT_GUID: 'lint',
555
557
  QUEUE_NO_FOLDER: 'lint',
556
558
  QUEUE_NO_ITEM: 'lint',
@@ -559,7 +561,7 @@ export const REFUSALS = {
559
561
  QUEUE_READ_NOT_OUTPUT: 'lint',
560
562
  QUEUE_READ_UNKNOWN_FIELD: 'lint',
561
563
  QUEUE_READ_WITHOUT_RETURNS: 'lint',
562
- QUEUE_RETURNS_WITHOUT_WAIT: 'lint',
564
+ QUEUE_RETURNS_WITHOUT_WAIT: 'lowering',
563
565
  RAW_NODE_CONNECTOR: 'lowering',
564
566
  RAW_NODE_TYPED_FAMILY: 'lint',
565
567
  RAW_NODE_UNKNOWN_INPUT: 'lowering',
@@ -581,12 +583,12 @@ export const REFUSALS = {
581
583
  RETRY_INVALID_DURATION: 'lint',
582
584
  RETURN_UPDATES_SAME_VAR: 'lowering',
583
585
  RPA_KEY_NOT_KEY: 'lint',
584
- RPA_LOCAL_HAS_FOLDER: 'lint',
586
+ RPA_LOCAL_HAS_FOLDER: 'lowering',
585
587
  RPA_LOCAL_NO_PROJECT_ID: 'lint',
586
588
  RPA_LOCAL_PROJECT_ID_NOT_GUID: 'lint',
587
589
  RPA_NAME_IS_PATH: 'lint',
588
590
  RPA_NO_FOLDER: 'lint',
589
- RPA_NO_KEY: 'lint',
591
+ RPA_NO_KEY: 'lowering',
590
592
  RPA_NO_NAME: 'lint',
591
593
  RPA_READ_NOT_OUTPUT: 'lint',
592
594
  RPA_READ_UNKNOWN_FIELD: 'lint',
@@ -643,7 +645,8 @@ export const REFUSALS = {
643
645
  STICKY_NOTE_NO_CONTENT: 'lowering',
644
646
  STICKY_NOTE_POSITION: 'lowering',
645
647
  STICKY_NOTE_SIZE: 'lowering',
646
- SUBFLOW_CHILD_TRIGGER: 'lint',
648
+ SUBFLOW_CHILD_ENTRY_POINT: 'lowering',
649
+ SUBFLOW_CHILD_TRIGGER: 'lowering',
647
650
  SUBFLOW_CYCLE: 'lint',
648
651
  SUBFLOW_HAS_NO_OUTPUT: 'lint',
649
652
  SUBFLOW_MISSING_INPUT: 'lint',
@@ -653,8 +656,8 @@ export const REFUSALS = {
653
656
  SUBFLOW_UNKNOWN_INPUT: 'lint',
654
657
  SUBFLOW_UNKNOWN_OUTPUT: 'lint',
655
658
  SUPERFLUOUS_GATEWAY: 'lint',
656
- SWITCH_CASE_FORM: 'lint',
657
- SWITCH_CASE_ID: 'lint',
659
+ SWITCH_CASE_FORM: 'lowering',
660
+ SWITCH_CASE_ID: 'lowering',
658
661
  SWITCH_CASE_TYPE_MISMATCH: 'lint',
659
662
  SWITCH_CONST_ON: 'lint',
660
663
  SWITCH_CONST_WHEN: 'lint',
@@ -680,13 +683,13 @@ export const REFUSALS = {
680
683
  TIMER_DURATION_INVALID: 'lint',
681
684
  TIMER_DURATION_NOT_RUNTIME_PARSEABLE: 'lint',
682
685
  TIMER_MISSING_FIELD: 'lint',
683
- TIMER_VALUE_REQUIRED: 'lint',
686
+ TIMER_VALUE_REQUIRED: 'lowering',
684
687
  TRANSFORM_AGG_NO_ALIAS: 'lint',
685
688
  TRANSFORM_AGG_NO_FIELD: 'lint',
686
689
  TRANSFORM_BAD_VOCAB: 'lint',
687
- TRANSFORM_COLLECTION_LITERAL: 'lint',
690
+ TRANSFORM_COLLECTION_LITERAL: 'lowering',
688
691
  TRANSFORM_COLLECTION_NOT_PATH: 'lint',
689
- TRANSFORM_COLLECTION_NOT_REF: 'lint',
692
+ TRANSFORM_COLLECTION_NOT_REF: 'lowering',
690
693
  TRANSFORM_COLLECTION_SCALAR: 'lint',
691
694
  TRANSFORM_CONTAINS_ARRAY_VALUE: 'lint',
692
695
  TRANSFORM_EMPTY_FILTER: 'lint',
@@ -694,10 +697,10 @@ export const REFUSALS = {
694
697
  TRANSFORM_FILTER_NO_FIELD: 'lint',
695
698
  TRANSFORM_FILTER_VALUE_EXPR: 'lint',
696
699
  TRANSFORM_MAP_NO_FIELD: 'lint',
697
- TRANSFORM_NO_COLLECTION: 'lint',
700
+ TRANSFORM_NO_COLLECTION: 'lowering',
698
701
  TRANSFORM_NO_GROUP_FIELD: 'lint',
699
702
  TRANSFORM_NO_OPERATIONS: 'lint',
700
- TRANSFORM_UNKNOWN_OP: 'lint',
703
+ TRANSFORM_UNKNOWN_OP: 'lowering',
701
704
  TRANSFORM_VARIANT_ONE_OP: 'lint',
702
705
  TRANSFORM_VARIANT_OP_MISMATCH: 'lint',
703
706
  TRANSFORM_VARIANT_UNKNOWN: 'lowering',
@@ -1,8 +1,9 @@
1
1
  import { Expr } from '../../../core/expr.js';
2
2
  import { GUID_RE } from '../../../core/binding-messages.js';
3
+ import { promptPlaceholders } from '../../../core/agent-sidecar.js';
3
4
  import { prepareCommand } from '../../../core/cli-spelling.js';
4
5
  import { nearestName } from '../../../core/edit-distance.js';
5
- import { FLAT_SEP, flatNameOf, flatNameSegmentsOf } from '../../../core/expr.js';
6
+ import { FLAT_SEP, flatNameSegmentsOf } from '../../../core/expr.js';
6
7
  import { FORM_FIELD_TYPES, formFieldOptionsProblem, formFieldOptionsWhy, formFieldSettingProblems, formFieldTypeHint, formFieldTypeWhy, validFormFieldTypesText, } from '../../../core/form-field-type.js';
7
8
  import { ownEntry } from '../../../core/own-entry.js';
8
9
  export const AGENT_DIAGNOSTICS = {
@@ -473,9 +474,7 @@ export function checkInlineAgent(inputs, ctx) {
473
474
  }
474
475
  // The prompts-vs-variables agreement, in both directions. Both prompts are
475
476
  // searched, because flow-v1's pre-pass scans both.
476
- const prompts = `${String(inputs?.systemPrompt ?? '')}\n${String(inputs?.userPrompt ?? '')}`;
477
- const placeholders = [...prompts.matchAll(/\{\{\s*input\.([A-Za-z_$][A-Za-z0-9_$]*)\s*\}\}/g)]
478
- .map((m) => m[1]);
477
+ const placeholders = promptPlaceholders(inputs ?? {});
479
478
  const declaredInputs = Object.keys(inputs?.inputs ?? {});
480
479
  // Direction 1: a declared input no prompt references. The platform may prune it,
481
480
  // in which case the agent receives nothing and the authored list sits unused.
@@ -508,30 +507,10 @@ export function checkInlineAgent(inputs, ctx) {
508
507
  ? `inputs: { ${undeclared[0]}: input('${undeclared[0]}'), … }`
509
508
  : `inputs: { ${undeclared[0]}: input('${undeclared[0]}') }`);
510
509
  }
511
- // Direction 3: an input bound to a COMPUTED EXPRESSION rather than to one
512
- // reference. The platform names each of an agent's arguments after the
513
- // reference path it is bound to (the shell node's `agentInputVariables`), so
514
- // an expression spanning zero or several references has no single argument —
515
- // and therefore no name a `{{input.<x>}}` token could address. The compiler
516
- // declares no argument for it, so its value does not reach the agent, and the
517
- // placeholder reaches the model as literal text. An error rather than a
518
- // warning, and for the same reason `INLINE_AGENT_UNDECLARED_PLACEHOLDER` is
519
- // one: the value never arrives.
520
- for (const [name, val] of Object.entries(inputs?.inputs ?? {})) {
521
- if (!(val instanceof Expr) || val.literal)
522
- continue;
523
- if (flatNameOf(val.js) !== undefined)
524
- continue;
525
- if (!placeholders.includes(name))
526
- continue;
527
- at('INLINE_AGENT_COMPOSITE_INPUT', `Inline agent step "${step}"'s input \`${name}\` is bound to a computed expression `
528
- + `(\`${val.js.length > 60 ? `${val.js.slice(0, 60)}…` : val.js}\`), and a prompt references it as `
529
- + `\`{{input.${name}}}\`. The platform does not send the agent the names you declared: it names each `
530
- + `argument after the REFERENCE PATH the input is bound to (\`$vars.a.output.b\` → \`a__output__b\`). `
531
- + `A computed expression is not one reference, so it gets no argument: its value does not reach the `
532
- + `agent, and the placeholder reaches the model as that literal text.`, `compute it in a script step first, then bind the step's output: `
533
- + `.step('${name}Value', script({ code: 'return …;' })) … inputs: { ${name}: out('${name}Value') }`);
534
- }
510
+ // Direction 3, an input bound to a COMPUTED EXPRESSION that a prompt
511
+ // references, is the serializer's INLINE_AGENT_COMPOSITE_INPUT
512
+ // (`compositeInputRefusal`, inline-agent.ts): the binding has no argument
513
+ // name, so writing the flow would drop it.
535
514
  // A step id containing `__` makes the flat name AMBIGUOUS on the platform: the
536
515
  // encoding joins path segments with `__` and v1's own inverse (`decodeFlatName`)
537
516
  // documents that it round-trips only while ids "disallow `__`". A warning, not
@@ -694,18 +673,15 @@ export function checkInlineAgent(inputs, ctx) {
694
673
  at('INLINE_AGENT_ESCALATION_NO_NAME', `Inline agent step "${step}" declares an escalation without a \`name\`. The node's definition requires one `
695
674
  + `(\`minLength: 1\`).`);
696
675
  }
697
- if (e?.variant !== undefined && e.variant !== 'quick-form') {
698
- at('INLINE_AGENT_ESCALATION_VARIANT', `Inline agent step "${step}"'s escalation names the variant ${JSON.stringify(e.variant)}. Valid: `
699
- + `'quick-form' — or omit it for the app-backed default.`);
676
+ // An unknown variant, a quick form naming an app, and an app task with
677
+ // inline fields are the serializer's INLINE_AGENT_ESCALATION_VARIANT /
678
+ // _QUICKFORM_WITH_APP / _APP_WITH_FIELDS (`refuseLossyEscalation`,
679
+ // inline-agent.ts): the emitter would rewrite or drop them. An unknown
680
+ // variant has no rules of its own to check here.
681
+ if (e?.variant !== undefined && e.variant !== 'quick-form')
700
682
  continue;
701
- }
702
683
  if (e?.variant === 'quick-form') {
703
- // The form lives INLINE: an app would be emitted and ignored, and a form
704
- // with nothing to fill in is a notification nobody can answer.
705
- if (e.app !== undefined) {
706
- at('INLINE_AGENT_ESCALATION_QUICKFORM_WITH_APP', `Inline agent step "${step}"'s quick-form escalation also names an app. The form lives in the flow — `
707
- + `drop \`app\`, or drop the variant for the app-backed escalation.`);
708
- }
684
+ // A form with nothing to fill in is a notification nobody can answer.
709
685
  if (!Array.isArray(e.fields) || e.fields.length === 0) {
710
686
  at('INLINE_AGENT_ESCALATION_NO_FIELDS', `Inline agent step "${step}"'s quick-form escalation declares no \`fields\` — the reviewer gets an `
711
687
  + `empty form.`);
@@ -733,10 +709,6 @@ export function checkInlineAgent(inputs, ctx) {
733
709
  }
734
710
  continue;
735
711
  }
736
- if (e?.fields !== undefined) {
737
- at('INLINE_AGENT_ESCALATION_APP_WITH_FIELDS', `Inline agent step "${step}"'s escalation declares inline \`fields\`, but its form belongs to the deployed `
738
- + `app. Use variant: 'quick-form' for an inline form.`);
739
- }
740
712
  if (blank(e?.app?.key) || blank(e?.app?.name)) {
741
713
  at('INLINE_AGENT_ESCALATION_NO_APP', `Inline agent step "${step}"'s escalation needs \`app.key\` and \`app.name\` — the deployed Action Center app `
742
714
  + `that carries the review task. An escalation with no app is a task nobody can open.`);
@@ -1,4 +1,5 @@
1
- import { agentInputPlan, inlineAgentJson } from '../../../core/agent-sidecar.js';
1
+ import { agentInputPlan, inlineAgentJson, promptPlaceholders } from '../../../core/agent-sidecar.js';
2
+ import { Expr } from '../../../core/expr.js';
2
3
  import { derivedContextSource, derivedEscalationSource, derivedToolSource } from '../../../core/agent-resource-identity.js';
3
4
  import { GUID_RE } from '../../../core/binding-messages.js';
4
5
  import { formFieldSettingsWire, wireFormFieldType } from '../../../core/form-field-type.js';
@@ -68,6 +69,10 @@ export function serializeInlineAgent(s, ctx) {
68
69
  // What the PLATFORM will call each of these — computed once and shared by the
69
70
  // descriptor array below and the sidecar. See `agentInputPlan`.
70
71
  const plan = agentInputPlan(s.inputs ?? {}, render);
72
+ // A composite input is held, not thrown here: the agent's tools, context,
73
+ // escalations and memory are still judged, so `check` (one refusal per
74
+ // step) shows their errors in the same round. Thrown at the end.
75
+ const compositeInput = compositeInputRefusal(s, plan.byName, step);
71
76
  // A SHELL node (#927): the prompts and the model live only in the
72
77
  // `<source>/agent.json` sidecar written below, never on the node. Studio Web
73
78
  // decides which copy wins by `hasEmbeddedAgentContent` (@uipath/flow-schema):
@@ -406,6 +411,7 @@ export function serializeInlineAgent(s, ctx) {
406
411
  // the author's values — the exact shape the deployed corpus carries.
407
412
  const escalations = s.escalation === undefined ? [] : Array.isArray(s.escalation) ? s.escalation : [s.escalation];
408
413
  for (const esc of escalations) {
414
+ refuseLossyEscalation(esc, step);
409
415
  const where = `inline agent "${step}": escalation "${esc.name}"`;
410
416
  const channelId = fnv1aX4Uuid(`${ctx.flowId}/${step}/escalation/${esc.name}/channel`);
411
417
  if (esc.variant === 'quick-form') {
@@ -530,6 +536,8 @@ export function serializeInlineAgent(s, ctx) {
530
536
  // (AGENT_MEMORY_NOT_AUTHORABLE); its shape maps cleanly off `AgentMemoryRef`
531
537
  // but cannot be exercised while the handle does not exist.
532
538
  }
539
+ if (compositeInput)
540
+ throw compositeInput;
533
541
  return {
534
542
  definition: { source: 'snapshot', nodeType: def.nodeType, version: def.version, manifest: def },
535
543
  // Unlike the published families the inline agent KEEPS no node-level model:
@@ -552,3 +560,56 @@ function unknownToolKind(step, kind) {
552
560
  + "kinds: 'builtin', 'connector', 'process', 'agent', 'api', 'flow', 'maestro', 'function', 'ixp', 'mcp', 'a2a', "
553
561
  + "'clientside', 'httpRequest'.");
554
562
  }
563
+ /**
564
+ * The refusal for an input bound to a COMPUTED EXPRESSION that a prompt references as
565
+ * `{{input.<name>}}` (#1518). The platform names each agent argument after the
566
+ * reference path it is bound to (`agentInputPlan`), so an expression spanning
567
+ * zero or several references gets no argument: writing the flow anyway would
568
+ * drop the binding from `agentInputVariables` and `inputSchema`, and the
569
+ * placeholder would reach the model as literal text.
570
+ *
571
+ * For instance `inputs: { body: js\`${input('body')} + '!'\` }` with the prompt
572
+ * `Reply to {{input.body}}` is refused; bind a script step's output instead.
573
+ * An unreferenced one is `check`'s INLINE_AGENT_UNREFERENCED_INPUT warning.
574
+ */
575
+ function compositeInputRefusal(s, byName, step) {
576
+ const placeholders = new Set(promptPlaceholders(s));
577
+ for (const [name, val] of Object.entries(s.inputs ?? {})) {
578
+ if (byName.get(name)?.kind !== 'expression' || !placeholders.has(name))
579
+ continue;
580
+ const js = val instanceof Expr ? val.js : String(val).replace(/^=js:/, '');
581
+ return new CompileRefusal('INLINE_AGENT_COMPOSITE_INPUT', `Inline agent step "${step}"'s input \`${name}\` is bound to a computed expression `
582
+ + `(\`${js.length > 60 ? `${js.slice(0, 60)}…` : js}\`), and a prompt references it as `
583
+ + `\`{{input.${name}}}\`. The platform does not send the agent the names you declared: it names each `
584
+ + `argument after the REFERENCE PATH the input is bound to (\`$vars.a.output.b\` → \`a__output__b\`). `
585
+ + `A computed expression is not one reference, so it gets no argument: its value does not reach the `
586
+ + `agent, and the placeholder reaches the model as that literal text.`, `compute it in a script step first, then bind the step's output: `
587
+ + `.step('${name}Value', script({ code: 'return …;' })) … inputs: { ${name}: out('${name}Value') }`);
588
+ }
589
+ return undefined;
590
+ }
591
+ /**
592
+ * Refuse an escalation the emitter below would rewrite or strip (#1518): it
593
+ * writes `'quick-form'` as the inline form and everything else as an app task,
594
+ * so an unknown variant would become an app task, a quick form's \`app\` would
595
+ * be dropped, and an app task's inline \`fields\` would be dropped.
596
+ */
597
+ function refuseLossyEscalation(e, step) {
598
+ const esc = e;
599
+ if (esc.variant !== undefined && esc.variant !== 'quick-form') {
600
+ throw new CompileRefusal('INLINE_AGENT_ESCALATION_VARIANT', `Inline agent step "${step}"'s escalation names the variant ${JSON.stringify(esc.variant)}. Valid: `
601
+ + `'quick-form' — or omit it for the app-backed default.`);
602
+ }
603
+ if (esc.variant === 'quick-form') {
604
+ // The form lives INLINE: an app would be emitted nowhere.
605
+ if (esc.app !== undefined) {
606
+ throw new CompileRefusal('INLINE_AGENT_ESCALATION_QUICKFORM_WITH_APP', `Inline agent step "${step}"'s quick-form escalation also names an app. The form lives in the flow — `
607
+ + `drop \`app\`, or drop the variant for the app-backed escalation.`);
608
+ }
609
+ return;
610
+ }
611
+ if (esc.fields !== undefined) {
612
+ throw new CompileRefusal('INLINE_AGENT_ESCALATION_APP_WITH_FIELDS', `Inline agent step "${step}"'s escalation declares inline \`fields\`, but its form belongs to the deployed `
613
+ + `app. Use variant: 'quick-form' for an inline form.`);
614
+ }
615
+ }
@@ -250,7 +250,7 @@ export interface InlineAgentInputs {
250
250
  *
251
251
  * - a **literal** (`{ tier: 'Enterprise' }`) is INLINED into both prompts — there
252
252
  * is no argument for one, so a token could never substitute;
253
- * - a **computed expression** is refused by `check`
253
+ * - a **computed expression** a prompt references is refused by `compile`
254
254
  * (`INLINE_AGENT_COMPOSITE_INPUT`): the platform names one argument per
255
255
  * reference, so an expression spanning several has none. Compute it in a
256
256
  * `script` step first and bind that step's output.
@@ -9,7 +9,7 @@ import { jsonClone } from '../../../core/json-clone.js';
9
9
  import { subNodeId } from '../../../core/node-id-placeholder.js';
10
10
  import { synthesizedDefinitionRefusal } from '../../../core/synthesized-definition.js';
11
11
  import { tsLiteral, tsObject } from '../../../core/ts-literal.js';
12
- import { CompileRefusal } from '../../../core/compile-refusal.js';
12
+ import { CompileRefusal, LibraryRequiredRefusal } from '../../../core/compile-refusal.js';
13
13
  const CONNECTOR_PREFIX = 'uipath.connector.';
14
14
  /** `<key>.<action>` after the prefix, split on the last dot; undefined for an event, a trigger, or a name with no action. */
15
15
  function splitOperation(typeName) {
@@ -74,9 +74,11 @@ function serializeConnector(spec, ctx) {
74
74
  const missing = missingBindingLabels(spec);
75
75
  if (missing.length > 0 && !ctx.drafting)
76
76
  throw new BindingRefusal('BINDING_MISSING', bindingMissingMessage(where, missing, target));
77
- ctx.resolveBinding(spec.connection, 'connection', where, target);
77
+ const connection = ctx.resolveBinding(spec.connection, 'connection', where, target);
78
78
  ctx.resolveBinding(spec.folder, 'folder', where, target);
79
- throw new CompileRefusal('LIBRARY_REQUIRED', `connector "${step}" needs a library (pass --library / set $FLOW_SDK_LIBRARY_JSON).`);
79
+ // The connection rides on the refusal, so check's stand-in for this step
80
+ // still takes part in the file-wide CONNECTION_CONNECTOR_CONFLICT rule.
81
+ throw new LibraryRequiredRefusal(`connector "${step}" needs a library (pass --library / set $FLOW_SDK_LIBRARY_JSON).`, connection !== undefined && typeof spec.key === 'string' && spec.key !== '' ? { connector: spec.key, connection } : undefined);
80
82
  }
81
83
  // The library's refusals (the operation, its fields) name the connector, not
82
84
  // the step: they say which step as `check` always has.
@@ -91,10 +91,8 @@ function checkScope(inputs, ctx) {
91
91
  + 'breaks on deploy to another one.', 'resolve the key with `uip solution resources list --kind Entity`, or drop { folderKey } and keep '
92
92
  + 'the entity tenant-scoped');
93
93
  }
94
- if (inputs.resourceKey !== undefined && inputs.folderKey === undefined) {
95
- ctx.report('DATAFABRIC_RESOURCE_KEY_NO_FOLDER', `"${ctx.step}" sets { resourceKey } without { folderKey }. The pair exists to scope a FOLDER entity; a `
96
- + 'tenant-scoped entity needs neither and serializes as a dotted literal.');
97
- }
94
+ // A resourceKey without a folderKey is the serializer's
95
+ // DATAFABRIC_RESOURCE_KEY_NO_FOLDER (`applyScope`): it would be dropped.
98
96
  }
99
97
  /**
100
98
  * The query options, none of which the node's `inputDefinition` declares — they
@@ -47,10 +47,15 @@ export declare function fieldRows(values: Record<string, string | Expr> | undefi
47
47
  export declare function filterRows(filters: ReadonlyArray<DataFabricFilter>, ctx: FlowSerializeContext): Array<Record<string, unknown>>;
48
48
  /**
49
49
  * The folder scope, last in `entityConfig`. A folder-scoped entity is portable
50
- * only with its `Entity` bindings; the half-authored form is refused by check(),
51
- * so reaching here with both means emit both. Same id for the same (entity,
52
- * resourceKey), so two steps on one entity share one pair rather than
53
- * duplicating it.
50
+ * only with its `Entity` bindings, so both keys means emit both. Same id for
51
+ * the same (entity, resourceKey), so two steps on one entity share one pair
52
+ * rather than duplicating it.
53
+ *
54
+ * A `resourceKey` alone has nowhere to go: `_resourceKey` and the bindings are
55
+ * written only with a folder, so it would be dropped from the `.flow` without a
56
+ * word. `compile` does not run `check` (#1497), so it is refused here (#1518).
57
+ * A `folderKey` alone is written (`_folderKey`, a source-org literal), so its
58
+ * half (DATAFABRIC_FOLDER_NO_RESOURCE_KEY) stays `check`'s.
54
59
  */
55
60
  export declare function applyScope(cfg: EntityConfig, inputs: ScopeInputs, ctx: FlowSerializeContext): void;
56
61
  /**
@@ -8,6 +8,7 @@
8
8
  * decision came with the code.
9
9
  */
10
10
  import { Expr } from '../../../core/expr.js';
11
+ import { CompileRefusal } from '../../../core/compile-refusal.js';
11
12
  export function entityConfigOf(node) {
12
13
  const inputs = node?.inputs ?? {};
13
14
  return (inputs.entityConfig ?? {});
@@ -63,12 +64,21 @@ export function filterRows(filters, ctx) {
63
64
  }
64
65
  /**
65
66
  * The folder scope, last in `entityConfig`. A folder-scoped entity is portable
66
- * only with its `Entity` bindings; the half-authored form is refused by check(),
67
- * so reaching here with both means emit both. Same id for the same (entity,
68
- * resourceKey), so two steps on one entity share one pair rather than
69
- * duplicating it.
67
+ * only with its `Entity` bindings, so both keys means emit both. Same id for
68
+ * the same (entity, resourceKey), so two steps on one entity share one pair
69
+ * rather than duplicating it.
70
+ *
71
+ * A `resourceKey` alone has nowhere to go: `_resourceKey` and the bindings are
72
+ * written only with a folder, so it would be dropped from the `.flow` without a
73
+ * word. `compile` does not run `check` (#1497), so it is refused here (#1518).
74
+ * A `folderKey` alone is written (`_folderKey`, a source-org literal), so its
75
+ * half (DATAFABRIC_FOLDER_NO_RESOURCE_KEY) stays `check`'s.
70
76
  */
71
77
  export function applyScope(cfg, inputs, ctx) {
78
+ if (inputs.resourceKey !== undefined && inputs.folderKey === undefined) {
79
+ throw new CompileRefusal('DATAFABRIC_RESOURCE_KEY_NO_FOLDER', `"${ctx.step}" sets { resourceKey } without { folderKey }, and compile writes the resource key only with a folder key. `
80
+ + 'Add { folderKey } to scope a folder entity, or drop { resourceKey } for a tenant-scoped one.', "folderKey: '<folder key>'");
81
+ }
72
82
  if (inputs.folderKey !== undefined)
73
83
  cfg._folderKey = inputs.folderKey;
74
84
  if (inputs.folderKey !== undefined && inputs.resourceKey !== undefined) {
@@ -216,10 +216,27 @@ function ixpDeploymentBindings(spec, existing) {
216
216
  * definition does not have.
217
217
  *
218
218
  * They are not reachable through `ixpExtract()`'s typed surface, which is the
219
- * point of having one; this check exists for the JS caller and for a
219
+ * point of having one; this refusal exists for the JS caller and for a
220
220
  * hand-written spec object, where TypeScript is not in the way.
221
221
  */
222
222
  const IXP_FORBIDDEN_INPUTS = ['digitizationMode', 'documentTaxonomy', 'attachmentId', 'fileName', 'mimeType'];
223
+ /**
224
+ * Refuse an input of the prior schema (IXP_FORBIDDEN_INPUT). The node's inputs
225
+ * are the definition's `inputDefaults` plus `fileRef` and `pageRange`, so
226
+ * writing the step anyway would silently drop the field (#1518). One refusal
227
+ * per step names every such field, each with where its value went.
228
+ */
229
+ function refuseForbiddenInputs(s, step) {
230
+ const set = IXP_FORBIDDEN_INPUTS.filter((f) => s[f] !== undefined);
231
+ if (set.length === 0)
232
+ return;
233
+ const why = (f) => `\`${f}\`, which the current node does not declare — it belonged to a prior schema. `
234
+ + (f === 'documentTaxonomy' ? 'The taxonomy travels in the resolved `model` blob.'
235
+ : f === 'digitizationMode' ? 'The serializer defaults it to `fileUpload` internally.'
236
+ : 'It is derived from `fileRef` upstream.');
237
+ throw new CompileRefusal('IXP_FORBIDDEN_INPUT', `IxP step "${step}" sets ${set.map(why).join(' It also sets ')} Remove ${set.length === 1 ? 'it' : 'them'}: `
238
+ + `the \`.flow\` would drop ${set.length === 1 ? 'it' : 'them'}.`);
239
+ }
223
240
  /**
224
241
  * `ixpExtract(...)`-specific checks.
225
242
  *
@@ -255,14 +272,7 @@ function checkIxpExtract(inputs, ctx) {
255
272
  at('IXP_NO_FILE', `IxP step "${step}" has no \`fileRef\`. It is the node's only required INPUT (\`inputDefinition.required\`) `
256
273
  + `and it takes a whole Flow Attachment object — normally a \`file\`-typed flow input.`, `fileRef: out('start', 'invoiceFile') // .input({ invoiceFile: types.file })`);
257
274
  }
258
- for (const f of IXP_FORBIDDEN_INPUTS) {
259
- if (inputs?.[f] !== undefined) {
260
- at('IXP_FORBIDDEN_INPUT', `IxP step "${step}" sets \`${f}\`, which the current node does not declare — it belonged to a prior `
261
- + `schema. ${f === 'documentTaxonomy' ? 'The taxonomy travels in the resolved `model` blob.'
262
- : f === 'digitizationMode' ? 'The serializer defaults it to `fileUpload` internally.'
263
- : 'It is derived from `fileRef` upstream.'}`);
264
- }
265
- }
275
+ // An input of the prior schema is the serializer's IXP_FORBIDDEN_INPUT.
266
276
  }
267
277
  /**
268
278
  * The extractor's node: the definition's `inputDefaults` with the file the
@@ -270,6 +280,7 @@ function checkIxpExtract(inputs, ctx) {
270
280
  */
271
281
  function serializeIxpExtract(s, ctx) {
272
282
  const def = ixpExtractDef(s, ctx.step); // throws on an unparseable project
283
+ refuseForbiddenInputs(s, ctx.step);
273
284
  const { versionId } = parseIxpProjectType(s.project); // ixpExtractDef threw if it could not parse
274
285
  // The bindings first: two steps on the same project share ONE pair, and the
275
286
  // definition's `model.bindings.resourceKey` names the key they hang off.