@axonflow/sdk 6.2.0 → 7.0.0
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 +6 -1
- package/dist/cjs/client.d.ts +33 -0
- package/dist/cjs/client.d.ts.map +1 -1
- package/dist/cjs/client.js +108 -52
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/heartbeat.d.ts +115 -0
- package/dist/cjs/heartbeat.d.ts.map +1 -0
- package/dist/cjs/heartbeat.js +280 -0
- package/dist/cjs/heartbeat.js.map +1 -0
- package/dist/cjs/telemetry.d.ts +22 -3
- package/dist/cjs/telemetry.d.ts.map +1 -1
- package/dist/cjs/telemetry.js +73 -19
- package/dist/cjs/telemetry.js.map +1 -1
- package/dist/cjs/types/config.d.ts +2 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/client.d.ts +33 -0
- package/dist/esm/client.d.ts.map +1 -1
- package/dist/esm/client.js +109 -53
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/heartbeat.d.ts +115 -0
- package/dist/esm/heartbeat.d.ts.map +1 -0
- package/dist/esm/heartbeat.js +237 -0
- package/dist/esm/heartbeat.js.map +1 -0
- package/dist/esm/telemetry.d.ts +22 -3
- package/dist/esm/telemetry.d.ts.map +1 -1
- package/dist/esm/telemetry.js +72 -19
- package/dist/esm/telemetry.js.map +1 -1
- package/dist/esm/types/config.d.ts +2 -2
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +4 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 7-day delivered-heartbeat gate for AxonFlow TypeScript SDK telemetry.
|
|
3
|
+
*
|
|
4
|
+
* Implements the cross-SDK contract:
|
|
5
|
+
*
|
|
6
|
+
* AxonFlow emits at most one anonymous heartbeat per environment every
|
|
7
|
+
* 7 days during SDK activity.
|
|
8
|
+
*
|
|
9
|
+
* The gate is consulted at client construction and at every public HTTP
|
|
10
|
+
* request site (via `_preRequestHook`). Each gate run:
|
|
11
|
+
*
|
|
12
|
+
* 1. Re-evaluates `AXONFLOW_TELEMETRY=off` cheaply (lock-free) so a
|
|
13
|
+
* mid-process opt-out toggle takes effect immediately.
|
|
14
|
+
* 2. Checks an in-memory 1-hour cache to bound stat() syscall frequency
|
|
15
|
+
* on hot request paths.
|
|
16
|
+
* 3. Reads the stamp file mtime as the source of truth for last
|
|
17
|
+
* successful delivery across process restarts.
|
|
18
|
+
* 4. Sends the ping and writes the stamp ONLY on success — stamp-on-
|
|
19
|
+
* DELIVERY semantics. Failed POSTs leave the stamp unchanged so the
|
|
20
|
+
* next call after the 1-hour cache expires retries.
|
|
21
|
+
* 5. Coalesces concurrent callers via an in-flight Promise so a stampede
|
|
22
|
+
* across the boundary fires exactly one POST.
|
|
23
|
+
*
|
|
24
|
+
* Cross-platform stamp file location (no external deps):
|
|
25
|
+
*
|
|
26
|
+
* macOS: ~/Library/Caches/axonflow/typescript-telemetry-last-sent
|
|
27
|
+
* Linux: $XDG_CACHE_HOME/axonflow/... or ~/.cache/axonflow/...
|
|
28
|
+
* Windows: %LOCALAPPDATA%/axonflow/...
|
|
29
|
+
*
|
|
30
|
+
* If the cache dir cannot be resolved (e.g. AWS Lambda where HOME is
|
|
31
|
+
* unset and LOCALAPPDATA is absent), the stamp path is null and the SDK
|
|
32
|
+
* falls back to "one ping per process" — same as today's pre-heartbeat
|
|
33
|
+
* behavior. No regression for that runtime.
|
|
34
|
+
*/
|
|
35
|
+
/** 7 days in milliseconds. */
|
|
36
|
+
export declare const HEARTBEAT_INTERVAL_MS: number;
|
|
37
|
+
/** 1 hour in milliseconds — bounds how often we stat() the stamp file. */
|
|
38
|
+
export declare const HEARTBEAT_GUARD_INTERVAL_MS: number;
|
|
39
|
+
/**
|
|
40
|
+
* Resolve the OS-native stamp file path, or `null` if no user cache
|
|
41
|
+
* directory is available (Lambda etc.). Hand-rolled rather than via the
|
|
42
|
+
* `env-paths` package to keep the SDK dependency-free.
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveStampPath(): string | null;
|
|
45
|
+
/** Sentinel: pass to HeartbeatState to opt into the auto-resolved default. */
|
|
46
|
+
export declare const USE_DEFAULT_CACHE_DIR: unique symbol;
|
|
47
|
+
/**
|
|
48
|
+
* Mutable state for the delivered-heartbeat gate.
|
|
49
|
+
*
|
|
50
|
+
* Shared as a module-level singleton across all clients in the process so
|
|
51
|
+
* multiple AxonFlow instances coalesce onto a single ping. Single-threaded
|
|
52
|
+
* Node.js runtime means no mutex is needed; an in-flight Promise is enough
|
|
53
|
+
* to coalesce concurrent callers.
|
|
54
|
+
*
|
|
55
|
+
* `stampPath` semantics:
|
|
56
|
+
* - string — use this exact location (typically used in tests).
|
|
57
|
+
* - null — no persistence at all (Lambda / restricted env path).
|
|
58
|
+
* - default — auto-resolve via resolveStampPath().
|
|
59
|
+
*/
|
|
60
|
+
export declare class HeartbeatState {
|
|
61
|
+
lastCheckedMs: number | null;
|
|
62
|
+
inFlight: Promise<void> | null;
|
|
63
|
+
readonly stampPath: string | null;
|
|
64
|
+
constructor(stampPath?: string | null | typeof USE_DEFAULT_CACHE_DIR);
|
|
65
|
+
/**
|
|
66
|
+
* Returns the stamp file's mtime as wall-clock ms-since-epoch, or null
|
|
67
|
+
* if absent / unreadable / no path. Tolerant of every failure mode — a
|
|
68
|
+
* corrupted or missing stamp is treated as "never sent" so we re-attempt.
|
|
69
|
+
*/
|
|
70
|
+
readStampMtimeMs(): number | null;
|
|
71
|
+
/**
|
|
72
|
+
* Atomically write a fresh timestamp to the stamp file via tmp+rename so
|
|
73
|
+
* concurrent writers never observe torn state. Contents are advisory —
|
|
74
|
+
* the SDK uses mtime as the source of truth, never the contents.
|
|
75
|
+
* Errors are silently ignored — a failed write means the next process
|
|
76
|
+
* retries on schedule.
|
|
77
|
+
*/
|
|
78
|
+
writeStampAtomic(): Promise<void>;
|
|
79
|
+
}
|
|
80
|
+
export declare function getHeartbeatStateForTest(): HeartbeatState;
|
|
81
|
+
export declare function replaceHeartbeatStateForTest(stampPath: string | null | typeof USE_DEFAULT_CACHE_DIR): HeartbeatState;
|
|
82
|
+
/**
|
|
83
|
+
* Test helper: restore a previously-saved singleton.
|
|
84
|
+
*
|
|
85
|
+
* Pair with `replaceHeartbeatStateForTest`:
|
|
86
|
+
*
|
|
87
|
+
* const previous = replaceHeartbeatStateForTest(tempStamp);
|
|
88
|
+
* try { ... } finally { restoreHeartbeatStateForTest(previous); }
|
|
89
|
+
*/
|
|
90
|
+
export declare function restoreHeartbeatStateForTest(state: HeartbeatState): void;
|
|
91
|
+
/**
|
|
92
|
+
* Returns the in-flight heartbeat Promise, or `null` if no ping is in
|
|
93
|
+
* progress. Use this from short-lived processes (CLI scripts, Lambda
|
|
94
|
+
* boot) to await delivery before exit:
|
|
95
|
+
*
|
|
96
|
+
* const client = new AxonFlow(config);
|
|
97
|
+
* // ... do work ...
|
|
98
|
+
* await flushHeartbeat(); // ensures the boot ping landed
|
|
99
|
+
*
|
|
100
|
+
* Long-running services don't need to call this — the Node event loop
|
|
101
|
+
* keeps the process alive while the Promise is pending.
|
|
102
|
+
*/
|
|
103
|
+
export declare function flushHeartbeat(): Promise<void> | null;
|
|
104
|
+
/**
|
|
105
|
+
* Central gate for telemetry pings. Called from the AxonFlow constructor
|
|
106
|
+
* and from `_preRequestHook` on every public HTTP entry point.
|
|
107
|
+
*
|
|
108
|
+
* The `pingFn` callback returns a Promise<boolean> indicating delivery
|
|
109
|
+
* success. The stamp is written ONLY when this resolves to true,
|
|
110
|
+
* implementing the "stamp-on-delivery" contract.
|
|
111
|
+
*
|
|
112
|
+
* Never throws — heartbeat failures must not surface to the caller.
|
|
113
|
+
*/
|
|
114
|
+
export declare function maybeSendHeartbeat(isTelemetryEnabled: boolean, pingFn: () => Promise<boolean>): Promise<void>;
|
|
115
|
+
//# sourceMappingURL=heartbeat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3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|
|
|
1
|
+
/**
|
|
2
|
+
* 7-day delivered-heartbeat gate for AxonFlow TypeScript SDK telemetry.
|
|
3
|
+
*
|
|
4
|
+
* Implements the cross-SDK contract:
|
|
5
|
+
*
|
|
6
|
+
* AxonFlow emits at most one anonymous heartbeat per environment every
|
|
7
|
+
* 7 days during SDK activity.
|
|
8
|
+
*
|
|
9
|
+
* The gate is consulted at client construction and at every public HTTP
|
|
10
|
+
* request site (via `_preRequestHook`). Each gate run:
|
|
11
|
+
*
|
|
12
|
+
* 1. Re-evaluates `AXONFLOW_TELEMETRY=off` cheaply (lock-free) so a
|
|
13
|
+
* mid-process opt-out toggle takes effect immediately.
|
|
14
|
+
* 2. Checks an in-memory 1-hour cache to bound stat() syscall frequency
|
|
15
|
+
* on hot request paths.
|
|
16
|
+
* 3. Reads the stamp file mtime as the source of truth for last
|
|
17
|
+
* successful delivery across process restarts.
|
|
18
|
+
* 4. Sends the ping and writes the stamp ONLY on success — stamp-on-
|
|
19
|
+
* DELIVERY semantics. Failed POSTs leave the stamp unchanged so the
|
|
20
|
+
* next call after the 1-hour cache expires retries.
|
|
21
|
+
* 5. Coalesces concurrent callers via an in-flight Promise so a stampede
|
|
22
|
+
* across the boundary fires exactly one POST.
|
|
23
|
+
*
|
|
24
|
+
* Cross-platform stamp file location (no external deps):
|
|
25
|
+
*
|
|
26
|
+
* macOS: ~/Library/Caches/axonflow/typescript-telemetry-last-sent
|
|
27
|
+
* Linux: $XDG_CACHE_HOME/axonflow/... or ~/.cache/axonflow/...
|
|
28
|
+
* Windows: %LOCALAPPDATA%/axonflow/...
|
|
29
|
+
*
|
|
30
|
+
* If the cache dir cannot be resolved (e.g. AWS Lambda where HOME is
|
|
31
|
+
* unset and LOCALAPPDATA is absent), the stamp path is null and the SDK
|
|
32
|
+
* falls back to "one ping per process" — same as today's pre-heartbeat
|
|
33
|
+
* behavior. No regression for that runtime.
|
|
34
|
+
*/
|
|
35
|
+
import { promises as fsPromises, statSync } from 'fs';
|
|
36
|
+
import * as path from 'path';
|
|
37
|
+
/** 7 days in milliseconds. */
|
|
38
|
+
export const HEARTBEAT_INTERVAL_MS = 7 * 24 * 60 * 60 * 1000;
|
|
39
|
+
/** 1 hour in milliseconds — bounds how often we stat() the stamp file. */
|
|
40
|
+
export const HEARTBEAT_GUARD_INTERVAL_MS = 60 * 60 * 1000;
|
|
41
|
+
/**
|
|
42
|
+
* Resolve the OS-native stamp file path, or `null` if no user cache
|
|
43
|
+
* directory is available (Lambda etc.). Hand-rolled rather than via the
|
|
44
|
+
* `env-paths` package to keep the SDK dependency-free.
|
|
45
|
+
*/
|
|
46
|
+
export function resolveStampPath() {
|
|
47
|
+
const platform = process.platform;
|
|
48
|
+
if (platform === 'darwin') {
|
|
49
|
+
const home = process.env.HOME;
|
|
50
|
+
if (!home)
|
|
51
|
+
return null;
|
|
52
|
+
return path.join(home, 'Library', 'Caches', 'axonflow', 'typescript-telemetry-last-sent');
|
|
53
|
+
}
|
|
54
|
+
if (platform === 'win32') {
|
|
55
|
+
const local = process.env.LOCALAPPDATA;
|
|
56
|
+
if (!local)
|
|
57
|
+
return null;
|
|
58
|
+
return path.join(local, 'axonflow', 'typescript-telemetry-last-sent');
|
|
59
|
+
}
|
|
60
|
+
// Linux / *BSD / others — XDG.
|
|
61
|
+
const xdg = process.env.XDG_CACHE_HOME;
|
|
62
|
+
if (xdg) {
|
|
63
|
+
return path.join(xdg, 'axonflow', 'typescript-telemetry-last-sent');
|
|
64
|
+
}
|
|
65
|
+
const home = process.env.HOME;
|
|
66
|
+
if (!home)
|
|
67
|
+
return null;
|
|
68
|
+
return path.join(home, '.cache', 'axonflow', 'typescript-telemetry-last-sent');
|
|
69
|
+
}
|
|
70
|
+
/** Sentinel: pass to HeartbeatState to opt into the auto-resolved default. */
|
|
71
|
+
export const USE_DEFAULT_CACHE_DIR = Symbol('axonflow.heartbeat.useDefaultCacheDir');
|
|
72
|
+
/**
|
|
73
|
+
* Mutable state for the delivered-heartbeat gate.
|
|
74
|
+
*
|
|
75
|
+
* Shared as a module-level singleton across all clients in the process so
|
|
76
|
+
* multiple AxonFlow instances coalesce onto a single ping. Single-threaded
|
|
77
|
+
* Node.js runtime means no mutex is needed; an in-flight Promise is enough
|
|
78
|
+
* to coalesce concurrent callers.
|
|
79
|
+
*
|
|
80
|
+
* `stampPath` semantics:
|
|
81
|
+
* - string — use this exact location (typically used in tests).
|
|
82
|
+
* - null — no persistence at all (Lambda / restricted env path).
|
|
83
|
+
* - default — auto-resolve via resolveStampPath().
|
|
84
|
+
*/
|
|
85
|
+
export class HeartbeatState {
|
|
86
|
+
constructor(stampPath = USE_DEFAULT_CACHE_DIR) {
|
|
87
|
+
this.lastCheckedMs = null;
|
|
88
|
+
this.inFlight = null;
|
|
89
|
+
this.stampPath = stampPath === USE_DEFAULT_CACHE_DIR ? resolveStampPath() : stampPath;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Returns the stamp file's mtime as wall-clock ms-since-epoch, or null
|
|
93
|
+
* if absent / unreadable / no path. Tolerant of every failure mode — a
|
|
94
|
+
* corrupted or missing stamp is treated as "never sent" so we re-attempt.
|
|
95
|
+
*/
|
|
96
|
+
readStampMtimeMs() {
|
|
97
|
+
if (!this.stampPath)
|
|
98
|
+
return null;
|
|
99
|
+
try {
|
|
100
|
+
return statSync(this.stampPath).mtimeMs;
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Atomically write a fresh timestamp to the stamp file via tmp+rename so
|
|
108
|
+
* concurrent writers never observe torn state. Contents are advisory —
|
|
109
|
+
* the SDK uses mtime as the source of truth, never the contents.
|
|
110
|
+
* Errors are silently ignored — a failed write means the next process
|
|
111
|
+
* retries on schedule.
|
|
112
|
+
*/
|
|
113
|
+
async writeStampAtomic() {
|
|
114
|
+
if (!this.stampPath)
|
|
115
|
+
return;
|
|
116
|
+
const dir = path.dirname(this.stampPath);
|
|
117
|
+
try {
|
|
118
|
+
await fsPromises.mkdir(dir, { recursive: true });
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const tmpName = path.join(dir, `telemetry-last-sent-${process.pid}-${Date.now()}.tmp`);
|
|
124
|
+
try {
|
|
125
|
+
await fsPromises.writeFile(tmpName, `last_sent=${new Date().toISOString()}\n`, { flag: 'w' });
|
|
126
|
+
await fsPromises.rename(tmpName, this.stampPath);
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
// tmp+rename failure is non-fatal; clean up the orphaned tmp file
|
|
130
|
+
// if it was created.
|
|
131
|
+
try {
|
|
132
|
+
await fsPromises.unlink(tmpName);
|
|
133
|
+
}
|
|
134
|
+
catch {
|
|
135
|
+
/* nothing to clean up */
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
// Module-level singleton. Tests that need isolation override via
|
|
141
|
+
// `replaceHeartbeatStateForTest` and restore the previous state.
|
|
142
|
+
let _state = new HeartbeatState();
|
|
143
|
+
export function getHeartbeatStateForTest() {
|
|
144
|
+
return _state;
|
|
145
|
+
}
|
|
146
|
+
export function replaceHeartbeatStateForTest(stampPath) {
|
|
147
|
+
const previous = _state;
|
|
148
|
+
_state = new HeartbeatState(stampPath);
|
|
149
|
+
return previous;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Test helper: restore a previously-saved singleton.
|
|
153
|
+
*
|
|
154
|
+
* Pair with `replaceHeartbeatStateForTest`:
|
|
155
|
+
*
|
|
156
|
+
* const previous = replaceHeartbeatStateForTest(tempStamp);
|
|
157
|
+
* try { ... } finally { restoreHeartbeatStateForTest(previous); }
|
|
158
|
+
*/
|
|
159
|
+
export function restoreHeartbeatStateForTest(state) {
|
|
160
|
+
_state = state;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Returns the in-flight heartbeat Promise, or `null` if no ping is in
|
|
164
|
+
* progress. Use this from short-lived processes (CLI scripts, Lambda
|
|
165
|
+
* boot) to await delivery before exit:
|
|
166
|
+
*
|
|
167
|
+
* const client = new AxonFlow(config);
|
|
168
|
+
* // ... do work ...
|
|
169
|
+
* await flushHeartbeat(); // ensures the boot ping landed
|
|
170
|
+
*
|
|
171
|
+
* Long-running services don't need to call this — the Node event loop
|
|
172
|
+
* keeps the process alive while the Promise is pending.
|
|
173
|
+
*/
|
|
174
|
+
export function flushHeartbeat() {
|
|
175
|
+
return _state.inFlight;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Cheap opt-out check, re-evaluated on every gate run so a mid-process
|
|
179
|
+
* `process.env.AXONFLOW_TELEMETRY = 'off'` toggle takes effect immediately
|
|
180
|
+
* without restart.
|
|
181
|
+
*/
|
|
182
|
+
function isOptedOut() {
|
|
183
|
+
if (typeof process === 'undefined' || !process.env)
|
|
184
|
+
return false;
|
|
185
|
+
return process.env.AXONFLOW_TELEMETRY?.trim().toLowerCase() === 'off';
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Central gate for telemetry pings. Called from the AxonFlow constructor
|
|
189
|
+
* and from `_preRequestHook` on every public HTTP entry point.
|
|
190
|
+
*
|
|
191
|
+
* The `pingFn` callback returns a Promise<boolean> indicating delivery
|
|
192
|
+
* success. The stamp is written ONLY when this resolves to true,
|
|
193
|
+
* implementing the "stamp-on-delivery" contract.
|
|
194
|
+
*
|
|
195
|
+
* Never throws — heartbeat failures must not surface to the caller.
|
|
196
|
+
*/
|
|
197
|
+
export async function maybeSendHeartbeat(isTelemetryEnabled, pingFn) {
|
|
198
|
+
// 1. Cheap opt-out check (lock-free, re-evaluated every call).
|
|
199
|
+
if (isOptedOut())
|
|
200
|
+
return;
|
|
201
|
+
if (!isTelemetryEnabled)
|
|
202
|
+
return;
|
|
203
|
+
const h = _state;
|
|
204
|
+
// 2. In-flight Promise gate — coalesces concurrent callers in the
|
|
205
|
+
// single-threaded JS runtime. Awaiting it does not delay the caller
|
|
206
|
+
// because we don't await the returned Promise from public hot paths.
|
|
207
|
+
if (h.inFlight)
|
|
208
|
+
return;
|
|
209
|
+
const nowMs = Date.now();
|
|
210
|
+
// 3. In-memory 1-hour cache.
|
|
211
|
+
if (h.lastCheckedMs !== null && nowMs - h.lastCheckedMs < HEARTBEAT_GUARD_INTERVAL_MS) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
h.lastCheckedMs = nowMs;
|
|
215
|
+
// 4. Stamp file mtime gate.
|
|
216
|
+
const mtimeMs = h.readStampMtimeMs();
|
|
217
|
+
if (mtimeMs !== null && nowMs - mtimeMs < HEARTBEAT_INTERVAL_MS) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
// 5. Send + stamp-on-success. Stored as Promise on `inFlight` so any
|
|
221
|
+
// concurrent callers can fast-path out via the check above.
|
|
222
|
+
h.inFlight = (async () => {
|
|
223
|
+
try {
|
|
224
|
+
const ok = await pingFn();
|
|
225
|
+
if (ok) {
|
|
226
|
+
await h.writeStampAtomic();
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
catch {
|
|
230
|
+
// pingFn must never throw in practice, but defend anyway.
|
|
231
|
+
}
|
|
232
|
+
finally {
|
|
233
|
+
h.inFlight = null;
|
|
234
|
+
}
|
|
235
|
+
})();
|
|
236
|
+
}
|
|
237
|
+
//# sourceMappingURL=heartbeat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heartbeat.js","sourceRoot":"","sources":["../../src/heartbeat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACtD,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,8BAA8B;AAC9B,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,GAAG,E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E,OAAO;IAEvB,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAEzB,6BAA6B;IAC7B,IAAI,CAAC,CAAC,aAAa,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,aAAa,GAAG,2BAA2B,EAAE,CAAC;QACtF,OAAO;IACT,CAAC;IACD,CAAC,CAAC,aAAa,GAAG,KAAK,CAAC;IAExB,4BAA4B;IAC5B,MAAM,OAAO,GAAG,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACrC,IAAI,OAAO,KAAK,IAAI,IAAI,KAAK,GAAG,OAAO,GAAG,qBAAqB,EAAE,CAAC;QAChE,OAAO;IACT,CAAC;IAED,qEAAqE;IACrE,+DAA+D;IAC/D,CAAC,CAAC,QAAQ,GAAG,CAAC,KAAK,IAAI,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,MAAM,MAAM,EAAE,CAAC;YAC1B,IAAI,EAAE,EAAE,CAAC;gBACP,MAAM,CAAC,CAAC,gBAAgB,EAAE,CAAC;YAC7B,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,0DAA0D;QAC5D,CAAC;gBAAS,CAAC;YACT,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC;QACpB,CAAC;IACH,CAAC,CAAC,EAAE,CAAC;AACP,CAAC"}
|
package/dist/esm/telemetry.d.ts
CHANGED
|
@@ -37,10 +37,29 @@ export type EndpointType = 'localhost' | 'private_network' | 'remote' | 'unknown
|
|
|
37
37
|
*/
|
|
38
38
|
export declare function classifyEndpoint(url: string | null | undefined): EndpointType;
|
|
39
39
|
/**
|
|
40
|
-
* Send an anonymous telemetry ping
|
|
40
|
+
* Send an anonymous telemetry ping and return whether it landed.
|
|
41
41
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
42
|
+
* Returns `true` only when the POST received a 2xx response. Network
|
|
43
|
+
* failures, timeouts, and non-2xx responses all return `false`. Used by
|
|
44
|
+
* the heartbeat orchestrator (see `heartbeat.ts`) where the boolean
|
|
45
|
+
* drives stamp-on-DELIVERY semantics: only successful POSTs advance the
|
|
46
|
+
* stamp file.
|
|
47
|
+
*
|
|
48
|
+
* The caller is responsible for the gating decision — this function does
|
|
49
|
+
* NOT consult `AXONFLOW_TELEMETRY`, the stamp file, or any rate-limit
|
|
50
|
+
* state.
|
|
51
|
+
*/
|
|
52
|
+
export declare function sendTelemetryPingNow(options: {
|
|
53
|
+
mode: string;
|
|
54
|
+
endpoint: string;
|
|
55
|
+
debug?: boolean;
|
|
56
|
+
}): Promise<boolean>;
|
|
57
|
+
/**
|
|
58
|
+
* Send an anonymous telemetry ping on client initialization (compat shim).
|
|
59
|
+
*
|
|
60
|
+
* Kept for the existing test surface. Production code goes through
|
|
61
|
+
* `maybeSendHeartbeat` in heartbeat.ts instead. This shim performs the
|
|
62
|
+
* gating + fire-and-forget POST without consulting the 7-day stamp file.
|
|
44
63
|
*/
|
|
45
64
|
export declare function sendTelemetryPing(options: {
|
|
46
65
|
mode: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/telemetry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/telemetry.ts"],"names":[],"mappings":"AAuGA,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,aAAa,EAAE,YAAY,CAAC;IAC5B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,iBAAiB,GACjB,QAAQ,GACR,SAAS,GACT,gBAAgB,CAAC;AAErB;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,YAAY,CAuF7E;AAmCD;;;;;;;;;;;;GAYG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,OAAO,CAAC,OAAO,CAAC,CAsDnB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,IAAI,CAuFP"}
|
package/dist/esm/telemetry.js
CHANGED
|
@@ -47,28 +47,16 @@ function generateInstanceId() {
|
|
|
47
47
|
* Check whether telemetry is opted-out via environment variables.
|
|
48
48
|
*
|
|
49
49
|
* `AXONFLOW_TELEMETRY=off` is the canonical AxonFlow-specific opt-out.
|
|
50
|
-
* `DO_NOT_TRACK=1` is **deprecated** as an AxonFlow opt-out and will be
|
|
51
|
-
* removed after 2026-05-05 in the next major release — when it's the only
|
|
52
|
-
* thing disabling telemetry, a one-line warning is emitted so operators can
|
|
53
|
-
* migrate to `AXONFLOW_TELEMETRY=off`. If both are set, the caller has
|
|
54
|
-
* already migrated and no warning fires.
|
|
55
50
|
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
51
|
+
* `DO_NOT_TRACK` is intentionally NOT honored. It is commonly inherited from
|
|
52
|
+
* host tools and developer environments (CLIs like Codex and Claude Code
|
|
53
|
+
* inject it unconditionally), which makes it an unreliable expression of
|
|
54
|
+
* user intent for AxonFlow telemetry.
|
|
59
55
|
*/
|
|
60
56
|
function isOptedOut() {
|
|
61
57
|
if (typeof process === 'undefined' || !process.env) {
|
|
62
58
|
return false;
|
|
63
59
|
}
|
|
64
|
-
if (process.env.DO_NOT_TRACK?.trim() === '1') {
|
|
65
|
-
// Only warn when DO_NOT_TRACK is the active control. If AXONFLOW_TELEMETRY=off
|
|
66
|
-
// is also set, the caller has already migrated.
|
|
67
|
-
if (process.env.AXONFLOW_TELEMETRY?.trim().toLowerCase() !== 'off') {
|
|
68
|
-
console.warn('[AxonFlow] DO_NOT_TRACK=1 is deprecated as an AxonFlow telemetry opt-out and will be removed after 2026-05-05 in the next major release. Set AXONFLOW_TELEMETRY=off to opt out going forward. See https://docs.getaxonflow.com/docs/telemetry for details.');
|
|
69
|
-
}
|
|
70
|
-
return true;
|
|
71
|
-
}
|
|
72
60
|
if (process.env.AXONFLOW_TELEMETRY?.trim().toLowerCase() === 'off') {
|
|
73
61
|
return true;
|
|
74
62
|
}
|
|
@@ -240,10 +228,75 @@ function expandIPv6(addr) {
|
|
|
240
228
|
return full.map(h => h.padStart(4, '0')).join(':');
|
|
241
229
|
}
|
|
242
230
|
/**
|
|
243
|
-
* Send an anonymous telemetry ping
|
|
231
|
+
* Send an anonymous telemetry ping and return whether it landed.
|
|
232
|
+
*
|
|
233
|
+
* Returns `true` only when the POST received a 2xx response. Network
|
|
234
|
+
* failures, timeouts, and non-2xx responses all return `false`. Used by
|
|
235
|
+
* the heartbeat orchestrator (see `heartbeat.ts`) where the boolean
|
|
236
|
+
* drives stamp-on-DELIVERY semantics: only successful POSTs advance the
|
|
237
|
+
* stamp file.
|
|
238
|
+
*
|
|
239
|
+
* The caller is responsible for the gating decision — this function does
|
|
240
|
+
* NOT consult `AXONFLOW_TELEMETRY`, the stamp file, or any rate-limit
|
|
241
|
+
* state.
|
|
242
|
+
*/
|
|
243
|
+
export async function sendTelemetryPingNow(options) {
|
|
244
|
+
const checkpointUrl = resolveCheckpointUrl();
|
|
245
|
+
const payload = {
|
|
246
|
+
sdk: 'typescript',
|
|
247
|
+
sdk_version: VERSION,
|
|
248
|
+
platform_version: null,
|
|
249
|
+
os: typeof process !== 'undefined' ? process.platform : 'unknown',
|
|
250
|
+
arch: typeof process !== 'undefined' ? process.arch : 'unknown',
|
|
251
|
+
runtime_version: typeof process !== 'undefined' ? process.version.replace(/^v/, '') : 'unknown',
|
|
252
|
+
deployment_mode: options.mode,
|
|
253
|
+
endpoint_type: classifyEndpoint(options.endpoint),
|
|
254
|
+
features: [],
|
|
255
|
+
instance_id: generateInstanceId(),
|
|
256
|
+
};
|
|
257
|
+
try {
|
|
258
|
+
const deadline = Date.now() + TELEMETRY_TIMEOUT_MS;
|
|
259
|
+
try {
|
|
260
|
+
const healthBudget = Math.min(HEALTH_BUDGET_CAP_MS, Math.max(0, deadline - Date.now()));
|
|
261
|
+
if (options.endpoint && healthBudget > MIN_BUDGET_MS) {
|
|
262
|
+
payload.platform_version = await detectPlatformVersion(options.endpoint, healthBudget);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
catch {
|
|
266
|
+
/* platform_version remains null on failure */
|
|
267
|
+
}
|
|
268
|
+
if (options.debug) {
|
|
269
|
+
console.log('[AxonFlow] Sending telemetry ping', JSON.stringify(payload, null, 2));
|
|
270
|
+
}
|
|
271
|
+
const postBudget = Math.max(0, deadline - Date.now());
|
|
272
|
+
if (postBudget < MIN_BUDGET_MS) {
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
const controller = new AbortController();
|
|
276
|
+
const timeoutId = setTimeout(() => controller.abort(), postBudget);
|
|
277
|
+
try {
|
|
278
|
+
const response = await fetch(checkpointUrl, {
|
|
279
|
+
method: 'POST',
|
|
280
|
+
headers: { 'Content-Type': 'application/json' },
|
|
281
|
+
body: JSON.stringify(payload),
|
|
282
|
+
signal: controller.signal,
|
|
283
|
+
});
|
|
284
|
+
return response.ok;
|
|
285
|
+
}
|
|
286
|
+
finally {
|
|
287
|
+
clearTimeout(timeoutId);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
catch {
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Send an anonymous telemetry ping on client initialization (compat shim).
|
|
244
296
|
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
297
|
+
* Kept for the existing test surface. Production code goes through
|
|
298
|
+
* `maybeSendHeartbeat` in heartbeat.ts instead. This shim performs the
|
|
299
|
+
* gating + fire-and-forget POST without consulting the 7-day stamp file.
|
|
247
300
|
*/
|
|
248
301
|
export function sendTelemetryPing(options) {
|
|
249
302
|
// Check env-level opt-out first
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../src/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC;;GAEG;AACH,MAAM,sBAAsB,GAAG,4CAA4C,CAAC;AAE5E;;GAEG;AACH,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAElC;;;;;GAKG;AACH,MAAM,aAAa,GAAG,GAAG,CAAC;AAE1B;;;;GAIG;AACH,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAElC;;;;;GAKG;AACH,SAAS,kBAAkB;IACzB,IAAI,CAAC;QACH,+BAA+B;QAC/B,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU,EAAE,CAAC;YAC7E,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,2BAA2B;IAC7B,CAAC;IAED,+CAA+C;IAC/C,OAAO,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE;QACjE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;QACn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AAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,SAAS,CAAC,CAAC;IAElE,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,GAAG,QAAQ,SAAS,EAAE;YAC7C,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,UAAU,CAAC,MAAM;SAC1B,CAAC,CAAC;QACH,YAAY,CAAC,SAAS,CAAC,CAAC;QAExB,IAAI,CAAC,IAAI,CAAC,EAAE;YAAE,OAAO,IAAI,CAAC;QAE1B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAC/B,OAAO,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;IAChF,CAAC;IAAC,MAAM,CAAC;QACP,YAAY,CAAC,SAAS,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -75,8 +75,8 @@ export interface AxonFlowConfig {
|
|
|
75
75
|
* When undefined, defaults to ON for production mode and OFF for sandbox mode.
|
|
76
76
|
* Set explicitly to `true` or `false` to override the default.
|
|
77
77
|
*
|
|
78
|
-
* Telemetry can also be disabled globally via the
|
|
79
|
-
* AXONFLOW_TELEMETRY=off environment
|
|
78
|
+
* Telemetry can also be disabled globally via the
|
|
79
|
+
* `AXONFLOW_TELEMETRY=off` environment variable.
|
|
80
80
|
*/
|
|
81
81
|
telemetry?: boolean;
|
|
82
82
|
}
|
package/dist/esm/version.d.ts
CHANGED
package/dist/esm/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axonflow/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "AxonFlow SDK - Add invisible AI governance to your applications in 3 lines of code",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -81,6 +81,9 @@
|
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"openai": "^6.15.0"
|
|
83
83
|
},
|
|
84
|
+
"overrides": {
|
|
85
|
+
"fast-xml-parser": "^5.7.0"
|
|
86
|
+
},
|
|
84
87
|
"publishConfig": {
|
|
85
88
|
"access": "public",
|
|
86
89
|
"provenance": true
|