@uipath/maestro-builder-sdk 6.64.0 → 6.65.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.
@@ -16,6 +16,7 @@
16
16
  * `case/check.ts`, not here.
17
17
  */
18
18
  import { type ExprDiagnostic } from '../core/expr-check.js';
19
+ import { CompileRefusal } from '../core/compile-refusal.js';
19
20
  import type { BuiltCase } from './case-sdk.js';
20
21
  /** A diagnostic plus the part of the case it was found in. */
21
22
  export interface CaseLocatedDiagnostic extends ExprDiagnostic {
@@ -29,7 +30,7 @@ export declare function checkCaseExpressions(built: BuiltCase): CaseLocatedDiagn
29
30
  * `FlowBuildError`: `message` lists every problem; `diagnostics` carries them
30
31
  * structured.
31
32
  */
32
- export declare class CaseBuildError extends Error {
33
+ export declare class CaseBuildError extends CompileRefusal {
33
34
  readonly diagnostics: CaseLocatedDiagnostic[];
34
35
  constructor(built: BuiltCase, diagnostics: CaseLocatedDiagnostic[]);
35
36
  }
@@ -16,6 +16,7 @@
16
16
  * `case/check.ts`, not here.
17
17
  */
18
18
  import { checkExpression } from '../core/expr-check.js';
19
+ import { CompileRefusal } from '../core/compile-refusal.js';
19
20
  import { defaultActionOutputVar } from './action-output-var.js';
20
21
  const NOUN = 'case variable';
21
22
  const NAMESPACE = 'vars';
@@ -83,12 +84,13 @@ export function checkCaseExpressions(built) {
83
84
  * `FlowBuildError`: `message` lists every problem; `diagnostics` carries them
84
85
  * structured.
85
86
  */
86
- export class CaseBuildError extends Error {
87
+ export class CaseBuildError extends CompileRefusal {
87
88
  diagnostics;
88
89
  constructor(built, diagnostics) {
89
90
  const label = built.name || built.id || 'case';
90
91
  const lines = diagnostics.map((d) => ` ✗ [${d.code}] in ${d.where}: ${d.message}${d.suggestion ? ` (did you mean "${d.suggestion}"?)` : ''}`);
91
- super(`Cannot build case "${label}" — ${diagnostics.length} expression problem(s):\n${lines.join('\n')}`);
92
+ // The first problem's code; `diagnostics` carries every one.
93
+ super(diagnostics[0]?.code ?? 'EXPR_UNDECLARED_REF', `Cannot build case "${label}" — ${diagnostics.length} expression problem(s):\n${lines.join('\n')}`);
92
94
  this.name = 'CaseBuildError';
93
95
  this.diagnostics = diagnostics;
94
96
  }
@@ -3,6 +3,7 @@ import { isTriggerDescriptor } from '../core/connectors.js';
3
3
  import { checkCaseExpressions, CaseBuildError } from './case-expr-check.js';
4
4
  import { CASE_FORMAT_PROFILE, CASE_SCHEMA_VERSIONS, recordAuthoredCaseVersion } from './format-profile.js';
5
5
  import { schemaVersionRefusal } from '../schema-version.js';
6
+ import { CompileRefusal } from '../core/compile-refusal.js';
6
7
  export { preserveCaseJson } from './preserve.js';
7
8
  export { CaseBuildError } from './case-expr-check.js';
8
9
  /**
@@ -115,11 +116,11 @@ export function eventTrigger(descriptorOrOpts = {}, descriptorOpts = {}) {
115
116
  const object = descriptor ? undefined : opts.object;
116
117
  if (object !== undefined) {
117
118
  if (opts.subscription)
118
- throw new Error('eventTrigger: pass the watched object as `subscription.object` on a resolved subscription, not as `object`.');
119
+ throw new CompileRefusal('CASE_TRIGGER_OBJECT_AND_SUBSCRIPTION', 'eventTrigger: pass the watched object as `subscription.object` on a resolved subscription, not as `object`.');
119
120
  // Refuse padding rather than trim it: the value must match the SDD's
120
121
  // source object exactly, and a silent trim would hide the typo.
121
122
  if (typeof object !== 'string' || !object.trim() || object !== object.trim())
122
- throw new Error('eventTrigger: `object` must be a non-empty string with no surrounding whitespace.');
123
+ throw new CompileRefusal('CASE_TRIGGER_OBJECT_INVALID', 'eventTrigger: `object` must be a non-empty string with no surrounding whitespace.');
123
124
  }
124
125
  return {
125
126
  kind: 'event',
@@ -178,7 +179,7 @@ class TaskBuilder {
178
179
  }
179
180
  setKind(kind) {
180
181
  if (this._kind)
181
- throw new Error(`task "${this._name}": kind already set to "${this._kind}", cannot also be "${kind}".`);
182
+ throw new CompileRefusal('TASK_KIND_TWICE', `task "${this._name}": kind already set to "${this._kind}", cannot also be "${kind}".`);
182
183
  this._kind = kind;
183
184
  }
184
185
  reference(kind, name, opts = {}) {
@@ -530,7 +531,7 @@ class TaskBuilder {
530
531
  const type = (v.type ?? 'string');
531
532
  if ('assign' in v) {
532
533
  if ('source' in v)
533
- throw new Error(`task "${this._name}": output "${name}" sets both source and assign — use source to extract a result field, assign for a custom output.`);
534
+ throw new CompileRefusal('TASK_OUTPUT_SOURCE_AND_ASSIGN', `task "${this._name}": output "${name}" sets both source and assign — use source to extract a result field, assign for a custom output.`);
534
535
  this._outputs.push({ var: name, source: customOutputValue(v.assign), type, custom: true });
535
536
  }
536
537
  else {
@@ -553,7 +554,7 @@ class TaskBuilder {
553
554
  /** @internal */
554
555
  _build() {
555
556
  if (!this._kind)
556
- throw new Error(`task "${this._name}" has no kind — call .process()/.agent()/.rpa()/.action()/.connector()/.waitForTimer()/… once.`);
557
+ throw new CompileRefusal('TASK_NO_KIND', `task "${this._name}" has no kind — call .process()/.agent()/.rpa()/.action()/.connector()/.waitForTimer()/… once.`);
557
558
  // Task input binding is reference-mode only (REF_IO): a connector task takes
558
559
  // its inputs in `.connector()` / `.waitForConnector()`. Output extracts also
559
560
  // work on connector and wait-for-connector tasks: the task writes its own
@@ -563,14 +564,14 @@ class TaskBuilder {
563
564
  const REF_IO = new Set(['process', 'agent', 'rpa', 'api-workflow', 'case-management', 'flow-process', 'function', 'business-rule']);
564
565
  const CONNECTOR_OUTPUTS = new Set(['connector', 'wait-for-connector']);
565
566
  if (this._inputs && !REF_IO.has(this._kind))
566
- throw new Error(`task "${this._name}": .inputs()/.outputs() are only supported on reference-mode tasks (process/agent/rpa/api-workflow/case-management/flow-process/function/business-rule), not "${this._kind}". A connector task takes its inputs in .connector() / .waitForConnector().`);
567
+ throw new CompileRefusal('TASK_INPUTS_UNSUPPORTED', `task "${this._name}": .inputs()/.outputs() are only supported on reference-mode tasks (process/agent/rpa/api-workflow/case-management/flow-process/function/business-rule), not "${this._kind}". A connector task takes its inputs in .connector() / .waitForConnector().`);
567
568
  if (this._outputs && !REF_IO.has(this._kind) && !CONNECTOR_OUTPUTS.has(this._kind))
568
- throw new Error(`task "${this._name}": .outputs() is only supported on reference-mode tasks (process/agent/rpa/api-workflow/case-management/flow-process/function/business-rule) and on connector / wait-for-connector tasks, not "${this._kind}".`);
569
+ throw new CompileRefusal('TASK_OUTPUTS_UNSUPPORTED', `task "${this._name}": .outputs() is only supported on reference-mode tasks (process/agent/rpa/api-workflow/case-management/flow-process/function/business-rule) and on connector / wait-for-connector tasks, not "${this._kind}".`);
569
570
  if (REF_IO.has(this._kind) && !this._ref && (this._inputs || this._outputs))
570
- throw new Error(`task "${this._name}": an unresolved reference task cannot declare inputs or outputs.`);
571
+ throw new CompileRefusal('TASK_IO_UNRESOLVED_REFERENCE', `task "${this._name}": an unresolved reference task cannot declare inputs or outputs.`);
571
572
  if (this._kind === 'wait-for-connector' && this._outputs
572
573
  && !(this._waitConnector && 'connector' in this._waitConnector && 'event' in this._waitConnector))
573
- throw new Error(`task "${this._name}": a placeholder wait-for-connector task has no event response to extract outputs from — name the event (.waitForConnector(<trigger descriptor>) or { connector, event }).`);
574
+ throw new CompileRefusal('TASK_OUTPUTS_PLACEHOLDER_EVENT', `task "${this._name}": a placeholder wait-for-connector task has no event response to extract outputs from — name the event (.waitForConnector(<trigger descriptor>) or { connector, event }).`);
574
575
  return {
575
576
  name: this._name,
576
577
  kind: this._kind,
@@ -824,7 +825,7 @@ class CaseBuilder {
824
825
  schemaVersion(version) {
825
826
  const refusal = schemaVersionRefusal(CASE_SCHEMA_VERSIONS, version);
826
827
  if (refusal)
827
- throw new Error(refusal);
828
+ throw new CompileRefusal('SCHEMA_VERSION_UNSUPPORTED', refusal);
828
829
  this._schemaVersion = version;
829
830
  return this;
830
831
  }
package/dist/case/load.js CHANGED
@@ -3,6 +3,7 @@ import { pathToFileURL } from 'node:url';
3
3
  import { resolve } from 'node:path';
4
4
  import { existsSync, statSync } from 'node:fs';
5
5
  import { useThisSdkForAuthoredSource } from '../sdk-resolve.js';
6
+ import { CompileRefusal } from '../core/compile-refusal.js';
6
7
  /**
7
8
  * Resolve a user argument (a `.ts` path or a BaseName) to a case source file.
8
9
  *
@@ -19,16 +20,16 @@ export function resolveCaseFile(arg) {
19
20
  if (existsSync(resolved) && statSync(resolved).isFile())
20
21
  return resolved;
21
22
  }
22
- throw new Error(`case source not found: tried ${candidates.join(', ')}`);
23
+ throw new CompileRefusal('CASE_SOURCE_NOT_FOUND', `case source not found: tried ${candidates.join(', ')}`);
23
24
  }
24
25
  export async function loadBuiltCase(file) {
25
26
  useThisSdkForAuthoredSource();
26
27
  const mod = await import(pathToFileURL(file).href);
27
28
  const exp = mod.default ?? mod.casePlan ?? mod.case;
28
29
  if (!exp)
29
- throw new Error(`${file} has no default export. Add: export default casePlan('id')...build();`);
30
+ throw new CompileRefusal('CASE_NO_DEFAULT_EXPORT', `${file} has no default export. Add: export default casePlan('id')...build();`);
30
31
  const built = typeof exp.build === 'function' ? exp.build() : exp;
31
32
  if (!built || !Array.isArray(built.stages))
32
- throw new Error(`${file} default export is not a built case. Did you call .build()?`);
33
+ throw new CompileRefusal('CASE_EXPORT_NOT_BUILT', `${file} default export is not a built case. Did you call .build()?`);
33
34
  return built;
34
35
  }
@@ -19,16 +19,17 @@ import { bindingLabelRefusal } from '../core/binding-messages.js';
19
19
  import { resolveEventWhere } from '../core/lookups.js';
20
20
  import { resolveCaseSubscription } from './subscription.js';
21
21
  import { dedupeConditionNames } from './rule-names.js';
22
- import { externalDescriptorRefusal, externalHybridRefusal, externalServiceType, isExternalExecutionMode } from './external.js';
22
+ import { EXTERNAL_TASK_DESCRIPTOR_CONTRACT, EXTERNAL_TASK_HYBRID_UNSUPPORTED, externalDescriptorRefusal, externalHybridRefusal, externalServiceType, isExternalExecutionMode, } from './external.js';
23
23
  import { CASE_FORMAT_PROFILE, CASE_SCHEMA_VERSIONS } from './format-profile.js';
24
24
  import { isResourceLabelRefusal, resolveResourceRef, resourceIdentity } from './resource-identity.js';
25
25
  import { ownEntry } from '../core/own-entry.js';
26
26
  import { resolveSchemaVersion } from '../schema-version.js';
27
27
  import { caseJsonPreservation, caseJsonPreservationErrors, } from './preserve.js';
28
28
  import { businessEventProblems } from './business-event-shape.js';
29
- import { readEventFilter, eventFilterProblem, eventFilterTreeLeaf } from '../core/event-filters.js';
29
+ import { readEventFilterLeaf, eventFilterTreeLeaf } from '../core/event-filters.js';
30
30
  import { responseJsonSchema } from '../core/connector-response-schema.js';
31
31
  import { ruleShapeProblems } from './rule-options.js';
32
+ import { CompileRefusal } from '../core/compile-refusal.js';
32
33
  /**
33
34
  * Condition `displayName` allocator.
34
35
  *
@@ -135,7 +136,7 @@ export function serialize(built, opts = {}) {
135
136
  built.stages.forEach((stage, si) => {
136
137
  const sid = ids.stageId(`stage:${stage.label}`);
137
138
  if (resolver.stageIdByLabel.has(stage.label))
138
- throw new Error(`duplicate stage label "${stage.label}".`);
139
+ throw new CompileRefusal('DUP_STAGE', `duplicate stage label "${stage.label}".`);
139
140
  resolver.stageIdByLabel.set(stage.label, sid);
140
141
  stageIds.push(sid);
141
142
  taskIds.push([]);
@@ -143,7 +144,7 @@ export function serialize(built, opts = {}) {
143
144
  taskIds[si].push([]);
144
145
  lane.forEach((task) => {
145
146
  if (seenTaskNames.has(task.name))
146
- throw new Error(`duplicate task displayName "${task.name}" — task names must be unique across the case.`);
147
+ throw new CompileRefusal('DUP_TASK', `duplicate task displayName "${task.name}" — task names must be unique across the case.`);
147
148
  seenTaskNames.add(task.name);
148
149
  const tid = ids.taskId(`task:${stage.label}/${task.name}`);
149
150
  taskIds[si][li].push(tid);
@@ -187,13 +188,13 @@ export function serialize(built, opts = {}) {
187
188
  const selectNextStage = built.stages.flatMap((stage) => stage.exit)
188
189
  .filter((exit) => exit.selectNextStage !== undefined);
189
190
  if (selectNextStage.length > 1)
190
- throw new Error('select-next-stage can be configured on at most one stage exit per case.');
191
+ throw new CompileRefusal('SELECT_NEXT_STAGE_MULTIPLE', 'select-next-stage can be configured on at most one stage exit per case.');
191
192
  if (selectNextStage[0]?.selectNextStage) {
192
193
  const { objectName, connector } = selectNextStage[0].selectNextStage;
193
194
  if (selectNextStage[0].type !== 'wait-for-user')
194
- throw new Error('select-next-stage requires an exit with type "wait-for-user".');
195
+ throw new CompileRefusal('SELECT_NEXT_STAGE_EXIT_TYPE', 'select-next-stage requires an exit with type "wait-for-user".');
195
196
  if (!objectName.trim())
196
- throw new Error('select-next-stage objectName must be non-empty.');
197
+ throw new CompileRefusal('SELECT_NEXT_STAGE_OBJECT_NAME', 'select-next-stage objectName must be non-empty.');
197
198
  const context = [];
198
199
  if (connector) {
199
200
  context.push(io('connectorKey', 'string', { value: connector.connectorKey }));
@@ -234,7 +235,7 @@ export function serialize(built, opts = {}) {
234
235
  if (built.businessEvents?.length) {
235
236
  const [problem] = businessEventProblems(built.businessEvents);
236
237
  if (problem)
237
- throw new Error(problem.message);
238
+ throw new CompileRefusal(problem.code, problem.message);
238
239
  metadata.businessEvents = built.businessEvents.map(emitBusinessEvent);
239
240
  }
240
241
  // Variables: declared vars + the readable companions that REASSIGNED task
@@ -347,11 +348,11 @@ function applyAuthorLayout(result, authored) {
347
348
  const nodes = result.nodes;
348
349
  const layoutValue = result.layout;
349
350
  if (layoutValue !== undefined && (!layoutValue || typeof layoutValue !== 'object' || Array.isArray(layoutValue)))
350
- throw new Error('case layout: preserved layout must be an object before authored entries can be applied.');
351
+ throw new Error('internal SDK error: case layout: preserved layout must be an object before authored entries can be applied.');
351
352
  const existingLayout = (layoutValue ?? {});
352
353
  const existingNodes = existingLayout.nodes;
353
354
  if (existingNodes !== undefined && (!existingNodes || typeof existingNodes !== 'object' || Array.isArray(existingNodes)))
354
- throw new Error('case layout: preserved layout.nodes must be an object before authored entries can be applied.');
355
+ throw new Error('internal SDK error: case layout: preserved layout.nodes must be an object before authored entries can be applied.');
355
356
  const layoutNodes = { ...(existingNodes ?? {}) };
356
357
  const layout = { ...existingLayout, nodes: layoutNodes };
357
358
  for (const entry of entries) {
@@ -363,16 +364,16 @@ function applyAuthorLayout(result, authored) {
363
364
  return trigger && label === entry.name;
364
365
  });
365
366
  if (matches.length !== 1)
366
- throw new Error(`case layout: ${entry.kind} "${entry.name}" matches ${matches.length} emitted nodes; expected exactly 1.`);
367
+ throw new CompileRefusal('CASE_LAYOUT_NODE_MATCH', `case layout: ${entry.kind} "${entry.name}" matches ${matches.length} emitted nodes; expected exactly 1.`);
367
368
  const nodeId = matches[0].id;
368
369
  if (typeof nodeId !== 'string' || !nodeId)
369
- throw new Error(`case layout: ${entry.kind} "${entry.name}" has no emitted node id.`);
370
+ throw new Error(`internal SDK error: case layout: ${entry.kind} "${entry.name}" has no emitted node id.`);
370
371
  const unknown = Object.keys(entry.layout).filter((field) => !CASE_NODE_LAYOUT_FIELDS.includes(field));
371
372
  if (unknown.length)
372
- throw new Error(`case layout: ${entry.kind} "${entry.name}" has unsupported field "${unknown[0]}".`);
373
+ throw new CompileRefusal('CASE_LAYOUT_UNKNOWN_FIELD', `case layout: ${entry.kind} "${entry.name}" has unsupported field "${unknown[0]}".`);
373
374
  const previous = layoutNodes[nodeId];
374
375
  if (previous !== undefined && (!previous || typeof previous !== 'object' || Array.isArray(previous)))
375
- throw new Error(`case layout: preserved entry for ${entry.kind} "${entry.name}" must be an object.`);
376
+ throw new Error(`internal SDK error: case layout: preserved entry for ${entry.kind} "${entry.name}" must be an object.`);
376
377
  const merged = { ...(previous ?? {}) };
377
378
  for (const field of CASE_NODE_LAYOUT_FIELDS)
378
379
  if (entry.layout[field] !== undefined)
@@ -394,7 +395,7 @@ export function applyPreservation(result, preservation, options = {}) {
394
395
  return result;
395
396
  const errors = caseJsonPreservationErrors(preservation);
396
397
  if (errors.length)
397
- throw new Error(`invalid Case JSON preservation payload: ${errors.join('; ')}`);
398
+ throw new CompileRefusal('PRESERVATION_COLLISION', `invalid Case JSON preservation payload: ${errors.join('; ')}`);
398
399
  applyPreservedIdentities(result, preservation);
399
400
  Object.assign(result, preservation.topLevel ?? {});
400
401
  Object.assign(result.metadata, preservation.metadata ?? {});
@@ -402,7 +403,7 @@ export function applyPreservation(result, preservation, options = {}) {
402
403
  if (caseAppConfig && preservation.caseAppConfigFields) {
403
404
  for (const [field, value] of Object.entries(preservation.caseAppConfigFields.fields ?? {})) {
404
405
  if (!options.overwrite && Object.prototype.hasOwnProperty.call(caseAppConfig, field))
405
- throw new Error(`preserved caseAppConfig field "${field}" collides with serializer-owned output.`);
406
+ throw new CompileRefusal('PRESERVATION_FIELD_COLLISION', `preserved caseAppConfig field "${field}" collides with serializer-owned output.`);
406
407
  caseAppConfig[field] = value;
407
408
  }
408
409
  for (const entry of preservation.caseAppConfigFields.sections ?? []) {
@@ -411,7 +412,7 @@ export function applyPreservation(result, preservation, options = {}) {
411
412
  continue;
412
413
  for (const [field, value] of Object.entries(entry.fields)) {
413
414
  if (!options.overwrite && Object.prototype.hasOwnProperty.call(section, field))
414
- throw new Error(`preserved Case App section "${entry.id}" field "${field}" collides with serializer-owned output.`);
415
+ throw new CompileRefusal('PRESERVATION_FIELD_COLLISION', `preserved Case App section "${entry.id}" field "${field}" collides with serializer-owned output.`);
415
416
  section[field] = value;
416
417
  }
417
418
  }
@@ -431,10 +432,10 @@ export function applyPreservation(result, preservation, options = {}) {
431
432
  if (!row && options.overwrite)
432
433
  continue;
433
434
  if (!row)
434
- throw new Error(`preserved variable "${name}" was not regenerated in variables.${lane}.`);
435
+ throw new CompileRefusal('PRESERVATION_TARGET_MISSING', `preserved variable "${name}" was not regenerated in variables.${lane}.`);
435
436
  for (const [field, value] of Object.entries(fields)) {
436
437
  if (!options.overwrite && Object.prototype.hasOwnProperty.call(row, field))
437
- throw new Error(`preserved variable "${name}" field "${field}" collides with serializer-owned output.`);
438
+ throw new CompileRefusal('PRESERVATION_FIELD_COLLISION', `preserved variable "${name}" field "${field}" collides with serializer-owned output.`);
438
439
  row[field] = value;
439
440
  }
440
441
  }
@@ -446,7 +447,7 @@ export function applyPreservation(result, preservation, options = {}) {
446
447
  if (!row && options.overwrite)
447
448
  continue;
448
449
  if (!row)
449
- throw new Error(`legacy variable default "${name}" was not regenerated in variables.${lane}.`);
450
+ throw new CompileRefusal('PRESERVATION_TARGET_MISSING', `legacy variable default "${name}" was not regenerated in variables.${lane}.`);
450
451
  const encoded = JSON.stringify(value);
451
452
  // The legacy row exists to carry the NON-STRING spelling of a value the
452
453
  // serializer now writes as a string, so it is only applicable while the two
@@ -457,7 +458,7 @@ export function applyPreservation(result, preservation, options = {}) {
457
458
  if (row.default !== encoded) {
458
459
  if (options.overwrite)
459
460
  continue;
460
- throw new Error(`legacy variable default "${name}" does not match the serializer-owned default.`);
461
+ throw new CompileRefusal('PRESERVATION_LEGACY_DEFAULT_MISMATCH', `legacy variable default "${name}" does not match the serializer-owned default.`);
461
462
  }
462
463
  row.default = value;
463
464
  }
@@ -485,7 +486,7 @@ export function applyPreservation(result, preservation, options = {}) {
485
486
  if (task[field] === value)
486
487
  continue;
487
488
  if (!options.overwrite)
488
- throw new Error(`preserved task "${entry.stage}/${entry.task}" field "${field}" collides with serializer-owned output.`);
489
+ throw new CompileRefusal('PRESERVATION_FIELD_COLLISION', `preserved task "${entry.stage}/${entry.task}" field "${field}" collides with serializer-owned output.`);
489
490
  }
490
491
  task[field] = value;
491
492
  }
@@ -509,7 +510,7 @@ export function applyPreservation(result, preservation, options = {}) {
509
510
  if (!trigger && options.overwrite)
510
511
  continue;
511
512
  if (!trigger)
512
- throw new Error(`trigger ${index + 1} was not regenerated for preserved data fields.`);
513
+ throw new CompileRefusal('PRESERVATION_TARGET_MISSING', `trigger ${index + 1} was not regenerated for preserved data fields.`);
513
514
  Object.assign(trigger.data, fields);
514
515
  }
515
516
  if (preservation.nodes?.length) {
@@ -721,7 +722,7 @@ function emitVariables(vars, ids, triggerNodeByRef) {
721
722
  return { default: vd.default };
722
723
  const value = JSON.stringify(vd.default);
723
724
  if (value === undefined)
724
- throw new TypeError(`Case variable "${vd.name}" has a default that cannot be JSON encoded.`);
725
+ throw new CompileRefusal('CASE_VAR_DEFAULT_NOT_JSON', `Case variable "${vd.name}" has a default that cannot be JSON encoded.`);
725
726
  return { default: value };
726
727
  };
727
728
  const readableCompanion = (vd) => ({
@@ -748,7 +749,7 @@ function emitVariables(vars, ids, triggerNodeByRef) {
748
749
  // to the trigger node, so it does not also take a root companion.
749
750
  const node = triggerNodeByRef.get(vd.sourceTrigger);
750
751
  if (!node)
751
- throw new Error(`In-arg "${vd.name}" is bound via { from } to a trigger that was not added with .trigger(...).`);
752
+ throw new CompileRefusal('CASE_IN_ARG_TRIGGER_NOT_ADDED', `In-arg "${vd.name}" is bound via { from } to a trigger that was not added with .trigger(...).`);
752
753
  entry.default = vd.default === undefined ? '' : encodedDefault(vd).default;
753
754
  entry.elementId = node.id;
754
755
  inputs.push(entry);
@@ -1038,7 +1039,7 @@ function withOutputExtracts(data, task, ids, resolver) {
1038
1039
  const own = Array.isArray(data.outputs) ? data.outputs : [];
1039
1040
  const elementId = own.find((row) => typeof row.elementId === 'string')?.elementId;
1040
1041
  if (!elementId)
1041
- throw new Error(`task "${task.name}": output extracts need the task's resolved response output.`);
1042
+ throw new CompileRefusal('TASK_OUTPUTS_NO_RESPONSE', `task "${task.name}": output extracts need the task's resolved response output.`);
1042
1043
  data.outputs = [
1043
1044
  ...own,
1044
1045
  ...task.outputs.map((o, i) => emitTaskOutput(o, elementId, ids, `${elementId}:out:${i}:${o.var}`, resolver)),
@@ -1076,7 +1077,7 @@ function isResolvedSubscription(spec) {
1076
1077
  * by the archived v1 artifacts. Placeholder bags never enter this path. */
1077
1078
  function resolvedSubscriptionBag(kind, spec, resolver, elementId, where) {
1078
1079
  if (!resolver.library)
1079
- throw new Error(`${kind === 'trigger' ? 'event trigger' : 'wait-for-connector'} needs the connector library — `
1080
+ throw new CompileRefusal('LIBRARY_REQUIRED', `${kind === 'trigger' ? 'event trigger' : 'wait-for-connector'} needs the connector library — `
1080
1081
  + `pass { library } to serialize or use uip maestro case compile --library.`);
1081
1082
  const rc = resolveCaseSubscription(resolver.library, kind, spec, { where, bindings: resolver.bindings });
1082
1083
  const op = rc.entry.operation ?? {};
@@ -1121,12 +1122,13 @@ function subscriptionMetadata(rc, op, filters, elementId) {
1121
1122
  filters: filters.map((entry, index) => {
1122
1123
  // Same authored shape as a flow's event filter, same designer grammar (see
1123
1124
  // `event-filters.ts`); a malformed leaf is refused rather than dropped.
1124
- const { read } = readEventFilter(entry);
1125
- if (!read)
1126
- throw new Error(`event filter ${index} must carry a field and exactly one operator — got ${JSON.stringify(entry)}.`);
1127
- const problem = eventFilterProblem(read);
1128
- if (problem)
1129
- throw new Error(`event filter ${index} on \`${read.field}\`: ${problem}`);
1125
+ // The code `check` gives the same leaf (`core/event-checks.ts`).
1126
+ const judged = readEventFilterLeaf(entry);
1127
+ if (judged.code !== undefined)
1128
+ throw new CompileRefusal(judged.code, judged.problem !== undefined
1129
+ ? `event filter ${index} on \`${judged.read?.field}\`: ${judged.problem}`
1130
+ : `event filter ${index} must carry a field and exactly one operator — got ${JSON.stringify(entry)}.`);
1131
+ const { read } = judged;
1130
1132
  return {
1131
1133
  ...eventFilterTreeLeaf(read),
1132
1134
  uiId: stableUuid(`${elementId}:${read.field}:${String(read.value)}:${index}`),
@@ -1393,14 +1395,14 @@ function referenceBindings(kind, authored, resolver, ids, taskName) {
1393
1395
  // literal value, so the task binds exactly as the literal form does.
1394
1396
  const ref = resolveResourceRef(authored, resolver.bindings, `Task "${taskName}"`);
1395
1397
  if (isResourceLabelRefusal(ref))
1396
- throw new Error(`[${ref.code}] ${ref.message}`);
1398
+ throw new CompileRefusal(ref.code, ref.message);
1397
1399
  const binding = kind === 'business-rule'
1398
1400
  ? { resource: BUSINESS_RULE_RESOURCE }
1399
1401
  : kind === 'action'
1400
1402
  ? { resource: ACTION_APP_RESOURCE }
1401
1403
  : ownEntry(REFERENCE_BINDING, kind);
1402
1404
  if (!binding)
1403
- throw new Error(`task kind "${kind}" is not a published-resource task.`);
1405
+ throw new Error(`internal SDK error: task kind "${kind}" is not a published-resource task.`);
1404
1406
  // An in-solution resource (`folder: 'solution_folder'`) keeps the sentinel
1405
1407
  // in its key and binds an empty folderPath — see resource-identity.ts.
1406
1408
  const { resourceKey, folderPath } = resourceIdentity(ref.name, ref.folderPath);
@@ -1459,7 +1461,7 @@ function businessRuleTaskData(task, resolver, elementId, ids) {
1459
1461
  */
1460
1462
  function connectorTaskData(spec, resolver, elementId, where, executionType) {
1461
1463
  if (!resolver.library)
1462
- throw new Error(`connector task needs the connector library — pass { library } to serialize or use uip maestro case compile --library.`);
1464
+ throw new CompileRefusal('LIBRARY_REQUIRED', `connector task needs the connector library — pass { library } to serialize or use uip maestro case compile --library.`);
1463
1465
  const rc = resolver.library.resolve(spec.key, spec.action, spec.version, spec.object);
1464
1466
  const op = rc.entry.operation ?? {};
1465
1467
  const context = [
@@ -1527,17 +1529,17 @@ function connectorTaskData(spec, resolver, elementId, where, executionType) {
1527
1529
  */
1528
1530
  function externalTaskData(kind, spec, resolver, elementId, where) {
1529
1531
  if (!resolver.library)
1530
- throw new Error(`${kind} task needs the connector library — pass { library } to serialize or use uip maestro case compile --library.`);
1532
+ throw new CompileRefusal('LIBRARY_REQUIRED', `${kind} task needs the connector library — pass { library } to serialize or use uip maestro case compile --library.`);
1531
1533
  const rc = resolver.library.resolve(spec.connector.key, spec.connector.action, spec.connector.version, spec.connector.object);
1532
1534
  const refused = externalDescriptorRefusal(kind, rc);
1533
1535
  if (refused)
1534
- throw new Error(refused);
1536
+ throw new CompileRefusal(EXTERNAL_TASK_DESCRIPTOR_CONTRACT, refused);
1535
1537
  if (!isExternalExecutionMode(spec.mode))
1536
- throw new Error(`${kind} task mode must be the connector object's executionType: "sync", "async" or "hybrid".`);
1538
+ throw new CompileRefusal('EXTERNAL_TASK_MODE', `${kind} task mode must be the connector object's executionType: "sync", "async" or "hybrid".`);
1537
1539
  if (spec.mode === 'hybrid')
1538
- throw new Error(externalHybridRefusal(where));
1540
+ throw new CompileRefusal(EXTERNAL_TASK_HYBRID_UNSUPPORTED, externalHybridRefusal(where));
1539
1541
  if (!spec.connector.connection || !spec.connector.folder)
1540
- throw new Error(`${kind} task requires non-empty connection and folder binding names.`);
1542
+ throw new CompileRefusal(spec.connector.connection ? 'EXTERNAL_TASK_FOLDER' : 'EXTERNAL_TASK_CONNECTION', `${kind} task requires non-empty connection and folder binding names.`);
1541
1543
  const data = connectorTaskData(spec.connector, resolver, elementId, where, spec.mode);
1542
1544
  const context = data.context;
1543
1545
  const metadataAt = context.findIndex((row) => row.name === 'metadata');
@@ -1642,7 +1644,7 @@ function folderBindingRef(resolver, name, connection, site) {
1642
1644
  for (const row of resolver.bindingSink.values()) {
1643
1645
  if (row.resourceKey === connection.resourceKey && row.propertyAttribute === 'folderKey'
1644
1646
  && row.default !== folderKey)
1645
- throw new Error(`${site.where}: connection "${connection.resourceKey}" is bound to two folders: `
1647
+ throw new CompileRefusal('BINDING_CONNECTION_TWO_FOLDERS', `${site.where}: connection "${connection.resourceKey}" is bound to two folders: `
1646
1648
  + `"${String(row.name)}" (${String(row.default)}) and "${name}" (${folderKey}). `
1647
1649
  + `A connection lives in one folder; use the same folder binding for every task on it.`);
1648
1650
  }
@@ -1826,13 +1828,13 @@ function emitRules(rules, seed, ownerId, ids, resolver, site) {
1826
1828
  function emitRule(r, seed, ownerId, ids, resolver, site) {
1827
1829
  const [shape] = ruleShapeProblems(r);
1828
1830
  if (shape)
1829
- throw new Error(`${shape.message.replace(/^Rule /, 'rule ')} (in ${site})`);
1831
+ throw new CompileRefusal(shape.code, `${shape.message.replace(/^Rule /, 'rule ')} (in ${site})`);
1830
1832
  const ruleId = ids.ruleId(seed);
1831
1833
  const out = { rule: r.rule, id: ruleId };
1832
1834
  if (r.rule === 'selected-stage-completed' || r.rule === 'selected-stage-exited') {
1833
1835
  const sid = r.stage && resolver.stageIdByLabel.get(r.stage);
1834
1836
  if (!sid)
1835
- throw new Error(`rule "${r.rule}" references unknown stage "${r.stage}".`);
1837
+ throw new CompileRefusal('UNKNOWN_STAGE_REF', `rule "${r.rule}" references unknown stage "${r.stage}".`);
1836
1838
  out[CASE_FORMAT_PROFILE.selectedStageField] = CASE_FORMAT_PROFILE.selectedStageCardinality === 'singular' ? sid : [sid];
1837
1839
  }
1838
1840
  if (r.rule === 'selected-tasks-completed') {
@@ -1840,7 +1842,7 @@ function emitRule(r, seed, ownerId, ids, resolver, site) {
1840
1842
  out.selectedTasksIds = names.map((n) => {
1841
1843
  const tid = resolver.taskIdByKey.get(n);
1842
1844
  if (!tid)
1843
- throw new Error(`rule "selected-tasks-completed" references unknown task "${n}".`);
1845
+ throw new CompileRefusal('UNKNOWN_TASK_REF', `rule "selected-tasks-completed" references unknown task "${n}".`);
1844
1846
  return tid;
1845
1847
  });
1846
1848
  }
@@ -1853,12 +1855,12 @@ function emitRule(r, seed, ownerId, ids, resolver, site) {
1853
1855
  // preallocated id. `slaId` alone = a breach rule; adding `escalationId` = at-risk.
1854
1856
  const slaId = r.sla && resolver.slaIdByName.get(r.sla);
1855
1857
  if (!slaId)
1856
- throw new Error(`rule "sla-status-change" references unknown SLA "${r.sla}" — declare it with .sla({ displayName: "${r.sla}", … }).`);
1858
+ throw new CompileRefusal('UNKNOWN_SLA_REF', `rule "sla-status-change" references unknown SLA "${r.sla}" — declare it with .sla({ displayName: "${r.sla}", … }).`);
1857
1859
  out.slaId = slaId;
1858
1860
  if (r.escalation) {
1859
1861
  const escId = resolver.escalationIdByName.get(r.escalation);
1860
1862
  if (!escId)
1861
- throw new Error(`rule "sla-status-change" references unknown escalation "${r.escalation}".`);
1863
+ throw new CompileRefusal('UNKNOWN_ESCALATION_REF', `rule "sla-status-change" references unknown escalation "${r.escalation}".`);
1862
1864
  out.escalationId = escId;
1863
1865
  }
1864
1866
  }
@@ -1866,9 +1868,9 @@ function emitRule(r, seed, ownerId, ids, resolver, site) {
1866
1868
  // The event is matched by its exact name at run time; a rule without one
1867
1869
  // listens for nothing, so both a missing and an undeclared name refuse.
1868
1870
  if (!r.businessEvent)
1869
- throw new Error(`rule "api-event" in ${site} names no business event — write rule('api-event', { businessEvent: '<name>' }) with a name declared by .businessEvent('<name>').`);
1871
+ throw new CompileRefusal('API_EVENT_NO_BUSINESS_EVENT', `rule "api-event" in ${site} names no business event — write rule('api-event', { businessEvent: '<name>' }) with a name declared by .businessEvent('<name>').`);
1870
1872
  if (!resolver.businessEvents.has(r.businessEvent))
1871
- throw new Error(`rule "api-event" in ${site} listens for business event "${r.businessEvent}", which the case does not declare — add .businessEvent(${JSON.stringify(r.businessEvent)}).`);
1873
+ throw new CompileRefusal('UNKNOWN_BUSINESS_EVENT', `rule "api-event" in ${site} listens for business event "${r.businessEvent}", which the case does not declare — add .businessEvent(${JSON.stringify(r.businessEvent)}).`);
1872
1874
  out.businessEventType = r.businessEvent;
1873
1875
  }
1874
1876
  if (r.expression)
@@ -1939,7 +1941,7 @@ function emitExit(c, seed, ownerId, label, ids, resolver) {
1939
1941
  if (c.exitToStage) {
1940
1942
  const sid = resolver.stageIdByLabel.get(c.exitToStage);
1941
1943
  if (!sid)
1942
- throw new Error(`exit condition routes to unknown stage "${c.exitToStage}".`);
1944
+ throw new CompileRefusal('UNKNOWN_EXIT_STAGE', `exit condition routes to unknown stage "${c.exitToStage}".`);
1943
1945
  out.exitToStageId = sid;
1944
1946
  }
1945
1947
  return out;
@@ -98,6 +98,26 @@ export declare function readEventFilter(leaf: unknown): {
98
98
  keys: EventFilterOperatorKey[];
99
99
  read?: ReadEventFilter;
100
100
  };
101
+ /** A code `check` gives a filter leaf it refuses (`core/event-checks.ts`). */
102
+ export type EventFilterLeafCode = 'EVENT_FILTER_NO_FIELD' | 'EVENT_FILTER_MANY_OPERATORS' | 'EVENT_FILTER_NO_VALUE' | 'EVENT_FILTER_BACKSLASH' | 'EVENT_FILTER_BAD_VALUE';
103
+ /**
104
+ * Read an authored filter leaf and judge it the way `check` does: the first
105
+ * code `core/event-checks.ts` gives the leaf, in the same order, or the read
106
+ * condition when the leaf lowers. A serializer that refuses a bad leaf with one
107
+ * message calls this, so its code cannot drift from check's.
108
+ *
109
+ * @example
110
+ * readEventFilterLeaf({ field: 'subject', contains: 'Report' }) // { read: { field: 'subject', operator: 'contains', value: 'Report' } }
111
+ * readEventFilterLeaf({ contains: 'Report' }) // { code: 'EVENT_FILTER_NO_FIELD', read: { field: '', ... } }
112
+ */
113
+ export declare function readEventFilterLeaf(leaf: unknown): {
114
+ code?: undefined;
115
+ read: ReadEventFilter;
116
+ } | {
117
+ code: EventFilterLeafCode;
118
+ read?: ReadEventFilter;
119
+ problem?: string;
120
+ };
101
121
  export declare function isIsoDateString(value: unknown): value is string;
102
122
  /**
103
123
  * Why a filter cannot be lowered, or `undefined` when it can. Two shapes are
@@ -81,6 +81,33 @@ export function readEventFilter(leaf) {
81
81
  return { keys };
82
82
  return { keys, read: { field: String(f.field ?? ''), operator: keys[0], value } };
83
83
  }
84
+ /**
85
+ * Read an authored filter leaf and judge it the way `check` does: the first
86
+ * code `core/event-checks.ts` gives the leaf, in the same order, or the read
87
+ * condition when the leaf lowers. A serializer that refuses a bad leaf with one
88
+ * message calls this, so its code cannot drift from check's.
89
+ *
90
+ * @example
91
+ * readEventFilterLeaf({ field: 'subject', contains: 'Report' }) // { read: { field: 'subject', operator: 'contains', value: 'Report' } }
92
+ * readEventFilterLeaf({ contains: 'Report' }) // { code: 'EVENT_FILTER_NO_FIELD', read: { field: '', ... } }
93
+ */
94
+ export function readEventFilterLeaf(leaf) {
95
+ const { keys, read } = readEventFilter(leaf);
96
+ const field = leaf?.field;
97
+ if (typeof field !== 'string' || field === '')
98
+ return { code: 'EVENT_FILTER_NO_FIELD', read };
99
+ if (keys.length > 1)
100
+ return { code: 'EVENT_FILTER_MANY_OPERATORS' };
101
+ if (!read)
102
+ return { code: 'EVENT_FILTER_NO_VALUE' };
103
+ const problem = eventFilterProblem(read);
104
+ const ambiguous = typeof read.value === 'string' ? jmesStringProblem(read.value) : undefined;
105
+ if (ambiguous)
106
+ return { code: 'EVENT_FILTER_BACKSLASH', read, problem: problem ?? ambiguous };
107
+ if (problem)
108
+ return { code: 'EVENT_FILTER_BAD_VALUE', read, problem };
109
+ return { read };
110
+ }
84
111
  /** An ISO-8601 calendar date, optionally with a time part — what the designer serializes a date filter as. */
85
112
  const ISO_DATE = /^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?)?$/;
86
113
  export function isIsoDateString(value) {
@@ -1,7 +1,14 @@
1
1
  /** What a code means for `check` and `compile`. */
2
2
  export type RefusalClass = 'lint' | 'lowering' | 'draft';
3
- /** Every code the Flow compile path emits → its class. Sorted by code. */
3
+ /**
4
+ * Every code the Flow and Case compile paths emit → its class. Sorted by code.
5
+ *
6
+ * One table, because codes are one namespace: `check` codes such as
7
+ * `CONNECTOR_INPUT` and `LIBRARY_REQUIRED` are shared across families, and a
8
+ * code means the same condition in each.
9
+ */
4
10
  export declare const REFUSALS: {
11
+ readonly ACTION_FIELD_UNKNOWN_KEY: "lint";
5
12
  readonly AGENTIC_EMPTY_RETURNS: "lint";
6
13
  readonly AGENTIC_KEY_NOT_KEY: "lint";
7
14
  readonly AGENTIC_LOCAL_FORM_UNVERIFIED: "lint";
@@ -43,17 +50,36 @@ export declare const REFUSALS: {
43
50
  readonly APIWF_READ_NOT_OUTPUT: "lint";
44
51
  readonly APIWF_READ_UNKNOWN_FIELD: "lint";
45
52
  readonly APIWF_READ_WITHOUT_RETURNS: "lint";
53
+ readonly API_EVENT_NO_BUSINESS_EVENT: "lowering";
46
54
  readonly ARM_SCOPED_OUTPUT_READ: "lint";
55
+ readonly BINDING_CONNECTION_TWO_FOLDERS: "lowering";
47
56
  readonly BINDING_MISSING: "draft";
48
57
  readonly BINDING_PLACEHOLDER_UNRESOLVED: "draft";
49
58
  readonly BINDING_SELF_NAME: "draft";
50
59
  readonly BINDING_UNDECLARED: "draft";
51
60
  readonly BRANCH_CONST_COND: "lint";
52
61
  readonly BREAK_OUTSIDE_LOOP: "lowering";
62
+ readonly BUSINESS_EVENT_NAME: "lowering";
63
+ readonly BUSINESS_EVENT_PAYLOAD_TYPE: "lowering";
64
+ readonly BUSINESS_EVENT_UNKNOWN_OPTION: "lowering";
65
+ readonly BUSINESS_RULE_EMPTY_DATA: "lint";
66
+ readonly BUSINESS_RULE_OUTPUT_NAME: "lint";
67
+ readonly BUSINESS_RULE_OUTPUT_SOURCE: "lint";
53
68
  readonly CALL_NO_NUMBER: "lint";
54
69
  readonly CALL_NUMBER_NOT_E164: "lint";
55
70
  readonly CARRIED_DEFINITION_CONFLICT: "lowering";
56
71
  readonly CARRIED_DEFINITION_INVALID: "lowering";
72
+ readonly CASE_APP_DETAILS_LIMIT: "lint";
73
+ readonly CASE_APP_DETAILS_TYPE: "lint";
74
+ readonly CASE_EXPORT_NOT_BUILT: "lowering";
75
+ readonly CASE_IN_ARG_TRIGGER_NOT_ADDED: "lowering";
76
+ readonly CASE_LAYOUT_NODE_MATCH: "lowering";
77
+ readonly CASE_LAYOUT_UNKNOWN_FIELD: "lowering";
78
+ readonly CASE_NO_DEFAULT_EXPORT: "lowering";
79
+ readonly CASE_SOURCE_NOT_FOUND: "lowering";
80
+ readonly CASE_TRIGGER_OBJECT_AND_SUBSCRIPTION: "lowering";
81
+ readonly CASE_TRIGGER_OBJECT_INVALID: "lowering";
82
+ readonly CASE_VAR_DEFAULT_NOT_JSON: "lowering";
57
83
  readonly CEQL_UNPARSEABLE: "lowering";
58
84
  readonly CHECK_INCOMPLETE: "lowering";
59
85
  readonly COMPILE_FAILED: "lowering";
@@ -68,6 +94,7 @@ export declare const REFUSALS: {
68
94
  readonly CONNECTOR_NO_FLOW_DEFINITION: "lowering";
69
95
  readonly CONNECTOR_OBJECT_NOT_GENERIC: "lowering";
70
96
  readonly CONNECTOR_OBJECT_REQUIRED: "draft";
97
+ readonly CONNECTOR_OUTPUT_SOURCE: "lint";
71
98
  readonly CONNECTOR_RESOLVE_FAILED: "lowering";
72
99
  readonly CONTINUE_OUTSIDE_LOOP: "lowering";
73
100
  readonly CONTRIBUTION_BINDING_UNRESOLVED: "draft";
@@ -112,11 +139,17 @@ export declare const REFUSALS: {
112
139
  readonly DOC_NO_FILEREF: "lint";
113
140
  readonly DOWHILE_CONST_COND: "lint";
114
141
  readonly DOWHILE_LIMIT: "lint";
142
+ readonly DUP_BUSINESS_EVENT: "lowering";
115
143
  readonly DUP_CASE: "lint";
116
144
  readonly DUP_END_NAME: "lowering";
145
+ readonly DUP_EXIT_RULE: "lint";
146
+ readonly DUP_RULE_NAME: "lint";
147
+ readonly DUP_STAGE: "lowering";
117
148
  readonly DUP_STEP: "lowering";
149
+ readonly DUP_TASK: "lowering";
118
150
  readonly EMPTY_ARM: "lint";
119
151
  readonly EMPTY_LOOP: "lint";
152
+ readonly EMPTY_REQUIRED_FIELD: "lint";
120
153
  readonly ENTRY_POINT_DUP_ID: "lowering";
121
154
  readonly ENTRY_POINT_INPUT_COLLISION: "lint";
122
155
  readonly ENTRY_POINT_NO_SHARED_BODY: "lowering";
@@ -124,6 +157,8 @@ export declare const REFUSALS: {
124
157
  readonly ERROR_FIELD_UNDECLARED: "lint";
125
158
  readonly ERROR_READ_OUTSIDE_HANDLER: "lowering";
126
159
  readonly ERROR_READ_VIA_OUT: "lint";
160
+ readonly ESCALATION_NO_RECIPIENTS: "lint";
161
+ readonly ESCALATION_ZERO_ATRISK_PCT: "lint";
127
162
  readonly EVENT_BYOA_UNVERIFIED: "lowering";
128
163
  readonly EVENT_FILTERS_NOT_ARRAY: "lint";
129
164
  readonly EVENT_FILTER_BACKSLASH: "lowering";
@@ -141,14 +176,23 @@ export declare const REFUSALS: {
141
176
  readonly EVENT_SCOPE_NOT_TAKEN: "lint";
142
177
  readonly EVENT_UNKNOWN: "lowering";
143
178
  readonly EVENT_UNPREPARED: "lint";
179
+ readonly EXCEPTION_STAGE_REQUIRED: "lint";
144
180
  readonly EXPR_SYNTAX: "lowering";
145
181
  readonly EXPR_UNDECLARED_REF: "lowering";
182
+ readonly EXTERNAL_TASK_CONNECTION: "lowering";
183
+ readonly EXTERNAL_TASK_DESCRIPTOR: "lint";
184
+ readonly EXTERNAL_TASK_DESCRIPTOR_CONTRACT: "lowering";
185
+ readonly EXTERNAL_TASK_EMPTY_DATA: "lint";
186
+ readonly EXTERNAL_TASK_FOLDER: "lowering";
187
+ readonly EXTERNAL_TASK_HYBRID_UNSUPPORTED: "lowering";
188
+ readonly EXTERNAL_TASK_MODE: "lowering";
146
189
  readonly EXTRACT_SCHEMA_SHAPE: "lint";
147
190
  readonly FILE_NOT_FOUND: "lowering";
148
191
  readonly FIRE_AND_FORGET_READ: "lint";
149
192
  readonly FIRE_AND_FORGET_RETURNS: "lowering";
150
193
  readonly FLOW_EXPORT_NOT_BUILT: "lowering";
151
194
  readonly FLOW_NO_DEFAULT_EXPORT: "lowering";
195
+ readonly FLOW_PROCESS_EMPTY_DATA: "lint";
152
196
  readonly FLOW_SOURCE_NOT_FOUND: "lowering";
153
197
  readonly FORM_TRIGGER_NO_INPUTS: "lint";
154
198
  readonly FUNCTION_EMPTY_RETURNS: "lint";
@@ -319,13 +363,19 @@ export declare const REFUSALS: {
319
363
  readonly LOOP_PARALLEL_LEGACY: "lint";
320
364
  readonly LOOP_VERSION_UNSUPPORTED: "lowering";
321
365
  readonly MOCK_HAS_NO_OUTPUT: "lint";
366
+ readonly NAME_HYGIENE: "lint";
322
367
  readonly NODE_FAMILY_REGISTRATION: "lowering";
323
368
  readonly NODE_VERSION_UNREGISTERED: "lowering";
369
+ readonly NO_CASE_COMPLETION: "lint";
324
370
  readonly NO_ID: "lint";
371
+ readonly NO_REQUIRED_TASK: "lint";
325
372
  readonly NO_RETURN: "lint";
373
+ readonly NO_STAGES: "lint";
326
374
  readonly OBJECT_UNPREPARED: "lint";
327
375
  readonly ONERROR_NO_ERROR_PORT: "lowering";
328
376
  readonly OUTPUT_BACKING_COLLISION: "lowering";
377
+ readonly OUTPUT_FORWARD_READ: "lint";
378
+ readonly OUTPUT_SELF_REFERENCE: "lint";
329
379
  readonly OUTPUT_TYPE_MISMATCH: "lint";
330
380
  readonly OUTPUT_VAR_MISMATCH: "lowering";
331
381
  readonly PACKAGE_NODES_NOT_PLATFORM: "lint";
@@ -338,6 +388,10 @@ export declare const REFUSALS: {
338
388
  readonly PORT_ALREADY_ROUTED: "lowering";
339
389
  readonly PORT_EMPTY_PATH: "lowering";
340
390
  readonly PORT_NO_SOURCE_STEP: "lowering";
391
+ readonly PRESERVATION_COLLISION: "lowering";
392
+ readonly PRESERVATION_FIELD_COLLISION: "lowering";
393
+ readonly PRESERVATION_LEGACY_DEFAULT_MISMATCH: "lowering";
394
+ readonly PRESERVATION_TARGET_MISSING: "lowering";
341
395
  readonly QUEUE_BAD_DATE: "lint";
342
396
  readonly QUEUE_BAD_PRIORITY: "lint";
343
397
  readonly QUEUE_ITEM_EXPR_UNSUPPORTED: "lowering";
@@ -366,6 +420,8 @@ export declare const REFUSALS: {
366
420
  readonly REF_TO_OWN_LOOP: "lint";
367
421
  readonly REF_UNKNOWN_TARGET: "lowering";
368
422
  readonly REF_UNREACHABLE_AFTER: "lint";
423
+ readonly RESOURCE_BINDING_UNDECLARED: "lowering";
424
+ readonly RESOURCE_REF_IS_BINDING: "lowering";
369
425
  readonly RETURN_UPDATES_SAME_VAR: "lowering";
370
426
  readonly RPA_KEY_NOT_KEY: "lint";
371
427
  readonly RPA_LOCAL_HAS_FOLDER: "lint";
@@ -378,6 +434,9 @@ export declare const REFUSALS: {
378
434
  readonly RPA_READ_NOT_OUTPUT: "lint";
379
435
  readonly RPA_READ_UNKNOWN_FIELD: "lint";
380
436
  readonly RPA_READ_WITHOUT_RETURNS: "lint";
437
+ readonly RULE_PLACEMENT: "lint";
438
+ readonly RULE_TASKS_REQUIRED: "lint";
439
+ readonly RULE_UNKNOWN_OPTION: "lowering";
381
440
  readonly SCHEDULE_CRON_VERSION: "lowering";
382
441
  readonly SCHEDULE_NEVER_FIRES: "lint";
383
442
  readonly SCHEDULE_NOT_ISO: "lint";
@@ -391,6 +450,9 @@ export declare const REFUSALS: {
391
450
  readonly SCRIPT_FUNCTION_UNLOWERABLE: "lowering";
392
451
  readonly SCRIPT_RETURNS_UNKNOWN_TYPE: "lint";
393
452
  readonly SDK_RESOLVE_HOOK_MISSING: "lowering";
453
+ readonly SELECT_NEXT_STAGE_EXIT_TYPE: "lowering";
454
+ readonly SELECT_NEXT_STAGE_MULTIPLE: "lowering";
455
+ readonly SELECT_NEXT_STAGE_OBJECT_NAME: "lowering";
394
456
  readonly SEND_MESSAGE_NO_CONTENT: "lint";
395
457
  readonly SEND_MESSAGE_NO_EXCHANGE: "lint";
396
458
  readonly SHARED_INPUT_IN_SUBFLOW: "lowering";
@@ -401,6 +463,10 @@ export declare const REFUSALS: {
401
463
  readonly SHARED_INPUT_TARGET_IS_INPUT: "lowering";
402
464
  readonly SHARED_INPUT_TYPE_MISMATCH: "lowering";
403
465
  readonly SINGLE_CONVERSATION_TRIGGER: "lint";
466
+ readonly SLA_COUNT_RANGE: "lint";
467
+ readonly SLA_NONPOSITIVE: "lint";
468
+ readonly SLA_NO_ESCALATIONS: "lint";
469
+ readonly STAGE_NO_COMPLETION: "lint";
404
470
  readonly STEP_ID_COLLISION: "lowering";
405
471
  readonly STEP_NOT_ACTION: "lowering";
406
472
  readonly STEP_READ_WITHOUT_OUTPUT: "lint";
@@ -432,10 +498,22 @@ export declare const REFUSALS: {
432
498
  readonly SWITCH_HAS_NO_OUTPUT: "lint";
433
499
  readonly SWITCH_NO_CASES: "lint";
434
500
  readonly SWITCH_ON_UNUSED: "lint";
501
+ readonly TASK_INPUTS_UNSUPPORTED: "lowering";
502
+ readonly TASK_IO_TYPE: "lint";
503
+ readonly TASK_IO_UNRESOLVED_REFERENCE: "lowering";
504
+ readonly TASK_KIND_TWICE: "lowering";
505
+ readonly TASK_NO_ENTRY: "lint";
506
+ readonly TASK_NO_KIND: "lowering";
507
+ readonly TASK_OUTPUTS_NO_RESPONSE: "lowering";
508
+ readonly TASK_OUTPUTS_PLACEHOLDER_EVENT: "lowering";
509
+ readonly TASK_OUTPUTS_UNSUPPORTED: "lowering";
510
+ readonly TASK_OUTPUT_SOURCE_AND_ASSIGN: "lowering";
511
+ readonly TASK_REENTRY_IGNORED: "lint";
435
512
  readonly TEMPLATED_EXITS_ONLY: "lowering";
436
513
  readonly TERMINATE_HAS_NO_OUTPUT: "lint";
437
514
  readonly TERMINATE_NOT_ARM_HEAD: "lint";
438
515
  readonly TERMINATE_UNREACHABLE_AFTER: "lint";
516
+ readonly TIMER_VALUE_REQUIRED: "lint";
439
517
  readonly TRANSFORM_AGG_NO_ALIAS: "lint";
440
518
  readonly TRANSFORM_AGG_NO_FIELD: "lint";
441
519
  readonly TRANSFORM_BAD_VOCAB: "lint";
@@ -459,13 +537,22 @@ export declare const REFUSALS: {
459
537
  readonly TRIGGER_INPUTS_IGNORED: "lint";
460
538
  readonly TRIGGER_UNKNOWN_KIND: "lowering";
461
539
  readonly TYPESCRIPT_UNAVAILABLE: "lowering";
540
+ readonly UNKNOWN_BUSINESS_EVENT: "lowering";
541
+ readonly UNKNOWN_ESCALATION_REF: "lowering";
542
+ readonly UNKNOWN_EXIT_STAGE: "lowering";
462
543
  readonly UNKNOWN_LOOP_FIELD: "lint";
463
544
  readonly UNKNOWN_REF: "lint";
545
+ readonly UNKNOWN_RULE: "lowering";
546
+ readonly UNKNOWN_SLA_REF: "lowering";
547
+ readonly UNKNOWN_STAGE_REF: "lowering";
548
+ readonly UNKNOWN_TASK_REF: "lowering";
464
549
  readonly UPDATES_NOT_SUPPORTED: "lowering";
465
550
  readonly UPDATE_INPUT_READONLY: "lint";
466
551
  readonly UPDATE_UNKNOWN_VAR: "lint";
467
552
  readonly VARIABLE_NAME_COLLISION: "lowering";
468
553
  readonly VARS_BRACKET_READ: "lint";
554
+ readonly VERSION_DEPRECATED: "lint";
555
+ readonly VERSION_MISMATCH: "lint";
469
556
  readonly VOICE_AGENT_ITERATIONS: "lint";
470
557
  readonly VOICE_AGENT_NO_PROMPT: "lint";
471
558
  readonly VOICE_CALL_CONTEXT_NOT_OBJECT: "lint";
@@ -1,13 +1,13 @@
1
1
  /**
2
- * Every diagnostic and refusal code the Flow compile path emits, with its class
2
+ * Every diagnostic and refusal code the Flow and Case compile paths emit, with its class
3
3
  * (docs/CHECK_COMPILE_CONTRACT_DESIGN.md §3.1, #1440):
4
4
  *
5
- * - `lint`: the flow is probably wrong. Only `check` reports it; it never
5
+ * - `lint`: the flow (or case) is probably wrong. Only `check` reports it; it never
6
6
  * stops `compile` from writing. A serializer warning (`CONNECTION_STUB`) is
7
7
  * `lint` too: it never blocks.
8
- * - `lowering`: `compile` cannot write a correct `.flow`. It always stops
9
- * `compile`; `check` reports it too, from the serializer it runs in collect
10
- * mode (`SerializeOpts.collect`), so the rule lives in one place.
8
+ * - `lowering`: `compile` cannot write a correct `.flow` (or caseplan). It always stops
9
+ * `compile`; for a Flow, `check` reports it too, from the serializer it runs in
10
+ * collect mode (`SerializeOpts.collect`), so the rule lives in one place.
11
11
  * - `draft`: an unfinished canvas node (no connection yet, a required input
12
12
  * left empty, a generic operation with no object). These are the codes a
13
13
  * draft-tolerant compile collects instead of throwing (`DraftCode` in
@@ -32,14 +32,21 @@
32
32
  * duplicate name.
33
33
  *
34
34
  * FB017 (`tests/lint/rules/fb017-coded-refusals.ts`) keeps this table and the
35
- * source in step: every code-shaped string literal in the Flow compile path is
35
+ * source in step: every code-shaped string literal in those compile paths is
36
36
  * a key here, and every key is emitted somewhere. The `<PREFIX>_READ_*` codes
37
37
  * of the `codePrefix` node types are composed at run time (`check.ts`
38
38
  * `checkDeclaredOutputRead`), so they appear here but not as literals.
39
39
  */
40
40
  import { ownEntry } from './own-entry.js';
41
- /** Every code the Flow compile path emits → its class. Sorted by code. */
41
+ /**
42
+ * Every code the Flow and Case compile paths emit → its class. Sorted by code.
43
+ *
44
+ * One table, because codes are one namespace: `check` codes such as
45
+ * `CONNECTOR_INPUT` and `LIBRARY_REQUIRED` are shared across families, and a
46
+ * code means the same condition in each.
47
+ */
42
48
  export const REFUSALS = {
49
+ ACTION_FIELD_UNKNOWN_KEY: 'lint',
43
50
  AGENTIC_EMPTY_RETURNS: 'lint',
44
51
  AGENTIC_KEY_NOT_KEY: 'lint',
45
52
  AGENTIC_LOCAL_FORM_UNVERIFIED: 'lint',
@@ -81,17 +88,36 @@ export const REFUSALS = {
81
88
  APIWF_READ_NOT_OUTPUT: 'lint',
82
89
  APIWF_READ_UNKNOWN_FIELD: 'lint',
83
90
  APIWF_READ_WITHOUT_RETURNS: 'lint',
91
+ API_EVENT_NO_BUSINESS_EVENT: 'lowering',
84
92
  ARM_SCOPED_OUTPUT_READ: 'lint',
93
+ BINDING_CONNECTION_TWO_FOLDERS: 'lowering',
85
94
  BINDING_MISSING: 'draft',
86
95
  BINDING_PLACEHOLDER_UNRESOLVED: 'draft',
87
96
  BINDING_SELF_NAME: 'draft',
88
97
  BINDING_UNDECLARED: 'draft',
89
98
  BRANCH_CONST_COND: 'lint',
90
99
  BREAK_OUTSIDE_LOOP: 'lowering',
100
+ BUSINESS_EVENT_NAME: 'lowering',
101
+ BUSINESS_EVENT_PAYLOAD_TYPE: 'lowering',
102
+ BUSINESS_EVENT_UNKNOWN_OPTION: 'lowering',
103
+ BUSINESS_RULE_EMPTY_DATA: 'lint',
104
+ BUSINESS_RULE_OUTPUT_NAME: 'lint',
105
+ BUSINESS_RULE_OUTPUT_SOURCE: 'lint',
91
106
  CALL_NO_NUMBER: 'lint',
92
107
  CALL_NUMBER_NOT_E164: 'lint',
93
108
  CARRIED_DEFINITION_CONFLICT: 'lowering',
94
109
  CARRIED_DEFINITION_INVALID: 'lowering',
110
+ CASE_APP_DETAILS_LIMIT: 'lint',
111
+ CASE_APP_DETAILS_TYPE: 'lint',
112
+ CASE_EXPORT_NOT_BUILT: 'lowering',
113
+ CASE_IN_ARG_TRIGGER_NOT_ADDED: 'lowering',
114
+ CASE_LAYOUT_NODE_MATCH: 'lowering',
115
+ CASE_LAYOUT_UNKNOWN_FIELD: 'lowering',
116
+ CASE_NO_DEFAULT_EXPORT: 'lowering',
117
+ CASE_SOURCE_NOT_FOUND: 'lowering',
118
+ CASE_TRIGGER_OBJECT_AND_SUBSCRIPTION: 'lowering',
119
+ CASE_TRIGGER_OBJECT_INVALID: 'lowering',
120
+ CASE_VAR_DEFAULT_NOT_JSON: 'lowering',
95
121
  CEQL_UNPARSEABLE: 'lowering',
96
122
  // Only `check --baseline` reports it: collection stopped at a scope-level
97
123
  // refusal, and `compile` (and `merge --baseline-from`) stops at that refusal.
@@ -109,6 +135,7 @@ export const REFUSALS = {
109
135
  CONNECTOR_NO_FLOW_DEFINITION: 'lowering',
110
136
  CONNECTOR_OBJECT_NOT_GENERIC: 'lowering',
111
137
  CONNECTOR_OBJECT_REQUIRED: 'draft',
138
+ CONNECTOR_OUTPUT_SOURCE: 'lint',
112
139
  CONNECTOR_RESOLVE_FAILED: 'lowering',
113
140
  CONTINUE_OUTSIDE_LOOP: 'lowering',
114
141
  CONTRIBUTION_BINDING_UNRESOLVED: 'draft',
@@ -153,11 +180,17 @@ export const REFUSALS = {
153
180
  DOC_NO_FILEREF: 'lint',
154
181
  DOWHILE_CONST_COND: 'lint',
155
182
  DOWHILE_LIMIT: 'lint',
183
+ DUP_BUSINESS_EVENT: 'lowering',
156
184
  DUP_CASE: 'lint',
157
185
  DUP_END_NAME: 'lowering',
186
+ DUP_EXIT_RULE: 'lint',
187
+ DUP_RULE_NAME: 'lint',
188
+ DUP_STAGE: 'lowering',
158
189
  DUP_STEP: 'lowering',
190
+ DUP_TASK: 'lowering',
159
191
  EMPTY_ARM: 'lint',
160
192
  EMPTY_LOOP: 'lint',
193
+ EMPTY_REQUIRED_FIELD: 'lint',
161
194
  ENTRY_POINT_DUP_ID: 'lowering',
162
195
  ENTRY_POINT_INPUT_COLLISION: 'lint',
163
196
  ENTRY_POINT_NO_SHARED_BODY: 'lowering',
@@ -165,6 +198,8 @@ export const REFUSALS = {
165
198
  ERROR_FIELD_UNDECLARED: 'lint',
166
199
  ERROR_READ_OUTSIDE_HANDLER: 'lowering',
167
200
  ERROR_READ_VIA_OUT: 'lint',
201
+ ESCALATION_NO_RECIPIENTS: 'lint',
202
+ ESCALATION_ZERO_ATRISK_PCT: 'lint',
168
203
  EVENT_BYOA_UNVERIFIED: 'lowering',
169
204
  EVENT_FILTERS_NOT_ARRAY: 'lint',
170
205
  EVENT_FILTER_BACKSLASH: 'lowering',
@@ -182,14 +217,23 @@ export const REFUSALS = {
182
217
  EVENT_SCOPE_NOT_TAKEN: 'lint',
183
218
  EVENT_UNKNOWN: 'lowering',
184
219
  EVENT_UNPREPARED: 'lint',
220
+ EXCEPTION_STAGE_REQUIRED: 'lint',
185
221
  EXPR_SYNTAX: 'lowering',
186
222
  EXPR_UNDECLARED_REF: 'lowering',
223
+ EXTERNAL_TASK_CONNECTION: 'lowering',
224
+ EXTERNAL_TASK_DESCRIPTOR: 'lint',
225
+ EXTERNAL_TASK_DESCRIPTOR_CONTRACT: 'lowering',
226
+ EXTERNAL_TASK_EMPTY_DATA: 'lint',
227
+ EXTERNAL_TASK_FOLDER: 'lowering',
228
+ EXTERNAL_TASK_HYBRID_UNSUPPORTED: 'lowering',
229
+ EXTERNAL_TASK_MODE: 'lowering',
187
230
  EXTRACT_SCHEMA_SHAPE: 'lint',
188
231
  FILE_NOT_FOUND: 'lowering',
189
232
  FIRE_AND_FORGET_READ: 'lint',
190
233
  FIRE_AND_FORGET_RETURNS: 'lowering',
191
234
  FLOW_EXPORT_NOT_BUILT: 'lowering',
192
235
  FLOW_NO_DEFAULT_EXPORT: 'lowering',
236
+ FLOW_PROCESS_EMPTY_DATA: 'lint',
193
237
  FLOW_SOURCE_NOT_FOUND: 'lowering',
194
238
  FORM_TRIGGER_NO_INPUTS: 'lint',
195
239
  FUNCTION_EMPTY_RETURNS: 'lint',
@@ -360,13 +404,19 @@ export const REFUSALS = {
360
404
  LOOP_PARALLEL_LEGACY: 'lint',
361
405
  LOOP_VERSION_UNSUPPORTED: 'lowering',
362
406
  MOCK_HAS_NO_OUTPUT: 'lint',
407
+ NAME_HYGIENE: 'lint',
363
408
  NODE_FAMILY_REGISTRATION: 'lowering',
364
409
  NODE_VERSION_UNREGISTERED: 'lowering',
410
+ NO_CASE_COMPLETION: 'lint',
365
411
  NO_ID: 'lint',
412
+ NO_REQUIRED_TASK: 'lint',
366
413
  NO_RETURN: 'lint',
414
+ NO_STAGES: 'lint',
367
415
  OBJECT_UNPREPARED: 'lint',
368
416
  ONERROR_NO_ERROR_PORT: 'lowering',
369
417
  OUTPUT_BACKING_COLLISION: 'lowering',
418
+ OUTPUT_FORWARD_READ: 'lint',
419
+ OUTPUT_SELF_REFERENCE: 'lint',
370
420
  OUTPUT_TYPE_MISMATCH: 'lint',
371
421
  OUTPUT_VAR_MISMATCH: 'lowering',
372
422
  PACKAGE_NODES_NOT_PLATFORM: 'lint',
@@ -379,6 +429,10 @@ export const REFUSALS = {
379
429
  PORT_ALREADY_ROUTED: 'lowering',
380
430
  PORT_EMPTY_PATH: 'lowering',
381
431
  PORT_NO_SOURCE_STEP: 'lowering',
432
+ PRESERVATION_COLLISION: 'lowering',
433
+ PRESERVATION_FIELD_COLLISION: 'lowering',
434
+ PRESERVATION_LEGACY_DEFAULT_MISMATCH: 'lowering',
435
+ PRESERVATION_TARGET_MISSING: 'lowering',
382
436
  QUEUE_BAD_DATE: 'lint',
383
437
  QUEUE_BAD_PRIORITY: 'lint',
384
438
  QUEUE_ITEM_EXPR_UNSUPPORTED: 'lowering',
@@ -407,6 +461,8 @@ export const REFUSALS = {
407
461
  REF_TO_OWN_LOOP: 'lint',
408
462
  REF_UNKNOWN_TARGET: 'lowering',
409
463
  REF_UNREACHABLE_AFTER: 'lint',
464
+ RESOURCE_BINDING_UNDECLARED: 'lowering',
465
+ RESOURCE_REF_IS_BINDING: 'lowering',
410
466
  RETURN_UPDATES_SAME_VAR: 'lowering',
411
467
  RPA_KEY_NOT_KEY: 'lint',
412
468
  RPA_LOCAL_HAS_FOLDER: 'lint',
@@ -419,6 +475,9 @@ export const REFUSALS = {
419
475
  RPA_READ_NOT_OUTPUT: 'lint',
420
476
  RPA_READ_UNKNOWN_FIELD: 'lint',
421
477
  RPA_READ_WITHOUT_RETURNS: 'lint',
478
+ RULE_PLACEMENT: 'lint',
479
+ RULE_TASKS_REQUIRED: 'lint',
480
+ RULE_UNKNOWN_OPTION: 'lowering',
422
481
  SCHEDULE_CRON_VERSION: 'lowering',
423
482
  SCHEDULE_NEVER_FIRES: 'lint',
424
483
  SCHEDULE_NOT_ISO: 'lint',
@@ -432,6 +491,9 @@ export const REFUSALS = {
432
491
  SCRIPT_FUNCTION_UNLOWERABLE: 'lowering',
433
492
  SCRIPT_RETURNS_UNKNOWN_TYPE: 'lint',
434
493
  SDK_RESOLVE_HOOK_MISSING: 'lowering',
494
+ SELECT_NEXT_STAGE_EXIT_TYPE: 'lowering',
495
+ SELECT_NEXT_STAGE_MULTIPLE: 'lowering',
496
+ SELECT_NEXT_STAGE_OBJECT_NAME: 'lowering',
435
497
  SEND_MESSAGE_NO_CONTENT: 'lint',
436
498
  SEND_MESSAGE_NO_EXCHANGE: 'lint',
437
499
  SHARED_INPUT_IN_SUBFLOW: 'lowering',
@@ -442,6 +504,10 @@ export const REFUSALS = {
442
504
  SHARED_INPUT_TARGET_IS_INPUT: 'lowering',
443
505
  SHARED_INPUT_TYPE_MISMATCH: 'lowering',
444
506
  SINGLE_CONVERSATION_TRIGGER: 'lint',
507
+ SLA_COUNT_RANGE: 'lint',
508
+ SLA_NONPOSITIVE: 'lint',
509
+ SLA_NO_ESCALATIONS: 'lint',
510
+ STAGE_NO_COMPLETION: 'lint',
445
511
  STEP_ID_COLLISION: 'lowering',
446
512
  STEP_NOT_ACTION: 'lowering',
447
513
  STEP_READ_WITHOUT_OUTPUT: 'lint',
@@ -473,10 +539,22 @@ export const REFUSALS = {
473
539
  SWITCH_HAS_NO_OUTPUT: 'lint',
474
540
  SWITCH_NO_CASES: 'lint',
475
541
  SWITCH_ON_UNUSED: 'lint',
542
+ TASK_INPUTS_UNSUPPORTED: 'lowering',
543
+ TASK_IO_TYPE: 'lint',
544
+ TASK_IO_UNRESOLVED_REFERENCE: 'lowering',
545
+ TASK_KIND_TWICE: 'lowering',
546
+ TASK_NO_ENTRY: 'lint',
547
+ TASK_NO_KIND: 'lowering',
548
+ TASK_OUTPUTS_NO_RESPONSE: 'lowering',
549
+ TASK_OUTPUTS_PLACEHOLDER_EVENT: 'lowering',
550
+ TASK_OUTPUTS_UNSUPPORTED: 'lowering',
551
+ TASK_OUTPUT_SOURCE_AND_ASSIGN: 'lowering',
552
+ TASK_REENTRY_IGNORED: 'lint',
476
553
  TEMPLATED_EXITS_ONLY: 'lowering',
477
554
  TERMINATE_HAS_NO_OUTPUT: 'lint',
478
555
  TERMINATE_NOT_ARM_HEAD: 'lint',
479
556
  TERMINATE_UNREACHABLE_AFTER: 'lint',
557
+ TIMER_VALUE_REQUIRED: 'lint',
480
558
  TRANSFORM_AGG_NO_ALIAS: 'lint',
481
559
  TRANSFORM_AGG_NO_FIELD: 'lint',
482
560
  TRANSFORM_BAD_VOCAB: 'lint',
@@ -500,13 +578,22 @@ export const REFUSALS = {
500
578
  TRIGGER_INPUTS_IGNORED: 'lint',
501
579
  TRIGGER_UNKNOWN_KIND: 'lowering',
502
580
  TYPESCRIPT_UNAVAILABLE: 'lowering',
581
+ UNKNOWN_BUSINESS_EVENT: 'lowering',
582
+ UNKNOWN_ESCALATION_REF: 'lowering',
583
+ UNKNOWN_EXIT_STAGE: 'lowering',
503
584
  UNKNOWN_LOOP_FIELD: 'lint',
504
585
  UNKNOWN_REF: 'lint',
586
+ UNKNOWN_RULE: 'lowering',
587
+ UNKNOWN_SLA_REF: 'lowering',
588
+ UNKNOWN_STAGE_REF: 'lowering',
589
+ UNKNOWN_TASK_REF: 'lowering',
505
590
  UPDATES_NOT_SUPPORTED: 'lowering',
506
591
  UPDATE_INPUT_READONLY: 'lint',
507
592
  UPDATE_UNKNOWN_VAR: 'lint',
508
593
  VARIABLE_NAME_COLLISION: 'lowering',
509
594
  VARS_BRACKET_READ: 'lint',
595
+ VERSION_DEPRECATED: 'lint',
596
+ VERSION_MISMATCH: 'lint',
510
597
  VOICE_AGENT_ITERATIONS: 'lint',
511
598
  VOICE_AGENT_NO_PROMPT: 'lint',
512
599
  VOICE_CALL_CONTEXT_NOT_OBJECT: 'lint',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/maestro-builder-sdk",
3
- "version": "6.64.0",
3
+ "version": "6.65.0",
4
4
  "description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://docs.uipath.com/maestro",
@@ -100,5 +100,5 @@
100
100
  "@types/node": "^22.7.0",
101
101
  "esbuild": "^0.28.1"
102
102
  },
103
- "gitref": "f484cbfa0ea499ec18eb2f15c5200b3f0c059f95"
103
+ "gitref": "cef5c166db15d92f544e04c9817e280551ecc9dd"
104
104
  }