@promptbook/components 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/esm/servers.d.ts CHANGED
@@ -25,15 +25,7 @@ type ServerConfiguration = {
25
25
  url: string_promptbook_server_url;
26
26
  };
27
27
  /**
28
- * Core Promptbook server configuration
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;
@@ -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-133`).
18
+ * It follows semantic versioning (e.g., `0.112.0-136`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/components",
3
- "version": "0.112.0-135",
3
+ "version": "0.112.0-137",
4
4
  "description": "Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -103,6 +103,7 @@
103
103
  "@openai/agents": "0.4.15",
104
104
  "bottleneck": "2.19.5",
105
105
  "colors": "1.4.0",
106
+ "crypto": "1.0.1",
106
107
  "crypto-js": "4.2.0",
107
108
  "dompurify": "3.4.6",
108
109
  "html-to-image": "1.11.13",
package/umd/index.umd.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime'), require('spacetrim'), require('react'), require('crypto-js'), require('crypto-js/enc-hex'), require('path'), require('moment'), require('mime-types'), require('react-dom'), require('@monaco-editor/react'), require('rxjs'), require('dompurify'), require('katex'), require('showdown'), require('html-to-image'), require('jspdf'), require('react-dom/client'), require('lucide-react'), require('moment/locale/cs'), require('waitasecond'), require('crypto-js/sha256'), require('papaparse'), require('@openai/agents'), require('colors'), require('bottleneck'), require('openai'), require('qrcode')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime', 'spacetrim', 'react', 'crypto-js', 'crypto-js/enc-hex', 'path', 'moment', 'mime-types', 'react-dom', '@monaco-editor/react', 'rxjs', 'dompurify', 'katex', 'showdown', 'html-to-image', 'jspdf', 'react-dom/client', 'lucide-react', 'moment/locale/cs', 'waitasecond', 'crypto-js/sha256', 'papaparse', '@openai/agents', 'colors', 'bottleneck', 'openai', 'qrcode'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-components"] = {}, global.jsxRuntime, global.spacetrim, global.react, global.CryptoJS, global.hexEncoder, global.path, global.moment, global.mimeTypes, global.reactDom, global.MonacoEditor, global.rxjs, global.createDOMPurify, global.katex, global.showdown, global.htmlToImage, global.jspdf, global.client, global.lucideReact, null, global.waitasecond, global.sha256, global.papaparse, global.agents, global.colors, global.Bottleneck, global.OpenAI, global.QRCode));
5
- })(this, (function (exports, jsxRuntime, spacetrim, react, CryptoJS, hexEncoder, path, moment, mimeTypes, reactDom, MonacoEditor, rxjs, createDOMPurify, katex, showdown, htmlToImage, jspdf, client, lucideReact, cs, waitasecond, sha256, papaparse, agents, colors, Bottleneck, OpenAI, QRCode) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react/jsx-runtime'), require('spacetrim'), require('react'), require('crypto-js'), require('crypto-js/enc-hex'), require('path'), require('crypto'), require('moment'), require('mime-types'), require('react-dom'), require('@monaco-editor/react'), require('rxjs'), require('dompurify'), require('katex'), require('showdown'), require('html-to-image'), require('jspdf'), require('react-dom/client'), require('lucide-react'), require('moment/locale/cs'), require('waitasecond'), require('crypto-js/sha256'), require('papaparse'), require('@openai/agents'), require('colors'), require('bottleneck'), require('openai'), require('qrcode')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'react/jsx-runtime', 'spacetrim', 'react', 'crypto-js', 'crypto-js/enc-hex', 'path', 'crypto', 'moment', 'mime-types', 'react-dom', '@monaco-editor/react', 'rxjs', 'dompurify', 'katex', 'showdown', 'html-to-image', 'jspdf', 'react-dom/client', 'lucide-react', 'moment/locale/cs', 'waitasecond', 'crypto-js/sha256', 'papaparse', '@openai/agents', 'colors', 'bottleneck', 'openai', 'qrcode'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["promptbook-components"] = {}, global.jsxRuntime, global.spacetrim, global.react, global.CryptoJS, global.hexEncoder, global.path, null, global.moment, global.mimeTypes, global.reactDom, global.MonacoEditor, global.rxjs, global.createDOMPurify, global.katex, global.showdown, global.htmlToImage, global.jspdf, global.client, global.lucideReact, null, global.waitasecond, global.sha256, global.papaparse, global.agents, global.colors, global.Bottleneck, global.OpenAI, global.QRCode));
5
+ })(this, (function (exports, jsxRuntime, spacetrim, react, CryptoJS, hexEncoder, path, crypto$1, moment, mimeTypes, reactDom, MonacoEditor, rxjs, createDOMPurify, katex, showdown, htmlToImage, jspdf, client, lucideReact, cs, waitasecond, sha256, papaparse, agents, colors, Bottleneck, OpenAI, QRCode) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -34,7 +34,7 @@
34
34
  * @generated
35
35
  * @see https://github.com/webgptorg/promptbook
36
36
  */
