@endge/core 10.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.
Files changed (82) hide show
  1. package/dist/core.js +28591 -28384
  2. package/dist/features/core/kernel/config/kernel.config.d.ts +2 -2
  3. package/dist/features/core/kernel/constants/kernel.constants.d.ts +1 -3
  4. package/dist/features/core/kernel/types/bootstrap.types.d.ts +1 -1
  5. package/dist/features/core/modules/bridge/config/bridge.config.d.ts +12 -0
  6. package/dist/features/core/modules/bridge/debug/EndgeBridgeDebug_Module.d.ts +4 -1
  7. package/dist/features/core/modules/commands/domain/commands.types.d.ts +3 -8
  8. package/dist/features/core/modules/commands/services/context/SetFacetCommand.d.ts +9 -0
  9. package/dist/features/core/modules/commands/types/context-command-target.type.d.ts +1 -3
  10. package/dist/features/core/modules/compiler/EndgeCompiler_Module.d.ts +3 -6
  11. package/dist/features/core/modules/compiler/services/action/action-compile.d.ts +2 -0
  12. package/dist/features/core/modules/compiler/services/computation/computation-compile.d.ts +2 -0
  13. package/dist/features/core/modules/configuration/EndgeConfiguration_Module.d.ts +2 -2
  14. package/dist/features/core/modules/configuration/domain/endge-configuration.d.ts +1 -1
  15. package/dist/features/core/modules/configuration/domain/tooltip.config.d.ts +1 -1
  16. package/dist/features/core/modules/configuration/domain/types/configuration.type.d.ts +3 -1
  17. package/dist/features/core/modules/context/EndgeContext_Module.d.ts +15 -21
  18. package/dist/features/core/modules/context/domain/context-persistence.types.d.ts +8 -8
  19. package/dist/features/core/modules/domain/EndgeDomain_Module.d.ts +18 -201
  20. package/dist/features/core/modules/domain/documents/document-metadata.d.ts +7 -0
  21. package/dist/features/core/modules/domain/documents/domain-document-descriptors.d.ts +4 -10
  22. package/dist/features/core/modules/domain/documents/service-document-serializer.d.ts +0 -1
  23. package/dist/features/core/modules/domain/entities/RComponentBase.d.ts +0 -1
  24. package/dist/features/core/modules/domain/entities/RComposition.d.ts +1 -1
  25. package/dist/features/core/modules/domain/entities/REntity.d.ts +2 -0
  26. package/dist/features/core/modules/domain/entities/RFacet.d.ts +14 -0
  27. package/dist/features/core/modules/domain/entities/RFacetDocument.d.ts +12 -0
  28. package/dist/features/core/modules/domain/entities/RFolder.d.ts +5 -0
  29. package/dist/features/core/modules/domain/entities/RWorkspace.d.ts +3 -1
  30. package/dist/features/core/modules/domain/types/document/codegen.types.d.ts +14 -4
  31. package/dist/features/core/modules/domain/types/document/document-metadata.types.d.ts +38 -0
  32. package/dist/features/core/modules/domain/types/document/document.types.d.ts +4 -15
  33. package/dist/features/core/modules/domain/types/document/domain-export.type.d.ts +4 -7
  34. package/dist/features/core/modules/domain/types/document/domain-provider.type.d.ts +48 -1
  35. package/dist/features/core/modules/domain/types/document/domain-snapshot.type.d.ts +6 -1
  36. package/dist/features/core/modules/domain/types/document/query.types.d.ts +0 -48
  37. package/dist/features/core/modules/domain-repository/EndgeDomainRepository_Module.d.ts +25 -2
  38. package/dist/features/core/modules/events/domain/events.types.d.ts +1 -3
  39. package/dist/features/core/modules/i18n/services/composition-i18n-catalog-projection.d.ts +1 -3
  40. package/dist/features/core/modules/program/domain/types/program.types.d.ts +1 -1
  41. package/dist/features/core/modules/runtime/EndgeRuntime_Module.d.ts +2 -6
  42. package/dist/features/core/modules/runtime/domain/execution-context.types.d.ts +5 -12
  43. package/dist/features/core/modules/runtime/domain/runtime-entity-map.types.d.ts +0 -3
  44. package/dist/features/core/modules/runtime/domain/runtime-host.types.d.ts +0 -4
  45. package/dist/features/core/modules/runtime/domain/runtime.types.d.ts +1 -2
  46. package/dist/features/core/modules/runtime/execution/endge-simulation.d.ts +1 -1
  47. package/dist/features/core/modules/runtime/hosts/CompositionRuntimeHost.d.ts +2 -3
  48. package/dist/features/core/modules/runtime/hosts/SimulationRuntimeHost.d.ts +2 -2
  49. package/dist/features/core/modules/runtime/services/strategies/CompositionRuntimeStrategy.d.ts +1 -1
  50. package/dist/features/core/modules/runtime/services/transports/BrowserWebSocketStreamTransportFactory.d.ts +6 -0
  51. package/dist/features/core/modules/source/EndgeSource_Module.d.ts +2 -2
  52. package/dist/features/core/modules/source/domain/types/composition-source.types.d.ts +14 -1
  53. package/dist/features/core/modules/source/domain/types/configuration-source.types.d.ts +2 -0
  54. package/dist/features/core/modules/source/domain/types/simulation-source.types.d.ts +4 -6
  55. package/dist/features/core/modules/source/domain/types/source-engine.types.d.ts +9 -4
  56. package/dist/features/core/modules/source/domain/types/store-source.types.d.ts +2 -0
  57. package/dist/features/core/modules/source/domain/types/stream-source.types.d.ts +15 -1
  58. package/dist/features/core/modules/source/domain/types/type-source.types.d.ts +2 -0
  59. package/dist/features/core/modules/source/domain/types/update-source.types.d.ts +2 -0
  60. package/dist/features/core/modules/source/services/SimulationSourceResolver.d.ts +3 -2
  61. package/dist/features/core/modules/source/services/compilers/action-source-compile.d.ts +2 -0
  62. package/dist/features/core/modules/source/services/compilers/composition-source-compile.d.ts +1 -1
  63. package/dist/features/core/modules/source/services/component-sfc/component-sfc-metadata-source-patch.d.ts +2 -2
  64. package/dist/features/core/modules/source/services/strategies/CompositionSourceEngineStrategy.d.ts +2 -2
  65. package/dist/features/core/modules/source/services/strategies/SimulationSourceEngineStrategy.d.ts +2 -2
  66. package/dist/features/core/modules/source/templates/simulation.default.source.d.ts +1 -1
  67. package/dist/features/core/modules/workspace/domain/workspace.types.d.ts +5 -0
  68. package/dist/main.d.ts +4 -9
  69. package/package.json +2 -2
  70. package/dist/features/core/modules/commands/services/context/SetEnvironmentCommand.d.ts +0 -9
  71. package/dist/features/core/modules/commands/services/context/SetProjectCommand.d.ts +0 -9
  72. package/dist/features/core/modules/commands/services/context/SetTenantCommand.d.ts +0 -9
  73. package/dist/features/core/modules/domain/entities/REnvironment.d.ts +0 -9
  74. package/dist/features/core/modules/domain/entities/RParameter.d.ts +0 -11
  75. package/dist/features/core/modules/domain/entities/RProject.d.ts +0 -64
  76. package/dist/features/core/modules/domain/entities/RQueryFilter.d.ts +0 -12
  77. package/dist/features/core/modules/domain/entities/RTenant.d.ts +0 -10
  78. package/dist/features/core/modules/runtime/domain/runtime-project-session.types.d.ts +0 -31
  79. package/dist/features/core/modules/runtime/execution/endge-project.d.ts +0 -6
  80. package/dist/features/core/modules/runtime/hosts/ProjectRuntimeHost.d.ts +0 -21
  81. package/dist/features/core/modules/runtime/services/strategies/ProjectRuntimeStrategy.d.ts +0 -9
  82. package/dist/features/core/modules/source/templates/project.default.source.d.ts +0 -2
