@endge/core 8.0.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/core.js +25879 -24370
  2. package/dist/features/core/kernel/config/debugger.config.d.ts +3 -0
  3. package/dist/features/core/kernel/config/modules.config.d.ts +8 -3
  4. package/dist/features/core/kernel/endge.d.ts +22 -8
  5. package/dist/features/core/kernel/errors/EndgeDebuggerReadOnlyError.d.ts +5 -0
  6. package/dist/features/core/kernel/tools/debugger-snapshot.d.ts +13 -0
  7. package/dist/features/core/kernel/tools/read-only-document.d.ts +2 -0
  8. package/dist/features/core/kernel/types/bootstrap.types.d.ts +7 -1
  9. package/dist/features/core/modules/bridge/EndgeBridge_Module.d.ts +2 -2
  10. package/dist/features/core/modules/bridge/adapters/BrowserBridge_Adapter.d.ts +0 -3
  11. package/dist/features/core/modules/bridge/config/bridge.config.d.ts +17 -0
  12. package/dist/features/core/modules/bridge/debug/EndgeBridgeDebug_Module.d.ts +57 -6
  13. package/dist/features/core/modules/bridge/domain/bridge-sync.type.d.ts +30 -0
  14. package/dist/features/core/modules/bridge/domain/bridge.type.d.ts +0 -8
  15. package/dist/features/core/modules/bridge/tools/bridge-sync.d.ts +16 -0
  16. package/dist/features/core/modules/commands/EndgeCommands_Module.d.ts +17 -0
  17. package/dist/features/core/modules/commands/config/commands.config.d.ts +9 -0
  18. package/dist/features/core/modules/commands/domain/commands.types.d.ts +43 -0
  19. package/dist/features/core/modules/commands/services/LocalCommandExecutor.d.ts +9 -0
  20. package/dist/features/core/modules/commands/services/RemoteCommandExecutor.d.ts +9 -0
  21. package/dist/features/core/modules/commands/services/context/SetDataModeCommand.d.ts +9 -0
  22. package/dist/features/core/modules/commands/services/context/SetEnvironmentCommand.d.ts +9 -0
  23. package/dist/features/core/modules/commands/services/context/SetLocaleCommand.d.ts +9 -0
  24. package/dist/features/core/modules/commands/services/context/SetProjectCommand.d.ts +9 -0
  25. package/dist/features/core/modules/commands/services/context/SetTenantCommand.d.ts +9 -0
  26. package/dist/features/core/modules/commands/services/context/SetThemeCommand.d.ts +9 -0
  27. package/dist/features/core/modules/commands/services/context/SetTimezoneCommand.d.ts +9 -0
  28. package/dist/features/core/modules/commands/services/context/SetUserCommand.d.ts +9 -0
  29. package/dist/features/core/modules/commands/services/context/SetWorkspaceCommand.d.ts +9 -0
  30. package/dist/features/core/modules/commands/services/runtime/PauseRuntimeCommand.d.ts +9 -0
  31. package/dist/features/core/modules/commands/services/runtime/ResumeRuntimeCommand.d.ts +9 -0
  32. package/dist/features/core/modules/commands/services/runtime/StopRuntimeCommand.d.ts +9 -0
  33. package/dist/features/core/modules/commands/tools/command-payload.d.ts +4 -0
  34. package/dist/features/core/modules/commands/types/command-executor.type.d.ts +19 -0
  35. package/dist/features/core/modules/commands/types/context-command-target.type.d.ts +14 -0
  36. package/dist/features/core/modules/commands/types/runtime-command-target.type.d.ts +5 -0
  37. package/dist/features/core/modules/compiler/EndgeCompiler_Module.d.ts +4 -0
  38. package/dist/features/core/modules/computations/model/ComputationResource.d.ts +11 -1
  39. package/dist/features/core/modules/computations/model/ComputationResourceRegistry.d.ts +9 -0
  40. package/dist/features/core/modules/configuration/EndgeConfiguration_Module.d.ts +2 -0
  41. package/dist/features/core/modules/context/EndgeContext_Module.d.ts +18 -1
  42. package/dist/features/core/modules/context/domain/context-events.types.d.ts +8 -0
  43. package/dist/features/core/modules/diagnostics/EndgeDiagnosticsSnapshots_Module.d.ts +2 -5
  44. package/dist/features/core/modules/diagnostics/EndgeDiagnostics_Module.d.ts +2 -2
  45. package/dist/features/core/modules/diagnostics/domain/types/diagnostics.types.d.ts +0 -10
  46. package/dist/features/core/modules/domain/EndgeDomain_Module.d.ts +2 -0
  47. package/dist/features/core/modules/domain/entities/RSimulation.d.ts +1 -1
  48. package/dist/features/core/modules/events/EndgeEvents_Module.d.ts +13 -63
  49. package/dist/features/core/modules/events/domain/events.types.d.ts +36 -22
  50. package/dist/features/core/modules/i18n/tools/resolve-runtime-translation.d.ts +3 -0
  51. package/dist/features/core/modules/runtime/ComponentSFCEventBoundary.d.ts +1 -1
  52. package/dist/features/core/modules/runtime/EndgeRuntimeScopes_Module.d.ts +5 -0
  53. package/dist/features/core/modules/runtime/EndgeRuntime_Module.d.ts +43 -2
  54. package/dist/features/core/modules/runtime/domain/component-sfc-render-port.types.d.ts +8 -0
  55. package/dist/features/core/modules/runtime/domain/runtime-entity-map.types.d.ts +3 -0
  56. package/dist/features/core/modules/runtime/domain/runtime-host.types.d.ts +3 -0
  57. package/dist/features/core/modules/runtime/domain/runtime-inspection.types.d.ts +28 -0
  58. package/dist/features/core/modules/runtime/domain/runtime-render-inspection.types.d.ts +27 -0
  59. package/dist/features/core/modules/runtime/domain/runtime.types.d.ts +4 -2
  60. package/dist/features/core/modules/runtime/domain/simulation-runtime.types.d.ts +25 -0
  61. package/dist/features/core/modules/runtime/domain/stream-runtime.types.d.ts +3 -1
  62. package/dist/features/core/modules/runtime/execution/endge-simulation.d.ts +5 -0
  63. package/dist/features/core/modules/runtime/hosts/ComponentSFCRuntimeHost.d.ts +3 -0
  64. package/dist/features/core/modules/runtime/hosts/FilterViewRuntimeHost.d.ts +5 -0
  65. package/dist/features/core/modules/runtime/hosts/SimulationRuntimeHost.d.ts +52 -0
  66. package/dist/features/core/modules/runtime/hosts/StreamRuntimeHost.d.ts +7 -4
  67. package/dist/features/core/modules/runtime/services/simulation/create-simulation-schema.d.ts +5 -0
  68. package/dist/features/core/modules/runtime/services/simulation/find-simulation-runtime.d.ts +4 -0
  69. package/dist/features/core/modules/runtime/services/simulation/prepare-simulation-overrides.d.ts +14 -0
  70. package/dist/features/core/modules/runtime/services/strategies/SimulationRuntimeStrategy.d.ts +9 -0
  71. package/dist/features/core/modules/runtime/tools/runtime-inspection.d.ts +10 -0
  72. package/dist/features/core/modules/runtime/tools/runtime-render-inspection.d.ts +6 -0
  73. package/dist/features/core/modules/runtime/tools/runtime-render-values.d.ts +4 -0
  74. package/dist/features/core/modules/source/domain/types/simulation-source.types.d.ts +21 -1
  75. package/dist/features/core/modules/source/services/SimulationSourceResolver.d.ts +1 -1
  76. package/dist/features/core/modules/source/templates/simulation.default.source.d.ts +1 -1
  77. package/dist/features/core/modules/workspace/EndgeWorkspace_Module.d.ts +2 -0
  78. package/dist/features/federation/EndgeFederation.d.ts +3 -0
  79. package/dist/features/federation/types/federation.types.d.ts +5 -0
  80. package/dist/main.d.ts +18 -0
  81. package/package.json +3 -3
  82. package/dist/features/core/modules/events/domain/EndgeEvent.d.ts +0 -33
