@promptbook/vercel 0.103.0-42 → 0.103.0-44

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.
Files changed (92) hide show
  1. package/README.md +6 -18
  2. package/esm/index.es.js +21 -98
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/typings/src/_packages/core.index.d.ts +6 -0
  5. package/esm/typings/src/_packages/node.index.d.ts +0 -2
  6. package/esm/typings/src/_packages/types.index.d.ts +22 -0
  7. package/esm/typings/src/_packages/utils.index.d.ts +2 -0
  8. package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -4
  9. package/esm/typings/src/book-2.0/agent-source/padBook.d.ts +1 -1
  10. package/esm/typings/src/book-2.0/agent-source/string_book.d.ts +1 -0
  11. package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +6 -1
  12. package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +1 -1
  13. package/esm/typings/src/book-components/Chat/save/_common/ChatSaveFormatDefinition.d.ts +1 -1
  14. package/esm/typings/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
  15. package/esm/typings/src/book-components/Qr/BrandedQrCode.d.ts +1 -1
  16. package/esm/typings/src/book-components/Qr/useQrCode.d.ts +1 -1
  17. package/esm/typings/src/cli/cli-commands/_boilerplate.d.ts +1 -1
  18. package/esm/typings/src/cli/cli-commands/about.d.ts +1 -1
  19. package/esm/typings/src/cli/cli-commands/hello.d.ts +1 -1
  20. package/esm/typings/src/cli/cli-commands/list-models.d.ts +1 -1
  21. package/esm/typings/src/cli/cli-commands/list-scrapers.d.ts +1 -1
  22. package/esm/typings/src/cli/cli-commands/login.d.ts +1 -1
  23. package/esm/typings/src/cli/cli-commands/make.d.ts +1 -1
  24. package/esm/typings/src/cli/cli-commands/prettify.d.ts +1 -1
  25. package/esm/typings/src/cli/cli-commands/run.d.ts +1 -1
  26. package/esm/typings/src/cli/cli-commands/start-agents-server.d.ts +1 -1
  27. package/esm/typings/src/cli/cli-commands/start-pipelines-server.d.ts +1 -1
  28. package/esm/typings/src/cli/cli-commands/test-command.d.ts +1 -1
  29. package/esm/typings/src/cli/common/$addGlobalOptionsToCommand.d.ts +1 -1
  30. package/esm/typings/src/collection/agent-collection/AgentCollection.d.ts +2 -29
  31. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +107 -0
  32. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +129 -0
  33. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +1 -1
  34. package/esm/typings/src/config.d.ts +1 -1
  35. package/esm/typings/src/errors/0-index.d.ts +3 -0
  36. package/esm/typings/src/errors/DatabaseError.d.ts +12 -0
  37. package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +1 -1
  38. package/esm/typings/src/high-level-abstractions/_common/HighLevelAbstraction.d.ts +1 -1
  39. package/esm/typings/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +1 -1
  40. package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +1 -1
  41. package/esm/typings/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +1 -0
  42. package/esm/typings/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +1 -0
  43. package/esm/typings/src/llm-providers/agent/Agent.d.ts +5 -2
  44. package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +1 -1
  45. package/esm/typings/src/llm-providers/agent/AgentOptions.d.ts +4 -2
  46. package/esm/typings/src/llm-providers/agent/CreateAgentLlmExecutionToolsOptions.d.ts +4 -3
  47. package/esm/typings/src/llm-providers/agent/createAgentLlmExecutionTools.d.ts +1 -1
  48. package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  49. package/esm/typings/src/llm-providers/google/google-models.d.ts +1 -1
  50. package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
  51. package/esm/typings/src/prepare/PrepareAndScrapeOptions.d.ts +1 -0
  52. package/esm/typings/src/remote-server/startAgentServer.d.ts +2 -2
  53. package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +0 -19
  54. package/esm/typings/src/storage/env-storage/$EnvStorage.d.ts +1 -1
  55. package/esm/typings/src/transpilers/_common/BookTranspiler.d.ts +5 -1
  56. package/esm/typings/src/transpilers/_common/BookTranspilerOptions.d.ts +1 -1
  57. package/esm/typings/src/transpilers/_common/register/$bookTranspilersRegister.d.ts +1 -1
  58. package/esm/typings/src/transpilers/formatted-book-in-markdown/FormattedBookInMarkdownTranspiler.d.ts +4 -1
  59. package/esm/typings/src/transpilers/formatted-book-in-markdown/register.d.ts +1 -1
  60. package/esm/typings/src/transpilers/openai-sdk/OpenAiSdkTranspiler.d.ts +4 -1
  61. package/esm/typings/src/transpilers/openai-sdk/register.d.ts +1 -1
  62. package/esm/typings/src/types/typeAliases.d.ts +19 -1
  63. package/esm/typings/src/utils/color/$randomColor.d.ts +1 -0
  64. package/esm/typings/src/utils/color/operators/darken.d.ts +1 -1
  65. package/esm/typings/src/utils/color/operators/grayscale.d.ts +1 -1
  66. package/esm/typings/src/utils/color/operators/lighten.d.ts +1 -1
  67. package/esm/typings/src/utils/color/operators/mixWithColor.d.ts +1 -1
  68. package/esm/typings/src/utils/color/operators/saturate.d.ts +1 -1
  69. package/esm/typings/src/utils/environment/$detectRuntimeEnvironment.d.ts +16 -0
  70. package/esm/typings/src/utils/execCommand/$execCommand.d.ts +1 -1
  71. package/esm/typings/src/utils/execCommand/$execCommands.d.ts +1 -1
  72. package/esm/typings/src/utils/files/$induceBookDownload.d.ts +2 -2
  73. package/esm/typings/src/utils/files/$induceFileDownload.d.ts +2 -2
  74. package/esm/typings/src/utils/files/ObjectUrl.d.ts +1 -1
  75. package/esm/typings/src/utils/misc/aboutPromptbookInformation.d.ts +6 -0
  76. package/esm/typings/src/utils/organization/$side_effect.d.ts +1 -1
  77. package/esm/typings/src/utils/random/$generateBookBoilerplate.d.ts +25 -0
  78. package/esm/typings/src/utils/random/$randomAgentPersona.d.ts +9 -0
  79. package/esm/typings/src/utils/random/$randomFullnameWithColor.d.ts +13 -0
  80. package/esm/typings/src/utils/random/$randomItem.d.ts +9 -0
  81. package/esm/typings/src/utils/random/$randomSeed.d.ts +3 -0
  82. package/esm/typings/src/utils/random/$randomToken.d.ts +2 -0
  83. package/esm/typings/src/utils/serialization/$deepFreeze.d.ts +1 -1
  84. package/esm/typings/src/utils/serialization/serializeToPromptbookJavascript.d.ts +2 -2
  85. package/esm/typings/src/version.d.ts +1 -1
  86. package/package.json +2 -2
  87. package/umd/index.umd.js +21 -98
  88. package/umd/index.umd.js.map +1 -1
  89. package/esm/typings/src/collection/agent-collection/constructors/AgentCollectionInDirectory.d.ts +0 -89
  90. package/esm/typings/src/collection/agent-collection/constructors/AgentCollectionInDirectory.test.d.ts +0 -1
  91. package/esm/typings/src/commands/_common/parseCommand.test.d.ts +0 -1
  92. package/esm/typings/src/execution/utils/logLlmCall.d.ts +0 -8
