@agimon-ai/doompi-telemetry 0.0.1-alpha.21 → 0.0.1-alpha.22

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 +43 -15
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # @agimon-ai/doompi-telemetry
2
2
 
3
- **Measure the harness without recording the work.**
3
+ Host-neutral telemetry helpers and Log Sink adapters shared by DoomPi packages.
4
4
 
5
- This is the shared telemetry library for Doompi runtimes. It emits metadata-only counters
6
- and spans: never prompt text, file contents, or the material the agent is working on. One
7
- library keeps event names and attributes consistent across extensions, which makes the
8
- result useful for debugging instead of merely plentiful.
5
+ This is a library, not a Pi extension. It has no Pi manifest or Pi peer dependency and should not be added to a DoomPi layer.
9
6
 
10
- This is part of [Doompi](https://www.npmjs.com/package/@agimon-ai/doompi). It is usually a
11
- transitive dependency rather than something users install on its own.
7
+ > **Alpha:** telemetry attributes and sink contracts may change between releases.
8
+
9
+ ## Requirements
10
+
11
+ - Node.js 22.19.0 or newer
12
12
 
13
13
  ## Install
14
14
 
@@ -16,17 +16,45 @@ transitive dependency rather than something users install on its own.
16
16
  npm install @agimon-ai/doompi-telemetry
17
17
  ```
18
18
 
19
- ## How it loads
19
+ ## Use
20
+
21
+ ```ts
22
+ import { createDoomTelemetry } from '@agimon-ai/doompi-telemetry';
23
+
24
+ const telemetry = createDoomTelemetry({
25
+ serviceName: 'review-extension',
26
+ packageName: '@example/review-extension',
27
+ cwd: process.cwd(),
28
+ env: process.env,
29
+ enableLogs: true,
30
+ enableTraces: true,
31
+ });
32
+
33
+ await telemetry.recordEvent('review.started', { 'review.file_count': 3 });
34
+ await telemetry.flush();
35
+ await telemetry.shutdown();
36
+ ```
37
+
38
+ The root and `/telemetry` subpath expose `createDoomTelemetry`, attribute sanitization, header creation, record subscriptions, and related types.
20
39
 
21
- This is a library, not a Pi extension. Doompi packages import it directly; there is no
22
- extension entry and nothing to add to `.doom/modes.yaml`.
40
+ ## Data and failure behavior
23
41
 
24
- ## Entry points
42
+ The adapter sanitizes attribute shapes and hashes selected identifiers before export. It is designed for operational metadata, but callers remain responsible for the values they pass. Do not attach prompt text, file contents, credentials, or unreviewed user data.
25
43
 
26
- | Import | Purpose |
27
- | --------------------------------------- | ------------------ |
28
- | `@agimon-ai/doompi-telemetry` | Shared library API |
29
- | `@agimon-ai/doompi-telemetry/telemetry` | Telemetry helpers |
44
+ Exception export is optional and can include error names, messages, and stack context. Those fields may disclose code paths or values even when ordinary attributes are metadata-only.
45
+
46
+ When no endpoint is configured, telemetry export becomes a no-op rather than breaking the host. Explicit file fallback must be enabled by the caller; it is not silently selected. Sink initialization, record, flush, and shutdown behavior is surfaced through status/diagnostic callbacks.
47
+
48
+ Common controls used by DoomPi hosts include `AGENT_TELEMETRY_DISABLED`, `OTEL_SDK_DISABLED`, and `AGENT_OTEL_TRACES`. Hosts must decide whether these variables, endpoint configuration, or explicit options have precedence in their integration.
49
+
50
+ ## Development
51
+
52
+ ```bash
53
+ pnpm build
54
+ pnpm typecheck
55
+ pnpm test
56
+ pnpm lint
57
+ ```
30
58
 
31
59
  ## License
32
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/doompi-telemetry",
3
- "version": "0.0.1-alpha.21",
3
+ "version": "0.0.1-alpha.22",
4
4
  "description": "Metadata-only LogSink telemetry for Doompi runtimes",
5
5
  "keywords": [
6
6
  "ai",
@@ -37,7 +37,7 @@
37
37
  "registry": "https://registry.npmjs.org/"
38
38
  },
39
39
  "dependencies": {
40
- "@agimon-ai/log-sink-mcp": "0.29.11"
40
+ "@agimon-ai/log-sink-mcp": "0.29.12"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "26.1.1",