@loadstrike/loadstrike-sdk 1.0.30201 → 1.0.31001

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.
@@ -1,9 +1,14 @@
1
+ import { type EndpointAdapter, type EndpointDefinition } from "./transports.js";
1
2
  export interface ClusterScenarioDispatch {
2
3
  scenarioNames: string[];
3
4
  commandId?: string;
4
5
  agentRunToken?: string;
5
6
  agentIndex?: number;
6
7
  agentCount?: number;
8
+ segmentLifecycle?: {
9
+ beforeSegment: (scenarioIndex: number, simulationIndex: number) => Promise<void>;
10
+ afterSegment: (scenarioIndex: number, simulationIndex: number) => Promise<void>;
11
+ };
7
12
  }
8
13
  export interface ClusterNodeResult {
9
14
  nodeId: string;
@@ -73,6 +78,13 @@ export interface ClusterNodeStatsPayload {
73
78
  nodeInfo?: Record<string, unknown>;
74
79
  testInfo?: Record<string, unknown>;
75
80
  logFiles?: string[];
81
+ generatorWarnings?: unknown[];
82
+ observationDeliveryStats?: Record<string, unknown>;
83
+ reportingComplete?: boolean;
84
+ schedulerSegments?: unknown[];
85
+ schedulerStats?: Record<string, unknown>;
86
+ histogramSidecars?: unknown[];
87
+ histogramArtifactBase64?: string;
76
88
  }
77
89
  export interface ClusterRunResultMessage {
78
90
  commandId: string;
@@ -81,6 +93,328 @@ export interface ClusterRunResultMessage {
81
93
  errorMessage?: string;
82
94
  stats?: ClusterNodeStatsPayload;
83
95
  }
96
+ export declare const LOAD_ENGINE_V2_CLUSTER_CAPABILITIES: Readonly<{
97
+ schedulerVersions: string[];
98
+ histogramVersions: string[];
99
+ shardingVersions: string[];
100
+ resultChunkVersions: string[];
101
+ iterationObservationSchemas: string[];
102
+ correlationSetVersions: string[];
103
+ planHashVersions: string[];
104
+ callbackExecutionModes: string[];
105
+ maximumResultChunkBytes: number;
106
+ }>;
107
+ export interface LoadEngineV2Registration {
108
+ runId: string;
109
+ sessionId: string;
110
+ coordinatorNonce: string;
111
+ agentId: string;
112
+ targetSubject: string;
113
+ processInstanceId: string;
114
+ schedulerVisibleProcessorCount: number;
115
+ sdkLanguage: string;
116
+ sdkPackageVersion: string;
117
+ runtimeVersion: string;
118
+ registrationSequence64: string;
119
+ leaseIssuedUtcNs64: string;
120
+ leaseExpiresUtcNs64: string;
121
+ schedulerVersions: string[];
122
+ histogramVersions: string[];
123
+ shardingVersions: string[];
124
+ resultChunkVersions: string[];
125
+ iterationObservationSchemas: string[];
126
+ correlationSetVersions: string[];
127
+ planHashVersions: string[];
128
+ callbackExecutionModes: string[];
129
+ maximumResultChunkBytes: number;
130
+ registrationBindingHash: string;
131
+ }
132
+ export interface LoadEngineV2RegistrationInput {
133
+ runId: string;
134
+ sessionId: string;
135
+ coordinatorNonce: string;
136
+ agentId: string;
137
+ targetSubject: string;
138
+ processInstanceId?: string;
139
+ schedulerVisibleProcessorCount?: number;
140
+ sdkLanguage?: string;
141
+ sdkPackageVersion?: string;
142
+ runtimeVersion?: string;
143
+ registrationSequence64: string;
144
+ leaseIssuedUtcNs64: string;
145
+ leaseExpiresUtcNs64: string;
146
+ capabilities?: Partial<typeof LOAD_ENGINE_V2_CLUSTER_CAPABILITIES>;
147
+ }
148
+ export declare function createLoadEngineV2Registration(input: LoadEngineV2RegistrationInput): LoadEngineV2Registration;
149
+ export declare function negotiateLoadEngineV2Registrations(runId: string, sessionId: string, coordinatorNonce: string, expectedAgentIds: readonly string[], registrations: readonly LoadEngineV2Registration[], nowUtcNs64: string): LoadEngineV2Registration[];
150
+ export interface LoadEngineV2CoordinatorHello {
151
+ runId: string;
152
+ sessionId: string;
153
+ coordinatorNonce: string;
154
+ registrationSubject: string;
155
+ expiresUtcNs64: string;
156
+ expectedAgentIds: string[];
157
+ bindingHash: string;
158
+ }
159
+ export declare function buildLoadEngineV2ScopedRegistrationSubject(runId: string, sessionId: string, coordinatorNonce: string): string;
160
+ export declare function buildLoadEngineV2ScopedTargetSubject(runId: string, sessionId: string, coordinatorNonce: string, agentId: string): string;
161
+ export declare function buildLoadEngineV2GlobalInvocationId(runId: string, scenarioIndex: number | bigint, simulationIndex: number | bigint, identityKind: string, primaryOrdinal: string | number | bigint, secondaryOrdinal: string | number | bigint): string;
162
+ export declare function createLoadEngineV2CoordinatorHello(input: Omit<LoadEngineV2CoordinatorHello, "bindingHash" | "expectedAgentIds"> & {
163
+ expectedAgentIds: string[];
164
+ }): LoadEngineV2CoordinatorHello;
165
+ export declare function validateLoadEngineV2CoordinatorHello(hello: LoadEngineV2CoordinatorHello, expectedSessionId: string, expectedAgentId: string, nowUtcNs64: string): void;
166
+ export interface LoadEngineV2PlanSimulationInput {
167
+ simulationIndex64: string;
168
+ kind: string;
169
+ rate64: string;
170
+ minRate64: string;
171
+ maxRate64: string;
172
+ copies64: string;
173
+ iterations64: string;
174
+ intervalNs64: string;
175
+ durationNs64: string;
176
+ }
177
+ export interface LoadEngineV2PlanScenarioInput {
178
+ scenarioIndex64: string;
179
+ scenarioName: string;
180
+ target: "agent" | "coordinator";
181
+ callbackExecutionMode?: "async" | "blocking";
182
+ declaredStepNames?: string[];
183
+ simulations: LoadEngineV2PlanSimulationInput[];
184
+ }
185
+ export interface LoadEngineV2PlanInput {
186
+ runId: string;
187
+ sessionId: string;
188
+ registrationNonce: string;
189
+ maxInFlight64: string;
190
+ reportingIntervalNs64: string;
191
+ schedulerSeed64?: string;
192
+ schedulerVisibleProcessorCount64?: string;
193
+ maxStatisticsStateBytes64?: string;
194
+ maxDistributionSeries64?: string;
195
+ maxCorrelationGroups64?: string;
196
+ maxStatusGroupsPerSeries64?: string;
197
+ maxPortalRunDistributionBytes64?: string;
198
+ expectedAgentIds: string[];
199
+ scenarios: LoadEngineV2PlanScenarioInput[];
200
+ }
201
+ export interface LoadEngineV2PortalSeriesRecord {
202
+ seriesKeyHex: string;
203
+ unit: "microseconds" | "bytes";
204
+ outcome: "ok" | "fail" | "all" | "none";
205
+ }
206
+ export interface LoadEngineV2Plan {
207
+ bytes: Buffer;
208
+ hash: string;
209
+ expectedAgentIds: string[];
210
+ portalSeries: LoadEngineV2PortalSeriesRecord[];
211
+ }
212
+ export declare function buildLoadEngineV2Plan(input: LoadEngineV2PlanInput): LoadEngineV2Plan;
213
+ /** Canonical LoadStrikeIdentityKeyV1 scenario bytes. */
214
+ export declare function buildLoadEngineV2ScenarioIdentityKey(scenarioIndex64: string): Buffer;
215
+ /** Canonical LoadStrikeIdentityKeyV1 reserved step-other bytes. */
216
+ export declare function buildLoadEngineV2ReservedStepOtherIdentityKey(scenarioIndex64: string): Buffer;
217
+ export declare function buildLoadEngineV2StepIdentityKey(scenarioIndex64: string, stepName: string): {
218
+ identity: Buffer;
219
+ display: string;
220
+ };
221
+ /** Resolves a runtime step to its frozen signed identity or the reserved `<other>` bucket. */
222
+ export declare function resolveLoadEngineV2StepIdentityKey(scenarioIndex64: string, stepName: string, declaredStepNames: readonly string[]): {
223
+ identity: Buffer;
224
+ display: string;
225
+ routedToOther: boolean;
226
+ };
227
+ export declare function buildLoadEngineV2SchedulerIdentityKey(kind: "decision" | "start", scenarioIndex64: string, simulationIndex64: string): Buffer;
228
+ export declare function buildLoadEngineV2StatusIdentityKey(status: string, message: string): {
229
+ identity: Buffer;
230
+ display: string;
231
+ } | undefined;
232
+ /** Canonical LoadStrikePortalSeriesKeyV1 bytes. */
233
+ export declare function buildLoadEngineV2PortalSeriesKey(identity: Uint8Array, unit: "microseconds" | "bytes", outcome: "ok" | "fail" | "all" | "none"): Buffer;
234
+ export interface LoadEngineV2BarrierAssignmentInput {
235
+ scenarioIndex64: string;
236
+ simulationIndex64: string;
237
+ trafficMixId?: string;
238
+ trafficMixLaneIndex64?: string;
239
+ trafficMixPhaseIndex64?: string;
240
+ agentId: string;
241
+ shardIndex64: string;
242
+ shardCount64: string;
243
+ }
244
+ export declare function buildLoadEngineV2BarrierScopeId(planHash: string, scope: {
245
+ kind: "scenario";
246
+ scenarioIndex64: string;
247
+ simulationIndex64: string;
248
+ } | {
249
+ kind: "traffic-mix";
250
+ trafficMixId: string;
251
+ trafficMixPhaseIndex64: string;
252
+ }): string;
253
+ export declare function buildLoadEngineV2AssignmentHash(barrierScopeId: string, assignments: readonly LoadEngineV2BarrierAssignmentInput[]): string;
254
+ export interface LoadEngineV2BarrierAck {
255
+ phase: string;
256
+ agentId: string;
257
+ accepted: boolean;
258
+ planHash: string;
259
+ barrierScopeId?: string;
260
+ assignmentHash: string;
261
+ barrierEpoch64: string;
262
+ deadlineUtcNs64: string;
263
+ acknowledgedUtcNs64: string;
264
+ }
265
+ export interface LoadEngineV2ClockProbeSample {
266
+ probeIndex: number;
267
+ coordinatorSendUtcNs64: string;
268
+ agentReceiveUtcNs64: string;
269
+ agentSendUtcNs64: string;
270
+ coordinatorReceiveUtcNs64: string;
271
+ coordinatorClockResolutionNs64: string;
272
+ agentClockResolutionNs64: string;
273
+ }
274
+ export interface LoadEngineV2ClockProbeResult extends LoadEngineV2ClockProbeSample {
275
+ roundTripNs64: string;
276
+ offsetAgentMinusCoordinatorNs64: string;
277
+ uncertaintyNs64: string;
278
+ }
279
+ export declare function evaluateLoadEngineV2ClockProbe(sample: LoadEngineV2ClockProbeSample): LoadEngineV2ClockProbeResult;
280
+ export declare function selectLoadEngineV2ClockProbe(samples: readonly LoadEngineV2ClockProbeSample[], latenessToleranceNs64?: string): LoadEngineV2ClockProbeResult;
281
+ export declare function validateLoadEngineV2BarrierAcks(phase: string, expectedAgentIds: readonly string[], acknowledgements: readonly LoadEngineV2BarrierAck[], planHash: string, assignmentHash: string, barrierEpoch64: string, nowUtcNs64: string, barrierScopeId?: string): void;
282
+ export interface LoadEngineV2ResultArtifact {
283
+ kind: string;
284
+ artifactId: string;
285
+ schema: string;
286
+ applicability: "present" | "empty" | "not-applicable";
287
+ payload: Buffer;
288
+ }
289
+ export interface LoadEngineV2ResultManifestEntry {
290
+ kind: string;
291
+ artifactId: string;
292
+ schema: string;
293
+ applicability: "present" | "empty" | "not-applicable";
294
+ uncompressedLength64: string;
295
+ chunkCount: number;
296
+ artifactSha256: string;
297
+ }
298
+ export interface LoadEngineV2ResultManifest {
299
+ runId: string;
300
+ sessionId: string;
301
+ resultOwnerId: string;
302
+ snapshotSequence64: string;
303
+ planHash: string;
304
+ isFinal: boolean;
305
+ correlationDetailPartCount: number;
306
+ entries: LoadEngineV2ResultManifestEntry[];
307
+ bytes: Buffer;
308
+ hash: string;
309
+ }
310
+ export interface LoadEngineV2CanonicalResultChunk {
311
+ runId: string;
312
+ sessionId: string;
313
+ resultOwnerId: string;
314
+ snapshotSequence64: string;
315
+ manifestSha256: string;
316
+ kind: string;
317
+ artifactId: string;
318
+ schema: string;
319
+ artifactSha256: string;
320
+ chunkIndex: number;
321
+ chunkCount: number;
322
+ uncompressedTotalLength64: string;
323
+ payload: Buffer;
324
+ chunkSha256: string;
325
+ bytes: Buffer;
326
+ }
327
+ export interface LoadEngineV2ResultCommit {
328
+ runId: string;
329
+ sessionId: string;
330
+ resultOwnerId: string;
331
+ snapshotSequence64: string;
332
+ planHash: string;
333
+ manifestLength: number;
334
+ manifestSha256: string;
335
+ entryCount: number;
336
+ totalNonDetailBytes64: string;
337
+ totalDetailBytes64: string;
338
+ bytes: Buffer;
339
+ }
340
+ export interface LoadEngineV2ResultSnapshot {
341
+ manifest: LoadEngineV2ResultManifest;
342
+ chunks: LoadEngineV2CanonicalResultChunk[];
343
+ commit: LoadEngineV2ResultCommit;
344
+ }
345
+ export declare function loadEngineV2PresentArtifact(kind: string, artifactId: string, schema: string, payload: Uint8Array): LoadEngineV2ResultArtifact;
346
+ export declare function loadEngineV2EmptyArtifact(kind: string, artifactId: string, schema: string): LoadEngineV2ResultArtifact;
347
+ export declare function loadEngineV2NotApplicableArtifact(kind: string, artifactId: string): LoadEngineV2ResultArtifact;
348
+ export declare function createLoadEngineV2ResultSnapshot(runId: string, sessionId: string, resultOwnerId: string, snapshotSequence64: string, planHash: string, isFinal: boolean, chunkBytes: number, artifacts: readonly LoadEngineV2ResultArtifact[]): LoadEngineV2ResultSnapshot;
349
+ export declare function decodeLoadEngineV2ResultManifest(bytesValue: Uint8Array): LoadEngineV2ResultManifest;
350
+ export declare function decodeLoadEngineV2ResultChunk(bytesValue: Uint8Array, maximumChunkBytes: number): LoadEngineV2CanonicalResultChunk;
351
+ export declare function decodeLoadEngineV2ResultCommit(bytesValue: Uint8Array): LoadEngineV2ResultCommit;
352
+ export declare class LoadEngineV2ResultSnapshotReceiver {
353
+ private readonly runId;
354
+ private readonly sessionId;
355
+ private readonly resultOwnerId;
356
+ private readonly planHash;
357
+ private readonly chunkBytes;
358
+ private readonly maximumResultBytes;
359
+ private lastSequence;
360
+ private lastManifestHash;
361
+ private lastCommitBytes;
362
+ private lastArtifacts;
363
+ private pending?;
364
+ private ownerLost;
365
+ constructor(runId: string, sessionId: string, resultOwnerId: string, planHash: string, chunkBytes: number, maximumResultBytes: number);
366
+ begin(manifest: LoadEngineV2ResultManifest): void;
367
+ add(chunk: LoadEngineV2CanonicalResultChunk): void;
368
+ get hasCompleteSnapshot(): boolean;
369
+ commitSnapshot(commit: LoadEngineV2ResultCommit): Map<string, Buffer>;
370
+ sealOwnerLost(): void;
371
+ }
372
+ export interface LoadEngineV2ResultChunk {
373
+ commandId: string;
374
+ agentId: string;
375
+ chunkIndex: number;
376
+ chunkCount: number;
377
+ totalLength64: string;
378
+ payloadSha256: string;
379
+ chunkSha256: string;
380
+ dataBase64: string;
381
+ }
382
+ export declare function createLoadEngineV2ResultChunks(result: ClusterRunResultMessage | Record<string, unknown>, chunkBytes?: number): LoadEngineV2ResultChunk[];
383
+ export declare class LoadEngineV2ResultChunkAccumulator {
384
+ private readonly maximumResultBytes;
385
+ private manifest;
386
+ private readonly chunks;
387
+ private complete;
388
+ constructor(maximumResultBytes?: number);
389
+ add(message: LoadEngineV2ResultChunk): ClusterRunResultMessage | Record<string, unknown> | undefined;
390
+ }
391
+ export interface LoadEngineV2OwnerLossInput {
392
+ missingAgentIds: string[];
393
+ assignments: Array<{
394
+ agentId: string;
395
+ shardIndex64: string;
396
+ shardCount64: string;
397
+ scenarios: Array<{
398
+ scenarioName: string;
399
+ scenarioIndex64: string;
400
+ simulations: Array<{
401
+ simulationIndex64: string;
402
+ kind: string;
403
+ plannedIterations64: string;
404
+ }>;
405
+ }>;
406
+ }>;
407
+ }
408
+ export declare function buildLoadEngineV2OwnerLoss(input: LoadEngineV2OwnerLossInput): {
409
+ reportingComplete: false;
410
+ applicationFailureCount64: "0";
411
+ generatorWarnings: Array<{
412
+ code: string;
413
+ agentId: string;
414
+ count64: string;
415
+ }>;
416
+ schedulerSegments: Array<Record<string, unknown>>;
417
+ };
84
418
  export interface DistributedClusterCoordinatorOptions {
85
419
  clusterId: string;
86
420
  sessionId: string;
@@ -90,6 +424,15 @@ export interface DistributedClusterCoordinatorOptions {
90
424
  agentGroup?: string;
91
425
  commandTimeoutMs?: number;
92
426
  nats?: Record<string, unknown>;
427
+ expectedAgentIds?: string[];
428
+ loadEngineContractVersion?: 1 | 2;
429
+ barrierLeadTimeMs?: number;
430
+ adapterFactory?: ClusterEndpointAdapterFactory;
431
+ /** @internal Clock adapter resolution used by exact protocol harnesses. */
432
+ v2ClockResolutionNs64?: string;
433
+ }
434
+ export interface ClusterEndpointAdapterFactory {
435
+ create(definition: EndpointDefinition): EndpointAdapter;
93
436
  }
94
437
  export interface DistributedClusterDispatchResult {
95
438
  nodeResults: ClusterNodeResult[];
@@ -100,6 +443,7 @@ export interface DistributedClusterDispatchResult {
100
443
  missingNodes: number;
101
444
  runSubject: string;
102
445
  replySubject: string;
446
+ ownerLoss?: ReturnType<typeof buildLoadEngineV2OwnerLoss>;
103
447
  }
104
448
  export declare class DistributedClusterCoordinator {
105
449
  private readonly options;
@@ -109,8 +453,11 @@ export declare class DistributedClusterCoordinator {
109
453
  */
110
454
  constructor(options: DistributedClusterCoordinatorOptions);
111
455
  dispatch(assignments: string[][], buildAgentRunToken?: (command: ClusterRunCommandMessage) => Promise<string>): Promise<DistributedClusterDispatchResult>;
456
+ /** Runs the native V2 capability, targeted-command, barrier, and chunk-result protocol. */
457
+ dispatchV2(assignments: string[][], planInput: LoadEngineV2PlanInput, buildAgentRunToken?: (command: ClusterRunCommandMessage) => Promise<string>): Promise<DistributedClusterDispatchResult>;
112
458
  private buildRunSubject;
113
459
  private buildReplySubject;
460
+ private createAdapter;
114
461
  private natsEndpoint;
115
462
  }
116
463
  export interface DistributedClusterAgentOptions {
@@ -119,10 +466,28 @@ export interface DistributedClusterAgentOptions {
119
466
  agentId: string;
120
467
  agentGroup?: string;
121
468
  nats?: Record<string, unknown>;
469
+ loadEngineContractVersion?: 1 | 2;
470
+ adapterFactory?: ClusterEndpointAdapterFactory;
471
+ /** @internal Validates received signed descriptors against immutable local declarations. */
472
+ validateV2Plan?: (planInput: LoadEngineV2PlanInput) => void;
473
+ /** @internal Exact conformance harness capability override. */
474
+ v2Capabilities?: Partial<typeof LOAD_ENGINE_V2_CLUSTER_CAPABILITIES>;
475
+ /** @internal Clock adapter resolution used by exact protocol harnesses. */
476
+ v2ClockResolutionNs64?: string;
122
477
  }
123
478
  export declare class DistributedClusterAgent {
124
479
  private readonly options;
125
480
  private commandConsumer;
481
+ private v2HelloConsumer;
482
+ private v2CommandConsumer;
483
+ private v2RegistrationProducer;
484
+ private v2LastRegistrationMs;
485
+ private v2Hello;
486
+ private v2CurrentRegistration;
487
+ private v2RegistrationSequence;
488
+ private v2RenewalTimer;
489
+ private v2RenewalError;
490
+ private v2Prepared;
126
491
  /**
127
492
  * Exposes the public constructor operation.
128
493
  * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
@@ -130,9 +495,22 @@ export declare class DistributedClusterAgent {
130
495
  constructor(options: DistributedClusterAgentOptions);
131
496
  dispose(): Promise<void>;
132
497
  pollAndExecuteOnce(execute: (dispatch: ClusterScenarioDispatch) => Promise<ClusterNodeResult> | ClusterNodeResult): Promise<boolean>;
498
+ /** Polls one targeted V2 message. A callback can run only after a matching commit. */
499
+ pollAndExecuteV2Once(execute: (dispatch: ClusterScenarioDispatch) => Promise<ClusterNodeResult> | ClusterNodeResult): Promise<boolean>;
500
+ private publishV2CanonicalResult;
501
+ private publishV2ClockProbe;
502
+ private acceptV2Prepare;
503
+ private acceptV2Commit;
504
+ private ensureV2Registration;
505
+ private ensureV2CommandConsumer;
506
+ private publishV2Registration;
507
+ private matchesV2Scope;
508
+ private publishV2Ack;
509
+ private endpoint;
510
+ private createAdapter;
133
511
  }
134
512
  declare function parseRunCommand(value: Record<string, unknown>): ClusterRunCommandMessage;
135
- declare function parseRunResult(value: Record<string, unknown>): ClusterRunResultMessage;
513
+ declare function parseRunResult(value: Record<string, unknown>, requireHistogramArtifact?: boolean): ClusterRunResultMessage;
136
514
  declare function convertRunResult(result: ClusterRunResultMessage): ClusterNodeResult;
137
515
  declare function sanitizeToken(value: string): string;
138
516
  declare function buildWeightedCycle(weights: number[]): number[];
@@ -3,7 +3,9 @@ export { LoadStrikeAutopilot, LoadStrikeAutopilotResult } from "./autopilot.js";
3
3
  export type { LoadStrikeAutopilotEndpoint, LoadStrikeAutopilotEndpointBinding, LoadStrikeAutopilotLoadSimulationSuggestion, LoadStrikeAutopilotMessageSample, LoadStrikeAutopilotOptions, LoadStrikeAutopilotPlan, LoadStrikeAutopilotPreviewReport, LoadStrikeAutopilotReadinessFailure, LoadStrikeAutopilotRedaction, LoadStrikeAutopilotRequest, LoadStrikeAutopilotResultShape, LoadStrikeAutopilotScenarioPlan, LoadStrikeAutopilotSecretBinding, LoadStrikeAutopilotThresholdSuggestion, LoadStrikeAutopilotTrackingSelectorSuggestion } from "./autopilot-contracts.js";
4
4
  export { LoadStrikeAutopilotReadiness } from "./autopilot-contracts.js";
5
5
  export { CrossPlatformScenarioConfigurator, ScenarioTrackingExtensions, LoadStrikeContext, LoadStrikeAccessibility, LoadStrikeAccessibilityAdapters, LoadStrikeAccessibilityBaseline, LoadStrikeAccessibilityCiGate, LoadStrikeAccessibilityScanner, LoadStrikeBrowserWebVitals, LoadStrikeBrowserWebVitalsCollector, LoadStrikePluginData, LoadStrikePluginDataTable, LoadStrikeNodeType, LoadStrikeReportFormat, LoadStrikeResponse, LoadStrikeLogLevel, LoadStrikeScenarioOperation, LoadStrikeOperationType, LoadStrikeRunner, LoadStrikeScenario, LoadStrikeScenarioShare, LoadStrikeSimulation, LoadStrikeTrafficMix, CrossPlatformTrackingConfiguration, LoadStrikeMetric, LoadStrikeCounter, LoadStrikeGauge, LoadStrikeStep, LoadStrikeThreshold } from "./runtime.js";
6
- export type { ILoadStrikeReportingSink, ILoadStrikeWorkerPlugin, LoadStrikeRunResult, LoadStrikeReportingSink, LoadStrikeRuntimePolicy, LoadStrikeRunnerOptions, LoadStrikeRunContext as LoadStrikeRuntimeContext, LoadStrikeRunContext, LoadStrikeAccessibilityOptions, LoadStrikeAccessibilityBaselineOutcome, LoadStrikeAccessibilityCiGateOutcome, LoadStrikeAccessibilityViolation, LoadStrikeKeyboardFocusResult, LoadStrikeAccessibilityResult, LoadStrikeAccessibilityCheckContext, LoadStrikeBrowserWebVitalsOptions, LoadStrikeBrowserWebVitalsResult, LoadStrikeBrowserWebVitalsContext, LoadStrikeBaseContext, LoadStrikeCounterStats, LoadStrikeDataTransferStats, LoadStrikeGaugeStats, LoadStrikeLogger, LoadStrikeLoadSimulationStats, LoadStrikeMeasurementStats, LoadStrikeMetricStats, LoadStrikeNodeInfo, LoadStrikeMetricValue, LoadStrikeRandom, LoadStrikeReply, LoadStrikeLatencyCount, LoadStrikeLatencyStats, LoadStrikeLoadSimulation, LoadStrikeScenarioInfo, LoadStrikeScenarioInitContext, LoadStrikeScenarioPartition, LoadStrikeScenarioStartInfo, LoadStrikeScenarioContext, LoadStrikeScenarioStats, LoadStrikeTestInfo, LoadStrikeScenarioRuntime, LoadStrikeSessionStartInfo, LoadStrikeSinkSession, LoadStrikeSinkError, LoadStrikeStatusCodeStats, LoadStrikeThresholdResult, LoadStrikeThresholdPredicateContext, LoadStrikeStepReply, LoadStrikeStepStats, LoadStrikeStepRuntime, LoadStrikeThresholdOptions, LoadStrikeRequestStats, LoadStrikeWorkerPlugin } from "./runtime.js";
6
+ export type { ILoadStrikeReportingSink, ILoadStrikeWorkerPlugin, LoadStrikeRunResult, LoadStrikeGeneratorWarning, LoadStrikeSchedulerSegmentStats, LoadStrikeSchedulerStats, LoadStrikeReportingSink, LoadStrikeRuntimePolicy, LoadStrikeRunnerOptions, LoadStrikeRunContext as LoadStrikeRuntimeContext, LoadStrikeRunContext, LoadStrikeAccessibilityOptions, LoadStrikeAccessibilityBaselineOutcome, LoadStrikeAccessibilityCiGateOutcome, LoadStrikeAccessibilityViolation, LoadStrikeKeyboardFocusResult, LoadStrikeAccessibilityResult, LoadStrikeAccessibilityCheckContext, LoadStrikeBrowserWebVitalsOptions, LoadStrikeBrowserWebVitalsResult, LoadStrikeBrowserWebVitalsContext, LoadStrikeBaseContext, LoadStrikeCounterStats, LoadStrikeDataTransferStats, LoadStrikeGaugeStats, LoadStrikeLogger, LoadStrikeLoadSimulationStats, LoadStrikeMeasurementStats, LoadStrikeMetricStats, LoadStrikeNodeInfo, LoadStrikeMetricValue, LoadStrikeRandom, LoadStrikeReply, LoadStrikeLatencyCount, LoadStrikeLatencyStats, LoadStrikeLoadSimulation, LoadStrikeScenarioInfo, LoadStrikeScenarioInitContext, LoadStrikeScenarioPartition, LoadStrikeScenarioStartInfo, LoadStrikeScenarioContext, LoadStrikeScenarioStats, LoadStrikeTestInfo, LoadStrikeScenarioRuntime, LoadStrikeSessionStartInfo, LoadStrikeSinkSession, LoadStrikeSinkError, LoadStrikeStatusCodeStats, LoadStrikeThresholdResult, LoadStrikeThresholdPredicateContext, LoadStrikeStepReply, LoadStrikeStepStats, LoadStrikeStepRuntime, LoadStrikeThresholdOptions, LoadStrikeRequestStats, LoadStrikeWorkerPlugin } from "./runtime.js";
7
+ export { DEFAULT_ITERATION_OBSERVATION_SETTINGS, ITERATION_OBSERVATION_BATCH_SCHEMA_VERSION, ITERATION_OBSERVATION_SCHEMA_VERSION, ITERATION_OBSERVATION_STREAM_COMPLETION_SCHEMA_VERSION, createIterationObservation, createIterationStepObservation, deriveIterationBatchId, deriveIterationId, deriveObservationId, serializeIterationObservationBatchGzipJson } from "./iteration-observations.js";
8
+ export type { CreateIterationObservationInput, CreateIterationStepObservationInput, IterationObservationSettings, LoadStrikeIterationObservationBatchV1, LoadStrikeIterationObservationStreamCompletionV1, LoadStrikeIterationObservationV1, LoadStrikeIterationStepObservationV1, LoadStrikeObservationDeliveryStats } from "./iteration-observations.js";
7
9
  export { CorrelationStoreConfiguration, CrossPlatformTrackingRuntime, InMemoryCorrelationStore, RedisCorrelationStoreOptions, RedisCorrelationStore, TrackingPayloadBuilder, TrackingFieldSelector } from "./correlation.js";
8
10
  export type { CorrelationEntry, DestinationConsumeResult, GatheredRow, CorrelationStoreKind, CorrelationRuntimeOptions, CorrelationRuntimePlugin, CorrelationRuntimeStats, CorrelationStore, SourceProduceResult, TrackingFieldLocation, TrackingPayload } from "./correlation.js";
9
11
  export { LOADSTRIKE_TRACE_ID_HEADER, LOADSTRIKE_TRACE_ID_TRACKING_FIELD, TrafficEndpointDefinition, HttpEndpointDefinition, KafkaEndpointDefinition, KafkaSaslOptions, RabbitMqEndpointDefinition, NatsEndpointDefinition, RedisStreamsEndpointDefinition, AzureEventHubsEndpointDefinition, SqsEndpointDefinition, DelegateStreamEndpointDefinition, PushDiffusionEndpointDefinition, GrpcEndpointDefinition, GrpcMethodTypes, GrpcNativeClientOptions, GrpcStatusMapper, ProtocolMetricSnapshot, WebSocketEndpointDefinition, WebSocketExpectedMessage, WebSocketMessageSpec, WebSocketNativeClientOptions, WebSocketReconnectPolicy, HttpOAuth2ClientCredentialsOptions, HttpAuthOptions } from "./transports.js";
@@ -0,0 +1,21 @@
1
+ export interface IterationObservationDiagnosticLogger {
2
+ debug(message: string): void | PromiseLike<void>;
3
+ warn(message: string): void | PromiseLike<void>;
4
+ error(message: string): void | PromiseLike<void>;
5
+ }
6
+ export interface IterationObservationDiagnosticContext {
7
+ sinkName: string;
8
+ operation: "observation-batch" | "observation-stream-completion" | "reporting-sink-action";
9
+ phase?: string;
10
+ runId: string;
11
+ resultOwnerId: string;
12
+ batchId?: string;
13
+ batchSequence64?: string;
14
+ observationCount: number;
15
+ attempt: number;
16
+ maximumAttempts: number;
17
+ nextDelayMs?: number;
18
+ }
19
+ export declare function logIterationObservationFailure(logger: IterationObservationDiagnosticLogger | undefined, level: "warn" | "error", context: IterationObservationDiagnosticContext, error: unknown): void;
20
+ export declare function logIterationObservationRecovery(logger: IterationObservationDiagnosticLogger | undefined, context: IterationObservationDiagnosticContext): void;
21
+ export declare function redactIterationObservationSecrets(value: string): string;