oracular 0.12.1 → 0.14.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.
@@ -26,8 +26,8 @@ interface Prediction {
26
26
  revealedAt: number | null;
27
27
  /**
28
28
  * When the current suppression ends: the later of the reveal cooldown (after `markRevealed`)
29
- * and the outcome cooldown (after the outcome event) still running at `at`, or null when
30
- * neither is. `shouldReveal` is false while this is non-null.
29
+ * and the outcome cooldown (`outcomeCooldown` after the outcome event) still running at `at`,
30
+ * or null when neither is. `shouldReveal` is false while this is non-null.
31
31
  */
32
32
  suppressedUntil: number | null;
33
33
  }
package/dist/inspect.d.ts CHANGED
@@ -26,8 +26,8 @@ interface Prediction {
26
26
  revealedAt: number | null;
27
27
  /**
28
28
  * When the current suppression ends: the later of the reveal cooldown (after `markRevealed`)
29
- * and the outcome cooldown (after the outcome event) still running at `at`, or null when
30
- * neither is. `shouldReveal` is false while this is non-null.
29
+ * and the outcome cooldown (`outcomeCooldown` after the outcome event) still running at `at`,
30
+ * or null when neither is. `shouldReveal` is false while this is non-null.
31
31
  */
32
32
  suppressedUntil: number | null;
33
33
  }
@@ -14,6 +14,13 @@ interface RevealOptions {
14
14
  z?: number;
15
15
  /** How long after `markRevealed` the intent stays revealed and `shouldReveal` is false. Default: the intent's `halfLife`. */
16
16
  cooldown?: number;
17
+ /**
18
+ * How long after the intent's outcome event `shouldReveal` stays false. Default: `cooldown`.
19
+ * 0 is allowed: the outcome then pauses nothing, while a reveal still starts its cooldown, for
20
+ * an intent whose outcome recurs within minutes, or a "stuck" intent whose help should be back
21
+ * at the next attempt.
22
+ */
23
+ outcomeCooldown?: number;
17
24
  /**
18
25
  * How `lower` is computed. `'normal'` (default): p − z·sd, clamped to [0, 1]. `'exact'`: the
19
26
  * Beta distribution's own quantile at the same one-sided level, Φ(−z), so `z` keeps its
package/dist/presets.d.ts CHANGED
@@ -14,6 +14,13 @@ interface RevealOptions {
14
14
  z?: number;
15
15
  /** How long after `markRevealed` the intent stays revealed and `shouldReveal` is false. Default: the intent's `halfLife`. */
16
16
  cooldown?: number;
17
+ /**
18
+ * How long after the intent's outcome event `shouldReveal` stays false. Default: `cooldown`.
19
+ * 0 is allowed: the outcome then pauses nothing, while a reveal still starts its cooldown, for
20
+ * an intent whose outcome recurs within minutes, or a "stuck" intent whose help should be back
21
+ * at the next attempt.
22
+ */
23
+ outcomeCooldown?: number;
17
24
  /**
18
25
  * How `lower` is computed. `'normal'` (default): p − z·sd, clamped to [0, 1]. `'exact'`: the
19
26
  * Beta distribution's own quantile at the same one-sided level, Φ(−z), so `z` keeps its
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oracular",
3
- "version": "0.12.1",
3
+ "version": "0.14.0",
4
4
  "description": "On-device intent engine. Your app learns when the user is ready. Nothing leaves the device.",
5
5
  "keywords": [
6
6
  "oracular",
@@ -93,7 +93,13 @@
93
93
  "examples/react-vite"
94
94
  ],
95
95
  "overrides": {
96
- "@types/react": "^19.3.0"
96
+ "@types/react": "^19.3.0",
97
+ "vitepress": {
98
+ "vite": "^6.4.5"
99
+ },
100
+ "tsup": {
101
+ "esbuild": "^0.28.2"
102
+ }
97
103
  },
98
104
  "scripts": {
99
105
  "build": "tsup && tsup --config tsup.presets.config.ts && tsup --config tsup.inspect.config.ts",
@@ -120,7 +120,12 @@
120
120
  "cooldown": {
121
121
  "type": "number",
122
122
  "minimum": 0,
123
- "description": "How long after a reveal or the outcome the intent stays quiet. Default: the intent's halfLife."
123
+ "description": "How long after a reveal the intent stays quiet. Default: the intent's halfLife. Also the pause after the outcome unless outcomeCooldown is set."
124
+ },
125
+ "outcomeCooldown": {
126
+ "type": "number",
127
+ "minimum": 0,
128
+ "description": "How long after the outcome event the intent stays quiet. Default: cooldown. 0 lets the outcome pause nothing while a reveal still starts its cooldown."
124
129
  },
125
130
  "bound": {
126
131
  "type": "string",