@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
- export type AuthProfileAdapterId = 'oidc' | 'oauth2-client-credentials' | 'basic' | 'bearer' | (string & {});
1
+ export type AuthProfileAdapterId = 'oidc' | 'oauth2-client-credentials' | 'oauth2-password' | 'basic' | 'bearer' | (string & {});
2
2
  export type AuthSessionStorage = 'localStorage' | 'sessionStorage' | 'memory';
3
3
  export interface AuthSessionPolicy {
4
4
  storage: AuthSessionStorage;
@@ -10,7 +10,7 @@ export interface AuthProfileConfig {
10
10
  export interface AuthProfileCredentials {
11
11
  [key: string]: string;
12
12
  }
13
- /** Persisted discriminated contract of the four built-in adapters. */
13
+ /** Persisted discriminated contract of the built-in adapters. */
14
14
  export interface AuthProfileBase {
15
15
  id: string;
16
16
  identity: string;
@@ -44,6 +44,19 @@ export interface OAuth2ClientCredentialsProfile extends AuthProfileBase {
44
44
  };
45
45
  session: AuthSessionPolicy;
46
46
  }
47
+ export interface OAuth2PasswordProfile extends AuthProfileBase {
48
+ adapterId: 'oauth2-password';
49
+ config: {
50
+ tokenEndpoint: string;
51
+ clientId: string;
52
+ scopes: string[];
53
+ };
54
+ credentials: {
55
+ username: string;
56
+ password: string;
57
+ };
58
+ session: AuthSessionPolicy;
59
+ }
47
60
  export interface BasicAuthProfile extends AuthProfileBase {
48
61
  adapterId: 'basic';
49
62
  config: Record<string, never>;
@@ -61,7 +74,7 @@ export interface BearerAuthProfile extends AuthProfileBase {
61
74
  };
62
75
  session?: never;
63
76
  }
64
- export type AuthProfile = OidcAuthProfile | OAuth2ClientCredentialsProfile | BasicAuthProfile | BearerAuthProfile;
77
+ export type AuthProfile = OidcAuthProfile | OAuth2ClientCredentialsProfile | OAuth2PasswordProfile | BasicAuthProfile | BearerAuthProfile;
65
78
  /** Runtime projection also accepts structurally validated registry extensions and legacy numeric IDs. */
66
79
  export interface AuthProfileSchema {
67
80
  id: string | number;
@@ -101,7 +114,7 @@ export type AuthRequestPolicy = {
101
114
  mode: 'inherit';
102
115
  } | {
103
116
  mode: 'profile';
104
- profileIdentity: string;
117
+ profile: string;
105
118
  };
106
119
  export interface AuthResolveOptions {
107
120
  forceRefresh?: boolean;
@@ -133,8 +133,14 @@ export type ComponentSFCEditTriggerEvent = ComponentSFCInteractionTriggerEvent;
133
133
  export interface ComponentSFCEditableBehavior {
134
134
  value: RComponentSFC_IR_Value;
135
135
  triggers: RComponentSFC_IR_Value;
136
+ /** Triggers that discard the active draft. Defaults to Escape and focus leaving Editable. */
137
+ cancelTriggers: RComponentSFC_IR_Value;
138
+ /** Triggers that commit the active draft. Defaults to Enter. */
139
+ commitTriggers: RComponentSFC_IR_Value;
136
140
  /** Static suffix modifiers declared on `:edit-on`. */
137
141
  modifiers?: RComponentSFC_IR_EventModifier[];
142
+ cancelModifiers?: RComponentSFC_IR_EventModifier[];
143
+ commitModifiers?: RComponentSFC_IR_EventModifier[];
138
144
  }
139
145
  /** Нормализованное публичное событие завершённого редактирования. */
140
146
  export interface ComponentSFCEditedEventPayload<T = unknown> {
@@ -1,5 +1,6 @@
1
1
  import { RComponentDiagnostic } from '../component-core.types';
2
2
  import { TypeSourceDefinition } from '../../source/type-source.types';
3
+ import { EndgeSFCEditingConfiguration } from '../../configuration/configuration.type';
3
4
  import { RComponentSFC_IR_Tag } from './ir.types';
4
5
  import { RComponentSFC_SourceRange } from './location.types';
5
6
  /** Значение SFC source, подготовленное для безопасного отображения в visual editor. */
@@ -23,8 +24,8 @@ export interface ComponentSFCVisualAttribute {
23
24
  export type ComponentSFCTableCellBindingProjection = ComponentSFCVisualAttribute;
24
25
  export type ComponentSFCTableCellInteractionModifier = 'ctrl' | 'shift' | 'alt' | 'meta' | 'mod' | 'altGraph' | 'exact';
25
26
  export type ComponentSFCTableCellInteractionFlag = 'stop' | 'prevent' | 'self' | 'once' | 'capture' | 'passive';
26
- /** Visual-editor-safe projection of one static Cell `:on` rule. */
27
- export interface ComponentSFCTableCellInteractionRuleProjection {
27
+ /** UI-neutral projection одного статически разбираемого trigger взаимодействия. */
28
+ export interface ComponentSFCInteractionTriggerProjection {
28
29
  event: string;
29
30
  key: string[];
30
31
  code: string[];
@@ -39,9 +40,12 @@ export interface ComponentSFCTableCellInteractionRuleProjection {
39
40
  composing: boolean | null;
40
41
  button: number | null;
41
42
  flags: Partial<Record<ComponentSFCTableCellInteractionFlag, boolean>>;
43
+ }
44
+ /** UI-neutral projection одного статически разбираемого правила Cell `:on`. */
45
+ export interface ComponentSFCTableCellInteractionRuleProjection extends ComponentSFCInteractionTriggerProjection {
42
46
  reactionSource: string;
43
47
  }
44
- /** Source-preserving Cell interaction read-model used by the Table visual editor. */
48
+ /** Source-preserving read-model взаимодействий Cell для visual editor таблицы. */
45
49
  export interface ComponentSFCTableCellInteractionsProjection {
46
50
  editable: boolean;
47
51
  rules: ComponentSFCTableCellInteractionRuleProjection[];
@@ -49,19 +53,65 @@ export interface ComponentSFCTableCellInteractionsProjection {
49
53
  sourceRange?: RComponentSFC_SourceRange;
50
54
  message?: string;
51
55
  }
56
+ /** Source-backed локальная reaction одного semantic Event. */
57
+ export interface ComponentSFCEventReactionProjection {
58
+ editable: boolean;
59
+ source: string | null;
60
+ suffixes: ComponentSFCTableCellInteractionFlag[];
61
+ sourceRange?: RComponentSFC_SourceRange;
62
+ message?: string;
63
+ }
64
+ export interface ComponentSFCEditOutcomeProjection {
65
+ editable: boolean;
66
+ triggers: ComponentSFCInteractionTriggerProjection[];
67
+ usesDefault: boolean;
68
+ suffixes: ComponentSFCTableCellInteractionFlag[];
69
+ message?: string;
70
+ }
71
+ export type ComponentSFCTableVisualCellSyntax = 'cell' | 'direct' | 'editable-default' | 'editable-edit';
72
+ export type ComponentSFCTableEditableElementProjection = {
73
+ kind: 'component';
74
+ identity: string | null;
75
+ syntax: ComponentSFCTableVisualCellSyntax;
76
+ bindings: ComponentSFCTableCellBindingProjection[];
77
+ } | {
78
+ kind: 'tag';
79
+ tag: ComponentSFCTableVisualCellTag;
80
+ syntax: ComponentSFCTableVisualCellSyntax;
81
+ bindings: ComponentSFCTableCellBindingProjection[];
82
+ } | {
83
+ kind: 'source';
84
+ };
85
+ /** Source-backed editable-поведение единственного управляемого корня ячейки Table. */
86
+ export interface ComponentSFCTableCellEditingProjection {
87
+ editable: boolean;
88
+ enabled: boolean;
89
+ mode: 'primitive' | 'custom' | 'component' | 'source' | 'unavailable';
90
+ tag: string | null;
91
+ triggers: ComponentSFCInteractionTriggerProjection[];
92
+ usesDefaultTrigger: boolean;
93
+ suffixes: ComponentSFCTableCellInteractionFlag[];
94
+ reaction: ComponentSFCEventReactionProjection;
95
+ cancel: ComponentSFCEditOutcomeProjection;
96
+ commit: ComponentSFCEditOutcomeProjection;
97
+ editor: ComponentSFCTableEditableElementProjection | null;
98
+ editorImplicit: boolean;
99
+ sourceRange?: RComponentSFC_SourceRange;
100
+ message?: string;
101
+ }
52
102
  /** Способ, которым содержимое ячейки представлено в простом visual editor. */
53
- export type ComponentSFCTableVisualCellTag = Exclude<RComponentSFC_IR_Tag, 'Component' | 'Table' | 'Column' | 'Cell' | 'ColumnMenu' | 'RowMenu' | 'MenuItem' | 'MenuSeparator'>;
103
+ export type ComponentSFCTableVisualCellTag = Exclude<RComponentSFC_IR_Tag, 'Component' | 'Table' | 'Column' | 'Cell' | 'ColumnMenu' | 'RowMenu' | 'MenuItem' | 'MenuSeparator' | 'Editable' | 'Variant'>;
54
104
  export type ComponentSFCTableCellProjection = {
55
105
  kind: 'default';
56
106
  } | {
57
107
  kind: 'component';
58
108
  identity: string | null;
59
- syntax: 'cell' | 'direct';
109
+ syntax: ComponentSFCTableVisualCellSyntax;
60
110
  bindings: ComponentSFCTableCellBindingProjection[];
61
111
  } | {
62
112
  kind: 'tag';
63
113
  tag: ComponentSFCTableVisualCellTag;
64
- syntax: 'cell' | 'direct';
114
+ syntax: ComponentSFCTableVisualCellSyntax;
65
115
  bindings: ComponentSFCTableCellBindingProjection[];
66
116
  } | {
67
117
  kind: 'source';
@@ -72,6 +122,8 @@ export interface ComponentSFCVisualInspectionOptions {
72
122
  resolveTypeDefinition?: (identity: string) => TypeSourceDefinition | null;
73
123
  /** Direct Action identities available to source-authored MenuItem bindings. */
74
124
  actionIdentities?: Iterable<string>;
125
+ /** Effective editing defaults текущего compiler context. */
126
+ sfcEditing?: EndgeSFCEditingConfiguration;
75
127
  }
76
128
  /** Visual read-model одной прямой Column внутри корневого Table. */
77
129
  export interface ComponentSFCTableColumnProjection {
@@ -86,6 +138,7 @@ export interface ComponentSFCTableColumnProjection {
86
138
  pinnable: ComponentSFCVisualSourceValue | null;
87
139
  attributes: ComponentSFCVisualAttribute[];
88
140
  cell: ComponentSFCTableCellProjection;
141
+ editing: ComponentSFCTableCellEditingProjection;
89
142
  interactions: ComponentSFCTableCellInteractionsProjection;
90
143
  hasCustomCell: boolean;
91
144
  cellSource: string | null;
@@ -143,12 +196,12 @@ export type ComponentSFCTableSourcePatch = {
143
196
  type: 'set-column-component';
144
197
  columnIndex: number;
145
198
  identity: string | null;
146
- syntax?: 'cell' | 'direct';
199
+ syntax?: ComponentSFCTableVisualCellSyntax;
147
200
  } | {
148
201
  type: 'set-column-tag';
149
202
  columnIndex: number;
150
203
  tag: ComponentSFCTableVisualCellTag | null;
151
- syntax?: 'cell' | 'direct';
204
+ syntax?: ComponentSFCTableVisualCellSyntax;
152
205
  } | {
153
206
  type: 'set-column-cell-attribute';
154
207
  columnIndex: number;
@@ -160,6 +213,44 @@ export type ComponentSFCTableSourcePatch = {
160
213
  columnIndex: number;
161
214
  /** Complete object/array expression, or null to remove the annotation. */
162
215
  value: string | null;
216
+ } | {
217
+ type: 'set-column-cell-editable';
218
+ columnIndex: number;
219
+ enabled: boolean;
220
+ } | {
221
+ type: 'set-column-cell-edit-triggers';
222
+ columnIndex: number;
223
+ /** Empty list restores the implicit click trigger and removes edit-on from Source. */
224
+ triggers: ComponentSFCInteractionTriggerProjection[];
225
+ } | {
226
+ type: 'set-column-cell-edited-reaction';
227
+ columnIndex: number;
228
+ /** Complete local reaction expression, or null to remove @edited. */
229
+ value: string | null;
230
+ } | {
231
+ type: 'set-column-cell-cancel-triggers';
232
+ columnIndex: number;
233
+ /** Null inherits effective configuration; an empty list explicitly disables automatic cancellation. */
234
+ triggers: ComponentSFCInteractionTriggerProjection[] | null;
235
+ } | {
236
+ type: 'set-column-cell-commit-triggers';
237
+ columnIndex: number;
238
+ /** Null inherits effective configuration; an empty list explicitly disables automatic commit. */
239
+ triggers: ComponentSFCInteractionTriggerProjection[] | null;
240
+ } | {
241
+ type: 'set-column-cell-editor-component';
242
+ columnIndex: number;
243
+ identity: string;
244
+ } | {
245
+ type: 'set-column-cell-editor-tag';
246
+ columnIndex: number;
247
+ tag: ComponentSFCTableVisualCellTag;
248
+ } | {
249
+ type: 'set-column-cell-editor-attribute';
250
+ columnIndex: number;
251
+ name: string;
252
+ value: string | null;
253
+ valueKind: 'expression' | 'literal';
163
254
  } | {
164
255
  type: 'set-menu-mode';
165
256
  menu: ComponentSFCTableVisualMenuKind;
@@ -1,3 +1,4 @@
1
+ import { ComponentSFCInteractionTrigger } from '../component/sfc/ir.types';
1
2
  import { DiagnosticsSeverityNumber, DiagnosticsSignal, EndgeDiagnosticsOutputConfiguration, EndgeDiagnosticsConfiguration, EndgeDiagnosticsRoute } from '../diagnostics/diagnostics.types';
2
3
  import { EndgeExecutionContext } from '../runtime/execution-context.types';
3
4
  export interface EndgeLocaleDefinition {
@@ -10,20 +11,18 @@ export interface EndgeThemeDefinition {
10
11
  identity: string;
11
12
  displayName: string;
12
13
  }
13
- export type EndgeSSEAuthMode = 'inherit' | 'profile' | 'none';
14
14
  export interface EndgeVariableDefinition {
15
15
  name: string;
16
16
  defaultValue: string;
17
17
  }
18
- export interface EndgeSSEConfiguration {
19
- url: string;
20
- authMode?: EndgeSSEAuthMode;
21
- authProfileIdentity?: string | null;
18
+ /** Effective defaults завершения одной SFC edit session. */
19
+ export interface EndgeSFCEditingConfiguration {
20
+ cancelOn: ComponentSFCInteractionTrigger[];
21
+ commitOn: ComponentSFCInteractionTrigger[];
22
22
  }
23
23
  /** Полная конфигурация, с которой компилируется один Endge context. */
24
24
  export interface EndgeConfiguration {
25
25
  vars: EndgeVariableDefinition[];
26
- sse?: EndgeSSEConfiguration;
27
26
  locales: EndgeLocaleDefinition[];
28
27
  defaultLocale: string;
29
28
  fallbackLocale: string;
@@ -32,6 +31,8 @@ export interface EndgeConfiguration {
32
31
  defaultAuthProfileIdentity: string | null;
33
32
  sfcAdapterIds: string[];
34
33
  defaultSfcAdapterId: string;
34
+ /** Effective triggers, которые наследуют editable-узлы без локальных атрибутов. */
35
+ sfcEditing: EndgeSFCEditingConfiguration;
35
36
  /** Настройки telemetry, output adapters, routing и snapshots. */
36
37
  diagnostics: EndgeDiagnosticsConfiguration;
37
38
  }
@@ -41,6 +42,11 @@ export type EndgeValueOverride<T> = {
41
42
  } | {
42
43
  op: 'remove';
43
44
  };
45
+ /** Независимые override-операции SFC editing для одного configuration layer. */
46
+ export interface EndgeSFCEditingConfigurationPatch {
47
+ cancelOn?: EndgeValueOverride<ComponentSFCInteractionTrigger[]>;
48
+ commitOn?: EndgeValueOverride<ComponentSFCInteractionTrigger[]>;
49
+ }
44
50
  export type EndgeCollectionPatchEntry<T> = {
45
51
  key: string;
46
52
  op: 'upsert';
@@ -55,7 +61,6 @@ export interface EndgeCollectionPatch<T> {
55
61
  /** Локальные операции inherit-слоя. Отсутствующее поле наследуется без изменений. */
56
62
  export interface EndgeConfigurationPatch {
57
63
  vars?: EndgeCollectionPatch<EndgeVariableDefinition>;
58
- sse?: EndgeValueOverride<EndgeSSEConfiguration>;
59
64
  locales?: EndgeCollectionPatch<EndgeLocaleDefinition>;
60
65
  defaultLocale?: EndgeValueOverride<string>;
61
66
  fallbackLocale?: EndgeValueOverride<string>;
@@ -64,6 +69,7 @@ export interface EndgeConfigurationPatch {
64
69
  defaultAuthProfileIdentity?: EndgeValueOverride<string>;
65
70
  sfcAdapterIds?: EndgeCollectionPatch<string>;
66
71
  defaultSfcAdapterId?: EndgeValueOverride<string>;
72
+ sfcEditing?: EndgeSFCEditingConfigurationPatch;
67
73
  /** Локальный contribution diagnostics для текущего configuration layer. */
68
74
  diagnostics?: EndgeDiagnosticsConfigurationPatch;
69
75
  }
@@ -2,7 +2,7 @@ export type RQueryAuthMode = 'none' | 'inherit' | 'profile';
2
2
  export interface RQueryAuth {
3
3
  mode: RQueryAuthMode;
4
4
  /** Identity auth-profile для mode=profile. */
5
- profileIdentity?: string;
5
+ profile?: string;
6
6
  /** Схема для заголовка (по умолчанию "Bearer"). */
7
7
  scheme?: string;
8
8
  /** Имя заголовка (по умолчанию "Authorization"). */
@@ -1,12 +1,10 @@
1
- import { EndgeConfiguration, EndgeLocaleDefinition, EndgeSSEAuthMode, EndgeSSEConfiguration, EndgeThemeDefinition, EndgeVariableDefinition } from '../configuration/configuration.type';
1
+ import { EndgeConfiguration, EndgeLocaleDefinition, EndgeThemeDefinition, EndgeVariableDefinition } from '../configuration/configuration.type';
2
2
  import { EntityManagement } from './entity-management.type';
3
3
  export type EndgeWorkspaceLocale = EndgeLocaleDefinition;
4
4
  export type EndgeDataMode = 'live' | 'mock';
5
5
  export type EndgeWorkspaceLocaleLabelMode = keyof Pick<EndgeWorkspaceLocale, 'displayName' | 'shortLabel'>;
6
6
  export type EndgeWorkspaceTheme = EndgeThemeDefinition;
7
- export type EndgeWorkspaceSSEAuthMode = EndgeSSEAuthMode;
8
7
  export type EndgeWorkspaceVar = EndgeVariableDefinition;
9
- export type EndgeWorkspaceSSEConfig = EndgeSSEConfiguration;
10
8
  export interface WorkspaceIntegrationReference {
11
9
  integrationId: string | number;
12
10
  integrationIdentity: string;
@@ -10,6 +10,8 @@ export interface I18nRuntimeCatalogEntry {
10
10
  }
11
11
  /** Накопленный translation catalog, доступный дочернему runtime. */
12
12
  export type I18nRuntimeCatalog = Record<string, I18nRuntimeCatalogEntry>;
13
+ /** Authoring-only provenance: public alias -> locale -> message key -> document identity. */
14
+ export type I18nCatalogProvenance = Record<string, Record<string, Record<string, string>>>;
13
15
  export interface I18nTranslateOptions {
14
16
  locale?: string;
15
17
  fallbackLocale?: string;
@@ -17,9 +17,6 @@ export interface EndgeCustomEventMap {
17
17
  }
18
18
  /** Статические события Endge Core. */
19
19
  export interface EndgeCoreEventMap {
20
- 'sse:message': {
21
- message: unknown;
22
- };
23
20
  'updates:message': {
24
21
  type: string;
25
22
  message: unknown;
@@ -4,6 +4,7 @@ export type RuntimeActionSurface = string;
4
4
  /** Stable identities of targetless Actions provided by Endge itself. */
5
5
  export declare const BUILTIN_ACTION_IDS: {
6
6
  readonly consoleLog: "built-in-console-log";
7
+ readonly testAlert: "built-in-test-alert";
7
8
  readonly vocabAcquire: "built-in-vocabs-acquire";
8
9
  readonly vocabRefresh: "built-in-vocabs-refresh";
9
10
  readonly vocabInvalidate: "built-in-vocabs-invalidate";
@@ -21,6 +21,7 @@ export interface EndgePersistenceScope {
21
21
  environmentId: string;
22
22
  userId: string;
23
23
  }
24
+ export type EndgePersistenceScopeResolver = () => EndgePersistenceScope;
24
25
  export interface EndgeSessionIdentity {
25
26
  userId?: string | null;
26
27
  tenantId?: string | null;
@@ -1,3 +1,4 @@
1
+ import { I18nCatalogProvenance, I18nRuntimeCatalog } from '../i18n.types';
1
2
  /** Канонический тип source-документа, для которого выбирается source strategy. */
2
3
  export type SourceKind = 'query' | 'data-view' | 'filter' | 'composition' | 'store' | 'stream' | 'update' | 'computation' | 'style' | 'type';
3
4
  /** Тип нейтральной source completion без привязки к Monaco или другому editor API. */
@@ -23,6 +24,20 @@ export interface SourceLanguageContext {
23
24
  }>;
24
25
  /** Identity of the document that owns current source diagnostics. */
25
26
  ownerIdentity?: string;
27
+ /** Effective translation catalogs for all current Project occurrences. */
28
+ i18n?: SourceLanguageI18nContext;
29
+ }
30
+ /** One statically projected Composition occurrence in the current Project. */
31
+ export interface SourceLanguageI18nOccurrence {
32
+ id: string;
33
+ catalogsByScope: Readonly<Record<string, I18nRuntimeCatalog>>;
34
+ provenanceByScope: Readonly<Record<string, I18nCatalogProvenance>>;
35
+ }
36
+ /** Translation input prepared by the application without mounting Runtime. */
37
+ export interface SourceLanguageI18nContext {
38
+ locale: string;
39
+ fallbackLocale: string;
40
+ occurrences: readonly SourceLanguageI18nOccurrence[];
26
41
  }
27
42
  /** Нейтральная completion item, которую editor adapter мапит в свой формат. */
28
43
  export interface SourceLanguageCompletion {
@@ -38,7 +53,7 @@ export interface SourceLanguageCompletion {
38
53
  documentation?: string;
39
54
  }
40
55
  /** Логический тип внешнего доменного документа, на который ссылается source. */
41
- export type SourceDocumentReferenceTarget = 'auth-profile' | 'component' | 'composition' | 'computation' | 'converter' | 'data-view' | 'filter' | 'mock' | 'query' | 'store' | 'stream' | 'update' | 'style' | 'type' | 'vocabs';
56
+ export type SourceDocumentReferenceTarget = 'auth-profile' | 'component' | 'composition' | 'computation' | 'converter' | 'data-view' | 'filter' | 'i18n-bundles' | 'mock' | 'query' | 'store' | 'stream' | 'update' | 'style' | 'type' | 'vocabs';
42
57
  /** Семантическая ссылка из source на внешний доменный документ. */
43
58
  export interface SourceDocumentReference {
44
59
  /** Логический тип цели; UI может уточнить concrete document type через domain. */
@@ -58,6 +73,14 @@ export interface SourceLanguageSemanticHighlight {
58
73
  identity: string;
59
74
  range: SourceDocumentReference['range'];
60
75
  }
76
+ /** Renderer-neutral inline annotation shown after one source range. */
77
+ export interface SourceLanguageInlineHint {
78
+ kind: 'translation';
79
+ status: 'resolved' | 'ambiguous';
80
+ text: string;
81
+ tooltip?: string;
82
+ range: SourceDocumentReference['range'];
83
+ }
61
84
  /** Результат validation source language strategy. */
62
85
  export interface SourceLanguageValidationResult extends SourceEngineResult {
63
86
  /** Diagnostics, найденные language strategy. */
@@ -185,4 +208,6 @@ export interface SourceLanguageStrategy {
185
208
  resolveReference?: (context: SourceLanguageContext) => SourceDocumentReference | null;
186
209
  /** Возвращает semantic highlights без привязки к конкретному editor adapter. */
187
210
  semanticHighlights?: (context: SourceLanguageContext) => SourceLanguageSemanticHighlight[];
211
+ /** Возвращает inline annotations без привязки к конкретному editor adapter. */
212
+ inlineHints?: (context: SourceLanguageContext) => SourceLanguageInlineHint[];
188
213
  }
@@ -3,7 +3,8 @@ export interface StreamSseTransportDescriptor {
3
3
  kind: 'sse';
4
4
  url: string;
5
5
  withCredentials: boolean;
6
- authMode: 'inherit' | 'none';
6
+ authMode: 'inherit' | 'profile' | 'none';
7
+ authProfileIdentity: string | null;
7
8
  }
8
9
  export type StreamTransportDescriptor = StreamSseTransportDescriptor;
9
10
  export interface StreamEventDescriptor {
package/dist/main.d.ts CHANGED
@@ -182,6 +182,7 @@ export * from './model/seed/converters/date/string-to-date';
182
182
  export * from './model/seed/converters/date/weekdays-range';
183
183
  export * from './model/services/document/DocumentDraftFactory';
184
184
  export * from './model/services/configuration/endge-configuration';
185
+ export * from './model/services/i18n/composition-i18n-catalog-projection';
185
186
  export * from './domain/entities/runtime/RuntimeHostBase';
186
187
  export * from './domain/entities/runtime/RuntimeHostRegistry';
187
188
  export * from './domain/entities/runtime/RuntimeAppScope';
@@ -7,7 +7,6 @@ export declare const ENDGE_COMPILER_SPAN_GROUPS: {
7
7
  readonly ACTIONS: "actions";
8
8
  readonly CONVERTERS: "converters";
9
9
  readonly QUERIES: "queries";
10
- readonly SSE: "sse";
11
10
  readonly RAPH: "raph";
12
11
  };
13
12
  /** Runtime fallback limits для nested computation execution. */
@@ -0,0 +1,3 @@
1
+ import { EndgeSFCEditingConfiguration } from '../../domain/types/configuration/configuration.type';
2
+ /** Системные triggers завершения edit session до Workspace cascade. */
3
+ export declare const DEFAULT_ENDGE_SFC_EDITING_CONFIGURATION: Readonly<EndgeSFCEditingConfiguration>;
@@ -33,7 +33,7 @@ export declare const ENDGE_UI_DEFAULT_DEFINITIONS: ({
33
33
  roles: {
34
34
  role: string;
35
35
  description: string;
36
- supportedSurfaces: ("runtime" | "canvas" | "admin")[];
36
+ supportedSurfaces: ("canvas" | "runtime" | "admin")[];
37
37
  }[];
38
38
  };
39
39
  defaultLayout?: undefined;
@@ -78,7 +78,7 @@ export declare const ENDGE_UI_DEFAULT_DEFINITIONS: ({
78
78
  roles: {
79
79
  role: string;
80
80
  description: string;
81
- supportedSurfaces: ("runtime" | "canvas" | "admin")[];
81
+ supportedSurfaces: ("canvas" | "runtime" | "admin")[];
82
82
  defaultRendererRefs: {
83
83
  admin: string;
84
84
  runtime: string;
@@ -126,7 +126,7 @@ export declare const ENDGE_UI_DEFAULT_DEFINITIONS: ({
126
126
  roles: {
127
127
  role: string;
128
128
  description: string;
129
- supportedSurfaces: ("runtime" | "canvas" | "admin")[];
129
+ supportedSurfaces: ("canvas" | "runtime" | "admin")[];
130
130
  defaultRendererRefs: {
131
131
  admin: string;
132
132
  runtime: string;
@@ -174,7 +174,7 @@ export declare const ENDGE_UI_DEFAULT_DEFINITIONS: ({
174
174
  roles: {
175
175
  role: string;
176
176
  description: string;
177
- supportedSurfaces: ("runtime" | "canvas" | "admin")[];
177
+ supportedSurfaces: ("canvas" | "runtime" | "admin")[];
178
178
  defaultRendererRefs: {
179
179
  admin: string;
180
180
  runtime: string;
@@ -222,7 +222,7 @@ export declare const ENDGE_UI_DEFAULT_DEFINITIONS: ({
222
222
  roles: {
223
223
  role: string;
224
224
  description: string;
225
- supportedSurfaces: ("runtime" | "canvas" | "admin")[];
225
+ supportedSurfaces: ("canvas" | "runtime" | "admin")[];
226
226
  defaultRendererRefs: {
227
227
  admin: string;
228
228
  runtime: string;
@@ -270,7 +270,7 @@ export declare const ENDGE_UI_DEFAULT_DEFINITIONS: ({
270
270
  roles: {
271
271
  role: string;
272
272
  description: string;
273
- supportedSurfaces: ("runtime" | "canvas" | "admin")[];
273
+ supportedSurfaces: ("canvas" | "runtime" | "admin")[];
274
274
  defaultRendererRefs: {
275
275
  admin: string;
276
276
  runtime: string;
@@ -319,7 +319,7 @@ export declare const ENDGE_UI_DEFAULT_DEFINITIONS: ({
319
319
  roles: ({
320
320
  role: string;
321
321
  description: string;
322
- supportedSurfaces: ("runtime" | "canvas" | "admin")[];
322
+ supportedSurfaces: ("canvas" | "runtime" | "admin")[];
323
323
  defaultRendererRefs: {
324
324
  admin: string;
325
325
  runtime: string;
@@ -375,7 +375,7 @@ export declare const ENDGE_UI_DEFAULT_DEFINITIONS: ({
375
375
  roles: {
376
376
  role: string;
377
377
  description: string;
378
- supportedSurfaces: ("runtime" | "canvas" | "admin")[];
378
+ supportedSurfaces: ("canvas" | "runtime" | "admin")[];
379
379
  defaultRendererRefs: {
380
380
  admin: string;
381
381
  runtime: string;
@@ -423,7 +423,7 @@ export declare const ENDGE_UI_DEFAULT_DEFINITIONS: ({
423
423
  roles: ({
424
424
  role: string;
425
425
  description: string;
426
- supportedSurfaces: ("runtime" | "canvas" | "admin")[];
426
+ supportedSurfaces: ("canvas" | "runtime" | "admin")[];
427
427
  defaultRendererRefs: {
428
428
  admin: string;
429
429
  runtime: string;
@@ -481,7 +481,7 @@ export declare const ENDGE_UI_DEFAULT_DEFINITIONS: ({
481
481
  roles: {
482
482
  role: string;
483
483
  description: string;
484
- supportedSurfaces: ("runtime" | "canvas" | "admin")[];
484
+ supportedSurfaces: ("canvas" | "runtime" | "admin")[];
485
485
  defaultRendererRefs: {
486
486
  admin: string;
487
487
  runtime: string;
@@ -22,7 +22,6 @@ import { EndgeRuntime } from '../modules/runtime/core/endge-runtime';
22
22
  import { EndgeRuntimeDebugger } from '../modules/diagnostics/endge-runtime-debugger';
23
23
  import { EndgeDomainRepository } from '../modules/domain/endge-domain-repository';
24
24
  import { EndgeSource } from '../modules/program/endge-source';
25
- import { EndgeSSE } from '../modules/runtime/input/endge-sse';
26
25
  import { EndgeStyles } from '../modules/ui/endge-styles';
27
26
  import { EndgeUI } from '../modules/ui/endge-ui';
28
27
  import { EndgeUpdates } from '../modules/runtime/core/endge-updates';
@@ -151,10 +150,6 @@ export declare class Endge extends EndgeFederation {
151
150
  * Доступ к event bus модулю.
152
151
  */
153
152
  static get events(): EndgeEvents;
154
- /**
155
- * Доступ к SSE-модулю.
156
- */
157
- static get sse(): EndgeSSE;
158
153
  /**
159
154
  * Доступ к UI state модулю.
160
155
  */
@@ -50,8 +50,8 @@ export declare class WorkspaceVariables {
50
50
  currentValue: string;
51
51
  }>;
52
52
  /**
53
- * Резолвит строку вида `{{ VAR }}` или legacy `{VAR}` в значение переменной
54
- * и применяет optional coercion.
53
+ * Резолвит одиночные токены и интерполирует несколько переменных в строке,
54
+ * затем применяет optional coercion.
55
55
  */
56
56
  resolve<T = string>(raw: unknown, options?: {
57
57
  coerce?: (value: string | number | boolean | null | undefined) => T;
@@ -70,6 +70,8 @@ export declare class WorkspaceVariables {
70
70
  * Приводит значение переменной к boolean.
71
71
  */
72
72
  static toBoolean(v: unknown): boolean;
73
+ /** Интерполирует все корректные `{{ VAR }}` и legacy `{VAR}` токены в строке. */
74
+ private _interpolate;
73
75
  /**
74
76
  * Внутренний helper модуля: parse Var Token.
75
77
  */
@@ -1,5 +1,5 @@
1
1
  import { EndgeBootContext } from '../../../domain/types/kernel/bootstrap.types';
2
- import { EndgeDataMode, EndgeWorkspaceDefinition, EndgeWorkspaceLocale, EndgeWorkspaceLocaleLabelMode, EndgeWorkspaceSSEConfig, EndgeWorkspaceTheme, EndgeWorkspaceVar } from '../../../domain/types/document/workspace.types';
2
+ import { EndgeDataMode, EndgeWorkspaceDefinition, EndgeWorkspaceLocale, EndgeWorkspaceLocaleLabelMode, EndgeWorkspaceTheme, EndgeWorkspaceVar } from '../../../domain/types/document/workspace.types';
3
3
  import { EndgeModule } from '../../../domain/entities/endge/EndgeModule';
4
4
  import { WorkspaceVariables } from './endge-vars';
5
5
  /**
@@ -53,8 +53,6 @@ export declare class EndgeWorkspace extends EndgeModule {
53
53
  get vars(): EndgeWorkspaceVar[];
54
54
  /** Explicit name for the persisted variable definitions. */
55
55
  get variableDefinitions(): EndgeWorkspaceVar[];
56
- /** Возвращает workspace SSE config. */
57
- get sse(): EndgeWorkspaceSSEConfig | undefined;
58
56
  /** Возвращает locale по умолчанию. */
59
57
  get defaultLocale(): string;
60
58
  /** Возвращает fallback locale. */
@@ -1,17 +1,20 @@
1
- import { EndgePersistenceScope, EndgeStorageAdapter, RuntimeStateControllerLike } from '../../../../domain/types/runtime/context-persistence.types';
1
+ import { EndgePersistenceScope, EndgePersistenceScopeResolver, EndgeStorageAdapter, RuntimeStateControllerLike } from '../../../../domain/types/runtime/context-persistence.types';
2
2
  export declare function buildRuntimeStateStorageKey(scope: EndgePersistenceScope, runtimeId: string): string;
3
3
  export declare class RuntimeStateController implements RuntimeStateControllerLike {
4
4
  readonly runtimeId: string;
5
5
  readonly storageId: string;
6
- readonly storageKey: string;
7
- readonly scope: EndgePersistenceScope;
8
6
  private readonly _adapter;
7
+ private readonly _resolveScope;
9
8
  constructor(input: {
10
9
  runtimeId: string;
11
10
  storageId?: string;
12
- scope: EndgePersistenceScope;
11
+ scope: EndgePersistenceScope | EndgePersistenceScopeResolver;
13
12
  adapter: EndgeStorageAdapter;
14
13
  });
14
+ /** Возвращает актуальный persistence scope, включая текущую session identity. */
15
+ get scope(): EndgePersistenceScope;
16
+ /** Строит storage key из актуального scope, чтобы переавторизация не сохраняла данные прежнему пользователю. */
17
+ get storageKey(): string;
15
18
  get<T>(entityKey: string, section: string, fallback: T): T;
16
19
  set<T>(entityKey: string, section: string, value: T): void;
17
20
  remove(entityKey: string, section?: string): void;
@@ -158,6 +158,10 @@ export declare class EndgeDomain extends EndgeModule {
158
158
  * Объединяет доменные данные из JSON.
159
159
  */
160
160
  merge(json: any): void;
161
+ /** Заменяет сохранённую сущность, не меняя её позицию в коллекции домена. */
162
+ replacePersistedEntity(currentEntity: object, nextEntity: object): void;
163
+ private _entityIndexes;
164
+ private _replaceUpdateOwnerIndex;
161
165
  /** Нормализует live workspace snapshot нового backend и объединяет его с доменом. */
162
166
  mergeFromSnapshot(snapshot: EndgeLiveDomainSnapshot): void;
163
167
  /** Нормализует immutable workspace bundle без создания фиктивного server-side state. */