@promptbook/remote-server 0.101.0 → 0.102.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.
@@ -7,9 +7,6 @@ import type { AvatarProfileProps } from '../book-components/AvatarProfile/Avatar
7
7
  import { AvatarProfile } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfile';
8
8
  import type { AvatarProfileFromSourceProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
9
9
  import { AvatarProfileFromSource } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
10
- import type { MockedChatDelayConfig } from '../book-components/AvatarProfile/AvatarProfile/MockedChat';
11
- import type { MockedChatProps } from '../book-components/AvatarProfile/AvatarProfile/MockedChat';
12
- import { MockedChat } from '../book-components/AvatarProfile/AvatarProfile/MockedChat';
13
10
  import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
14
11
  import { BookEditor } from '../book-components/BookEditor/BookEditor';
15
12
  import { DEFAULT_BOOK_FONT_CLASS } from '../book-components/BookEditor/config';
@@ -20,6 +17,23 @@ import type { SendMessageToLlmChatFunction } from '../book-components/Chat/hooks
20
17
  import { useSendMessageToLlmChat } from '../book-components/Chat/hooks/useSendMessageToLlmChat';
21
18
  import { LlmChat } from '../book-components/Chat/LlmChat/LlmChat';
22
19
  import type { LlmChatProps } from '../book-components/Chat/LlmChat/LlmChatProps';
20
+ import { NORMAL_FLOW } from '../book-components/Chat/MockedChat/constants';
21
+ import { FAST_FLOW } from '../book-components/Chat/MockedChat/constants';
22
+ import { SLOW_FLOW } from '../book-components/Chat/MockedChat/constants';
23
+ import { BLOCKY_FLOW } from '../book-components/Chat/MockedChat/constants';
24
+ import { RANDOM_FLOW } from '../book-components/Chat/MockedChat/constants';
25
+ import { MOCKED_CHAT_DELAY_CONFIGS } from '../book-components/Chat/MockedChat/constants';
26
+ import type { MockedChatDelayConfig } from '../book-components/Chat/MockedChat/MockedChat';
27
+ import type { MockedChatProps } from '../book-components/Chat/MockedChat/MockedChat';
28
+ import { MockedChat } from '../book-components/Chat/MockedChat/MockedChat';
29
+ import type { string_chat_format_name } from '../book-components/Chat/save/savePlugins';
30
+ import type { ChatSaveFormatDefinition } from '../book-components/Chat/save/savePlugins';
31
+ import { jsonSaveFormatDefinition } from '../book-components/Chat/save/savePlugins';
32
+ import { txtSaveFormatDefinition } from '../book-components/Chat/save/savePlugins';
33
+ import { mdSaveFormatDefinition } from '../book-components/Chat/save/savePlugins';
34
+ import { htmlSaveFormatDefinition } from '../book-components/Chat/save/savePlugins';
35
+ import { CHAT_SAVE_FORMATS } from '../book-components/Chat/save/savePlugins';
36
+ import { getChatSaveFormatDefinitions } from '../book-components/Chat/save/savePlugins';
23
37
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
24
38
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
25
39
  import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
@@ -41,9 +55,6 @@ export type { AvatarProfileProps };
41
55
  export { AvatarProfile };
42
56
  export type { AvatarProfileFromSourceProps };
43
57
  export { AvatarProfileFromSource };
44
- export type { MockedChatDelayConfig };
45
- export type { MockedChatProps };
46
- export { MockedChat };
47
58
  export type { BookEditorProps };
48
59
  export { BookEditor };
49
60
  export { DEFAULT_BOOK_FONT_CLASS };
@@ -54,6 +65,23 @@ export type { SendMessageToLlmChatFunction };
54
65
  export { useSendMessageToLlmChat };
55
66
  export { LlmChat };
56
67
  export type { LlmChatProps };
68
+ export { NORMAL_FLOW };
69
+ export { FAST_FLOW };
70
+ export { SLOW_FLOW };
71
+ export { BLOCKY_FLOW };
72
+ export { RANDOM_FLOW };
73
+ export { MOCKED_CHAT_DELAY_CONFIGS };
74
+ export type { MockedChatDelayConfig };
75
+ export type { MockedChatProps };
76
+ export { MockedChat };
77
+ export type { string_chat_format_name };
78
+ export type { ChatSaveFormatDefinition };
79
+ export { jsonSaveFormatDefinition };
80
+ export { txtSaveFormatDefinition };
81
+ export { mdSaveFormatDefinition };
82
+ export { htmlSaveFormatDefinition };
83
+ export { CHAT_SAVE_FORMATS };
84
+ export { getChatSaveFormatDefinitions };
57
85
  export type { ChatMessage };
58
86
  export type { ChatParticipant };
59
87
  export type { MessageButton };
@@ -9,13 +9,15 @@ import type { AvatarChipProps } from '../book-components/AvatarProfile/AvatarChi
9
9
  import type { AvatarChipFromSourceProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChipFromSource';
10
10
  import type { AvatarProfileProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfile';
11
11
  import type { AvatarProfileFromSourceProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
12
- import type { MockedChatDelayConfig } from '../book-components/AvatarProfile/AvatarProfile/MockedChat';
13
- import type { MockedChatProps } from '../book-components/AvatarProfile/AvatarProfile/MockedChat';
14
12
  import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
15
13
  import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
16
14
  import type { ChatAutoScrollConfig } from '../book-components/Chat/hooks/useChatAutoScroll';
17
15
  import type { SendMessageToLlmChatFunction } from '../book-components/Chat/hooks/useSendMessageToLlmChat';
18
16
  import type { LlmChatProps } from '../book-components/Chat/LlmChat/LlmChatProps';
17
+ import type { MockedChatDelayConfig } from '../book-components/Chat/MockedChat/MockedChat';
18
+ import type { MockedChatProps } from '../book-components/Chat/MockedChat/MockedChat';
19
+ import type { string_chat_format_name } from '../book-components/Chat/save/savePlugins';
20
+ import type { ChatSaveFormatDefinition } from '../book-components/Chat/save/savePlugins';
19
21
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
20
22
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
21
23
  import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
@@ -338,13 +340,15 @@ export type { AvatarChipProps };
338
340
  export type { AvatarChipFromSourceProps };
339
341
  export type { AvatarProfileProps };
340
342
  export type { AvatarProfileFromSourceProps };
341
- export type { MockedChatDelayConfig };
342
- export type { MockedChatProps };
343
343
  export type { BookEditorProps };
344
344
  export type { ChatProps };
345
345
  export type { ChatAutoScrollConfig };
346
346
  export type { SendMessageToLlmChatFunction };
347
347
  export type { LlmChatProps };
348
+ export type { MockedChatDelayConfig };
349
+ export type { MockedChatProps };
350
+ export type { string_chat_format_name };
351
+ export type { ChatSaveFormatDefinition };
348
352
  export type { ChatMessage };
349
353
  export type { ChatParticipant };
350
354
  export type { MessageButton };
@@ -1,3 +1,4 @@
1
+ import { string_chat_format_name } from '../save/savePlugins';
1
2
  import type { ChatProps } from './ChatProps';
2
3
  /**
3
4
  * Renders a chat with messages and input for new messages
@@ -12,4 +13,7 @@ import type { ChatProps } from './ChatProps';
12
13
  *
13
14
  * @public exported from `@promptbook/components`
14
15
  */
15
- export declare function Chat(props: ChatProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function Chat(props: ChatProps & {
17
+ saveFormats?: string_chat_format_name[];
18
+ isSaveButtonEnabled?: boolean;
19
+ }): import("react/jsx-runtime").JSX.Element;
@@ -6,25 +6,42 @@ import type { ChatProps } from '../../Chat/Chat/ChatProps';
6
6
  */
7
7
  export type MockedChatDelayConfig = {
8
8
  /**
9
- * Delay before showing the first message (in milliseconds)
9
+ * Delay before showing the first message (ms)
10
10
  * @default 1000
11
11
  */
12
- beforeFirstMessage?: number;
12
+ beforeFirstMessage?: number | [number, number];
13
13
  /**
14
- * Emulated thinking time between messages (in milliseconds)
14
+ * Emulated thinking time between messages (ms)
15
+ * Can be a fixed number or [min, max] for random range.
15
16
  * @default 2000
16
17
  */
17
- thinkingBetweenMessages?: number;
18
+ thinkingBetweenMessages?: number | [number, number];
18
19
  /**
19
- * Wait time after each written word (in milliseconds)
20
+ * Wait time after each written word (ms)
21
+ * Can be a fixed number or [min, max] for random range.
20
22
  * @default 100
21
23
  */
22
- waitAfterWord?: number;
24
+ waitAfterWord?: number | [number, number];
23
25
  /**
24
- * Extra delay on top of the word waiting (in milliseconds)
26
+ * Extra delay on top of the word waiting (ms)
27
+ * Can be a fixed number or [min, max] for random range.
25
28
  * @default 50
26
29
  */
27
- extraWordDelay?: number;
30
+ extraWordDelay?: number | [number, number];
31
+ /**
32
+ * Chance (0-1) that a longer pause occurs before a message (e.g. agent switch)
33
+ * @default 0.2
34
+ */
35
+ longPauseChance?: number;
36
+ /**
37
+ * Range for long pause duration (ms), [min, max]
38
+ * @default [1200, 3500]
39
+ */
40
+ longPauseDuration?: [number, number];
41
+ /**
42
+ * If true, disables typing effect and shows full message at once (BLOCKY_FLOW)
43
+ */
44
+ blocky?: boolean;
28
45
  };
29
46
  /**
30
47
  * Props for MockedChat component
@@ -0,0 +1,42 @@
1
+ import { MockedChatDelayConfig } from './MockedChat';
2
+ /**
3
+ * Normal flow of messages in the `MockedChat` component
4
+ *
5
+ * @public exported from `@promptbook/components`
6
+ */
7
+ export declare const NORMAL_FLOW: MockedChatDelayConfig;
8
+ /**
9
+ * Fast flow of messages in the `MockedChat` component
10
+ *
11
+ * @public exported from `@promptbook/components`
12
+ */
13
+ export declare const FAST_FLOW: MockedChatDelayConfig;
14
+ /**
15
+ * Slow flow of messages in the `MockedChat` component
16
+ *
17
+ * @public exported from `@promptbook/components`
18
+ */
19
+ export declare const SLOW_FLOW: MockedChatDelayConfig;
20
+ /**
21
+ * Blocky flow of messages in the `MockedChat` component
22
+ *
23
+ * Messages appear in blocks rather than word-by-word
24
+ *
25
+ * @public exported from `@promptbook/components`
26
+ */
27
+ export declare const BLOCKY_FLOW: MockedChatDelayConfig;
28
+ /**
29
+ * Random flow of messages in the `MockedChat` component
30
+ *
31
+ * @public exported from `@promptbook/components`
32
+ */
33
+ export declare const RANDOM_FLOW: MockedChatDelayConfig;
34
+ /**
35
+ * All predefined delay configurations for the `MockedChat` component
36
+ *
37
+ * @public exported from `@promptbook/components`
38
+ */
39
+ export declare const MOCKED_CHAT_DELAY_CONFIGS: Record<string, MockedChatDelayConfig>;
40
+ /**
41
+ * Note: [💞] Ignore a discrepancy between file name and entity name
42
+ */
@@ -0,0 +1,105 @@
1
+ import { string_file_extension, string_mime_type } from '../../../types/typeAliases';
2
+ import type { ChatMessage } from '../types/ChatMessage';
3
+ /**
4
+ * Supported chat export formatNames
5
+ * @public exported from `@promptbook/components`
6
+ */
7
+ export type string_chat_format_name = typeof CHAT_SAVE_FORMATS[number]['formatName'];
8
+ /**
9
+ * Plugin contract for chat export formatNames
10
+ * @public exported from `@promptbook/components`
11
+ */
12
+ export type ChatSaveFormatDefinition = {
13
+ formatName: string_file_extension | string_mime_type | string;
14
+ label: string;
15
+ getContent: (messages: ChatMessage[]) => string;
16
+ mimeType: string;
17
+ fileExtension: string;
18
+ };
19
+ /**
20
+ * JSON export plugin (full metadata)
21
+ *
22
+ * @public exported from `@promptbook/components`
23
+ */
24
+ export declare const jsonSaveFormatDefinition: {
25
+ readonly formatName: "json";
26
+ readonly label: "JSON (full)";
27
+ readonly getContent: (messages: ChatMessage[]) => string;
28
+ readonly mimeType: "application/json";
29
+ readonly fileExtension: "json";
30
+ };
31
+ /**
32
+ * Plain text export plugin (messages only)
33
+ *
34
+ * @public exported from `@promptbook/components`
35
+ */
36
+ export declare const txtSaveFormatDefinition: {
37
+ readonly formatName: "txt";
38
+ readonly label: "Plain Text";
39
+ readonly getContent: (messages: ChatMessage[]) => string;
40
+ readonly mimeType: "text/plain";
41
+ readonly fileExtension: "txt";
42
+ };
43
+ /**
44
+ * Markdown export plugin
45
+ *
46
+ * @public exported from `@promptbook/components`
47
+ */
48
+ export declare const mdSaveFormatDefinition: {
49
+ readonly formatName: "md";
50
+ readonly label: "Markdown";
51
+ readonly getContent: (messages: ChatMessage[]) => string;
52
+ readonly mimeType: "text/markdown";
53
+ readonly fileExtension: "md";
54
+ };
55
+ /**
56
+ * HTML export plugin
57
+ *
58
+ * @public exported from `@promptbook/components`
59
+ */
60
+ export declare const htmlSaveFormatDefinition: {
61
+ readonly formatName: "html";
62
+ readonly label: "HTML";
63
+ readonly getContent: (messages: ChatMessage[]) => string;
64
+ readonly mimeType: "text/html";
65
+ readonly fileExtension: "html";
66
+ };
67
+ /**
68
+ * Registry of all built-in chat save plugins
69
+ *
70
+ * @public exported from `@promptbook/components`
71
+ */
72
+ export declare const CHAT_SAVE_FORMATS: readonly [{
73
+ readonly formatName: "json";
74
+ readonly label: "JSON (full)";
75
+ readonly getContent: (messages: ChatMessage[]) => string;
76
+ readonly mimeType: "application/json";
77
+ readonly fileExtension: "json";
78
+ }, {
79
+ readonly formatName: "txt";
80
+ readonly label: "Plain Text";
81
+ readonly getContent: (messages: ChatMessage[]) => string;
82
+ readonly mimeType: "text/plain";
83
+ readonly fileExtension: "txt";
84
+ }, {
85
+ readonly formatName: "md";
86
+ readonly label: "Markdown";
87
+ readonly getContent: (messages: ChatMessage[]) => string;
88
+ readonly mimeType: "text/markdown";
89
+ readonly fileExtension: "md";
90
+ }, {
91
+ readonly formatName: "html";
92
+ readonly label: "HTML";
93
+ readonly getContent: (messages: ChatMessage[]) => string;
94
+ readonly mimeType: "text/html";
95
+ readonly fileExtension: "html";
96
+ }];
97
+ /**
98
+ * Returns enabled chat save plugins filtered by formatNames (or all when omitted)
99
+ *
100
+ * @public exported from `@promptbook/components`
101
+ */
102
+ export declare function getChatSaveFormatDefinitions(formatNames?: ReadonlyArray<string_chat_format_name>): ReadonlyArray<ChatSaveFormatDefinition>;
103
+ /**
104
+ * Note: [💞] Ignore a discrepancy between file name and entity name
105
+ */
@@ -31,6 +31,12 @@ export type RemoteServerOptions<TCustomOptions> = CommonToolsOptions & {
31
31
  * @property {number} port The port number the server will listen on.
32
32
  */
33
33
  readonly port: number;
34
+ /**
35
+ * Enable rich UI (React + Tailwind) at `/` path.
36
+ * Default: true
37
+ * If false, server will respond with markdown as before.
38
+ */
39
+ readonly isRichUi?: boolean;
34
40
  /**
35
41
  * Creates execution tools the client
36
42
  *
@@ -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.101.0-21`).
18
+ * It follows semantic versioning (e.g., `0.102.0-0`).
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.101.0",
3
+ "version": "0.102.0-1",
4
4
  "description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
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.101.0"
98
+ "@promptbook/core": "0.102.0-1"
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.101.0';
50
+ const PROMPTBOOK_ENGINE_VERSION = '0.102.0-1';
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
@@ -8262,57 +8262,125 @@
8262
8262
  if ((_a = request.url) === null || _a === void 0 ? void 0 : _a.includes('socket.io')) {
8263
8263
  return;
8264
8264
  }
8265
- response.type('text/markdown').send(await spaceTrim.spaceTrim(async (block) => `
8266
- # Promptbook
8265
+ if (options.isRichUi !== false) {
8266
+ // Serve rich React + Tailwind UI with server info injected
8267
+ const serverInfo = {
8268
+ bookLanguageVersion: BOOK_LANGUAGE_VERSION,
8269
+ promptbookEngineVersion: PROMPTBOOK_ENGINE_VERSION,
8270
+ nodeVersion: process.version,
8271
+ port,
8272
+ startupDate: startupDate.toISOString(),
8273
+ isAnonymousModeAllowed,
8274
+ isApplicationModeAllowed,
8275
+ pipelines: !isApplicationModeAllowed || collection === null
8276
+ ? []
8277
+ : await collection.listPipelines(),
8278
+ runningExecutions: runningExecutionTasks.length,
8279
+ paths: [
8280
+ ...app._router.stack
8281
+ .map(({ route }) => (route === null || route === void 0 ? void 0 : route.path) || null)
8282
+ .filter((path) => path !== null),
8283
+ '/api-docs',
8284
+ ],
8285
+ };
8286
+ response.type('text/html').send(`
8287
+ <!DOCTYPE html>
8288
+ <html lang="en">
8289
+ <head>
8290
+ <meta charset="UTF-8" />
8291
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8292
+ <title>Promptbook Server</title>
8293
+ <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
8294
+ </head>
8295
+ <body class="bg-gray-50 text-gray-900">
8296
+ <div id="root"></div>
8297
+ <script>
8298
+ window.__PROMPTBOOK_SERVER_INFO__ = ${JSON.stringify(serverInfo)};
8299
+ // TODO: Hydrate React app here
8300
+ // You will need to bundle and serve a React app for full functionality
8301
+ const info = window.__PROMPTBOOK_SERVER_INFO__;
8302
+ document.getElementById('root').innerHTML = \`
8303
+ <h1 class="text-3xl font-bold mb-4">Promptbook Server Rich UI</h1>
8304
+ <div class="mb-4">
8305
+ <strong>Book language version:</strong> \${info.bookLanguageVersion}<br>
8306
+ <strong>Promptbook engine version:</strong> \${info.promptbookEngineVersion}<br>
8307
+ <strong>Node.js version:</strong> \${info.nodeVersion}<br>
8308
+ <strong>Server port:</strong> \${info.port}<br>
8309
+ <strong>Startup date:</strong> \${info.startupDate}<br>
8310
+ <strong>Anonymous mode:</strong> \${info.isAnonymousModeAllowed ? 'enabled' : 'disabled'}<br>
8311
+ <strong>Application mode:</strong> \${info.isApplicationModeAllowed ? 'enabled' : 'disabled'}<br>
8312
+ <strong>Pipelines in collection:</strong> \${info.pipelines.length ? '<ul>' + info.pipelines.map(p => '<li>' + p + '</li>').join('') + '</ul>' : 'none'}<br>
8313
+ <strong>Running executions:</strong> \${info.runningExecutions}<br>
8314
+ <strong>Paths:</strong> <ul>\${info.paths.map(p => '<li>' + p + '</li>').join('')}</ul>
8315
+ </div>
8316
+ <div class="mt-8">
8317
+ <h2 class="text-xl font-semibold mb-2">Instructions</h2>
8318
+ <ol class="list-decimal ml-6">
8319
+ <li>The client <a href="https://www.npmjs.com/package/@promptbook/remote-client" class="text-blue-600 underline">https://www.npmjs.com/package/@promptbook/remote-client</a></li>
8320
+ <li>OpenAI compatible client <span class="text-gray-500">(Not working yet)</span></li>
8321
+ <li>REST API</li>
8322
+ </ol>
8323
+ <p class="mt-2">For more information look at: <a href="https://github.com/webgptorg/promptbook" class="text-blue-600 underline">https://github.com/webgptorg/promptbook</a></p>
8324
+ </div>
8325
+ \`;
8326
+ </script>
8327
+ </body>
8328
+ </html>
8329
+ `);
8330
+ }
8331
+ else {
8332
+ response.type('text/markdown').send(await spaceTrim.spaceTrim(async (block) => `
8333
+ # Promptbook
8267
8334
 
8268
- > ${block(CLAIM)}
8335
+ > ${block(CLAIM)}
8269
8336
 
8270
- **Book language version:** ${BOOK_LANGUAGE_VERSION}
8271
- **Promptbook engine version:** ${PROMPTBOOK_ENGINE_VERSION}
8272
- **Node.js version:** ${process.version /* <- TODO: [🧠] Is it secure to expose this */}
8337
+ **Book language version:** ${BOOK_LANGUAGE_VERSION}
8338
+ **Promptbook engine version:** ${PROMPTBOOK_ENGINE_VERSION}
8339
+ **Node.js version:** ${process.version /* <- TODO: [🧠] Is it secure to expose this */}
8273
8340
 
8274
- ---
8341
+ ---
8275
8342
 
8276
- ## Details
8343
+ ## Details
8277
8344
 
8278
- **Server port:** ${port}
8279
- **Startup date:** ${startupDate.toISOString()}
8280
- **Anonymous mode:** ${isAnonymousModeAllowed ? 'enabled' : 'disabled'}
8281
- **Application mode:** ${isApplicationModeAllowed ? 'enabled' : 'disabled'}
8282
- ${block(!isApplicationModeAllowed || collection === null
8283
- ? ''
8284
- : '**Pipelines in collection:**\n' +
8285
- (await collection.listPipelines())
8286
- .map((pipelineUrl) => `- ${pipelineUrl}`)
8287
- .join('\n'))}
8288
- **Running executions:** ${runningExecutionTasks.length}
8345
+ **Server port:** ${port}
8346
+ **Startup date:** ${startupDate.toISOString()}
8347
+ **Anonymous mode:** ${isAnonymousModeAllowed ? 'enabled' : 'disabled'}
8348
+ **Application mode:** ${isApplicationModeAllowed ? 'enabled' : 'disabled'}
8349
+ ${block(!isApplicationModeAllowed || collection === null
8350
+ ? ''
8351
+ : '**Pipelines in collection:**\n' +
8352
+ (await collection.listPipelines())
8353
+ .map((pipelineUrl) => `- ${pipelineUrl}`)
8354
+ .join('\n'))}
8355
+ **Running executions:** ${runningExecutionTasks.length}
8289
8356
 
8290
- ---
8357
+ ---
8291
8358
 
8292
- ## Paths
8359
+ ## Paths
8293
8360
 
8294
- ${block([
8295
- ...app._router.stack
8296
- .map(({ route }) => (route === null || route === void 0 ? void 0 : route.path) || null)
8297
- .filter((path) => path !== null),
8298
- '/api-docs',
8299
- ]
8300
- .map((path) => `- ${path}`)
8301
- .join('\n'))}
8361
+ ${block([
8362
+ ...app._router.stack
8363
+ .map(({ route }) => (route === null || route === void 0 ? void 0 : route.path) || null)
8364
+ .filter((path) => path !== null),
8365
+ '/api-docs',
8366
+ ]
8367
+ .map((path) => `- ${path}`)
8368
+ .join('\n'))}
8302
8369
 
8303
- ---
8370
+ ---
8304
8371
 
8305
- ## Instructions
8372
+ ## Instructions
8306
8373
 
8307
- To connect to this server use:
8374
+ To connect to this server use:
8308
8375
 
8309
- 1) The client https://www.npmjs.com/package/@promptbook/remote-client
8310
- 2) OpenAI compatible client *(Not working yet)*
8311
- 3) REST API
8376
+ 1) The client https://www.npmjs.com/package/@promptbook/remote-client
8377
+ 2) OpenAI compatible client *(Not working yet)*
8378
+ 3) REST API
8312
8379
 
8313
- For more information look at:
8314
- https://github.com/webgptorg/promptbook
8315
- `));
8380
+ For more information look at:
8381
+ https://github.com/webgptorg/promptbook
8382
+ `));
8383
+ }
8316
8384
  });
8317
8385
  app.post(`/login`, async (request, response) => {
8318
8386
  if (!isApplicationModeAllowed || login === null) {