risicare 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/frameworks/instructor.cjs +9 -0
- package/dist/frameworks/instructor.cjs.map +1 -1
- package/dist/frameworks/instructor.js +9 -0
- package/dist/frameworks/instructor.js.map +1 -1
- package/dist/frameworks/langchain.cjs +9 -0
- package/dist/frameworks/langchain.cjs.map +1 -1
- package/dist/frameworks/langchain.js +9 -0
- package/dist/frameworks/langchain.js.map +1 -1
- package/dist/frameworks/langgraph.cjs +9 -0
- package/dist/frameworks/langgraph.cjs.map +1 -1
- package/dist/frameworks/langgraph.js +9 -0
- package/dist/frameworks/langgraph.js.map +1 -1
- package/dist/frameworks/llamaindex.cjs +9 -0
- package/dist/frameworks/llamaindex.cjs.map +1 -1
- package/dist/frameworks/llamaindex.js +9 -0
- package/dist/frameworks/llamaindex.js.map +1 -1
- package/dist/index.cjs +667 -309
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -2
- package/dist/index.d.ts +38 -2
- package/dist/index.js +667 -309
- package/dist/index.js.map +1 -1
- package/dist/providers/anthropic/index.cjs +9 -0
- package/dist/providers/anthropic/index.cjs.map +1 -1
- package/dist/providers/anthropic/index.js +9 -0
- package/dist/providers/anthropic/index.js.map +1 -1
- package/dist/providers/bedrock/index.cjs +9 -0
- package/dist/providers/bedrock/index.cjs.map +1 -1
- package/dist/providers/bedrock/index.js +9 -0
- package/dist/providers/bedrock/index.js.map +1 -1
- package/dist/providers/cerebras/index.cjs +9 -0
- package/dist/providers/cerebras/index.cjs.map +1 -1
- package/dist/providers/cerebras/index.js +9 -0
- package/dist/providers/cerebras/index.js.map +1 -1
- package/dist/providers/cohere/index.cjs +9 -0
- package/dist/providers/cohere/index.cjs.map +1 -1
- package/dist/providers/cohere/index.js +9 -0
- package/dist/providers/cohere/index.js.map +1 -1
- package/dist/providers/google/index.cjs +9 -0
- package/dist/providers/google/index.cjs.map +1 -1
- package/dist/providers/google/index.js +9 -0
- package/dist/providers/google/index.js.map +1 -1
- package/dist/providers/groq/index.cjs +9 -0
- package/dist/providers/groq/index.cjs.map +1 -1
- package/dist/providers/groq/index.js +9 -0
- package/dist/providers/groq/index.js.map +1 -1
- package/dist/providers/huggingface/index.cjs +9 -0
- package/dist/providers/huggingface/index.cjs.map +1 -1
- package/dist/providers/huggingface/index.js +9 -0
- package/dist/providers/huggingface/index.js.map +1 -1
- package/dist/providers/mistral/index.cjs +9 -0
- package/dist/providers/mistral/index.cjs.map +1 -1
- package/dist/providers/mistral/index.js +9 -0
- package/dist/providers/mistral/index.js.map +1 -1
- package/dist/providers/ollama/index.cjs +9 -0
- package/dist/providers/ollama/index.cjs.map +1 -1
- package/dist/providers/ollama/index.js +9 -0
- package/dist/providers/ollama/index.js.map +1 -1
- package/dist/providers/openai/index.cjs +9 -0
- package/dist/providers/openai/index.cjs.map +1 -1
- package/dist/providers/openai/index.js +9 -0
- package/dist/providers/openai/index.js.map +1 -1
- package/dist/providers/together/index.cjs +9 -0
- package/dist/providers/together/index.cjs.map +1 -1
- package/dist/providers/together/index.js +9 -0
- package/dist/providers/together/index.js.map +1 -1
- package/dist/providers/vercel-ai/index.cjs +9 -0
- package/dist/providers/vercel-ai/index.cjs.map +1 -1
- package/dist/providers/vercel-ai/index.js +9 -0
- package/dist/providers/vercel-ai/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -290,7 +290,14 @@ interface RisicareConfig {
|
|
|
290
290
|
serviceVersion?: string;
|
|
291
291
|
/** Whether tracing is enabled (default: true if apiKey provided) */
|
|
292
292
|
enabled?: boolean;
|
|
293
|
-
/**
|
|
293
|
+
/**
|
|
294
|
+
* Whether prompt/completion content may leave the process.
|
|
295
|
+
*
|
|
296
|
+
* **Default `false` since 0.5.1** (was `true`). When false, every
|
|
297
|
+
* content-keyed attribute is replaced with `<risicare:content-omitted>` on
|
|
298
|
+
* the export path — including content you set by hand, which 0.5.0 and
|
|
299
|
+
* earlier did NOT gate.
|
|
300
|
+
*/
|
|
294
301
|
traceContent?: boolean;
|
|
295
302
|
/** Sample rate 0.0–1.0 (default: 1.0 = trace all) */
|
|
296
303
|
sampleRate?: number;
|
|
@@ -363,14 +370,43 @@ interface TracerConfig {
|
|
|
363
370
|
sampleRate?: number;
|
|
364
371
|
/** Whether tracing is enabled */
|
|
365
372
|
enabled?: boolean;
|
|
366
|
-
/**
|
|
373
|
+
/**
|
|
374
|
+
* Whether prompt/completion content may leave the process (default: false).
|
|
375
|
+
*
|
|
376
|
+
* ⚠ The Tracer only CARRIES this for the provider patches to read via
|
|
377
|
+
* `getTraceContent()`. It is NOT the enforcement point — the gate runs in the
|
|
378
|
+
* batch processor, which is the one place both content paths cross. See
|
|
379
|
+
* `masking.ts` `stripContent`.
|
|
380
|
+
*/
|
|
367
381
|
traceContent?: boolean;
|
|
382
|
+
/**
|
|
383
|
+
* Service name, emitted as the OTel `service.name` span attribute.
|
|
384
|
+
*
|
|
385
|
+
* ⚠ F-SDKJSSVCNAME-001. `serviceName` was accepted by `init()`, typed in
|
|
386
|
+
* `RisicareConfig`, documented, and recommended over the deprecated
|
|
387
|
+
* `projectId` — and reached the wire NOWHERE. Measured on the published
|
|
388
|
+
* 0.5.0: `serviceName: 'X'` at init, `X` absent from every request body,
|
|
389
|
+
* while a sibling control attribute in the same span arrived. Python has
|
|
390
|
+
* always emitted it (`tracer.py`, `service.name`); this makes JS match.
|
|
391
|
+
*/
|
|
392
|
+
serviceName?: string;
|
|
393
|
+
/**
|
|
394
|
+
* Service version, emitted as `service.version`.
|
|
395
|
+
*
|
|
396
|
+
* ⚠ Was dropped by BOTH SDKs — same defect one field over, measured in the
|
|
397
|
+
* same run. Unlike `service.name` it is NOT suppressed under an agent: a
|
|
398
|
+
* version is a property of the deployed code, not of which agent owns the
|
|
399
|
+
* span.
|
|
400
|
+
*/
|
|
401
|
+
serviceVersion?: string;
|
|
368
402
|
}
|
|
369
403
|
declare class Tracer {
|
|
370
404
|
private _onSpanEnd;
|
|
371
405
|
private _sampleRate;
|
|
372
406
|
private _enabled;
|
|
373
407
|
private _traceContent;
|
|
408
|
+
private _serviceName;
|
|
409
|
+
private _serviceVersion;
|
|
374
410
|
constructor(config: TracerConfig);
|
|
375
411
|
get enabled(): boolean;
|
|
376
412
|
set enabled(value: boolean);
|
package/dist/index.d.ts
CHANGED
|
@@ -290,7 +290,14 @@ interface RisicareConfig {
|
|
|
290
290
|
serviceVersion?: string;
|
|
291
291
|
/** Whether tracing is enabled (default: true if apiKey provided) */
|
|
292
292
|
enabled?: boolean;
|
|
293
|
-
/**
|
|
293
|
+
/**
|
|
294
|
+
* Whether prompt/completion content may leave the process.
|
|
295
|
+
*
|
|
296
|
+
* **Default `false` since 0.5.1** (was `true`). When false, every
|
|
297
|
+
* content-keyed attribute is replaced with `<risicare:content-omitted>` on
|
|
298
|
+
* the export path — including content you set by hand, which 0.5.0 and
|
|
299
|
+
* earlier did NOT gate.
|
|
300
|
+
*/
|
|
294
301
|
traceContent?: boolean;
|
|
295
302
|
/** Sample rate 0.0–1.0 (default: 1.0 = trace all) */
|
|
296
303
|
sampleRate?: number;
|
|
@@ -363,14 +370,43 @@ interface TracerConfig {
|
|
|
363
370
|
sampleRate?: number;
|
|
364
371
|
/** Whether tracing is enabled */
|
|
365
372
|
enabled?: boolean;
|
|
366
|
-
/**
|
|
373
|
+
/**
|
|
374
|
+
* Whether prompt/completion content may leave the process (default: false).
|
|
375
|
+
*
|
|
376
|
+
* ⚠ The Tracer only CARRIES this for the provider patches to read via
|
|
377
|
+
* `getTraceContent()`. It is NOT the enforcement point — the gate runs in the
|
|
378
|
+
* batch processor, which is the one place both content paths cross. See
|
|
379
|
+
* `masking.ts` `stripContent`.
|
|
380
|
+
*/
|
|
367
381
|
traceContent?: boolean;
|
|
382
|
+
/**
|
|
383
|
+
* Service name, emitted as the OTel `service.name` span attribute.
|
|
384
|
+
*
|
|
385
|
+
* ⚠ F-SDKJSSVCNAME-001. `serviceName` was accepted by `init()`, typed in
|
|
386
|
+
* `RisicareConfig`, documented, and recommended over the deprecated
|
|
387
|
+
* `projectId` — and reached the wire NOWHERE. Measured on the published
|
|
388
|
+
* 0.5.0: `serviceName: 'X'` at init, `X` absent from every request body,
|
|
389
|
+
* while a sibling control attribute in the same span arrived. Python has
|
|
390
|
+
* always emitted it (`tracer.py`, `service.name`); this makes JS match.
|
|
391
|
+
*/
|
|
392
|
+
serviceName?: string;
|
|
393
|
+
/**
|
|
394
|
+
* Service version, emitted as `service.version`.
|
|
395
|
+
*
|
|
396
|
+
* ⚠ Was dropped by BOTH SDKs — same defect one field over, measured in the
|
|
397
|
+
* same run. Unlike `service.name` it is NOT suppressed under an agent: a
|
|
398
|
+
* version is a property of the deployed code, not of which agent owns the
|
|
399
|
+
* span.
|
|
400
|
+
*/
|
|
401
|
+
serviceVersion?: string;
|
|
368
402
|
}
|
|
369
403
|
declare class Tracer {
|
|
370
404
|
private _onSpanEnd;
|
|
371
405
|
private _sampleRate;
|
|
372
406
|
private _enabled;
|
|
373
407
|
private _traceContent;
|
|
408
|
+
private _serviceName;
|
|
409
|
+
private _serviceVersion;
|
|
374
410
|
constructor(config: TracerConfig);
|
|
375
411
|
get enabled(): boolean;
|
|
376
412
|
set enabled(value: boolean);
|