@promptbook/markdown-utils 0.112.0-136 → 0.112.0-139
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.
- package/README.md +20 -0
- package/esm/index.es.js +1 -1
- package/esm/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
- package/esm/src/utils/isTimingSafeEqualString.d.ts +25 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +1 -1
- package/umd/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
- package/umd/src/utils/isTimingSafeEqualString.d.ts +25 -0
- package/umd/src/version.d.ts +1 -1
package/README.md
CHANGED
|
@@ -27,6 +27,26 @@ Create persistent AI agents that turn your company's scattered knowledge into ac
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
+
### Standalone VPS
|
|
31
|
+
|
|
32
|
+
Run the standalone VPS installer only on a fresh server. Interactive mode asks for the installation values:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
sudo curl -fsSL https://raw.githubusercontent.com/webgptorg/promptbook/refs/heads/main/other/vps/install.sh | bash
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Non-interactive mode takes defaults from command-line options and skips initial code-runner CLI setup, which can be configured later from the UI or SSH:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
sudo curl -fsSL https://raw.githubusercontent.com/webgptorg/promptbook/refs/heads/main/other/vps/install.sh | bash -s -- \
|
|
42
|
+
--non-interactive \
|
|
43
|
+
--yes-i-understand-that-script-should-be-run-on-fresh-server \
|
|
44
|
+
--domain s24.ptbk.io \
|
|
45
|
+
--openai-api-key sk-proj-abcdef \
|
|
46
|
+
--sentry-dsn https://abc@def.ingest.de.sentry.io/123 \
|
|
47
|
+
--admin-password xxx
|
|
48
|
+
```
|
|
49
|
+
|
|
30
50
|
|
|
31
51
|
|
|
32
52
|
<blockquote style="color: #ff8811">
|
package/esm/index.es.js
CHANGED
|
@@ -22,7 +22,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
22
22
|
* @generated
|
|
23
23
|
* @see https://github.com/webgptorg/promptbook
|
|
24
24
|
*/
|
|
25
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
25
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-139';
|
|
26
26
|
/**
|
|
27
27
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
28
28
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -26,7 +26,15 @@ export type TeamInternalAgentAccessHeadersOptions = {
|
|
|
26
26
|
/**
|
|
27
27
|
* Resolves the internal token used by same-server TEAM calls.
|
|
28
28
|
*
|
|
29
|
-
*
|
|
29
|
+
* `PROMPTBOOK_TEAM_AGENT_ACCESS_TOKEN` must be a dedicated secret — falling
|
|
30
|
+
* back to `ADMIN_PASSWORD`, `SUPABASE_SERVICE_ROLE_KEY`, or any other shared
|
|
31
|
+
* credential would let a leak of one secret compromise both authentication
|
|
32
|
+
* boundaries (admin login and same-server teammate-agent access). When the
|
|
33
|
+
* dedicated variable is missing, this function returns `null` so the calling
|
|
34
|
+
* server fails closed — same-server TEAM access is disabled and no header is
|
|
35
|
+
* sent — instead of silently authorizing requests with the wrong secret.
|
|
36
|
+
*
|
|
37
|
+
* @returns Hashed token, or `null` when the dedicated secret is not configured.
|
|
30
38
|
*
|
|
31
39
|
* @private internal Agents Server access wiring
|
|
32
40
|
*/
|
|
@@ -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;
|
package/esm/src/version.d.ts
CHANGED
|
@@ -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-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-137`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* @generated
|
|
26
26
|
* @see https://github.com/webgptorg/promptbook
|
|
27
27
|
*/
|
|
28
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
28
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-139';
|
|
29
29
|
/**
|
|
30
30
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
31
31
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -26,7 +26,15 @@ export type TeamInternalAgentAccessHeadersOptions = {
|
|
|
26
26
|
/**
|
|
27
27
|
* Resolves the internal token used by same-server TEAM calls.
|
|
28
28
|
*
|
|
29
|
-
*
|
|
29
|
+
* `PROMPTBOOK_TEAM_AGENT_ACCESS_TOKEN` must be a dedicated secret — falling
|
|
30
|
+
* back to `ADMIN_PASSWORD`, `SUPABASE_SERVICE_ROLE_KEY`, or any other shared
|
|
31
|
+
* credential would let a leak of one secret compromise both authentication
|
|
32
|
+
* boundaries (admin login and same-server teammate-agent access). When the
|
|
33
|
+
* dedicated variable is missing, this function returns `null` so the calling
|
|
34
|
+
* server fails closed — same-server TEAM access is disabled and no header is
|
|
35
|
+
* sent — instead of silently authorizing requests with the wrong secret.
|
|
36
|
+
*
|
|
37
|
+
* @returns Hashed token, or `null` when the dedicated secret is not configured.
|
|
30
38
|
*
|
|
31
39
|
* @private internal Agents Server access wiring
|
|
32
40
|
*/
|
|
@@ -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;
|
package/umd/src/version.d.ts
CHANGED
|
@@ -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-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-137`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|