@stndrds/schema 1.0.0-alpha.93 → 1.0.0-alpha.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -153,7 +153,14 @@ var ObjectReferencedError = class extends Error {
153
153
  }
154
154
  };
155
155
  function getErrorMessage(error) {
156
- return error instanceof Error ? error.message : String(error);
156
+ if (error instanceof Error) return error.message;
157
+ if (typeof error === "string") return error;
158
+ if (error && typeof error === "object") {
159
+ if ("message" in error && typeof error.message === "string")
160
+ return error.message;
161
+ return JSON.stringify(error);
162
+ }
163
+ return String(error);
157
164
  }
158
165
 
159
166
  // src/types/filters.ts
@@ -716,28 +723,18 @@ var aiNodeType = {
716
723
  },
717
724
  getSlotIds(node) {
718
725
  const slotIds = /* @__PURE__ */ new Set();
719
- const action = node.action;
720
- if (action.type === "document-generation") {
721
- for (const id of action.inputSlotIds) slotIds.add(id);
722
- for (const id of action.targetSlotIds) slotIds.add(id);
723
- } else if (action.type === "code-execution") {
724
- for (const id of action.inputSlotIds ?? []) slotIds.add(id);
725
- }
726
+ for (const id of node.inputSlotIds ?? []) slotIds.add(id);
727
+ for (const id of node.targetSlotIds ?? []) slotIds.add(id);
726
728
  return [...slotIds];
727
729
  },
