@axonflow/sdk 9.1.0 → 9.3.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.
Files changed (76) hide show
  1. package/README.md +238 -22
  2. package/dist/cjs/adapters/langgraph.d.ts.map +1 -1
  3. package/dist/cjs/adapters/langgraph.js +20 -0
  4. package/dist/cjs/adapters/langgraph.js.map +1 -1
  5. package/dist/cjs/authzen.d.ts +353 -0
  6. package/dist/cjs/authzen.d.ts.map +1 -0
  7. package/dist/cjs/authzen.js +901 -0
  8. package/dist/cjs/authzen.js.map +1 -0
  9. package/dist/cjs/client.d.ts +135 -9
  10. package/dist/cjs/client.d.ts.map +1 -1
  11. package/dist/cjs/client.js +397 -30
  12. package/dist/cjs/client.js.map +1 -1
  13. package/dist/cjs/heartbeat.d.ts +55 -4
  14. package/dist/cjs/heartbeat.d.ts.map +1 -1
  15. package/dist/cjs/heartbeat.js +86 -7
  16. package/dist/cjs/heartbeat.js.map +1 -1
  17. package/dist/cjs/index.d.ts +6 -0
  18. package/dist/cjs/index.d.ts.map +1 -1
  19. package/dist/cjs/index.js +55 -1
  20. package/dist/cjs/index.js.map +1 -1
  21. package/dist/cjs/read-identity.d.ts +267 -0
  22. package/dist/cjs/read-identity.d.ts.map +1 -0
  23. package/dist/cjs/read-identity.js +329 -0
  24. package/dist/cjs/read-identity.js.map +1 -0
  25. package/dist/cjs/telemetry.d.ts +176 -13
  26. package/dist/cjs/telemetry.d.ts.map +1 -1
  27. package/dist/cjs/telemetry.js +403 -37
  28. package/dist/cjs/telemetry.js.map +1 -1
  29. package/dist/cjs/types/authzen.gen.d.ts +407 -0
  30. package/dist/cjs/types/authzen.gen.d.ts.map +1 -0
  31. package/dist/cjs/types/authzen.gen.js +804 -0
  32. package/dist/cjs/types/authzen.gen.js.map +1 -0
  33. package/dist/cjs/types/config.d.ts +43 -1
  34. package/dist/cjs/types/config.d.ts.map +1 -1
  35. package/dist/cjs/types/hitl.js +1 -1
  36. package/dist/cjs/types/hitl.js.map +1 -1
  37. package/dist/cjs/version.d.ts +1 -1
  38. package/dist/cjs/version.js +1 -1
  39. package/dist/esm/adapters/langgraph.d.ts.map +1 -1
  40. package/dist/esm/adapters/langgraph.js +20 -0
  41. package/dist/esm/adapters/langgraph.js.map +1 -1
  42. package/dist/esm/authzen.d.ts +353 -0
  43. package/dist/esm/authzen.d.ts.map +1 -0
  44. package/dist/esm/authzen.js +886 -0
  45. package/dist/esm/authzen.js.map +1 -0
  46. package/dist/esm/client.d.ts +135 -9
  47. package/dist/esm/client.d.ts.map +1 -1
  48. package/dist/esm/client.js +397 -30
  49. package/dist/esm/client.js.map +1 -1
  50. package/dist/esm/heartbeat.d.ts +55 -4
  51. package/dist/esm/heartbeat.d.ts.map +1 -1
  52. package/dist/esm/heartbeat.js +85 -7
  53. package/dist/esm/heartbeat.js.map +1 -1
  54. package/dist/esm/index.d.ts +6 -0
  55. package/dist/esm/index.d.ts.map +1 -1
  56. package/dist/esm/index.js +17 -0
  57. package/dist/esm/index.js.map +1 -1
  58. package/dist/esm/read-identity.d.ts +267 -0
  59. package/dist/esm/read-identity.d.ts.map +1 -0
  60. package/dist/esm/read-identity.js +320 -0
  61. package/dist/esm/read-identity.js.map +1 -0
  62. package/dist/esm/telemetry.d.ts +176 -13
  63. package/dist/esm/telemetry.d.ts.map +1 -1
  64. package/dist/esm/telemetry.js +397 -37
  65. package/dist/esm/telemetry.js.map +1 -1
  66. package/dist/esm/types/authzen.gen.d.ts +407 -0
  67. package/dist/esm/types/authzen.gen.d.ts.map +1 -0
  68. package/dist/esm/types/authzen.gen.js +779 -0
  69. package/dist/esm/types/authzen.gen.js.map +1 -0
  70. package/dist/esm/types/config.d.ts +43 -1
  71. package/dist/esm/types/config.d.ts.map +1 -1
  72. package/dist/esm/types/hitl.js +1 -1
  73. package/dist/esm/types/hitl.js.map +1 -1
  74. package/dist/esm/version.d.ts +1 -1
  75. package/dist/esm/version.js +1 -1
  76. package/package.json +1 -1
