@promptbook/utils 0.112.0-99 → 0.113.0-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.
Files changed (170) hide show
  1. package/README.md +76 -44
  2. package/esm/index.es.js +9 -11
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/src/_packages/components.index.d.ts +4 -0
  5. package/esm/src/_packages/core.index.d.ts +22 -2
  6. package/esm/src/_packages/node.index.d.ts +40 -0
  7. package/esm/src/_packages/types.index.d.ts +20 -0
  8. package/esm/src/avatars/avatarAnimationScheduler.d.ts +4 -0
  9. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  10. package/esm/src/avatars/visuals/octopus3d3AvatarVisual.d.ts +7 -0
  11. package/esm/src/avatars/visuals/octopus3d4AvatarVisual.d.ts +7 -0
  12. package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -0
  13. package/esm/src/book-2.0/agent-source/agentSourceVisibility.d.ts +97 -0
  14. package/esm/src/book-2.0/agent-source/agentSourceVisibility.test.d.ts +1 -0
  15. package/esm/src/book-3.0/BookNodeAgentSource.d.ts +38 -0
  16. package/esm/src/book-3.0/CliAgent.d.ts +66 -0
  17. package/esm/src/book-3.0/CliAgent.test.d.ts +1 -0
  18. package/esm/src/book-3.0/LiteAgent.d.ts +68 -0
  19. package/esm/src/book-3.0/LiteAgent.test.d.ts +1 -0
  20. package/esm/src/book-3.0/agentFolderPaths.d.ts +30 -0
  21. package/esm/src/book-3.0/cliAgentEnv.d.ts +33 -0
  22. package/esm/src/book-components/BookEditor/BookEditor.d.ts +6 -5
  23. package/esm/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.d.ts +12 -0
  24. package/esm/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
  25. package/esm/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
  26. package/esm/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +2 -0
  27. package/esm/src/book-components/BookEditor/BookEditorTheme.d.ts +24 -0
  28. package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
  29. package/esm/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +1 -6
  30. package/esm/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +1 -4
  31. package/esm/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
  32. package/esm/src/book-components/Chat/Chat/ChatCitationModal.d.ts +2 -0
  33. package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +4 -0
  34. package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
  35. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
  36. package/esm/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +2 -0
  37. package/esm/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +3 -1
  38. package/esm/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
  39. package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -0
  40. package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
  41. package/esm/src/book-components/Chat/SourceChip/SourceChip.d.ts +6 -1
  42. package/esm/src/book-components/Chat/hooks/useResolvedCitationLabel.d.ts +12 -0
  43. package/esm/src/book-components/Chat/types/ChatMessage.d.ts +4 -0
  44. package/esm/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
  45. package/esm/src/book-components/Chat/types/CitationLabelResolver.d.ts +8 -0
  46. package/esm/src/book-components/Chat/utils/citationHelpers.d.ts +9 -0
  47. package/esm/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.d.ts +14 -0
  48. package/esm/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.test.d.ts +1 -0
  49. package/esm/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
  50. package/esm/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +4 -0
  51. package/esm/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
  52. package/esm/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
  53. package/esm/src/book-components/_common/Modal/Modal.d.ts +1 -1
  54. package/esm/src/book-components/icons/AboutIcon.d.ts +1 -1
  55. package/esm/src/book-components/icons/DownloadIcon.d.ts +1 -1
  56. package/esm/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
  57. package/esm/src/book-components/icons/FullscreenIcon.d.ts +1 -1
  58. package/esm/src/cli/cli-commands/agent/agentCliOptions.d.ts +38 -0
  59. package/esm/src/cli/cli-commands/agent/chat.d.ts +10 -0
  60. package/esm/src/cli/cli-commands/agent/exec.d.ts +10 -0
  61. package/esm/src/cli/cli-commands/agent/run.test.d.ts +1 -0
  62. package/esm/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -24
  63. package/esm/src/cli/cli-commands/agent.d.ts +14 -0
  64. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +23 -1
  65. package/esm/src/cli/cli-commands/agents-server/run.d.ts +6 -0
  66. package/esm/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +9 -2
  67. package/esm/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
  68. package/esm/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.d.ts +25 -0
  69. package/esm/src/cli/cli-commands/coder/find-unwritten.d.ts +10 -0
  70. package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +2 -0
  71. package/esm/src/cli/cli-commands/coder/server.d.ts +13 -0
  72. package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +14 -0
  73. package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -25
  74. package/esm/src/collection/agent-collection/CreateAgentInput.d.ts +2 -1
  75. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
  76. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +21 -1
  77. package/esm/src/commitments/META_VISIBILITY/META_VISIBILITY.d.ts +27 -0
  78. package/esm/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
  79. package/esm/src/commitments/index.d.ts +2 -1
  80. package/esm/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
  81. package/esm/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
  82. package/esm/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
  83. package/esm/src/utils/isTimingSafeEqualString.d.ts +25 -0
  84. package/esm/src/utils/validators/url/isValidAgentUrl.d.ts +5 -0
  85. package/esm/src/version.d.ts +1 -1
  86. package/package.json +1 -2
  87. package/umd/index.umd.js +13 -13
  88. package/umd/index.umd.js.map +1 -1
  89. package/umd/src/_packages/components.index.d.ts +4 -0
  90. package/umd/src/_packages/core.index.d.ts +22 -2
  91. package/umd/src/_packages/node.index.d.ts +40 -0
  92. package/umd/src/_packages/types.index.d.ts +20 -0
  93. package/umd/src/avatars/avatarAnimationScheduler.d.ts +4 -0
  94. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  95. package/umd/src/avatars/visuals/octopus3d3AvatarVisual.d.ts +7 -0
  96. package/umd/src/avatars/visuals/octopus3d4AvatarVisual.d.ts +7 -0
  97. package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -0
  98. package/umd/src/book-2.0/agent-source/agentSourceVisibility.d.ts +97 -0
  99. package/umd/src/book-2.0/agent-source/agentSourceVisibility.test.d.ts +1 -0
  100. package/umd/src/book-3.0/BookNodeAgentSource.d.ts +38 -0
  101. package/umd/src/book-3.0/CliAgent.d.ts +66 -0
  102. package/umd/src/book-3.0/CliAgent.test.d.ts +1 -0
  103. package/umd/src/book-3.0/LiteAgent.d.ts +68 -0
  104. package/umd/src/book-3.0/LiteAgent.test.d.ts +1 -0
  105. package/umd/src/book-3.0/agentFolderPaths.d.ts +30 -0
  106. package/umd/src/book-3.0/cliAgentEnv.d.ts +33 -0
  107. package/umd/src/book-components/BookEditor/BookEditor.d.ts +6 -5
  108. package/umd/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.d.ts +12 -0
  109. package/umd/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
  110. package/umd/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
  111. package/umd/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +2 -0
  112. package/umd/src/book-components/BookEditor/BookEditorTheme.d.ts +24 -0
  113. package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
  114. package/umd/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +1 -6
  115. package/umd/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +1 -4
  116. package/umd/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
  117. package/umd/src/book-components/Chat/Chat/ChatCitationModal.d.ts +2 -0
  118. package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +4 -0
  119. package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
  120. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
  121. package/umd/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +2 -0
  122. package/umd/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +3 -1
  123. package/umd/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
  124. package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -0
  125. package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
  126. package/umd/src/book-components/Chat/SourceChip/SourceChip.d.ts +6 -1
  127. package/umd/src/book-components/Chat/hooks/useResolvedCitationLabel.d.ts +12 -0
  128. package/umd/src/book-components/Chat/types/ChatMessage.d.ts +4 -0
  129. package/umd/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
  130. package/umd/src/book-components/Chat/types/CitationLabelResolver.d.ts +8 -0
  131. package/umd/src/book-components/Chat/utils/citationHelpers.d.ts +9 -0
  132. package/umd/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.d.ts +14 -0
  133. package/umd/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.test.d.ts +1 -0
  134. package/umd/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
  135. package/umd/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +4 -0
  136. package/umd/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
  137. package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
  138. package/umd/src/book-components/_common/Modal/Modal.d.ts +1 -1
  139. package/umd/src/book-components/icons/AboutIcon.d.ts +1 -1
  140. package/umd/src/book-components/icons/DownloadIcon.d.ts +1 -1
  141. package/umd/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
  142. package/umd/src/book-components/icons/FullscreenIcon.d.ts +1 -1
  143. package/umd/src/cli/cli-commands/agent/agentCliOptions.d.ts +38 -0
  144. package/umd/src/cli/cli-commands/agent/chat.d.ts +10 -0
  145. package/umd/src/cli/cli-commands/agent/exec.d.ts +10 -0
  146. package/umd/src/cli/cli-commands/agent/run.test.d.ts +1 -0
  147. package/umd/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -24
  148. package/umd/src/cli/cli-commands/agent.d.ts +14 -0
  149. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +23 -1
  150. package/umd/src/cli/cli-commands/agents-server/run.d.ts +6 -0
  151. package/umd/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +9 -2
  152. package/umd/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
  153. package/umd/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.d.ts +25 -0
  154. package/umd/src/cli/cli-commands/coder/find-unwritten.d.ts +10 -0
  155. package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +2 -0
  156. package/umd/src/cli/cli-commands/coder/server.d.ts +13 -0
  157. package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +14 -0
  158. package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -25
  159. package/umd/src/collection/agent-collection/CreateAgentInput.d.ts +2 -1
  160. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
  161. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +21 -1
  162. package/umd/src/commitments/META_VISIBILITY/META_VISIBILITY.d.ts +27 -0
  163. package/umd/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
  164. package/umd/src/commitments/index.d.ts +2 -1
  165. package/umd/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
  166. package/umd/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
  167. package/umd/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
  168. package/umd/src/utils/isTimingSafeEqualString.d.ts +25 -0
  169. package/umd/src/utils/validators/url/isValidAgentUrl.d.ts +5 -0
  170. package/umd/src/version.d.ts +1 -1
