@mongrov/analytics 0.20.0 → 0.21.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ziva.d.ts","sourceRoot":"","sources":["../../../src/rules/defaults/ziva.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AA8SrC,eAAO,MAAM,YAAY,EAAE,IAAI,EAAyC,CAAA"}
1
+ {"version":3,"file":"ziva.d.ts","sourceRoot":"","sources":["../../../src/rules/defaults/ziva.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAkVrC,eAAO,MAAM,YAAY,EAAE,IAAI,EAAyC,CAAA"}
@@ -303,6 +303,42 @@ direction = "above"
303
303
  [rule.throttle]
304
304
  minGapMinutes = 1440
305
305
  maxPerDay = 1
306
+
307
+ # ── Heart rate (D-G + HR slot table, 2026-08-19) ────────────────────────────
308
+ #
309
+ # High-only in v1: a low resting rate is usually fitness, and alerting on it
310
+ # would be wrong far more often than right.
311
+ #
312
+ # The rule is RESTING-GATED, which is what makes it safe to state an absolute
313
+ # number. 160 bpm on a run is not a finding; 105 bpm sitting still is. The gate
314
+ # is \`context = "resting"\` — no movement within +/-15 min — corrected in
315
+ # analytics 0.20.0 from an older form that would have dropped every sample on
316
+ # a device that only reports activity while the user moves.
317
+ #
318
+ # \`consecutive = 3\` at the 10-minute HR cadence is about half an hour of
319
+ # sustained elevation at rest, slot-adjacent, so a gap breaks the run.
320
+
321
+ [[rule]]
322
+ id = "ziva.hr-flag-level"
323
+ brand = "ziva"
324
+ name = "Resting heart rate stayed high"
325
+ description = "Resting heart rate at or above your flag level for three consecutive readings."
326
+ metric = "hr_bpm"
327
+ window = "24h"
328
+ aggregation = "avg"
329
+ compare = "greater_than_or_equal"
330
+ context = "resting"
331
+ consecutive = 3
332
+ severity = "warn"
333
+
334
+ [rule.target]
335
+ type = "user_setting"
336
+ key = "user:hrFlagLevel"
337
+ defaultValue = 100
338
+
339
+ [rule.throttle]
340
+ minGapMinutes = 60
341
+ maxPerDay = 3
306
342
  `;
307
343
  export const zivaDefaults = parseCatalog(TOML, { name: 'ziva' });
308
344
  //# sourceMappingURL=ziva.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ziva.js","sourceRoot":"","sources":["../../../src/rules/defaults/ziva.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAySZ,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAW,YAAY,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA"}
1
+ {"version":3,"file":"ziva.js","sourceRoot":"","sources":["../../../src/rules/defaults/ziva.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6UZ,CAAA;AAED,MAAM,CAAC,MAAM,YAAY,GAAW,YAAY,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mongrov/analytics",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "sideEffects": false,
5
5
  "description": "DuckDB + R2 Iceberg local analytics for @mongrov apps",
6
6
  "license": "MIT",
@@ -61,7 +61,7 @@
61
61
  ],
62
62
  "peerDependencies": {
63
63
  "@modelcontextprotocol/sdk": ">=1.20.0",
64
- "@mongrov/types": "^0.6.0",
64
+ "@mongrov/types": "^0.8.0",
65
65
  "ai": ">=4",
66
66
  "react": ">=19",
67
67
  "react-native": ">=0.81",
@@ -107,8 +107,8 @@
107
107
  "typescript": "^5.9.3",
108
108
  "vitest": "^2.1.9",
109
109
  "zod": "^3.23.8",
110
- "@mongrov/types": "0.7.0",
111
- "@mongrov/db": "0.3.0"
110
+ "@mongrov/db": "0.3.0",
111
+ "@mongrov/types": "0.8.0"
112
112
  },
113
113
  "scripts": {
114
114
  "build": "tsc -p tsconfig.build.json",