@endge/core 2.0.0 → 2.0.1

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 (35) hide show
  1. package/dist/core.cjs +304 -280
  2. package/dist/core.js +16617 -15571
  3. package/dist/domain/types/auth/auth-profile.types.d.ts +17 -4
  4. package/dist/domain/types/component/sfc/ir.types.d.ts +6 -0
  5. package/dist/domain/types/component/sfc/visual-projection.types.d.ts +99 -8
  6. package/dist/domain/types/configuration/configuration.type.d.ts +13 -7
  7. package/dist/domain/types/document/query.types.d.ts +1 -1
  8. package/dist/domain/types/document/workspace.types.d.ts +1 -3
  9. package/dist/domain/types/i18n.types.d.ts +2 -0
  10. package/dist/domain/types/kernel/events.types.d.ts +0 -3
  11. package/dist/domain/types/runtime/action.types.d.ts +1 -0
  12. package/dist/domain/types/runtime/context-persistence.types.d.ts +1 -0
  13. package/dist/domain/types/source/source-engine.types.d.ts +26 -1
  14. package/dist/domain/types/source/stream-source.types.d.ts +2 -1
  15. package/dist/main.d.ts +1 -0
  16. package/dist/model/config/kernel.config.d.ts +0 -1
  17. package/dist/model/config/sfc-editing.config.d.ts +3 -0
  18. package/dist/model/config/ui-composition.config.d.ts +10 -10
  19. package/dist/model/kernel/endge.d.ts +0 -5
  20. package/dist/model/modules/context/endge-vars.d.ts +4 -2
  21. package/dist/model/modules/context/endge-workspace.d.ts +1 -3
  22. package/dist/model/modules/context/persistence/RuntimeStateController.d.ts +7 -4
  23. package/dist/model/modules/domain/endge-domain.d.ts +4 -0
  24. package/dist/model/modules/program/endge-source.d.ts +3 -1
  25. package/dist/model/modules/runtime/execution/computation/ComputationResourceRegistry.d.ts +2 -0
  26. package/dist/model/modules/security/auth/adapters/OAuth2PasswordAuthAdapter.d.ts +11 -0
  27. package/dist/model/services/compiler/component-sfc/component-sfc-compile.d.ts +3 -0
  28. package/dist/model/services/compiler/component-sfc/component-sfc-template.d.ts +3 -0
  29. package/dist/model/services/i18n/composition-i18n-catalog-projection.d.ts +19 -0
  30. package/dist/model/services/i18n/i18n-catalog.d.ts +3 -1
  31. package/dist/model/services/source-engine/component-sfc/component-sfc-table-source-patch.d.ts +2 -2
  32. package/dist/model/services/source-engine/composition-source-i18n-hints.d.ts +5 -0
  33. package/dist/model/services/source-engine/strategies/CompositionSourceLanguageStrategy.d.ts +1 -0
  34. package/package.json +4 -4
  35. package/dist/model/modules/runtime/input/endge-sse.d.ts +0 -46
@@ -1,4 +1,4 @@
1
- import { SourceEngineCompileResult, SourceEngineGenerateResult, SourceEngineStrategy, SourceLanguageCompletion, SourceLanguageContext, SourceLanguageSemanticHighlight, SourceDocumentReference, SourceLanguageStrategy, SourceLanguageValidationResult, SourceKind, SourceParseResult, SourcePatchResult, SourcePatchStrategy } from '../../../domain/types/source/source-engine.types';
1
+ import { SourceEngineCompileResult, SourceEngineGenerateResult, SourceEngineStrategy, SourceLanguageCompletion, SourceLanguageContext, SourceLanguageInlineHint, SourceLanguageSemanticHighlight, SourceDocumentReference, SourceLanguageStrategy, SourceLanguageValidationResult, SourceKind, SourceParseResult, SourcePatchResult, SourcePatchStrategy } from '../../../domain/types/source/source-engine.types';
2
2
  import { EndgeModule } from '../../../domain/entities/endge/EndgeModule';
3
3
  /** Модуль authoring-операций над source-документами Endge. */
