@promptbook/core 0.104.0-17 → 0.104.0-18
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 +75 -64
- package/esm/index.es.js.map +1 -1
- package/esm/typings/servers.d.ts +15 -10
- package/esm/typings/src/_packages/core.index.d.ts +8 -6
- package/esm/typings/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +1 -1
- package/esm/typings/src/config.d.ts +8 -1
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +78 -66
- package/umd/index.umd.js.map +1 -1
package/esm/index.es.js
CHANGED
|
@@ -27,70 +27,12 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
27
27
|
* @generated
|
|
28
28
|
* @see https://github.com/webgptorg/promptbook
|
|
29
29
|
*/
|
|
30
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.104.0-
|
|
30
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.104.0-18';
|
|
31
31
|
/**
|
|
32
32
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
33
33
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* Core Promptbook server configuration.
|
|
38
|
-
*
|
|
39
|
-
* This server is also used for auto-federation in the Agents Server.
|
|
40
|
-
*
|
|
41
|
-
* @public exported from `@promptbook/core`
|
|
42
|
-
*/
|
|
43
|
-
const CORE_SERVER = {
|
|
44
|
-
title: 'Promptbook Core',
|
|
45
|
-
description: `Core Promptbook server used for auto-federation`,
|
|
46
|
-
owner: 'AI Web, LLC <legal@ptbk.io> (https://www.ptbk.io/)',
|
|
47
|
-
urls: ['https://core.ptbk.io/'],
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Available remote servers for the Promptbook
|
|
51
|
-
*
|
|
52
|
-
* @public exported from `@promptbook/core`
|
|
53
|
-
*/
|
|
54
|
-
const REMOTE_SERVER_URLS = [
|
|
55
|
-
{
|
|
56
|
-
title: 'Promptbook.Studio',
|
|
57
|
-
description: `Server of Promptbook.studio`,
|
|
58
|
-
owner: 'AI Web, LLC <legal@ptbk.io> (https://www.ptbk.io/)',
|
|
59
|
-
urls: [
|
|
60
|
-
'https://promptbook.s5.ptbk.io/',
|
|
61
|
-
// Note: Servers 1-4 are not running
|
|
62
|
-
],
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
title: 'Testing Agents',
|
|
66
|
-
description: `Testing Agents server on Vercel`,
|
|
67
|
-
owner: 'AI Web, LLC <legal@ptbk.io> (https://www.ptbk.io/)',
|
|
68
|
-
urls: ['https://s6.ptbk.io/'],
|
|
69
|
-
},
|
|
70
|
-
CORE_SERVER,
|
|
71
|
-
/*
|
|
72
|
-
Note: Working on older version of Promptbook and not supported anymore
|
|
73
|
-
{
|
|
74
|
-
title: 'Pavol Promptbook Server',
|
|
75
|
-
description: `Personal server of Pavol Hejný with simple testing server, DO NOT USE IT FOR PRODUCTION`,
|
|
76
|
-
owner: 'Pavol Hejný <pavol@ptbk.io> (https://www.pavolhejny.com/)',
|
|
77
|
-
isAnonymousModeAllowed: true,
|
|
78
|
-
urls: ['https://api.pavolhejny.com/promptbook'],
|
|
79
|
-
},
|
|
80
|
-
*/
|
|
81
|
-
];
|
|
82
|
-
/**
|
|
83
|
-
* Remote servers that are auto-federated by the Agents Server.
|
|
84
|
-
*
|
|
85
|
-
* These servers are always added in addition to the `FEDERATED_SERVERS` metadata.
|
|
86
|
-
*
|
|
87
|
-
* @public exported from `@promptbook/core`
|
|
88
|
-
*/
|
|
89
|
-
const AUTO_FEDERATED_AGENT_SERVER_URLS = CORE_SERVER.urls;
|
|
90
|
-
/**
|
|
91
|
-
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
36
|
/**
|
|
95
37
|
* Trims string from all 4 sides
|
|
96
38
|
*
|
|
@@ -1007,6 +949,12 @@ const NAME = `Promptbook`;
|
|
|
1007
949
|
* @public exported from `@promptbook/core`
|
|
1008
950
|
*/
|
|
1009
951
|
const ADMIN_EMAIL = 'pavol@ptbk.io';
|
|
952
|
+
/**
|
|
953
|
+
* Email of the responsible person
|
|
954
|
+
*
|
|
955
|
+
* @public exported from `@promptbook/core`
|
|
956
|
+
*/
|
|
957
|
+
const PROMPTBOOK_LEGAL_ENTITY = 'AI Web, LLC <legal@ptbk.io> (https://www.ptbk.io/)';
|
|
1010
958
|
/**
|
|
1011
959
|
* Name of the responsible person for the Promptbook on GitHub
|
|
1012
960
|
*
|
|
@@ -1278,9 +1226,10 @@ const MOMENT_ARG_THRESHOLDS = {
|
|
|
1278
1226
|
/**
|
|
1279
1227
|
* Default remote server URL for the Promptbook
|
|
1280
1228
|
*
|
|
1229
|
+
* @deprecated !!!! Deprecate all pipelines server
|
|
1281
1230
|
* @public exported from `@promptbook/core`
|
|
1282
1231
|
*/
|
|
1283
|
-
const DEFAULT_REMOTE_SERVER_URL =
|
|
1232
|
+
const DEFAULT_REMOTE_SERVER_URL = `https://promptbook.s5.ptbk.io/`;
|
|
1284
1233
|
// <- TODO: [🧜♂️]
|
|
1285
1234
|
/**
|
|
1286
1235
|
* Default settings for parsing and generating CSV files in Promptbook.
|
|
@@ -12241,7 +12190,7 @@ const DEFAULT_BOOK = padBook(validateBook(spaceTrim$2(`
|
|
|
12241
12190
|
*
|
|
12242
12191
|
* @public exported from `@promptbook/core`
|
|
12243
12192
|
*/
|
|
12244
|
-
function generatePlaceholderAgentProfileImageUrl(agentIdOrName, agentsServerUrl
|
|
12193
|
+
function generatePlaceholderAgentProfileImageUrl(agentIdOrName, agentsServerUrl) {
|
|
12245
12194
|
if (typeof agentsServerUrl === 'string') {
|
|
12246
12195
|
agentsServerUrl = new URL(agentsServerUrl);
|
|
12247
12196
|
}
|
|
@@ -21264,6 +21213,69 @@ const OpenAiSdkTranspiler = {
|
|
|
21264
21213
|
},
|
|
21265
21214
|
};
|
|
21266
21215
|
|
|
21216
|
+
/**
|
|
21217
|
+
* Core Promptbook server configuration
|
|
21218
|
+
*
|
|
21219
|
+
* Used for "Adam" agent which is built in as default ancestor for new agents and other well known agents
|
|
21220
|
+
*
|
|
21221
|
+
* @public exported from `@promptbook/core`
|
|
21222
|
+
*/
|
|
21223
|
+
const CORE_AGENTS_SERVER = {
|
|
21224
|
+
title: 'Promptbook Core',
|
|
21225
|
+
description: `Core Promptbook server used for Adam agent which is built in as default ancestor for new agents and other well known agents.`,
|
|
21226
|
+
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
21227
|
+
url: 'https://core.ptbk.io/',
|
|
21228
|
+
};
|
|
21229
|
+
/**
|
|
21230
|
+
* @@@@
|
|
21231
|
+
*
|
|
21232
|
+
* @public exported from `@promptbook/core`
|
|
21233
|
+
*/
|
|
21234
|
+
const CORE_AGENTS_SERVER_ADAM_AGENT_NAME = 'adam';
|
|
21235
|
+
/**
|
|
21236
|
+
* @@@@
|
|
21237
|
+
*
|
|
21238
|
+
* @public exported from `@promptbook/core`
|
|
21239
|
+
*/
|
|
21240
|
+
// !!!! export const CORE_AGENTS_SERVER_ADAM_AGENT_NAME: string_agent_name = 'adam';
|
|
21241
|
+
/**
|
|
21242
|
+
* Available agents servers for the Promptbook
|
|
21243
|
+
*
|
|
21244
|
+
* Tip: 💡 If you are running your own server, you can add it to this list by creating a pull request!
|
|
21245
|
+
*
|
|
21246
|
+
* @public exported from `@promptbook/core`
|
|
21247
|
+
*/
|
|
21248
|
+
const PUBLIC_AGENTS_SERVERS = [
|
|
21249
|
+
CORE_AGENTS_SERVER,
|
|
21250
|
+
{
|
|
21251
|
+
title: 'Promptbook Gallery',
|
|
21252
|
+
description: `Gallery of ideas, AI professions,... like AI Agenta photobank.`,
|
|
21253
|
+
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
21254
|
+
url: 'https://gallery.ptbk.io/',
|
|
21255
|
+
},
|
|
21256
|
+
{
|
|
21257
|
+
title: 'Promptbook Testing server 6',
|
|
21258
|
+
description: `General-purpose testing server.`,
|
|
21259
|
+
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
21260
|
+
url: 'https://s6.ptbk.io/',
|
|
21261
|
+
},
|
|
21262
|
+
{
|
|
21263
|
+
title: 'Promptbook Testing server 7',
|
|
21264
|
+
description: `General-purpose testing server.`,
|
|
21265
|
+
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
21266
|
+
url: 'https://s7.ptbk.io/',
|
|
21267
|
+
},
|
|
21268
|
+
{
|
|
21269
|
+
title: 'Promptbook Testing server 8',
|
|
21270
|
+
description: `General-purpose testing server.`,
|
|
21271
|
+
owner: PROMPTBOOK_LEGAL_ENTITY,
|
|
21272
|
+
url: 'https://s8.ptbk.io/',
|
|
21273
|
+
},
|
|
21274
|
+
];
|
|
21275
|
+
/**
|
|
21276
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
21277
|
+
*/
|
|
21278
|
+
|
|
21267
21279
|
/**
|
|
21268
21280
|
* Provide information about Promptbook, engine version, book language version, servers, ...
|
|
21269
21281
|
*
|
|
@@ -21291,8 +21303,7 @@ function aboutPromptbookInformation(options) {
|
|
|
21291
21303
|
|
|
21292
21304
|
## Servers
|
|
21293
21305
|
|
|
21294
|
-
${block(
|
|
21295
|
-
`).join('\n'))}
|
|
21306
|
+
${block(PUBLIC_AGENTS_SERVERS.map(({ title, url, description }, index) => `${index + 1}. ${title} ${description} ${url}`).join('\n'))}
|
|
21296
21307
|
`);
|
|
21297
21308
|
fullInfoPieces.push(serversInfo);
|
|
21298
21309
|
}
|
|
@@ -21668,5 +21679,5 @@ function $generateBookBoilerplate(options) {
|
|
|
21668
21679
|
* TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
|
|
21669
21680
|
*/
|
|
21670
21681
|
|
|
21671
|
-
export { $bookTranspilersRegister, $generateBookBoilerplate, $llmToolsMetadataRegister, $llmToolsRegister, $scrapersMetadataRegister, $scrapersRegister, ADMIN_EMAIL, ADMIN_GITHUB_NAME, API_REQUEST_TIMEOUT,
|
|
21682
|
+
export { $bookTranspilersRegister, $generateBookBoilerplate, $llmToolsMetadataRegister, $llmToolsRegister, $scrapersMetadataRegister, $scrapersRegister, ADMIN_EMAIL, ADMIN_GITHUB_NAME, API_REQUEST_TIMEOUT, AbstractFormatError, Agent, AgentCollectionInSupabase, AgentLlmExecutionTools, AuthenticationError, BIG_DATASET_TRESHOLD, BOOK_LANGUAGE_VERSION, BlackholeStorage, BoilerplateError, BoilerplateFormfactorDefinition, CLAIM, CLI_APP_ID, CORE_AGENTS_SERVER, CORE_AGENTS_SERVER_ADAM_AGENT_NAME, CallbackInterfaceTools, ChatbotFormfactorDefinition, CollectionError, CompletionFormfactorDefinition, CsvFormatError, CsvFormatParser, DEFAULT_AGENTS_DIRNAME, DEFAULT_BOOK, DEFAULT_BOOKS_DIRNAME, DEFAULT_BOOK_OUTPUT_PARAMETER_NAME, DEFAULT_BOOK_TITLE, DEFAULT_CSV_SETTINGS, DEFAULT_DOWNLOAD_CACHE_DIRNAME, DEFAULT_EXECUTION_CACHE_DIRNAME, DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME, DEFAULT_INTERMEDIATE_FILES_STRATEGY, DEFAULT_IS_AUTO_INSTALLED, DEFAULT_IS_VERBOSE, DEFAULT_MAX_EXECUTION_ATTEMPTS, DEFAULT_MAX_FILE_SIZE, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL, DEFAULT_MAX_PARALLEL_COUNT, DEFAULT_MAX_REQUESTS_PER_MINUTE, DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME, DEFAULT_PROMPT_TASK_TITLE, DEFAULT_REMOTE_SERVER_URL, DEFAULT_SCRAPE_CACHE_DIRNAME, DEFAULT_TASK_SIMULATED_DURATION_MS, DEFAULT_TASK_TITLE, DatabaseError, EXPECTATION_UNITS, EnvironmentMismatchError, ExecutionReportStringOptionsDefaults, ExpectError, FAILED_VALUE_PLACEHOLDER, FORMFACTOR_DEFINITIONS, FormattedBookInMarkdownTranspiler, GENERIC_PIPELINE_INTERFACE, GeneratorFormfactorDefinition, GenericFormfactorDefinition, ImageGeneratorFormfactorDefinition, KnowledgeScrapeError, LimitReachedError, MANDATORY_CSV_SETTINGS, MAX_FILENAME_LENGTH, MODEL_ORDERS, MODEL_TRUST_LEVELS, MODEL_VARIANTS, MatcherFormfactorDefinition, MemoryStorage, MissingToolsError, MultipleLlmExecutionTools, NAME, NonTaskSectionTypes, NotAllowed, NotFoundError, NotYetImplementedCommitmentDefinition, NotYetImplementedError, ORDER_OF_PIPELINE_JSON, OpenAiSdkTranspiler, PADDING_LINES, PENDING_VALUE_PLACEHOLDER, PLAYGROUND_APP_ID, PROMPTBOOK_CHAT_COLOR, PROMPTBOOK_COLOR, PROMPTBOOK_ENGINE_VERSION, PROMPTBOOK_ERRORS, PROMPTBOOK_LEGAL_ENTITY, PROMPTBOOK_LOGO_URL, PROMPTBOOK_SYNTAX_COLORS, PUBLIC_AGENTS_SERVERS, ParseError, PipelineExecutionError, PipelineLogicError, PipelineUrlError, PrefixStorage, PromptbookFetchError, RESERVED_PARAMETER_NAMES, RemoteAgent, SET_IS_VERBOSE, SectionTypes, SheetsFormfactorDefinition, TaskTypes, TextFormatParser, TranslatorFormfactorDefinition, UNCERTAIN_USAGE, UNCERTAIN_ZERO_VALUE, USER_CHAT_COLOR, UnexpectedError, WrappedError, ZERO_USAGE, ZERO_VALUE, _AgentMetadata, _AgentRegistration, _AnthropicClaudeMetadataRegistration, _AzureOpenAiMetadataRegistration, _BoilerplateScraperMetadataRegistration, _DeepseekMetadataRegistration, _DocumentScraperMetadataRegistration, _GoogleMetadataRegistration, _LegacyDocumentScraperMetadataRegistration, _MarkdownScraperMetadataRegistration, _MarkitdownScraperMetadataRegistration, _OllamaMetadataRegistration, _OpenAiAssistantMetadataRegistration, _OpenAiCompatibleMetadataRegistration, _OpenAiMetadataRegistration, _PdfScraperMetadataRegistration, _WebsiteScraperMetadataRegistration, aboutPromptbookInformation, addUsage, book, cacheLlmTools, compilePipeline, computeAgentHash, computeCosineSimilarity, countUsage, createAgentLlmExecutionTools, createAgentModelRequirements, createAgentModelRequirementsWithCommitments, createBasicAgentModelRequirements, createDefaultAgentName, createEmptyAgentModelRequirements, createLlmToolsFromConfiguration, createPipelineCollectionFromJson, createPipelineCollectionFromPromise, createPipelineCollectionFromUrl, createPipelineExecutor, createPipelineSubcollection, embeddingVectorToString, executionReportJsonToString, extractParameterNamesFromTask, filterModels, generatePlaceholderAgentProfileImageUrl, getAllCommitmentDefinitions, getAllCommitmentTypes, getCommitmentDefinition, getGroupedCommitmentDefinitions, getPipelineInterface, getSingleLlmExecutionTools, identificationToPromptbookToken, isCommitmentSupported, isPassingExpectations, isPipelineImplementingInterface, isPipelineInterfacesEqual, isPipelinePrepared, isValidBook, isValidPipelineString, joinLlmExecutionTools, limitTotalUsage, makeKnowledgeSourceHandler, migratePipeline, normalizeAgentName, padBook, parseAgentSource, parseParameters, parsePipeline, pipelineCollectionToJson, pipelineJsonToString, prepareKnowledgePieces, preparePersona, preparePipeline, prettifyPipelineString, promptbookFetch, promptbookTokenToIdentification, unpreparePipeline, usageToHuman, usageToWorktime, validateBook, validatePipeline, validatePipelineString };
|
|
21672
21683
|
//# sourceMappingURL=index.es.js.map
|