@contractspec/lib.personalization 3.4.3 → 4.0.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 (2) hide show
  1. package/README.md +10 -0
  2. package/package.json +15 -9
package/README.md CHANGED
@@ -14,6 +14,16 @@ Composable behavior tracking and personalization primitives for ContractSpec app
14
14
 
15
15
  See `docs/tech/personalization/behavior-tracking.md` for full usage notes.
16
16
 
17
+ ## Bundle spec / surface-runtime alignment
18
+
19
+ When using `@contractspec/lib.surface-runtime`, the types in `./preference-dimensions` are the canonical source for preference resolution:
20
+
21
+ - **`PreferenceDimensions`** — 7-dimension model (guidance, density, dataDepth, control, media, pace, narrative)
22
+ - **`BundlePreferenceAdapter`** — Interface for resolving and persisting preferences; surface-runtime's `resolvePreferenceProfile` consumes adapters implementing this interface
23
+ - **`ResolvedPreferenceProfile`** — Canonical values with source attribution; aligns with surface-runtime's adaptation output
24
+
25
+ Pass a `BundlePreferenceAdapter` implementation to `resolveBundle` options when integrating personalization with surface-runtime.
26
+
17
27
 
18
28
 
19
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contractspec/lib.personalization",
3
- "version": "3.4.3",
3
+ "version": "4.0.2",
4
4
  "description": "Behavior tracking, analysis, and adaptation helpers for ContractSpec personalization.",
5
5
  "keywords": [
6
6
  "contractspec",
@@ -32,20 +32,26 @@
32
32
  "typecheck": "tsc --noEmit"
33
33
  },
34
34
  "dependencies": {
35
- "@contractspec/lib.bus": "3.4.3",
36
- "@contractspec/lib.schema": "3.4.3",
37
- "@contractspec/lib.contracts-spec": "3.4.3",
38
- "@contractspec/lib.knowledge": "3.4.3",
39
- "@contractspec/lib.overlay-engine": "3.4.3",
35
+ "@contractspec/lib.bus": "3.5.2",
36
+ "@contractspec/lib.schema": "3.5.2",
37
+ "@contractspec/lib.contracts-spec": "3.5.2",
38
+ "@contractspec/lib.knowledge": "3.5.2",
39
+ "@contractspec/lib.overlay-engine": "3.5.2",
40
40
  "@opentelemetry/api": "^1.9.0"
41
41
  },
42
42
  "peerDependencies": {
43
- "@opentelemetry/api": "^1.9.0"
43
+ "@opentelemetry/api": "^1.9.0",
44
+ "@contractspec/lib.surface-runtime": "0.3.2"
45
+ },
46
+ "peerDependenciesMeta": {
47
+ "@contractspec/lib.surface-runtime": {
48
+ "optional": true
49
+ }
44
50
  },
45
51
  "devDependencies": {
46
- "@contractspec/tool.typescript": "3.4.3",
52
+ "@contractspec/tool.typescript": "3.5.2",
47
53
  "typescript": "^5.9.3",
48
- "@contractspec/tool.bun": "3.4.3"
54
+ "@contractspec/tool.bun": "3.5.2"
49
55
  },
50
56
  "exports": {
51
57
  ".": {