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.
Files changed (72) hide show
  1. package/README.md +33 -0
  2. package/dist/frameworks/instructor.cjs +9 -0
  3. package/dist/frameworks/instructor.cjs.map +1 -1
  4. package/dist/frameworks/instructor.js +9 -0
  5. package/dist/frameworks/instructor.js.map +1 -1
  6. package/dist/frameworks/langchain.cjs +9 -0
  7. package/dist/frameworks/langchain.cjs.map +1 -1
  8. package/dist/frameworks/langchain.js +9 -0
  9. package/dist/frameworks/langchain.js.map +1 -1
  10. package/dist/frameworks/langgraph.cjs +9 -0
  11. package/dist/frameworks/langgraph.cjs.map +1 -1
  12. package/dist/frameworks/langgraph.js +9 -0
  13. package/dist/frameworks/langgraph.js.map +1 -1
  14. package/dist/frameworks/llamaindex.cjs +9 -0
  15. package/dist/frameworks/llamaindex.cjs.map +1 -1
  16. package/dist/frameworks/llamaindex.js +9 -0
  17. package/dist/frameworks/llamaindex.js.map +1 -1
  18. package/dist/index.cjs +667 -309
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +38 -2
  21. package/dist/index.d.ts +38 -2
  22. package/dist/index.js +667 -309
  23. package/dist/index.js.map +1 -1
  24. package/dist/providers/anthropic/index.cjs +9 -0
  25. package/dist/providers/anthropic/index.cjs.map +1 -1
  26. package/dist/providers/anthropic/index.js +9 -0
  27. package/dist/providers/anthropic/index.js.map +1 -1
  28. package/dist/providers/bedrock/index.cjs +9 -0
  29. package/dist/providers/bedrock/index.cjs.map +1 -1
  30. package/dist/providers/bedrock/index.js +9 -0
  31. package/dist/providers/bedrock/index.js.map +1 -1
  32. package/dist/providers/cerebras/index.cjs +9 -0
  33. package/dist/providers/cerebras/index.cjs.map +1 -1
  34. package/dist/providers/cerebras/index.js +9 -0
  35. package/dist/providers/cerebras/index.js.map +1 -1
  36. package/dist/providers/cohere/index.cjs +9 -0
  37. package/dist/providers/cohere/index.cjs.map +1 -1
  38. package/dist/providers/cohere/index.js +9 -0
  39. package/dist/providers/cohere/index.js.map +1 -1
  40. package/dist/providers/google/index.cjs +9 -0
  41. package/dist/providers/google/index.cjs.map +1 -1
  42. package/dist/providers/google/index.js +9 -0
  43. package/dist/providers/google/index.js.map +1 -1
  44. package/dist/providers/groq/index.cjs +9 -0
  45. package/dist/providers/groq/index.cjs.map +1 -1
  46. package/dist/providers/groq/index.js +9 -0
  47. package/dist/providers/groq/index.js.map +1 -1
  48. package/dist/providers/huggingface/index.cjs +9 -0
  49. package/dist/providers/huggingface/index.cjs.map +1 -1
  50. package/dist/providers/huggingface/index.js +9 -0
  51. package/dist/providers/huggingface/index.js.map +1 -1
  52. package/dist/providers/mistral/index.cjs +9 -0
  53. package/dist/providers/mistral/index.cjs.map +1 -1
  54. package/dist/providers/mistral/index.js +9 -0
  55. package/dist/providers/mistral/index.js.map +1 -1
  56. package/dist/providers/ollama/index.cjs +9 -0
  57. package/dist/providers/ollama/index.cjs.map +1 -1
  58. package/dist/providers/ollama/index.js +9 -0
  59. package/dist/providers/ollama/index.js.map +1 -1
  60. package/dist/providers/openai/index.cjs +9 -0
  61. package/dist/providers/openai/index.cjs.map +1 -1
  62. package/dist/providers/openai/index.js +9 -0
  63. package/dist/providers/openai/index.js.map +1 -1
  64. package/dist/providers/together/index.cjs +9 -0
  65. package/dist/providers/together/index.cjs.map +1 -1
  66. package/dist/providers/together/index.js +9 -0
  67. package/dist/providers/together/index.js.map +1 -1
  68. package/dist/providers/vercel-ai/index.cjs +9 -0
  69. package/dist/providers/vercel-ai/index.cjs.map +1 -1
  70. package/dist/providers/vercel-ai/index.js +9 -0
  71. package/dist/providers/vercel-ai/index.js.map +1 -1
  72. 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
- /** Whether to capture prompt/completion content (default: true) */
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
- /** Whether to capture prompt/completion content (default: true) */
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
- /** Whether to capture prompt/completion content (default: true) */
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
- /** Whether to capture prompt/completion content (default: true) */
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);