@mnemonik/shared 5.152.2 → 6.0.1

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.
@@ -17,15 +17,17 @@
17
17
  * Snapshot / file-context / policy-reminder / injections fetch budget. Critical-path.
18
18
  *
19
19
  * The bootstrap digest is delivered over `injections`, so it rides this 2s
20
- * budget. That is intentional and sufficient: the server side
21
- * (HooksDispatcher.buildBootstrapDigestPayload) only ever does a Redis GET on
22
- * the delivery path — a cold synthesis build is fired in the background
23
- * (fire-and-forget) and never awaited, so delivery is always sub-10ms. A cold
24
- * cache returns the static `session_bootstrap` directive within this budget
25
- * (the "cold-prompt" floor), never a blocked/empty response.
20
+ * budget. That is intentional and sufficient: on a warm cache
21
+ * (HooksDispatcher.buildBootstrapDigestPayload) delivery is a Redis GET plus
22
+ * render; on a cold cache the delivery path awaits buildColdFloorDigest — a
23
+ * parallel Promise.all of cheap DB reads raced under a 1500ms sub-budget
24
+ * and may return an enriched floor digest. The static `session_bootstrap`
25
+ * directive is the fallback only when the floor is entirely empty (or the
26
+ * floor fetch times out). A full synthesis build is fired in the background
27
+ * (fire-and-forget) and never awaited, so delivery never blocks on LLM work.
26
28
  *
27
29
  * Invariant: no endpoint on a hook's critical path may await an LLM synthesis
28
- * call; client timeouts here only ever need to cover a Redis/DB read.
30
+ * call; client timeouts here cover Redis/DB reads and the bounded cold floor.
29
31
  */
30
32
  export declare const FETCH_TIMEOUT_MS = 2000;
31
33
  /** Telemetry fan-out budget. Drop the metric rather than hold the user. */
@@ -1 +1 @@
1
- {"version":3,"file":"hookTimeouts.d.ts","sourceRoot":"","sources":["../src/hookTimeouts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,+GAA+G;AAC/G,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAIxF"}
1
+ {"version":3,"file":"hookTimeouts.d.ts","sourceRoot":"","sources":["../src/hookTimeouts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,+GAA+G;AAC/G,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAIxF"}
@@ -17,15 +17,17 @@
17
17
  * Snapshot / file-context / policy-reminder / injections fetch budget. Critical-path.
18
18
  *
19
19
  * The bootstrap digest is delivered over `injections`, so it rides this 2s
20
- * budget. That is intentional and sufficient: the server side
21
- * (HooksDispatcher.buildBootstrapDigestPayload) only ever does a Redis GET on
22
- * the delivery path — a cold synthesis build is fired in the background
23
- * (fire-and-forget) and never awaited, so delivery is always sub-10ms. A cold
24
- * cache returns the static `session_bootstrap` directive within this budget
25
- * (the "cold-prompt" floor), never a blocked/empty response.
20
+ * budget. That is intentional and sufficient: on a warm cache
21
+ * (HooksDispatcher.buildBootstrapDigestPayload) delivery is a Redis GET plus
22
+ * render; on a cold cache the delivery path awaits buildColdFloorDigest — a
23
+ * parallel Promise.all of cheap DB reads raced under a 1500ms sub-budget
24
+ * and may return an enriched floor digest. The static `session_bootstrap`
25
+ * directive is the fallback only when the floor is entirely empty (or the
26
+ * floor fetch times out). A full synthesis build is fired in the background
27
+ * (fire-and-forget) and never awaited, so delivery never blocks on LLM work.
26
28
  *
27
29
  * Invariant: no endpoint on a hook's critical path may await an LLM synthesis
28
- * call; client timeouts here only ever need to cover a Redis/DB read.
30
+ * call; client timeouts here cover Redis/DB reads and the bounded cold floor.
29
31
  */
30
32
  export const FETCH_TIMEOUT_MS = 2000;
31
33
  /** Telemetry fan-out budget. Drop the metric rather than hold the user. */
@@ -1 +1 @@
1
- {"version":3,"file":"hookTimeouts.js","sourceRoot":"","sources":["../src/hookTimeouts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAErC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAExC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAEzC,+GAA+G;AAC/G,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAAC,EAAU;IACxC,MAAM,EAAE,GAAG,IAAI,eAAe,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/C,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;AACnE,CAAC"}
1
+ {"version":3,"file":"hookTimeouts.js","sourceRoot":"","sources":["../src/hookTimeouts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAErC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AAExC,2FAA2F;AAC3F,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAEzC,+GAA+G;AAC/G,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAE5C;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAAC,EAAU;IACxC,MAAM,EAAE,GAAG,IAAI,eAAe,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/C,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC;AACnE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mnemonik/shared",
3
- "version": "5.152.2",
3
+ "version": "6.0.1",
4
4
  "description": "Shared constants and utilities for Mnemonik packages",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -18,15 +18,17 @@
18
18
  * Snapshot / file-context / policy-reminder / injections fetch budget. Critical-path.
19
19
  *
20
20
  * The bootstrap digest is delivered over `injections`, so it rides this 2s
21
- * budget. That is intentional and sufficient: the server side
22
- * (HooksDispatcher.buildBootstrapDigestPayload) only ever does a Redis GET on
23
- * the delivery path — a cold synthesis build is fired in the background
24
- * (fire-and-forget) and never awaited, so delivery is always sub-10ms. A cold
25
- * cache returns the static `session_bootstrap` directive within this budget
26
- * (the "cold-prompt" floor), never a blocked/empty response.
21
+ * budget. That is intentional and sufficient: on a warm cache
22
+ * (HooksDispatcher.buildBootstrapDigestPayload) delivery is a Redis GET plus
23
+ * render; on a cold cache the delivery path awaits buildColdFloorDigest — a
24
+ * parallel Promise.all of cheap DB reads raced under a 1500ms sub-budget
25
+ * and may return an enriched floor digest. The static `session_bootstrap`
26
+ * directive is the fallback only when the floor is entirely empty (or the
27
+ * floor fetch times out). A full synthesis build is fired in the background
28
+ * (fire-and-forget) and never awaited, so delivery never blocks on LLM work.
27
29
  *
28
30
  * Invariant: no endpoint on a hook's critical path may await an LLM synthesis
29
- * call; client timeouts here only ever need to cover a Redis/DB read.
31
+ * call; client timeouts here cover Redis/DB reads and the bounded cold floor.
30
32
  */
31
33
  export const FETCH_TIMEOUT_MS = 2000;
32
34