@elyx-code/project-logic-tree 0.0.6339 → 0.0.6340

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.d.ts CHANGED
@@ -171,6 +171,18 @@ export declare class ActionOutputMapState extends OutputMapState implements IAct
171
171
  toJSON(seenEntities?: Set<EntityId>): IActionOutputMap | IOutputMapReference;
172
172
  }
173
173
 
174
+ export declare function afterLiteralValueAsTypeChangeSideEffects(newValue: ValueAsTypeState | ValueAsTypeState[] | null, entity: EntityWithValueState, project: ProjectState, storage: ChangeSet | IValueStoreClient): ChangeSet | null;
175
+
176
+ export declare function afterLiteralValueAsTypeDeleteSideEffects(entity: EntityWithValueState, project: ProjectState, storage: ChangeSet | IValueStoreClient): ChangeSet | null;
177
+
178
+ export declare function afterLiteralValueChangeSideEffects(newValue: LiteralValueType, entity: EntityWithValueState, project: ProjectState, storage: ChangeSet | IValueStoreClient): ChangeSet | null;
179
+
180
+ export declare function afterLiteralValueDeleteSideEffects(entity: EntityWithValueState, project: ProjectState, storage: ChangeSet | IValueStoreClient): ChangeSet | null;
181
+
182
+ export declare function aggregateVariableInputsNextValues(objectData: UntypedObjectValue, entity: VariableDeclarationState, context: IValueResolutionContext): UntypedObjectValue;
183
+
184
+ export declare function aggregateVariableInputsValues(objectData: UntypedObjectValue, entity: VariableDeclarationState, context: IValueResolutionContext): UntypedObjectValue;
185
+
174
186
  declare class AggregationStatement implements ISearchNode {
175
187
  owner: SearchStatementState;
176
188
  dataSource: DataSource | null;
@@ -413,6 +425,10 @@ export { argumentDeclarationValidation }
413
425
 
414
426
  export declare function asGenerationActionExample(payload: Record<string, any> | string): string;
415
427
 
428
+ export declare function assembleAndAddLiteralValueFromDataType(dataType: DataTypeState | null, valueOwner: EntityWithValueState | ValueDescriptorState | PropertyState, project: ProjectState, changeSet: ChangeSet | null): LiteralValueState;
429
+
430
+ export declare function assembleStandaloneLiteralValueFromDataType(dataType: DataTypeState | null, valueOwner: EntityWithValueState | ValueDescriptorState | PropertyState, project: ProjectState): LiteralValueState | null;
431
+
416
432
  export declare type BaseActionImplementation = (...args: any[]) => any[] | Promise<any[]>;
417
433
 
418
434
  export declare abstract class BaseCanvasDraggableState {
@@ -1331,14 +1347,20 @@ export declare function checkIsDetachedBranch(entity: CanvasEntityState): boolea
1331
1347
 
1332
1348
  export declare function checkIsDetachedBranchShallow(entity: CanvasEntityState): boolean;
1333
1349
 
1350
+ export declare function checkIsEmptyValue(value: LiteralValueType): boolean;
1351
+
1334
1352
  export declare function checkIsGloballyDeclared(entity: ConditionState | FunctionCallState | OperationState | VariableDeclarationState | VariableInstanceState | FunctionCallState | LoopState | SearchState): boolean;
1335
1353
 
1336
1354
  export declare function checkIsGlobalVariable(entity: VariableDeclarationState): boolean;
1337
1355
 
1356
+ export declare function checkIsLiteralValueEmpty(value: LiteralValueState): boolean;
1357
+
1338
1358
  export declare function checkIsMethod(entity: EntityState): boolean;
1339
1359
 
1340
1360
  export declare function checkIsNestedScope(parent: EntityWithLogicScopeState | ProjectState, child: EntityWithLogicScopeState | ProjectState, project: ProjectState): boolean;
1341
1361
 
1362
+ export declare function checkIsRequiredValue(entity: EntityWithValueState | PropertyState | ValueDescriptorState): boolean;
1363
+
1342
1364
  export declare function checkScopeCompatibility(entityA: EntityState | Element_2 | ElementTransfer | ElementGenerationTarget | ElementShallowTransfer, entityB: EntityState | Element_2 | ElementTransfer | ElementGenerationTarget | ElementShallowTransfer, project: ProjectState): ScopeCompatibility;
1343
1365
 
1344
1366
  export declare type ChildElement = IInstalledProject | IDefinitionEntity | IGlobalEvent | IFunctionDeclaration | IFunctionCall | IProperty | IVariableDeclaration | IVariableInstance | IOperation | ICondition | IArgumentDeclaration | IInputMap | IReturnDeclaration | IOutputMap | IDataType | IReturnStatement | IBreakStatement | IContinueStatement | ILoop | IActionDescriptor | ISearch | ILiteralValue | IValueDescriptor | IInternalCall;
@@ -2436,8 +2458,40 @@ export declare type DraggablePlayableEntityTransfer = DraggablePassThroughCallab
2436
2458
 
2437
2459
  export declare type DraggablePlayableEntityTypesUnion = DraggablePlayableEntity | DraggablePlayableEntityTransfer | DraggablePlayableEntityShallowTransfer | DraggablePlayableEntityGenerationTarget;
2438
2460
 
2461
+ export declare enum DynamicValueTypes {
2462
+ Inherited = "inherited",
2463
+ DefaultValue = "default-value",
2464
+ Missing = "missing",
2465
+ Empty = "empty",
2466
+ AutoCalculated = "auto-calculated",
2467
+ QueuedAutocalculation = "queued-autocalculation",
2468
+ External = "external",
2469
+ Testing = "testing",
2470
+ ExecutionResult = "execution-result"
2471
+ }
2472
+
2439
2473
  export declare const EDITABLE_PERSISTANCE_REPOSITORY_DEFAULTS: IEditableEntityPersistanceRepository;
2440
2474
 
2475
+ export declare class EfimeralValueStore implements IValueStoreClient {
2476
+ initialized: boolean;
2477
+ id: string;
2478
+ project: ProjectState;
2479
+ values: IValueStoreRecord;
2480
+ onWriteCallback: (owner: EntityWithValueState, value: ILiteralValue) => void;
2481
+ onRemoveCallback: (owner: EntityWithValueState) => void;
2482
+ constructor(id: string, project: ProjectState);
2483
+ onWrite(callback: (owner: EntityWithValueState, value: ILiteralValue) => void): void;
2484
+ onRemove(callback: (owner: EntityWithValueState) => void): void;
2485
+ init(): void;
2486
+ toJSON(): {
2487
+ [key: string]: ILiteralValueTransfer;
2488
+ };
2489
+ writeValue(owner: EntityWithValueState, value: LiteralValueState): void;
2490
+ readValue(ownerId: string): LiteralValueState | null;
2491
+ removeValue(ownerId: string): void;
2492
+ clear(): void;
2493
+ }
2494
+
2441
2495
  declare type Element_2 = IProject | IInstalledProject | IDefinitionEntity | IGlobalEvent | IFunctionDeclaration | IFunctionCall | IPrimitiveEntity | IProperty | IVariableDeclaration | IVariableInstance | IOperation | ICondition | IArgumentDeclaration | IInputMap | IReturnDeclaration | IOutputMap | IDataType | IReturnStatement | IBreakStatement | IContinueStatement | ILoop | IActionDescriptor | ISearch | ILiteralValue | IBuiltInBaseEntity | IValueDescriptor | IInternalCall;
2442
2496
  export { Element_2 as Element }
2443
2497
 
@@ -2922,6 +2976,78 @@ export declare type ExecutableEntityTransfer = CallableEntityTransfer | EntryPoi
2922
2976
 
2923
2977
  export declare type ExecutableEntityTypesUnion = ExecutableEntity | ExecutableEntityTransfer | ExecutableEntityShallowTransfer | ExecutableEntityGenerationTarget;
2924
2978
 
2979
+ export declare class Execution extends Events {
2980
+ project: ProjectState;
2981
+ entryPoint: DraggablePlayableEntityState;
2982
+ state: ExecutionState;
2983
+ events: Events;
2984
+ entities: TestableEntityState[];
2985
+ parentExecution: Execution | null;
2986
+ executing: TestableEntityState[];
2987
+ executed: TestableEntityState[];
2988
+ skipped: TestableEntityState[];
2989
+ localTestValues: EfimeralValueStore;
2990
+ resolvedValues: EfimeralValueStore;
2991
+ persistedExecutionResults: EfimeralValueStore;
2992
+ lastExecutionResults: EfimeralValueStore;
2993
+ onAddToSkippedListCallback: null | ((entity: TestableEntityState) => void);
2994
+ onRemoveFromSkippedListCallback: null | ((entity: TestableEntityState) => void);
2995
+ onAddEntityCallback: null | ((entity: TestableEntityState) => void);
2996
+ onRemoveEntityCallback: null | ((entity: TestableEntityState) => void);
2997
+ static searchImplementation: (entity: SearchState, inputs: IDynamicValue[]) => Promise<{
2998
+ data: {
2999
+ [columnName: string]: any;
3000
+ } | null | {
3001
+ [columnName: string]: any;
3002
+ }[];
3003
+ error: string | null;
3004
+ }>;
3005
+ constructor(project: ProjectState, entities: TestableEntityState[], entryPoint: DraggablePlayableEntityState, parentExecution?: Execution | null);
3006
+ get valueResolutionContext(): IValueResolutionContext;
3007
+ static injectSearchImplementation(implementation: (entity: SearchState, inputs: IDynamicValue[]) => Promise<{
3008
+ data: {
3009
+ [columnName: string]: any;
3010
+ } | null | {
3011
+ [columnName: string]: any;
3012
+ }[];
3013
+ error: string | null;
3014
+ }>): void;
3015
+ mergeExernalValuesWithInternalInputs(externalValues: IDynamicValue[], entity: EntityState): IDynamicValue[];
3016
+ inheritValuesFromContext(context: IValueResolutionContext): void;
3017
+ static executeOperation(operation: OperationState, inputs: IDynamicValue[], project: ProjectState): Promise<IExecutionResult>;
3018
+ executeSearch(entity: SearchState, inputs: IDynamicValue[], project: ProjectState): Promise<IExecutionResult>;
3019
+ executeLoop(loop: LoopState, inputs: IDynamicValue[], project: ProjectState, client?: IExecutionClient): Promise<IExecutionResult>;
3020
+ executeFunctionCall(functionCall: FunctionCallState, inputs: IDynamicValue[], project: ProjectState, client?: IExecutionClient): Promise<IExecutionResult>;
3021
+ static executeCondition(condition: ConditionState, inputs: IDynamicValue[]): Promise<IExecutionResult>;
3022
+ executeDetachedFullFunctionDeclarationLogic(functionDeclaration: FunctionDeclarationState, inputs: IDynamicValue[], project: ProjectState, client?: IExecutionClient): Promise<IExecutionResult>;
3023
+ executeFullFunctionDeclarationLogic(functionDeclaration: FunctionDeclarationState, inputs: IDynamicValue[], client?: IExecutionClient): Promise<IExecutionResult>;
3024
+ static executeEntryPointEntity(entryPointEntity: EntryPointEntityState, inputs: IDynamicValue[]): Promise<IExecutionResult>;
3025
+ static executeVariable(varDeclaration: VariableState, input: IDynamicValue): Promise<IExecutionResult>;
3026
+ static executeReturnStatement(returnStatement: ReturnStatementState, inputs: IDynamicValue[]): Promise<IExecutionResult>;
3027
+ static executeContinueStatement(continueStatement: ContinueStatementState, inputs: IDynamicValue[]): Promise<IExecutionResult>;
3028
+ static executeBreakStatement(breakStatement: BreakStatementState, inputs: IDynamicValue[]): Promise<IExecutionResult>;
3029
+ mergeValues(inputs: IDynamicValue[], defaultValues: IDynamicValue[]): IDynamicValue[];
3030
+ executeEntity(entity: DraggableExecutableEntityState | DraggableCallerEntityState | VariableDeclarationState, inputs?: IDynamicValue[], client?: IExecutionClient): Promise<IExecutionResult>;
3031
+ storeLastExecutionValues(result: IExecutionResult): void;
3032
+ executeBranch(localEntryPoint: DraggableExecutableEntityState | DraggableCallerEntityState | VariableDeclarationState, client?: IExecutionClient, values?: IDynamicValue[]): Promise<IExecutionResult | null>;
3033
+ execute(client?: IExecutionClient, values?: IDynamicValue[]): Promise<IExecutionResult>;
3034
+ addEntity(entity: TestableEntityState): void;
3035
+ addEntities(entities: TestableEntityState[]): void;
3036
+ removeEntity(entity: TestableEntityState): void;
3037
+ hasEntity(entity: EntityState): boolean;
3038
+ hasEntityWithId(id: string): boolean;
3039
+ onAddToSkippedList(callback: (entity: TestableEntityState) => void): void;
3040
+ onAddEntity(callback: (entity: TestableEntityState) => void): void;
3041
+ onRemoveFromSkippedList(callback: (entity: TestableEntityState) => void): void;
3042
+ onRemoveEntity(callback: (entity: TestableEntityState) => void): void;
3043
+ addToExecutingList(entity: TestableEntityState): void;
3044
+ removeFromExecutingList(entity: TestableEntityState): void;
3045
+ removeFromAlreadyExecutedList(entity: TestableEntityState): void;
3046
+ removeFromSkippedList(entity: TestableEntityState): void;
3047
+ addToAlreadyExecutedList(entity: TestableEntityState): void;
3048
+ addToSkippedList(entity: TestableEntityState): void;
3049
+ }
3050
+
2925
3051
  export declare const EXECUTION_OPERATIONS: {
2926
3052
  [key: string]: IActionDescriptorTransfer;
2927
3053
  };
@@ -2938,6 +3064,15 @@ export declare enum ExecutionOperations {
2938
3064
  Wait = "wait"
2939
3065
  }
2940
3066
 
3067
+ export declare enum ExecutionState {
3068
+ FinishedSuccess = "finished-success",
3069
+ FinishedError = "finished-error",
3070
+ Running = "running",
3071
+ Paused = "paused",
3072
+ Stopped = "stopped",
3073
+ NotStarted = "not-started"
3074
+ }
3075
+
2941
3076
  export declare enum ExecutionTerminationType {
2942
3077
  Success = "success",
2943
3078
  Error = "error",
@@ -3495,6 +3630,8 @@ export declare function generateRandomTextBefore(options: IAutogenerationRandomT
3495
3630
 
3496
3631
  export declare function generateRandomTextBetweenRange(options: IAutogenerationRandomTextBetween): string;
3497
3632
 
3633
+ export declare function generateStandaloneIfDefault(dynamicValue: IDynamicValue): IDynamicValue;
3634
+
3498
3635
  export declare function generateUniqueUUID(): string;
3499
3636
 
3500
3637
  export declare const GET_PROJECT_OPTIONS_DEFAULTS: IGetProjectOptions;
@@ -5324,6 +5461,8 @@ export declare function getDraggablePlayableEntityTypeSchema(): z_2.ZodUnion<[z_
5324
5461
 
5325
5462
  export declare function getEntitiesCreatedSinceInitialization(projectState: ProjectState, preInitDate: string): UserManagedEntityState[];
5326
5463
 
5464
+ export declare function getEntitiesToPropagateValuesTo(entity: EntityWithValueState, project: ProjectState, seenInRecursion?: Set<EntityId>): EntityWithValueState[];
5465
+
5327
5466
  export declare function getEntityArgumentDeclarations(entity: ExecutableEntityState): (ArgumentDeclarationState | ValueDescriptorState)[];
5328
5467
 
5329
5468
  export declare function getEntityInputMaps(entity: DraggablePassThroughCallableEntityState): InputMapState[];
@@ -6531,6 +6670,8 @@ declare function getLimitClauseFromSelectStatement(selectStatement: SelectStmt):
6531
6670
 
6532
6671
  export declare function getLinkedEntitiesFromArgumentDeclaration(argumentDeclaration: ArgumentDeclarationState): ValueReadingEntityState[];
6533
6672
 
6673
+ export declare function getLiteralValueNameFromDataType(dataType: DataTypeState | null): PrimitiveTypes;
6674
+
6534
6675
  export declare function getLowestPersistedEntityImplementation(entity: DefinitionEntityState): DefinitionEntityState | null;
6535
6676
 
6536
6677
  declare function getMainSourceFromSelectStatement(selectStatement: SelectStmt): {
@@ -7560,6 +7701,14 @@ export declare function handleBeforeEntityImplementationSideEffects(self: Defini
7560
7701
  newEntities: EntityState[];
7561
7702
  };
7562
7703
 
7704
+ export declare function handleLiteralValueChange(newValue: LiteralValueType, entity: EntityWithValueState, project: ProjectState, storage: ChangeSet | IValueStoreClient): ChangeSet | null;
7705
+
7706
+ export declare function handleLiteralValueDelete(entity: EntityWithValueState, project: ProjectState, storage: ChangeSet | IValueStoreClient): ChangeSet | null;
7707
+
7708
+ export declare function handleValueAsTypeChange(newValue: ValueAsTypeState | ValueAsTypeState[] | null, entity: EntityWithValueState, project: ProjectState, storage: ChangeSet | IValueStoreClient): ChangeSet | null;
7709
+
7710
+ export declare function handleValueAsTypeDelete(entity: EntityWithValueState, project: ProjectState, storage: ChangeSet | IValueStoreClient): ChangeSet | null;
7711
+
7563
7712
  export declare const HTTP_OPERATIONS: {
7564
7713
  [key: string]: IActionDescriptorTransfer;
7565
7714
  };
@@ -7657,6 +7806,8 @@ export declare enum HTTPStatucCodeValidationErrorCodes {
7657
7806
 
7658
7807
  export declare function httpStatusCodeValueValidation(self: ActionDescriptorState, value: LiteralValueType): IValueValidationResult<LiteralValueType, HTTPStatucCodeValidationErrorCodes>;
7659
7808
 
7809
+ export declare function hydrateOrDiscardLiteralValue(value: LiteralValueState, _valueOwner: EntityWithValueState, _project: ProjectState): LiteralValueState | null;
7810
+
7660
7811
  declare function hydrateSearchStatementState(ast: Program | SelectStmt, project: ProjectState, entity?: SearchState | null, debug?: boolean): {
7661
7812
  state: SearchStatementState | null;
7662
7813
  errors: {
@@ -7754,6 +7905,18 @@ export declare interface IActionOutputMapTransfer extends IOutputMapTransfer {
7754
7905
  parent: PassThroughCallableEntity | PassThroughCallableEntityReference;
7755
7906
  }
7756
7907
 
7908
+ export declare interface IActiveBranchHeadResult {
7909
+ id: string;
7910
+ headVersion: string;
7911
+ userAuthor: string;
7912
+ timestamp: string;
7913
+ fromVersionId: string;
7914
+ name: string;
7915
+ identifier: string;
7916
+ createdAt: string;
7917
+ project: string;
7918
+ }
7919
+
7757
7920
  export declare interface IArgumentDeclaration extends IArgumentDeclaration_meta, IBaseVariable, IChildEntity, IValueWritingEntity {
7758
7921
  type: EntityType.ArgumentDeclaration;
7759
7922
  constant: true;
@@ -8068,6 +8231,34 @@ export declare interface IBoolean extends IPrimitiveEntity {
8068
8231
  name: PrimitiveTypes.Boolean;
8069
8232
  }
8070
8233
 
8234
+ export declare interface IBranch {
8235
+ id: string;
8236
+ userAuthor: string;
8237
+ project: string;
8238
+ fromVersionId: string;
8239
+ name: string;
8240
+ identifier: string;
8241
+ createdAt: string;
8242
+ }
8243
+
8244
+ export declare interface IBranchHead {
8245
+ id: string;
8246
+ branch: string;
8247
+ userAuthor: string;
8248
+ versionId: string;
8249
+ timestamp: string;
8250
+ }
8251
+
8252
+ export declare interface IBranchMerge {
8253
+ id: string;
8254
+ branch: string;
8255
+ userAuthor: string;
8256
+ mergedIntoBranch: string | null;
8257
+ mergedAsNewVersion: string | null;
8258
+ mergedIntoVersion: string | null;
8259
+ timestamp: string;
8260
+ }
8261
+
8071
8262
  export declare interface IBreakStatement extends ITerminationStatement, IBreakStatement_meta {
8072
8263
  type: EntityType.BreakStatement;
8073
8264
  parent: ILoop;
@@ -8180,6 +8371,14 @@ export declare interface IChangeSet<TSelf extends {
8180
8371
  self: TSelf;
8181
8372
  }
8182
8373
 
8374
+ export declare interface IChannelConnections {
8375
+ channel: string;
8376
+ connections: {
8377
+ connectionId: string;
8378
+ userId: string;
8379
+ }[];
8380
+ }
8381
+
8183
8382
  export declare interface IChildEntity extends IChildEntityTransfer {
8184
8383
  parent: Element_2;
8185
8384
  }
@@ -8433,6 +8632,13 @@ export declare interface IDefinitionEntityTransfer extends IBaseCanvasDraggable,
8433
8632
  methods: (IFunctionDeclaration | IFunctionDeclarationTransfer)[];
8434
8633
  }
8435
8634
 
8635
+ export declare interface IDynamicValue {
8636
+ value: LiteralValueState | null;
8637
+ valueOwner: EntityWithValueState;
8638
+ type: DynamicValueTypes;
8639
+ inheritanceLink: IValueInheritanceLink | null;
8640
+ }
8641
+
8436
8642
  export declare interface IEditableEntityPersistanceRepository extends IReadOnlyEntityPersistanceRepository {
8437
8643
  APICreate<T extends Array<any> = any[]>(entity: ElementShallowTransfer, ...otherArgs: T): Promise<ElementShallowTransfer>;
8438
8644
  APIUpdate<T extends Array<any> = any[]>(entity: ElementShallowTransfer, ...otherArgs: T): Promise<ElementShallowTransfer>;
@@ -8441,6 +8647,62 @@ export declare interface IEditableEntityPersistanceRepository extends IReadOnlyE
8441
8647
  APILoadVersion<T extends Array<any> = any[]>(entityId: EntityId, versionIdOrBeforeEqualDate: EntityVersion | Date, ...otherArgs: T): Promise<ElementShallowTransfer | null>;
8442
8648
  }
8443
8649
 
8650
+ export declare interface IEditor extends IUndoableInterface, IValueResolutionContext {
8651
+ ready: boolean;
8652
+ hasLoadedLogic: boolean;
8653
+ destroyed: boolean;
8654
+ logicLoadingPromise: Promise<void> | null;
8655
+ logic: ProjectState | null;
8656
+ branch: IActiveBranchHeadResult | null;
8657
+ projectId: EntityId;
8658
+ sessionId: string | null;
8659
+ peerConnections: Record<string, IChannelConnections>;
8660
+ test: ITest | null;
8661
+ localTestValues: IValueStoreClient;
8662
+ resolvedValues: IValueStoreClient;
8663
+ persistedExecutionResults: IValueStoreClient;
8664
+ socket: IWebsocketsClient;
8665
+ events: Events;
8666
+ onProjectHeadLoadedCallback: null | ((projectState: ProjectState) => void);
8667
+ onLogicLoadingCompleteCallback: null | ((chunk: any) => void);
8668
+ onRenderedCallback: null | (() => void);
8669
+ onProjectSetupErrorCallback: null | ((error: any) => void);
8670
+ constructor(projectId: EntityId, socket?: IWebsocketsClient | null, events?: Events): IEditor;
8671
+ get execution(): Execution | null;
8672
+ get project(): ProjectState;
8673
+ get lastExecutionResults(): EfimeralValueStore;
8674
+ get undoableStackValueIndex(): number;
8675
+ set undoableStackValueIndex(value: number);
8676
+ get PROJECT_NOTIFICATIONS_CHANNEL(): string;
8677
+ onProjectHeadLoaded(callback: (projectState: ProjectState) => void): void;
8678
+ onLogicLoadingComplete(callback: (chunk: any) => void): void;
8679
+ onRendered(callback: () => void): void;
8680
+ onProjectSetupError(callback: (error: any) => void): void;
8681
+ removeValueByOwnerId(entityId: EntityId): void;
8682
+ removeValue(dynamicValue: IDynamicValue): void;
8683
+ handleNotificationChannelsMessage(message: IOutgoingWSMessage<string, {
8684
+ data: {
8685
+ channels: IChannelConnections[];
8686
+ sessionId: string;
8687
+ };
8688
+ }>): void;
8689
+ handlePersistChangeSetMessage(message: IOutgoingWSMessage<string, PersistChangeSetEntityActionRequestPayload>): void;
8690
+ getLogic(options?: {
8691
+ mockLogic?: ProjectState;
8692
+ }): Promise<void>;
8693
+ undo(): Promise<void>;
8694
+ redo(): Promise<void>;
8695
+ injectLocalImplementationOfSearchExecution(): void;
8696
+ setup(options: {
8697
+ mockLogic?: ProjectState;
8698
+ }): Promise<void>;
8699
+ destroy(): Promise<void>;
8700
+ initTest(entryPoint: DraggablePlayableEntityState, autoExecute: boolean): Promise<ITest>;
8701
+ removeTest(): Promise<void>;
8702
+ copyEntities(entities: CanvasEntityState[]): Promise<ChangeSet>;
8703
+ resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
8704
+ }
8705
+
8444
8706
  export declare interface IEntityActionRequestPayload<P = EntityActionPayload> {
8445
8707
  action: EntityAction;
8446
8708
  author: string;
@@ -8455,6 +8717,12 @@ export declare interface IEntityActionResponsePayload {
8455
8717
  data: IRecordChangeSet<UserManagedElementShallowTransfer | null, UserManagedElementShallowTransfer>;
8456
8718
  }
8457
8719
 
8720
+ export declare interface IEntityComponentProps {
8721
+ entity: DraggablePlayableEntityState | ReturnStatementState | ContinueStatementState | BreakStatementState;
8722
+ project: IEditor;
8723
+ disabled?: boolean;
8724
+ }
8725
+
8458
8726
  export declare interface IEntityError<TCode = SharedEntityErrorCode | EntityInstanceErrorCode> {
8459
8727
  id: string;
8460
8728
  message: string;
@@ -8494,6 +8762,22 @@ export declare interface IEnum extends IPrimitiveEntity {
8494
8762
  options: string[];
8495
8763
  }
8496
8764
 
8765
+ export declare interface IExecutionCallbackContext {
8766
+ detached: boolean;
8767
+ }
8768
+
8769
+ export declare interface IExecutionClient {
8770
+ onBeforeEntityExecution?: (entity: EntityState, inputs: IDynamicValue[], context: IExecutionCallbackContext) => Promise<any>;
8771
+ onEntityExecuted?: (entity: EntityState, result: IExecutionResult, context: IExecutionCallbackContext) => Promise<any>;
8772
+ }
8773
+
8774
+ export declare interface IExecutionResult {
8775
+ value: ExecutionTerminationType;
8776
+ entity: DraggableExecutableEntityState | DraggableCallerEntityState | ActionDescriptorState | VariableState;
8777
+ error: IDynamicValue | null;
8778
+ results: IDynamicValue[];
8779
+ }
8780
+
8497
8781
  export declare interface IFile extends IPrimitiveEntity {
8498
8782
  name: PrimitiveTypes.File;
8499
8783
  }
@@ -8791,11 +9075,11 @@ export declare interface IJSON extends IPrimitiveEntity {
8791
9075
  name: PrimitiveTypes.KeyValue;
8792
9076
  }
8793
9077
 
8794
- export declare interface ILiteralValue extends ILiteralValueTransfer, IChildEntity {
9078
+ export declare interface ILiteralValue extends ILiteralValueTransfer {
8795
9079
  valueAsTypeSingle: LiteralValueAsType | null;
8796
9080
  valueAsTypeList: LiteralValueAsType[] | null;
8797
- parent: IDataType | IInputMap | IVariableDeclaration | IVariableInstance | IArgumentDeclaration | IReturnDeclaration | IProperty | IValueDescriptor | IOutputMap;
8798
- standaloneParent?: EntityWithValue;
9081
+ parent: null | IDataType | IInputMap | IVariableDeclaration | IVariableInstance | IArgumentDeclaration | IReturnDeclaration | IProperty | IValueDescriptor | IOutputMap;
9082
+ standaloneParent: null | EntityWithValue;
8799
9083
  }
8800
9084
 
8801
9085
  export declare interface ILiteralValue_base {
@@ -8828,11 +9112,11 @@ export declare interface ILiteralValueShallowTransfer extends ILiteralValue_meta
8828
9112
  standaloneParent?: EntityWithValueReference;
8829
9113
  }
8830
9114
 
8831
- export declare interface ILiteralValueTransfer extends ILiteralValue_meta, IChildEntityTransfer {
9115
+ export declare interface ILiteralValueTransfer extends ILiteralValue_meta {
8832
9116
  valueAsTypeSingle: LiteralValueAsTypeTransfer | null;
8833
9117
  valueAsTypeList: LiteralValueAsTypeTransfer[] | null;
8834
- parent: IDataType | IDataTypeReference | IInputMap | IInputMapReference | IVariableDeclaration | IVariableDeclarationReference | IVariableInstance | IVariableInstanceReference | IArgumentDeclaration | IArgumentDeclarationReference | IReturnDeclaration | IReturnDeclarationReference | IProperty | IPropertyReference | IValueDescriptor | IValueDescriptorReference | IOutputMap | IOutputMapReference;
8835
- standaloneParent?: EntityWithValue | EntityWithValueReference;
9118
+ parent: null | IDataType | IDataTypeReference | IInputMap | IInputMapReference | IVariableDeclaration | IVariableDeclarationReference | IVariableInstance | IVariableInstanceReference | IArgumentDeclaration | IArgumentDeclarationReference | IReturnDeclaration | IReturnDeclarationReference | IProperty | IPropertyReference | IValueDescriptor | IValueDescriptorReference | IOutputMap | IOutputMapReference;
9119
+ standaloneParent: null | EntityWithValue | EntityWithValueReference;
8836
9120
  }
8837
9121
 
8838
9122
  export declare interface ILoop extends ILoop_meta, IChildEntity, ICalledEntity, IBaseActionCall {
@@ -9363,6 +9647,12 @@ export declare interface IOperationTransfer extends IBaseActionCallTransfer, IOp
9363
9647
  parent: EntityWithLogicScope | EntityWithLogicScopeReference | IProject | IProjectReference;
9364
9648
  }
9365
9649
 
9650
+ export declare interface IOutgoingWSMessage<Type extends string = string, Payload = any> {
9651
+ payload: Payload;
9652
+ type: Type;
9653
+ to?: string;
9654
+ }
9655
+
9366
9656
  export declare interface IOutputMap extends IOutputMap_meta, IChildEntity, IValueWritingEntity {
9367
9657
  defaultValue: ILiteralValue | null;
9368
9658
  declaration: IReturnDeclaration | IValueDescriptor | IProperty;
@@ -10062,6 +10352,44 @@ export declare interface ITerminationStatementTransfer extends ITerminationState
10062
10352
  throws: IReturnDeclaration | IReturnDeclarationTransfer | null;
10063
10353
  }
10064
10354
 
10355
+ export declare interface ITest extends Execution {
10356
+ editor: IEditor;
10357
+ entitiesRelatedToExecution: TestableEntityState[];
10358
+ validation: IDynamicValue[];
10359
+ persistExecutionValues: boolean;
10360
+ constructor(project: IEditor, entryPoint: DraggablePlayableEntityState): ITest;
10361
+ initExecutionValueStores(): void;
10362
+ pause(): Promise<void>;
10363
+ stop(): Promise<void>;
10364
+ resume(): Promise<void>;
10365
+ restart(): Promise<void>;
10366
+ onValueWritten(owner: EntityWithValueState, value: IDynamicValue): void;
10367
+ onValueRemoved(owner: EntityWithValueState): void;
10368
+ init(autoExecute: boolean): Promise<void>;
10369
+ clear(): Promise<void>;
10370
+ resolveIsContinuationOfSelectedLogic(entity: TestableEntityState): boolean;
10371
+ recalculateEntitiesRelatedToTest(): void;
10372
+ removeIfUnconnected(entity: TestableEntityState): boolean;
10373
+ removeEntity(entity: TestableEntityState): void;
10374
+ addEntity(entity: TestableEntityState): void;
10375
+ getCanBeAddedToTest(entity: TestableEntityState): boolean;
10376
+ removeFromCanBeAddedToTest(entity: TestableEntityState): void;
10377
+ addToCanBeAddedToTest(entity: TestableEntityState): void;
10378
+ getCanBeRemovedFromTest(entity: TestableEntityState): boolean;
10379
+ validateLogic(): IDynamicValue[];
10380
+ validate(): void;
10381
+ onBeforeEntityExecution(entity: TestableEntityState, values: IDynamicValue[], context: IExecutionCallbackContext): Promise<void>;
10382
+ onEntityExecuted(entity: TestableEntityState, result: IExecutionResult, context: IExecutionCallbackContext): Promise<void>;
10383
+ start(): Promise<void>;
10384
+ handleInvalidLogic(): Promise<void>;
10385
+ }
10386
+
10387
+ export declare interface IUndoableInterface {
10388
+ undo: () => void;
10389
+ redo: () => void;
10390
+ undoableStackValueIndex: number;
10391
+ }
10392
+
10065
10393
  export declare interface IUUID extends IPrimitiveEntity {
10066
10394
  name: PrimitiveTypes.UUID;
10067
10395
  }
@@ -10112,6 +10440,11 @@ export declare interface IValueDescriptorTransfer extends IValueDescriptor_meta
10112
10440
  parent: IActionDescriptor | IActionDescriptorReference | ILoop | ILoopReference | ISearch | ISearchReference | null;
10113
10441
  }
10114
10442
 
10443
+ export declare interface IValueInheritanceLink {
10444
+ sources: IDynamicValue[];
10445
+ target: EntityWithValueState;
10446
+ }
10447
+
10115
10448
  export declare interface IValueReadingEntity extends IValueReadingEntityTransfer {
10116
10449
  readsValue: ValueWritingEntity | null;
10117
10450
  }
@@ -10128,6 +10461,38 @@ export declare interface IValueReadingEntityTransfer {
10128
10461
  readsValue: ValueWritingEntity | ValueWritingEntityTransfer | ValueWritingEntityReference | null;
10129
10462
  }
10130
10463
 
10464
+ export declare interface IValueResolutionContext {
10465
+ execution?: Execution | null;
10466
+ project: ProjectState;
10467
+ localTestValues: IValueStoreClient;
10468
+ resolvedValues: IValueStoreClient;
10469
+ persistedExecutionResults: IValueStoreClient;
10470
+ lastExecutionResults: IValueStoreClient;
10471
+ }
10472
+
10473
+ export declare interface IValueStoreClient {
10474
+ initialized: boolean;
10475
+ id: string;
10476
+ project: ProjectState;
10477
+ values: IValueStoreRecord;
10478
+ onWriteCallback: (owner: EntityWithValueState, value: ILiteralValue) => void;
10479
+ onRemoveCallback: (owner: EntityWithValueState) => void;
10480
+ onWrite(callback: (owner: EntityWithValueState, value: ILiteralValue) => void): void;
10481
+ onRemove(callback: (owner: EntityWithValueState) => void): void;
10482
+ init(): void;
10483
+ toJSON(): {
10484
+ [key: string]: ILiteralValueTransfer;
10485
+ };
10486
+ writeValue(owner: EntityWithValueState, value: LiteralValueState): void;
10487
+ readValue(ownerId: string): LiteralValueState | null;
10488
+ removeValue(ownerId: string): void;
10489
+ clear(): void;
10490
+ }
10491
+
10492
+ export declare interface IValueStoreRecord {
10493
+ [key: EntityId]: LiteralValueState;
10494
+ }
10495
+
10131
10496
  export declare interface IValueValidationResult<T = LiteralValueType, TCode = SharedEntityErrorCode | EntityInstanceErrorCode> {
10132
10497
  errors: EntityError<TCode>[];
10133
10498
  override: T;
@@ -10315,6 +10680,47 @@ export declare interface IVersionMetadata {
10315
10680
  deleted: boolean;
10316
10681
  }
10317
10682
 
10683
+ /**
10684
+ * The minimal subset of the Node‑ws and the browser WebSocket API
10685
+ * that you actually use in your editor.
10686
+ */
10687
+ export declare interface IWebSocketCommon {
10688
+ /** readyState codes (both ws and browser expose these as static *and* instance props) */
10689
+ readonly CONNECTING: number;
10690
+ readonly OPEN: number;
10691
+ readonly CLOSING: number;
10692
+ readonly CLOSED: number;
10693
+ /** The current state of the connection */
10694
+ readonly readyState: number;
10695
+ /** The URL used to establish the connection */
10696
+ readonly url: string;
10697
+ /** Subprotocol negotiated with the server, if any */
10698
+ readonly protocol: string;
10699
+ /** Bytes queued but not yet sent */
10700
+ readonly bufferedAmount: number;
10701
+ /** Send a message (string, binary, etc.) */
10702
+ send(data: any): void;
10703
+ /** Close the connection (code + reason both optional in both APIs) */
10704
+ close(code?: number, reason?: string): void;
10705
+ /**
10706
+ * We only tap the four basic events in both environments.
10707
+ * Node‑ws also implements addEventListener/removeEventListener,
10708
+ * and the browser socket does too, so this matches both.
10709
+ */
10710
+ addEventListener(event: 'open' | 'message' | 'error' | 'close', listener: (ev: any) => void): void;
10711
+ removeEventListener(event: 'open' | 'message' | 'error' | 'close', listener: (ev: any) => void): void;
10712
+ /** Optional onX handlers on the instance */
10713
+ onopen?: (ev: any) => void;
10714
+ onmessage?: (ev: any) => void;
10715
+ onerror?: (ev: any) => void;
10716
+ onclose?: (ev: any) => void;
10717
+ }
10718
+
10719
+ export declare interface IWebsocketsClient extends Events {
10720
+ connection: IWebSocketCommon;
10721
+ send(message: any): void;
10722
+ }
10723
+
10318
10724
  export declare const joinListOperation: IActionDescriptorTransfer;
10319
10725
 
10320
10726
  export declare const joinListOperationError: IValueDescriptorTransfer;
@@ -11468,6 +11874,8 @@ export declare enum PersistedEntityMethods {
11468
11874
  AbortExecution = "base-abort-execution"
11469
11875
  }
11470
11876
 
11877
+ export declare const PLACEHOLDER_VALUE_STORE_CLIENT: IValueStoreClient;
11878
+
11471
11879
  export declare type PlayableEntity = PassThroughCallableEntity | EntryPointEntity;
11472
11880
 
11473
11881
  export declare type PlayableEntity_meta = PassThroughCallableEntity_meta | EntryPointEntity_meta;
@@ -11820,6 +12228,14 @@ export declare enum ProjectStateEvents {
11820
12228
 
11821
12229
  export declare type ProjectTypesUnion = IProject | IProjectTransfer | IProjectShallowTransfer | IProjectGenerationTarget;
11822
12230
 
12231
+ export declare function propagateNewInputOrOutputMapValueAsTypeToParentVariable(entity: InputMapState | OutputMapState, project: ProjectState, newValue: ValueAsTypeState | ValueAsTypeState[] | null, storage: ChangeSet | IValueStoreClient): ChangeSet | null;
12232
+
12233
+ export declare function propagateNewInputOrOutputMapValueToParentVariable(entity: InputMapState | OutputMapState, project: ProjectState, newValue: LiteralValueType, storage: ChangeSet | IValueStoreClient): ChangeSet | null;
12234
+
12235
+ export declare function propagateNewStaticPropertyValueAsTypeToVariables(entity: PropertyState, project: ProjectState, newValue: ValueAsTypeState | ValueAsTypeState[] | null, storage: ChangeSet | IValueStoreClient): ChangeSet | null;
12236
+
12237
+ export declare function propagateNewStaticPropertyValueToVariables(entity: PropertyState, project: ProjectState, newValue: LiteralValueType, storage: ChangeSet | IValueStoreClient): ChangeSet | null;
12238
+
11823
12239
  export declare const PROPERTY_NOT_VALUE_READER_WRITTER_EXPLANATION = "A property entity, is neither a value reading, or a value writting entity, but they are often confused with one.\nA 'property' can have a default value through its nested 'data-type' entity.\nThe 'property' entity only represents the data field in the declaration, and it can't write or read values.\nWhen a 'definition-entity' is instantiated as a variable, any writes or reads to its properties are done through 'input-map's and 'output-map's.";
11824
12240
 
11825
12241
  export declare enum PropertyDependencyField {
@@ -11972,6 +12388,8 @@ export { propertyValidation }
11972
12388
 
11973
12389
  export declare const READ_ONLY_ENTITY_PERSISTANCE_REPOSITORY: IReadOnlyEntityPersistanceRepository;
11974
12390
 
12391
+ export declare function readValueFromWritter(entity: ValueReadingEntityState, context: IValueResolutionContext): IDynamicValue | null;
12392
+
11975
12393
  export declare type Reference = IGenericReference | IFunctionDeclarationReference | IInstalledProjectReference | IDataTypeReference | IVariableDeclarationReference | IVariableInstanceReference | IOperationReference | IDefinitionEntityReference | IPrimitiveEntityReference | IProjectReference | IGlobalEventReference | IFunctionDeclarationReference | IFunctionDeclarationReference | IPropertyReference | IFunctionCallReference | IArgumentDeclarationReference | IInputMapReference | IOutputMapReference | IReturnDeclarationReference | IConditionReference | IReturnStatementReference | IBreakStatementReference | IContinueStatementReference | ILoopReference | IActionDescriptorReference | ISearchReference | ILiteralValueReference | IBuiltInBaseEntityReference | IValueDescriptorReference | IInternalCallReference;
11976
12394
 
11977
12395
  export declare const relationalDatabaseBuiltInBaseEntity: IBuiltInBaseEntityTransfer;
@@ -12034,6 +12452,8 @@ export declare function resolveActionDescriptorName(actionDescriptor: ActionDesc
12034
12452
 
12035
12453
  declare function resolveAreThereConflictingColumnsInSelectAll(allColumnsSelector: AllColumnsSelector | null): boolean;
12036
12454
 
12455
+ export declare function resolveArgumentDeclarationValue(entity: ArgumentDeclarationState, context: IValueResolutionContext): IDynamicValue | null;
12456
+
12037
12457
  export declare function resolveBaseEntityName(baseEntities: BaseEntityNames[]): string;
12038
12458
 
12039
12459
  export declare function resolveBuiltInBaseEntityDataTypeLabel(entity: BuiltInBaseEntityState): string;
@@ -12064,6 +12484,22 @@ export declare function resolveFirstCallsSecond(first: DraggableExecutableEntity
12064
12484
 
12065
12485
  export declare function resolveFirstWritesSecond(first: ValueWritingEntityState, second: ValueReadingEntityState): boolean;
12066
12486
 
12487
+ export declare function resolveInputMapNextStandaloneValue(entity: InputMapState, context: IValueResolutionContext): IDynamicValue | null;
12488
+
12489
+ export declare function resolveInputMapNextValue(entity: InputMapState, context: IValueResolutionContext): IDynamicValue | null;
12490
+
12491
+ export declare function resolveInputMapNextValueAsPropertyOfAnObject(entity: InputMapState, context: IValueResolutionContext): IDynamicValue | null;
12492
+
12493
+ export declare function resolveInputMapStandaloneValue(entity: InputMapState, context: IValueResolutionContext): IDynamicValue | null;
12494
+
12495
+ export declare function resolveInputMapValue(entity: InputMapState, context: IValueResolutionContext): IDynamicValue | null;
12496
+
12497
+ export declare function resolveInputMapValueAsPropertyOfAnObject(entity: InputMapState, context: IValueResolutionContext): IDynamicValue | null;
12498
+
12499
+ export declare function resolveNextValue(entity: ValueReadingEntityState, context: IValueResolutionContext): IDynamicValue | null;
12500
+
12501
+ export declare function resolveOutputMapValue(entity: OutputMapState, context: IValueResolutionContext): IDynamicValue | null;
12502
+
12067
12503
  export declare function resolvePersistedDefinitionEntityDatabaseEntity(entity: DefinitionEntityState): DefinitionEntityState | null;
12068
12504
 
12069
12505
  export declare function resolvePrimaryKeyProperty(entity: DefinitionEntityState): PropertyState | null;
@@ -12075,10 +12511,30 @@ export declare function resolvePrimitiveEntityName(primitiveEntity: {
12075
12511
  [key: string]: any;
12076
12512
  }): string;
12077
12513
 
12514
+ export declare function resolvePropertyValue(entity: PropertyState, context: IValueResolutionContext): IDynamicValue | null;
12515
+
12516
+ export declare function resolveReturnDeclarationValue(entity: ReturnDeclarationState, context: IValueResolutionContext): IDynamicValue | null;
12517
+
12078
12518
  export declare function resolveSearchName(search: SearchState): string;
12079
12519
 
12520
+ export declare function resolveValue(entity: EntityWithValueState | PropertyState | ValueDescriptorState, context: IValueResolutionContext): IDynamicValue | null;
12521
+
12522
+ export declare function resolveValueDescriptorValue(entity: ValueDescriptorState, context: IValueResolutionContext): IDynamicValue | null;
12523
+
12524
+ export declare function resolveVarDeclarationAggregateObjectValue(entity: VariableDeclarationState, context: IValueResolutionContext): IDynamicValue | null;
12525
+
12526
+ export declare function resolveVarDeclarationNextAggregateObjectValue(entity: VariableDeclarationState, context: IValueResolutionContext): IDynamicValue | null;
12527
+
12528
+ export declare function resolveVarDeclarationNextValue(entity: VariableDeclarationState, context: IValueResolutionContext): IDynamicValue | null;
12529
+
12530
+ export declare function resolveVarDeclarationValue(entity: VariableDeclarationState, context: IValueResolutionContext): IDynamicValue | null;
12531
+
12080
12532
  export declare function resolveVariableScope(variable: VariableState): 'global-declaration' | 'global-instance' | 'local-declaration' | 'local-instance';
12081
12533
 
12534
+ export declare function resolveVarInstanceNextValue(entity: VariableInstanceState, context: IValueResolutionContext): IDynamicValue | null;
12535
+
12536
+ export declare function resolveVarInstanceValue(entity: VariableInstanceState, context: IValueResolutionContext): IDynamicValue | null;
12537
+
12082
12538
  export declare const RETURN_STATEMENT_RETURN_DECLARATIONS_EXPLANATION = "Return statements need to be identical inside the same scope. For example if a 'return-statement' belongs to a function, with multiple branches of logic, leading to multiple 'return-statement' entities, all of them need to have the exact same amount of 'return-declaration' entities, sharing the same name and an equivalent 'data-type' entity.\nFurthermore, some 'function-declarations' and all 'global-events' might be implementing a base 'action-descriptor' entity, which defines exactly the shape and number of the return declarations.";
12083
12539
 
12084
12540
  export declare enum ReturnDeclarationDependencyField {
@@ -13039,6 +13495,8 @@ export declare type TerminationState = ReturnStatementState | BreakStatementStat
13039
13495
 
13040
13496
  export declare const test_primitive_entities_export = "test_primitive_entities_export";
13041
13497
 
13498
+ export declare type TestableEntityState = DraggableExecutableEntityState | DraggableCallerEntityState | VariableState | CallableEntityState;
13499
+
13042
13500
  export declare function toCamelCase(str: string): string;
13043
13501
 
13044
13502
  export declare function toEntityState(entity: string | EntityState | IGenericReference | Element_2 | ElementTransfer | ElementShallowTransfer | ElementGenerationTarget, project: ProjectState): EntityState | null;
@@ -13276,6 +13734,8 @@ export declare const validateDataOperationOutputEntityDeclarationParentRef: IAct
13276
13734
 
13277
13735
  export declare function validateDefinitionEntityName(entity: DefinitionEntityState | IDefinitionEntityGenerationTarget | IDefinitionEntityShallowTransfer | IDefinitionEntityTransfer, project: ProjectState): EntityGenerationError[];
13278
13736
 
13737
+ export declare function validateEntityValues(entity: CanvasEntityState | CallableEntityState, context: IValueResolutionContext): IDynamicValue[];
13738
+
13279
13739
  export declare function validateEntryCaller(data: ElementGenerationTarget, callerEntity: CallerEntityState): EntityGenerationError[];
13280
13740
 
13281
13741
  export declare function validateErrorCaller(data: ElementGenerationTarget, callerEntity: CallerEntityState): EntityGenerationError[];
@@ -13303,6 +13763,8 @@ declare function validateImplementation(self: PropertyState): EntityError[];
13303
13763
 
13304
13764
  declare function validateListLoop(self: LoopState): EntityError[];
13305
13765
 
13766
+ export declare function validateLogic(logic: (CanvasEntityState | CallableEntityState)[], context: IValueResolutionContext): IDynamicValue[];
13767
+
13306
13768
  export declare function validateLoopEntityDeclaration(loopDeclarationId: EntityId, project: ProjectState): EntityGenerationError[];
13307
13769
 
13308
13770
  export declare function validateName(entity: ElementGenerationTarget | ElementShallowTransfer | ElementTransfer, project: ProjectState): EntityGenerationError[];