@promptbook/node 0.103.0-45 → 0.103.0-46

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.
@@ -8,6 +8,8 @@ export declare const PADDING_LINES = 11;
8
8
  /**
9
9
  * A function that adds padding to the book content
10
10
  *
11
+ * Note: [🔂] This function is idempotent.
12
+ *
11
13
  * @public exported from `@promptbook/core`
12
14
  */
13
15
  export declare function padBook(content: string_book): string_book;
@@ -15,6 +15,8 @@ export declare function isValidBook(value: string): value is string_book;
15
15
  * This function should be used when you have a string that you know represents agent source
16
16
  * but need to convert it to the branded type for type safety
17
17
  *
18
+ * Note: [🔂] This function is idempotent.
19
+ *
18
20
  * @public exported from `@promptbook/core`
19
21
  */
20
22
  export declare function validateBook(source: string): string_book;
@@ -95,6 +95,10 @@ export declare class AgentCollectionInSupabase {
95
95
  * Note: You can set 'PARENT' in the agent source to inherit from another agent in the collection.
96
96
  */
97
97
  createAgent(agentSource: string_book): Promise<AgentBasicInformation>;
98
+ /**
99
+ * Updates an existing agent in the collection
100
+ */
101
+ updateAgentSource(agentName: string_agent_name, agentSource: string_book): Promise<void>;
98
102
  /**
99
103
  * Deletes an agent from the collection
100
104
  */
@@ -9,6 +9,8 @@ import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
9
9
  * - if it is valid json
10
10
  * - if it is meaningful
11
11
  *
12
+ * Note: [🔂] This function is idempotent.
13
+ *
12
14
  * @param pipeline valid or invalid PipelineJson
13
15
  * @returns the same pipeline if it is logically valid
14
16
  * @throws {PipelineLogicError} on logical error in the pipeline
@@ -46,6 +46,8 @@ export type ValidatePromptResultResult = {
46
46
  * This function provides a common abstraction for result validation that can be used
47
47
  * by both execution logic and caching logic to ensure consistency.
48
48
  *
49
+ * Note: [🔂] This function is idempotent.
50
+ *
49
51
  * @param options - The validation options including result string, expectations, and format
50
52
  * @returns Validation result with processed string and validity status
51
53
  * @private internal function of `createPipelineExecutor` and `cacheLlmTools`
@@ -3,6 +3,8 @@ import type { PipelineString } from './PipelineString';
3
3
  * Function `validatePipelineString` will validate the if the string is a valid pipeline string
4
4
  * It does not check if the string is fully logically correct, but if it is a string that can be a pipeline string or the string looks completely different.
5
5
  *
6
+ * Note: [🔂] This function is idempotent.
7
+ *
6
8
  * @param {string} pipelineString the candidate for a pipeline string
7
9
  * @returns {PipelineString} the same string as input, but validated as valid
8
10
  * @throws {ParseError} if the string is not a valid pipeline string
@@ -3,6 +3,8 @@ import type { string_parameter_name } from '../../../types/typeAliases';
3
3
  * Function `validateParameterName` will normalize and validate a parameter name for use in pipelines.
4
4
  * It removes diacritics, emojis, and quotes, normalizes to camelCase, and checks for reserved names and invalid characters.
5
5
  *
6
+ * Note: [🔂] This function is idempotent.
7
+ *
6
8
  * @param parameterName The parameter name to validate and normalize.
7
9
  * @returns The validated and normalized parameter name.
8
10
  * @throws {ParseError} If the parameter name is empty, reserved, or contains invalid characters.
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.103.0-44`).
18
+ * It follows semantic versioning (e.g., `0.103.0-45`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/node",
3
- "version": "0.103.0-45",
3
+ "version": "0.103.0-46",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -93,7 +93,7 @@
93
93
  "module": "./esm/index.es.js",
94
94
  "typings": "./esm/typings/src/_packages/node.index.d.ts",
95
95
  "peerDependencies": {
96
- "@promptbook/core": "0.103.0-45"
96
+ "@promptbook/core": "0.103.0-46"
97
97
  },
98
98
  "dependencies": {
99
99
  "colors": "^1.4.0",
package/umd/index.umd.js CHANGED
@@ -45,7 +45,7 @@
45
45
  * @generated
46
46
  * @see https://github.com/webgptorg/promptbook
47
47
  */
48
- const PROMPTBOOK_ENGINE_VERSION = '0.103.0-45';
48
+ const PROMPTBOOK_ENGINE_VERSION = '0.103.0-46';
49
49
  /**
50
50
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
51
51
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1724,6 +1724,8 @@
1724
1724
  * - if it is valid json
1725
1725
  * - if it is meaningful
1726
1726
  *
1727
+ * Note: [🔂] This function is idempotent.
1728
+ *
1727
1729
  * @param pipeline valid or invalid PipelineJson
1728
1730
  * @returns the same pipeline if it is logically valid
1729
1731
  * @throws {PipelineLogicError} on logical error in the pipeline
@@ -2133,6 +2135,8 @@
2133
2135
  * Function `validatePipelineString` will validate the if the string is a valid pipeline string
2134
2136
  * It does not check if the string is fully logically correct, but if it is a string that can be a pipeline string or the string looks completely different.
2135
2137
  *
2138
+ * Note: [🔂] This function is idempotent.
2139
+ *
2136
2140
  * @param {string} pipelineString the candidate for a pipeline string
2137
2141
  * @returns {PipelineString} the same string as input, but validated as valid
2138
2142
  * @throws {ParseError} if the string is not a valid pipeline string
@@ -4761,6 +4765,8 @@
4761
4765
  * This function provides a common abstraction for result validation that can be used
4762
4766
  * by both execution logic and caching logic to ensure consistency.
4763
4767
  *
4768
+ * Note: [🔂] This function is idempotent.
4769
+ *
4764
4770
  * @param options - The validation options including result string, expectations, and format
4765
4771
  * @returns Validation result with processed string and validity status
4766
4772
  * @private internal function of `createPipelineExecutor` and `cacheLlmTools`
@@ -7978,6 +7984,8 @@
7978
7984
  * Function `validateParameterName` will normalize and validate a parameter name for use in pipelines.
7979
7985
  * It removes diacritics, emojis, and quotes, normalizes to camelCase, and checks for reserved names and invalid characters.
7980
7986
  *
7987
+ * Note: [🔂] This function is idempotent.
7988
+ *
7981
7989
  * @param parameterName The parameter name to validate and normalize.
7982
7990
  * @returns The validated and normalized parameter name.
7983
7991
  * @throws {ParseError} If the parameter name is empty, reserved, or contains invalid characters.
@@ -9958,6 +9966,8 @@
9958
9966
  /**
9959
9967
  * A function that adds padding to the book content
9960
9968
  *
9969
+ * Note: [🔂] This function is idempotent.
9970
+ *
9961
9971
  * @public exported from `@promptbook/core`
9962
9972
  */
9963
9973
  function padBook(content) {