@promptbook/remote-client 0.100.0-6 → 0.100.0-61
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 +2 -8
- package/esm/index.es.js +81 -1
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/color.index.d.ts +50 -0
- package/esm/typings/src/_packages/components.index.d.ts +36 -0
- package/esm/typings/src/_packages/core.index.d.ts +30 -0
- package/esm/typings/src/_packages/types.index.d.ts +38 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSource.d.ts +30 -0
- package/esm/typings/src/book-2.0/agent-source/parseAgentSource.test.d.ts +1 -0
- package/esm/typings/src/book-2.0/agent-source/string_book.d.ts +26 -0
- package/esm/typings/src/book-2.0/commitments/ACTION/ACTION.d.ts +38 -0
- package/esm/typings/src/book-2.0/commitments/FORMAT/FORMAT.d.ts +39 -0
- package/esm/typings/src/book-2.0/commitments/KNOWLEDGE/KNOWLEDGE.d.ts +45 -0
- package/esm/typings/src/book-2.0/commitments/META_IMAGE/META_IMAGE.d.ts +44 -0
- package/esm/typings/src/book-2.0/commitments/META_LINK/META_LINK.d.ts +56 -0
- package/esm/typings/src/book-2.0/commitments/MODEL/MODEL.d.ts +39 -0
- package/esm/typings/src/book-2.0/commitments/NOTE/NOTE.d.ts +49 -0
- package/esm/typings/src/book-2.0/commitments/PERSONA/PERSONA.d.ts +46 -0
- package/esm/typings/src/book-2.0/commitments/RULE/RULE.d.ts +44 -0
- package/esm/typings/src/book-2.0/commitments/SAMPLE/SAMPLE.d.ts +44 -0
- package/esm/typings/src/book-2.0/commitments/STYLE/STYLE.d.ts +38 -0
- package/esm/typings/src/book-2.0/commitments/_base/BaseCommitmentDefinition.d.ts +52 -0
- package/esm/typings/src/book-2.0/commitments/_base/BookCommitment.d.ts +5 -0
- package/esm/typings/src/book-2.0/commitments/_base/CommitmentDefinition.d.ts +48 -0
- package/esm/typings/src/book-2.0/commitments/_base/NotYetImplementedCommitmentDefinition.d.ts +22 -0
- package/esm/typings/src/book-2.0/commitments/_base/createEmptyAgentModelRequirements.d.ts +19 -0
- package/esm/typings/src/book-2.0/commitments/_misc/AgentModelRequirements.d.ts +37 -0
- package/esm/typings/src/book-2.0/commitments/_misc/AgentSourceParseResult.d.ts +18 -0
- package/esm/typings/src/book-2.0/commitments/_misc/ParsedCommitment.d.ts +22 -0
- package/esm/typings/src/book-2.0/commitments/_misc/createAgentModelRequirements.d.ts +62 -0
- package/esm/typings/src/book-2.0/commitments/_misc/createAgentModelRequirementsWithCommitments.d.ts +36 -0
- package/esm/typings/src/book-2.0/commitments/_misc/createCommitmentRegex.d.ts +20 -0
- package/esm/typings/src/book-2.0/commitments/_misc/parseAgentSourceWithCommitments.d.ts +24 -0
- package/esm/typings/src/book-2.0/commitments/_misc/removeCommentsFromSystemMessage.d.ts +11 -0
- package/esm/typings/src/book-2.0/commitments/index.d.ts +56 -0
- package/esm/typings/src/book-2.0/utils/profileImageUtils.d.ts +39 -0
- package/esm/typings/src/book-components/AvatarProfile/AvatarChip/AvatarChip.d.ts +35 -0
- package/esm/typings/src/book-components/AvatarProfile/AvatarChip/AvatarChipFromSource.d.ts +21 -0
- package/esm/typings/src/book-components/AvatarProfile/AvatarChip/index.d.ts +2 -0
- package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +26 -0
- package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource.d.ts +19 -0
- package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +35 -0
- package/esm/typings/src/book-components/BookEditor/BookEditorInner.d.ts +15 -0
- package/esm/typings/src/book-components/BookEditor/config.d.ts +10 -0
- package/esm/typings/src/book-components/BookEditor/injectCssModuleIntoShadowRoot.d.ts +11 -0
- package/esm/typings/src/book-components/Chat/Chat/Chat.d.ts +20 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +110 -0
- package/esm/typings/src/book-components/Chat/LlmChat/LlmChat.d.ts +14 -0
- package/esm/typings/src/book-components/Chat/LlmChat/LlmChat.test.d.ts +1 -0
- package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +24 -0
- package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +16 -0
- package/esm/typings/src/book-components/Chat/types/ChatParticipant.d.ts +32 -0
- package/esm/typings/src/book-components/Chat/utils/ChatPersistence.d.ts +25 -0
- package/esm/typings/src/book-components/Chat/utils/ExportFormat.d.ts +4 -0
- package/esm/typings/src/book-components/Chat/utils/addUtmParamsToUrl.d.ts +7 -0
- package/esm/typings/src/book-components/Chat/utils/createShortLinkForChat.d.ts +7 -0
- package/esm/typings/src/book-components/Chat/utils/downloadFile.d.ts +6 -0
- package/esm/typings/src/book-components/Chat/utils/exportChatHistory.d.ts +9 -0
- package/esm/typings/src/book-components/Chat/utils/generatePdfContent.d.ts +8 -0
- package/esm/typings/src/book-components/Chat/utils/generateQrDataUrl.d.ts +7 -0
- package/esm/typings/src/book-components/Chat/utils/getPromptbookBranding.d.ts +6 -0
- package/esm/typings/src/book-components/Chat/utils/messagesToHtml.d.ts +8 -0
- package/esm/typings/src/book-components/Chat/utils/messagesToJson.d.ts +7 -0
- package/esm/typings/src/book-components/Chat/utils/messagesToMarkdown.d.ts +8 -0
- package/esm/typings/src/book-components/Chat/utils/messagesToText.d.ts +8 -0
- package/esm/typings/src/book-components/_common/react-utils/classNames.d.ts +7 -0
- package/esm/typings/src/book-components/_common/react-utils/collectCssTextsForClass.d.ts +7 -0
- package/esm/typings/src/book-components/_common/react-utils/escapeHtml.d.ts +6 -0
- package/esm/typings/src/book-components/_common/react-utils/escapeRegex.d.ts +6 -0
- package/esm/typings/src/config.d.ts +19 -0
- package/esm/typings/src/execution/AvailableModel.d.ts +4 -0
- package/esm/typings/src/execution/ExecutionTask.d.ts +27 -1
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +8 -0
- package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +6 -1
- package/esm/typings/src/llm-providers/_common/filterModels.d.ts +0 -3
- package/esm/typings/src/llm-providers/_common/profiles/llmProviderProfiles.d.ts +81 -0
- package/esm/typings/src/llm-providers/_common/profiles/test/llmProviderProfiles.test.d.ts +1 -0
- package/esm/typings/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +5 -0
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +5 -5
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/deepseek/deepseek-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/google/google-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +5 -0
- package/esm/typings/src/llm-providers/ollama/ollama-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +8 -0
- package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +5 -0
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +5 -0
- package/esm/typings/src/pipeline/book-notation.d.ts +2 -1
- package/esm/typings/src/playground/permanent/error-handling-playground.d.ts +5 -0
- package/esm/typings/src/types/ModelRequirements.d.ts +0 -2
- package/esm/typings/src/types/typeAliases.d.ts +6 -0
- package/esm/typings/src/utils/color/$randomColor.d.ts +11 -0
- package/esm/typings/src/utils/color/Color.d.ts +180 -0
- package/esm/typings/src/utils/color/css-colors.d.ts +159 -0
- package/esm/typings/src/utils/color/internal-utils/checkChannelValue.d.ts +14 -0
- package/esm/typings/src/utils/color/internal-utils/hslToRgb.d.ts +17 -0
- package/esm/typings/src/utils/color/internal-utils/rgbToHsl.d.ts +17 -0
- package/esm/typings/src/utils/color/operators/ColorTransformer.d.ts +5 -0
- package/esm/typings/src/utils/color/operators/darken.d.ts +9 -0
- package/esm/typings/src/utils/color/operators/furthest.d.ts +16 -0
- package/esm/typings/src/utils/color/operators/grayscale.d.ts +9 -0
- package/esm/typings/src/utils/color/operators/lighten.d.ts +12 -0
- package/esm/typings/src/utils/color/operators/mixWithColor.d.ts +11 -0
- package/esm/typings/src/utils/color/operators/nearest.d.ts +10 -0
- package/esm/typings/src/utils/color/operators/negative.d.ts +7 -0
- package/esm/typings/src/utils/color/operators/negativeLightness.d.ts +7 -0
- package/esm/typings/src/utils/color/operators/withAlpha.d.ts +9 -0
- package/esm/typings/src/utils/color/utils/areColorsEqual.d.ts +14 -0
- package/esm/typings/src/utils/color/utils/colorDistance.d.ts +21 -0
- package/esm/typings/src/utils/color/utils/colorHue.d.ts +11 -0
- package/esm/typings/src/utils/color/utils/colorHueDistance.d.ts +11 -0
- package/esm/typings/src/utils/color/utils/colorHueDistance.test.d.ts +1 -0
- package/esm/typings/src/utils/color/utils/colorLuminance.d.ts +9 -0
- package/esm/typings/src/utils/color/utils/colorSatulightion.d.ts +7 -0
- package/esm/typings/src/utils/color/utils/colorSaturation.d.ts +9 -0
- package/esm/typings/src/utils/color/utils/colorToDataUrl.d.ts +10 -0
- package/esm/typings/src/utils/color/utils/mixColors.d.ts +11 -0
- package/esm/typings/src/utils/organization/preserve.d.ts +21 -0
- package/esm/typings/src/utils/take/classes/TakeChain.d.ts +11 -0
- package/esm/typings/src/utils/take/interfaces/ITakeChain.d.ts +12 -0
- package/esm/typings/src/utils/take/interfaces/Takeable.d.ts +7 -0
- package/esm/typings/src/utils/take/take.d.ts +12 -0
- package/esm/typings/src/utils/take/take.test.d.ts +1 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +81 -1
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +0 -14
package/README.md
CHANGED
|
@@ -18,6 +18,7 @@ Write AI applications using plain human language across multiple models and plat
|
|
|
18
18
|
|
|
19
19
|
## 🌟 New Features
|
|
20
20
|
|
|
21
|
+
- 🚀 **GPT-5 Support** - Now includes OpenAI's most advanced language model with unprecedented reasoning capabilities and 200K context window
|
|
21
22
|
- 💡 VS Code support for `.book` files with syntax highlighting and IntelliSense
|
|
22
23
|
- 🐳 Official Docker image (`hejny/promptbook`) for seamless containerized usage
|
|
23
24
|
- 🔥 Native support for OpenAI `o3-mini`, GPT-4 and other leading LLMs
|
|
@@ -60,8 +61,6 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
|
|
|
60
61
|
|
|
61
62
|
During the computer revolution, we have seen [multiple generations of computer languages](https://github.com/webgptorg/promptbook/discussions/180), from the physical rewiring of the vacuum tubes through low-level machine code to the high-level languages like Python or JavaScript. And now, we're on the edge of the **next revolution**!
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
64
|
It's a revolution of writing software in **plain human language** that is understandable and executable by both humans and machines – and it's going to change everything!
|
|
66
65
|
|
|
67
66
|
The incredible growth in power of microprocessors and the Moore's Law have been the driving force behind the ever-more powerful languages, and it's been an amazing journey! Similarly, the large language models (like GPT or Claude) are the next big thing in language technology, and they're set to transform the way we interact with computers.
|
|
@@ -187,8 +186,6 @@ Join our growing community of developers and users:
|
|
|
187
186
|
|
|
188
187
|
_A concise, Markdown-based DSL for crafting AI workflows and automations._
|
|
189
188
|
|
|
190
|
-
|
|
191
|
-
|
|
192
189
|
### Introduction
|
|
193
190
|
|
|
194
191
|
Book is a Markdown-based language that simplifies the creation of AI applications, workflows, and automations. With human-readable commands, you can define inputs, outputs, personas, knowledge sources, and actions—without needing model-specific details.
|
|
@@ -238,8 +235,6 @@ Personas can have access to different knowledge, tools and actions. They can als
|
|
|
238
235
|
|
|
239
236
|
- [PERSONA](https://github.com/webgptorg/promptbook/blob/main/documents/commands/PERSONA.md)
|
|
240
237
|
|
|
241
|
-
|
|
242
|
-
|
|
243
238
|
### **3. How:** Knowledge, Instruments and Actions
|
|
244
239
|
|
|
245
240
|
The resources used by the personas are used to do the work.
|
|
@@ -314,6 +309,7 @@ Or you can install them separately:
|
|
|
314
309
|
- **[@promptbook/editable](https://www.npmjs.com/package/@promptbook/editable)** - Editable book as native javascript object with imperative object API
|
|
315
310
|
- **[@promptbook/templates](https://www.npmjs.com/package/@promptbook/templates)** - Useful templates and examples of books which can be used as a starting point
|
|
316
311
|
- **[@promptbook/types](https://www.npmjs.com/package/@promptbook/types)** - Just typescript types used in the library
|
|
312
|
+
- **[@promptbook/color](https://www.npmjs.com/package/@promptbook/color)** - Color manipulation library
|
|
317
313
|
- ⭐ **[@promptbook/cli](https://www.npmjs.com/package/@promptbook/cli)** - Command line interface utilities for promptbooks
|
|
318
314
|
- 🐋 **[Docker image](https://hub.docker.com/r/hejny/promptbook/)** - Promptbook server
|
|
319
315
|
|
|
@@ -339,8 +335,6 @@ The following glossary is used to clarify certain concepts:
|
|
|
339
335
|
|
|
340
336
|
_Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
|
|
341
337
|
|
|
342
|
-
|
|
343
|
-
|
|
344
338
|
### 💯 Core concepts
|
|
345
339
|
|
|
346
340
|
- [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
|
package/esm/index.es.js
CHANGED
|
@@ -20,7 +20,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
|
|
|
20
20
|
* @generated
|
|
21
21
|
* @see https://github.com/webgptorg/promptbook
|
|
22
22
|
*/
|
|
23
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.100.0-
|
|
23
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.100.0-61';
|
|
24
24
|
/**
|
|
25
25
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
26
26
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -371,6 +371,13 @@ Object.freeze({
|
|
|
371
371
|
newline: '\n',
|
|
372
372
|
skipEmptyLines: true,
|
|
373
373
|
});
|
|
374
|
+
/**
|
|
375
|
+
* API request timeout in milliseconds
|
|
376
|
+
* Can be overridden via API_REQUEST_TIMEOUT environment variable
|
|
377
|
+
*
|
|
378
|
+
* @public exported from `@promptbook/core`
|
|
379
|
+
*/
|
|
380
|
+
parseInt(process.env.API_REQUEST_TIMEOUT || '90000');
|
|
374
381
|
/**
|
|
375
382
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
376
383
|
* TODO: [🧠][🧜♂️] Maybe join remoteServerUrl and path into single value
|
|
@@ -5604,6 +5611,76 @@ async function compilePipelineOnRemoteServer(pipelineString, options) {
|
|
|
5604
5611
|
* TODO: [🐚] Do not return `Promise<PipelineJson>` But `PreparationTask`
|
|
5605
5612
|
*/
|
|
5606
5613
|
|
|
5614
|
+
/**
|
|
5615
|
+
* Predefined profiles for LLM providers to maintain consistency across the application
|
|
5616
|
+
* These profiles represent each provider as a virtual persona in chat interfaces
|
|
5617
|
+
*
|
|
5618
|
+
* @private !!!!
|
|
5619
|
+
*/
|
|
5620
|
+
const LLM_PROVIDER_PROFILES = {
|
|
5621
|
+
OPENAI: {
|
|
5622
|
+
name: 'OPENAI',
|
|
5623
|
+
fullname: 'OpenAI GPT',
|
|
5624
|
+
color: '#10a37f', // OpenAI's signature green
|
|
5625
|
+
// Note: avatarSrc could be added when we have provider logos available
|
|
5626
|
+
},
|
|
5627
|
+
ANTHROPIC: {
|
|
5628
|
+
name: 'ANTHROPIC',
|
|
5629
|
+
fullname: 'Anthropic Claude',
|
|
5630
|
+
color: '#d97706', // Anthropic's orange/amber color
|
|
5631
|
+
},
|
|
5632
|
+
AZURE_OPENAI: {
|
|
5633
|
+
name: 'AZURE_OPENAI',
|
|
5634
|
+
fullname: 'Azure OpenAI',
|
|
5635
|
+
color: '#0078d4', // Microsoft Azure blue
|
|
5636
|
+
},
|
|
5637
|
+
GOOGLE: {
|
|
5638
|
+
name: 'GOOGLE',
|
|
5639
|
+
fullname: 'Google Gemini',
|
|
5640
|
+
color: '#4285f4', // Google blue
|
|
5641
|
+
},
|
|
5642
|
+
DEEPSEEK: {
|
|
5643
|
+
name: 'DEEPSEEK',
|
|
5644
|
+
fullname: 'DeepSeek',
|
|
5645
|
+
color: '#7c3aed', // Purple color for DeepSeek
|
|
5646
|
+
},
|
|
5647
|
+
OLLAMA: {
|
|
5648
|
+
name: 'OLLAMA',
|
|
5649
|
+
fullname: 'Ollama',
|
|
5650
|
+
color: '#059669', // Emerald green for local models
|
|
5651
|
+
},
|
|
5652
|
+
REMOTE: {
|
|
5653
|
+
name: 'REMOTE',
|
|
5654
|
+
fullname: 'Remote Server',
|
|
5655
|
+
color: '#6b7280', // Gray for remote/proxy connections
|
|
5656
|
+
},
|
|
5657
|
+
MOCKED_ECHO: {
|
|
5658
|
+
name: 'MOCKED_ECHO',
|
|
5659
|
+
fullname: 'Echo (Test)',
|
|
5660
|
+
color: '#8b5cf6', // Purple for test/mock tools
|
|
5661
|
+
},
|
|
5662
|
+
MOCKED_FAKE: {
|
|
5663
|
+
name: 'MOCKED_FAKE',
|
|
5664
|
+
fullname: 'Fake LLM (Test)',
|
|
5665
|
+
color: '#ec4899', // Pink for fake/test tools
|
|
5666
|
+
},
|
|
5667
|
+
VERCEL: {
|
|
5668
|
+
name: 'VERCEL',
|
|
5669
|
+
fullname: 'Vercel AI',
|
|
5670
|
+
color: '#000000', // Vercel's black
|
|
5671
|
+
},
|
|
5672
|
+
MULTIPLE: {
|
|
5673
|
+
name: 'MULTIPLE',
|
|
5674
|
+
fullname: 'Multiple Providers',
|
|
5675
|
+
color: '#6366f1', // Indigo for combined/multiple providers
|
|
5676
|
+
},
|
|
5677
|
+
};
|
|
5678
|
+
/**
|
|
5679
|
+
* TODO: Refactor this - each profile must be alongside the provider definition
|
|
5680
|
+
* TODO: Unite `AvatarProfileProps` and `ChatParticipant`
|
|
5681
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
5682
|
+
*/
|
|
5683
|
+
|
|
5607
5684
|
/**
|
|
5608
5685
|
* Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
|
|
5609
5686
|
*
|
|
@@ -5625,6 +5702,9 @@ class RemoteLlmExecutionTools {
|
|
|
5625
5702
|
get description() {
|
|
5626
5703
|
return `Models from Promptbook remote server ${this.options.remoteServerUrl}`;
|
|
5627
5704
|
}
|
|
5705
|
+
get profile() {
|
|
5706
|
+
return LLM_PROVIDER_PROFILES.REMOTE;
|
|
5707
|
+
}
|
|
5628
5708
|
/**
|
|
5629
5709
|
* Check the configuration of all execution tools
|
|
5630
5710
|
*/
|