@promptbook/node 0.104.0-1 → 0.104.0-3
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/index.es.js +20 -36
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/types.index.d.ts +8 -2
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +6 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatMessageItem.d.ts +5 -1
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
- package/esm/typings/src/book-components/Chat/CodeBlock/CodeBlock.d.ts +13 -0
- package/esm/typings/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
- package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +7 -11
- package/esm/typings/src/book-components/_common/Dropdown/Dropdown.d.ts +2 -2
- package/esm/typings/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +56 -0
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +13 -7
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +6 -0
- package/esm/typings/src/commitments/DICTIONARY/DICTIONARY.d.ts +46 -0
- package/esm/typings/src/commitments/index.d.ts +2 -1
- package/esm/typings/src/llm-providers/ollama/OllamaExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +1 -1
- package/esm/typings/src/types/Message.d.ts +49 -0
- package/esm/typings/src/types/typeAliases.d.ts +12 -0
- package/esm/typings/src/utils/environment/$detectRuntimeEnvironment.d.ts +4 -4
- package/esm/typings/src/utils/environment/$isRunningInBrowser.d.ts +1 -1
- package/esm/typings/src/utils/environment/$isRunningInJest.d.ts +1 -1
- package/esm/typings/src/utils/environment/$isRunningInNode.d.ts +1 -1
- package/esm/typings/src/utils/environment/$isRunningInWebWorker.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +2 -2
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
- package/esm/typings/src/utils/random/$randomBase58.d.ts +12 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +24 -40
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -28,7 +28,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
28
28
|
* @generated
|
|
29
29
|
* @see https://github.com/webgptorg/promptbook
|
|
30
30
|
*/
|
|
31
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.104.0-
|
|
31
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.104.0-3';
|
|
32
32
|
/**
|
|
33
33
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
34
34
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -10811,13 +10811,14 @@ async function compilePipeline(pipelineString, tools, options) {
|
|
|
10811
10811
|
*
|
|
10812
10812
|
* @public exported from `@promptbook/utils`
|
|
10813
10813
|
*/
|
|
10814
|
-
|
|
10814
|
+
function $isRunningInNode() {
|
|
10815
10815
|
try {
|
|
10816
|
-
return
|
|
10817
|
-
}
|
|
10816
|
+
return typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
|
|
10817
|
+
}
|
|
10818
|
+
catch (e) {
|
|
10818
10819
|
return false;
|
|
10819
10820
|
}
|
|
10820
|
-
|
|
10821
|
+
}
|
|
10821
10822
|
/**
|
|
10822
10823
|
* TODO: [🎺]
|
|
10823
10824
|
*/
|
|
@@ -11378,7 +11379,7 @@ function $registeredLlmToolsMessage() {
|
|
|
11378
11379
|
${i + 1}) **${title}** \`${className}\` from \`${packageName}\`
|
|
11379
11380
|
${morePieces.join('; ')}
|
|
11380
11381
|
`);
|
|
11381
|
-
if ($isRunningInNode) {
|
|
11382
|
+
if ($isRunningInNode()) {
|
|
11382
11383
|
if (isInstalled && isFullyConfigured) {
|
|
11383
11384
|
providerMessage = colors.green(providerMessage);
|
|
11384
11385
|
}
|
|
@@ -11482,13 +11483,14 @@ async function $provideLlmToolsConfigurationFromEnv() {
|
|
|
11482
11483
|
*
|
|
11483
11484
|
* @public exported from `@promptbook/utils`
|
|
11484
11485
|
*/
|
|
11485
|
-
|
|
11486
|
+
function $isRunningInBrowser() {
|
|
11486
11487
|
try {
|
|
11487
|
-
return
|
|
11488
|
-
}
|
|
11488
|
+
return typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
11489
|
+
}
|
|
11490
|
+
catch (e) {
|
|
11489
11491
|
return false;
|
|
11490
11492
|
}
|
|
11491
|
-
|
|
11493
|
+
}
|
|
11492
11494
|
/**
|
|
11493
11495
|
* TODO: [🎺]
|
|
11494
11496
|
*/
|
|
@@ -11500,17 +11502,17 @@ const $isRunningInBrowser = new Function(`
|
|
|
11500
11502
|
*
|
|
11501
11503
|
* @public exported from `@promptbook/utils`
|
|
11502
11504
|
*/
|
|
11503
|
-
|
|
11505
|
+
function $isRunningInWebWorker() {
|
|
11504
11506
|
try {
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11507
|
+
// Note: Check for importScripts which is specific to workers
|
|
11508
|
+
// and not available in the main browser thread
|
|
11509
|
+
return (typeof self !== 'undefined' &&
|
|
11510
|
+
typeof self.importScripts === 'function');
|
|
11511
|
+
}
|
|
11512
|
+
catch (e) {
|
|
11511
11513
|
return false;
|
|
11512
11514
|
}
|
|
11513
|
-
|
|
11515
|
+
}
|
|
11514
11516
|
/**
|
|
11515
11517
|
* TODO: [🎺]
|
|
11516
11518
|
*/
|
|
@@ -11665,24 +11667,6 @@ async function $provideScrapersForNode(tools, options) {
|
|
|
11665
11667
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
11666
11668
|
*/
|
|
11667
11669
|
|
|
11668
|
-
/**
|
|
11669
|
-
* Detects if the code is running in jest environment
|
|
11670
|
-
*
|
|
11671
|
-
* Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
|
|
11672
|
-
*
|
|
11673
|
-
* @public exported from `@promptbook/utils`
|
|
11674
|
-
*/
|
|
11675
|
-
new Function(`
|
|
11676
|
-
try {
|
|
11677
|
-
return process.env.JEST_WORKER_ID !== undefined;
|
|
11678
|
-
} catch (e) {
|
|
11679
|
-
return false;
|
|
11680
|
-
}
|
|
11681
|
-
`);
|
|
11682
|
-
/**
|
|
11683
|
-
* TODO: [🎺]
|
|
11684
|
-
*/
|
|
11685
|
-
|
|
11686
11670
|
/**
|
|
11687
11671
|
* Makes first letter of a string lowercase
|
|
11688
11672
|
*
|