@@ -12,6 +12,7 @@ import type { BookEditorUploadProgressCallback } from '../book-components/BookEd
12
12
  import type { BookEditorUploadOptions } from '../book-components/BookEditor/BookEditor';
13
13
  import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
14
14
  import { BookEditor } from '../book-components/BookEditor/BookEditor';
15
+ import { BookEditorForClient } from '../book-components/BookEditor/BookEditorForClient';
15
16
  import { AgentChat } from '../book-components/Chat/AgentChat/AgentChat';
16
17
  import type { AgentChatProps } from '../book-components/Chat/AgentChat/AgentChatProps';
17
18
  import { Chat } from '../book-components/Chat/Chat/Chat';
@@ -65,6 +66,7 @@ import type { ChatProgressCard } from '../book-components/Chat/types/ChatMessage
65
66
  import type { ChatMessageReplyingTo } from '../book-components/Chat/types/ChatMessage';
66
67
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
67
68
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
69
+ import type { CitationLabelResolver } from '../book-components/Chat/types/CitationLabelResolver';
68
70
  import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
69
71
  import { parseMessageButtons } from '../book-components/Chat/utils/parseMessageButtons';
70
72
  import { ArrowIcon } from '../book-components/icons/ArrowIcon';
@@ -95,6 +97,7 @@ export type { BookEditorUploadProgressCallback };
95
97
  export type { BookEditorUploadOptions };