@@ -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 {
@@ -8,7 +8,7 @@ interface SimulationCompositionBranch {
8
8
  }
9
9
  export interface SimulationSourceTarget {
10
10
  alias: string;
11
- kind: 'project' | 'composition' | 'scope' | 'query' | 'stream' | 'unsupported';
11
+ kind: 'composition' | 'scope' | 'query' | 'stream' | 'unsupported';
12
12
  identity: string;
13
13
  branch: SimulationCompositionBranch | null;
14
14
  }
@@ -20,9 +20,10 @@ interface QueryArrayContract {
20
20
  /** Read-only разрешение aliases и контрактов; не создаёт RuntimeHost или generator payload. */
21
21
  export declare class SimulationSourceResolver {
22
22
  private readonly _catalog;
23
+ private readonly _executionContext;
23
24
  private readonly _branches;
24
25
  private readonly _queryContracts;
25
- constructor(_catalog: SimulationSourceCatalog);
26
+ constructor(_catalog: SimulationSourceCatalog, _executionContext?: Readonly<Record<string, string>>);
26
27
  composition(identity: string): SimulationCompositionBranch | null;
27
28
  graph(reference: SimulationTargetReference): SimulationCompositionBranch | null;
28
29
  children(branch: SimulationCompositionBranch): SimulationSourceTarget[];
@@ -1,5 +1,6 @@
1
1
  import { ActionTargetSelector } from '../../../actions/domain/action.types';
2
2
  import { ActionProgramPayload } from '../../../program/domain/types/action-program.types';
3
+ import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
3
4
  import { ProgramDependency, ProgramDiagnostic } from '../../../program/domain/types/program.types';
4
5
  type DiagnosticDraft = Omit<ProgramDiagnostic, 'entityRef'>;
5
6
  export interface ActionSourceCompileInput {
@@ -9,6 +10,7 @@ export interface ActionSourceCompileInput {
9
10
  }
10
11
  export interface ActionSourceCompileResult {
11
12
  payload: ActionProgramPayload;
13
+ metadata: ProgramMetadataMap;
12
14
  diagnostics: DiagnosticDraft[];
13
15
  dependencies: ProgramDependency[];
14
16
  }
@@ -1,5 +1,5 @@
1
1
  import { CompositionRuntimeGraph, CompositionSourceCompileResult, CompositionSourceDocument } from '../../domain/types/composition-source.types';
2
2
  /** Компилирует Composition source v1 в runtime graph artifact. */
3
- export declare function compileCompositionSource(source: string, sourceVersion?: number): CompositionSourceCompileResult;
3
+ export declare function compileCompositionSource(source: string, sourceVersion?: number, executionContext?: Readonly<Record<string, string>>): CompositionSourceCompileResult;
4
4
  /** Строит normalized graph отдельно от source AST, чтобы runtime не интерпретировал DSL. */
5
5
  export declare function buildRuntimeGraph(document: CompositionSourceDocument): CompositionRuntimeGraph;
@@ -1,6 +1,6 @@
1
1
  import { ComponentSFCMetadataSourcePatchResult, ComponentSFCMetadataVisualProjection } from '../../../domain/types/component/sfc/metadata-visual.types';
2
2
  import { ProgramMetadataMap } from '../../../program/domain/types/program-metadata.types';
3
- /** Читает defineMetadata уровня компонента как строгий JSON для визуального редактора. */
3
+ /** Совместимый фасад старого SFC API над общим descriptor-driven metadata contract. */
4
4
  export declare function inspectComponentSFCMetadata(source: string): ComponentSFCMetadataVisualProjection;
5
- /** Заменяет один вызов defineMetadata или вставляет его в script setup. */
5
+ /** Совместимый фасад старого SFC patch API над общим descriptor-driven metadata contract. */
6
6
  export declare function patchComponentSFCMetadataSource(source: string, metadata: ProgramMetadataMap): ComponentSFCMetadataSourcePatchResult;
@@ -1,7 +1,7 @@
1
- import { SourceEngineCompileResult, SourceEngineStrategy, SourceKind } from '../../domain/types/source-engine.types';
1
+ import { SourceEngineCompileContext, SourceEngineCompileResult, SourceEngineStrategy, SourceKind } from '../../domain/types/source-engine.types';
2
2
  export declare class CompositionSourceEngineStrategy implements SourceEngineStrategy {
3
3
  readonly id = "source:composition";
4
4
  readonly sourceKind: SourceKind;
5
5
  supports(sourceKind: SourceKind | string): boolean;
6
- compile(source: string): SourceEngineCompileResult;
6
+ compile(source: string, context?: SourceEngineCompileContext): SourceEngineCompileResult;
7
7
  }
@@ -1,10 +1,10 @@
1
1
  import { SimulationSourceCatalog } from '../../domain/types/simulation-source.types';
2
- import { SourceEngineCompileResult, SourceEngineStrategy, SourceKind } from '../../domain/types/source-engine.types';
2
+ import { SourceEngineCompileContext, SourceEngineCompileResult, SourceEngineStrategy, SourceKind } from '../../domain/types/source-engine.types';
3
3
  export declare class SimulationSourceEngineStrategy implements SourceEngineStrategy {
4
4
  private readonly _catalog;
5
5
  readonly id = "source:simulation";
6
6
  readonly sourceKind: SourceKind;
7
7
  constructor(_catalog: () => SimulationSourceCatalog);
8
8
  supports(sourceKind: SourceKind | string): boolean;
9
- compile(source: string): SourceEngineCompileResult;
9
+ compile(source: string, context?: SourceEngineCompileContext): SourceEngineCompileResult;
10
10
  }
@@ -1,2 +1,2 @@
1
- /** Новый документ требует выбора целевой Composition или Project. */
1
+ /** Новый документ требует выбора целевой Composition. */
2
2
  export declare const SIMULATION_DEFAULT_SOURCE = "defineSimulation({\n target: composition(''),\n dataMode: 'mock',\n overrides: {\n runtimes: {},\n },\n})";
@@ -2,6 +2,7 @@ import { EndgeConfiguration, EndgeLocaleDefinition, EndgeThemeDefinition, EndgeT
2
2
  import { EntityManagement } from '../../domain/types/document/entity-management.type';
3
3
  export type EndgeWorkspaceLocale = EndgeLocaleDefinition;
4
4
  export type EndgeDataMode = 'live' | 'mock';
5
+ export type EndgeWorkspaceDocumentStructure = 'frontend' | 'custom';
5
6
  export type EndgeWorkspaceLocaleLabelMode = keyof Pick<EndgeWorkspaceLocale, 'displayName' | 'shortLabel'>;
6
7
  export type EndgeWorkspaceTheme = EndgeThemeDefinition;
7
8
  export type EndgeWorkspaceTimezone = EndgeTimezoneDefinition;
@@ -21,6 +22,10 @@ export interface EndgeWorkspaceDefinition extends EntityManagement {
21
22
  identity: string;
22
23
  displayName: string;
23
24
  dataMode: EndgeDataMode;
25
+ /** Способ организации документов; legacy payloads без поля нормализуются в frontend. */
26
+ documentStructure?: EndgeWorkspaceDocumentStructure;
27
+ /** Единственная Composition, запускаемая как корень Workspace. */
28
+ startupCompositionIdentity: string | null;
24
29
  meta?: Record<string, unknown>;
25
30
  installedIntegrations: WorkspaceIntegrationReference[];
26
31
  configuration: EndgeConfiguration;
package/dist/main.d.ts CHANGED
@@ -22,7 +22,6 @@ export * from './features/core/modules/compiler/EndgeCompiler_Module';
22
22
  export * from './features/core/modules/source/EndgeSource_Module';
23
23
  export * from './features/core/modules/mock/EndgeMock_Module';
24
24
  export * from './features/core/modules/runtime/execution/endge-composition';
25
- export * from './features/core/modules/runtime/execution/endge-project';
26
25
  export * from './features/core/modules/runtime/execution/endge-simulation';
27
26
  export * from './features/core/modules/runtime/domain/simulation-runtime.types';
28
27
  export * from './features/core/modules/runtime/execution/endge-data-view';
@@ -74,6 +73,7 @@ export * from './features/core/modules/domain/types/component/sfc/ports.types';
74
73
  export * from './features/core/modules/domain/types/component/sfc/ports-source.types';
75
74
  export * from './features/core/modules/domain/types/component/sfc/props-visual.types';
76
75
  export * from './features/core/modules/domain/types/component/sfc/metadata-visual.types';
76
+ export * from './features/core/modules/domain/types/document/document-metadata.types';
77
77
  export * from './features/core/modules/domain/types/component/sfc/visual-projection.types';
78
78
  export * from './features/core/modules/configuration/domain/types/configuration.type';
79
79
  export * from './features/core/modules/domain/types/computation/computation.types';
@@ -120,7 +120,6 @@ export * from './features/core/modules/runtime/domain/runtime-registry.types';
120
120
  export * from './features/core/modules/runtime/domain/runtime-resource.types';
121
121
  export * from './features/core/modules/runtime/domain/runtime-scope.types';
122
122
  export * from './features/core/modules/runtime/domain/sfc-render-inspection.type';
123
- export * from './features/core/modules/runtime/domain/runtime-project-session.types';
124
123
  export * from './features/core/modules/runtime/domain/runtime-strategy.types';
125
124
  export * from './features/core/modules/runtime/domain/runtime.types';
126
125
  export * from './features/core/modules/runtime/domain/runtime-inspection.types';
@@ -165,7 +164,6 @@ export * from './features/core/modules/domain/entities/RStream';
165
164
  export * from './features/core/modules/domain/entities/RSimulation';
166
165
  export * from './features/core/modules/domain/entities/RUpdate';
167
166
  export * from './features/core/modules/domain/entities/RMock';
168
- export * from './features/core/modules/domain/entities/RQueryFilter';
169
167
  export * from './features/core/modules/domain/entities/RType';
170
168
  export * from './features/core/modules/domain/entities/RComponentDSL';
171
169
  export * from './features/core/modules/domain/entities/RComponentTable';
@@ -173,8 +171,8 @@ export * from './features/core/modules/domain/entities/RComponentTableColumn';
173
171
  export * from './features/core/modules/domain/entities/RConverter';
174
172
  export * from './features/core/modules/domain/entities/RComputation';
175
173
  export * from './features/core/modules/domain/entities/RIntegration';
176
- export * from './features/core/modules/domain/entities/REnvironment';
177
- export * from './features/core/modules/domain/entities/RTenant';
174
+ export * from './features/core/modules/domain/entities/RFacet';
175
+ export * from './features/core/modules/domain/entities/RFacetDocument';
178
176
  export * from './features/core/modules/domain/entities/RPolicy';
179
177
  export * from './features/core/modules/domain/entities/RStyle';
180
178
  export * from './features/core/modules/domain/entities/RConfiguration';
@@ -188,8 +186,6 @@ export * from './features/core/modules/runtime/RuntimeActionRegistry';
188
186
  export * from './features/core/modules/runtime/hosts/FilterViewRuntimeHost';
189
187
  export * from './features/core/modules/domain/entities/RField';
190
188
  export * from './features/core/modules/domain/entities/RFilter';
191
- export * from './features/core/modules/domain/entities/RParameter';
192
- export * from './features/core/modules/domain/entities/RProject';
193
189
  export * from './features/core/modules/domain/entities/RFolder';
194
190
  export * from './features/core/modules/domain/entities/RVersion';
195
191
  export * from './features/core/modules/domain/entities/RPageTemplate';
@@ -213,6 +209,7 @@ export * from './features/core/modules/context/persistence/adapters/LocalStorage
213
209
  export * from './features/core/modules/converters/tools/date/string-to-date';
214
210
  export * from './features/core/modules/converters/tools/date/weekdays-range';
215
211
  export * from './features/core/modules/domain/documents/domain-document-descriptors';
212
+ export * from './features/core/modules/domain/documents/document-metadata';
216
213
  export * from './features/core/modules/domain/documents/service-document-serializer';
217
214
  export * from './features/core/modules/configuration/domain/endge-configuration';
218
215
  export * from './features/core/modules/configuration/domain/configuration-value';
@@ -226,7 +223,6 @@ export * from './features/core/modules/runtime/RuntimeScope';
226
223
  export * from './features/core/modules/runtime/EndgeRuntimeScopes_Module';
227
224
  export * from './features/core/modules/runtime/RuntimeResourceBag';
228
225
  export * from './features/core/modules/runtime/RuntimeHostFactory';
229
- export * from './features/core/modules/runtime/hosts/ProjectRuntimeHost';
230
226
  export * from './features/core/modules/runtime/hosts/SimulationRuntimeHost';
231
227
  export * from './features/core/modules/runtime/hosts/PageRuntimeHost';
232
228
  export * from './features/core/modules/runtime/hosts/ComponentSFCRuntimeHost';
@@ -271,7 +267,6 @@ export * from './features/core/modules/actions/services/table-actions';
271
267
  export * from './features/core/modules/runtime/services/strategies/ActionRuntimeStrategy';
272
268
  export * from './features/core/modules/runtime/services/strategies/ComponentSFCRuntimeStrategy';
273
269
  export * from './features/core/modules/runtime/services/strategies/PageRuntimeStrategy';
274
- export * from './features/core/modules/runtime/services/strategies/ProjectRuntimeStrategy';
275
270
  export * from './features/core/modules/runtime/services/strategies/QueryRuntimeStrategy';
276
271
  export * from './features/core/modules/runtime/services/strategies/FilterRuntimeStrategy';
277
272
  export * from './features/core/modules/runtime/services/strategies/CompositionRuntimeStrategy';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@endge/core",
3
3
  "type": "module",
4
- "version": "10.0.0",
4
+ "version": "11.0.0",
5
5
  "private": false,
6
6
  "packageManager": "pnpm@8.8.0",
7
7
  "license": "Apache-2.0",
@@ -65,5 +65,5 @@
65
65
  "vite": "^6.1.0",
66
66
  "vitest": "^2.1.9"
67
67
  },
68
- "version_updated": "10.09.2026"
68
+ "version_updated": "11.09.2026"
69
69
  }
@@ -1,9 +0,0 @@
1
- import { EndgeCommandHandler } from '../../types/command-executor.type';
2
- import { EndgeContextCommandTarget } from '../../types/context-command-target.type';
3
- /** Применяет запрос изменения окружения через существующий метод Context. */
4
- export declare class SetEnvironmentCommand implements EndgeCommandHandler {
5
- readonly type: "context:set-environment";
6
- private readonly _context;
7
- constructor(context: Pick<EndgeContextCommandTarget, 'setCurrentEnvironment'>);
8
- execute(payload: unknown): void | Promise<void>;
9
- }
@@ -1,9 +0,0 @@
1
- import { EndgeCommandHandler } from '../../types/command-executor.type';
2
- import { EndgeContextCommandTarget } from '../../types/context-command-target.type';
3
- /** Применяет запрос изменения проекта через существующий метод Context. */
4
- export declare class SetProjectCommand implements EndgeCommandHandler {
5
- readonly type: "context:set-project";
6
- private readonly _context;
7
- constructor(context: Pick<EndgeContextCommandTarget, 'setCurrentProject'>);
8
- execute(payload: unknown): void | Promise<void>;
9
- }
@@ -1,9 +0,0 @@
1
- import { EndgeCommandHandler } from '../../types/command-executor.type';
2
- import { EndgeContextCommandTarget } from '../../types/context-command-target.type';
3
- /** Применяет запрос изменения tenant через существующий метод Context. */
4
- export declare class SetTenantCommand implements EndgeCommandHandler {
5
- readonly type: "context:set-tenant";
6
- private readonly _context;
7
- constructor(context: Pick<EndgeContextCommandTarget, 'setCurrentTenant'>);
8
- execute(payload: unknown): void | Promise<void>;
9
- }
@@ -1,9 +0,0 @@
1
- import { EndgeConfigurationContribution } from '../../configuration/domain/types/configuration.type';
2
- import { DuplicateOptions, REntity } from './REntity';
3
- /** Сущность окружения (коллекция environments). Без привязки к проекту. */
4
- export declare class REnvironment extends REntity {
5
- configuration: EndgeConfigurationContribution;
6
- static fromPlain(input: Record<string, unknown>): REnvironment;
7
- toPlain(): Record<string, unknown>;
8
- duplicate(options: DuplicateOptions): REnvironment;
9
- }
@@ -1,11 +0,0 @@
1
- import { DomainDocumentType } from '../types/document/document.types';
2
- import { FilterFieldSchema, RParameterSchema, RuntimeFilterLinkEntity } from '../types/document/query.types';
3
- import { REntity } from './REntity';
4
- export declare class RParameter extends REntity {
5
- description: string | null;
6
- fields: Map<string, FilterFieldSchema>;
7
- runtimeFilters: RuntimeFilterLinkEntity[];
8
- get type(): DomainDocumentType;
9
- static fromPlain(json: RParameterSchema): RParameter;
10
- toPlain(): RParameterSchema;
11
- }
@@ -1,64 +0,0 @@
1
- import { EndgeConfigurationContribution } from '../../configuration/domain/types/configuration.type';
2
- import { DiagnosticsProblemInput } from '../../diagnostics/domain/types/diagnostics.types';
3
- import { REntity } from './REntity';
4
- /**
5
- * Доменная сущность для проекта (projects).
6
- *
7
- * Схема (schema-часть):
8
- * - id: string // identity или строковый id
9
- * - identity: string
10
- * - name: string
11
- * - displayName: string
12
- *
13
- * Storage-мета (через REntity.applyStorageMeta):
14
- * - createdAt, updatedAt, deletedAt, author, active
15
- */
16
- export declare class RProject extends REntity {
17
- /** Source единственного корневого графа принадлежит документу проекта. */
18
- source: string;
19
- sourceVersion: number;
20
- /** Project-level contribution к effective configuration. */
21
- configuration: EndgeConfigurationContribution;
22
- /** Описание проекта */
23
- description: string | null;
24
- /** Slug (URL-имя) */
25
- slug?: string | null;
26
- /** Порядок сортировки в списке */
27
- order?: number | null;
28
- /** Список разрешённых окружений проекта (relationship[] - environments). */
29
- allowedEnvironmentIds: number[];
30
- /**
31
- * Создание проекта из payload-документа:
32
- *
33
- * {
34
- * id: number,
35
- * identity: string,
36
- * displayName: string,
37
- * deletedAt?: string | null,
38
- * author?: string,
39
- * createdAt?: string,
40
- * updatedAt?: string,
41
- * ...
42
- * }
43
- */
44
- /**
45
- * Создание проекта из plain-схемы (schema.toPlain()).
46
- *
47
- * Ожидается структура:
48
- * {
49
- * id: string
50
- * identity?: string
51
- * name?: string
52
- * displayName?: string
53
- * folder?: string | null
54
- * }
55
- */
56
- static fromPlain(json: any): RProject;
57
- /**
58
- * Экспорт только схемы (без storage-меты).
59
- * Используется в EndgeDomain_Module.toPlain().
60
- */
61
- toPlain(): any;
62
- /** Возвращает validation problems проекта без сохранения их внутри entity. */
63
- getDiagnosticProblems(): DiagnosticsProblemInput[];
64
- }
@@ -1,12 +0,0 @@
1
- /** Режим элемента фильтра: свой JSON или ссылка на фильтр из коллекции. */
2
- export type RQueryFilterItemMode = 'inline' | 'reference';
3
- /**
4
- * Один элемент фильтра запроса: либо inline JSON, либо ссылка на доменный фильтр (parameters).
5
- */
6
- export declare class RQueryFilter {
7
- mode: RQueryFilterItemMode;
8
- /** Identity фильтра из коллекции (parameters), если mode === 'reference'. */
9
- filterId: string | null;
10
- inlineJson: string | null;
11
- constructor(init?: Partial<RQueryFilter>);
12
- }
@@ -1,10 +0,0 @@
1
- import { EndgeConfigurationContribution } from '../../configuration/domain/types/configuration.type';
2
- import { DuplicateOptions, REntity } from './REntity';
3
- /** Сущность тенанта (коллекция tenants). */
4
- export declare class RTenant extends REntity {
5
- configuration: EndgeConfigurationContribution;
6
- code: string;
7
- description: string | null;
8
- toPlain(): Record<string, unknown>;
9
- duplicate(options: DuplicateOptions): RTenant;
10
- }
@@ -1,31 +0,0 @@
1
- import { RuntimeArtifactReader } from './runtime-host.types';
2
- import { RuntimeScopeHandle } from './runtime-scope.types';
3
- import { CompositionPublicOutputHandle, CompositionRuntimeHostHandle, CompositionSession } from '../../source/domain/types/composition-source.types';
4
- export interface ProjectCompositionHandle<THost extends CompositionRuntimeHostHandle = CompositionRuntimeHostHandle> {
5
- readonly identity: string;
6
- readonly state: 'inactive' | 'active' | 'paused' | 'disposed';
7
- readonly host: THost | null;
8
- readonly outputs: Readonly<Record<string, CompositionPublicOutputHandle>>;
9
- activate: () => Promise<CompositionSession<THost>>;
10
- pause: () => Promise<void>;
11
- resume: () => Promise<void>;
12
- restart: () => Promise<CompositionSession<THost>>;
13
- deactivate: () => Promise<void>;
14
- output: <T = unknown>(name: string) => T | undefined;
15
- }
16
- export interface ProjectRuntimeMountOptions {
17
- /** `declared` сохраняет корневой activateOn; `none` создаёт стабильные handles для сессии по требованию или отладки. */
18
- autoActivate?: 'declared' | 'none';
19
- /** Локальная для сессии проекция артефактов, используемая Preview без изменения Endge.program. */
20
- artifactReader?: RuntimeArtifactReader;
21
- }
22
- export interface ProjectRuntimeSession<THost extends CompositionRuntimeHostHandle = CompositionRuntimeHostHandle> {
23
- readonly id: string;
24
- readonly composition: ProjectCompositionHandle<THost>;
25
- switchScope: (options: {
26
- from?: RuntimeScopeHandle | null;
27
- to: RuntimeScopeHandle;
28
- previous?: 'pause' | 'deactivate';
29
- }) => Promise<void>;
30
- unmount: () => Promise<void>;
31
- }
@@ -1,6 +0,0 @@
1
- import { ProjectRuntimeMountOptions, ProjectRuntimeSession } from '../domain/runtime-project-session.types';
2
- import { ProjectRuntimeHost } from '../hosts/ProjectRuntimeHost';
3
- /** Монтирует один project в изолированную runtime-сессию. */
4
- export declare class EndgeProject {
5
- mount(identity: string, options?: ProjectRuntimeMountOptions): Promise<ProjectRuntimeSession<ProjectRuntimeHost>>;
6
- }
@@ -1,21 +0,0 @@
1
- import { RProject } from '../../domain/entities/RProject';
2
- import { RuntimeArtifactReader, RuntimeHost } from '../domain/runtime-host.types';
3
- import { CompositionRuntimeHost } from './CompositionRuntimeHost';
4
- /** Исполняет собственный корневой граф проекта через общий механизм Composition. */
5
- export declare class ProjectRuntimeHost extends CompositionRuntimeHost<'project'> {
6
- constructor(input: {
7
- id: string;
8
- model: RProject;
9
- parent?: RuntimeHost<any, any> | null;
10
- meta?: Record<string, unknown>;
11
- artifactReader: RuntimeArtifactReader;
12
- });
13
- /** Создаёт host только из валидного артефакта проекта; старые композиции не участвуют. */
14
- static createProjectRuntime(input: {
15
- id: string;
16
- model: RProject;
17
- meta?: Record<string, any>;
18
- parent?: RuntimeHost<any, any> | null;
19
- artifacts: RuntimeArtifactReader;
20
- }): ProjectRuntimeHost | null;
21
- }
@@ -1,9 +0,0 @@
1
- import { RuntimeStrategy } from '../../domain/runtime-strategy.types';
2
- import { RProject } from '../../../domain/entities/RProject';
3
- import { ProjectRuntimeHost } from '../../hosts/ProjectRuntimeHost';
4
- export declare class ProjectRuntimeStrategy implements RuntimeStrategy<RProject> {
5
- readonly id = "runtime:project";
6
- readonly entityType = "project";
7
- supports(model: unknown): model is RProject;
8
- create(ctx: Parameters<RuntimeStrategy<RProject>['create']>[0]): ProjectRuntimeHost | null;
9
- }
@@ -1,2 +0,0 @@
1
- /** Пустой корневой граф нового проекта, готовый к запуску без внешних ресурсов. */
2
- export declare const PROJECT_DEFAULT_SOURCE = "defineComposition({\n activateOn: startup(),\n data: {},\n resources: {},\n runtimes: {},\n hooks: [],\n outputs: {},\n})\n";