@ultrst-armada/krnl 1.0.8 → 1.0.10

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.
@@ -111,6 +111,151 @@ declare class FunctionalityFacade<TInput = unknown, TOutput = unknown, TState =
111
111
  clearEventSubscriptions(): void;
112
112
  }
113
113
 
114
+ /**
115
+ * @file TelemetryTypes.ts
116
+ * @description Framework-native service invocation telemetry contracts.
117
+ */
118
+ type TelemetryMode = 'off' | 'standard' | 'detailed' | 'profile';
119
+ type TelemetryStatus = {
120
+ enabled: boolean;
121
+ mode: TelemetryMode;
122
+ serviceId: string;
123
+ invocationCount: number;
124
+ activeInvocations: number;
125
+ lastInvocationAt?: number;
126
+ };
127
+ interface TelemetryResourceSample {
128
+ cpuUserMicros?: number;
129
+ cpuSystemMicros?: number;
130
+ heapUsedBytes?: number;
131
+ heapTotalBytes?: number;
132
+ rssBytes?: number;
133
+ externalBytes?: number;
134
+ arrayBuffersBytes?: number;
135
+ eventLoopUtilization?: number;
136
+ scope: 'process' | 'runtime';
137
+ }
138
+ interface TelemetryInvocation {
139
+ invocationId: string;
140
+ traceId: string;
141
+ spanId: string;
142
+ parentSpanId?: string;
143
+ serviceId: string;
144
+ target: string;
145
+ kind: 'service' | 'functionality' | 'orchestration';
146
+ correlationId?: string;
147
+ startedAt: number;
148
+ completedAt: number;
149
+ durationMs: number;
150
+ status: 'completed' | 'failed';
151
+ error?: {
152
+ name: string;
153
+ message: string;
154
+ };
155
+ resources?: {
156
+ start: TelemetryResourceSample;
157
+ end: TelemetryResourceSample;
158
+ delta: TelemetryResourceSample;
159
+ };
160
+ }
161
+ interface TelemetryPercentiles {
162
+ min: number;
163
+ mean: number;
164
+ p50: number;
165
+ p90: number;
166
+ p95: number;
167
+ p99: number;
168
+ max: number;
169
+ }
170
+ interface TelemetryTargetStats {
171
+ target: string;
172
+ kind: TelemetryInvocation['kind'];
173
+ count: number;
174
+ successCount: number;
175
+ errorCount: number;
176
+ durationMs: TelemetryPercentiles;
177
+ lastInvocationAt?: number;
178
+ }
179
+ interface TelemetrySnapshot {
180
+ serviceId: string;
181
+ mode: TelemetryMode;
182
+ capturedAt: number;
183
+ status: TelemetryStatus;
184
+ totals: {
185
+ invocationCount: number;
186
+ successCount: number;
187
+ errorCount: number;
188
+ durationMs: TelemetryPercentiles;
189
+ };
190
+ targets: TelemetryTargetStats[];
191
+ activeInvocations: number;
192
+ recentInvocations: TelemetryInvocation[];
193
+ }
194
+ interface TelemetryOptions {
195
+ mode?: TelemetryMode;
196
+ maxSamples?: number;
197
+ maxRecentInvocations?: number;
198
+ }
199
+ interface TelemetryHandle {
200
+ readonly invocationId: string;
201
+ readonly traceId: string;
202
+ readonly spanId: string;
203
+ readonly parentSpanId?: string;
204
+ end(error?: unknown): void;
205
+ }
206
+
207
+ /**
208
+ * @file TelemetryResources.ts
209
+ * @description Capability-detected runtime resource sampling.
210
+ */
211
+
212
+ declare function telemetryNow(): number;
213
+ declare function sampleResources(): TelemetryResourceSample;
214
+ declare function deltaResources(start: TelemetryResourceSample, end: TelemetryResourceSample): TelemetryResourceSample;
215
+
216
+ /**
217
+ * @file TelemetryController.ts
218
+ * @description Per-service telemetry recorder and public control surface.
219
+ */
220
+
221
+ type ActiveInvocation = {
222
+ invocationId: string;
223
+ traceId: string;
224
+ spanId: string;
225
+ parentSpanId?: string;
226
+ serviceId: string;
227
+ target: string;
228
+ kind: TelemetryInvocation['kind'];
229
+ correlationId?: string;
230
+ startedAt: number;
231
+ resourcesStart?: ReturnType<typeof sampleResources>;
232
+ };
233
+ declare class TelemetryController {
234
+ private readonly serviceId;
235
+ private mode;
236
+ private readonly maxSamples;
237
+ private readonly maxRecentInvocations;
238
+ private readonly samples;
239
+ private readonly active;
240
+ private totalInvocationCount;
241
+ private totalSuccessCount;
242
+ private totalErrorCount;
243
+ private lastInvocationAt?;
244
+ constructor(serviceId: string, options?: TelemetryOptions);
245
+ enable(mode?: Exclude<TelemetryMode, 'off'>): void;
246
+ disable(): void;
247
+ setMode(mode: TelemetryMode): void;
248
+ getMode(): TelemetryMode;
249
+ status(): TelemetryStatus;
250
+ begin(target: string, kind: ActiveInvocation['kind'], correlationId?: string, parentSpanId?: string): TelemetryHandle;
251
+ reset(): void;
252
+ snapshot(): TelemetrySnapshot;
253
+ functionality(name: string): TelemetryTargetStats | undefined;
254
+ functionalities(): TelemetryTargetStats[];
255
+ private findTraceId;
256
+ private finish;
257
+ }
258
+
114
259
  /**
115
260
  * @file ServiceContract.ts
116
261
  * @description Canonical service contracts for the KrnlTS Service Kernel.
@@ -207,6 +352,7 @@ TLegacyEvents extends Record<string, unknown> = Record<string, unknown>> {
207
352
  readonly id: string;
208
353
  readonly name: string;
209
354
  readonly version: string;
355
+ readonly telemetry: TelemetryController;
210
356
  call<TIn = unknown, TOut = unknown>(op: string, input?: TIn, ctx?: OperationContext): Promise<TOut>;
211
357
  getState(): Readonly<TState>;
212
358
  setState(mutation: Partial<TState>): void;
@@ -227,6 +373,7 @@ declare class ServiceInstance<TState extends Record<string, unknown> = Record<st
227
373
  readonly id: string;
228
374
  readonly name: string;
229
375
  readonly version: string;
376
+ readonly telemetry: TelemetryController;
230
377
  private stateStore?;
231
378
  private readonly lifecycle;
232
379
  private initialized;
@@ -297,6 +444,7 @@ declare class ServiceProxy<TState extends Record<string, unknown> = Record<strin
297
444
  readonly id: string;
298
445
  readonly name: string;
299
446
  readonly version: string;
447
+ readonly telemetry: TelemetryController;
300
448
  private stateCache;
301
449
  private readonly eventHandlers;
302
450
  private readonly lifecycle;
@@ -819,6 +967,7 @@ declare class ServiceFacade<TState extends Record<string, unknown> = Record<stri
819
967
  readonly defaultFrontend?: DefaultFrontendReference;
820
968
  private readonly instance;
821
969
  private readonly queue;
970
+ readonly telemetry: TelemetryController;
822
971
  constructor(config: ServiceFacadeConfig<TState, TEvents, TLibraries>);
823
972
  get orchestrations(): Record<string, FunctionalityOrchestration>;
824
973
  getInstance(): IService<TState, TEvents>;
@@ -1103,4 +1252,45 @@ declare class ProtocolResolver {
1103
1252
  static getSupportedProtocols(definition: ServiceDefinition): ProtocolType[];
1104
1253
  }
1105
1254
 
1106
- export { type BackendCommand, type Connection, type DAGValidationResult, type DefaultFrontendReference, type DependencyContract, type EndpointDescriptor, EventBus, type EventChannel, type EventContract, type EventDefinition, type EventHandler, type EventSubscription, type ExecutionContext, type FunctionalityCustomEvents, type FunctionalityDefinition, type FunctionalityEventNamespace, type FunctionalityEvents, type FunctionalityExecutionContext, FunctionalityFacade, type FunctionalityFlow, type FunctionalityFlowStep, type FunctionalityLifecycleEvent, type FunctionalityLifecyclePayload, FunctionalityOrchestration, type FunctionalityStepOptions, HttpProtocolAdapter, type IService, type IServiceFacade, type JobStatus, type KrnlJobDefinition, type KrnlJobHandle, type KrnlJobOptions, KrnlPackageReconciler, KrnlQueue, type KrnlQueueOptions, type KrnlWorkerInfo, KrnlWorkerPool, type KrnlWorkerState, type LifecycleContract, LifecycleManager, MemoryTransport, type NormalizedResult, type OperationContext, type OperationContract, type OrchestrationContext, type OrchestrationDefinition, type OrchestrationDescriptor, OrchestrationEventFacade, type OrchestrationEventNamespace, type OrchestrationFrontendReference, type OrchestrationLifecyclePayload, type OrchestrationResult, type OrchestrationStatus, type OrchestrationStep, P2PProtocolAdapter, type PeerRecord, type ProtocolAdapter, type ProtocolCapabilities, type ProtocolEnvelope, ProtocolResolver, type ProtocolType, type ReconcileResult, type RegisteredServiceRecord, type SagaCompensationHandler, type ServiceCapability, type ServiceDefinition, ServiceDiscovery, ServiceEventBus, ServiceFacade, type ServiceFacadeConfig, ServiceInstance, type ServiceNamespace, ServiceProxy, ServiceRegistry, ServiceRuntime, ServiceStateStore, type ServiceStatus, type StateContract, type StepCompensation, type StepCondition, type StepDefinition, type StepExecutionResult, type StepExecutionStatus, type StepRetryPolicy, type StepStatus, type StepTimeoutPolicy, type StepType, UdpProtocolAdapter, WebSocketProtocolAdapter, WorkerExecutionBoundary, createEventChannels, createService, createServiceDefinition, createServiceFacade, createServiceProxy, validateOrchestrationDAG, validateServiceDefinition };
1255
+ type ExecutionStatus = "queued" | "running" | "succeeded" | "failed" | "cancelled" | "timed-out";
1256
+ interface ExecutionRequest {
1257
+ workspaceId: string;
1258
+ command: string;
1259
+ cwd?: string;
1260
+ environment?: Readonly<Record<string, string>>;
1261
+ timeoutMs?: number;
1262
+ network?: "none" | "restricted" | "full";
1263
+ resources?: {
1264
+ cpu?: number;
1265
+ memoryMb?: number;
1266
+ diskMb?: number;
1267
+ };
1268
+ }
1269
+ interface ExecutionResult {
1270
+ executionId: string;
1271
+ status: ExecutionStatus;
1272
+ exitCode?: number;
1273
+ stdout: string;
1274
+ stderr: string;
1275
+ artifactIds: readonly string[];
1276
+ }
1277
+ interface ExecutionProvider {
1278
+ readonly id: string;
1279
+ execute(request: ExecutionRequest): Promise<ExecutionResult>;
1280
+ cancel(executionId: string): Promise<void>;
1281
+ }
1282
+ interface ExecutionController {
1283
+ register(provider: ExecutionProvider): void;
1284
+ execute(request: ExecutionRequest, providerId?: string): Promise<ExecutionResult>;
1285
+ cancel(executionId: string): Promise<void>;
1286
+ }
1287
+
1288
+ declare class DefaultExecutionController implements ExecutionController {
1289
+ private readonly providers;
1290
+ private readonly executions;
1291
+ register(provider: ExecutionProvider): void;
1292
+ execute(request: ExecutionRequest, providerId?: string): Promise<ExecutionResult>;
1293
+ cancel(executionId: string): Promise<void>;
1294
+ }
1295
+
1296
+ export { type BackendCommand, type Connection, type DAGValidationResult, DefaultExecutionController, type DefaultFrontendReference, type DependencyContract, type EndpointDescriptor, EventBus, type EventChannel, type EventContract, type EventDefinition, type EventHandler, type EventSubscription, type ExecutionContext, type ExecutionController, type ExecutionProvider, type ExecutionRequest, type ExecutionResult, type ExecutionStatus, type FunctionalityCustomEvents, type FunctionalityDefinition, type FunctionalityEventNamespace, type FunctionalityEvents, type FunctionalityExecutionContext, FunctionalityFacade, type FunctionalityFlow, type FunctionalityFlowStep, type FunctionalityLifecycleEvent, type FunctionalityLifecyclePayload, FunctionalityOrchestration, type FunctionalityStepOptions, HttpProtocolAdapter, type IService, type IServiceFacade, type JobStatus, type KrnlJobDefinition, type KrnlJobHandle, type KrnlJobOptions, KrnlPackageReconciler, KrnlQueue, type KrnlQueueOptions, type KrnlWorkerInfo, KrnlWorkerPool, type KrnlWorkerState, type LifecycleContract, LifecycleManager, MemoryTransport, type NormalizedResult, type OperationContext, type OperationContract, type OrchestrationContext, type OrchestrationDefinition, type OrchestrationDescriptor, OrchestrationEventFacade, type OrchestrationEventNamespace, type OrchestrationFrontendReference, type OrchestrationLifecyclePayload, type OrchestrationResult, type OrchestrationStatus, type OrchestrationStep, P2PProtocolAdapter, type PeerRecord, type ProtocolAdapter, type ProtocolCapabilities, type ProtocolEnvelope, ProtocolResolver, type ProtocolType, type ReconcileResult, type RegisteredServiceRecord, type SagaCompensationHandler, type ServiceCapability, type ServiceDefinition, ServiceDiscovery, ServiceEventBus, ServiceFacade, type ServiceFacadeConfig, ServiceInstance, type ServiceNamespace, ServiceProxy, ServiceRegistry, ServiceRuntime, ServiceStateStore, type ServiceStatus, type StateContract, type StepCompensation, type StepCondition, type StepDefinition, type StepExecutionResult, type StepExecutionStatus, type StepRetryPolicy, type StepStatus, type StepTimeoutPolicy, type StepType, TelemetryController, type TelemetryHandle, type TelemetryInvocation, type TelemetryMode, type TelemetryOptions, type TelemetryPercentiles, type TelemetryResourceSample, type TelemetrySnapshot, type TelemetryStatus, type TelemetryTargetStats, UdpProtocolAdapter, WebSocketProtocolAdapter, WorkerExecutionBoundary, createEventChannels, createService, createServiceDefinition, createServiceFacade, createServiceProxy, deltaResources, sampleResources, telemetryNow, validateOrchestrationDAG, validateServiceDefinition };
@@ -111,6 +111,151 @@ declare class FunctionalityFacade<TInput = unknown, TOutput = unknown, TState =
111
111
  clearEventSubscriptions(): void;
112
112
  }
113
113
 
114
+ /**
115
+ * @file TelemetryTypes.ts
116
+ * @description Framework-native service invocation telemetry contracts.
117
+ */
118
+ type TelemetryMode = 'off' | 'standard' | 'detailed' | 'profile';
119
+ type TelemetryStatus = {
120
+ enabled: boolean;
121
+ mode: TelemetryMode;
122
+ serviceId: string;
123
+ invocationCount: number;
124
+ activeInvocations: number;
125
+ lastInvocationAt?: number;
126
+ };
127
+ interface TelemetryResourceSample {
128
+ cpuUserMicros?: number;
129
+ cpuSystemMicros?: number;
130
+ heapUsedBytes?: number;
131
+ heapTotalBytes?: number;
132
+ rssBytes?: number;
133
+ externalBytes?: number;
134
+ arrayBuffersBytes?: number;
135
+ eventLoopUtilization?: number;
136
+ scope: 'process' | 'runtime';
137
+ }
138
+ interface TelemetryInvocation {
139
+ invocationId: string;
140
+ traceId: string;
141
+ spanId: string;
142
+ parentSpanId?: string;
143
+ serviceId: string;
144
+ target: string;
145
+ kind: 'service' | 'functionality' | 'orchestration';
146
+ correlationId?: string;
147
+ startedAt: number;
148
+ completedAt: number;
149
+ durationMs: number;
150
+ status: 'completed' | 'failed';
151
+ error?: {
152
+ name: string;
153
+ message: string;
154
+ };
155
+ resources?: {
156
+ start: TelemetryResourceSample;
157
+ end: TelemetryResourceSample;
158
+ delta: TelemetryResourceSample;
159
+ };
160
+ }
161
+ interface TelemetryPercentiles {
162
+ min: number;
163
+ mean: number;
164
+ p50: number;
165
+ p90: number;
166
+ p95: number;
167
+ p99: number;
168
+ max: number;
169
+ }
170
+ interface TelemetryTargetStats {
171
+ target: string;
172
+ kind: TelemetryInvocation['kind'];
173
+ count: number;
174
+ successCount: number;
175
+ errorCount: number;
176
+ durationMs: TelemetryPercentiles;
177
+ lastInvocationAt?: number;
178
+ }
179
+ interface TelemetrySnapshot {
180
+ serviceId: string;
181
+ mode: TelemetryMode;
182
+ capturedAt: number;
183
+ status: TelemetryStatus;
184
+ totals: {
185
+ invocationCount: number;
186
+ successCount: number;
187
+ errorCount: number;
188
+ durationMs: TelemetryPercentiles;
189
+ };
190
+ targets: TelemetryTargetStats[];
191
+ activeInvocations: number;
192
+ recentInvocations: TelemetryInvocation[];
193
+ }
194
+ interface TelemetryOptions {
195
+ mode?: TelemetryMode;
196
+ maxSamples?: number;
197
+ maxRecentInvocations?: number;
198
+ }
199
+ interface TelemetryHandle {
200
+ readonly invocationId: string;
201
+ readonly traceId: string;
202
+ readonly spanId: string;
203
+ readonly parentSpanId?: string;
204
+ end(error?: unknown): void;
205
+ }
206
+
207
+ /**
208
+ * @file TelemetryResources.ts
209
+ * @description Capability-detected runtime resource sampling.
210
+ */
211
+
212
+ declare function telemetryNow(): number;
213
+ declare function sampleResources(): TelemetryResourceSample;
214
+ declare function deltaResources(start: TelemetryResourceSample, end: TelemetryResourceSample): TelemetryResourceSample;
215
+
216
+ /**
217
+ * @file TelemetryController.ts
218
+ * @description Per-service telemetry recorder and public control surface.
219
+ */
220
+
221
+ type ActiveInvocation = {
222
+ invocationId: string;
223
+ traceId: string;
224
+ spanId: string;
225
+ parentSpanId?: string;
226
+ serviceId: string;
227
+ target: string;
228
+ kind: TelemetryInvocation['kind'];
229
+ correlationId?: string;
230
+ startedAt: number;
231
+ resourcesStart?: ReturnType<typeof sampleResources>;
232
+ };
233
+ declare class TelemetryController {
234
+ private readonly serviceId;
235
+ private mode;
236
+ private readonly maxSamples;
237
+ private readonly maxRecentInvocations;
238
+ private readonly samples;
239
+ private readonly active;
240
+ private totalInvocationCount;
241
+ private totalSuccessCount;
242
+ private totalErrorCount;
243
+ private lastInvocationAt?;
244
+ constructor(serviceId: string, options?: TelemetryOptions);
245
+ enable(mode?: Exclude<TelemetryMode, 'off'>): void;
246
+ disable(): void;
247
+ setMode(mode: TelemetryMode): void;
248
+ getMode(): TelemetryMode;
249
+ status(): TelemetryStatus;
250
+ begin(target: string, kind: ActiveInvocation['kind'], correlationId?: string, parentSpanId?: string): TelemetryHandle;
251
+ reset(): void;
252
+ snapshot(): TelemetrySnapshot;
253
+ functionality(name: string): TelemetryTargetStats | undefined;
254
+ functionalities(): TelemetryTargetStats[];
255
+ private findTraceId;
256
+ private finish;
257
+ }
258
+
114
259
  /**
115
260
  * @file ServiceContract.ts
116
261
  * @description Canonical service contracts for the KrnlTS Service Kernel.
@@ -207,6 +352,7 @@ TLegacyEvents extends Record<string, unknown> = Record<string, unknown>> {
207
352
  readonly id: string;
208
353
  readonly name: string;
209
354
  readonly version: string;
355
+ readonly telemetry: TelemetryController;
210
356
  call<TIn = unknown, TOut = unknown>(op: string, input?: TIn, ctx?: OperationContext): Promise<TOut>;
211
357
  getState(): Readonly<TState>;
212
358
  setState(mutation: Partial<TState>): void;
@@ -227,6 +373,7 @@ declare class ServiceInstance<TState extends Record<string, unknown> = Record<st
227
373
  readonly id: string;
228
374
  readonly name: string;
229
375
  readonly version: string;
376
+ readonly telemetry: TelemetryController;
230
377
  private stateStore?;
231
378
  private readonly lifecycle;
232
379
  private initialized;
@@ -297,6 +444,7 @@ declare class ServiceProxy<TState extends Record<string, unknown> = Record<strin
297
444
  readonly id: string;
298
445
  readonly name: string;
299
446
  readonly version: string;
447
+ readonly telemetry: TelemetryController;
300
448
  private stateCache;
301
449
  private readonly eventHandlers;
302
450
  private readonly lifecycle;
@@ -819,6 +967,7 @@ declare class ServiceFacade<TState extends Record<string, unknown> = Record<stri
819
967
  readonly defaultFrontend?: DefaultFrontendReference;
820
968
  private readonly instance;
821
969
  private readonly queue;
970
+ readonly telemetry: TelemetryController;
822
971
  constructor(config: ServiceFacadeConfig<TState, TEvents, TLibraries>);
823
972
  get orchestrations(): Record<string, FunctionalityOrchestration>;
824
973
  getInstance(): IService<TState, TEvents>;
@@ -1103,4 +1252,45 @@ declare class ProtocolResolver {
1103
1252
  static getSupportedProtocols(definition: ServiceDefinition): ProtocolType[];
1104
1253
  }
1105
1254
 
1106
- export { type BackendCommand, type Connection, type DAGValidationResult, type DefaultFrontendReference, type DependencyContract, type EndpointDescriptor, EventBus, type EventChannel, type EventContract, type EventDefinition, type EventHandler, type EventSubscription, type ExecutionContext, type FunctionalityCustomEvents, type FunctionalityDefinition, type FunctionalityEventNamespace, type FunctionalityEvents, type FunctionalityExecutionContext, FunctionalityFacade, type FunctionalityFlow, type FunctionalityFlowStep, type FunctionalityLifecycleEvent, type FunctionalityLifecyclePayload, FunctionalityOrchestration, type FunctionalityStepOptions, HttpProtocolAdapter, type IService, type IServiceFacade, type JobStatus, type KrnlJobDefinition, type KrnlJobHandle, type KrnlJobOptions, KrnlPackageReconciler, KrnlQueue, type KrnlQueueOptions, type KrnlWorkerInfo, KrnlWorkerPool, type KrnlWorkerState, type LifecycleContract, LifecycleManager, MemoryTransport, type NormalizedResult, type OperationContext, type OperationContract, type OrchestrationContext, type OrchestrationDefinition, type OrchestrationDescriptor, OrchestrationEventFacade, type OrchestrationEventNamespace, type OrchestrationFrontendReference, type OrchestrationLifecyclePayload, type OrchestrationResult, type OrchestrationStatus, type OrchestrationStep, P2PProtocolAdapter, type PeerRecord, type ProtocolAdapter, type ProtocolCapabilities, type ProtocolEnvelope, ProtocolResolver, type ProtocolType, type ReconcileResult, type RegisteredServiceRecord, type SagaCompensationHandler, type ServiceCapability, type ServiceDefinition, ServiceDiscovery, ServiceEventBus, ServiceFacade, type ServiceFacadeConfig, ServiceInstance, type ServiceNamespace, ServiceProxy, ServiceRegistry, ServiceRuntime, ServiceStateStore, type ServiceStatus, type StateContract, type StepCompensation, type StepCondition, type StepDefinition, type StepExecutionResult, type StepExecutionStatus, type StepRetryPolicy, type StepStatus, type StepTimeoutPolicy, type StepType, UdpProtocolAdapter, WebSocketProtocolAdapter, WorkerExecutionBoundary, createEventChannels, createService, createServiceDefinition, createServiceFacade, createServiceProxy, validateOrchestrationDAG, validateServiceDefinition };
1255
+ type ExecutionStatus = "queued" | "running" | "succeeded" | "failed" | "cancelled" | "timed-out";
1256
+ interface ExecutionRequest {
1257
+ workspaceId: string;
1258
+ command: string;
1259
+ cwd?: string;
1260
+ environment?: Readonly<Record<string, string>>;
1261
+ timeoutMs?: number;
1262
+ network?: "none" | "restricted" | "full";
1263
+ resources?: {
1264
+ cpu?: number;
1265
+ memoryMb?: number;
1266
+ diskMb?: number;
1267
+ };
1268
+ }
1269
+ interface ExecutionResult {
1270
+ executionId: string;
1271
+ status: ExecutionStatus;
1272
+ exitCode?: number;
1273
+ stdout: string;
1274
+ stderr: string;
1275
+ artifactIds: readonly string[];
1276
+ }
1277
+ interface ExecutionProvider {
1278
+ readonly id: string;
1279
+ execute(request: ExecutionRequest): Promise<ExecutionResult>;
1280
+ cancel(executionId: string): Promise<void>;
1281
+ }
1282
+ interface ExecutionController {
1283
+ register(provider: ExecutionProvider): void;
1284
+ execute(request: ExecutionRequest, providerId?: string): Promise<ExecutionResult>;
1285
+ cancel(executionId: string): Promise<void>;
1286
+ }
1287
+
1288
+ declare class DefaultExecutionController implements ExecutionController {
1289
+ private readonly providers;
1290
+ private readonly executions;
1291
+ register(provider: ExecutionProvider): void;
1292
+ execute(request: ExecutionRequest, providerId?: string): Promise<ExecutionResult>;
1293
+ cancel(executionId: string): Promise<void>;
1294
+ }
1295
+
1296
+ export { type BackendCommand, type Connection, type DAGValidationResult, DefaultExecutionController, type DefaultFrontendReference, type DependencyContract, type EndpointDescriptor, EventBus, type EventChannel, type EventContract, type EventDefinition, type EventHandler, type EventSubscription, type ExecutionContext, type ExecutionController, type ExecutionProvider, type ExecutionRequest, type ExecutionResult, type ExecutionStatus, type FunctionalityCustomEvents, type FunctionalityDefinition, type FunctionalityEventNamespace, type FunctionalityEvents, type FunctionalityExecutionContext, FunctionalityFacade, type FunctionalityFlow, type FunctionalityFlowStep, type FunctionalityLifecycleEvent, type FunctionalityLifecyclePayload, FunctionalityOrchestration, type FunctionalityStepOptions, HttpProtocolAdapter, type IService, type IServiceFacade, type JobStatus, type KrnlJobDefinition, type KrnlJobHandle, type KrnlJobOptions, KrnlPackageReconciler, KrnlQueue, type KrnlQueueOptions, type KrnlWorkerInfo, KrnlWorkerPool, type KrnlWorkerState, type LifecycleContract, LifecycleManager, MemoryTransport, type NormalizedResult, type OperationContext, type OperationContract, type OrchestrationContext, type OrchestrationDefinition, type OrchestrationDescriptor, OrchestrationEventFacade, type OrchestrationEventNamespace, type OrchestrationFrontendReference, type OrchestrationLifecyclePayload, type OrchestrationResult, type OrchestrationStatus, type OrchestrationStep, P2PProtocolAdapter, type PeerRecord, type ProtocolAdapter, type ProtocolCapabilities, type ProtocolEnvelope, ProtocolResolver, type ProtocolType, type ReconcileResult, type RegisteredServiceRecord, type SagaCompensationHandler, type ServiceCapability, type ServiceDefinition, ServiceDiscovery, ServiceEventBus, ServiceFacade, type ServiceFacadeConfig, ServiceInstance, type ServiceNamespace, ServiceProxy, ServiceRegistry, ServiceRuntime, ServiceStateStore, type ServiceStatus, type StateContract, type StepCompensation, type StepCondition, type StepDefinition, type StepExecutionResult, type StepExecutionStatus, type StepRetryPolicy, type StepStatus, type StepTimeoutPolicy, type StepType, TelemetryController, type TelemetryHandle, type TelemetryInvocation, type TelemetryMode, type TelemetryOptions, type TelemetryPercentiles, type TelemetryResourceSample, type TelemetrySnapshot, type TelemetryStatus, type TelemetryTargetStats, UdpProtocolAdapter, WebSocketProtocolAdapter, WorkerExecutionBoundary, createEventChannels, createService, createServiceDefinition, createServiceFacade, createServiceProxy, deltaResources, sampleResources, telemetryNow, validateOrchestrationDAG, validateServiceDefinition };