728
730
  validate(node) {
729
731
  const errors = [];
730
732
  if (!node.label) errors.push("AINode must have a label");
731
- if (!node.action) errors.push("AINode must have an action");
733
+ if (!node.mode) errors.push("AINode must have a mode (sync or async)");
732
734
  if (!node.next) errors.push("AINode must have a 'next' target");
733
- if (node.action?.type === "document-generation") {
734
- if (!node.action.templateId) errors.push("Document generation must have a templateId");
735
- if (!node.action.inputSlotIds?.length)
736
- errors.push("Document generation must have input slots");
737
- if (!node.action.targetSlotIds?.length)
738
- errors.push("Document generation must have target slots");
739
- } else if (node.action?.type === "code-execution") {
740
- if (!node.action.code) errors.push("Code execution must have code");
735
+ const hasAgentSource = !!node.definitionId || !!node.systemPrompt;
736
+ if (!hasAgentSource) {
737
+ errors.push("AINode must have either a definitionId or a systemPrompt");
741
738
  }
742
739
  return errors;
743
740
  }
@@ -1147,32 +1144,20 @@ var AssignNodeSchema = z.object({
1147
1144
  assignments: z.array(AssignmentMappingSchema).min(1),
1148
1145
  next: z.string().nullish()
1149
1146
  });
1150
- var DocumentGenerationActionSchema = z.object({
1151
- type: z.literal("document-generation"),
1152
- templateId: z.string().min(1, "Template ID is required"),
1153
- inputSlotIds: z.array(z.string().min(1)).min(1, "At least one input slot is required"),
1154
- targetSlotIds: z.array(z.string().min(1)).min(1, "At least one target slot is required"),
1155
- outputFormat: z.enum(["pdf", "docx"]),
1156
- aiInstructions: z.string().nullish()
1157
- });
1158
- var CodeExecutionActionSchema = z.object({
1159
- type: z.literal("code-execution"),
1160
- code: z.string().min(1, "Code is required"),
1161
- language: z.enum(["javascript", "typescript", "python"]),
1162
- inputSlotIds: z.array(z.string().min(1)).optional(),
1163
- outputVariable: z.string().optional(),
1164
- packages: z.array(z.string()).optional()
1165
- });
1166
- var AIActionConfigSchema = z.discriminatedUnion("type", [
1167
- DocumentGenerationActionSchema,
1168
- CodeExecutionActionSchema
1169
- ]);
1170
1147
  var AINodeSchema = z.object({
1171
1148
  type: z.literal("ai"),
1172
1149
  id: z.string().min(1),
1173
1150
  label: z.string().min(1),
1174
1151
  description: z.string().nullish(),
1175
- action: AIActionConfigSchema,
1152
+ mode: z.enum(["sync", "async"]),
1153
+ definitionId: z.string().optional(),
1154
+ systemPrompt: z.string().optional(),
1155
+ model: z.string().optional(),
1156
+ tools: z.array(z.string()).optional(),
1157
+ maxIterations: z.number().positive().optional(),
1158
+ instructions: z.string().optional(),
1159
+ inputSlotIds: z.array(z.string()).optional(),
1160
+ targetSlotIds: z.array(z.string()).optional(),
1176
1161
  timeoutMs: z.number().positive().optional(),
1177
1162
  next: z.string().nullish()
1178
1163
  });
@@ -4731,52 +4716,48 @@ var WorkflowAssignBuilder = class {
4731
4716
  var WorkflowAIBuilder = class {
4732
4717
  /** @internal */
4733
4718
  constructor(workflowBuilder, nodeId, label) {
4734
- this.action = null;
4719
+ this.agentConfig = null;
4735
4720
  this.workflowBuilder = workflowBuilder;
4736
4721
  this.nodeId = nodeId;
4737
4722
  this.label = label;
4738
4723
  }
4739
- /**
4740
- * Set the description for this AI node
4741
- */
4742
4724
  describe(description) {
4743
4725
  this.nodeDescription = description;
4744
4726
  return this;
4745
4727
  }
4746
- /**
4747
- * Set a custom timeout (default: 120_000ms)
4748
- */
4749
4728
  timeout(ms) {
4750
4729
  this.nodeTimeoutMs = ms;
4751
4730
  return this;
4752
4731
  }
4753
4732
  /**
4754
- * Configure document generation action
4755
- */
4756
- documentGeneration(config) {
4757
- this.action = {
4758
- type: "document-generation",
4759
- ...config
4760
- };
4761
- return this;
4762
- }
4763
- /**
4764
- * Configure code execution action
4765
- */
4766
- codeExecution(config) {
4767
- this.action = {
4768
- type: "code-execution",
4769
- ...config
4770
- };
4733
+ * Configure the agent for this node.
4734
+ *
4735
+ * @param definitionIdOrConfig - Either an existing agent definition ID (string),
4736
+ * or an inline agent config object.
4737
+ * @param options - Additional options merged on top (only used when first arg is a string)
4738
+ */
4739
+ agent(definitionIdOrConfig, options) {
4740
+ if (typeof definitionIdOrConfig === "string") {
4741
+ this.agentConfig = {
4742
+ // Default to async when referencing a definition by ID
4743
+ mode: options?.mode ?? "async",
4744
+ definitionId: definitionIdOrConfig,
4745
+ instructions: options?.instructions,
4746
+ inputSlotIds: options?.inputSlotIds,
4747
+ targetSlotIds: options?.targetSlotIds
4748
+ };
4749
+ } else {
4750
+ this.agentConfig = definitionIdOrConfig;
4751
+ }
4771
4752
  return this;
4772
4753
  }
4773
4754
  /**
4774
4755
  * Set the next node and complete the AI node definition
4775
4756
  */
4776
4757
  next(nodeId) {
4777
- if (!this.action) {
4758
+ if (!this.agentConfig) {
4778
4759
  throw new Error(
4779
- `[WorkflowBuilder] AI node "${this.nodeId}" must have an action. Use .documentGeneration() or .codeExecution() first.`
4760
+ `[WorkflowBuilder] AI node "${this.nodeId}" must have an agent config. Call .agent() first.`
4780
4761
  );
4781
4762
  }
4782
4763
  return this.workflowBuilder._addNode({
@@ -4784,9 +4765,9 @@ var WorkflowAIBuilder = class {
4784
4765
  id: this.nodeId,
4785
4766
  label: this.label,
4786
4767
  description: this.nodeDescription,
4787
- action: this.action,
4788
4768
  timeoutMs: this.nodeTimeoutMs,
4789
- next: nodeId
4769
+ next: nodeId,
4770
+ ...this.agentConfig
4790
4771
  });
4791
4772
  }
4792
4773
  };
@@ -4961,9 +4942,7 @@ var WorkflowBuilder = class {
4961
4942
  assign(id, label, targetSlotId) {
4962
4943
  return new WorkflowAssignBuilder(this, id, label, targetSlotId);
4963
4944
  }
4964
- /**
4965
- * Define an AI node (run an AI action like document generation or code execution)
4966
- */
4945
+ /** Define an AI agent node (sync or async, inline or referenced from a definition) */
4967
4946
  ai(id, label) {
4968
4947
  return new WorkflowAIBuilder(this, id, label);
4969
4948
  }
@@ -6250,7 +6229,6 @@ function isViewCustomized(view2, object2) {
6250
6229
  return true;
6251
6230
  }
6252
6231
  export {
6253
- AIActionConfigSchema,
6254
6232
  AINodeSchema,
6255
6233
  ALL_ACTIONS,
6256
6234
  ALL_SYSTEM_RESOURCES,
@@ -6262,7 +6240,6 @@ export {
6262
6240
  AttributeNotFoundError,
6263
6241
  AuthMethodSchema,
6264
6242
  BEHAVIOR_PROPERTIES,
6265
- CodeExecutionActionSchema,
6266
6243
  ConcurrentModificationError,
6267
6244
  ConditionGroupSchema,
6268
6245
  ConditionNodeSchema,
@@ -6280,7 +6257,6 @@ export {
6280
6257
  DEFAULT_THEME,
6281
6258
  DEFAULT_VALIDATION_MESSAGES,
6282
6259
  DetailViewBuilder,
6283
- DocumentGenerationActionSchema,
6284
6260
  DocumentsTabConfig,
6285
6261
  DuplicateError,
6286
6262
  EMPTY_VALUE_PLACEHOLDER,
@@ -1,4 +1,4 @@
1
1
  import 'zod';
2
- export { aV as DEFAULT_VALIDATION_MESSAGES, ca as ValidationMessages, cb as ValidationResult, ci as attributeConfigSchemas, ck as checkboxConfigSchema, cl as computeRecordStatus, cm as createAttributeValidator, cn as createCheckboxValidator, co as createCurrencyValidator, cp as createDateValidator, cq as createDraftValidator, cs as createFileValidator, ct as createFormAttributeValidator, cu as createFormulaValidator, cv as createLocationValidator, cw as createMultiRelationValidator, cx as createMultiselectValidator, cy as createNumberValidator, cz as createObjectValidator, cA as createPhoneValidator, cB as createRatingValidator, cC as createRelationValidator, cD as createRichtextValidator, cE as createRollupValidator, cF as createSelectValidator, cG as createSingleRelationValidator, cI as createStatusValidator, cJ as createTextAreaValidator, cK as createTextValidator, cL as createUserValidator, cM as currencyConfigSchema, cN as dateConfigSchema, cO as documentConfigSchema, cQ as fileConfigSchema, cR as formatZodErrors, cS as formulaConfigSchema, cU as getAttributeConfigSchema, cW as getMissingRequiredAttributes, dt as isRecordComplete, dG as locationConfigSchema, dI as multiselectConfigSchema, dK as numberConfigSchema, dM as parseAttributeConfig, dN as phoneConfigSchema, dO as ratingConfigSchema, dP as relationConfigSchema, dQ as richtextConfigSchema, dR as rollupConfigSchema, dS as safeParseAttributeConfig, dT as selectConfigSchema, dV as statusConfigSchema, dW as textConfigSchema, dX as textareaConfigSchema, dY as userConfigSchema, dZ as validateAttribute, d_ as validateAttributeConfig, d$ as validateDraft, e0 as validateDraftOrThrow, e1 as validateObject, e2 as validateObjectOrThrow } from '../validators-CwhyfvP7.mjs';
2
+ export { aS as DEFAULT_VALIDATION_MESSAGES, c6 as ValidationMessages, c7 as ValidationResult, ce as attributeConfigSchemas, cg as checkboxConfigSchema, ch as computeRecordStatus, ci as createAttributeValidator, cj as createCheckboxValidator, ck as createCurrencyValidator, cl as createDateValidator, cm as createDraftValidator, co as createFileValidator, cp as createFormAttributeValidator, cq as createFormulaValidator, cr as createLocationValidator, cs as createMultiRelationValidator, ct as createMultiselectValidator, cu as createNumberValidator, cv as createObjectValidator, cw as createPhoneValidator, cx as createRatingValidator, cy as createRelationValidator, cz as createRichtextValidator, cA as createRollupValidator, cB as createSelectValidator, cC as createSingleRelationValidator, cE as createStatusValidator, cF as createTextAreaValidator, cG as createTextValidator, cH as createUserValidator, cI as currencyConfigSchema, cJ as dateConfigSchema, cK as documentConfigSchema, cM as fileConfigSchema, cN as formatZodErrors, cO as formulaConfigSchema, cQ as getAttributeConfigSchema, cS as getMissingRequiredAttributes, dp as isRecordComplete, dC as locationConfigSchema, dE as multiselectConfigSchema, dG as numberConfigSchema, dI as parseAttributeConfig, dJ as phoneConfigSchema, dK as ratingConfigSchema, dL as relationConfigSchema, dM as richtextConfigSchema, dN as rollupConfigSchema, dO as safeParseAttributeConfig, dP as selectConfigSchema, dR as statusConfigSchema, dS as textConfigSchema, dT as textareaConfigSchema, dU as userConfigSchema, dV as validateAttribute, dW as validateAttributeConfig, dX as validateDraft, dY as validateDraftOrThrow, dZ as validateObject, d_ as validateObjectOrThrow } from '../validators-BCw4Sn01.mjs';
3
3
  import '@stndrds/constants';
4
4
  import '../utils.mjs';
@@ -1,4 +1,4 @@
1
1
  import 'zod';
2
- export { aV as DEFAULT_VALIDATION_MESSAGES, ca as ValidationMessages, cb as ValidationResult, ci as attributeConfigSchemas, ck as checkboxConfigSchema, cl as computeRecordStatus, cm as createAttributeValidator, cn as createCheckboxValidator, co as createCurrencyValidator, cp as createDateValidator, cq as createDraftValidator, cs as createFileValidator, ct as createFormAttributeValidator, cu as createFormulaValidator, cv as createLocationValidator, cw as createMultiRelationValidator, cx as createMultiselectValidator, cy as createNumberValidator, cz as createObjectValidator, cA as createPhoneValidator, cB as createRatingValidator, cC as createRelationValidator, cD as createRichtextValidator, cE as createRollupValidator, cF as createSelectValidator, cG as createSingleRelationValidator, cI as createStatusValidator, cJ as createTextAreaValidator, cK as createTextValidator, cL as createUserValidator, cM as currencyConfigSchema, cN as dateConfigSchema, cO as documentConfigSchema, cQ as fileConfigSchema, cR as formatZodErrors, cS as formulaConfigSchema, cU as getAttributeConfigSchema, cW as getMissingRequiredAttributes, dt as isRecordComplete, dG as locationConfigSchema, dI as multiselectConfigSchema, dK as numberConfigSchema, dM as parseAttributeConfig, dN as phoneConfigSchema, dO as ratingConfigSchema, dP as relationConfigSchema, dQ as richtextConfigSchema, dR as rollupConfigSchema, dS as safeParseAttributeConfig, dT as selectConfigSchema, dV as statusConfigSchema, dW as textConfigSchema, dX as textareaConfigSchema, dY as userConfigSchema, dZ as validateAttribute, d_ as validateAttributeConfig, d$ as validateDraft, e0 as validateDraftOrThrow, e1 as validateObject, e2 as validateObjectOrThrow } from '../validators-BXWI__2n.js';
2
+ export { aS as DEFAULT_VALIDATION_MESSAGES, c6 as ValidationMessages, c7 as ValidationResult, ce as attributeConfigSchemas, cg as checkboxConfigSchema, ch as computeRecordStatus, ci as createAttributeValidator, cj as createCheckboxValidator, ck as createCurrencyValidator, cl as createDateValidator, cm as createDraftValidator, co as createFileValidator, cp as createFormAttributeValidator, cq as createFormulaValidator, cr as createLocationValidator, cs as createMultiRelationValidator, ct as createMultiselectValidator, cu as createNumberValidator, cv as createObjectValidator, cw as createPhoneValidator, cx as createRatingValidator, cy as createRelationValidator, cz as createRichtextValidator, cA as createRollupValidator, cB as createSelectValidator, cC as createSingleRelationValidator, cE as createStatusValidator, cF as createTextAreaValidator, cG as createTextValidator, cH as createUserValidator, cI as currencyConfigSchema, cJ as dateConfigSchema, cK as documentConfigSchema, cM as fileConfigSchema, cN as formatZodErrors, cO as formulaConfigSchema, cQ as getAttributeConfigSchema, cS as getMissingRequiredAttributes, dp as isRecordComplete, dC as locationConfigSchema, dE as multiselectConfigSchema, dG as numberConfigSchema, dI as parseAttributeConfig, dJ as phoneConfigSchema, dK as ratingConfigSchema, dL as relationConfigSchema, dM as richtextConfigSchema, dN as rollupConfigSchema, dO as safeParseAttributeConfig, dP as selectConfigSchema, dR as statusConfigSchema, dS as textConfigSchema, dT as textareaConfigSchema, dU as userConfigSchema, dV as validateAttribute, dW as validateAttributeConfig, dX as validateDraft, dY as validateDraftOrThrow, dZ as validateObject, d_ as validateObjectOrThrow } from '../validators-5XMwJOlV.js';
3
3
  import '@stndrds/constants';
4
4
  import '../utils.js';
@@ -1469,73 +1469,46 @@ interface AssignNode extends BaseNode {
1469
1469
  next?: string | null;
1470
1470
  }
1471
1471
  /**
1472
- * AI action config discriminated union for different AI capabilities.
1472
+ * AI noderuns an AI agent (inline or referenced from a definition).
1473
1473
  *
1474
- * @example Document generation
1474
+ * Two modes:
1475
+ * - `sync`: runs the agent inline, workflow waits for result
1476
+ * - `async`: enqueues a background agent run, workflow waits via event bus
1477
+ *
1478
+ * Two sources:
1479
+ * - `definitionId`: load agent config from DB (existing background agent definition)
1480
+ * - inline props: define the agent directly in the node (no DB record needed)
1481
+ *
1482
+ * When both `definitionId` and inline props are set, inline props override the definition.
1483
+ *
1484
+ * @example Inline sync agent
1475
1485
  * ```typescript
1476
- * const action: AIActionConfig = {
1477
- * type: "document-generation",
1478
- * templateId: "template-contract-v1",
1479
- * inputSlotIds: ["client", "company"],
1486
+ * const node: AINode = {
1487
+ * type: "ai",
1488
+ * id: "generate",
1489
+ * label: "Générer le contrat",
1490
+ * mode: "sync",
1491
+ * systemPrompt: "Tu es un expert en rédaction de contrats.",
1492
+ * model: "claude-sonnet-4-6",
1493
+ * tools: ["generate_document"],
1494
+ * inputSlotIds: ["client"],
1480
1495
  * targetSlotIds: ["client"],
1481
- * outputFormat: "pdf",
1482
- * aiInstructions: "Generate a professional contract",
1496
+ * instructions: "Génère un contrat PDF pour ce client.",
1497
+ * next: "end",
1483
1498
  * };
1484
1499
  * ```
1485
- */
1486
- type AIActionConfig = DocumentGenerationAction | CodeExecutionAction;
1487
- /**
1488
- * AI action type discriminant
1489
- */
1490
- type AIActionType = AIActionConfig["type"];
1491
- /**
1492
- * Generate a document (PDF/DOCX) from a template using an AI agent session.
1493
- */
1494
- interface DocumentGenerationAction {
1495
- type: "document-generation";
1496
- /** File ID of the uploaded DOCX template in storage */
1497
- templateId: string;
1498
- /** Slots whose data is context for the AI */
1499
- inputSlotIds: string[];
1500
- /** Slots to attach the generated document to */
1501
- targetSlotIds: string[];
1502
- /** Output format */
1503
- outputFormat: "pdf" | "docx";
1504
- /** Instructions for the AI agent on how to generate content */
1505
- aiInstructions?: string;
1506
- }
1507
- /**
1508
- * Execute code in a sandbox without AI (mode "code").
1509
- */
1510
- interface CodeExecutionAction {
1511
- type: "code-execution";
1512
- /** Code to execute (may contain Mustache expressions resolved from slots) */
1513
- code: string;
1514
- language: "javascript" | "typescript" | "python";
1515
- /** Slots injected as JSON environment variables */
1516
- inputSlotIds?: string[];
1517
- /** Variable name to capture stdout into the execution context */
1518
- outputVariable?: string;
1519
- /** Packages to install before execution */
1520
- packages?: string[];
1521
- }
1522
- /**
1523
- * AI node — runs an AI action (document generation, code execution, etc.)
1524
1500
  *
1525
- * @example
1501
+ * @example Referenced async agent
1526
1502
  * ```typescript
1527
1503
  * const node: AINode = {
1528
1504
  * type: "ai",
1529
- * id: "generate-contract",
1530
- * label: "Generate Contract",
1531
- * action: {
1532
- * type: "document-generation",
1533
- * templateId: "template-contract-v1",
1534
- * inputSlotIds: ["client", "company"],
1535
- * targetSlotIds: ["client"],
1536
- * outputFormat: "pdf",
1537
- * },
1538
- * next: "end-success",
1505
+ * id: "enrich",
1506
+ * label: "Enrichir le contact",
1507
+ * mode: "async",
1508
+ * definitionId: "my-enrichment-agent-id",
1509
+ * inputSlotIds: ["contact"],
1510
+ * instructions: "Enrichis le profil du contact.",
1511
+ * next: "end",
1539
1512
  * };
1540
1513
  * ```
1541
1514
  */
@@ -1543,8 +1516,21 @@ interface AINode extends BaseNode {
1543
1516
  type: "ai";
1544
1517
  label: string;
1545
1518
  description?: string;
1546
- action: AIActionConfig;
1547
- /** Timeout in milliseconds (default: 120_000) */
1519
+ /** Execution mode */
1520
+ mode: "sync" | "async";
1521
+ /** ID of an existing agent_definition record in DB */
1522
+ definitionId?: string;
1523
+ systemPrompt?: string;
1524
+ model?: string;
1525
+ /** Tool names to expose to the agent. Example: ["generate_document", "execute_code"] */
1526
+ tools?: string[];
1527
+ maxIterations?: number;
1528
+ /** User message injected as the agent's first message */
1529
+ instructions?: string;
1530
+ /** Slot IDs whose data is serialized into the agent's context */
1531
+ inputSlotIds?: string[];
1532
+ /** Slot IDs used as targets by the generate_document tool */
1533
+ targetSlotIds?: string[];
1548
1534
  timeoutMs?: number;
1549
1535
  next?: string | null;
1550
1536
  }
@@ -1904,13 +1890,18 @@ interface PendingAction {
1904
1890
  /** ID of the node waiting for action */
1905
1891
  nodeId: string;
1906
1892
  /** Type of the waiting node */
1907
- nodeType: "form" | "signature" | "approval";
1893
+ nodeType: "form" | "signature" | "approval" | "ai";
1908
1894
  /** Display label for the action */
1909
1895
  nodeLabel: string;
1910
1896
  /** ID of the participation required to complete this action */
1911
1897
  requiredParticipationId?: string;
1912
1898
  /** When the pending action expires */
1913
1899
  expiresAt?: Date;
1900
+ /**
1901
+ * Background agent run ID — set when nodeType is "ai" and mode is "async".
1902
+ * Used to resume the workflow when the agent run completes.
1903
+ */
1904
+ agentRunId?: string;
1914
1905
  }
1915
1906
  /**
1916
1907
  * A specific execution of a workflow.
@@ -3540,4 +3531,4 @@ declare function isRecordComplete(objectDef: ObjectDefinition, data: Record<stri
3540
3531
  */
3541
3532
  declare function computeRecordStatus(objectDef: ObjectDefinition, data: Record<string, unknown>): CompletionStatus;
3542
3533
 
3543
- export { type RelationAttribute as $, type Attribute as A, type FeatureGate as B, type ConfigOverrides as C, type DateAttribute as D, type TextAttribute as E, type FilterState as F, type TextAreaAttribute as G, type RichtextAttribute as H, type InstanceStatus as I, type RichtextFeature as J, type CheckboxAttribute as K, type LocationGranularity as L, type MultiselectAttribute as M, type NumberAttribute as N, type ObjectRecord as O, type PendingAction as P, type PhoneAttribute as Q, type RelationFieldConfig as R, type SortRule as S, type Timestamps as T, type UserAttribute as U, type ViewType as V, type WorkflowNode as W, type CurrencyAttribute as X, type Option as Y, type LocationAttribute as Z, type FileAttribute as _, type FormNode as a, type DocumentGenerationAction as a$, type RatingAttribute as a0, type BilateralConfig as a1, type SingleRelationAttribute as a2, type MultiRelationAttribute as a3, type RelationTarget as a4, type FormulaReturnType as a5, type RollupFunction as a6, type MigrationDefinition as a7, type ObjectDefinition as a8, type DetailViewLayout as a9, type AINode as aA, type ActivityTab as aB, type AdvancedFilterState as aC, type AssignNode as aD, type AssignmentMapping as aE, type AssignmentSource as aF, type AttributeGroup as aG, type BaseAttribute as aH, type BufferedRecord as aI, type BuiltInTransform as aJ, type CalendarViewConfig as aK, type CalendarViewDefinition as aL, type CanvasViewport as aM, type CheckboxFilterOperator as aN, type CodeExecutionAction as aO, type ConditionNode as aP, type ConditionOperator as aQ, type CurrencyFilterValue as aR, type CustomTab as aS, DEFAULT_RETENTION_POLICY as aT, DEFAULT_THEME as aU, DEFAULT_VALIDATION_MESSAGES as aV, type DateFilterOperator as aW, type DateFormat as aX, type DateValue as aY, type DetailViewConfig as aZ, type DisplayRecord as a_, type SidePanelConfig as aa, type Field as ab, type AttributeGroupField as ac, type FieldGroup as ad, type RelationGroup as ae, type Group as af, type TableTab as ag, type CreateMode as ah, type DetailViewDefinition as ai, type Tab as aj, type ListViewDefinition as ak, type SlotMode as al, type FlowFieldsRow as am, type ConditionGroup as an, type ConditionRule as ao, type FlagValueType as ap, type FeatureFlagDefinition as aq, type FlagLevel as ar, type FeatureFlagsRepository as as, type StaticFlagDefault as at, type ResolvedFlag as au, type ViewDefinition as av, type ListViewConfig as aw, type ListViewTab as ax, type AIActionConfig as ay, type AIActionType as az, type WorkflowNodeType as b, type StatusGroup as b$, type DocumentsTab as b0, type EndNode as b1, type ExtendedFilterRule as b2, FORBIDDEN_PROPERTY_TYPES as b3, type FeatureFlagsConfig as b4, type FilterCombinator as b5, type FilterGroup as b6, type FilterOperator as b7, type FilterRule as b8, type FilterValue as b9, type NumberFilterOperator as bA, type NumberUnit as bB, OPERATORS_BY_TYPE as bC, type ObjectAttribute as bD, type OptionPropertyAttribute as bE, type PhoneFilterValue as bF, type PropertyAttribute as bG, type PropertySchema as bH, type PropertyType as bI, type QueryState as bJ, RELATION_TARGET_ANY as bK, RESERVED_ATTRIBUTE_NAMES as bL, type RecordPatch as bM, type RelationBuffer as bN, type RelationFilterOperator as bO, type RelationQualifierPatch as bP, type RelationSource as bQ, type RelativeDateValue as bR, type ReservedAttributeName as bS, type RetentionPolicy as bT, type RichtextTab as bU, SYSTEM_FIELD_NAMES as bV, type SchemaOperation as bW, type SchemaTransform as bX, type SelectFilterOperator as bY, type SortDirection as bZ, type StartNode as b_, type FlagOverride as ba, type FlowDefinition as bb, type FlowPage as bc, type FlowRelation as bd, type FlowRow as be, type FlowRowField as bf, type FlowRowType as bg, type FlowSlot as bh, type FlowStatus as bi, type FlowsTab as bj, type ForbiddenPropertyType as bk, type FormDensity as bl, type FormFieldRef as bm, type FormTab as bn, type GalleryViewConfig as bo, type GalleryViewDefinition as bp, type GeneratedDocument as bq, type InverseSource as br, type ListViewLayout as bs, type MigrationError as bt, type MigrationPreview as bu, type MultiselectFilterOperator as bv, NON_SORTABLE_TYPES as bw, NO_VALUE_OPERATORS as bx, type NoValueOperator as by, type NodePosition as bz, type FlowHeadingRow as c, isAINode as c$, type SystemFieldName as c0, type TabType as c1, type TableSource as c2, type TextFilterOperator as c3, type ThemeColors as c4, type ThemeLogo as c5, type ThemeTypography as c6, type TimelineViewConfig as c7, type TimelineViewDefinition as c8, type TransformSource as c9, createPhoneValidator as cA, createRatingValidator as cB, createRelationValidator as cC, createRichtextValidator as cD, createRollupValidator as cE, createSelectValidator as cF, createSingleRelationValidator as cG, createStartTransition as cH, createStatusValidator as cI, createTextAreaValidator as cJ, createTextValidator as cK, createUserValidator as cL, currencyConfigSchema as cM, dateConfigSchema as cN, documentConfigSchema as cO, eq as cP, fileConfigSchema as cQ, formatZodErrors as cR, formulaConfigSchema as cS, generateCssVariables as cT, getAttributeConfigSchema as cU, getContextValue as cV, getMissingRequiredAttributes as cW, getRollupFilterOperators as cX, hasOptions as cY, inValues as cZ, inferInverseCardinality as c_, type ValidationMessages as ca, type ValidationResult as cb, type ViewOperation as cc, type ViewOverlay as cd, type ViewTransform as ce, type WorkflowError as cf, type WorkflowInstance as cg, and as ch, attributeConfigSchemas as ci, canResumeInstance as cj, checkboxConfigSchema as ck, computeRecordStatus as cl, createAttributeValidator as cm, createCheckboxValidator as cn, createCurrencyValidator as co, createDateValidator as cp, createDraftValidator as cq, createEmptyContext as cr, createFileValidator as cs, createFormAttributeValidator as ct, createFormulaValidator as cu, createLocationValidator as cv, createMultiRelationValidator as cw, createMultiselectValidator as cx, createNumberValidator as cy, createObjectValidator as cz, type FlowSeparatorRow as d, validateDraft as d$, isActivityTab as d0, isAdvancedFormNode as d1, isAssignNode as d2, isAttributeSortable as d3, isBilateralRelation as d4, isCalendarView as d5, isConditionGroup as d6, isConditionNode as d7, isConditionRule as d8, isCustomTab as d9, isSystemWorkflow as dA, isTableTab as dB, isTimelineView as dC, isUniversalRelation as dD, isWorkflowDefinition as dE, isWorkflowPublished as dF, locationConfigSchema as dG, mergeWithDefaults as dH, multiselectConfigSchema as dI, neq as dJ, numberConfigSchema as dK, or as dL, parseAttributeConfig as dM, phoneConfigSchema as dN, ratingConfigSchema as dO, relationConfigSchema as dP, richtextConfigSchema as dQ, rollupConfigSchema as dR, safeParseAttributeConfig as dS, selectConfigSchema as dT, setContextValue as dU, statusConfigSchema as dV, textConfigSchema as dW, textareaConfigSchema as dX, userConfigSchema as dY, validateAttribute as dZ, validateAttributeConfig as d_, isDetailView as da, isDocumentsTab as db, isEndNode as dc, isFieldGroup as dd, isFlowDefinition as de, isFlowFieldsRow as df, isFlowPublished as dg, isFlowRelationListRow as dh, isFlowsTab as di, isFormNode as dj, isFormTab as dk, isGalleryView as dl, isInstanceTerminal as dm, isInstanceWaiting as dn, isInverseSourceTab as dp, isLayoutRow as dq, isListView as dr, isNoValueOperator as ds, isRecordComplete as dt, isRelationGroup as du, isRelationSourceTab as dv, isRichtextTab as dw, isSimpleFormNode as dx, isStartNode as dy, isSystemFlow as dz, type FlowTextRow as e, validateDraftOrThrow as e0, validateObject as e1, validateObjectOrThrow as e2, type FlowRelationListRow as f, type WorkflowSlot as g, type WorkflowTheme as h, type RelationBufferMap as i, type AttributeType as j, type ViewConfig as k, type WorkflowStatus as l, type WorkflowLayout as m, type WorkflowConfig as n, type WorkflowDefinition as o, type WorkflowExecutionContext as p, type WorkflowTransition as q, type Location as r, type FormulaAttribute as s, type RollupAttribute as t, type CompletionStatus as u, type StatusAttribute as v, type SelectAttribute as w, type Phone as x, type Currency as y, type DocumentAttribute as z };
3534
+ export { type RelationAttribute as $, type Attribute as A, type FeatureGate as B, type ConfigOverrides as C, type DateAttribute as D, type TextAttribute as E, type FilterState as F, type TextAreaAttribute as G, type RichtextAttribute as H, type InstanceStatus as I, type RichtextFeature as J, type CheckboxAttribute as K, type LocationGranularity as L, type MultiselectAttribute as M, type NumberAttribute as N, type ObjectRecord as O, type PendingAction as P, type PhoneAttribute as Q, type RelationFieldConfig as R, type SortRule as S, type Timestamps as T, type UserAttribute as U, type ViewType as V, type WorkflowNode as W, type CurrencyAttribute as X, type Option as Y, type LocationAttribute as Z, type FileAttribute as _, type FormNode as a, FORBIDDEN_PROPERTY_TYPES as a$, type RatingAttribute as a0, type BilateralConfig as a1, type SingleRelationAttribute as a2, type MultiRelationAttribute as a3, type RelationTarget as a4, type FormulaReturnType as a5, type RollupFunction as a6, type MigrationDefinition as a7, type ObjectDefinition as a8, type DetailViewLayout as a9, type AdvancedFilterState as aA, type AssignNode as aB, type AssignmentMapping as aC, type AssignmentSource as aD, type AttributeGroup as aE, type BaseAttribute as aF, type BufferedRecord as aG, type BuiltInTransform as aH, type CalendarViewConfig as aI, type CalendarViewDefinition as aJ, type CanvasViewport as aK, type CheckboxFilterOperator as aL, type ConditionNode as aM, type ConditionOperator as aN, type CurrencyFilterValue as aO, type CustomTab as aP, DEFAULT_RETENTION_POLICY as aQ, DEFAULT_THEME as aR, DEFAULT_VALIDATION_MESSAGES as aS, type DateFilterOperator as aT, type DateFormat as aU, type DateValue as aV, type DetailViewConfig as aW, type DisplayRecord as aX, type DocumentsTab as aY, type EndNode as aZ, type ExtendedFilterRule as a_, type SidePanelConfig as aa, type Field as ab, type AttributeGroupField as ac, type FieldGroup as ad, type RelationGroup as ae, type Group as af, type TableTab as ag, type CreateMode as ah, type DetailViewDefinition as ai, type Tab as aj, type ListViewDefinition as ak, type SlotMode as al, type FlowFieldsRow as am, type ConditionGroup as an, type ConditionRule as ao, type FlagValueType as ap, type FeatureFlagDefinition as aq, type FlagLevel as ar, type FeatureFlagsRepository as as, type StaticFlagDefault as at, type ResolvedFlag as au, type ViewDefinition as av, type ListViewConfig as aw, type ListViewTab as ax, type AINode as ay, type ActivityTab as az, type WorkflowNodeType as b, type TextFilterOperator as b$, type FeatureFlagsConfig as b0, type FilterCombinator as b1, type FilterGroup as b2, type FilterOperator as b3, type FilterRule as b4, type FilterValue as b5, type FlagOverride as b6, type FlowDefinition as b7, type FlowPage as b8, type FlowRelation as b9, type OptionPropertyAttribute as bA, type PhoneFilterValue as bB, type PropertyAttribute as bC, type PropertySchema as bD, type PropertyType as bE, type QueryState as bF, RELATION_TARGET_ANY as bG, RESERVED_ATTRIBUTE_NAMES as bH, type RecordPatch as bI, type RelationBuffer as bJ, type RelationFilterOperator as bK, type RelationQualifierPatch as bL, type RelationSource as bM, type RelativeDateValue as bN, type ReservedAttributeName as bO, type RetentionPolicy as bP, type RichtextTab as bQ, SYSTEM_FIELD_NAMES as bR, type SchemaOperation as bS, type SchemaTransform as bT, type SelectFilterOperator as bU, type SortDirection as bV, type StartNode as bW, type StatusGroup as bX, type SystemFieldName as bY, type TabType as bZ, type TableSource as b_, type FlowRow as ba, type FlowRowField as bb, type FlowRowType as bc, type FlowSlot as bd, type FlowStatus as be, type FlowsTab as bf, type ForbiddenPropertyType as bg, type FormDensity as bh, type FormFieldRef as bi, type FormTab as bj, type GalleryViewConfig as bk, type GalleryViewDefinition as bl, type GeneratedDocument as bm, type InverseSource as bn, type ListViewLayout as bo, type MigrationError as bp, type MigrationPreview as bq, type MultiselectFilterOperator as br, NON_SORTABLE_TYPES as bs, NO_VALUE_OPERATORS as bt, type NoValueOperator as bu, type NodePosition as bv, type NumberFilterOperator as bw, type NumberUnit as bx, OPERATORS_BY_TYPE as by, type ObjectAttribute as bz, type FlowHeadingRow as c, isAttributeSortable as c$, type ThemeColors as c0, type ThemeLogo as c1, type ThemeTypography as c2, type TimelineViewConfig as c3, type TimelineViewDefinition as c4, type TransformSource as c5, type ValidationMessages as c6, type ValidationResult as c7, type ViewOperation as c8, type ViewOverlay as c9, createRollupValidator as cA, createSelectValidator as cB, createSingleRelationValidator as cC, createStartTransition as cD, createStatusValidator as cE, createTextAreaValidator as cF, createTextValidator as cG, createUserValidator as cH, currencyConfigSchema as cI, dateConfigSchema as cJ, documentConfigSchema as cK, eq as cL, fileConfigSchema as cM, formatZodErrors as cN, formulaConfigSchema as cO, generateCssVariables as cP, getAttributeConfigSchema as cQ, getContextValue as cR, getMissingRequiredAttributes as cS, getRollupFilterOperators as cT, hasOptions as cU, inValues as cV, inferInverseCardinality as cW, isAINode as cX, isActivityTab as cY, isAdvancedFormNode as cZ, isAssignNode as c_, type ViewTransform as ca, type WorkflowError as cb, type WorkflowInstance as cc, and as cd, attributeConfigSchemas as ce, canResumeInstance as cf, checkboxConfigSchema as cg, computeRecordStatus as ch, createAttributeValidator as ci, createCheckboxValidator as cj, createCurrencyValidator as ck, createDateValidator as cl, createDraftValidator as cm, createEmptyContext as cn, createFileValidator as co, createFormAttributeValidator as cp, createFormulaValidator as cq, createLocationValidator as cr, createMultiRelationValidator as cs, createMultiselectValidator as ct, createNumberValidator as cu, createObjectValidator as cv, createPhoneValidator as cw, createRatingValidator as cx, createRelationValidator as cy, createRichtextValidator as cz, type FlowSeparatorRow as d, isBilateralRelation as d0, isCalendarView as d1, isConditionGroup as d2, isConditionNode as d3, isConditionRule as d4, isCustomTab as d5, isDetailView as d6, isDocumentsTab as d7, isEndNode as d8, isFieldGroup as d9, isWorkflowDefinition as dA, isWorkflowPublished as dB, locationConfigSchema as dC, mergeWithDefaults as dD, multiselectConfigSchema as dE, neq as dF, numberConfigSchema as dG, or as dH, parseAttributeConfig as dI, phoneConfigSchema as dJ, ratingConfigSchema as dK, relationConfigSchema as dL, richtextConfigSchema as dM, rollupConfigSchema as dN, safeParseAttributeConfig as dO, selectConfigSchema as dP, setContextValue as dQ, statusConfigSchema as dR, textConfigSchema as dS, textareaConfigSchema as dT, userConfigSchema as dU, validateAttribute as dV, validateAttributeConfig as dW, validateDraft as dX, validateDraftOrThrow as dY, validateObject as dZ, validateObjectOrThrow as d_, isFlowDefinition as da, isFlowFieldsRow as db, isFlowPublished as dc, isFlowRelationListRow as dd, isFlowsTab as de, isFormNode as df, isFormTab as dg, isGalleryView as dh, isInstanceTerminal as di, isInstanceWaiting as dj, isInverseSourceTab as dk, isLayoutRow as dl, isListView as dm, isNoValueOperator as dn, isRecordComplete as dp, isRelationGroup as dq, isRelationSourceTab as dr, isRichtextTab as ds, isSimpleFormNode as dt, isStartNode as du, isSystemFlow as dv, isSystemWorkflow as dw, isTableTab as dx, isTimelineView as dy, isUniversalRelation as dz, type FlowTextRow as e, type FlowRelationListRow as f, type WorkflowSlot as g, type WorkflowTheme as h, type RelationBufferMap as i, type AttributeType as j, type ViewConfig as k, type WorkflowStatus as l, type WorkflowLayout as m, type WorkflowConfig as n, type WorkflowDefinition as o, type WorkflowExecutionContext as p, type WorkflowTransition as q, type Location as r, type FormulaAttribute as s, type RollupAttribute as t, type CompletionStatus as u, type StatusAttribute as v, type SelectAttribute as w, type Phone as x, type Currency as y, type DocumentAttribute as z };
@@ -1469,73 +1469,46 @@ interface AssignNode extends BaseNode {
1469
1469
  next?: string | null;
1470
1470
  }
1471
1471
  /**
1472
- * AI action config discriminated union for different AI capabilities.
1472
+ * AI noderuns an AI agent (inline or referenced from a definition).
1473
1473
  *
1474
- * @example Document generation
1474
+ * Two modes:
1475
+ * - `sync`: runs the agent inline, workflow waits for result
1476
+ * - `async`: enqueues a background agent run, workflow waits via event bus
1477
+ *
1478
+ * Two sources:
1479
+ * - `definitionId`: load agent config from DB (existing background agent definition)
1480
+ * - inline props: define the agent directly in the node (no DB record needed)
1481
+ *
1482
+ * When both `definitionId` and inline props are set, inline props override the definition.
1483
+ *
1484
+ * @example Inline sync agent
1475
1485
  * ```typescript
1476
- * const action: AIActionConfig = {
1477
- * type: "document-generation",
1478
- * templateId: "template-contract-v1",
1479
- * inputSlotIds: ["client", "company"],
1486
+ * const node: AINode = {
1487
+ * type: "ai",
1488
+ * id: "generate",
1489
+ * label: "Générer le contrat",
1490
+ * mode: "sync",
1491
+ * systemPrompt: "Tu es un expert en rédaction de contrats.",
1492
+ * model: "claude-sonnet-4-6",
1493
+ * tools: ["generate_document"],
1494
+ * inputSlotIds: ["client"],
1480
1495
  * targetSlotIds: ["client"],
1481
- * outputFormat: "pdf",
1482
- * aiInstructions: "Generate a professional contract",
1496
+ * instructions: "Génère un contrat PDF pour ce client.",
1497
+ * next: "end",
1483
1498
  * };
1484
1499
  * ```
1485
- */
1486
- type AIActionConfig = DocumentGenerationAction | CodeExecutionAction;
1487
- /**
1488
- * AI action type discriminant
1489
- */
1490
- type AIActionType = AIActionConfig["type"];
1491
- /**
1492
- * Generate a document (PDF/DOCX) from a template using an AI agent session.
1493
- */
1494
- interface DocumentGenerationAction {
1495
- type: "document-generation";
1496
- /** File ID of the uploaded DOCX template in storage */
1497
- templateId: string;
1498
- /** Slots whose data is context for the AI */
1499
- inputSlotIds: string[];
1500
- /** Slots to attach the generated document to */
1501
- targetSlotIds: string[];
1502
- /** Output format */
1503
- outputFormat: "pdf" | "docx";
1504
- /** Instructions for the AI agent on how to generate content */
1505
- aiInstructions?: string;
1506
- }
1507
- /**
1508
- * Execute code in a sandbox without AI (mode "code").
1509
- */
1510
- interface CodeExecutionAction {
1511
- type: "code-execution";
1512
- /** Code to execute (may contain Mustache expressions resolved from slots) */
1513
- code: string;
1514
- language: "javascript" | "typescript" | "python";
1515
- /** Slots injected as JSON environment variables */
1516
- inputSlotIds?: string[];
1517
- /** Variable name to capture stdout into the execution context */
1518
- outputVariable?: string;
1519
- /** Packages to install before execution */
1520
- packages?: string[];
1521
- }
1522
- /**
1523
- * AI node — runs an AI action (document generation, code execution, etc.)
1524
1500
  *
1525
- * @example
1501
+ * @example Referenced async agent
1526
1502
  * ```typescript
1527
1503
  * const node: AINode = {
1528
1504
  * type: "ai",
1529
- * id: "generate-contract",
1530
- * label: "Generate Contract",
1531
- * action: {
1532
- * type: "document-generation",
1533
- * templateId: "template-contract-v1",
1534
- * inputSlotIds: ["client", "company"],
1535
- * targetSlotIds: ["client"],
1536
- * outputFormat: "pdf",
1537
- * },
1538
- * next: "end-success",
1505
+ * id: "enrich",
1506
+ * label: "Enrichir le contact",
1507
+ * mode: "async",
1508
+ * definitionId: "my-enrichment-agent-id",
1509
+ * inputSlotIds: ["contact"],
1510
+ * instructions: "Enrichis le profil du contact.",
1511
+ * next: "end",
1539
1512
  * };
1540
1513
  * ```
1541
1514
  */
@@ -1543,8 +1516,21 @@ interface AINode extends BaseNode {
1543
1516
  type: "ai";
1544
1517
  label: string;
1545
1518
  description?: string;
1546
- action: AIActionConfig;
1547
- /** Timeout in milliseconds (default: 120_000) */
1519
+ /** Execution mode */
1520
+ mode: "sync" | "async";
1521
+ /** ID of an existing agent_definition record in DB */
1522
+ definitionId?: string;
1523
+ systemPrompt?: string;
1524
+ model?: string;
1525
+ /** Tool names to expose to the agent. Example: ["generate_document", "execute_code"] */
1526
+ tools?: string[];
1527
+ maxIterations?: number;
1528
+ /** User message injected as the agent's first message */
1529
+ instructions?: string;
1530
+ /** Slot IDs whose data is serialized into the agent's context */
1531
+ inputSlotIds?: string[];
1532
+ /** Slot IDs used as targets by the generate_document tool */
1533
+ targetSlotIds?: string[];
1548
1534
  timeoutMs?: number;
1549
1535
  next?: string | null;
1550
1536
  }
@@ -1904,13 +1890,18 @@ interface PendingAction {
1904
1890
  /** ID of the node waiting for action */
1905
1891
  nodeId: string;
1906
1892
  /** Type of the waiting node */
1907
- nodeType: "form" | "signature" | "approval";
1893
+ nodeType: "form" | "signature" | "approval" | "ai";
1908
1894
  /** Display label for the action */
1909
1895
  nodeLabel: string;
1910
1896
  /** ID of the participation required to complete this action */
1911
1897
  requiredParticipationId?: string;
1912
1898
  /** When the pending action expires */
1913
1899
  expiresAt?: Date;
1900
+ /**
1901
+ * Background agent run ID — set when nodeType is "ai" and mode is "async".
1902
+ * Used to resume the workflow when the agent run completes.
1903
+ */
1904
+ agentRunId?: string;
1914
1905
  }
1915
1906
  /**
1916
1907
  * A specific execution of a workflow.
@@ -3540,4 +3531,4 @@ declare function isRecordComplete(objectDef: ObjectDefinition, data: Record<stri
3540
3531
  */
3541
3532
  declare function computeRecordStatus(objectDef: ObjectDefinition, data: Record<string, unknown>): CompletionStatus;
3542
3533
 
3543
- export { type RelationAttribute as $, type Attribute as A, type FeatureGate as B, type ConfigOverrides as C, type DateAttribute as D, type TextAttribute as E, type FilterState as F, type TextAreaAttribute as G, type RichtextAttribute as H, type InstanceStatus as I, type RichtextFeature as J, type CheckboxAttribute as K, type LocationGranularity as L, type MultiselectAttribute as M, type NumberAttribute as N, type ObjectRecord as O, type PendingAction as P, type PhoneAttribute as Q, type RelationFieldConfig as R, type SortRule as S, type Timestamps as T, type UserAttribute as U, type ViewType as V, type WorkflowNode as W, type CurrencyAttribute as X, type Option as Y, type LocationAttribute as Z, type FileAttribute as _, type FormNode as a, type DocumentGenerationAction as a$, type RatingAttribute as a0, type BilateralConfig as a1, type SingleRelationAttribute as a2, type MultiRelationAttribute as a3, type RelationTarget as a4, type FormulaReturnType as a5, type RollupFunction as a6, type MigrationDefinition as a7, type ObjectDefinition as a8, type DetailViewLayout as a9, type AINode as aA, type ActivityTab as aB, type AdvancedFilterState as aC, type AssignNode as aD, type AssignmentMapping as aE, type AssignmentSource as aF, type AttributeGroup as aG, type BaseAttribute as aH, type BufferedRecord as aI, type BuiltInTransform as aJ, type CalendarViewConfig as aK, type CalendarViewDefinition as aL, type CanvasViewport as aM, type CheckboxFilterOperator as aN, type CodeExecutionAction as aO, type ConditionNode as aP, type ConditionOperator as aQ, type CurrencyFilterValue as aR, type CustomTab as aS, DEFAULT_RETENTION_POLICY as aT, DEFAULT_THEME as aU, DEFAULT_VALIDATION_MESSAGES as aV, type DateFilterOperator as aW, type DateFormat as aX, type DateValue as aY, type DetailViewConfig as aZ, type DisplayRecord as a_, type SidePanelConfig as aa, type Field as ab, type AttributeGroupField as ac, type FieldGroup as ad, type RelationGroup as ae, type Group as af, type TableTab as ag, type CreateMode as ah, type DetailViewDefinition as ai, type Tab as aj, type ListViewDefinition as ak, type SlotMode as al, type FlowFieldsRow as am, type ConditionGroup as an, type ConditionRule as ao, type FlagValueType as ap, type FeatureFlagDefinition as aq, type FlagLevel as ar, type FeatureFlagsRepository as as, type StaticFlagDefault as at, type ResolvedFlag as au, type ViewDefinition as av, type ListViewConfig as aw, type ListViewTab as ax, type AIActionConfig as ay, type AIActionType as az, type WorkflowNodeType as b, type StatusGroup as b$, type DocumentsTab as b0, type EndNode as b1, type ExtendedFilterRule as b2, FORBIDDEN_PROPERTY_TYPES as b3, type FeatureFlagsConfig as b4, type FilterCombinator as b5, type FilterGroup as b6, type FilterOperator as b7, type FilterRule as b8, type FilterValue as b9, type NumberFilterOperator as bA, type NumberUnit as bB, OPERATORS_BY_TYPE as bC, type ObjectAttribute as bD, type OptionPropertyAttribute as bE, type PhoneFilterValue as bF, type PropertyAttribute as bG, type PropertySchema as bH, type PropertyType as bI, type QueryState as bJ, RELATION_TARGET_ANY as bK, RESERVED_ATTRIBUTE_NAMES as bL, type RecordPatch as bM, type RelationBuffer as bN, type RelationFilterOperator as bO, type RelationQualifierPatch as bP, type RelationSource as bQ, type RelativeDateValue as bR, type ReservedAttributeName as bS, type RetentionPolicy as bT, type RichtextTab as bU, SYSTEM_FIELD_NAMES as bV, type SchemaOperation as bW, type SchemaTransform as bX, type SelectFilterOperator as bY, type SortDirection as bZ, type StartNode as b_, type FlagOverride as ba, type FlowDefinition as bb, type FlowPage as bc, type FlowRelation as bd, type FlowRow as be, type FlowRowField as bf, type FlowRowType as bg, type FlowSlot as bh, type FlowStatus as bi, type FlowsTab as bj, type ForbiddenPropertyType as bk, type FormDensity as bl, type FormFieldRef as bm, type FormTab as bn, type GalleryViewConfig as bo, type GalleryViewDefinition as bp, type GeneratedDocument as bq, type InverseSource as br, type ListViewLayout as bs, type MigrationError as bt, type MigrationPreview as bu, type MultiselectFilterOperator as bv, NON_SORTABLE_TYPES as bw, NO_VALUE_OPERATORS as bx, type NoValueOperator as by, type NodePosition as bz, type FlowHeadingRow as c, isAINode as c$, type SystemFieldName as c0, type TabType as c1, type TableSource as c2, type TextFilterOperator as c3, type ThemeColors as c4, type ThemeLogo as c5, type ThemeTypography as c6, type TimelineViewConfig as c7, type TimelineViewDefinition as c8, type TransformSource as c9, createPhoneValidator as cA, createRatingValidator as cB, createRelationValidator as cC, createRichtextValidator as cD, createRollupValidator as cE, createSelectValidator as cF, createSingleRelationValidator as cG, createStartTransition as cH, createStatusValidator as cI, createTextAreaValidator as cJ, createTextValidator as cK, createUserValidator as cL, currencyConfigSchema as cM, dateConfigSchema as cN, documentConfigSchema as cO, eq as cP, fileConfigSchema as cQ, formatZodErrors as cR, formulaConfigSchema as cS, generateCssVariables as cT, getAttributeConfigSchema as cU, getContextValue as cV, getMissingRequiredAttributes as cW, getRollupFilterOperators as cX, hasOptions as cY, inValues as cZ, inferInverseCardinality as c_, type ValidationMessages as ca, type ValidationResult as cb, type ViewOperation as cc, type ViewOverlay as cd, type ViewTransform as ce, type WorkflowError as cf, type WorkflowInstance as cg, and as ch, attributeConfigSchemas as ci, canResumeInstance as cj, checkboxConfigSchema as ck, computeRecordStatus as cl, createAttributeValidator as cm, createCheckboxValidator as cn, createCurrencyValidator as co, createDateValidator as cp, createDraftValidator as cq, createEmptyContext as cr, createFileValidator as cs, createFormAttributeValidator as ct, createFormulaValidator as cu, createLocationValidator as cv, createMultiRelationValidator as cw, createMultiselectValidator as cx, createNumberValidator as cy, createObjectValidator as cz, type FlowSeparatorRow as d, validateDraft as d$, isActivityTab as d0, isAdvancedFormNode as d1, isAssignNode as d2, isAttributeSortable as d3, isBilateralRelation as d4, isCalendarView as d5, isConditionGroup as d6, isConditionNode as d7, isConditionRule as d8, isCustomTab as d9, isSystemWorkflow as dA, isTableTab as dB, isTimelineView as dC, isUniversalRelation as dD, isWorkflowDefinition as dE, isWorkflowPublished as dF, locationConfigSchema as dG, mergeWithDefaults as dH, multiselectConfigSchema as dI, neq as dJ, numberConfigSchema as dK, or as dL, parseAttributeConfig as dM, phoneConfigSchema as dN, ratingConfigSchema as dO, relationConfigSchema as dP, richtextConfigSchema as dQ, rollupConfigSchema as dR, safeParseAttributeConfig as dS, selectConfigSchema as dT, setContextValue as dU, statusConfigSchema as dV, textConfigSchema as dW, textareaConfigSchema as dX, userConfigSchema as dY, validateAttribute as dZ, validateAttributeConfig as d_, isDetailView as da, isDocumentsTab as db, isEndNode as dc, isFieldGroup as dd, isFlowDefinition as de, isFlowFieldsRow as df, isFlowPublished as dg, isFlowRelationListRow as dh, isFlowsTab as di, isFormNode as dj, isFormTab as dk, isGalleryView as dl, isInstanceTerminal as dm, isInstanceWaiting as dn, isInverseSourceTab as dp, isLayoutRow as dq, isListView as dr, isNoValueOperator as ds, isRecordComplete as dt, isRelationGroup as du, isRelationSourceTab as dv, isRichtextTab as dw, isSimpleFormNode as dx, isStartNode as dy, isSystemFlow as dz, type FlowTextRow as e, validateDraftOrThrow as e0, validateObject as e1, validateObjectOrThrow as e2, type FlowRelationListRow as f, type WorkflowSlot as g, type WorkflowTheme as h, type RelationBufferMap as i, type AttributeType as j, type ViewConfig as k, type WorkflowStatus as l, type WorkflowLayout as m, type WorkflowConfig as n, type WorkflowDefinition as o, type WorkflowExecutionContext as p, type WorkflowTransition as q, type Location as r, type FormulaAttribute as s, type RollupAttribute as t, type CompletionStatus as u, type StatusAttribute as v, type SelectAttribute as w, type Phone as x, type Currency as y, type DocumentAttribute as z };
3534
+ export { type RelationAttribute as $, type Attribute as A, type FeatureGate as B, type ConfigOverrides as C, type DateAttribute as D, type TextAttribute as E, type FilterState as F, type TextAreaAttribute as G, type RichtextAttribute as H, type InstanceStatus as I, type RichtextFeature as J, type CheckboxAttribute as K, type LocationGranularity as L, type MultiselectAttribute as M, type NumberAttribute as N, type ObjectRecord as O, type PendingAction as P, type PhoneAttribute as Q, type RelationFieldConfig as R, type SortRule as S, type Timestamps as T, type UserAttribute as U, type ViewType as V, type WorkflowNode as W, type CurrencyAttribute as X, type Option as Y, type LocationAttribute as Z, type FileAttribute as _, type FormNode as a, FORBIDDEN_PROPERTY_TYPES as a$, type RatingAttribute as a0, type BilateralConfig as a1, type SingleRelationAttribute as a2, type MultiRelationAttribute as a3, type RelationTarget as a4, type FormulaReturnType as a5, type RollupFunction as a6, type MigrationDefinition as a7, type ObjectDefinition as a8, type DetailViewLayout as a9, type AdvancedFilterState as aA, type AssignNode as aB, type AssignmentMapping as aC, type AssignmentSource as aD, type AttributeGroup as aE, type BaseAttribute as aF, type BufferedRecord as aG, type BuiltInTransform as aH, type CalendarViewConfig as aI, type CalendarViewDefinition as aJ, type CanvasViewport as aK, type CheckboxFilterOperator as aL, type ConditionNode as aM, type ConditionOperator as aN, type CurrencyFilterValue as aO, type CustomTab as aP, DEFAULT_RETENTION_POLICY as aQ, DEFAULT_THEME as aR, DEFAULT_VALIDATION_MESSAGES as aS, type DateFilterOperator as aT, type DateFormat as aU, type DateValue as aV, type DetailViewConfig as aW, type DisplayRecord as aX, type DocumentsTab as aY, type EndNode as aZ, type ExtendedFilterRule as a_, type SidePanelConfig as aa, type Field as ab, type AttributeGroupField as ac, type FieldGroup as ad, type RelationGroup as ae, type Group as af, type TableTab as ag, type CreateMode as ah, type DetailViewDefinition as ai, type Tab as aj, type ListViewDefinition as ak, type SlotMode as al, type FlowFieldsRow as am, type ConditionGroup as an, type ConditionRule as ao, type FlagValueType as ap, type FeatureFlagDefinition as aq, type FlagLevel as ar, type FeatureFlagsRepository as as, type StaticFlagDefault as at, type ResolvedFlag as au, type ViewDefinition as av, type ListViewConfig as aw, type ListViewTab as ax, type AINode as ay, type ActivityTab as az, type WorkflowNodeType as b, type TextFilterOperator as b$, type FeatureFlagsConfig as b0, type FilterCombinator as b1, type FilterGroup as b2, type FilterOperator as b3, type FilterRule as b4, type FilterValue as b5, type FlagOverride as b6, type FlowDefinition as b7, type FlowPage as b8, type FlowRelation as b9, type OptionPropertyAttribute as bA, type PhoneFilterValue as bB, type PropertyAttribute as bC, type PropertySchema as bD, type PropertyType as bE, type QueryState as bF, RELATION_TARGET_ANY as bG, RESERVED_ATTRIBUTE_NAMES as bH, type RecordPatch as bI, type RelationBuffer as bJ, type RelationFilterOperator as bK, type RelationQualifierPatch as bL, type RelationSource as bM, type RelativeDateValue as bN, type ReservedAttributeName as bO, type RetentionPolicy as bP, type RichtextTab as bQ, SYSTEM_FIELD_NAMES as bR, type SchemaOperation as bS, type SchemaTransform as bT, type SelectFilterOperator as bU, type SortDirection as bV, type StartNode as bW, type StatusGroup as bX, type SystemFieldName as bY, type TabType as bZ, type TableSource as b_, type FlowRow as ba, type FlowRowField as bb, type FlowRowType as bc, type FlowSlot as bd, type FlowStatus as be, type FlowsTab as bf, type ForbiddenPropertyType as bg, type FormDensity as bh, type FormFieldRef as bi, type FormTab as bj, type GalleryViewConfig as bk, type GalleryViewDefinition as bl, type GeneratedDocument as bm, type InverseSource as bn, type ListViewLayout as bo, type MigrationError as bp, type MigrationPreview as bq, type MultiselectFilterOperator as br, NON_SORTABLE_TYPES as bs, NO_VALUE_OPERATORS as bt, type NoValueOperator as bu, type NodePosition as bv, type NumberFilterOperator as bw, type NumberUnit as bx, OPERATORS_BY_TYPE as by, type ObjectAttribute as bz, type FlowHeadingRow as c, isAttributeSortable as c$, type ThemeColors as c0, type ThemeLogo as c1, type ThemeTypography as c2, type TimelineViewConfig as c3, type TimelineViewDefinition as c4, type TransformSource as c5, type ValidationMessages as c6, type ValidationResult as c7, type ViewOperation as c8, type ViewOverlay as c9, createRollupValidator as cA, createSelectValidator as cB, createSingleRelationValidator as cC, createStartTransition as cD, createStatusValidator as cE, createTextAreaValidator as cF, createTextValidator as cG, createUserValidator as cH, currencyConfigSchema as cI, dateConfigSchema as cJ, documentConfigSchema as cK, eq as cL, fileConfigSchema as cM, formatZodErrors as cN, formulaConfigSchema as cO, generateCssVariables as cP, getAttributeConfigSchema as cQ, getContextValue as cR, getMissingRequiredAttributes as cS, getRollupFilterOperators as cT, hasOptions as cU, inValues as cV, inferInverseCardinality as cW, isAINode as cX, isActivityTab as cY, isAdvancedFormNode as cZ, isAssignNode as c_, type ViewTransform as ca, type WorkflowError as cb, type WorkflowInstance as cc, and as cd, attributeConfigSchemas as ce, canResumeInstance as cf, checkboxConfigSchema as cg, computeRecordStatus as ch, createAttributeValidator as ci, createCheckboxValidator as cj, createCurrencyValidator as ck, createDateValidator as cl, createDraftValidator as cm, createEmptyContext as cn, createFileValidator as co, createFormAttributeValidator as cp, createFormulaValidator as cq, createLocationValidator as cr, createMultiRelationValidator as cs, createMultiselectValidator as ct, createNumberValidator as cu, createObjectValidator as cv, createPhoneValidator as cw, createRatingValidator as cx, createRelationValidator as cy, createRichtextValidator as cz, type FlowSeparatorRow as d, isBilateralRelation as d0, isCalendarView as d1, isConditionGroup as d2, isConditionNode as d3, isConditionRule as d4, isCustomTab as d5, isDetailView as d6, isDocumentsTab as d7, isEndNode as d8, isFieldGroup as d9, isWorkflowDefinition as dA, isWorkflowPublished as dB, locationConfigSchema as dC, mergeWithDefaults as dD, multiselectConfigSchema as dE, neq as dF, numberConfigSchema as dG, or as dH, parseAttributeConfig as dI, phoneConfigSchema as dJ, ratingConfigSchema as dK, relationConfigSchema as dL, richtextConfigSchema as dM, rollupConfigSchema as dN, safeParseAttributeConfig as dO, selectConfigSchema as dP, setContextValue as dQ, statusConfigSchema as dR, textConfigSchema as dS, textareaConfigSchema as dT, userConfigSchema as dU, validateAttribute as dV, validateAttributeConfig as dW, validateDraft as dX, validateDraftOrThrow as dY, validateObject as dZ, validateObjectOrThrow as d_, isFlowDefinition as da, isFlowFieldsRow as db, isFlowPublished as dc, isFlowRelationListRow as dd, isFlowsTab as de, isFormNode as df, isFormTab as dg, isGalleryView as dh, isInstanceTerminal as di, isInstanceWaiting as dj, isInverseSourceTab as dk, isLayoutRow as dl, isListView as dm, isNoValueOperator as dn, isRecordComplete as dp, isRelationGroup as dq, isRelationSourceTab as dr, isRichtextTab as ds, isSimpleFormNode as dt, isStartNode as du, isSystemFlow as dv, isSystemWorkflow as dw, isTableTab as dx, isTimelineView as dy, isUniversalRelation as dz, type FlowTextRow as e, type FlowRelationListRow as f, type WorkflowSlot as g, type WorkflowTheme as h, type RelationBufferMap as i, type AttributeType as j, type ViewConfig as k, type WorkflowStatus as l, type WorkflowLayout as m, type WorkflowConfig as n, type WorkflowDefinition as o, type WorkflowExecutionContext as p, type WorkflowTransition as q, type Location as r, type FormulaAttribute as s, type RollupAttribute as t, type CompletionStatus as u, type StatusAttribute as v, type SelectAttribute as w, type Phone as x, type Currency as y, type DocumentAttribute as z };