4
4
  export declare class EndgeSource extends EndgeModule {
@@ -45,6 +45,8 @@ export declare class EndgeSource extends EndgeModule {
45
45
  referenceAt(sourceKind: SourceKind | string, context: SourceLanguageContext): SourceDocumentReference | null;
46
46
  /** Возвращает renderer-neutral semantic highlights для source-документа. */
47
47
  semanticHighlights(sourceKind: SourceKind | string, context: SourceLanguageContext): SourceLanguageSemanticHighlight[];
48
+ /** Возвращает renderer-neutral inline annotations для source-документа. */
49
+ inlineHints(sourceKind: SourceKind | string, context: SourceLanguageContext): SourceLanguageInlineHint[];
48
50
  /** Регистрирует встроенные strategies ядра. */
49
51
  private _registerDefaultStrategies;
50
52
  /** Возвращает strategy или бросает явную ошибку для некорректного source-kind. */
@@ -4,6 +4,8 @@ import { ComputationResourceState } from './ComputationResource';
4
4
  export declare class ComputationResourceRegistry {
5
5
  private readonly resources;
6
6
  private readonly disposers;
7
+ /** Resource inputs currently pulled by the active renderer pass. */
8
+ private readonly _updatingInputs;
7
9
  getOrCreate(key: string, input: unknown, create: () => ComputationResourceState, onChange?: VoidFunction): ComputationResourceContract;
8
10
  dispose(): void;
9
11
  }
@@ -0,0 +1,11 @@
1
+ import { AuthAdapterContext, AuthProfileAdapter, AuthProfileSchema, AuthTokenSet } from '../../../../../domain/types/auth/auth-profile.types';
2
+ /** Выполняет OAuth2 Resource Owner Password grant для dev/test профилей. */
3
+ export declare class OAuth2PasswordAuthAdapter implements AuthProfileAdapter {
4
+ readonly id = "oauth2-password";
5
+ readonly label = "OAuth2 Password (dev/test)";
6
+ validate(profile: AuthProfileSchema): void;
7
+ authenticate(context: AuthAdapterContext): Promise<AuthTokenSet>;
8
+ refresh(context: AuthAdapterContext): Promise<AuthTokenSet>;
9
+ private _appendScopes;
10
+ private _requestToken;
11
+ }
@@ -7,6 +7,7 @@ import { RComponentSFC_RuntimeDependencies } from '../../../../domain/types/comp
7
7
  import { ComponentSFCPortManifest, ComponentSFCPortProviderDescriptor } from '../../../../domain/types/component/sfc/ports.types';
8
8
  import { ProgramMetadata } from '../../../../domain/types/program/program-metadata.types';
9
9
  import { TypeSourceDefinition } from '../../../../domain/types/source/type-source.types';
10
+ import { EndgeSFCEditingConfiguration } from '../../../../domain/types/configuration/configuration.type';
10
11
  /** Результат полного SFC compiler pipeline в core. */
11
12
  export interface ComponentSFCCompileResult {
12
13
  /** Разложенный canonical source. */
@@ -48,6 +49,8 @@ export interface ComponentSFCCompileOptions {
48
49
  resolveComponentVariants?: (identity: string) => string[] | null;
49
50
  /** Resolves an external Type Registry definition used by a named SFC contract. */
50
51
  resolveTypeDefinition?: (identity: string) => TypeSourceDefinition | null;
52
+ /** Effective edit-session defaults из immutable build context. */
53
+ sfcEditing?: EndgeSFCEditingConfiguration;
51
54
  }
52
55
  /** Компилирует Endge SFC source до target-neutral artifact для Endge.program. */
53
56
  export declare function compileComponentSFC(source: string, options?: ComponentSFCCompileOptions): ComponentSFCCompileResult;
@@ -3,6 +3,7 @@ import { RComponentSFC_AST_Template } from '../../../../domain/types/component/s
3
3
  import { RComponentSFC_IR_Template } from '../../../../domain/types/component/sfc/ir.types';
4
4
  import { ComponentSFCComponentPort, ComponentSFCPortManifest } from '../../../../domain/types/component/sfc/ports.types';
5
5
  import { ProgramNodeMetadata } from '../../../../domain/types/program/program-metadata.types';
6
+ import { EndgeSFCEditingConfiguration } from '../../../../domain/types/configuration/configuration.type';
6
7
  /** Контекст компиляции template в IR. */
7
8
  export interface ComponentSFCTemplateCompileContext {
8
9
  /** Имена props для классификации expression reads. */
@@ -19,6 +20,8 @@ export interface ComponentSFCTemplateCompileContext {
19
20
  resolveComponentPortManifest?: (identity: string) => ComponentSFCPortManifest | null;
20
21
  /** Resolves explicit root Variant names of a nested custom component. */
21
22
  resolveComponentVariants?: (identity: string) => string[] | null;
23
+ /** Effective defaults завершения edit session для текущего build context. */
24
+ sfcEditing?: EndgeSFCEditingConfiguration;
22
25
  }
23
26
  /** Результат компиляции template в IR. */
24
27
  export interface ComponentSFCTemplateCompileResult {
@@ -0,0 +1,19 @@
1
+ import { I18nCatalogProvenance, I18nRuntimeCatalog } from '../../../domain/types/i18n.types';
2
+ import { RuntimeArtifactReader } from '../../../domain/types/runtime/runtime-host.types';
3
+ export interface CompositionI18nCatalogProjectionOccurrence {
4
+ id: string;
5
+ rootIdentity: string;
6
+ invocationPath: string[];
7
+ catalogsByScope: Readonly<Record<string, I18nRuntimeCatalog>>;
8
+ provenanceByScope: Readonly<Record<string, I18nCatalogProvenance>>;
9
+ }
10
+ export interface CompositionI18nCatalogProjectionInput {
11
+ artifacts: RuntimeArtifactReader;
12
+ rootIdentities: readonly string[];
13
+ targetIdentity: string;
14
+ }
15
+ /**
16
+ * Projects effective i18n catalogs from compiled Composition artifacts only.
17
+ * No RuntimeHost, lifecycle hook or authored runtime source is executed.
18
+ */
19
+ export declare function projectCompositionI18nCatalogs(input: CompositionI18nCatalogProjectionInput): CompositionI18nCatalogProjectionOccurrence[];
@@ -1,10 +1,12 @@
1
1
  import { I18nCompiledLocales, I18nLocales, I18nRuntimeCatalog } from '../../../domain/types/i18n.types';
2
- import { CompositionI18nResourceArtifact } from '../../../domain/types/source/composition-source.types';
2
+ import { CompositionI18nResourceArtifact, CompositionProgramPayload } from '../../../domain/types/source/composition-source.types';
3
3
  /** Материализует authored locale trees в плоские dot-path индексы. */
4
4
  export declare function compileI18nLocales(locales: I18nLocales): I18nCompiledLocales;
5
5
  /** Возвращает все логические message keys независимо от локали. */
6
6
  export declare function collectI18nMessageKeys(messages: I18nCompiledLocales): Set<string>;
7
7
  /** Добавляет локальные ресурсы scope к унаследованному runtime catalog. */
8
8
  export declare function extendI18nRuntimeCatalog(inherited: I18nRuntimeCatalog, resources: readonly CompositionI18nResourceArtifact[]): I18nRuntimeCatalog;
9
+ /** Строит effective translation catalogs всех lifecycle scopes Composition. */
10
+ export declare function buildCompositionI18nCatalogs(payload: CompositionProgramPayload, inherited?: I18nRuntimeCatalog): Map<string, I18nRuntimeCatalog>;
9
11
  /** Создаёт независимый snapshot runtime catalog для передачи дочернему host. */
10
12
  export declare function cloneI18nRuntimeCatalog(catalog: I18nRuntimeCatalog): I18nRuntimeCatalog;
@@ -1,3 +1,3 @@
1
- import { ComponentSFCTableSourcePatch, ComponentSFCTableSourcePatchResult } from '../../../../domain/types/component/sfc/visual-projection.types';
1
+ import { ComponentSFCTableSourcePatch, ComponentSFCTableSourcePatchResult, ComponentSFCVisualInspectionOptions } from '../../../../domain/types/component/sfc/visual-projection.types';
2
2
  /** Применяет одну узкую visual-editor операцию, не перепечатывая остальной SFC source. */
3
- export declare function patchComponentSFCTableSource(source: string, patch: ComponentSFCTableSourcePatch): ComponentSFCTableSourcePatchResult;
3
+ export declare function patchComponentSFCTableSource(source: string, patch: ComponentSFCTableSourcePatch, options?: ComponentSFCVisualInspectionOptions): ComponentSFCTableSourcePatchResult;
@@ -0,0 +1,5 @@
1
+ import { SourceDocumentReference, SourceLanguageContext, SourceLanguageInlineHint } from '../../../domain/types/source/source-engine.types';
2
+ /** Resolves translation inline hints from current source and projected catalogs. */
3
+ export declare function compositionSourceI18nHints(context: SourceLanguageContext): SourceLanguageInlineHint[];
4
+ /** Resolves an `alias:key` literal to one physical i18n document when unambiguous. */
5
+ export declare function compositionSourceI18nReferenceAt(context: SourceLanguageContext): SourceDocumentReference | null;
@@ -10,4 +10,5 @@ export declare class CompositionSourceLanguageStrategy implements SourceLanguage
10
10
  completions(_context: SourceLanguageContext): SourceLanguageCompletion[];
11
11
  resolveReference(context: SourceLanguageContext): import('../../../../domain/types/source/source-engine.types').SourceDocumentReference | null;
12
12
  semanticHighlights(context: SourceLanguageContext): import('../../../../domain/types/source/source-engine.types').SourceLanguageSemanticHighlight[];
13
+ inlineHints(context: SourceLanguageContext): import('../../../../domain/types/source/source-engine.types').SourceLanguageInlineHint[];
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@endge/core",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "private": false,
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -29,7 +29,7 @@
29
29
  "dependencies": {
30
30
  "@babel/parser": "^7.27.2",
31
31
  "@babel/types": "^7.27.1",
32
- "@endge/utils": "^0.24.9",
32
+ "@endge/utils": "^0.24.10",
33
33
  "@vue/compiler-dom": "^3.5.24",
34
34
  "@vue/compiler-sfc": "^3.5.24",
35
35
  "axios": "^1.13.2",
@@ -46,8 +46,8 @@
46
46
  "yaml": "^2.8.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "@endge/raph": "^3.0.7",
50
- "@endge/utils": "^0.24.9",
49
+ "@endge/raph": "^3.0.8",
50
+ "@endge/utils": "^0.24.10",
51
51
  "@primevue/themes": "^4.0.0-rc.1",
52
52
  "class-transformer": "^0.5.1",
53
53
  "class-validator": "^0.14.1",
@@ -1,46 +0,0 @@
1
- import { EndgeModule } from '../../../../domain/entities/endge/EndgeModule';
2
- /**
3
- * Модуль подключения к SSE-каналу и трансляции сообщений в Endge events.
4
- */
5
- export declare class EndgeSSE extends EndgeModule {
6
- private _sseManager;
7
- private readonly _delayExecutor;
8
- private readonly _upsMeter;
9
- private _forceRefreshOnReconnect;
10
- /**
11
- * Создает SSE-модуль и delayed executor для пакетного уведомления подписчиков.
12
- */
13
- constructor();
14
- /**
15
- * Предметный запуск SSE-подключения из внешнего кода.
16
- */
17
- init(): Promise<void>;
18
- /**
19
- * Сбрасывает SSE-подключение, delayed tasks и счетчик сообщений.
20
- */
21
- reset(): void;
22
- /**
23
- * Запускает SSE-подключение по настройкам из домена.
24
- */
25
- startSSE(): Promise<void>;
26
- /**
27
- * Публикует входящее SSE-сообщение в `Endge.events`.
28
- */
29
- emitCustomSSEEvent(message: unknown): void;
30
- /**
31
- * Останавливает активное SSE-подключение и очистку token-cache.
32
- */
33
- stopSSE(): void;
34
- /**
35
- * Переключает SSE-подключение между active и stopped.
36
- */
37
- toggleSSE(): void;
38
- /**
39
- * Возвращает текущую скорость входящих SSE-сообщений.
40
- */
41
- get sseRate(): number;
42
- /**
43
- * Показывает, активно ли SSE-подключение.
44
- */
45
- get isSSEActive(): boolean;
46
- }