@@ -5,7 +5,7 @@ import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
5
5
  import type { ChatPromptResult } from '../../execution/PromptResult';
6
6
  import type { Prompt } from '../../types/Prompt';
7
7
  import type { string_markdown, string_markdown_text, string_model_name, string_title } from '../../types/typeAliases';
8
- import { CreateAgentLlmExecutionToolsOptions } from './CreateAgentLlmExecutionToolsOptions';
8
+ import type { CreateAgentLlmExecutionToolsOptions } from './CreateAgentLlmExecutionToolsOptions';
9
9
  /**
10
10
  * Execution Tools for calling LLM models with a predefined agent "soul"
11
11
  * This wraps underlying LLM execution tools and applies agent-specific system prompts and requirements
@@ -1,5 +1,7 @@
1
- import { CommonToolsOptions, ExecutionTools, string_book } from '../../_packages/types.index';
2
- import { Updatable } from '../../types/Updatable';
1
+ import type { string_book } from '../../book-2.0/agent-source/string_book';
2
+ import type { CommonToolsOptions } from '../../execution/CommonToolsOptions';
3
+ import type { ExecutionTools } from '../../execution/ExecutionTools';
4
+ import type { Updatable } from '../../types/Updatable';
3
5
  /**
4
6
  * Options for creating an Agent
5
7
  */
