@promptbook/cli 0.103.0-40 → 0.103.0-42
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 +5 -2
- package/esm/index.es.js.map +1 -1
- package/esm/typings/src/_packages/remote-server.index.d.ts +2 -0
- package/esm/typings/src/collection/agent-collection/AgentCollection.d.ts +3 -0
- package/esm/typings/src/collection/agent-collection/constructors/AgentCollectionInDirectory.d.ts +1 -0
- package/esm/typings/src/remote-server/startAgentServer.d.ts +23 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/package.json +1 -1
- package/umd/index.umd.js +5 -2
- package/umd/index.umd.js.map +1 -1
|
@@ -2,11 +2,13 @@ import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
|
2
2
|
import type { Identification } from '../remote-server/socket-types/_subtypes/Identification';
|
|
3
3
|
import type { ApplicationModeIdentification } from '../remote-server/socket-types/_subtypes/Identification';
|
|
4
4
|
import type { AnonymousModeIdentification } from '../remote-server/socket-types/_subtypes/Identification';
|
|
5
|
+
import { startAgentServer } from '../remote-server/startAgentServer';
|
|
5
6
|
import { startRemoteServer } from '../remote-server/startRemoteServer';
|
|
6
7
|
import type { RemoteServerOptions } from '../remote-server/types/RemoteServerOptions';
|
|
7
8
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
8
9
|
export type { Identification };
|
|
9
10
|
export type { ApplicationModeIdentification };
|
|
10
11
|
export type { AnonymousModeIdentification };
|
|
12
|
+
export { startAgentServer };
|
|
11
13
|
export { startRemoteServer };
|
|
12
14
|
export type { RemoteServerOptions };
|
package/esm/typings/src/collection/agent-collection/constructors/AgentCollectionInDirectory.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export declare class AgentCollectionInDirectory implements AgentCollection {
|
|
|
82
82
|
}
|
|
83
83
|
export {};
|
|
84
84
|
/**
|
|
85
|
+
* TODO: [🧠][🚙] `AgentXxx` vs `AgentsXxx` naming convention
|
|
85
86
|
* TODO: [🖇] What about symlinks? Maybe option `isSymlinksFollowed`
|
|
86
87
|
* TODO: [🧠] Maybe add option `isImmutable`
|
|
87
88
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TODO_any } from '../_packages/types.index';
|
|
2
|
+
import { number_port } from '../types/typeAliases';
|
|
3
|
+
type AgentsServerOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* !!!
|
|
6
|
+
*
|
|
7
|
+
* @default 4440
|
|
8
|
+
*/
|
|
9
|
+
port: number_port;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* !!!!!
|
|
13
|
+
* Remote server is a proxy server that uses its execution tools internally and exposes the executor interface externally.
|
|
14
|
+
*
|
|
15
|
+
* You can simply use `RemoteExecutionTools` on client-side javascript and connect to your remote server.
|
|
16
|
+
* This is useful to make all logic on browser side but not expose your API keys or no need to use customer's GPU.
|
|
17
|
+
*
|
|
18
|
+
* @see https://github.com/webgptorg/promptbook#remote-server
|
|
19
|
+
* @public exported from `@promptbook/remote-server`
|
|
20
|
+
* <- TODO: !!!! Maybe change to `@promptbook/agent-server`
|
|
21
|
+
*/
|
|
22
|
+
export declare function startAgentServer(options: AgentsServerOptions): Promise<TODO_any>;
|
|
23
|
+
export {};
|
|
@@ -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-41`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
package/umd/index.umd.js
CHANGED
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
* @generated
|
|
58
58
|
* @see https://github.com/webgptorg/promptbook
|
|
59
59
|
*/
|
|
60
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-
|
|
60
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.103.0-42';
|
|
61
61
|
/**
|
|
62
62
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
63
63
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -5000,7 +5000,7 @@
|
|
|
5000
5000
|
strategy = 'REMOTE_SERVER';
|
|
5001
5001
|
}
|
|
5002
5002
|
else {
|
|
5003
|
-
console.log(colors__default["default"].red(`Unknown provider: "${provider}", please use "BRING_YOUR_OWN_KEYS" or "REMOTE_SERVER"`));
|
|
5003
|
+
console.log(colors__default["default"].red(`Unknown provider: "${provider}", please use "--provider BRING_YOUR_OWN_KEYS" or "--provider REMOTE_SERVER"`));
|
|
5004
5004
|
process.exit(1);
|
|
5005
5005
|
}
|
|
5006
5006
|
if (strategy === 'BRING_YOUR_OWN_KEYS') {
|
|
@@ -20698,6 +20698,7 @@
|
|
|
20698
20698
|
}
|
|
20699
20699
|
}
|
|
20700
20700
|
/**
|
|
20701
|
+
* TODO: [🧠][🚙] `AgentXxx` vs `AgentsXxx` naming convention
|
|
20701
20702
|
* TODO: [🖇] What about symlinks? Maybe option `isSymlinksFollowed`
|
|
20702
20703
|
* TODO: [🧠] Maybe add option `isImmutable`
|
|
20703
20704
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
@@ -20723,6 +20724,7 @@
|
|
|
20723
20724
|
startServerCommand.alias('start');
|
|
20724
20725
|
startServerCommand.action(handleActionErrors(async (path, cliOptions) => {
|
|
20725
20726
|
const { port: portRaw, reload: isCacheReloaded, verbose: isVerbose } = cliOptions;
|
|
20727
|
+
// TODO: !!!! [🌕] DRY
|
|
20726
20728
|
const port = parseInt(portRaw, 10);
|
|
20727
20729
|
if (isNaN(port) || port <= 0 || port > 65535) {
|
|
20728
20730
|
console.error(colors__default["default"].red(`Invalid port number: ${portRaw}`));
|
|
@@ -20755,6 +20757,7 @@
|
|
|
20755
20757
|
// console.log({ isRichUi });
|
|
20756
20758
|
TODO_USE(tools);
|
|
20757
20759
|
TODO_USE(collection);
|
|
20760
|
+
// TODO: !!!! Use
|
|
20758
20761
|
// TODO: !!!! Pass collection and tools to the server starter
|
|
20759
20762
|
// TODO: !!!! The Next app should be build during the package build step not here
|
|
20760
20763
|
/*
|