@glasstrace/sdk 1.15.1 → 1.17.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 +118 -11
- package/dist/async-context/index.cjs +21 -2
- package/dist/async-context/index.cjs.map +1 -1
- package/dist/async-context/index.js +2 -2
- package/dist/{capture-error-03qDnC5v.d.cts → capture-error-B0txjNut.d.cts} +2 -2
- package/dist/{capture-error-CAfFUyIU.d.ts → capture-error-Dc01rYNR.d.ts} +2 -2
- package/dist/{chunk-ZIYT2Y4B.js → chunk-BJOZBAP7.js} +3 -3
- package/dist/{chunk-VMK2G6QR.js → chunk-CN5EP25B.js} +2 -2
- package/dist/{chunk-HMEHYSTS.js → chunk-EVX6D2TX.js} +2 -2
- package/dist/{chunk-T4ETJJSK.js → chunk-F2IPBTDJ.js} +133 -11
- package/dist/{chunk-T4ETJJSK.js.map → chunk-F2IPBTDJ.js.map} +1 -1
- package/dist/{chunk-XMD5OYD6.js → chunk-M3QGJUEI.js} +2 -2
- package/dist/{chunk-7LE2O4ZJ.js → chunk-MKT54VEH.js} +55 -6
- package/dist/{chunk-7LE2O4ZJ.js.map → chunk-MKT54VEH.js.map} +1 -1
- package/dist/{chunk-MP3QNDXQ.js → chunk-O7IJP2TQ.js} +2 -2
- package/dist/{chunk-F7A3QXCT.js → chunk-UOAG72NR.js} +2 -2
- package/dist/{chunk-6ST4QV7T.js → chunk-VEQX2YSQ.js} +3 -3
- package/dist/{chunk-LQZRGBN5.js → chunk-YKE6HJLW.js} +2 -2
- package/dist/cli/init.cjs +18 -5
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +7 -7
- package/dist/cli/mcp-add.cjs +15 -2
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +3 -3
- package/dist/cli/uninit.js +3 -3
- package/dist/cli/upgrade-instructions.cjs +1 -1
- package/dist/cli/upgrade-instructions.js +3 -3
- package/dist/cli/validate.cjs +14 -1
- package/dist/cli/validate.cjs.map +1 -1
- package/dist/cli/validate.js +2 -2
- package/dist/{correlation-id-YcfcqOru.d.ts → correlation-id-B9YYmoZw.d.ts} +1 -1
- package/dist/{correlation-id-CZ2bstzA.d.cts → correlation-id-CelUvw7j.d.cts} +1 -1
- package/dist/edge-entry.cjs +21 -2
- package/dist/edge-entry.cjs.map +1 -1
- package/dist/edge-entry.d.cts +2 -2
- package/dist/edge-entry.d.ts +2 -2
- package/dist/edge-entry.js +4 -4
- package/dist/import-graph-DBLGNjcI.d.cts +238 -0
- package/dist/import-graph-Dka_Fm7j.d.ts +238 -0
- package/dist/index.cjs +203 -12
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-BQIJ5Dvc.d.cts → index.d-3-cJoY8y.d.cts} +10 -2
- package/dist/{index.d-BQIJ5Dvc.d.ts → index.d-3-cJoY8y.d.ts} +10 -2
- package/dist/index.d.cts +102 -5
- package/dist/index.d.ts +102 -5
- package/dist/index.js +30 -5
- package/dist/index.js.map +1 -1
- package/dist/middleware/index.cjs +21 -2
- package/dist/middleware/index.cjs.map +1 -1
- package/dist/middleware/index.js +2 -2
- package/dist/node-entry.cjs +28 -8
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.d.cts +4 -4
- package/dist/node-entry.d.ts +4 -4
- package/dist/node-entry.js +7 -7
- package/dist/node-subpath.cjs +27 -1
- package/dist/node-subpath.cjs.map +1 -1
- package/dist/node-subpath.d.cts +51 -235
- package/dist/node-subpath.d.ts +51 -235
- package/dist/node-subpath.js +16 -3
- package/dist/node-subpath.js.map +1 -1
- package/dist/{source-map-uploader-NUONOEJG.js → source-map-uploader-U7SLSKIZ.js} +3 -3
- package/dist/trpc/index.cjs +21 -2
- package/dist/trpc/index.cjs.map +1 -1
- package/dist/trpc/index.js +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-ZIYT2Y4B.js.map → chunk-BJOZBAP7.js.map} +0 -0
- /package/dist/{chunk-VMK2G6QR.js.map → chunk-CN5EP25B.js.map} +0 -0
- /package/dist/{chunk-HMEHYSTS.js.map → chunk-EVX6D2TX.js.map} +0 -0
- /package/dist/{chunk-XMD5OYD6.js.map → chunk-M3QGJUEI.js.map} +0 -0
- /package/dist/{chunk-MP3QNDXQ.js.map → chunk-O7IJP2TQ.js.map} +0 -0
- /package/dist/{chunk-F7A3QXCT.js.map → chunk-UOAG72NR.js.map} +0 -0
- /package/dist/{chunk-6ST4QV7T.js.map → chunk-VEQX2YSQ.js.map} +0 -0
- /package/dist/{chunk-LQZRGBN5.js.map → chunk-YKE6HJLW.js.map} +0 -0
- /package/dist/{source-map-uploader-NUONOEJG.js.map → source-map-uploader-U7SLSKIZ.js.map} +0 -0
package/dist/middleware/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
_resetForTesting,
|
|
3
3
|
tracedRequestMiddleware
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-CN5EP25B.js";
|
|
5
5
|
import "../chunk-CL3OVHPO.js";
|
|
6
6
|
import "../chunk-DQ25VOKK.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-MKT54VEH.js";
|
|
8
8
|
import "../chunk-NSBPE2FW.js";
|
|
9
9
|
export {
|
|
10
10
|
_resetForTesting,
|
package/dist/node-entry.cjs
CHANGED
|
@@ -15374,7 +15374,20 @@ var init_dist = __esm({
|
|
|
15374
15374
|
* client-side allowlist enforcement layered with the product's
|
|
15375
15375
|
* storage-time filter as defense-in-depth.
|
|
15376
15376
|
*/
|
|
15377
|
-
sideEffectEvidence: external_exports.boolean().optional().default(false)
|
|
15377
|
+
sideEffectEvidence: external_exports.boolean().optional().default(false),
|
|
15378
|
+
/**
|
|
15379
|
+
* Per-account value-fidelity capture posture (server-pushed).
|
|
15380
|
+
*
|
|
15381
|
+
* `strict` (default) is fail-closed: the SDK rejects raw wall-clock
|
|
15382
|
+
* timestamps and unhashed identifiers from the `scalar.*` channel at
|
|
15383
|
+
* emit time. `full` relaxes those rejections so raw magnitudes can be
|
|
15384
|
+
* surfaced — but only in conjunction with an explicit producer opt-in
|
|
15385
|
+
* (so a `full`-configured account still emits strict-shaped scalars
|
|
15386
|
+
* unless the producer also opts in). The operator owns this flag; it
|
|
15387
|
+
* is never derived from producer or request input. Absent on the wire
|
|
15388
|
+
* ⇒ `strict`.
|
|
15389
|
+
*/
|
|
15390
|
+
captureFidelity: external_exports.enum(["strict", "full"]).optional().default("strict")
|
|
15378
15391
|
});
|
|
15379
15392
|
SdkCachedConfigSchema = external_exports.object({
|
|
15380
15393
|
response: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
@@ -15565,7 +15578,13 @@ var init_dist = __esm({
|
|
|
15565
15578
|
SIDE_EFFECT_OMITTED_UNSUPPORTED_KEY: "glasstrace.side_effect.omitted.unsupported_key",
|
|
15566
15579
|
SIDE_EFFECT_OMITTED_VALUE_TOO_LONG: "glasstrace.side_effect.omitted.value_too_long",
|
|
15567
15580
|
SIDE_EFFECT_OMITTED_NOT_EMITTED: "glasstrace.side_effect.omitted.not_emitted",
|
|
15568
|
-
SIDE_EFFECT_OMITTED_CAPTURE_DISABLED: "glasstrace.side_effect.omitted.capture_disabled"
|
|
15581
|
+
SIDE_EFFECT_OMITTED_CAPTURE_DISABLED: "glasstrace.side_effect.omitted.capture_disabled",
|
|
15582
|
+
// Value-fidelity scalar-channel omission reasons. Counts only; the
|
|
15583
|
+
// rejected raw value (timestamp, unhashed id, non-finite number) is
|
|
15584
|
+
// never echoed. Mirror the product omission enum verbatim.
|
|
15585
|
+
SIDE_EFFECT_OMITTED_RAW_TIMESTAMP: "glasstrace.side_effect.omitted.raw_timestamp",
|
|
15586
|
+
SIDE_EFFECT_OMITTED_UNHASHED_ID: "glasstrace.side_effect.omitted.unhashed_id",
|
|
15587
|
+
SIDE_EFFECT_OMITTED_NON_FINITE: "glasstrace.side_effect.omitted.non_finite"
|
|
15569
15588
|
};
|
|
15570
15589
|
DEFAULT_CAPTURE_CONFIG = {
|
|
15571
15590
|
requestBodies: false,
|
|
@@ -15575,7 +15594,8 @@ var init_dist = __esm({
|
|
|
15575
15594
|
importGraph: false,
|
|
15576
15595
|
consoleErrors: false,
|
|
15577
15596
|
errorResponseBodies: false,
|
|
15578
|
-
sideEffectEvidence: false
|
|
15597
|
+
sideEffectEvidence: false,
|
|
15598
|
+
captureFidelity: "strict"
|
|
15579
15599
|
};
|
|
15580
15600
|
MAX_SOURCE_MAP_FILE_PATH_LENGTH = 512;
|
|
15581
15601
|
MAX_SOURCE_MAP_FILE_SIZE = 50 * 1024 * 1024;
|
|
@@ -24423,11 +24443,11 @@ function registerGlasstrace(options) {
|
|
|
24423
24443
|
setCoreState(CoreState.REGISTERING);
|
|
24424
24444
|
maybeWarnStaleAgentInstructions({
|
|
24425
24445
|
projectRoot: process.cwd(),
|
|
24426
|
-
sdkVersion: "1.
|
|
24446
|
+
sdkVersion: "1.17.0"
|
|
24427
24447
|
});
|
|
24428
24448
|
startRuntimeStateWriter({
|
|
24429
24449
|
projectRoot: process.cwd(),
|
|
24430
|
-
sdkVersion: "1.
|
|
24450
|
+
sdkVersion: "1.17.0"
|
|
24431
24451
|
});
|
|
24432
24452
|
const config2 = resolveConfig(options);
|
|
24433
24453
|
setSideEffectVerboseFlag(config2.verbose);
|
|
@@ -24595,8 +24615,8 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
24595
24615
|
if (config2.verbose) {
|
|
24596
24616
|
console.info("[glasstrace] Background init firing.");
|
|
24597
24617
|
}
|
|
24598
|
-
const healthReport = collectHealthReport("1.
|
|
24599
|
-
const initResult = await performInit(config2, anonKeyForInit, "1.
|
|
24618
|
+
const healthReport = collectHealthReport("1.17.0");
|
|
24619
|
+
const initResult = await performInit(config2, anonKeyForInit, "1.17.0", healthReport);
|
|
24600
24620
|
if (generation !== registrationGeneration) return;
|
|
24601
24621
|
const currentState = getCoreState();
|
|
24602
24622
|
if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
|
|
@@ -24619,7 +24639,7 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
24619
24639
|
}
|
|
24620
24640
|
maybeInstallConsoleCapture();
|
|
24621
24641
|
if (didLastInitSucceed()) {
|
|
24622
|
-
startHeartbeat(config2, anonKeyForInit, "1.
|
|
24642
|
+
startHeartbeat(config2, anonKeyForInit, "1.17.0", generation, (newApiKey, accountId) => {
|
|
24623
24643
|
setAuthState(AuthState.CLAIMING);
|
|
24624
24644
|
emitLifecycleEvent("auth:claim_started", { accountId });
|
|
24625
24645
|
setResolvedApiKey(newApiKey);
|