@promptbook/core 0.112.0-135 → 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.
- package/README.md +20 -0
- package/esm/index.es.js +3 -17
- package/esm/index.es.js.map +1 -1
- package/esm/servers.d.ts +1 -9
- package/esm/src/_packages/core.index.d.ts +0 -2
- 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 +2 -17
- package/umd/index.umd.js.map +1 -1
- package/umd/servers.d.ts +1 -9
- package/umd/src/_packages/core.index.d.ts +0 -2
- package/umd/src/utils/isTimingSafeEqualString.d.ts +25 -0
- package/umd/src/version.d.ts +1 -1
package/esm/servers.d.ts
CHANGED
|
@@ -25,15 +25,7 @@ type ServerConfiguration = {
|
|
|
25
25
|
url: string_promptbook_server_url;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* Used for "Adam" agent which is built in as default ancestor for new agents and other well known agents
|
|
31
|
-
*
|
|
32
|
-
* @public exported from `@promptbook/core`
|
|
33
|
-
*/
|
|
34
|
-
export declare const CORE_AGENTS_SERVER: ServerConfiguration;
|
|
35
|
-
/**
|
|
36
|
-
* Names of well known agents hosted on Core Promptbook server
|
|
28
|
+
* Names of well known agents bundled in the local `.core` folder of every Agents Server
|
|
37
29
|
*
|
|
38
30
|
* - `Adam`: The default ancestor agent for new agents
|
|
39
31
|
* - `Teacher`: Agent that knows book syntax and can help with self-learning
|
|
@@ -221,7 +221,6 @@ import { normalizeChatAttachments } from '../utils/chat/chatAttachments/normaliz
|
|
|
221
221
|
import { resolveChatAttachmentContents } from '../utils/chat/chatAttachments/resolveChatAttachmentContents';
|
|
222
222
|
import { aboutPromptbookInformation } from '../utils/misc/aboutPromptbookInformation';
|
|
223
223
|
import { $generateBookBoilerplate } from '../utils/random/$generateBookBoilerplate';
|
|
224
|
-
import { CORE_AGENTS_SERVER } from '../../servers';
|
|
225
224
|
import { CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES } from '../../servers';
|
|
226
225
|
import { PUBLIC_AGENTS_SERVERS } from '../../servers';
|
|
227
226
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
@@ -447,6 +446,5 @@ export { normalizeChatAttachments };
|
|
|
447
446
|
export { resolveChatAttachmentContents };
|
|
448
447
|
export { aboutPromptbookInformation };
|
|
449
448
|
export { $generateBookBoilerplate };
|
|
450
|
-
export { CORE_AGENTS_SERVER };
|
|
451
449
|
export { CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES };
|
|
452
450
|
export { PUBLIC_AGENTS_SERVERS };
|
|
@@ -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-136`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* @generated
|
|
30
30
|
* @see https://github.com/webgptorg/promptbook
|
|
31
31
|
*/
|
|
32
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
32
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-137';
|
|
33
33
|
/**
|
|
34
34
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
35
35
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -50369,20 +50369,7 @@
|
|
|
50369
50369
|
}
|
|
50370
50370
|
|
|
50371
50371
|
/**
|
|
50372
|
-
*
|
|
50373
|
-
*
|
|
50374
|
-
* Used for "Adam" agent which is built in as default ancestor for new agents and other well known agents
|
|
50375
|
-
*
|
|
50376
|
-
* @public exported from `@promptbook/core`
|
|
50377
|
-
*/
|
|
50378
|
-
const CORE_AGENTS_SERVER = {
|
|
50379
|
-
title: 'Promptbook Core',
|
|
50380
|
-
description: `Core Promptbook server used for Adam agent which is built in as default ancestor for new agents and other well known agents.`,
|
|
50381
|
-
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
50382
|
-
url: 'https://core.ptbk.io/',
|
|
50383
|
-
};
|
|
50384
|
-
/**
|
|
50385
|
-
* Names of well known agents hosted on Core Promptbook server
|
|
50372
|
+
* Names of well known agents bundled in the local `.core` folder of every Agents Server
|
|
50386
50373
|
*
|
|
50387
50374
|
* - `Adam`: The default ancestor agent for new agents
|
|
50388
50375
|
* - `Teacher`: Agent that knows book syntax and can help with self-learning
|
|
@@ -50408,7 +50395,6 @@
|
|
|
50408
50395
|
* @public exported from `@promptbook/core`
|
|
50409
50396
|
*/
|
|
50410
50397
|
const PUBLIC_AGENTS_SERVERS = [
|
|
50411
|
-
CORE_AGENTS_SERVER,
|
|
50412
50398
|
{
|
|
50413
50399
|
title: 'Promptbook Gallery',
|
|
50414
50400
|
description: `Gallery of ideas, AI professions,... like AI Agenta photobank.`,
|
|
@@ -50884,7 +50870,6 @@
|
|
|
50884
50870
|
exports.CLAIM = CLAIM;
|
|
50885
50871
|
exports.CLI_APP_ID = CLI_APP_ID;
|
|
50886
50872
|
exports.COLOR_CONSTANTS = COLOR_CONSTANTS;
|
|
50887
|
-
exports.CORE_AGENTS_SERVER = CORE_AGENTS_SERVER;
|
|
50888
50873
|
exports.CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES = CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES;
|
|
50889
50874
|
exports.CallbackInterfaceTools = CallbackInterfaceTools;
|
|
50890
50875
|
exports.ChatbotFormfactorDefinition = ChatbotFormfactorDefinition;
|