@elyx-code/project-logic-tree 0.0.6389 → 0.0.6390

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
@@ -14,6 +14,7 @@ import { ILiveMessageDTO } from '@elyx-code/definitions';
14
14
  import { InfrastructureResourceDetails } from '@elyx-code/definitions';
15
15
  import { InfrastructureResourceType } from '@elyx-code/definitions';
16
16
  import { IPublication } from '@elyx-code/definitions';
17
+ import { IWebsocketsClient } from '@elyx-code/common-ts-utils';
17
18
  import { JoinExpr } from 'sql-parser-cst';
18
19
  import { Keyword } from 'sql-parser-cst';
19
20
  import { LimitClause } from 'sql-parser-cst';
@@ -542,6 +543,11 @@ export declare enum BaseEntityNames {
542
543
  KEY_VALUE_PARAM = "BUILT_IN_KEY_VALUE_PARAM_ENTITY"
543
544
  }
544
545
 
546
+ export declare class BaseRegisteredExtension {
547
+ readonly registry: ExtensionsRegistry;
548
+ constructor(registry: ExtensionsRegistry);
549
+ }
550
+
545
551
  export declare abstract class BaseState extends SharedStateFunctionality implements IGenericBase {
546
552
  abstract id: EntityId;
547
553
  abstract version: EntityVersion;
@@ -1464,7 +1470,45 @@ export declare enum BuiltInFunctionIds {
1464
1470
  AbortExecution = "base-abort-execution"
1465
1471
  }
1466
1472
 
1467
- export declare type BuiltInFunctionsImplementationModule = Record<BuiltInFunctionIds, (entity: InternalCallState, inputs: IDynamicValue[]) => Promise<IExecutionResult>>;
1473
+ export declare class BuiltInFunctionImplementationAbortExecutionModule extends BaseRegisteredExtension implements IRegisteredExtension<BuiltInFunctionImplementationModule> {
1474
+ manifest: ExtensionManifest;
1475
+ module: {
1476
+ main: (entity: InternalCallState, _inputs: IDynamicValue[]) => Promise<{
1477
+ value: ExecutionTerminationType;
1478
+ entity: InternalCallState;
1479
+ error: null;
1480
+ results: never[];
1481
+ }>;
1482
+ };
1483
+ }
1484
+
1485
+ export declare class BuiltInFunctionImplementationDeletePersistedEntityModule extends BaseRegisteredExtension implements IRegisteredExtension<BuiltInFunctionImplementationModule> {
1486
+ manifest: ExtensionManifest;
1487
+ module: {
1488
+ main: (entity: InternalCallState, _inputs: IDynamicValue[]) => Promise<{
1489
+ value: ExecutionTerminationType;
1490
+ entity: InternalCallState;
1491
+ error: null;
1492
+ results: never[];
1493
+ }>;
1494
+ };
1495
+ }
1496
+
1497
+ export declare interface BuiltInFunctionImplementationModule {
1498
+ main: (entity: InternalCallState, _inputs: IDynamicValue[]) => Promise<IExecutionResult>;
1499
+ }
1500
+
1501
+ export declare class BuiltInFunctionImplementationSavePersistedEntityModule extends BaseRegisteredExtension implements IRegisteredExtension<BuiltInFunctionImplementationModule> {
1502
+ manifest: ExtensionManifest;
1503
+ module: {
1504
+ main: (entity: InternalCallState, _inputs: IDynamicValue[]) => Promise<{
1505
+ value: ExecutionTerminationType;
1506
+ entity: InternalCallState;
1507
+ error: null;
1508
+ results: never[];
1509
+ }>;
1510
+ };
1511
+ }
1468
1512
 
1469
1513
  export declare type BuiltInSystemEntityState = PrimitiveEntityState | BuiltInBaseEntityState;
1470
1514
 
@@ -2490,17 +2534,76 @@ export declare const DEFAULT_BASE_EXTENSIONS_CONTEXT: IBaseExtensionsContext;
2490
2534
 
2491
2535
  export declare const DEFAULT_EXECUTION_INSTANCE_PARENT_CONTEXT: IExecutionInstanceParentContext;
2492
2536
 
2537
+ export declare const DEFAULT_MODULE_IDS: {
2538
+ UUID: string;
2539
+ SEARCH_NODE_IMPLEMENTATION: string;
2540
+ BUILT_IN_FUNCTION_IMPLEMENTATIONS__ABORT_EXECUTION: string;
2541
+ BUILT_IN_FUNCTION_IMPLEMENTATIONS__SAVE_PERSISTED_ENTITY: string;
2542
+ BUILT_IN_FUNCTION_IMPLEMENTATIONS__DELETE_PERSISTED_ENTITY: string;
2543
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__HTTP_REQUEST: string;
2544
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__VALIDATE_ENTITY: string;
2545
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__CREATE_NEW_INSTANCE: string;
2546
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_SEQUENTIAL: string;
2547
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_PARALLEL: string;
2548
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__EXECUTE_WAIT: string;
2549
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_JOIN: string;
2550
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_SPLIT: string;
2551
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_LAST: string;
2552
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_FIRST: string;
2553
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_DELETE_INDEX: string;
2554
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_ADD_INDEX: string;
2555
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_FIRST: string;
2556
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_LAST: string;
2557
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REPLACE_INDEX: string;
2558
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_INDEX_ITEM: string;
2559
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_FIRST: string;
2560
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_GET_LAST: string;
2561
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_APPEND: string;
2562
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_PREPEND: string;
2563
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__LIST_REVERSE: string;
2564
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_LOWER_CASE: string;
2565
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_TO_UPPER_CASE: string;
2566
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_JOIN: string;
2567
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_SPLIT: string;
2568
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_LAST: string;
2569
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_FIRST: string;
2570
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_DELETE_INDEX: string;
2571
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_ADD_INDEX: string;
2572
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_FIRST: string;
2573
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_LAST: string;
2574
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_INDEX: string;
2575
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_SINGLE_MATCH: string;
2576
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REPLACE_ALL_MATCHES: string;
2577
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_ITEM: string;
2578
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_FIRST: string;
2579
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_LAST: string;
2580
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_GET_INDEX_OF: string;
2581
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_APPEND: string;
2582
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_PREPEND: string;
2583
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__STRING_REVERSE: string;
2584
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_ADDITION: string;
2585
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_SUBTRACTION: string;
2586
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_MULTIPLICATION: string;
2587
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_DIVISION: string;
2588
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_REMAINDER: string;
2589
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__NUMBER_EXPONENTIATION: string;
2590
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_INTEGER: string;
2591
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_FLOAT: string;
2592
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_HEXADECIMAL: string;
2593
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_BASE62: string;
2594
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_BASE64: string;
2595
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_ALPHANUMERIC: string;
2596
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_IDENTIFIER: string;
2597
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_RANDOM_UUIDV4: string;
2598
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_SHORT_IDENTIFIER: string;
2599
+ BUILT_INT_OPERATIONS_IMPLEMENTATIONS__RANDOMNESS_GENERATE_HEXADECIMAL_TOKEN: string;
2600
+ };
2601
+
2493
2602
  export declare const DEFAULT_PROJECT_INSTANCE_PARENT_CONTEXT: IProjectInstanceParentContext;
2494
2603
 
2495
2604
  export declare const DEFAULT_PROJECT_STATIC_PARENT_CONTEXT: IProjectStaticParentContext;
2496
2605
 
2497
- export declare const DEFAULT_UUID_MODULE: UUIDModule;
2498
-
2499
- export declare enum DefaultModuleId {
2500
- UUID = "uuid",
2501
- BuiltInFunctionImplementations = "built-in-function-implementations",
2502
- SearchNodeImplementation = "search-node-implementation"
2503
- }
2606
+ export declare const DEFAULT_UUID_MODULE: IUUIDModule;
2504
2607
 
2505
2608
  export declare enum DefinitionEntityDependencyField {
2506
2609
  Extends = "extends",
@@ -2830,8 +2933,43 @@ export declare enum DynamicValueTypes {
2830
2933
 
2831
2934
  export declare const EDITABLE_PERSISTANCE_REPOSITORY_DEFAULTS: IEditableEntityPersistanceRepository;
2832
2935
 
2833
- export declare interface EditorContext extends ExtensionContextBase {
2834
- logic: ProjectLogicContext;
2936
+ export declare class EditorContext extends ExtensionContextBase implements Omit<IEditor, 'onLogicLoadingComplete' | 'onLogicLoadingCompleteCallback' | 'onProjectHeadLoaded' | 'onProjectHeadLoadedCallback' | 'onProjectSetupError' | 'onProjectSetupErrorCallback' | 'extensions' | 'onRenderedCallback' | 'handleIncommingWebsocketMessage' | 'handleNotificationChannelsMessage' | 'handlePersistChangeSetMessage' | 'getLogic' | 'injectLocalImplementationOfSearchExecution' | 'setup' | 'destroy' | 'requestModule' | 'socket' | 'events'> {
2937
+ private readonly _editor;
2938
+ readonly id: string;
2939
+ constructor(registry: ExtensionsRegistry, _editor: IEditor, id?: string);
2940
+ get ready(): boolean;
2941
+ get hasLoadedLogic(): boolean;
2942
+ get destroyed(): boolean;
2943
+ get logicLoadingPromise(): Promise<void> | null;
2944
+ get logic(): ProjectState | null;
2945
+ get branch(): IActiveBranchHeadResult | null;
2946
+ get projectId(): EntityId;
2947
+ get sessionId(): string | null;
2948
+ get userAuthorId(): string;
2949
+ get peerConnections(): Record<string, IChannelConnections>;
2950
+ get test(): ITest | null;
2951
+ get localTestValues(): EfimeralValueStore;
2952
+ get resolvedValues(): EfimeralValueStore;
2953
+ get persistedExecutionResults(): EfimeralValueStore;
2954
+ get publication(): PublicationRun | null;
2955
+ get execution(): Execution | null;
2956
+ get project(): ProjectState;
2957
+ get lastExecutionResults(): EfimeralValueStore;
2958
+ get undoableStackValueIndex(): number;
2959
+ set undoableStackValueIndex(value: number);
2960
+ get PROJECT_NOTIFICATIONS_CHANNEL(): string;
2961
+ getAccessToken(): Promise<string | null>;
2962
+ removeValueByOwnerId(entityId: EntityId): void;
2963
+ removeValue(dynamicValue: IDynamicValue): void;
2964
+ undo(): Promise<void>;
2965
+ redo(): Promise<void>;
2966
+ initTest(entryPoint: TestableEntityState, autoExecute: boolean): Promise<ITest>;
2967
+ removeTest(): Promise<void>;
2968
+ copyEntities(entities: CanvasEntityState[]): Promise<ChangeSet>;
2969
+ resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
2970
+ publish(): Promise<void>;
2971
+ loadActivePublication(publicationId: string): Promise<IPublication>;
2972
+ requestActiveDynamicValue(valueOwner: EntityWithValueState): IDynamicValue | null;
2835
2973
  }
2836
2974
 
2837
2975
  export declare class EfimeralValueStore implements IValueStoreClient {
@@ -3447,7 +3585,7 @@ export declare class ExplicitInfrastructureResource extends InfrastructureResour
3447
3585
  resolveDeterministicResourceId(): string;
3448
3586
  }
3449
3587
 
3450
- export declare type ExtensionContext = EditorContext;
3588
+ export declare type ExtensionContext = EditorContext | ProjectLogicContext;
3451
3589
 
3452
3590
  export declare class ExtensionContextBase implements IExtensionContextBase {
3453
3591
  readonly registry: ExtensionsRegistry;
@@ -3475,41 +3613,34 @@ export declare interface ExtensionManifest {
3475
3613
  dependencies?: string[];
3476
3614
  }
3477
3615
 
3478
- export declare type ExtensionModule<T extends object = {}> = T & ExtensionModuleCore;
3479
-
3480
- export declare interface ExtensionModuleCore {
3481
- /** Called once on editor startup */
3482
- init?(contexts: ExtensionContext[]): Promise<void> | void;
3483
- /** Cleanup hook */
3484
- destroy?(): Promise<void> | void;
3485
- }
3616
+ export declare type ExtensionModule<T extends object = {}> = T & IExtensionModuleCore;
3486
3617
 
3487
3618
  export declare enum ExtensionPermissions {
3488
- Star = "*",// Allow all permissions, not recommended for security reasons
3489
- OnStar = "on:*",// Allow listening to any event
3490
- EmitStar = "emit:*",// Allow emitting any event
3491
- ReadStar = "read:*",// Allow reading any state
3492
- WriteStar = "write:*",// Allow writing any state
3493
- UpdateStar = "update:*",// Allow updating any state
3494
- DoStar = "do:*",// Allow performing any action
3495
- OnLogicStar = "on:logic:*",// Allow listening to any event in the logic context
3496
- EmitLogicStar = "emit:logic:*",// Allow emitting any event in the logic context
3497
- ReadLogicStar = "read:logic:*",// Allow reading any state in the logic context
3498
- WriteLogicStar = "write:logic:*",// Allow writing any state in the logic context
3499
- UpdateLogicStar = "update:logic:*",// Allow updating any state in the logic context
3500
- DoLogicStar = "do:logic:*",// Allow performing any action in the logic context
3501
- OnGUIStar = "on:gui:*",// Allow listening to any event in the GUI context
3502
- EmitGUIStar = "emit:gui:*",// Allow emitting any event in the GUI context
3503
- ReadGUIStar = "read:gui:*",// Allow reading any state in the GUI context
3504
- WriteGUIStar = "write:gui:*",// Allow writing any state in the GUI context
3505
- UpdateGUIStar = "update:gui:*",// Allow updating any state in the GUI context
3506
- DoGUIStar = "do:gui:*",// Allow performing any action in the GUI context
3507
- OnEditorStar = "on:editor:*",// Allow listening to any event in the editor context
3508
- EmitEditorStar = "emit:editor:*",// Allow emitting any event in the editor context
3509
- ReadEditorStar = "read:editor:*",// Allow reading any state in the editor context
3510
- WriteEditorStar = "write:editor:*",// Allow writing any state in the editor context
3511
- UpdateEditorStar = "update:editor:*",// Allow updating any state in the editor context
3512
- DoEditorStar = "do:editor:*",// Allow performing any action in the editor context
3619
+ All = "*",// Allow all permissions, not recommended for security reasons
3620
+ OnAll = "on:*",// Allow listening to any event
3621
+ EmitAll = "emit:*",// Allow emitting any event
3622
+ ReadAll = "read:*",// Allow reading any state
3623
+ WriteAll = "write:*",// Allow writing any state
3624
+ UpdateAll = "update:*",// Allow updating any state
3625
+ DoAll = "do:*",// Allow performing any action
3626
+ OnLogicAll = "on:logic:*",// Allow listening to any event in the logic context
3627
+ EmitLogicAll = "emit:logic:*",// Allow emitting any event in the logic context
3628
+ ReadLogicAll = "read:logic:*",// Allow reading any state in the logic context
3629
+ WriteLogicAll = "write:logic:*",// Allow writing any state in the logic context
3630
+ UpdateLogicAll = "update:logic:*",// Allow updating any state in the logic context
3631
+ DoLogicAll = "do:logic:*",// Allow performing any action in the logic context
3632
+ OnGUIAll = "on:gui:*",// Allow listening to any event in the GUI context
3633
+ EmitGUIAll = "emit:gui:*",// Allow emitting any event in the GUI context
3634
+ ReadGUIAll = "read:gui:*",// Allow reading any state in the GUI context
3635
+ WriteGUIAll = "write:gui:*",// Allow writing any state in the GUI context
3636
+ UpdateGUIAll = "update:gui:*",// Allow updating any state in the GUI context
3637
+ DoGUIAll = "do:gui:*",// Allow performing any action in the GUI context
3638
+ OnEditorAll = "on:editor:*",// Allow listening to any event in the editor context
3639
+ EmitEditorAll = "emit:editor:*",// Allow emitting any event in the editor context
3640
+ ReadEditorAll = "read:editor:*",// Allow reading any state in the editor context
3641
+ WriteEditorAll = "write:editor:*",// Allow writing any state in the editor context
3642
+ UpdateEditorAll = "update:editor:*",// Allow updating any state in the editor context
3643
+ DoEditorAll = "do:editor:*",// Allow performing any action in the editor context
3513
3644
  OnCompileBefore = "on:compile:before:DefinitionEntity",
3514
3645
  OnCompileDefault = "on:compile:default:DefinitionEntity",
3515
3646
  OnCompileAfter = "on:compile:after:DefinitionEntity",
@@ -3523,11 +3654,21 @@ export declare enum ExtensionPermissions {
3523
3654
  export declare class ExtensionsRegistry implements Omit<IEventsBus, 'destroy'> {
3524
3655
  private events;
3525
3656
  private extensions;
3657
+ onResolveEditorContextCallback: () => EditorContext | null;
3658
+ onResolveProjectLogicContextCallback: () => ProjectLogicContext | null;
3659
+ onResolveGUIContextCallback: () => null;
3660
+ onResolveCompileContextCallback: () => null;
3526
3661
  constructor(events?: Events);
3527
- get extensionInOrder(): RegisteredExtension[];
3662
+ onResolveEditorContext(callback: () => EditorContext | null): void;
3663
+ onResolveProjectLogicContext(callback: () => ProjectLogicContext | null): void;
3664
+ onResolveGUIContext(callback: () => null): void;
3665
+ onResolveCompileContext(callback: () => null): void;
3666
+ get extensionInOrder(): IRegisteredExtension[];
3667
+ setup(): Promise<void>;
3528
3668
  private requestContext;
3669
+ requestContexts(_module: IRegisteredExtension<any>, _contextTypes?: ExtensionContextType[]): ExtensionContext[];
3529
3670
  requestModule<T>(moduleId: string): T;
3530
- register(manifest: ExtensionManifest, module: ExtensionModule): void;
3671
+ register(extension: IRegisteredExtension<any>): void;
3531
3672
  initAll(): Promise<void>;
3532
3673
  destroyAll(): Promise<void>;
3533
3674
  on<Arguments extends any[]>(eventName: string, callback: EventCallback<Arguments>): void;
@@ -9367,6 +9508,7 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
9367
9508
  branch: IActiveBranchHeadResult | null;
9368
9509
  projectId: EntityId;
9369
9510
  sessionId: string | null;
9511
+ userAuthorId: string;
9370
9512
  peerConnections: Record<string, IChannelConnections>;
9371
9513
  test: ITest | null;
9372
9514
  localTestValues: IValueStoreClient;
@@ -9378,7 +9520,6 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
9378
9520
  extensions: ExtensionsRegistry;
9379
9521
  onProjectHeadLoadedCallback: null | ((projectState: ProjectState) => void);
9380
9522
  onLogicLoadingCompleteCallback: null | ((chunk: any) => void);
9381
- onRenderedCallback: null | (() => void);
9382
9523
  onProjectSetupErrorCallback: null | ((error: any) => void);
9383
9524
  get execution(): Execution | null;
9384
9525
  get project(): ProjectState;
@@ -9408,7 +9549,7 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
9408
9549
  mockLogic?: ProjectState;
9409
9550
  }): Promise<void>;
9410
9551
  destroy(): Promise<void>;
9411
- initTest(entryPoint: DraggablePlayableEntityState, autoExecute: boolean): Promise<ITest>;
9552
+ initTest(entryPoint: TestableEntityState, autoExecute: boolean): Promise<ITest>;
9412
9553
  removeTest(): Promise<void>;
9413
9554
  copyEntities(entities: CanvasEntityState[]): Promise<ChangeSet>;
9414
9555
  resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
@@ -9496,6 +9637,13 @@ declare interface IExtensionContextBase extends Omit<IEventsBus, 'destroy'> {
9496
9637
  registry: ExtensionsRegistry;
9497
9638
  }
9498
9639
 
9640
+ export declare interface IExtensionModuleCore {
9641
+ /** Called once on editor startup */
9642
+ init?(contexts: ExtensionContext[]): Promise<void> | void;
9643
+ /** Cleanup hook */
9644
+ destroy?(): Promise<void> | void;
9645
+ }
9646
+
9499
9647
  export declare interface IFile extends IPrimitiveEntity {
9500
9648
  name: PrimitiveTypes.File;
9501
9649
  }
@@ -9882,11 +10030,6 @@ export declare interface ILoopTransfer extends ILoop_meta, IChildEntityTransfer,
9882
10030
  parent: EntityWithLogicScope | EntityWithLogicScopeReference | IProject | IProjectReference;
9883
10031
  }
9884
10032
 
9885
- export declare interface IModuleInjection {
9886
- id: string;
9887
- init(project: ProjectState): Promise<void> | void;
9888
- }
9889
-
9890
10033
  export declare function implement(self: DefinitionEntityState | BuiltInBaseEntityState, newEntityName: string, changeSet: ChangeSet | null, newId?: string): DefinitionEntityState;
9891
10034
 
9892
10035
  export declare class ImplicitGlobalInfrastructureResource extends InfrastructureResource {
@@ -10410,12 +10553,6 @@ export declare interface IOperationTransfer extends IBaseActionCallTransfer, IOp
10410
10553
  parent: EntityWithLogicScope | EntityWithLogicScopeReference | IProject | IProjectReference;
10411
10554
  }
10412
10555
 
10413
- export declare interface IOutgoingWSMessage<Type extends string = string, Payload = any> {
10414
- payload: Payload;
10415
- type: Type;
10416
- to?: string;
10417
- }
10418
-
10419
10556
  export declare interface IOutputMap extends IOutputMap_meta, IChildEntity, IValueWritingEntity {
10420
10557
  defaultValue: ILiteralValue | null;
10421
10558
  declaration: IReturnDeclaration | IValueDescriptor | IProperty;
@@ -10759,6 +10896,12 @@ export declare interface IRecordChangeSet<TSelf extends {
10759
10896
  seenEntities: EntityId[];
10760
10897
  }
10761
10898
 
10899
+ export declare interface IRegisteredExtension<T extends object = {}> {
10900
+ registry: ExtensionsRegistry;
10901
+ manifest: ExtensionManifest;
10902
+ module: ExtensionModule<T>;
10903
+ }
10904
+
10762
10905
  export declare interface IReturnDeclaration extends IReturnDeclaration_meta, IBaseVariable, IChildEntity, IValueReadingEntity {
10763
10906
  type: EntityType.ReturnDeclaration;
10764
10907
  constant: true;
@@ -10871,6 +11014,17 @@ declare interface ISearchNode {
10871
11014
  type: SearchStatementNodeType;
10872
11015
  }
10873
11016
 
11017
+ export declare interface ISearchNodeImplementationModule {
11018
+ main(_entity: SearchState, _inputs: IDynamicValue[]): Promise<{
11019
+ data: {
11020
+ [columnName: string]: any;
11021
+ } | null | {
11022
+ [columnName: string]: any;
11023
+ }[];
11024
+ error: string | null;
11025
+ }>;
11026
+ }
11027
+
10874
11028
  export declare interface ISearchReference extends IGenericReference {
10875
11029
  entityType: EntityType.Search;
10876
11030
  }
@@ -11165,6 +11319,12 @@ export declare interface IUUID extends IPrimitiveEntity {
11165
11319
  name: PrimitiveTypes.UUID;
11166
11320
  }
11167
11321
 
11322
+ export declare interface IUUIDModule {
11323
+ isBackup?: boolean;
11324
+ uuid: () => string;
11325
+ fromUUID: (uuid: string) => string;
11326
+ }
11327
+
11168
11328
  export declare interface IValueAutogeneration {
11169
11329
  type: ValueAutogenerationType;
11170
11330
  rangeStart: null | string | number | boolean | Date;
@@ -11452,47 +11612,6 @@ export declare interface IVersionMetadata {
11452
11612
  deleted: boolean;
11453
11613
  }
11454
11614
 
11455
- /**
11456
- * The minimal subset of the Node‑ws and the browser WebSocket API
11457
- * that you actually use in your editor.
11458
- */
11459
- export declare interface IWebSocketCommon {
11460
- /** readyState codes (both ws and browser expose these as static *and* instance props) */
11461
- readonly CONNECTING: number;
11462
- readonly OPEN: number;
11463
- readonly CLOSING: number;
11464
- readonly CLOSED: number;
11465
- /** The current state of the connection */
11466
- readonly readyState: number;
11467
- /** The URL used to establish the connection */
11468
- readonly url: string;
11469
- /** Subprotocol negotiated with the server, if any */
11470
- readonly protocol: string;
11471
- /** Bytes queued but not yet sent */
11472
- readonly bufferedAmount: number;
11473
- /** Send a message (string, binary, etc.) */
11474
- send(data: any): void;
11475
- /** Close the connection (code + reason both optional in both APIs) */
11476
- close(code?: number, reason?: string): void;
11477
- /**
11478
- * We only tap the four basic events in both environments.
11479
- * Node‑ws also implements addEventListener/removeEventListener,
11480
- * and the browser socket does too, so this matches both.
11481
- */
11482
- addEventListener(event: 'open' | 'message' | 'error' | 'close', listener: (ev: any) => void): void;
11483
- removeEventListener(event: 'open' | 'message' | 'error' | 'close', listener: (ev: any) => void): void;
11484
- /** Optional onX handlers on the instance */
11485
- onopen?: (ev: any) => void;
11486
- onmessage?: (ev: any) => void;
11487
- onerror?: (ev: any) => void;
11488
- onclose?: (ev: any) => void;
11489
- }
11490
-
11491
- export declare interface IWebsocketsClient extends Events {
11492
- connection: IWebSocketCommon;
11493
- send(message: any): void;
11494
- }
11495
-
11496
11615
  export declare const joinListOperation: IActionDescriptorTransfer;
11497
11616
 
11498
11617
  export declare const joinListOperationError: IValueDescriptorTransfer;
@@ -11601,13 +11720,12 @@ export declare enum ListOperations {
11601
11720
  ReplaceFirst = "list-replace-first",
11602
11721
  ReplaceLast = "list-replace-last",
11603
11722
  ReplaceIndex = "list-replace-index",
11604
- ReplaceSingleMatch = "list-replace-single-match",
11605
- ReplaceAllMatches = "list-replace-all-matches",
11606
- GetIndex = "list-get-index",
11723
+ GetIndexItem = "list-get-index-item",
11607
11724
  GetFirst = "list-get-first",
11608
11725
  GetLast = "list-get-last",
11609
11726
  Append = "list-append",
11610
- Prepend = "list-prepend"
11727
+ Prepend = "list-prepend",
11728
+ Reverse = "list-reverse"
11611
11729
  }
11612
11730
 
11613
11731
  export declare type LiteralValueAsType = IDefinitionEntity | IFunctionDeclaration | IOperation | IFunctionCall | IActionDescriptor | IBuiltInBaseEntity;
@@ -12946,7 +13064,7 @@ export declare class ProjectState extends VersionedState implements IProject, Us
12946
13064
  onDiscardChangeSetCallback: ((changeSet: ChangeSet) => void) | null;
12947
13065
  constructor(initialData: IProject | IProjectTransfer, parentContext?: IProjectInstanceParentContext);
12948
13066
  static parentContext: IProjectStaticParentContext;
12949
- static get UUID(): UUIDModule;
13067
+ static get UUID(): IUUIDModule;
12950
13068
  static sessionAuthor: string;
12951
13069
  static repository: IEditableEntityPersistanceRepository;
12952
13070
  static type: EntityType.Project;
@@ -12984,7 +13102,6 @@ export declare class ProjectState extends VersionedState implements IProject, Us
12984
13102
  self: UserManagedEntityState | null, autoclose?: boolean, autoCloseActionName?: string): ChangeSet;
12985
13103
  addChangeSet(changeSet: ChangeSet): ChangeSet;
12986
13104
  discardChangeSet(changeSet: ChangeSet | null): ProjectState;
12987
- inject(...injectedModules: IModuleInjection[]): Promise<ProjectState>;
12988
13105
  validateGeneratedUpdate(data: Partial<IProjectGenerationTarget>): {
12989
13106
  errors: EntityGenerationError[];
12990
13107
  modifiedData: Partial<IProjectGenerationTarget>;
@@ -13533,11 +13650,6 @@ export declare function rebaseStack<T = any>(undoableStackValueIndex: number, hi
13533
13650
 
13534
13651
  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;
13535
13652
 
13536
- export declare interface RegisteredExtension<T extends object = {}> {
13537
- manifest: ExtensionManifest;
13538
- module: ExtensionModule<T>;
13539
- }
13540
-
13541
13653
  export declare const relationalDatabaseBuiltInBaseEntity: IBuiltInBaseEntityTransfer;
13542
13654
 
13543
13655
  export declare const relationalDatabaseBuiltInBaseEntityAutoscalingProperty: IPropertyTransfer;
@@ -13629,8 +13741,6 @@ export declare function resolveDatatypeIconName(dataType: DataTypeState): "defin
13629
13741
 
13630
13742
  export declare function resolveDataTypeLabel(dataType: DataTypeState | null): string;
13631
13743
 
13632
- export declare function resolveDefaultModule<T = any>(moduleId: string): T | null;
13633
-
13634
13744
  export declare function resolveDefinitionEntityDataTypeLabel(entity: DefinitionEntityState): string;
13635
13745
 
13636
13746
  export declare function resolveDefinitionEntitySubheader(entity: DefinitionEntityState): string;
@@ -14008,17 +14118,6 @@ export declare enum SearchDependencyField {
14008
14118
  Parent = "parent"
14009
14119
  }
14010
14120
 
14011
- export declare type SearchImplementationModule = {
14012
- searchImplementation: (entity: SearchState, inputs: IDynamicValue[]) => Promise<{
14013
- data: {
14014
- [columnName: string]: any;
14015
- } | null | {
14016
- [columnName: string]: any;
14017
- }[];
14018
- error: string | null;
14019
- }>;
14020
- };
14021
-
14022
14121
  declare enum SearchLiteralValueType {
14023
14122
  String = "string",
14024
14123
  Number = "number",
@@ -14027,6 +14126,20 @@ declare enum SearchLiteralValueType {
14027
14126
  Date = "date"
14028
14127
  }
14029
14128
 
14129
+ export declare class SearchNodeImplementationModule extends BaseRegisteredExtension implements IRegisteredExtension<ISearchNodeImplementationModule> {
14130
+ manifest: ExtensionManifest;
14131
+ module: {
14132
+ main: (_entity: SearchState, _inputs: IDynamicValue[]) => Promise<{
14133
+ data: {
14134
+ [columnName: string]: any;
14135
+ } | null | {
14136
+ [columnName: string]: any;
14137
+ }[];
14138
+ error: string | null;
14139
+ }>;
14140
+ };
14141
+ }
14142
+
14030
14143
  export declare type SearchPayloadUnion = SearchState | SearchTypesUnion;
14031
14144
 
14032
14145
  export declare class SearchState extends VersionedState implements ISearch, BaseState, UserManagedEntityStateTemplate, BaseCanvasDraggableState, CallableEntityClass, ChildEntityBaseClass, PassThroughCallableEntityClass {
@@ -14585,11 +14698,15 @@ export declare enum StringOperations {
14585
14698
  ReplaceIndex = "string-replace-index",
14586
14699
  ReplaceSingleMatch = "string-replace-single-match",
14587
14700
  ReplaceAllMatches = "string-replace-all-matches",
14588
- GetIndex = "string-get-index",
14701
+ GetIndexItem = "string-get-index-item",
14589
14702
  GetFirst = "string-get-first",
14590
14703
  GetLast = "string-get-last",
14704
+ GetIndexOf = "string-get-index-of",
14591
14705
  Append = "string-append",
14592
- Prepend = "string-prepend"
14706
+ Prepend = "string-prepend",
14707
+ Reverse = "string-reverse",
14708
+ ToLowerCase = "string-to-lower-case",
14709
+ ToUpperCase = "string-to-upper-case"
14593
14710
  }
14594
14711
 
14595
14712
  export declare const stringPrototype: IPrimitiveEntity;
@@ -14665,6 +14782,8 @@ export declare type TestableEntityState = ExecutableEntityState;
14665
14782
 
14666
14783
  export declare function toCamelCase(str: string): string;
14667
14784
 
14785
+ export declare function toEditorContext(registry: ExtensionsRegistry, editor: IEditor): EditorContext;
14786
+
14668
14787
  export declare function toEntityState(entity: string | EntityState | IGenericReference | Element_2 | ElementTransfer | ElementShallowTransfer | ElementGenerationTarget, project: ProjectState): EntityState | null;
14669
14788
 
14670
14789
  export declare function toKebabCase(str: string): string;
@@ -14673,6 +14792,8 @@ export declare function toLowerCaseKebabCase(str: string): string;
14673
14792
 
14674
14793
  export declare function toPascalCase(str: string): string;
14675
14794
 
14795
+ export declare function toProjectLogicContext(registry: ExtensionsRegistry, project: ProjectState): ProjectLogicContext;
14796
+
14676
14797
  export declare function transitionProjectVersion(from: ChangeSet | 'initial', to: ChangeSet | 'initial', project: ProjectState): IProjectVersionTransitionConfig;
14677
14798
 
14678
14799
  export declare function translateLogicErrorCode(error: EntityError): string;
@@ -14799,10 +14920,9 @@ export declare abstract class UserManagedEntityStateTemplate {
14799
14920
 
14800
14921
  export declare type UUIDAutogenerationOptions = IAutogenerationUniqueUUID;
14801
14922
 
14802
- export declare interface UUIDModule {
14803
- isBackup?: boolean;
14804
- uuid: () => string;
14805
- fromUUID: (uuid: string) => string;
14923
+ export declare class UUIDModule extends BaseRegisteredExtension implements IRegisteredExtension<IUUIDModule> {
14924
+ manifest: ExtensionManifest;
14925
+ module: IUUIDModule;
14806
14926
  }
14807
14927
 
14808
14928
  export declare const uuidPrototype: IPrimitiveEntity;