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