@@ -1,11 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ORG_ID_LOCAL_DEV_SENTINEL = void 0;
4
+ exports.registerAdapter = registerAdapter;
5
+ exports.boundFeatures = boundFeatures;
6
+ exports.registeredFeatures = registeredFeatures;
7
+ exports._resetAdapterRegistryForTest = _resetAdapterRegistryForTest;
8
+ exports._restoreAdapterRegistryForTest = _restoreAdapterRegistryForTest;
4
9
  exports.telemetryOrgID = telemetryOrgID;
5
10
  exports.classifyDeploymentMode = classifyDeploymentMode;
6
11
  exports.classifyEndpoint = classifyEndpoint;
7
12
  exports.sendTelemetryPingNow = sendTelemetryPingNow;
8
13
  exports.sendTelemetryPing = sendTelemetryPing;
14
+ exports.probePlatformHealth = probePlatformHealth;
9
15
  const version_1 = require("./version");
10
16
  /**
11
17
  * Default checkpoint endpoint for anonymous usage telemetry.
@@ -28,6 +34,182 @@ const MIN_BUDGET_MS = 100;
28
34
  * always has enough room even when the probe hits a slow / blackholed endpoint.
29
35
  */
30
36
  const HEALTH_BUDGET_CAP_MS = 1000;
