@promptbook/remote-client 0.85.0-9 → 0.86.0-2

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 CHANGED
@@ -16,6 +16,7 @@
16
16
 
17
17
  ## 🌟 New Features
18
18
 
19
+ - 📂 We have plugin for [VSCode](https://github.com/webgptorg/book-extension) to support `.book` file extension
19
20
  - 💫 Support of [`o3-mini` model by OpenAI](https://openai.com/index/openai-o3-mini/)
20
21
  - 🐋 **Support of [DeepSeek models](https://www.npmjs.com/package/@promptbook/deepseek)**
21
22
  - 💙 Working [the **Book** language v1.0.0](https://github.com/webgptorg/book)
@@ -59,7 +60,7 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
59
60
 
60
61
  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**!
61
62
 
62
- 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!
63
+ 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!
63
64
 
64
65
  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.
65
66
 
@@ -88,41 +89,24 @@ Promptbook project is ecosystem of multiple projects and tools, following is a l
88
89
  <thead>
89
90
  <tr>
90
91
  <th>Project</th>
91
- <th>Description</th>
92
- <th>Link</th>
92
+ <th>About</th>
93
93
  </tr>
94
94
  </thead>
95
95
  <tbody>
96
96
  <tr>
97
- <td>Core</td>
98
- <td>Promptbook Core is a description and documentation of the basic concepts, ideas and inner workings of how Promptbook should be implemented, and defines what features must be describable by book language.</td>
99
- <td rowspan=2>https://github.com/webgptorg/book</td>
100
- </tr>
101
- <tr>
102
- <td>Book language</td>
97
+ <td><a href="https://github.com/webgptorg/book">Book language</a></td>
103
98
  <td>
104
- Book is a markdown-like language to define core entities like projects, pipelines, knowledge,.... It is designed to be understandable by non-programmers and non-technical people
99
+ Book is a markdown-like language to define core entities like personas, knowledge, tasks,.... It is designed to be understandable by non-programmers and non-technical people<hr>
100
+ There is also <a href="https://github.com/webgptorg/book-extension">a plugin for VSCode</a> to support <code>.book</code> file extension
105
101
  </td>
106
102
  </tr>
107
103
  <tr>
108
- <td>Promptbook typescript project</td>
109
- <td>Promptbook implementation in TypeScript released as multiple NPM packages</td>
110
- <td>https://github.com/webgptorg/promptbook + <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">Multiple packages published on NPM</a></td>
104
+ <td><a href="https://github.com/webgptorg/promptbook">Promptbook Engine</a></td>
105
+ <td>Promptbook implementation in TypeScript released as <a href="https://www.npmjs.com/package/@promptbook/core#-packages-for-developers">multiple NPM packages</a> and <a href="https://hub.docker.com/r/hejny/promptbook">Docker HUB</a></td>
111
106
  </tr>
112
107
  <tr>
113
- <td>Promptbook studio</td>
108
+ <td><a href="https://promptbook.studio">Promptbook Studio</a></td>
114
109
  <td>Studio to write Books and instantly publish them as miniapps</td>
115
- <td>
116
- https://promptbook.studio<br/>
117
- https://github.com/hejny/promptbook-studio</td>
118
- </tr><tr>
119
- <td>Hello World</td>
120
- <td>Simple starter kit with Books integrated into the sample applications</td>
121
- <td>
122
- https://github.com/webgptorg/hello-world<br/>
123
- https://github.com/webgptorg/hello-world-node-js<br/>
124
- https://github.com/webgptorg/hello-world-next-js
125
- </td>
126
110
  </tr>
127
111
  </tbody>
128
112
  </table>
package/esm/index.es.js CHANGED
@@ -19,7 +19,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
19
19
  * @generated
20
20
  * @see https://github.com/webgptorg/promptbook
21
21
  */
22
- var PROMPTBOOK_ENGINE_VERSION = '0.85.0-8';
22
+ var PROMPTBOOK_ENGINE_VERSION = '0.86.0-1';
23
23
  /**
24
24
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
25
25
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1390,7 +1390,7 @@ var sectionCommandParser = {
1390
1390
  /**
1391
1391
  * Parses the boilerplate command
1392
1392
  *
1393
- * Note: @@@ This command is used as boilerplate for new commands - it should NOT be used in any `.book.md` file
1393
+ * Note: @@@ This command is used as boilerplate for new commands - it should NOT be used in any `.book` file
1394
1394
  *
1395
1395
  * @see `documentationUrl` for more details
1396
1396
  * @private within the commands folder
@@ -2619,7 +2619,7 @@ function validateParameterName(parameterName) {
2619
2619
  /**
2620
2620
  * Parses the foreach command
2621
2621
  *
2622
- * Note: @@@ This command is used as foreach for new commands - it should NOT be used in any `.book.md` file
2622
+ * Note: @@@ This command is used as foreach for new commands - it should NOT be used in any `.book` file
2623
2623
  *
2624
2624
  * @see `documentationUrl` for more details
2625
2625
  * @public exported from `@promptbook/editable`
@@ -3070,7 +3070,7 @@ var FORMFACTOR_DEFINITIONS = [
3070
3070
  /**
3071
3071
  * Parses the formfactor command
3072
3072
  *
3073
- * Note: @@@ This command is used as formfactor for new commands - it should NOT be used in any `.book.md` file
3073
+ * Note: @@@ This command is used as formfactor for new commands - it should NOT be used in any `.book` file
3074
3074
  *
3075
3075
  * @see `documentationUrl` for more details
3076
3076
  * @public exported from `@promptbook/editable`
@@ -3698,57 +3698,6 @@ var postprocessCommandParser = {
3698
3698
  },
3699
3699
  };
3700
3700
 
3701
- /**
3702
- * Checks if an URL is reserved for private networks or localhost.
3703
- *
3704
- * Note: There are two simmilar functions:
3705
- * - `isUrlOnPrivateNetwork` which tests full URL
3706
- * - `isHostnameOnPrivateNetwork` *(this one)* which tests just hostname
3707
- *
3708
- * @public exported from `@promptbook/utils`
3709
- */
3710
- function isHostnameOnPrivateNetwork(hostname) {
3711
- if (hostname === 'example.com' ||
3712
- hostname === 'localhost' ||
3713
- hostname.endsWith('.localhost') ||
3714
- hostname.endsWith('.local') ||
3715
- hostname.endsWith('.test') ||
3716
- hostname === '127.0.0.1' ||
3717
- hostname === '::1') {
3718
- return true;
3719
- }
3720
- if (hostname.includes(':')) {
3721
- // IPv6
3722
- var ipParts = hostname.split(':');
3723
- return ipParts[0] === 'fc00' || ipParts[0] === 'fd00' || ipParts[0] === 'fe80';
3724
- }
3725
- else {
3726
- // IPv4
3727
- var ipParts = hostname.split('.').map(function (part) { return Number.parseInt(part, 10); });
3728
- return (ipParts[0] === 10 ||
3729
- (ipParts[0] === 172 && ipParts[1] >= 16 && ipParts[1] <= 31) ||
3730
- (ipParts[0] === 192 && ipParts[1] === 168));
3731
- }
3732
- }
3733
-
3734
- /**
3735
- * Checks if an IP address or hostname is reserved for private networks or localhost.
3736
- *
3737
- * Note: There are two simmilar functions:
3738
- * - `isUrlOnPrivateNetwork` *(this one)* which tests full URL
3739
- * - `isHostnameOnPrivateNetwork` which tests just hostname
3740
- *
3741
- * @param {string} ipAddress - The IP address to check.
3742
- * @returns {boolean} Returns true if the IP address is reserved for private networks or localhost, otherwise false.
3743
- * @public exported from `@promptbook/utils`
3744
- */
3745
- function isUrlOnPrivateNetwork(url) {
3746
- if (typeof url === 'string') {
3747
- url = new URL(url);
3748
- }
3749
- return isHostnameOnPrivateNetwork(url.hostname);
3750
- }
3751
-
3752
3701
  /**
3753
3702
  * Tests if given string is valid pipeline URL URL.
3754
3703
  *
@@ -3762,16 +3711,19 @@ function isValidPipelineUrl(url) {
3762
3711
  if (!isValidUrl(url)) {
3763
3712
  return false;
3764
3713
  }
3765
- if (!url.startsWith('https://')) {
3714
+ if (!url.startsWith('https://') && !url.startsWith('http://') /* <- Note: [👣] */) {
3766
3715
  return false;
3767
3716
  }
3768
3717
  if (url.includes('#')) {
3769
3718
  // TODO: [🐠]
3770
3719
  return false;
3771
3720
  }
3721
+ /*
3722
+ Note: [👣][🧠] Is it secure to allow pipeline URLs on private and unsecured networks?
3772
3723
  if (isUrlOnPrivateNetwork(url)) {
3773
3724
  return false;
3774
3725
  }
3726
+ */
3775
3727
  return true;
3776
3728
  }
3777
3729
  /**
@@ -3811,9 +3763,9 @@ var urlCommandParser = {
3811
3763
  * Example usages of the URL command
3812
3764
  */
3813
3765
  examples: [
3814
- 'PIPELINE URL https://promptbook.studio/library/write-cv.book.md',
3815
- 'URL https://promptbook.studio/library/write-cv.book.md',
3816
- 'https://promptbook.studio/library/write-cv.book.md',
3766
+ 'PIPELINE URL https://promptbook.studio/library/write-cv.book',
3767
+ 'URL https://promptbook.studio/library/write-cv.book',
3768
+ 'https://promptbook.studio/library/write-cv.book',
3817
3769
  ],
3818
3770
  /**
3819
3771
  * Parses the URL command