@hs-x/checkpoint 0.1.0 → 0.1.3

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 +21 -3
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -1,8 +1,26 @@
1
1
  # @hs-x/checkpoint
2
2
 
3
- Checkpoint observability primitives for HS-X runtime instrumentation.
4
-
5
- This package defines fingerprinting, redaction, exemplar policy, fake writer behavior, and Cloudflare binding writers against the canonical schemas in `@hs-x/types`.
3
+ `@hs-x/checkpoint` is HS-X's observability primitive layer — how a deployed app
4
+ records what each capability invocation did (its outcome, duration, and an error
5
+ fingerprint) without leaking sensitive values. It defines fingerprinting,
6
+ redaction, exemplar sampling policy, fake/in-memory writers for tests, and the
7
+ Cloudflare binding writers that persist the data, all against the canonical
8
+ schemas in [`@hs-x/types`](https://www.npmjs.com/package/@hs-x/types).
9
+
10
+ You normally do **not** install this directly. It is a transitive dependency of
11
+ [`@hs-x/runtime`](https://www.npmjs.com/package/@hs-x/runtime), which calls it
12
+ for you when you enable checkpointing in `createRuntime(...)`. A fake-writer
13
+ surface for tests is published at the `@hs-x/checkpoint/test` subpath.
14
+
15
+ ## Recording an invocation
16
+
17
+ `recordCheckpointInvocation(...)` (and its Effect form,
18
+ `recordCheckpointInvocationEffect(...)`) emits a metric event plus, when the
19
+ exemplar policy selects it, a redacted exemplar to the configured
20
+ `CheckpointWriter`. `fingerprintError(...)` produces the stable error fingerprint
21
+ used to group failures; `redactCheckpointValue(...)` strips sensitive fields
22
+ before anything is stored. The sampling/budget rules come from
23
+ `createExemplarPolicy(...)`.
6
24
 
7
25
  ## Cloudflare writer
8
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hs-x/checkpoint",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "HS-X Checkpoint observability primitives — metrics, exemplars, fingerprinting, and redaction.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -34,5 +34,6 @@
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public"
37
- }
37
+ },
38
+ "license": "Apache-2.0"
38
39
  }