37
+ /**
38
+ * Bounds every value this SDK puts on the telemetry wire that it did not
39
+ * author itself — every string promoted out of a `/health` response, and every
40
+ * adapter name handed to `registerAdapter`.
41
+ *
42
+ * WHY A DROP AND NOT A TRUNCATION. The checkpoint refuses a request body over
43
+ * 64 KiB. A single 70 KB value from a hostile or broken `/health` therefore
44
+ * produces a ping that is rejected WHOLE — the version, the tier, the org id,
45
+ * every dimension lost, not just the oversized one — and because the stamp is
46
+ * only written on a 2xx, the SDK retries that same doomed request at every
47
+ * gate run for as long as `/health` keeps answering that way. Dropping the
48
+ * offending value alone keeps the ping under the limit and preserves every
49
+ * other dimension.
50
+ *
51
+ * It is dropped rather than truncated because a truncated value is a value
52
+ * nobody reported: 64 bytes of a 70 KB string is not a licence tier and not an
53
+ * adapter name, and relaying it would put a fabricated observation on the
54
+ * wire. Absent is the honest answer.
55
+ *
56
+ * BYTES, NOT CHARACTERS — and in JavaScript that has to be said out loud,
57
+ * because `String.length` counts UTF-16 CODE UNITS. Every check against this
58
+ * bound uses `Buffer.byteLength(s, 'utf8')`. The three disagree: '😀' is
59
+ * length 2, one code point, and four bytes. The bound is bytes because the
60
+ * thing being bounded — the serialized request body — is bytes.
61
+ *
62
+ * Same bound the receiver applies to these coarse enums (checkpoint-service
63
+ * `MaxCoarseEnumValueBytes`), and ~3.5x the longest legitimate value.
64
+ */
65
+ const MAX_RELAYED_VALUE_BYTES = 64;
66
+ /**
67
+ * Bounds on the `features` array itself, mirroring the receiver's own
68
+ * `MaxFeatures` / `MaxFeatureBytes`. Applying them client-side means an
69
+ * over-long array is shaped HERE, where the SDK still knows what it dropped,
70
+ * rather than silently at ingest.
71
+ *
72
+ * READ WHAT THESE TWO ACTUALLY REACH. The entry cap is live: register 33
73
+ * adapters and the 33rd does not reach the wire. The byte cap is a BACKSTOP
74
+ * that today's only producer cannot trigger — `registerAdapter` already
75
+ * refuses a name over `MAX_RELAYED_VALUE_BYTES`, so the longest entry it can
76
+ * emit is `'adapter:'.length + 64 === 72` bytes. It is tested directly on
77
+ * `boundFeatures` rather than through the registry, because a test driven
78
+ * through the registry could not express it.
79
+ */
80
+ const MAX_FEATURES = 32;
81
+ const MAX_FEATURE_BYTES = 128;
82
+ /**
83
+ * Marks a `features[]` entry as an adapter identifier. The vocabulary is
84
+ * SERVER-DEFINED (checkpoint-service `FeatureAdapterPrefix`) and is not this
85
+ * SDK's to extend.
86
+ */
87
+ const FEATURE_ADAPTER_PREFIX = 'adapter:';
88
+ /**
89
+ * Length of `value` in UTF-8 BYTES.
90
+ *
91
+ * Its own function so every bound in this module is measured the same way and
92
+ * no call site can quietly fall back to `.length`, which counts UTF-16 code
93
+ * units. `Buffer` is Node-only; the `TextEncoder` fallback keeps this correct
94
+ * in a non-Node runtime rather than silently reverting to code units.
95
+ */
96
+ function byteLength(value) {
97
+ if (typeof Buffer !== 'undefined' && typeof Buffer.byteLength === 'function') {
98
+ return Buffer.byteLength(value, 'utf8');
99
+ }
100
+ return new TextEncoder().encode(value).length;
101
+ }
102
+ // ---------------------------------------------------------------------------
103
+ // The adapter registry — the ONLY producer of `features` entries.
104
+ // ---------------------------------------------------------------------------
105
+ /**
106
+ * A Set, so a framework that registers on every wrapper construction — the
107
+ * ordinary case for an adapter whose constructor runs per request — declares
108
+ * itself once on the wire rather than N times.
109
+ */
110
+ const adapterRegistry = new Set();
111
+ /**
112
+ * Declare that a framework adapter is driving this SDK, so the next telemetry
113
+ * heartbeat carries `adapter:<name>` in its `features` array.
114
+ *
115
+ * A framework adapter (LangChain, LangGraph, LiteLLM, …) wrapping this SDK is
116
+ * indistinguishable from bare SDK use on every other telemetry dimension —
117
+ * same `sdk`, same `sdk_version`, same endpoint. This is the one call that
118
+ * makes the difference visible, and it is adoption signal only.
119
+ *
120
+ * IT ADDS NO REQUEST. The name rides the `features` array of the heartbeat
121
+ * that already fires; there is no second ping, no second endpoint and no new
122
+ * configuration surface. Calling it does not itself send anything.
123
+ *
124
+ * CALL IT BEFORE YOUR FIRST API CALL for day-one attribution. The heartbeat
125
+ * fires on the client's FIRST OUTBOUND REQUEST, not at construction, so
126
+ * anything registered before that request is on the very first ping and a name
127
+ * registered afterwards rides the next heartbeat.
128
+ *
129
+ * The SDK's own `AxonFlowLangGraphAdapter` registers from its constructor, so
130
+ * simply using it is enough — an adapter is necessarily built after the client
131
+ * and before any call through it.
132
+ *
133
+ * Idempotent. Repeat registrations of the same name collapse to one entry.
134
+ *
135
+ * THE NAME IS NOT VALIDATED AGAINST A LIST, DELIBERATELY. The canonical
136
+ * vocabulary lives on the receiver (checkpoint-service
137
+ * `NormalizeAdapterFeature`, which folds an unrecognised name into
138
+ * `adapter:unknown` at READ time while keeping the raw name on the row). An
139
+ * allowlist here would be a second vocabulary that drifts from the first: a
140
+ * name this SDK build predates would be dropped at the client instead of
141
+ * arriving and rendering as "someone is using an adapter we do not know
142
+ * about" — precisely the signal the unknown bucket exists to preserve.
143
+ *
144
+ * So the only transformations are the two the receiver also applies before
145
+ * matching: trim surrounding whitespace, and lowercase. What is refused is
146
+ * refused for a reason that is not about vocabulary: a name empty after
147
+ * trimming (there is nothing to declare, and `adapter:` alone is not an
148
+ * identifier), and a name longer than `MAX_RELAYED_VALUE_BYTES` (dropped
149
+ * WHOLE, never truncated). A non-string is refused the same way rather than
150
+ * coerced — `String(undefined)` would put the literal text `undefined` on the
151
+ * wire as an adapter name.
152
+ *
153
+ * Both refusals are silent: this is a telemetry declaration on a
154
+ * fire-and-forget path, and throwing would invite a caller to fail their own
155
+ * startup over an analytics detail.
156
+ */
157
+ function registerAdapter(name) {
158
+ if (typeof name !== 'string')
159
+ return;
160
+ const normalized = name.trim().toLowerCase();
161
+ if (normalized === '' || byteLength(normalized) > MAX_RELAYED_VALUE_BYTES)
162
+ return;
163
+ adapterRegistry.add(normalized);
164
+ }
165
+ /**
166
+ * Apply the receiver's array bounds: at most `MAX_FEATURES` entries, none over
167
+ * `MAX_FEATURE_BYTES` bytes.
168
+ *
169
+ * An over-long entry is DROPPED rather than truncated, which is where this
170
+ * deliberately differs from the receiver's own `BoundFeatures`. The receiver
171
+ * truncates because it is defending storage against arbitrary clients and a
172
+ * truncated entry harmlessly folds into its unknown bucket. Here the entry is
173
+ * something this process declared about itself, and a truncated adapter name
174
+ * is a name nothing is running.
175
+ */
176
+ function boundFeatures(features) {
177
+ const out = [];
178
+ for (const feature of features) {
179
+ if (byteLength(feature) > MAX_FEATURE_BYTES)
180
+ continue;
181
+ out.push(feature);
182
+ if (out.length === MAX_FEATURES)
183
+ break;
184
+ }
185
+ return out;
186
+ }
187
+ /**
188
+ * Render the registry as the `features` array for one ping.
189
+ *
190
+ * Sorted so the wire is deterministic — two processes that registered the same
191
+ * adapters in a different order produce the same array, which is what lets a
192
+ * test assert on the whole field, and what makes "which 32 survive" a defined
193
+ * answer rather than a Set-iteration accident.
194
+ */
195
+ function registeredFeatures() {
196
+ const names = [...adapterRegistry].sort();
197
+ return boundFeatures(names.map(name => FEATURE_ADAPTER_PREFIX + name));
198
+ }
199
+ /** Test-only: empty the registry and return what was there, so the caller can
200
+ * restore it. The registry is module-global by design, so a test that
201
+ * registers an adapter would otherwise leak it into every later test's ping. */
202
+ function _resetAdapterRegistryForTest() {
203
+ const previous = [...adapterRegistry];
204
+ adapterRegistry.clear();
205
+ return previous;
206
+ }
207
+ /** Test-only: restore a registry saved by `_resetAdapterRegistryForTest`. */
208
+ function _restoreAdapterRegistryForTest(previous) {
209
+ adapterRegistry.clear();
210
+ for (const name of previous)
211
+ adapterRegistry.add(name);
212
+ }
31
213
  /**
32
214
  * Generate a random UUID v4-style identifier.
33
215
  *
@@ -96,6 +278,40 @@ function shouldSendTelemetry() {
96
278
  // AXONFLOW_TELEMETRY=off is the SOLE opt-out path.
97
279
  return process.env.AXONFLOW_TELEMETRY?.trim().toLowerCase() !== 'off';
98
280
  }
281
+ /**
282
+ * Is this a 3xx?
283
+ *
284
+ * Distinguished from an ordinary non-2xx so a REFUSED REDIRECT is observable.
285
+ * It is the one failure on this path that would otherwise look like success.
286
+ */
287
+ function isRedirect(status) {
288
+ return status >= 300 && status < 400;
289
+ }
290
+ /**
291
+ * `redirect: 'manual'`, and the choice between the three modes was measured
292
+ * rather than assumed.
293
+ *
294
+ * `fetch` FOLLOWS redirects by default, and on this path that is a live defect
295
+ * in two different ways:
296
+ *
297
+ * * on `/health`, every value promoted out of the response would describe the
298
+ * REDIRECT TARGET rather than the endpoint the caller configured — a
299
+ * captive portal, a misconfigured proxy or an http->https hop is enough to
300
+ * make the heartbeat report a platform the user never pointed at;
301
+ * * on the checkpoint POST it is worse: a redirected POST is re-issued as a
302
+ * BODYLESS GET, so a 302 yields a 200 for a request that carried NOTHING,
303
+ * the SDK reads that 200 as delivery, and the 7-day stamp advances on a
304
+ * ping that was never sent. The installation then goes silent for a week,
305
+ * and a 200 meaning "we delivered nothing" is indistinguishable from
306
+ * success at every layer above.
307
+ *
308
+ * Measured on Node 25: `redirect: 'follow'` turns a 302 into `status=200
309
+ * ok=true`; `'manual'` yields `status=302 ok=false`; `'error'` throws a generic
310
+ * `TypeError: fetch failed`. `'manual'` is used because it is the only one that
311
+ * lets the refusal be REPORTED — `'error'` is indistinguishable from an
312
+ * ordinary network failure, so a refused redirect would be silent.
313
+ */
314
+ const NO_REDIRECTS = 'manual';
99
315
  /**
100
316
  * Sentinel emitted on the telemetry wire when `ORG_ID` is unset — the
101
317
  * default-config Community-mode developer case. See #2277.
@@ -295,17 +511,93 @@ function expandIPv6(addr) {
295
511
  * NOT consult `AXONFLOW_TELEMETRY`, the stamp file, or any rate-limit
296
512
  * state.
297
513
  */
