@promptbook/core 0.104.0-16 β†’ 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 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-16';
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 = REMOTE_SERVER_URLS[0].urls[0];
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.
@@ -10617,6 +10566,7 @@ class UseBrowserCommitmentDefinition extends BaseCommitmentDefinition {
10617
10566
  const updatedTools = existingTools.some((tool) => tool.name === 'web_browser')
10618
10567
  ? existingTools
10619
10568
  : [
10569
+ // TODO: [πŸ”°] Use through proper MCP server
10620
10570
  ...existingTools,
10621
10571
  {
10622
10572
  name: 'web_browser',
@@ -10804,13 +10754,18 @@ class UseSearchEngineCommitmentDefinition extends BaseCommitmentDefinition {
10804
10754
  ? existingTools
10805
10755
  : [
10806
10756
  ...existingTools,
10757
+ { type: 'web_search' },
10758
+ // <- Note: [πŸ”°] This is just using simple native search tool by OpenAI @see https://platform.openai.com/docs/guides/tools-web-search
10759
+ // In future we will use proper MCP search tool:
10760
+ /*
10761
+
10807
10762
  {
10808
10763
  name: 'web_search',
10809
- description: spaceTrim$1(`
10810
- Search the internet for information.
10811
- Use this tool when you need to find up-to-date information or facts that you don't know.
10812
- ${!content ? '' : `Search scope / instructions: ${content}`}
10813
- `),
10764
+ description: spaceTrim(`
10765
+ Search the internet for information.
10766
+ Use this tool when you need to find up-to-date information or facts that you don't know.
10767
+ ${!content ? '' : `Search scope / instructions: ${content}`}
10768
+ `),
10814
10769
  parameters: {
10815
10770
  type: 'object',
10816
10771
  properties: {
@@ -10822,6 +10777,7 @@ class UseSearchEngineCommitmentDefinition extends BaseCommitmentDefinition {
10822
10777
  required: ['query'],
10823
10778
  },
10824
10779
  },
10780
+ */
10825
10781
  ];
10826
10782
  // Return requirements with updated tools and metadata
10827
10783
  return {
@@ -12234,7 +12190,7 @@ const DEFAULT_BOOK = padBook(validateBook(spaceTrim$2(`
12234
12190
  *
12235
12191
  * @public exported from `@promptbook/core`
12236
12192
  */
12237
- function generatePlaceholderAgentProfileImageUrl(agentIdOrName, agentsServerUrl = CORE_SERVER.urls[0]) {
12193
+ function generatePlaceholderAgentProfileImageUrl(agentIdOrName, agentsServerUrl) {
12238
12194
  if (typeof agentsServerUrl === 'string') {
12239
12195
  agentsServerUrl = new URL(agentsServerUrl);
12240
12196
  }
@@ -21257,6 +21213,69 @@ const OpenAiSdkTranspiler = {
21257
21213
  },
21258
21214
  };
21259
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
+
21260
21279
  /**
21261
21280
  * Provide information about Promptbook, engine version, book language version, servers, ...
21262
21281
  *
@@ -21284,8 +21303,7 @@ function aboutPromptbookInformation(options) {
21284
21303
 
21285
21304
  ## Servers
21286
21305
 
21287
- ${block(REMOTE_SERVER_URLS.map(({ title, urls, description }, index) => `${index + 1}. ${title} ${description} ${urls.join(', ')}
21288
- `).join('\n'))}
21306
+ ${block(PUBLIC_AGENTS_SERVERS.map(({ title, url, description }, index) => `${index + 1}. ${title} ${description} ${url}`).join('\n'))}
21289
21307
  `);
21290
21308
  fullInfoPieces.push(serversInfo);
21291
21309
  }
@@ -21661,5 +21679,5 @@ function $generateBookBoilerplate(options) {
21661
21679
  * TODO: [🀢] Maybe export through `@promptbook/utils` or `@promptbook/random` package
21662
21680
  */
21663
21681
 
21664
- export { $bookTranspilersRegister, $generateBookBoilerplate, $llmToolsMetadataRegister, $llmToolsRegister, $scrapersMetadataRegister, $scrapersRegister, ADMIN_EMAIL, ADMIN_GITHUB_NAME, API_REQUEST_TIMEOUT, AUTO_FEDERATED_AGENT_SERVER_URLS, AbstractFormatError, Agent, AgentCollectionInSupabase, AgentLlmExecutionTools, AuthenticationError, BIG_DATASET_TRESHOLD, BOOK_LANGUAGE_VERSION, BlackholeStorage, BoilerplateError, BoilerplateFormfactorDefinition, CLAIM, CLI_APP_ID, CORE_SERVER, 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_LOGO_URL, PROMPTBOOK_SYNTAX_COLORS, ParseError, PipelineExecutionError, PipelineLogicError, PipelineUrlError, PrefixStorage, PromptbookFetchError, REMOTE_SERVER_URLS, 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 };
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 };
21665
21683
  //# sourceMappingURL=index.es.js.map