@promptbook/remote-server 0.66.0-8 → 0.66.0
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 +282 -2126
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/anthropic-claude.index.d.ts +0 -2
- package/esm/typings/src/_packages/cli.index.d.ts +6 -0
- package/esm/typings/src/_packages/core.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +22 -14
- package/esm/typings/src/_packages/utils.index.d.ts +7 -7
- package/esm/typings/src/config.d.ts +6 -0
- package/esm/typings/src/execution/LlmExecutionToolsConstructor.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/$llmToolsMetadataRegister.d.ts +2 -2
- package/esm/typings/src/llm-providers/_common/$llmToolsRegister.d.ts +2 -2
- package/esm/typings/src/llm-providers/_common/$registeredLlmToolsMessage.d.ts +9 -0
- package/esm/typings/src/llm-providers/_common/LlmToolsConfiguration.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/LlmToolsMetadata.d.ts +1 -1
- package/esm/typings/src/llm-providers/_common/createLlmToolsFromConfigurationFromEnv.d.ts +1 -0
- package/esm/typings/src/llm-providers/_common/getLlmToolsForTestingAndScriptsAndPlayground.d.ts +1 -1
- package/esm/typings/src/llm-providers/anthropic-claude/register-constructor.d.ts +1 -0
- package/esm/typings/src/llm-providers/azure-openai/register-constructor.d.ts +1 -0
- package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +1 -0
- package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -0
- package/esm/typings/src/llm-providers/remote/interfaces/{Promptbook_Server_Error.d.ts → PromptbookServer_Error.d.ts} +1 -1
- package/esm/typings/src/llm-providers/remote/interfaces/PromptbookServer_ListModels_Request.d.ts +34 -0
- package/esm/typings/src/llm-providers/remote/interfaces/PromptbookServer_ListModels_Response.d.ts +15 -0
- package/esm/typings/src/llm-providers/remote/interfaces/{Promptbook_Server_Progress.d.ts → PromptbookServer_Prompt_Progress.d.ts} +1 -1
- package/esm/typings/src/llm-providers/remote/interfaces/{Promptbook_Server_Request.d.ts → PromptbookServer_Prompt_Request.d.ts} +15 -3
- package/esm/typings/src/llm-providers/remote/interfaces/{Promptbook_Server_Response.d.ts → PromptbookServer_Prompt_Response.d.ts} +1 -1
- package/esm/typings/src/llm-providers/remote/interfaces/RemoteLlmExecutionToolsOptions.d.ts +1 -7
- package/esm/typings/src/llm-providers/remote/startRemoteServer.d.ts +1 -0
- package/esm/typings/src/utils/{Register.d.ts → $Register.d.ts} +6 -2
- package/esm/typings/src/utils/environment/{getGlobalScope.d.ts → $getGlobalScope.d.ts} +1 -1
- package/esm/typings/src/utils/organization/f.d.ts +6 -0
- package/package.json +2 -6
- package/umd/index.umd.js +286 -2128
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/llm-providers/_common/config.d.ts +0 -14
- package/esm/typings/src/llm-providers/anthropic-claude/register1.d.ts +0 -4
- /package/esm/typings/src/llm-providers/mocked/{fakeTextToExpectations.d.ts → $fakeTextToExpectations.d.ts} +0 -0
- /package/esm/typings/src/utils/{currentDate.d.ts → $currentDate.d.ts} +0 -0
- /package/esm/typings/src/utils/environment/{isRunningInBrowser.d.ts → $isRunningInBrowser.d.ts} +0 -0
- /package/esm/typings/src/utils/environment/{isRunningInNode.d.ts → $isRunningInNode.d.ts} +0 -0
- /package/esm/typings/src/utils/environment/{isRunningInWebWorker.d.ts → $isRunningInWebWorker.d.ts} +0 -0
- /package/esm/typings/src/utils/files/{isDirectoryExisting.d.ts → $isDirectoryExisting.d.ts} +0 -0
- /package/esm/typings/src/utils/files/{isDirectoryExisting.test.d.ts → $isDirectoryExisting.test.d.ts} +0 -0
- /package/esm/typings/src/utils/files/{isFileExisting.d.ts → $isFileExisting.d.ts} +0 -0
- /package/esm/typings/src/utils/files/{isFileExisting.test.d.ts → $isFileExisting.test.d.ts} +0 -0
- /package/esm/typings/src/utils/files/{listAllFiles.d.ts → $listAllFiles.d.ts} +0 -0
- /package/esm/typings/src/utils/files/{listAllFiles.test.d.ts → $listAllFiles.test.d.ts} +0 -0
- /package/esm/typings/src/utils/random/{randomSeed.d.ts → $randomSeed.d.ts} +0 -0
|
@@ -4,7 +4,7 @@ import type { TaskProgress } from '../../../types/TaskProgress';
|
|
|
4
4
|
*
|
|
5
5
|
* This is sent from server to client arbitrarily and may be sent multiple times
|
|
6
6
|
*/
|
|
7
|
-
export type
|
|
7
|
+
export type PromptbookServer_Prompt_Progress = {
|
|
8
8
|
/**
|
|
9
9
|
* The progress of text generation
|
|
10
10
|
*/
|
|
@@ -6,8 +6,12 @@ import type { LlmToolsConfiguration } from '../../_common/LlmToolsConfiguration'
|
|
|
6
6
|
*
|
|
7
7
|
* This is a request from client to server
|
|
8
8
|
*/
|
|
9
|
-
export type
|
|
10
|
-
export type
|
|
9
|
+
export type PromptbookServer_Prompt_Request = PromptbookServer_Prompt_CollectionRequest | PromptbookServer_Prompt_AnonymousRequest;
|
|
10
|
+
export type PromptbookServer_Prompt_CollectionRequest = {
|
|
11
|
+
/**
|
|
12
|
+
* Collection mode
|
|
13
|
+
*/
|
|
14
|
+
isAnonymous: false;
|
|
11
15
|
/**
|
|
12
16
|
* Client responsible for the requests
|
|
13
17
|
*/
|
|
@@ -17,7 +21,11 @@ export type Promptbook_Server_CollectionRequest = {
|
|
|
17
21
|
*/
|
|
18
22
|
readonly prompt: Prompt;
|
|
19
23
|
};
|
|
20
|
-
export type
|
|
24
|
+
export type PromptbookServer_Prompt_AnonymousRequest = {
|
|
25
|
+
/**
|
|
26
|
+
* Anonymous mode
|
|
27
|
+
*/
|
|
28
|
+
isAnonymous: true;
|
|
21
29
|
/**
|
|
22
30
|
* Configuration for the LLM tools
|
|
23
31
|
*/
|
|
@@ -27,3 +35,7 @@ export type Promptbook_Server_AnonymousRequest = {
|
|
|
27
35
|
*/
|
|
28
36
|
readonly prompt: Prompt;
|
|
29
37
|
};
|
|
38
|
+
/**
|
|
39
|
+
* TODO: [👡] DRY `PromptbookServer_Prompt_Request` and `PromptbookServer_ListModels_Request`
|
|
40
|
+
* TODO: [🧠][🛍] Maybe not `isAnonymous: boolean` BUT `mode: 'ANONYMOUS'|'COLLECTION'`
|
|
41
|
+
*/
|
|
@@ -4,7 +4,7 @@ import type { PromptResult } from '../../../execution/PromptResult';
|
|
|
4
4
|
*
|
|
5
5
|
* This is sent from server to client when the generated text is completed
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface PromptbookServer_Prompt_Response {
|
|
8
8
|
/**
|
|
9
9
|
* The result of the prompt
|
|
10
10
|
*/
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { AvailableModel } from '../../../execution/AvailableModel';
|
|
2
1
|
import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecutionToolsOptions';
|
|
3
2
|
import type { client_id } from '../../../types/typeAliases';
|
|
4
3
|
import type { string_base_url } from '../../../types/typeAliases';
|
|
@@ -22,12 +21,6 @@ export type RemoteLlmExecutionToolsOptions = CommonExecutionToolsOptions & {
|
|
|
22
21
|
* @example '/promptbook/socket.io'
|
|
23
22
|
*/
|
|
24
23
|
readonly path: string_uri;
|
|
25
|
-
/**
|
|
26
|
-
* If set, only these models will be listed as available
|
|
27
|
-
*
|
|
28
|
-
* TODO: [🧠] !!!!!! Figure out better solution
|
|
29
|
-
*/
|
|
30
|
-
readonly models?: Array<AvailableModel>;
|
|
31
24
|
/**
|
|
32
25
|
* Mode of the server to connect to
|
|
33
26
|
*/
|
|
@@ -52,5 +45,6 @@ export type RemoteLlmExecutionToolsOptions = CommonExecutionToolsOptions & {
|
|
|
52
45
|
readonly clientId: client_id;
|
|
53
46
|
});
|
|
54
47
|
/**
|
|
48
|
+
* TODO: [🧠][🛍] Maybe not `isAnonymous: boolean` BUT `mode: 'ANONYMOUS'|'COLLECTION'`
|
|
55
49
|
* TODO: [🧠][🧜♂️] Maybe join remoteUrl and path into single value
|
|
56
50
|
*/
|
|
@@ -11,6 +11,7 @@ import type { RemoteServerOptions } from './interfaces/RemoteServerOptions';
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function startRemoteServer(options: RemoteServerOptions): IDestroyable;
|
|
13
13
|
/**
|
|
14
|
+
* TODO: [🧠][🛍] Maybe not `isAnonymous: boolean` BUT `mode: 'ANONYMOUS'|'COLLECTION'`
|
|
14
15
|
* TODO: [⚖] Expose the collection to be able to connect to same collection via createCollectionFromUrl
|
|
15
16
|
* TODO: Handle progress - support streaming
|
|
16
17
|
* TODO: [🗯] Do not hang up immediately but wait until client closes OR timeout
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { string_javascript_name } from '../types/typeAliases';
|
|
1
2
|
import type { TODO_string } from './organization/TODO_string';
|
|
2
3
|
export type Registered = {
|
|
3
4
|
/**
|
|
@@ -12,11 +13,14 @@ export type Registered = {
|
|
|
12
13
|
/**
|
|
13
14
|
* Register is @@@
|
|
14
15
|
*
|
|
16
|
+
* Note: `$` is used to indicate that this function is not a pure function - it accesses and adds variables in global scope.
|
|
17
|
+
*
|
|
15
18
|
* @private internal utility, exported are only signleton instances of this class
|
|
16
19
|
*/
|
|
17
|
-
export declare class Register<TRegistered extends Registered> {
|
|
20
|
+
export declare class $Register<TRegistered extends Registered> {
|
|
21
|
+
private readonly storageName;
|
|
18
22
|
private readonly storage;
|
|
19
|
-
constructor(
|
|
23
|
+
constructor(storageName: string_javascript_name);
|
|
20
24
|
list(): Array<TRegistered>;
|
|
21
25
|
register(registered: TRegistered): void;
|
|
22
26
|
}
|
|
@@ -2,7 +2,7 @@ import type { really_any } from '../organization/really_any';
|
|
|
2
2
|
/**
|
|
3
3
|
* @@@
|
|
4
4
|
*
|
|
5
|
-
* Note: `$` is used to indicate that this function is not a pure function - it access global
|
|
5
|
+
* Note: `$` is used to indicate that this function is not a pure function - it access global scope
|
|
6
6
|
*
|
|
7
7
|
* @public exported from `@promptbook/utils`
|
|
8
8
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/remote-server",
|
|
3
|
-
"version": "0.66.0
|
|
3
|
+
"version": "0.66.0",
|
|
4
4
|
"description": "Supercharge your use of large language models",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -47,15 +47,11 @@
|
|
|
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.66.0
|
|
50
|
+
"@promptbook/core": "0.66.0"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@anthropic-ai/sdk": "0.26.1",
|
|
54
|
-
"@azure/openai": "1.0.0-beta.12",
|
|
55
53
|
"colors": "1.4.0",
|
|
56
|
-
"openai": "4.55.9",
|
|
57
54
|
"socket.io": "4.7.2",
|
|
58
|
-
"socket.io-client": "4.7.2",
|
|
59
55
|
"spacetrim": "0.11.39"
|
|
60
56
|
}
|
|
61
57
|
}
|