@endge/core 8.0.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/core.js +25879 -24370
  2. package/dist/features/core/kernel/config/debugger.config.d.ts +3 -0
  3. package/dist/features/core/kernel/config/modules.config.d.ts +8 -3
  4. package/dist/features/core/kernel/endge.d.ts +22 -8
  5. package/dist/features/core/kernel/errors/EndgeDebuggerReadOnlyError.d.ts +5 -0
  6. package/dist/features/core/kernel/tools/debugger-snapshot.d.ts +13 -0
  7. package/dist/features/core/kernel/tools/read-only-document.d.ts +2 -0
  8. package/dist/features/core/kernel/types/bootstrap.types.d.ts +7 -1
  9. package/dist/features/core/modules/bridge/EndgeBridge_Module.d.ts +2 -2
  10. package/dist/features/core/modules/bridge/adapters/BrowserBridge_Adapter.d.ts +0 -3
  11. package/dist/features/core/modules/bridge/config/bridge.config.d.ts +17 -0
  12. package/dist/features/core/modules/bridge/debug/EndgeBridgeDebug_Module.d.ts +57 -6
  13. package/dist/features/core/modules/bridge/domain/bridge-sync.type.d.ts +30 -0
  14. package/dist/features/core/modules/bridge/domain/bridge.type.d.ts +0 -8
  15. package/dist/features/core/modules/bridge/tools/bridge-sync.d.ts +16 -0
  16. package/dist/features/core/modules/commands/EndgeCommands_Module.d.ts +17 -0
  17. package/dist/features/core/modules/commands/config/commands.config.d.ts +9 -0
  18. package/dist/features/core/modules/commands/domain/commands.types.d.ts +43 -0
  19. package/dist/features/core/modules/commands/services/LocalCommandExecutor.d.ts +9 -0
  20. package/dist/features/core/modules/commands/services/RemoteCommandExecutor.d.ts +9 -0
  21. package/dist/features/core/modules/commands/services/context/SetDataModeCommand.d.ts +9 -0
  22. package/dist/features/core/modules/commands/services/context/SetEnvironmentCommand.d.ts +9 -0
  23. package/dist/features/core/modules/commands/services/context/SetLocaleCommand.d.ts +9 -0
  24. package/dist/features/core/modules/commands/services/context/SetProjectCommand.d.ts +9 -0
  25. package/dist/features/core/modules/commands/services/context/SetTenantCommand.d.ts +9 -0
  26. package/dist/features/core/modules/commands/services/context/SetThemeCommand.d.ts +9 -0
  27. package/dist/features/core/modules/commands/services/context/SetTimezoneCommand.d.ts +9 -0
  28. package/dist/features/core/modules/commands/services/context/SetUserCommand.d.ts +9 -0
  29. package/dist/features/core/modules/commands/services/context/SetWorkspaceCommand.d.ts +9 -0
  30. package/dist/features/core/modules/commands/services/runtime/PauseRuntimeCommand.d.ts +9 -0
  31. package/dist/features/core/modules/commands/services/runtime/ResumeRuntimeCommand.d.ts +9 -0
  32. package/dist/features/core/modules/commands/services/runtime/StopRuntimeCommand.d.ts +9 -0
  33. package/dist/features/core/modules/commands/tools/command-payload.d.ts +4 -0
  34. package/dist/features/core/modules/commands/types/command-executor.type.d.ts +19 -0
  35. package/dist/features/core/modules/commands/types/context-command-target.type.d.ts +14 -0
  36. package/dist/features/core/modules/commands/types/runtime-command-target.type.d.ts +5 -0
  37. package/dist/features/core/modules/compiler/EndgeCompiler_Module.d.ts +4 -0
  38. package/dist/features/core/modules/computations/model/ComputationResource.d.ts +11 -1
  39. package/dist/features/core/modules/computations/model/ComputationResourceRegistry.d.ts +9 -0
  40. package/dist/features/core/modules/configuration/EndgeConfiguration_Module.d.ts +2 -0
  41. package/dist/features/core/modules/context/EndgeContext_Module.d.ts +18 -1
  42. package/dist/features/core/modules/context/domain/context-events.types.d.ts +8 -0
  43. package/dist/features/core/modules/diagnostics/EndgeDiagnosticsSnapshots_Module.d.ts +2 -5
  44. package/dist/features/core/modules/diagnostics/EndgeDiagnostics_Module.d.ts +2 -2
  45. package/dist/features/core/modules/diagnostics/domain/types/diagnostics.types.d.ts +0 -10
  46. package/dist/features/core/modules/domain/EndgeDomain_Module.d.ts +2 -0
  47. package/dist/features/core/modules/domain/entities/RSimulation.d.ts +1 -1
  48. package/dist/features/core/modules/events/EndgeEvents_Module.d.ts +13 -63
  49. package/dist/features/core/modules/events/domain/events.types.d.ts +36 -22
  50. package/dist/features/core/modules/i18n/tools/resolve-runtime-translation.d.ts +3 -0
  51. package/dist/features/core/modules/runtime/ComponentSFCEventBoundary.d.ts +1 -1
  52. package/dist/features/core/modules/runtime/EndgeRuntimeScopes_Module.d.ts +5 -0
  53. package/dist/features/core/modules/runtime/EndgeRuntime_Module.d.ts +43 -2
  54. package/dist/features/core/modules/runtime/domain/component-sfc-render-port.types.d.ts +8 -0
  55. package/dist/features/core/modules/runtime/domain/runtime-entity-map.types.d.ts +3 -0
  56. package/dist/features/core/modules/runtime/domain/runtime-host.types.d.ts +3 -0
  57. package/dist/features/core/modules/runtime/domain/runtime-inspection.types.d.ts +28 -0
  58. package/dist/features/core/modules/runtime/domain/runtime-render-inspection.types.d.ts +27 -0
  59. package/dist/features/core/modules/runtime/domain/runtime.types.d.ts +4 -2
  60. package/dist/features/core/modules/runtime/domain/simulation-runtime.types.d.ts +25 -0
  61. package/dist/features/core/modules/runtime/domain/stream-runtime.types.d.ts +3 -1
  62. package/dist/features/core/modules/runtime/execution/endge-simulation.d.ts +5 -0
  63. package/dist/features/core/modules/runtime/hosts/ComponentSFCRuntimeHost.d.ts +3 -0
  64. package/dist/features/core/modules/runtime/hosts/FilterViewRuntimeHost.d.ts +5 -0
  65. package/dist/features/core/modules/runtime/hosts/SimulationRuntimeHost.d.ts +52 -0
  66. package/dist/features/core/modules/runtime/hosts/StreamRuntimeHost.d.ts +7 -4
  67. package/dist/features/core/modules/runtime/services/simulation/create-simulation-schema.d.ts +5 -0
  68. package/dist/features/core/modules/runtime/services/simulation/find-simulation-runtime.d.ts +4 -0
  69. package/dist/features/core/modules/runtime/services/simulation/prepare-simulation-overrides.d.ts +14 -0
  70. package/dist/features/core/modules/runtime/services/strategies/SimulationRuntimeStrategy.d.ts +9 -0
  71. package/dist/features/core/modules/runtime/tools/runtime-inspection.d.ts +10 -0
  72. package/dist/features/core/modules/runtime/tools/runtime-render-inspection.d.ts +6 -0
  73. package/dist/features/core/modules/runtime/tools/runtime-render-values.d.ts +4 -0
  74. package/dist/features/core/modules/source/domain/types/simulation-source.types.d.ts +21 -1
  75. package/dist/features/core/modules/source/services/SimulationSourceResolver.d.ts +1 -1
  76. package/dist/features/core/modules/source/templates/simulation.default.source.d.ts +1 -1
  77. package/dist/features/core/modules/workspace/EndgeWorkspace_Module.d.ts +2 -0
  78. package/dist/features/federation/EndgeFederation.d.ts +3 -0
  79. package/dist/features/federation/types/federation.types.d.ts +5 -0
  80. package/dist/main.d.ts +18 -0
  81. package/package.json +3 -3
  82. package/dist/features/core/modules/events/domain/EndgeEvent.d.ts +0 -33
