@promptbook/remote-server 0.112.0-136 → 0.112.0-137

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.
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Compares two strings in constant time to prevent timing attacks.
3
+ *
4
+ * Plain JavaScript `===` / `!==` string comparisons short-circuit on the first
5
+ * byte that differs, which lets a remote attacker who can measure response
6
+ * timing recover the expected value one byte at a time. This helper performs
7
+ * the comparison through Node's `timingSafeEqual`, which always inspects every
8
+ * byte of the equal-length buffers.
9
+ *
10
+ * Returning `false` early when the byte lengths differ does not expose
11
+ * character content — only length — which is an acceptable trade-off, since
12
+ * `timingSafeEqual` requires equal-length buffers and length is typically not
13
+ * secret.
14
+ *
15
+ * `null` and `undefined` inputs are treated as non-matching so callers can
16
+ * forward raw request values (for example `request.headers.get(name)`) without
17
+ * an extra guard.
18
+ *
19
+ * @param candidate - Value supplied by the caller (for example a request header or cookie).
20
+ * @param expected - Value to compare against (for example a configured secret).
21
+ * @returns `true` when both values are strings of equal length with identical bytes.
22
+ *
23
+ * @private internal helper function
24
+ */
25
+ export declare function isTimingSafeEqualString(candidate: string | null | undefined, expected: string | null | undefined): boolean;
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.112.0-135`).
18
+ * It follows semantic versioning (e.g., `0.112.0-136`).
19
19
  *
20
20
  * @generated
21
21
  */