@promptbook/remote-server 0.65.0 → 0.66.0-1
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 +255 -185
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/anthropic-claude.index.d.ts +2 -0
- package/esm/typings/src/_packages/core.index.d.ts +6 -2
- package/esm/typings/src/_packages/utils.index.d.ts +10 -8
- package/esm/typings/src/config.d.ts +22 -0
- package/esm/typings/src/execution/LlmExecutionTools.d.ts +11 -5
- package/esm/typings/src/llm-providers/_common/config.d.ts +1 -6
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +2 -2
- package/esm/typings/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.d.ts +18 -0
- package/esm/typings/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.test.d.ts +4 -0
- package/esm/typings/src/llm-providers/anthropic-claude/register1.d.ts +4 -0
- package/esm/typings/src/llm-providers/mocked/fakeTextToExpectations.d.ts +1 -0
- package/esm/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/computeOpenaiUsage.d.ts +5 -1
- package/esm/typings/src/llm-providers/openai/computeOpenaiUsage.test.d.ts +3 -0
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +2 -1
- package/esm/typings/src/llm-providers/remote/interfaces/RemoteLlmExecutionToolsOptions.d.ts +4 -1
- package/esm/typings/src/utils/currentDate.d.ts +2 -0
- package/esm/typings/src/utils/deepFreeze.d.ts +2 -1
- package/esm/typings/src/utils/environment/getGlobalScope.d.ts +12 -0
- package/esm/typings/src/utils/environment/isRunningInBrowser.d.ts +8 -0
- package/esm/typings/src/utils/environment/isRunningInNode.d.ts +8 -0
- package/esm/typings/src/utils/environment/isRunningInWebWorker.d.ts +8 -0
- package/esm/typings/src/utils/files/isDirectoryExisting.d.ts +3 -1
- package/esm/typings/src/utils/files/isFileExisting.d.ts +3 -1
- package/esm/typings/src/utils/files/listAllFiles.d.ts +3 -1
- package/esm/typings/src/utils/random/randomSeed.d.ts +1 -0
- package/package.json +4 -4
- package/umd/index.umd.js +255 -185
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/utils/isRunningInWhatever.d.ts +0 -18
|
@@ -25,7 +25,7 @@ export type RemoteLlmExecutionToolsOptions = CommonExecutionToolsOptions & {
|
|
|
25
25
|
/**
|
|
26
26
|
* If set, only these models will be listed as available
|
|
27
27
|
*
|
|
28
|
-
* TODO: [🧠]
|
|
28
|
+
* TODO: [🧠] !!!!!! Figure out better solution
|
|
29
29
|
*/
|
|
30
30
|
readonly models?: Array<AvailableModel>;
|
|
31
31
|
/**
|
|
@@ -51,3 +51,6 @@ export type RemoteLlmExecutionToolsOptions = CommonExecutionToolsOptions & {
|
|
|
51
51
|
*/
|
|
52
52
|
readonly clientId: client_id;
|
|
53
53
|
});
|
|
54
|
+
/**
|
|
55
|
+
* TODO: [🧠][🧜♂️] Maybe join remoteUrl and path into single value
|
|
56
|
+
*/
|
|
@@ -2,6 +2,8 @@ import type { string_date_iso8601 } from '../types/typeAliases';
|
|
|
2
2
|
/**
|
|
3
3
|
* Simple wrapper `new Date().toISOString()`
|
|
4
4
|
*
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it is not deterministic because it depends on the current time
|
|
6
|
+
*
|
|
5
7
|
* @returns string_date branded type
|
|
6
8
|
* @public exported from `@promptbook/utils`
|
|
7
9
|
*/
|
|
@@ -2,12 +2,13 @@ import type { ReadonlyDeep } from 'type-fest';
|
|
|
2
2
|
/**
|
|
3
3
|
* @@@
|
|
4
4
|
*
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it mutates given object
|
|
5
6
|
* Note: This function mutates the object and returns the original (but mutated-deep-freezed) object
|
|
6
7
|
*
|
|
7
8
|
* @returns The same object as the input, but deeply frozen
|
|
8
9
|
* @public exported from `@promptbook/utils`
|
|
9
10
|
*/
|
|
10
|
-
export declare function deepFreeze<TObject>(objectValue: TObject): ReadonlyDeep<TObject>;
|
|
11
|
+
export declare function $deepFreeze<TObject>(objectValue: TObject): ReadonlyDeep<TObject>;
|
|
11
12
|
/**
|
|
12
13
|
* @@@
|
|
13
14
|
* @@@
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { really_any } from '../organization/really_any';
|
|
2
|
+
/**
|
|
3
|
+
* @@@
|
|
4
|
+
*
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it access global
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/utils`
|
|
8
|
+
*/
|
|
9
|
+
export declare function $getGlobalScope(): really_any;
|
|
10
|
+
/***
|
|
11
|
+
* TODO: !!!!! Make private and promptbook registry from this
|
|
12
|
+
*/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detects if the code is running in a browser environment in main thread (Not in a web worker)
|
|
3
|
+
*
|
|
4
|
+
* Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/utils`
|
|
7
|
+
*/
|
|
8
|
+
export declare const $isRunningInBrowser: Function;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detects if the code is running in a Node.js environment
|
|
3
|
+
*
|
|
4
|
+
* Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/utils`
|
|
7
|
+
*/
|
|
8
|
+
export declare const $isRunningInNode: Function;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detects if the code is running in a web worker
|
|
3
|
+
*
|
|
4
|
+
* Note: `$` is used to indicate that this function is not a pure function - it looks at the global object to determine the environment
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/utils`
|
|
7
|
+
*/
|
|
8
|
+
export declare const $isRunningInWebWorker: Function;
|
|
@@ -2,9 +2,11 @@ import type { string_folder_path } from '../../types/typeAliases';
|
|
|
2
2
|
/**
|
|
3
3
|
* Checks if the directory exists
|
|
4
4
|
*
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it looks at the filesystem
|
|
6
|
+
*
|
|
5
7
|
* @private within the repository
|
|
6
8
|
*/
|
|
7
|
-
export declare function isDirectoryExisting(directoryPath: string_folder_path): Promise<boolean>;
|
|
9
|
+
export declare function $isDirectoryExisting(directoryPath: string_folder_path): Promise<boolean>;
|
|
8
10
|
/**
|
|
9
11
|
* Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli`
|
|
10
12
|
* TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
|
|
@@ -2,9 +2,11 @@ import type { string_file_path } from '../../types/typeAliases';
|
|
|
2
2
|
/**
|
|
3
3
|
* Checks if the file exists
|
|
4
4
|
*
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it looks at the filesystem
|
|
6
|
+
*
|
|
5
7
|
* @private within the repository
|
|
6
8
|
*/
|
|
7
|
-
export declare function isFileExisting(filePath: string_file_path): Promise<boolean>;
|
|
9
|
+
export declare function $isFileExisting(filePath: string_file_path): Promise<boolean>;
|
|
8
10
|
/**
|
|
9
11
|
* Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli`
|
|
10
12
|
* TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
|
|
@@ -3,12 +3,14 @@ import type { string_folder_path } from '../../types/typeAliases';
|
|
|
3
3
|
/**
|
|
4
4
|
* Reads all files in the directory
|
|
5
5
|
*
|
|
6
|
+
* Note: `$` is used to indicate that this function is not a pure function - it looks at the filesystem
|
|
7
|
+
*
|
|
6
8
|
* @param path
|
|
7
9
|
* @param isRecursive
|
|
8
10
|
* @returns List of all files in the directory
|
|
9
11
|
* @private internal function of `createCollectionFromDirectory`
|
|
10
12
|
*/
|
|
11
|
-
export declare function listAllFiles(path: string_folder_path, isRecursive: boolean): Promise<Array<string_file_path>>;
|
|
13
|
+
export declare function $listAllFiles(path: string_folder_path, isRecursive: boolean): Promise<Array<string_file_path>>;
|
|
12
14
|
/**
|
|
13
15
|
* Note: [🟢] This code should never be published outside of `@promptbook/node` and `@promptbook/cli` and `@promptbook/cli`
|
|
14
16
|
* TODO: [🖇] What about symlinks?
|
|
@@ -2,6 +2,7 @@ import type { number_seed } from '../../types/typeAliases';
|
|
|
2
2
|
/**
|
|
3
3
|
* Generates random seed
|
|
4
4
|
*
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it is not deterministic
|
|
5
6
|
* Warning: This function is not cryptographically secure (it uses Math.random internally)
|
|
6
7
|
* @public exported from `@promptbook/utils`
|
|
7
8
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.66.0-1",
|
|
4
4
|
"description": "Supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"module": "./esm/index.es.js",
|
|
48
48
|
"typings": "./esm/typings/src/_packages/remote-server.index.d.ts",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@promptbook/core": "0.
|
|
50
|
+
"@promptbook/core": "0.66.0-1"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@anthropic-ai/sdk": "0.
|
|
53
|
+
"@anthropic-ai/sdk": "0.26.1",
|
|
54
54
|
"@azure/openai": "1.0.0-beta.12",
|
|
55
55
|
"colors": "1.4.0",
|
|
56
|
-
"openai": "4.
|
|
56
|
+
"openai": "4.55.9",
|
|
57
57
|
"socket.io": "4.7.2",
|
|
58
58
|
"socket.io-client": "4.7.2",
|
|
59
59
|
"spacetrim": "0.11.39"
|