96
98
  export type { BookEditorProps };
97
99
  export { BookEditor };
100
+ export { BookEditorForClient };
98
101
  export { AgentChat };
99
102
  export type { AgentChatProps };
100
103
  export { Chat };
@@ -148,6 +151,7 @@ export type { ChatProgressCard };
148
151
  export type { ChatMessageReplyingTo };
149
152
  export type { ChatMessage };
150
153
  export type { ChatParticipant };
154
+ export type { CitationLabelResolver };
151
155
  export type { MessageButton };
152
156
  export { parseMessageButtons };
153
157
  export { ArrowIcon };
@@ -1,4 +1,15 @@
1
1
  import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
+ import { AGENT_VISIBILITY_VALUES } from '../book-2.0/agent-source/agentSourceVisibility';
3
+ import type { AgentVisibility } from '../book-2.0/agent-source/agentSourceVisibility';
4
+ import { DEFAULT_AGENT_VISIBILITY } from '../book-2.0/agent-source/agentSourceVisibility';
5
+ import { isAgentVisibility } from '../book-2.0/agent-source/agentSourceVisibility';
6
+ import { normalizeAgentVisibility } from '../book-2.0/agent-source/agentSourceVisibility';
7
+ import { parseAgentVisibility } from '../book-2.0/agent-source/agentSourceVisibility';
8
+ import { parseAgentVisibilityStrict } from '../book-2.0/agent-source/agentSourceVisibility';
9
+ import { parseAgentSourceVisibility } from '../book-2.0/agent-source/agentSourceVisibility';
10
+ import { isPublicAgentVisibility } from '../book-2.0/agent-source/agentSourceVisibility';
11
+ import { getNextAgentVisibility } from '../book-2.0/agent-source/agentSourceVisibility';
12
+ import { setAgentSourceVisibility } from '../book-2.0/agent-source/agentSourceVisibility';
2
13
  import { computeAgentHash } from '../book-2.0/agent-source/computeAgentHash';
3
14
  import { createAgentModelRequirements } from '../book-2.0/agent-source/createAgentModelRequirements';
4
15
  import type { CreateAgentModelRequirementsOptions } from '../book-2.0/agent-source/CreateAgentModelRequirementsOptions';
@@ -221,10 +232,20 @@ import { normalizeChatAttachments } from '../utils/chat/chatAttachments/normaliz
221
232
  import { resolveChatAttachmentContents } from '../utils/chat/chatAttachments/resolveChatAttachmentContents';
222
233
  import { aboutPromptbookInformation } from '../utils/misc/aboutPromptbookInformation';
223
234
  import { $generateBookBoilerplate } from '../utils/random/$generateBookBoilerplate';
224
- import { CORE_AGENTS_SERVER } from '../../servers';
225
235
  import { CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES } from '../../servers';
226
236
  import { PUBLIC_AGENTS_SERVERS } from '../../servers';
227
237
  export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
238
+ export { AGENT_VISIBILITY_VALUES };
239
+ export type { AgentVisibility };
240
+ export { DEFAULT_AGENT_VISIBILITY };
241
+ export { isAgentVisibility };
242
+ export { normalizeAgentVisibility };
243
+ export { parseAgentVisibility };
244
+ export { parseAgentVisibilityStrict };
245
+ export { parseAgentSourceVisibility };
246
+ export { isPublicAgentVisibility };
247
+ export { getNextAgentVisibility };
248
+ export { setAgentSourceVisibility };
228
249
  export { computeAgentHash };
229
250
  export { createAgentModelRequirements };
230
251
  export type { CreateAgentModelRequirementsOptions };
@@ -447,6 +468,5 @@ export { normalizeChatAttachments };
447
468
  export { resolveChatAttachmentContents };
448
469
  export { aboutPromptbookInformation };
449
470
  export { $generateBookBoilerplate };
450
- export { CORE_AGENTS_SERVER };
451
471
  export { CORE_AGENTS_SERVER_WELL_KNOWN_AGENT_NAMES };
452
472
  export { PUBLIC_AGENTS_SERVERS };
@@ -1,4 +1,24 @@
1
1
  import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