37
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-135';
37
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-137';
38
38
  /**
39
39
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
40
40
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -22672,19 +22672,6 @@
22672
22672
  var styles$d = {"BookEditor":"BookEditor-module_BookEditor__s-0PU","bookEditorContainer":"BookEditor-module_bookEditorContainer__wLMwM","isVerbose":"BookEditor-module_isVerbose__VQ6iL","bookEditorWrapper":"BookEditor-module_bookEditorWrapper__twppD","isBorderRadiusDisabled":"BookEditor-module_isBorderRadiusDisabled__h1I3v","dropOverlay":"BookEditor-module_dropOverlay__xWWoX","bookEditorActionbar":"BookEditor-module_bookEditorActionbar__KW6dc","fullscreen":"BookEditor-module_fullscreen__rktsl","button":"BookEditor-module_button__hS390","savedNotification":"BookEditor-module_savedNotification__OiX9L","fadeOut":"BookEditor-module_fadeOut__q8JnR","uploadPanel":"BookEditor-module_uploadPanel__2JJtD","uploadPanelHeader":"BookEditor-module_uploadPanelHeader__pdJd2","uploadPanelTitle":"BookEditor-module_uploadPanelTitle__TJIVF","uploadPanelHeaderMeta":"BookEditor-module_uploadPanelHeaderMeta__Xw0uI","uploadPanelSummary":"BookEditor-module_uploadPanelSummary__rwSbG","uploadRowStatus":"BookEditor-module_uploadRowStatus__jsUb-","uploadRowMeta":"BookEditor-module_uploadRowMeta__1lz9h","uploadPanelProgressBar":"BookEditor-module_uploadPanelProgressBar__a6pjf","uploadPanelProgressFill":"BookEditor-module_uploadPanelProgressFill__l-TKR","uploadRowProgressBar":"BookEditor-module_uploadRowProgressBar__NoBA7","uploadPanelList":"BookEditor-module_uploadPanelList__VxEd5","uploadRow":"BookEditor-module_uploadRow__QiSFg","uploadRowHeader":"BookEditor-module_uploadRowHeader__po0j5","uploadRowName":"BookEditor-module_uploadRowName__doQRO","uploadRowProgressFill":"BookEditor-module_uploadRowProgressFill__TrP7e","uploadRowActions":"BookEditor-module_uploadRowActions__5Y1Mq","uploadActionButton":"BookEditor-module_uploadActionButton__CqJrr","uploadRowError":"BookEditor-module_uploadRowError__eEHWw","aboutPromptbookInformation":"BookEditor-module_aboutPromptbookInformation__eiBL0"};
22673
22673
  styleInject(css_248z$d);
22674
22674
 
22675
- /**
22676
- * Core Promptbook server configuration
22677
- *
22678
- * Used for "Adam" agent which is built in as default ancestor for new agents and other well known agents
22679
- *
22680
- * @public exported from `@promptbook/core`
22681
- */
22682
- const CORE_AGENTS_SERVER = {
22683
- title: 'Promptbook Core',
22684
- description: `Core Promptbook server used for Adam agent which is built in as default ancestor for new agents and other well known agents.`,
22685
- owner: PROMPTBOOK_LEGAL_ENTITY,
22686
- url: 'https://core.ptbk.io/',
22687
- };
22688
22675
  // <- TODO: [🆎] Allow to override (set) well-known agent names via Metadata
22689
22676
  /**
22690
22677
  * Available agents servers for the Promptbook
@@ -22694,7 +22681,6 @@
22694
22681
  * @public exported from `@promptbook/core`
22695
22682
  */
22696
22683
  const PUBLIC_AGENTS_SERVERS = [
22697
- CORE_AGENTS_SERVER,
22698
22684
  {
22699
22685
  title: 'Promptbook Gallery',
22700
22686
  description: `Gallery of ideas, AI professions,... like AI Agenta photobank.`,