@lynxops/sdk 1.0.2
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 +470 -0
- package/dist/index.cjs +1371 -0
- package/dist/index.d.cts +601 -0
- package/dist/index.d.ts +601 -0
- package/dist/index.js +1339 -0
- package/package.json +56 -0
package/README.md
ADDED
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
# Lynx SDK
|
|
2
|
+
|
|
3
|
+
TypeScript SDK for tracing, debugging, and governing AI agent runs with Lynx.
|
|
4
|
+
|
|
5
|
+
Lynx records what happened during an agent run: user input, agent decisions,
|
|
6
|
+
LLM calls, tool calls, context loading, policy decisions, retries, errors, and
|
|
7
|
+
the final outcome. The SDK is designed for production services, so event
|
|
8
|
+
delivery failures do not stop your application by default.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pnpm add @lynxops/sdk
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @lynxops/sdk
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
yarn add @lynxops/sdk
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import { LynxTracer } from "@lynxops/sdk";
|
|
28
|
+
|
|
29
|
+
const lynx = new LynxTracer({
|
|
30
|
+
clientId: "support-api",
|
|
31
|
+
apiKey: process.env.LYNX_API_KEY,
|
|
32
|
+
workspaceId: process.env.LYNX_WORKSPACE_ID,
|
|
33
|
+
environment: "production",
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
await lynx.run("SupportAgent", async () => {
|
|
37
|
+
lynx.userInput("I want a refund", { userId: "usr_123" });
|
|
38
|
+
lynx.setAttributes({ orderId: "order_123" });
|
|
39
|
+
|
|
40
|
+
lynx.context("refund-policy", {
|
|
41
|
+
refundWindowDays: 30,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
lynx.decision({
|
|
45
|
+
name: "select_refund_workflow",
|
|
46
|
+
selected: "refund",
|
|
47
|
+
confidence: 0.82,
|
|
48
|
+
reason: "Order is inside the refund window",
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
lynx.outcome({
|
|
52
|
+
status: "COMPLETED",
|
|
53
|
+
businessStatus: "SUCCEEDED",
|
|
54
|
+
reason: "Refund request was accepted",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
By default, events are sent to:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
https://api.lynxops.co
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Use `endpoint` or `LYNX_ENDPOINT` for local development or self-hosted
|
|
66
|
+
deployments.
|
|
67
|
+
|
|
68
|
+
## Default Instance
|
|
69
|
+
|
|
70
|
+
The SDK exports a default `lynx` instance configured from environment
|
|
71
|
+
variables.
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
import { lynx } from "@lynxops/sdk";
|
|
75
|
+
|
|
76
|
+
await lynx.run("ResearchAgent", async () => {
|
|
77
|
+
lynx.userInput("Find the latest invoice policy");
|
|
78
|
+
lynx.decision("search internal docs first");
|
|
79
|
+
});
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
LYNX_CLIENT_ID=support-api
|
|
84
|
+
LYNX_API_KEY=lynx_sk_...
|
|
85
|
+
LYNX_WORKSPACE_ID=...
|
|
86
|
+
LYNX_ENVIRONMENT=production
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Production Delivery Model
|
|
90
|
+
|
|
91
|
+
The SDK prioritizes your application over event delivery.
|
|
92
|
+
|
|
93
|
+
Production-oriented defaults:
|
|
94
|
+
|
|
95
|
+
| Option | Default |
|
|
96
|
+
| --- | --- |
|
|
97
|
+
| `endpoint` | `https://api.lynxops.co` |
|
|
98
|
+
| `delivery.mode` | `BACKGROUND` |
|
|
99
|
+
| `delivery.timeoutMs` | `1000` |
|
|
100
|
+
| `delivery.flushOnRunEnd` | `false` |
|
|
101
|
+
| `delivery.flushIntervalMs` | `3000` |
|
|
102
|
+
| `delivery.batchSize` | `50` |
|
|
103
|
+
| `delivery.maxQueueSize` | `1000` |
|
|
104
|
+
| `delivery.overflowStrategy` | `DROP_OLDEST` |
|
|
105
|
+
| `circuitBreaker.enabled` | `true` |
|
|
106
|
+
| `circuitBreaker.failureThreshold` | `3` |
|
|
107
|
+
| `circuitBreaker.cooldownMs` | `30000` |
|
|
108
|
+
|
|
109
|
+
Recommended production configuration:
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
const lynx = new LynxTracer({
|
|
113
|
+
clientId: "support-api",
|
|
114
|
+
apiKey: process.env.LYNX_API_KEY,
|
|
115
|
+
workspaceId: process.env.LYNX_WORKSPACE_ID,
|
|
116
|
+
|
|
117
|
+
delivery: {
|
|
118
|
+
mode: "BACKGROUND",
|
|
119
|
+
timeoutMs: 1000,
|
|
120
|
+
flushOnRunEnd: false,
|
|
121
|
+
flushIntervalMs: 5000,
|
|
122
|
+
batchSize: 50,
|
|
123
|
+
maxQueueSize: 10_000,
|
|
124
|
+
overflowStrategy: "DROP_OLDEST",
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
circuitBreaker: {
|
|
128
|
+
enabled: true,
|
|
129
|
+
failureThreshold: 3,
|
|
130
|
+
cooldownMs: 30_000,
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
If the Lynx API is unavailable, the SDK:
|
|
136
|
+
|
|
137
|
+
- catches network, timeout, and non-2xx delivery errors
|
|
138
|
+
- queues events in memory
|
|
139
|
+
- retries with backoff
|
|
140
|
+
- opens a circuit breaker after repeated failures
|
|
141
|
+
- drops events according to the configured overflow strategy when the queue is
|
|
142
|
+
full
|
|
143
|
+
|
|
144
|
+
With the default background delivery mode, `run()` does not wait for event
|
|
145
|
+
HTTP requests.
|
|
146
|
+
|
|
147
|
+
## Capturing Agent Runs
|
|
148
|
+
|
|
149
|
+
Use `run()` as the unit of work for one agent execution.
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
await lynx.run(
|
|
153
|
+
"InvoiceAgent",
|
|
154
|
+
async () => {
|
|
155
|
+
lynx.userInput("Can this invoice be paid?");
|
|
156
|
+
lynx.decision("verify vendor and payment policy");
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
workspaceId: "workspace_123",
|
|
160
|
+
agentId: "agent_invoice",
|
|
161
|
+
sessionId: "session_456",
|
|
162
|
+
},
|
|
163
|
+
);
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Useful identifiers:
|
|
167
|
+
|
|
168
|
+
| Field | Purpose |
|
|
169
|
+
| --- | --- |
|
|
170
|
+
| `runId` | Unique execution id for one agent run. Generated automatically unless provided. |
|
|
171
|
+
| `sessionId` | Groups multiple runs or events into a user-visible session. |
|
|
172
|
+
| `workspaceId` | Tenant boundary for Lynx ingestion and dashboards. |
|
|
173
|
+
| `agentId` | Stable agent identifier. |
|
|
174
|
+
| `agentName` | Human-readable agent name shown in debugging views. |
|
|
175
|
+
| `environment` | Runtime environment such as `production`, `staging`, or `local`. |
|
|
176
|
+
| `appVersion` | Application release metadata. |
|
|
177
|
+
| `deploymentId` | Deployment metadata for incident correlation. |
|
|
178
|
+
| `promptVersion` | Prompt version metadata attached to LLM and reasoning events. |
|
|
179
|
+
| `policyVersion` | Guardrail or policy version metadata. |
|
|
180
|
+
|
|
181
|
+
## Semantic Events
|
|
182
|
+
|
|
183
|
+
Prefer semantic helpers over raw event logging. They make Lynx debugging views
|
|
184
|
+
more useful.
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
lynx.userInput("Book a flight to Seoul", { userId: "usr_123" });
|
|
188
|
+
|
|
189
|
+
lynx.context("calendar-availability", {
|
|
190
|
+
daysLoaded: 14,
|
|
191
|
+
source: "calendar-api",
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
lynx.decision({
|
|
195
|
+
name: "choose_booking_tool",
|
|
196
|
+
selected: "flight_search",
|
|
197
|
+
alternatives: ["email_assistant", "manual_handoff"],
|
|
198
|
+
confidence: 0.76,
|
|
199
|
+
reason: "The user requested a travel booking action",
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
lynx.log("tool.timeout", {
|
|
203
|
+
error: "Travel API timed out",
|
|
204
|
+
toolName: "travel.search",
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
lynx.outcome({
|
|
208
|
+
status: "FAILED",
|
|
209
|
+
businessStatus: "FAILED",
|
|
210
|
+
reason: "The external travel API timed out",
|
|
211
|
+
userImpact: "MEDIUM",
|
|
212
|
+
});
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Record LLM calls
|
|
216
|
+
|
|
217
|
+
Use `instrumentLLM()` to wrap a model client. The returned proxy preserves the
|
|
218
|
+
original client shape while recording supported model calls.
|
|
219
|
+
|
|
220
|
+
```ts
|
|
221
|
+
const instrumentedClient = lynx.instrumentLLM(client, {
|
|
222
|
+
modelLabel: "openai.gpt-4.1-mini",
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
await lynx.run("SupportAgent", async () => {
|
|
226
|
+
await instrumentedClient.responses.create({
|
|
227
|
+
model: "gpt-4.1-mini",
|
|
228
|
+
input: "Summarize this support ticket",
|
|
229
|
+
metadata: {
|
|
230
|
+
promptVersion: "support-summary-v3",
|
|
231
|
+
},
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Record tool calls
|
|
237
|
+
|
|
238
|
+
Use `instrumentTool()` to wrap a reusable tool function.
|
|
239
|
+
|
|
240
|
+
```ts
|
|
241
|
+
const postSlackMessage = lynx.instrumentTool(
|
|
242
|
+
"slack.postMessage",
|
|
243
|
+
async (input: { channel: string; text: string }) => {
|
|
244
|
+
return await slack.chat.postMessage(input);
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
sideEffect: true,
|
|
248
|
+
riskLevel: "MEDIUM",
|
|
249
|
+
externalTarget: "slack",
|
|
250
|
+
},
|
|
251
|
+
);
|
|
252
|
+
|
|
253
|
+
await postSlackMessage({
|
|
254
|
+
channel: "C123",
|
|
255
|
+
text: "Refund approved",
|
|
256
|
+
});
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## Local Guardrails
|
|
260
|
+
|
|
261
|
+
`guardTool()` evaluates your policy locally before a tool runs. Lynx server
|
|
262
|
+
availability does not decide whether the tool is blocked.
|
|
263
|
+
|
|
264
|
+
```ts
|
|
265
|
+
import { LynxPolicyError } from "@lynxops/sdk";
|
|
266
|
+
|
|
267
|
+
const refund = lynx.guardTool(
|
|
268
|
+
"refund.create",
|
|
269
|
+
async ({ amount }: { amount: number }) => {
|
|
270
|
+
return { refunded: amount };
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
sideEffect: true,
|
|
274
|
+
riskLevel: "HIGH",
|
|
275
|
+
failureMode: "FAIL_CLOSED",
|
|
276
|
+
beforeCall: ({ input }) => {
|
|
277
|
+
if (input.amount > 100) {
|
|
278
|
+
return {
|
|
279
|
+
action: "BLOCK",
|
|
280
|
+
policyId: "refund-limit",
|
|
281
|
+
reason: "Refund amount is over the approved limit",
|
|
282
|
+
severity: "HIGH",
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
return {
|
|
287
|
+
action: "ALLOW",
|
|
288
|
+
policyId: "refund-limit",
|
|
289
|
+
};
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
);
|
|
293
|
+
|
|
294
|
+
try {
|
|
295
|
+
await lynx.run("SupportAgent", () => refund({ amount: 500 }));
|
|
296
|
+
} catch (error) {
|
|
297
|
+
if (error instanceof LynxPolicyError) {
|
|
298
|
+
console.log(error.action, error.policyId, error.reason);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Policy behavior:
|
|
304
|
+
|
|
305
|
+
| Policy result | Behavior |
|
|
306
|
+
| --- | --- |
|
|
307
|
+
| `ALLOW` | Runs the tool and records policy evaluation metadata. |
|
|
308
|
+
| `WARN` | Runs the tool and records a warning. |
|
|
309
|
+
| `BLOCK` | Blocks the tool and throws `LynxPolicyError`. |
|
|
310
|
+
| `REQUIRE_APPROVAL` | Blocks the tool and throws `LynxPolicyError`. |
|
|
311
|
+
|
|
312
|
+
If policy evaluation itself throws, `failureMode` decides the fallback:
|
|
313
|
+
|
|
314
|
+
| Failure mode | Behavior |
|
|
315
|
+
| --- | --- |
|
|
316
|
+
| `FAIL_OPEN` | Allows the tool call and records the policy error. |
|
|
317
|
+
| `FAIL_CLOSED` | Blocks the tool call. |
|
|
318
|
+
| `REQUIRE_APPROVAL` | Blocks with `action: "REQUIRE_APPROVAL"`. |
|
|
319
|
+
|
|
320
|
+
## Capture Modes
|
|
321
|
+
|
|
322
|
+
Lynx does not require you to store full payloads.
|
|
323
|
+
|
|
324
|
+
| Mode | Behavior |
|
|
325
|
+
| --- | --- |
|
|
326
|
+
| `full` | Captures input and output payloads according to `captureInput` and `captureOutput`. |
|
|
327
|
+
| `metadata-only` | Keeps structure, timing, token usage, cost, status, errors, tool names, and trace metadata without raw content. |
|
|
328
|
+
| `smart` | Captures metadata for normal events and preserves richer detail for failures, policy violations, and abnormal latency. |
|
|
329
|
+
|
|
330
|
+
```ts
|
|
331
|
+
const lynx = new LynxTracer({
|
|
332
|
+
clientId: "support-api",
|
|
333
|
+
apiKey: process.env.LYNX_API_KEY,
|
|
334
|
+
captureMode: "smart",
|
|
335
|
+
maxPayloadLength: 16_000,
|
|
336
|
+
});
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
## Flush, Shutdown, and Health
|
|
340
|
+
|
|
341
|
+
Use `flush()` to send the current queue while keeping the SDK active.
|
|
342
|
+
|
|
343
|
+
```ts
|
|
344
|
+
await lynx.flush();
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
Use `shutdown()` when the process is about to exit, in serverless handlers, or
|
|
348
|
+
in tests.
|
|
349
|
+
|
|
350
|
+
```ts
|
|
351
|
+
await lynx.shutdown({ timeoutMs: 1000 });
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
Use `getStatus()` for local diagnostics.
|
|
355
|
+
|
|
356
|
+
```ts
|
|
357
|
+
const status = lynx.getStatus();
|
|
358
|
+
|
|
359
|
+
console.log({
|
|
360
|
+
queueSize: status.queueSize,
|
|
361
|
+
droppedEvents: status.droppedEvents,
|
|
362
|
+
circuitState: status.circuitState,
|
|
363
|
+
pendingTransmissions: status.pendingTransmissions,
|
|
364
|
+
});
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
## Configuration Reference
|
|
368
|
+
|
|
369
|
+
```ts
|
|
370
|
+
const lynx = new LynxTracer({
|
|
371
|
+
clientId: "support-api",
|
|
372
|
+
endpoint: "https://api.lynxops.co",
|
|
373
|
+
workspaceId: "workspace_123",
|
|
374
|
+
agentId: "agent_support",
|
|
375
|
+
apiKey: process.env.LYNX_API_KEY,
|
|
376
|
+
appVersion: "2026.06.29",
|
|
377
|
+
deploymentId: "deploy_123",
|
|
378
|
+
environment: "production",
|
|
379
|
+
policyVersion: "policy_2026_06",
|
|
380
|
+
sampleRate: 1,
|
|
381
|
+
captureInput: true,
|
|
382
|
+
captureOutput: true,
|
|
383
|
+
captureMode: "smart",
|
|
384
|
+
maxPayloadLength: 16_000,
|
|
385
|
+
delivery: {
|
|
386
|
+
mode: "BACKGROUND",
|
|
387
|
+
timeoutMs: 1000,
|
|
388
|
+
flushOnRunEnd: false,
|
|
389
|
+
flushIntervalMs: 3000,
|
|
390
|
+
batchSize: 50,
|
|
391
|
+
maxQueueSize: 1000,
|
|
392
|
+
overflowStrategy: "DROP_OLDEST",
|
|
393
|
+
},
|
|
394
|
+
circuitBreaker: {
|
|
395
|
+
enabled: true,
|
|
396
|
+
failureThreshold: 3,
|
|
397
|
+
cooldownMs: 30_000,
|
|
398
|
+
},
|
|
399
|
+
});
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
| Option | Description |
|
|
403
|
+
| --- | --- |
|
|
404
|
+
| `clientId` | Required service or client identifier. |
|
|
405
|
+
| `endpoint` | Lynx API endpoint. Defaults to `https://api.lynxops.co`. |
|
|
406
|
+
| `workspaceId` | Default workspace id attached to events. |
|
|
407
|
+
| `agentId` | Default agent id attached to events. |
|
|
408
|
+
| `apiKey` | Lynx ingestion API key. Sent as a bearer token. |
|
|
409
|
+
| `appVersion` | Application version metadata. |
|
|
410
|
+
| `deploymentId` | Deployment id metadata. |
|
|
411
|
+
| `environment` | Runtime environment metadata. |
|
|
412
|
+
| `policyVersion` | Default policy version metadata. |
|
|
413
|
+
| `sampleRate` | Trace sampling ratio from `0` to `1`. |
|
|
414
|
+
| `captureInput` | Whether input payloads can be captured. |
|
|
415
|
+
| `captureOutput` | Whether output payloads can be captured. |
|
|
416
|
+
| `captureMode` | `full`, `metadata-only`, or `smart`. |
|
|
417
|
+
| `maxPayloadLength` | Maximum serialized payload length per event. |
|
|
418
|
+
| `delivery.mode` | `BACKGROUND` or `BLOCKING`. |
|
|
419
|
+
| `delivery.timeoutMs` | Timeout for one event delivery request. |
|
|
420
|
+
| `delivery.flushOnRunEnd` | Whether `run()` tries to flush after the wrapped work finishes. |
|
|
421
|
+
| `delivery.flushIntervalMs` | Background flush interval. |
|
|
422
|
+
| `delivery.batchSize` | Batch size for delivery. |
|
|
423
|
+
| `delivery.maxQueueSize` | Maximum queued events in memory. |
|
|
424
|
+
| `delivery.overflowStrategy` | `DROP_OLDEST` or `DROP_NEWEST`. |
|
|
425
|
+
| `circuitBreaker.enabled` | Enables delivery circuit breaker protection. |
|
|
426
|
+
| `circuitBreaker.failureThreshold` | Consecutive delivery failures before opening the breaker. |
|
|
427
|
+
| `circuitBreaker.cooldownMs` | Cooldown before retrying after the breaker opens. |
|
|
428
|
+
|
|
429
|
+
## Environment Variables
|
|
430
|
+
|
|
431
|
+
The default `lynx` export reads these variables:
|
|
432
|
+
|
|
433
|
+
| Variable | Description |
|
|
434
|
+
| --- | --- |
|
|
435
|
+
| `LYNX_CLIENT_ID` | Client or service identifier. Defaults to `local_dev_env`. |
|
|
436
|
+
| `LYNX_ENDPOINT` | Optional Lynx API endpoint override. |
|
|
437
|
+
| `LYNX_API_KEY` | Lynx ingestion API key. |
|
|
438
|
+
| `LYNX_WORKSPACE_ID` | Default workspace id. |
|
|
439
|
+
| `LYNX_AGENT_ID` | Default agent id. |
|
|
440
|
+
| `LYNX_SESSION_ID` | Default session id when `run()` does not receive one. |
|
|
441
|
+
| `LYNX_SAMPLE_RATE` | Sampling rate from `0` to `1`. |
|
|
442
|
+
| `LYNX_CAPTURE_INPUT` | `true` or `false`. |
|
|
443
|
+
| `LYNX_CAPTURE_OUTPUT` | `true` or `false`. |
|
|
444
|
+
| `LYNX_CAPTURE_MODE` | `full`, `metadata-only`, or `smart`. |
|
|
445
|
+
| `LYNX_MAX_PAYLOAD_LENGTH` | Maximum payload string length. |
|
|
446
|
+
| `LYNX_APP_VERSION` | Application version metadata. |
|
|
447
|
+
| `LYNX_DEPLOYMENT_ID` | Deployment id metadata. |
|
|
448
|
+
| `LYNX_ENVIRONMENT` | Runtime environment metadata. Falls back to `NODE_ENV`. |
|
|
449
|
+
| `LYNX_POLICY_VERSION` | Default policy version metadata. |
|
|
450
|
+
| `LYNX_DELIVERY_MODE` | `BACKGROUND` or `BLOCKING`. |
|
|
451
|
+
| `LYNX_DELIVERY_TIMEOUT_MS` | Delivery timeout in milliseconds. |
|
|
452
|
+
| `LYNX_DELIVERY_FLUSH_ON_RUN_END` | `true` or `false`. |
|
|
453
|
+
| `LYNX_DELIVERY_FLUSH_INTERVAL_MS` | Flush interval in milliseconds. |
|
|
454
|
+
| `LYNX_DELIVERY_BATCH_SIZE` | Batch size. |
|
|
455
|
+
| `LYNX_DELIVERY_MAX_QUEUE_SIZE` | Maximum queued event count. |
|
|
456
|
+
| `LYNX_DELIVERY_OVERFLOW_STRATEGY` | `DROP_OLDEST` or `DROP_NEWEST`. |
|
|
457
|
+
| `LYNX_CIRCUIT_BREAKER_ENABLED` | `true` or `false`. |
|
|
458
|
+
| `LYNX_CIRCUIT_BREAKER_FAILURE_THRESHOLD` | Consecutive failure count before opening the breaker. |
|
|
459
|
+
| `LYNX_CIRCUIT_BREAKER_COOLDOWN_MS` | Circuit breaker cooldown in milliseconds. |
|
|
460
|
+
|
|
461
|
+
## Development
|
|
462
|
+
|
|
463
|
+
```bash
|
|
464
|
+
pnpm install
|
|
465
|
+
pnpm build
|
|
466
|
+
pnpm test
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
The SDK is ESM-first and also publishes a CommonJS build through package
|
|
470
|
+
exports.
|