@aleph-ai/tinyaleph 1.4.2 → 1.4.4

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/package.json +14 -4
  2. package/telemetry/index.js +24 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aleph-ai/tinyaleph",
3
- "version": "1.4.2",
3
+ "version": "1.4.4",
4
4
  "description": "Prime-resonant semantic computing framework - hypercomplex algebra, oscillator dynamics, and entropy-minimizing reasoning",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
@@ -27,8 +27,8 @@
27
27
  "import": "./engine/index.js"
28
28
  },
29
29
  "./telemetry": {
30
- "require": "./telemetry/metrics.js",
31
- "import": "./telemetry/metrics.js"
30
+ "require": "./telemetry/index.js",
31
+ "import": "./telemetry/index.js"
32
32
  }
33
33
  },
34
34
  "scripts": {
@@ -99,7 +99,17 @@
99
99
  },
100
100
  "dependencies": {
101
101
  "@noble/curves": "^1.9.7",
102
- "@sschepis/resolang": "^0.4.1",
102
+ "@sschepis/resolang": "^0.4.1"
103
+ },
104
+ "optionalDependencies": {
103
105
  "@tensorflow/tfjs-node": "^4.22.0"
106
+ },
107
+ "peerDependencies": {
108
+ "@tensorflow/tfjs": "^4.0.0"
109
+ },
110
+ "peerDependenciesMeta": {
111
+ "@tensorflow/tfjs": {
112
+ "optional": true
113
+ }
104
114
  }
105
115
  }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Telemetry module for TinyAleph
3
+ *
4
+ * Provides Prometheus/OpenTelemetry-compatible metric types:
5
+ * - Counter: Monotonically increasing value
6
+ * - Gauge: Value that can go up and down
7
+ * - Histogram: Distribution of values in buckets
8
+ * - Summary: Quantile distribution
9
+ *
10
+ * Browser-compatible: No Node.js dependencies.
11
+ *
12
+ * @example
13
+ * const { MetricRegistry, Counter, Gauge } = require('@aleph-ai/tinyaleph/telemetry');
14
+ *
15
+ * const registry = new MetricRegistry({ prefix: 'myapp_' });
16
+ * const requests = registry.counter('requests_total', { help: 'Total requests' });
17
+ * requests.inc(1, { method: 'GET', status: '200' });
18
+ *
19
+ * console.log(registry.toPrometheus());
20
+ *
21
+ * @module @aleph-ai/tinyaleph/telemetry
22
+ */
23
+
24
+ module.exports = require('./metrics');