@loadstrike/loadstrike-sdk 1.0.20801 → 1.0.21101

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,5 +1,9 @@
1
1
  export interface ClusterScenarioDispatch {
2
2
  scenarioNames: string[];
3
+ commandId?: string;
4
+ agentRunToken?: string;
5
+ agentIndex?: number;
6
+ agentCount?: number;
3
7
  }
4
8
  export interface ClusterNodeResult {
5
9
  nodeId: string;
@@ -20,6 +24,10 @@ export interface ClusterCoordinatorOptions {
20
24
  }
21
25
  export declare class LocalClusterCoordinator {
22
26
  private readonly options;
27
+ /**
28
+ * Exposes the public constructor operation.
29
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
30
+ */
23
31
  constructor(options?: ClusterCoordinatorOptions);
24
32
  dispatch(agents: ClusterAgent[], scenarioNames: string[], assignmentOptions?: ClusterAssignmentOptions): Promise<{
25
33
  nodeResults: ClusterNodeResult[];
@@ -37,6 +45,9 @@ export interface ClusterAssignmentOptions {
37
45
  agentTargets?: Array<string[] | undefined>;
38
46
  agentWeights?: number[];
39
47
  }
48
+ /**
49
+ * Exposes the plan agent scenario assignments operation. Use this when interacting with the SDK through this surface.
50
+ */
40
51
  export declare function planAgentScenarioAssignments(scenarioNames: string[], agentCount: number, options?: ClusterAssignmentOptions): string[][];
41
52
  export interface ClusterRunCommandMessage {
42
53
  commandId: string;
@@ -46,6 +57,7 @@ export interface ClusterRunCommandMessage {
46
57
  agentIndex: number;
47
58
  agentCount: number;
48
59
  targetScenarios: string[];
60
+ agentRunToken?: string;
49
61
  replySubject?: string;
50
62
  }
51
63
  export interface ClusterNodeStatsPayload {
@@ -91,8 +103,12 @@ export interface DistributedClusterDispatchResult {
91
103
  }
92
104
  export declare class DistributedClusterCoordinator {
93
105
  private readonly options;
106
+ /**
107
+ * Exposes the public constructor operation.
108
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
109
+ */
94
110
  constructor(options: DistributedClusterCoordinatorOptions);
95
- dispatch(assignments: string[][]): Promise<DistributedClusterDispatchResult>;
111
+ dispatch(assignments: string[][], buildAgentRunToken?: (command: ClusterRunCommandMessage) => Promise<string>): Promise<DistributedClusterDispatchResult>;
96
112
  private buildRunSubject;
97
113
  private buildReplySubject;
98
114
  private natsEndpoint;
@@ -107,6 +123,10 @@ export interface DistributedClusterAgentOptions {
107
123
  export declare class DistributedClusterAgent {
108
124
  private readonly options;
109
125
  private commandConsumer;
126
+ /**
127
+ * Exposes the public constructor operation.
128
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
129
+ */
110
130
  constructor(options: DistributedClusterAgentOptions);
111
131
  dispose(): Promise<void>;
112
132
  pollAndExecuteOnce(execute: (dispatch: ClusterScenarioDispatch) => Promise<ClusterNodeResult> | ClusterNodeResult): Promise<boolean>;
@@ -18,11 +18,31 @@ export declare class TrackingPayloadBuilder {
18
18
  JsonSettings?: Record<string, unknown>;
19
19
  JsonConvertSettings?: Record<string, unknown>;
20
20
  private body;
21
+ /**
22
+ * Exposes the public constructor operation.
23
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
24
+ */
21
25
  constructor();
22
26
  get Body(): Uint8Array;
27
+ /**
28
+ * Sets the payload body on the builder.
29
+ * Use this when a tracking payload should be created from raw content.
30
+ */
23
31
  setBody(body: string | Uint8Array): void;
32
+ /**
33
+ * Sets the payload body on the builder.
34
+ * Use this when a tracking payload should be created from raw content.
35
+ */
24
36
  SetBody(body: string | Uint8Array): void;
37
+ /**
38
+ * Builds the configured payload or helper object.
39
+ * Use this when all builder inputs are ready to be materialized.
40
+ */
25
41
  build(): TrackingPayload;
42
+ /**
43
+ * Builds the configured payload or helper object.
44
+ * Use this when all builder inputs are ready to be materialized.
45
+ */
26
46
  Build(): TrackingPayload;
27
47
  }
28
48
  export declare class RedisCorrelationStoreOptions {
@@ -32,17 +52,49 @@ export declare class RedisCorrelationStoreOptions {
32
52
  EntryTtlSeconds: number;
33
53
  get EntryTtl(): number;
34
54
  set EntryTtl(value: number);
55
+ /**
56
+ * Exposes the public validate operation.
57
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
58
+ */
35
59
  validate(): void;
60
+ /**
61
+ * Exposes the public Validate operation.
62
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
63
+ */
36
64
  Validate(): void;
37
65
  }
38
66
  export declare class CorrelationStoreConfiguration {
39
67
  Kind: CorrelationStoreKind;
40
68
  Redis?: RedisCorrelationStoreOptions;
69
+ /**
70
+ * Creates an in-memory correlation store configuration.
71
+ * Use this when tracking state can stay local to the process.
72
+ */
41
73
  static inMemory(): CorrelationStoreConfiguration;
74
+ /**
75
+ * Creates an in-memory correlation store configuration.
76
+ * Use this when tracking state can stay local to the process.
77
+ */
42
78
  static InMemory(): CorrelationStoreConfiguration;
79
+ /**
80
+ * Creates a Redis-backed correlation store configuration.
81
+ * Use this when tracking state must survive across processes or cluster nodes.
82
+ */
43
83
  static redisStore(options: RedisCorrelationStoreOptions): CorrelationStoreConfiguration;
84
+ /**
85
+ * Creates a Redis-backed correlation store configuration.
86
+ * Use this when tracking state must survive across processes or cluster nodes.
87
+ */
44
88
  static RedisStore(options: RedisCorrelationStoreOptions): CorrelationStoreConfiguration;
89
+ /**
90
+ * Exposes the public validate operation.
91
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
92
+ */
45
93
  validate(): void;
94
+ /**
95
+ * Exposes the public Validate operation.
96
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
97
+ */
46
98
  Validate(): void;
47
99
  }
48
100
  export interface CorrelationEntry {
@@ -93,15 +145,55 @@ export declare class InMemoryCorrelationStore implements CorrelationStore {
93
145
  private readonly pendingByEventId;
94
146
  private readonly sourceOccurrences;
95
147
  private readonly destinationOccurrences;
148
+ /**
149
+ * Sets the current gauge value.
150
+ * Use this when the latest observed value should replace the previous one.
151
+ */
96
152
  set(entry: CorrelationEntry): void;
153
+ /**
154
+ * Exposes the public get operation.
155
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
156
+ */
97
157
  get(trackingId: string): CorrelationEntry | null;
158
+ /**
159
+ * Exposes the public delete operation.
160
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
161
+ */
98
162
  delete(trackingId: string): void;
163
+ /**
164
+ * Exposes the public all operation.
165
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
166
+ */
99
167
  all(): CorrelationEntry[];
168
+ /**
169
+ * Exposes the public collectExpired operation.
170
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
171
+ */
100
172
  collectExpired(nowMs?: number, maxCount?: number): CorrelationEntry[];
173
+ /**
174
+ * Exposes the public incrementSourceOccurrences operation.
175
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
176
+ */
101
177
  incrementSourceOccurrences(trackingId: string): number;
178
+ /**
179
+ * Exposes the public incrementDestinationOccurrences operation.
180
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
181
+ */
102
182
  incrementDestinationOccurrences(trackingId: string): number;
183
+ /**
184
+ * Exposes the public registerSource operation.
185
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
186
+ */
103
187
  registerSource(trackingId: string, sourceTimestampUtc: number): CorrelationEntry;
188
+ /**
189
+ * Exposes the public tryMatchDestination operation.
190
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
191
+ */
104
192
  tryMatchDestination(trackingId: string, destinationTimestampUtc: number): CorrelationEntry | null;
193
+ /**
194
+ * Exposes the public tryExpire operation.
195
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
196
+ */
105
197
  tryExpire(eventId: string): boolean;
106
198
  }
107
199
  type RedisLikeCorrelationClient = {
@@ -156,9 +248,25 @@ export declare class RedisCorrelationStore implements CorrelationStore {
156
248
  export declare class TrackingFieldSelector {
157
249
  readonly kind: "header" | "json";
158
250
  readonly path: string;
251
+ /**
252
+ * Exposes the public constructor operation.
253
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
254
+ */
159
255
  constructor(location: TrackingFieldLocation | "header" | "json", path: string);
256
+ /**
257
+ * Parses a selector or configuration expression.
258
+ * Use this when a tracking selector should be created from its text form.
259
+ */
160
260
  static parse(value: string): TrackingFieldSelector;
261
+ /**
262
+ * Parses a selector or configuration expression.
263
+ * Use this when a tracking selector should be created from its text form.
264
+ */
161
265
  static Parse(value: string): TrackingFieldSelector;
266
+ /**
267
+ * Attempts to parse a selector or configuration expression.
268
+ * Use this when invalid input should be handled without throwing.
269
+ */
162
270
  static tryParse(value: string): {
163
271
  success: true;
164
272
  selector: TrackingFieldSelector;
@@ -166,6 +274,10 @@ export declare class TrackingFieldSelector {
166
274
  success: false;
167
275
  selector: null;
168
276
  };
277
+ /**
278
+ * Attempts to parse a selector or configuration expression.
279
+ * Use this when invalid input should be handled without throwing.
280
+ */
169
281
  static TryParse(value: string): {
170
282
  success: true;
171
283
  selector: TrackingFieldSelector;
@@ -175,8 +287,20 @@ export declare class TrackingFieldSelector {
175
287
  };
176
288
  get Location(): "Header" | "Json";
177
289
  get Path(): string;
290
+ /**
291
+ * Extracts a value from the provided payload.
292
+ * Use this when a tracking selector should read data from a transport payload.
293
+ */
178
294
  extract(payload: TrackingPayload): string | null;
295
+ /**
296
+ * Exposes the public toString operation.
297
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
298
+ */
179
299
  toString(): string;
300
+ /**
301
+ * Exposes the public ToString operation.
302
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
303
+ */
180
304
  ToString(): string;
181
305
  }
182
306
  export interface CorrelationRuntimePlugin {
@@ -226,6 +350,10 @@ export declare class CrossPlatformTrackingRuntime {
226
350
  private duplicateDestinationCount;
227
351
  private totalLatencyMs;
228
352
  private readonly gathered;
353
+ /**
354
+ * Exposes the public constructor operation.
355
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
356
+ */
229
357
  constructor(options: CorrelationRuntimeOptions);
230
358
  onSourceProduced(payload: TrackingPayload, nowMs?: number): Promise<string | null>;
231
359
  onSourceProducedDetailed(payload: TrackingPayload, nowMs?: number): Promise<SourceProduceResult>;
@@ -235,6 +363,10 @@ export declare class CrossPlatformTrackingRuntime {
235
363
  sweepTimeoutEntries(nowMs?: number, batchSize?: number): Promise<CorrelationEntry[]>;
236
364
  getStats(): Promise<CorrelationRuntimeStats>;
237
365
  private resolveGatherKey;
366
+ /**
367
+ * Exposes the public isTimeoutCountedAsFailure operation.
368
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
369
+ */
238
370
  isTimeoutCountedAsFailure(): boolean;
239
371
  private resolveTrackingIdDisplay;
240
372
  }
@@ -24,12 +24,18 @@ export declare class LoadStrikeLocalClient {
24
24
  private readonly licensingApiBaseUrl;
25
25
  private readonly licenseValidationTimeoutMs;
26
26
  private readonly signingKeyCache;
27
+ /**
28
+ * Exposes the public constructor operation.
29
+ * Use this when the surrounding wrapper type makes this operation the clearest way to express your intent.
30
+ */
27
31
  constructor(options?: LoadStrikeLocalClientOptions);
28
32
  run(request: LoadStrikeRunRequest): Promise<LoadStrikeRunResponse>;
29
33
  acquireLicenseLease(request: LoadStrikeRunRequest): Promise<LicenseValidationSession>;
30
34
  releaseLicenseLease(session: LicenseValidationSession, request: LoadStrikeRunRequest): Promise<void>;
31
35
  private validateLicenseIfRequired;
32
36
  private verifySignedRunToken;
37
+ createAgentExecutionToken(controllerRunToken: string, sessionId: string, commandId: string, agentIndex: number, agentCount: number, targetScenarios: string[]): Promise<string>;
38
+ private verifySignedAgentExecutionToken;
33
39
  private getSigningKey;
34
40
  private sendRunTokenHeartbeat;
35
41
  private stopLicenseLeaseIfRequired;
@@ -15,9 +15,21 @@ declare function buildDotnetGroupedCorrelationSummaryHtml(rows: ReportRecord[],
15
15
  declare function buildDotnetUngroupedCorrelationSummaryHtml(rows: ReportRecord[], groupedChartKey: string): string;
16
16
  declare function buildDotnetPluginHints(plugin: ReportRecord): string;
17
17
  declare function buildDotnetHtmlTabs(nodeStats: ReportRecord): ReportTab[];
18
+ /**
19
+ * Exposes the build dotnet txt report operation. Use this when interacting with the SDK through this surface.
20
+ */
18
21
  export declare function buildDotnetTxtReport(nodeStats: ReportRecord): string;
22
+ /**
23
+ * Exposes the build dotnet csv report operation. Use this when interacting with the SDK through this surface.
24
+ */
19
25
  export declare function buildDotnetCsvReport(nodeStats: ReportRecord): string;
26
+ /**
27
+ * Exposes the build dotnet markdown report operation. Use this when interacting with the SDK through this surface.
28
+ */
20
29
  export declare function buildDotnetMarkdownReport(nodeStats: ReportRecord): string;
30
+ /**
31
+ * Exposes the build dotnet html report operation. Use this when interacting with the SDK through this surface.
32
+ */
21
33
  export declare function buildDotnetHtmlReport(nodeStats: ReportRecord): string;
22
34
  export declare const __loadstrikeTestExports: {
23
35
  buildDotnetFailedResponseContent: typeof buildDotnetFailedResponseContent;