@@ -80,6 +80,7 @@ export interface ProjectRuntimeHostContext extends RuntimeHostContextBase {
80
80
  lastRefreshAt: string | null;
81
81
  }
82
82
  export interface RuntimeHostContextMap {
83
+ 'simulation': RuntimeHostContextBase;
83
84
  'action': ActionRuntimeHostContext;
84
85
  'query': QueryRuntimeHostContext;
85
86
  'filter': FilterRuntimeHostContext;
@@ -383,4 +384,6 @@ export interface RuntimeHost<TType extends RuntimeEntityType = RuntimeEntityType
383
384
  update: (ctx: RuntimeHostUpdateContext) => Promise<void> | void;
384
385
  /** Сериализовать host в снимок для UI/диагностики. */
385
386
  snapshot: () => RuntimeHostSnapshot;
387
+ /** Чистый снимок привязок renderer, без запуска или изменения host. */
388
+ captureRenderInspection?: () => import('./runtime-render-inspection.types').RuntimeRenderableInspection;
386
389
  }
@@ -0,0 +1,28 @@
1
+ import { RuntimeHostStatus } from './runtime-host.types';
2
+ import { RuntimeRenderInspection } from './runtime-render-inspection.types';
3
+ import { EndgeRuntimeSnapshot } from './runtime.types';
4
+ /** Наблюдаемое состояние Runtime. Данные никогда не исполняются при импорте. */
5
+ export interface RuntimeInspectionSnapshot {
6
+ version: 1;
7
+ runtime: EndgeRuntimeSnapshot;
8
+ data?: unknown;
9
+ render?: RuntimeRenderInspection;
10
+ dataGeneratedAt?: number;
11
+ dataError?: string;
12
+ }
13
+ /** Клиентский идентификатор экземпляра и его поколение защищают от повторного использования id. */
14
+ export type RuntimeControlTarget = {
15
+ kind: 'host';
16
+ id: string;
17
+ createdAt: number;
18
+ } | {
19
+ kind: 'scope';
20
+ id: string;
21
+ generation: number;
22
+ };
23
+ export type RuntimeControlOperation = 'pause' | 'resume' | 'stop';
24
+ export interface RuntimeStatusChange {
25
+ readonly id: string;
26
+ readonly previous: RuntimeHostStatus;
27
+ readonly value: RuntimeHostStatus;
28
+ }
@@ -0,0 +1,27 @@
1
+ import { ComputationRuntimeErrorShape } from '../../domain/types/computation/computation-runtime.types';
2
+ import { RuntimeHostInputSource } from './runtime-host.types';
3
+ import { FilterViewRenderModel } from '../../source/domain/types/filter-view.type';
4
+ import { EndgeStyleSheetArtifact } from '../../styles/domain/types/style.types';
5
+ /** Готовое состояние вычисления клиента; observer не исполняет computation повторно. */
6
+ export interface RuntimeComputationInspection {
7
+ identity: string;
8
+ input: unknown;
9
+ status: 'idle' | 'pending' | 'success' | 'error';
10
+ loading: boolean;
11
+ value: unknown;
12
+ error: ComputationRuntimeErrorShape | null;
13
+ }
14
+ export type RuntimeRenderableInspection = {
15
+ kind: 'component-sfc';
16
+ input: RuntimeHostInputSource | null;
17
+ computations: RuntimeComputationInspection[];
18
+ dataMeta: Record<string, unknown>;
19
+ } | {
20
+ kind: 'filter-view';
21
+ model: FilterViewRenderModel;
22
+ };
23
+ /** Дополнение к данным Raph: фактические привязки и presentation state экземпляров. */
24
+ export interface RuntimeRenderInspection {
25
+ hosts: Record<string, RuntimeRenderableInspection>;
26
+ styles: readonly EndgeStyleSheetArtifact[];
27
+ }
@@ -5,14 +5,15 @@ import { RFilter } from '../../domain/entities/RFilter';
5
5
  import { RPage } from '../../domain/entities/RPage';