298
- async function sendTelemetryPingNow(options) {
299
- const checkpointUrl = resolveCheckpointUrl();
300
- // Stream classifier: sandbox-mode clients self-tag so analytics can
301
- // distinguish dev/test pings from production. Production-mode clients
302
- // omit the field entirely and the server defaults to "heartbeat". The
303
- // optional-property pattern preserves byte-identical wire shape for the
304
- // production case relative to v7.x.
305
- // v1 telemetry-schema (axonflow-enterprise#2008): deployment_mode classified
306
- // from endpoint host (prior config.Mode-based dimension removed; now
307
- // reflects topology only).
308
- const payload = {
514
+ /**
515
+ * The single definition of "the platform told us this".
516
+ *
517
+ * A value counts as learned only when it is a NON-EMPTY string. Used by the
518
+ * probe, which is where it is load-bearing: it decides what gets promoted out
519
+ * of the `/health` body, and a mutant relaxing it is killed.
520
+ *
521
+ * `applyHealthProbe` also calls it, but there it is belt-and-braces that NO
522
+ * test can pin: `applyHealthProbe` is module-private, its only two call sites
523
+ * pass a probe built by `probePlatformHealth`, and that already maps `""` to
524
+ * `null`. A mutant relaxing the check there survives by construction. It is
525
+ * kept so the omit-vs-populate rule reads the same at both levels, not
526
+ * because a test proves it — said plainly so a reader does not assume it is
527
+ * covered. (Java differs: `buildPayload` there is genuinely package-visible,
528
+ * so the equivalent check IS reachable and its mutant IS killed.)
529
+ */
530
+ function isLearned(value) {
531
+ return typeof value === 'string' && value.length > 0;
532
+ }
533
+ /**
534
+ * Promote one `/health` member to a relayable value, or `null`.
535
+ *
536
+ * Learned only when the member is present, is a string, is non-empty, and is
537
+ * within `MAX_RELAYED_VALUE_BYTES`. An absent key, a non-string value, an
538
+ * explicit `''` and an over-long string are all NOT LEARNED — the field stays
539
+ * `null` rather than becoming a value the platform did not report.
540
+ *
541
+ * A non-string is refused rather than coerced: `{"tier": 42}` becoming `"42"`
542
+ * would land in the receiver's unknown bucket as though the platform had
543
+ * reported a tier.
544
+ */
545
+ function learned(record, key) {
546
+ const value = record[key];
547
+ if (!isLearned(value))
548
+ return null;
549
+ if (byteLength(value) > MAX_RELAYED_VALUE_BYTES) {
550
+ // The VALUE is deliberately not logged: it is remote-controlled text, and
551
+ // the diagnostic exists to say which field was dropped and why.
552
+ if (typeof console !== 'undefined') {
553
+ console.debug(`[AxonFlow] Telemetry: /health field '${key}' exceeded ${MAX_RELAYED_VALUE_BYTES} ` +
554
+ `bytes (${byteLength(value)} bytes); omitted`);
555
+ }
556
+ return null;
557
+ }
558
+ return value;
559
+ }
560
+ /**
561
+ * Apply a health-probe result onto a telemetry payload.
562
+ *
563
+ * This module has TWO ping paths (`sendTelemetryPingNow` and
564
+ * `sendTelemetryPing`) that build the same payload independently. Both call
565
+ * THIS function so the omit-vs-populate rule cannot drift between them —
566
+ * patching one copy of a duplicated decision is how the two paths come to
567
+ * disagree.
568
+ *
569
+ * `platform_version` is an explicit `null` when unlearned (its long-standing
570
+ * wire shape); `license_tier` is OMITTED entirely, never set to `""` and
571
+ * never defaulted to a guessed tier.
572
+ */
573
+ function applyHealthProbe(payload, probe) {
574
+ payload.platform_version = probe.platformVersion;
575
+ // Both ping paths build `payload` fresh per call, so there is never a stale
576
+ // value to remove — assign only when learned. Assigning `undefined` would
577
+ // still create the property, and `JSON.stringify` drops it, but "the key is
578
+ // absent" is the contract and it should be structural rather than incidental.
579
+ if (isLearned(probe.licenseTier)) {
580
+ payload.license_tier = probe.licenseTier;
581
+ }
582
+ if (isLearned(probe.edition)) {
583
+ payload.edition = probe.edition;
584
+ }
585
+ if (isLearned(probe.platformDeploymentMode)) {
586
+ payload.platform_deployment_mode = probe.platformDeploymentMode;
587
+ }
588
+ }
589
+ /**
590
+ * Build the base telemetry payload.
591
+ *
592
+ * ONE builder for BOTH ping paths. This module has two — `sendTelemetryPingNow`
593
+ * and the `sendTelemetryPing` compat shim — and they previously built the same
594
+ * object literal independently. `applyHealthProbe` already exists for exactly
595
+ * this reason: patching one copy of a duplicated decision is how the two paths
596
+ * come to disagree. Adding `features` to one literal and not the other would
597
+ * have been that bug, so the literal itself is now shared.
598
+ */
599
+ function buildBasePayload(options) {
600
+ return {
309
601
  telemetry_type: 'sdk',
310
602
  sdk: 'typescript',
311
603
  sdk_version: version_1.VERSION,
@@ -315,17 +607,32 @@ async function sendTelemetryPingNow(options) {
315
607
  runtime_version: typeof process !== 'undefined' ? process.version.replace(/^v/, '') : 'unknown',
316
608
  deployment_mode: classifyDeploymentMode(options.endpoint),
317
609
  endpoint_type: classifyEndpoint(options.endpoint),
318
- features: [],
610
+ // The adapter registry is the ONLY producer of this array. Read here rather
611
+ // than snapshotted at module load so an adapter that registers after the
612
+ // first client is built still reaches the next heartbeat.
613
+ features: registeredFeatures(),
319
614
  instance_id: generateInstanceId(),
320
615
  org_id: telemetryOrgID(),
321
616
  ...(options.mode === 'sandbox' ? { stream: 'sandbox' } : {}),
322
617
  };
618
+ }
619
+ async function sendTelemetryPingNow(options) {
620
+ const checkpointUrl = resolveCheckpointUrl();
621
+ // Stream classifier: sandbox-mode clients self-tag so analytics can
622
+ // distinguish dev/test pings from production. Production-mode clients
623
+ // omit the field entirely and the server defaults to "heartbeat". The
624
+ // optional-property pattern preserves byte-identical wire shape for the
625
+ // production case relative to v7.x.
626
+ // v1 telemetry-schema (axonflow-enterprise#2008): deployment_mode classified
627
+ // from endpoint host (prior config.Mode-based dimension removed; now
628
+ // reflects topology only).
629
+ const payload = buildBasePayload(options);
323
630
  try {
324
631
  const deadline = Date.now() + TELEMETRY_TIMEOUT_MS;
325
632
  try {
326
633
  const healthBudget = Math.min(HEALTH_BUDGET_CAP_MS, Math.max(0, deadline - Date.now()));
327
634
  if (options.endpoint && healthBudget > MIN_BUDGET_MS) {
328
- payload.platform_version = await detectPlatformVersion(options.endpoint, healthBudget);
635
+ applyHealthProbe(payload, await probePlatformHealth(options.endpoint, healthBudget));
329
636
  }
330
637
  }
331
638
  catch {
@@ -346,7 +653,15 @@ async function sendTelemetryPingNow(options) {
346
653
  headers: { 'Content-Type': 'application/json' },
347
654
  body: JSON.stringify(payload),
348
655
  signal: controller.signal,
656
+ redirect: NO_REDIRECTS,
349
657
  });
658
+ if (isRedirect(response.status) && typeof console !== 'undefined') {
659
+ console.debug(`[AxonFlow] Telemetry: checkpoint answered ${response.status} (a redirect); ` +
660
+ 'refused, ping NOT delivered and the stamp will not advance');
661
+ }
662
+ // `response.ok` is already false for a 3xx under redirect: 'manual', so
663
+ // the stamp cannot advance. The branch above exists to make the refusal
664
+ // visible, not to change the outcome.
350
665
  return response.ok;
351
666
  }
352
667
  finally {
@@ -387,21 +702,7 @@ function sendTelemetryPing(options) {
387
702
  // v1 telemetry-schema (axonflow-enterprise#2008): deployment_mode classified
388
703
  // from endpoint host (prior config.Mode-based dimension removed; now
389
704
  // reflects topology only).
390
- const payload = {
391
- telemetry_type: 'sdk',
392
- sdk: 'typescript',
393
- sdk_version: version_1.VERSION,
394
- platform_version: null,
395
- os: typeof process !== 'undefined' ? process.platform : 'unknown',
396
- arch: typeof process !== 'undefined' ? process.arch : 'unknown',
397
- runtime_version: typeof process !== 'undefined' ? process.version.replace(/^v/, '') : 'unknown',
398
- deployment_mode: classifyDeploymentMode(options.endpoint),
399
- endpoint_type: classifyEndpoint(options.endpoint),
400
- features: [],
401
- instance_id: generateInstanceId(),
402
- org_id: telemetryOrgID(),
403
- ...(options.mode === 'sandbox' ? { stream: 'sandbox' } : {}),
404
- };
705
+ const payload = buildBasePayload(options);
405
706
  // Fire-and-forget: detect platform version then send ping.
406
707
  //
407
708
  // Both network operations share a single monotonic deadline so the total
@@ -420,7 +721,7 @@ function sendTelemetryPing(options) {
420
721
  // blackholed endpoint and consumes the full probe budget.
421
722
  const healthBudget = Math.min(HEALTH_BUDGET_CAP_MS, Math.max(0, deadline - Date.now()));
422
723
  if (options.endpoint && healthBudget > MIN_BUDGET_MS) {
423
- payload.platform_version = await detectPlatformVersion(options.endpoint, healthBudget);
724
+ applyHealthProbe(payload, await probePlatformHealth(options.endpoint, healthBudget));
424
725
  }
425
726
  }
426
727
  catch {
@@ -442,6 +743,7 @@ function sendTelemetryPing(options) {
442
743
  headers: { 'Content-Type': 'application/json' },
443
744
  body: JSON.stringify(payload),
444
745
  signal: controller.signal,
746
+ redirect: NO_REDIRECTS,
445
747
  });
446
748
  }
447
749
  finally {
@@ -456,30 +758,94 @@ function sendTelemetryPing(options) {
456
758
  }
457
759
  }
458
760
  /**
459
- * Detect the platform version by calling the agent's /health endpoint.
460
- * Returns the version string or null on any failure.
761
+ * Probe the agent's `/health` endpoint ONCE and extract every telemetry
762
+ * dimension it carries. Returns both fields null on any failure
763
+ * unreachable endpoint, non-2xx, unparseable body, or a body that stalls
764
+ * past the supplied budget — so
765
+ * telemetry degrades to omitting the fields and never fails the ping or
766
+ * surfaces an error to the caller.
767
+ *
768
+ * This is the SDK's only `/health` fetch on the telemetry path; the licence
769
+ * tier rides along on the response already being fetched for the version.
770
+ * Adding a second request here would double the telemetry path's blocking
771
+ * budget and its failure surface — do not.
461
772
  *
462
773
  * @param timeoutMs — derived from the shared telemetry deadline so the health
463
774
  * probe and the checkpoint POST don't stack into a larger combined budget.
464
775
  * See enterprise#1707.
465
776
  */
466
- async function detectPlatformVersion(endpoint, timeoutMs) {
777
+ async function probePlatformHealth(endpoint, timeoutMs) {
778
+ const empty = {
779
+ platformVersion: null,
780
+ licenseTier: null,
781
+ edition: null,
782
+ platformDeploymentMode: null,
783
+ };
467
784
  const controller = new AbortController();
468
785
  const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
786
+ // Belt to the `finally`'s braces. If this timer were ever left pending it
787
+ // would hold the Node event loop open for its full duration after an
788
+ // otherwise-finished ping — the "telemetry delays process exit" symptom in
789
+ // a CLI or Lambda. unref() means a pending timer can never be the reason
790
+ // the process stays alive. Node-only API, hence the optional call.
791
+ timeoutId.unref?.();
792
+ // The timer is cleared in `finally`, NOT as soon as fetch() resolves.
793
+ // fetch() resolves on HEADERS, so clearing it there disarmed the only
794
+ // bound on `resp.json()` and left the AbortController unable to fire
795
+ // again: a platform that answered 200 + headers and then stalled
796
+ // mid-body blocked this call FOREVER, measured at 4s+ against a 400ms
797
+ // budget. That defeats the shared-deadline contract (enterprise#1707)
798
+ // and can hang a caller awaiting `client.heartbeatReady`.
469
799
  try {
470
800
  const resp = await fetch(`${endpoint}/health`, {
471
801
  method: 'GET',
472
802
  signal: controller.signal,
803
+ redirect: NO_REDIRECTS,
473
804
  });
474
- clearTimeout(timeoutId);
475
- if (!resp.ok)
476
- return null;
805
+ if (!resp.ok) {
806
+ if (isRedirect(resp.status) && typeof console !== 'undefined') {
807
+ // Named separately from an ordinary non-2xx so a refused redirect is
808
+ // OBSERVABLE rather than silent. The Location value is deliberately
809
+ // NOT logged: it is remote-controlled text.
810
+ console.debug(`[AxonFlow] Telemetry: /health answered ${resp.status} (a redirect); refused, ` +
811
+ 'relayed fields omitted');
812
+ }
813
+ return empty;
814
+ }
815
+ // Still covered by the abort signal above — an abort here rejects, and
816
+ // the catch below turns it into the ordinary not-learned result.
477
817
  const body = await resp.json();
478
- return typeof body.version === 'string' && body.version ? body.version : null;
818
+ if (typeof body !== 'object' || body === null)
819
+ return empty;
820
+ const record = body;
821
+ // Each field is promoted independently and only when it is a non-empty
822
+ // string. A TypeScript interface is erased at runtime, so the shape of a
823
+ // parsed body is a claim, not a check — these guards are the check. An
824
+ // absent key, a non-string value and an explicit "" are all "not learned",
825
+ // leaving null rather than putting a meaningless value on the wire.
826
+ // Each member is promoted through ONE helper. Four copies of the same two
827
+ // conditions is the shape that gets found in production by the field the
828
+ // bound was not applied to.
829
+ return {
830
+ platformVersion: learned(record, 'version'),
831
+ // Verbatim, including the transient "starting" the agent returns
832
+ // before its licence is validated. "starting" is a real signal the
833
+ // receiver buckets deliberately, not an error to filter client-side.
834
+ licenseTier: learned(record, 'tier'),
835
+ edition: learned(record, 'edition'),
836
+ // NOTE THE NAME CHANGE, AND THAT IT IS DELIBERATE. The /health member is
837
+ // `deployment_mode` (the platform describing itself); the wire field is
838
+ // `platform_deployment_mode`. This SDK's OWN `deployment_mode` is a
839
+ // different dimension and promoting /health's member into it would
840
+ // overwrite a value every existing dashboard reads.
841
+ platformDeploymentMode: learned(record, 'deployment_mode'),
842
+ };
479
843
  }
480
844
  catch {
845
+ return empty;
846
+ }
847
+ finally {
481
848
  clearTimeout(timeoutId);
482
- return null;
483
849
  }
484
850
  }
485
851
  //# sourceMappingURL=telemetry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../src/telemetry.ts"],"names":[],"mappings":";;;AA+JA,wCAGC;AAeD,wDAgBC;AA0BD,4CAmFC;AAgDD,oDAqEC;AAcD,8CAkGC;AAnhBD,uCAAoC;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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