@loadstrike/loadstrike-sdk 1.0.20801 → 1.0.21301
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.
- package/README.md +9 -2
- package/dist/cjs/autopilot-contracts.js +11 -0
- package/dist/cjs/autopilot.js +717 -0
- package/dist/cjs/cluster.js +27 -2
- package/dist/cjs/correlation.js +132 -0
- package/dist/cjs/index.js +7 -2
- package/dist/cjs/local.js +116 -6
- package/dist/cjs/reporting.js +12 -0
- package/dist/cjs/runtime.js +966 -36
- package/dist/esm/autopilot-contracts.js +8 -0
- package/dist/esm/autopilot.js +709 -0
- package/dist/esm/cluster.js +27 -2
- package/dist/esm/correlation.js +132 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/local.js +116 -6
- package/dist/esm/reporting.js +12 -0
- package/dist/esm/runtime.js +966 -36
- package/dist/types/autopilot-contracts.d.ts +113 -0
- package/dist/types/autopilot.d.ts +43 -0
- package/dist/types/cluster.d.ts +21 -1
- package/dist/types/correlation.d.ts +132 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/local.d.ts +6 -0
- package/dist/types/reporting.d.ts +12 -0
- package/dist/types/runtime.d.ts +871 -0
- package/package.json +1 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type { LoadStrikeScenario } from "./runtime.js";
|
|
2
|
+
export interface LoadStrikeAutopilotRequest {
|
|
3
|
+
Kind: string;
|
|
4
|
+
FilePath?: string;
|
|
5
|
+
Content?: string;
|
|
6
|
+
SourceMessage?: LoadStrikeAutopilotMessageSample;
|
|
7
|
+
DestinationMessage?: LoadStrikeAutopilotMessageSample;
|
|
8
|
+
Options?: LoadStrikeAutopilotOptions;
|
|
9
|
+
}
|
|
10
|
+
export interface LoadStrikeAutopilotOptions {
|
|
11
|
+
ScenarioName?: string;
|
|
12
|
+
IncludePreviewReport?: boolean;
|
|
13
|
+
AllowedReplayHosts?: string[];
|
|
14
|
+
BaseUrlRewrite?: string;
|
|
15
|
+
TrackingSelector?: string;
|
|
16
|
+
SecretBindings?: LoadStrikeAutopilotSecretBinding[];
|
|
17
|
+
EndpointBindings?: LoadStrikeAutopilotEndpointBinding[];
|
|
18
|
+
}
|
|
19
|
+
export interface LoadStrikeAutopilotSecretBinding {
|
|
20
|
+
Location: string;
|
|
21
|
+
ValueFromEnv: string;
|
|
22
|
+
}
|
|
23
|
+
export interface LoadStrikeAutopilotEndpointBinding {
|
|
24
|
+
Name: string;
|
|
25
|
+
Kind?: string;
|
|
26
|
+
Method?: string;
|
|
27
|
+
Url?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface LoadStrikeAutopilotMessageSample {
|
|
30
|
+
name?: string;
|
|
31
|
+
Name?: string;
|
|
32
|
+
contentType?: string;
|
|
33
|
+
ContentType?: string;
|
|
34
|
+
headers?: Record<string, string>;
|
|
35
|
+
Headers?: Record<string, string>;
|
|
36
|
+
payload?: unknown;
|
|
37
|
+
Payload?: unknown;
|
|
38
|
+
transportMetadata?: Record<string, string>;
|
|
39
|
+
TransportMetadata?: Record<string, string>;
|
|
40
|
+
}
|
|
41
|
+
export interface LoadStrikeAutopilotPlan {
|
|
42
|
+
Version: string;
|
|
43
|
+
Scenario: LoadStrikeAutopilotScenarioPlan;
|
|
44
|
+
Endpoints: LoadStrikeAutopilotEndpoint[];
|
|
45
|
+
TrackingSelectorSuggestions: LoadStrikeAutopilotTrackingSelectorSuggestion[];
|
|
46
|
+
ThresholdSuggestions: LoadStrikeAutopilotThresholdSuggestion[];
|
|
47
|
+
Redactions: LoadStrikeAutopilotRedaction[];
|
|
48
|
+
Warnings: string[];
|
|
49
|
+
Confidence: number;
|
|
50
|
+
}
|
|
51
|
+
export interface LoadStrikeAutopilotScenarioPlan {
|
|
52
|
+
Name: string;
|
|
53
|
+
WithoutWarmUp: boolean;
|
|
54
|
+
LoadSimulationSuggestions: LoadStrikeAutopilotLoadSimulationSuggestion[];
|
|
55
|
+
}
|
|
56
|
+
export interface LoadStrikeAutopilotLoadSimulationSuggestion {
|
|
57
|
+
Kind: "IterationsForConstant";
|
|
58
|
+
Copies: number;
|
|
59
|
+
Iterations: number;
|
|
60
|
+
}
|
|
61
|
+
export interface LoadStrikeAutopilotThresholdSuggestion {
|
|
62
|
+
Kind: "AllFailCount" | "LatencyP95Ms" | "LatencyP99Ms";
|
|
63
|
+
Maximum: number;
|
|
64
|
+
}
|
|
65
|
+
export interface LoadStrikeAutopilotTrackingSelectorSuggestion {
|
|
66
|
+
Expression: string;
|
|
67
|
+
Confidence: number;
|
|
68
|
+
}
|
|
69
|
+
export interface LoadStrikeAutopilotEndpoint {
|
|
70
|
+
Kind: string;
|
|
71
|
+
Name: string;
|
|
72
|
+
Method?: string;
|
|
73
|
+
Url?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface LoadStrikeAutopilotRedaction {
|
|
76
|
+
Location: string;
|
|
77
|
+
Reason: string;
|
|
78
|
+
Replacement: "[REDACTED]";
|
|
79
|
+
}
|
|
80
|
+
export interface LoadStrikeAutopilotReadinessFailure {
|
|
81
|
+
Readiness: string;
|
|
82
|
+
Reason: string;
|
|
83
|
+
RequiredInput: string;
|
|
84
|
+
Locations: string[];
|
|
85
|
+
}
|
|
86
|
+
export interface LoadStrikeAutopilotPreviewReport {
|
|
87
|
+
ScenarioName: string;
|
|
88
|
+
Readiness: string;
|
|
89
|
+
Signals: string[];
|
|
90
|
+
Warnings: string[];
|
|
91
|
+
ReadinessFailures: LoadStrikeAutopilotReadinessFailure[];
|
|
92
|
+
Redactions: LoadStrikeAutopilotRedaction[];
|
|
93
|
+
}
|
|
94
|
+
export interface LoadStrikeAutopilotResultShape {
|
|
95
|
+
Readiness: string;
|
|
96
|
+
Plan: LoadStrikeAutopilotPlan;
|
|
97
|
+
Endpoints: LoadStrikeAutopilotEndpoint[];
|
|
98
|
+
Redactions: LoadStrikeAutopilotRedaction[];
|
|
99
|
+
Warnings: string[];
|
|
100
|
+
ReadinessFailures: LoadStrikeAutopilotReadinessFailure[];
|
|
101
|
+
PreviewReport?: LoadStrikeAutopilotPreviewReport;
|
|
102
|
+
ObservedLatencyMs?: number;
|
|
103
|
+
buildScenario(): LoadStrikeScenario;
|
|
104
|
+
BuildScenario(): LoadStrikeScenario;
|
|
105
|
+
}
|
|
106
|
+
export declare const LoadStrikeAutopilotReadiness: {
|
|
107
|
+
readonly Ready: "Ready";
|
|
108
|
+
readonly RequiresSecrets: "RequiresSecrets";
|
|
109
|
+
readonly RequiresEndpointBinding: "RequiresEndpointBinding";
|
|
110
|
+
readonly RequiresTargetBinding: "RequiresTargetBinding";
|
|
111
|
+
readonly RequiresTrackingSelector: "RequiresTrackingSelector";
|
|
112
|
+
readonly RequiresReview: "RequiresReview";
|
|
113
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LoadStrikeScenario } from "./runtime.js";
|
|
2
|
+
import { type LoadStrikeAutopilotEndpoint, type LoadStrikeAutopilotOptions, type LoadStrikeAutopilotPlan, type LoadStrikeAutopilotPreviewReport, type LoadStrikeAutopilotReadinessFailure, type LoadStrikeAutopilotRedaction, type LoadStrikeAutopilotRequest, type LoadStrikeAutopilotResultShape, type LoadStrikeAutopilotThresholdSuggestion, type LoadStrikeAutopilotTrackingSelectorSuggestion } from "./autopilot-contracts.js";
|
|
3
|
+
interface AutopilotHttpRequest {
|
|
4
|
+
method: string;
|
|
5
|
+
url: string;
|
|
6
|
+
headers: Record<string, string>;
|
|
7
|
+
body?: string;
|
|
8
|
+
contentType?: string;
|
|
9
|
+
}
|
|
10
|
+
interface BuildResultOptions {
|
|
11
|
+
readiness: string;
|
|
12
|
+
options: LoadStrikeAutopilotOptions;
|
|
13
|
+
endpoints: LoadStrikeAutopilotEndpoint[];
|
|
14
|
+
trackingSuggestions: LoadStrikeAutopilotTrackingSelectorSuggestion[];
|
|
15
|
+
thresholdSuggestions: LoadStrikeAutopilotThresholdSuggestion[];
|
|
16
|
+
redactions: LoadStrikeAutopilotRedaction[];
|
|
17
|
+
warnings: string[];
|
|
18
|
+
readinessFailures: LoadStrikeAutopilotReadinessFailure[];
|
|
19
|
+
httpRequest?: AutopilotHttpRequest;
|
|
20
|
+
observedLatencyMs?: number;
|
|
21
|
+
confidence: number;
|
|
22
|
+
}
|
|
23
|
+
export declare class LoadStrikeAutopilotResult implements LoadStrikeAutopilotResultShape {
|
|
24
|
+
#private;
|
|
25
|
+
readonly Readiness: string;
|
|
26
|
+
readonly Plan: LoadStrikeAutopilotPlan;
|
|
27
|
+
readonly Endpoints: LoadStrikeAutopilotEndpoint[];
|
|
28
|
+
readonly Redactions: LoadStrikeAutopilotRedaction[];
|
|
29
|
+
readonly Warnings: string[];
|
|
30
|
+
readonly ReadinessFailures: LoadStrikeAutopilotReadinessFailure[];
|
|
31
|
+
PreviewReport?: LoadStrikeAutopilotPreviewReport;
|
|
32
|
+
readonly ObservedLatencyMs?: number;
|
|
33
|
+
constructor(values: Omit<BuildResultOptions, "options" | "confidence" | "trackingSuggestions" | "thresholdSuggestions"> & {
|
|
34
|
+
plan: LoadStrikeAutopilotPlan;
|
|
35
|
+
});
|
|
36
|
+
buildScenario(): LoadStrikeScenario;
|
|
37
|
+
BuildScenario(): LoadStrikeScenario;
|
|
38
|
+
}
|
|
39
|
+
export declare class LoadStrikeAutopilot {
|
|
40
|
+
static generate(request: LoadStrikeAutopilotRequest): LoadStrikeAutopilotResult;
|
|
41
|
+
static Generate(request: LoadStrikeAutopilotRequest): LoadStrikeAutopilotResult;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
package/dist/types/cluster.d.ts
CHANGED
|
@@ -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
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export type { LoadStrikeDateValue, LoadStrikeObject, LoadStrikeRunContext as LoadStrikeContractRunContext, LoadStrikeScenarioSpec, LoadStrikeLoadSimulationSpec, LoadStrikeThresholdSpec, LoadStrikeTrackingConfigurationSpec, LoadStrikeCorrelationStoreSpec, LoadStrikeRedisCorrelationStoreSpec, LoadStrikeEndpointSpec, LoadStrikeHttpEndpointOptions, LoadStrikeHttpAuthOptions, LoadStrikeHttpOAuth2ClientCredentialsOptions, LoadStrikeKafkaEndpointOptions, LoadStrikeKafkaSaslOptions, LoadStrikeRabbitMqEndpointOptions, LoadStrikeNatsEndpointOptions, LoadStrikeRedisStreamsEndpointOptions, LoadStrikeAzureEventHubsEndpointOptions, LoadStrikeDelegateEndpointOptions, LoadStrikePushDiffusionEndpointOptions, LoadStrikeReportingSinkSpec, LoadStrikeInfluxDbSinkOptions, LoadStrikeTimescaleDbSinkOptions, LoadStrikeGrafanaLokiSinkOptions, LoadStrikeDatadogSinkOptions, LoadStrikeSplunkSinkOptions, LoadStrikeOtelCollectorSinkOptions, LoadStrikeWorkerPluginSpec, LoadStrikeRunRequest, LoadStrikeRunResponse, LoadStrikeNodeStatsDto, LoadStrikeNodeInfoDto, LoadStrikeTestInfoDto, LoadStrikeScenarioStatsDto, LoadStrikeStepStatsDto, LoadStrikeMeasurementStatsDto, LoadStrikeRequestStatsDto, LoadStrikeLatencyStatsDto, LoadStrikeDataTransferStatsDto, LoadStrikeStatusCodeStatsDto, LoadStrikeMetricStatsDto, LoadStrikeCounterStatsDto, LoadStrikeGaugeStatsDto, LoadStrikeThresholdResultDto, LoadStrikePluginDataDto, LoadStrikePluginDataTableDto, LoadStrikePayloadDto, LoadStrikeProducedMessageRequestDto, LoadStrikeProducedMessageResultDto, LoadStrikeConsumedMessageDto } from "./contracts.js";
|
|
2
|
+
export { LoadStrikeAutopilot, LoadStrikeAutopilotResult } from "./autopilot.js";
|
|
3
|
+
export type { LoadStrikeAutopilotEndpoint, LoadStrikeAutopilotEndpointBinding, LoadStrikeAutopilotLoadSimulationSuggestion, LoadStrikeAutopilotMessageSample, LoadStrikeAutopilotOptions, LoadStrikeAutopilotPlan, LoadStrikeAutopilotPreviewReport, LoadStrikeAutopilotReadinessFailure, LoadStrikeAutopilotRedaction, LoadStrikeAutopilotRequest, LoadStrikeAutopilotResultShape, LoadStrikeAutopilotScenarioPlan, LoadStrikeAutopilotSecretBinding, LoadStrikeAutopilotThresholdSuggestion, LoadStrikeAutopilotTrackingSelectorSuggestion } from "./autopilot-contracts.js";
|
|
4
|
+
export { LoadStrikeAutopilotReadiness } from "./autopilot-contracts.js";
|
|
2
5
|
export { CrossPlatformScenarioConfigurator, ScenarioTrackingExtensions, LoadStrikeContext, LoadStrikePluginData, LoadStrikePluginDataTable, LoadStrikeNodeType, LoadStrikeReportFormat, LoadStrikeResponse, LoadStrikeLogLevel, LoadStrikeScenarioOperation, LoadStrikeOperationType, LoadStrikeRunner, LoadStrikeScenario, LoadStrikeSimulation, LoadStrikeMetric, LoadStrikeCounter, LoadStrikeGauge, LoadStrikeStep, LoadStrikeThreshold } from "./runtime.js";
|
|
3
6
|
export type { ILoadStrikeReportingSink, ILoadStrikeWorkerPlugin, LoadStrikeRunResult, LoadStrikeReportingSink, LoadStrikeRuntimePolicy, LoadStrikeRunnerOptions, LoadStrikeRunContext as LoadStrikeRuntimeContext, LoadStrikeRunContext, 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, CrossPlatformTrackingConfiguration, LoadStrikeStepReply, LoadStrikeStepStats, LoadStrikeStepRuntime, LoadStrikeThresholdOptions, LoadStrikeRequestStats, LoadStrikeWorkerPlugin } from "./runtime.js";
|
|
4
7
|
export { CorrelationStoreConfiguration, CrossPlatformTrackingRuntime, InMemoryCorrelationStore, RedisCorrelationStoreOptions, RedisCorrelationStore, TrackingPayloadBuilder, TrackingFieldSelector } from "./correlation.js";
|
package/dist/types/local.d.ts
CHANGED
|
@@ -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;
|