+ import { AGENT_BOOK_FILE_PATH } from '../book-3.0/agentFolderPaths';
3
+ import { AGENT_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
4
+ import { AGENT_QUEUED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
5
+ import { AGENT_FINISHED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
6
+ import { AGENT_FAILED_MESSAGES_DIRECTORY_PATH } from '../book-3.0/agentFolderPaths';
7
+ import type { BookNodeAgentSource } from '../book-3.0/BookNodeAgentSource';
8
+ import type { BookNodeAgentSourceOptions } from '../book-3.0/BookNodeAgentSource';
9
+ import type { CliAgentHarness } from '../book-3.0/CliAgent';
10
+ import type { CliAgentThinkingLevel } from '../book-3.0/CliAgent';
11
+ import type { CliAgentRunOptions } from '../book-3.0/CliAgent';
12
+ import type { CliAgentOptions } from '../book-3.0/CliAgent';
13
+ import { CliAgent } from '../book-3.0/CliAgent';
14
+ import { CLI_AGENT_HARNESS_NAMES } from '../book-3.0/cliAgentEnv';
15
+ import { CLI_AGENT_THINKING_LEVEL_VALUES } from '../book-3.0/cliAgentEnv';
16
+ import { PTBK_HARNESS_ENV } from '../book-3.0/cliAgentEnv';
17
+ import { PTBK_MODEL_ENV } from '../book-3.0/cliAgentEnv';
18
+ import { PTBK_THINKING_LEVEL_ENV } from '../book-3.0/cliAgentEnv';
19
+ import type { LiteAgentOptions } from '../book-3.0/LiteAgent';
20
+ import type { LiteAgentRunOptions } from '../book-3.0/LiteAgent';
21
+ import { LiteAgent } from '../book-3.0/LiteAgent';
2
22
  import { createPipelineCollectionFromDirectory } from '../collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory';
3
23
  import { getAllCommitmentsToolFunctionsForNode } from '../commitments/_common/getAllCommitmentsToolFunctionsForNode';
4
24
  import { $provideExecutablesForNode } from '../executables/$provideExecutablesForNode';
@@ -12,6 +32,26 @@ import { FileCacheStorage } from '../storage/file-cache-storage/FileCacheStorage
12
32
  import { $execCommand } from '../utils/execCommand/$execCommand';
13
33
  import { $execCommands } from '../utils/execCommand/$execCommands';
14
34
  export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
35
+ export { AGENT_BOOK_FILE_PATH };
36
+ export { AGENT_MESSAGES_DIRECTORY_PATH };
37
+ export { AGENT_QUEUED_MESSAGES_DIRECTORY_PATH };
38
+ export { AGENT_FINISHED_MESSAGES_DIRECTORY_PATH };
39
+ export { AGENT_FAILED_MESSAGES_DIRECTORY_PATH };
40
+ export type { BookNodeAgentSource };
41
+ export type { BookNodeAgentSourceOptions };
42
+ export type { CliAgentHarness };
43
+ export type { CliAgentThinkingLevel };
44
+ export type { CliAgentRunOptions };
45
+ export type { CliAgentOptions };
46
+ export { CliAgent };
47
+ export { CLI_AGENT_HARNESS_NAMES };
48
+ export { CLI_AGENT_THINKING_LEVEL_VALUES };
49
+ export { PTBK_HARNESS_ENV };
50
+ export { PTBK_MODEL_ENV };
51
+ export { PTBK_THINKING_LEVEL_ENV };
52
+ export type { LiteAgentOptions };
53
+ export type { LiteAgentRunOptions };
54
+ export { LiteAgent };
15
55
  export { createPipelineCollectionFromDirectory };
16
56
  export { getAllCommitmentsToolFunctionsForNode };
17
57
  export { $provideExecutablesForNode };
@@ -2,8 +2,17 @@ import type { BookParameter } from '../book-2.0/agent-source/AgentBasicInformati
2
2
  import type { AgentCapability } from '../book-2.0/agent-source/AgentBasicInformation';
3
3
  import type { AgentBasicInformation } from '../book-2.0/agent-source/AgentBasicInformation';
4
4
  import type { AgentModelRequirements } from '../book-2.0/agent-source/AgentModelRequirements';
5
+ import type { AgentVisibility } from '../book-2.0/agent-source/agentSourceVisibility';
5
6
  import type { CreateAgentModelRequirementsOptions } from '../book-2.0/agent-source/CreateAgentModelRequirementsOptions';
6
7
  import type { string_book } from '../book-2.0/agent-source/string_book';
8
+ import type { BookNodeAgentSource } from '../book-3.0/BookNodeAgentSource';
9
+ import type { BookNodeAgentSourceOptions } from '../book-3.0/BookNodeAgentSource';
10
+ import type { CliAgentHarness } from '../book-3.0/CliAgent';
11
+ import type { CliAgentThinkingLevel } from '../book-3.0/CliAgent';
12
+ import type { CliAgentRunOptions } from '../book-3.0/CliAgent';
13
+ import type { CliAgentOptions } from '../book-3.0/CliAgent';
14
+ import type { LiteAgentOptions } from '../book-3.0/LiteAgent';
15
+ import type { LiteAgentRunOptions } from '../book-3.0/LiteAgent';
7
16
  import type { AvatarChipProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChip';
8
17
  import type { AvatarChipFromSourceProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChipFromSource';
9
18
  import type { AvatarProfileProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfile';
@@ -47,6 +56,7 @@ import type { ChatProgressCard } from '../book-components/Chat/types/ChatMessage
47
56
  import type { ChatMessageReplyingTo } from '../book-components/Chat/types/ChatMessage';
48
57
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
49
58
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
59
+ import type { CitationLabelResolver } from '../book-components/Chat/types/CitationLabelResolver';
50
60
  import type { ParsedCitation } from '../book-components/Chat/utils/parseCitationsFromContent';
51
61
  import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
52
62
  import type { TeamToolResult } from '../book-components/Chat/utils/toolCallParsing/TeamToolResult';
@@ -435,8 +445,17 @@ export type { BookParameter };
435
445
  export type { AgentCapability };
436
446
  export type { AgentBasicInformation };
437
447
  export type { AgentModelRequirements };
448
+ export type { AgentVisibility };
438
449
  export type { CreateAgentModelRequirementsOptions };
439
450
  export type { string_book };
451
+ export type { BookNodeAgentSource };
452
+ export type { BookNodeAgentSourceOptions };
453
+ export type { CliAgentHarness };
454
+ export type { CliAgentThinkingLevel };
455
+ export type { CliAgentRunOptions };
456
+ export type { CliAgentOptions };
457
+ export type { LiteAgentOptions };
458
+ export type { LiteAgentRunOptions };
440
459
  export type { AvatarChipProps };
441
460
  export type { AvatarChipFromSourceProps };
442
461
  export type { AvatarProfileProps };
@@ -480,6 +499,7 @@ export type { ChatProgressCard };
480
499
  export type { ChatMessageReplyingTo };
481
500
  export type { ChatMessage };
482
501
  export type { ChatParticipant };
502
+ export type { CitationLabelResolver };
483
503
  export type { ParsedCitation };
484
504
  export type { MessageButton };
485
505
  export type { TeamToolResult };
@@ -7,6 +7,10 @@ type AvatarAnimationListener = (now: number) => void;
7
7
  /**
8
8
  * Registers one avatar animation callback in the shared animation loop.
9
9
  *
10
+ * Each listener is staggered at registration time so it does not fire on the same animation
11
+ * frame as the existing listeners, and the shared loop further caps how many listeners run
12
+ * per frame, keeping the main thread responsive when many avatars are mounted.
13
+ *
10
14
  * @param avatarAnimationListener Frame callback invoked on every animation frame.
11
15
  * @returns Cleanup function that unregisters the callback.
12
16
  *
@@ -7,7 +7,7 @@ import type { AvatarDefinition } from './AvatarDefinition';
7
7
  *
8
8
  * @private shared contract for the avatar rendering system
9
9
  */
10
- export type AvatarVisualId = 'pixel-art' | 'octopus' | 'octopus2' | 'octopus3' | 'octopus3d' | 'octopus3d2' | 'ascii-octopus' | 'minecraft' | 'minecraft2' | 'fractal' | 'orb';
10
+ export type AvatarVisualId = 'pixel-art' | 'octopus' | 'octopus2' | 'octopus3' | 'octopus3d' | 'octopus3d2' | 'octopus3d3' | 'octopus3d4' | 'ascii-octopus' | 'minecraft' | 'minecraft2' | 'fractal' | 'orb';
11
11
  /**
12
12
  * Derived color palette used by avatar visuals.
13
13
  *
@@ -0,0 +1,7 @@
1
+ import type { AvatarVisualDefinition } from '../types/AvatarVisualDefinition';
2
+ /**
3
+ * Octopus 3D 3 avatar visual.
4
+ *
5
+ * @private built-in avatar visual
6
+ */
7
+ export declare const octopus3d3AvatarVisual: AvatarVisualDefinition;
@@ -0,0 +1,7 @@
1
+ import type { AvatarVisualDefinition } from '../types/AvatarVisualDefinition';
2
+ /**
3
+ * Octopus 3D 4 avatar visual.
4
+ *
5
+ * @private built-in avatar visual
6
+ */
7
+ export declare const octopus3d4AvatarVisual: AvatarVisualDefinition;
@@ -4,6 +4,7 @@ import type { string_agent_url } from '../../types/string_agent_url';
4
4
  import type { string_fonts } from '../../types/string_markdown';
5
5
  import type { string_color } from '../../types/string_person_fullname';
6
6
  import type { string_url_image } from '../../types/string_url_image';
7
+ import type { AgentVisibility } from './agentSourceVisibility';
7
8
  /**
8
9
  * Unified parameter representation that supports two different notations:
9
10
  * 1. @Parameter - single word parameter starting with @
@@ -97,6 +98,7 @@ export type AgentBasicInformation = {
97
98
  font?: string_fonts;
98
99
  color?: string_color;
99
100
  voice?: string;
101
+ visibility?: AgentVisibility;
100
102
  [key: string]: string | undefined;
101
103
  };
102
104
  /**
@@ -0,0 +1,97 @@
1
+ import type { string_book } from './string_book';
2
+ /**
3
+ * Supported visibility states for persisted agents.
4
+ *
5
+ * @public exported from `@promptbook/core`
6
+ */
7
+ export declare const AGENT_VISIBILITY_VALUES: readonly ["PRIVATE", "UNLISTED", "PUBLIC"];
8
+ /**
9
+ * Canonical visibility union for agents.
10
+ *
11
+ * @public exported from `@promptbook/core`
12
+ */
13
+ export type AgentVisibility = (typeof AGENT_VISIBILITY_VALUES)[number];
14
+ /**
15
+ * Fallback visibility used when no valid value is configured.
16
+ *
17
+ * @public exported from `@promptbook/core`
18
+ */
19
+ export declare const DEFAULT_AGENT_VISIBILITY: AgentVisibility;
20
+ /**
21
+ * Returns `true` when the value is one of supported visibility states.
22
+ *
23
+ * @param value - Raw value to validate.
24
+ * @returns Whether the value is a valid `AgentVisibility`.
25
+ *
26
+ * @public exported from `@promptbook/core`
27
+ */
28
+ export declare function isAgentVisibility(value: unknown): value is AgentVisibility;
29
+ /**
30
+ * Normalizes raw visibility text into a supported value.
31
+ *
32
+ * @param value - Raw visibility value.
33
+ * @returns Normalized visibility, or `null` when invalid.
34
+ *
35
+ * @public exported from `@promptbook/core`
36
+ */
37
+ export declare function normalizeAgentVisibility(value: unknown): AgentVisibility | null;
38
+ /**
39
+ * Parses visibility from an unknown value with a safe fallback.
40
+ *
41
+ * @param value - Raw visibility value.
42
+ * @param fallback - Fallback when the value is invalid.
43
+ * @returns Parsed visibility.
44
+ *
45
+ * @public exported from `@promptbook/core`
46
+ */
47
+ export declare function parseAgentVisibility(value: unknown, fallback?: AgentVisibility): AgentVisibility;
48
+ /**
49
+ * Parses visibility and throws when the value is not supported.
50
+ *
51
+ * @param value - Raw visibility value.
52
+ * @param sourceLabel - Human-readable source used in the error message.
53
+ * @returns Parsed visibility.
54
+ *
55
+ * @public exported from `@promptbook/core`
56
+ */
57
+ export declare function parseAgentVisibilityStrict(value: unknown, sourceLabel?: string): AgentVisibility;
58
+ /**
59
+ * Extracts the last `META VISIBILITY` value from an agent source.
60
+ *
61
+ * @param agentSource - Raw book source.
62
+ * @param options - Strict parsing options.
63
+ * @returns Normalized visibility, or `null` when no commitment is present.
64
+ *
65
+ * @public exported from `@promptbook/core`
66
+ */
67
+ export declare function parseAgentSourceVisibility(agentSource: string_book, options?: {
68
+ readonly isStrict?: boolean;
69
+ }): AgentVisibility | null;
70
+ /**
71
+ * Returns whether an agent should be listed publicly in anonymous views.
72
+ *
73
+ * @param visibility - Agent visibility to evaluate.
74
+ * @returns `true` for publicly listed agents.
75
+ *
76
+ * @public exported from `@promptbook/core`
77
+ */
78
+ export declare function isPublicAgentVisibility(visibility: AgentVisibility | null | undefined): boolean;
79
+ /**
80
+ * Returns the next visibility in UI rotation order.
81
+ *
82
+ * @param visibility - Current visibility.
83
+ * @returns Next visibility value.
84
+ *
85
+ * @public exported from `@promptbook/core`
86
+ */
87
+ export declare function getNextAgentVisibility(visibility: AgentVisibility | null | undefined): AgentVisibility;
88
+ /**
89
+ * Inserts or replaces the `META VISIBILITY` commitment in a book source.
90
+ *
91
+ * @param agentSource - Raw book source.
92
+ * @param visibility - Visibility to persist.
93
+ * @returns Source with exactly one normalized `META VISIBILITY` line.
94
+ *
95
+ * @public exported from `@promptbook/core`
96
+ */
97
+ export declare function setAgentSourceVisibility(agentSource: string_book, visibility: AgentVisibility): string_book;
@@ -0,0 +1,38 @@
1
+ import type { string_book } from '../book-2.0/agent-source/string_book';
2
+ import { Book } from './Book';
3
+ /**
4
+ * Book source value accepted by Node-backed Book agents.
5
+ *
6
+ * @public exported from `@promptbook/node`
7
+ */
8
+ export type BookNodeAgentSource = Book | string_book;
9
+ /**
10
+ * Common source options shared by Node-backed Book agents.
11
+ *
12
+ * Provide either `agentPath` or `book`.
13
+ *
14
+ * @public exported from `@promptbook/node`
15
+ */
16
+ export type BookNodeAgentSourceOptions = {
17
+ readonly agentPath?: string;
18
+ readonly book?: string | BookNodeAgentSource;
19
+ readonly currentWorkingDirectory?: string;
20
+ };
21
+ /**
22
+ * Normalized source snapshot used internally by Node-backed Book agents.
23
+ *
24
+ * @private internal utility of `CliAgent` and `LiteAgent`
25
+ */
26
+ export type ResolvedBookNodeAgentSource = {
27
+ readonly agentName: string;
28
+ readonly agentPath: string | null;
29
+ readonly agentSource: string_book;
30
+ readonly currentWorkingDirectory: string;
31
+ readonly sourceDirectoryPath: string;
32
+ };
33
+ /**
34
+ * Resolves shared Node-backed Book source options into one normalized source snapshot.
35
+ *
36
+ * @private internal utility of `CliAgent` and `LiteAgent`
37
+ */
38
+ export declare function resolveBookNodeAgentSource(options: BookNodeAgentSourceOptions): Promise<ResolvedBookNodeAgentSource>;
@@ -0,0 +1,66 @@
1
+ import type { BookNodeAgentSourceOptions } from './BookNodeAgentSource';
2
+ import { CLI_AGENT_HARNESS_NAMES, CLI_AGENT_THINKING_LEVEL_VALUES } from './cliAgentEnv';
3
+ /**
4
+ * CLI harness names supported by `ptbk agent exec`.
5
+ *
6
+ * @public exported from `@promptbook/node`
7
+ */
8
+ export type CliAgentHarness = (typeof CLI_AGENT_HARNESS_NAMES)[number];
9
+ /**
10
+ * Thinking levels supported by CLI coding harnesses.
11
+ *
12
+ * @public exported from `@promptbook/node`
13
+ */
14
+ export type CliAgentThinkingLevel = (typeof CLI_AGENT_THINKING_LEVEL_VALUES)[number];
15
+ /**
16
+ * Per-run CLI options exposed by `CliAgent`.
17
+ *
18
+ * `noUi` defaults to `true` so command output stays suitable for JavaScript callers.
19
+ *
20
+ * @public exported from `@promptbook/node`
21
+ */
22
+ export type CliAgentRunOptions = {
23
+ readonly allowCredits?: boolean;
24
+ readonly context?: string;
25
+ readonly harness?: CliAgentHarness;
26
+ readonly isVerbose?: boolean;
27
+ readonly model?: string;
28
+ readonly noUi?: boolean;
29
+ readonly thinkingLevel?: CliAgentThinkingLevel;
30
+ };
31
+ /**
32
+ * Constructor options for `CliAgent`.
33
+ *
34
+ * @public exported from `@promptbook/node`
35
+ */
36
+ export type CliAgentOptions = BookNodeAgentSourceOptions & CliAgentRunOptions;
37
+ /**
38
+ * Lightweight JavaScript wrapper around the Promptbook agent execution pipeline.
39
+ *
40
+ * It uses the same harnesses and execution path as `ptbk agent exec`, running the runner
41
+ * in-process instead of spawning a separate CLI process.
42
+ *
43
+ * When no `harness` is provided in the constructor or per-run options, `CliAgent` falls back
44
+ * to the `PTBK_HARNESS` environment variable, mirroring `ptbk agent exec` behavior.
45
+ *
46
+ * @public exported from `@promptbook/node`
47
+ */
48
+ export declare class CliAgent {
49
+ private readonly options;
50
+ private temporaryAgentPath;
51
+ constructor(options: CliAgentOptions);
52
+ /**
53
+ * Runs one non-interactive agent turn through the selected harness.
54
+ *
55
+ * @param message - User message sent to the agent.
56
+ * @param options - Optional per-run overrides.
57
+ * @returns Final agent answer.
58
+ */
59
+ run(message: string, options?: CliAgentRunOptions): Promise<string>;
60
+ /**
61
+ * Resolves the agent path passed to the runner, materializing one temporary `.book` file when needed.
62
+ *
63
+ * @private internal utility of `CliAgent`
64
+ */
65
+ private resolveExecutableAgentPath;
66
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,68 @@
1
+ import type { CreateAgentModelRequirementsOptions } from '../book-2.0/agent-source/CreateAgentModelRequirementsOptions';
2
+ import type { ScriptExecutionTools } from '../execution/ScriptExecutionTools';
3
+ import type { string_model_name } from '../types/string_model_name';
4
+ import type { BookNodeAgentSourceOptions } from './BookNodeAgentSource';
5
+ /**
6
+ * Options for constructing one `LiteAgent`.
7
+ *
8
+ * `LiteAgent` is intentionally smaller than the CLI harnesses. It runs the Book through the
9
+ * OpenAI Agents SDK directly, while keeping Promptbook tool definitions and hosted knowledge
10
+ * whenever those features fit inside the lighter runtime.
11
+ *
12
+ * @public exported from `@promptbook/node`
13
+ */
14
+ export type LiteAgentOptions = BookNodeAgentSourceOptions & {
15
+ readonly apiKey?: string;
16
+ readonly baseURL?: string;
17
+ readonly createAgentModelRequirementsOptions?: CreateAgentModelRequirementsOptions;
18
+ readonly isVerbose?: boolean;
19
+ readonly maxRequestsPerMinute?: number;
20
+ readonly modelName?: string_model_name;
21
+ readonly organization?: string;
22
+ readonly project?: string;
23
+ readonly scriptExecutionTools?: ScriptExecutionTools | ReadonlyArray<ScriptExecutionTools>;
24
+ readonly userId?: string;
25
+ };
26
+ /**
27
+ * Per-run options for `LiteAgent`.
28
+ *
29
+ * @public exported from `@promptbook/node`
30
+ */
31
+ export type LiteAgentRunOptions = {
32
+ readonly context?: string;
33
+ readonly signal?: AbortSignal;
34
+ };
35
+ /**
36
+ * Lightweight Node.js wrapper around the OpenAI Agents SDK for Promptbook Books.
37
+ *
38
+ * This path is intentionally simpler than `ptbk agent exec`: it prepares one SDK agent in-process
39
+ * and reuses it across calls, which keeps JavaScript integration small while still honoring the
40
+ * compiled Promptbook system message, prompt suffix, tools, and hosted knowledge when supported.
41
+ *
42
+ * @public exported from `@promptbook/node`
43
+ */
44
+ export declare class LiteAgent {
45
+ private readonly options;
46
+ private preparedAgentPromise;
47
+ constructor(options: LiteAgentOptions);
48
+ /**
49
+ * Runs one user message through the prepared OpenAI Agents SDK agent.
50
+ *
51
+ * @param message - User message sent to the agent.
52
+ * @param options - Optional context and cancellation signal.
53
+ * @returns Final text returned by the SDK agent.
54
+ */
55
+ run(message: string, options?: LiteAgentRunOptions): Promise<string>;
56
+ /**
57
+ * Lazily prepares and caches the underlying OpenAI Agents SDK runtime.
58
+ *
59
+ * @private internal utility of `LiteAgent`
60
+ */
61
+ private prepareAgent;
62
+ /**
63
+ * Builds the in-process OpenAI Agents SDK runtime from the Book source.
64
+ *
65
+ * @private internal utility of `LiteAgent`
66
+ */
67
+ private createPreparedAgent;
68
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Relative path to the local agent source used by the agent folder convention.
3
+ *
4
+ * @public exported from `@promptbook/node`
5
+ */
6
+ export declare const AGENT_BOOK_FILE_PATH = "agent.book";
7
+ /**
8
+ * Relative path to the message queue root used by the agent folder convention.
9
+ *
10
+ * @public exported from `@promptbook/node`
11
+ */
12
+ export declare const AGENT_MESSAGES_DIRECTORY_PATH = "messages";
13
+ /**
14
+ * Relative path to queued user messages consumed by the agent runner.
15
+ *
16
+ * @public exported from `@promptbook/node`
17
+ */
18
+ export declare const AGENT_QUEUED_MESSAGES_DIRECTORY_PATH: string;
19
+ /**
20
+ * Relative path to answered messages written by the agent runner.
21
+ *
22
+ * @public exported from `@promptbook/node`
23
+ */
24
+ export declare const AGENT_FINISHED_MESSAGES_DIRECTORY_PATH: string;
25
+ /**
26
+ * Relative path to messages that the agent runner stopped retrying.
27
+ *
28
+ * @public exported from `@promptbook/node`
29
+ */
30
+ export declare const AGENT_FAILED_MESSAGES_DIRECTORY_PATH: string;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * All CLI harness names supported by `CliAgent` and `ptbk agent exec`.
3
+ *
4
+ * @public exported from `@promptbook/node`
5
+ */
6
+ export declare const CLI_AGENT_HARNESS_NAMES: readonly ["openai-codex", "github-copilot", "cline", "claude-code", "opencode", "gemini"];
7
+ /**
8
+ * All supported thinking-level values for CLI coding-agent runners.
9
+ *
10
+ * @public exported from `@promptbook/node`
11
+ */
12
+ export declare const CLI_AGENT_THINKING_LEVEL_VALUES: readonly ["low", "medium", "high", "xhigh", "max"];
13
+ /**
14
+ * Environment variable used as the default runner identifier when `--harness` is omitted or not set in `CliAgent`.
15
+ *
16
+ * Set this to one of the harness names (`openai-codex`, `github-copilot`, `cline`, `claude-code`, `opencode`, `gemini`)
17
+ * so that `CliAgent` and `ptbk agent exec` can run without an explicit `harness` option.
18
+ *
19
+ * @public exported from `@promptbook/node`
20
+ */
21
+ export declare const PTBK_HARNESS_ENV = "PTBK_HARNESS";
22
+ /**
23
+ * Environment variable used as the default runner model when `--model` is omitted or not set in `CliAgent`.
24
+ *
25
+ * @public exported from `@promptbook/node`
26
+ */
27
+ export declare const PTBK_MODEL_ENV = "PTBK_MODEL";
28
+ /**
29
+ * Environment variable used as the default thinking level when `--thinking-level` is omitted or not set in `CliAgent`.
30
+ *
31
+ * @public exported from `@promptbook/node`
32
+ */
33
+ export declare const PTBK_THINKING_LEVEL_ENV = "PTBK_THINKING_LEVEL";
@@ -1,4 +1,4 @@
1
- import { CSSProperties } from 'react';
1
+ import { type CSSProperties } from 'react';
2
2
  import type { Promisable } from 'type-fest';
3
3
  import type { string_book } from '../../book-2.0/agent-source/string_book';
4
4
  import type { number_percent } from '../../types/number_percent';
@@ -6,6 +6,7 @@ import type { number_positive } from '../../types/number_positive';
6
6
  import type { string_knowledge_source_content } from '../../types/string_knowledge_source_content';
7
7
  import type { string_css_value } from '../../types/string_markdown';
8
8
  import type { HoistedMenuItem } from '../_common/MenuHoisting/MenuHoistingContext';
9
+ import type { BookEditorTheme } from './BookEditorTheme';
9
10
  /**
10
11
  * Monaco diagnostic shown inside `BookEditor`.
11
12
  *
@@ -94,14 +95,14 @@ export type BookEditorProps = {
94
95
  */
95
96
  readonly style?: CSSProperties;
96
97
  /**
97
- * Resolved visual theme used for the editor wrapper and Monaco instance.
98
+ * Resolved host application theme.
98
99
  *
99
- * Host applications should pass the final light/dark theme instead of relying on
100
- * browser media-query inference inside `<BookEditor/>`.
100
+ * `<BookEditor/>` accepts this for integration compatibility, but the notebook
101
+ * editor itself is intentionally rendered as light paper in every app theme.
101
102
  *
102
103
  * @default 'LIGHT'
103
104
  */
104
- readonly theme?: 'LIGHT' | 'DARK';
105
+ readonly theme?: BookEditorTheme;
105
106
  /**
106
107
  * Height of the `BookEditor` component
107
108
  *
@@ -0,0 +1,12 @@
1
+ import type { AboutPromptbookInformationOptions } from '../../utils/misc/aboutPromptbookInformation';
2
+ /**
3
+ * Browser-safe Promptbook information used by `BookEditor`.
4
+ *
5
+ * The shared `AboutPromptbookInformation` component renders markdown through the
6
+ * chat markdown pipeline, which has a server-side JSDOM sanitizer path. Keeping
7
+ * this component plain JSX prevents BookEditor from pulling JSDOM into client
8
+ * bundles.
9
+ *
10
+ * @private Internal component used by `BookEditorActionbar`
11
+ */
12
+ export declare function BookEditorAboutPromptbookInformation(props?: AboutPromptbookInformationOptions): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { NAME, CLAIM, PROMPTBOOK_LEGAL_ENTITY, IS_COST_PREVENTED, DEFAULT_IS_VERBOSE, DEFAULT_MAX_CONCURRENT_UPLOADS, PROMPTBOOK_SYNTAX_COLORS, } from '../../config';
2
+ export { PUBLIC_AGENTS_SERVERS } from '../../../servers';
@@ -0,0 +1,7 @@
1
+ import type { BookEditorProps } from './BookEditor';
2
+ /**
3
+ * Renders a book editor
4
+ *
5
+ * @public exported from `@promptbook/components`
6
+ */
7
+ export declare function BookEditorForClient(props: BookEditorProps): import("react/jsx-runtime").JSX.Element;
@@ -15,9 +15,11 @@ type AgentReferenceMatch = {
15
15
  * @private function of BookEditorMonaco
16
16
  */
17
17
  export declare const BookEditorMonacoTokenization: {
18
+ DYNAMIC_COMMITMENT_REGEX: RegExp;
18
19
  AGENT_URL_REFERENCE_REGEX: RegExp;
19
20
  AGENT_REFERENCE_TOKEN_REGEX: RegExp;
20
21
  AGENT_REFERENCE_BRACED_REGEX: RegExp;
22
+ NON_AGENT_REFERENCE_INLINE_AT_TOKEN_REGEX: RegExp;
21
23
  AGENT_REFERENCE_HIGHLIGHT_REGEXES: readonly [RegExp, RegExp, RegExp];
22
24
  extractAgentReferenceValue: (token: string) => string;
23
25
  resolveAgentReferenceToUrl: (referenceValue: string) => string | null;