@@ -1,10 +1,11 @@
1
- import type { string_book } from '../../_packages/types.index';
1
+ import type { string_book } from '../../book-2.0/agent-source/string_book';
2
+ import { CommonToolsOptions } from '../../execution/CommonToolsOptions';
2
3
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
3
- import type { OpenAiAssistantExecutionTools } from '../openai/OpenAiAssistantExecutionTools';
4
+ import { OpenAiAssistantExecutionTools } from '../openai/OpenAiAssistantExecutionTools';
4
5
  /**
5
6
  * Options for creating AgentLlmExecutionTools
6
7
  */
7
- export type CreateAgentLlmExecutionToolsOptions = {
8
+ export type CreateAgentLlmExecutionToolsOptions = CommonToolsOptions & {
8
9
  /**
9
10
  * The underlying LLM execution tools to wrap
10
11
  */
@@ -1,5 +1,5 @@
1
1
  import { AgentLlmExecutionTools } from './AgentLlmExecutionTools';
2
- import { CreateAgentLlmExecutionToolsOptions } from './CreateAgentLlmExecutionToolsOptions';
2
+ import type { CreateAgentLlmExecutionToolsOptions } from './CreateAgentLlmExecutionToolsOptions';
3
3
  /**
4
4
  * Creates new AgentLlmExecutionTools that wrap underlying LLM tools with agent-specific behavior
5
5
  *
@@ -3,7 +3,7 @@ import type { number_usd } from '../../types/typeAliases';
3
3
  /**
4
4
  * List of available Anthropic Claude models with pricing
5
5
  *
6
- * Note: Synced with official API docs at 2025-08-20
6
+ * Note: Synced with official API docs at 2025-11-19
7
7
  *
8
8
  * @see https://docs.anthropic.com/en/docs/models-overview
9
9
  * @public exported from `@promptbook/anthropic-claude`
@@ -3,7 +3,7 @@ import type { number_usd } from '../../types/typeAliases';
3
3
  /**
4
4
  * List of available Google models with descriptions
5
5
  *
6
- * Note: Synced with official API docs at 2025-08-20
6
+ * Note: Synced with official API docs at 2025-11-19
7
7
  *
8
8
  * @see https://ai.google.dev/models/gemini
9
9
  * @public exported from `@promptbook/google`
@@ -2,7 +2,7 @@ import type { AvailableModel } from '../../execution/AvailableModel';
2
2
  /**
3
3
  * List of available OpenAI models with pricing
4
4
  *
5
- * Note: Synced with official API docs at 2025-08-20
5
+ * Note: Synced with official API docs at 2025-11-19
6
6
  *
7
7
  * @see https://platform.openai.com/docs/models/
8
8
  * @see https://openai.com/api/pricing/
@@ -47,5 +47,6 @@ export type PrepareAndScrapeOptions = {
47
47
  readonly isVerbose?: boolean;
48
48
  };
49
49
  /**
50
+ * TODO: [🧠] Maybe extend from `CommonToolsOptions`
50
51
  * TODO: [🧠] Maybe split `PrepareAndScrapeOptions` and `ScrapeOptions` (`ScrapeOptions` should be extended from `PrepareAndScrapeOptions`)
51
52
  */
@@ -1,5 +1,5 @@
1
- import { TODO_any } from '../_packages/types.index';
2
- import { number_port } from '../types/typeAliases';
1
+ import type { number_port } from '../types/typeAliases';
2
+ import type { TODO_any } from '../utils/organization/TODO_any';
3
3
  type AgentsServerOptions = {
4
4
  /**
5
5
  * !!!
@@ -1,6 +1,5 @@
1
1
  import type { Request, Response } from 'express';
2
2
  import type { Promisable } from 'type-fest';
3
- import { really_any } from '../../_packages/types.index';
4
3
  import type { PipelineCollection } from '../../collection/pipeline-collection/PipelineCollection';
5
4
  import { AuthenticationError } from '../../errors/AuthenticationError';
6
5
  import type { CommonToolsOptions } from '../../execution/CommonToolsOptions';
@@ -27,24 +26,6 @@ export type RemoteServerOptions<TCustomOptions> = CommonToolsOptions & {
27
26
  * @property {number} port The port number the server will listen on.
28
27
  */
29
28
  readonly port: number;
30
- /**
31
- * CORS options to apply to all endpoints (REST, UI, socket.io, etc.).
32
- * Accepts the same options as the `cors` npm package and socket.io's CORS config.
33
- * If not provided, defaults to permissive CORS (origin: '*').
34
- * @see https://www.npmjs.com/package/cors
35
- * @see https://socket.io/docs/v4/server-options/#cors
36
- */
37
- readonly cors?: {
38
- origin?: string | string[] | boolean;
39
- methods?: string | string[];
40
- allowedHeaders?: string | string[];
41
- exposedHeaders?: string | string[];
42
- credentials?: boolean;
43
- maxAge?: number;
44
- preflightContinue?: boolean;
45
- optionsSuccessStatus?: number;
46
- [key: string]: really_any;
47
- };
48
29
  /**
49
30
  * Enable rich UI (React + Tailwind) at `/` path.
50
31
  * Default: true
@@ -1,5 +1,5 @@
1
+ import type { $side_effect } from '../../utils/organization/$side_effect';
1
2
  import type { PromptbookStorage } from '../_common/PromptbookStorage';
2
- import { $side_effect } from '../../utils/organization/$side_effect';
3
3
  /**
4
4
  * Stores data in .env variables
5
5
  *
@@ -1,5 +1,9 @@
1
1
  import { Promisable } from 'type-fest';
2
- import { BookTranspilerOptions, ExecutionTools, Registered, string_book, string_name, string_script, string_title } from '../../_packages/types.index';
2
+ import type { string_book } from '../../book-2.0/agent-source/string_book';
3
+ import type { ExecutionTools } from '../../execution/ExecutionTools';
4
+ import type { string_name, string_script, string_title } from '../../types/typeAliases';
5
+ import type { Registered } from '../../utils/misc/$Register';
6
+ import type { BookTranspilerOptions } from './BookTranspilerOptions';
3
7
  /**
4
8
  * Transpiler takes a book and transpiles it into another format (e.g., Langchain).
5
9
  */
@@ -1,4 +1,4 @@
1
- import { CommonToolsOptions } from '../../execution/CommonToolsOptions';
1
+ import type { CommonToolsOptions } from '../../execution/CommonToolsOptions';
2
2
  /**
3
3
  * Options for the BookTranspiler.
4
4
  */
@@ -1,5 +1,5 @@
1
1
  import { $Register } from '../../../utils/misc/$Register';
2
- import { BookTranspiler } from '../BookTranspiler';
2
+ import type { BookTranspiler } from '../BookTranspiler';
3
3
  /**
4
4
  * Register for book transpilers.
5
5
  *
@@ -1,4 +1,7 @@
1
- import { BookTranspilerOptions, ExecutionTools, string_book, string_markdown } from '../../_packages/types.index';
1
+ import type { string_book } from '../../book-2.0/agent-source/string_book';
2
+ import type { ExecutionTools } from '../../execution/ExecutionTools';
3
+ import type { string_markdown } from '../../types/typeAliases';
4
+ import type { BookTranspilerOptions } from '../_common/BookTranspilerOptions';
2
5
  /**
3
6
  * Converts a book into a 1:1 formatted markdown
4
7
  *
@@ -1,4 +1,4 @@
1
- import { Registration } from '../../_packages/types.index';
1
+ import type { Registration } from '../../utils/misc/$Register';
2
2
  /**
3
3
  * Registration of transpiler
4
4
  *
@@ -1,4 +1,7 @@
1
- import { BookTranspilerOptions, ExecutionTools, string_book, string_script } from '../../_packages/types.index';
1
+ import type { string_book } from '../../book-2.0/agent-source/string_book';
2
+ import type { ExecutionTools } from '../../execution/ExecutionTools';
3
+ import type { string_script } from '../../types/typeAliases';
4
+ import type { BookTranspilerOptions } from '../_common/BookTranspilerOptions';
2
5
  /**
3
6
  * Transpiler to Javascript code using OpenAI SDK.
4
7
  *
@@ -1,4 +1,4 @@
1
- import { Registration } from '../../_packages/types.index';
1
+ import type { Registration } from '../../utils/misc/$Register';
2
2
  /**
3
3
  * Registration of transpiler
4
4
  *
@@ -142,6 +142,12 @@ export type string_title = string;
142
142
  * For example `"My AI Assistant"`
143
143
  */
144
144
  export type string_agent_name = string;
145
+ /**
146
+ * Semantic helper
147
+ *
148
+ * For example `"My AI Assistant"`
149
+ */
150
+ export type string_agent_name_in_book = string;
145
151
  /**
146
152
  * Unstructured description of the persona
147
153
  *
@@ -530,7 +536,19 @@ export type string_dirname = string_absolute_dirname | string_relative_dirname;
530
536
  *
531
537
  * For example `"John Smith"`
532
538
  */
533
- export type string_person_fullname = string;
539
+ export type string_person_fullname = `${string_person_firstname} ${string_person_lastname}` | string;
540
+ /**
541
+ * Semantic helper
542
+ *
543
+ * For example `"John Smith"`
544
+ */
545
+ export type string_person_firstname = string;
546
+ /**
547
+ * Semantic helper
548
+ *
549
+ * For example `"John Smith"`
550
+ */
551
+ export type string_person_lastname = string;
534
552
  /**
535
553
  * Semantic helper
536
554
  * Full profile of the person with his email and web (like in package.json)
@@ -8,4 +8,5 @@ export declare function $randomColor(): Color;
8
8
  /**
9
9
  * TODO: !! Use Internally Color.fromValues
10
10
  * TODO: !! randomColorWithAlpha
11
+ * TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
11
12
  */
@@ -1,4 +1,4 @@
1
- import { number_percent } from '../../../types/typeAliases';
1
+ import type { number_percent } from '../../../types/typeAliases';
2
2
  import type { ColorTransformer } from './ColorTransformer';
3
3
  /**
4
4
  * Makes color transformer which darker the given color
@@ -1,4 +1,4 @@
1
- import { number_percent } from '../../../types/typeAliases';
1
+ import type { number_percent } from '../../../types/typeAliases';
2
2
  import type { ColorTransformer } from './ColorTransformer';
3
3
  /**
4
4
  * Makes color transformer which returns a grayscale version of the color
@@ -1,5 +1,5 @@
1
+ import type { number_percent } from '../../../types/typeAliases';
1
2
  import type { ColorTransformer } from './ColorTransformer';
2
- import { number_percent } from '../../../types/typeAliases';
3
3
  /**
4
4
  * Makes color transformer which lighten the given color
5
5
  *
@@ -1,6 +1,6 @@
1
+ import type { number_percent } from '../../../types/typeAliases';
1
2
  import { Color } from '../Color';
2
3
  import type { ColorTransformer } from './ColorTransformer';
3
- import { number_percent } from '../../../types/typeAliases';
4
4
  /**
5
5
  * Makes color transformer which returns a mix of two colors based on a ratio
6
6
  *
@@ -1,4 +1,4 @@
1
- import { number_percent } from '../../../types/typeAliases';
1
+ import type { number_percent } from '../../../types/typeAliases';
2
2
  import type { ColorTransformer } from './ColorTransformer';
3
3
  /**
4
4
  * Makes color transformer which saturate the given color
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Returns information about the current runtime 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 environments
5
+ *
6
+ * @public exported from `@promptbook/utils`
7
+ */
8
+ export declare function $detectRuntimeEnvironment(): {
9
+ isRunningInBrowser: any;
10
+ isRunningInJest: any;
11
+ isRunningInNode: any;
12
+ isRunningInWebWorker: any;
13
+ };
14
+ /**
15
+ * TODO: [🎺] Also detect and report node version here
16
+ */
@@ -1,4 +1,4 @@
1
- import { $side_effect } from '../organization/$side_effect';
1
+ import type { $side_effect } from '../organization/$side_effect';
2
2
  import type { ExecCommandOptions } from './ExecCommandOptions';
3
3
  /**
4
4
  * Run one command in a shell
@@ -1,4 +1,4 @@
1
- import { $side_effect } from '../organization/$side_effect';
1
+ import type { $side_effect } from '../organization/$side_effect';
2
2
  /**
3
3
  * Run multiple commands in a shell in sequence
4
4
  *
@@ -1,5 +1,5 @@
1
- import { string_book } from '../../_packages/types.index';
2
- import { $side_effect } from '../organization/$side_effect';
1
+ import type { string_book } from '../../book-2.0/agent-source/string_book';
2
+ import type { $side_effect } from '../organization/$side_effect';
3
3
  /**
4
4
  * Download a Book in a browser
5
5
  *
@@ -1,5 +1,5 @@
1
- import { string_url } from '../../types/typeAliases';
2
- import { $side_effect } from '../organization/$side_effect';
1
+ import type { string_url } from '../../types/typeAliases';
2
+ import type { $side_effect } from '../organization/$side_effect';
3
3
  /**
4
4
  * Download a File in a browser
5
5
  *
@@ -1,5 +1,5 @@
1
1
  import { IDestroyable, Registration } from 'destroyable';
2
- import { string_mime_type, string_url } from '../../types/typeAliases';
2
+ import type { string_mime_type, string_url } from '../../types/typeAliases';
3
3
  /**
4
4
  * Converts Blob, File or MediaSource to url using URL.createObjectURL
5
5
  *
@@ -6,6 +6,12 @@ export type AboutPromptbookInformationOptions = {
6
6
  * @default true
7
7
  */
8
8
  isServersInfoIncluded?: boolean;
9
+ /**
10
+ * Include information about runtime environment
11
+ *
12
+ * @default true
13
+ */
14
+ isRuntimeEnvironmentInfoIncluded?: boolean;
9
15
  };
10
16
  /**
11
17
  * Provide information about Promptbook, engine version, book language version, servers, ...
@@ -1,4 +1,4 @@
1
- import { really_any } from './really_any';
1
+ import type { really_any } from './really_any';
2
2
  /**
3
3
  * Organizational helper to mark a function that produces side effects
4
4
  *
@@ -0,0 +1,25 @@
1
+ import type { PartialDeep } from 'type-fest';
2
+ import type { AgentBasicInformation } from '../../book-2.0/agent-source/AgentBasicInformation';
3
+ import { string_book } from '../../book-2.0/agent-source/string_book';
4
+ import { string_agent_name_in_book } from '../../types/typeAliases';
5
+ type GenerateBookBoilerplateOptions = PartialDeep<Omit<AgentBasicInformation, 'parameters'>> & {
6
+ /**
7
+ * Name of the parent agent to inherit from
8
+ *
9
+ * @default 'Adam'
10
+ */
11
+ parentAgentName?: string_agent_name_in_book;
12
+ };
13
+ /**
14
+ * Generates boilerplate for a new agent book
15
+ *
16
+ * Note: `$` is used to indicate that this function is not a pure function - it is not deterministic
17
+ * Note: This function is using cryptographically secure components internally
18
+ *
19
+ * @public exported from `@promptbook/core`
20
+ */
21
+ export declare function $generateBookBoilerplate(options?: GenerateBookBoilerplateOptions): string_book;
22
+ export {};
23
+ /**
24
+ * TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
25
+ */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @@@@
3
+ *
4
+ * @private internal helper function
5
+ */
6
+ export declare function $randomAgentPersona(): string;
7
+ /**
8
+ * TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
9
+ */
@@ -0,0 +1,13 @@
1
+ import { string_color, string_person_fullname } from '../../types/typeAliases';
2
+ export type RandomFullnameWithColorResult = {
3
+ fullname: string_person_fullname;
4
+ color: string_color;
5
+ };
6
+ /**
7
+ *
8
+ * @private internal helper function
9
+ */
10
+ export declare function $randomFullnameWithColor(): RandomFullnameWithColorResult;
11
+ /**
12
+ * TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
13
+ */
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Pick random item from the received array
3
+ *
4
+ * @private internal helper function
5
+ */
6
+ export declare function $randomItem<TItem>(...items: Array<TItem>): TItem;
7
+ /**
8
+ * TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
9
+ */
@@ -8,3 +8,6 @@ import type { number_seed } from '../../types/typeAliases';
8
8
  * @private internal helper function
9
9
  */
10
10
  export declare function $randomSeed(): number_seed;
11
+ /**
12
+ * TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
13
+ */
@@ -2,6 +2,7 @@ import type { string_token } from '../../types/typeAliases';
2
2
  /**
3
3
  * Generates random token
4
4
  *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it is not deterministic
5
6
  * Note: This function is cryptographically secure (it uses crypto.randomBytes internally)
6
7
  *
7
8
  * @private internal helper function
@@ -9,5 +10,6 @@ import type { string_token } from '../../types/typeAliases';
9
10
  */
10
11
  export declare function $randomToken(randomness: number): string_token;
11
12
  /**
13
+ * TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
12
14
  * TODO: Maybe use nanoid instead https://github.com/ai/nanoid
13
15
  */
@@ -1,5 +1,5 @@
1
1
  import type { ReadonlyDeep } from 'type-fest';
2
- import { $side_effect } from '../organization/$side_effect';
2
+ import type { $side_effect } from '../organization/$side_effect';
3
3
  /**
4
4
  * Freezes the given object and all its nested objects recursively
5
5
  *
@@ -1,5 +1,5 @@
1
- import { string_javascript } from '../../types/typeAliases';
2
- import { TODO_any } from '../organization/TODO_any';
1
+ import type { string_javascript } from '../../types/typeAliases';
2
+ import type { TODO_any } from '../organization/TODO_any';
3
3
  type SerializeToPromptbookJavascriptReturn = {
4
4
  /**
5
5
  * Array of import statements required for the `value` to work
@@ -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-41`).
18
+ * It follows semantic versioning (e.g., `0.103.0-43`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/vercel",
3
- "version": "0.103.0-42",
3
+ "version": "0.103.0-44",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -94,7 +94,7 @@
94
94
  "module": "./esm/index.es.js",
95
95
  "typings": "./esm/typings/src/_packages/vercel.index.d.ts",
96
96
  "peerDependencies": {
97
- "@promptbook/core": "0.103.0-42"
97
+ "@promptbook/core": "0.103.0-44"
98
98
  },
99
99
  "dependencies": {
100
100
  "colors": "^1.4.0",