@elsium-ai/observe 0.1.6 → 0.1.7

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 (2) hide show
  1. package/README.md +47 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @elsium-ai/observe
2
+
3
+ Observability, tracing, cost tracking, and audit trail for [ElsiumAI](https://github.com/elsium-ai/elsium-ai).
4
+
5
+ [![npm](https://img.shields.io/npm/v/@elsium-ai/observe.svg)](https://www.npmjs.com/package/@elsium-ai/observe)
6
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/elsium-ai/elsium-ai/blob/main/LICENSE)
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install @elsium-ai/observe @elsium-ai/core
12
+ ```
13
+
14
+ ## What's Inside
15
+
16
+ - **Tracing** — Span-based tracing with nested context propagation
17
+ - **Cost Intelligence** — Budget tracking, projections, and loop detection
18
+ - **Audit Trail** — SHA-256 hash-chained events with tamper-proof integrity verification
19
+ - **Provenance Tracking** — Full lineage per traceId: prompt, model, config, input, output
20
+ - **Audit Middleware** — Drop-in middleware for automatic event recording
21
+
22
+ ## Usage
23
+
24
+ ```typescript
25
+ import { createAuditTrail, auditMiddleware, createProvenanceTracker, observe } from '@elsium-ai/observe'
26
+
27
+ // Hash-chained audit trail
28
+ const audit = createAuditTrail({ hashChain: true })
29
+
30
+ // Provenance tracking
31
+ const provenance = createProvenanceTracker()
32
+ provenance.record({ prompt, model, config, input, output, traceId })
33
+
34
+ // Tracing
35
+ const tracer = observe({ output: [], samplingRate: 1.0 })
36
+ const span = tracer.startSpan('request', 'llm-call')
37
+ // ... do work ...
38
+ span.end()
39
+ ```
40
+
41
+ ## Part of ElsiumAI
42
+
43
+ This package is the observability layer of the [ElsiumAI](https://github.com/elsium-ai/elsium-ai) framework. See the [full documentation](https://github.com/elsium-ai/elsium-ai) for guides and examples.
44
+
45
+ ## License
46
+
47
+ [MIT](https://github.com/elsium-ai/elsium-ai/blob/main/LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elsium-ai/observe",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Observability, tracing, and cost tracking for ElsiumAI",
5
5
  "license": "MIT",
6
6
  "author": "Eric Utrera <ebutrera9103@gmail.com>",