6
6
  import { RProject } from '../../domain/entities/RProject';
7
7
  import { RQuery } from '../../domain/entities/RQuery';
8
+ import { RSimulation } from '../../domain/entities/RSimulation';
8
9
  import { RStore } from '../../domain/entities/RStore';
9
10
  import { RStream } from '../../domain/entities/RStream';
10
11
  import { RuntimeHostRegistrySnapshot } from './runtime-registry.types';
11
12
  /**
12
13
  * Виды runtime
13
14
  */
14
- export type RuntimeKind = 'query' | 'filter' | 'composition' | 'store' | 'stream' | 'action' | 'runtime';
15
- export type RuntimeExecutableModel = RQuery | RAction | RProject | RPage | RComponentSFC | RFilter | RComposition | RStore | RStream;
15
+ export type RuntimeKind = 'query' | 'filter' | 'composition' | 'store' | 'stream' | 'action' | 'simulation' | 'runtime';
16
+ export type RuntimeExecutableModel = RQuery | RAction | RProject | RPage | RComponentSFC | RFilter | RComposition | RStore | RStream | RSimulation;
16
17
  export interface EndgeRuntimeSnapshot extends RuntimeHostRegistrySnapshot {
17
18
  generatedAt: number;
18
19
  scopes: import('./runtime-scope.types').RuntimeScopeSnapshot[];
@@ -20,6 +21,7 @@ export interface EndgeRuntimeSnapshot extends RuntimeHostRegistrySnapshot {
20
21
  /** Опциональные данные и graph-состояние Raph для диагностического snapshot. */
21
22
  export interface EndgeRuntimeRaphSnapshot {
22
23
  data?: unknown;
24
+ render?: import('./runtime-render-inspection.types').RuntimeRenderInspection;
23
25
  graph?: {
24
26
  runtimeId: string;
25
27
  loopEnabled: boolean;
@@ -0,0 +1,25 @@
1
+ import { RuntimeArtifactReader } from './runtime-host.types';
2
+ import { StreamTransportConnection, StreamTransportFactory } from './stream-runtime.types';
3
+ import { SimulationRuntimeHost } from '../hosts/SimulationRuntimeHost';
4
+ import { SimulationMockStream } from '../../source/domain/types/simulation-source.types';
5
+ /** Host adapter выполняет только transport; schema compilation/PRNG принадлежат сервису. */
6
+ export interface SimulationGenerator {
7
+ generate: (schema: Record<string, unknown>, seed: string, signal: AbortSignal) => Promise<unknown>;
8
+ openStream: (schema: Record<string, unknown>, options: SimulationMockStream, callbacks: Parameters<StreamTransportFactory['open']>[1]) => StreamTransportConnection;
9
+ }
10
+ export interface SimulationMountOptions {
11
+ generator?: SimulationGenerator;
12
+ /** Preview может передать draft artifact без изменения общей Program. */
13
+ artifactReader?: RuntimeArtifactReader;
14
+ /** Принудительный МОК поверхности запуска имеет приоритет над Simulation dataMode. */
15
+ forceMock?: boolean;
16
+ /** Явные входы target; Core не подставляет preview fixtures самостоятельно. */
17
+ props?: Record<string, unknown>;
18
+ }
19
+ export interface SimulationRuntimeSession {
20
+ readonly id: string;
21
+ readonly host: SimulationRuntimeHost;
22
+ pause: () => Promise<void>;
23
+ resume: () => Promise<void>;
24
+ unmount: () => Promise<void>;
25
+ }
@@ -5,7 +5,9 @@ export interface StreamTransportMessage {
5
5
  data: unknown;
6
6
  }
7
7
  export interface StreamTransportConnection {
8
- close: () => void;
8
+ close: () => void | Promise<void>;
9
+ pause?: () => Promise<void>;
10
+ resume?: () => Promise<void>;
9
11
  }
10
12
  /** Нейтральный к браузеру порт, используемый StreamRuntimeHost. */
11
13
  export interface StreamTransportFactory {
@@ -0,0 +1,5 @@
1
+ import { SimulationMountOptions, SimulationRuntimeSession } from '../domain/simulation-runtime.types';
2
+ /** Запускает Simulation через тот же registry и lifecycle, что Project и Composition. */
3
+ export declare class EndgeSimulation {
4
+ mount(identity: string, options?: SimulationMountOptions): Promise<SimulationRuntimeSession>;
5
+ }
@@ -8,6 +8,7 @@ import { RComponentSFCSource_Parts } from '../../domain/types/component/sfc/sour
8
8
  import { ComputationResource } from '../../domain/types/computation/computation-runtime.types';
9
9
  import { ComponentSFCPreviewOptions, ComponentSFCProgramPayload, ProgramDiagnostic } from '../../program/domain/types/program.types';
10
10
  import { RuntimeArtifactReader, RuntimeHost, RuntimeHostContext, RuntimeHostInputSource, RuntimeHostUpdateContext } from '../domain/runtime-host.types';
11
+ import { RuntimeRenderableInspection } from '../domain/runtime-render-inspection.types';
11
12
  import { VocabOptionMapping } from '../domain/vocab-cache.types';
12
13
  import { SourceFieldOption } from '../../source/domain/types/source-expression.types';
13
14
  import { RuntimeHostBase } from '../RuntimeHostBase';
@@ -102,6 +103,8 @@ export declare class ComponentSFCRuntimeHost extends RuntimeHostBase<'component-
102
103
  setInputSource(input: RuntimeHostInputSource | null | undefined): void;
103
104
  /** Возвращает текущий input source host-а. */
104
105
  getInputSource(): RuntimeHostInputSource | null;
106
+ /** Наблюдение сохраняет входы и уже вычисленное состояние; compilation и execution не запускаются. */
107
+ captureRenderInspection(): RuntimeRenderableInspection;
105
108
  /** Читает Meta-plane по compiler-known ссылке, не раскрывая SFC физический DataPath. */
106
109
  readDataMeta(reference: RComponentSFC_IR_DataMetaReference & {
107
110
  boundaryId?: string;
@@ -34,6 +34,11 @@ export declare class FilterViewRuntimeHost extends RuntimeHostBase<'filter', Run
34
34
  getRenderModel(): FilterViewRenderModel;
35
35
  /** Возвращает snapshot пользовательских presentation props. */
36
36
  getProps(): Readonly<Record<string, unknown>>;
37
+ /** Включает фактические controls, props и значения именно этого view, а не только Filter document. */
38
+ captureRenderInspection(): {
39
+ kind: "filter-view";
40
+ model: FilterViewRenderModel;
41
+ };
37
42
  /** Атомарно обновляет presentation props и invalidates renderer. */
38
43
  setProps(patch: Record<string, unknown>): void;
39
44
  /** Меняет одно поле через state-владельца Filter runtime. */
@@ -0,0 +1,52 @@
1
+ import { RSimulation } from '../../domain/entities/RSimulation';
2
+ import { RuntimeArtifactReader, RuntimeHost, RuntimeHostContextBase } from '../domain/runtime-host.types';
3
+ import { StreamTransportFactory } from '../domain/stream-runtime.types';
4
+ import { CompositionRuntimeHost } from './CompositionRuntimeHost';
5
+ import { SimulationSourceArtifact } from '../../source/domain/types/simulation-source.types';
6
+ import { RuntimeHostBase } from '../RuntimeHostBase';
7
+ /** Владелец одного изолированного запуска target через общий runtime registry. */
8
+ export declare class SimulationRuntimeHost extends RuntimeHostBase<'simulation', RuntimeHostContextBase, SimulationSourceArtifact> {
9
+ readonly forceMock: boolean;
10
+ private _target;
11
+ private _scope;
12
+ private _responses;
13
+ private readonly _overrides;
14
+ private readonly _generator;
15
+ private _abortController;
16
+ private _generation;
17
+ private _closed;
18
+ private _transition;
19
+ private _activation;
20
+ private _destroying;
21
+ private constructor();
22
+ static createRuntime(input: {
23
+ id: string;
24
+ model: RSimulation;
25
+ parent: RuntimeHost<any, any> | null;
26
+ meta: Record<string, unknown>;
27
+ artifacts: RuntimeArtifactReader;
28
+ }): SimulationRuntimeHost | null;
29
+ get target(): CompositionRuntimeHost<'composition' | 'project'> | null;
30
+ /** Проверяет occurrence, а не глобальную identity Query. */
31
+ hasRequest(host: RuntimeHost<any, any>): boolean;
32
+ /** Каждое выполнение получает новый response; mutation Query не меняет шаблон следующего вызова. */
33
+ readResponse(host: RuntimeHost<any, any>): {
34
+ value: unknown;
35
+ } | null;
36
+ streamOverride(host: RuntimeHost<any, any>): {
37
+ schema: Record<string, unknown>;
38
+ options: import('../../source/domain/types/simulation-source.types').SimulationMockStream;
39
+ } | null;
40
+ openStream(host: RuntimeHost<any, any>, callbacks: Parameters<StreamTransportFactory['open']>[1]): import('../domain/stream-runtime.types').StreamTransportConnection;
41
+ private _requestKey;
42
+ /** Создаёт target штатной strategy; вложенные manual nodes сохраняют свои policies. */
43
+ activateTarget(): Promise<CompositionRuntimeHost<'composition' | 'project'>>;
44
+ deactivateTarget(): Promise<void>;
45
+ pause(): Promise<void>;
46
+ resume(): Promise<void>;
47
+ quiesce(): void;
48
+ destroy(): Promise<void>;
49
+ private _dispose;
50
+ private _assertCurrent;
51
+ private _enqueue;
52
+ }
@@ -7,6 +7,7 @@ import { RuntimeHostBase } from '../RuntimeHostBase';
7
7
  export declare class StreamRuntimeHost extends RuntimeHostBase<'stream', RuntimeHostContext<'stream'>, StreamSourceArtifact> {
8
8
  private _connection;
9
9
  private _generation;
10
+ private _closing;
10
11
  private _contextOff;
11
12
  private _dataMode;
12
13
  constructor(input: {
@@ -27,13 +28,15 @@ export declare class StreamRuntimeHost extends RuntimeHostBase<'stream', Runtime
27
28
  transportFactory: StreamTransportFactory;
28
29
  }): StreamRuntimeHost | null;
29
30
  start(): void;
30
- /** Пауза закрывает transport и инвалидирует уже поставленные callbacks. */
31
- pause(): void;
31
+ /** Generator сохраняет SSE на паузе; обычный transport закрывает соединение. */
32
+ pause(): Promise<void>;
32
33
  /** Возобновляет transport только после восстановления host lifecycle. */
33
- resume(): void;
34
+ resume(): Promise<void>;
34
35
  stop(): void;
35
36
  quiesce(): void;
36
- destroy(): void;
37
+ destroy(): Promise<void>;
37
38
  private _closeConnection;
39
+ private _disposeConnection;
38
40
  private _receive;
41
+ private _dispatch;
39
42
  }
@@ -0,0 +1,5 @@
1
+ import { RuntimeArtifactReader } from '../../domain/runtime-host.types';
2
+ import { SimulationFieldConstraints } from '../../../source/domain/types/simulation-source.types';
3
+ import { SourceFieldDefinition } from '../../../source/domain/types/source-expression.types';
4
+ /** Проекция compiled Type в JSON Schema. Генерация значений принадлежит внешнему сервису. */
5
+ export declare function createSimulationSchema(contract: Pick<SourceFieldDefinition, 'type' | 'typeExpression' | 'array'>, artifacts: RuntimeArtifactReader, arrays?: Record<string, number>, fields?: Record<string, SimulationFieldConstraints>, useExamples?: boolean): Record<string, unknown>;
@@ -0,0 +1,4 @@
1
+ import { RuntimeHost } from '../../domain/runtime-host.types';
2
+ import { SimulationRuntimeHost } from '../../hosts/SimulationRuntimeHost';
3
+ /** Находит владельца запуска только по lifecycle ancestry конкретного host. */
4
+ export declare function findSimulationRuntime(host: RuntimeHost<any, any> | null | undefined): SimulationRuntimeHost | null;
@@ -0,0 +1,14 @@
1
+ import { RuntimeArtifactReader } from '../../domain/runtime-host.types';
2
+ import { SimulationMockStream, SimulationSourceArtifact } from '../../../source/domain/types/simulation-source.types';
3
+ export interface SimulationOverrides {
4
+ requests: ReadonlyMap<string, {
5
+ schema: Record<string, unknown>;
6
+ seed: string;
7
+ }>;
8
+ streams: ReadonlyMap<string, {
9
+ schema: Record<string, unknown>;
10
+ options: SimulationMockStream;
11
+ }>;
12
+ }
13
+ /** Подготавливает подмены по occurrence paths до активации target; Program остаётся неизменным. */
14
+ export declare function prepareSimulationOverrides(simulation: SimulationSourceArtifact, artifacts: RuntimeArtifactReader, seed: string): SimulationOverrides;
@@ -0,0 +1,9 @@
1
+ import { RuntimeStrategy } from '../../domain/runtime-strategy.types';
2
+ import { RSimulation } from '../../../domain/entities/RSimulation';
3
+ import { SimulationRuntimeHost } from '../../hosts/SimulationRuntimeHost';
4
+ export declare class SimulationRuntimeStrategy implements RuntimeStrategy<RSimulation, SimulationRuntimeHost> {
5
+ readonly id = "runtime:simulation";
6
+ readonly entityType: "simulation";
7
+ supports(model: unknown): model is RSimulation;
8
+ create(context: Parameters<RuntimeStrategy<RSimulation, SimulationRuntimeHost>['create']>[0]): SimulationRuntimeHost | null;
9
+ }
@@ -0,0 +1,10 @@
1
+ import { RuntimeControlTarget, RuntimeInspectionSnapshot } from '../domain/runtime-inspection.types';
2
+ import { RuntimeRenderInspection } from '../domain/runtime-render-inspection.types';
3
+ import { EndgeRuntimeSnapshot } from '../domain/runtime.types';
4
+ /** Проверяет транспортную проекцию до изменения owner; циклы родителей не попадают в UI. */
5
+ export declare function readRuntimeInspectionSnapshot(value: unknown): RuntimeInspectionSnapshot;
6
+ /** Проверяет presentation payload до его передачи renderer-у. */
7
+ export declare function readRuntimeRenderInspection(value: unknown): RuntimeRenderInspection;
8
+ /** Команда адресует конкретное поколение host/scope, а не документ по identity. */
9
+ export declare function readRuntimeControlTarget(value: unknown): RuntimeControlTarget;
10
+ export declare function emptyRuntimeInspection(): EndgeRuntimeSnapshot;
@@ -0,0 +1,6 @@
1
+ import { RComponentSFC_IR_DataMetaReference } from '../../domain/types/component/sfc/ir.types';
2
+ /** Адрес Meta-чтения стабилен между client renderer и его наблюдаемым представлением. */
3
+ export declare function runtimeInspectionMetaKey(reference: RComponentSFC_IR_DataMetaReference & {
4
+ boundaryId?: string;
5
+ rowKey?: unknown;
6
+ }, namespace?: string): string;
@@ -0,0 +1,4 @@
1
+ import { VocabOptionMapping } from '../domain/vocab-cache.types';
2
+ import { SourceFieldOption } from '../../source/domain/types/source-expression.types';
3
+ /** Преобразование уже загруженного Vocab не требует его runtime или сетевого запроса. */
4
+ export declare function resolveRuntimeVocabOptions(values: unknown, mapping?: Partial<VocabOptionMapping>): SourceFieldOption[];
@@ -1,14 +1,32 @@
1
1
  import { ProgramDependency, ProgramDiagnostic } from '../../../program/domain/types/program.types';
2
- /** Декларация будущей подмены request. Генерация данных здесь не выполняется. */
2
+ /** Декларация подмены response Query. Генерация выполняется при запуске Simulation. */
3
3
  export interface SimulationMockRequest {
4
4
  kind: 'mock-request';
5
5
  seed?: string;
6
+ /** false исключает примеры Type из схемы; ограничения и enum сохраняются. */
7
+ useExamples?: boolean;
6
8
  arrays: Record<string, number>;
7
9
  }
10
+ /** Ограничения сценария сужают существующий Type, не создавая новый Domain Type. */
11
+ export interface SimulationFieldConstraints {
12
+ enum?: Array<string | number | boolean>;
13
+ minimum?: number;
14
+ maximum?: number;
15
+ }
16
+ export interface SimulationMockStream {
17
+ kind: 'mock-stream';
18
+ type: string;
19
+ event: string;
20
+ seed?: string;
21
+ intervalMs: number;
22
+ itemsPerMessage: number;
23
+ fields: Record<string, SimulationFieldConstraints>;
24
+ }
8
25
  export interface SimulationRuntimeOverride {
9
26
  alias: string;
10
27
  runtimes?: SimulationRuntimeOverride[];
11
28
  request?: SimulationMockRequest;
29
+ stream?: SimulationMockStream;
12
30
  }
13
31
  export type SimulationTargetReference = {
14
32
  entityType: 'composition';
@@ -19,6 +37,8 @@ export type SimulationTargetReference = {
19
37
  };
20
38
  export interface SimulationSourceDocument {
21
39
  target: SimulationTargetReference;
40
+ /** Режим неподменённых источников. Отсутствие значения сохраняет наследование. */
41
+ dataMode?: 'live' | 'mock';
22
42
  runtimes: SimulationRuntimeOverride[];
23
43
  }
24
44
  export interface SimulationSourceArtifact extends SimulationSourceDocument {
@@ -8,7 +8,7 @@ interface SimulationCompositionBranch {
8
8
  }
9
9
  export interface SimulationSourceTarget {
10
10
  alias: string;
11
- kind: 'project' | 'composition' | 'scope' | 'query' | 'unsupported';
11
+ kind: 'project' | 'composition' | 'scope' | 'query' | 'stream' | 'unsupported';
12
12
  identity: string;
13
13
  branch: SimulationCompositionBranch | null;
14
14
  }
@@ -1,2 +1,2 @@
1
1
  /** Новый документ требует выбора целевой Composition или Project. */
2
- export declare const SIMULATION_DEFAULT_SOURCE = "defineSimulation({\n target: composition(''),\n overrides: {\n runtimes: {},\n },\n})";
2
+ export declare const SIMULATION_DEFAULT_SOURCE = "defineSimulation({\n target: composition(''),\n dataMode: 'mock',\n overrides: {\n runtimes: {},\n },\n})";
@@ -35,6 +35,8 @@ export declare class EndgeWorkspace_Module extends EndgeModule<EndgeBootContext>
35
35
  getTimezoneLabel(timezone: string): string;
36
36
  /** Применяет и публикует новую workspace-конфигурацию. */
37
37
  apply(input: unknown): void;
38
+ /** Applies captured metadata for document inspection without changing authorization or starting integrations. */
39
+ applyInspection(input: EndgeWorkspaceDefinition): void;
38
40
  /** Сериализует текущую workspace-конфигурацию. */
39
41
  serialize(): EndgeWorkspaceDefinition;
40
42
  /** Возвращает workspace или сообщает о нарушении boot lifecycle. */
@@ -45,8 +45,11 @@ export declare abstract class EndgeFederation {
45
45
  static createDiagnosticsSnapshot(options?: EndgeFederationDiagnosticsSnapshotOptions): EndgeFederationDiagnosticsSnapshot;
46
46
  /** Хук одноразовой декларации собственных lifecycle-узлов Federation. */
47
47
  protected static configureFederation(): void;
48
+ /** Selects the lifecycle graph without creating a second owner for its nodes. */
49
+ protected static selectLifecycleNodes(nodes: readonly EndgeLifecycleNodeDescriptor[], _ctx: EndgeFederationContext): readonly EndgeLifecycleNodeDescriptor[];
48
50
  /** Запускает всё дерево Federation по pipeline `setup -> load -> build -> start`. */
49
51
  static boot(ctx: EndgeFederationContext): Promise<void>;
52
+ private static _selectLifecycleNodes;
50
53
  private static _runBoot;
51
54
  /** Регистрирует декларативное расширение до configuration Federation. */
52
55
  static use(plugin: EndgePlugin): void;
@@ -70,6 +70,8 @@ export interface EndgePlugin<TModules extends EndgeModuleDefinitions = EndgeModu
70
70
  readonly id: string;
71
71
  readonly modules?: TModules;
72
72
  readonly federations?: TFederations;
73
+ /** Selects an ordered subset once per boot; reset uses the same nodes. */
74
+ readonly selectLifecycleNodes?: (nodes: readonly EndgeLifecycleNodeDescriptor[], ctx: EndgeFederationContext) => readonly EndgeLifecycleNodeDescriptor[];
73
75
  }
74
76
  /** Полное декларативное описание автоматически собираемой федерации. */
75
77
  export interface EndgeFederationDefinition<TDefinitions extends EndgeModuleDefinitions, TFederations extends EndgeChildFederationDefinitions = readonly []> {
@@ -77,6 +79,8 @@ export interface EndgeFederationDefinition<TDefinitions extends EndgeModuleDefin
77
79
  readonly name?: string;
78
80
  readonly modules: TDefinitions;
79
81
  readonly federations?: TFederations;
82
+ /** Selects an ordered subset once per boot; reset uses the same nodes. */
83
+ readonly selectLifecycleNodes?: (nodes: readonly EndgeLifecycleNodeDescriptor[], ctx: EndgeFederationContext) => readonly EndgeLifecycleNodeDescriptor[];
80
84
  }
81
85
  export type EndgeLifecycleNodeDescriptor = {
82
86
  readonly kind: 'module';
@@ -101,6 +105,7 @@ export interface EndgeFederationHost {
101
105
  state: EndgeFederationState;
102
106
  lastError: unknown | null;
103
107
  bootContext: EndgeFederationContext | null;
108
+ lifecycleNodes: readonly EndgeLifecycleNodeDescriptor[] | null;
104
109
  bootPromise: Promise<void> | null;
105
110
  resetPromise: Promise<void> | null;
106
111
  buildQueue: Promise<void>;
package/dist/main.d.ts CHANGED
@@ -6,8 +6,10 @@ export * from './features/federation/types/endge-modules.types';
6
6
  export * from './features/federation/constants/federation.constants';
7
7
  export * from './features/federation/types/federation.types';
8
8
  export * from './features/core/kernel/endge';
9
+ export * from './features/core/modules/commands/EndgeCommands_Module';
9
10
  export * from './features/core/modules/bridge/EndgeBridge_Module';
10
11
  export * from './features/core/modules/bridge/domain/bridge.type';
12
+ export * from './features/core/modules/bridge/domain/bridge-sync.type';
11
13
  export { parseBridgeAllowedServers } from './features/core/modules/bridge/config/bridge.config';
12
14
  export * from './features/core/modules/domain/EndgeDomain_Module';
13
15
  export * from './features/core/modules/document-import/EndgeDocumentImport_Module';
@@ -21,6 +23,8 @@ export * from './features/core/modules/source/EndgeSource_Module';
21
23
  export * from './features/core/modules/mock/EndgeMock_Module';
22
24
  export * from './features/core/modules/runtime/execution/endge-composition';
23
25
  export * from './features/core/modules/runtime/execution/endge-project';
26
+ export * from './features/core/modules/runtime/execution/endge-simulation';
27
+ export * from './features/core/modules/runtime/domain/simulation-runtime.types';
24
28
  export * from './features/core/modules/runtime/execution/endge-data-view';
25
29
  export * from './features/core/modules/runtime/execution/endge-response-output';
26
30
  export * from './features/core/modules/runtime/execution/endge-query';
@@ -92,6 +96,10 @@ export * from './features/core/modules/domain/types/document/query.types';
92
96
  export * from './features/core/modules/workspace/domain/workspace.types';
93
97
  export * from './features/core/kernel/types/bootstrap.types';
94
98
  export * from './features/core/modules/events/domain/events.types';
99
+ export * from './features/core/modules/commands/domain/commands.types';
100
+ export { createContextCommandExecutor } from './features/core/modules/commands/config/commands.config';
101
+ export type { EndgeContextCommandTarget } from './features/core/modules/commands/types/context-command-target.type';
102
+ export type { EndgeCommandExecutor, EndgeCommandsBootOptions, EndgeRemoteCommandTransport } from './features/core/modules/commands/types/command-executor.type';
95
103
  export * from './features/core/modules/mock/domain/types/mock-data.type';
96
104
  export * from './features/core/modules/program/domain/types/program.types';
97
105
  export * from './features/core/modules/program/domain/types/action-program.types';
@@ -101,6 +109,7 @@ export * from './features/core/modules/runtime/domain/vocab-cache.types';
101
109
  export * from './features/core/modules/implementations/domain/implementation.types';
102
110
  export * from './features/core/modules/source/domain/types/action-source.types';
103
111
  export * from './features/core/modules/context/domain/context-persistence.types';
112
+ export * from './features/core/modules/context/domain/context-events.types';
104
113
  export * from './features/core/modules/context/domain/context-state.types';
105
114
  export * from './features/core/modules/runtime/domain/execution-context.types';
106
115
  export * from './features/core/modules/runtime/domain/query-execution.types';
@@ -114,6 +123,10 @@ export * from './features/core/modules/runtime/domain/sfc-render-inspection.type
114
123
  export * from './features/core/modules/runtime/domain/runtime-project-session.types';
115
124
  export * from './features/core/modules/runtime/domain/runtime-strategy.types';
116
125
  export * from './features/core/modules/runtime/domain/runtime.types';
126
+ export * from './features/core/modules/runtime/domain/runtime-inspection.types';
127
+ export * from './features/core/modules/runtime/domain/runtime-render-inspection.types';
128
+ export * from './features/core/modules/runtime/domain/component-sfc-render-port.types';
129
+ export { runtimeInspectionMetaKey } from './features/core/modules/runtime/tools/runtime-render-inspection';
117
130
  export * from './features/core/modules/runtime/domain/table-binding.types';
118
131
  export * from './features/core/modules/runtime/domain/table.types';
119
132
  export * from './features/core/modules/source/domain/types/composition-source.types';
@@ -214,6 +227,7 @@ export * from './features/core/modules/runtime/EndgeRuntimeScopes_Module';
214
227
  export * from './features/core/modules/runtime/RuntimeResourceBag';
215
228
  export * from './features/core/modules/runtime/RuntimeHostFactory';
216
229
  export * from './features/core/modules/runtime/hosts/ProjectRuntimeHost';
230
+ export * from './features/core/modules/runtime/hosts/SimulationRuntimeHost';
217
231
  export * from './features/core/modules/runtime/hosts/PageRuntimeHost';
218
232
  export * from './features/core/modules/runtime/hosts/ComponentSFCRuntimeHost';
219
233
  export * from './features/core/modules/runtime/ComponentSFCEventBoundary';
@@ -265,3 +279,7 @@ export * from './features/core/modules/runtime/services/strategies/StoreRuntimeS
265
279
  export * from './features/core/modules/runtime/services/strategies/StreamRuntimeStrategy';
266
280
  export * from './features/core/modules/runtime/hosts/StreamRuntimeHost';
267
281
  export * from './features/core/modules/runtime/domain/stream-runtime.types';
282
+ export { EndgeDebuggerReadOnlyError } from './features/core/kernel/errors/EndgeDebuggerReadOnlyError';
283
+ export { readOnlyDocument } from './features/core/kernel/tools/read-only-document';
284
+ export { resolveRuntimeTranslation } from './features/core/modules/i18n/tools/resolve-runtime-translation';
285
+ export { resolveRuntimeVocabOptions } from './features/core/modules/runtime/tools/runtime-render-values';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@endge/core",
3
3
  "type": "module",
4
- "version": "8.0.0",
4
+ "version": "10.0.0",
5
5
  "private": false,
6
6
  "packageManager": "pnpm@8.8.0",
7
7
  "license": "Apache-2.0",
@@ -38,7 +38,7 @@
38
38
  "dependencies": {
39
39
  "@babel/parser": "^7.27.2",
40
40
  "@babel/types": "^7.27.1",
41
- "@endge/utils": "^0.26.1",
41
+ "@endge/utils": "^0.27.0",
42
42
  "@vue/compiler-dom": "^3.5.24",
43
43
  "@vue/compiler-sfc": "^3.5.24",
44
44
  "axios": "^1.13.2",
@@ -65,5 +65,5 @@
65
65
  "vite": "^6.1.0",
66
66
  "vitest": "^2.1.9"
67
67
  },
68
- "version_updated": "09.09.2026"
68
+ "version_updated": "10.09.2026"
69
69
  }
@@ -1,33 +0,0 @@
1
- /**
2
- * Базовая оболочка события, которую можно "отменить".
3
- * Отмена может быть использована эмиттером для stopPropagation.
4
- */
5
- export interface EndgeEventBase<T = unknown> {
6
- readonly isCanceled: boolean;
7
- readonly payload: T;
8
- cancel: () => void;
9
- }
10
- /**
11
- * Базовый класс события (cancellable envelope).
12
- */
13
- export declare class EndgeEvent<T> implements EndgeEventBase<T> {
14
- readonly payload: T;
15
- isCanceled: boolean;
16
- constructor(payload: T);
17
- cancel(): void;
18
- }
19
- /**
20
- * Опции эмита (для stopPropagation).
21
- */
22
- export interface EndgeEmitOptions {
23
- /**
24
- * Если true - прекращает вызов следующих слушателей после cancel().
25
- */
26
- stopOnCancel?: boolean;
27
- }
28
- /**
29
- * События ядра (строго типизированные) - подставь свой интерфейс payloads.
30
- * Например:
31
- * export interface EndgeEventPayloads { 'app:init': {}; ... }
32
- */
33
- export type EndgeEventPayloads = Record<string, unknown>;