@endge/core 9.0.0 → 11.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 +41944 -40206
- package/dist/features/core/kernel/config/debugger.config.d.ts +3 -0
- package/dist/features/core/kernel/config/kernel.config.d.ts +2 -2
- package/dist/features/core/kernel/config/modules.config.d.ts +6 -1
- package/dist/features/core/kernel/constants/kernel.constants.d.ts +1 -3
- package/dist/features/core/kernel/endge.d.ts +20 -6
- 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 +8 -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 +59 -4
- package/dist/features/core/modules/bridge/domain/bridge-sync.type.d.ts +30 -0
- 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 +38 -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/SetFacetCommand.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/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 +12 -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 +7 -6
- package/dist/features/core/modules/compiler/services/action/action-compile.d.ts +2 -0
- package/dist/features/core/modules/compiler/services/computation/computation-compile.d.ts +2 -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 +4 -2
- package/dist/features/core/modules/configuration/domain/endge-configuration.d.ts +1 -1
- package/dist/features/core/modules/configuration/domain/tooltip.config.d.ts +1 -1
- package/dist/features/core/modules/configuration/domain/types/configuration.type.d.ts +3 -1
- package/dist/features/core/modules/context/EndgeContext_Module.d.ts +33 -22
- package/dist/features/core/modules/context/domain/context-events.types.d.ts +8 -0
- package/dist/features/core/modules/context/domain/context-persistence.types.d.ts +8 -8
- package/dist/features/core/modules/domain/EndgeDomain_Module.d.ts +20 -201
- package/dist/features/core/modules/domain/documents/document-metadata.d.ts +7 -0
- package/dist/features/core/modules/domain/documents/domain-document-descriptors.d.ts +4 -10
- package/dist/features/core/modules/domain/documents/service-document-serializer.d.ts +0 -1
- package/dist/features/core/modules/domain/entities/RComponentBase.d.ts +0 -1
- package/dist/features/core/modules/domain/entities/RComposition.d.ts +1 -1
- package/dist/features/core/modules/domain/entities/REntity.d.ts +2 -0
- package/dist/features/core/modules/domain/entities/RFacet.d.ts +14 -0
- package/dist/features/core/modules/domain/entities/RFacetDocument.d.ts +12 -0
- package/dist/features/core/modules/domain/entities/RFolder.d.ts +5 -0
- package/dist/features/core/modules/domain/entities/RSimulation.d.ts +1 -1
- package/dist/features/core/modules/domain/entities/RWorkspace.d.ts +3 -1
- package/dist/features/core/modules/domain/types/document/codegen.types.d.ts +14 -4
- package/dist/features/core/modules/domain/types/document/document-metadata.types.d.ts +38 -0
- package/dist/features/core/modules/domain/types/document/document.types.d.ts +4 -15
- package/dist/features/core/modules/domain/types/document/domain-export.type.d.ts +4 -7
- package/dist/features/core/modules/domain/types/document/domain-provider.type.d.ts +48 -1
- package/dist/features/core/modules/domain/types/document/domain-snapshot.type.d.ts +6 -1
- package/dist/features/core/modules/domain/types/document/query.types.d.ts +0 -48
- package/dist/features/core/modules/domain-repository/EndgeDomainRepository_Module.d.ts +25 -2
- package/dist/features/core/modules/events/EndgeEvents_Module.d.ts +13 -63
- package/dist/features/core/modules/events/domain/events.types.d.ts +34 -22
- package/dist/features/core/modules/i18n/services/composition-i18n-catalog-projection.d.ts +1 -3
- package/dist/features/core/modules/i18n/tools/resolve-runtime-translation.d.ts +3 -0
- package/dist/features/core/modules/program/domain/types/program.types.d.ts +1 -1
- 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 +45 -8
- package/dist/features/core/modules/runtime/domain/component-sfc-render-port.types.d.ts +8 -0
- package/dist/features/core/modules/runtime/domain/execution-context.types.d.ts +5 -12
- package/dist/features/core/modules/runtime/domain/runtime-entity-map.types.d.ts +3 -3
- package/dist/features/core/modules/runtime/domain/runtime-host.types.d.ts +3 -4
- 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 -3
- 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/CompositionRuntimeHost.d.ts +2 -3
- 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/CompositionRuntimeStrategy.d.ts +1 -1
- package/dist/features/core/modules/runtime/services/strategies/SimulationRuntimeStrategy.d.ts +9 -0
- package/dist/features/core/modules/runtime/services/transports/BrowserWebSocketStreamTransportFactory.d.ts +6 -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/EndgeSource_Module.d.ts +2 -2
- package/dist/features/core/modules/source/domain/types/composition-source.types.d.ts +14 -1
- package/dist/features/core/modules/source/domain/types/configuration-source.types.d.ts +2 -0
- package/dist/features/core/modules/source/domain/types/simulation-source.types.d.ts +25 -7
- package/dist/features/core/modules/source/domain/types/source-engine.types.d.ts +9 -4
- package/dist/features/core/modules/source/domain/types/store-source.types.d.ts +2 -0
- package/dist/features/core/modules/source/domain/types/stream-source.types.d.ts +15 -1
- package/dist/features/core/modules/source/domain/types/type-source.types.d.ts +2 -0
- package/dist/features/core/modules/source/domain/types/update-source.types.d.ts +2 -0
- package/dist/features/core/modules/source/services/SimulationSourceResolver.d.ts +3 -2
- package/dist/features/core/modules/source/services/compilers/action-source-compile.d.ts +2 -0
- package/dist/features/core/modules/source/services/compilers/composition-source-compile.d.ts +1 -1
- package/dist/features/core/modules/source/services/component-sfc/component-sfc-metadata-source-patch.d.ts +2 -2
- package/dist/features/core/modules/source/services/strategies/CompositionSourceEngineStrategy.d.ts +2 -2
- package/dist/features/core/modules/source/services/strategies/SimulationSourceEngineStrategy.d.ts +2 -2
- package/dist/features/core/modules/source/templates/simulation.default.source.d.ts +2 -2
- package/dist/features/core/modules/workspace/EndgeWorkspace_Module.d.ts +2 -0
- package/dist/features/core/modules/workspace/domain/workspace.types.d.ts +5 -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 +22 -9
- package/package.json +3 -3
- package/dist/features/core/modules/domain/entities/REnvironment.d.ts +0 -9
- package/dist/features/core/modules/domain/entities/RParameter.d.ts +0 -11
- package/dist/features/core/modules/domain/entities/RProject.d.ts +0 -64
- package/dist/features/core/modules/domain/entities/RQueryFilter.d.ts +0 -12
- package/dist/features/core/modules/domain/entities/RTenant.d.ts +0 -10
- package/dist/features/core/modules/events/domain/EndgeEvent.d.ts +0 -33
- package/dist/features/core/modules/runtime/domain/runtime-project-session.types.d.ts +0 -31
- package/dist/features/core/modules/runtime/execution/endge-project.d.ts +0 -6
- package/dist/features/core/modules/runtime/hosts/ProjectRuntimeHost.d.ts +0 -21
- package/dist/features/core/modules/runtime/services/strategies/ProjectRuntimeStrategy.d.ts +0 -9
- package/dist/features/core/modules/source/templates/project.default.source.d.ts +0 -2
|
@@ -76,10 +76,8 @@ export interface ComponentSFCRuntimeHostContext extends RuntimeHostContextBase {
|
|
|
76
76
|
export interface PageRuntimeHostContext extends RuntimeHostContextBase {
|
|
77
77
|
lastRenderAt: string | null;
|
|
78
78
|
}
|
|
79
|
-
export interface ProjectRuntimeHostContext extends RuntimeHostContextBase {
|
|
80
|
-
lastRefreshAt: string | null;
|
|
81
|
-
}
|
|
82
79
|
export interface RuntimeHostContextMap {
|
|
80
|
+
'simulation': RuntimeHostContextBase;
|
|
83
81
|
'action': ActionRuntimeHostContext;
|
|
84
82
|
'query': QueryRuntimeHostContext;
|
|
85
83
|
'filter': FilterRuntimeHostContext;
|
|
@@ -88,7 +86,6 @@ export interface RuntimeHostContextMap {
|
|
|
88
86
|
'stream': StreamRuntimeHostContext;
|
|
89
87
|
'component-sfc': ComponentSFCRuntimeHostContext;
|
|
90
88
|
'page': PageRuntimeHostContext;
|
|
91
|
-
'project': ProjectRuntimeHostContext;
|
|
92
89
|
}
|
|
93
90
|
export type RuntimeHostContext<TType extends RuntimeEntityType> = RuntimeHostContextMap[TType];
|
|
94
91
|
export interface RuntimeHostSnapshot {
|
|
@@ -383,4 +380,6 @@ export interface RuntimeHost<TType extends RuntimeEntityType = RuntimeEntityType
|
|
|
383
380
|
update: (ctx: RuntimeHostUpdateContext) => Promise<void> | void;
|
|
384
381
|
/** Сериализовать host в снимок для UI/диагностики. */
|
|
385
382
|
snapshot: () => RuntimeHostSnapshot;
|
|
383
|
+
/** Чистый снимок привязок renderer, без запуска или изменения host. */
|
|
384
|
+
captureRenderInspection?: () => import('./runtime-render-inspection.types').RuntimeRenderableInspection;
|
|
386
385
|
}
|
|
@@ -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
|
+
}
|
|
@@ -3,16 +3,16 @@ import { RComponentSFC } from '../../domain/entities/RComponentSFC';
|
|
|
3
3
|
import { RComposition } from '../../domain/entities/RComposition';
|
|
4
4
|
import { RFilter } from '../../domain/entities/RFilter';
|
|
5
5
|
import { RPage } from '../../domain/entities/RPage';
|
|
6
|
-
import { RProject } from '../../domain/entities/RProject';
|
|
7
6
|
import { RQuery } from '../../domain/entities/RQuery';
|
|
7
|
+
import { RSimulation } from '../../domain/entities/RSimulation';
|
|
8
8
|
import { RStore } from '../../domain/entities/RStore';
|
|
9
9
|
import { RStream } from '../../domain/entities/RStream';
|
|
10
10
|
import { RuntimeHostRegistrySnapshot } from './runtime-registry.types';
|
|
11
11
|
/**
|
|
12
12
|
* Виды runtime
|
|
13
13
|
*/
|
|
14
|
-
export type RuntimeKind = 'query' | 'filter' | 'composition' | 'store' | 'stream' | 'action' | 'runtime';
|
|
15
|
-
export type RuntimeExecutableModel = RQuery | RAction |
|
|
14
|
+
export type RuntimeKind = 'query' | 'filter' | 'composition' | 'store' | 'stream' | 'action' | 'simulation' | 'runtime';
|
|
15
|
+
export type RuntimeExecutableModel = RQuery | RAction | RPage | RComponentSFC | RFilter | RComposition | RStore | RStream | RSimulation;
|
|
16
16
|
export interface EndgeRuntimeSnapshot extends RuntimeHostRegistrySnapshot {
|
|
17
17
|
generatedAt: number;
|
|
18
18
|
scopes: import('./runtime-scope.types').RuntimeScopeSnapshot[];
|
|
@@ -20,6 +20,7 @@ export interface EndgeRuntimeSnapshot extends RuntimeHostRegistrySnapshot {
|
|
|
20
20
|
/** Опциональные данные и graph-состояние Raph для диагностического snapshot. */
|
|
21
21
|
export interface EndgeRuntimeRaphSnapshot {
|
|
22
22
|
data?: unknown;
|
|
23
|
+
render?: import('./runtime-render-inspection.types').RuntimeRenderInspection;
|
|
23
24
|
graph?: {
|
|
24
25
|
runtimeId: string;
|
|
25
26
|
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 с Composition target через общий runtime registry и lifecycle. */
|
|
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;
|
|
@@ -9,7 +9,7 @@ import { StoreMutationPlan } from '../../source/domain/types/update-source.types
|
|
|
9
9
|
import { RuntimeHostBase } from '../RuntimeHostBase';
|
|
10
10
|
import { RuntimeScope } from '../RuntimeScope';
|
|
11
11
|
/** Runtime orchestration host: children, bindings, hooks и public handles. */
|
|
12
|
-
export declare class CompositionRuntimeHost
|
|
12
|
+
export declare class CompositionRuntimeHost extends RuntimeHostBase<'composition', RuntimeHostContext<'composition'>, CompositionProgramPayload> {
|
|
13
13
|
private _mountPromise;
|
|
14
14
|
private _destroyPromise;
|
|
15
15
|
private _children;
|
|
@@ -41,8 +41,7 @@ export declare class CompositionRuntimeHost<TType extends 'composition' | 'proje
|
|
|
41
41
|
private _mountCancelled;
|
|
42
42
|
constructor(input: {
|
|
43
43
|
id: string;
|
|
44
|
-
model: RuntimeEntityModelMap[
|
|
45
|
-
entityType?: TType;
|
|
44
|
+
model: RuntimeEntityModelMap['composition'];
|
|
46
45
|
parent?: RuntimeHost<any, any> | null;
|
|
47
46
|
meta?: Record<string, unknown>;
|
|
48
47
|
artifactReader: RuntimeArtifactReader;
|
|
@@ -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 | 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>;
|
|
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
|
-
/**
|
|
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;
|
package/dist/features/core/modules/runtime/services/simulation/prepare-simulation-overrides.d.ts
ADDED
|
@@ -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;
|
package/dist/features/core/modules/runtime/services/strategies/CompositionRuntimeStrategy.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export declare class CompositionRuntimeStrategy implements RuntimeStrategy<RComp
|
|
|
5
5
|
readonly id = "runtime:composition";
|
|
6
6
|
readonly entityType: "composition";
|
|
7
7
|
supports(model: unknown): model is RComposition;
|
|
8
|
-
create(ctx: Parameters<RuntimeStrategy<RComposition, CompositionRuntimeHost>['create']>[0]): CompositionRuntimeHost
|
|
8
|
+
create(ctx: Parameters<RuntimeStrategy<RComposition, CompositionRuntimeHost>['create']>[0]): CompositionRuntimeHost | null;
|
|
9
9
|
}
|
|
@@ -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,6 @@
|
|
|
1
|
+
import { StreamTransportConnection, StreamTransportFactory } from '../../domain/stream-runtime.types';
|
|
2
|
+
/** Владеет WebSocket, повторной подпиской и таймером переподключения одного Stream. */
|
|
3
|
+
export declare class BrowserWebSocketStreamTransportFactory implements StreamTransportFactory {
|
|
4
|
+
/** Открывает JSON transport; close отменяет reconnect и все callbacks соединения. */
|
|
5
|
+
open(artifact: Parameters<StreamTransportFactory['open']>[0], callbacks: Parameters<StreamTransportFactory['open']>[1]): StreamTransportConnection;
|
|
6
|
+
}
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import { SourceDocumentReference, SourceEngineCompileResult, SourceEngineGenerateResult, SourceEngineStrategy, SourceKind, SourceLanguageCompletion, SourceLanguageContext, SourceLanguageInlineHint, SourceLanguageSemanticHighlight, SourceLanguageSignatureHelp, SourceLanguageStrategy, SourceLanguageValidationResult, SourceParseResult, SourcePatchResult, SourcePatchStrategy } from './domain/types/source-engine.types';
|
|
1
|
+
import { SourceDocumentReference, SourceEngineCompileContext, SourceEngineCompileResult, SourceEngineGenerateResult, SourceEngineStrategy, SourceKind, SourceLanguageCompletion, SourceLanguageContext, SourceLanguageInlineHint, SourceLanguageSemanticHighlight, SourceLanguageSignatureHelp, SourceLanguageStrategy, SourceLanguageValidationResult, SourceParseResult, SourcePatchResult, SourcePatchStrategy } from './domain/types/source-engine.types';
|
|
2
2
|
import { EndgeModule } from '../../../federation/EndgeModule';
|
|
3
3
|
/** Модуль authoring-операций над source-документами Endge. */
|
|
4
4
|
export declare class EndgeSource_Module extends EndgeModule {
|
|
@@ -28,7 +28,7 @@ export declare class EndgeSource_Module extends EndgeModule {
|
|
|
28
28
|
/** Генерирует source для указанного source-kind через зарегистрированную strategy. */
|
|
29
29
|
generate(sourceKind: SourceKind | string, model: unknown): SourceEngineGenerateResult;
|
|
30
30
|
/** Компилирует source указанного source-kind в normalized document и artifact payload. */
|
|
31
|
-
compile(sourceKind: SourceKind | string, source: string): SourceEngineCompileResult;
|
|
31
|
+
compile(sourceKind: SourceKind | string, source: string, context?: SourceEngineCompileContext): SourceEngineCompileResult;
|
|
32
32
|
/** Парсит source указанного source-kind в normalized editor document. */
|
|
33
33
|
parse<TDocument = unknown>(sourceKind: SourceKind | string, source: string): SourceParseResult<TDocument>;
|
|
34
34
|
/** Патчит source указанного source-kind, сохраняя нетронутые участки авторского кода. */
|
|
@@ -163,6 +163,19 @@ export interface CompositionRuntimeDescriptor {
|
|
|
163
163
|
};
|
|
164
164
|
kind: CompositionRuntimeKind;
|
|
165
165
|
identity: string;
|
|
166
|
+
/** Compiler-resolved selector metadata. Runtime executes only kind/identity above. */
|
|
167
|
+
contextSwitch?: {
|
|
168
|
+
selected: 'default' | number;
|
|
169
|
+
default: {
|
|
170
|
+
kind: CompositionRuntimeKind;
|
|
171
|
+
identity: string;
|
|
172
|
+
};
|
|
173
|
+
cases: Array<{
|
|
174
|
+
when: Readonly<Record<string, string>>;
|
|
175
|
+
kind: CompositionRuntimeKind;
|
|
176
|
+
identity: string;
|
|
177
|
+
}>;
|
|
178
|
+
};
|
|
166
179
|
/** Явный override в месте вызова runtime. */
|
|
167
180
|
activationOverride: CompositionActivationDescriptor | null;
|
|
168
181
|
/** Compiler-linked activation, которую runtime применяет без интерпретации source. */
|
|
@@ -375,7 +388,7 @@ export interface CompositionRuntimeOutputHandle {
|
|
|
375
388
|
output?: string;
|
|
376
389
|
}
|
|
377
390
|
/** Публичный контракт Composition host без зависимости Domain от concrete Model runtime. */
|
|
378
|
-
export interface CompositionRuntimeHostHandle
|
|
391
|
+
export interface CompositionRuntimeHostHandle extends RuntimeHost<'composition', any, CompositionProgramPayload> {
|
|
379
392
|
mountGraph: () => Promise<void>;
|
|
380
393
|
getChild: (name: string) => RuntimeHost<any, any> | null;
|
|
381
394
|
getChildren: () => CompositionRuntimeChildHandle[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
|
|
1
2
|
import { ProgramDiagnostic } from '../../../program/domain/types/program.types';
|
|
2
3
|
import { TypeSourceExpression } from './type-source.types';
|
|
3
4
|
/** Сохраняемое JSON-сериализуемое значение конфигурации. */
|
|
@@ -33,6 +34,7 @@ export interface ConfigurationSourceCompileResult {
|
|
|
33
34
|
document: ConfigurationSourceDocument | null;
|
|
34
35
|
/** Best-effort проекция AST для визуального исправления, когда семантическая диагностика блокирует компиляцию. */
|
|
35
36
|
draftDocument?: ConfigurationSourceDocument | null;
|
|
37
|
+
metadata: ProgramMetadataMap;
|
|
36
38
|
diagnostics: Omit<ProgramDiagnostic, 'entityRef'>[];
|
|
37
39
|
}
|
|
38
40
|
export interface EndgeConfigurationSchemaEntry {
|
|
@@ -1,24 +1,42 @@
|
|
|
1
|
+
import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
|
|
1
2
|
import { ProgramDependency, ProgramDiagnostic } from '../../../program/domain/types/program.types';
|
|
2
|
-
/** Декларация
|
|
3
|
+
/** Декларация подмены response Query. Генерация выполняется при запуске Simulation. */
|
|
3
4
|
export interface SimulationMockRequest {
|
|
4
5
|
kind: 'mock-request';
|
|
5
6
|
seed?: string;
|
|
7
|
+
/** false исключает примеры Type из схемы; ограничения и enum сохраняются. */
|
|
8
|
+
useExamples?: boolean;
|
|
6
9
|
arrays: Record<string, number>;
|
|
7
10
|
}
|
|
11
|
+
/** Ограничения сценария сужают существующий Type, не создавая новый Domain Type. */
|
|
12
|
+
export interface SimulationFieldConstraints {
|
|
13
|
+
enum?: Array<string | number | boolean>;
|
|
14
|
+
minimum?: number;
|
|
15
|
+
maximum?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface SimulationMockStream {
|
|
18
|
+
kind: 'mock-stream';
|
|
19
|
+
type: string;
|
|
20
|
+
event: string;
|
|
21
|
+
seed?: string;
|
|
22
|
+
intervalMs: number;
|
|
23
|
+
itemsPerMessage: number;
|
|
24
|
+
fields: Record<string, SimulationFieldConstraints>;
|
|
25
|
+
}
|
|
8
26
|
export interface SimulationRuntimeOverride {
|
|
9
27
|
alias: string;
|
|
10
28
|
runtimes?: SimulationRuntimeOverride[];
|
|
11
29
|
request?: SimulationMockRequest;
|
|
30
|
+
stream?: SimulationMockStream;
|
|
12
31
|
}
|
|
13
|
-
export
|
|
32
|
+
export interface SimulationTargetReference {
|
|
14
33
|
entityType: 'composition';
|
|
15
34
|
identity: string;
|
|
16
|
-
}
|
|
17
|
-
entityType: 'project';
|
|
18
|
-
identity: string;
|
|
19
|
-
};
|
|
35
|
+
}
|
|
20
36
|
export interface SimulationSourceDocument {
|
|
21
37
|
target: SimulationTargetReference;
|
|
38
|
+
/** Режим неподменённых источников. Отсутствие значения сохраняет наследование. */
|
|
39
|
+
dataMode?: 'live' | 'mock';
|
|
22
40
|
runtimes: SimulationRuntimeOverride[];
|
|
23
41
|
}
|
|
24
42
|
export interface SimulationSourceArtifact extends SimulationSourceDocument {
|
|
@@ -29,6 +47,7 @@ export interface SimulationSourceCompileResult {
|
|
|
29
47
|
ast: unknown | null;
|
|
30
48
|
document: SimulationSourceDocument | null;
|
|
31
49
|
artifact: SimulationSourceArtifact | null;
|
|
50
|
+
metadata: ProgramMetadataMap;
|
|
32
51
|
diagnostics: Omit<ProgramDiagnostic, 'entityRef'>[];
|
|
33
52
|
dependencies: ProgramDependency[];
|
|
34
53
|
locations: Record<string, {
|
|
@@ -46,7 +65,6 @@ export interface SimulationSourceInput {
|
|
|
46
65
|
isPrimitive?: boolean;
|
|
47
66
|
}
|
|
48
67
|
export interface SimulationSourceCatalog {
|
|
49
|
-
projects: readonly SimulationSourceInput[];
|
|
50
68
|
compositions: readonly SimulationSourceInput[];
|
|
51
69
|
queries: readonly SimulationSourceInput[];
|
|
52
70
|
types: readonly SimulationSourceInput[];
|
|
@@ -2,6 +2,11 @@ import { I18nCatalogProvenance, I18nRuntimeCatalog } from '../../../i18n/domain/
|
|
|
2
2
|
import { TypeSourceDefinition } from './type-source.types';
|
|
3
3
|
/** Канонический тип source-документа, для которого выбирается source strategy. */
|
|
4
4
|
export type SourceKind = 'action' | 'query' | 'vocab' | 'data-view' | 'filter' | 'composition' | 'store' | 'stream' | 'simulation' | 'update' | 'computation' | 'style' | 'type' | 'configuration';
|
|
5
|
+
/** Compiler-owned structural context for context-sensitive Source resolution. */
|
|
6
|
+
export interface SourceEngineCompileContext {
|
|
7
|
+
sourceVersion?: number;
|
|
8
|
+
executionContext?: Readonly<Record<string, string>>;
|
|
9
|
+
}
|
|
5
10
|
/** Тип нейтральной source completion без привязки к Monaco или другому editor API. */
|
|
6
11
|
export type SourceLanguageCompletionKind = 'keyword' | 'function' | 'property' | 'value' | 'snippet';
|
|
7
12
|
/** Позиция курсора внутри source-документа. */
|
|
@@ -37,10 +42,10 @@ export interface SourceLanguageContext {
|
|
|
37
42
|
}>;
|
|
38
43
|
/** Identity документа, владеющего текущей диагностикой Source. */
|
|
39
44
|
ownerIdentity?: string;
|
|
40
|
-
/** Фактические каталоги переводов для всех текущих вхождений
|
|
45
|
+
/** Фактические каталоги переводов для всех текущих вхождений стартовой Composition. */
|
|
41
46
|
i18n?: SourceLanguageI18nContext;
|
|
42
47
|
}
|
|
43
|
-
/** Одно статически спроецированное вхождение Composition в текущем
|
|
48
|
+
/** Одно статически спроецированное вхождение Composition в текущем дереве. */
|
|
44
49
|
export interface SourceLanguageI18nOccurrence {
|
|
45
50
|
id: string;
|
|
46
51
|
catalogsByScope: Readonly<Record<string, I18nRuntimeCatalog>>;
|
|
@@ -78,7 +83,7 @@ export interface SourceLanguageSignatureHelp {
|
|
|
78
83
|
}>;
|
|
79
84
|
}
|
|
80
85
|
/** Логический тип внешнего доменного документа, на который ссылается source. */
|
|
81
|
-
export type SourceDocumentReferenceTarget = 'action' | 'auth-profile' | 'component' | 'composition' | 'computation' | 'converter' | 'data-view' | 'filter' | 'i18n-bundles' | '
|
|
86
|
+
export type SourceDocumentReferenceTarget = 'action' | 'auth-profile' | 'component' | 'composition' | 'computation' | 'converter' | 'data-view' | 'filter' | 'i18n-bundles' | 'mock' | 'query' | 'store' | 'stream' | 'update' | 'style' | 'type' | 'vocabs';
|
|
82
87
|
/** Семантическая ссылка из source на внешний доменный документ. */
|
|
83
88
|
export interface SourceDocumentReference {
|
|
84
89
|
/** Логический тип цели; UI может уточнить concrete document type через domain. */
|
|
@@ -189,7 +194,7 @@ export interface SourceEngineStrategy {
|
|
|
189
194
|
/** Генерирует source из persisted/legacy модели. */
|
|
190
195
|
generate?: (model: unknown) => SourceEngineGenerateResult;
|
|
191
196
|
/** Компилирует source в normalized document и artifact payload. */
|
|
192
|
-
compile?: (source: string) => SourceEngineCompileResult;
|
|
197
|
+
compile?: (source: string, context?: SourceEngineCompileContext) => SourceEngineCompileResult;
|
|
193
198
|
}
|
|
194
199
|
/** Нейтральный token pattern source-языка, не завязанный на Monaco API. */
|
|
195
200
|
export interface SourceLanguageTokenPattern {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { EndgeMockReference } from '../../../mock/domain/types/mock-data.type';
|
|
2
|
+
import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
|
|
2
3
|
import { ProgramDiagnostic } from '../../../program/domain/types/program.types';
|
|
3
4
|
import { DataViewRef } from './data-view-source.types';
|
|
4
5
|
import { SourceFieldDefinition } from './source-expression.types';
|
|
@@ -39,5 +40,6 @@ export interface StoreSourceCompileResult {
|
|
|
39
40
|
ast: unknown | null;
|
|
40
41
|
document: StoreSourceDocument | null;
|
|
41
42
|
artifact: StoreSourceArtifact | null;
|
|
43
|
+
metadata: ProgramMetadataMap;
|
|
42
44
|
diagnostics: Omit<ProgramDiagnostic, 'entityRef'>[];
|
|
43
45
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
|
|
1
2
|
import { ProgramDiagnostic } from '../../../program/domain/types/program.types';
|
|
2
3
|
export interface StreamSseTransportDescriptor {
|
|
3
4
|
kind: 'sse';
|
|
@@ -6,12 +7,24 @@ export interface StreamSseTransportDescriptor {
|
|
|
6
7
|
authMode: 'inherit' | 'profile' | 'none';
|
|
7
8
|
authProfileIdentity: string | null;
|
|
8
9
|
}
|
|
9
|
-
export type
|
|
10
|
+
export type StreamJsonValue = string | number | boolean | null | StreamJsonValue[] | {
|
|
11
|
+
[key: string]: StreamJsonValue;
|
|
12
|
+
};
|
|
13
|
+
export interface StreamWebSocketTransportDescriptor {
|
|
14
|
+
kind: 'websocket';
|
|
15
|
+
url: string;
|
|
16
|
+
onOpen: StreamJsonValue[];
|
|
17
|
+
}
|
|
18
|
+
export type StreamTransportDescriptor = StreamSseTransportDescriptor | StreamWebSocketTransportDescriptor;
|
|
10
19
|
export interface StreamEventDescriptor {
|
|
11
20
|
sourceEvent: string;
|
|
12
21
|
type: string | null;
|
|
13
22
|
typePath: string | null;
|
|
14
23
|
payloadPath: string | null;
|
|
24
|
+
/** Точные значения по dot-path исходного сообщения, проверяемые до eachFrom. */
|
|
25
|
+
match?: Record<string, string | number | boolean | null>;
|
|
26
|
+
/** Путь к массиву; typePath и payloadPath читаются относительно каждого элемента. */
|
|
27
|
+
eachFrom?: string;
|
|
15
28
|
}
|
|
16
29
|
export interface StreamSourceDocument {
|
|
17
30
|
transport: StreamTransportDescriptor;
|
|
@@ -26,6 +39,7 @@ export interface StreamSourceCompileResult {
|
|
|
26
39
|
ast: unknown | null;
|
|
27
40
|
document: StreamSourceDocument | null;
|
|
28
41
|
artifact: StreamSourceArtifact | null;
|
|
42
|
+
metadata: ProgramMetadataMap;
|
|
29
43
|
diagnostics: Omit<ProgramDiagnostic, 'entityRef'>[];
|
|
30
44
|
}
|
|
31
45
|
export interface StreamEventEnvelope {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
|
|
1
2
|
import { ProgramDiagnostic } from '../../../program/domain/types/program.types';
|
|
2
3
|
/** Ссылка Type Source на примитивный или пользовательский тип домена. */
|
|
3
4
|
export interface TypeSourceReference {
|
|
@@ -76,5 +77,6 @@ export interface TypeSourceCompileResult {
|
|
|
76
77
|
ast: unknown | null;
|
|
77
78
|
document: TypeSourceDocument | null;
|
|
78
79
|
artifact: TypeProgramPayload | null;
|
|
80
|
+
metadata: ProgramMetadataMap;
|
|
79
81
|
diagnostics: Omit<ProgramDiagnostic, 'entityRef'>[];
|
|
80
82
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
|
|
1
2
|
import { ProgramDiagnostic } from '../../../program/domain/types/program.types';
|
|
2
3
|
import { SourceExpressionIR } from './source-expression.types';
|
|
3
4
|
export type UpdateMutationStrategy = 'set' | 'merge' | 'replace' | 'append' | 'remove';
|
|
@@ -27,6 +28,7 @@ export interface UpdateSourceCompileResult {
|
|
|
27
28
|
ast: unknown | null;
|
|
28
29
|
document: UpdateSourceDocument | null;
|
|
29
30
|
artifact: Omit<UpdateSourceArtifact, 'storeIdentity'> | null;
|
|
31
|
+
metadata: ProgramMetadataMap;
|
|
30
32
|
diagnostics: Omit<ProgramDiagnostic, 'entityRef'>[];
|
|
31
33
|
}
|
|
32
34
|
export interface StoreMutationPlan {
|