@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.
- package/dist/core.js +25879 -24370
- package/dist/features/core/kernel/config/debugger.config.d.ts +3 -0
- package/dist/features/core/kernel/config/modules.config.d.ts +8 -3
- package/dist/features/core/kernel/endge.d.ts +22 -8
- package/dist/features/core/kernel/errors/EndgeDebuggerReadOnlyError.d.ts +5 -0
- package/dist/features/core/kernel/tools/debugger-snapshot.d.ts +13 -0
- package/dist/features/core/kernel/tools/read-only-document.d.ts +2 -0
- package/dist/features/core/kernel/types/bootstrap.types.d.ts +7 -1
- package/dist/features/core/modules/bridge/EndgeBridge_Module.d.ts +2 -2
- package/dist/features/core/modules/bridge/adapters/BrowserBridge_Adapter.d.ts +0 -3
- package/dist/features/core/modules/bridge/config/bridge.config.d.ts +17 -0
- package/dist/features/core/modules/bridge/debug/EndgeBridgeDebug_Module.d.ts +57 -6
- package/dist/features/core/modules/bridge/domain/bridge-sync.type.d.ts +30 -0
- package/dist/features/core/modules/bridge/domain/bridge.type.d.ts +0 -8
- package/dist/features/core/modules/bridge/tools/bridge-sync.d.ts +16 -0
- package/dist/features/core/modules/commands/EndgeCommands_Module.d.ts +17 -0
- package/dist/features/core/modules/commands/config/commands.config.d.ts +9 -0
- package/dist/features/core/modules/commands/domain/commands.types.d.ts +43 -0
- package/dist/features/core/modules/commands/services/LocalCommandExecutor.d.ts +9 -0
- package/dist/features/core/modules/commands/services/RemoteCommandExecutor.d.ts +9 -0
- package/dist/features/core/modules/commands/services/context/SetDataModeCommand.d.ts +9 -0
- package/dist/features/core/modules/commands/services/context/SetEnvironmentCommand.d.ts +9 -0
- package/dist/features/core/modules/commands/services/context/SetLocaleCommand.d.ts +9 -0
- package/dist/features/core/modules/commands/services/context/SetProjectCommand.d.ts +9 -0
- package/dist/features/core/modules/commands/services/context/SetTenantCommand.d.ts +9 -0
- package/dist/features/core/modules/commands/services/context/SetThemeCommand.d.ts +9 -0
- package/dist/features/core/modules/commands/services/context/SetTimezoneCommand.d.ts +9 -0
- package/dist/features/core/modules/commands/services/context/SetUserCommand.d.ts +9 -0
- package/dist/features/core/modules/commands/services/context/SetWorkspaceCommand.d.ts +9 -0
- package/dist/features/core/modules/commands/services/runtime/PauseRuntimeCommand.d.ts +9 -0
- package/dist/features/core/modules/commands/services/runtime/ResumeRuntimeCommand.d.ts +9 -0
- package/dist/features/core/modules/commands/services/runtime/StopRuntimeCommand.d.ts +9 -0
- package/dist/features/core/modules/commands/tools/command-payload.d.ts +4 -0
- package/dist/features/core/modules/commands/types/command-executor.type.d.ts +19 -0
- package/dist/features/core/modules/commands/types/context-command-target.type.d.ts +14 -0
- package/dist/features/core/modules/commands/types/runtime-command-target.type.d.ts +5 -0
- package/dist/features/core/modules/compiler/EndgeCompiler_Module.d.ts +4 -0
- package/dist/features/core/modules/computations/model/ComputationResource.d.ts +11 -1
- package/dist/features/core/modules/computations/model/ComputationResourceRegistry.d.ts +9 -0
- package/dist/features/core/modules/configuration/EndgeConfiguration_Module.d.ts +2 -0
- package/dist/features/core/modules/context/EndgeContext_Module.d.ts +18 -1
- package/dist/features/core/modules/context/domain/context-events.types.d.ts +8 -0
- package/dist/features/core/modules/diagnostics/EndgeDiagnosticsSnapshots_Module.d.ts +2 -5
- package/dist/features/core/modules/diagnostics/EndgeDiagnostics_Module.d.ts +2 -2
- package/dist/features/core/modules/diagnostics/domain/types/diagnostics.types.d.ts +0 -10
- package/dist/features/core/modules/domain/EndgeDomain_Module.d.ts +2 -0
- package/dist/features/core/modules/domain/entities/RSimulation.d.ts +1 -1
- package/dist/features/core/modules/events/EndgeEvents_Module.d.ts +13 -63
- package/dist/features/core/modules/events/domain/events.types.d.ts +36 -22
- package/dist/features/core/modules/i18n/tools/resolve-runtime-translation.d.ts +3 -0
- package/dist/features/core/modules/runtime/ComponentSFCEventBoundary.d.ts +1 -1
- package/dist/features/core/modules/runtime/EndgeRuntimeScopes_Module.d.ts +5 -0
- package/dist/features/core/modules/runtime/EndgeRuntime_Module.d.ts +43 -2
- package/dist/features/core/modules/runtime/domain/component-sfc-render-port.types.d.ts +8 -0
- package/dist/features/core/modules/runtime/domain/runtime-entity-map.types.d.ts +3 -0
- package/dist/features/core/modules/runtime/domain/runtime-host.types.d.ts +3 -0
- package/dist/features/core/modules/runtime/domain/runtime-inspection.types.d.ts +28 -0
- package/dist/features/core/modules/runtime/domain/runtime-render-inspection.types.d.ts +27 -0
- package/dist/features/core/modules/runtime/domain/runtime.types.d.ts +4 -2
- package/dist/features/core/modules/runtime/domain/simulation-runtime.types.d.ts +25 -0
- package/dist/features/core/modules/runtime/domain/stream-runtime.types.d.ts +3 -1
- package/dist/features/core/modules/runtime/execution/endge-simulation.d.ts +5 -0
- package/dist/features/core/modules/runtime/hosts/ComponentSFCRuntimeHost.d.ts +3 -0
- package/dist/features/core/modules/runtime/hosts/FilterViewRuntimeHost.d.ts +5 -0
- package/dist/features/core/modules/runtime/hosts/SimulationRuntimeHost.d.ts +52 -0
- package/dist/features/core/modules/runtime/hosts/StreamRuntimeHost.d.ts +7 -4
- package/dist/features/core/modules/runtime/services/simulation/create-simulation-schema.d.ts +5 -0
- package/dist/features/core/modules/runtime/services/simulation/find-simulation-runtime.d.ts +4 -0
- package/dist/features/core/modules/runtime/services/simulation/prepare-simulation-overrides.d.ts +14 -0
- package/dist/features/core/modules/runtime/services/strategies/SimulationRuntimeStrategy.d.ts +9 -0
- package/dist/features/core/modules/runtime/tools/runtime-inspection.d.ts +10 -0
- package/dist/features/core/modules/runtime/tools/runtime-render-inspection.d.ts +6 -0
- package/dist/features/core/modules/runtime/tools/runtime-render-values.d.ts +4 -0
- package/dist/features/core/modules/source/domain/types/simulation-source.types.d.ts +21 -1
- package/dist/features/core/modules/source/services/SimulationSourceResolver.d.ts +1 -1
- package/dist/features/core/modules/source/templates/simulation.default.source.d.ts +1 -1
- package/dist/features/core/modules/workspace/EndgeWorkspace_Module.d.ts +2 -0
- package/dist/features/federation/EndgeFederation.d.ts +3 -0
- package/dist/features/federation/types/federation.types.d.ts +5 -0
- package/dist/main.d.ts +18 -0
- package/package.json +3 -3
- package/dist/features/core/modules/events/domain/EndgeEvent.d.ts +0 -33
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EndgeCommandHandler } from '../../types/command-executor.type';
|
|
2
|
+
import { EndgeRuntimeCommandTarget } from '../../types/runtime-command-target.type';
|
|
3
|
+
/** Делегирует resume существующему владельцу runtime lifecycle. */
|
|
4
|
+
export declare class ResumeRuntimeCommand implements EndgeCommandHandler {
|
|
5
|
+
private readonly _runtime;
|
|
6
|
+
readonly type: "runtime:resume";
|
|
7
|
+
constructor(_runtime: EndgeRuntimeCommandTarget);
|
|
8
|
+
execute(payload: unknown): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EndgeCommandHandler } from '../../types/command-executor.type';
|
|
2
|
+
import { EndgeRuntimeCommandTarget } from '../../types/runtime-command-target.type';
|
|
3
|
+
/** Делегирует stop существующему владельцу runtime lifecycle. */
|
|
4
|
+
export declare class StopRuntimeCommand implements EndgeCommandHandler {
|
|
5
|
+
private readonly _runtime;
|
|
6
|
+
readonly type: "runtime:stop";
|
|
7
|
+
constructor(_runtime: EndgeRuntimeCommandTarget);
|
|
8
|
+
execute(payload: unknown): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Проверяет строковый параметр команды; нормализация значения остаётся у владельца операции. */
|
|
2
|
+
export declare function readCommandString(payload: unknown, field: string): string;
|
|
3
|
+
/** Читает обязательную строку или явный null без приведения других типов. */
|
|
4
|
+
export declare function readCommandNullableString(payload: unknown, field: string): string | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EndgeCommand, EndgeCommandType } from '../domain/commands.types';
|
|
2
|
+
/** Исполнитель определяет способ выполнения команды, сохраняя единый API для вызывающего кода. */
|
|
3
|
+
export interface EndgeCommandExecutor {
|
|
4
|
+
execute: (command: EndgeCommand) => Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
/** Отправляет команду выбранному удалённому клиенту и возвращает результат её выполнения. */
|
|
7
|
+
export interface EndgeRemoteCommandTransport {
|
|
8
|
+
send: (command: EndgeCommand) => Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
/** Host передаёт транспорт текущего сеанса; режим исполнения определяется общим boot mode. */
|
|
11
|
+
export interface EndgeCommandsBootOptions {
|
|
12
|
+
local?: EndgeCommandExecutor;
|
|
13
|
+
remote?: EndgeRemoteCommandTransport;
|
|
14
|
+
}
|
|
15
|
+
/** Обработчик одной команды проверяет payload до обращения к владельцу операции. */
|
|
16
|
+
export interface EndgeCommandHandler {
|
|
17
|
+
readonly type: EndgeCommandType;
|
|
18
|
+
execute: (payload: unknown) => void | Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EndgeDataMode } from '../../workspace/domain/workspace.types';
|
|
2
|
+
/** Владелец локальных операций: Core setters либо штатные операции приложения с reset/boot. */
|
|
3
|
+
export interface EndgeContextCommandTarget {
|
|
4
|
+
setCurrentWorkspace: (workspace: string | null) => void | Promise<void>;
|
|
5
|
+
setCurrentTenant: (tenant: string) => void | Promise<void>;
|
|
6
|
+
setCurrentProject: (project: string) => void | Promise<void>;
|
|
7
|
+
setCurrentEnvironment: (environment: string) => void | Promise<void>;
|
|
8
|
+
setCurrentUser: (user: string) => void | Promise<void>;
|
|
9
|
+
setCurrentLocale: (locale: string | null) => void | Promise<void>;
|
|
10
|
+
setCurrentTheme: (theme: string | null) => void | Promise<void>;
|
|
11
|
+
setCurrentTimezone: (timezone: string | null) => void | Promise<void>;
|
|
12
|
+
setDataMode: (dataMode: EndgeDataMode) => void | Promise<void>;
|
|
13
|
+
clearDataModeOverride: () => void | Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RuntimeControlOperation, RuntimeControlTarget } from '../../runtime/domain/runtime-inspection.types';
|
|
2
|
+
/** Узкий API владельца Runtime для общих локальных обработчиков. */
|
|
3
|
+
export interface EndgeRuntimeCommandTarget {
|
|
4
|
+
control: (operation: RuntimeControlOperation, target: RuntimeControlTarget) => Promise<void>;
|
|
5
|
+
}
|
|
@@ -69,6 +69,8 @@ export declare class EndgeCompiler_Module extends EndgeModule<EndgeBootContext>
|
|
|
69
69
|
buildAction(entity: RAction): ProgramArtifact<ActionProgramPayload>;
|
|
70
70
|
/** Компилирует один ComponentSFC без запуска полного domain build. */
|
|
71
71
|
buildComponentSFC(entity: RComponentSFC): ProgramArtifact<ComponentSFCProgramPayload>;
|
|
72
|
+
/** Компилирует наблюдаемый SFC без записи в Program и без запуска runtime. */
|
|
73
|
+
compileComponentSFCArtifact(entity: RComponentSFC): ProgramArtifact<ComponentSFCProgramPayload>;
|
|
72
74
|
/** Компилирует один DataView source в Endge.program без запуска остальных compiler-фаз. */
|
|
73
75
|
buildDataView(entity: RDataView): ProgramArtifact<DataViewProgramPayload>;
|
|
74
76
|
/** Компилирует один Store source в Endge.program. */
|
|
@@ -77,6 +79,8 @@ export declare class EndgeCompiler_Module extends EndgeModule<EndgeBootContext>
|
|
|
77
79
|
buildStream(entity: RStream): ProgramArtifact<StreamSourceArtifact>;
|
|
78
80
|
/** Компилирует один Simulation source в Endge.program. */
|
|
79
81
|
buildSimulation(entity: RSimulation): ProgramArtifact<SimulationSourceArtifact>;
|
|
82
|
+
/** Компилирует черновик Simulation без публикации в общей Program. */
|
|
83
|
+
compileSimulationArtifact(entity: RSimulation): ProgramArtifact<SimulationSourceArtifact>;
|
|
80
84
|
/** Компилирует один дочерний Update source в Endge.program. */
|
|
81
85
|
buildUpdate(entity: RUpdate): ProgramArtifact<UpdateSourceArtifact>;
|
|
82
86
|
/** Компилирует один Filter source в Endge.program. */
|
|
@@ -5,6 +5,7 @@ type SyncRunner<T> = (input: unknown) => T;
|
|
|
5
5
|
export declare class ComputationResourceState<T = unknown> implements ComputationResourceContract<T> {
|
|
6
6
|
private readonly _asyncRunner;
|
|
7
7
|
private readonly _syncRunner;
|
|
8
|
+
private readonly _identity;
|
|
8
9
|
private _status;
|
|
9
10
|
private _value;
|
|
10
11
|
private _error;
|
|
@@ -12,11 +13,20 @@ export declare class ComputationResourceState<T = unknown> implements Computatio
|
|
|
12
13
|
private _revision;
|
|
13
14
|
private _disposed;
|
|
14
15
|
private _input;
|
|
15
|
-
constructor(input: unknown, _asyncRunner: AsyncRunner<T>, _syncRunner?: SyncRunner<T> | null);
|
|
16
|
+
constructor(input: unknown, _asyncRunner: AsyncRunner<T>, _syncRunner?: SyncRunner<T> | null, _identity?: string);
|
|
16
17
|
get status(): import('../../domain/types/computation/computation-runtime.types').ComputationResourceStatus;
|
|
17
18
|
get loading(): boolean;
|
|
18
19
|
get value(): T | undefined;
|
|
19
20
|
get error(): ComputationRuntimeErrorShape | null;
|
|
21
|
+
/** Снимок фактического результата для пассивного renderer debugger. */
|
|
22
|
+
snapshot(): {
|
|
23
|
+
identity: string;
|
|
24
|
+
input: unknown;
|
|
25
|
+
status: import('../../domain/types/computation/computation-runtime.types').ComputationResourceStatus;
|
|
26
|
+
loading: boolean;
|
|
27
|
+
value: T | undefined;
|
|
28
|
+
error: ComputationRuntimeErrorShape | null;
|
|
29
|
+
};
|
|
20
30
|
updateInput(input: unknown): void;
|
|
21
31
|
refresh(): Promise<void>;
|
|
22
32
|
subscribe(listener: VoidFunction): VoidFunction;
|
|
@@ -10,4 +10,13 @@ export declare class ComputationResourceRegistry {
|
|
|
10
10
|
/** Renderer освобождает завершившихся consumers, не затрагивая соседние scopes. */
|
|
11
11
|
releaseScope(scope: string, keep?: (key: string) => boolean): void;
|
|
12
12
|
dispose(): void;
|
|
13
|
+
/** Считывает ресурсы существующих consumers; новые вычисления не создаются. */
|
|
14
|
+
snapshot(): {
|
|
15
|
+
identity: string;
|
|
16
|
+
input: unknown;
|
|
17
|
+
status: import('../../domain/types/computation/computation-runtime.types').ComputationResourceStatus;
|
|
18
|
+
loading: boolean;
|
|
19
|
+
value: unknown;
|
|
20
|
+
error: import('../../domain/types/computation/computation-runtime.types').ComputationRuntimeErrorShape | null;
|
|
21
|
+
}[];
|
|
13
22
|
}
|
|
@@ -9,6 +9,8 @@ export declare class EndgeConfiguration_Module extends EndgeModule<EndgeBootCont
|
|
|
9
9
|
build(ctx: EndgeBootContext): void;
|
|
10
10
|
/** Очищает effective configuration перед следующим boot. */
|
|
11
11
|
reset(): void;
|
|
12
|
+
/** Принимает уже разрешённую конфигурацию клиента без build, команд и запуска приложения. */
|
|
13
|
+
applyInspection(configuration: EndgeConfiguration): void;
|
|
12
14
|
/** Включает effective configuration текущего build в диагностическое дерево. */
|
|
13
15
|
createDiagnosticsSnapshot(): EndgeConfiguration;
|
|
14
16
|
/** Возвращает effective configuration текущего build. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EndgeBootContext } from '../../kernel/types/bootstrap.types';
|
|
1
|
+
import { EndgeBootContext, EndgeBootMode } from '../../kernel/types/bootstrap.types';
|
|
2
2
|
import { EndgeConfiguration } from '../configuration/domain/types/configuration.type';
|
|
3
|
+
import { ContextEvent } from './domain/context-events.types';
|
|
3
4
|
import { EndgeContextPersistenceConfig, EndgeContextSnapshot, EndgeKeyboardContextSnapshot, EndgePersistenceScope, EndgeRuntimeContextSnapshot, EndgeSessionIdentityProvider, EndgeStorageAdapter } from './domain/context-persistence.types';
|
|
4
5
|
import { EndgeContextStateListener, EndgeContextStateTransform } from './domain/context-state.types';
|
|
5
6
|
import { EndgePersistenceInput } from './persistence/EndgeStorageAdapterRegistry';
|
|
@@ -33,7 +34,12 @@ export declare class EndgeContext_Module extends EndgeModule<EndgeBootContext> {
|
|
|
33
34
|
private _dataModeOverride;
|
|
34
35
|
private _sessionProvider;
|
|
35
36
|
private _isHydrating;
|
|
37
|
+
private _eventContext;
|
|
38
|
+
private _publishingContextChanges;
|
|
36
39
|
private _executionContextLocked;
|
|
40
|
+
private _bootMode;
|
|
41
|
+
private _beforeInspection;
|
|
42
|
+
get bootMode(): EndgeBootMode;
|
|
37
43
|
/** Создаёт контекст, регистрирует storage adapters и восстанавливает snapshot. */
|
|
38
44
|
constructor();
|
|
39
45
|
/** Применяет explicit structural context до load/build остальных модулей. */
|
|
@@ -61,8 +67,14 @@ export declare class EndgeContext_Module extends EndgeModule<EndgeBootContext> {
|
|
|
61
67
|
setKeyboardState(input: EndgeKeyboardContextSnapshot): void;
|
|
62
68
|
/** Сохраняет подписчиков legacy-модуля и проецирует постоянные поля контекста в Raph. */
|
|
63
69
|
notify(): void;
|
|
70
|
+
/** Применяет типизированное событие через setters, сохраняя их проверки и side effects. */
|
|
71
|
+
applyEvent(event: ContextEvent): void;
|
|
64
72
|
/** Восстанавливает execution scope из snapshot с безопасными defaults. */
|
|
65
73
|
deserialize(payload: Partial<EndgeContextSnapshot> | undefined): void;
|
|
74
|
+
/** Adopts observed scope only in memory; developer authorization stays with the host session. */
|
|
75
|
+
applyInspection(snapshot: EndgeContextSnapshot & {
|
|
76
|
+
dataMode?: EndgeDataMode;
|
|
77
|
+
}): void;
|
|
66
78
|
/** Сохраняет текущий context snapshot через выбранный adapter. */
|
|
67
79
|
saveToStorage(): void;
|
|
68
80
|
/** Загружает context snapshot из нового или legacy storage key. */
|
|
@@ -158,6 +170,11 @@ export declare class EndgeContext_Module extends EndgeModule<EndgeBootContext> {
|
|
|
158
170
|
private _resolveAdapter;
|
|
159
171
|
private _notifyState;
|
|
160
172
|
private _warnStateFailure;
|
|
173
|
+
/** Снимок фактических значений: session identities и effective data mode включены. */
|
|
174
|
+
private _readEventContext;
|
|
175
|
+
/** Constructor hydration задаёт baseline; последующие commits публикуют только изменения. */
|
|
176
|
+
private _publishContextChanges;
|
|
177
|
+
private _emitContextChange;
|
|
161
178
|
private _syncPersistentContextToRaph;
|
|
162
179
|
private _setRaphValueIfChanged;
|
|
163
180
|
/** Возвращает identity активного workspace для persistence scope. */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EndgeCoreEventMap } from '../../events/domain/events.types';
|
|
2
|
+
/** Событие для applyEvent с согласованными именем и типом payload. */
|
|
3
|
+
export type ContextEvent = {
|
|
4
|
+
[K in keyof EndgeCoreEventMap & `context:${string}`]: {
|
|
5
|
+
readonly name: K;
|
|
6
|
+
readonly payload: EndgeCoreEventMap[K];
|
|
7
|
+
};
|
|
8
|
+
}[keyof EndgeCoreEventMap & `context:${string}`];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EndgeBootContext } from '../../kernel/types/bootstrap.types';
|
|
2
2
|
import { DiagnosticsSnapshotRuntimeAdapter } from './domain/types/diagnostics-snapshot-runtime-adapter.type';
|
|
3
|
-
import { DiagnosticsSnapshot, DiagnosticsSnapshotOptions
|
|
3
|
+
import { DiagnosticsSnapshot, DiagnosticsSnapshotOptions } from './domain/types/diagnostics.types';
|
|
4
4
|
import { EndgeProblems_Module } from './EndgeProblems_Module';
|
|
5
5
|
import { EndgeTelemetry_Module } from './EndgeTelemetry_Module';
|
|
6
6
|
import { EndgeModule } from '../../../federation/EndgeModule';
|
|
@@ -8,7 +8,6 @@ import { EndgeModule } from '../../../federation/EndgeModule';
|
|
|
8
8
|
export declare class EndgeDiagnosticsSnapshots_Module extends EndgeModule<EndgeBootContext> {
|
|
9
9
|
private readonly _telemetry;
|
|
10
10
|
private readonly _problems;
|
|
11
|
-
private readonly _providers;
|
|
12
11
|
private readonly _runtimeAdapter;
|
|
13
12
|
private _automaticErrorTimestamps;
|
|
14
13
|
private _automaticCooldownUntil;
|
|
@@ -17,7 +16,7 @@ export declare class EndgeDiagnosticsSnapshots_Module extends EndgeModule<EndgeB
|
|
|
17
16
|
private _shortcutMatcher;
|
|
18
17
|
private _started;
|
|
19
18
|
/** Создаёт snapshots owner поверх telemetry, problems и platform adapter. */
|
|
20
|
-
constructor(_telemetry: EndgeTelemetry_Module, _problems: EndgeProblems_Module,
|
|
19
|
+
constructor(_telemetry: EndgeTelemetry_Module, _problems: EndgeProblems_Module, _runtimeAdapter?: DiagnosticsSnapshotRuntimeAdapter);
|
|
21
20
|
/** Восстанавливает internal policy subscriptions после telemetry build/reset. */
|
|
22
21
|
build(_ctx: EndgeBootContext): void;
|
|
23
22
|
/** Включает глобальную shortcut subscription только в live lifecycle. */
|
|
@@ -40,8 +39,6 @@ export declare class EndgeDiagnosticsSnapshots_Module extends EndgeModule<EndgeB
|
|
|
40
39
|
private _captureSection;
|
|
41
40
|
/** Сохраняет прежние top-level поля, получая их из нового дерева владельцев. */
|
|
42
41
|
private _federationOwnerSections;
|
|
43
|
-
/** Поддерживает независимое использование Diagnostics без владеющей Federation. */
|
|
44
|
-
private _legacyOwnerSections;
|
|
45
42
|
/** Применяет существующие content toggles к тяжёлым Core Modules до чтения их состояния. */
|
|
46
43
|
private _federationOptions;
|
|
47
44
|
/** Переносит snapshot Core Module в совместимое top-level поле без повторного сбора. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EndgeBootContext } from '../../kernel/types/bootstrap.types';
|
|
2
2
|
import { DiagnosticsAdapter, DiagnosticsAdapterFactory, DiagnosticsFlushResult } from './domain/types/diagnostics-adapter.type';
|
|
3
|
-
import { DiagnosticsContextProvider, DiagnosticsExceptionOptions, DiagnosticsFilter, DiagnosticsListener, DiagnosticsLogInput, DiagnosticsLogOptions, DiagnosticsLogRecord, DiagnosticsRecord, DiagnosticsResource, DiagnosticsSnapshot, DiagnosticsSnapshotOptions,
|
|
3
|
+
import { DiagnosticsContextProvider, DiagnosticsExceptionOptions, DiagnosticsFilter, DiagnosticsListener, DiagnosticsLogInput, DiagnosticsLogOptions, DiagnosticsLogRecord, DiagnosticsRecord, DiagnosticsResource, DiagnosticsSnapshot, DiagnosticsSnapshotOptions, DiagnosticsSpanHandle, DiagnosticsSpanOptions, DiagnosticsSpanRecord, DiagnosticsSubscribeOptions, EndgeDiagnosticsConfiguration } from './domain/types/diagnostics.types';
|
|
4
4
|
import { DiagnosticsAdapterRegistry } from './adapters/DiagnosticsAdapterRegistry';
|
|
5
5
|
import { EndgeDiagnosticsSnapshots_Module } from './EndgeDiagnosticsSnapshots_Module';
|
|
6
6
|
import { EndgeProblems_Module } from './EndgeProblems_Module';
|
|
@@ -25,7 +25,7 @@ export declare class EndgeDiagnostics_Module extends EndgeModule<EndgeBootContex
|
|
|
25
25
|
* ----------------------------------------
|
|
26
26
|
*/
|
|
27
27
|
/** Связывает независимые уведомления подмодулей с родительским diagnostics-модулем. */
|
|
28
|
-
constructor(
|
|
28
|
+
constructor();
|
|
29
29
|
/** Передаёт setup lifecycle подмодулям в порядке их зависимостей. */
|
|
30
30
|
setup(ctx: EndgeBootContext): Promise<void>;
|
|
31
31
|
/** Передаёт load lifecycle подмодулям в порядке их зависимостей. */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentSFCInteractionTriggerActivation } from '../../../domain/types/component/sfc/ir.types';
|
|
2
|
-
import { EndgeFederationDiagnosticsSnapshot, EndgeFederationDiagnosticsSnapshotOptions } from '../../../../../federation/types/federation.types';
|
|
3
2
|
/** Сигналы, которые поддерживает первая версия модуля диагностики. */
|
|
4
3
|
export type DiagnosticsSignal = 'log' | 'span';
|
|
5
4
|
/** Фаза жизненного цикла, в которой создана диагностическая запись. */
|
|
@@ -300,15 +299,6 @@ export interface DiagnosticsRaphSnapshotOptions {
|
|
|
300
299
|
includeData: boolean;
|
|
301
300
|
includeGraph: boolean;
|
|
302
301
|
}
|
|
303
|
-
/** Lazy providers state owners, подключаемые composition root ядра. */
|
|
304
|
-
export interface DiagnosticsSnapshotProviders {
|
|
305
|
-
federation?: (options: EndgeFederationDiagnosticsSnapshotOptions) => EndgeFederationDiagnosticsSnapshot;
|
|
306
|
-
effectiveConfiguration?: () => unknown;
|
|
307
|
-
domain?: () => unknown;
|
|
308
|
-
program?: () => unknown;
|
|
309
|
-
runtime?: () => unknown;
|
|
310
|
-
raph?: (options: DiagnosticsRaphSnapshotOptions) => unknown;
|
|
311
|
-
}
|
|
312
302
|
/** Ошибка чтения одной запрошенной части snapshot без отмены остальных частей. */
|
|
313
303
|
export interface DiagnosticsSnapshotCaptureError {
|
|
314
304
|
section: 'federation' | 'effectiveConfiguration' | 'domain' | 'program' | 'runtime' | 'raph';
|
|
@@ -166,6 +166,8 @@ export declare class EndgeDomain_Module extends EndgeModule<EndgeBootContext> {
|
|
|
166
166
|
* Объединяет доменные данные из JSON.
|
|
167
167
|
*/
|
|
168
168
|
merge(json: any): void;
|
|
169
|
+
/** Atomically replaces all collections after complete materialization; never compiles or executes Source. */
|
|
170
|
+
replaceFromPlain(json: unknown): void;
|
|
169
171
|
/** Заменяет сохранённую сущность, не меняя её позицию в коллекции домена. */
|
|
170
172
|
replacePersistedEntity(currentEntity: object, nextEntity: object): void;
|
|
171
173
|
private _entityIndexes;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DuplicateOptions, REntity } from './REntity';
|
|
2
|
-
/** Сохранённое source-first определение
|
|
2
|
+
/** Сохранённое source-first определение отдельного запуска Simulation. */
|
|
3
3
|
export declare class RSimulation extends REntity {
|
|
4
4
|
readonly type: "simulation";
|
|
5
5
|
source: string;
|
|
@@ -1,72 +1,22 @@
|
|
|
1
1
|
import { EventCallback, OneOrMany } from '@endge/utils';
|
|
2
|
-
import {
|
|
2
|
+
import { EndgeCoreEventMap, EndgeCustomEventMap, EndgeEvent, EndgePublishedEvent } from './domain/events.types';
|
|
3
3
|
import { EndgeModule } from '../../../federation/EndgeModule';
|
|
4
|
-
/**
|
|
5
|
-
* Модуль событий Endge.
|
|
6
|
-
* Инкапсулирует core/custom event bus и небольшой runtime-кеш последних событий.
|
|
7
|
-
*/
|
|
4
|
+
/** Синхронная шина Core: только подписки, без кеша событий и очереди доставки. */
|
|
8
5
|
export declare class EndgeEvents_Module extends EndgeModule {
|
|
9
|
-
static EVENTS_CACHE_SIZE: number;
|
|
10
6
|
private readonly _bus;
|
|
11
|
-
private
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
setCacheSize(next: number): void;
|
|
20
|
-
/**
|
|
21
|
-
* Внутренний helper модуля: make Cache.
|
|
22
|
-
*/
|
|
23
|
-
private _makeCache;
|
|
24
|
-
/**
|
|
25
|
-
* Возвращает текущую емкость кеша событий.
|
|
26
|
-
*/
|
|
27
|
-
get cacheSize(): number;
|
|
28
|
-
/**
|
|
29
|
-
* Возвращает количество событий, сохраненных в кеше.
|
|
30
|
-
*/
|
|
31
|
-
get cachedCount(): number;
|
|
32
|
-
/**
|
|
33
|
-
* Возвращает снимок кеша событий от старых к новым.
|
|
34
|
-
*/
|
|
35
|
-
get lastEvents(): CachedEvent[];
|
|
36
|
-
/**
|
|
37
|
-
* Очищает кеш последних событий.
|
|
38
|
-
*/
|
|
39
|
-
clearCache(): void;
|
|
40
|
-
/**
|
|
41
|
-
* Подписывает обработчик на типизированные core-события Endge.
|
|
42
|
-
*/
|
|
43
|
-
onEvent<K extends keyof EndgeCoreEventMap & string>(events: OneOrMany<K>, callback: (e: EndgeEvent<EndgeCoreEventMap[K]>) => void): () => void;
|
|
44
|
-
/**
|
|
45
|
-
* Публикует типизированное core-событие Endge.
|
|
46
|
-
*/
|
|
47
|
-
emitEvent<K extends keyof EndgeCoreEventMap & string>(event: K, payload: EndgeCoreEventMap[K], opts?: EndgeEmitOptions): EndgeEvent<EndgeCoreEventMap[K]>;
|
|
48
|
-
/**
|
|
49
|
-
* Подписывает обработчик на динамические пользовательские события.
|
|
50
|
-
*/
|
|
51
|
-
onDynamic<K extends keyof EndgeCustomEventMap & string>(events: OneOrMany<K>, callback: (e: EndgeEvent<EndgeCustomEventMap[K]>) => void): () => void;
|
|
52
|
-
/**
|
|
53
|
-
* Публикует динамическое пользовательское событие.
|
|
54
|
-
*/
|
|
55
|
-
emitDynamic<K extends keyof EndgeCustomEventMap & string>(event: K, payload: EndgeCustomEventMap[K], opts?: EndgeEmitOptions): EndgeEvent<EndgeCustomEventMap[K]>;
|
|
56
|
-
/**
|
|
57
|
-
* Подписывает raw-callback на core-события без обертки EndgeEvent.
|
|
58
|
-
*/
|
|
7
|
+
private readonly _observers;
|
|
8
|
+
private _sequence;
|
|
9
|
+
/** Подписывает наблюдателя на все последующие публикации. */
|
|
10
|
+
onAny(callback: (event: EndgePublishedEvent) => void): () => void;
|
|
11
|
+
onEvent<K extends keyof EndgeCoreEventMap & string>(events: OneOrMany<K>, callback: (event: EndgeEvent<EndgeCoreEventMap[K]>) => void): () => void;
|
|
12
|
+
emitEvent<K extends keyof EndgeCoreEventMap & string>(name: K, payload: EndgeCoreEventMap[K]): EndgePublishedEvent<EndgeCoreEventMap[K]>;
|
|
13
|
+
onDynamic<K extends keyof EndgeCustomEventMap & string>(events: OneOrMany<K>, callback: (event: EndgeEvent<EndgeCustomEventMap[K]>) => void): () => void;
|
|
14
|
+
emitDynamic<K extends keyof EndgeCustomEventMap & string>(name: K, payload: EndgeCustomEventMap[K]): EndgePublishedEvent<EndgeCustomEventMap[K]>;
|
|
59
15
|
on<K extends keyof EndgeCoreEventMap & string>(events: OneOrMany<K>, callback: EventCallback<EndgeCoreEventMap[K]>): void;
|
|
60
|
-
/**
|
|
61
|
-
* Снимает raw-callback с core-событий.
|
|
62
|
-
*/
|
|
63
16
|
off<K extends keyof EndgeCoreEventMap & string>(events: OneOrMany<K>, callback: EventCallback<EndgeCoreEventMap[K]>): void;
|
|
64
|
-
/**
|
|
65
|
-
* Подписывает raw-callback на пользовательские события.
|
|
66
|
-
*/
|
|
67
17
|
onCustom<K extends keyof EndgeCustomEventMap & string>(events: OneOrMany<K>, callback: EventCallback<EndgeCustomEventMap[K]>): void;
|
|
68
|
-
/**
|
|
69
|
-
* Снимает raw-callback с пользовательских событий.
|
|
70
|
-
*/
|
|
71
18
|
offCustom<K extends keyof EndgeCustomEventMap & string>(events: OneOrMany<K>, callback: EventCallback<EndgeCustomEventMap[K]>): void;
|
|
19
|
+
reset(): void;
|
|
20
|
+
private _publish;
|
|
21
|
+
private _reportListenerError;
|
|
72
22
|
}
|
|
@@ -1,22 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*/
|
|
1
|
+
import { RuntimeHostStatus } from '../../runtime/domain/runtime-host.types';
|
|
2
|
+
import { EndgeDataMode } from '../../workspace/domain/workspace.types';
|
|
3
|
+
/** Связка события и identity действия из Domain. */
|
|
4
4
|
export interface EndgeEventBinding {
|
|
5
5
|
event: string;
|
|
6
6
|
actionId: string | null;
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
name: AnyEventName;
|
|
12
|
-
payload: AnyPayload;
|
|
13
|
-
at: number;
|
|
8
|
+
export interface ContextValueChange<T> {
|
|
9
|
+
readonly previous: T;
|
|
10
|
+
readonly value: T;
|
|
14
11
|
}
|
|
15
|
-
|
|
16
|
-
[event: string]: unknown;
|
|
17
|
-
}
|
|
18
|
-
/** Статические события Endge Core. */
|
|
12
|
+
/** Статические события Endge Core о фактически произошедших изменениях. */
|
|
19
13
|
export interface EndgeCoreEventMap {
|
|
14
|
+
'context:workspace-changed': ContextValueChange<string | null>;
|
|
15
|
+
'context:tenant-changed': ContextValueChange<string>;
|
|
16
|
+
'context:project-changed': ContextValueChange<string>;
|
|
17
|
+
'context:environment-changed': ContextValueChange<string>;
|
|
18
|
+
'context:user-changed': ContextValueChange<string>;
|
|
19
|
+
'context:locale-changed': ContextValueChange<string>;
|
|
20
|
+
'context:theme-changed': ContextValueChange<string>;
|
|
21
|
+
'context:timezone-changed': ContextValueChange<string>;
|
|
22
|
+
'context:data-mode-changed': ContextValueChange<EndgeDataMode>;
|
|
23
|
+
'runtime:data-changed': {
|
|
24
|
+
readonly revision: number;
|
|
25
|
+
};
|
|
26
|
+
'runtime:registry-changed': Record<string, never>;
|
|
27
|
+
'runtime:scopes-changed': Record<string, never>;
|
|
28
|
+
'runtime:host-status-changed': {
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly previous: RuntimeHostStatus;
|
|
31
|
+
readonly value: RuntimeHostStatus;
|
|
32
|
+
};
|
|
20
33
|
'updates:message': {
|
|
21
34
|
type: string;
|
|
22
35
|
message: unknown;
|
|
@@ -26,15 +39,16 @@ export interface EndgeCoreEventMap {
|
|
|
26
39
|
count: number;
|
|
27
40
|
};
|
|
28
41
|
}
|
|
29
|
-
export interface
|
|
30
|
-
|
|
42
|
+
export interface EndgeCustomEventMap {
|
|
43
|
+
[event: string]: unknown;
|
|
31
44
|
}
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
*/
|
|
35
|
-
export declare class EndgeEvent<T> {
|
|
45
|
+
/** Уведомление о свершившемся факте не отменяет операцию owner-а. */
|
|
46
|
+
export interface EndgeEvent<T> {
|
|
36
47
|
readonly payload: T;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
48
|
+
}
|
|
49
|
+
/** Метаданные одной публикации. Историю хранит потребитель, а не шина. */
|
|
50
|
+
export interface EndgePublishedEvent<T = unknown> extends EndgeEvent<T> {
|
|
51
|
+
readonly name: string;
|
|
52
|
+
readonly at: number;
|
|
53
|
+
readonly sequence: number;
|
|
40
54
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { I18nRuntimeCatalog } from '../domain/i18n.types';
|
|
2
|
+
/** Одно разрешение translation catalog для живого и наблюдаемого renderer. */
|
|
3
|
+
export declare function resolveRuntimeTranslation(catalog: I18nRuntimeCatalog, key: string, locale: string, fallbackLocale: string, fallback?: string): string;
|
|
@@ -12,7 +12,7 @@ export declare class ComponentSFCEventBoundary {
|
|
|
12
12
|
private readonly _parentEventTransform?;
|
|
13
13
|
private readonly _requiredPortBindings;
|
|
14
14
|
private readonly _consumedLocalOnce;
|
|
15
|
-
constructor(_host: ComponentSFCRuntimeHost | null, componentIdentity: string, _manifest: ComponentSFCPortManifest, _parent?: ComponentSFCEventBoundary | null, _parentSource?: ComponentSFCEventRuntimeSource | undefined, _parentBindings?: readonly RComponentSFC_IR_EventBinding[], _parentEventTransform?: ((event: string, payload: unknown) => {
|
|
15
|
+
constructor(_host: Pick<ComponentSFCRuntimeHost, 'executeEventPortAction' | 'publishEventPort' | 'emit'> | null, componentIdentity: string, _manifest: ComponentSFCPortManifest, _parent?: ComponentSFCEventBoundary | null, _parentSource?: ComponentSFCEventRuntimeSource | undefined, _parentBindings?: readonly RComponentSFC_IR_EventBinding[], _parentEventTransform?: ((event: string, payload: unknown) => {
|
|
16
16
|
event: string;
|
|
17
17
|
payload: unknown;
|
|
18
18
|
} | null) | undefined, _requiredPortBindings?: readonly ComponentSFCRequiredPortBinding[]);
|
|
@@ -3,6 +3,7 @@ import { RuntimeScope } from './RuntimeScope';
|
|
|
3
3
|
import { EndgeModule } from '../../../federation/EndgeModule';
|
|
4
4
|
/** Индексирует runtime scopes и membership RuntimeHost. */
|
|
5
5
|
export declare class EndgeRuntimeScopes_Module extends EndgeModule {
|
|
6
|
+
private readonly _onChange;
|
|
6
7
|
private readonly _scopes;
|
|
7
8
|
private readonly _scopeByRuntime;
|
|
8
9
|
private readonly _scopeDisposers;
|
|
@@ -13,6 +14,10 @@ export declare class EndgeRuntimeScopes_Module extends EndgeModule {
|
|
|
13
14
|
* PUBLIC
|
|
14
15
|
* ----------------------------------------
|
|
15
16
|
*/
|
|
17
|
+
/** Получает уведомление владельца Runtime без обращения к Core при создании. */
|
|
18
|
+
constructor(_onChange?: () => void);
|
|
19
|
+
/** Публикует завершённое изменение scopes; состояние остаётся у их owners. */
|
|
20
|
+
notify(): void;
|
|
16
21
|
register(scope: RuntimeScope): RuntimeScope;
|
|
17
22
|
transaction<T>(operation: () => T): T;
|
|
18
23
|
get(id: string): RuntimeScope | null;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { EndgeBootContext } from '../../kernel/types/bootstrap.types';
|
|
1
2
|
import { RuntimeEntityType } from './domain/runtime-entity-map.types';
|
|
2
3
|
import { RuntimeExecuteOptions } from './domain/runtime-execute.type';
|
|
3
4
|
import { DestroyedRuntimeHostSnapshot, RuntimeHost, RuntimeInspectionLease } from './domain/runtime-host.types';
|
|
5
|
+
import { RuntimeControlOperation, RuntimeControlTarget, RuntimeInspectionSnapshot, RuntimeStatusChange } from './domain/runtime-inspection.types';
|
|
6
|
+
import { RuntimeRenderInspection } from './domain/runtime-render-inspection.types';
|
|
4
7
|
import { AnyRuntimeHost, AnyRuntimeStrategy } from './domain/runtime-strategy.types';
|
|
5
8
|
import { EndgeRuntimeRaphSnapshot, EndgeRuntimeSnapshot, RuntimeExecutableModel } from './domain/runtime.types';
|
|
6
9
|
import { RuntimeAppScopeOptions, RuntimeAppScope } from './RuntimeAppScope';
|
|
@@ -10,17 +13,27 @@ import { EndgeComposition } from './execution/endge-composition';
|
|
|
10
13
|
import { EndgeDataView } from './execution/endge-data-view';
|
|
11
14
|
import { EndgeProject } from './execution/endge-project';
|
|
12
15
|
import { EndgeQuery } from './execution/endge-query';
|
|
16
|
+
import { EndgeSimulation } from './execution/endge-simulation';
|
|
13
17
|
import { EndgeOperations_Module } from './operation/EndgeOperations_Module';
|
|
14
18
|
import { RuntimeScope } from './RuntimeScope';
|
|
15
19
|
import { EndgeModule } from '../../../federation/EndgeModule';
|
|
16
20
|
/** Модуль создания, регистрации и уничтожения runtime hosts и app scopes. */
|
|
17
|
-
export declare class EndgeRuntime_Module extends EndgeModule {
|
|
21
|
+
export declare class EndgeRuntime_Module extends EndgeModule<EndgeBootContext> {
|
|
18
22
|
readonly query: EndgeQuery;
|
|
19
23
|
readonly dataView: EndgeDataView;
|
|
20
24
|
readonly composition: EndgeComposition;
|
|
21
25
|
readonly project: EndgeProject;
|
|
26
|
+
readonly simulation: EndgeSimulation;
|
|
22
27
|
readonly operations: EndgeOperations_Module;
|
|
23
28
|
readonly scopes: EndgeRuntimeScopes_Module;
|
|
29
|
+
private readonly _onHostStatusChanged;
|
|
30
|
+
private readonly _onRenderChanged;
|
|
31
|
+
private _inspectionMode;
|
|
32
|
+
private _inspection;
|
|
33
|
+
private readonly _dataLeases;
|
|
34
|
+
private _unsubscribeData;
|
|
35
|
+
private _dataRevision;
|
|
36
|
+
private readonly _renderDataOff;
|
|
24
37
|
private _hosts;
|
|
25
38
|
private _strategies;
|
|
26
39
|
private _inited;
|
|
@@ -39,10 +52,12 @@ export declare class EndgeRuntime_Module extends EndgeModule {
|
|
|
39
52
|
acquireDestroyedHostSnapshots(limit: number): RuntimeInspectionLease;
|
|
40
53
|
/** Создаёт default app scope и регистрирует runtime strategies. */
|
|
41
54
|
constructor();
|
|
55
|
+
/** Уведомляет consumers об изменении реестра без передачи runtime data. */
|
|
56
|
+
notify(): void;
|
|
42
57
|
/**
|
|
43
58
|
* Настраивает Raph runtime до загрузки и сборки домена.
|
|
44
59
|
*/
|
|
45
|
-
setup(): void;
|
|
60
|
+
setup(ctx: EndgeBootContext): void;
|
|
46
61
|
/**
|
|
47
62
|
* Регистрирует runtime-фазы в Raph один раз.
|
|
48
63
|
*/
|
|
@@ -61,6 +76,7 @@ export declare class EndgeRuntime_Module extends EndgeModule {
|
|
|
61
76
|
registerStrategy(strategy: AnyRuntimeStrategy): void;
|
|
62
77
|
/** Создаёт или возвращает именованный root runtime scope приложения. */
|
|
63
78
|
createAppScope(options: RuntimeAppScopeOptions): RuntimeAppScope;
|
|
79
|
+
private _createAppScope;
|
|
64
80
|
/** Возвращает lifecycle scope, которому принадлежит RuntimeHost. */
|
|
65
81
|
getRuntimeScopeByHost(runtimeId: string): RuntimeScope | null;
|
|
66
82
|
/** Возвращает корневой scope обычного запуска приложения. */
|
|
@@ -110,6 +126,31 @@ export declare class EndgeRuntime_Module extends EndgeModule {
|
|
|
110
126
|
includeData: boolean;
|
|
111
127
|
includeGraph: boolean;
|
|
112
128
|
}): EndgeRuntimeRaphSnapshot;
|
|
129
|
+
/** JSON-safe проекция owner-а; Bridge задаёт частоту и набор передаваемых частей. */
|
|
130
|
+
captureInspection(includeData?: boolean): RuntimeInspectionSnapshot;
|
|
131
|
+
/** Прямой импорт факта: не создаёт hosts, не пишет Raph и не выполняет Commands. */
|
|
132
|
+
applyInspectionSnapshot(value: unknown): void;
|
|
133
|
+
/** Событие обновляет только известный экземпляр; новую структуру приносит следующий snapshot. */
|
|
134
|
+
applyInspectionEvent(change: RuntimeStatusChange): void;
|
|
135
|
+
/** Данные остаются снимком для чтения, даже когда локальный Raph уже существует. */
|
|
136
|
+
applyInspectionData(data: unknown, generatedAt: number, render?: RuntimeRenderInspection): void;
|
|
137
|
+
/** Ошибка передачи не маскируется под свежий или пустой снимок данных. */
|
|
138
|
+
applyInspectionDataError(message: string): void;
|
|
139
|
+
/** JSON-safe снимок только данных, без пересборки структуры и Raph graph. */
|
|
140
|
+
captureInspectionData(): {
|
|
141
|
+
data: unknown;
|
|
142
|
+
render?: RuntimeRenderInspection;
|
|
143
|
+
generatedAt: number;
|
|
144
|
+
};
|
|
145
|
+
/** Смена debug session удаляет прошлые данные, не затрагивая локальный runtime. */
|
|
146
|
+
clearInspection(): void;
|
|
147
|
+
get inspection(): Readonly<RuntimeInspectionSnapshot>;
|
|
148
|
+
/** Наблюдение Raph существует только пока у Runtime есть явный consumer. */
|
|
149
|
+
acquireDataChanges(): RuntimeInspectionLease;
|
|
150
|
+
/** Локальная операция над конкретным экземпляром; удалённый вызов идёт через Commands. */
|
|
151
|
+
control(operation: RuntimeControlOperation, input: RuntimeControlTarget): Promise<void>;
|
|
152
|
+
private _requireInspection;
|
|
153
|
+
private _observeRenderChanges;
|
|
113
154
|
/**
|
|
114
155
|
* Корректно разрушает runtime-host по runtime-id.
|
|
115
156
|
*/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentSFCRuntimeHost } from '../hosts/ComponentSFCRuntimeHost';
|
|
2
|
+
import { EndgeStyleSheetArtifact } from '../../styles/domain/types/style.types';
|
|
3
|
+
/** Renderer потребляет этот порт. Его реализация не обязана быть исполняемым RuntimeHost. */
|
|
4
|
+
export type ComponentSFCRenderPort = Pick<ComponentSFCRuntimeHost, 'id' | 'entityIdentity' | 'runtimeState' | 'getIr' | 'getArtifact' | 'getArtifactReader' | 'getComputationResource' | 'releaseComputationResources' | 'readDataMeta' | 'translate' | 'resolveVocabOptions' | 'getEditSession' | 'beginEditSession' | 'updateEditDraft' | 'commitEditSession' | 'cancelEditSession' | 'executeEventPortAction' | 'publishEventPort' | 'setInputSource' | 'on' | 'off' | 'emit'> & {
|
|
5
|
+
readonly readonly?: boolean;
|
|
6
|
+
readonly styleArtifacts?: readonly EndgeStyleSheetArtifact[];
|
|
7
|
+
readonly runtimeScopeIds?: readonly string[];
|
|
8
|
+
};
|
|
@@ -5,12 +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
|
/**
|
|
11
12
|
* Канонический перечень сущностей, для которых может существовать runtime-host.
|
|
12
13
|
*/
|
|
13
14
|
export interface RuntimeEntityModelMap {
|
|
15
|
+
/** Владелец отдельного запуска target с локальными подменами. */
|
|
16
|
+
'simulation': RSimulation;
|
|
14
17
|
/** Доменная модель проекта. */
|
|
15
18
|
'project': RProject;
|
|
16
19
|
/** Доменная модель страницы. */
|