@promptbook/remote-server 0.103.0-44 → 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.
- package/esm/index.es.js +14 -1
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/book-2.0/agent-source/padBook.d.ts +2 -0
- package/esm/typings/src/book-2.0/agent-source/string_book.d.ts +2 -0
- package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +4 -0
- package/esm/typings/src/conversion/validation/validatePipeline.d.ts +2 -0
- package/esm/typings/src/execution/utils/validatePromptResult.d.ts +2 -0
- package/esm/typings/src/pipeline/validatePipelineString.d.ts +2 -0
- package/esm/typings/src/remote-server/startAgentServer.d.ts +3 -0
- package/esm/typings/src/remote-server/startRemoteServer.d.ts +1 -0
- package/esm/typings/src/utils/validators/parameterName/validateParameterName.d.ts +2 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +14 -1
- package/umd/index.umd.js.map +1 -1
|
@@ -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
|
|
@@ -21,3 +21,6 @@ type AgentsServerOptions = {
|
|
|
21
21
|
*/
|
|
22
22
|
export declare function startAgentServer(options: AgentsServerOptions): Promise<TODO_any>;
|
|
23
23
|
export {};
|
|
24
|
+
/**
|
|
25
|
+
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
26
|
+
*/
|
|
@@ -25,4 +25,5 @@ export declare function startRemoteServer<TCustomOptions = undefined>(options: R
|
|
|
25
25
|
* TODO: [🃏] Pass here some security token to prevent malitious usage and/or DDoS
|
|
26
26
|
* TODO: [0] Set unavailable models as undefined in `RemoteLlmExecutionTools` NOT throw error here
|
|
27
27
|
* TODO: Allow to constrain anonymous mode for specific models / providers
|
|
28
|
+
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
28
29
|
*/
|
|
@@ -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-
|
|
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/remote-server",
|
|
3
|
-
"version": "0.103.0-
|
|
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,
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"module": "./esm/index.es.js",
|
|
96
96
|
"typings": "./esm/typings/src/_packages/remote-server.index.d.ts",
|
|
97
97
|
"peerDependencies": {
|
|
98
|
-
"@promptbook/core": "0.103.0-
|
|
98
|
+
"@promptbook/core": "0.103.0-46"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
101
|
"colors": "^1.4.0",
|
package/umd/index.umd.js
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
* @generated
|
|
48
48
|
* @see https://github.com/webgptorg/promptbook
|
|
49
49
|
*/
|
|
50
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-
|
|
50
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-46';
|
|
51
51
|
/**
|
|
52
52
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
53
53
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1315,12 +1315,18 @@
|
|
|
1315
1315
|
async function startAgentServer(options) {
|
|
1316
1316
|
const { port = 4440 } = options;
|
|
1317
1317
|
// TODO: !!!! [🌕]
|
|
1318
|
+
console.trace(`!!! Starting agents server on port ${port}...`);
|
|
1319
|
+
console.log(`!!! cwd`, process.cwd());
|
|
1320
|
+
console.log(`!!! __dirname`, __dirname);
|
|
1318
1321
|
await $execCommand({
|
|
1319
1322
|
cwd: './apps/agents-server',
|
|
1320
1323
|
command: `next dev --port ${port} `,
|
|
1321
1324
|
isVerbose: true,
|
|
1322
1325
|
});
|
|
1323
1326
|
}
|
|
1327
|
+
/**
|
|
1328
|
+
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
1329
|
+
*/
|
|
1324
1330
|
|
|
1325
1331
|
/**
|
|
1326
1332
|
* Make error report URL for the given error
|
|
@@ -2453,6 +2459,8 @@
|
|
|
2453
2459
|
* - if it is valid json
|
|
2454
2460
|
* - if it is meaningful
|
|
2455
2461
|
*
|
|
2462
|
+
* Note: [🔂] This function is idempotent.
|
|
2463
|
+
*
|
|
2456
2464
|
* @param pipeline valid or invalid PipelineJson
|
|
2457
2465
|
* @returns the same pipeline if it is logically valid
|
|
2458
2466
|
* @throws {PipelineLogicError} on logical error in the pipeline
|
|
@@ -3268,6 +3276,8 @@
|
|
|
3268
3276
|
* Function `validatePipelineString` will validate the if the string is a valid pipeline string
|
|
3269
3277
|
* 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.
|
|
3270
3278
|
*
|
|
3279
|
+
* Note: [🔂] This function is idempotent.
|
|
3280
|
+
*
|
|
3271
3281
|
* @param {string} pipelineString the candidate for a pipeline string
|
|
3272
3282
|
* @returns {PipelineString} the same string as input, but validated as valid
|
|
3273
3283
|
* @throws {ParseError} if the string is not a valid pipeline string
|
|
@@ -6288,6 +6298,8 @@
|
|
|
6288
6298
|
* This function provides a common abstraction for result validation that can be used
|
|
6289
6299
|
* by both execution logic and caching logic to ensure consistency.
|
|
6290
6300
|
*
|
|
6301
|
+
* Note: [🔂] This function is idempotent.
|
|
6302
|
+
*
|
|
6291
6303
|
* @param options - The validation options including result string, expectations, and format
|
|
6292
6304
|
* @returns Validation result with processed string and validity status
|
|
6293
6305
|
* @private internal function of `createPipelineExecutor` and `cacheLlmTools`
|
|
@@ -9643,6 +9655,7 @@
|
|
|
9643
9655
|
* TODO: [🃏] Pass here some security token to prevent malitious usage and/or DDoS
|
|
9644
9656
|
* TODO: [0] Set unavailable models as undefined in `RemoteLlmExecutionTools` NOT throw error here
|
|
9645
9657
|
* TODO: Allow to constrain anonymous mode for specific models / providers
|
|
9658
|
+
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
9646
9659
|
*/
|
|
9647
9660
|
|
|
9648
9661
|
exports.BOOK_LANGUAGE_VERSION = BOOK_LANGUAGE_VERSION;
|