@@ -0,0 +1,3 @@
1
+ import { EndgeFederationContext, EndgeLifecycleNodeDescriptor } from '../../../federation/types/federation.types';
2
+ /** Debugger boots an empty Domain and Bridge; it never runs the inspected application. */
3
+ export declare function selectCoreLifecycleNodes(nodes: readonly EndgeLifecycleNodeDescriptor[], ctx: EndgeFederationContext): readonly EndgeLifecycleNodeDescriptor[];
@@ -1,6 +1,7 @@
1
1
  import { EndgeActions_Module } from '../../modules/actions/EndgeActions_Module';
2
2
  import { EndgeAuth_Module } from '../../modules/auth/EndgeAuth_Module';
3
3
  import { EndgeBridge_Module } from '../../modules/bridge/EndgeBridge_Module';
4
+ import { EndgeCommands_Module } from '../../modules/commands/EndgeCommands_Module';
4
5
  import { EndgeCompiler_Module } from '../../modules/compiler/EndgeCompiler_Module';
5
6
  import { EndgeComputations_Module } from '../../modules/computations/EndgeComputations_Module';
6
7
  import { EndgeConfiguration_Module } from '../../modules/configuration/EndgeConfiguration_Module';
@@ -29,6 +30,11 @@ import { EndgeWorkspace_Module } from '../../modules/workspace/EndgeWorkspace_Mo
29
30
  export declare const ENDGE_CORE_MODULES: readonly [{
30
31
  readonly key: "context";
31
32
  readonly create: () => EndgeContext_Module;
33
+ readonly after: "events";
34
+ }, {
35
+ readonly key: "commands";
36
+ readonly create: ({ getModule }: import('../../../federation/types/endge-modules.types').EndgeModuleFactoryContext) => EndgeCommands_Module;
37
+ readonly after: readonly ["context", "runtime"];
32
38
  }, {
33
39
  readonly key: "mock";
34
40
  readonly create: () => EndgeMock_Module;
@@ -59,7 +65,7 @@ export declare const ENDGE_CORE_MODULES: readonly [{
59
65
  readonly after: readonly ["workspace", "domain", "context", "configurationSchema"];
60
66
  }, {
61
67
  readonly key: "diagnostics";
62
- readonly create: ({ createDiagnosticsSnapshot, getModule }: import('../../../federation/types/endge-modules.types').EndgeModuleFactoryContext) => EndgeDiagnostics_Module;
68
+ readonly create: () => EndgeDiagnostics_Module;
63
69
  readonly after: "configuration";
64
70
  }, {
65
71
  readonly key: "source";
@@ -108,7 +114,6 @@ export declare const ENDGE_CORE_MODULES: readonly [{
108
114
  }, {
109
115
  readonly key: "events";
110
116
  readonly create: () => EndgeEvents_Module;
111
- readonly after: "context";
112
117
  }, {
113
118
  readonly key: "runtime";
114
119
  readonly create: () => EndgeRuntime_Module;
@@ -127,7 +132,7 @@ export declare const ENDGE_CORE_MODULES: readonly [{
127
132
  readonly after: "ui";
128
133
  }, {
129
134
  readonly key: "bridge";
130
- readonly create: ({ getModule }: import('../../../federation/types/endge-modules.types').EndgeModuleFactoryContext) => EndgeBridge_Module;
135
+ readonly create: () => EndgeBridge_Module;
131
136
  readonly after: readonly ["diagnostics", "runtime", "domain"];
132
137
  }, {
133
138
  readonly key: "styles";
@@ -1,10 +1,13 @@
1
- /**
2
- * Единая статическая федерация Endge Core.
3
- * Lifecycle context и readonly accessors выводятся из деклараций её graph.
4
- */
5
- declare const EndgeCore: import('../../federation/EndgeFederation').DefinedEndgeFederation<readonly [{
1
+ import { EndgeBootMode } from './types/bootstrap.types';
2
+ import { DiagnosticsSnapshot } from '../modules/diagnostics/domain/types/diagnostics.types';
3
+ declare const EndgeCore_base: import('../../federation/EndgeFederation').DefinedEndgeFederation<readonly [{
6
4
  readonly key: "context";
7
5
  readonly create: () => import('../modules/context/EndgeContext_Module').EndgeContext_Module;
6
+ readonly after: "events";
7
+ }, {
8
+ readonly key: "commands";
9
+ readonly create: ({ getModule }: import('../../../main').EndgeModuleFactoryContext) => import('../modules/commands/EndgeCommands_Module').EndgeCommands_Module;
10
+ readonly after: readonly ["context", "runtime"];
8
11
  }, {
9
12
  readonly key: "mock";
10
13
  readonly create: () => import('../modules/mock/EndgeMock_Module').EndgeMock_Module;
@@ -35,7 +38,7 @@ declare const EndgeCore: import('../../federation/EndgeFederation').DefinedEndge
35
38
  readonly after: readonly ["workspace", "domain", "context", "configurationSchema"];
36
39
  }, {
37
40
  readonly key: "diagnostics";
38
- readonly create: ({ createDiagnosticsSnapshot, getModule }: import('../../../main').EndgeModuleFactoryContext) => import('../modules/diagnostics/EndgeDiagnostics_Module').EndgeDiagnostics_Module;
41
+ readonly create: () => import('../modules/diagnostics/EndgeDiagnostics_Module').EndgeDiagnostics_Module;
39
42
  readonly after: "configuration";
40
43
  }, {
41
44
  readonly key: "source";
@@ -84,7 +87,6 @@ declare const EndgeCore: import('../../federation/EndgeFederation').DefinedEndge
84
87
  }, {
85
88
  readonly key: "events";
86
89
  readonly create: () => import('../modules/events/EndgeEvents_Module').EndgeEvents_Module;
87
- readonly after: "context";
88
90
  }, {
89
91
  readonly key: "runtime";
90
92
  readonly create: () => import('../modules/runtime/EndgeRuntime_Module').EndgeRuntime_Module;
@@ -103,13 +105,25 @@ declare const EndgeCore: import('../../federation/EndgeFederation').DefinedEndge
103
105
  readonly after: "ui";
104
106
  }, {
105
107
  readonly key: "bridge";
106
- readonly create: ({ getModule }: import('../../../main').EndgeModuleFactoryContext) => import('../modules/bridge/EndgeBridge_Module').EndgeBridge_Module;
108
+ readonly create: () => import('../modules/bridge/EndgeBridge_Module').EndgeBridge_Module;
107
109
  readonly after: readonly ["diagnostics", "runtime", "domain"];
108
110
  }, {
109
111
  readonly key: "styles";
110
112
  readonly create: () => import('../modules/styles/EndgeStyles_Module').EndgeStyles_Module;
111
113
  readonly after: readonly ["ui", "domain", "program", "compiler"];
112
114
  }], readonly [], import('../../../main').EndgeFederationContext & import('./types/bootstrap.types').EndgeBootContext>;
115
+ /**
116
+ * Единая статическая федерация Endge Core.
117
+ * Lifecycle context и readonly accessors выводятся из деклараций её graph.
118
+ */
119
+ declare class EndgeCore extends EndgeCore_base {
120
+ /** Active Core mode is owned by the boot context and is read-only. */
121
+ static get mode(): EndgeBootMode;
122
+ /** Replaces an inspected application's document and contextual state without activating it. */
123
+ static replaceDebuggerSnapshot(snapshot: DiagnosticsSnapshot): void;
124
+ /** Shared guard before user mutations, including editor synchronization. */
125
+ static assertWritable(): void;
126
+ }
113
127
  /** Типизированные accessors, которые внешние packages добавляют через module augmentation. */
114
128
  export interface EndgeExtensions {
115
129
  }
@@ -0,0 +1,5 @@
1
+ /** A user mutation was attempted against an inspected snapshot. */
2
+ export declare class EndgeDebuggerReadOnlyError extends Error {
3
+ readonly code = "debugger_read_only";
4
+ constructor();
5
+ }
@@ -0,0 +1,13 @@
1
+ import { EndgeContextSnapshot } from '../../modules/context/domain/context-persistence.types';
2
+ import { DiagnosticsSnapshot } from '../../modules/diagnostics/domain/types/diagnostics.types';
3
+ import { EndgeDataMode } from '../../modules/workspace/domain/workspace.types';
4
+ /** Validates captured inspection metadata before any owner changes its current state. */
5
+ export declare function prepareDebuggerSnapshot(snapshot: DiagnosticsSnapshot): {
6
+ domain: import('../../modules/diagnostics/domain/types/diagnostics.types').DiagnosticsJsonValue | undefined;
7
+ workspace: import('../../modules/workspace/domain/workspace.types').EndgeWorkspaceDefinition;
8
+ context: EndgeContextSnapshot & {
9
+ dataMode: EndgeDataMode;
10
+ };
11
+ configuration: import('../../../../main').EndgeConfiguration;
12
+ runtime: import('../../../../main').RuntimeInspectionSnapshot | null;
13
+ };
@@ -0,0 +1,2 @@
1
+ /** Protects materialized documents while preserving their entity prototypes and shared references. */
2
+ export declare function readOnlyDocument<T extends object>(value: T, mutableRootKeys?: readonly string[]): T;
@@ -1,5 +1,6 @@
1
1
  import { EndgeAuthBootOptions } from '../../modules/auth/domain/types/auth-profile.types';
2
2
  import { EndgeBridgeBootOptions } from '../../modules/bridge/domain/bridge.type';
3
+ import { EndgeCommandsBootOptions } from '../../modules/commands/types/command-executor.type';
3
4
  import { EndgeDomainBundle } from '../../modules/domain/types/document/domain-export.type';
4
5
  import { EndgeDomainProvider } from '../../modules/domain/types/document/domain-provider.type';
5
6
  import { EndgeExecutionContext } from '../../modules/runtime/domain/execution-context.types';
@@ -27,11 +28,14 @@ export interface EndgeUIBootOptions {
27
28
  /** Локальный для host порядок fallback, когда настроенная реализация адаптера недоступна. */
28
29
  adapterFallbackIds?: readonly string[];
29
30
  }
31
+ export type EndgeBootMode = 'application' | 'debugger';
30
32
  export interface EndgeBootContext extends EndgeFederationContext {
33
+ /** Immutable lifecycle profile; application is the default. */
34
+ mode?: EndgeBootMode;
31
35
  /**
32
36
  * Источник получения доменных данных
33
37
  */
34
- dataProvider: EndgeDataProvider;
38
+ dataProvider?: EndgeDataProvider;
35
39
  /**
36
40
  * Граница загружаемого persisted Domain.
37
41
  */
@@ -48,6 +52,8 @@ export interface EndgeBootContext extends EndgeFederationContext {
48
52
  auth?: EndgeAuthBootOptions;
49
53
  /** Optional host-owned bridge policy; отсутствие отключает соединения. */
50
54
  bridge?: EndgeBridgeBootOptions;
55
+ /** Host передаёт порт выбранного сеанса для удалённого исполнения команд в debugger mode. */
56
+ commands?: EndgeCommandsBootOptions;
51
57
  /**
52
58
  * Для plain provider.
53
59
  */
@@ -1,5 +1,5 @@
1
1
  import { EndgeBootContext } from '../../kernel/types/bootstrap.types';
2
- import { BridgeConnectionState, BridgeDebugProviders } from './domain/bridge.type';
2
+ import { BridgeConnectionState } from './domain/bridge.type';
3
3
  import { BrowserBridge_Adapter } from './adapters/BrowserBridge_Adapter';
4
4
  import { EndgeBridgeConfigurator_Module } from './configurator/EndgeBridgeConfigurator_Module';
5
5
  import { EndgeBridgeDebug_Module } from './debug/EndgeBridgeDebug_Module';
@@ -23,7 +23,7 @@ export declare class EndgeBridge_Module extends EndgeModule<EndgeBootContext> {
23
23
  * ----------------------------------------
24
24
  */
25
25
  /** Создаёт owner и его явные зависимости без запуска транспорта. */
26
- constructor(providers: BridgeDebugProviders, _adapter?: BrowserBridge_Adapter);
26
+ constructor(_adapter?: BrowserBridge_Adapter);
27
27
  /** Принимает optional host policy без network/DOM side effects. */
28
28
  setup(ctx: EndgeBootContext): void;
29
29
  /** Запускает live transports после загрузки Domain и diagnostics. */
@@ -1,10 +1,7 @@
1
- import { DebugConnectionRequest } from '../domain/bridge.type';
2
1
  /** Browser boundary bridge. Не владеет сессиями или политикой доступа. */
3
2
  export declare class BrowserBridge_Adapter {
4
3
  /** Открывает стандартный WebSocket; cookie authentication выполняет браузер. */
5
4
  open(url: string): WebSocket;
6
- /** Показывает встроенное подтверждение. Отсутствие browser API означает отказ. */
7
- confirmDebugConnection(request: DebugConnectionRequest): Promise<boolean>;
8
5
  /** SHA-256 точного sourceVersion/source tuple, без имени и локального document id. */
9
6
  hashSimulation(source: {
10
7
  sourceVersion: number;
@@ -7,6 +7,23 @@ export declare const BRIDGE_CONFIG: {
7
7
  readonly reconnectMaxMs: 30000;
8
8
  readonly maxMessageBytes: number;
9
9
  readonly maxPendingRequests: 16;
10
+ readonly maxBufferedEvents: 256;
11
+ readonly maxBufferedBytes: number;
12
+ readonly maxInspectionBytes: number;
13
+ readonly minInspectionIntervalMs: 1000;
14
+ readonly maxInspectionIntervalMs: 60000;
15
+ };
16
+ /** Полный диагностический снимок для согласованной debug session. */
17
+ export declare const BRIDGE_SNAPSHOT_OPTIONS: {
18
+ readonly includeTelemetry: true;
19
+ readonly includeProblems: true;
20
+ readonly includeConfiguration: true;
21
+ readonly includeEffectiveConfiguration: true;
22
+ readonly includeDomain: true;
23
+ readonly includeProgram: true;
24
+ readonly includeRuntime: true;
25
+ readonly includeRaphData: true;
26
+ readonly includeRaphGraph: true;
10
27
  };
11
28
  /** Нормализует точный backend URL без credentials, query и fragment. */
12
29
  export declare function normalizeBridgeServer(raw: string): string;
@@ -1,25 +1,36 @@
1
1
  import { BrowserBridge_Adapter } from '../adapters/BrowserBridge_Adapter';
2
- import { BridgeCommands, BridgeDebugClient, BridgeDebugProviders, BridgeDebugSession, BridgeMessage, SimulationRunResult } from '../domain/bridge.type';
2
+ import { BridgeInspectionSnapshot } from '../domain/bridge-sync.type';
3
+ import { BridgeCommands, BridgeDebugClient, BridgeDebugSession, BridgeMessage, DebugConnectionRequest, SimulationRunResult } from '../domain/bridge.type';
4
+ import { EndgeCommand } from '../../commands/domain/commands.types';
3
5
  import { DiagnosticsSnapshot } from '../../diagnostics/domain/types/diagnostics.types';
4
6
  import { EndgeModule } from '../../../../federation/EndgeModule';
5
7
  /** Debug policy и единственная client reservation сразу для всех backend. */
6
8
  export declare class EndgeBridgeDebug_Module extends EndgeModule {
7
9
  private readonly _commands;
8
- private readonly _providers;
9
10
  private readonly _adapter;
10
11
  private _role;
11
12
  private _enabled;
12
13
  private _reservation;
14
+ private _pendingConsent;
15
+ private _consentTimer;
13
16
  private readonly _requests;
14
17
  private readonly _clients;
15
18
  private readonly _sessions;
19
+ private readonly _incoming;
20
+ private _outgoingSession;
21
+ private _outgoingSequence;
22
+ private _unsubscribeEvents;
23
+ private _releaseData;
24
+ private _dataTimer;
25
+ private _topologyTimer;
26
+ private _dataDirty;
16
27
  /**
17
28
  * ----------------------------------------
18
29
  * PUBLIC
19
30
  * ----------------------------------------
20
31
  */
21
32
  /** Создаёт owner и его явные зависимости без запуска транспорта. */
22
- constructor(_commands: BridgeCommands, _providers: BridgeDebugProviders, _adapter: BrowserBridge_Adapter);
33
+ constructor(_commands: BridgeCommands, _adapter: BrowserBridge_Adapter);
23
34
  /** Настраивается только родителем из host boot options. */
24
35
  configure(role: 'client' | 'configurator', enabled: boolean): void;
25
36
  /** Запрашивает сессию; Promise завершается после подтверждения в приложении. */
@@ -27,10 +38,22 @@ export declare class EndgeBridgeDebug_Module extends EndgeModule {
27
38
  serverUrl: string;
28
39
  instanceId: string;
29
40
  }): Promise<BridgeDebugSession>;
41
+ /** Принимает ответ UI только для текущего непросроченного запроса. */
42
+ respondToConsent(request: Pick<DebugConnectionRequest, 'serverUrl' | 'sessionId'>, accepted: boolean): boolean;
30
43
  /** Завершает выбранную сессию с любой её стороны. */
31
44
  endSession(sessionId: string): Promise<void>;
32
45
  /** Запрашивает snapshot существующего diagnostics collector без скачивания файла. */
33
46
  getSnapshot(sessionId: string): Promise<DiagnosticsSnapshot>;
47
+ /** Начинает буферизацию событий до импорта согласованного с ними снимка. */
48
+ startContextSync(sessionId: string): Promise<BridgeInspectionSnapshot>;
49
+ /** После прямого импорта снимка применяет только более новые события, не вызывая Commands. */
50
+ activateContextSync(sessionId: string, sequence: number): void;
51
+ /** Обновляет Runtime и данные через тот же упорядоченный поток, что и события. */
52
+ refreshInspection(sessionId: string): Promise<void>;
53
+ /** Ноль оставляет ручное обновление; положительный интервал ограничивает частоту полных данных. */
54
+ setInspectionInterval(sessionId: string, intervalMs: number): Promise<void>;
55
+ /** Отправляет запрос выбранному клиенту только после завершения первичной синхронизации. */
56
+ executeCommand(sessionId: string, command: EndgeCommand): Promise<void>;
34
57
  /** Пока выполняет только existence/hash check и console mock на стороне клиента. */
35
58
  runSimulation(sessionId: string, input: {
36
59
  identity: string;
@@ -49,10 +72,36 @@ export declare class EndgeBridgeDebug_Module extends EndgeModule {
49
72
  * PRIVATE
50
73
  * ----------------------------------------
51
74
  */
52
- /** Резервирует единственное согласие и проверяет его актуальность после диалога. */
53
- private _confirm;
54
- /** Проверяет активную сессию и выполняет только snapshot либо simulation mock. */
75
+ /** Резервирует запрос для View приложения, не вызывая browser dialog. */
76
+ private _requestConsent;
77
+ /** Снимает View-проекцию и принадлежащий запросу deadline timer. */
78
+ private _clearPendingConsent;
79
+ /** Проверяет активную сессию и выполняет только явно разрешённые операции. */
55
80
  private _execute;
81
+ /** Подписка принадлежит подтверждённому клиентскому сеансу; дебагер никогда не ретранслирует свои Events. */
82
+ private _startPublishing;
83
+ /** Принимает поток только своего клиента; буфер ограничен временем первичного запроса и размером. */
84
+ private _receiveEvent;
85
+ /** Дубликаты и события из снимка пропускаются; разрыв последовательности завершает синхронизацию. */
86
+ private _applyIncomingEvent;
87
+ /** Снимает буфер и подписку только соответствующего сеанса. */
88
+ private _releaseStream;
89
+ /** Привязывает запрос наблюдения к готовому сеансу и проверяет его после ответа. */
90
+ private _requestInspection;
91
+ /** Проверяет единый диапазон на обеих сторонах транспорта. */
92
+ private _validateInterval;
93
+ /** Coalescing топологии не зависит от включения периодических снимков данных. */
94
+ private _scheduleTopology;
95
+ /** Fixed interval не голодает при непрерывных изменениях и пропускает неизменившиеся данные. */
96
+ private _configureDataPublishing;
97
+ /** Ошибка снимка сохраняет предыдущие данные, но явно помечает их как не обновлённые. */
98
+ private _publishSafely;
99
+ /** Размер проверяется до выделения sequence: отклонённый payload не создаёт разрыв потока. */
100
+ private _publishInspection;
101
+ /** Последняя lease снимает дорогую подписку на изменения Raph. */
102
+ private _stopDataPublishing;
103
+ /** Все отложенные публикации принадлежат одному сеансу. */
104
+ private _stopInspectionPublishing;
56
105
  /** Проверяет локальную роль и явное разрешение отладки. */
57
106
  private _requireConfigurator;
58
107
  /** Разрешает только существующую активную сессию. */
@@ -62,6 +111,8 @@ export declare class EndgeBridgeDebug_Module extends EndgeModule {
62
111
  * ACCESS
63
112
  * ----------------------------------------
64
113
  */
114
+ /** Показывает приложению текущий запрос без права менять состояние Bridge. */
115
+ get pendingConsent(): Readonly<DebugConnectionRequest> | null;
65
116
  /** Возвращает доступные приложения из актуальных server rosters. */
66
117
  get clients(): readonly BridgeDebugClient[];
67
118
  /** Возвращает копии активных согласованных сессий. */
@@ -0,0 +1,30 @@
1
+ import { DiagnosticsSnapshot } from '../../diagnostics/domain/types/diagnostics.types';
2
+ import { EndgePublishedEvent } from '../../events/domain/events.types';
3
+ import { RuntimeInspectionSnapshot } from '../../runtime/domain/runtime-inspection.types';
4
+ /** Начальное состояние и граница последующих событий одного согласованного сеанса. */
5
+ export interface BridgeInspectionSnapshot {
6
+ readonly snapshot: DiagnosticsSnapshot;
7
+ readonly sequence: number;
8
+ }
9
+ /** Последовательность относится к потоку сеанса; метаданные самой публикации сохраняются в event. */
10
+ export interface BridgeStreamEvent {
11
+ readonly sequence: number;
12
+ readonly event: EndgePublishedEvent;
13
+ }
14
+ /** Объёмные снимки используют тот же sequenced session stream, но отдельный transport limit. */
15
+ export interface BridgeInspectionUpdate {
16
+ readonly sequence: number;
17
+ readonly update: {
18
+ kind: 'runtime';
19
+ snapshot: RuntimeInspectionSnapshot;
20
+ } | {
21
+ kind: 'data';
22
+ data: unknown;
23
+ render?: RuntimeInspectionSnapshot['render'];
24
+ generatedAt: number;
25
+ } | {
26
+ kind: 'data-error';
27
+ message: string;
28
+ };
29
+ }
30
+ export type BridgeInspectionMessage = BridgeStreamEvent | BridgeInspectionUpdate;
@@ -1,4 +1,3 @@
1
- import { DiagnosticsSnapshot } from '../../diagnostics/domain/types/diagnostics.types';
2
1
  /** Локальная политика host, не сохраняемая в Domain. URL включает backend base path. */
3
2
  export type EndgeBridgeBootOptions = {
4
3
  role: 'client';
@@ -68,13 +67,6 @@ export interface BridgeMessage {
68
67
  data?: unknown;
69
68
  error?: string;
70
69
  }
71
- export interface BridgeDebugProviders {
72
- getSimulation: (identity: string) => {
73
- source: string;
74
- sourceVersion: number;
75
- } | null;
76
- snapshot: () => DiagnosticsSnapshot;
77
- }
78
70
  /** Внутренний порт подмодулей к единственному владельцу соединений. */
79
71
  export interface BridgeCommands {
80
72
  request: (serverUrl: string, message: BridgeMessage) => Promise<unknown>;
@@ -0,0 +1,16 @@
1
+ import { BridgeInspectionSnapshot, BridgeInspectionUpdate, BridgeStreamEvent } from '../domain/bridge-sync.type';
2
+ import { EndgeCommand } from '../../commands/domain/commands.types';
3
+ import { ContextEvent } from '../../context/domain/context-events.types';
4
+ import { RuntimeStatusChange } from '../../runtime/domain/runtime-inspection.types';
5
+ /** Проверяет границу снимка; сам Domain валидируется штатным импортом Core. */
6
+ export declare function readBridgeInspectionSnapshot(value: unknown): BridgeInspectionSnapshot;
7
+ /** Проверяет метаданные потока до помещения события в ограниченный буфер. */
8
+ export declare function readBridgeStreamEvent(value: unknown): BridgeStreamEvent;
9
+ /** Распознаёт только существующие Context events и проверяет оба значения перед применением. */
10
+ export declare function readBridgeContextEvent(event: BridgeStreamEvent['event']): ContextEvent | null;
11
+ /** Проверяет wire envelope; имя команды и payload дополнительно проверяет локальный реестр обработчиков. */
12
+ export declare function readBridgeCommand(value: unknown): EndgeCommand;
13
+ /** Проверяет крупный snapshot до буферизации в согласованном потоке. */
14
+ export declare function readBridgeInspectionUpdate(value: unknown): BridgeInspectionUpdate;
15
+ /** Runtime facts применяются только после проверки статусов и адреса host. */
16
+ export declare function readBridgeRuntimeEvent(event: BridgeStreamEvent['event']): RuntimeStatusChange | null;
@@ -0,0 +1,17 @@
1
+ import { EndgeBootContext } from '../../kernel/types/bootstrap.types';
2
+ import { EndgeCommand } from './domain/commands.types';
3
+ import { EndgeCommandExecutor } from './types/command-executor.type';
4
+ import { EndgeModule } from '../../../federation/EndgeModule';
5
+ /** Выбирает способ выполнения команд по boot mode, не владея изменяемым контекстом. */
6
+ export declare class EndgeCommands_Module extends EndgeModule<EndgeBootContext> {
7
+ private readonly _localExecutor;
8
+ private _remote;
9
+ private _executor;
10
+ constructor(localExecutor: EndgeCommandExecutor);
11
+ /** Клиент выполняет команды локально, дебагер передаёт их через предоставленный host транспорт. */
12
+ setup(ctx: EndgeBootContext): void;
13
+ /** Делегирует команду; состояние и публикация событий остаются у владельца операции. */
14
+ execute(command: EndgeCommand): Promise<void>;
15
+ /** Отзывает выбранного исполнителя и ссылку на транспорт перед следующим boot. */
16
+ reset(): void;
17
+ }
@@ -0,0 +1,9 @@
1
+ import { EndgeCommandExecutor, EndgeCommandHandler } from '../types/command-executor.type';
2
+ import { EndgeContextCommandTarget } from '../types/context-command-target.type';
3
+ import { EndgeRuntimeCommandTarget } from '../types/runtime-command-target.type';
4
+ /** Создаёт явный набор локальных обработчиков; регистрация не выполняет сами команды. */
5
+ export declare function createContextCommandHandlers(context: EndgeContextCommandTarget): readonly EndgeCommandHandler[];
6
+ /** Привязывает команды к штатным операциям конкретного приложения без изменения обработчиков. */
7
+ export declare function createContextCommandExecutor(context: EndgeContextCommandTarget): EndgeCommandExecutor;
8
+ /** Runtime использует одинаковые обработчики для локальных и принятых удалённых команд. */
9
+ export declare function createRuntimeCommandHandlers(runtime: EndgeRuntimeCommandTarget): readonly EndgeCommandHandler[];
@@ -0,0 +1,43 @@
1
+ import { RuntimeControlTarget } from '../../runtime/domain/runtime-inspection.types';
2
+ import { EndgeDataMode } from '../../workspace/domain/workspace.types';
3
+ /** Параметры явных команд Core; это запросы на изменение, а не произошедшие события. */
4
+ export interface EndgeCommandMap {
5
+ 'runtime:pause': RuntimeControlTarget;
6
+ 'runtime:resume': RuntimeControlTarget;
7
+ 'runtime:stop': RuntimeControlTarget;
8
+ 'context:set-workspace': {
9
+ workspace: string | null;
10
+ };
11
+ 'context:set-tenant': {
12
+ tenant: string;
13
+ };
14
+ 'context:set-project': {
15
+ project: string;
16
+ };
17
+ 'context:set-environment': {
18
+ environment: string;
19
+ };
20
+ 'context:set-user': {
21
+ user: string;
22
+ };
23
+ 'context:set-locale': {
24
+ locale: string | null;
25
+ };
26
+ 'context:set-theme': {
27
+ theme: string | null;
28
+ };
29
+ 'context:set-timezone': {
30
+ timezone: string | null;
31
+ };
32
+ 'context:set-data-mode': {
33
+ dataMode: EndgeDataMode | null;
34
+ };
35
+ }
36
+ export type EndgeCommandType = keyof EndgeCommandMap;
37
+ /** Связывает имя команды с её payload для единой точки execute(). */
38
+ export type EndgeCommand = {
39
+ [K in EndgeCommandType]: {
40
+ readonly type: K;
41
+ readonly payload: Readonly<EndgeCommandMap[K]>;
42
+ };
43
+ }[EndgeCommandType];
@@ -0,0 +1,9 @@
1
+ import { EndgeCommand } from '../domain/commands.types';
2
+ import { EndgeCommandExecutor, EndgeCommandHandler } from '../types/command-executor.type';
3
+ /** Находит явно зарегистрированный обработчик и выполняет команду локально. */
4
+ export declare class LocalCommandExecutor implements EndgeCommandExecutor {
5
+ private readonly _handlers;
6
+ constructor(handlers: readonly EndgeCommandHandler[]);
7
+ /** Неизвестная команда завершается ошибкой; fallback на произвольный метод отсутствует. */
8
+ execute(command: EndgeCommand): Promise<void>;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { EndgeCommand } from '../domain/commands.types';
2
+ import { EndgeCommandExecutor, EndgeRemoteCommandTransport } from '../types/command-executor.type';
3
+ /** Передаёт любую поддерживаемую команду удалённому клиенту без вызова локальных обработчиков. */
4
+ export declare class RemoteCommandExecutor implements EndgeCommandExecutor {
5
+ private readonly _transport;
6
+ constructor(transport?: EndgeRemoteCommandTransport);
7
+ /** Отсутствие транспорта и отказ клиента не заменяются локальным выполнением. */
8
+ execute(command: EndgeCommand): Promise<void>;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { EndgeCommandHandler } from '../../types/command-executor.type';
2
+ import { EndgeContextCommandTarget } from '../../types/context-command-target.type';
3
+ /** Применяет запрос изменения режима данных через существующий метод Context. */
4
+ export declare class SetDataModeCommand implements EndgeCommandHandler {
5
+ readonly type: "context:set-data-mode";
6
+ private readonly _context;
7
+ constructor(context: Pick<EndgeContextCommandTarget, 'setDataMode' | 'clearDataModeOverride'>);
8
+ execute(payload: unknown): void | Promise<void>;
9
+ }
@@ -0,0 +1,9 @@
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
+ }
@@ -0,0 +1,9 @@
1
+ import { EndgeCommandHandler } from '../../types/command-executor.type';
2
+ import { EndgeContextCommandTarget } from '../../types/context-command-target.type';
3
+ /** Применяет запрос изменения языка через существующий метод Context. */
4
+ export declare class SetLocaleCommand implements EndgeCommandHandler {
5
+ readonly type: "context:set-locale";
6
+ private readonly _context;
7
+ constructor(context: Pick<EndgeContextCommandTarget, 'setCurrentLocale'>);
8
+ execute(payload: unknown): void | Promise<void>;
9
+ }
@@ -0,0 +1,9 @@
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
+ }
@@ -0,0 +1,9 @@
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
+ }
@@ -0,0 +1,9 @@
1
+ import { EndgeCommandHandler } from '../../types/command-executor.type';
2
+ import { EndgeContextCommandTarget } from '../../types/context-command-target.type';
3
+ /** Применяет запрос изменения темы через существующий метод Context. */
4
+ export declare class SetThemeCommand implements EndgeCommandHandler {
5
+ readonly type: "context:set-theme";
6
+ private readonly _context;
7
+ constructor(context: Pick<EndgeContextCommandTarget, 'setCurrentTheme'>);
8
+ execute(payload: unknown): void | Promise<void>;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { EndgeCommandHandler } from '../../types/command-executor.type';
2
+ import { EndgeContextCommandTarget } from '../../types/context-command-target.type';
3
+ /** Применяет запрос изменения часового пояса через существующий метод Context. */
4
+ export declare class SetTimezoneCommand implements EndgeCommandHandler {
5
+ readonly type: "context:set-timezone";
6
+ private readonly _context;
7
+ constructor(context: Pick<EndgeContextCommandTarget, 'setCurrentTimezone'>);
8
+ execute(payload: unknown): void | Promise<void>;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { EndgeCommandHandler } from '../../types/command-executor.type';
2
+ import { EndgeContextCommandTarget } from '../../types/context-command-target.type';
3
+ /** Применяет запрос изменения пользователя через существующий метод Context. */
4
+ export declare class SetUserCommand implements EndgeCommandHandler {
5
+ readonly type: "context:set-user";
6
+ private readonly _context;
7
+ constructor(context: Pick<EndgeContextCommandTarget, 'setCurrentUser'>);
8
+ execute(payload: unknown): void | Promise<void>;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { EndgeCommandHandler } from '../../types/command-executor.type';
2
+ import { EndgeContextCommandTarget } from '../../types/context-command-target.type';
3
+ /** Применяет запрос изменения рабочего пространства через существующий метод Context. */
4
+ export declare class SetWorkspaceCommand implements EndgeCommandHandler {
5
+ readonly type: "context:set-workspace";
6
+ private readonly _context;
7
+ constructor(context: Pick<EndgeContextCommandTarget, 'setCurrentWorkspace'>);
8
+ execute(payload: unknown): void | Promise<void>;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { EndgeCommandHandler } from '../../types/command-executor.type';
2
+ import { EndgeRuntimeCommandTarget } from '../../types/runtime-command-target.type';
3
+ /** Делегирует pause существующему владельцу runtime lifecycle. */
4
+ export declare class PauseRuntimeCommand implements EndgeCommandHandler {
5
+ private readonly _runtime;
6
+ readonly type: "runtime:pause";
7
+ constructor(_runtime: EndgeRuntimeCommandTarget);
8
+ execute(payload: unknown): Promise<void>;
9
+ }